Version 1.13.0-dev.7.0

Merge commit 'd04dbcd6882d85ade1ca7b7f43159297caacd4d7' into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f9aadf..039c5cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,10 @@
     was deprecated back in 1.9. Use the `shared` flag when creating listening
     sockets and `HttpServer` to distribute accepted sockets between isolates.
 
+* `dart:isolate`
+  * `Isolate` added `packageRoot` and `packageMap` getters.
+  * `Isolate.spawnUri` added `packageMap` parameter.
+
 ### Tool changes
 
 * `docgen` and 'dartdocgen' no longer ship in the sdk. The `docgen` sources have
diff --git a/DEPS b/DEPS
index ac30916..8043a46 100644
--- a/DEPS
+++ b/DEPS
@@ -38,7 +38,7 @@
 
   # Revisions of /third_party/* dependencies.
   "7zip_rev" : "@19997",
-  "analyzer_cli_rev" : "@c8a60be821be07df64cde2efb8f87b462a91a521",
+  "analyzer_cli_rev" : "@af40be0e3cc0b9904151a45e8074a8e797443cb6",
   "args_tag": "@0.13.0",
   "async_tag": "@1.2.0",
   "barback_tag" : "@0.15.2+7",
@@ -50,11 +50,11 @@
   "collection_rev": "@1da9a07f32efa2ba0c391b289e2037391e31da0e",
   "crypto_rev" : "@2df57a1e26dd88e8d0614207d4b062c73209917d",
   "csslib_tag" : "@0.12.0",
-  "dart2js_info_rev" : "@ffd03ee45f7459efd3039ff565b4d0aa2e7cd9e7",
-  "dartdoc_rev" : "@d51211b7c0a30862a691aa6dc0631009bd926004",
+  "dart2js_info_rev" : "@c4ad464717e3a304fb0d44a6937c25ff2049b863",
+  "dartdoc_rev" : "@1f54e8c2119d6d78ee7d19b477b8a90c27e1ea05",
   "dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
   "dart_style_tag": "@0.2.0",
-  "dev_compiler_rev": "@0.1.8",
+  "dev_compiler_rev": "@0.1.9",
   "fake_async_rev" : "@38614",
   "firefox_jsshell_rev" : "@45554",
   "glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
@@ -68,7 +68,7 @@
   "intl_rev": "@32047558bd220a53c1f4d93a26d54b83533b1475",
   "jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "@1.1.1",
-  "linter_rev": "@1df9178fbb475c77658531b3d702ac9e615f9714",
+  "linter_rev": "@23ec957be86263c3c5ac6bdaeb463170ea5fb00d",
   "logging_rev": "@85d83e002670545e9039ad3985f0018ab640e597",
   "markdown_rev": "@4aaadf3d940bb172e1f6285af4d2b1710d309982",
   "matcher_tag": "@0.12.0",
@@ -77,7 +77,7 @@
   "mustache4dart_rev" : "@5724cfd85151e5b6b53ddcd3380daf188fe47f92",
   "oauth2_rev": "@1bff41f4d54505c36f2d1a001b83b8b745c452f5",
   "observe_rev": "@eee2b8ec34236fa46982575fbccff84f61202ac6",
-  "observatory_pub_packages_rev": "@a731d3b1caf27b45aecdce9378b87a510240264d",
+  "observatory_pub_packages_rev": "@5c199c5954146747f75ed127871207718dc87786",
   "package_config_rev": "@0.1.3",
   "path_tag": "@1.3.6",
   "petitparser_rev" : "@37878",
diff --git a/pkg/analysis_server/benchmark/integration/input_converter.dart b/pkg/analysis_server/benchmark/integration/input_converter.dart
index 3d9fd5a..2e941ff 100644
--- a/pkg/analysis_server/benchmark/integration/input_converter.dart
+++ b/pkg/analysis_server/benchmark/integration/input_converter.dart
@@ -8,8 +8,8 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:logging/logging.dart';
 import 'package:path/path.dart' as path;
 
diff --git a/pkg/analysis_server/benchmark/integration/operation.dart b/pkg/analysis_server/benchmark/integration/operation.dart
index 761698e..0033d1f 100644
--- a/pkg/analysis_server/benchmark/integration/operation.dart
+++ b/pkg/analysis_server/benchmark/integration/operation.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:logging/logging.dart';
 
 import 'driver.dart';
diff --git a/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart b/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
index 6f7a3c6..8c5d595 100644
--- a/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/analysis_timing_tests.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:args/args.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -18,7 +18,7 @@
 /**
  * Pass in the directory of the source to be analyzed as option `--source`,
  * optionally specify a priority file with `--priority` and the specific
- * test to run with `--test`.  If no test is specified, the default is
+ * test to run with `--metric`.  If no test is specified, the default is
  * `analysis`.
  */
 main(List<String> arguments) {
@@ -31,38 +31,28 @@
   }
   source = args[SOURCE_OPTION];
   priorityFile = args[PRIORITY_FILE_OPTION];
-  testName = args[TEST_NAME_OPTION] ?? DEFAULT_TEST;
+  metricNames.addAll(args[METRIC_NAME_OPTION]);
+  unittestConfiguration.timeout = new Duration(minutes: 20);
 
-  switch (testName) {
-    case 'analysis':
-      defineReflectiveTests(AnalysisTimingIntegrationTest);
-      break;
-    case 'highlighting':
-      defineReflectiveTests(HighlightingTimingIntegrationTest);
-      break;
-    case 'navigation':
-      defineReflectiveTests(NavigationTimingIntegrationTest);
-      break;
-    case 'outline':
-      defineReflectiveTests(OutlineTimingIntegrationTest);
-      break;
-    default:
-      print('unrecognized test name $testName');
-      exit(1);
+  if (metricNames.isEmpty) {
+    defineReflectiveTests(AnalysisTimingTest);
+  } else {
+    defineReflectiveTests(SubscriptionTimingTest);
   }
 }
 
-const DEFAULT_TEST = 'analysis';
+const DEFAULT_METRIC = 'analysis';
+const METRIC_NAME_OPTION = 'metric';
 const PRIORITY_FILE_OPTION = 'priority';
 const SOURCE_OPTION = 'source';
-const TEST_NAME_OPTION = 'test';
 
+final metricNames = <String>[];
 String priorityFile;
 String source;
-String testName;
 
 ArgParser _createArgParser() => new ArgParser()
-  ..addOption(TEST_NAME_OPTION, help: 'test name (defaults to `analysis`)')
+  ..addOption(METRIC_NAME_OPTION,
+      help: 'metric name (defaults to `analysis`)', allowMultiple: true)
   ..addOption(SOURCE_OPTION, help: 'full path to source directory for analysis')
   ..addOption(PRIORITY_FILE_OPTION,
       help: '(optional) full path to a priority file');
@@ -76,13 +66,12 @@
 }
 
 @reflectiveTest
-class AnalysisTimingIntegrationTest extends AbstractTimingTest {
-  test_detect_analysis_done() {
-    stopwatch.start();
+class AnalysisTimingTest extends AbstractTimingTest {
+  Future test_timing() {
+    // Set root after subscribing to avoid empty notifications.
     setAnalysisRoot();
-    if (priorityFile != null) {
-      sendAnalysisSetPriorityFiles([priorityFile]);
-    }
+
+    stopwatch.start();
     return analysisFinished.then((_) {
       print('analysis completed in ${stopwatch.elapsed}');
       stopwatch.reset();
@@ -90,66 +79,76 @@
   }
 }
 
-@reflectiveTest
-class HighlightingTimingIntegrationTest extends PriorityFileTimer {
-  @override
-  String get description => 'highlighting';
-
-  @override
-  Stream get eventStream => onAnalysisHighlights;
-
-  @override
-  AnalysisService get service => AnalysisService.HIGHLIGHTS;
+class Metric {
+  List<Duration> timings = <Duration>[];
+  Stream eventStream;
+  AnalysisService service;
+  String name;
+  Metric(this.name, this.service, this.eventStream);
+  String toString() => '$name: $service, ${eventStream.runtimeType}, $timings';
 }
 
 @reflectiveTest
-class NavigationTimingIntegrationTest extends PriorityFileTimer {
-  @override
-  String get description => 'navigation';
+class SubscriptionTimingTest extends AbstractTimingTest {
+  List<Metric> _metrics;
 
-  @override
-  Stream get eventStream => onAnalysisNavigation;
+  List<Metric> get metrics =>
+      _metrics ??= metricNames.map((name) => getMetric(name)).toList();
 
-  @override
-  AnalysisService get service => AnalysisService.NAVIGATION;
-}
-
-@reflectiveTest
-class OutlineTimingIntegrationTest extends PriorityFileTimer {
-  @override
-  String get description => 'outline';
-
-  @override
-  Stream get eventStream => onAnalysisOutline;
-
-  @override
-  AnalysisService get service => AnalysisService.OUTLINE;
-}
-
-abstract class PriorityFileTimer extends AbstractTimingTest {
-  String get description;
-  Stream get eventStream;
-  AnalysisService get service;
+  Metric getMetric(String name) {
+    switch (name) {
+      case 'folding':
+        return new Metric(name, AnalysisService.FOLDING, onAnalysisFolding);
+      case 'highlighting':
+        return new Metric(
+            name, AnalysisService.HIGHLIGHTS, onAnalysisHighlights);
+      case 'implemented':
+        return new Metric(
+            name, AnalysisService.IMPLEMENTED, onAnalysisImplemented);
+      case 'navigation':
+        return new Metric(
+            name, AnalysisService.NAVIGATION, onAnalysisNavigation);
+      case 'outline':
+        return new Metric(name, AnalysisService.OUTLINE, onAnalysisOutline);
+      case 'occurences':
+        return new Metric(
+            name, AnalysisService.OCCURRENCES, onAnalysisOccurrences);
+      case 'overrides':
+        return new Metric(name, AnalysisService.OVERRIDES, onAnalysisOverrides);
+    }
+    print('no metric found for $name');
+    exit(1);
+    return null; // Won't get here.
+  }
 
   Future test_timing() {
+//   debugStdio();
+
+    expect(metrics, isNotEmpty);
     expect(priorityFile, isNotNull,
-        reason: 'A priority file must be specified for $description testing.');
+        reason: 'A priority file must be specified for '
+            '${metrics.first.name} testing.');
+
     stopwatch.start();
 
-    Duration elapsed;
-    eventStream.listen((_) {
-      elapsed = stopwatch.elapsed;
-    });
+    metrics.forEach((Metric m) => m.eventStream.listen((_) {
+          m.timings.add(
+              new Duration(milliseconds: stopwatch.elapsed.inMilliseconds));
+        }));
 
+    var subscriptions = <AnalysisService, List<String>>{};
+    metrics.forEach((Metric m) => subscriptions[m.service] = [priorityFile]);
+
+    sendAnalysisSetSubscriptions(subscriptions);
+
+    // Set root after subscribing to avoid empty notifications.
     setAnalysisRoot();
-    sendAnalysisSetSubscriptions({
-      service: [priorityFile]
-    });
 
     sendAnalysisSetPriorityFiles([priorityFile]);
 
     return analysisFinished.then((_) {
-      print('$description completed in ${elapsed}');
+      print('analysis completed in ${stopwatch.elapsed}');
+      metrics.forEach((Metric m) => print('${m.name} timings: ${m.timings}'));
       stopwatch.reset();
     });
   }
diff --git a/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
new file mode 100644
index 0000000..6ff587a
--- /dev/null
+++ b/pkg/analysis_server/benchmark/perf/completion_timing_tests.dart
@@ -0,0 +1,86 @@
+// 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 server.performance.analysis.timing;
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:args/args.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../test/utils.dart';
+import 'performance_tests.dart';
+
+/**
+ * Pass in the directory of the source to be analyzed as option `--source`,
+ * specify a priority file with `--priority` and an offset for completions
+ * with a `--offset`.
+ */
+main(List<String> arguments) {
+  initializeTestEnvironment();
+  ArgParser parser = _createArgParser();
+  var args = parser.parse(arguments);
+  if (args[SOURCE_OPTION] == null) {
+    print('path to source directory must be specified');
+    exit(1);
+  }
+  source = args[SOURCE_OPTION];
+  priorityFile = args[PRIORITY_FILE_OPTION];
+  offset = args[COMPLETION_OFFSET];
+
+  unittestConfiguration.timeout = new Duration(minutes: 20);
+
+  defineReflectiveTests(CompletionTimingTest);
+}
+
+const PRIORITY_FILE_OPTION = 'priority';
+const SOURCE_OPTION = 'source';
+const COMPLETION_OFFSET = 'offset';
+
+String priorityFile;
+String source;
+int offset;
+
+ArgParser _createArgParser() => new ArgParser()
+  ..addOption(SOURCE_OPTION, help: 'full path to source directory for analysis')
+  ..addOption(PRIORITY_FILE_OPTION, help: 'full path to a priority file')
+  ..addOption(COMPLETION_OFFSET, help: 'offset in file for code completions');
+
+@reflectiveTest
+class CompletionTimingTest extends AbstractAnalysisServerPerformanceTest {
+  List<Duration> timings = <Duration>[];
+
+  @override
+  Future setUp() => super.setUp().then((_) {
+        sourceDirectory = new Directory(source);
+        subscribeToStatusNotifications();
+      });
+
+  Future test_timing() {
+//    debugStdio();
+
+    expect(priorityFile, isNotNull,
+        reason: 'A priority file must be specified for completion testing.');
+    expect(offset, isNotNull,
+        reason: 'An offset must be specified for completion testing.');
+
+    stopwatch.start();
+
+    onCompletionResults.listen((_) {
+      timings.add(new Duration(milliseconds: stopwatch.elapsed.inMilliseconds));
+    });
+
+    setAnalysisRoot();
+    sendAnalysisSetPriorityFiles([priorityFile]);
+    sendCompletionGetSuggestions(priorityFile, offset);
+
+    return analysisFinished.then((_) {
+      print('analysis completed in ${stopwatch.elapsed}');
+      timings.forEach((timing) => print('notification at : ${timings}'));
+      stopwatch.reset();
+    });
+  }
+}
diff --git a/pkg/analysis_server/benchmark/perf/performance_tests.dart b/pkg/analysis_server/benchmark/perf/performance_tests.dart
index 3dd1842..761c647 100644
--- a/pkg/analysis_server/benchmark/perf/performance_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/performance_tests.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../test/integration/integration_tests.dart';
@@ -29,16 +29,6 @@
       sendAnalysisSetAnalysisRoots([sourceDirectory.path], []);
 
   /**
-   * Enable [SERVER_STATUS] notifications so that [analysisFinished]
-   * can be used.
-   */
-  Future subscribeToStatusNotifications() {
-    List<Future> futures = <Future>[];
-    futures.add(sendServerSetSubscriptions([ServerService.STATUS]));
-    return Future.wait(futures);
-  }
-
-  /**
    * The server is automatically started before every test.
    */
   @override
@@ -65,6 +55,16 @@
   }
 
   /**
+   * Enable [SERVER_STATUS] notifications so that [analysisFinished]
+   * can be used.
+   */
+  Future subscribeToStatusNotifications() {
+    List<Future> futures = <Future>[];
+    futures.add(sendServerSetSubscriptions([ServerService.STATUS]));
+    return Future.wait(futures);
+  }
+
+  /**
    * After every test, the server is stopped.
    */
   @override
diff --git a/pkg/analysis_server/lib/analysis/analysis_domain.dart b/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
similarity index 94%
rename from pkg/analysis_server/lib/analysis/analysis_domain.dart
rename to pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
index a046665..feca11a 100644
--- a/pkg/analysis_server/lib/analysis/analysis_domain.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/analysis_domain.dart
@@ -25,12 +25,13 @@
  *       ...
  *     }
  */
-library analysis_server.analysis;
+library analysis_server.plugin.analysis.analysis_domain;
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    show AnalysisService;
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart' show AnalysisService;
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, ComputedResult;
 import 'package:analyzer/src/generated/source.dart' show Source;
diff --git a/pkg/analysis_server/lib/plugin/analyzed_files.dart b/pkg/analysis_server/lib/plugin/analysis/analyzed_files.dart
similarity index 96%
rename from pkg/analysis_server/lib/plugin/analyzed_files.dart
rename to pkg/analysis_server/lib/plugin/analysis/analyzed_files.dart
index 7eda12c..b05bc97 100644
--- a/pkg/analysis_server/lib/plugin/analyzed_files.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/analyzed_files.dart
@@ -26,7 +26,7 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.analyzed_files;
+library analysis_server.plugin.analysis.analyzed_files;
 
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analyzer/file_system/file_system.dart';
diff --git a/pkg/analysis_server/lib/plugin/navigation.dart b/pkg/analysis_server/lib/plugin/analysis/navigation/navigation.dart
similarity index 90%
rename from pkg/analysis_server/lib/plugin/navigation.dart
rename to pkg/analysis_server/lib/plugin/analysis/navigation/navigation.dart
index 4ef8f2d..83e8377 100644
--- a/pkg/analysis_server/lib/plugin/navigation.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/navigation/navigation.dart
@@ -24,9 +24,9 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.navigation;
+library analysis_server.plugin.analysis.navigation.navigation;
 
-import 'package:analysis_server/analysis/navigation_core.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/lib/analysis/navigation_core.dart b/pkg/analysis_server/lib/plugin/analysis/navigation/navigation_core.dart
similarity index 91%
rename from pkg/analysis_server/lib/analysis/navigation_core.dart
rename to pkg/analysis_server/lib/plugin/analysis/navigation/navigation_core.dart
index 2e2623d..4626ffa 100644
--- a/pkg/analysis_server/lib/analysis/navigation_core.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/navigation/navigation_core.dart
@@ -2,14 +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.
 
-library analysis_server.analysis.navigation_core;
+library analysis_server.plugin.analysis.navigation.navigation_core;
 
-import 'package:analysis_server/src/protocol.dart'
+import 'package:analysis_server/plugin/protocol/protocol.dart'
     show ElementKind, Location, NavigationRegion, NavigationTarget;
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source.dart' show Source;
 
 /**
+ * An object that [NavigationContributor]s use to record navigation regions.
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class NavigationCollector {
+  /**
+   * Record a new navigation region with the given [offset] and [length] that
+   * should navigate to the given [targetLocation].
+   */
+  void addRegion(
+      int offset, int length, ElementKind targetKind, Location targetLocation);
+}
+
+/**
  * An object used to produce navigation regions.
  *
  * Clients are expected to subtype this class when implementing plugins.
@@ -23,17 +37,3 @@
   void computeNavigation(NavigationCollector collector, AnalysisContext context,
       Source source, int offset, int length);
 }
-
-/**
- * An object that [NavigationContributor]s use to record navigation regions.
- *
- * Clients are not expected to subtype this class.
- */
-abstract class NavigationCollector {
-  /**
-   * Record a new navigation region with the given [offset] and [length] that
-   * should navigate to the given [targetLocation].
-   */
-  void addRegion(
-      int offset, int length, ElementKind targetKind, Location targetLocation);
-}
diff --git a/pkg/analysis_server/lib/plugin/occurrences.dart b/pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences.dart
similarity index 90%
rename from pkg/analysis_server/lib/plugin/occurrences.dart
rename to pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences.dart
index eaabc26..22aecf5 100644
--- a/pkg/analysis_server/lib/plugin/occurrences.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences.dart
@@ -23,9 +23,9 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.occurrences;
+library analysis_server.plugin.analysis.occurrences.occurrences;
 
-import 'package:analysis_server/analysis/occurrences_core.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/lib/analysis/occurrences_core.dart b/pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences_core.dart
similarity index 86%
rename from pkg/analysis_server/lib/analysis/occurrences_core.dart
rename to pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences_core.dart
index 2e24a9b..eebf54e 100644
--- a/pkg/analysis_server/lib/analysis/occurrences_core.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/occurrences/occurrences_core.dart
@@ -2,13 +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.
 
-library analysis_server.analysis.occurrences_core;
+library analysis_server.plugin.analysis.occurrences.occurrences_core;
 
-import 'package:analysis_server/src/protocol.dart' show Element, Occurrences;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    show Element, Occurrences;
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source.dart' show Source;
 
 /**
+ * An object that [OccurrencesContributor]s use to record occurrences into.
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class OccurrencesCollector {
+  /**
+   * Record a new element occurrences.
+   */
+  void addOccurrences(Occurrences occurrences);
+}
+
+/**
  * An object used to produce occurrences.
  *
  * Clients are expected to subtype this class when implementing plugins.
@@ -21,15 +34,3 @@
   void computeOccurrences(
       OccurrencesCollector collector, AnalysisContext context, Source source);
 }
-
-/**
- * An object that [OccurrencesContributor]s use to record occurrences into.
- *
- * Clients are not expected to subtype this class.
- */
-abstract class OccurrencesCollector {
-  /**
-   * Record a new element occurrences.
-   */
-  void addOccurrences(Occurrences occurrences);
-}
diff --git a/pkg/analysis_server/lib/uri/resolver_provider.dart b/pkg/analysis_server/lib/plugin/analysis/resolver_provider.dart
similarity index 91%
rename from pkg/analysis_server/lib/uri/resolver_provider.dart
rename to pkg/analysis_server/lib/plugin/analysis/resolver_provider.dart
index 36ae274..ab6926c 100644
--- a/pkg/analysis_server/lib/uri/resolver_provider.dart
+++ b/pkg/analysis_server/lib/plugin/analysis/resolver_provider.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analysis_server.uri.resolver_provider;
+library analysis_server.plugin.analysis.resolver_provider;
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/plugin/assist.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist.dart
similarity index 91%
rename from pkg/analysis_server/lib/plugin/assist.dart
rename to pkg/analysis_server/lib/plugin/edit/assist/assist.dart
index 0955d10..cda2ab7 100644
--- a/pkg/analysis_server/lib/plugin/assist.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist.dart
@@ -22,9 +22,9 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.assist;
+library analysis_server.plugin.edit.assist.assist;
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/lib/edit/assist/assist_core.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
similarity index 94%
rename from pkg/analysis_server/lib/edit/assist/assist_core.dart
rename to pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
index 537791c..08bad09 100644
--- a/pkg/analysis_server/lib/edit/assist/assist_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
@@ -2,9 +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.
 
-library analysis_server.edit.assist.assist_core;
+library analysis_server.plugin.edit.assist.assist_core;
 
-import 'package:analysis_server/src/protocol.dart' show SourceChange;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    show SourceChange;
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/edit/assist/assist_dart.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
similarity index 92%
rename from pkg/analysis_server/lib/edit/assist/assist_dart.dart
rename to pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
index 742655c..737b3c4 100644
--- a/pkg/analysis_server/lib/edit/assist/assist_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
@@ -2,9 +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.
 
-library analysis_server.edit.assist.assist_dart;
+library analysis_server.plugin.edit.assist.assist_dart;
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.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/plugin/fix.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix.dart
similarity index 92%
rename from pkg/analysis_server/lib/plugin/fix.dart
rename to pkg/analysis_server/lib/plugin/edit/fix/fix.dart
index d274f61..a9f73d2 100644
--- a/pkg/analysis_server/lib/plugin/fix.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix.dart
@@ -22,9 +22,9 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.fix;
+library analysis_server.plugin.edit.fix.fix;
 
-import 'package:analysis_server/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/lib/edit/fix/fix_core.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
similarity index 95%
rename from pkg/analysis_server/lib/edit/fix/fix_core.dart
rename to pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
index f38d59a..1bdfc38 100644
--- a/pkg/analysis_server/lib/edit/fix/fix_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
@@ -2,9 +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.
 
-library analysis_server.edit.fix.fix_core;
+library analysis_server.plugin.edit.fix.fix_core;
 
-import 'package:analysis_server/src/protocol.dart' show SourceChange;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    show SourceChange;
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/error.dart';
diff --git a/pkg/analysis_server/lib/edit/fix/fix_dart.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
similarity index 92%
rename from pkg/analysis_server/lib/edit/fix/fix_dart.dart
rename to pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
index 2229ed2..efcdcab 100644
--- a/pkg/analysis_server/lib/edit/fix/fix_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
@@ -2,9 +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.
 
-library analysis_server.edit.fix.fix_dart;
+library analysis_server.plugin.edit.fix.fix_dart;
 
-import 'package:analysis_server/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
diff --git a/pkg/analysis_server/lib/utilities/change_builder_core.dart b/pkg/analysis_server/lib/plugin/edit/utilities/change_builder_core.dart
similarity index 96%
rename from pkg/analysis_server/lib/utilities/change_builder_core.dart
rename to pkg/analysis_server/lib/plugin/edit/utilities/change_builder_core.dart
index 7c69c46..8895f0e 100644
--- a/pkg/analysis_server/lib/utilities/change_builder_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/utilities/change_builder_core.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analysis_server.utilities.change_builder_core;
+library analysis_server.plugin.edit.utilities.change_builder_core;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/utilities/change_builder_core.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/utilities/change_builder_dart.dart b/pkg/analysis_server/lib/plugin/edit/utilities/change_builder_dart.dart
similarity index 97%
rename from pkg/analysis_server/lib/utilities/change_builder_dart.dart
rename to pkg/analysis_server/lib/plugin/edit/utilities/change_builder_dart.dart
index 74ca528..e79204b 100644
--- a/pkg/analysis_server/lib/utilities/change_builder_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/utilities/change_builder_dart.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analysis_server.utilities.change_builder_dart;
+library analysis_server.plugin.edit.utilities.change_builder_dart;
 
+import 'package:analysis_server/plugin/edit/utilities/change_builder_core.dart';
 import 'package:analysis_server/src/utilities/change_builder_dart.dart';
-import 'package:analysis_server/utilities/change_builder_core.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
diff --git a/pkg/analysis_server/lib/plugin/index.dart b/pkg/analysis_server/lib/plugin/index/index.dart
similarity index 93%
rename from pkg/analysis_server/lib/plugin/index.dart
rename to pkg/analysis_server/lib/plugin/index/index.dart
index 1e5b05c..b87fce9 100644
--- a/pkg/analysis_server/lib/plugin/index.dart
+++ b/pkg/analysis_server/lib/plugin/index/index.dart
@@ -28,9 +28,9 @@
  *       ...
  *     }
  */
-library analysis_server.plugin.index;
+library analysis_server.plugin.index.index;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/lib/analysis/index_core.dart b/pkg/analysis_server/lib/plugin/index/index_core.dart
similarity index 99%
rename from pkg/analysis_server/lib/analysis/index_core.dart
rename to pkg/analysis_server/lib/plugin/index/index_core.dart
index 58e996e..98fde3e 100644
--- a/pkg/analysis_server/lib/analysis/index_core.dart
+++ b/pkg/analysis_server/lib/plugin/index/index_core.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analysis_server.analysis.index.index_core;
+library analysis_server.plugin.index.index_core;
 
 import 'dart:async';
 import 'dart:collection';
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
similarity index 85%
rename from pkg/analysis_server/lib/src/generated_protocol.dart
rename to pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
index 4c95b37e..4a07f0a 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart
@@ -6,9 +6,12 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/spec/generate_files".
 
-part of protocol;
+part of analysis_server.plugin.protocol.protocol;
+
 /**
  * server.getVersion params
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerGetVersionParams {
   Request toRequest(String id) {
@@ -35,6 +38,8 @@
  * {
  *   "version": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerGetVersionResult implements HasToJson {
   String _version;
@@ -63,7 +68,7 @@
     if (json is Map) {
       String version;
       if (json.containsKey("version")) {
-        version = jsonDecoder._decodeString(jsonPath + ".version", json["version"]);
+        version = jsonDecoder.decodeString(jsonPath + ".version", json["version"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "version");
       }
@@ -102,12 +107,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, version.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * server.shutdown params
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerShutdownParams {
   Request toRequest(String id) {
@@ -129,6 +136,8 @@
 }
 /**
  * server.shutdown result
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerShutdownResult {
   Response toResponse(String id) {
@@ -155,6 +164,8 @@
  * {
  *   "subscriptions": List<ServerService>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerSetSubscriptionsParams implements HasToJson {
   List<ServerService> _subscriptions;
@@ -183,7 +194,7 @@
     if (json is Map) {
       List<ServerService> subscriptions;
       if (json.containsKey("subscriptions")) {
-        subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson(jsonDecoder, jsonPath, json));
+        subscriptions = jsonDecoder.decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new ServerService.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "subscriptions");
       }
@@ -214,7 +225,7 @@
   @override
   bool operator==(other) {
     if (other is ServerSetSubscriptionsParams) {
-      return _listEqual(subscriptions, other.subscriptions, (ServerService a, ServerService b) => a == b);
+      return listEqual(subscriptions, other.subscriptions, (ServerService a, ServerService b) => a == b);
     }
     return false;
   }
@@ -222,12 +233,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * server.setSubscriptions result
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerSetSubscriptionsResult {
   Response toResponse(String id) {
@@ -254,6 +267,8 @@
  * {
  *   "version": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerConnectedParams implements HasToJson {
   String _version;
@@ -282,7 +297,7 @@
     if (json is Map) {
       String version;
       if (json.containsKey("version")) {
-        version = jsonDecoder._decodeString(jsonPath + ".version", json["version"]);
+        version = jsonDecoder.decodeString(jsonPath + ".version", json["version"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "version");
       }
@@ -321,8 +336,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, version.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -334,6 +349,8 @@
  *   "message": String
  *   "stackTrace": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerErrorParams implements HasToJson {
   bool _isFatal;
@@ -398,19 +415,19 @@
     if (json is Map) {
       bool isFatal;
       if (json.containsKey("isFatal")) {
-        isFatal = jsonDecoder._decodeBool(jsonPath + ".isFatal", json["isFatal"]);
+        isFatal = jsonDecoder.decodeBool(jsonPath + ".isFatal", json["isFatal"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isFatal");
       }
       String message;
       if (json.containsKey("message")) {
-        message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+        message = jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "message");
       }
       String stackTrace;
       if (json.containsKey("stackTrace")) {
-        stackTrace = jsonDecoder._decodeString(jsonPath + ".stackTrace", json["stackTrace"]);
+        stackTrace = jsonDecoder.decodeString(jsonPath + ".stackTrace", json["stackTrace"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "stackTrace");
       }
@@ -453,10 +470,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, isFatal.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, isFatal.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -467,6 +484,8 @@
  *   "analysis": optional AnalysisStatus
  *   "pub": optional PubStatus
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerStatusParams implements HasToJson {
   AnalysisStatus _analysis;
@@ -560,9 +579,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, analysis.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, pub.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, analysis.hashCode);
+    hash = JenkinsSmiHash.combine(hash, pub.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -572,6 +591,8 @@
  * {
  *   "file": FilePath
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetErrorsParams implements HasToJson {
   String _file;
@@ -600,7 +621,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -639,8 +660,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -650,6 +671,8 @@
  * {
  *   "errors": List<AnalysisError>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetErrorsResult implements HasToJson {
   List<AnalysisError> _errors;
@@ -678,7 +701,7 @@
     if (json is Map) {
       List<AnalysisError> errors;
       if (json.containsKey("errors")) {
-        errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
+        errors = jsonDecoder.decodeList(jsonPath + ".errors", json["errors"], (String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "errors");
       }
@@ -709,7 +732,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisGetErrorsResult) {
-      return _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
+      return listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
     }
     return false;
   }
@@ -717,8 +740,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, errors.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -729,6 +752,8 @@
  *   "file": FilePath
  *   "offset": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetHoverParams implements HasToJson {
   String _file;
@@ -773,13 +798,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
@@ -820,9 +845,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -832,6 +857,8 @@
  * {
  *   "hovers": List<HoverInformation>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetHoverResult implements HasToJson {
   List<HoverInformation> _hovers;
@@ -868,7 +895,7 @@
     if (json is Map) {
       List<HoverInformation> hovers;
       if (json.containsKey("hovers")) {
-        hovers = jsonDecoder._decodeList(jsonPath + ".hovers", json["hovers"], (String jsonPath, Object json) => new HoverInformation.fromJson(jsonDecoder, jsonPath, json));
+        hovers = jsonDecoder.decodeList(jsonPath + ".hovers", json["hovers"], (String jsonPath, Object json) => new HoverInformation.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "hovers");
       }
@@ -899,7 +926,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisGetHoverResult) {
-      return _listEqual(hovers, other.hovers, (HoverInformation a, HoverInformation b) => a == b);
+      return listEqual(hovers, other.hovers, (HoverInformation a, HoverInformation b) => a == b);
     }
     return false;
   }
@@ -907,12 +934,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, hovers.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, hovers.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.getLibraryDependencies params
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetLibraryDependenciesParams {
   Request toRequest(String id) {
@@ -940,6 +969,8 @@
  *   "libraries": List<FilePath>
  *   "packageMap": Map<String, Map<String, List<FilePath>>>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetLibraryDependenciesResult implements HasToJson {
   List<String> _libraries;
@@ -988,13 +1019,13 @@
     if (json is Map) {
       List<String> libraries;
       if (json.containsKey("libraries")) {
-        libraries = jsonDecoder._decodeList(jsonPath + ".libraries", json["libraries"], jsonDecoder._decodeString);
+        libraries = jsonDecoder.decodeList(jsonPath + ".libraries", json["libraries"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "libraries");
       }
       Map<String, Map<String, List<String>>> packageMap;
       if (json.containsKey("packageMap")) {
-        packageMap = jsonDecoder._decodeMap(jsonPath + ".packageMap", json["packageMap"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeMap(jsonPath, json, valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeList(jsonPath, json, jsonDecoder._decodeString)));
+        packageMap = jsonDecoder.decodeMap(jsonPath + ".packageMap", json["packageMap"], valueDecoder: (String jsonPath, Object json) => jsonDecoder.decodeMap(jsonPath, json, valueDecoder: (String jsonPath, Object json) => jsonDecoder.decodeList(jsonPath, json, jsonDecoder.decodeString)));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "packageMap");
       }
@@ -1026,8 +1057,8 @@
   @override
   bool operator==(other) {
     if (other is AnalysisGetLibraryDependenciesResult) {
-      return _listEqual(libraries, other.libraries, (String a, String b) => a == b) &&
-          _mapEqual(packageMap, other.packageMap, (Map<String, List<String>> a, Map<String, List<String>> b) => _mapEqual(a, b, (List<String> a, List<String> b) => _listEqual(a, b, (String a, String b) => a == b)));
+      return listEqual(libraries, other.libraries, (String a, String b) => a == b) &&
+          mapEqual(packageMap, other.packageMap, (Map<String, List<String>> a, Map<String, List<String>> b) => mapEqual(a, b, (List<String> a, List<String> b) => listEqual(a, b, (String a, String b) => a == b)));
     }
     return false;
   }
@@ -1035,9 +1066,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, libraries.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, packageMap.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, libraries.hashCode);
+    hash = JenkinsSmiHash.combine(hash, packageMap.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -1049,6 +1080,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetNavigationParams implements HasToJson {
   String _file;
@@ -1113,19 +1146,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -1168,10 +1201,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -1183,6 +1216,8 @@
  *   "targets": List<NavigationTarget>
  *   "regions": List<NavigationRegion>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisGetNavigationResult implements HasToJson {
   List<String> _files;
@@ -1247,19 +1282,19 @@
     if (json is Map) {
       List<String> files;
       if (json.containsKey("files")) {
-        files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], jsonDecoder._decodeString);
+        files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "files");
       }
       List<NavigationTarget> targets;
       if (json.containsKey("targets")) {
-        targets = jsonDecoder._decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
+        targets = jsonDecoder.decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "targets");
       }
       List<NavigationRegion> regions;
       if (json.containsKey("regions")) {
-        regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
+        regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "regions");
       }
@@ -1292,9 +1327,9 @@
   @override
   bool operator==(other) {
     if (other is AnalysisGetNavigationResult) {
-      return _listEqual(files, other.files, (String a, String b) => a == b) &&
-          _listEqual(targets, other.targets, (NavigationTarget a, NavigationTarget b) => a == b) &&
-          _listEqual(regions, other.regions, (NavigationRegion a, NavigationRegion b) => a == b);
+      return listEqual(files, other.files, (String a, String b) => a == b) &&
+          listEqual(targets, other.targets, (NavigationTarget a, NavigationTarget b) => a == b) &&
+          listEqual(regions, other.regions, (NavigationRegion a, NavigationRegion b) => a == b);
     }
     return false;
   }
@@ -1302,10 +1337,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, files.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -1315,6 +1350,8 @@
  * {
  *   "roots": optional List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisReanalyzeParams implements HasToJson {
   List<String> _roots;
@@ -1342,7 +1379,7 @@
     if (json is Map) {
       List<String> roots;
       if (json.containsKey("roots")) {
-        roots = jsonDecoder._decodeList(jsonPath + ".roots", json["roots"], jsonDecoder._decodeString);
+        roots = jsonDecoder.decodeList(jsonPath + ".roots", json["roots"], jsonDecoder.decodeString);
       }
       return new AnalysisReanalyzeParams(roots: roots);
     } else {
@@ -1373,7 +1410,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisReanalyzeParams) {
-      return _listEqual(roots, other.roots, (String a, String b) => a == b);
+      return listEqual(roots, other.roots, (String a, String b) => a == b);
     }
     return false;
   }
@@ -1381,12 +1418,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, roots.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, roots.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.reanalyze result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisReanalyzeResult {
   Response toResponse(String id) {
@@ -1415,6 +1454,8 @@
  *   "excluded": List<FilePath>
  *   "packageRoots": optional Map<FilePath, FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetAnalysisRootsParams implements HasToJson {
   List<String> _included;
@@ -1498,19 +1539,19 @@
     if (json is Map) {
       List<String> included;
       if (json.containsKey("included")) {
-        included = jsonDecoder._decodeList(jsonPath + ".included", json["included"], jsonDecoder._decodeString);
+        included = jsonDecoder.decodeList(jsonPath + ".included", json["included"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "included");
       }
       List<String> excluded;
       if (json.containsKey("excluded")) {
-        excluded = jsonDecoder._decodeList(jsonPath + ".excluded", json["excluded"], jsonDecoder._decodeString);
+        excluded = jsonDecoder.decodeList(jsonPath + ".excluded", json["excluded"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "excluded");
       }
       Map<String, String> packageRoots;
       if (json.containsKey("packageRoots")) {
-        packageRoots = jsonDecoder._decodeMap(jsonPath + ".packageRoots", json["packageRoots"], valueDecoder: jsonDecoder._decodeString);
+        packageRoots = jsonDecoder.decodeMap(jsonPath + ".packageRoots", json["packageRoots"], valueDecoder: jsonDecoder.decodeString);
       }
       return new AnalysisSetAnalysisRootsParams(included, excluded, packageRoots: packageRoots);
     } else {
@@ -1543,9 +1584,9 @@
   @override
   bool operator==(other) {
     if (other is AnalysisSetAnalysisRootsParams) {
-      return _listEqual(included, other.included, (String a, String b) => a == b) &&
-          _listEqual(excluded, other.excluded, (String a, String b) => a == b) &&
-          _mapEqual(packageRoots, other.packageRoots, (String a, String b) => a == b);
+      return listEqual(included, other.included, (String a, String b) => a == b) &&
+          listEqual(excluded, other.excluded, (String a, String b) => a == b) &&
+          mapEqual(packageRoots, other.packageRoots, (String a, String b) => a == b);
     }
     return false;
   }
@@ -1553,14 +1594,16 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, included.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, excluded.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, packageRoots.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, included.hashCode);
+    hash = JenkinsSmiHash.combine(hash, excluded.hashCode);
+    hash = JenkinsSmiHash.combine(hash, packageRoots.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.setAnalysisRoots result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetAnalysisRootsResult {
   Response toResponse(String id) {
@@ -1587,6 +1630,8 @@
  * {
  *   "subscriptions": List<GeneralAnalysisService>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetGeneralSubscriptionsParams implements HasToJson {
   List<GeneralAnalysisService> _subscriptions;
@@ -1615,7 +1660,7 @@
     if (json is Map) {
       List<GeneralAnalysisService> subscriptions;
       if (json.containsKey("subscriptions")) {
-        subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new GeneralAnalysisService.fromJson(jsonDecoder, jsonPath, json));
+        subscriptions = jsonDecoder.decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new GeneralAnalysisService.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "subscriptions");
       }
@@ -1646,7 +1691,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisSetGeneralSubscriptionsParams) {
-      return _listEqual(subscriptions, other.subscriptions, (GeneralAnalysisService a, GeneralAnalysisService b) => a == b);
+      return listEqual(subscriptions, other.subscriptions, (GeneralAnalysisService a, GeneralAnalysisService b) => a == b);
     }
     return false;
   }
@@ -1654,12 +1699,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.setGeneralSubscriptions result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetGeneralSubscriptionsResult {
   Response toResponse(String id) {
@@ -1686,6 +1733,8 @@
  * {
  *   "files": List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetPriorityFilesParams implements HasToJson {
   List<String> _files;
@@ -1714,7 +1763,7 @@
     if (json is Map) {
       List<String> files;
       if (json.containsKey("files")) {
-        files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], jsonDecoder._decodeString);
+        files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "files");
       }
@@ -1745,7 +1794,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisSetPriorityFilesParams) {
-      return _listEqual(files, other.files, (String a, String b) => a == b);
+      return listEqual(files, other.files, (String a, String b) => a == b);
     }
     return false;
   }
@@ -1753,12 +1802,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, files.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.setPriorityFiles result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetPriorityFilesResult {
   Response toResponse(String id) {
@@ -1785,6 +1836,8 @@
  * {
  *   "subscriptions": Map<AnalysisService, List<FilePath>>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetSubscriptionsParams implements HasToJson {
   Map<AnalysisService, List<String>> _subscriptions;
@@ -1815,7 +1868,7 @@
     if (json is Map) {
       Map<AnalysisService, List<String>> subscriptions;
       if (json.containsKey("subscriptions")) {
-        subscriptions = jsonDecoder._decodeMap(jsonPath + ".subscriptions", json["subscriptions"], keyDecoder: (String jsonPath, Object json) => new AnalysisService.fromJson(jsonDecoder, jsonPath, json), valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeList(jsonPath, json, jsonDecoder._decodeString));
+        subscriptions = jsonDecoder.decodeMap(jsonPath + ".subscriptions", json["subscriptions"], keyDecoder: (String jsonPath, Object json) => new AnalysisService.fromJson(jsonDecoder, jsonPath, json), valueDecoder: (String jsonPath, Object json) => jsonDecoder.decodeList(jsonPath, json, jsonDecoder.decodeString));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "subscriptions");
       }
@@ -1846,7 +1899,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisSetSubscriptionsParams) {
-      return _mapEqual(subscriptions, other.subscriptions, (List<String> a, List<String> b) => _listEqual(a, b, (String a, String b) => a == b));
+      return mapEqual(subscriptions, other.subscriptions, (List<String> a, List<String> b) => listEqual(a, b, (String a, String b) => a == b));
     }
     return false;
   }
@@ -1854,12 +1907,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.setSubscriptions result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisSetSubscriptionsResult {
   Response toResponse(String id) {
@@ -1886,6 +1941,8 @@
  * {
  *   "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveContentOverlay>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisUpdateContentParams implements HasToJson {
   Map<String, dynamic> _files;
@@ -1916,7 +1973,7 @@
     if (json is Map) {
       Map<String, dynamic> files;
       if (json.containsKey("files")) {
-        files = jsonDecoder._decodeMap(jsonPath + ".files", json["files"], valueDecoder: (String jsonPath, Object json) => jsonDecoder._decodeUnion(jsonPath, json, "type", {"add": (String jsonPath, Object json) => new AddContentOverlay.fromJson(jsonDecoder, jsonPath, json), "change": (String jsonPath, Object json) => new ChangeContentOverlay.fromJson(jsonDecoder, jsonPath, json), "remove": (String jsonPath, Object json) => new RemoveContentOverlay.fromJson(jsonDecoder, jsonPath, json)}));
+        files = jsonDecoder.decodeMap(jsonPath + ".files", json["files"], valueDecoder: (String jsonPath, Object json) => jsonDecoder.decodeUnion(jsonPath, json, "type", {"add": (String jsonPath, Object json) => new AddContentOverlay.fromJson(jsonDecoder, jsonPath, json), "change": (String jsonPath, Object json) => new ChangeContentOverlay.fromJson(jsonDecoder, jsonPath, json), "remove": (String jsonPath, Object json) => new RemoveContentOverlay.fromJson(jsonDecoder, jsonPath, json)}));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "files");
       }
@@ -1947,7 +2004,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisUpdateContentParams) {
-      return _mapEqual(files, other.files, (dynamic a, dynamic b) => a == b);
+      return mapEqual(files, other.files, (dynamic a, dynamic b) => a == b);
     }
     return false;
   }
@@ -1955,8 +2012,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, files.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -1965,6 +2022,8 @@
  *
  * {
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisUpdateContentResult implements HasToJson {
   AnalysisUpdateContentResult();
@@ -2008,7 +2067,7 @@
   @override
   int get hashCode {
     int hash = 0;
-    return _JenkinsSmiHash.finish(hash);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2018,6 +2077,8 @@
  * {
  *   "options": AnalysisOptions
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisUpdateOptionsParams implements HasToJson {
   AnalysisOptions _options;
@@ -2085,12 +2146,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, options.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * analysis.updateOptions result
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisUpdateOptionsResult {
   Response toResponse(String id) {
@@ -2117,6 +2180,8 @@
  * {
  *   "directories": List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisAnalyzedFilesParams implements HasToJson {
   List<String> _directories;
@@ -2145,7 +2210,7 @@
     if (json is Map) {
       List<String> directories;
       if (json.containsKey("directories")) {
-        directories = jsonDecoder._decodeList(jsonPath + ".directories", json["directories"], jsonDecoder._decodeString);
+        directories = jsonDecoder.decodeList(jsonPath + ".directories", json["directories"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "directories");
       }
@@ -2176,7 +2241,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisAnalyzedFilesParams) {
-      return _listEqual(directories, other.directories, (String a, String b) => a == b);
+      return listEqual(directories, other.directories, (String a, String b) => a == b);
     }
     return false;
   }
@@ -2184,8 +2249,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, directories.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, directories.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2196,6 +2261,8 @@
  *   "file": FilePath
  *   "errors": List<AnalysisError>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisErrorsParams implements HasToJson {
   String _file;
@@ -2240,13 +2307,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<AnalysisError> errors;
       if (json.containsKey("errors")) {
-        errors = jsonDecoder._decodeList(jsonPath + ".errors", json["errors"], (String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
+        errors = jsonDecoder.decodeList(jsonPath + ".errors", json["errors"], (String jsonPath, Object json) => new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "errors");
       }
@@ -2279,7 +2346,7 @@
   bool operator==(other) {
     if (other is AnalysisErrorsParams) {
       return file == other.file &&
-          _listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
+          listEqual(errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
     }
     return false;
   }
@@ -2287,9 +2354,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, errors.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2299,6 +2366,8 @@
  * {
  *   "files": List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisFlushResultsParams implements HasToJson {
   List<String> _files;
@@ -2327,7 +2396,7 @@
     if (json is Map) {
       List<String> files;
       if (json.containsKey("files")) {
-        files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], jsonDecoder._decodeString);
+        files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "files");
       }
@@ -2358,7 +2427,7 @@
   @override
   bool operator==(other) {
     if (other is AnalysisFlushResultsParams) {
-      return _listEqual(files, other.files, (String a, String b) => a == b);
+      return listEqual(files, other.files, (String a, String b) => a == b);
     }
     return false;
   }
@@ -2366,8 +2435,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, files.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2378,6 +2447,8 @@
  *   "file": FilePath
  *   "regions": List<FoldingRegion>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisFoldingParams implements HasToJson {
   String _file;
@@ -2422,13 +2493,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<FoldingRegion> regions;
       if (json.containsKey("regions")) {
-        regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new FoldingRegion.fromJson(jsonDecoder, jsonPath, json));
+        regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new FoldingRegion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "regions");
       }
@@ -2461,7 +2532,7 @@
   bool operator==(other) {
     if (other is AnalysisFoldingParams) {
       return file == other.file &&
-          _listEqual(regions, other.regions, (FoldingRegion a, FoldingRegion b) => a == b);
+          listEqual(regions, other.regions, (FoldingRegion a, FoldingRegion b) => a == b);
     }
     return false;
   }
@@ -2469,9 +2540,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2482,6 +2553,8 @@
  *   "file": FilePath
  *   "regions": List<HighlightRegion>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisHighlightsParams implements HasToJson {
   String _file;
@@ -2534,13 +2607,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<HighlightRegion> regions;
       if (json.containsKey("regions")) {
-        regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new HighlightRegion.fromJson(jsonDecoder, jsonPath, json));
+        regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new HighlightRegion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "regions");
       }
@@ -2573,7 +2646,7 @@
   bool operator==(other) {
     if (other is AnalysisHighlightsParams) {
       return file == other.file &&
-          _listEqual(regions, other.regions, (HighlightRegion a, HighlightRegion b) => a == b);
+          listEqual(regions, other.regions, (HighlightRegion a, HighlightRegion b) => a == b);
     }
     return false;
   }
@@ -2581,9 +2654,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2595,6 +2668,8 @@
  *   "classes": List<ImplementedClass>
  *   "members": List<ImplementedMember>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisImplementedParams implements HasToJson {
   String _file;
@@ -2655,19 +2730,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<ImplementedClass> classes;
       if (json.containsKey("classes")) {
-        classes = jsonDecoder._decodeList(jsonPath + ".classes", json["classes"], (String jsonPath, Object json) => new ImplementedClass.fromJson(jsonDecoder, jsonPath, json));
+        classes = jsonDecoder.decodeList(jsonPath + ".classes", json["classes"], (String jsonPath, Object json) => new ImplementedClass.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "classes");
       }
       List<ImplementedMember> members;
       if (json.containsKey("members")) {
-        members = jsonDecoder._decodeList(jsonPath + ".members", json["members"], (String jsonPath, Object json) => new ImplementedMember.fromJson(jsonDecoder, jsonPath, json));
+        members = jsonDecoder.decodeList(jsonPath + ".members", json["members"], (String jsonPath, Object json) => new ImplementedMember.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "members");
       }
@@ -2701,8 +2776,8 @@
   bool operator==(other) {
     if (other is AnalysisImplementedParams) {
       return file == other.file &&
-          _listEqual(classes, other.classes, (ImplementedClass a, ImplementedClass b) => a == b) &&
-          _listEqual(members, other.members, (ImplementedMember a, ImplementedMember b) => a == b);
+          listEqual(classes, other.classes, (ImplementedClass a, ImplementedClass b) => a == b) &&
+          listEqual(members, other.members, (ImplementedMember a, ImplementedMember b) => a == b);
     }
     return false;
   }
@@ -2710,10 +2785,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, classes.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, members.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, classes.hashCode);
+    hash = JenkinsSmiHash.combine(hash, members.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2726,6 +2801,8 @@
  *   "length": int
  *   "delta": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisInvalidateParams implements HasToJson {
   String _file;
@@ -2806,25 +2883,25 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       int delta;
       if (json.containsKey("delta")) {
-        delta = jsonDecoder._decodeInt(jsonPath + ".delta", json["delta"]);
+        delta = jsonDecoder.decodeInt(jsonPath + ".delta", json["delta"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "delta");
       }
@@ -2869,11 +2946,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, delta.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, delta.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -2886,6 +2963,8 @@
  *   "targets": List<NavigationTarget>
  *   "files": List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisNavigationParams implements HasToJson {
   String _file;
@@ -2978,25 +3057,25 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<NavigationRegion> regions;
       if (json.containsKey("regions")) {
-        regions = jsonDecoder._decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
+        regions = jsonDecoder.decodeList(jsonPath + ".regions", json["regions"], (String jsonPath, Object json) => new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "regions");
       }
       List<NavigationTarget> targets;
       if (json.containsKey("targets")) {
-        targets = jsonDecoder._decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
+        targets = jsonDecoder.decodeList(jsonPath + ".targets", json["targets"], (String jsonPath, Object json) => new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "targets");
       }
       List<String> files;
       if (json.containsKey("files")) {
-        files = jsonDecoder._decodeList(jsonPath + ".files", json["files"], jsonDecoder._decodeString);
+        files = jsonDecoder.decodeList(jsonPath + ".files", json["files"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "files");
       }
@@ -3031,9 +3110,9 @@
   bool operator==(other) {
     if (other is AnalysisNavigationParams) {
       return file == other.file &&
-          _listEqual(regions, other.regions, (NavigationRegion a, NavigationRegion b) => a == b) &&
-          _listEqual(targets, other.targets, (NavigationTarget a, NavigationTarget b) => a == b) &&
-          _listEqual(files, other.files, (String a, String b) => a == b);
+          listEqual(regions, other.regions, (NavigationRegion a, NavigationRegion b) => a == b) &&
+          listEqual(targets, other.targets, (NavigationTarget a, NavigationTarget b) => a == b) &&
+          listEqual(files, other.files, (String a, String b) => a == b);
     }
     return false;
   }
@@ -3041,11 +3120,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, regions.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, files.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, files.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3056,6 +3135,8 @@
  *   "file": FilePath
  *   "occurrences": List<Occurrences>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisOccurrencesParams implements HasToJson {
   String _file;
@@ -3100,13 +3181,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<Occurrences> occurrences;
       if (json.containsKey("occurrences")) {
-        occurrences = jsonDecoder._decodeList(jsonPath + ".occurrences", json["occurrences"], (String jsonPath, Object json) => new Occurrences.fromJson(jsonDecoder, jsonPath, json));
+        occurrences = jsonDecoder.decodeList(jsonPath + ".occurrences", json["occurrences"], (String jsonPath, Object json) => new Occurrences.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "occurrences");
       }
@@ -3139,7 +3220,7 @@
   bool operator==(other) {
     if (other is AnalysisOccurrencesParams) {
       return file == other.file &&
-          _listEqual(occurrences, other.occurrences, (Occurrences a, Occurrences b) => a == b);
+          listEqual(occurrences, other.occurrences, (Occurrences a, Occurrences b) => a == b);
     }
     return false;
   }
@@ -3147,9 +3228,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3162,6 +3243,8 @@
  *   "libraryName": optional String
  *   "outline": Outline
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisOutlineParams implements HasToJson {
   String _file;
@@ -3245,7 +3328,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -3257,7 +3340,7 @@
       }
       String libraryName;
       if (json.containsKey("libraryName")) {
-        libraryName = jsonDecoder._decodeString(jsonPath + ".libraryName", json["libraryName"]);
+        libraryName = jsonDecoder.decodeString(jsonPath + ".libraryName", json["libraryName"]);
       }
       Outline outline;
       if (json.containsKey("outline")) {
@@ -3308,11 +3391,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, libraryName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, outline.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, libraryName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3323,6 +3406,8 @@
  *   "file": FilePath
  *   "overrides": List<Override>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisOverridesParams implements HasToJson {
   String _file;
@@ -3367,13 +3452,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       List<Override> overrides;
       if (json.containsKey("overrides")) {
-        overrides = jsonDecoder._decodeList(jsonPath + ".overrides", json["overrides"], (String jsonPath, Object json) => new Override.fromJson(jsonDecoder, jsonPath, json));
+        overrides = jsonDecoder.decodeList(jsonPath + ".overrides", json["overrides"], (String jsonPath, Object json) => new Override.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "overrides");
       }
@@ -3406,7 +3491,7 @@
   bool operator==(other) {
     if (other is AnalysisOverridesParams) {
       return file == other.file &&
-          _listEqual(overrides, other.overrides, (Override a, Override b) => a == b);
+          listEqual(overrides, other.overrides, (Override a, Override b) => a == b);
     }
     return false;
   }
@@ -3414,9 +3499,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, overrides.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, overrides.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3427,6 +3512,8 @@
  *   "file": FilePath
  *   "offset": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class CompletionGetSuggestionsParams implements HasToJson {
   String _file;
@@ -3471,13 +3558,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
@@ -3518,9 +3605,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3530,6 +3617,8 @@
  * {
  *   "id": CompletionId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class CompletionGetSuggestionsResult implements HasToJson {
   String _id;
@@ -3558,7 +3647,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -3597,8 +3686,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3612,6 +3701,8 @@
  *   "results": List<CompletionSuggestion>
  *   "isLast": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class CompletionResultsParams implements HasToJson {
   String _id;
@@ -3724,31 +3815,31 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
       int replacementOffset;
       if (json.containsKey("replacementOffset")) {
-        replacementOffset = jsonDecoder._decodeInt(jsonPath + ".replacementOffset", json["replacementOffset"]);
+        replacementOffset = jsonDecoder.decodeInt(jsonPath + ".replacementOffset", json["replacementOffset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "replacementOffset");
       }
       int replacementLength;
       if (json.containsKey("replacementLength")) {
-        replacementLength = jsonDecoder._decodeInt(jsonPath + ".replacementLength", json["replacementLength"]);
+        replacementLength = jsonDecoder.decodeInt(jsonPath + ".replacementLength", json["replacementLength"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "replacementLength");
       }
       List<CompletionSuggestion> results;
       if (json.containsKey("results")) {
-        results = jsonDecoder._decodeList(jsonPath + ".results", json["results"], (String jsonPath, Object json) => new CompletionSuggestion.fromJson(jsonDecoder, jsonPath, json));
+        results = jsonDecoder.decodeList(jsonPath + ".results", json["results"], (String jsonPath, Object json) => new CompletionSuggestion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "results");
       }
       bool isLast;
       if (json.containsKey("isLast")) {
-        isLast = jsonDecoder._decodeBool(jsonPath + ".isLast", json["isLast"]);
+        isLast = jsonDecoder.decodeBool(jsonPath + ".isLast", json["isLast"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isLast");
       }
@@ -3786,7 +3877,7 @@
       return id == other.id &&
           replacementOffset == other.replacementOffset &&
           replacementLength == other.replacementLength &&
-          _listEqual(results, other.results, (CompletionSuggestion a, CompletionSuggestion b) => a == b) &&
+          listEqual(results, other.results, (CompletionSuggestion a, CompletionSuggestion b) => a == b) &&
           isLast == other.isLast;
     }
     return false;
@@ -3795,12 +3886,12 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isLast.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
+    hash = JenkinsSmiHash.combine(hash, results.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3812,6 +3903,8 @@
  *   "offset": int
  *   "includePotential": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindElementReferencesParams implements HasToJson {
   String _file;
@@ -3876,19 +3969,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       bool includePotential;
       if (json.containsKey("includePotential")) {
-        includePotential = jsonDecoder._decodeBool(jsonPath + ".includePotential", json["includePotential"]);
+        includePotential = jsonDecoder.decodeBool(jsonPath + ".includePotential", json["includePotential"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "includePotential");
       }
@@ -3931,10 +4024,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, includePotential.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, includePotential.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -3945,6 +4038,8 @@
  *   "id": optional SearchId
  *   "element": optional Element
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindElementReferencesResult implements HasToJson {
   String _id;
@@ -3999,7 +4094,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       }
       Element element;
       if (json.containsKey("element")) {
@@ -4046,9 +4141,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, element.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4058,6 +4153,8 @@
  * {
  *   "name": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindMemberDeclarationsParams implements HasToJson {
   String _name;
@@ -4086,7 +4183,7 @@
     if (json is Map) {
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
@@ -4125,8 +4222,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4136,6 +4233,8 @@
  * {
  *   "id": SearchId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindMemberDeclarationsResult implements HasToJson {
   String _id;
@@ -4164,7 +4263,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -4203,8 +4302,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4214,6 +4313,8 @@
  * {
  *   "name": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindMemberReferencesParams implements HasToJson {
   String _name;
@@ -4242,7 +4343,7 @@
     if (json is Map) {
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
@@ -4281,8 +4382,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4292,6 +4393,8 @@
  * {
  *   "id": SearchId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindMemberReferencesResult implements HasToJson {
   String _id;
@@ -4320,7 +4423,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -4359,8 +4462,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4370,6 +4473,8 @@
  * {
  *   "pattern": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindTopLevelDeclarationsParams implements HasToJson {
   String _pattern;
@@ -4400,7 +4505,7 @@
     if (json is Map) {
       String pattern;
       if (json.containsKey("pattern")) {
-        pattern = jsonDecoder._decodeString(jsonPath + ".pattern", json["pattern"]);
+        pattern = jsonDecoder.decodeString(jsonPath + ".pattern", json["pattern"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "pattern");
       }
@@ -4439,8 +4544,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, pattern.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4450,6 +4555,8 @@
  * {
  *   "id": SearchId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchFindTopLevelDeclarationsResult implements HasToJson {
   String _id;
@@ -4478,7 +4585,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -4517,8 +4624,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4530,6 +4637,8 @@
  *   "offset": int
  *   "superOnly": optional bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchGetTypeHierarchyParams implements HasToJson {
   String _file;
@@ -4593,19 +4702,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       bool superOnly;
       if (json.containsKey("superOnly")) {
-        superOnly = jsonDecoder._decodeBool(jsonPath + ".superOnly", json["superOnly"]);
+        superOnly = jsonDecoder.decodeBool(jsonPath + ".superOnly", json["superOnly"]);
       }
       return new SearchGetTypeHierarchyParams(file, offset, superOnly: superOnly);
     } else {
@@ -4648,10 +4757,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, superOnly.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, superOnly.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4661,6 +4770,8 @@
  * {
  *   "hierarchyItems": optional List<TypeHierarchyItem>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchGetTypeHierarchyResult implements HasToJson {
   List<TypeHierarchyItem> _hierarchyItems;
@@ -4704,7 +4815,7 @@
     if (json is Map) {
       List<TypeHierarchyItem> hierarchyItems;
       if (json.containsKey("hierarchyItems")) {
-        hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", json["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.fromJson(jsonDecoder, jsonPath, json));
+        hierarchyItems = jsonDecoder.decodeList(jsonPath + ".hierarchyItems", json["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.fromJson(jsonDecoder, jsonPath, json));
       }
       return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems);
     } else {
@@ -4735,7 +4846,7 @@
   @override
   bool operator==(other) {
     if (other is SearchGetTypeHierarchyResult) {
-      return _listEqual(hierarchyItems, other.hierarchyItems, (TypeHierarchyItem a, TypeHierarchyItem b) => a == b);
+      return listEqual(hierarchyItems, other.hierarchyItems, (TypeHierarchyItem a, TypeHierarchyItem b) => a == b);
     }
     return false;
   }
@@ -4743,8 +4854,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, hierarchyItems.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, hierarchyItems.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4756,6 +4867,8 @@
  *   "results": List<SearchResult>
  *   "isLast": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchResultsParams implements HasToJson {
   String _id;
@@ -4818,19 +4931,19 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
       List<SearchResult> results;
       if (json.containsKey("results")) {
-        results = jsonDecoder._decodeList(jsonPath + ".results", json["results"], (String jsonPath, Object json) => new SearchResult.fromJson(jsonDecoder, jsonPath, json));
+        results = jsonDecoder.decodeList(jsonPath + ".results", json["results"], (String jsonPath, Object json) => new SearchResult.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "results");
       }
       bool isLast;
       if (json.containsKey("isLast")) {
-        isLast = jsonDecoder._decodeBool(jsonPath + ".isLast", json["isLast"]);
+        isLast = jsonDecoder.decodeBool(jsonPath + ".isLast", json["isLast"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isLast");
       }
@@ -4864,7 +4977,7 @@
   bool operator==(other) {
     if (other is SearchResultsParams) {
       return id == other.id &&
-          _listEqual(results, other.results, (SearchResult a, SearchResult b) => a == b) &&
+          listEqual(results, other.results, (SearchResult a, SearchResult b) => a == b) &&
           isLast == other.isLast;
     }
     return false;
@@ -4873,10 +4986,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isLast.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, results.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -4889,6 +5002,8 @@
  *   "selectionLength": int
  *   "lineLength": optional int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditFormatParams implements HasToJson {
   String _file;
@@ -4964,25 +5079,25 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int selectionOffset;
       if (json.containsKey("selectionOffset")) {
-        selectionOffset = jsonDecoder._decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
+        selectionOffset = jsonDecoder.decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionOffset");
       }
       int selectionLength;
       if (json.containsKey("selectionLength")) {
-        selectionLength = jsonDecoder._decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
+        selectionLength = jsonDecoder.decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionLength");
       }
       int lineLength;
       if (json.containsKey("lineLength")) {
-        lineLength = jsonDecoder._decodeInt(jsonPath + ".lineLength", json["lineLength"]);
+        lineLength = jsonDecoder.decodeInt(jsonPath + ".lineLength", json["lineLength"]);
       }
       return new EditFormatParams(file, selectionOffset, selectionLength, lineLength: lineLength);
     } else {
@@ -5027,11 +5142,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, lineLength.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lineLength.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5043,6 +5158,8 @@
  *   "selectionOffset": int
  *   "selectionLength": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditFormatResult implements HasToJson {
   List<SourceEdit> _edits;
@@ -5105,19 +5222,19 @@
     if (json is Map) {
       List<SourceEdit> edits;
       if (json.containsKey("edits")) {
-        edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
+        edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "edits");
       }
       int selectionOffset;
       if (json.containsKey("selectionOffset")) {
-        selectionOffset = jsonDecoder._decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
+        selectionOffset = jsonDecoder.decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionOffset");
       }
       int selectionLength;
       if (json.containsKey("selectionLength")) {
-        selectionLength = jsonDecoder._decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
+        selectionLength = jsonDecoder.decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionLength");
       }
@@ -5150,7 +5267,7 @@
   @override
   bool operator==(other) {
     if (other is EditFormatResult) {
-      return _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b) &&
+      return listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b) &&
           selectionOffset == other.selectionOffset &&
           selectionLength == other.selectionLength;
     }
@@ -5160,10 +5277,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5175,6 +5292,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetAssistsParams implements HasToJson {
   String _file;
@@ -5235,19 +5354,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -5290,10 +5409,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5303,6 +5422,8 @@
  * {
  *   "assists": List<SourceChange>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetAssistsResult implements HasToJson {
   List<SourceChange> _assists;
@@ -5331,7 +5452,7 @@
     if (json is Map) {
       List<SourceChange> assists;
       if (json.containsKey("assists")) {
-        assists = jsonDecoder._decodeList(jsonPath + ".assists", json["assists"], (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, json));
+        assists = jsonDecoder.decodeList(jsonPath + ".assists", json["assists"], (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "assists");
       }
@@ -5362,7 +5483,7 @@
   @override
   bool operator==(other) {
     if (other is EditGetAssistsResult) {
-      return _listEqual(assists, other.assists, (SourceChange a, SourceChange b) => a == b);
+      return listEqual(assists, other.assists, (SourceChange a, SourceChange b) => a == b);
     }
     return false;
   }
@@ -5370,8 +5491,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, assists.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, assists.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5383,6 +5504,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetAvailableRefactoringsParams implements HasToJson {
   String _file;
@@ -5443,19 +5566,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -5498,10 +5621,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5511,6 +5634,8 @@
  * {
  *   "kinds": List<RefactoringKind>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetAvailableRefactoringsResult implements HasToJson {
   List<RefactoringKind> _kinds;
@@ -5539,7 +5664,7 @@
     if (json is Map) {
       List<RefactoringKind> kinds;
       if (json.containsKey("kinds")) {
-        kinds = jsonDecoder._decodeList(jsonPath + ".kinds", json["kinds"], (String jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath, json));
+        kinds = jsonDecoder.decodeList(jsonPath + ".kinds", json["kinds"], (String jsonPath, Object json) => new RefactoringKind.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "kinds");
       }
@@ -5570,7 +5695,7 @@
   @override
   bool operator==(other) {
     if (other is EditGetAvailableRefactoringsResult) {
-      return _listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind b) => a == b);
+      return listEqual(kinds, other.kinds, (RefactoringKind a, RefactoringKind b) => a == b);
     }
     return false;
   }
@@ -5578,8 +5703,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kinds.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kinds.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5590,6 +5715,8 @@
  *   "file": FilePath
  *   "offset": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetFixesParams implements HasToJson {
   String _file;
@@ -5634,13 +5761,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
@@ -5681,9 +5808,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5693,6 +5820,8 @@
  * {
  *   "fixes": List<AnalysisErrorFixes>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetFixesResult implements HasToJson {
   List<AnalysisErrorFixes> _fixes;
@@ -5721,7 +5850,7 @@
     if (json is Map) {
       List<AnalysisErrorFixes> fixes;
       if (json.containsKey("fixes")) {
-        fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (String jsonPath, Object json) => new AnalysisErrorFixes.fromJson(jsonDecoder, jsonPath, json));
+        fixes = jsonDecoder.decodeList(jsonPath + ".fixes", json["fixes"], (String jsonPath, Object json) => new AnalysisErrorFixes.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "fixes");
       }
@@ -5752,7 +5881,7 @@
   @override
   bool operator==(other) {
     if (other is EditGetFixesResult) {
-      return _listEqual(fixes, other.fixes, (AnalysisErrorFixes a, AnalysisErrorFixes b) => a == b);
+      return listEqual(fixes, other.fixes, (AnalysisErrorFixes a, AnalysisErrorFixes b) => a == b);
     }
     return false;
   }
@@ -5760,8 +5889,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5776,6 +5905,8 @@
  *   "validateOnly": bool
  *   "options": optional RefactoringOptions
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetRefactoringParams implements HasToJson {
   RefactoringKind _kind;
@@ -5899,25 +6030,25 @@
       }
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       bool validateOnly;
       if (json.containsKey("validateOnly")) {
-        validateOnly = jsonDecoder._decodeBool(jsonPath + ".validateOnly", json["validateOnly"]);
+        validateOnly = jsonDecoder.decodeBool(jsonPath + ".validateOnly", json["validateOnly"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "validateOnly");
       }
@@ -5974,13 +6105,13 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, validateOnly.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, options.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, validateOnly.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -5995,6 +6126,8 @@
  *   "change": optional SourceChange
  *   "potentialEdits": optional List<String>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditGetRefactoringResult implements HasToJson {
   List<RefactoringProblem> _initialProblems;
@@ -6134,19 +6267,19 @@
     if (json is Map) {
       List<RefactoringProblem> initialProblems;
       if (json.containsKey("initialProblems")) {
-        initialProblems = jsonDecoder._decodeList(jsonPath + ".initialProblems", json["initialProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
+        initialProblems = jsonDecoder.decodeList(jsonPath + ".initialProblems", json["initialProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "initialProblems");
       }
       List<RefactoringProblem> optionsProblems;
       if (json.containsKey("optionsProblems")) {
-        optionsProblems = jsonDecoder._decodeList(jsonPath + ".optionsProblems", json["optionsProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
+        optionsProblems = jsonDecoder.decodeList(jsonPath + ".optionsProblems", json["optionsProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "optionsProblems");
       }
       List<RefactoringProblem> finalProblems;
       if (json.containsKey("finalProblems")) {
-        finalProblems = jsonDecoder._decodeList(jsonPath + ".finalProblems", json["finalProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
+        finalProblems = jsonDecoder.decodeList(jsonPath + ".finalProblems", json["finalProblems"], (String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "finalProblems");
       }
@@ -6160,7 +6293,7 @@
       }
       List<String> potentialEdits;
       if (json.containsKey("potentialEdits")) {
-        potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", json["potentialEdits"], jsonDecoder._decodeString);
+        potentialEdits = jsonDecoder.decodeList(jsonPath + ".potentialEdits", json["potentialEdits"], jsonDecoder.decodeString);
       }
       return new EditGetRefactoringResult(initialProblems, optionsProblems, finalProblems, feedback: feedback, change: change, potentialEdits: potentialEdits);
     } else {
@@ -6200,12 +6333,12 @@
   @override
   bool operator==(other) {
     if (other is EditGetRefactoringResult) {
-      return _listEqual(initialProblems, other.initialProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
-          _listEqual(optionsProblems, other.optionsProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
-          _listEqual(finalProblems, other.finalProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
+      return listEqual(initialProblems, other.initialProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
+          listEqual(optionsProblems, other.optionsProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
+          listEqual(finalProblems, other.finalProblems, (RefactoringProblem a, RefactoringProblem b) => a == b) &&
           feedback == other.feedback &&
           change == other.change &&
-          _listEqual(potentialEdits, other.potentialEdits, (String a, String b) => a == b);
+          listEqual(potentialEdits, other.potentialEdits, (String a, String b) => a == b);
     }
     return false;
   }
@@ -6213,13 +6346,13 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, initialProblems.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, finalProblems.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, feedback.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
+    hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
+    hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
+    hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
+    hash = JenkinsSmiHash.combine(hash, change.hashCode);
+    hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6229,6 +6362,8 @@
  * {
  *   "file": FilePath
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditSortMembersParams implements HasToJson {
   String _file;
@@ -6257,7 +6392,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -6296,8 +6431,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6307,6 +6442,8 @@
  * {
  *   "edit": SourceFileEdit
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditSortMembersResult implements HasToJson {
   SourceFileEdit _edit;
@@ -6376,8 +6513,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, edit.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6387,6 +6524,8 @@
  * {
  *   "file": FilePath
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditOrganizeDirectivesParams implements HasToJson {
   String _file;
@@ -6415,7 +6554,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -6454,8 +6593,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6465,6 +6604,8 @@
  * {
  *   "edit": SourceFileEdit
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class EditOrganizeDirectivesResult implements HasToJson {
   SourceFileEdit _edit;
@@ -6534,8 +6675,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, edit.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6545,6 +6686,8 @@
  * {
  *   "contextRoot": FilePath
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionCreateContextParams implements HasToJson {
   String _contextRoot;
@@ -6575,7 +6718,7 @@
     if (json is Map) {
       String contextRoot;
       if (json.containsKey("contextRoot")) {
-        contextRoot = jsonDecoder._decodeString(jsonPath + ".contextRoot", json["contextRoot"]);
+        contextRoot = jsonDecoder.decodeString(jsonPath + ".contextRoot", json["contextRoot"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "contextRoot");
       }
@@ -6614,8 +6757,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, contextRoot.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, contextRoot.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6625,6 +6768,8 @@
  * {
  *   "id": ExecutionContextId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionCreateContextResult implements HasToJson {
   String _id;
@@ -6653,7 +6798,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -6692,8 +6837,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6703,6 +6848,8 @@
  * {
  *   "id": ExecutionContextId
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionDeleteContextParams implements HasToJson {
   String _id;
@@ -6731,7 +6878,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
@@ -6770,12 +6917,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * execution.deleteContext result
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionDeleteContextResult {
   Response toResponse(String id) {
@@ -6804,6 +6953,8 @@
  *   "file": optional FilePath
  *   "uri": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionMapUriParams implements HasToJson {
   String _id;
@@ -6862,17 +7013,17 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "id");
       }
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       }
       String uri;
       if (json.containsKey("uri")) {
-        uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]);
+        uri = jsonDecoder.decodeString(jsonPath + ".uri", json["uri"]);
       }
       return new ExecutionMapUriParams(id, file: file, uri: uri);
     } else {
@@ -6917,10 +7068,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, uri.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -6931,6 +7082,8 @@
  *   "file": optional FilePath
  *   "uri": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionMapUriResult implements HasToJson {
   String _file;
@@ -6977,11 +7130,11 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       }
       String uri;
       if (json.containsKey("uri")) {
-        uri = jsonDecoder._decodeString(jsonPath + ".uri", json["uri"]);
+        uri = jsonDecoder.decodeString(jsonPath + ".uri", json["uri"]);
       }
       return new ExecutionMapUriResult(file: file, uri: uri);
     } else {
@@ -7024,9 +7177,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, uri.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -7036,6 +7189,8 @@
  * {
  *   "subscriptions": List<ExecutionService>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionSetSubscriptionsParams implements HasToJson {
   List<ExecutionService> _subscriptions;
@@ -7064,7 +7219,7 @@
     if (json is Map) {
       List<ExecutionService> subscriptions;
       if (json.containsKey("subscriptions")) {
-        subscriptions = jsonDecoder._decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new ExecutionService.fromJson(jsonDecoder, jsonPath, json));
+        subscriptions = jsonDecoder.decodeList(jsonPath + ".subscriptions", json["subscriptions"], (String jsonPath, Object json) => new ExecutionService.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "subscriptions");
       }
@@ -7095,7 +7250,7 @@
   @override
   bool operator==(other) {
     if (other is ExecutionSetSubscriptionsParams) {
-      return _listEqual(subscriptions, other.subscriptions, (ExecutionService a, ExecutionService b) => a == b);
+      return listEqual(subscriptions, other.subscriptions, (ExecutionService a, ExecutionService b) => a == b);
     }
     return false;
   }
@@ -7103,12 +7258,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * execution.setSubscriptions result
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionSetSubscriptionsResult {
   Response toResponse(String id) {
@@ -7137,6 +7294,8 @@
  *   "kind": optional ExecutableKind
  *   "referencedFiles": optional List<FilePath>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionLaunchDataParams implements HasToJson {
   String _file;
@@ -7201,7 +7360,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -7211,7 +7370,7 @@
       }
       List<String> referencedFiles;
       if (json.containsKey("referencedFiles")) {
-        referencedFiles = jsonDecoder._decodeList(jsonPath + ".referencedFiles", json["referencedFiles"], jsonDecoder._decodeString);
+        referencedFiles = jsonDecoder.decodeList(jsonPath + ".referencedFiles", json["referencedFiles"], jsonDecoder.decodeString);
       }
       return new ExecutionLaunchDataParams(file, kind: kind, referencedFiles: referencedFiles);
     } else {
@@ -7248,7 +7407,7 @@
     if (other is ExecutionLaunchDataParams) {
       return file == other.file &&
           kind == other.kind &&
-          _listEqual(referencedFiles, other.referencedFiles, (String a, String b) => a == b);
+          listEqual(referencedFiles, other.referencedFiles, (String a, String b) => a == b);
     }
     return false;
   }
@@ -7256,10 +7415,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, referencedFiles.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, referencedFiles.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -7270,6 +7429,8 @@
  *   "type": "add"
  *   "content": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AddContentOverlay implements HasToJson {
   String _content;
@@ -7301,7 +7462,7 @@
       }
       String content;
       if (json.containsKey("content")) {
-        content = jsonDecoder._decodeString(jsonPath + ".content", json["content"]);
+        content = jsonDecoder.decodeString(jsonPath + ".content", json["content"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "content");
       }
@@ -7332,9 +7493,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, 704418402);
-    hash = _JenkinsSmiHash.combine(hash, content.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, 704418402);
+    hash = JenkinsSmiHash.combine(hash, content.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -7349,6 +7510,8 @@
  *   "correction": optional String
  *   "hasFix": optional bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisError implements HasToJson {
   AnalysisErrorSeverity _severity;
@@ -7493,17 +7656,17 @@
       }
       String message;
       if (json.containsKey("message")) {
-        message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+        message = jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "message");
       }
       String correction;
       if (json.containsKey("correction")) {
-        correction = jsonDecoder._decodeString(jsonPath + ".correction", json["correction"]);
+        correction = jsonDecoder.decodeString(jsonPath + ".correction", json["correction"]);
       }
       bool hasFix;
       if (json.containsKey("hasFix")) {
-        hasFix = jsonDecoder._decodeBool(jsonPath + ".hasFix", json["hasFix"]);
+        hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]);
       }
       return new AnalysisError(severity, type, location, message, correction: correction, hasFix: hasFix);
     } else {
@@ -7545,13 +7708,13 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, correction.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, hasFix.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, correction.hashCode);
+    hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -7562,6 +7725,8 @@
  *   "error": AnalysisError
  *   "fixes": List<SourceChange>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisErrorFixes implements HasToJson {
   AnalysisError _error;
@@ -7616,7 +7781,7 @@
       }
       List<SourceChange> fixes;
       if (json.containsKey("fixes")) {
-        fixes = jsonDecoder._decodeList(jsonPath + ".fixes", json["fixes"], (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, json));
+        fixes = jsonDecoder.decodeList(jsonPath + ".fixes", json["fixes"], (String jsonPath, Object json) => new SourceChange.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "fixes");
       }
@@ -7640,7 +7805,7 @@
   bool operator==(other) {
     if (other is AnalysisErrorFixes) {
       return error == other.error &&
-          _listEqual(fixes, other.fixes, (SourceChange a, SourceChange b) => a == b);
+          listEqual(fixes, other.fixes, (SourceChange a, SourceChange b) => a == b);
     }
     return false;
   }
@@ -7648,9 +7813,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, error.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, error.hashCode);
+    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -7662,6 +7827,8 @@
  *   WARNING
  *   ERROR
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisErrorSeverity implements Enum {
   static const INFO = const AnalysisErrorSeverity._("INFO");
@@ -7721,6 +7888,8 @@
  *   SYNTACTIC_ERROR
  *   TODO
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisErrorType implements Enum {
   static const CHECKED_MODE_COMPILE_TIME_ERROR = const AnalysisErrorType._("CHECKED_MODE_COMPILE_TIME_ERROR");
@@ -7800,6 +7969,8 @@
  *   "generateHints": optional bool
  *   "generateLints": optional bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisOptions implements HasToJson {
   bool _enableAsync;
@@ -7960,35 +8131,35 @@
     if (json is Map) {
       bool enableAsync;
       if (json.containsKey("enableAsync")) {
-        enableAsync = jsonDecoder._decodeBool(jsonPath + ".enableAsync", json["enableAsync"]);
+        enableAsync = jsonDecoder.decodeBool(jsonPath + ".enableAsync", json["enableAsync"]);
       }
       bool enableDeferredLoading;
       if (json.containsKey("enableDeferredLoading")) {
-        enableDeferredLoading = jsonDecoder._decodeBool(jsonPath + ".enableDeferredLoading", json["enableDeferredLoading"]);
+        enableDeferredLoading = jsonDecoder.decodeBool(jsonPath + ".enableDeferredLoading", json["enableDeferredLoading"]);
       }
       bool enableEnums;
       if (json.containsKey("enableEnums")) {
-        enableEnums = jsonDecoder._decodeBool(jsonPath + ".enableEnums", json["enableEnums"]);
+        enableEnums = jsonDecoder.decodeBool(jsonPath + ".enableEnums", json["enableEnums"]);
       }
       bool enableNullAwareOperators;
       if (json.containsKey("enableNullAwareOperators")) {
-        enableNullAwareOperators = jsonDecoder._decodeBool(jsonPath + ".enableNullAwareOperators", json["enableNullAwareOperators"]);
+        enableNullAwareOperators = jsonDecoder.decodeBool(jsonPath + ".enableNullAwareOperators", json["enableNullAwareOperators"]);
       }
       bool enableSuperMixins;
       if (json.containsKey("enableSuperMixins")) {
-        enableSuperMixins = jsonDecoder._decodeBool(jsonPath + ".enableSuperMixins", json["enableSuperMixins"]);
+        enableSuperMixins = jsonDecoder.decodeBool(jsonPath + ".enableSuperMixins", json["enableSuperMixins"]);
       }
       bool generateDart2jsHints;
       if (json.containsKey("generateDart2jsHints")) {
-        generateDart2jsHints = jsonDecoder._decodeBool(jsonPath + ".generateDart2jsHints", json["generateDart2jsHints"]);
+        generateDart2jsHints = jsonDecoder.decodeBool(jsonPath + ".generateDart2jsHints", json["generateDart2jsHints"]);
       }
       bool generateHints;
       if (json.containsKey("generateHints")) {
-        generateHints = jsonDecoder._decodeBool(jsonPath + ".generateHints", json["generateHints"]);
+        generateHints = jsonDecoder.decodeBool(jsonPath + ".generateHints", json["generateHints"]);
       }
       bool generateLints;
       if (json.containsKey("generateLints")) {
-        generateLints = jsonDecoder._decodeBool(jsonPath + ".generateLints", json["generateLints"]);
+        generateLints = jsonDecoder.decodeBool(jsonPath + ".generateLints", json["generateLints"]);
       }
       return new AnalysisOptions(enableAsync: enableAsync, enableDeferredLoading: enableDeferredLoading, enableEnums: enableEnums, enableNullAwareOperators: enableNullAwareOperators, enableSuperMixins: enableSuperMixins, generateDart2jsHints: generateDart2jsHints, generateHints: generateHints, generateLints: generateLints);
     } else {
@@ -8046,15 +8217,15 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, enableAsync.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, enableEnums.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, generateHints.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, generateLints.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, enableAsync.hashCode);
+    hash = JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
+    hash = JenkinsSmiHash.combine(hash, enableEnums.hashCode);
+    hash = JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
+    hash = JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
+    hash = JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
+    hash = JenkinsSmiHash.combine(hash, generateHints.hashCode);
+    hash = JenkinsSmiHash.combine(hash, generateLints.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -8071,6 +8242,8 @@
  *   OUTLINE
  *   OVERRIDES
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisService implements Enum {
   static const FOLDING = const AnalysisService._("FOLDING");
@@ -8148,6 +8321,8 @@
  *   "isAnalyzing": bool
  *   "analysisTarget": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class AnalysisStatus implements HasToJson {
   bool _isAnalyzing;
@@ -8193,13 +8368,13 @@
     if (json is Map) {
       bool isAnalyzing;
       if (json.containsKey("isAnalyzing")) {
-        isAnalyzing = jsonDecoder._decodeBool(jsonPath + ".isAnalyzing", json["isAnalyzing"]);
+        isAnalyzing = jsonDecoder.decodeBool(jsonPath + ".isAnalyzing", json["isAnalyzing"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isAnalyzing");
       }
       String analysisTarget;
       if (json.containsKey("analysisTarget")) {
-        analysisTarget = jsonDecoder._decodeString(jsonPath + ".analysisTarget", json["analysisTarget"]);
+        analysisTarget = jsonDecoder.decodeString(jsonPath + ".analysisTarget", json["analysisTarget"]);
       }
       return new AnalysisStatus(isAnalyzing, analysisTarget: analysisTarget);
     } else {
@@ -8231,9 +8406,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, isAnalyzing.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, analysisTarget.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, isAnalyzing.hashCode);
+    hash = JenkinsSmiHash.combine(hash, analysisTarget.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -8244,6 +8419,8 @@
  *   "type": "change"
  *   "edits": List<SourceEdit>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ChangeContentOverlay implements HasToJson {
   List<SourceEdit> _edits;
@@ -8275,7 +8452,7 @@
       }
       List<SourceEdit> edits;
       if (json.containsKey("edits")) {
-        edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
+        edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "edits");
       }
@@ -8298,7 +8475,7 @@
   @override
   bool operator==(other) {
     if (other is ChangeContentOverlay) {
-      return _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
+      return listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
     }
     return false;
   }
@@ -8306,9 +8483,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, 873118866);
-    hash = _JenkinsSmiHash.combine(hash, edits.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, 873118866);
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -8336,6 +8513,8 @@
  *   "parameterType": optional String
  *   "importUri": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class CompletionSuggestion implements HasToJson {
   CompletionSuggestionKind _kind;
@@ -8688,51 +8867,51 @@
       }
       int relevance;
       if (json.containsKey("relevance")) {
-        relevance = jsonDecoder._decodeInt(jsonPath + ".relevance", json["relevance"]);
+        relevance = jsonDecoder.decodeInt(jsonPath + ".relevance", json["relevance"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "relevance");
       }
       String completion;
       if (json.containsKey("completion")) {
-        completion = jsonDecoder._decodeString(jsonPath + ".completion", json["completion"]);
+        completion = jsonDecoder.decodeString(jsonPath + ".completion", json["completion"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "completion");
       }
       int selectionOffset;
       if (json.containsKey("selectionOffset")) {
-        selectionOffset = jsonDecoder._decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
+        selectionOffset = jsonDecoder.decodeInt(jsonPath + ".selectionOffset", json["selectionOffset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionOffset");
       }
       int selectionLength;
       if (json.containsKey("selectionLength")) {
-        selectionLength = jsonDecoder._decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
+        selectionLength = jsonDecoder.decodeInt(jsonPath + ".selectionLength", json["selectionLength"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "selectionLength");
       }
       bool isDeprecated;
       if (json.containsKey("isDeprecated")) {
-        isDeprecated = jsonDecoder._decodeBool(jsonPath + ".isDeprecated", json["isDeprecated"]);
+        isDeprecated = jsonDecoder.decodeBool(jsonPath + ".isDeprecated", json["isDeprecated"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isDeprecated");
       }
       bool isPotential;
       if (json.containsKey("isPotential")) {
-        isPotential = jsonDecoder._decodeBool(jsonPath + ".isPotential", json["isPotential"]);
+        isPotential = jsonDecoder.decodeBool(jsonPath + ".isPotential", json["isPotential"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isPotential");
       }
       String docSummary;
       if (json.containsKey("docSummary")) {
-        docSummary = jsonDecoder._decodeString(jsonPath + ".docSummary", json["docSummary"]);
+        docSummary = jsonDecoder.decodeString(jsonPath + ".docSummary", json["docSummary"]);
       }
       String docComplete;
       if (json.containsKey("docComplete")) {
-        docComplete = jsonDecoder._decodeString(jsonPath + ".docComplete", json["docComplete"]);
+        docComplete = jsonDecoder.decodeString(jsonPath + ".docComplete", json["docComplete"]);
       }
       String declaringType;
       if (json.containsKey("declaringType")) {
-        declaringType = jsonDecoder._decodeString(jsonPath + ".declaringType", json["declaringType"]);
+        declaringType = jsonDecoder.decodeString(jsonPath + ".declaringType", json["declaringType"]);
       }
       Element element;
       if (json.containsKey("element")) {
@@ -8740,35 +8919,35 @@
       }
       String returnType;
       if (json.containsKey("returnType")) {
-        returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["returnType"]);
+        returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["returnType"]);
       }
       List<String> parameterNames;
       if (json.containsKey("parameterNames")) {
-        parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", json["parameterNames"], jsonDecoder._decodeString);
+        parameterNames = jsonDecoder.decodeList(jsonPath + ".parameterNames", json["parameterNames"], jsonDecoder.decodeString);
       }
       List<String> parameterTypes;
       if (json.containsKey("parameterTypes")) {
-        parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", json["parameterTypes"], jsonDecoder._decodeString);
+        parameterTypes = jsonDecoder.decodeList(jsonPath + ".parameterTypes", json["parameterTypes"], jsonDecoder.decodeString);
       }
       int requiredParameterCount;
       if (json.containsKey("requiredParameterCount")) {
-        requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredParameterCount", json["requiredParameterCount"]);
+        requiredParameterCount = jsonDecoder.decodeInt(jsonPath + ".requiredParameterCount", json["requiredParameterCount"]);
       }
       bool hasNamedParameters;
       if (json.containsKey("hasNamedParameters")) {
-        hasNamedParameters = jsonDecoder._decodeBool(jsonPath + ".hasNamedParameters", json["hasNamedParameters"]);
+        hasNamedParameters = jsonDecoder.decodeBool(jsonPath + ".hasNamedParameters", json["hasNamedParameters"]);
       }
       String parameterName;
       if (json.containsKey("parameterName")) {
-        parameterName = jsonDecoder._decodeString(jsonPath + ".parameterName", json["parameterName"]);
+        parameterName = jsonDecoder.decodeString(jsonPath + ".parameterName", json["parameterName"]);
       }
       String parameterType;
       if (json.containsKey("parameterType")) {
-        parameterType = jsonDecoder._decodeString(jsonPath + ".parameterType", json["parameterType"]);
+        parameterType = jsonDecoder.decodeString(jsonPath + ".parameterType", json["parameterType"]);
       }
       String importUri;
       if (json.containsKey("importUri")) {
-        importUri = jsonDecoder._decodeString(jsonPath + ".importUri", json["importUri"]);
+        importUri = jsonDecoder.decodeString(jsonPath + ".importUri", json["importUri"]);
       }
       return new CompletionSuggestion(kind, relevance, completion, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary: docSummary, docComplete: docComplete, declaringType: declaringType, element: element, returnType: returnType, parameterNames: parameterNames, parameterTypes: parameterTypes, requiredParameterCount: requiredParameterCount, hasNamedParameters: hasNamedParameters, parameterName: parameterName, parameterType: parameterType, importUri: importUri);
     } else {
@@ -8842,8 +9021,8 @@
           declaringType == other.declaringType &&
           element == other.element &&
           returnType == other.returnType &&
-          _listEqual(parameterNames, other.parameterNames, (String a, String b) => a == b) &&
-          _listEqual(parameterTypes, other.parameterTypes, (String a, String b) => a == b) &&
+          listEqual(parameterNames, other.parameterNames, (String a, String b) => a == b) &&
+          listEqual(parameterTypes, other.parameterTypes, (String a, String b) => a == b) &&
           requiredParameterCount == other.requiredParameterCount &&
           hasNamedParameters == other.hasNamedParameters &&
           parameterName == other.parameterName &&
@@ -8856,26 +9035,26 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, relevance.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, docSummary.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, docComplete.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, declaringType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameterName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, importUri.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
+    hash = JenkinsSmiHash.combine(hash, docSummary.hashCode);
+    hash = JenkinsSmiHash.combine(hash, docComplete.hashCode);
+    hash = JenkinsSmiHash.combine(hash, declaringType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
+    hash = JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
+    hash = JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameterName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameterType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, importUri.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -8892,6 +9071,8 @@
  *   OPTIONAL_ARGUMENT
  *   PARAMETER
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class CompletionSuggestionKind implements Enum {
   /**
@@ -8997,6 +9178,8 @@
  *   "returnType": optional String
  *   "typeParameters": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Element implements HasToJson {
   static const int FLAG_ABSTRACT = 0x01;
@@ -9171,7 +9354,7 @@
       }
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
@@ -9181,21 +9364,21 @@
       }
       int flags;
       if (json.containsKey("flags")) {
-        flags = jsonDecoder._decodeInt(jsonPath + ".flags", json["flags"]);
+        flags = jsonDecoder.decodeInt(jsonPath + ".flags", json["flags"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "flags");
       }
       String parameters;
       if (json.containsKey("parameters")) {
-        parameters = jsonDecoder._decodeString(jsonPath + ".parameters", json["parameters"]);
+        parameters = jsonDecoder.decodeString(jsonPath + ".parameters", json["parameters"]);
       }
       String returnType;
       if (json.containsKey("returnType")) {
-        returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["returnType"]);
+        returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["returnType"]);
       }
       String typeParameters;
       if (json.containsKey("typeParameters")) {
-        typeParameters = jsonDecoder._decodeString(jsonPath + ".typeParameters", json["typeParameters"]);
+        typeParameters = jsonDecoder.decodeString(jsonPath + ".typeParameters", json["typeParameters"]);
       }
       return new Element(kind, name, flags, location: location, parameters: parameters, returnType: returnType, typeParameters: typeParameters);
     } else {
@@ -9250,14 +9433,14 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, flags.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, typeParameters.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    hash = JenkinsSmiHash.combine(hash, flags.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, typeParameters.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -9288,6 +9471,8 @@
  *   UNIT_TEST_TEST
  *   UNKNOWN
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ElementKind implements Enum {
   static const CLASS = const ElementKind._("CLASS");
@@ -9417,6 +9602,8 @@
  *   "file": FilePath
  *   "kind": ExecutableKind
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutableFile implements HasToJson {
   String _file;
@@ -9461,7 +9648,7 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
@@ -9499,9 +9686,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -9514,6 +9701,8 @@
  *   NOT_EXECUTABLE
  *   SERVER
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutableKind implements Enum {
   static const CLIENT = const ExecutableKind._("CLIENT");
@@ -9570,6 +9759,8 @@
  * enum {
  *   LAUNCH_DATA
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExecutionService implements Enum {
   static const LAUNCH_DATA = const ExecutionService._("LAUNCH_DATA");
@@ -9615,6 +9806,8 @@
  *   LIBRARY
  *   PART
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class FileKind implements Enum {
   static const LIBRARY = const FileKind._("LIBRARY");
@@ -9667,6 +9860,8 @@
  *   DOCUMENTATION_COMMENT
  *   TOP_LEVEL_DECLARATION
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class FoldingKind implements Enum {
   static const COMMENT = const FoldingKind._("COMMENT");
@@ -9729,6 +9924,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class FoldingRegion implements HasToJson {
   FoldingKind _kind;
@@ -9795,13 +9992,13 @@
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -9835,10 +10032,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -9848,6 +10045,8 @@
  * enum {
  *   ANALYZED_FILES
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class GeneralAnalysisService implements Enum {
   static const ANALYZED_FILES = const GeneralAnalysisService._("ANALYZED_FILES");
@@ -9894,6 +10093,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class HighlightRegion implements HasToJson {
   HighlightRegionType _type;
@@ -9960,13 +10161,13 @@
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -10000,10 +10201,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -10085,6 +10286,8 @@
  *   UNRESOLVED_INSTANCE_MEMBER_REFERENCE
  *   VALID_STRING_ESCAPE
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class HighlightRegionType implements Enum {
   static const ANNOTATION = const HighlightRegionType._("ANNOTATION");
@@ -10574,6 +10777,8 @@
  *   "propagatedType": optional String
  *   "staticType": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class HoverInformation implements HasToJson {
   int _offset;
@@ -10791,51 +10996,51 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       String containingLibraryPath;
       if (json.containsKey("containingLibraryPath")) {
-        containingLibraryPath = jsonDecoder._decodeString(jsonPath + ".containingLibraryPath", json["containingLibraryPath"]);
+        containingLibraryPath = jsonDecoder.decodeString(jsonPath + ".containingLibraryPath", json["containingLibraryPath"]);
       }
       String containingLibraryName;
       if (json.containsKey("containingLibraryName")) {
-        containingLibraryName = jsonDecoder._decodeString(jsonPath + ".containingLibraryName", json["containingLibraryName"]);
+        containingLibraryName = jsonDecoder.decodeString(jsonPath + ".containingLibraryName", json["containingLibraryName"]);
       }
       String containingClassDescription;
       if (json.containsKey("containingClassDescription")) {
-        containingClassDescription = jsonDecoder._decodeString(jsonPath + ".containingClassDescription", json["containingClassDescription"]);
+        containingClassDescription = jsonDecoder.decodeString(jsonPath + ".containingClassDescription", json["containingClassDescription"]);
       }
       String dartdoc;
       if (json.containsKey("dartdoc")) {
-        dartdoc = jsonDecoder._decodeString(jsonPath + ".dartdoc", json["dartdoc"]);
+        dartdoc = jsonDecoder.decodeString(jsonPath + ".dartdoc", json["dartdoc"]);
       }
       String elementDescription;
       if (json.containsKey("elementDescription")) {
-        elementDescription = jsonDecoder._decodeString(jsonPath + ".elementDescription", json["elementDescription"]);
+        elementDescription = jsonDecoder.decodeString(jsonPath + ".elementDescription", json["elementDescription"]);
       }
       String elementKind;
       if (json.containsKey("elementKind")) {
-        elementKind = jsonDecoder._decodeString(jsonPath + ".elementKind", json["elementKind"]);
+        elementKind = jsonDecoder.decodeString(jsonPath + ".elementKind", json["elementKind"]);
       }
       String parameter;
       if (json.containsKey("parameter")) {
-        parameter = jsonDecoder._decodeString(jsonPath + ".parameter", json["parameter"]);
+        parameter = jsonDecoder.decodeString(jsonPath + ".parameter", json["parameter"]);
       }
       String propagatedType;
       if (json.containsKey("propagatedType")) {
-        propagatedType = jsonDecoder._decodeString(jsonPath + ".propagatedType", json["propagatedType"]);
+        propagatedType = jsonDecoder.decodeString(jsonPath + ".propagatedType", json["propagatedType"]);
       }
       String staticType;
       if (json.containsKey("staticType")) {
-        staticType = jsonDecoder._decodeString(jsonPath + ".staticType", json["staticType"]);
+        staticType = jsonDecoder.decodeString(jsonPath + ".staticType", json["staticType"]);
       }
       return new HoverInformation(offset, length, containingLibraryPath: containingLibraryPath, containingLibraryName: containingLibraryName, containingClassDescription: containingClassDescription, dartdoc: dartdoc, elementDescription: elementDescription, elementKind: elementKind, parameter: parameter, propagatedType: propagatedType, staticType: staticType);
     } else {
@@ -10901,18 +11106,18 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, containingLibraryPath.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, containingLibraryName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, containingClassDescription.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, dartdoc.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, elementDescription.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, elementKind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameter.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, propagatedType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, staticType.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, containingLibraryPath.hashCode);
+    hash = JenkinsSmiHash.combine(hash, containingLibraryName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, containingClassDescription.hashCode);
+    hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
+    hash = JenkinsSmiHash.combine(hash, elementDescription.hashCode);
+    hash = JenkinsSmiHash.combine(hash, elementKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, propagatedType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, staticType.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -10923,6 +11128,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ImplementedClass implements HasToJson {
   int _offset;
@@ -10967,13 +11174,13 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -11005,9 +11212,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11018,6 +11225,8 @@
  *   "offset": int
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ImplementedMember implements HasToJson {
   int _offset;
@@ -11062,13 +11271,13 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -11100,9 +11309,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11114,6 +11323,8 @@
  *   "length": int
  *   "suggestions": List<LinkedEditSuggestion>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class LinkedEditGroup implements HasToJson {
   List<Position> _positions;
@@ -11176,19 +11387,19 @@
     if (json is Map) {
       List<Position> positions;
       if (json.containsKey("positions")) {
-        positions = jsonDecoder._decodeList(jsonPath + ".positions", json["positions"], (String jsonPath, Object json) => new Position.fromJson(jsonDecoder, jsonPath, json));
+        positions = jsonDecoder.decodeList(jsonPath + ".positions", json["positions"], (String jsonPath, Object json) => new Position.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "positions");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       List<LinkedEditSuggestion> suggestions;
       if (json.containsKey("suggestions")) {
-        suggestions = jsonDecoder._decodeList(jsonPath + ".suggestions", json["suggestions"], (String jsonPath, Object json) => new LinkedEditSuggestion.fromJson(jsonDecoder, jsonPath, json));
+        suggestions = jsonDecoder.decodeList(jsonPath + ".suggestions", json["suggestions"], (String jsonPath, Object json) => new LinkedEditSuggestion.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "suggestions");
       }
@@ -11232,9 +11443,9 @@
   @override
   bool operator==(other) {
     if (other is LinkedEditGroup) {
-      return _listEqual(positions, other.positions, (Position a, Position b) => a == b) &&
+      return listEqual(positions, other.positions, (Position a, Position b) => a == b) &&
           length == other.length &&
-          _listEqual(suggestions, other.suggestions, (LinkedEditSuggestion a, LinkedEditSuggestion b) => a == b);
+          listEqual(suggestions, other.suggestions, (LinkedEditSuggestion a, LinkedEditSuggestion b) => a == b);
     }
     return false;
   }
@@ -11242,10 +11453,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, positions.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, suggestions.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, positions.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11256,6 +11467,8 @@
  *   "value": String
  *   "kind": LinkedEditSuggestionKind
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class LinkedEditSuggestion implements HasToJson {
   String _value;
@@ -11300,7 +11513,7 @@
     if (json is Map) {
       String value;
       if (json.containsKey("value")) {
-        value = jsonDecoder._decodeString(jsonPath + ".value", json["value"]);
+        value = jsonDecoder.decodeString(jsonPath + ".value", json["value"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "value");
       }
@@ -11338,9 +11551,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, value.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, value.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11353,6 +11566,8 @@
  *   TYPE
  *   VARIABLE
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class LinkedEditSuggestionKind implements Enum {
   static const METHOD = const LinkedEditSuggestionKind._("METHOD");
@@ -11413,6 +11628,8 @@
  *   "startLine": int
  *   "startColumn": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Location implements HasToJson {
   String _file;
@@ -11509,31 +11726,31 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       int startLine;
       if (json.containsKey("startLine")) {
-        startLine = jsonDecoder._decodeInt(jsonPath + ".startLine", json["startLine"]);
+        startLine = jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLine"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "startLine");
       }
       int startColumn;
       if (json.containsKey("startColumn")) {
-        startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["startColumn"]);
+        startColumn = jsonDecoder.decodeInt(jsonPath + ".startColumn", json["startColumn"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "startColumn");
       }
@@ -11571,12 +11788,12 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
+    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11588,6 +11805,8 @@
  *   "length": int
  *   "targets": List<int>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class NavigationRegion implements HasToJson {
   int _offset;
@@ -11652,19 +11871,19 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       List<int> targets;
       if (json.containsKey("targets")) {
-        targets = jsonDecoder._decodeList(jsonPath + ".targets", json["targets"], jsonDecoder._decodeInt);
+        targets = jsonDecoder.decodeList(jsonPath + ".targets", json["targets"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "targets");
       }
@@ -11690,7 +11909,7 @@
     if (other is NavigationRegion) {
       return offset == other.offset &&
           length == other.length &&
-          _listEqual(targets, other.targets, (int a, int b) => a == b);
+          listEqual(targets, other.targets, (int a, int b) => a == b);
     }
     return false;
   }
@@ -11698,10 +11917,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, targets.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11716,6 +11935,8 @@
  *   "startLine": int
  *   "startColumn": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class NavigationTarget implements HasToJson {
   ElementKind _kind;
@@ -11836,31 +12057,31 @@
       }
       int fileIndex;
       if (json.containsKey("fileIndex")) {
-        fileIndex = jsonDecoder._decodeInt(jsonPath + ".fileIndex", json["fileIndex"]);
+        fileIndex = jsonDecoder.decodeInt(jsonPath + ".fileIndex", json["fileIndex"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "fileIndex");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       int startLine;
       if (json.containsKey("startLine")) {
-        startLine = jsonDecoder._decodeInt(jsonPath + ".startLine", json["startLine"]);
+        startLine = jsonDecoder.decodeInt(jsonPath + ".startLine", json["startLine"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "startLine");
       }
       int startColumn;
       if (json.containsKey("startColumn")) {
-        startColumn = jsonDecoder._decodeInt(jsonPath + ".startColumn", json["startColumn"]);
+        startColumn = jsonDecoder.decodeInt(jsonPath + ".startColumn", json["startColumn"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "startColumn");
       }
@@ -11900,13 +12121,13 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, fileIndex.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, fileIndex.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
+    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -11918,6 +12139,8 @@
  *   "offsets": List<int>
  *   "length": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Occurrences implements HasToJson {
   Element _element;
@@ -11984,13 +12207,13 @@
       }
       List<int> offsets;
       if (json.containsKey("offsets")) {
-        offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder._decodeInt);
+        offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offsets");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -12015,7 +12238,7 @@
   bool operator==(other) {
     if (other is Occurrences) {
       return element == other.element &&
-          _listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
+          listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
           length == other.length;
     }
     return false;
@@ -12024,10 +12247,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12040,6 +12263,8 @@
  *   "length": int
  *   "children": optional List<Outline>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Outline implements HasToJson {
   Element _element;
@@ -12129,19 +12354,19 @@
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       List<Outline> children;
       if (json.containsKey("children")) {
-        children = jsonDecoder._decodeList(jsonPath + ".children", json["children"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPath, json));
+        children = jsonDecoder.decodeList(jsonPath + ".children", json["children"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPath, json));
       }
       return new Outline(element, offset, length, children: children);
     } else {
@@ -12169,7 +12394,7 @@
       return element == other.element &&
           offset == other.offset &&
           length == other.length &&
-          _listEqual(children, other.children, (Outline a, Outline b) => a == b);
+          listEqual(children, other.children, (Outline a, Outline b) => a == b);
     }
     return false;
   }
@@ -12177,11 +12402,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, children.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, children.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12194,6 +12419,8 @@
  *   "superclassMember": optional OverriddenMember
  *   "interfaceMembers": optional List<OverriddenMember>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Override implements HasToJson {
   int _offset;
@@ -12276,13 +12503,13 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
@@ -12292,7 +12519,7 @@
       }
       List<OverriddenMember> interfaceMembers;
       if (json.containsKey("interfaceMembers")) {
-        interfaceMembers = jsonDecoder._decodeList(jsonPath + ".interfaceMembers", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMember.fromJson(jsonDecoder, jsonPath, json));
+        interfaceMembers = jsonDecoder.decodeList(jsonPath + ".interfaceMembers", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMember.fromJson(jsonDecoder, jsonPath, json));
       }
       return new Override(offset, length, superclassMember: superclassMember, interfaceMembers: interfaceMembers);
     } else {
@@ -12322,7 +12549,7 @@
       return offset == other.offset &&
           length == other.length &&
           superclassMember == other.superclassMember &&
-          _listEqual(interfaceMembers, other.interfaceMembers, (OverriddenMember a, OverriddenMember b) => a == b);
+          listEqual(interfaceMembers, other.interfaceMembers, (OverriddenMember a, OverriddenMember b) => a == b);
     }
     return false;
   }
@@ -12330,11 +12557,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, superclassMember.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, interfaceMembers.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, superclassMember.hashCode);
+    hash = JenkinsSmiHash.combine(hash, interfaceMembers.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12345,6 +12572,8 @@
  *   "element": Element
  *   "className": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class OverriddenMember implements HasToJson {
   Element _element;
@@ -12395,7 +12624,7 @@
       }
       String className;
       if (json.containsKey("className")) {
-        className = jsonDecoder._decodeString(jsonPath + ".className", json["className"]);
+        className = jsonDecoder.decodeString(jsonPath + ".className", json["className"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "className");
       }
@@ -12427,9 +12656,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, className.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, className.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12440,6 +12669,8 @@
  *   "file": FilePath
  *   "offset": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class Position implements HasToJson {
   String _file;
@@ -12484,13 +12715,13 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
@@ -12522,9 +12753,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12534,6 +12765,8 @@
  * {
  *   "isListingPackageDirs": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class PubStatus implements HasToJson {
   bool _isListingPackageDirs;
@@ -12564,7 +12797,7 @@
     if (json is Map) {
       bool isListingPackageDirs;
       if (json.containsKey("isListingPackageDirs")) {
-        isListingPackageDirs = jsonDecoder._decodeBool(jsonPath + ".isListingPackageDirs", json["isListingPackageDirs"]);
+        isListingPackageDirs = jsonDecoder.decodeBool(jsonPath + ".isListingPackageDirs", json["isListingPackageDirs"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isListingPackageDirs");
       }
@@ -12594,8 +12827,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, isListingPackageDirs.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, isListingPackageDirs.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12613,6 +12846,8 @@
  *   RENAME
  *   SORT_MEMBERS
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringKind implements Enum {
   static const CONVERT_GETTER_TO_METHOD = const RefactoringKind._("CONVERT_GETTER_TO_METHOD");
@@ -12693,6 +12928,8 @@
  *   "name": String
  *   "parameters": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringMethodParameter implements HasToJson {
   String _id;
@@ -12791,7 +13028,7 @@
     if (json is Map) {
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       }
       RefactoringMethodParameterKind kind;
       if (json.containsKey("kind")) {
@@ -12801,19 +13038,19 @@
       }
       String type;
       if (json.containsKey("type")) {
-        type = jsonDecoder._decodeString(jsonPath + ".type", json["type"]);
+        type = jsonDecoder.decodeString(jsonPath + ".type", json["type"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "type");
       }
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
       String parameters;
       if (json.containsKey("parameters")) {
-        parameters = jsonDecoder._decodeString(jsonPath + ".parameters", json["parameters"]);
+        parameters = jsonDecoder.decodeString(jsonPath + ".parameters", json["parameters"]);
       }
       return new RefactoringMethodParameter(kind, type, name, id: id, parameters: parameters);
     } else {
@@ -12853,12 +13090,12 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12867,12 +13104,14 @@
  *
  * {
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringFeedback implements HasToJson {
   RefactoringFeedback();
 
   factory RefactoringFeedback.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, Map responseJson) {
-    return _refactoringFeedbackFromJson(jsonDecoder, jsonPath, json, responseJson);
+    return refactoringFeedbackFromJson(jsonDecoder, jsonPath, json, responseJson);
   }
 
   Map<String, dynamic> toJson() {
@@ -12894,7 +13133,7 @@
   @override
   int get hashCode {
     int hash = 0;
-    return _JenkinsSmiHash.finish(hash);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12903,12 +13142,14 @@
  *
  * {
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringOptions implements HasToJson {
   RefactoringOptions();
 
   factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json, RefactoringKind kind) {
-    return _refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind);
+    return refactoringOptionsFromJson(jsonDecoder, jsonPath, json, kind);
   }
 
   Map<String, dynamic> toJson() {
@@ -12930,7 +13171,7 @@
   @override
   int get hashCode {
     int hash = 0;
-    return _JenkinsSmiHash.finish(hash);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -12942,6 +13183,8 @@
  *   POSITIONAL
  *   NAMED
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringMethodParameterKind implements Enum {
   static const REQUIRED = const RefactoringMethodParameterKind._("REQUIRED");
@@ -12996,6 +13239,8 @@
  *   "message": String
  *   "location": optional Location
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringProblem implements HasToJson {
   RefactoringProblemSeverity _severity;
@@ -13065,7 +13310,7 @@
       }
       String message;
       if (json.containsKey("message")) {
-        message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+        message = jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "message");
       }
@@ -13105,10 +13350,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, location.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -13121,6 +13366,8 @@
  *   ERROR
  *   FATAL
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RefactoringProblemSeverity implements Enum {
   static const INFO = const RefactoringProblemSeverity._("INFO");
@@ -13169,7 +13416,7 @@
    * Returns the [RefactoringProblemSeverity] with the maximal severity.
    */
   static RefactoringProblemSeverity max(RefactoringProblemSeverity a, RefactoringProblemSeverity b) =>
-      _maxRefactoringProblemSeverity(a, b);
+      maxRefactoringProblemSeverity(a, b);
 
   @override
   String toString() => "RefactoringProblemSeverity.$name";
@@ -13183,6 +13430,8 @@
  * {
  *   "type": "remove"
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RemoveContentOverlay implements HasToJson {
   RemoveContentOverlay();
@@ -13221,8 +13470,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, 114870849);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, 114870849);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -13234,6 +13483,8 @@
  *   "message": String
  *   "stackTrace": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RequestError implements HasToJson {
   RequestErrorCode _code;
@@ -13301,13 +13552,13 @@
       }
       String message;
       if (json.containsKey("message")) {
-        message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+        message = jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "message");
       }
       String stackTrace;
       if (json.containsKey("stackTrace")) {
-        stackTrace = jsonDecoder._decodeString(jsonPath + ".stackTrace", json["stackTrace"]);
+        stackTrace = jsonDecoder.decodeString(jsonPath + ".stackTrace", json["stackTrace"]);
       }
       return new RequestError(code, message, stackTrace: stackTrace);
     } else {
@@ -13341,10 +13592,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, code.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -13375,6 +13626,8 @@
  *   UNKNOWN_SOURCE
  *   UNSUPPORTED_FEATURE
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RequestErrorCode implements Enum {
   /**
@@ -13601,6 +13854,8 @@
  *   "isPotential": bool
  *   "path": List<Element>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchResult implements HasToJson {
   Location _location;
@@ -13699,13 +13954,13 @@
       }
       bool isPotential;
       if (json.containsKey("isPotential")) {
-        isPotential = jsonDecoder._decodeBool(jsonPath + ".isPotential", json["isPotential"]);
+        isPotential = jsonDecoder.decodeBool(jsonPath + ".isPotential", json["isPotential"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isPotential");
       }
       List<Element> path;
       if (json.containsKey("path")) {
-        path = jsonDecoder._decodeList(jsonPath + ".path", json["path"], (String jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json));
+        path = jsonDecoder.decodeList(jsonPath + ".path", json["path"], (String jsonPath, Object json) => new Element.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "path");
       }
@@ -13733,7 +13988,7 @@
       return location == other.location &&
           kind == other.kind &&
           isPotential == other.isPotential &&
-          _listEqual(path, other.path, (Element a, Element b) => a == b);
+          listEqual(path, other.path, (Element a, Element b) => a == b);
     }
     return false;
   }
@@ -13741,11 +13996,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, path.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
+    hash = JenkinsSmiHash.combine(hash, path.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -13761,6 +14016,8 @@
  *   UNKNOWN
  *   WRITE
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SearchResultKind implements Enum {
   /**
@@ -13851,6 +14108,8 @@
  * enum {
  *   STATUS
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ServerService implements Enum {
   static const STATUS = const ServerService._("STATUS");
@@ -13898,6 +14157,8 @@
  *   "linkedEditGroups": List<LinkedEditGroup>
  *   "selection": optional Position
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SourceChange implements HasToJson {
   String _message;
@@ -13983,19 +14244,19 @@
     if (json is Map) {
       String message;
       if (json.containsKey("message")) {
-        message = jsonDecoder._decodeString(jsonPath + ".message", json["message"]);
+        message = jsonDecoder.decodeString(jsonPath + ".message", json["message"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "message");
       }
       List<SourceFileEdit> edits;
       if (json.containsKey("edits")) {
-        edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
+        edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "edits");
       }
       List<LinkedEditGroup> linkedEditGroups;
       if (json.containsKey("linkedEditGroups")) {
-        linkedEditGroups = jsonDecoder._decodeList(jsonPath + ".linkedEditGroups", json["linkedEditGroups"], (String jsonPath, Object json) => new LinkedEditGroup.fromJson(jsonDecoder, jsonPath, json));
+        linkedEditGroups = jsonDecoder.decodeList(jsonPath + ".linkedEditGroups", json["linkedEditGroups"], (String jsonPath, Object json) => new LinkedEditGroup.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "linkedEditGroups");
       }
@@ -14024,7 +14285,7 @@
    * Adds [edit] to the [FileEdit] for the given [file].
    */
   void addEdit(String file, int fileStamp, SourceEdit edit) =>
-      _addEditToSourceChange(this, file, fileStamp, edit);
+      addEditToSourceChange(this, file, fileStamp, edit);
 
   /**
    * Adds the given [FileEdit].
@@ -14044,7 +14305,7 @@
    * Returns the [FileEdit] for the given [file], maybe `null`.
    */
   SourceFileEdit getFileEdit(String file) =>
-      _getChangeFileEdit(this, file);
+      getChangeFileEdit(this, file);
 
   @override
   String toString() => JSON.encode(toJson());
@@ -14053,8 +14314,8 @@
   bool operator==(other) {
     if (other is SourceChange) {
       return message == other.message &&
-          _listEqual(edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b) &&
-          _listEqual(linkedEditGroups, other.linkedEditGroups, (LinkedEditGroup a, LinkedEditGroup b) => a == b) &&
+          listEqual(edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b) &&
+          listEqual(linkedEditGroups, other.linkedEditGroups, (LinkedEditGroup a, LinkedEditGroup b) => a == b) &&
           selection == other.selection;
     }
     return false;
@@ -14063,11 +14324,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, linkedEditGroups.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, selection.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkedEditGroups.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selection.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -14080,6 +14341,8 @@
  *   "replacement": String
  *   "id": optional String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SourceEdit implements HasToJson {
   /**
@@ -14087,7 +14350,7 @@
    * applied in the order they appear in [edits].
    */
   static String applySequence(String code, Iterable<SourceEdit> edits) =>
-      _applySequence(code, edits);
+      applySequenceOfEdits(code, edits);
 
   int _offset;
 
@@ -14176,25 +14439,25 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       String replacement;
       if (json.containsKey("replacement")) {
-        replacement = jsonDecoder._decodeString(jsonPath + ".replacement", json["replacement"]);
+        replacement = jsonDecoder.decodeString(jsonPath + ".replacement", json["replacement"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "replacement");
       }
       String id;
       if (json.containsKey("id")) {
-        id = jsonDecoder._decodeString(jsonPath + ".id", json["id"]);
+        id = jsonDecoder.decodeString(jsonPath + ".id", json["id"]);
       }
       return new SourceEdit(offset, length, replacement, id: id);
     } else {
@@ -14221,7 +14484,7 @@
   /**
    * Get the result of applying the edit to the given [code].
    */
-  String apply(String code) => _applyEdit(code, this);
+  String apply(String code) => applyEdit(code, this);
 
   @override
   String toString() => JSON.encode(toJson());
@@ -14240,11 +14503,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, replacement.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, id.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, replacement.hashCode);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -14256,6 +14519,8 @@
  *   "fileStamp": long
  *   "edits": List<SourceEdit>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class SourceFileEdit implements HasToJson {
   String _file;
@@ -14328,19 +14593,19 @@
     if (json is Map) {
       String file;
       if (json.containsKey("file")) {
-        file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]);
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "file");
       }
       int fileStamp;
       if (json.containsKey("fileStamp")) {
-        fileStamp = jsonDecoder._decodeInt(jsonPath + ".fileStamp", json["fileStamp"]);
+        fileStamp = jsonDecoder.decodeInt(jsonPath + ".fileStamp", json["fileStamp"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "fileStamp");
       }
       List<SourceEdit> edits;
       if (json.containsKey("edits")) {
-        edits = jsonDecoder._decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
+        edits = jsonDecoder.decodeList(jsonPath + ".edits", json["edits"], (String jsonPath, Object json) => new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "edits");
       }
@@ -14361,13 +14626,13 @@
   /**
    * Adds the given [Edit] to the list.
    */
-  void add(SourceEdit edit) => _addEditForSource(this, edit);
+  void add(SourceEdit edit) => addEditForSource(this, edit);
 
   /**
    * Adds the given [Edit]s.
    */
   void addAll(Iterable<SourceEdit> edits) =>
-      _addAllEditsForSource(this, edits);
+      addAllEditsForSource(this, edits);
 
   @override
   String toString() => JSON.encode(toJson());
@@ -14377,7 +14642,7 @@
     if (other is SourceFileEdit) {
       return file == other.file &&
           fileStamp == other.fileStamp &&
-          _listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
+          listEqual(edits, other.edits, (SourceEdit a, SourceEdit b) => a == b);
     }
     return false;
   }
@@ -14385,10 +14650,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, fileStamp.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, edits.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    hash = JenkinsSmiHash.combine(hash, fileStamp.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -14404,6 +14669,8 @@
  *   "mixins": List<int>
  *   "subclasses": List<int>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class TypeHierarchyItem implements HasToJson {
   Element _classElement;
@@ -14565,7 +14832,7 @@
       }
       String displayName;
       if (json.containsKey("displayName")) {
-        displayName = jsonDecoder._decodeString(jsonPath + ".displayName", json["displayName"]);
+        displayName = jsonDecoder.decodeString(jsonPath + ".displayName", json["displayName"]);
       }
       Element memberElement;
       if (json.containsKey("memberElement")) {
@@ -14573,23 +14840,23 @@
       }
       int superclass;
       if (json.containsKey("superclass")) {
-        superclass = jsonDecoder._decodeInt(jsonPath + ".superclass", json["superclass"]);
+        superclass = jsonDecoder.decodeInt(jsonPath + ".superclass", json["superclass"]);
       }
       List<int> interfaces;
       if (json.containsKey("interfaces")) {
-        interfaces = jsonDecoder._decodeList(jsonPath + ".interfaces", json["interfaces"], jsonDecoder._decodeInt);
+        interfaces = jsonDecoder.decodeList(jsonPath + ".interfaces", json["interfaces"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "interfaces");
       }
       List<int> mixins;
       if (json.containsKey("mixins")) {
-        mixins = jsonDecoder._decodeList(jsonPath + ".mixins", json["mixins"], jsonDecoder._decodeInt);
+        mixins = jsonDecoder.decodeList(jsonPath + ".mixins", json["mixins"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "mixins");
       }
       List<int> subclasses;
       if (json.containsKey("subclasses")) {
-        subclasses = jsonDecoder._decodeList(jsonPath + ".subclasses", json["subclasses"], jsonDecoder._decodeInt);
+        subclasses = jsonDecoder.decodeList(jsonPath + ".subclasses", json["subclasses"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "subclasses");
       }
@@ -14627,9 +14894,9 @@
           displayName == other.displayName &&
           memberElement == other.memberElement &&
           superclass == other.superclass &&
-          _listEqual(interfaces, other.interfaces, (int a, int b) => a == b) &&
-          _listEqual(mixins, other.mixins, (int a, int b) => a == b) &&
-          _listEqual(subclasses, other.subclasses, (int a, int b) => a == b);
+          listEqual(interfaces, other.interfaces, (int a, int b) => a == b) &&
+          listEqual(mixins, other.mixins, (int a, int b) => a == b) &&
+          listEqual(subclasses, other.subclasses, (int a, int b) => a == b);
     }
     return false;
   }
@@ -14637,18 +14904,20 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, classElement.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, displayName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, memberElement.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, superclass.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, interfaces.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, mixins.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, subclasses.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, classElement.hashCode);
+    hash = JenkinsSmiHash.combine(hash, displayName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, memberElement.hashCode);
+    hash = JenkinsSmiHash.combine(hash, superclass.hashCode);
+    hash = JenkinsSmiHash.combine(hash, interfaces.hashCode);
+    hash = JenkinsSmiHash.combine(hash, mixins.hashCode);
+    hash = JenkinsSmiHash.combine(hash, subclasses.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * convertGetterToMethod feedback
+ *
+ * Clients are not expected to subtype this class.
  */
 class ConvertGetterToMethodFeedback {
   @override
@@ -14666,6 +14935,8 @@
 }
 /**
  * convertGetterToMethod options
+ *
+ * Clients are not expected to subtype this class.
  */
 class ConvertGetterToMethodOptions {
   @override
@@ -14683,6 +14954,8 @@
 }
 /**
  * convertMethodToGetter feedback
+ *
+ * Clients are not expected to subtype this class.
  */
 class ConvertMethodToGetterFeedback {
   @override
@@ -14700,6 +14973,8 @@
 }
 /**
  * convertMethodToGetter options
+ *
+ * Clients are not expected to subtype this class.
  */
 class ConvertMethodToGetterOptions {
   @override
@@ -14726,6 +15001,8 @@
  *   "offsets": List<int>
  *   "lengths": List<int>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJson {
   List<int> _coveringExpressionOffsets;
@@ -14830,31 +15107,31 @@
     if (json is Map) {
       List<int> coveringExpressionOffsets;
       if (json.containsKey("coveringExpressionOffsets")) {
-        coveringExpressionOffsets = jsonDecoder._decodeList(jsonPath + ".coveringExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder._decodeInt);
+        coveringExpressionOffsets = jsonDecoder.decodeList(jsonPath + ".coveringExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "coveringExpressionOffsets");
       }
       List<int> coveringExpressionLengths;
       if (json.containsKey("coveringExpressionLengths")) {
-        coveringExpressionLengths = jsonDecoder._decodeList(jsonPath + ".coveringExpressionLengths", json["coveringExpressionLengths"], jsonDecoder._decodeInt);
+        coveringExpressionLengths = jsonDecoder.decodeList(jsonPath + ".coveringExpressionLengths", json["coveringExpressionLengths"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "coveringExpressionLengths");
       }
       List<String> names;
       if (json.containsKey("names")) {
-        names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], jsonDecoder._decodeString);
+        names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "names");
       }
       List<int> offsets;
       if (json.containsKey("offsets")) {
-        offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder._decodeInt);
+        offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offsets");
       }
       List<int> lengths;
       if (json.containsKey("lengths")) {
-        lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder._decodeInt);
+        lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "lengths");
       }
@@ -14880,11 +15157,11 @@
   @override
   bool operator==(other) {
     if (other is ExtractLocalVariableFeedback) {
-      return _listEqual(coveringExpressionOffsets, other.coveringExpressionOffsets, (int a, int b) => a == b) &&
-          _listEqual(coveringExpressionLengths, other.coveringExpressionLengths, (int a, int b) => a == b) &&
-          _listEqual(names, other.names, (String a, String b) => a == b) &&
-          _listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
-          _listEqual(lengths, other.lengths, (int a, int b) => a == b);
+      return listEqual(coveringExpressionOffsets, other.coveringExpressionOffsets, (int a, int b) => a == b) &&
+          listEqual(coveringExpressionLengths, other.coveringExpressionLengths, (int a, int b) => a == b) &&
+          listEqual(names, other.names, (String a, String b) => a == b) &&
+          listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
+          listEqual(lengths, other.lengths, (int a, int b) => a == b);
     }
     return false;
   }
@@ -14892,12 +15169,12 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode);
+    hash = JenkinsSmiHash.combine(hash, names.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -14908,6 +15185,8 @@
  *   "name": String
  *   "extractAll": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExtractLocalVariableOptions extends RefactoringOptions implements HasToJson {
   String _name;
@@ -14958,13 +15237,13 @@
     if (json is Map) {
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
       bool extractAll;
       if (json.containsKey("extractAll")) {
-        extractAll = jsonDecoder._decodeBool(jsonPath + ".extractAll", json["extractAll"]);
+        extractAll = jsonDecoder.decodeBool(jsonPath + ".extractAll", json["extractAll"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "extractAll");
       }
@@ -15001,9 +15280,9 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -15020,6 +15299,8 @@
  *   "offsets": List<int>
  *   "lengths": List<int>
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExtractMethodFeedback extends RefactoringFeedback implements HasToJson {
   int _offset;
@@ -15174,49 +15455,49 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       String returnType;
       if (json.containsKey("returnType")) {
-        returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["returnType"]);
+        returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["returnType"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "returnType");
       }
       List<String> names;
       if (json.containsKey("names")) {
-        names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], jsonDecoder._decodeString);
+        names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonDecoder.decodeString);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "names");
       }
       bool canCreateGetter;
       if (json.containsKey("canCreateGetter")) {
-        canCreateGetter = jsonDecoder._decodeBool(jsonPath + ".canCreateGetter", json["canCreateGetter"]);
+        canCreateGetter = jsonDecoder.decodeBool(jsonPath + ".canCreateGetter", json["canCreateGetter"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "canCreateGetter");
       }
       List<RefactoringMethodParameter> parameters;
       if (json.containsKey("parameters")) {
-        parameters = jsonDecoder._decodeList(jsonPath + ".parameters", json["parameters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJson(jsonDecoder, jsonPath, json));
+        parameters = jsonDecoder.decodeList(jsonPath + ".parameters", json["parameters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "parameters");
       }
       List<int> offsets;
       if (json.containsKey("offsets")) {
-        offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder._decodeInt);
+        offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offsets");
       }
       List<int> lengths;
       if (json.containsKey("lengths")) {
-        lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder._decodeInt);
+        lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"], jsonDecoder.decodeInt);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "lengths");
       }
@@ -15248,11 +15529,11 @@
       return offset == other.offset &&
           length == other.length &&
           returnType == other.returnType &&
-          _listEqual(names, other.names, (String a, String b) => a == b) &&
+          listEqual(names, other.names, (String a, String b) => a == b) &&
           canCreateGetter == other.canCreateGetter &&
-          _listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) &&
-          _listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
-          _listEqual(lengths, other.lengths, (int a, int b) => a == b);
+          listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) &&
+          listEqual(offsets, other.offsets, (int a, int b) => a == b) &&
+          listEqual(lengths, other.lengths, (int a, int b) => a == b);
     }
     return false;
   }
@@ -15260,15 +15541,15 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, canCreateGetter.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, names.hashCode);
+    hash = JenkinsSmiHash.combine(hash, canCreateGetter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -15282,6 +15563,8 @@
  *   "parameters": List<RefactoringMethodParameter>
  *   "extractAll": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class ExtractMethodOptions extends RefactoringOptions implements HasToJson {
   String _returnType;
@@ -15398,31 +15681,31 @@
     if (json is Map) {
       String returnType;
       if (json.containsKey("returnType")) {
-        returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["returnType"]);
+        returnType = jsonDecoder.decodeString(jsonPath + ".returnType", json["returnType"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "returnType");
       }
       bool createGetter;
       if (json.containsKey("createGetter")) {
-        createGetter = jsonDecoder._decodeBool(jsonPath + ".createGetter", json["createGetter"]);
+        createGetter = jsonDecoder.decodeBool(jsonPath + ".createGetter", json["createGetter"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "createGetter");
       }
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
       List<RefactoringMethodParameter> parameters;
       if (json.containsKey("parameters")) {
-        parameters = jsonDecoder._decodeList(jsonPath + ".parameters", json["parameters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJson(jsonDecoder, jsonPath, json));
+        parameters = jsonDecoder.decodeList(jsonPath + ".parameters", json["parameters"], (String jsonPath, Object json) => new RefactoringMethodParameter.fromJson(jsonDecoder, jsonPath, json));
       } else {
         throw jsonDecoder.missingKey(jsonPath, "parameters");
       }
       bool extractAll;
       if (json.containsKey("extractAll")) {
-        extractAll = jsonDecoder._decodeBool(jsonPath + ".extractAll", json["extractAll"]);
+        extractAll = jsonDecoder.decodeBool(jsonPath + ".extractAll", json["extractAll"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "extractAll");
       }
@@ -15456,7 +15739,7 @@
       return returnType == other.returnType &&
           createGetter == other.createGetter &&
           name == other.name &&
-          _listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) &&
+          listEqual(parameters, other.parameters, (RefactoringMethodParameter a, RefactoringMethodParameter b) => a == b) &&
           extractAll == other.extractAll;
     }
     return false;
@@ -15465,12 +15748,12 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, createGetter.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
+    hash = JenkinsSmiHash.combine(hash, createGetter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -15481,6 +15764,8 @@
  *   "name": String
  *   "occurrences": int
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class InlineLocalVariableFeedback extends RefactoringFeedback implements HasToJson {
   String _name;
@@ -15525,13 +15810,13 @@
     if (json is Map) {
       String name;
       if (json.containsKey("name")) {
-        name = jsonDecoder._decodeString(jsonPath + ".name", json["name"]);
+        name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "name");
       }
       int occurrences;
       if (json.containsKey("occurrences")) {
-        occurrences = jsonDecoder._decodeInt(jsonPath + ".occurrences", json["occurrences"]);
+        occurrences = jsonDecoder.decodeInt(jsonPath + ".occurrences", json["occurrences"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "occurrences");
       }
@@ -15563,13 +15848,15 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * inlineLocalVariable options
+ *
+ * Clients are not expected to subtype this class.
  */
 class InlineLocalVariableOptions {
   @override
@@ -15594,6 +15881,8 @@
  *   "methodName": String
  *   "isDeclaration": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class InlineMethodFeedback extends RefactoringFeedback implements HasToJson {
   String _className;
@@ -15657,17 +15946,17 @@
     if (json is Map) {
       String className;
       if (json.containsKey("className")) {
-        className = jsonDecoder._decodeString(jsonPath + ".className", json["className"]);
+        className = jsonDecoder.decodeString(jsonPath + ".className", json["className"]);
       }
       String methodName;
       if (json.containsKey("methodName")) {
-        methodName = jsonDecoder._decodeString(jsonPath + ".methodName", json["methodName"]);
+        methodName = jsonDecoder.decodeString(jsonPath + ".methodName", json["methodName"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "methodName");
       }
       bool isDeclaration;
       if (json.containsKey("isDeclaration")) {
-        isDeclaration = jsonDecoder._decodeBool(jsonPath + ".isDeclaration", json["isDeclaration"]);
+        isDeclaration = jsonDecoder.decodeBool(jsonPath + ".isDeclaration", json["isDeclaration"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "isDeclaration");
       }
@@ -15703,10 +15992,10 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, methodName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, className.hashCode);
+    hash = JenkinsSmiHash.combine(hash, methodName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -15717,6 +16006,8 @@
  *   "deleteSource": bool
  *   "inlineAll": bool
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class InlineMethodOptions extends RefactoringOptions implements HasToJson {
   bool _deleteSource;
@@ -15765,13 +16056,13 @@
     if (json is Map) {
       bool deleteSource;
       if (json.containsKey("deleteSource")) {
-        deleteSource = jsonDecoder._decodeBool(jsonPath + ".deleteSource", json["deleteSource"]);
+        deleteSource = jsonDecoder.decodeBool(jsonPath + ".deleteSource", json["deleteSource"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "deleteSource");
       }
       bool inlineAll;
       if (json.containsKey("inlineAll")) {
-        inlineAll = jsonDecoder._decodeBool(jsonPath + ".inlineAll", json["inlineAll"]);
+        inlineAll = jsonDecoder.decodeBool(jsonPath + ".inlineAll", json["inlineAll"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "inlineAll");
       }
@@ -15808,13 +16099,15 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, deleteSource.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, inlineAll.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
+    hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 /**
  * moveFile feedback
+ *
+ * Clients are not expected to subtype this class.
  */
 class MoveFileFeedback {
   @override
@@ -15837,6 +16130,8 @@
  * {
  *   "newFile": FilePath
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class MoveFileOptions extends RefactoringOptions implements HasToJson {
   String _newFile;
@@ -15865,7 +16160,7 @@
     if (json is Map) {
       String newFile;
       if (json.containsKey("newFile")) {
-        newFile = jsonDecoder._decodeString(jsonPath + ".newFile", json["newFile"]);
+        newFile = jsonDecoder.decodeString(jsonPath + ".newFile", json["newFile"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "newFile");
       }
@@ -15900,8 +16195,8 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, newFile.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, newFile.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -15914,6 +16209,8 @@
  *   "elementKindName": String
  *   "oldName": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RenameFeedback extends RefactoringFeedback implements HasToJson {
   int _offset;
@@ -15992,25 +16289,25 @@
     if (json is Map) {
       int offset;
       if (json.containsKey("offset")) {
-        offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "offset");
       }
       int length;
       if (json.containsKey("length")) {
-        length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
+        length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "length");
       }
       String elementKindName;
       if (json.containsKey("elementKindName")) {
-        elementKindName = jsonDecoder._decodeString(jsonPath + ".elementKindName", json["elementKindName"]);
+        elementKindName = jsonDecoder.decodeString(jsonPath + ".elementKindName", json["elementKindName"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "elementKindName");
       }
       String oldName;
       if (json.containsKey("oldName")) {
-        oldName = jsonDecoder._decodeString(jsonPath + ".oldName", json["oldName"]);
+        oldName = jsonDecoder.decodeString(jsonPath + ".oldName", json["oldName"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "oldName");
       }
@@ -16046,11 +16343,11 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, elementKindName.hashCode);
-    hash = _JenkinsSmiHash.combine(hash, oldName.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
+    hash = JenkinsSmiHash.combine(hash, length.hashCode);
+    hash = JenkinsSmiHash.combine(hash, elementKindName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, oldName.hashCode);
+    return JenkinsSmiHash.finish(hash);
   }
 }
 
@@ -16060,6 +16357,8 @@
  * {
  *   "newName": String
  * }
+ *
+ * Clients are not expected to subtype this class.
  */
 class RenameOptions extends RefactoringOptions implements HasToJson {
   String _newName;
@@ -16088,7 +16387,7 @@
     if (json is Map) {
       String newName;
       if (json.containsKey("newName")) {
-        newName = jsonDecoder._decodeString(jsonPath + ".newName", json["newName"]);
+        newName = jsonDecoder.decodeString(jsonPath + ".newName", json["newName"]);
       } else {
         throw jsonDecoder.missingKey(jsonPath, "newName");
       }
@@ -16123,7 +16422,7 @@
   @override
   int get hashCode {
     int hash = 0;
-    hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
-    return _JenkinsSmiHash.finish(hash);
+    hash = JenkinsSmiHash.combine(hash, newName.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
new file mode 100644
index 0000000..08e49f8
--- /dev/null
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
@@ -0,0 +1,565 @@
+// 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.
+
+/**
+ * Support for client code that needs to interact with the requests, responses
+ * and notifications that are part of the analysis server's wire protocol.
+ */
+library analysis_server.plugin.protocol.protocol;
+
+import 'dart:collection';
+import 'dart:convert' hide JsonDecoder;
+
+import 'package:analysis_server/src/protocol/protocol_internal.dart';
+
+part 'generated_protocol.dart';
+
+/**
+ * A [RequestHandler] that supports [startup] and [shutdown] methods.
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class DomainHandler extends RequestHandler {
+  /**
+   * Perform any operations associated with the shutdown of the domain. It is
+   * not guaranteed that this method will be called. If it is, it will be
+   * called after the last [Request] has been made.
+   */
+  void shutdown() {}
+
+  /**
+   * Perform any operations associated with the startup of the domain. This
+   * will be called before the first [Request].
+   */
+  void startup() {}
+}
+
+/**
+ * An interface for enumerated types in the protocol.
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class Enum {
+  /**
+   * The name of the enumerated value. This should match the name of the
+   * static getter which provides access to this enumerated value.
+   */
+  String get name;
+}
+
+/**
+ * A notification from the server about an event that occurred.
+ *
+ * Clients are not expected to subtype this class.
+ */
+class Notification {
+  /**
+   * The name of the JSON attribute containing the name of the event that
+   * triggered the notification.
+   */
+  static const String EVENT = 'event';
+
+  /**
+   * The name of the JSON attribute containing the result values.
+   */
+  static const String PARAMS = 'params';
+
+  /**
+   * The name of the event that triggered the notification.
+   */
+  final String event;
+
+  /**
+   * A table mapping the names of notification parameters to their values, or
+   * `null` if there are no notification parameters.
+   */
+  Map<String, Object> _params;
+
+  /**
+   * Initialize a newly created [Notification] to have the given [event] name.
+   * If [_params] is provided, it will be used as the params; otherwise no
+   * params will be used.
+   */
+  Notification(this.event, [this._params]);
+
+  /**
+   * 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]);
+  }
+
+  /**
+   * Return a table representing the structure of the Json object that will be
+   * sent to the client to represent this response.
+   */
+  Map<String, Object> toJson() {
+    Map<String, Object> jsonObject = {};
+    jsonObject[EVENT] = event;
+    if (_params != null) {
+      jsonObject[PARAMS] = _params;
+    }
+    return jsonObject;
+  }
+}
+
+/**
+ * A request that was received from the client.
+ *
+ * Clients are not expected to subtype this class.
+ */
+class Request {
+  /**
+   * The name of the JSON attribute containing the id of the request.
+   */
+  static const String ID = 'id';
+
+  /**
+   * The name of the JSON attribute containing the name of the request.
+   */
+  static const String METHOD = 'method';
+
+  /**
+   * The name of the JSON attribute containing the request parameters.
+   */
+  static const String PARAMS = 'params';
+
+  /**
+   * The name of the optional JSON attribute indicating the time (milliseconds
+   * since epoch) at which the client made the request.
+   */
+  static const String CLIENT_REQUEST_TIME = 'clientRequestTime';
+
+  /**
+   * The unique identifier used to identify this request.
+   */
+  final String id;
+
+  /**
+   * The method being requested.
+   */
+  final String method;
+
+  /**
+   * A table mapping the names of request parameters to their values.
+   */
+  final Map<String, Object> _params;
+
+  /**
+   * The time (milliseconds since epoch) at which the client made the request
+   * or `null` if this information is not provided by the client.
+   */
+  final int clientRequestTime;
+
+  /**
+   * Initialize a newly created [Request] to have the given [id] and [method]
+   * name.  If [params] is supplied, it is used as the "params" map for the
+   * request.  Otherwise an empty "params" map is allocated.
+   */
+  Request(this.id, this.method,
+      [Map<String, Object> params, this.clientRequestTime])
+      : _params = params != null ? params : new HashMap<String, Object>();
+
+  /**
+   * Return a request parsed from the given json, or `null` if the [data] is
+   * not a valid json representation of a request. The [data] is expected to
+   * have the following format:
+   *
+   *   {
+   *     'clientRequestTime': millisecondsSinceEpoch
+   *     'id': String,
+   *     'method': methodName,
+   *     'params': {
+   *       paramter_name: value
+   *     }
+   *   }
+   *
+   * where both the parameters and clientRequestTime are optional.
+   *
+   * The parameters can contain any number of name/value pairs. The
+   * clientRequestTime must be an int representing the time at which the client
+   * issued the request (milliseconds since epoch).
+   */
+  factory Request.fromJson(Map<String, dynamic> result) {
+    var id = result[Request.ID];
+    var method = result[Request.METHOD];
+    if (id is! String || method is! String) {
+      return null;
+    }
+    var time = result[Request.CLIENT_REQUEST_TIME];
+    if (time != null && time is! int) {
+      return null;
+    }
+    var params = result[Request.PARAMS];
+    if (params is Map || params == null) {
+      return new Request(id, method, params, time);
+    } else {
+      return null;
+    }
+  }
+
+  /**
+   * Return a request parsed from the given [data], or `null` if the [data] is
+   * not a valid json representation of a request. The [data] is expected to
+   * have the following format:
+   *
+   *   {
+   *     'clientRequestTime': millisecondsSinceEpoch
+   *     'id': String,
+   *     'method': methodName,
+   *     'params': {
+   *       paramter_name: value
+   *     }
+   *   }
+   *
+   * where both the parameters and clientRequestTime are optional.
+   *
+   * The parameters can contain any number of name/value pairs. The
+   * clientRequestTime must be an int representing the time at which the client
+   * issued the request (milliseconds since epoch).
+   */
+  factory Request.fromString(String data) {
+    try {
+      var result = JSON.decode(data);
+      if (result is Map) {
+        return new Request.fromJson(result);
+      }
+      return null;
+    } catch (exception) {
+      return null;
+    }
+  }
+
+  /**
+   * Return a table representing the structure of the Json object that will be
+   * sent to the client to represent this response.
+   */
+  Map<String, Object> toJson() {
+    Map<String, Object> jsonObject = new HashMap<String, Object>();
+    jsonObject[ID] = id;
+    jsonObject[METHOD] = method;
+    if (_params.isNotEmpty) {
+      jsonObject[PARAMS] = _params;
+    }
+    if (clientRequestTime != null) {
+      jsonObject[CLIENT_REQUEST_TIME] = clientRequestTime;
+    }
+    return jsonObject;
+  }
+}
+
+/**
+ * An exception that occurred during the handling of a request that requires
+ * that an error be returned to the client.
+ *
+ * Clients are not expected to subtype this class.
+ */
+class RequestFailure implements Exception {
+  /**
+   * The response to be returned as a result of the failure.
+   */
+  final Response response;
+
+  /**
+   * Initialize a newly created exception to return the given reponse.
+   */
+  RequestFailure(this.response);
+}
+
+/**
+ * An object that can handle requests and produce responses for them.
+ *
+ * Clients are not expected to subtype this class.
+ */
+abstract class RequestHandler {
+  /**
+   * Attempt to handle the given [request]. If the request is not recognized by
+   * this handler, return `null` so that other handlers will be given a chance
+   * to handle it. Otherwise, return the response that should be passed back to
+   * the client.
+   */
+  Response handleRequest(Request request);
+}
+
+/**
+ * A response to a request.
+ *
+ * Clients are not expected to subtype this class.
+ */
+class Response {
+  /**
+   * The [Response] instance that is returned when a real [Response] cannot
+   * be provided at the moment.
+   */
+  static final Response DELAYED_RESPONSE = new Response('DELAYED_RESPONSE');
+
+  /**
+   * The name of the JSON attribute containing the id of the request for which
+   * this is a response.
+   */
+  static const String ID = 'id';
+
+  /**
+   * The name of the JSON attribute containing the error message.
+   */
+  static const String ERROR = 'error';
+
+  /**
+   * The name of the JSON attribute containing the result values.
+   */
+  static const String RESULT = 'result';
+
+  /**
+   * The unique identifier used to identify the request that this response is
+   * associated with.
+   */
+  final String id;
+
+  /**
+   * The error that was caused by attempting to handle the request, or `null` if
+   * there was no error.
+   */
+  final RequestError error;
+
+  /**
+   * A table mapping the names of result fields to their values.  Should be
+   * `null` if there is no result to send.
+   */
+  Map<String, Object> _result;
+
+  /**
+   * Initialize a newly created instance to represent a response to a request
+   * with the given [id].  If [_result] is provided, it will be used as the
+   * result; otherwise an empty result will be used.  If an [error] is provided
+   * then the response will represent an error condition.
+   */
+  Response(this.id, {Map<String, Object> result, this.error})
+      : _result = result;
+
+  /**
+   * Initialize a newly created instance to represent the FILE_NOT_ANALYZED
+   * error condition.
+   */
+  Response.fileNotAnalyzed(Request request, String file)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.FILE_NOT_ANALYZED,
+                'File is not analyzed: $file.'));
+
+  /**
+   * Initialize a newly created instance to represent the FORMAT_INVALID_FILE
+   * error condition.
+   */
+  Response.formatInvalidFile(Request request)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.FORMAT_INVALID_FILE,
+                'Error during `edit.format`: invalid file.'));
+
+  /**
+   * Initialize a newly created instance to represent the FORMAT_WITH_ERROR
+   * error condition.
+   */
+  Response.formatWithErrors(Request request)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.FORMAT_WITH_ERRORS,
+                'Error during `edit.format`: source contains syntax errors.'));
+
+  /**
+   * Initialize a newly created instance based on the given JSON data.
+   */
+  factory Response.fromJson(Map<String, Object> json) {
+    try {
+      Object id = json[Response.ID];
+      if (id is! String) {
+        return null;
+      }
+      Object error = json[Response.ERROR];
+      RequestError decodedError;
+      if (error is Map) {
+        decodedError = new RequestError.fromJson(
+            new ResponseDecoder(null), '.error', error);
+      }
+      Object result = json[Response.RESULT];
+      Map<String, Object> decodedResult;
+      if (result is Map) {
+        decodedResult = result;
+      }
+      return new Response(id, error: decodedError, result: decodedResult);
+    } catch (exception) {
+      return null;
+    }
+  }
+
+  /**
+   * Initialize a newly created instance to represent the
+   * GET_ERRORS_INVALID_FILE error condition.
+   */
+  Response.getErrorsInvalidFile(Request request)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.GET_ERRORS_INVALID_FILE,
+                'Error during `analysis.getErrors`: invalid file.'));
+
+  /**
+   * Initialize a newly created instance to represent the
+   * GET_NAVIGATION_INVALID_FILE error condition.
+   */
+  Response.getNavigationInvalidFile(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.GET_NAVIGATION_INVALID_FILE,
+                'Error during `analysis.getNavigation`: invalid file.'));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by an analysis.reanalyze [request] that specifies an analysis root that is
+   * not in the current list of analysis roots.
+   */
+  Response.invalidAnalysisRoot(Request request, String rootPath)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT,
+                "Invalid analysis root: $rootPath"));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a [request] that specifies an execution context whose context root does
+   * not exist.
+   */
+  Response.invalidExecutionContext(Request request, String contextId)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.INVALID_EXECUTION_CONTEXT,
+                "Invalid execution context: $contextId"));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a [request] that had invalid parameter.  [path] is the path to the
+   * invalid parameter, in Javascript notation (e.g. "foo.bar" means that the
+   * parameter "foo" contained a key "bar" whose value was the wrong type).
+   * [expectation] is a description of the type of data that was expected.
+   */
+  Response.invalidParameter(Request request, String path, String expectation)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.INVALID_PARAMETER,
+                "Invalid parameter '$path'. $expectation."));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a malformed request.
+   */
+  Response.invalidRequestFormat()
+      : this('',
+            error: new RequestError(
+                RequestErrorCode.INVALID_REQUEST, 'Invalid request'));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a request that requires an index, but indexing is disabled.
+   */
+  Response.noIndexGenerated(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.NO_INDEX_GENERATED, 'Indexing is disabled'));
+
+  /**
+   * Initialize a newly created instance to represent the
+   * ORGANIZE_DIRECTIVES_ERROR error condition.
+   */
+  Response.organizeDirectivesError(Request request, String message)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.ORGANIZE_DIRECTIVES_ERROR, message));
+
+  /**
+   * Initialize a newly created instance to represent the
+   * REFACTORING_REQUEST_CANCELLED error condition.
+   */
+  Response.refactoringRequestCancelled(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.REFACTORING_REQUEST_CANCELLED,
+                'The `edit.getRefactoring` request was cancelled.'));
+
+  /**
+   * Initialize a newly created instance to represent the SERVER_ERROR error
+   * condition.
+   */
+  factory Response.serverError(Request request, exception, stackTrace) {
+    RequestError error =
+        new RequestError(RequestErrorCode.SERVER_ERROR, exception.toString());
+    if (stackTrace != null) {
+      error.stackTrace = stackTrace.toString();
+    }
+    return new Response(request.id, error: error);
+  }
+
+  /**
+   * Initialize a newly created instance to represent the
+   * SORT_MEMBERS_INVALID_FILE error condition.
+   */
+  Response.sortMembersInvalidFile(Request request)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.SORT_MEMBERS_INVALID_FILE,
+                'Error during `edit.sortMembers`: invalid file.'));
+
+  /**
+   * Initialize a newly created instance to represent the
+   * SORT_MEMBERS_PARSE_ERRORS error condition.
+   */
+  Response.sortMembersParseErrors(Request request, int numErrors)
+      : this(request.id,
+            error: new RequestError(RequestErrorCode.SORT_MEMBERS_PARSE_ERRORS,
+                'Error during `edit.sortMembers`: file has $numErrors scan/parse errors.'));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a `analysis.setPriorityFiles` [request] that includes one or more files
+   * that are not being analyzed.
+   */
+  Response.unanalyzedPriorityFiles(String requestId, String fileNames)
+      : this(requestId,
+            error: new RequestError(RequestErrorCode.UNANALYZED_PRIORITY_FILES,
+                "Unanalyzed files cannot be a priority: '$fileNames'"));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a [request] that cannot be handled by any known handlers.
+   */
+  Response.unknownRequest(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request'));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a [request] referencing a source that does not exist.
+   */
+  Response.unknownSource(Request request)
+      : this(request.id,
+            error: new RequestError(
+                RequestErrorCode.UNKNOWN_SOURCE, 'Unknown source'));
+
+  /**
+   * Initialize a newly created instance to represent an error condition caused
+   * by a [request] for a service that is not supported.
+   */
+  Response.unsupportedFeature(String requestId, String message)
+      : this(requestId,
+            error: new RequestError(
+                RequestErrorCode.UNSUPPORTED_FEATURE, message));
+
+  /**
+   * Return a table representing the structure of the Json object that will be
+   * sent to the client to represent this response.
+   */
+  Map<String, Object> toJson() {
+    Map<String, Object> jsonObject = new HashMap<String, Object>();
+    jsonObject[ID] = id;
+    if (error != null) {
+      jsonObject[ERROR] = error.toJson();
+    }
+    if (_result != null) {
+      jsonObject[RESULT] = _result;
+    }
+    return jsonObject;
+  }
+}
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
new file mode 100644
index 0000000..c27a188
--- /dev/null
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
@@ -0,0 +1,218 @@
+// 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.
+
+/**
+ * Utilities for converting Dart entities into analysis server's protocol
+ * entities.
+ */
+library analysis_server.plugin.protocol.protocol_dart;
+
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/src/protocol_server.dart';
+import 'package:analyzer/src/generated/element.dart' as engine;
+import 'package:analyzer/src/generated/utilities_dart.dart' as engine;
+
+/**
+ * Return a protocol [Element] corresponding to the given [engine.Element].
+ */
+Element convertElement(engine.Element element) {
+  String name = element.displayName;
+  String elementTypeParameters = _getTypeParametersString(element);
+  String elementParameters = _getParametersString(element);
+  String elementReturnType = getReturnTypeString(element);
+  ElementKind kind = convertElementToElementKind(element);
+  return new Element(
+      kind,
+      name,
+      Element.makeFlags(
+          isPrivate: element.isPrivate,
+          isDeprecated: element.isDeprecated,
+          isAbstract: _isAbstract(element),
+          isConst: _isConst(element),
+          isFinal: _isFinal(element),
+          isStatic: _isStatic(element)),
+      location: newLocation_fromElement(element),
+      typeParameters: elementTypeParameters,
+      parameters: elementParameters,
+      returnType: elementReturnType);
+}
+
+/**
+ * Return a protocol [ElementKind] corresponding to the given
+ * [engine.ElementKind].
+ *
+ * This does not take into account that an instance of [ClassElement] can be an
+ * enum and an instance of [FieldElement] can be an enum constant.
+ * Use [convertElementToElementKind] where possible.
+ */
+ElementKind convertElementKind(engine.ElementKind kind) {
+  if (kind == engine.ElementKind.CLASS) {
+    return ElementKind.CLASS;
+  }
+  if (kind == engine.ElementKind.COMPILATION_UNIT) {
+    return ElementKind.COMPILATION_UNIT;
+  }
+  if (kind == engine.ElementKind.CONSTRUCTOR) {
+    return ElementKind.CONSTRUCTOR;
+  }
+  if (kind == engine.ElementKind.FIELD) {
+    return ElementKind.FIELD;
+  }
+  if (kind == engine.ElementKind.FUNCTION) {
+    return ElementKind.FUNCTION;
+  }
+  if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) {
+    return ElementKind.FUNCTION_TYPE_ALIAS;
+  }
+  if (kind == engine.ElementKind.GETTER) {
+    return ElementKind.GETTER;
+  }
+  if (kind == engine.ElementKind.LABEL) {
+    return ElementKind.LABEL;
+  }
+  if (kind == engine.ElementKind.LIBRARY) {
+    return ElementKind.LIBRARY;
+  }
+  if (kind == engine.ElementKind.LOCAL_VARIABLE) {
+    return ElementKind.LOCAL_VARIABLE;
+  }
+  if (kind == engine.ElementKind.METHOD) {
+    return ElementKind.METHOD;
+  }
+  if (kind == engine.ElementKind.PARAMETER) {
+    return ElementKind.PARAMETER;
+  }
+  if (kind == engine.ElementKind.PREFIX) {
+    return ElementKind.PREFIX;
+  }
+  if (kind == engine.ElementKind.SETTER) {
+    return ElementKind.SETTER;
+  }
+  if (kind == engine.ElementKind.TOP_LEVEL_VARIABLE) {
+    return ElementKind.TOP_LEVEL_VARIABLE;
+  }
+  if (kind == engine.ElementKind.TYPE_PARAMETER) {
+    return ElementKind.TYPE_PARAMETER;
+  }
+  return ElementKind.UNKNOWN;
+}
+
+/**
+ * Return an [ElementKind] corresponding to the given [engine.Element].
+ */
+ElementKind convertElementToElementKind(engine.Element element) {
+  if (element is engine.ClassElement && element.isEnum) {
+    return ElementKind.ENUM;
+  }
+  if (element is engine.FieldElement &&
+      element.isEnumConstant &&
+      // MyEnum.values and MyEnum.one.index return isEnumConstant = true
+      // so these additional checks are necessary.
+      // TODO(danrubel) MyEnum.values is constant, but is a list
+      // so should it return isEnumConstant = true?
+      // MyEnum.one.index is final but *not* constant
+      // so should it return isEnumConstant = true?
+      // Or should we return ElementKind.ENUM_CONSTANT here
+      // in either or both of these cases?
+      element.type != null &&
+      element.type.element == element.enclosingElement) {
+    return ElementKind.ENUM_CONSTANT;
+  }
+  return convertElementKind(element.kind);
+}
+
+String _getParametersString(engine.Element element) {
+  // TODO(scheglov) expose the corresponding feature from ExecutableElement
+  List<engine.ParameterElement> parameters;
+  if (element is engine.ExecutableElement) {
+    // valid getters don't have parameters
+    if (element.kind == engine.ElementKind.GETTER &&
+        element.parameters.isEmpty) {
+      return null;
+    }
+    parameters = element.parameters;
+  } else if (element is engine.FunctionTypeAliasElement) {
+    parameters = element.parameters;
+  } else {
+    return null;
+  }
+  StringBuffer sb = new StringBuffer();
+  String closeOptionalString = '';
+  for (engine.ParameterElement parameter in parameters) {
+    if (sb.isNotEmpty) {
+      sb.write(', ');
+    }
+    if (closeOptionalString.isEmpty) {
+      engine.ParameterKind kind = parameter.parameterKind;
+      if (kind == engine.ParameterKind.NAMED) {
+        sb.write('{');
+        closeOptionalString = '}';
+      }
+      if (kind == engine.ParameterKind.POSITIONAL) {
+        sb.write('[');
+        closeOptionalString = ']';
+      }
+    }
+    parameter.appendToWithoutDelimiters(sb);
+  }
+  sb.write(closeOptionalString);
+  return '(' + sb.toString() + ')';
+}
+
+String _getTypeParametersString(engine.Element element) {
+  List<engine.TypeParameterElement> typeParameters;
+  if (element is engine.ClassElement) {
+    typeParameters = element.typeParameters;
+  } else if (element is engine.FunctionTypeAliasElement) {
+    typeParameters = element.typeParameters;
+  }
+  if (typeParameters == null || typeParameters.isEmpty) {
+    return null;
+  }
+  return '<${typeParameters.join(', ')}>';
+}
+
+bool _isAbstract(engine.Element element) {
+  // TODO(scheglov) add isAbstract to Element API
+  if (element is engine.ClassElement) {
+    return element.isAbstract;
+  }
+  if (element is engine.MethodElement) {
+    return element.isAbstract;
+  }
+  if (element is engine.PropertyAccessorElement) {
+    return element.isAbstract;
+  }
+  return false;
+}
+
+bool _isConst(engine.Element element) {
+  // TODO(scheglov) add isConst to Element API
+  if (element is engine.ConstructorElement) {
+    return element.isConst;
+  }
+  if (element is engine.VariableElement) {
+    return element.isConst;
+  }
+  return false;
+}
+
+bool _isFinal(engine.Element element) {
+  // TODO(scheglov) add isFinal to Element API
+  if (element is engine.VariableElement) {
+    return element.isFinal;
+  }
+  return false;
+}
+
+bool _isStatic(engine.Element element) {
+  // TODO(scheglov) add isStatic to Element API
+  if (element is engine.ExecutableElement) {
+    return element.isStatic;
+  }
+  if (element is engine.PropertyInducingElement) {
+    return element.isStatic;
+  }
+  return false;
+}
diff --git a/pkg/analysis_server/lib/src/analysis_manager.dart b/pkg/analysis_server/lib/src/analysis_manager.dart
index 72d1b5e..fd9bfcd 100644
--- a/pkg/analysis_server/lib/src/analysis_manager.dart
+++ b/pkg/analysis_server/lib/src/analysis_manager.dart
@@ -6,9 +6,9 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/channel/web_socket_channel.dart';
-import 'package:analysis_server/src/protocol.dart';
 
 /**
  * [AnalysisManager] is used to launch and manage an analysis server
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 8cb08b0..d085d03 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -9,7 +9,9 @@
 import 'dart:core' hide Resource;
 import 'dart:math' show max;
 
-import 'package:analysis_server/plugin/analyzed_files.dart';
+import 'package:analysis_server/plugin/analysis/analyzed_files.dart';
+import 'package:analysis_server/plugin/analysis/resolver_provider.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/analysis_logger.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/context_manager.dart';
@@ -17,11 +19,9 @@
 import 'package:analysis_server/src/operation/operation_analysis.dart';
 import 'package:analysis_server/src/operation/operation_queue.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart' hide Element;
 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/uri/resolver_provider.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/source/pub_package_map_provider.dart';
diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
index 44d917e..ce6235d 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -8,9 +8,9 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 
 /**
@@ -105,11 +105,9 @@
   @override
   void listen(void onRequest(Request request),
       {Function onError, void onDone()}) {
-    _input
-        .transform(const Utf8Decoder())
-        .transform(new LineSplitter())
-        .listen((String data) => _readRequest(data, onRequest),
-            onError: onError, onDone: () {
+    _input.transform(const Utf8Decoder()).transform(new LineSplitter()).listen(
+        (String data) => _readRequest(data, onRequest),
+        onError: onError, onDone: () {
       close();
       onDone();
     });
diff --git a/pkg/analysis_server/lib/src/channel/channel.dart b/pkg/analysis_server/lib/src/channel/channel.dart
index 041b122..f3e473d 100644
--- a/pkg/analysis_server/lib/src/channel/channel.dart
+++ b/pkg/analysis_server/lib/src/channel/channel.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:convert';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 
 /**
  * Instances of the class [ChannelChunkSink] uses a [Converter] to translate
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 9dc4f00..961bee6 100644
--- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
@@ -8,9 +8,9 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 0491336..1fc175b 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -4,7 +4,7 @@
 
 library computer.highlights;
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index c847670..ddab12f 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -4,7 +4,7 @@
 
 library computer.highlights2;
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 8d870c0..a6f7337 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -4,7 +4,8 @@
 
 library computer.hover;
 
-import 'package:analysis_server/src/protocol.dart' show HoverInformation;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    show HoverInformation;
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index a052b13..9b4c9b7 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -4,8 +4,8 @@
 
 library computer.outline;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/collections.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart' as engine;
 import 'package:analyzer/src/generated/source.dart';
@@ -346,13 +346,6 @@
         children: nullIfEmpty(unitContents));
   }
 
-  static String _getTypeParametersStr(TypeParameterList parameters) {
-    if (parameters == null) {
-      return null;
-    }
-    return parameters.toSource();
-  }
-
   Outline _newVariableOutline(String typeName, ElementKind kind,
       VariableDeclaration variable, bool isStatic) {
     SimpleIdentifier nameNode = variable.name;
@@ -374,6 +367,13 @@
     return outline;
   }
 
+  static String _getTypeParametersStr(TypeParameterList parameters) {
+    if (parameters == null) {
+      return null;
+    }
+    return parameters.toSource();
+  }
+
   /**
    * Returns `true` if the given [element] is not `null` and deprecated.
    */
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index f81f5b8..3e72ad5 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -9,9 +9,9 @@
 import 'dart:convert';
 import 'dart:core' hide Resource;
 
+import 'package:analysis_server/plugin/analysis/resolver_provider.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/server_options.dart';
-import 'package:analysis_server/uri/resolver_provider.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/plugin/options.dart';
@@ -22,6 +22,7 @@
 import 'package:analyzer/source/pub_package_map_provider.dart';
 import 'package:analyzer/source/sdk_ext.dart';
 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/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -463,22 +464,36 @@
   }
 
   /**
-   * Process [options] for the context having info [info].
+   * Process [options] for the given context [info].
    */
   void processOptionsForContext(
       ContextInfo info, Map<String, YamlNode> options) {
-    //TODO(pquitslund): push handling into an options processor plugin contributed to engine.
-    //AnalysisEngine.instance.optionsPlugin.optionsProcessors
-    //    .forEach((OptionsProcessor p) => p.optionsProcessed(options));
     if (options == null) {
       return;
     }
+
+    // Notify options processors.
+    AnalysisEngine.instance.optionsPlugin.optionsProcessors.forEach(
+        (OptionsProcessor p) => p.optionsProcessed(info.context, options));
+
+    // Analysis options are processed 'in-line'.
+    // TODO(pq): consider pushing exclude handling into a plugin.
     YamlMap analyzer = options['analyzer'];
     if (analyzer == null) {
       // No options for analyzer.
       return;
     }
 
+    // Set strong mode.
+    var strongMode = analyzer['strong-mode'];
+    if (strongMode == true) {
+      AnalysisContext context = info.context;
+      AnalysisOptionsImpl options =
+          new AnalysisOptionsImpl.from(context.analysisOptions);
+      options.strongMode = true;
+      context.analysisOptions = options;
+    }
+
     // Set ignore patterns.
     YamlList exclude = analyzer['exclude'];
     if (exclude != null) {
@@ -816,17 +831,6 @@
     ContextInfo info = new ContextInfo(this, parent, folder, packagespecFile,
         normalizedPackageRoots[folder.path]);
 
-    try {
-      Map<String, YamlNode> options =
-          analysisOptionsProvider.getOptions(folder);
-      processOptionsForContext(info, options);
-    } on Exception catch (e) {
-      // TODO(pquitslund): contribute plugin that sends error notification on options file.
-      // Related test: context_manager_test.test_analysis_options_parse_failure()
-      // AnalysisEngine.instance.optionsPlugin.optionsProcessors
-      //      .forEach((OptionsProcessor p) => p.onError(e));
-    }
-
     FolderDisposition disposition;
     List<String> dependencies = <String>[];
 
@@ -839,6 +843,23 @@
     info.setDependencies(dependencies);
     info.context = callbacks.addContext(folder, disposition);
     info.context.name = folder.path;
+
+    try {
+      Map<String, YamlNode> options =
+          analysisOptionsProvider.getOptions(folder);
+      processOptionsForContext(info, options);
+    } catch (e, stacktrace) {
+      AnalysisEngine.instance.logger.logError(
+          'Error processing .analysis_options',
+          new CaughtException(e, stacktrace));
+      // TODO(pquitslund): contribute plugin that sends error notification on
+      // options file.
+      // Related test:
+      //   context_manager_test.test_analysis_options_parse_failure()
+      // AnalysisEngine.instance.optionsPlugin.optionsProcessors
+      //      .forEach((OptionsProcessor p) => p.onError(e));
+    }
+
     return info;
   }
 
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 48dcc67..494d37c 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:core' hide Resource;
 
-import 'package:analysis_server/analysis/analysis_domain.dart';
+import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/computer/computer_hover.dart';
 import 'package:analysis_server/src/constants.dart';
@@ -18,6 +18,7 @@
         NavigationOperation,
         OccurrencesOperation,
         sendAnalysisNotificationNavigation;
+import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/services/dependencies/library_dependencies.dart';
 import 'package:analyzer/file_system/file_system.dart';
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index 970e189..e5f42ae 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -6,10 +6,10 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/context_manager.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
     show CompletionRequest, CompletionResult;
 import 'package:analysis_server/src/services/completion/completion_manager.dart';
diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart
index f0b6677..470d3c3 100644
--- a/pkg/analysis_server/lib/src/domain_execution.dart
+++ b/pkg/analysis_server/lib/src/domain_execution.dart
@@ -8,9 +8,9 @@
 import 'dart:collection';
 import 'dart:core' hide Resource;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/src/domain_server.dart b/pkg/analysis_server/lib/src/domain_server.dart
index 7bc7040..7a7b34c 100644
--- a/pkg/analysis_server/lib/src/domain_server.dart
+++ b/pkg/analysis_server/lib/src/domain_server.dart
@@ -4,9 +4,9 @@
 
 library domain.server;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 
 /**
  * Instances of the class [ServerDomainHandler] implement a [RequestHandler]
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
index cb21c3d..9911d92 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
@@ -6,7 +6,7 @@
 
 import 'dart:collection';
 
-import 'package:analysis_server/analysis/navigation_core.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/collections.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
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 f1b9100..7f58ad7 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
@@ -4,7 +4,7 @@
 
 library domains.analysis.navigation_dart;
 
-import 'package:analysis_server/analysis/navigation_core.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
@@ -59,7 +59,7 @@
       return;
     }
     protocol.ElementKind kind =
-        protocol.newElementKind_fromEngine(element.kind);
+        protocol.convertElementKind(element.kind);
     protocol.Location location = protocol.newLocation_fromElement(element);
     if (location == null) {
       return;
diff --git a/pkg/analysis_server/lib/src/domains/analysis/occurrences.dart b/pkg/analysis_server/lib/src/domains/analysis/occurrences.dart
index f0a9a1c..2c3668d 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/occurrences.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/occurrences.dart
@@ -4,7 +4,7 @@
 
 library domains.analysis.occurrences;
 
-import 'package:analysis_server/analysis/occurrences_core.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analyzer/src/generated/engine.dart'
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 2ede6f1..adf253e 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/occurrences_dart.dart
@@ -4,7 +4,7 @@
 
 library domains.analysis.occurrences_dart;
 
-import 'package:analysis_server/analysis/occurrences_core.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
@@ -29,7 +29,7 @@
         visitor.elementsOffsets.forEach((engineElement, offsets) {
           int length = engineElement.nameLength;
           protocol.Element serverElement =
-              protocol.newElement_fromEngine(engineElement);
+              protocol.convertElement(engineElement);
           protocol.Occurrences occurrences =
               new protocol.Occurrences(serverElement, offsets, length);
           collector.addOccurrences(occurrences);
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index f6c298d..3931907 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
-import 'package:analysis_server/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/collections.dart';
 import 'package:analysis_server/src/constants.dart';
diff --git a/pkg/analysis_server/lib/src/get_handler.dart b/pkg/analysis_server/lib/src/get_handler.dart
index b527991..fbf70a1 100644
--- a/pkg/analysis_server/lib/src/get_handler.dart
+++ b/pkg/analysis_server/lib/src/get_handler.dart
@@ -10,13 +10,13 @@
 import 'dart:io';
 import 'dart:math';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_completion.dart';
 import 'package:analysis_server/src/domain_execution.dart';
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:analysis_server/src/operation/operation_analysis.dart';
 import 'package:analysis_server/src/operation/operation_queue.dart';
-import 'package:analysis_server/src/protocol.dart' hide Element;
 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';
diff --git a/pkg/analysis_server/lib/src/plugin/server_plugin.dart b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
index 4e227b4..5862b4a 100644
--- a/pkg/analysis_server/lib/src/plugin/server_plugin.dart
+++ b/pkg/analysis_server/lib/src/plugin/server_plugin.dart
@@ -4,18 +4,19 @@
 
 library analysis_server.src.plugin.server_plugin;
 
-import 'package:analysis_server/analysis/analysis_domain.dart';
-import 'package:analysis_server/analysis/index_core.dart';
-import 'package:analysis_server/analysis/navigation_core.dart';
-import 'package:analysis_server/analysis/occurrences_core.dart';
-import 'package:analysis_server/edit/assist/assist_core.dart';
-import 'package:analysis_server/edit/fix/fix_core.dart';
-import 'package:analysis_server/plugin/analyzed_files.dart';
-import 'package:analysis_server/plugin/assist.dart';
-import 'package:analysis_server/plugin/fix.dart';
-import 'package:analysis_server/plugin/index.dart';
-import 'package:analysis_server/plugin/navigation.dart';
-import 'package:analysis_server/plugin/occurrences.dart';
+import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
+import 'package:analysis_server/plugin/analysis/analyzed_files.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/index/index.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analysis_server/src/domain_completion.dart';
@@ -24,7 +25,6 @@
 import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart';
 import 'package:analysis_server/src/search/search_domain.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
deleted file mode 100644
index ef960f0..0000000
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ /dev/null
@@ -1,999 +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 protocol;
-
-import 'dart:collection';
-import 'dart:convert';
-
-part 'generated_protocol.dart';
-
-final Map<String, RefactoringKind> REQUEST_ID_REFACTORING_KINDS =
-    new HashMap<String, RefactoringKind>();
-
-/**
- * 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.forEach((key, value) {
-    if (keyCallback != null) {
-      key = keyCallback(key);
-    }
-    if (valueCallback != null) {
-      value = valueCallback(value);
-    }
-    result[key] = value;
-  });
-  return result;
-}
-
-/**
- * Adds the given [sourceEdits] to the list in [sourceFileEdit].
- */
-void _addAllEditsForSource(
-    SourceFileEdit sourceFileEdit, Iterable<SourceEdit> edits) {
-  edits.forEach(sourceFileEdit.add);
-}
-
-/**
- * Adds the given [sourceEdit] to the list in [sourceFileEdit].
- */
-void _addEditForSource(SourceFileEdit sourceFileEdit, SourceEdit sourceEdit) {
-  List<SourceEdit> edits = sourceFileEdit.edits;
-  int index = 0;
-  while (index < edits.length && edits[index].offset > sourceEdit.offset) {
-    index++;
-  }
-  edits.insert(index, sourceEdit);
-}
-
-/**
- * Adds [edit] to the [FileEdit] for the given [file].
- */
-void _addEditToSourceChange(
-    SourceChange change, String file, int fileStamp, SourceEdit edit) {
-  SourceFileEdit fileEdit = change.getFileEdit(file);
-  if (fileEdit == null) {
-    fileEdit = new SourceFileEdit(file, fileStamp);
-    change.addFileEdit(fileEdit);
-  }
-  fileEdit.add(edit);
-}
-
-/**
- * Get the result of applying the edit to the given [code].  Access via
- * SourceEdit.apply().
- */
-String _applyEdit(String code, SourceEdit edit) {
-  if (edit.length < 0) {
-    throw new RangeError('length is negative');
-  }
-  return code.replaceRange(edit.offset, edit.end, edit.replacement);
-}
-
-/**
- * Get the result of applying a set of [edits] to the given [code].  Edits
- * are applied in the order they appear in [edits].  Access via
- * SourceEdit.applySequence().
- */
-String _applySequence(String code, Iterable<SourceEdit> edits) {
-  edits.forEach((SourceEdit edit) {
-    code = edit.apply(code);
-  });
-  return code;
-}
-
-/**
- * Returns the [FileEdit] for the given [file], maybe `null`.
- */
-SourceFileEdit _getChangeFileEdit(SourceChange change, String file) {
-  for (SourceFileEdit fileEdit in change.edits) {
-    if (fileEdit.file == file) {
-      return fileEdit;
-    }
-  }
-  return null;
-}
-
-/**
- * Compare the lists [listA] and [listB], using [itemEqual] to compare
- * list elements.
- */
-bool _listEqual(List listA, List listB, bool itemEqual(a, b)) {
-  if (listA == null) {
-    return listB == null;
-  }
-  if (listB == null) {
-    return false;
-  }
-  if (listA.length != listB.length) {
-    return false;
-  }
-  for (int i = 0; i < listA.length; i++) {
-    if (!itemEqual(listA[i], listB[i])) {
-      return false;
-    }
-  }
-  return true;
-}
-
-/**
- * Compare the maps [mapA] and [mapB], using [valueEqual] to compare map
- * values.
- */
-bool _mapEqual(Map mapA, Map mapB, bool valueEqual(a, b)) {
-  if (mapA == null) {
-    return mapB == null;
-  }
-  if (mapB == null) {
-    return false;
-  }
-  if (mapA.length != mapB.length) {
-    return false;
-  }
-  for (var key in mapA.keys) {
-    if (!mapB.containsKey(key)) {
-      return false;
-    }
-    if (!valueEqual(mapA[key], mapB[key])) {
-      return false;
-    }
-  }
-  return true;
-}
-
-RefactoringProblemSeverity _maxRefactoringProblemSeverity(
-    RefactoringProblemSeverity a, RefactoringProblemSeverity b) {
-  if (b == null) {
-    return a;
-  }
-  if (a == null) {
-    return b;
-  } else if (a == RefactoringProblemSeverity.INFO) {
-    return b;
-  } else if (a == RefactoringProblemSeverity.WARNING) {
-    if (b == RefactoringProblemSeverity.ERROR ||
-        b == RefactoringProblemSeverity.FATAL) {
-      return b;
-    }
-  } else if (a == RefactoringProblemSeverity.ERROR) {
-    if (b == RefactoringProblemSeverity.FATAL) {
-      return b;
-    }
-  }
-  return a;
-}
-
-/**
- * Create a [RefactoringFeedback] corresponding the given [kind].
- */
-RefactoringFeedback _refactoringFeedbackFromJson(
-    JsonDecoder jsonDecoder, String jsonPath, Object json, Map feedbackJson) {
-  RefactoringKind kind = jsonDecoder.refactoringKind;
-  if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) {
-    return new ExtractLocalVariableFeedback.fromJson(
-        jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.EXTRACT_METHOD) {
-    return new ExtractMethodFeedback.fromJson(jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) {
-    return new InlineLocalVariableFeedback.fromJson(
-        jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.INLINE_METHOD) {
-    return new InlineMethodFeedback.fromJson(jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.RENAME) {
-    return new RenameFeedback.fromJson(jsonDecoder, jsonPath, json);
-  }
-  return null;
-}
-
-/**
- * Create a [RefactoringOptions] corresponding the given [kind].
- */
-RefactoringOptions _refactoringOptionsFromJson(JsonDecoder jsonDecoder,
-    String jsonPath, Object json, RefactoringKind kind) {
-  if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) {
-    return new ExtractLocalVariableOptions.fromJson(
-        jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.EXTRACT_METHOD) {
-    return new ExtractMethodOptions.fromJson(jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.INLINE_METHOD) {
-    return new InlineMethodOptions.fromJson(jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.MOVE_FILE) {
-    return new MoveFileOptions.fromJson(jsonDecoder, jsonPath, json);
-  }
-  if (kind == RefactoringKind.RENAME) {
-    return new RenameOptions.fromJson(jsonDecoder, jsonPath, json);
-  }
-  return null;
-}
-
-/**
- * Type of callbacks used to decode parts of JSON objects.  [jsonPath] is a
- * string describing the part of the JSON object being decoded, and [value] is
- * the part to decode.
- */
-typedef Object JsonDecoderCallback(String jsonPath, Object value);
-
-/**
- * Instances of the class [DomainHandler] implement a [RequestHandler] and
- * also startup and shutdown methods.
- */
-abstract class DomainHandler extends RequestHandler {
-  /**
-   * Perform any operations associated with the shutdown of the domain. It is
-   * not guaranteed that this method will be called. If it is, it will be
-   * called after the last [Request] has been made.
-   */
-  void shutdown() {}
-
-  /**
-   * Perform any operations associated with the startup of the domain. This
-   * will be called before the first [Request].
-   */
-  void startup() {}
-}
-
-/**
- * Classes implementing [Enum] represent enumerated types in the protocol.
- */
-abstract class Enum {
-  /**
-   * The name of the enumerated value.  This should match the name of the
-   * static getter which provides access to this enumerated value.
-   */
-  String get name;
-}
-
-/**
- * Instances of the class [HasToJson] implement [toJson] method that returns
- * a JSON presentation.
- */
-abstract class HasToJson {
-  /**
-   * Returns a JSON presentation of the object.
-   */
-  Map<String, Object> toJson();
-}
-
-/**
- * Base class for decoding JSON objects.  The derived class must implement
- * error reporting logic.
- */
-abstract class JsonDecoder {
-  /**
-   * Retrieve the RefactoringKind that should be assumed when decoding
-   * refactoring feedback objects, or null if no refactoring feedback object is
-   * expected to be encountered.
-   */
-  RefactoringKind get refactoringKind;
-
-  /**
-   * Create an exception to throw if the JSON object at [jsonPath] fails to
-   * match the API definition of [expected].
-   */
-  dynamic mismatch(String jsonPath, String expected, [Object actual]);
-
-  /**
-   * Create an exception to throw if the JSON object at [jsonPath] is missing
-   * the key [key].
-   */
-  dynamic missingKey(String jsonPath, String key);
-
-  /**
-   * Decode a JSON object that is expected to be a boolean.  The strings "true"
-   * and "false" are also accepted.
-   */
-  bool _decodeBool(String jsonPath, Object json) {
-    if (json is bool) {
-      return json;
-    } else if (json == 'true') {
-      return true;
-    } else if (json == 'false') {
-      return false;
-    }
-    throw mismatch(jsonPath, 'bool', json);
-  }
-
-  /**
-   * Decode a JSON object that is expected to be an integer.  A string
-   * representation of an integer is also accepted.
-   */
-  int _decodeInt(String jsonPath, Object json) {
-    if (json is int) {
-      return json;
-    } else if (json is String) {
-      return int.parse(json, onError: (String value) {
-        throw mismatch(jsonPath, 'int', json);
-      });
-    }
-    throw mismatch(jsonPath, 'int', json);
-  }
-
-  /**
-   * Decode a JSON object that is expected to be a List.  [decoder] is used to
-   * decode the items in the list.
-   */
-  List _decodeList(String jsonPath, Object json,
-      [JsonDecoderCallback decoder]) {
-    if (json == null) {
-      return [];
-    } else if (json is List) {
-      List result = [];
-      for (int i = 0; i < json.length; i++) {
-        result.add(decoder('$jsonPath[$i]', json[i]));
-      }
-      return result;
-    } else {
-      throw mismatch(jsonPath, 'List', json);
-    }
-  }
-
-  /**
-   * 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}) {
-    if (json == null) {
-      return {};
-    } else if (json is Map) {
-      Map result = {};
-      json.forEach((String key, value) {
-        Object decodedKey;
-        if (keyDecoder != null) {
-          decodedKey = keyDecoder('$jsonPath.key', key);
-        } else {
-          decodedKey = key;
-        }
-        if (valueDecoder != null) {
-          value = valueDecoder('$jsonPath[${JSON.encode(key)}]', value);
-        }
-        result[decodedKey] = value;
-      });
-      return result;
-    } else {
-      throw mismatch(jsonPath, 'Map', json);
-    }
-  }
-
-  /**
-   * Decode a JSON object that is expected to be a string.
-   */
-  String _decodeString(String jsonPath, Object json) {
-    if (json is String) {
-      return json;
-    } else {
-      throw mismatch(jsonPath, 'String', json);
-    }
-  }
-
-  /**
-   * Decode a JSON object that is expected to be one of several choices,
-   * where the choices are disambiguated by the contents of the field [field].
-   * [decoders] is a map from each possible string in the field to the decoder
-   * that should be used to decode the JSON object.
-   */
-  Object _decodeUnion(String jsonPath, Map json, String field,
-      Map<String, JsonDecoderCallback> decoders) {
-    if (json is Map) {
-      if (!json.containsKey(field)) {
-        throw missingKey(jsonPath, field);
-      }
-      var disambiguatorPath = '$jsonPath[${JSON.encode(field)}]';
-      String disambiguator = _decodeString(disambiguatorPath, json[field]);
-      if (!decoders.containsKey(disambiguator)) {
-        throw mismatch(
-            disambiguatorPath, 'One of: ${decoders.keys.toList()}', json);
-      }
-      return decoders[disambiguator](jsonPath, json);
-    } else {
-      throw mismatch(jsonPath, 'Map', json);
-    }
-  }
-}
-
-/**
- * Instances of the class [Notification] represent a notification from the
- * server about an event that occurred.
- */
-class Notification {
-  /**
-   * The name of the JSON attribute containing the name of the event that
-   * triggered the notification.
-   */
-  static const String EVENT = 'event';
-
-  /**
-   * The name of the JSON attribute containing the result values.
-   */
-  static const String PARAMS = 'params';
-
-  /**
-   * The name of the event that triggered the notification.
-   */
-  final String event;
-
-  /**
-   * A table mapping the names of notification parameters to their values, or
-   * null if there are no notification parameters.
-   */
-  Map<String, Object> _params;
-
-  /**
-   * Initialize a newly created [Notification] to have the given [event] name.
-   * If [_params] is provided, it will be used as the params; otherwise no
-   * params will be used.
-   */
-  Notification(this.event, [this._params]);
-
-  /**
-   * Initialize a newly created instance based upon the given JSON data
-   */
-  factory Notification.fromJson(Map<String, Object> json) {
-    return new Notification(
-        json[Notification.EVENT], json[Notification.PARAMS]);
-  }
-
-  /**
-   * Return a table representing the structure of the Json object that will be
-   * sent to the client to represent this response.
-   */
-  Map<String, Object> toJson() {
-    Map<String, Object> jsonObject = {};
-    jsonObject[EVENT] = event;
-    if (_params != null) {
-      jsonObject[PARAMS] = _params;
-    }
-    return jsonObject;
-  }
-}
-
-/**
- * Instances of the class [Request] represent a request that was received.
- */
-class Request {
-  /**
-   * The name of the JSON attribute containing the id of the request.
-   */
-  static const String ID = 'id';
-
-  /**
-   * The name of the JSON attribute containing the name of the request.
-   */
-  static const String METHOD = 'method';
-
-  /**
-   * The name of the JSON attribute containing the request parameters.
-   */
-  static const String PARAMS = 'params';
-
-  /**
-   * The name of the optional JSON attribute indicating the time
-   * (milliseconds since epoch) at which the client made the request.
-   */
-  static const String CLIENT_REQUEST_TIME = 'clientRequestTime';
-
-  /**
-   * The unique identifier used to identify this request.
-   */
-  final String id;
-
-  /**
-   * The method being requested.
-   */
-  final String method;
-
-  /**
-   * A table mapping the names of request parameters to their values.
-   */
-  final Map<String, Object> _params;
-
-  /**
-   * The time (milliseconds since epoch) at which the client made the request
-   * or `null` if this information is not provided by the client.
-   */
-  final int clientRequestTime;
-
-  /**
-   * Initialize a newly created [Request] to have the given [id] and [method]
-   * name.  If [params] is supplied, it is used as the "params" map for the
-   * request.  Otherwise an empty "params" map is allocated.
-   */
-  Request(this.id, this.method,
-      [Map<String, Object> params, this.clientRequestTime])
-      : _params = params != null ? params : new HashMap<String, Object>();
-
-  /**
-   * Return a request parsed from the given json, or `null` if the [data] is
-   * not a valid json representation of a request. The [data] is expected to
-   * have the following format:
-   *
-   *   {
-   *     'clientRequestTime': millisecondsSinceEpoch
-   *     'id': String,
-   *     'method': methodName,
-   *     'params': {
-   *       paramter_name: value
-   *     }
-   *   }
-   *
-   * where both the parameters and clientRequestTime are optional.
-   * The parameters can contain any number of name/value pairs.
-   * The clientRequestTime must be an int representing the time at which
-   * the client issued the request (milliseconds since epoch).
-   */
-  factory Request.fromJson(Map<String, dynamic> result) {
-    var id = result[Request.ID];
-    var method = result[Request.METHOD];
-    if (id is! String || method is! String) {
-      return null;
-    }
-    var time = result[Request.CLIENT_REQUEST_TIME];
-    if (time != null && time is! int) {
-      return null;
-    }
-    var params = result[Request.PARAMS];
-    if (params is Map || params == null) {
-      return new Request(id, method, params, time);
-    } else {
-      return null;
-    }
-  }
-
-  /**
-   * Return a request parsed from the given [data], or `null` if the [data] is
-   * not a valid json representation of a request. The [data] is expected to
-   * have the following format:
-   *
-   *   {
-   *     'clientRequestTime': millisecondsSinceEpoch
-   *     'id': String,
-   *     'method': methodName,
-   *     'params': {
-   *       paramter_name: value
-   *     }
-   *   }
-   *
-   * where both the parameters and clientRequestTime are optional.
-   * The parameters can contain any number of name/value pairs.
-   * The clientRequestTime must be an int representing the time at which
-   * the client issued the request (milliseconds since epoch).
-   */
-  factory Request.fromString(String data) {
-    try {
-      var result = JSON.decode(data);
-      if (result is Map) {
-        return new Request.fromJson(result);
-      }
-      return null;
-    } catch (exception) {
-      return null;
-    }
-  }
-
-  /**
-   * Return a table representing the structure of the Json object that will be
-   * sent to the client to represent this response.
-   */
-  Map<String, Object> toJson() {
-    Map<String, Object> jsonObject = new HashMap<String, Object>();
-    jsonObject[ID] = id;
-    jsonObject[METHOD] = method;
-    if (_params.isNotEmpty) {
-      jsonObject[PARAMS] = _params;
-    }
-    if (clientRequestTime != null) {
-      jsonObject[CLIENT_REQUEST_TIME] = clientRequestTime;
-    }
-    return jsonObject;
-  }
-}
-
-/**
- * JsonDecoder for decoding requests.  Errors are reporting by throwing a
- * [RequestFailure].
- */
-class RequestDecoder extends JsonDecoder {
-  /**
-   * The request being deserialized.
-   */
-  final Request _request;
-
-  RequestDecoder(this._request);
-
-  RefactoringKind get refactoringKind {
-    // Refactoring feedback objects should never appear in requests.
-    return null;
-  }
-
-  @override
-  dynamic mismatch(String jsonPath, String expected, [Object actual]) {
-    StringBuffer buffer = new StringBuffer();
-    buffer.write('Expected to be ');
-    buffer.write(expected);
-    if (actual != null) {
-      buffer.write('; found "');
-      buffer.write(JSON.encode(actual));
-      buffer.write('"');
-    }
-    return new RequestFailure(
-        new Response.invalidParameter(_request, jsonPath, buffer.toString()));
-  }
-
-  @override
-  dynamic missingKey(String jsonPath, String key) {
-    return new RequestFailure(new Response.invalidParameter(
-        _request, jsonPath, 'Expected to contain key ${JSON.encode(key)}'));
-  }
-}
-
-/**
- * Instances of the class [RequestFailure] represent an exception that occurred
- * during the handling of a request that requires that an error be returned to
- * the client.
- */
-class RequestFailure implements Exception {
-  /**
-   * The response to be returned as a result of the failure.
-   */
-  final Response response;
-
-  /**
-   * Initialize a newly created exception to return the given reponse.
-   */
-  RequestFailure(this.response);
-}
-
-/**
- * Instances of the class [RequestHandler] implement a handler that can handle
- * requests and produce responses for them.
- */
-abstract class RequestHandler {
-  /**
-   * Attempt to handle the given [request]. If the request is not recognized by
-   * this handler, return `null` so that other handlers will be given a chance
-   * to handle it. Otherwise, return the response that should be passed back to
-   * the client.
-   */
-  Response handleRequest(Request request);
-}
-
-/**
- * Instances of the class [Response] represent a response to a request.
- */
-class Response {
-  /**
-   * The [Response] instance that is returned when a real [Response] cannot
-   * be provided at the moment.
-   */
-  static final Response DELAYED_RESPONSE = new Response('DELAYED_RESPONSE');
-
-  /**
-   * The name of the JSON attribute containing the id of the request for which
-   * this is a response.
-   */
-  static const String ID = 'id';
-
-  /**
-   * The name of the JSON attribute containing the error message.
-   */
-  static const String ERROR = 'error';
-
-  /**
-   * The name of the JSON attribute containing the result values.
-   */
-  static const String RESULT = 'result';
-
-  /**
-   * The unique identifier used to identify the request that this response is
-   * associated with.
-   */
-  final String id;
-
-  /**
-   * The error that was caused by attempting to handle the request, or `null` if
-   * there was no error.
-   */
-  final RequestError error;
-
-  /**
-   * A table mapping the names of result fields to their values.  Should be
-   * null if there is no result to send.
-   */
-  Map<String, Object> _result;
-
-  /**
-   * Initialize a newly created instance to represent a response to a request
-   * with the given [id].  If [_result] is provided, it will be used as the
-   * result; otherwise an empty result will be used.  If an [error] is provided
-   * then the response will represent an error condition.
-   */
-  Response(this.id, {Map<String, Object> result, this.error})
-      : _result = result;
-
-  /**
-   * Initialize a newly created instance to represent the
-   * FILE_NOT_ANALYZED error condition.
-   */
-  Response.fileNotAnalyzed(Request request, String file)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.FILE_NOT_ANALYZED,
-                'File is not analyzed: $file.'));
-
-  /**
-   * Initialize a newly created instance to represent the FORMAT_INVALID_FILE
-   * error condition.
-   */
-  Response.formatInvalidFile(Request request)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.FORMAT_INVALID_FILE,
-                'Error during `edit.format`: invalid file.'));
-
-  /**
-   * Initialize a newly created instance to represent the FORMAT_WITH_ERROR
-   * error condition.
-   */
-  Response.formatWithErrors(Request request)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.FORMAT_WITH_ERRORS,
-                'Error during `edit.format`: source contains syntax errors.'));
-
-  /**
-   * Initialize a newly created instance based upon the given JSON data
-   */
-  factory Response.fromJson(Map<String, Object> json) {
-    try {
-      Object id = json[Response.ID];
-      if (id is! String) {
-        return null;
-      }
-      Object error = json[Response.ERROR];
-      RequestError decodedError;
-      if (error is Map) {
-        decodedError = new RequestError.fromJson(
-            new ResponseDecoder(null), '.error', error);
-      }
-      Object result = json[Response.RESULT];
-      Map<String, Object> decodedResult;
-      if (result is Map) {
-        decodedResult = result;
-      }
-      return new Response(id, error: decodedError, result: decodedResult);
-    } catch (exception) {
-      return null;
-    }
-  }
-
-  /**
-   * Initialize a newly created instance to represent the
-   * GET_ERRORS_INVALID_FILE error condition.
-   */
-  Response.getErrorsInvalidFile(Request request)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.GET_ERRORS_INVALID_FILE,
-                'Error during `analysis.getErrors`: invalid file.'));
-
-  /**
-   * Initialize a newly created instance to represent the
-   * GET_NAVIGATION_INVALID_FILE error condition.
-   */
-  Response.getNavigationInvalidFile(Request request)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.GET_NAVIGATION_INVALID_FILE,
-                'Error during `analysis.getNavigation`: invalid file.'));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by an analysis.reanalyze [request] that specifies an analysis root that is
-   * not in the current list of analysis roots.
-   */
-  Response.invalidAnalysisRoot(Request request, String rootPath)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT,
-                "Invalid analysis root: $rootPath"));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a [request] that specifies an execution context whose context root does
-   * not exist.
-   */
-  Response.invalidExecutionContext(Request request, String contextId)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.INVALID_EXECUTION_CONTEXT,
-                "Invalid execution context: $contextId"));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a [request] that had invalid parameter.  [path] is the path to the
-   * invalid parameter, in Javascript notation (e.g. "foo.bar" means that the
-   * parameter "foo" contained a key "bar" whose value was the wrong type).
-   * [expectation] is a description of the type of data that was expected.
-   */
-  Response.invalidParameter(Request request, String path, String expectation)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.INVALID_PARAMETER,
-                "Invalid parameter '$path'. $expectation."));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a malformed request.
-   */
-  Response.invalidRequestFormat()
-      : this('',
-            error: new RequestError(
-                RequestErrorCode.INVALID_REQUEST, 'Invalid request'));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a request that requires an index, but indexing is disabled.
-   */
-  Response.noIndexGenerated(Request request)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.NO_INDEX_GENERATED, 'Indexing is disabled'));
-
-  /**
-   * Initialize a newly created instance to represent the
-   * ORGANIZE_DIRECTIVES_ERROR error condition.
-   */
-  Response.organizeDirectivesError(Request request, String message)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.ORGANIZE_DIRECTIVES_ERROR, message));
-
-  /**
-   * Initialize a newly created instance to represent the
-   * REFACTORING_REQUEST_CANCELLED error condition.
-   */
-  Response.refactoringRequestCancelled(Request request)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.REFACTORING_REQUEST_CANCELLED,
-                'The `edit.getRefactoring` request was cancelled.'));
-
-  /**
-   * Initialize a newly created instance to represent the SERVER_ERROR error
-   * condition.
-   */
-  factory Response.serverError(Request request, exception, stackTrace) {
-    RequestError error =
-        new RequestError(RequestErrorCode.SERVER_ERROR, exception.toString());
-    if (stackTrace != null) {
-      error.stackTrace = stackTrace.toString();
-    }
-    return new Response(request.id, error: error);
-  }
-
-  /**
-   * Initialize a newly created instance to represent the
-   * SORT_MEMBERS_INVALID_FILE error condition.
-   */
-  Response.sortMembersInvalidFile(Request request)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.SORT_MEMBERS_INVALID_FILE,
-                'Error during `edit.sortMembers`: invalid file.'));
-
-  /**
-   * Initialize a newly created instance to represent the
-   * SORT_MEMBERS_PARSE_ERRORS error condition.
-   */
-  Response.sortMembersParseErrors(Request request, int numErrors)
-      : this(request.id,
-            error: new RequestError(RequestErrorCode.SORT_MEMBERS_PARSE_ERRORS,
-                'Error during `edit.sortMembers`: file has $numErrors scan/parse errors.'));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a `analysis.setPriorityFiles` [request] that includes one or more files
-   * that are not being analyzed.
-   */
-  Response.unanalyzedPriorityFiles(String requestId, String fileNames)
-      : this(requestId,
-            error: new RequestError(RequestErrorCode.UNANALYZED_PRIORITY_FILES,
-                "Unanalyzed files cannot be a priority: '$fileNames'"));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a [request] that cannot be handled by any known handlers.
-   */
-  Response.unknownRequest(Request request)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request'));
-
-  /**
-   * Initialize a newly created instance to represent an error condition caused
-   * by a [request] referencing a source that does not exist.
-   */
-  Response.unknownSource(Request request)
-      : this(request.id,
-            error: new RequestError(
-                RequestErrorCode.UNKNOWN_SOURCE, 'Unknown source'));
-
-  Response.unsupportedFeature(String requestId, String message)
-      : this(requestId,
-            error: new RequestError(
-                RequestErrorCode.UNSUPPORTED_FEATURE, message));
-
-  /**
-   * Return a table representing the structure of the Json object that will be
-   * sent to the client to represent this response.
-   */
-  Map<String, Object> toJson() {
-    Map<String, Object> jsonObject = new HashMap<String, Object>();
-    jsonObject[ID] = id;
-    if (error != null) {
-      jsonObject[ERROR] = error.toJson();
-    }
-    if (_result != null) {
-      jsonObject[RESULT] = _result;
-    }
-    return jsonObject;
-  }
-}
-
-/**
- * JsonDecoder for decoding responses from the server.  This is intended to be
- * used only for testing.  Errors are reported using bare [Exception] objects.
- */
-class ResponseDecoder extends JsonDecoder {
-  final RefactoringKind refactoringKind;
-
-  ResponseDecoder(this.refactoringKind);
-
-  @override
-  dynamic mismatch(String jsonPath, String expected, [Object actual]) {
-    StringBuffer buffer = new StringBuffer();
-    buffer.write('Expected ');
-    buffer.write(expected);
-    if (actual != null) {
-      buffer.write(' found "');
-      buffer.write(JSON.encode(actual));
-      buffer.write('"');
-    }
-    buffer.write(' at ');
-    buffer.write(jsonPath);
-    return new Exception(buffer.toString());
-  }
-
-  @override
-  dynamic missingKey(String jsonPath, String key) {
-    return new Exception('Missing key $key at $jsonPath');
-  }
-}
-
-/**
- * Jenkins hash function, optimized for small integers.  Borrowed from
- * sdk/lib/math/jenkins_smi_hash.dart.
- *
- * TODO(paulberry): Move to somewhere that can be shared with other code.
- */
-class _JenkinsSmiHash {
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  static int hash2(a, b) => finish(combine(combine(0, a), b));
-
-  static int hash4(a, b, c, d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
diff --git a/pkg/analysis_server/lib/src/protocol/protocol_internal.dart b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
new file mode 100644
index 0000000..256523a
--- /dev/null
+++ b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
@@ -0,0 +1,465 @@
+// 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 analysis_server.src.protocol.protocol_internal;
+
+import 'dart:collection';
+import 'dart:convert' hide JsonDecoder;
+
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+
+final Map<String, RefactoringKind> REQUEST_ID_REFACTORING_KINDS =
+    new HashMap<String, RefactoringKind>();
+
+/**
+ * Adds the given [sourceEdits] to the list in [sourceFileEdit].
+ */
+void addAllEditsForSource(
+    SourceFileEdit sourceFileEdit, Iterable<SourceEdit> edits) {
+  edits.forEach(sourceFileEdit.add);
+}
+
+/**
+ * Adds the given [sourceEdit] to the list in [sourceFileEdit].
+ */
+void addEditForSource(SourceFileEdit sourceFileEdit, SourceEdit sourceEdit) {
+  List<SourceEdit> edits = sourceFileEdit.edits;
+  int index = 0;
+  while (index < edits.length && edits[index].offset > sourceEdit.offset) {
+    index++;
+  }
+  edits.insert(index, sourceEdit);
+}
+
+/**
+ * Adds [edit] to the [FileEdit] for the given [file].
+ */
+void addEditToSourceChange(
+    SourceChange change, String file, int fileStamp, SourceEdit edit) {
+  SourceFileEdit fileEdit = change.getFileEdit(file);
+  if (fileEdit == null) {
+    fileEdit = new SourceFileEdit(file, fileStamp);
+    change.addFileEdit(fileEdit);
+  }
+  fileEdit.add(edit);
+}
+
+/**
+ * Get the result of applying the edit to the given [code].  Access via
+ * SourceEdit.apply().
+ */
+String applyEdit(String code, SourceEdit edit) {
+  if (edit.length < 0) {
+    throw new RangeError('length is negative');
+  }
+  return code.replaceRange(edit.offset, edit.end, edit.replacement);
+}
+
+/**
+ * Get the result of applying a set of [edits] to the given [code].  Edits
+ * are applied in the order they appear in [edits].  Access via
+ * SourceEdit.applySequence().
+ */
+String applySequenceOfEdits(String code, Iterable<SourceEdit> edits) {
+  edits.forEach((SourceEdit edit) {
+    code = edit.apply(code);
+  });
+  return code;
+}
+
+/**
+ * Returns the [FileEdit] for the given [file], maybe `null`.
+ */
+SourceFileEdit getChangeFileEdit(SourceChange change, String file) {
+  for (SourceFileEdit fileEdit in change.edits) {
+    if (fileEdit.file == file) {
+      return fileEdit;
+    }
+  }
+  return null;
+}
+
+/**
+ * Compare the lists [listA] and [listB], using [itemEqual] to compare
+ * list elements.
+ */
+bool listEqual(List listA, List listB, bool itemEqual(a, b)) {
+  if (listA == null) {
+    return listB == null;
+  }
+  if (listB == null) {
+    return false;
+  }
+  if (listA.length != listB.length) {
+    return false;
+  }
+  for (int i = 0; i < listA.length; i++) {
+    if (!itemEqual(listA[i], listB[i])) {
+      return false;
+    }
+  }
+  return true;
+}
+
+/**
+ * Compare the maps [mapA] and [mapB], using [valueEqual] to compare map
+ * values.
+ */
+bool mapEqual(Map mapA, Map mapB, bool valueEqual(a, b)) {
+  if (mapA == null) {
+    return mapB == null;
+  }
+  if (mapB == null) {
+    return false;
+  }
+  if (mapA.length != mapB.length) {
+    return false;
+  }
+  for (var key in mapA.keys) {
+    if (!mapB.containsKey(key)) {
+      return false;
+    }
+    if (!valueEqual(mapA[key], mapB[key])) {
+      return false;
+    }
+  }
+  return true;
+}
+
+/**
+ * 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.forEach((key, value) {
+    if (keyCallback != null) {
+      key = keyCallback(key);
+    }
+    if (valueCallback != null) {
+      value = valueCallback(value);
+    }
+    result[key] = value;
+  });
+  return result;
+}
+
+RefactoringProblemSeverity maxRefactoringProblemSeverity(
+    RefactoringProblemSeverity a, RefactoringProblemSeverity b) {
+  if (b == null) {
+    return a;
+  }
+  if (a == null) {
+    return b;
+  } else if (a == RefactoringProblemSeverity.INFO) {
+    return b;
+  } else if (a == RefactoringProblemSeverity.WARNING) {
+    if (b == RefactoringProblemSeverity.ERROR ||
+        b == RefactoringProblemSeverity.FATAL) {
+      return b;
+    }
+  } else if (a == RefactoringProblemSeverity.ERROR) {
+    if (b == RefactoringProblemSeverity.FATAL) {
+      return b;
+    }
+  }
+  return a;
+}
+
+/**
+ * Create a [RefactoringFeedback] corresponding the given [kind].
+ */
+RefactoringFeedback refactoringFeedbackFromJson(
+    JsonDecoder jsonDecoder, String jsonPath, Object json, Map feedbackJson) {
+  RefactoringKind kind = jsonDecoder.refactoringKind;
+  if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) {
+    return new ExtractLocalVariableFeedback.fromJson(
+        jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.EXTRACT_METHOD) {
+    return new ExtractMethodFeedback.fromJson(jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) {
+    return new InlineLocalVariableFeedback.fromJson(
+        jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.INLINE_METHOD) {
+    return new InlineMethodFeedback.fromJson(jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.RENAME) {
+    return new RenameFeedback.fromJson(jsonDecoder, jsonPath, json);
+  }
+  return null;
+}
+
+/**
+ * Create a [RefactoringOptions] corresponding the given [kind].
+ */
+RefactoringOptions refactoringOptionsFromJson(JsonDecoder jsonDecoder,
+    String jsonPath, Object json, RefactoringKind kind) {
+  if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) {
+    return new ExtractLocalVariableOptions.fromJson(
+        jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.EXTRACT_METHOD) {
+    return new ExtractMethodOptions.fromJson(jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.INLINE_METHOD) {
+    return new InlineMethodOptions.fromJson(jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.MOVE_FILE) {
+    return new MoveFileOptions.fromJson(jsonDecoder, jsonPath, json);
+  }
+  if (kind == RefactoringKind.RENAME) {
+    return new RenameOptions.fromJson(jsonDecoder, jsonPath, json);
+  }
+  return null;
+}
+
+/**
+ * Type of callbacks used to decode parts of JSON objects.  [jsonPath] is a
+ * string describing the part of the JSON object being decoded, and [value] is
+ * the part to decode.
+ */
+typedef Object JsonDecoderCallback(String jsonPath, Object value);
+
+/**
+ * Instances of the class [HasToJson] implement [toJson] method that returns
+ * a JSON presentation.
+ */
+abstract class HasToJson {
+  /**
+   * Returns a JSON presentation of the object.
+   */
+  Map<String, Object> toJson();
+}
+
+/**
+ * Jenkins hash function, optimized for small integers.  Borrowed from
+ * sdk/lib/math/jenkins_smi_hash.dart.
+ *
+ * TODO(paulberry): Move to somewhere that can be shared with other code.
+ */
+class JenkinsSmiHash {
+  static int combine(int hash, int value) {
+    hash = 0x1fffffff & (hash + value);
+    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
+    return hash ^ (hash >> 6);
+  }
+
+  static int finish(int hash) {
+    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
+    hash = hash ^ (hash >> 11);
+    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
+  }
+
+  static int hash2(a, b) => finish(combine(combine(0, a), b));
+
+  static int hash4(a, b, c, d) =>
+      finish(combine(combine(combine(combine(0, a), b), c), d));
+}
+
+/**
+ * Base class for decoding JSON objects.  The derived class must implement
+ * error reporting logic.
+ */
+abstract class JsonDecoder {
+  /**
+   * Retrieve the RefactoringKind that should be assumed when decoding
+   * refactoring feedback objects, or null if no refactoring feedback object is
+   * expected to be encountered.
+   */
+  RefactoringKind get refactoringKind;
+
+  /**
+   * Decode a JSON object that is expected to be a boolean.  The strings "true"
+   * and "false" are also accepted.
+   */
+  bool decodeBool(String jsonPath, Object json) {
+    if (json is bool) {
+      return json;
+    } else if (json == 'true') {
+      return true;
+    } else if (json == 'false') {
+      return false;
+    }
+    throw mismatch(jsonPath, 'bool', json);
+  }
+
+  /**
+   * Decode a JSON object that is expected to be an integer.  A string
+   * representation of an integer is also accepted.
+   */
+  int decodeInt(String jsonPath, Object json) {
+    if (json is int) {
+      return json;
+    } else if (json is String) {
+      return int.parse(json, onError: (String value) {
+        throw mismatch(jsonPath, 'int', json);
+      });
+    }
+    throw mismatch(jsonPath, 'int', json);
+  }
+
+  /**
+   * Decode a JSON object that is expected to be a List.  [decoder] is used to
+   * decode the items in the list.
+   */
+  List decodeList(String jsonPath, Object json, [JsonDecoderCallback decoder]) {
+    if (json == null) {
+      return [];
+    } else if (json is List) {
+      List result = [];
+      for (int i = 0; i < json.length; i++) {
+        result.add(decoder('$jsonPath[$i]', json[i]));
+      }
+      return result;
+    } else {
+      throw mismatch(jsonPath, 'List', json);
+    }
+  }
+
+  /**
+   * 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}) {
+    if (json == null) {
+      return {};
+    } else if (json is Map) {
+      Map result = {};
+      json.forEach((String key, value) {
+        Object decodedKey;
+        if (keyDecoder != null) {
+          decodedKey = keyDecoder('$jsonPath.key', key);
+        } else {
+          decodedKey = key;
+        }
+        if (valueDecoder != null) {
+          value = valueDecoder('$jsonPath[${JSON.encode(key)}]', value);
+        }
+        result[decodedKey] = value;
+      });
+      return result;
+    } else {
+      throw mismatch(jsonPath, 'Map', json);
+    }
+  }
+
+  /**
+   * Decode a JSON object that is expected to be a string.
+   */
+  String decodeString(String jsonPath, Object json) {
+    if (json is String) {
+      return json;
+    } else {
+      throw mismatch(jsonPath, 'String', json);
+    }
+  }
+
+  /**
+   * Decode a JSON object that is expected to be one of several choices,
+   * where the choices are disambiguated by the contents of the field [field].
+   * [decoders] is a map from each possible string in the field to the decoder
+   * that should be used to decode the JSON object.
+   */
+  Object decodeUnion(String jsonPath, Map json, String field,
+      Map<String, JsonDecoderCallback> decoders) {
+    if (json is Map) {
+      if (!json.containsKey(field)) {
+        throw missingKey(jsonPath, field);
+      }
+      var disambiguatorPath = '$jsonPath[${JSON.encode(field)}]';
+      String disambiguator = decodeString(disambiguatorPath, json[field]);
+      if (!decoders.containsKey(disambiguator)) {
+        throw mismatch(
+            disambiguatorPath, 'One of: ${decoders.keys.toList()}', json);
+      }
+      return decoders[disambiguator](jsonPath, json);
+    } else {
+      throw mismatch(jsonPath, 'Map', json);
+    }
+  }
+
+  /**
+   * Create an exception to throw if the JSON object at [jsonPath] fails to
+   * match the API definition of [expected].
+   */
+  dynamic mismatch(String jsonPath, String expected, [Object actual]);
+
+  /**
+   * Create an exception to throw if the JSON object at [jsonPath] is missing
+   * the key [key].
+   */
+  dynamic missingKey(String jsonPath, String key);
+}
+
+/**
+ * JsonDecoder for decoding requests.  Errors are reporting by throwing a
+ * [RequestFailure].
+ */
+class RequestDecoder extends JsonDecoder {
+  /**
+   * The request being deserialized.
+   */
+  final Request _request;
+
+  RequestDecoder(this._request);
+
+  RefactoringKind get refactoringKind {
+    // Refactoring feedback objects should never appear in requests.
+    return null;
+  }
+
+  @override
+  dynamic mismatch(String jsonPath, String expected, [Object actual]) {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('Expected to be ');
+    buffer.write(expected);
+    if (actual != null) {
+      buffer.write('; found "');
+      buffer.write(JSON.encode(actual));
+      buffer.write('"');
+    }
+    return new RequestFailure(
+        new Response.invalidParameter(_request, jsonPath, buffer.toString()));
+  }
+
+  @override
+  dynamic missingKey(String jsonPath, String key) {
+    return new RequestFailure(new Response.invalidParameter(
+        _request, jsonPath, 'Expected to contain key ${JSON.encode(key)}'));
+  }
+}
+
+/**
+ * JsonDecoder for decoding responses from the server.  This is intended to be
+ * used only for testing.  Errors are reported using bare [Exception] objects.
+ */
+class ResponseDecoder extends JsonDecoder {
+  final RefactoringKind refactoringKind;
+
+  ResponseDecoder(this.refactoringKind);
+
+  @override
+  dynamic mismatch(String jsonPath, String expected, [Object actual]) {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('Expected ');
+    buffer.write(expected);
+    if (actual != null) {
+      buffer.write(' found "');
+      buffer.write(JSON.encode(actual));
+      buffer.write('"');
+    }
+    buffer.write(' at ');
+    buffer.write(jsonPath);
+    return new Exception(buffer.toString());
+  }
+
+  @override
+  dynamic missingKey(String jsonPath, String key) {
+    return new Exception('Missing key $key at $jsonPath');
+  }
+}
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index 705b7aa..678361f 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -4,7 +4,8 @@
 
 library protocol.server;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol_dart.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart'
     as engine;
@@ -15,7 +16,8 @@
 import 'package:analyzer/src/generated/source.dart' as engine;
 import 'package:analyzer/src/generated/utilities_dart.dart' as engine;
 
-export 'package:analysis_server/src/protocol.dart';
+export 'package:analysis_server/plugin/protocol/protocol.dart';
+export 'package:analysis_server/plugin/protocol/protocol_dart.dart';
 
 /**
  * Returns a list of AnalysisErrors correponding to the given list of Engine
@@ -99,114 +101,6 @@
 }
 
 /**
- * Construct based on a value from the analyzer engine.
- */
-Element newElement_fromEngine(engine.Element element) {
-  String name = element.displayName;
-  String elementTypeParameters = _getTypeParametersString(element);
-  String elementParameters = _getParametersString(element);
-  String elementReturnType = getReturnTypeString(element);
-  ElementKind kind = newElementKind_fromEngineElement(element);
-  return new Element(
-      kind,
-      name,
-      Element.makeFlags(
-          isPrivate: element.isPrivate,
-          isDeprecated: element.isDeprecated,
-          isAbstract: _isAbstract(element),
-          isConst: _isConst(element),
-          isFinal: _isFinal(element),
-          isStatic: _isStatic(element)),
-      location: newLocation_fromElement(element),
-      typeParameters: elementTypeParameters,
-      parameters: elementParameters,
-      returnType: elementReturnType);
-}
-
-/**
- * Construct based on a value from the analyzer engine.
- * This does not take into account that
- * instances of ClassElement can be an enum and
- * instances of FieldElement can be an enum constant.
- * Use [newElementKind_fromEngineElement] where possible.
- */
-ElementKind newElementKind_fromEngine(engine.ElementKind kind) {
-  if (kind == engine.ElementKind.CLASS) {
-    return ElementKind.CLASS;
-  }
-  if (kind == engine.ElementKind.COMPILATION_UNIT) {
-    return ElementKind.COMPILATION_UNIT;
-  }
-  if (kind == engine.ElementKind.CONSTRUCTOR) {
-    return ElementKind.CONSTRUCTOR;
-  }
-  if (kind == engine.ElementKind.FIELD) {
-    return ElementKind.FIELD;
-  }
-  if (kind == engine.ElementKind.FUNCTION) {
-    return ElementKind.FUNCTION;
-  }
-  if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) {
-    return ElementKind.FUNCTION_TYPE_ALIAS;
-  }
-  if (kind == engine.ElementKind.GETTER) {
-    return ElementKind.GETTER;
-  }
-  if (kind == engine.ElementKind.LABEL) {
-    return ElementKind.LABEL;
-  }
-  if (kind == engine.ElementKind.LIBRARY) {
-    return ElementKind.LIBRARY;
-  }
-  if (kind == engine.ElementKind.LOCAL_VARIABLE) {
-    return ElementKind.LOCAL_VARIABLE;
-  }
-  if (kind == engine.ElementKind.METHOD) {
-    return ElementKind.METHOD;
-  }
-  if (kind == engine.ElementKind.PARAMETER) {
-    return ElementKind.PARAMETER;
-  }
-  if (kind == engine.ElementKind.PREFIX) {
-    return ElementKind.PREFIX;
-  }
-  if (kind == engine.ElementKind.SETTER) {
-    return ElementKind.SETTER;
-  }
-  if (kind == engine.ElementKind.TOP_LEVEL_VARIABLE) {
-    return ElementKind.TOP_LEVEL_VARIABLE;
-  }
-  if (kind == engine.ElementKind.TYPE_PARAMETER) {
-    return ElementKind.TYPE_PARAMETER;
-  }
-  return ElementKind.UNKNOWN;
-}
-
-/**
- * Construct based on a value from the analyzer engine.
- */
-ElementKind newElementKind_fromEngineElement(engine.Element element) {
-  if (element is engine.ClassElement && element.isEnum) {
-    return ElementKind.ENUM;
-  }
-  if (element is engine.FieldElement &&
-      element.isEnumConstant &&
-      // MyEnum.values and MyEnum.one.index return isEnumConstant = true
-      // so these additional checks are necessary.
-      // TODO(danrubel) MyEnum.values is constant, but is a list
-      // so should it return isEnumConstant = true?
-      // MyEnum.one.index is final but *not* constant
-      // so should it return isEnumConstant = true?
-      // Or should we return ElementKind.ENUM_CONSTANT here
-      // in either or both of these cases?
-      element.type != null &&
-      element.type.element == element.enclosingElement) {
-    return ElementKind.ENUM_CONSTANT;
-  }
-  return newElementKind_fromEngine(element.kind);
-}
-
-/**
  * Create a Location based on an [engine.Element].
  */
 Location newLocation_fromElement(engine.Element element) {
@@ -262,7 +156,7 @@
  * Construct based on an element from the analyzer engine.
  */
 OverriddenMember newOverriddenMember_fromEngine(engine.Element member) {
-  Element element = newElement_fromEngine(member);
+  Element element = convertElement(member);
   String className = member.enclosingElement.displayName;
   return new OverriddenMember(element, className);
 }
@@ -313,7 +207,7 @@
 List<Element> _computePath(engine.Element element) {
   List<Element> path = <Element>[];
   while (element != null) {
-    path.add(newElement_fromEngine(element));
+    path.add(convertElement(element));
     // go up
     if (element is engine.PrefixElement) {
       // imports are library children, but they are physically in the unit
@@ -326,101 +220,6 @@
   return path;
 }
 
-String _getParametersString(engine.Element element) {
-  // TODO(scheglov) expose the corresponding feature from ExecutableElement
-  List<engine.ParameterElement> parameters;
-  if (element is engine.ExecutableElement) {
-    // valid getters don't have parameters
-    if (element.kind == engine.ElementKind.GETTER &&
-        element.parameters.isEmpty) {
-      return null;
-    }
-    parameters = element.parameters;
-  } else if (element is engine.FunctionTypeAliasElement) {
-    parameters = element.parameters;
-  } else {
-    return null;
-  }
-  StringBuffer sb = new StringBuffer();
-  String closeOptionalString = '';
-  for (engine.ParameterElement parameter in parameters) {
-    if (sb.isNotEmpty) {
-      sb.write(', ');
-    }
-    if (closeOptionalString.isEmpty) {
-      engine.ParameterKind kind = parameter.parameterKind;
-      if (kind == engine.ParameterKind.NAMED) {
-        sb.write('{');
-        closeOptionalString = '}';
-      }
-      if (kind == engine.ParameterKind.POSITIONAL) {
-        sb.write('[');
-        closeOptionalString = ']';
-      }
-    }
-    parameter.appendToWithoutDelimiters(sb);
-  }
-  sb.write(closeOptionalString);
-  return '(' + sb.toString() + ')';
-}
-
-String _getTypeParametersString(engine.Element element) {
-  List<engine.TypeParameterElement> typeParameters;
-  if (element is engine.ClassElement) {
-    typeParameters = element.typeParameters;
-  } else if (element is engine.FunctionTypeAliasElement) {
-    typeParameters = element.typeParameters;
-  }
-  if (typeParameters == null || typeParameters.isEmpty) {
-    return null;
-  }
-  return '<${typeParameters.join(', ')}>';
-}
-
-bool _isAbstract(engine.Element element) {
-  // TODO(scheglov) add isAbstract to Element API
-  if (element is engine.ClassElement) {
-    return element.isAbstract;
-  }
-  if (element is engine.MethodElement) {
-    return element.isAbstract;
-  }
-  if (element is engine.PropertyAccessorElement) {
-    return element.isAbstract;
-  }
-  return false;
-}
-
-bool _isConst(engine.Element element) {
-  // TODO(scheglov) add isConst to Element API
-  if (element is engine.ConstructorElement) {
-    return element.isConst;
-  }
-  if (element is engine.VariableElement) {
-    return element.isConst;
-  }
-  return false;
-}
-
-bool _isFinal(engine.Element element) {
-  // TODO(scheglov) add isFinal to Element API
-  if (element is engine.VariableElement) {
-    return element.isFinal;
-  }
-  return false;
-}
-
-bool _isStatic(engine.Element element) {
-  // TODO(scheglov) add isStatic to Element API
-  if (element is engine.ExecutableElement) {
-    return element.isStatic;
-  }
-  if (element is engine.PropertyInducingElement) {
-    return element.isStatic;
-  }
-  return false;
-}
-
 /**
  * Creates a new [Location].
  */
diff --git a/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart b/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
index f38d541..d9c101b 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
@@ -4,7 +4,7 @@
 
 library analysis_server.src.provisional.completion.completion_core;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/src/provisional/completion/completion_dart.dart b/pkg/analysis_server/lib/src/provisional/completion/completion_dart.dart
index 488f30d..1ca4180 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/completion_dart.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/completion_dart.dart
@@ -4,7 +4,7 @@
 
 library analysis_server.src.provisional.completion.completion_dart;
 
-import 'package:analysis_server/src/protocol.dart';
+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/src/generated/ast.dart';
diff --git a/pkg/analysis_server/lib/src/provisional/refactoring/refactoring_core.dart b/pkg/analysis_server/lib/src/provisional/refactoring/refactoring_core.dart
index f1c9f94..d27095c 100644
--- a/pkg/analysis_server/lib/src/provisional/refactoring/refactoring_core.dart
+++ b/pkg/analysis_server/lib/src/provisional/refactoring/refactoring_core.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index 668077b..804602a 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -75,7 +75,7 @@
     var result = new protocol.SearchFindElementReferencesResult();
     if (elements.isNotEmpty) {
       result.id = searchId;
-      result.element = protocol.newElement_fromEngine(elements[0]);
+      result.element = protocol.convertElement(elements[0]);
     }
     _sendSearchResult(request, result);
   }
diff --git a/pkg/analysis_server/lib/src/search/type_hierarchy.dart b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
index e9c3772..695693c 100644
--- a/pkg/analysis_server/lib/src/search/type_hierarchy.dart
+++ b/pkg/analysis_server/lib/src/search/type_hierarchy.dart
@@ -8,7 +8,7 @@
 import 'dart:collection';
 
 import 'package:analysis_server/src/protocol_server.dart'
-    show TypeHierarchyItem, newElement_fromEngine;
+    show TypeHierarchyItem, convertElement;
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/src/generated/element.dart';
@@ -90,9 +90,9 @@
         }
         // create a subclass item
         ExecutableElement subMemberElement = _findMemberElement(subElement);
-        subItem = new TypeHierarchyItem(newElement_fromEngine(subElement),
+        subItem = new TypeHierarchyItem(convertElement(subElement),
             memberElement: subMemberElement != null
-                ? newElement_fromEngine(subMemberElement)
+                ? convertElement(subMemberElement)
                 : null,
             superclass: itemId);
         int subItemId = _items.length;
@@ -129,11 +129,10 @@
       }
       ClassElement classElement = type.element;
       ExecutableElement memberElement = _findMemberElement(classElement);
-      item = new TypeHierarchyItem(newElement_fromEngine(classElement),
+      item = new TypeHierarchyItem(convertElement(classElement),
           displayName: displayName,
-          memberElement: memberElement != null
-              ? newElement_fromEngine(memberElement)
-              : null);
+          memberElement:
+              memberElement != null ? convertElement(memberElement) : null);
       _elementItemMap[classElement] = item;
       itemId = _items.length;
       _items.add(item);
@@ -193,6 +192,9 @@
           result = mixinElement.lookUpSetter(_pivotName, _pivotLibrary);
         }
       }
+      if (result == _pivotElement) {
+        return null;
+      }
       if (result != null) {
         return result;
       }
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 883f50c4e..1862b9f 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -8,13 +8,13 @@
 import 'dart:io';
 import 'dart:math';
 
+import 'package:analysis_server/plugin/analysis/resolver_provider.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analysis_server/src/server/http_server.dart';
 import 'package:analysis_server/src/server/stdio_server.dart';
 import 'package:analysis_server/src/socket_server.dart';
 import 'package:analysis_server/starter.dart';
-import 'package:analysis_server/uri/resolver_provider.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/file_instrumentation.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/sdk_io.dart';
 import 'package:args/args.dart';
+import 'package:linter/src/plugin/linter_plugin.dart';
 import 'package:plugin/manager.dart';
 import 'package:plugin/plugin.dart';
 
@@ -401,11 +402,15 @@
     //
     ServerPlugin serverPlugin = new ServerPlugin();
     List<Plugin> plugins = <Plugin>[];
-    plugins.add(AnalysisEngine.instance.enginePlugin);
     plugins.add(serverPlugin);
     plugins.addAll(_userDefinedPlugins);
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
+    plugins.add(linterPlugin);
+
+    // Defer to the extension manager in AE for plugin registration.
+    AnalysisEngine.instance.userDefinedPlugins = plugins;
+    // Force registration.
+    AnalysisEngine.instance.taskManager;
+
     //
     // Create the sockets and start listening for requests.
     //
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
index 178d76c..2ba4340 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_manager.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
     show CompletionRequest, CompletionResult;
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
diff --git a/pkg/analysis_server/lib/src/services/completion/contribution_sorter.dart b/pkg/analysis_server/lib/src/services/completion/contribution_sorter.dart
index 3a5217b..3d9dd87 100644
--- a/pkg/analysis_server/lib/src/services/completion/contribution_sorter.dart
+++ b/pkg/analysis_server/lib/src/services/completion/contribution_sorter.dart
@@ -4,7 +4,7 @@
 
 library services.completion.sorter;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_dart.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
index 7aa6704..2fbe91e 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart
@@ -271,7 +271,7 @@
           false);
       LibraryElement lib = importElem.importedLibrary;
       if (lib != null) {
-        suggestion.element = newElement_fromEngine(lib);
+        suggestion.element = convertElement(lib);
       }
       libraryPrefixSuggestions.add(suggestion);
       _importedCompletions.add(suggestion.completion);
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 2f19c64..161197d 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
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
     show CompletionRequest;
 import 'package:analysis_server/src/provisional/completion/completion_dart.dart'
diff --git a/pkg/analysis_server/lib/src/services/completion/inherited_contributor.dart b/pkg/analysis_server/lib/src/services/completion/inherited_contributor.dart
index 410eb81..451da53 100644
--- a/pkg/analysis_server/lib/src/services/completion/inherited_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/inherited_contributor.dart
@@ -4,6 +4,7 @@
 
 library services.completion.computer.dart.invocation;
 
+import 'package:analysis_server/plugin/edit/utilities/change_builder_dart.dart';
 import 'package:analysis_server/src/protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind, SourceChange;
 import 'package:analysis_server/src/protocol_server.dart' as protocol
@@ -11,7 +12,6 @@
 import 'package:analysis_server/src/provisional/completion/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart'
     show DART_RELEVANCE_HIGH;
-import 'package:analysis_server/utilities/change_builder_dart.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -78,7 +78,7 @@
         0,
         element.isDeprecated,
         false);
-    suggestion.element = protocol.newElement_fromEngine(element);
+    suggestion.element = protocol.convertElement(element);
     return suggestion;
   }
 
diff --git a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
index fe9ef14..c9d0c6f 100644
--- a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
@@ -7,7 +7,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
index 181f259..e65fbc8 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
@@ -6,9 +6,10 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart' as protocol
+import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
     show Element, ElementKind;
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/local_declaration_visitor.dart';
 import 'package:analysis_server/src/services/completion/local_suggestion_builder.dart';
diff --git a/pkg/analysis_server/lib/src/services/completion/local_suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/local_suggestion_builder.dart
index 74d5c95..4981136 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_suggestion_builder.dart
@@ -4,9 +4,10 @@
 
 library services.completion.suggestion.builder.local;
 
-import 'package:analysis_server/src/protocol.dart' as protocol
+import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
     show Element, ElementKind;
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
index 5a9f6c6..b8a5c20 100644
--- a/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
@@ -46,7 +46,7 @@
       0,
       isDeprecated,
       false);
-  suggestion.element = protocol.newElement_fromEngine(element);
+  suggestion.element = protocol.convertElement(element);
   Element enclosingElement = element.enclosingElement;
   if (enclosingElement is ClassElement) {
     suggestion.declaringType = enclosingElement.displayName;
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 6cc4739..45ad25f 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -4,7 +4,7 @@
 
 library services.correction.assist;
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
+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';
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 7b6f75a..e287c45 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -6,8 +6,8 @@
 
 import 'dart:collection';
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
-import 'package:analysis_server/edit/assist/assist_dart.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
 import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/name_suggestion.dart';
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index d00a24f..3fe6567 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -4,7 +4,7 @@
 
 library analysis_server.src.services.correction.fix;
 
-import 'package:analysis_server/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -109,6 +109,7 @@
       "Add optional positional parameter");
   static const ADD_MISSING_PARAMETER_REQUIRED = const FixKind(
       'ADD_MISSING_PARAMETER_REQUIRED', 30, "Add required parameter");
+  static const ADD_NE_NULL = const FixKind('ADD_NE_NULL', 50, "Add != null");
   static const ADD_PACKAGE_DEPENDENCY = const FixKind(
       'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'");
   static const ADD_PART_OF =
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 ba774a9..b97fb61 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -7,9 +7,9 @@
 import 'dart:collection';
 import 'dart:core' hide Resource;
 
-import 'package:analysis_server/edit/fix/fix_core.dart';
-import 'package:analysis_server/edit/fix/fix_dart.dart';
-import 'package:analysis_server/src/protocol.dart'
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart'
     hide AnalysisError, Element, ElementKind;
 import 'package:analysis_server/src/protocol_server.dart'
     show doSourceChange_addElementEdit, doSourceChange_addSourceEdit;
@@ -271,6 +271,9 @@
     if (errorCode == StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION) {
       _addFix_removeParentheses_inGetterInvocation();
     }
+    if (errorCode == StaticTypeWarningCode.NON_BOOL_CONDITION) {
+      _addFix_nonBoolCondition_addNotNull();
+    }
     if (errorCode == StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT) {
       _addFix_importLibrary_withType();
       _addFix_createClass();
@@ -1518,6 +1521,11 @@
     _addFix(DartFixKind.MAKE_CLASS_ABSTRACT, [className]);
   }
 
+  void _addFix_nonBoolCondition_addNotNull() {
+    _addInsertEdit(error.offset + error.length, ' != null');
+    _addFix(DartFixKind.ADD_NE_NULL, []);
+  }
+
   void _addFix_removeDeadCode() {
     AstNode coveringNode = this.coveredNode;
     if (coveringNode is Expression) {
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 c9e4ef6..5234405 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -11,46 +11,6 @@
 List<String> _KNOWN_METHOD_NAME_PREFIXES = ['get', 'is', 'to'];
 
 /**
- * Returns a list of words for the given camel case string.
- *
- * 'getCamelWords' => ['get', 'Camel', 'Words']
- * 'getHTMLText' => ['get', 'HTML', 'Text']
- */
-List<String> getCamelWords(String str) {
-  if (str == null || str.isEmpty) {
-    return <String>[];
-  }
-  List<String> parts = <String>[];
-  bool wasLowerCase = false;
-  bool wasUpperCase = false;
-  int wordStart = 0;
-  for (int i = 0; i < str.length; i++) {
-    int c = str.codeUnitAt(i);
-    var newLowerCase = isLowerCase(c);
-    var newUpperCase = isUpperCase(c);
-    // myWord
-    // | ^
-    if (wasLowerCase && newUpperCase) {
-      parts.add(str.substring(wordStart, i));
-      wordStart = i;
-    }
-    // myHTMLText
-    //   |   ^
-    if (wasUpperCase &&
-        newUpperCase &&
-        i + 1 < str.length &&
-        isLowerCase(str.codeUnitAt(i + 1))) {
-      parts.add(str.substring(wordStart, i));
-      wordStart = i;
-    }
-    wasLowerCase = newLowerCase;
-    wasUpperCase = newUpperCase;
-  }
-  parts.add(str.substring(wordStart));
-  return parts;
-}
-
-/**
  * Returns possible names for a variable with the given expected type and
  * expression assigned.
  */
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 c7ea89e..a4adfac 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
@@ -4,7 +4,8 @@
 
 library services.src.refactoring.organize_directives;
 
-import 'package:analysis_server/src/protocol.dart' hide AnalysisError, Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide AnalysisError, Element;
 import 'package:analysis_server/src/services/correction/strings.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/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index c27de98..1810cda 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -4,7 +4,7 @@
 
 library services.src.refactoring.sort_members;
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/services/correction/strings.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
index 56eac5b..d56aa3d 100644
--- a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
@@ -4,7 +4,7 @@
 
 library services.src.correction.source_buffer;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/correction/status.dart b/pkg/analysis_server/lib/src/services/correction/status.dart
index df37d12..9fbc1af 100644
--- a/pkg/analysis_server/lib/src/services/correction/status.dart
+++ b/pkg/analysis_server/lib/src/services/correction/status.dart
@@ -4,7 +4,7 @@
 
 library services.status;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 
 /**
  * An outcome of a condition checking operation.
diff --git a/pkg/analysis_server/lib/src/services/correction/strings.dart b/pkg/analysis_server/lib/src/services/correction/strings.dart
index 3c44fb6..c2ea6cb 100644
--- a/pkg/analysis_server/lib/src/services/correction/strings.dart
+++ b/pkg/analysis_server/lib/src/services/correction/strings.dart
@@ -119,6 +119,46 @@
 }
 
 /**
+ * Returns a list of words for the given camel case string.
+ *
+ * 'getCamelWords' => ['get', 'Camel', 'Words']
+ * 'getHTMLText' => ['get', 'HTML', 'Text']
+ */
+List<String> getCamelWords(String str) {
+  if (str == null || str.isEmpty) {
+    return <String>[];
+  }
+  List<String> parts = <String>[];
+  bool wasLowerCase = false;
+  bool wasUpperCase = false;
+  int wordStart = 0;
+  for (int i = 0; i < str.length; i++) {
+    int c = str.codeUnitAt(i);
+    var newLowerCase = isLowerCase(c);
+    var newUpperCase = isUpperCase(c);
+    // myWord
+    // | ^
+    if (wasLowerCase && newUpperCase) {
+      parts.add(str.substring(wordStart, i));
+      wordStart = i;
+    }
+    // myHTMLText
+    //   |   ^
+    if (wasUpperCase &&
+        newUpperCase &&
+        i + 1 < str.length &&
+        isLowerCase(str.codeUnitAt(i + 1))) {
+      parts.add(str.substring(wordStart, i));
+      wordStart = i;
+    }
+    wasLowerCase = newLowerCase;
+    wasUpperCase = newUpperCase;
+  }
+  parts.add(str.substring(wordStart));
+  return parts;
+}
+
+/**
  * Checks if [str] is `null`, empty or is whitespace.
  */
 bool isBlank(String str) {
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index b4f9938..a74488f 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -6,7 +6,7 @@
 
 import 'dart:math';
 
-import 'package:analysis_server/src/protocol.dart'
+import 'package:analysis_server/plugin/protocol/protocol.dart'
     show SourceChange, SourceEdit;
 import 'package:analysis_server/src/protocol_server.dart'
     show doSourceChange_addElementEdit;
diff --git a/pkg/analysis_server/lib/src/services/index/index.dart b/pkg/analysis_server/lib/src/services/index/index.dart
index 5767b4c..645303a 100644
--- a/pkg/analysis_server/lib/src/services/index/index.dart
+++ b/pkg/analysis_server/lib/src/services/index/index.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analysis_server/src/services/index/indexable_element.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
diff --git a/pkg/analysis_server/lib/src/services/index/index_contributor.dart b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
index 44ce967..34aec15 100644
--- a/pkg/analysis_server/lib/src/services/index/index_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/index/index_contributor.dart
@@ -6,7 +6,7 @@
 
 import 'dart:collection' show Queue;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
@@ -361,6 +361,9 @@
         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);
diff --git a/pkg/analysis_server/lib/src/services/index/index_store.dart b/pkg/analysis_server/lib/src/services/index/index_store.dart
index 3f27f53..574a727 100644
--- a/pkg/analysis_server/lib/src/services/index/index_store.dart
+++ b/pkg/analysis_server/lib/src/services/index/index_store.dart
@@ -4,7 +4,7 @@
 
 library services.index_store;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
diff --git a/pkg/analysis_server/lib/src/services/index/indexable_element.dart b/pkg/analysis_server/lib/src/services/index/indexable_element.dart
index a2d3d64..594645b 100644
--- a/pkg/analysis_server/lib/src/services/index/indexable_element.dart
+++ b/pkg/analysis_server/lib/src/services/index/indexable_element.dart
@@ -6,7 +6,7 @@
 
 import 'dart:collection';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/src/services/index/local_index.dart b/pkg/analysis_server/lib/src/services/index/local_index.dart
index 3feae11..624d3ff 100644
--- a/pkg/analysis_server/lib/src/services/index/local_index.dart
+++ b/pkg/analysis_server/lib/src/services/index/local_index.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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/src/generated/element.dart';
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
index 0aab0c3..484085f 100644
--- a/pkg/analysis_server/lib/src/services/index/local_memory_index.dart
+++ b/pkg/analysis_server/lib/src/services/index/local_memory_index.dart
@@ -4,7 +4,7 @@
 
 library services.index.memory_file_index;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
diff --git a/pkg/analysis_server/lib/src/services/index/store/codec.dart b/pkg/analysis_server/lib/src/services/index/store/codec.dart
index c865aa4..86e0723 100644
--- a/pkg/analysis_server/lib/src/services/index/store/codec.dart
+++ b/pkg/analysis_server/lib/src/services/index/store/codec.dart
@@ -6,7 +6,7 @@
 
 import 'dart:collection';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
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
index 57b1734..eed774f 100644
--- a/pkg/analysis_server/lib/src/services/index/store/split_store.dart
+++ b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
@@ -8,19 +8,19 @@
 import 'dart:collection';
 import 'dart:typed_data';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/index/index_core.dart';
 import 'package:analysis_server/src/analysis_server.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/src/generated/ast.dart' show CompilationUnit;
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
-import 'package:analyzer/src/generated/ast.dart' show CompilationUnit;
 
 /**
  * The implementation of [IndexObjectManager] for indexing
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
index f589fe9..a4d3c6b 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart'
+import 'package:analysis_server/plugin/protocol/protocol.dart'
     show RefactoringMethodParameter, SourceChange;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/convert_getter_to_method.dart';
@@ -356,6 +356,9 @@
    * type.
    */
   factory RenameRefactoring(SearchEngine searchEngine, Element element) {
+    if (element == null) {
+      return null;
+    }
     if (element is PropertyAccessorElement) {
       element = (element as PropertyAccessorElement).variable;
     }
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 4d70e06..00fa3b9 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
@@ -170,6 +170,29 @@
     await _prepareReferences();
     Set<ClassElement> subClasses =
         await getSubClasses(searchEngine, elementClass);
+    // check shadowing of class names
+    if (element != null) {
+      for (Element element in elements) {
+        ClassElement clazz = element.enclosingElement;
+        if (clazz.name == name) {
+          result.addError(
+              format(
+                  "Renamed {0} has the same name as the declaring class '{1}'.",
+                  elementKind.displayName,
+                  name),
+              newLocation_fromElement(element));
+        }
+      }
+    } else {
+      if (elementClass.name == name) {
+        result.addError(
+            format(
+                "Created {0} has the same name as the declaring class '{1}'.",
+                elementKind.displayName,
+                name),
+            newLocation_fromElement(elementClass));
+      }
+    }
     // check shadowing in hierarchy
     List<SearchMatch> declarations =
         await searchEngine.searchElementDeclarations(name);
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 56b6c74..54b6948 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,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+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';
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 edcbc84..cfe43eb 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
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
diff --git a/pkg/analysis_server/lib/src/socket_server.dart b/pkg/analysis_server/lib/src/socket_server.dart
index 7ec0a69..f3e1c5c 100644
--- a/pkg/analysis_server/lib/src/socket_server.dart
+++ b/pkg/analysis_server/lib/src/socket_server.dart
@@ -4,13 +4,13 @@
 
 library socket.server;
 
+import 'package:analysis_server/plugin/analysis/resolver_provider.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analysis_server/src/services/index/local_file_index.dart';
-import 'package:analysis_server/uri/resolver_provider.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/source/pub_package_map_provider.dart';
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index c85db7b..3822636 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -10,13 +10,13 @@
 import 'dart:io';
 import 'dart:math';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_completion.dart';
 import 'package:analysis_server/src/domain_execution.dart';
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:analysis_server/src/operation/operation_analysis.dart';
 import 'package:analysis_server/src/operation/operation_queue.dart';
-import 'package:analysis_server/src/protocol.dart' hide Element;
 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';
@@ -30,6 +30,7 @@
 import 'package:analyzer/src/generated/engine.dart'
     hide AnalysisCache, AnalysisContextImpl, AnalysisTask;
 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_collection.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
@@ -270,6 +271,14 @@
     if (unit != null) {
       return unit;
     }
+    unit = entry.getValue(RESOLVED_UNIT9);
+    if (unit != null) {
+      return unit;
+    }
+    unit = entry.getValue(RESOLVED_UNIT10);
+    if (unit != null) {
+      return unit;
+    }
     return entry.getValue(RESOLVED_UNIT);
   }
 
@@ -324,12 +333,10 @@
       results.add(COMPILATION_UNIT_ELEMENT);
       results.add(HINTS);
       results.add(LINTS);
-      results.add(INFER_STATIC_VARIABLE_TYPES_ERRORS);
       results.add(INFERABLE_STATIC_VARIABLES_IN_UNIT);
       results.add(LIBRARY_UNIT_ERRORS);
-      results.add(PARTIALLY_RESOLVE_REFERENCES_ERRORS);
-      results.add(RESOLVE_FUNCTION_BODIES_ERRORS);
       results.add(RESOLVE_TYPE_NAMES_ERRORS);
+      results.add(RESOLVE_UNIT_ERRORS);
       results.add(RESOLVED_UNIT1);
       results.add(RESOLVED_UNIT2);
       results.add(RESOLVED_UNIT3);
@@ -338,7 +345,10 @@
       results.add(RESOLVED_UNIT6);
       results.add(RESOLVED_UNIT7);
       results.add(RESOLVED_UNIT8);
+      results.add(RESOLVED_UNIT9);
+      results.add(RESOLVED_UNIT10);
       results.add(RESOLVED_UNIT);
+      results.add(STRONG_MODE_ERRORS);
       results.add(USED_IMPORTED_ELEMENTS);
       results.add(USED_LOCAL_ELEMENTS);
       results.add(VARIABLE_REFERENCE_ERRORS);
@@ -347,7 +357,6 @@
       results.add(CONSTANT_DEPENDENCIES);
       results.add(CONSTANT_VALUE);
       if (target is VariableElement) {
-        results.add(INFER_STATIC_VARIABLE_ERRORS);
         results.add(INFERABLE_STATIC_VARIABLE_DEPENDENCIES);
         results.add(INFERRED_STATIC_VARIABLE);
       }
@@ -581,22 +590,27 @@
           buffer.write('<p>Not found.</p>');
           return;
         }
-        CacheEntry entry = context.analysisCache.get(source);
-        if (entry == null) {
-          buffer.write('<p>Not found.</p>');
-          return;
-        }
-        CompilationUnit ast = _getAnyAst(entry);
-        if (ast == null) {
-          buffer.write('<p>null</p>');
-          return;
-        }
-        AstWriter writer = new AstWriter(buffer);
-        ast.accept(writer);
-        if (writer.exceptions.isNotEmpty) {
-          buffer.write('<h3>Exceptions while creating page</h3>');
-          for (CaughtException exception in writer.exceptions) {
-            _writeException(buffer, exception);
+        List<Source> libraries = context.getLibrariesContaining(source);
+        for (Source library in libraries) {
+          AnalysisTarget target = new LibrarySpecificUnit(library, source);
+          CacheEntry entry = context.analysisCache.get(target);
+          buffer.write('<b>$target</b><br>');
+          if (entry == null) {
+            buffer.write('<p>Not found.</p>');
+            continue;
+          }
+          CompilationUnit ast = _getAnyAst(entry);
+          if (ast == null) {
+            buffer.write('<p>null</p>');
+            continue;
+          }
+          AstWriter writer = new AstWriter(buffer);
+          ast.accept(writer);
+          if (writer.exceptions.isNotEmpty) {
+            buffer.write('<h3>Exceptions while creating page</h3>');
+            for (CaughtException exception in writer.exceptions) {
+              _writeException(buffer, exception);
+            }
           }
         }
       });
@@ -712,30 +726,36 @@
           buffer.write('<h3>');
           buffer.write(HTML_ESCAPE.convert(entry.target.toString()));
           buffer.write('</h3>');
-          buffer.write('<dl>');
-          buffer.write('<dt>time</dt><dd>');
+          buffer.write('<p>time</p><blockquote><p>Value</p><blockquote>');
           buffer.write(entry.modificationTime);
-          buffer.write('</dd>');
+          buffer.write('</blockquote></blockquote>');
           for (ResultDescriptor result in results) {
+            ResultData data = entry.getResultData(result);
             CacheState state = entry.getState(result);
             String descriptorName = HTML_ESCAPE.convert(result.toString());
             String descriptorState = HTML_ESCAPE.convert(state.toString());
-            buffer.write('<dt>$descriptorName ($descriptorState)</dt><dd>');
+            buffer
+                .write('<p>$descriptorName ($descriptorState)</p><blockquote>');
             if (state == CacheState.VALID) {
+              buffer.write('<p>Value</p><blockquote>');
               try {
-                _writeValueAsHtml(buffer, entry.getValue(result), linkParameters);
+                _writeValueAsHtml(
+                    buffer, entry.getValue(result), linkParameters);
               } catch (exception) {
                 buffer.write('(${HTML_ESCAPE.convert(exception.toString())})');
               }
+              buffer.write('</blockquote>');
             }
-            buffer.write('</dd>');
+            _writeTargetedResults(buffer, 'Depends on', data.dependedOnResults);
+            _writeTargetedResults(
+                buffer, 'Depended on by', data.dependentResults);
+            buffer.write('</blockquote>');
           }
           if (entry.exception != null) {
             buffer.write('<dt>exception</dt><dd>');
             _writeException(buffer, entry.exception);
             buffer.write('</dd>');
           }
-          buffer.write('</dl>');
         }
       });
     });
@@ -1462,6 +1482,24 @@
     }
   }
 
+  void _writeListOfStrings(
+      StringBuffer buffer, String listName, Iterable<String> items) {
+    List<String> itemList = items.toList();
+    itemList.sort((String a, String b) {
+      a = a.toLowerCase();
+      b = b.toLowerCase();
+      return a.compareTo(b);
+    });
+    buffer.write('List "listName" containing ${itemList.length} entries:');
+    buffer.write('<ul>');
+    for (String member in itemList) {
+      buffer.write('<li>');
+      buffer.write(member);
+      buffer.write('</li>');
+    }
+    buffer.write('</ul>');
+  }
+
   /**
    * Write a representation of an analysis option with the given [name] and
    * [value] to the given [buffer]. The option should be separated from other
@@ -1753,6 +1791,39 @@
   }
 
   /**
+   * Write the targeted results returned by iterating over the [results] to the
+   * given [buffer]. The list will have the given [title] written before it.
+   */
+  void _writeTargetedResults(
+      StringBuffer buffer, String title, Iterable<TargetedResult> results) {
+    List<TargetedResult> sortedResults = results.toList();
+    sortedResults.sort((TargetedResult first, TargetedResult second) {
+      int nameOrder =
+          first.result.toString().compareTo(second.result.toString());
+      if (nameOrder != 0) {
+        return nameOrder;
+      }
+      return first.target.toString().compareTo(second.target.toString());
+    });
+
+    buffer.write('<p>');
+    buffer.write(title);
+    buffer.write('</p><blockquote>');
+    if (results.isEmpty) {
+      buffer.write('nothing');
+    } else {
+      for (TargetedResult result in sortedResults) {
+        buffer.write('<p>');
+        buffer.write(result.result.toString());
+        buffer.write(' of ');
+        buffer.write(result.target.toString());
+        buffer.write('<p>');
+      }
+    }
+    buffer.write('</blockquote>');
+  }
+
+  /**
    * Write two columns of information to the given [buffer], where the
    * [leftColumn] and [rightColumn] functions are used to generate the content
    * of those columns.
@@ -1795,6 +1866,22 @@
       String link =
           makeLink(ELEMENT_PATH, linkParameters, value.runtimeType.toString());
       buffer.write('<i>$link</i>');
+    } else if (value is UsedLocalElements) {
+      buffer.write('<ul>');
+      {
+        HashSet<Element> elements = value.elements;
+        buffer.write('List "elements" containing ${elements.length} entries');
+        buffer.write('<ul>');
+        for (Element element in elements) {
+          buffer.write('<li>');
+          buffer.write('<i>${element.runtimeType}</i>  $element');
+          buffer.write('</li>');
+        }
+        buffer.write('</ul>');
+      }
+      _writeListOfStrings(buffer, 'members', value.members);
+      _writeListOfStrings(buffer, 'readMembers', value.readMembers);
+      buffer.write('</ul>');
     } else {
       buffer.write(HTML_ESCAPE.convert(value.toString()));
       buffer.write(' <i>(${value.runtimeType.toString()})</i>');
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 9f0225b..a5fe204 100644
--- a/pkg/analysis_server/lib/src/utilities/change_builder_core.dart
+++ b/pkg/analysis_server/lib/src/utilities/change_builder_core.dart
@@ -4,8 +4,8 @@
 
 library analysis_server.src.utilities.change_builder_core;
 
-import 'package:analysis_server/src/protocol.dart';
-import 'package:analysis_server/utilities/change_builder_core.dart';
+import 'package:analysis_server/plugin/edit/utilities/change_builder_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
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 14a2efc..f40dd36 100644
--- a/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart
+++ b/pkg/analysis_server/lib/src/utilities/change_builder_dart.dart
@@ -4,12 +4,12 @@
 
 library analysis_server.src.utilities.change_builder_dart;
 
-import 'package:analysis_server/src/protocol.dart' hide ElementKind;
+import 'package:analysis_server/plugin/edit/utilities/change_builder_core.dart';
+import 'package:analysis_server/plugin/edit/utilities/change_builder_dart.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide ElementKind;
 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:analysis_server/utilities/change_builder_core.dart';
-import 'package:analysis_server/utilities/change_builder_dart.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:analyzer/src/generated/engine.dart';
diff --git a/pkg/analysis_server/lib/starter.dart b/pkg/analysis_server/lib/starter.dart
index dc0b6ad..a403a94 100644
--- a/pkg/analysis_server/lib/starter.dart
+++ b/pkg/analysis_server/lib/starter.dart
@@ -4,8 +4,8 @@
 
 library driver;
 
+import 'package:analysis_server/plugin/analysis/resolver_provider.dart';
 import 'package:analysis_server/src/server/driver.dart';
-import 'package:analysis_server/uri/resolver_provider.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:plugin/plugin.dart';
 
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 95fcbe5..2500327 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -6,9 +6,10 @@
 environment:
   sdk: '>=1.9.0 <2.0.0'
 dependencies:
-  analyzer: '>=0.26.1+7 <0.27.0'
+  analyzer: '>=0.26.1+9 <0.27.0'
   args: '>=0.13.0 <0.14.0'
   dart_style: '>=0.2.0 <0.3.0'
+  linter: ^0.1.3+2
   logging: any
   path: any
   plugin: <0.2.0
diff --git a/pkg/analysis_server/test/analysis/get_errors_test.dart b/pkg/analysis_server/test/analysis/get_errors_test.dart
index ee73e43..65a524a4 100644
--- a/pkg/analysis_server/test/analysis/get_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/get_errors_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index 61520dc..34db510 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart
index a87a588..34a8010 100644
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart
@@ -4,8 +4,8 @@
 
 library test.analysis.get_navigation;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
index 7e330a6..13c5073 100644
--- a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index aa841e3..7cc7099 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -4,10 +4,12 @@
 
 library test.analysis.notification_errors;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/services/lint.dart';
+import 'package:linter/src/linter.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
@@ -23,6 +25,9 @@
 class NotificationErrorsTest extends AbstractAnalysisTest {
   Map<String, List<AnalysisError>> filesErrors = {};
 
+  /// Cached model state in case tests need to set task model to on/off.
+  bool wasTaskModelEnabled;
+
   void processNotification(Notification notification) {
     if (notification.event == ANALYSIS_ERRORS) {
       var decoded = new AnalysisErrorsParams.fromNotification(notification);
@@ -34,6 +39,13 @@
   void setUp() {
     super.setUp();
     server.handlers = [new AnalysisDomainHandler(server),];
+    wasTaskModelEnabled = AnalysisEngine.instance.useTaskModel;
+  }
+
+  @override
+  void tearDown() {
+    AnalysisEngine.instance.useTaskModel = wasTaskModelEnabled;
+    super.tearDown();
   }
 
   test_importError() {
@@ -54,6 +66,46 @@
     });
   }
 
+  test_lintError() {
+    // Requires task model.
+    AnalysisEngine.instance.useTaskModel = true;
+
+    var camelCaseTypesLintName = 'camel_case_types';
+
+    addFile(
+        '$projectPath/.analysis_options',
+        '''
+linter:
+  rules:
+    - $camelCaseTypesLintName
+''');
+
+    addTestFile('class a { }');
+
+    Request request =
+        new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
+    handleSuccessfulRequest(request);
+
+    return waitForTasksFinished().then((_) {
+      // Confirm lint is registered.
+      expect(lintRegistry, isNotEmpty);
+      AnalysisContext testContext = server.getContainingContext(testFile);
+      List<Linter> lints = lintRegistry[testContext];
+      // Registry should only contain single lint rule.
+      expect(lints, hasLength(1));
+      LintRule lint = lints.first as LintRule;
+      expect(lint.name, camelCaseTypesLintName);
+      // Verify lint error result.
+      List<AnalysisError> errors = filesErrors[testFile];
+      expect(errors, hasLength(1));
+      AnalysisError error = errors[0];
+      expect(error.location.file, '/project/bin/test.dart');
+      expect(error.severity, AnalysisErrorSeverity.INFO);
+      expect(error.type, AnalysisErrorType.LINT);
+      expect(error.message, lint.description);
+    });
+  }
+
   test_notInAnalysisRoot() {
     createProject();
     String otherFile = '/other.dart';
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test.dart b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
index 0f1535e..a44d798 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
index 5f3b79b..28eda94 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_implemented_test.dart b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
index fc72b72..5c1c6ed 100644
--- a/pkg/analysis_server/test/analysis/notification_implemented_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.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';
@@ -321,7 +321,7 @@
         return new Future.value();
       }
       return new Future.delayed(
-          new Duration(milliseconds:1), () => waitForNotification(times - 1));
+          new Duration(milliseconds: 1), () => waitForNotification(times - 1));
     }
     return waitForNotification(30000);
   }
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 6ef6b57..4accf97 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
index fbcc017..cc7ebab 100644
--- a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_outline_test.dart b/pkg/analysis_server/test/analysis/notification_outline_test.dart
index 4840a2e..679baae 100644
--- a/pkg/analysis_server/test/analysis/notification_outline_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_outline_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/notification_overrides_test.dart b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
index bd0343f..fa1a0b5 100644
--- a/pkg/analysis_server/test/analysis/notification_overrides_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/reanalyze_test.dart b/pkg/analysis_server/test/analysis/reanalyze_test.dart
index 9354f74..310e6d7 100644
--- a/pkg/analysis_server/test/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/analysis/reanalyze_test.dart
@@ -4,8 +4,8 @@
 
 library test.analysis.reanalyze;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/analysis/set_priority_files_test.dart b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
index bb52a5e..8626ef8 100644
--- a/pkg/analysis_server/test/analysis/set_priority_files_test.dart
+++ b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
@@ -4,8 +4,8 @@
 
 library test.analysis.set_priority_files;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 5dbdaa5..656e06a 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -4,9 +4,9 @@
 
 library test.analysis.updateContent;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/ast.dart';
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 88567a1..91a2ed9 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -6,15 +6,17 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:linter/src/plugin/linter_plugin.dart';
 import 'package:plugin/manager.dart';
 import 'package:plugin/plugin.dart';
 import 'package:unittest/unittest.dart';
@@ -94,7 +96,11 @@
 
   AnalysisServer createAnalysisServer(Index index) {
     ServerPlugin serverPlugin = new ServerPlugin();
-    List<Plugin> plugins = <Plugin>[serverPlugin];
+    // TODO(pq): this convoluted extension registry dance needs cleanup.
+    List<Plugin> plugins = <Plugin>[serverPlugin, linterPlugin];
+    // Accessing `taskManager` ensures that AE plugins are registered.
+    AnalysisEngine.instance.taskManager;
+    plugins.addAll(AnalysisEngine.instance.supportedPlugins);
     addServerPlugins(plugins);
     // process plugins
     ExtensionManager manager = new ExtensionManager();
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 0be6177..9f75123 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -6,13 +6,13 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/context_manager.dart';
 import 'package:analysis_server/src/domain_server.dart';
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
diff --git a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
index 776b6d2..d1887be 100644
--- a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
+++ b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
@@ -8,8 +8,8 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/channel/byte_stream_channel.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:unittest/unittest.dart';
 
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 8dcaca9..a9d42ed 100644
--- a/pkg/analysis_server/test/channel/web_socket_channel_test.dart
+++ b/pkg/analysis_server/test/channel/web_socket_channel_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/channel/web_socket_channel.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/completion_test_support.dart b/pkg/analysis_server/test/completion_test_support.dart
index 800a6f2..0f00d1e 100644
--- a/pkg/analysis_server/test/completion_test_support.dart
+++ b/pkg/analysis_server/test/completion_test_support.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:collection';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 2742fcf..dc41509 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -15,6 +15,7 @@
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:package_config/packages.dart';
 import 'package:path/path.dart';
+import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
@@ -90,6 +91,10 @@
     manager.callbacks = callbacks;
     resourceProvider.newFolder(projPath);
     ContextManagerImpl.ENABLE_PACKAGESPEC_SUPPORT = true;
+
+    // Options processing is required in context creation.
+    ExtensionManager em = new ExtensionManager();
+    em.processPlugins([AnalysisEngine.instance.optionsPlugin]);
   }
 
   void tearDown() {
@@ -364,9 +369,6 @@
     expect(contexts[1].name, equals('/my/proj/lib'));
   }
 
-  // TODO(paulberry): This test only tests PackagesFileDisposition.
-  // Once http://dartbug.com/23909 is fixed, add a test for sdk extensions
-  // and PackageMapDisposition.
   test_refresh_folder_with_packagespec() {
     // create a context with a .packages file
     String packagespecFile = posix.join(projPath, '.packages');
@@ -383,6 +385,9 @@
     });
   }
 
+  // TODO(paulberry): This test only tests PackagesFileDisposition.
+  // Once http://dartbug.com/23909 is fixed, add a test for sdk extensions
+  // and PackageMapDisposition.
   test_refresh_folder_with_packagespec_subfolders() {
     // Create a folder with no .packages file, containing two subfolders with
     // .packages files.
@@ -1102,6 +1107,25 @@
     callbacks.assertContextFiles(project, [fileA]);
   }
 
+  test_strong_mode_analysis_option() async {
+    // Create files.
+    newFile(
+        [projPath, '.analysis_options'],
+        r'''
+analyzer:
+  strong-mode: true
+''');
+    String libPath = newFolder([projPath, LIB_NAME]);
+    newFile([libPath, 'main.dart']);
+    // Setup context.
+    manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+    // Verify that analysis options was parsed and strong-mode set.
+    Map<String, int> fileTimestamps =
+        callbacks.currentContextFilePaths[projPath];
+    expect(fileTimestamps, isNotEmpty);
+    expect(callbacks.currentContext.analysisOptions.strongMode, true);
+  }
+
   test_watch_addDummyLink() {
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     // empty folder initially
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index afcff2d..640d2fd 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -6,11 +6,11 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:path/path.dart';
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index c1ccc99..b296508 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -6,6 +6,7 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/constants.dart';
@@ -13,7 +14,6 @@
 import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analysis_server/src/domain_completion.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
     show CompletionRequest, CompletionResult;
 import 'package:analysis_server/src/provisional/completion/completion_dart.dart'
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index 41ae718..927d46d 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -6,12 +6,12 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/context_manager.dart';
 import 'package:analysis_server/src/domain_execution.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart
index a6d8bb3..51237cd 100644
--- a/pkg/analysis_server/test/domain_server_test.dart
+++ b/pkg/analysis_server/test/domain_server_test.dart
@@ -4,11 +4,11 @@
 
 library test.domain.server;
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_server.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:plugin/manager.dart';
diff --git a/pkg/analysis_server/test/edit/assists_test.dart b/pkg/analysis_server/test/edit/assists_test.dart
index 505212c..b6572c4 100644
--- a/pkg/analysis_server/test/edit/assists_test.dart
+++ b/pkg/analysis_server/test/edit/assists_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index c558b16..531bf43 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -6,9 +6,9 @@
 
 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:analysis_server/src/protocol.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
index b3a192b..e04ccf1 100644
--- a/pkg/analysis_server/test/edit/format_test.dart
+++ b/pkg/analysis_server/test/edit/format_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
diff --git a/pkg/analysis_server/test/edit/organize_directives_test.dart b/pkg/analysis_server/test/edit/organize_directives_test.dart
index 821e4a4..5223627 100644
--- a/pkg/analysis_server/test/edit/organize_directives_test.dart
+++ b/pkg/analysis_server/test/edit/organize_directives_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
index 8ffc387..0cc4971 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.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';
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index 0d43184..8bae43f 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:plugin/manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide ERROR;
diff --git a/pkg/analysis_server/test/integration/analysis/error_test.dart b/pkg/analysis_server/test/integration/analysis/error_test.dart
index 806958f..cd490fa 100644
--- a/pkg/analysis_server/test/integration/analysis/error_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/error_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.error;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
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 af43a3c..b42cd9e 100644
--- a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:path/path.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test.dart b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
index 884c232..7605ea3 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.highlights;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
index bc999c0..54dd3ef 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/lint_test.dart b/pkg/analysis_server/test/integration/analysis/lint_test.dart
new file mode 100644
index 0000000..e75120c
--- /dev/null
+++ b/pkg/analysis_server/test/integration/analysis/lint_test.dart
@@ -0,0 +1,65 @@
+// 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.integration.analysis.lint;
+
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../utils.dart';
+import '../integration_tests.dart';
+
+main() {
+  initializeTestEnvironment();
+  defineReflectiveTests(LintIntegrationTest);
+}
+
+@reflectiveTest
+class LintIntegrationTest extends AbstractAnalysisServerIntegrationTest {
+  test_no_lints_when_not_specified() async {
+    String source = sourcePath('test.dart');
+    writeFile(
+        source,
+        '''
+class abc { // lint: not CamelCase (should get ignored though)
+}''');
+    standardAnalysisSetup();
+
+    await analysisFinished;
+    expect(currentAnalysisErrors[source], isList);
+    // Should be empty without .analysis_options.
+    List<AnalysisError> errors = currentAnalysisErrors[source];
+    expect(errors, hasLength(0));
+  }
+
+  test_simple_lint() async {
+    writeFile(
+        sourcePath('.analysis_options'),
+        '''
+linter:
+  rules:
+    - camel_case_types
+''');
+
+    String source = sourcePath('test.dart');
+    writeFile(
+        source,
+        '''
+class a { // lint: not CamelCase
+}''');
+
+    standardAnalysisSetup();
+
+    await analysisFinished;
+
+    expect(currentAnalysisErrors[source], isList);
+    List<AnalysisError> errors = currentAnalysisErrors[source];
+    expect(errors, hasLength(1));
+    AnalysisError error = errors[0];
+    expect(error.location.file, source);
+    expect(error.severity, AnalysisErrorSeverity.INFO);
+    expect(error.type, AnalysisErrorType.LINT);
+  }
+}
diff --git a/pkg/analysis_server/test/integration/analysis/navigation_test.dart b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
index 57c04ce..35dd9e2 100644
--- a/pkg/analysis_server/test/integration/analysis/navigation_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.navigation;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
index a1d25d0..1bcb270 100644
--- a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.occurrences;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/outline_test.dart b/pkg/analysis_server/test/integration/analysis/outline_test.dart
index a4a7a81..7d7d853 100644
--- a/pkg/analysis_server/test/integration/analysis/outline_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/outline_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.outline;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/overrides_test.dart b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
index a302eef..e7b77dc 100644
--- a/pkg/analysis_server/test/integration/analysis/overrides_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.overrides;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/package_root_test.dart b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
index 84f3fe6..7ce03d2 100644
--- a/pkg/analysis_server/test/integration/analysis/package_root_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.packageRoot;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:path/path.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
index f23101f..df1250b 100644
--- a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.reanalyze;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/analysis/test_all.dart b/pkg/analysis_server/test/integration/analysis/test_all.dart
index 54fdd0a..eca1a87 100644
--- a/pkg/analysis_server/test/integration/analysis/test_all.dart
+++ b/pkg/analysis_server/test/integration/analysis/test_all.dart
@@ -14,6 +14,7 @@
 import 'get_hover_test.dart' as get_hover_test;
 import 'highlights_test.dart' as highlights_test;
 import 'highlights_test2.dart' as highlights_test2;
+import 'lint_test.dart' as lint_test;
 import 'navigation_test.dart' as navigation_test;
 import 'occurrences_test.dart' as occurrences_test;
 import 'outline_test.dart' as outline_test;
@@ -36,6 +37,7 @@
     get_hover_test.main();
     highlights_test.main();
     highlights_test2.main();
+    lint_test.main();
     navigation_test.main();
     occurrences_test.main();
     outline_test.main();
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
index a0568be..3eb72ff 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.update.content.list;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
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 9936693..6ea46cf 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.analysis.update.content;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/asynchrony_test.dart b/pkg/analysis_server/test/integration/asynchrony_test.dart
deleted file mode 100644
index 4f3f5cf..0000000
--- a/pkg/analysis_server/test/integration/asynchrony_test.dart
+++ /dev/null
@@ -1,79 +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.integration.analysis.error;
-
-import 'dart:async';
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
-
-import '../utils.dart';
-import 'integration_tests.dart';
-
-main() {
-  initializeTestEnvironment();
-//  defineReflectiveTests(AsynchronyIntegrationTest);
-}
-
-/**
- * Verify that the server's input and output streams are asynchronous by
- * attempting to flood its input buffer with commands without listening to
- * its output buffer for responses.  The server should continue to train its
- * input buffer even though its output buffer is full.
- *
- * Once enough commands have been sent, we begin reading from the server's
- * output buffer, and verify that it responds to the last command.
- *
- * NB.
- *
- * This test was intentionally disabled, because after r43123 server
- * writes to stdout synchronously. So, now it is the client's responsibility
- * to read stdout in a timely manner to avoid blocking the server.
- */
-@reflectiveTest
-class AsynchronyIntegrationTest {
-  /**
-   * Number of messages to queue up before listening for responses.
-   */
-  static const MESSAGE_COUNT = 10000;
-
-  /**
-   * Connection to the analysis server.
-   */
-  final Server server = new Server();
-
-  Future setUp() {
-    return server.start();
-  }
-
-  test_asynchrony() {
-    // Send MESSAGE_COUNT messages to the server without listening for
-    // responses.
-    Future lastMessageResult;
-    for (int i = 0; i < MESSAGE_COUNT; i++) {
-      lastMessageResult = server.send('server.getVersion', null);
-    }
-
-    // Flush the server's standard input stream to verify that it has really
-    // received them all.  If the server is blocked waiting for us to read
-    // its responses, the flush will never complete.
-    return server.flushCommands().then((_) {
-      // Begin processing responses from the server.
-      server.listenToOutput((String event, params) {
-        // The only expected notification is server.connected.
-        if (event != 'server.connected') {
-          fail('Unexpected notification: $event');
-        }
-      });
-
-      // Terminate the test when the response to the last message is received.
-      return lastMessageResult.then((_) {
-        server.send("server.shutdown", null).then((_) {
-          return server.exitCode;
-        });
-      });
-    });
-  }
-}
diff --git a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
index bf0f4d2..a318ea2 100644
--- a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
+++ b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
@@ -4,7 +4,7 @@
 
 library test.integration.completion.get.suggestions;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/integration_test_methods.dart b/pkg/analysis_server/test/integration/integration_test_methods.dart
index 8ab5dca..18c3357 100644
--- a/pkg/analysis_server/test/integration/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/integration_test_methods.dart
@@ -13,7 +13,8 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:unittest/unittest.dart';
 
 import 'integration_tests.dart';
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index 6e7273e..5004f86 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -9,14 +9,14 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/src/server/driver.dart' as analysisServer;
 import 'package:path/path.dart';
 import 'package:unittest/unittest.dart';
 
 import 'integration_test_methods.dart';
 import 'protocol_matchers.dart';
-import 'package:analysis_server/src/server/driver.dart' as analysisServer;
 
 const Matcher isBool = const isInstanceOf<bool>('bool');
 
@@ -28,11 +28,11 @@
 
 const Matcher isObject = isMap;
 
+const Matcher isString = const isInstanceOf<String>('String');
+
 final Matcher isResponse = new MatchesJsonObject('response', {'id': isString},
     optionalFields: {'result': anything, 'error': isRequestError});
 
-const Matcher isString = const isInstanceOf<String>('String');
-
 Matcher isListOf(Matcher elementMatcher) => new _ListOf(elementMatcher);
 
 Matcher isMapOf(Matcher keyMatcher, Matcher valueMatcher) =>
@@ -165,6 +165,21 @@
   }
 
   /**
+   * If [skipShutdown] is not set, shut down the server.
+   */
+  Future shutdownIfNeeded() {
+    if (skipShutdown) {
+      return new Future.value();
+    }
+    // Give the server a short time to comply with the shutdown request; if it
+    // doesn't exit, then forcibly terminate it.
+    sendServerShutdown();
+    return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
+      return server.kill();
+    });
+  }
+
+  /**
    * Convert the given [relativePath] to an absolute path, by interpreting it
    * relative to [sourceDirectory].  On Windows any forward slashes in
    * [relativePath] are converted to backslashes.
@@ -218,21 +233,6 @@
     file.writeAsStringSync(contents);
     return file.resolveSymbolicLinksSync();
   }
-
-  /**
-   * If [skipShutdown] is not set, shut down the server.
-   */
-  Future shutdownIfNeeded() {
-    if (skipShutdown) {
-      return new Future.value();
-    }
-    // Give the server a short time to comply with the shutdown request; if it
-    // doesn't exit, then forcibly terminate it.
-    sendServerShutdown();
-    return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
-      return server.kill();
-    });
-  }
 }
 
 /**
@@ -630,8 +630,8 @@
     if (!newTaskModel) {
       arguments.add('--${analysisServer.Driver.DISABLE_NEW_TASK_MODEL}');
     }
-    print('Launching $serverPath');
-    print('$dartBinary ${arguments.join(' ')}');
+//    print('Launching $serverPath');
+//    print('$dartBinary ${arguments.join(' ')}');
     return Process.start(dartBinary, arguments).then((Process process) {
       _process = process;
       process.exitCode.then((int code) {
diff --git a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
index 94a57aa..a4ab04e 100644
--- a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
index 88df52e..e649594 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/server/status_test.dart b/pkg/analysis_server/test/integration/server/status_test.dart
index 06a1739..340a4b5 100644
--- a/pkg/analysis_server/test/integration/server/status_test.dart
+++ b/pkg/analysis_server/test/integration/server/status_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/integration/test_all.dart b/pkg/analysis_server/test/integration/test_all.dart
index dea62d4..e217c92 100644
--- a/pkg/analysis_server/test/integration/test_all.dart
+++ b/pkg/analysis_server/test/integration/test_all.dart
@@ -8,7 +8,6 @@
 
 import '../utils.dart';
 import 'analysis/test_all.dart' as analysis_test_all;
-import 'asynchrony_test.dart' as asynchrony_test;
 import 'completion/test_all.dart' as completion_test_all;
 import 'search/test_all.dart' as search_test_all;
 import 'server/test_all.dart' as server_test_all;
@@ -20,7 +19,6 @@
   initializeTestEnvironment();
   group('analysis_server_integration', () {
     analysis_test_all.main();
-    asynchrony_test.main();
     completion_test_all.main();
     search_test_all.main();
     server_test_all.main();
diff --git a/pkg/analysis_server/test/mocks.dart b/pkg/analysis_server/test/mocks.dart
index 1ce0d9f..428f53b 100644
--- a/pkg/analysis_server/test/mocks.dart
+++ b/pkg/analysis_server/test/mocks.dart
@@ -9,11 +9,12 @@
 @MirrorsUsed(targets: 'mocks', override: '*')
 import 'dart:mirrors';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:analysis_server/src/operation/operation_analysis.dart';
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
 import 'package:analyzer/file_system/file_system.dart' as resource;
 import 'package:analyzer/file_system/memory_file_system.dart' as resource;
 import 'package:analyzer/source/package_map_provider.dart';
diff --git a/pkg/analysis_server/test/plugin/protocol_dart_test.dart b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
new file mode 100644
index 0000000..35cf37d
--- /dev/null
+++ b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
@@ -0,0 +1,474 @@
+// 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.computer.element;
+
+import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol_dart.dart';
+import 'package:analyzer/src/generated/ast.dart' as engine;
+import 'package:analyzer/src/generated/element.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';
+import 'package:unittest/unittest.dart';
+
+import '../abstract_context.dart';
+import '../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  defineReflectiveTests(ElementTest);
+  defineReflectiveTests(ElementKindTest);
+}
+
+@reflectiveTest
+class ElementKindTest {
+  void test_fromEngine() {
+    expect(convertElementKind(engine.ElementKind.CLASS), ElementKind.CLASS);
+    expect(convertElementKind(engine.ElementKind.COMPILATION_UNIT),
+        ElementKind.COMPILATION_UNIT);
+    expect(convertElementKind(engine.ElementKind.CONSTRUCTOR),
+        ElementKind.CONSTRUCTOR);
+    expect(convertElementKind(engine.ElementKind.FIELD), ElementKind.FIELD);
+    expect(
+        convertElementKind(engine.ElementKind.FUNCTION), ElementKind.FUNCTION);
+    expect(convertElementKind(engine.ElementKind.FUNCTION_TYPE_ALIAS),
+        ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(convertElementKind(engine.ElementKind.GETTER), ElementKind.GETTER);
+    expect(convertElementKind(engine.ElementKind.LABEL), ElementKind.LABEL);
+    expect(convertElementKind(engine.ElementKind.LIBRARY), ElementKind.LIBRARY);
+    expect(convertElementKind(engine.ElementKind.LOCAL_VARIABLE),
+        ElementKind.LOCAL_VARIABLE);
+    expect(convertElementKind(engine.ElementKind.METHOD), ElementKind.METHOD);
+    expect(convertElementKind(engine.ElementKind.PARAMETER),
+        ElementKind.PARAMETER);
+    expect(convertElementKind(engine.ElementKind.SETTER), ElementKind.SETTER);
+    expect(convertElementKind(engine.ElementKind.TOP_LEVEL_VARIABLE),
+        ElementKind.TOP_LEVEL_VARIABLE);
+    expect(convertElementKind(engine.ElementKind.TYPE_PARAMETER),
+        ElementKind.TYPE_PARAMETER);
+  }
+
+  void test_string_constructor() {
+    expect(new ElementKind(ElementKind.CLASS.name), ElementKind.CLASS);
+    expect(new ElementKind(ElementKind.CLASS_TYPE_ALIAS.name),
+        ElementKind.CLASS_TYPE_ALIAS);
+    expect(new ElementKind(ElementKind.COMPILATION_UNIT.name),
+        ElementKind.COMPILATION_UNIT);
+    expect(
+        new ElementKind(ElementKind.CONSTRUCTOR.name), ElementKind.CONSTRUCTOR);
+    expect(new ElementKind(ElementKind.FIELD.name), ElementKind.FIELD);
+    expect(new ElementKind(ElementKind.FUNCTION.name), ElementKind.FUNCTION);
+    expect(new ElementKind(ElementKind.FUNCTION_TYPE_ALIAS.name),
+        ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(new ElementKind(ElementKind.GETTER.name), ElementKind.GETTER);
+    expect(new ElementKind(ElementKind.LIBRARY.name), ElementKind.LIBRARY);
+    expect(new ElementKind(ElementKind.LOCAL_VARIABLE.name),
+        ElementKind.LOCAL_VARIABLE);
+    expect(new ElementKind(ElementKind.METHOD.name), ElementKind.METHOD);
+    expect(new ElementKind(ElementKind.PARAMETER.name), ElementKind.PARAMETER);
+    expect(new ElementKind(ElementKind.SETTER.name), ElementKind.SETTER);
+    expect(new ElementKind(ElementKind.TOP_LEVEL_VARIABLE.name),
+        ElementKind.TOP_LEVEL_VARIABLE);
+    expect(new ElementKind(ElementKind.TYPE_PARAMETER.name),
+        ElementKind.TYPE_PARAMETER);
+    expect(new ElementKind(ElementKind.UNIT_TEST_TEST.name),
+        ElementKind.UNIT_TEST_TEST);
+    expect(new ElementKind(ElementKind.UNIT_TEST_GROUP.name),
+        ElementKind.UNIT_TEST_GROUP);
+    expect(new ElementKind(ElementKind.UNKNOWN.name), ElementKind.UNKNOWN);
+    expect(() {
+      new ElementKind('no-such-kind');
+    }, throws);
+  }
+
+  void test_toString() {
+    expect(ElementKind.CLASS.toString(), 'ElementKind.CLASS');
+    expect(ElementKind.COMPILATION_UNIT.toString(),
+        'ElementKind.COMPILATION_UNIT');
+  }
+}
+
+@reflectiveTest
+class ElementTest extends AbstractContextTest {
+  engine.Element findElementInUnit(engine.CompilationUnit unit, String name,
+      [engine.ElementKind kind]) {
+    return findChildElement(unit.element, name, kind);
+  }
+
+  void test_fromElement_CLASS() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+@deprecated
+abstract class _A {}
+class B<K, V> {}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    {
+      engine.ClassElement engineElement = findElementInUnit(unit, '_A');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.CLASS);
+      expect(element.name, '_A');
+      expect(element.typeParameters, isNull);
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, 27);
+        expect(location.length, '_A'.length);
+        expect(location.startLine, 2);
+        expect(location.startColumn, 16);
+      }
+      expect(element.parameters, isNull);
+      expect(
+          element.flags,
+          Element.FLAG_ABSTRACT |
+              Element.FLAG_DEPRECATED |
+              Element.FLAG_PRIVATE);
+    }
+    {
+      engine.ClassElement engineElement = findElementInUnit(unit, 'B');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.CLASS);
+      expect(element.name, 'B');
+      expect(element.typeParameters, '<K, V>');
+      expect(element.flags, 0);
+    }
+  }
+
+  void test_fromElement_CONSTRUCTOR() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+class A {
+  const A.myConstructor(int a, [String b]);
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.ConstructorElement engineElement =
+        findElementInUnit(unit, 'myConstructor');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.CONSTRUCTOR);
+    expect(element.name, 'myConstructor');
+    expect(element.typeParameters, isNull);
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 20);
+      expect(location.length, 'myConstructor'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 11);
+    }
+    expect(element.parameters, '(int a, [String b])');
+    expect(element.returnType, 'A');
+    expect(element.flags, Element.FLAG_CONST);
+  }
+
+  void test_fromElement_dynamic() {
+    var engineElement = engine.DynamicElementImpl.instance;
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.UNKNOWN);
+    expect(element.name, 'dynamic');
+    expect(element.location, isNull);
+    expect(element.parameters, isNull);
+    expect(element.returnType, isNull);
+    expect(element.flags, 0);
+  }
+
+  void test_fromElement_ENUM() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+@deprecated
+enum _E1 { one, two }
+enum E2 { three, four }''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    {
+      engine.ClassElement engineElement = findElementInUnit(unit, '_E1');
+      expect(engineElement.isDeprecated, isTrue);
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.ENUM);
+      expect(element.name, '_E1');
+      expect(element.typeParameters, isNull);
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, 17);
+        expect(location.length, '_E1'.length);
+        expect(location.startLine, 2);
+        expect(location.startColumn, 6);
+      }
+      expect(element.parameters, isNull);
+      expect(
+          element.flags,
+          (engineElement.isDeprecated ? Element.FLAG_DEPRECATED : 0) |
+              Element.FLAG_PRIVATE);
+    }
+    {
+      engine.ClassElement engineElement = findElementInUnit(unit, 'E2');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.ENUM);
+      expect(element.name, 'E2');
+      expect(element.typeParameters, isNull);
+      expect(element.flags, 0);
+    }
+  }
+
+  void test_fromElement_ENUM_CONSTANT() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+@deprecated
+enum _E1 { one, two }
+enum E2 { three, four }''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    {
+      engine.FieldElement engineElement = findElementInUnit(unit, 'one');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.ENUM_CONSTANT);
+      expect(element.name, 'one');
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, 23);
+        expect(location.length, 'one'.length);
+        expect(location.startLine, 2);
+        expect(location.startColumn, 12);
+      }
+      expect(element.parameters, isNull);
+      expect(element.returnType, '_E1');
+      // TODO(danrubel) determine why enum constant is not marked as deprecated
+      //engine.ClassElement classElement = engineElement.enclosingElement;
+      //expect(classElement.isDeprecated, isTrue);
+      expect(
+          element.flags,
+          // Element.FLAG_DEPRECATED |
+          Element.FLAG_CONST | Element.FLAG_STATIC);
+    }
+    {
+      engine.FieldElement engineElement = findElementInUnit(unit, 'three');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.ENUM_CONSTANT);
+      expect(element.name, 'three');
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, 44);
+        expect(location.length, 'three'.length);
+        expect(location.startLine, 3);
+        expect(location.startColumn, 11);
+      }
+      expect(element.parameters, isNull);
+      expect(element.returnType, 'E2');
+      expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
+    }
+    {
+      engine.FieldElement engineElement = findElementInUnit(unit, 'index');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.FIELD);
+      expect(element.name, 'index');
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, -1);
+        expect(location.length, 'index'.length);
+        expect(location.startLine, 1);
+        expect(location.startColumn, 0);
+      }
+      expect(element.parameters, isNull);
+      expect(element.returnType, 'int');
+      expect(element.flags, Element.FLAG_FINAL);
+    }
+    {
+      engine.FieldElement engineElement = findElementInUnit(unit, 'values');
+      // create notification Element
+      Element element = convertElement(engineElement);
+      expect(element.kind, ElementKind.FIELD);
+      expect(element.name, 'values');
+      {
+        Location location = element.location;
+        expect(location.file, '/test.dart');
+        expect(location.offset, -1);
+        expect(location.length, 'values'.length);
+        expect(location.startLine, 1);
+        expect(location.startColumn, 0);
+      }
+      expect(element.parameters, isNull);
+      expect(element.returnType, 'List<E2>');
+      expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
+    }
+  }
+
+  void test_fromElement_FIELD() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+class A {
+  static const myField = 42;
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.FieldElement engineElement = findElementInUnit(unit, 'myField');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.FIELD);
+    expect(element.name, 'myField');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 25);
+      expect(location.length, 'myField'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 16);
+    }
+    expect(element.parameters, isNull);
+    expect(element.returnType, 'dynamic');
+    expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
+  }
+
+  void test_fromElement_FUNCTION_TYPE_ALIAS() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+typedef int F<T>(String x);
+''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.FunctionTypeAliasElement engineElement =
+        findElementInUnit(unit, 'F');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element.name, 'F');
+    expect(element.typeParameters, '<T>');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 12);
+      expect(location.length, 'F'.length);
+      expect(location.startLine, 1);
+      expect(location.startColumn, 13);
+    }
+    expect(element.parameters, '(String x)');
+    expect(element.returnType, 'int');
+    expect(element.flags, 0);
+  }
+
+  void test_fromElement_GETTER() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+class A {
+  String get myGetter => 42;
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.PropertyAccessorElement engineElement =
+        findElementInUnit(unit, 'myGetter', engine.ElementKind.GETTER);
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.GETTER);
+    expect(element.name, 'myGetter');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 23);
+      expect(location.length, 'myGetter'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 14);
+    }
+    expect(element.parameters, isNull);
+    expect(element.returnType, 'String');
+    expect(element.flags, 0);
+  }
+
+  void test_fromElement_LABEL() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+main() {
+myLabel:
+  while (true) {
+    break myLabel;
+  }
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.LabelElement engineElement = findElementInUnit(unit, 'myLabel');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.LABEL);
+    expect(element.name, 'myLabel');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 9);
+      expect(location.length, 'myLabel'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 1);
+    }
+    expect(element.parameters, isNull);
+    expect(element.returnType, isNull);
+    expect(element.flags, 0);
+  }
+
+  void test_fromElement_METHOD() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+class A {
+  static List<String> myMethod(int a, {String b, int c}) {
+    return null;
+  }
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.MethodElement engineElement = findElementInUnit(unit, 'myMethod');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.METHOD);
+    expect(element.name, 'myMethod');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 32);
+      expect(location.length, 'myGetter'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 23);
+    }
+    expect(element.parameters, '(int a, {String b, int c})');
+    expect(element.returnType, 'List<String>');
+    expect(element.flags, Element.FLAG_STATIC);
+  }
+
+  void test_fromElement_SETTER() {
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
+class A {
+  set mySetter(String x) {}
+}''');
+    engine.CompilationUnit unit = resolveLibraryUnit(source);
+    engine.FieldElement engineFieldElement =
+        findElementInUnit(unit, 'mySetter', engine.ElementKind.FIELD);
+    engine.PropertyAccessorElement engineElement = engineFieldElement.setter;
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.SETTER);
+    expect(element.name, 'mySetter');
+    {
+      Location location = element.location;
+      expect(location.file, '/test.dart');
+      expect(location.offset, 16);
+      expect(location.length, 'mySetter'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 7);
+    }
+    expect(element.parameters, '(String x)');
+    expect(element.returnType, isNull);
+    expect(element.flags, 0);
+  }
+}
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 02200c0..592b8dd 100644
--- a/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart
+++ b/pkg/analysis_server/test/plugin/set_analysis_domain_test.dart
@@ -6,13 +6,13 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/analysis/analysis_domain.dart';
-import 'package:analysis_server/analysis/navigation_core.dart';
-import 'package:analysis_server/analysis/occurrences_core.dart';
-import 'package:analysis_server/plugin/navigation.dart';
-import 'package:analysis_server/plugin/occurrences.dart';
+import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation.dart';
+import 'package:analysis_server/plugin/analysis/navigation/navigation_core.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences.dart';
+import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/task/dart.dart';
diff --git a/pkg/analysis_server/test/plugin/test_all.dart b/pkg/analysis_server/test/plugin/test_all.dart
index 0dbf7d6..5ad008b 100644
--- a/pkg/analysis_server/test/plugin/test_all.dart
+++ b/pkg/analysis_server/test/plugin/test_all.dart
@@ -6,6 +6,7 @@
 import 'package:unittest/unittest.dart';
 
 import '../utils.dart';
+import 'protocol_dart_test.dart' as protocol_dart_test;
 import 'set_analysis_domain_test.dart' as set_analysis_domain_test;
 
 /**
@@ -14,6 +15,7 @@
 main() {
   initializeTestEnvironment();
   group('plugin', () {
+    protocol_dart_test.main();
     set_analysis_domain_test.main();
   });
 }
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index d770e35..5f503b6 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -17,15 +17,12 @@
 import 'package:typed_mock/typed_mock.dart';
 import 'package:unittest/unittest.dart';
 
-import 'abstract_context.dart';
 import 'mocks.dart';
 import 'utils.dart';
 
 main() {
   initializeTestEnvironment();
   defineReflectiveTests(AnalysisErrorTest);
-  defineReflectiveTests(ElementTest);
-  defineReflectiveTests(ElementKindTest);
   defineReflectiveTests(EnumTest);
 }
 
@@ -73,7 +70,7 @@
       },
       MESSAGE: 'my message',
       CORRECTION: 'my correction',
-      HAS_FIX : false
+      HAS_FIX: false
     });
   }
 
@@ -91,7 +88,7 @@
         START_COLUMN: 2
       },
       MESSAGE: 'my message',
-      HAS_FIX : false
+      HAS_FIX: false
     });
   }
 
@@ -109,470 +106,12 @@
         START_COLUMN: -1
       },
       MESSAGE: 'my message',
-      HAS_FIX : false
+      HAS_FIX: false
     });
   }
 }
 
 @reflectiveTest
-class ElementKindTest {
-  void test_fromEngine() {
-    expect(
-        newElementKind_fromEngine(engine.ElementKind.CLASS), ElementKind.CLASS);
-    expect(newElementKind_fromEngine(engine.ElementKind.COMPILATION_UNIT),
-        ElementKind.COMPILATION_UNIT);
-    expect(newElementKind_fromEngine(engine.ElementKind.CONSTRUCTOR),
-        ElementKind.CONSTRUCTOR);
-    expect(
-        newElementKind_fromEngine(engine.ElementKind.FIELD), ElementKind.FIELD);
-    expect(newElementKind_fromEngine(engine.ElementKind.FUNCTION),
-        ElementKind.FUNCTION);
-    expect(newElementKind_fromEngine(engine.ElementKind.FUNCTION_TYPE_ALIAS),
-        ElementKind.FUNCTION_TYPE_ALIAS);
-    expect(newElementKind_fromEngine(engine.ElementKind.GETTER),
-        ElementKind.GETTER);
-    expect(
-        newElementKind_fromEngine(engine.ElementKind.LABEL), ElementKind.LABEL);
-    expect(newElementKind_fromEngine(engine.ElementKind.LIBRARY),
-        ElementKind.LIBRARY);
-    expect(newElementKind_fromEngine(engine.ElementKind.LOCAL_VARIABLE),
-        ElementKind.LOCAL_VARIABLE);
-    expect(newElementKind_fromEngine(engine.ElementKind.METHOD),
-        ElementKind.METHOD);
-    expect(newElementKind_fromEngine(engine.ElementKind.PARAMETER),
-        ElementKind.PARAMETER);
-    expect(newElementKind_fromEngine(engine.ElementKind.SETTER),
-        ElementKind.SETTER);
-    expect(newElementKind_fromEngine(engine.ElementKind.TOP_LEVEL_VARIABLE),
-        ElementKind.TOP_LEVEL_VARIABLE);
-    expect(newElementKind_fromEngine(engine.ElementKind.TYPE_PARAMETER),
-        ElementKind.TYPE_PARAMETER);
-  }
-
-  void test_string_constructor() {
-    expect(new ElementKind(ElementKind.CLASS.name), ElementKind.CLASS);
-    expect(new ElementKind(ElementKind.CLASS_TYPE_ALIAS.name),
-        ElementKind.CLASS_TYPE_ALIAS);
-    expect(new ElementKind(ElementKind.COMPILATION_UNIT.name),
-        ElementKind.COMPILATION_UNIT);
-    expect(
-        new ElementKind(ElementKind.CONSTRUCTOR.name), ElementKind.CONSTRUCTOR);
-    expect(new ElementKind(ElementKind.FIELD.name), ElementKind.FIELD);
-    expect(new ElementKind(ElementKind.FUNCTION.name), ElementKind.FUNCTION);
-    expect(new ElementKind(ElementKind.FUNCTION_TYPE_ALIAS.name),
-        ElementKind.FUNCTION_TYPE_ALIAS);
-    expect(new ElementKind(ElementKind.GETTER.name), ElementKind.GETTER);
-    expect(new ElementKind(ElementKind.LIBRARY.name), ElementKind.LIBRARY);
-    expect(new ElementKind(ElementKind.LOCAL_VARIABLE.name),
-        ElementKind.LOCAL_VARIABLE);
-    expect(new ElementKind(ElementKind.METHOD.name), ElementKind.METHOD);
-    expect(new ElementKind(ElementKind.PARAMETER.name), ElementKind.PARAMETER);
-    expect(new ElementKind(ElementKind.SETTER.name), ElementKind.SETTER);
-    expect(new ElementKind(ElementKind.TOP_LEVEL_VARIABLE.name),
-        ElementKind.TOP_LEVEL_VARIABLE);
-    expect(new ElementKind(ElementKind.TYPE_PARAMETER.name),
-        ElementKind.TYPE_PARAMETER);
-    expect(new ElementKind(ElementKind.UNIT_TEST_TEST.name),
-        ElementKind.UNIT_TEST_TEST);
-    expect(new ElementKind(ElementKind.UNIT_TEST_GROUP.name),
-        ElementKind.UNIT_TEST_GROUP);
-    expect(new ElementKind(ElementKind.UNKNOWN.name), ElementKind.UNKNOWN);
-    expect(() {
-      new ElementKind('no-such-kind');
-    }, throws);
-  }
-
-  void test_toString() {
-    expect(ElementKind.CLASS.toString(), 'ElementKind.CLASS');
-    expect(ElementKind.COMPILATION_UNIT.toString(),
-        'ElementKind.COMPILATION_UNIT');
-  }
-}
-
-@reflectiveTest
-class ElementTest extends AbstractContextTest {
-  engine.Element findElementInUnit(engine.CompilationUnit unit, String name,
-      [engine.ElementKind kind]) {
-    return findChildElement(unit.element, name, kind);
-  }
-
-  void test_fromElement_CLASS() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-@deprecated
-abstract class _A {}
-class B<K, V> {}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    {
-      engine.ClassElement engineElement = findElementInUnit(unit, '_A');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.CLASS);
-      expect(element.name, '_A');
-      expect(element.typeParameters, isNull);
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, 27);
-        expect(location.length, '_A'.length);
-        expect(location.startLine, 2);
-        expect(location.startColumn, 16);
-      }
-      expect(element.parameters, isNull);
-      expect(
-          element.flags,
-          Element.FLAG_ABSTRACT |
-              Element.FLAG_DEPRECATED |
-              Element.FLAG_PRIVATE);
-    }
-    {
-      engine.ClassElement engineElement = findElementInUnit(unit, 'B');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.CLASS);
-      expect(element.name, 'B');
-      expect(element.typeParameters, '<K, V>');
-      expect(element.flags, 0);
-    }
-  }
-
-  void test_fromElement_CONSTRUCTOR() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-class A {
-  const A.myConstructor(int a, [String b]);
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.ConstructorElement engineElement =
-        findElementInUnit(unit, 'myConstructor');
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.CONSTRUCTOR);
-    expect(element.name, 'myConstructor');
-    expect(element.typeParameters, isNull);
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 20);
-      expect(location.length, 'myConstructor'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 11);
-    }
-    expect(element.parameters, '(int a, [String b])');
-    expect(element.returnType, 'A');
-    expect(element.flags, Element.FLAG_CONST);
-  }
-
-  void test_fromElement_dynamic() {
-    var engineElement = engine.DynamicElementImpl.instance;
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.UNKNOWN);
-    expect(element.name, 'dynamic');
-    expect(element.location, isNull);
-    expect(element.parameters, isNull);
-    expect(element.returnType, isNull);
-    expect(element.flags, 0);
-  }
-
-  void test_fromElement_ENUM() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-@deprecated
-enum _E1 { one, two }
-enum E2 { three, four }''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    {
-      engine.ClassElement engineElement = findElementInUnit(unit, '_E1');
-      expect(engineElement.isDeprecated, isTrue);
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.ENUM);
-      expect(element.name, '_E1');
-      expect(element.typeParameters, isNull);
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, 17);
-        expect(location.length, '_E1'.length);
-        expect(location.startLine, 2);
-        expect(location.startColumn, 6);
-      }
-      expect(element.parameters, isNull);
-      expect(
-          element.flags,
-          (engineElement.isDeprecated ? Element.FLAG_DEPRECATED : 0) |
-              Element.FLAG_PRIVATE);
-    }
-    {
-      engine.ClassElement engineElement = findElementInUnit(unit, 'E2');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.ENUM);
-      expect(element.name, 'E2');
-      expect(element.typeParameters, isNull);
-      expect(element.flags, 0);
-    }
-  }
-
-  void test_fromElement_ENUM_CONSTANT() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-@deprecated
-enum _E1 { one, two }
-enum E2 { three, four }''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    {
-      engine.FieldElement engineElement = findElementInUnit(unit, 'one');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.ENUM_CONSTANT);
-      expect(element.name, 'one');
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, 23);
-        expect(location.length, 'one'.length);
-        expect(location.startLine, 2);
-        expect(location.startColumn, 12);
-      }
-      expect(element.parameters, isNull);
-      expect(element.returnType, '_E1');
-      // TODO(danrubel) determine why enum constant is not marked as deprecated
-      //engine.ClassElement classElement = engineElement.enclosingElement;
-      //expect(classElement.isDeprecated, isTrue);
-      expect(
-          element.flags,
-          // Element.FLAG_DEPRECATED |
-          Element.FLAG_CONST | Element.FLAG_STATIC);
-    }
-    {
-      engine.FieldElement engineElement = findElementInUnit(unit, 'three');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.ENUM_CONSTANT);
-      expect(element.name, 'three');
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, 44);
-        expect(location.length, 'three'.length);
-        expect(location.startLine, 3);
-        expect(location.startColumn, 11);
-      }
-      expect(element.parameters, isNull);
-      expect(element.returnType, 'E2');
-      expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
-    }
-    {
-      engine.FieldElement engineElement = findElementInUnit(unit, 'index');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.FIELD);
-      expect(element.name, 'index');
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, -1);
-        expect(location.length, 'index'.length);
-        expect(location.startLine, 1);
-        expect(location.startColumn, 0);
-      }
-      expect(element.parameters, isNull);
-      expect(element.returnType, 'int');
-      expect(element.flags, Element.FLAG_FINAL);
-    }
-    {
-      engine.FieldElement engineElement = findElementInUnit(unit, 'values');
-      // create notification Element
-      Element element = newElement_fromEngine(engineElement);
-      expect(element.kind, ElementKind.FIELD);
-      expect(element.name, 'values');
-      {
-        Location location = element.location;
-        expect(location.file, '/test.dart');
-        expect(location.offset, -1);
-        expect(location.length, 'values'.length);
-        expect(location.startLine, 1);
-        expect(location.startColumn, 0);
-      }
-      expect(element.parameters, isNull);
-      expect(element.returnType, 'List<E2>');
-      expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
-    }
-  }
-
-  void test_fromElement_FIELD() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-class A {
-  static const myField = 42;
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.FieldElement engineElement = findElementInUnit(unit, 'myField');
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.FIELD);
-    expect(element.name, 'myField');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 25);
-      expect(location.length, 'myField'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 16);
-    }
-    expect(element.parameters, isNull);
-    expect(element.returnType, 'dynamic');
-    expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC);
-  }
-
-  void test_fromElement_FUNCTION_TYPE_ALIAS() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-typedef int F<T>(String x);
-''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.FunctionTypeAliasElement engineElement =
-        findElementInUnit(unit, 'F');
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.FUNCTION_TYPE_ALIAS);
-    expect(element.name, 'F');
-    expect(element.typeParameters, '<T>');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 12);
-      expect(location.length, 'F'.length);
-      expect(location.startLine, 1);
-      expect(location.startColumn, 13);
-    }
-    expect(element.parameters, '(String x)');
-    expect(element.returnType, 'int');
-    expect(element.flags, 0);
-  }
-
-  void test_fromElement_GETTER() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-class A {
-  String get myGetter => 42;
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.PropertyAccessorElement engineElement =
-        findElementInUnit(unit, 'myGetter', engine.ElementKind.GETTER);
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.GETTER);
-    expect(element.name, 'myGetter');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 23);
-      expect(location.length, 'myGetter'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 14);
-    }
-    expect(element.parameters, isNull);
-    expect(element.returnType, 'String');
-    expect(element.flags, 0);
-  }
-
-  void test_fromElement_LABEL() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-main() {
-myLabel:
-  while (true) {
-    break myLabel;
-  }
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.LabelElement engineElement = findElementInUnit(unit, 'myLabel');
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.LABEL);
-    expect(element.name, 'myLabel');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 9);
-      expect(location.length, 'myLabel'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 1);
-    }
-    expect(element.parameters, isNull);
-    expect(element.returnType, isNull);
-    expect(element.flags, 0);
-  }
-
-  void test_fromElement_METHOD() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-class A {
-  static List<String> myMethod(int a, {String b, int c}) {
-    return null;
-  }
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.MethodElement engineElement = findElementInUnit(unit, 'myMethod');
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.METHOD);
-    expect(element.name, 'myMethod');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 32);
-      expect(location.length, 'myGetter'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 23);
-    }
-    expect(element.parameters, '(int a, {String b, int c})');
-    expect(element.returnType, 'List<String>');
-    expect(element.flags, Element.FLAG_STATIC);
-  }
-
-  void test_fromElement_SETTER() {
-    engine.Source source = addSource(
-        '/test.dart',
-        '''
-class A {
-  set mySetter(String x) {}
-}''');
-    engine.CompilationUnit unit = resolveLibraryUnit(source);
-    engine.FieldElement engineFieldElement =
-        findElementInUnit(unit, 'mySetter', engine.ElementKind.FIELD);
-    engine.PropertyAccessorElement engineElement = engineFieldElement.setter;
-    // create notification Element
-    Element element = newElement_fromEngine(engineElement);
-    expect(element.kind, ElementKind.SETTER);
-    expect(element.name, 'mySetter');
-    {
-      Location location = element.location;
-      expect(location.file, '/test.dart');
-      expect(location.offset, 16);
-      expect(location.length, 'mySetter'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 7);
-    }
-    expect(element.parameters, '(String x)');
-    expect(element.returnType, isNull);
-    expect(element.flags, 0);
-  }
-}
-
-@reflectiveTest
 class EnumTest {
   void test_AnalysisErrorSeverity() {
     new EnumTester<engine.ErrorSeverity, AnalysisErrorSeverity>().run(
@@ -589,7 +128,7 @@
 
   void test_ElementKind() {
     new EnumTester<engine.ElementKind, ElementKind>()
-        .run(newElementKind_fromEngine, exceptions: {
+        .run(convertElementKind, exceptions: {
       // TODO(paulberry): do any of the exceptions below constitute bugs?
       engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN,
       engine.ElementKind.EMBEDDED_HTML_SCRIPT: ElementKind.UNKNOWN,
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index 16146ef..93dde63 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -6,8 +6,9 @@
 
 import 'dart:convert';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/search/abstract_search_domain.dart b/pkg/analysis_server/test/search/abstract_search_domain.dart
index 90f7d47..bdf06da 100644
--- a/pkg/analysis_server/test/search/abstract_search_domain.dart
+++ b/pkg/analysis_server/test/search/abstract_search_domain.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.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';
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index 1c74865..51fa1d9 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/index/index.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/search/member_declarations_test.dart b/pkg/analysis_server/test/search/member_declarations_test.dart
index 2b91238..607e058 100644
--- a/pkg/analysis_server/test/search/member_declarations_test.dart
+++ b/pkg/analysis_server/test/search/member_declarations_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/search/member_references_test.dart b/pkg/analysis_server/test/search/member_references_test.dart
index 40a998f..ba65bcc 100644
--- a/pkg/analysis_server/test/search/member_references_test.dart
+++ b/pkg/analysis_server/test/search/member_references_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/search/top_level_declarations_test.dart b/pkg/analysis_server/test/search/top_level_declarations_test.dart
index 97e14c0..81fa08b 100644
--- a/pkg/analysis_server/test/search/top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/search/top_level_declarations_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/analysis_server/test/search/type_hierarchy_test.dart b/pkg/analysis_server/test/search/type_hierarchy_test.dart
index 67445aa..037d7bb 100644
--- a/pkg/analysis_server/test/search/type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/search/type_hierarchy_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+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';
@@ -639,6 +639,56 @@
         itemD.memberElement.location.offset, findOffset('test() {} // in D'));
   }
 
+  test_member_ofMixin2_method() async {
+    addTestFile('''
+class M1 {
+  void test() {} // in M1
+}
+class M2 {
+  void test() {} // in M2
+}
+class D1 extends Object with M1 {}
+class D2 extends Object with M1, M2 {}
+class D3 extends Object with M2, M1 {}
+class D4 extends Object with M2, M1 {
+  void test() {} // in D4
+}
+''');
+    List<TypeHierarchyItem> items =
+        await _getTypeHierarchy('test() {} // in M1');
+    var itemM1 = items.firstWhere((e) => e.classElement.name == 'M1');
+    var item1 = items.firstWhere((e) => e.classElement.name == 'D1');
+    var item2 = items.firstWhere((e) => e.classElement.name == 'D2');
+    var item3 = items.firstWhere((e) => e.classElement.name == 'D3');
+    var item4 = items.firstWhere((e) => e.classElement.name == 'D4');
+    expect(itemM1, isNotNull);
+    expect(item1, isNotNull);
+    expect(item2, isNotNull);
+    expect(item3, isNotNull);
+    expect(item4, isNotNull);
+    // D1 does not override
+    {
+      Element member1 = item1.memberElement;
+      expect(member1, isNull);
+    }
+    // D2 mixes-in M2 last, which overrides
+    {
+      Element member2 = item2.memberElement;
+      expect(member2, isNotNull);
+      expect(member2.location.offset, findOffset('test() {} // in M2'));
+    }
+    // D3 mixes-in M1 last and does not override itself
+    {
+      Element member3 = item3.memberElement;
+      expect(member3, isNull);
+    }
+    // D4 mixes-in M1 last, but it also overrides
+    {
+      Element member4 = item4.memberElement;
+      expect(member4.location.offset, findOffset('test() {} // in D4'));
+    }
+  }
+
   test_member_ofMixin_getter() async {
     addTestFile('''
 abstract class Base {
diff --git a/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
index 959b027..9bb8aa7 100644
--- a/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.completion.dart.arglist;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/arglist_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
index db6a1d2..f0698a0 100644
--- a/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.completion.dart.combinator;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/combinator_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart b/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
index 60c0fe6..3e15f2e 100644
--- a/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
@@ -6,11 +6,11 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart'
     show ContextSourcePair;
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/domain_completion.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/services/completion/common_usage_computer.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_cache.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
diff --git a/pkg/analysis_server/test/services/completion/completion_computer_test.dart b/pkg/analysis_server/test/services/completion/completion_computer_test.dart
index dddf75e..48f9fe6 100644
--- a/pkg/analysis_server/test/services/completion/completion_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_computer_test.dart
@@ -6,8 +6,8 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
     show CompletionRequest, CompletionResult;
 import 'package:analysis_server/src/services/completion/completion_manager.dart';
@@ -172,7 +172,8 @@
 
   MockCompletionContributor(this.fastSuggestion, this.fullSuggestion);
 
-  assertCalls(AnalysisContext context, Source source, int offset, SearchEngine searchEngine) {
+  assertCalls(AnalysisContext context, Source source, int offset,
+      SearchEngine searchEngine) {
     expect(request.context, equals(context));
     expect(request.source, equals(source));
     expect(request.offset, equals(offset));
diff --git a/pkg/analysis_server/test/services/completion/completion_test_util.dart b/pkg/analysis_server/test/services/completion/completion_test_util.dart
index e9b24b4..8edd486 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -6,10 +6,11 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/protocol.dart' as protocol
+import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
     show Element, ElementKind;
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
+import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_target.dart';
 import 'package:analysis_server/src/services/completion/common_usage_computer.dart';
 import 'package:analysis_server/src/services/completion/completion_manager.dart';
diff --git a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
index 36525d2..2f2a3f8 100644
--- a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
@@ -4,10 +4,11 @@
 
 library test.services.completion.toplevel;
 
-import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/protocol.dart' as protocol
+import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
     show Element, ElementKind;
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
+import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_cache.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/imported_reference_contributor.dart';
diff --git a/pkg/analysis_server/test/services/completion/inherited_computer_test.dart b/pkg/analysis_server/test/services/completion/inherited_computer_test.dart
index 530b88a..a50fa2f 100644
--- a/pkg/analysis_server/test/services/completion/inherited_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/inherited_computer_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.completion.inherited_computer_test;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/inherited_contributor.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
index 882efd9..043e89c 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.completion.dart.keyword;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/keyword_contributor.dart';
 import 'package:analyzer/src/generated/scanner.dart';
@@ -430,6 +430,16 @@
         relevance: DART_RELEVANCE_HIGH);
   }
 
+  test_catch() {
+    addTestSource('main() {try {} catch (e) {^}}}');
+    expect(computeFast(), isTrue);
+    var keywords = <Keyword>[];
+    keywords.addAll(STMT_START_OUTSIDE_CLASS);
+    keywords.add(Keyword.RETHROW);
+    assertSuggestKeywords(keywords,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
   test_class() {
     addTestSource('class A e^ { }');
     expect(computeFast(), isTrue);
@@ -607,16 +617,6 @@
         relevance: DART_RELEVANCE_KEYWORD);
   }
 
-  test_catch() {
-    addTestSource('main() {try {} catch (e) {^}}}');
-    expect(computeFast(), isTrue);
-    var keywords = <Keyword>[];
-    keywords.addAll(STMT_START_OUTSIDE_CLASS);
-    keywords.add(Keyword.RETHROW);
-    assertSuggestKeywords(keywords,
-        relevance: DART_RELEVANCE_KEYWORD);
-  }
-
   test_for_break_continue2() {
     addTestSource('class A {foo() {for (int x in myList) {^}}}');
     expect(computeFast(), isTrue);
diff --git a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
index 94c0717..28ceb3d 100644
--- a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
@@ -4,9 +4,10 @@
 
 library test.services.completion.dart.local;
 
-import 'package:analysis_server/src/protocol.dart' as protocol
+import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
     show Element, ElementKind;
-import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide Element, ElementKind;
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/local_reference_contributor.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
index 1e3cb2f..6e15a0c 100644
--- a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/prefixed_element_contributor.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/services/completion/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/uri_contributor_test.dart
index 4a046a1..ab605dd 100644
--- a/pkg/analysis_server/test/services/completion/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/uri_contributor_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.completion.contributor.dart.importuri;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/uri_contributor.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
@@ -28,6 +28,16 @@
     contributor = new UriContributor();
   }
 
+  test_export_package2() {
+    addPackageSource('foo', 'foo.dart', 'library foo;');
+    addPackageSource('foo', 'baz/too.dart', 'library too;');
+    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addTestSource('export "package:foo/baz/^" import');
+    computeFast();
+    assertSuggest('package:foo/baz/too.dart',
+        csKind: CompletionSuggestionKind.IMPORT);
+  }
+
   test_import() {
     addTestSource('import "^"');
     computeFast();
@@ -186,16 +196,6 @@
         csKind: CompletionSuggestionKind.IMPORT);
   }
 
-  test_export_package2() {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
-    addTestSource('export "package:foo/baz/^" import');
-    computeFast();
-    assertSuggest('package:foo/baz/too.dart',
-        csKind: CompletionSuggestionKind.IMPORT);
-  }
-
   test_import_package_missing_lib() {
     var pkgSrc = addPackageSource('bar', 'bar.dart', 'library bar;');
     provider.deleteFolder(dirname(pkgSrc.fullName));
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index 9a256a2..6d01cbb 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -4,9 +4,9 @@
 
 library test.services.correction.assist;
 
-import 'package:analysis_server/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:plugin/manager.dart';
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index e501b42..c42ed2d 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -4,8 +4,8 @@
 
 library test.services.correction.fix;
 
-import 'package:analysis_server/edit/fix/fix_core.dart';
-import 'package:analysis_server/src/protocol.dart' hide AnalysisError;
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide AnalysisError;
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
 import 'package:analyzer/file_system/file_system.dart';
@@ -3097,6 +3097,25 @@
     }
   }
 
+  void test_nonBoolCondition_addNotNull() {
+    resolveTestUnit('''
+main(String p) {
+  if (p) {
+    print(p);
+  }
+}
+''');
+    assertHasFix(
+        DartFixKind.ADD_NE_NULL,
+        '''
+main(String p) {
+  if (p != null) {
+    print(p);
+  }
+}
+''');
+  }
+
   void test_removeDeadCode_condition() {
     resolveTestUnit('''
 main(int p) {
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 4d49775..deb386d 100644
--- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
+++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
@@ -335,22 +335,4 @@
           unorderedEquals(['goodbyeCruelWorld', 'cruelWorld', 'world2']));
     }
   }
-
-  void test_getCamelWords_empty() {
-    expect(getCamelWords(''), unorderedEquals([]));
-  }
-
-  void test_getCamelWords_multipleUpper() {
-    expect(getCamelWords('sortedHTMLNodes'),
-        unorderedEquals(['sorted', 'HTML', 'Nodes']));
-  }
-
-  void test_getCamelWords_simpleCamel() {
-    expect(getCamelWords('mySimpleText'),
-        unorderedEquals(['my', 'Simple', 'Text']));
-  }
-
-  void test_getCamelWords_simpleName() {
-    expect(getCamelWords('name'), unorderedEquals(['name']));
-  }
 }
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index 833cc49..f21b14f 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -4,7 +4,8 @@
 
 library test.services.refactoring.organize_directives;
 
-import 'package:analysis_server/src/protocol.dart' hide AnalysisError;
+import 'package:analysis_server/plugin/protocol/protocol.dart'
+    hide AnalysisError;
 import 'package:analysis_server/src/services/correction/organize_directives.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
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 f0accb6..b32f502 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.sort_members;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/sort_members.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
diff --git a/pkg/analysis_server/test/services/correction/strings_test.dart b/pkg/analysis_server/test/services/correction/strings_test.dart
index 2e30c37..3fb37fb 100644
--- a/pkg/analysis_server/test/services/correction/strings_test.dart
+++ b/pkg/analysis_server/test/services/correction/strings_test.dart
@@ -33,6 +33,15 @@
     expect(compareStrings('b', 'a'), 1);
   }
 
+  void test_countMatches() {
+    expect(countMatches(null, null), 0);
+    expect(countMatches('abc', null), 0);
+    expect(countMatches(null, 'abc'), 0);
+    expect(countMatches('ababa', 'a'), 3);
+    expect(countMatches('ababa', 'ab'), 2);
+    expect(countMatches('aaabaa', 'aa'), 2);
+  }
+
   void test_findCommonOverlap() {
     expect(findCommonOverlap('', 'abcd'), 0);
     expect(findCommonOverlap('abc', 'abcd'), 3);
@@ -54,6 +63,13 @@
     expect(findCommonSuffix('123', 'xyz123'), 3);
   }
 
+  void test_getCamelWords() {
+    expect(getCamelWords(null), []);
+    expect(getCamelWords(''), []);
+    expect(getCamelWords('getCamelWords'), ['get', 'Camel', 'Words']);
+    expect(getCamelWords('getHTMLText'), ['get', 'HTML', 'Text']);
+  }
+
   void test_isBlank() {
     expect(isBlank(null), isTrue);
     expect(isBlank(''), isTrue);
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
index bc9538b..585366a 100644
--- a/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
+++ b/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.src.index.dart_index_contributor;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
@@ -802,6 +802,22 @@
         _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 {}
diff --git a/pkg/analysis_server/test/services/index/store/codec_test.dart b/pkg/analysis_server/test/services/index/store/codec_test.dart
index 5e6d180..cfc6b97 100644
--- a/pkg/analysis_server/test/services/index/store/codec_test.dart
+++ b/pkg/analysis_server/test/services/index/store/codec_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.src.index.store.codec;
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
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
index dc4a262..d0d0322 100644
--- a/pkg/analysis_server/test/services/index/store/split_store_test.dart
+++ b/pkg/analysis_server/test/services/index/store/split_store_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/analysis/index_core.dart';
+import 'package:analysis_server/plugin/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';
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
index 2def79c..576f364 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+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';
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
index 98fd12a..0dd3c77 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename;
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+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/src/generated/ast.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
index f333fc6..ca3a1db 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart' hide ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide ElementKind;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analyzer/src/generated/element.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index a629d3e..2e3551f 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart' hide ElementKind;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide ElementKind;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analyzer/src/generated/element.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
index bba2a6e..a5dd25a 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/extract_local.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index b257699..ff3b3b0 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/extract_method.dart';
 import 'package:analysis_server/src/services/refactoring/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 3aa628b..9b58386 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.inline_local;
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/inline_local.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index 4e63640..8ff6c84 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/protocol.dart' hide Element;
+import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/inline_method.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
index f50b041..7b9ead8 100644
--- a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.naming_conventions;
 
-import 'package:analysis_server/src/protocol.dart'
+import 'package:analysis_server/plugin/protocol/protocol.dart'
     show RefactoringProblemSeverity;
 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
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 d0b312b..43a0a35 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
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_class_member;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -19,6 +19,60 @@
 
 @reflectiveTest
 class RenameClassMemberTest extends RenameRefactoringTest {
+  test_checkFinalConditions_classNameConflict_sameClass() async {
+    indexTestUnit('''
+class NewName {
+  void test() {}
+}
+''');
+    createRenameRefactoringAtString('test() {}');
+    // check status
+    refactoring.newName = 'NewName';
+    RefactoringStatus status = await refactoring.checkFinalConditions();
+    assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
+        expectedMessage:
+            "Renamed method has the same name as the declaring class 'NewName'.",
+        expectedContextSearch: 'test() {}');
+  }
+
+  test_checkFinalConditions_classNameConflict_subClass() async {
+    indexTestUnit('''
+class A {
+  void test() {} // 1
+}
+class NewName extends A {
+  void test() {} // 2
+}
+''');
+    createRenameRefactoringAtString('test() {} // 1');
+    // check status
+    refactoring.newName = 'NewName';
+    RefactoringStatus status = await refactoring.checkFinalConditions();
+    assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
+        expectedMessage:
+            "Renamed method has the same name as the declaring class 'NewName'.",
+        expectedContextSearch: 'test() {} // 2');
+  }
+
+  test_checkFinalConditions_classNameConflict_superClass() async {
+    indexTestUnit('''
+class NewName {
+  void test() {} // 1
+}
+class B extends NewName {
+  void test() {} // 2
+}
+''');
+    createRenameRefactoringAtString('test() {} // 2');
+    // check status
+    refactoring.newName = 'NewName';
+    RefactoringStatus status = await refactoring.checkFinalConditions();
+    assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
+        expectedMessage:
+            "Renamed method has the same name as the declaring class 'NewName'.",
+        expectedContextSearch: 'test() {} // 1');
+  }
+
   test_checkFinalConditions_hasMember_MethodElement() async {
     indexTestUnit('''
 class A {
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 2bc8dc0..9b6d46e 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -4,8 +4,9 @@
 
 library test.services.refactoring.rename_constructor;
 
-import 'package:analysis_server/src/protocol.dart';
+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/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -199,6 +200,11 @@
 ''');
   }
 
+  void test_newInstance_nullElement() {
+    RenameRefactoring refactoring = new RenameRefactoring(searchEngine, null);
+    expect(refactoring, isNull);
+  }
+
   void _createConstructorDeclarationRefactoring(String search) {
     ConstructorElement element = findNodeElementAtString(
         search, (node) => node is ConstructorDeclaration);
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 2dac474..538baaf 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_import;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.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_label_test.dart b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
index 31734e6..613a0d6 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_label;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.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 b08132d..9a8f259 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_library;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.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/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
index dda32ed..a92bd0d 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_local;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.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_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
index 8e38f8f..78a5cd4 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
@@ -4,7 +4,7 @@
 
 library test.services.refactoring.rename_unit_member;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
@@ -400,6 +400,31 @@
 ''');
   }
 
+  test_createChange_ClassElement_invocation() {
+    verifyNoTestUnitErrors = false;
+    indexTestUnit('''
+class Test {
+}
+main() {
+  Test(); // invalid code, but still a reference
+}
+''');
+    // configure refactoring
+    createRenameRefactoringAtString('Test();');
+    expect(refactoring.refactoringName, 'Rename Class');
+    expect(refactoring.elementKindName, 'class');
+    expect(refactoring.oldName, 'Test');
+    refactoring.newName = 'NewName';
+    // validate change
+    return assertSuccessfulRefactoring('''
+class NewName {
+}
+main() {
+  NewName(); // invalid code, but still a reference
+}
+''');
+  }
+
   test_createChange_ClassElement_parameterTypeNested() {
     indexTestUnit('''
 class Test {
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index f1ef37e..2190ee1 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -6,10 +6,10 @@
 
 import 'dart:async';
 
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/constants.dart';
 import 'package:analysis_server/src/plugin/server_plugin.dart';
-import 'package:analysis_server/src/protocol.dart';
 import 'package:analysis_server/src/socket_server.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/generated/sdk_io.dart';
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 0647a83..43adc4e 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
@@ -4,9 +4,9 @@
 
 library analysis_server.test.src.utilities.change_builder_core_test;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/edit/utilities/change_builder_core.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/utilities/change_builder_core.dart';
-import 'package:analysis_server/utilities/change_builder_core.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
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 bfb9c6c..7c6442b 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
@@ -4,9 +4,9 @@
 
 library analysis_server.test.src.utilities.change_builder_dart_test;
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/edit/utilities/change_builder_dart.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:analysis_server/src/utilities/change_builder_dart.dart';
-import 'package:analysis_server/utilities/change_builder_dart.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analysis_server/test/timing/completion/completion_simple.dart b/pkg/analysis_server/test/timing/completion/completion_simple.dart
index 7f05d7b..de1d17a 100644
--- a/pkg/analysis_server/test/timing/completion/completion_simple.dart
+++ b/pkg/analysis_server/test/timing/completion/completion_simple.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/plugin/protocol/protocol.dart';
 import 'package:path/path.dart';
 
 import '../timing_framework.dart';
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index c7e387b..a8bd4dc 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -36,7 +36,7 @@
 };
 
 final GeneratedFile target =
-    new GeneratedFile('../../lib/src/generated_protocol.dart', () {
+    new GeneratedFile('../../lib/plugin/protocol/generated_protocol.dart', () {
   CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(readApi());
   return visitor.collectCode(visitor.visitApi);
 });
@@ -67,6 +67,13 @@
   };
 
   /**
+   * The disclaimer added to the documentation comment for each of the classes
+   * that are generated.
+   */
+  static const String disclaimer =
+      'Clients are not expected to subtype this class.';
+
+  /**
    * Visitor used to produce doc comments.
    */
   final ToHtmlVisitor toHtmlVisitor;
@@ -100,13 +107,13 @@
       String itemTypeName = dartType(resolvedType.itemType);
       String subComparison = compareEqualsCode(resolvedType.itemType, 'a', 'b');
       String closure = '($itemTypeName a, $itemTypeName b) => $subComparison';
-      return '_listEqual($thisVar, $otherVar, $closure)';
+      return 'listEqual($thisVar, $otherVar, $closure)';
     } else if (resolvedType is TypeMap) {
       String valueTypeName = dartType(resolvedType.valueType);
       String subComparison =
           compareEqualsCode(resolvedType.valueType, 'a', 'b');
       String closure = '($valueTypeName a, $valueTypeName b) => $subComparison';
-      return '_mapEqual($thisVar, $otherVar, $closure)';
+      return 'mapEqual($thisVar, $otherVar, $closure)';
     }
     throw new Exception(
         "Don't know how to compare for equality: $resolvedType");
@@ -212,6 +219,9 @@
       toHtmlVisitor.p(() {
         toHtmlVisitor.write(impliedType.humanReadableName);
       });
+      toHtmlVisitor.p(() {
+        toHtmlVisitor.write(disclaimer);
+      });
     }));
     writeln('class $className {');
     indent(() {
@@ -242,6 +252,9 @@
       if (impliedType.type != null) {
         toHtmlVisitor.showType(null, impliedType.type);
       }
+      toHtmlVisitor.p(() {
+        toHtmlVisitor.write(disclaimer);
+      });
     }));
     writeln('class $className implements Enum {');
     indent(() {
@@ -366,6 +379,9 @@
       if (impliedType.type != null) {
         toHtmlVisitor.showType(null, impliedType.type);
       }
+      toHtmlVisitor.p(() {
+        toHtmlVisitor.write(disclaimer);
+      });
     }));
     write('class $className');
     if (impliedType.kind == 'refactoringFeedback') {
@@ -553,7 +569,7 @@
       writeln('factory RefactoringFeedback.fromJson(JsonDecoder jsonDecoder, '
           'String jsonPath, Object json, Map responseJson) {');
       indent(() {
-        writeln('return _refactoringFeedbackFromJson(jsonDecoder, jsonPath, '
+        writeln('return refactoringFeedbackFromJson(jsonDecoder, jsonPath, '
             'json, responseJson);');
       });
       writeln('}');
@@ -563,7 +579,7 @@
       writeln('factory RefactoringOptions.fromJson(JsonDecoder jsonDecoder, '
           'String jsonPath, Object json, RefactoringKind kind) {');
       indent(() {
-        writeln('return _refactoringOptionsFromJson(jsonDecoder, jsonPath, '
+        writeln('return refactoringOptionsFromJson(jsonDecoder, jsonPath, '
             'json, kind);');
       });
       writeln('}');
@@ -652,9 +668,9 @@
           } else {
             valueToCombine = '${field.name}.hashCode';
           }
-          writeln('hash = _JenkinsSmiHash.combine(hash, $valueToCombine);');
+          writeln('hash = JenkinsSmiHash.combine(hash, $valueToCombine);');
         }
-        writeln('return _JenkinsSmiHash.finish(hash);');
+        writeln('return JenkinsSmiHash.finish(hash);');
       }
     });
     writeln('}');
@@ -678,7 +694,7 @@
         ]);
         writeln(
             'static RefactoringProblemSeverity max(RefactoringProblemSeverity a, RefactoringProblemSeverity b) =>');
-        writeln('    _maxRefactoringProblemSeverity(a, b);');
+        writeln('    maxRefactoringProblemSeverity(a, b);');
         return true;
       default:
         return false;
@@ -734,7 +750,7 @@
           new dom.Text('Adds [edit] to the [FileEdit] for the given [file].')
         ]);
         writeln('void addEdit(String file, int fileStamp, SourceEdit edit) =>');
-        writeln('    _addEditToSourceChange(this, file, fileStamp, edit);');
+        writeln('    addEditToSourceChange(this, file, fileStamp, edit);');
         writeln();
         docComment([new dom.Text('Adds the given [FileEdit].')]);
         writeln('void addFileEdit(SourceFileEdit edit) {');
@@ -755,22 +771,22 @@
               'Returns the [FileEdit] for the given [file], maybe `null`.')
         ]);
         writeln('SourceFileEdit getFileEdit(String file) =>');
-        writeln('    _getChangeFileEdit(this, file);');
+        writeln('    getChangeFileEdit(this, file);');
         return true;
       case 'SourceEdit':
         docComment([
           new dom.Text(
               'Get the result of applying the edit to the given [code].')
         ]);
-        writeln('String apply(String code) => _applyEdit(code, this);');
+        writeln('String apply(String code) => applyEdit(code, this);');
         return true;
       case 'SourceFileEdit':
         docComment([new dom.Text('Adds the given [Edit] to the list.')]);
-        writeln('void add(SourceEdit edit) => _addEditForSource(this, edit);');
+        writeln('void add(SourceEdit edit) => addEditForSource(this, edit);');
         writeln();
         docComment([new dom.Text('Adds the given [Edit]s.')]);
         writeln('void addAll(Iterable<SourceEdit> edits) =>');
-        writeln('    _addAllEditsForSource(this, edits);');
+        writeln('    addAllEditsForSource(this, edits);');
         return true;
       default:
         return false;
@@ -812,7 +828,7 @@
         ]);
         writeln(
             'static String applySequence(String code, Iterable<SourceEdit> edits) =>');
-        writeln('    _applySequence(code, edits);');
+        writeln('    applySequenceOfEdits(code, edits);');
         return true;
       default:
         return false;
@@ -929,12 +945,12 @@
       } else {
         switch (type.typeName) {
           case 'String':
-            return new FromJsonFunction('jsonDecoder._decodeString');
+            return new FromJsonFunction('jsonDecoder.decodeString');
           case 'bool':
-            return new FromJsonFunction('jsonDecoder._decodeBool');
+            return new FromJsonFunction('jsonDecoder.decodeBool');
           case 'int':
           case 'long':
-            return new FromJsonFunction('jsonDecoder._decodeInt');
+            return new FromJsonFunction('jsonDecoder.decodeInt');
           case 'object':
             return new FromJsonIdentity();
           default:
@@ -950,11 +966,11 @@
       }
       FromJsonCode valueCode = fromJsonCode(type.valueType);
       if (keyCode.isIdentity && valueCode.isIdentity) {
-        return new FromJsonFunction('jsonDecoder._decodeMap');
+        return new FromJsonFunction('jsonDecoder.decodeMap');
       } else {
         return new FromJsonSnippet((String jsonPath, String json) {
           StringBuffer result = new StringBuffer();
-          result.write('jsonDecoder._decodeMap($jsonPath, $json');
+          result.write('jsonDecoder.decodeMap($jsonPath, $json');
           if (!keyCode.isIdentity) {
             result.write(', keyDecoder: ${keyCode.asClosure}');
           }
@@ -968,10 +984,10 @@
     } else if (type is TypeList) {
       FromJsonCode itemCode = fromJsonCode(type.itemType);
       if (itemCode.isIdentity) {
-        return new FromJsonFunction('jsonDecoder._decodeList');
+        return new FromJsonFunction('jsonDecoder.decodeList');
       } else {
         return new FromJsonSnippet((String jsonPath, String json) =>
-            'jsonDecoder._decodeList($jsonPath, $json, ${itemCode.asClosure})');
+            'jsonDecoder.decodeList($jsonPath, $json, ${itemCode.asClosure})');
       }
     } else if (type is TypeUnion) {
       List<String> decoders = <String>[];
@@ -994,7 +1010,7 @@
         }
       }
       return new FromJsonSnippet((String jsonPath, String json) =>
-          'jsonDecoder._decodeUnion($jsonPath, $json, ${literalString(type.field)}, {${decoders.join(', ')}})');
+          'jsonDecoder.decodeUnion($jsonPath, $json, ${literalString(type.field)}, {${decoders.join(', ')}})');
     } else {
       throw new Exception("Can't convert $type from JSON");
     }
@@ -1080,7 +1096,8 @@
   visitApi() {
     outputHeader();
     writeln();
-    writeln('part of protocol;');
+    writeln('part of analysis_server.plugin.protocol.protocol;');
+    writeln();
     emitClasses();
   }
 }
diff --git a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
index 38b3f20..bdc8910 100644
--- a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
+++ b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
@@ -107,7 +107,8 @@
     writeln();
     writeln("import 'dart:async';");
     writeln();
-    writeln("import 'package:analysis_server/src/protocol.dart';");
+    writeln("import 'package:analysis_server/plugin/protocol/protocol.dart';");
+    writeln("import 'package:analysis_server/src/protocol/protocol_internal.dart';");
     writeln("import 'package:unittest/unittest.dart';");
     writeln();
     writeln("import 'integration_tests.dart';");
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index ec9687e..9e2232a 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.26.1+9
+* `OptionsProcessor` extension point API changed to pass associated
+  `AnalysisContext` instance into the `optionsProcessed` call-back.
+
 ## 0.26.1+6
 * Provisional (internal) plugin manifest parsing.
 
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 1684fe9..058f9eb 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -363,7 +363,13 @@
 
   @override
   Uri resolveRelativeUri(Uri relativeUri) {
-    return uri.resolveUri(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
diff --git a/pkg/analyzer/lib/plugin/options.dart b/pkg/analyzer/lib/plugin/options.dart
index 65775e1..fb99a50 100644
--- a/pkg/analyzer/lib/plugin/options.dart
+++ b/pkg/analyzer/lib/plugin/options.dart
@@ -6,6 +6,7 @@
 /// analysis options file.
 library analyzer.plugin.options;
 
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/plugin/options_plugin.dart';
 import 'package:plugin/plugin.dart';
 import 'package:yaml/yaml.dart';
@@ -48,13 +49,15 @@
   /// Called when an error occurs in processing options.
   void onError(Exception exception);
 
-  /// Called when the options file is processed.
+  /// Called when an options file is processed.
   ///
   /// The options file is processed on analyzer initialization and
   /// subsequently when the file is changed on disk.  In the event of a
   /// change notification, note that the notification simply indicates
   /// a change on disk. Content in specific option scopes may or may not
   /// be different. It is up to the implementer to check whether specific
-  /// options have changed and to handle those changes appropriately.
-  void optionsProcessed(Map<String, YamlNode> options);
+  /// options have changed and to handle those changes appropriately. In
+  /// addition to the [options] map, the associated analysis [context] is
+  /// provided as well to allow for context-specific configuration.
+  void optionsProcessed(AnalysisContext context, Map<String, YamlNode> options);
 }
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index c555f1b..b2c2471 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -583,12 +583,10 @@
   @override
   List<AnalysisError> computeErrors(Source source) {
     String name = source.shortName;
-    if (AnalysisEngine.isDartFileName(name)) {
-      return computeResult(source, DART_ERRORS);
-    } else if (AnalysisEngine.isHtmlFileName(name)) {
+    if (AnalysisEngine.isHtmlFileName(name)) {
       return computeResult(source, HTML_ERRORS);
     }
-    return AnalysisError.NO_ERRORS;
+    return computeResult(source, DART_ERRORS);
   }
 
   @override
@@ -1139,11 +1137,9 @@
       entry = getCacheEntry(unit);
       setValue(HINTS, AnalysisError.NO_ERRORS);
       setValue(LINTS, AnalysisError.NO_ERRORS);
-      setValue(INFER_STATIC_VARIABLE_TYPES_ERRORS, AnalysisError.NO_ERRORS);
       setValue(LIBRARY_UNIT_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(PARTIALLY_RESOLVE_REFERENCES_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(RESOLVE_FUNCTION_BODIES_ERRORS, AnalysisError.NO_ERRORS);
       setValue(RESOLVE_TYPE_NAMES_ERRORS, AnalysisError.NO_ERRORS);
+      setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS);
       entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
@@ -1153,8 +1149,11 @@
       entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
+      entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
+      entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
       // USED_IMPORTED_ELEMENTS
       // USED_LOCAL_ELEMENTS
+      setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS);
       setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS);
       setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS);
     });
@@ -1228,8 +1227,10 @@
     entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
   }
 
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 4b83206..093cdab 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -423,10 +423,8 @@
   @override
   Token get beginToken => leftParenthesis;
 
-  /**
-   * TODO(paulberry): Add commas.
-   */
   @override
+  // TODO(paulberry): Add commas.
   Iterable get childEntities => new ChildEntities()
     ..add(leftParenthesis)
     ..addAll(_arguments)
@@ -3836,7 +3834,7 @@
   Token get keyword => breakKeyword;
 
   /**
-   * Sethe token representing the 'break' keyword to the given [token].
+   * Set the token representing the 'break' keyword to the given [token].
    */
   @deprecated // Use "this.breakKeyword"
   void set keyword(Token token) {
@@ -9478,10 +9476,8 @@
   @override
   Token get beginToken => implementsKeyword;
 
-  /**
-   * TODO(paulberry): add commas.
-   */
   @override
+  // TODO(paulberry): add commas.
   Iterable get childEntities => new ChildEntities()
     ..add(implementsKeyword)
     ..addAll(interfaces);
@@ -11657,10 +11653,8 @@
   @override
   Element get bestElement => staticElement;
 
-  /**
-   * TODO(paulberry): add "." tokens.
-   */
   @override
+  // TODO(paulberry): add "." tokens.
   Iterable get childEntities => new ChildEntities()..addAll(_components);
 
   /**
@@ -11750,10 +11744,8 @@
     return leftBracket;
   }
 
-  /**
-   * TODO(paulberry): add commas.
-   */
   @override
+  // TODO(paulberry): add commas.
   Iterable get childEntities => super._childEntities
     ..add(leftBracket)
     ..addAll(_elements)
@@ -11840,10 +11832,8 @@
     return leftBracket;
   }
 
-  /**
-   * TODO(paulberry): add commas.
-   */
   @override
+  // TODO(paulberry): add commas.
   Iterable get childEntities => super._childEntities
     ..add(leftBracket)
     ..addAll(entries)
@@ -12611,7 +12601,7 @@
   StringLiteral get name => _name;
 
   /**
-   * Sets the name of the native object that implements the class to the given
+   * Set the name of the native object that implements the class to the given
    * [name].
    */
   void set name(StringLiteral name) {
@@ -16198,10 +16188,8 @@
     _shownNames = new NodeList<SimpleIdentifier>(this, shownNames);
   }
 
-  /**
-   * TODO(paulberry): add commas.
-   */
   @override
+  // TODO(paulberry): add commas.
   Iterable get childEntities => new ChildEntities()
     ..add(keyword)
     ..addAll(_shownNames);
@@ -16700,7 +16688,7 @@
   Token get endToken => token;
 
   /**
-   * Returns `true` if this identifier is the "name" part of a prefixed
+   * Return `true` if this identifier is the "name" part of a prefixed
    * identifier or a method invocation.
    */
   bool get isQualified {
@@ -17785,10 +17773,8 @@
   @override
   Token get beginToken => poundSign;
 
-  /**
-   * TODO(paulberry): add "." tokens.
-   */
   @override
+  // TODO(paulberry): add "." tokens.
   Iterable get childEntities => new ChildEntities()
     ..add(poundSign)
     ..addAll(components);
@@ -19322,10 +19308,8 @@
   @override
   Token get beginToken => leftBracket;
 
-  /**
-   * TODO(paulberry): Add commas.
-   */
   @override
+  // TODO(paulberry): Add commas.
   Iterable get childEntities => new ChildEntities()
     ..add(leftBracket)
     ..addAll(_arguments)
@@ -20303,10 +20287,8 @@
     _variables = new NodeList<VariableDeclaration>(this, variables);
   }
 
-  /**
-   * TODO(paulberry): include commas.
-   */
   @override
+  // TODO(paulberry): include commas.
   Iterable get childEntities => super._childEntities
     ..add(keyword)
     ..add(_type)
@@ -20559,10 +20541,8 @@
   @override
   Token get beginToken => withKeyword;
 
-  /**
-   * TODO(paulberry): add commas.
-   */
   @override
+  // TODO(paulberry): add commas.
   Iterable get childEntities => new ChildEntities()
     ..add(withKeyword)
     ..addAll(_mixinTypes);
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 30aa17e..9e7aeb4 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -5,6 +5,7 @@
 library engine.element;
 
 import 'dart:collection';
+import 'dart:math' show min;
 
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/task/dart.dart';
@@ -7340,6 +7341,15 @@
   List<ExportElement> _exports = ExportElement.EMPTY_LIST;
 
   /**
+   * A list containing the strongly connected component in the import/export
+   * graph in which the current library resides.  Computed on demand, null
+   * if not present.  If _libraryCycle is set, then the _libraryCycle field
+   * for all libraries reachable from this library in the import/export graph
+   * is also set.
+   */
+  List<LibraryElement> _libraryCycle = null;
+
+  /**
    * A list containing all of the compilation units that are included in this
    * library using a `part` directive.
    */
@@ -7527,6 +7537,69 @@
   @override
   LibraryElement get library => this;
 
+  List<LibraryElement> get libraryCycle {
+    if (_libraryCycle != null) {
+      return _libraryCycle;
+    }
+
+    // Global counter for this run of the algorithm
+    int counter = 0;
+    // The discovery times of each library
+    Map<LibraryElementImpl, int> indices = {};
+    // The set of scc candidates
+    Set<LibraryElementImpl> active = new Set();
+    // The stack of discovered elements
+    List<LibraryElementImpl> stack = [];
+    // For a given library that has not yet been processed by this run of the
+    // algorithm, compute the strongly connected components.
+    int scc(LibraryElementImpl library) {
+      int index = counter++;
+      int root = index;
+      indices[library] = index;
+      active.add(library);
+      stack.add(library);
+      void recurse(LibraryElementImpl child) {
+        if (!indices.containsKey(child)) {
+          // We haven't visited this child yet, so recurse on the child,
+          // returning the lowest numbered node reachable from the child.  If
+          // the child can reach a root which is lower numbered than anything
+          // we've reached so far, update the root.
+          root = min(root, scc(child));
+        } else if (active.contains(child)) {
+          // The child has been visited, but has not yet been placed into a
+          // component.  If the child is higher than anything we've seen so far
+          // update the root appropriately.
+          root = min(root, indices[child]);
+        }
+      }
+      // Recurse on all of the children in the import/export graph, filtering
+      // out those for which library cycles have already been computed.
+      library.exportedLibraries
+          .where((l) => l._libraryCycle == null)
+          .forEach(recurse);
+      library.importedLibraries
+          .where((l) => l._libraryCycle == null)
+          .forEach(recurse);
+
+      if (root == index) {
+        // This is the root of a strongly connected component.
+        // Pop the elements, and share the component across all
+        // of the elements.
+        List<LibraryElement> component = <LibraryElement>[];
+        LibraryElementImpl cur = null;
+        do {
+          cur = stack.removeLast();
+          active.remove(cur);
+          component.add(cur);
+          cur._libraryCycle = component;
+        } while (cur != library);
+      }
+      return root;
+    }
+    scc(library);
+    return _libraryCycle;
+  }
+
   @override
   FunctionElement get loadLibraryFunction {
     if (_loadLibraryFunction == null) {
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 9560bff..7ec28c5 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/task/manager.dart';
 import 'package:analyzer/task/dart.dart';
+import 'package:analyzer/task/model.dart' as newContext;
 import 'package:analyzer/task/model.dart';
 import 'package:html/dom.dart' show Document;
 import 'package:plugin/manager.dart';
@@ -1568,6 +1569,11 @@
   }
 
   @override
+  List<newContext.WorkManager> get workManagers {
+    throw new NotImplementedException('In not task-based AnalysisContext.');
+  }
+
+  @override
   void addListener(AnalysisListener listener) {
     if (!_listeners.contains(listener)) {
       _listeners.add(listener);
@@ -9395,6 +9401,11 @@
   TypeResolverVisitorFactory get typeResolverVisitorFactory;
 
   /**
+   * A list of all [WorkManager]s used by this context.
+   */
+  List<newContext.WorkManager> get workManagers;
+
+  /**
    * Return a list containing the sources of the libraries that are exported by
    * the library with the given [source]. The list will be empty if the given
    * source is invalid, if the given source does not represent a library, or if
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 15bbec9..4a8dada 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -904,6 +904,7 @@
         isByTask(BuildSourceImportExportClosureTask.DESCRIPTOR) ||
         isByTask(ComputeConstantDependenciesTask.DESCRIPTOR) ||
         isByTask(ComputeConstantValueTask.DESCRIPTOR) ||
+        isByTask(ComputeLibraryCycleTask.DESCRIPTOR) ||
         isByTask(DartErrorsTask.DESCRIPTOR) ||
         isByTask(EvaluateUnitConstantsTask.DESCRIPTOR) ||
         isByTask(GenerateHintsTask.DESCRIPTOR) ||
@@ -914,11 +915,13 @@
         isByTask(ParseDartTask.DESCRIPTOR) ||
         isByTask(PartiallyResolveUnitReferencesTask.DESCRIPTOR) ||
         isByTask(ScanDartTask.DESCRIPTOR) ||
-        isByTask(ResolveFunctionBodiesInUnitTask.DESCRIPTOR) ||
+        isByTask(ResolveInstanceFieldsInUnitTask.DESCRIPTOR) ||
         isByTask(ResolveLibraryReferencesTask.DESCRIPTOR) ||
         isByTask(ResolveLibraryTypeNamesTask.DESCRIPTOR) ||
+        isByTask(ResolveUnitTask.DESCRIPTOR) ||
         isByTask(ResolveUnitTypeNamesTask.DESCRIPTOR) ||
         isByTask(ResolveVariableReferencesTask.DESCRIPTOR) ||
+        isByTask(StrongModeVerifyUnitTask.DESCRIPTOR) ||
         isByTask(VerifyUnitTask.DESCRIPTOR)) {
       return DeltaResult.KEEP_CONTINUE;
     }
@@ -1240,11 +1243,10 @@
   void _shiftEntryErrors_NEW() {
     _shiftErrors_NEW(HINTS);
     _shiftErrors_NEW(LINTS);
-    _shiftErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS);
     _shiftErrors_NEW(LIBRARY_UNIT_ERRORS);
-    _shiftErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS);
-    _shiftErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS);
     _shiftErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS);
+    _shiftErrors_NEW(RESOLVE_UNIT_ERRORS);
+    _shiftErrors_NEW(STRONG_MODE_ERRORS);
     _shiftErrors_NEW(VARIABLE_REFERENCE_ERRORS);
     _shiftErrors_NEW(VERIFY_ERRORS);
   }
@@ -1311,13 +1313,12 @@
   }
 
   void _updateEntry_NEW() {
-    _updateErrors_NEW(INFER_STATIC_VARIABLE_TYPES_ERRORS, _resolveErrors);
-    _updateErrors_NEW(PARTIALLY_RESOLVE_REFERENCES_ERRORS, _resolveErrors);
-    _updateErrors_NEW(RESOLVE_FUNCTION_BODIES_ERRORS, _resolveErrors);
     _updateErrors_NEW(RESOLVE_TYPE_NAMES_ERRORS, []);
+    _updateErrors_NEW(RESOLVE_UNIT_ERRORS, _resolveErrors);
     _updateErrors_NEW(VARIABLE_REFERENCE_ERRORS, []);
     _updateErrors_NEW(VERIFY_ERRORS, _verifyErrors);
     // invalidate results we don't update incrementally
+    newUnitEntry.setState(STRONG_MODE_ERRORS, CacheState.INVALID);
     newUnitEntry.setState(USED_IMPORTED_ELEMENTS, CacheState.INVALID);
     newUnitEntry.setState(USED_LOCAL_ELEMENTS, CacheState.INVALID);
     newUnitEntry.setState(HINTS, CacheState.INVALID);
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 908c297..84f0f6b 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -3234,6 +3234,9 @@
         variable = new TopLevelVariableElementImpl.forNode(variableName);
       }
       element = variable;
+      if (node.parent.parent is TopLevelVariableDeclaration) {
+        _setDocRange(element, node.parent.parent);
+      }
       if ((node.parent as VariableDeclarationList).type == null) {
         variable.hasImplicitType = true;
       }
@@ -9676,7 +9679,7 @@
 
   @override
   Object visitFieldDeclaration(FieldDeclaration node) {
-    if (strongMode) {
+    if (strongMode && node.isStatic) {
       _addVariables(node.fields.variables);
       bool wasDiscarding = discardErrorsInInitializer;
       discardErrorsInInitializer = true;
@@ -14419,11 +14422,11 @@
       PropertyInducingElementImpl variable =
           accessor.variable as PropertyInducingElementImpl;
       if (accessor.isGetter) {
-        variable.type = type.returnType;
+        variable.type = type.baseReturnType;
       } else if (variable.type == null) {
-        List<DartType> parameterTypes = type.normalParameterTypes;
-        if (parameterTypes != null && parameterTypes.length > 0) {
-          variable.type = parameterTypes[0];
+        List<ParameterElement> parameters = type.baseParameters;
+        if (parameters != null && parameters.length > 0) {
+          variable.type = parameters[0].type;
         }
       }
     }
@@ -15719,13 +15722,26 @@
   }
 
   @override
+  Object visitTypeName(TypeName node) {
+    return null;
+  }
+
+  @override
   Object visitSimpleIdentifier(SimpleIdentifier node) {
     // Ignore if already resolved - declaration or type.
-    if (node.staticElement != null) {
+    if (node.inDeclarationContext()) {
+      return null;
+    }
+    // Ignore if it cannot be a reference to a local variable.
+    AstNode parent = node.parent;
+    if (parent is FieldFormalParameter) {
+      return null;
+    } else if (parent is ConstructorDeclaration && parent.returnType == node) {
+      return null;
+    } else if (parent is ConstructorFieldInitializer && parent.fieldName == node) {
       return null;
     }
     // Ignore if qualified.
-    AstNode parent = node.parent;
     if (parent is PrefixedIdentifier && identical(parent.identifier, node)) {
       return null;
     }
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 1bf502b..c4f034f 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -145,7 +145,7 @@
    * The name of the optional parameter used to specify the category of the
    * library.
    */
-  static String _CATEGORY = "category";
+  static String _CATEGORIES = "categories";
 
   /**
    * The name of the optional parameter used to specify the platforms on which
@@ -183,6 +183,20 @@
    */
   LibraryMap get librariesMap => _librariesMap;
 
+
+  // To be backwards-compatible the new categories field is translated to
+  // an old approximation.
+  String convertCategories(String categories) {
+    switch (categories) {
+      case "": return "Internal";
+      case "Client": return "Client";
+      case "Server": return "Server";
+      case "Client,Server": return "Shared";
+      case "Client,Server,Embedded": return "Shared";
+    }
+    return "Shared";
+  }
+
   @override
   Object visitMapLiteralEntry(MapLiteralEntry node) {
     String libraryName = null;
@@ -200,8 +214,9 @@
         } else if (argument is NamedExpression) {
           String name = argument.name.label.name;
           Expression expression = argument.expression;
-          if (name == _CATEGORY) {
-            library.category = (expression as SimpleStringLiteral).value;
+          if (name == _CATEGORIES) {
+            library.category =
+                convertCategories((expression as StringLiteral).stringValue);
           } else if (name == _IMPLEMENTATION) {
             library.implementation = (expression as BooleanLiteral).value;
           } else if (name == _DOCUMENTED) {
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index 83bfaa1..d120a81 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -4,7 +4,7 @@
 
 library engine.utilities.general;
 
-import 'dart:profiler';
+import 'dart:developer' show UserTag;
 
 /**
  * Jenkins hash function, optimized for small integers.
@@ -33,7 +33,7 @@
 
 /**
  * Helper class for gathering performance statistics.  This class is modeled on
- * the UserTag class in dart:profiler so that it can interoperate easily with
+ * the UserTag class in dart:developer so that it can interoperate easily with
  * it.
  */
 abstract class PerformanceTag {
diff --git a/pkg/analyzer/lib/src/plugin/engine_plugin.dart b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
index f720367..a53deb8 100644
--- a/pkg/analyzer/lib/src/plugin/engine_plugin.dart
+++ b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
@@ -99,21 +99,24 @@
    * Return a list containing all of the contributed analysis error result
    * descriptors for Dart sources.
    */
-  List<TaskDescriptor> get dartErrorsForSource =>
+  @ExtensionPointId('DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID')
+  List<ResultDescriptor> get dartErrorsForSource =>
       dartErrorsForSourceExtensionPoint.extensions;
 
   /**
    * Return a list containing all of the contributed analysis error result
    * descriptors for Dart library specific units.
    */
-  List<TaskDescriptor> get dartErrorsForUnit =>
+  @ExtensionPointId('DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID')
+  List<ResultDescriptor> get dartErrorsForUnit =>
       dartErrorsForUnitExtensionPoint.extensions;
 
   /**
    * Return a list containing all of the contributed analysis error result
    * descriptors for HTML sources.
    */
-  List<TaskDescriptor> get htmlErrors => htmlErrorsExtensionPoint.extensions;
+  @ExtensionPointId('HTML_ERRORS_EXTENSION_POINT_ID')
+  List<ResultDescriptor> get htmlErrors => htmlErrorsExtensionPoint.extensions;
 
   /**
    * Return a list containing all of the task descriptors that were contributed.
@@ -158,19 +161,17 @@
   }
 
   void _registerDartErrorsForSource(RegisterExtension registerExtension) {
-    String id = DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID;
-    registerExtension(id, PARSE_ERRORS);
-    registerExtension(id, SCAN_ERRORS);
+    registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, PARSE_ERRORS);
+    registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, SCAN_ERRORS);
   }
 
   void _registerDartErrorsForUnit(RegisterExtension registerExtension) {
-    String id = DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID;
-    registerExtension(id, LIBRARY_UNIT_ERRORS);
+    registerExtension(
+        DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID, LIBRARY_UNIT_ERRORS);
   }
 
   void _registerHtmlErrors(RegisterExtension registerExtension) {
-    String id = HTML_ERRORS_EXTENSION_POINT_ID;
-    registerExtension(id, HTML_DOCUMENT_ERRORS);
+    registerExtension(HTML_ERRORS_EXTENSION_POINT_ID, HTML_DOCUMENT_ERRORS);
   }
 
   void _registerTaskExtensions(RegisterExtension registerExtension) {
@@ -195,6 +196,7 @@
     registerExtension(taskId, ComputeConstantValueTask.DESCRIPTOR);
     registerExtension(
         taskId, ComputeInferableStaticVariableDependenciesTask.DESCRIPTOR);
+    registerExtension(taskId, ComputeLibraryCycleTask.DESCRIPTOR);
     registerExtension(taskId, ContainingLibrariesTask.DESCRIPTOR);
     registerExtension(taskId, DartErrorsTask.DESCRIPTOR);
     registerExtension(taskId, EvaluateUnitConstantsTask.DESCRIPTOR);
@@ -209,12 +211,14 @@
     registerExtension(taskId, LibraryUnitErrorsTask.DESCRIPTOR);
     registerExtension(taskId, ParseDartTask.DESCRIPTOR);
     registerExtension(taskId, PartiallyResolveUnitReferencesTask.DESCRIPTOR);
-    registerExtension(taskId, ResolveFunctionBodiesInUnitTask.DESCRIPTOR);
+    registerExtension(taskId, ResolveInstanceFieldsInUnitTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryTypeNamesTask.DESCRIPTOR);
+    registerExtension(taskId, ResolveUnitTask.DESCRIPTOR);
     registerExtension(taskId, ResolveUnitTypeNamesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveVariableReferencesTask.DESCRIPTOR);
     registerExtension(taskId, ScanDartTask.DESCRIPTOR);
+    registerExtension(taskId, StrongModeVerifyUnitTask.DESCRIPTOR);
     registerExtension(taskId, VerifyUnitTask.DESCRIPTOR);
     //
     // Register HTML tasks.
@@ -268,3 +272,17 @@
     }
   }
 }
+
+/**
+ * Annotation describing the relationship between a getter in [EnginePlugin]
+ * and the associated identifier (in '../../plugin/task.dart') which can be
+ * passed to the extension manager to populate it.
+ *
+ * This annotation is not used at runtime; it is used to aid in static analysis
+ * of the task model during development.
+ */
+class ExtensionPointId {
+  final String extensionPointId;
+
+  const ExtensionPointId(this.extensionPointId);
+}
diff --git a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
index 9bd0da3..9365a3c 100644
--- a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
+++ b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
@@ -5,6 +5,7 @@
 library analyzer.src.plugin.plugin_configuration;
 
 import 'package:analyzer/plugin/options.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:yaml/yaml.dart';
 
 const _analyzerOptionScope = 'analyzer';
@@ -38,9 +39,7 @@
   if (yaml is String) {
     hosts.add(yaml);
   } else if (yaml is YamlList) {
-    yaml.forEach((h) {
-      hosts.add(_asString(h));
-    });
+    yaml.forEach((h) => hosts.add(_asString(h)));
   }
   return hosts;
 }
@@ -102,7 +101,8 @@
           // Anything but an empty list of plugins is treated as a format error.
           if (pluginConfig != null) {
             throw new PluginConfigFormatException(
-                'Unrecognized plugin config format, expected `YamlMap`, got `${pluginConfig.runtimeType}`',
+                'Unrecognized plugin config format, expected `YamlMap`, '
+                'got `${pluginConfig.runtimeType}`',
                 pluginConfig);
           }
         }
@@ -142,7 +142,8 @@
   }
 
   @override
-  void optionsProcessed(Map<String, YamlNode> options) {
+  void optionsProcessed(
+      AnalysisContext context, Map<String, YamlNode> 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 5601c4a..5efc3ea 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -10,6 +10,11 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/visitors.dart';
 
+/// A registry containing mappings of contexts to their associated configured
+/// lints.
+final Map<AnalysisContext, List<Linter>> lintRegistry =
+    <AnalysisContext, List<Linter>>{};
+
 /// Implementers contribute lint warnings via the provided error [reporter].
 abstract class Linter {
   /// Used to report lint warnings.
@@ -28,6 +33,7 @@
 /// See [LintCode].
 class LintGenerator {
   /// A global container for contributed linters.
+  @deprecated // Use lintRegistry.
   static final List<Linter> LINTERS = <Linter>[];
 
   final Iterable<CompilationUnit> _compilationUnits;
@@ -36,7 +42,7 @@
 
   LintGenerator(this._compilationUnits, this._errorListener,
       [Iterable<Linter> linters])
-      : _linters = linters != null ? linters : LINTERS;
+      : _linters = linters ?? LINTERS;
 
   void generate() {
     PerformanceStatistics.lint.makeCurrentWhile(() {
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 2091fdc..6ed3964 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -30,6 +30,8 @@
 import 'package:analyzer/src/task/inputs.dart';
 import 'package:analyzer/src/task/model.dart';
 import 'package:analyzer/src/task/strong_mode.dart';
+import 'package:analyzer/src/task/strong/checker.dart';
+import 'package:analyzer/src/task/strong/rules.dart';
 import 'package:analyzer/task/dart.dart';
 import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/model.dart';
@@ -79,6 +81,8 @@
  * constants defined at top level, statically inside classes, and local to
  * functions, as well as constant constructors, annotations, and default values
  * of parameters to constant constructors.
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
  */
 final ListResultDescriptor<
         ConstantEvaluationTarget> COMPILATION_UNIT_CONSTANTS =
@@ -112,6 +116,9 @@
  * A [ConstantEvaluationTarget] that has been successfully constant-evaluated.
  *
  * TODO(paulberry): is ELEMENT_CACHING_POLICY the correct caching policy?
+ *
+ * The result is only available for [ConstantEvaluationTarget]s.
+ *
  */
 final ResultDescriptor<ConstantEvaluationTarget> CONSTANT_VALUE =
     new ResultDescriptor<ConstantEvaluationTarget>('CONSTANT_VALUE', null,
@@ -155,28 +162,41 @@
     new ListResultDescriptor<Source>('IMPORT_EXPORT_SOURCE_CLOSURE', null);
 
 /**
- * The errors produced while inferring the type of a static variable.
+ * A list of the [LibraryElement]s that make up the strongly connected
+ * component in the import/export graph in which the target resides.
  *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [VariableElement]s, and only when strong
- * mode is enabled.
- */
-final ListResultDescriptor<AnalysisError> INFER_STATIC_VARIABLE_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'INFER_STATIC_VARIABLE_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while inferring the types of all of the static variables
- * in a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
+ * Only non-empty in strongMode
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
-final ListResultDescriptor<AnalysisError> INFER_STATIC_VARIABLE_TYPES_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'INFER_STATIC_VARIABLE_TYPES_ERRORS', AnalysisError.NO_ERRORS);
+final ListResultDescriptor<LibraryElement> LIBRARY_CYCLE =
+    new ListResultDescriptor<LibraryElement>('LIBRARY_CYCLE', null);
+
+/**
+ * A list of the [CompilationUnitElement]s (including all parts) that make up
+ * the strongly connected component in the import/export graph in which the
+ * target resides.
+ *
+ * Only non-empty in strongMode
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ListResultDescriptor<CompilationUnitElement> LIBRARY_CYCLE_UNITS =
+    new ListResultDescriptor<CompilationUnitElement>(
+        'LIBRARY_CYCLE_UNITS', null);
+
+/**
+ * A list of the [CompilationUnitElement]s that comprise all of the parts and
+ * libraries in the direct import/export dependencies of the library cycle
+ * of the target, with the intra-component dependencies excluded.
+ *
+ * Only non-empty in strongMode
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ListResultDescriptor<CompilationUnitElement> LIBRARY_CYCLE_DEPENDENCIES =
+    new ListResultDescriptor<CompilationUnitElement>(
+        'LIBRARY_CYCLE_DEPENDENCIES', null);
 
 /**
  * A list of the [VariableElement]s whose type should be inferred that another
@@ -315,17 +335,6 @@
         'PARSE_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
- * The errors produced while resolving references outside of function bodies.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> PARTIALLY_RESOLVE_REFERENCES_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'PARTIALLY_RESOLVE_REFERENCES_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
  * The names (resolved and not) referenced by a unit.
  *
  * The result is only available for [Source]s representing a compilation unit.
@@ -334,16 +343,15 @@
     new ResultDescriptor<ReferencedNames>('REFERENCED_NAMES', null);
 
 /**
- * The errors produced while resolving the function bodies within a compilation
- * unit.
+ * The errors produced while resolving a full compilation unit.
  *
  * The list will be empty if there were no errors, but will not be `null`.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
-final ListResultDescriptor<AnalysisError> RESOLVE_FUNCTION_BODIES_ERRORS =
+final ListResultDescriptor<AnalysisError> RESOLVE_UNIT_ERRORS =
     new ListResultDescriptor<AnalysisError>(
-        'RESOLVE_FUNCTION_BODIES_ERRORS', AnalysisError.NO_ERRORS);
+        'RESOLVE_UNIT_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
  * The errors produced while resolving type names.
@@ -357,9 +365,11 @@
         'RESOLVE_TYPE_NAMES_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
- * The partially resolved [CompilationUnit] associated with a unit.
+ * The partially resolved [CompilationUnit] associated with a compilation unit.
  *
- * All declarations bound to the element defined by the declaration.
+ * Tasks that use this value as an input can assume that the [SimpleIdentifier]s
+ * at all declaration sites have been bound to the element defined by the
+ * declaration, except for the constants defined in an 'enum' declaration.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -368,9 +378,11 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The partially resolved [CompilationUnit] associated with a unit.
+ * The partially resolved [CompilationUnit] associated with a compilation unit.
  *
- * All the enum member elements are built.
+ * Tasks that use this value as an input can assume that the [SimpleIdentifier]s
+ * at all declaration sites have been bound to the element defined by the
+ * declaration, including for the constants defined in an 'enum' declaration.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -379,9 +391,12 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The partially resolved [CompilationUnit] associated with a unit.
+ * The partially resolved [CompilationUnit] associated with a compilation unit.
  *
- * [RESOLVED_UNIT2] with resolved type names.
+ * 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.
  */
@@ -390,9 +405,11 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The partially resolved [CompilationUnit] associated with a unit.
+ * The partially resolved [CompilationUnit] associated with a compilation unit.
  *
- * [RESOLVED_UNIT3] plus resolved local variables and formal parameters.
+ * 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.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -401,9 +418,11 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The resolved [CompilationUnit] associated with a compilation unit in which
- * elements and types have been initially resolved outside of method bodies in
- * addition to everything that is true of a [RESOLVED_UNIT4].
+ * 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 have been initially resolved
+ * outside of method bodies.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -412,9 +431,10 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The resolved [CompilationUnit] associated with a compilation unit in which
- * the types of static variables have been inferred in addition to everything
- * that is true of a [RESOLVED_UNIT5].
+ * 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 static variables have been inferred.
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -424,8 +444,8 @@
 
 /**
  * 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_UNIT7].
+ * the right hand sides of instance variables have been re-resolved in addition
+ * to everything that is true of a [RESOLVED_UNIT6].
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -434,8 +454,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_UNIT7].
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -444,6 +465,26 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
+ * The resolved [CompilationUnit] associated with a compilation unit, with
+ * constants not yet resolved.
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ResultDescriptor<CompilationUnit> RESOLVED_UNIT9 =
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT9', null,
+        cachingPolicy: AST_CACHING_POLICY);
+
+/**
+ * The resolved [CompilationUnit] associated with a compilation unit, with
+ * constants resolved.
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ResultDescriptor<CompilationUnit> RESOLVED_UNIT10 =
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT10', null,
+        cachingPolicy: AST_CACHING_POLICY);
+
+/**
  * The errors produced while scanning a compilation unit.
  *
  * The list will be empty if there were no errors, but will not be `null`.
@@ -455,6 +496,20 @@
         'SCAN_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
+ * The additional strong mode errors produced while verifying a
+ * compilation unit.
+ *
+ * The list will be empty if there were no errors, but will not be `null`.
+ *
+ * The result is only available for [LibrarySpecificUnits]s representing a
+ * compilation unit.
+ *
+ */
+final ListResultDescriptor<AnalysisError> STRONG_MODE_ERRORS =
+    new ListResultDescriptor<AnalysisError>(
+        'STRONG_MODE_ERRORS', AnalysisError.NO_ERRORS);
+
+/**
  * The [TypeProvider] of the [AnalysisContext].
  */
 final ResultDescriptor<TypeProvider> TYPE_PROVIDER =
@@ -1495,7 +1550,7 @@
  */
 class ComputeConstantDependenciesTask extends ConstantEvaluationAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT9] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -1551,13 +1606,13 @@
       CompilationUnitElementImpl unit = target
           .getAncestor((Element element) => element is CompilationUnitElement);
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT8
+        UNIT_INPUT: RESOLVED_UNIT9
             .of(new LibrarySpecificUnit(unit.librarySource, target.source)),
         TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
       };
     } else if (target is ConstantEvaluationTarget_Annotation) {
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT8
+        UNIT_INPUT: RESOLVED_UNIT9
             .of(new LibrarySpecificUnit(target.librarySource, target.source)),
         TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
       };
@@ -1756,6 +1811,88 @@
 }
 
 /**
+ * A task that computes the [LIBRARY_CYCLE] for a
+ * library element.  Also computes the [LIBRARY_CYCLE_UNITS] and the
+ * [LIBRARY_CYCLE_DEPENDENCIES].
+ */
+class ComputeLibraryCycleTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the [LIBRARY_ELEMENT2] input.
+   */
+  static const String LIBRARY_ELEMENT_INPUT = 'LIBRARY_ELEMENT_INPUT';
+
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ComputeLibraryCycleForUnitTask',
+      createTask,
+      buildInputs, <ResultDescriptor>[
+    LIBRARY_CYCLE,
+    LIBRARY_CYCLE_UNITS,
+    LIBRARY_CYCLE_DEPENDENCIES
+  ]);
+
+  ComputeLibraryCycleTask(
+      InternalAnalysisContext context, AnalysisTarget target)
+      : super(context, target);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    if (context.analysisOptions.strongMode) {
+      LibraryElementImpl library = getRequiredInput(LIBRARY_ELEMENT_INPUT);
+      List<LibraryElement> component = library.libraryCycle;
+      Set<LibraryElement> filter = new Set<LibraryElement>.from(component);
+      Set<CompilationUnitElement> deps = new Set<CompilationUnitElement>();
+      void addLibrary(l) {
+        if (!filter.contains(l)) {
+          deps.addAll(l.units);
+        }
+      }
+      for (LibraryElement l in component) {
+        l.importedLibraries.forEach(addLibrary);
+        l.exportedLibraries.forEach(addLibrary);
+      }
+
+      //
+      // Record outputs.
+      //
+      outputs[LIBRARY_CYCLE] = component;
+      outputs[LIBRARY_CYCLE_UNITS] = component.expand((l) => l.units).toList();
+      outputs[LIBRARY_CYCLE_DEPENDENCIES] = deps.toList();
+    } else {
+      outputs[LIBRARY_CYCLE] = [];
+      outputs[LIBRARY_CYCLE_UNITS] = [];
+      outputs[LIBRARY_CYCLE_DEPENDENCIES] = [];
+    }
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the
+   * given [target].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      'resolveReachableLibraries': IMPORT_EXPORT_SOURCE_CLOSURE
+          .of(unit.library)
+          .toListOf(LIBRARY_ELEMENT2),
+      LIBRARY_ELEMENT_INPUT: LIBRARY_ELEMENT2.of(unit.library)
+    };
+  }
+
+  /**
+   * Create a [ComputeLibraryCycleTask] based on the
+   * given [target] in the given [context].
+   */
+  static ComputeLibraryCycleTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new ComputeLibraryCycleTask(context, target);
+  }
+}
+
+/**
  * A base class for analysis tasks whose target is expected to be a
  * [ConstantEvaluationTarget].
  */
@@ -2010,11 +2147,11 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT] for a unit.
+ * A task that builds [RESOLVED_UNIT10] for a unit.
  */
 class EvaluateUnitConstantsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT9] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2030,7 +2167,7 @@
       'EvaluateUnitConstantsTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[RESOLVED_UNIT]);
+      <ResultDescriptor>[RESOLVED_UNIT10]);
 
   EvaluateUnitConstantsTask(AnalysisContext context, LibrarySpecificUnit target)
       : super(context, target);
@@ -2043,7 +2180,7 @@
     // 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_UNIT] = unit;
+    outputs[RESOLVED_UNIT10] = unit;
   }
 
   /**
@@ -2055,7 +2192,7 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       'libraryElement': LIBRARY_ELEMENT.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT8.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT9.of(unit),
       CONSTANT_VALUES:
           COMPILATION_UNIT_CONSTANTS.of(unit).toListOf(CONSTANT_VALUE)
     };
@@ -2179,7 +2316,7 @@
  */
 class GatherUsedImportedElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT9] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2223,7 +2360,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT8.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT9.of(unit)};
   }
 
   /**
@@ -2241,7 +2378,7 @@
  */
 class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT9] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2285,7 +2422,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT8.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT9.of(unit)};
   }
 
   /**
@@ -2303,7 +2440,7 @@
  */
 class GenerateHintsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT9] input.
    */
   static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
 
@@ -2436,26 +2573,11 @@
  */
 class GenerateLintsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT8] input.
+   * The name of the [RESOLVED_UNIT] input.
    */
   static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
 
   /**
-   * The name of a list of [USED_LOCAL_ELEMENTS] for each library unit input.
-   */
-  static const String USED_LOCAL_ELEMENTS_INPUT = 'USED_LOCAL_ELEMENTS';
-
-  /**
-   * The name of a list of [USED_IMPORTED_ELEMENTS] for each library unit input.
-   */
-  static const String USED_IMPORTED_ELEMENTS_INPUT = 'USED_IMPORTED_ELEMENTS';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
@@ -2488,9 +2610,9 @@
     //
     // Generate lints.
     //
-    LintGenerator.LINTERS.forEach((l) => l.reporter = errorReporter);
-    Iterable<AstVisitor> visitors =
-        LintGenerator.LINTERS.map((l) => l.getVisitor()).toList();
+    List<Linter> linters = lintRegistry[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)));
 
     //
@@ -2540,7 +2662,7 @@
       'InferInstanceMembersInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[RESOLVED_UNIT7]);
+      <ResultDescriptor>[RESOLVED_UNIT8]);
 
   /**
    * Initialize a newly created task to build a library element for the given
@@ -2571,6 +2693,121 @@
     //
     // Record outputs.
     //
+    outputs[RESOLVED_UNIT8] = 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
+   * [libSource].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      UNIT_INPUT: RESOLVED_UNIT7.of(unit),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
+      // In strong mode, add additional dependencies to enforce inference
+      // ordering.
+
+      // Require that field re-resolution be complete for all units in the
+      // current library cycle.
+      'orderLibraryCycleTasks': LIBRARY_CYCLE_UNITS.of(unit).toList(
+          (CompilationUnitElementImpl unit) => RESOLVED_UNIT7
+              .of(new LibrarySpecificUnit(unit.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) => RESOLVED_UNIT8
+              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
+    };
+  }
+
+  /**
+   * Create a [InferInstanceMembersInUnitTask] based on the given [target] in
+   * the given [context].
+   */
+  static InferInstanceMembersInUnitTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new InferInstanceMembersInUnitTask(context, target);
+  }
+}
+
+/**
+ * A task that ensures that all of the inferrable instance members in a
+ * compilation unit have had their right hand sides re-resolved
+ */
+class ResolveInstanceFieldsInUnitTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the [LIBRARY_ELEMENT5] input.
+   */
+  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
+
+  /**
+   * The name of the [TYPE_PROVIDER] input.
+   */
+  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
+
+  /**
+   * The name of the input whose value is the [RESOLVED_UNIT6] for the
+   * compilation unit.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ResolveInstanceFieldsInUnitTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[RESOLVED_UNIT7]);
+
+  /**
+   * Initialize a newly created task to build a library element for the given
+   * [unit] in the given [context].
+   */
+  ResolveInstanceFieldsInUnitTask(
+      InternalAnalysisContext context, LibrarySpecificUnit unit)
+      : super(context, unit);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    //
+    // Prepare inputs.
+    //
+    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+
+    CompilationUnitElement unitElement = unit.element;
+    if (context.analysisOptions.strongMode) {
+      //
+      // Resolve references.
+      //
+      // TODO(leafp): This code only needs to re-resolve the right hand sides of
+      // instance fields.  We could do incremental resolution on each field
+      // only using the incremental resolver.  However, this caused a massive
+      // performance degredation on the large_class_declaration_test.dart test.
+      // I would hypothesize that incremental resolution of field is linear in
+      // the size of the enclosing class, and hence incrementally resolving each
+      // field was quadratic.  We may wish to revisit this if we can resolve
+      // this performance issue.
+      InheritanceManager inheritanceManager =
+          new InheritanceManager(libraryElement);
+      PartialResolverVisitor visitor = new PartialResolverVisitor(
+          libraryElement,
+          unitElement.source,
+          typeProvider,
+          AnalysisErrorListener.NULL_LISTENER,
+          inheritanceManager: inheritanceManager);
+      unit.accept(visitor);
+    }
+    //
+    // Record outputs.
+    //
     outputs[RESOLVED_UNIT7] = unit;
   }
 
@@ -2583,17 +2820,31 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       UNIT_INPUT: RESOLVED_UNIT6.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
+      LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
+      // In strong mode, add additional dependencies to enforce inference
+      // ordering.
+
+      // Require that static variable inference  be complete for all units in
+      // the current library cycle.
+      'orderLibraryCycleTasks': LIBRARY_CYCLE_UNITS.of(unit).toList(
+          (CompilationUnitElementImpl unit) => RESOLVED_UNIT6
+              .of(new LibrarySpecificUnit(unit.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) => RESOLVED_UNIT8
+              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
     };
   }
 
   /**
-   * Create a [InferInstanceMembersInUnitTask] based on the given [target] in
+   * Create a [ResolveInstanceFieldsInUnitTask] based on the given [target] in
    * the given [context].
    */
-  static InferInstanceMembersInUnitTask createTask(
+  static ResolveInstanceFieldsInUnitTask createTask(
       AnalysisContext context, AnalysisTarget target) {
-    return new InferInstanceMembersInUnitTask(context, target);
+    return new ResolveInstanceFieldsInUnitTask(context, target);
   }
 }
 
@@ -2642,20 +2893,13 @@
   static const String INFERRED_VARIABLES_INPUT = 'INFERRED_VARIABLES_INPUT';
 
   /**
-   * The name of the input whose value is a list of the errors produced while
-   * inferring types for static variables.
-   */
-  static const String INFER_STATIC_VARIABLE_ERRORS_INPUT =
-      'INFER_STATIC_VARIABLE_ERRORS';
-
-  /**
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
       'InferStaticVariableTypesInUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[INFER_STATIC_VARIABLE_TYPES_ERRORS, RESOLVED_UNIT6]);
+      <ResultDescriptor>[RESOLVED_UNIT6]);
 
   /**
    * Initialize a newly created task to build a library element for the given
@@ -2674,18 +2918,11 @@
     // Prepare inputs.
     //
     CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    List<List<AnalysisError>> perVariableErrors =
-        getRequiredInput(INFER_STATIC_VARIABLE_ERRORS_INPUT);
-    List<AnalysisError> errors = <AnalysisError>[];
-    for (List<AnalysisError> variableErrors in perVariableErrors) {
-      errors.addAll(variableErrors);
-    }
     //
     // Record outputs. There is no additional work to be done at this time
     // because the work has implicitly been done by virtue of the task model
     // preparing all of the inputs.
     //
-    outputs[INFER_STATIC_VARIABLE_TYPES_ERRORS] = errors;
     outputs[RESOLVED_UNIT6] = unit;
   }
 
@@ -2700,9 +2937,6 @@
       INFERRED_VARIABLES_INPUT: INFERABLE_STATIC_VARIABLES_IN_UNIT
           .of(unit)
           .toListOf(INFERRED_STATIC_VARIABLE),
-      INFER_STATIC_VARIABLE_ERRORS_INPUT: INFERABLE_STATIC_VARIABLES_IN_UNIT
-          .of(unit)
-          .toListOf(INFER_STATIC_VARIABLE_ERRORS),
       UNIT_INPUT: RESOLVED_UNIT5.of(unit)
     };
   }
@@ -2741,10 +2975,8 @@
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
       'InferStaticVariableTypeTask',
       createTask,
-      buildInputs, <ResultDescriptor>[
-    INFER_STATIC_VARIABLE_ERRORS,
-    INFERRED_STATIC_VARIABLE
-  ]);
+      buildInputs,
+      <ResultDescriptor>[INFERRED_STATIC_VARIABLE]);
 
   InferStaticVariableTypeTask(
       InternalAnalysisContext context, VariableElement variable)
@@ -2769,29 +3001,28 @@
 
     CompilationUnit unit = getRequiredInput(UNIT_INPUT);
     TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    VariableDeclaration declaration = getDeclaration(unit);
-    //
-    // Re-resolve the variable's initializer so that the inferred types of other
-    // variables will be propagated.
-    //
-    Expression initializer = declaration.initializer;
-    ResolutionEraser.erase(initializer, eraseDeclarations: false);
-    ResolutionContext resolutionContext =
-        ResolutionContextBuilder.contextFor(initializer, errorListener);
-    ResolverVisitor visitor = new ResolverVisitor(
-        variable.library, variable.source, typeProvider, errorListener,
-        nameScope: resolutionContext.scope);
-    if (resolutionContext.enclosingClassDeclaration != null) {
-      visitor.prepareToResolveMembersInClass(
-          resolutionContext.enclosingClassDeclaration);
-    }
-    visitor.initForIncrementalResolution();
-    initializer.accept(visitor);
 
     // If we're not in a dependency cycle, and we have no type annotation,
-    // do inference.
+    // re-resolve the right hand side and do inference.
     if (dependencyCycle == null && variable.hasImplicitType) {
+      VariableDeclaration declaration = getDeclaration(unit);
+      //
+      // Re-resolve the variable's initializer so that the inferred types
+      // of other variables will be propagated.
+      //
+      Expression initializer = declaration.initializer;
+      ResolutionContext resolutionContext = ResolutionContextBuilder.contextFor(
+          initializer, AnalysisErrorListener.NULL_LISTENER);
+      ResolverVisitor visitor = new ResolverVisitor(variable.library,
+          variable.source, typeProvider, AnalysisErrorListener.NULL_LISTENER,
+          nameScope: resolutionContext.scope);
+      if (resolutionContext.enclosingClassDeclaration != null) {
+        visitor.prepareToResolveMembersInClass(
+            resolutionContext.enclosingClassDeclaration);
+      }
+      visitor.initForIncrementalResolution();
+      initializer.accept(visitor);
+
       //
       // Record the type of the variable.
       //
@@ -2819,7 +3050,6 @@
     // Record outputs.
     //
     outputs[INFERRED_STATIC_VARIABLE] = variable;
-    outputs[INFER_STATIC_VARIABLE_ERRORS] = errorListener.errors;
   }
 
   /**
@@ -2836,7 +3066,15 @@
           .of(variable)
           .toListOf(INFERRED_STATIC_VARIABLE),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT5.of(unit)
+      UNIT_INPUT: RESOLVED_UNIT5.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) => RESOLVED_UNIT8
+              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
     };
   }
 
@@ -2923,22 +3161,9 @@
   static const String LINTS_INPUT = 'LINTS';
 
   /**
-   * The name of the [INFER_STATIC_VARIABLE_TYPES_ERRORS] input.
+   * The name of the [STRONG_MODE_ERRORS] input.
    */
-  static const String INFER_STATIC_VARIABLE_TYPES_ERRORS_INPUT =
-      'INFER_STATIC_VARIABLE_TYPES_ERRORS';
-
-  /**
-   * The name of the [PARTIALLY_RESOLVE_REFERENCES_ERRORS] input.
-   */
-  static const String PARTIALLY_RESOLVE_REFERENCES_ERRORS_INPUT =
-      'PARTIALLY_RESOLVE_REFERENCES_ERRORS';
-
-  /**
-   * The name of the [RESOLVE_FUNCTION_BODIES_ERRORS] input.
-   */
-  static const String RESOLVE_FUNCTION_BODIES_ERRORS_INPUT =
-      'RESOLVE_FUNCTION_BODIES_ERRORS';
+  static const String STRONG_MODE_ERRORS_INPUT = 'STRONG_MODE_ERRORS';
 
   /**
    * The name of the [RESOLVE_TYPE_NAMES_ERRORS] input.
@@ -2947,6 +3172,11 @@
       'RESOLVE_TYPE_NAMES_ERRORS';
 
   /**
+   * The name of the [RESOLVE_UNIT_ERRORS] input.
+   */
+  static const String RESOLVE_UNIT_ERRORS_INPUT = 'RESOLVE_UNIT_ERRORS';
+
+  /**
    * The name of the [VARIABLE_REFERENCE_ERRORS] input.
    */
   static const String VARIABLE_REFERENCE_ERRORS_INPUT =
@@ -2982,10 +3212,9 @@
     errorLists.add(getRequiredInput(BUILD_LIBRARY_ERRORS_INPUT));
     errorLists.add(getRequiredInput(HINTS_INPUT));
     errorLists.add(getRequiredInput(LINTS_INPUT));
-    errorLists.add(getRequiredInput(INFER_STATIC_VARIABLE_TYPES_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(PARTIALLY_RESOLVE_REFERENCES_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(RESOLVE_FUNCTION_BODIES_ERRORS_INPUT));
     errorLists.add(getRequiredInput(RESOLVE_TYPE_NAMES_ERRORS_INPUT));
+    errorLists.add(getRequiredInput(RESOLVE_UNIT_ERRORS_INPUT));
+    errorLists.add(getRequiredInput(STRONG_MODE_ERRORS_INPUT));
     errorLists.add(getRequiredInput(VARIABLE_REFERENCE_ERRORS_INPUT));
     errorLists.add(getRequiredInput(VERIFY_ERRORS_INPUT));
     //
@@ -3004,13 +3233,9 @@
     Map<String, TaskInput> inputs = <String, TaskInput>{
       HINTS_INPUT: HINTS.of(unit),
       LINTS_INPUT: LINTS.of(unit),
-      INFER_STATIC_VARIABLE_TYPES_ERRORS_INPUT:
-          INFER_STATIC_VARIABLE_TYPES_ERRORS.of(unit),
-      PARTIALLY_RESOLVE_REFERENCES_ERRORS_INPUT:
-          PARTIALLY_RESOLVE_REFERENCES_ERRORS.of(unit),
-      RESOLVE_FUNCTION_BODIES_ERRORS_INPUT:
-          RESOLVE_FUNCTION_BODIES_ERRORS.of(unit),
       RESOLVE_TYPE_NAMES_ERRORS_INPUT: RESOLVE_TYPE_NAMES_ERRORS.of(unit),
+      RESOLVE_UNIT_ERRORS_INPUT: RESOLVE_UNIT_ERRORS.of(unit),
+      STRONG_MODE_ERRORS_INPUT: STRONG_MODE_ERRORS.of(unit),
       VARIABLE_REFERENCE_ERRORS_INPUT: VARIABLE_REFERENCE_ERRORS.of(unit),
       VERIFY_ERRORS_INPUT: VERIFY_ERRORS.of(unit)
     };
@@ -3039,7 +3264,9 @@
 }
 
 /**
- * A task that parses the content of a Dart file, producing an AST structure.
+ * A task that parses the content of a Dart file, producing an AST structure,
+ * any lexical errors found in the process, the kind of the file (library or
+ * part), and several lists based on the AST.
  */
 class ParseDartTask extends SourceBasedAnalysisTask {
   /**
@@ -3251,11 +3478,8 @@
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
       'PartiallyResolveUnitReferencesTask',
       createTask,
-      buildInputs, <ResultDescriptor>[
-    INFERABLE_STATIC_VARIABLES_IN_UNIT,
-    PARTIALLY_RESOLVE_REFERENCES_ERRORS,
-    RESOLVED_UNIT5
-  ]);
+      buildInputs,
+      <ResultDescriptor>[INFERABLE_STATIC_VARIABLES_IN_UNIT, RESOLVED_UNIT5]);
 
   PartiallyResolveUnitReferencesTask(
       InternalAnalysisContext context, AnalysisTarget target)
@@ -3266,7 +3490,6 @@
 
   @override
   void internalPerform() {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
     //
     // Prepare inputs.
     //
@@ -3275,20 +3498,23 @@
     CompilationUnitElement unitElement = unit.element;
     TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
     //
-    // Resolve references.
+    // Resolve references and record outputs.
     //
-    InheritanceManager inheritanceManager =
-        new InheritanceManager(libraryElement);
-    PartialResolverVisitor visitor = new PartialResolverVisitor(
-        libraryElement, unitElement.source, typeProvider, errorListener,
-        inheritanceManager: inheritanceManager);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = visitor.variablesAndFields;
-    outputs[PARTIALLY_RESOLVE_REFERENCES_ERRORS] =
-        removeDuplicateErrors(errorListener.errors);
+    if (context.analysisOptions.strongMode) {
+      InheritanceManager inheritanceManager =
+          new InheritanceManager(libraryElement);
+      PartialResolverVisitor visitor = new PartialResolverVisitor(
+          libraryElement,
+          unitElement.source,
+          typeProvider,
+          AnalysisErrorListener.NULL_LISTENER,
+          inheritanceManager: inheritanceManager);
+      unit.accept(visitor);
+
+      outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = visitor.variablesAndFields;
+    } else {
+      outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = [];
+    }
     outputs[RESOLVED_UNIT5] = unit;
   }
 
@@ -3305,7 +3531,15 @@
           .toListOf(LIBRARY_ELEMENT5),
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
       UNIT_INPUT: RESOLVED_UNIT4.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
+      // In strong mode, add additional dependencies to enforce inference
+      // ordering.
+
+      // Require that full inference be complete for all dependencies of the
+      // current library cycle.
+      'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES.of(unit).toList(
+          (CompilationUnitElementImpl unit) => RESOLVED_UNIT8
+              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
     };
   }
 
@@ -3460,24 +3694,29 @@
  * A task that resolves the bodies of top-level functions, constructors, and
  * methods within a single compilation unit.
  */
-class ResolveFunctionBodiesInUnitTask extends SourceBasedAnalysisTask {
+class ResolveUnitTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the input whose value is the defining [LIBRARY_ELEMENT5].
+   */
+  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
+
   /**
    * The name of the [TYPE_PROVIDER] input.
    */
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   /**
-   * The name of the [RESOLVED_UNIT7] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveFunctionBodiesInUnitTask',
+      'ResolveUnitTask',
       createTask,
       buildInputs,
-      <ResultDescriptor>[RESOLVE_FUNCTION_BODIES_ERRORS, RESOLVED_UNIT8]);
+      <ResultDescriptor>[RESOLVE_UNIT_ERRORS, RESOLVED_UNIT9]);
 
-  ResolveFunctionBodiesInUnitTask(
+  ResolveUnitTask(
       InternalAnalysisContext context, LibrarySpecificUnit compilationUnit)
       : super(context, compilationUnit);
 
@@ -3489,62 +3728,22 @@
     //
     // Prepare inputs.
     //
+    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
     CompilationUnit unit = getRequiredInput(UNIT_INPUT);
     TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
     //
-    // Resolve function bodies.
+    // Resolve everything
     //
     CompilationUnitElement unitElement = unit.element;
     RecordingErrorListener errorListener = new RecordingErrorListener();
-    for (CompilationUnitMember unitMember in unit.declarations) {
-      if (unitMember is FunctionDeclaration) {
-        _resolveFunctionBody(unitMember.functionExpression.body, unitElement,
-            typeProvider, errorListener);
-      } else if (unitMember is ClassDeclaration) {
-        for (ClassMember classMember in unitMember.members) {
-          if (classMember is ConstructorDeclaration) {
-            _resolveFunctionBody(
-                classMember.body, unitElement, typeProvider, errorListener);
-          } else if (classMember is MethodDeclaration) {
-            _resolveFunctionBody(
-                classMember.body, unitElement, typeProvider, errorListener);
-          }
-        }
-      }
-    }
+    ResolverVisitor visitor = new ResolverVisitor(
+        libraryElement, unitElement.source, typeProvider, errorListener);
+    unit.accept(visitor);
     //
     // Record outputs.
     //
-    outputs[RESOLVE_FUNCTION_BODIES_ERRORS] = errorListener.errors;
-    outputs[RESOLVED_UNIT8] = unit;
-  }
-
-  void _resolveFunctionBody(
-      FunctionBody functionBody,
-      CompilationUnitElement unitElement,
-      TypeProvider typeProvider,
-      RecordingErrorListener errorListener) {
-    ResolutionContext resolutionContext =
-        ResolutionContextBuilder.contextFor(functionBody, errorListener);
-    ResolverVisitor visitor = new ResolverVisitor(
-        unitElement.library, unitElement.source, typeProvider, errorListener,
-        nameScope: resolutionContext.scope);
-    if (resolutionContext.enclosingClassDeclaration != null) {
-      visitor.prepareToResolveMembersInClass(
-          resolutionContext.enclosingClassDeclaration);
-    }
-    Declaration declaration = functionBody.getAncestor((AstNode node) =>
-        node is ConstructorDeclaration ||
-            node is FunctionDeclaration ||
-            node is MethodDeclaration);
-    visitor.initForIncrementalResolution(declaration);
-    functionBody.accept(visitor);
-    if (declaration is FunctionDeclaration) {
-      // This is in the wrong place. The propagated return type is stored
-      // locally in the resolver, not in the declaration (or element). Hence,
-      // this needs to happen later.
-      declaration.accept(visitor.typeAnalyzer);
-    }
+    outputs[RESOLVE_UNIT_ERRORS] = errorListener.errors;
+    outputs[RESOLVED_UNIT9] = unit;
   }
 
   /**
@@ -3555,18 +3754,27 @@
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
+      LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
       TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT7.of(unit)
+      UNIT_INPUT: RESOLVED_UNIT8.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) => RESOLVED_UNIT8
+              .of(new LibrarySpecificUnit(unit.librarySource, unit.source)))
     };
   }
 
   /**
-   * Create a [ResolveFunctionBodiesInUnitTask] based on the given [target] in
+   * Create a [ResolveUnitTask] based on the given [target] in
    * the given [context].
    */
-  static ResolveFunctionBodiesInUnitTask createTask(
+  static ResolveUnitTask createTask(
       AnalysisContext context, AnalysisTarget target) {
-    return new ResolveFunctionBodiesInUnitTask(context, target);
+    return new ResolveUnitTask(context, target);
   }
 }
 
@@ -3581,7 +3789,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the list of [RESOLVED_UNIT8] input.
+   * The name of the list of [RESOLVED_UNIT9] input.
    */
   static const String UNITS_INPUT = 'UNITS_INPUT';
 
@@ -3630,12 +3838,12 @@
     return <String, TaskInput>{
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(source),
       UNITS_INPUT: UNITS.of(source).toList((Source unit) =>
-          RESOLVED_UNIT8.of(new LibrarySpecificUnit(source, unit))),
+          RESOLVED_UNIT9.of(new LibrarySpecificUnit(source, unit))),
       'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
           .of(source)
           .toMapOf(UNITS)
           .toFlattenList((Source library, Source unit) =>
-              RESOLVED_UNIT8.of(new LibrarySpecificUnit(library, unit))),
+              RESOLVED_UNIT9.of(new LibrarySpecificUnit(library, unit))),
     };
   }
 
@@ -3742,7 +3950,6 @@
 
   @override
   void internalPerform() {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
     //
     // Prepare inputs.
     //
@@ -3753,6 +3960,7 @@
     //
     // Resolve TypeName nodes.
     //
+    RecordingErrorListener errorListener = new RecordingErrorListener();
     TypeResolverVisitor visitor = new TypeResolverVisitor(
         library, unitElement.source, typeProvider, errorListener);
     unit.accept(visitor);
@@ -3770,6 +3978,9 @@
    * given [target].
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    // TODO(brianwilkerson) This task updates the element model to have type
+    // information and updates the class hierarchy. It should produce a new
+    // version of the element model in order to record those changes.
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       'importsExportNamespace':
@@ -3827,19 +4038,19 @@
 
   @override
   void internalPerform() {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
     //
     // Prepare inputs.
     //
     LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
     CompilationUnit unit = getRequiredInput(UNIT_INPUT);
     CompilationUnitElement unitElement = unit.element;
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
     //
     // Resolve local variables.
     //
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    RecordingErrorListener errorListener = new RecordingErrorListener();
     Scope nameScope = new LibraryScope(libraryElement, errorListener);
-    AstVisitor visitor = new VariableResolverVisitor(
+    VariableResolverVisitor visitor = new VariableResolverVisitor(
         libraryElement, unitElement.source, typeProvider, errorListener,
         nameScope: nameScope);
     unit.accept(visitor);
@@ -3876,7 +4087,8 @@
 }
 
 /**
- * A task that scans the content of a file, producing a set of Dart tokens.
+ * A task that scans the content of a Dart file, producing a stream of Dart
+ * tokens, line information, and any lexical errors encountered in the process.
  */
 class ScanDartTask extends SourceBasedAnalysisTask {
   /**
@@ -3988,6 +4200,84 @@
 }
 
 /**
+ * A task that builds [STRONG_MODE_ERRORS] for a unit.  Also builds
+ * [RESOLVED_UNIT] for a unit.
+ */
+class StrongModeVerifyUnitTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the [RESOLVED_UNIT10] input.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  /**
+   * The name of the [TYPE_PROVIDER] input.
+   */
+  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'StrongModeVerifyUnitTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[STRONG_MODE_ERRORS, RESOLVED_UNIT]);
+
+  StrongModeVerifyUnitTask(
+      InternalAnalysisContext context, AnalysisTarget target)
+      : super(context, target);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    RecordingErrorListener errorListener = new RecordingErrorListener();
+    //
+    // Prepare inputs.
+    //
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    if (context.analysisOptions.strongMode) {
+      unit.accept(new CodeChecker(new TypeRules(typeProvider), errorListener));
+    }
+
+    //
+    // Record outputs.
+    //
+    outputs[STRONG_MODE_ERRORS] = removeDuplicateErrors(errorListener.errors);
+    outputs[RESOLVED_UNIT] = unit;
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the
+   * given [target].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
+          .of(unit.library)
+          .toMapOf(UNITS)
+          .toFlattenList((Source library, Source unit) =>
+              RESOLVED_UNIT10.of(new LibrarySpecificUnit(library, unit))),
+      UNIT_INPUT: RESOLVED_UNIT10.of(unit),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
+    };
+  }
+
+  /**
+   * Create a [StrongModeVerifyUnitTask] based on the given [target] in
+   * the given [context].
+   */
+  static StrongModeVerifyUnitTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new StrongModeVerifyUnitTask(context, target);
+  }
+}
+
+/**
  * A task that builds [VERIFY_ERRORS] for a unit.
  */
 class VerifyUnitTask extends SourceBasedAnalysisTask {
@@ -4050,6 +4340,7 @@
         new InheritanceManager(libraryElement),
         context.analysisOptions.enableSuperMixins);
     unit.accept(errorVerifier);
+
     //
     // Record outputs.
     //
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index cc4d4e6..61f92e5 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -43,11 +43,10 @@
   static final List<ResultDescriptor> _UNIT_ERRORS = <ResultDescriptor>[
     HINTS,
     LINTS,
-    INFER_STATIC_VARIABLE_TYPES_ERRORS,
     LIBRARY_UNIT_ERRORS,
-    PARTIALLY_RESOLVE_REFERENCES_ERRORS,
-    RESOLVE_FUNCTION_BODIES_ERRORS,
     RESOLVE_TYPE_NAMES_ERRORS,
+    RESOLVE_UNIT_ERRORS,
+    STRONG_MODE_ERRORS,
     VARIABLE_REFERENCE_ERRORS,
     VERIFY_ERRORS
   ];
@@ -195,6 +194,12 @@
    * Maybe empty, but not null.
    */
   List<Source> getLibrariesContainingPart(Source part) {
+    if (part.isInSystemLibrary) {
+      DartWorkManager sdkDartWorkManager = _getSdkDartWorkManager();
+      if (sdkDartWorkManager != this) {
+        return sdkDartWorkManager.getLibrariesContainingPart(part);
+      }
+    }
     List<Source> libraries = partLibrariesMap[part];
     return libraries != null ? libraries : Source.EMPTY_LIST;
   }
@@ -267,6 +272,14 @@
   void resultsComputed(
       AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
     bool isDartSource = _isDartSource(target);
+    // Route SDK outputs to the SDK WorkManager.
+    if (isDartSource && target.source.isInSystemLibrary) {
+      DartWorkManager sdkWorkManager = _getSdkDartWorkManager();
+      if (sdkWorkManager != this) {
+        sdkWorkManager.resultsComputed(target, outputs);
+        return;
+      }
+    }
     // Organize sources.
     bool isDartLibrarySource = false;
     if (isDartSource) {
@@ -341,6 +354,22 @@
   }
 
   /**
+   * Return the SDK [DartWorkManager] or this one.
+   */
+  DartWorkManager _getSdkDartWorkManager() {
+    SourceFactory sourceFactory = context.sourceFactory;
+    InternalAnalysisContext sdkContext = sourceFactory.dartSdk.context;
+    if (sdkContext != context) {
+      for (WorkManager workManager in sdkContext.workManagers) {
+        if (workManager is DartWorkManager) {
+          return workManager;
+        }
+      }
+    }
+    return this;
+  }
+
+  /**
    * Invalidate all of the resolution results computed by this context. The flag
    * [invalidateUris] should be `true` if the cached results of converting URIs
    * to source files should also be invalidated.
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
index 0ab546a..1804c50 100644
--- a/pkg/analyzer/lib/src/task/html.dart
+++ b/pkg/analyzer/lib/src/task/html.dart
@@ -322,6 +322,9 @@
       List<ParseError> parseErrors = parser.errors;
       List<AnalysisError> errors = <AnalysisError>[];
       for (ParseError parseError in parseErrors) {
+        if (parseError.errorCode == 'expected-doctype-but-got-start-tag') {
+          continue;
+        }
         SourceSpan span = parseError.span;
         errors.add(new AnalysisError(target.source, span.start.offset,
             span.length, HtmlErrorCode.PARSE_ERROR, [parseError.message]));
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
new file mode 100644
index 0000000..d1ebb6b
--- /dev/null
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -0,0 +1,993 @@
+// 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.
+
+// TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
+// refactored to fit into analyzer.
+library analyzer.src.task.strong.checker;
+
+import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType;
+
+import 'info.dart';
+import 'rules.dart';
+
+/// Checks for overriding declarations of fields and methods. This is used to
+/// check overrides between classes and superclasses, interfaces, and mixin
+/// applications.
+class _OverrideChecker {
+  bool _failure = false;
+  final TypeRules _rules;
+  final AnalysisErrorListener _reporter;
+
+  _OverrideChecker(this._rules, this._reporter);
+
+  void check(ClassDeclaration node) {
+    if (node.element.type.isObject) return;
+    _checkSuperOverrides(node);
+    _checkMixinApplicationOverrides(node);
+    _checkAllInterfaceOverrides(node);
+  }
+
+  /// Check overrides from mixin applications themselves. For example, in:
+  ///
+  ///      A extends B with E, F
+  ///
+  ///  we check:
+  ///
+  ///      B & E against B (equivalently how E overrides B)
+  ///      B & E & F against B & E (equivalently how F overrides both B and E)
+  void _checkMixinApplicationOverrides(ClassDeclaration node) {
+    var type = node.element.type;
+    var parent = type.superclass;
+    var mixins = type.mixins;
+
+    // Check overrides from applying mixins
+    for (int i = 0; i < mixins.length; i++) {
+      var seen = new Set<String>();
+      var current = mixins[i];
+      var errorLocation = node.withClause.mixinTypes[i];
+      for (int j = i - 1; j >= 0; j--) {
+        _checkIndividualOverridesFromType(
+            current, mixins[j], errorLocation, seen);
+      }
+      _checkIndividualOverridesFromType(current, parent, errorLocation, seen);
+    }
+  }
+
+  /// Check overrides between a class and its superclasses and mixins. For
+  /// example, in:
+  ///
+  ///      A extends B with E, F
+  ///
+  /// we check A against B, B super classes, E, and F.
+  ///
+  /// Internally we avoid reporting errors twice and we visit classes bottom up
+  /// to ensure we report the most immediate invalid override first. For
+  /// example, in the following code we'll report that `Test` has an invalid
+  /// override with respect to `Parent` (as opposed to an invalid override with
+  /// respect to `Grandparent`):
+  ///
+  ///     class Grandparent {
+  ///         m(A a) {}
+  ///     }
+  ///     class Parent extends Grandparent {
+  ///         m(A a) {}
+  ///     }
+  ///     class Test extends Parent {
+  ///         m(B a) {} // invalid override
+  ///     }
+  void _checkSuperOverrides(ClassDeclaration node) {
+    var seen = new Set<String>();
+    var current = node.element.type;
+    var visited = new Set<InterfaceType>();
+    do {
+      visited.add(current);
+      current.mixins.reversed
+          .forEach((m) => _checkIndividualOverridesFromClass(node, m, seen));
+      _checkIndividualOverridesFromClass(node, current.superclass, seen);
+      current = current.superclass;
+    } while (!current.isObject && !visited.contains(current));
+  }
+
+  /// Checks that implementations correctly override all reachable interfaces.
+  /// In particular, we need to check these overrides for the definitions in
+  /// the class itself and each its superclasses. If a superclass is not
+  /// abstract, then we can skip its transitive interfaces. For example, in:
+  ///
+  ///     B extends C implements G
+  ///     A extends B with E, F implements H, I
+  ///
+  /// we check:
+  ///
+  ///     C against G, H, and I
+  ///     B against G, H, and I
+  ///     E against H and I // no check against G because B is a concrete class
+  ///     F against H and I
+  ///     A against H and I
+  void _checkAllInterfaceOverrides(ClassDeclaration node) {
+    var seen = new Set<String>();
+    // Helper function to collect all reachable interfaces.
+    find(InterfaceType interfaceType, Set result) {
+      if (interfaceType == null || interfaceType.isObject) return;
+      if (result.contains(interfaceType)) return;
+      result.add(interfaceType);
+      find(interfaceType.superclass, result);
+      interfaceType.mixins.forEach((i) => find(i, result));
+      interfaceType.interfaces.forEach((i) => find(i, result));
+    }
+
+    // Check all interfaces reachable from the `implements` clause in the
+    // current class against definitions here and in superclasses.
+    var localInterfaces = new Set<InterfaceType>();
+    var type = node.element.type;
+    type.interfaces.forEach((i) => find(i, localInterfaces));
+    _checkInterfacesOverrides(node, localInterfaces, seen,
+        includeParents: true);
+
+    // Check also how we override locally the interfaces from parent classes if
+    // the parent class is abstract. Otherwise, these will be checked as
+    // overrides on the concrete superclass.
+    var superInterfaces = new Set<InterfaceType>();
+    var parent = type.superclass;
+    // TODO(sigmund): we don't seem to be reporting the analyzer error that a
+    // non-abstract class is not implementing an interface. See
+    // https://github.com/dart-lang/dart-dev-compiler/issues/25
+    while (parent != null && parent.element.isAbstract) {
+      parent.interfaces.forEach((i) => find(i, superInterfaces));
+      parent = parent.superclass;
+    }
+    _checkInterfacesOverrides(node, superInterfaces, seen,
+        includeParents: false);
+  }
+
+  /// Checks that [cls] and its super classes (including mixins) correctly
+  /// overrides each interface in [interfaces]. If [includeParents] is false,
+  /// then mixins are still checked, but the base type and it's transitive
+  /// supertypes are not.
+  ///
+  /// [cls] can be either a [ClassDeclaration] or a [InterfaceType]. For
+  /// [ClassDeclaration]s errors are reported on the member that contains the
+  /// invalid override, for [InterfaceType]s we use [errorLocation] instead.
+  void _checkInterfacesOverrides(
+      cls, Iterable<InterfaceType> interfaces, Set<String> seen,
+      {Set<InterfaceType> visited,
+      bool includeParents: true,
+      AstNode errorLocation}) {
+    var node = cls is ClassDeclaration ? cls : null;
+    var type = cls is InterfaceType ? cls : node.element.type;
+
+    if (visited == null) {
+      visited = new Set<InterfaceType>();
+    } else if (visited.contains(type)) {
+      // Malformed type.
+      return;
+    } else {
+      visited.add(type);
+    }
+
+    // Check direct overrides on [type]
+    for (var interfaceType in interfaces) {
+      if (node != null) {
+        _checkIndividualOverridesFromClass(node, interfaceType, seen);
+      } else {
+        _checkIndividualOverridesFromType(
+            type, interfaceType, errorLocation, seen);
+      }
+    }
+
+    // Check overrides from its mixins
+    for (int i = 0; i < type.mixins.length; i++) {
+      var loc =
+          errorLocation != null ? errorLocation : node.withClause.mixinTypes[i];
+      for (var interfaceType in interfaces) {
+        // We copy [seen] so we can report separately if more than one mixin or
+        // the base class have an invalid override.
+        _checkIndividualOverridesFromType(
+            type.mixins[i], interfaceType, loc, new Set.from(seen));
+      }
+    }
+
+    // Check overrides from its superclasses
+    if (includeParents) {
+      var parent = type.superclass;
+      if (parent.isObject) return;
+      var loc = errorLocation != null ? errorLocation : node.extendsClause;
+      // No need to copy [seen] here because we made copies above when reporting
+      // errors on mixins.
+      _checkInterfacesOverrides(parent, interfaces, seen,
+          visited: visited, includeParents: true, errorLocation: loc);
+    }
+  }
+
+  /// Check that individual methods and fields in [subType] correctly override
+  /// the declarations in [baseType].
+  ///
+  /// The [errorLocation] node indicates where errors are reported, see
+  /// [_checkSingleOverride] for more details.
+  ///
+  /// The set [seen] is used to avoid reporting overrides more than once. It
+  /// is used when invoking this function multiple times when checking several
+  /// types in a class hierarchy. Errors are reported only the first time an
+  /// invalid override involving a specific member is encountered.
+  _checkIndividualOverridesFromType(InterfaceType subType,
+      InterfaceType baseType, AstNode errorLocation, Set<String> seen) {
+    void checkHelper(ExecutableElement e) {
+      if (e.isStatic) return;
+      if (seen.contains(e.name)) return;
+      if (_checkSingleOverride(e, baseType, null, errorLocation)) {
+        seen.add(e.name);
+      }
+    }
+    subType.methods.forEach(checkHelper);
+    subType.accessors.forEach(checkHelper);
+  }
+
+  /// Check that individual methods and fields in [subType] correctly override
+  /// the declarations in [baseType].
+  ///
+  /// The [errorLocation] node indicates where errors are reported, see
+  /// [_checkSingleOverride] for more details.
+  _checkIndividualOverridesFromClass(
+      ClassDeclaration node, InterfaceType baseType, Set<String> seen) {
+    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) {
+          var element = variable.element as PropertyInducingElement;
+          var name = element.name;
+          if (seen.contains(name)) continue;
+          var getter = element.getter;
+          var setter = element.setter;
+          bool found = _checkSingleOverride(getter, baseType, variable, member);
+          if (!variable.isFinal &&
+              !variable.isConst &&
+              _checkSingleOverride(setter, baseType, variable, member)) {
+            found = true;
+          }
+          if (found) seen.add(name);
+        }
+      } else {
+        if ((member as MethodDeclaration).isStatic) continue;
+        var method = (member as MethodDeclaration).element;
+        if (seen.contains(method.name)) continue;
+        if (_checkSingleOverride(method, baseType, member, member)) {
+          seen.add(method.name);
+        }
+      }
+    }
+  }
+
+  /// Checks that [element] correctly overrides its corresponding member in
+  /// [type]. Returns `true` if an override was found, that is, if [element] has
+  /// a corresponding member in [type] that it overrides.
+  ///
+  /// The [errorLocation] is a node where the error is reported. For example, a
+  /// bad override of a method in a class with respect to its superclass is
+  /// reported directly at the method declaration. However, invalid overrides
+  /// from base classes to interfaces, mixins to the base they are applied to,
+  /// or mixins to interfaces are reported at the class declaration, since the
+  /// base class or members on their own were not incorrect, only combining them
+  /// with the interface was problematic. For example, these are example error
+  /// locations in these cases:
+  ///
+  ///     error: base class introduces an invalid override. The type of B.foo is
+  ///     not a subtype of E.foo:
+  ///       class A extends B implements E { ... }
+  ///               ^^^^^^^^^
+  ///
+  ///     error: mixin introduces an invalid override. The type of C.foo is not
+  ///     a subtype of E.foo:
+  ///       class A extends B with C implements E { ... }
+  ///                              ^
+  ///
+  /// When checking for overrides from a type and it's super types, [node] is
+  /// the AST node that defines [element]. This is used to determine whether the
+  /// type of the element could be inferred from the types in the super classes.
+  bool _checkSingleOverride(ExecutableElement element, InterfaceType type,
+      AstNode node, AstNode errorLocation) {
+    assert(!element.isStatic);
+
+    FunctionType subType = _rules.elementType(element);
+    // TODO(vsm): Test for generic
+    FunctionType baseType = _getMemberType(type, element);
+
+    if (baseType == null) return false;
+    if (!_rules.isAssignable(subType, baseType)) {
+      // See whether non-assignable cases fit one of our common patterns:
+      //
+      // Common pattern 1: Inferable return type (on getters and methods)
+      //   class A {
+      //     int get foo => ...;
+      //     String toString() { ... }
+      //   }
+      //   class B extends A {
+      //     get foo => e; // no type specified.
+      //     toString() { ... } // no return type specified.
+      //   }
+      _recordMessage(new InvalidMethodOverride(
+          errorLocation, element, type, subType, baseType));
+    }
+    return true;
+  }
+
+  void _recordMessage(StaticInfo info) {
+    if (info == null) return;
+    var error = info.toAnalysisError();
+    if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
+    _reporter.onError(error);
+  }
+}
+
+/// Checks the body of functions and properties.
+class CodeChecker extends RecursiveAstVisitor {
+  final TypeRules rules;
+  final AnalysisErrorListener reporter;
+  final _OverrideChecker _overrideChecker;
+  final bool _hints;
+
+  bool _failure = false;
+  bool get failure => _failure || _overrideChecker._failure;
+
+  void reset() {
+    _failure = false;
+    _overrideChecker._failure = false;
+  }
+
+  CodeChecker(TypeRules rules, AnalysisErrorListener reporter,
+      {bool hints: false})
+      : rules = rules,
+        reporter = reporter,
+        _hints = hints,
+        _overrideChecker = new _OverrideChecker(rules, reporter);
+
+  @override
+  void visitComment(Comment node) {
+    // skip, no need to do typechecking inside comments (they may contain
+    // comment references which would require resolution).
+  }
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    _overrideChecker.check(node);
+    super.visitClassDeclaration(node);
+  }
+
+  @override
+  void visitAssignmentExpression(AssignmentExpression node) {
+    var token = node.operator;
+    if (token.type != TokenType.EQ) {
+      _checkCompoundAssignment(node);
+    } else {
+      DartType staticType = _getStaticType(node.leftHandSide);
+      checkAssignment(node.rightHandSide, staticType);
+    }
+    node.visitChildren(this);
+  }
+
+  /// Check constructor declaration to ensure correct super call placement.
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    node.visitChildren(this);
+
+    final init = node.initializers;
+    for (int i = 0, last = init.length - 1; i < last; i++) {
+      final node = init[i];
+      if (node is SuperConstructorInvocation) {
+        _recordMessage(new InvalidSuperInvocation(node));
+      }
+    }
+  }
+
+  @override
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    var field = node.fieldName;
+    var element = field.staticElement;
+    DartType staticType = rules.elementType(element);
+    checkAssignment(node.expression, staticType);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitForEachStatement(ForEachStatement node) {
+    // Check that the expression is an Iterable.
+    var expr = node.iterable;
+    var iterableType = node.awaitKeyword != null
+        ? rules.provider.streamType
+        : rules.provider.iterableType;
+    var loopVariable = node.identifier != null
+        ? node.identifier
+        : node.loopVariable?.identifier;
+    if (loopVariable != null) {
+      var iteratorType = loopVariable.staticType;
+      var checkedType = iterableType.substitute4([iteratorType]);
+      checkAssignment(expr, checkedType);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    if (node.condition != null) {
+      checkBoolean(node.condition);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIfStatement(IfStatement node) {
+    checkBoolean(node.condition);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitDoStatement(DoStatement node) {
+    checkBoolean(node.condition);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitWhileStatement(WhileStatement node) {
+    checkBoolean(node.condition);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
+    // SwitchStatement defines a boolean conversion to check the result of the
+    // case value == the switch value, but in dev_compiler we require a boolean
+    // return type from an overridden == operator (because Object.==), so
+    // checking in SwitchStatement shouldn't be necessary.
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitListLiteral(ListLiteral node) {
+    var type = rules.provider.dynamicType;
+    if (node.typeArguments != null) {
+      var targs = node.typeArguments.arguments;
+      if (targs.length > 0) type = targs[0].type;
+    }
+    var elements = node.elements;
+    for (int i = 0; i < elements.length; i++) {
+      checkArgument(elements[i], type);
+    }
+    super.visitListLiteral(node);
+  }
+
+  @override
+  void visitMapLiteral(MapLiteral node) {
+    var ktype = rules.provider.dynamicType;
+    var vtype = rules.provider.dynamicType;
+    if (node.typeArguments != null) {
+      var targs = node.typeArguments.arguments;
+      if (targs.length > 0) ktype = targs[0].type;
+      if (targs.length > 1) vtype = targs[1].type;
+    }
+    var entries = node.entries;
+    for (int i = 0; i < entries.length; i++) {
+      var entry = entries[i];
+      checkArgument(entry.key, ktype);
+      checkArgument(entry.value, vtype);
+    }
+    super.visitMapLiteral(node);
+  }
+
+  // Check invocations
+  void checkArgumentList(ArgumentList node, FunctionType type) {
+    NodeList<Expression> list = node.arguments;
+    int len = list.length;
+    for (int i = 0; i < len; ++i) {
+      Expression arg = list[i];
+      ParameterElement element = arg.staticParameterElement;
+      if (element == null) {
+        if (type.parameters.length < len) {
+          // We found an argument mismatch, the analyzer will report this too,
+          // so no need to insert an error for this here.
+          continue;
+        }
+        element = type.parameters[i];
+        // TODO(vsm): When can this happen?
+        assert(element != null);
+      }
+      DartType expectedType = rules.elementType(element);
+      if (expectedType == null) expectedType = rules.provider.dynamicType;
+      checkArgument(arg, expectedType);
+    }
+  }
+
+  void checkArgument(Expression arg, DartType expectedType) {
+    // Preserve named argument structure, so their immediate parent is the
+    // method invocation.
+    if (arg is NamedExpression) {
+      arg = (arg as NamedExpression).expression;
+    }
+    checkAssignment(arg, expectedType);
+  }
+
+  void checkFunctionApplication(
+      Expression node, Expression f, ArgumentList list) {
+    if (rules.isDynamicCall(f)) {
+      // If f is Function and this is a method invocation, we should have
+      // gotten an analyzer error, so no need to issue another error.
+      _recordDynamicInvoke(node, f);
+    } else {
+      checkArgumentList(list, rules.getTypeAsCaller(f));
+    }
+  }
+
+  @override
+  visitMethodInvocation(MethodInvocation node) {
+    var target = node.realTarget;
+    if (rules.isDynamicTarget(target) &&
+        !_isObjectMethod(node, node.methodName)) {
+      _recordDynamicInvoke(node, target);
+
+      // Mark the tear-off as being dynamic, too. This lets us distinguish
+      // cases like:
+      //
+      //     dynamic d;
+      //     d.someMethod(...); // the whole method call must be a dynamic send.
+      //
+      // ... from case like:
+      //
+      //     SomeType s;
+      //     s.someDynamicField(...); // static get, followed by dynamic call.
+      //
+      // The first case is handled here, the second case is handled below when
+      // we call [checkFunctionApplication].
+      DynamicInvoke.set(node.methodName, true);
+    } else {
+      checkFunctionApplication(node, node.methodName, node.argumentList);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    checkFunctionApplication(node, node.function, node.argumentList);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    var type = node.staticElement.type;
+    checkArgumentList(node.argumentList, type);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    var element = node.staticElement;
+    if (element == null) {
+      _recordMessage(new MissingTypeError(node));
+    } else {
+      var type = node.staticElement.type;
+      checkArgumentList(node.argumentList, type);
+    }
+    node.visitChildren(this);
+  }
+
+  void _checkReturnOrYield(Expression expression, AstNode node,
+      {bool yieldStar: false}) {
+    var body = node.getAncestor((n) => n is FunctionBody);
+    var type = rules.getExpectedReturnType(body, yieldStar: yieldStar);
+    if (type == null) {
+      // We have a type mismatch: the async/async*/sync* modifier does
+      // not match the return or yield type.  We should have already gotten an
+      // analyzer error in this case.
+      return;
+    }
+    // TODO(vsm): Enforce void or dynamic (to void?) when expression is null.
+    if (expression != null) checkAssignment(expression, type);
+  }
+
+  @override
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    _checkReturnOrYield(node.expression, node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitReturnStatement(ReturnStatement node) {
+    _checkReturnOrYield(node.expression, node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitYieldStatement(YieldStatement node) {
+    _checkReturnOrYield(node.expression, node, yieldStar: node.star != null);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPropertyAccess(PropertyAccess node) {
+    var target = node.realTarget;
+    if (rules.isDynamicTarget(target) &&
+        !_isObjectProperty(target, node.propertyName)) {
+      _recordDynamicInvoke(node, target);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
+    final target = node.prefix;
+    if (rules.isDynamicTarget(target) &&
+        !_isObjectProperty(target, node.identifier)) {
+      _recordDynamicInvoke(node, target);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    // Check that defaults have the proper subtype.
+    var parameter = node.parameter;
+    var parameterType = rules.elementType(parameter.element);
+    assert(parameterType != null);
+    var defaultValue = node.defaultValue;
+    if (defaultValue != null) {
+      checkAssignment(defaultValue, parameterType);
+    }
+
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    var element = node.element;
+    var typeName = node.type;
+    if (typeName != null) {
+      var type = rules.elementType(element);
+      var fieldElement =
+          node.identifier.staticElement as FieldFormalParameterElement;
+      var fieldType = rules.elementType(fieldElement.field);
+      if (!rules.isSubTypeOf(type, fieldType)) {
+        var staticInfo =
+            new InvalidParameterDeclaration(rules, node, fieldType);
+        _recordMessage(staticInfo);
+      }
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    var arguments = node.argumentList;
+    var element = node.staticElement;
+    if (element != null) {
+      var type = rules.elementType(node.staticElement);
+      checkArgumentList(arguments, type);
+    } else {
+      _recordMessage(new MissingTypeError(node));
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitVariableDeclarationList(VariableDeclarationList node) {
+    TypeName type = node.type;
+    if (type == null) {
+      // No checks are needed when the type is var. Although internally the
+      // typing rules may have inferred a more precise type for the variable
+      // based on the initializer.
+    } else {
+      var dartType = getType(type);
+      for (VariableDeclaration variable in node.variables) {
+        var initializer = variable.initializer;
+        if (initializer != null) {
+          checkAssignment(initializer, dartType);
+        }
+      }
+    }
+    node.visitChildren(this);
+  }
+
+  void _checkRuntimeTypeCheck(AstNode node, TypeName typeName) {
+    var type = getType(typeName);
+    if (!rules.isGroundType(type)) {
+      _recordMessage(new NonGroundTypeCheckInfo(node, type));
+    }
+  }
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    // We could do the same check as the IsExpression below, but that is
+    // potentially too conservative.  Instead, at runtime, we must fail hard
+    // if the Dart as and the DDC as would return different values.
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    _checkRuntimeTypeCheck(node, node.type);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPrefixExpression(PrefixExpression node) {
+    if (node.operator.type == TokenType.BANG) {
+      checkBoolean(node.operand);
+    } else {
+      _checkUnary(node);
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPostfixExpression(PostfixExpression node) {
+    _checkUnary(node);
+    node.visitChildren(this);
+  }
+
+  void _checkUnary(/*PrefixExpression|PostfixExpression*/ node) {
+    var op = node.operator;
+    if (op.isUserDefinableOperator ||
+        op.type == TokenType.PLUS_PLUS ||
+        op.type == TokenType.MINUS_MINUS) {
+      if (rules.isDynamicTarget(node.operand)) {
+        _recordDynamicInvoke(node, node.operand);
+      }
+      // For ++ and --, even if it is not dynamic, we still need to check
+      // that the user defined method accepts an `int` as the RHS.
+      // We assume Analyzer has done this already.
+    }
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    var op = node.operator;
+    if (op.isUserDefinableOperator) {
+      if (rules.isDynamicTarget(node.leftOperand)) {
+        // Dynamic invocation
+        // TODO(vsm): Move this logic to the resolver?
+        if (op.type != TokenType.EQ_EQ && op.type != TokenType.BANG_EQ) {
+          _recordDynamicInvoke(node, node.leftOperand);
+        }
+      } else {
+        var element = node.staticElement;
+        // Method invocation.
+        if (element is MethodElement) {
+          var type = element.type;
+          // Analyzer should enforce number of parameter types, but check in
+          // case we have erroneous input.
+          if (type.normalParameterTypes.isNotEmpty) {
+            checkArgument(node.rightOperand, type.normalParameterTypes[0]);
+          }
+        } else {
+          // TODO(vsm): Assert that the analyzer found an error here?
+        }
+      }
+    } else {
+      // Non-method operator.
+      switch (op.type) {
+        case TokenType.AMPERSAND_AMPERSAND:
+        case TokenType.BAR_BAR:
+          checkBoolean(node.leftOperand);
+          checkBoolean(node.rightOperand);
+          break;
+        case TokenType.BANG_EQ:
+          break;
+        case TokenType.QUESTION_QUESTION:
+          break;
+        default:
+          assert(false);
+      }
+    }
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitConditionalExpression(ConditionalExpression node) {
+    checkBoolean(node.condition);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIndexExpression(IndexExpression node) {
+    var target = node.realTarget;
+    if (rules.isDynamicTarget(target)) {
+      _recordDynamicInvoke(node, target);
+    } else {
+      var element = node.staticElement;
+      if (element is MethodElement) {
+        var type = element.type;
+        // Analyzer should enforce number of parameter types, but check in
+        // case we have erroneous input.
+        if (type.normalParameterTypes.isNotEmpty) {
+          checkArgument(node.index, type.normalParameterTypes[0]);
+        }
+      } else {
+        // TODO(vsm): Assert that the analyzer found an error here?
+      }
+    }
+    node.visitChildren(this);
+  }
+
+  DartType getType(TypeName name) {
+    return (name == null) ? rules.provider.dynamicType : name.type;
+  }
+
+  /// Analyzer checks boolean conversions, but we need to check too, because
+  /// it uses the default assignability rules that allow `dynamic` and `Object`
+  /// to be assigned to bool with no message.
+  void checkBoolean(Expression expr) =>
+      checkAssignment(expr, rules.provider.boolType);
+
+  void checkAssignment(Expression expr, DartType type) {
+    if (expr is ParenthesizedExpression) {
+      checkAssignment(expr.expression, type);
+    } else {
+      _recordMessage(rules.checkAssignment(expr, type));
+    }
+  }
+
+  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
+    // Dart language spec.
+    switch (op) {
+      case TokenType.PLUS:
+      case TokenType.MINUS:
+      case TokenType.STAR:
+      case TokenType.TILDE_SLASH:
+      case TokenType.PERCENT:
+      case TokenType.PLUS_EQ:
+      case TokenType.MINUS_EQ:
+      case TokenType.STAR_EQ:
+      case TokenType.TILDE_SLASH_EQ:
+      case TokenType.PERCENT_EQ:
+        if (t1 == rules.provider.intType &&
+            t2 == rules.provider.intType) return t1;
+        if (t1 == rules.provider.doubleType &&
+            t2 == rules.provider.doubleType) return t1;
+        // This particular combo is not spelled out in the spec, but all
+        // implementations and analyzer seem to follow this.
+        if (t1 == rules.provider.doubleType &&
+            t2 == rules.provider.intType) return t1;
+    }
+    return normalReturnType;
+  }
+
+  void _checkCompoundAssignment(AssignmentExpression expr) {
+    var op = expr.operator.type;
+    assert(op.isAssignmentOperator && op != TokenType.EQ);
+    var methodElement = expr.staticElement;
+    if (methodElement == null) {
+      // Dynamic invocation
+      _recordDynamicInvoke(expr, expr.leftHandSide);
+    } else {
+      // Sanity check the operator
+      assert(methodElement.isOperator);
+      var functionType = methodElement.type;
+      var paramTypes = functionType.normalParameterTypes;
+      assert(paramTypes.length == 1);
+      assert(functionType.namedParameterTypes.isEmpty);
+      assert(functionType.optionalParameterTypes.isEmpty);
+
+      // Check the lhs type
+      var staticInfo;
+      var rhsType = _getStaticType(expr.rightHandSide);
+      var lhsType = _getStaticType(expr.leftHandSide);
+      var returnType = _specializedBinaryReturnType(
+          op, lhsType, rhsType, functionType.returnType);
+
+      if (!rules.isSubTypeOf(returnType, lhsType)) {
+        final numType = rules.provider.numType;
+        // Try to fix up the numerical case if possible.
+        if (rules.isSubTypeOf(lhsType, numType) &&
+            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));
+          rhsType = lhsType;
+        } else {
+          // Static type error
+          staticInfo = new StaticTypeError(rules, expr, lhsType);
+        }
+        _recordMessage(staticInfo);
+      }
+
+      // Check the rhs type
+      if (staticInfo is! CoercionInfo) {
+        var paramType = paramTypes.first;
+        staticInfo = rules.checkAssignment(expr.rightHandSide, paramType);
+        _recordMessage(staticInfo);
+      }
+    }
+  }
+
+  bool _isObjectGetter(Expression target, SimpleIdentifier id) {
+    PropertyAccessorElement element =
+        rules.provider.objectType.element.getGetter(id.name);
+    return (element != null && !element.isStatic);
+  }
+
+  bool _isObjectMethod(Expression target, SimpleIdentifier id) {
+    MethodElement element =
+        rules.provider.objectType.element.getMethod(id.name);
+    return (element != null && !element.isStatic);
+  }
+
+  bool _isObjectProperty(Expression target, SimpleIdentifier id) {
+    return _isObjectGetter(target, id) || _isObjectMethod(target, id);
+  }
+
+  DartType _getStaticType(Expression expr) {
+    var type = expr.staticType;
+    if (type == null) {
+      reporter.onError(new MissingTypeError(expr).toAnalysisError());
+    }
+    return type ?? rules.provider.dynamicType;
+  }
+
+  void _recordDynamicInvoke(AstNode node, AstNode target) {
+    if (_hints) {
+      reporter.onError(new DynamicInvoke(rules, node).toAnalysisError());
+    }
+    // TODO(jmesserly): we may eventually want to record if the whole operation
+    // (node) was dynamic, rather than the target, but this is an easier fit
+    // with what we used to do.
+    DynamicInvoke.set(target, true);
+  }
+
+  void _recordMessage(StaticInfo info) {
+    if (info == null) return;
+    var error = info.toAnalysisError();
+
+    var severity = error.errorCode.errorSeverity;
+    if (severity == ErrorSeverity.ERROR) _failure = true;
+    if (severity != ErrorSeverity.INFO || _hints) {
+      reporter.onError(error);
+    }
+
+    if (info is CoercionInfo) {
+      // TODO(jmesserly): if we're run again on the same AST, we'll produce the
+      // same annotations. This should be harmless. This might go away once
+      // CodeChecker is integrated better with analyzer, as it will know that
+      // checking has already been performed.
+      // assert(CoercionInfo.get(info.node) == null);
+      CoercionInfo.set(info.node, info);
+    }
+  }
+}
+
+/// Looks up the declaration that matches [member] in [type] and returns it's
+/// declared type.
+FunctionType _getMemberType(InterfaceType type, ExecutableElement member) =>
+    _memberTypeGetter(member)(type);
+
+typedef FunctionType _MemberTypeGetter(InterfaceType type);
+
+_MemberTypeGetter _memberTypeGetter(ExecutableElement member) {
+  String memberName = member.name;
+  final isGetter = member is PropertyAccessorElement && member.isGetter;
+  final isSetter = member is PropertyAccessorElement && member.isSetter;
+
+  FunctionType f(InterfaceType type) {
+    ExecutableElement baseMethod;
+    try {
+      if (isGetter) {
+        assert(!isSetter);
+        // Look for getter or field.
+        baseMethod = type.getGetter(memberName);
+      } else if (isSetter) {
+        baseMethod = type.getSetter(memberName);
+      } else {
+        baseMethod = type.getMethod(memberName);
+      }
+    } catch (e) {
+      // TODO(sigmund): remove this try-catch block (see issue #48).
+    }
+    if (baseMethod == null || baseMethod.isStatic) return null;
+    return baseMethod.type;
+  }
+  ;
+  return f;
+}
diff --git a/pkg/analyzer/lib/src/task/strong/info.dart b/pkg/analyzer/lib/src/task/strong/info.dart
new file mode 100644
index 0000000..1f7caf6
--- /dev/null
+++ b/pkg/analyzer/lib/src/task/strong/info.dart
@@ -0,0 +1,486 @@
+// 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.
+
+/// Defines static information collected by the type checker and used later by
+/// emitters to generate code.
+// TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
+// refactored to fit into analyzer.
+library analyzer.src.task.strong.info;
+
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/error.dart';
+
+import 'rules.dart';
+
+// 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 identity(DartType type) => new Identity(type);
+  static Coercion error() => new CoercionError();
+}
+
+// Coercion which casts one type to another
+class Cast extends Coercion {
+  Cast(DartType fromType, DartType toType) : super(fromType, toType);
+}
+
+// The identity coercion
+class Identity extends Coercion {
+  Identity(DartType fromType) : super(fromType, fromType);
+}
+
+// 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);
+}
+
+// TODO(jmesserly): this could use some refactoring. These are essentially
+// like ErrorCodes in analyzer, but we're including some details in our message.
+// Analyzer instead has template strings, and replaces '{0}' with the first
+// argument.
+abstract class StaticInfo {
+  /// AST Node this info is attached to.
+  AstNode get node;
+
+  // TODO(jmesserly): review the usage of error codes. We probably want our own,
+  // as well as some DDC specific [ErrorType]s.
+  ErrorCode toErrorCode();
+
+  // TODO(jmesserly): what convention to use here?
+  String get name => 'dev_compiler.$runtimeType';
+
+  List<Object> get arguments => [node];
+
+  AnalysisError toAnalysisError() {
+    int begin = node is AnnotatedNode
+        ? (node as AnnotatedNode).firstTokenAfterCommentAndMetadata.offset
+        : node.offset;
+    int length = node.end - begin;
+    var source = (node.root as CompilationUnit).element.source;
+    return new AnalysisError(source, begin, length, toErrorCode(), arguments);
+  }
+}
+
+/// Implicitly injected expression conversion.
+abstract class CoercionInfo extends StaticInfo {
+  final TypeRules rules;
+
+  final Expression node;
+
+  DartType get convertedType;
+
+  CoercionInfo(this.rules, this.node);
+
+  DartType get baseType => rules.getStaticType(node);
+  DartType get staticType => convertedType;
+
+  String get message;
+  toErrorCode() => new HintCode(name, message);
+
+  static const String _propertyName = 'dev_compiler.src.info.CoercionInfo';
+
+  /// Gets the coercion info associated with this node.
+  static CoercionInfo get(AstNode node) => node.getProperty(_propertyName);
+
+  /// Sets the coercion info associated with this node.
+  static CoercionInfo set(AstNode node, CoercionInfo info) {
+    node.setProperty(_propertyName, info);
+    return info;
+  }
+}
+
+// Base class for all casts from base type to sub type.
+abstract class DownCast extends CoercionInfo {
+  Cast _cast;
+
+  DownCast._internal(TypeRules 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)));
+  }
+
+  Cast get cast => _cast;
+
+  DartType get convertedType => _cast.toType;
+
+  @override List<Object> get arguments => [node, baseType, convertedType];
+  @override String get message => '{0} ({1}) will need runtime check '
+      'to cast to type {2}';
+
+  // Factory to create correct DownCast variant.
+  static StaticInfo create(TypeRules rules, Expression expression, Cast cast,
+      {String reason}) {
+    final fromT = cast.fromType;
+    final toT = cast.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));
+
+    // 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);
+    }
+
+    // Inference "casts":
+    if (expression is Literal) {
+      // fromT should be an exact type - this will almost certainly fail at
+      // runtime.
+      return new StaticTypeError(rules, expression, toT, reason: reason);
+    }
+    if (expression is FunctionExpression) {
+      // fromT should be an exact type - this will almost certainly fail at
+      // runtime.
+      return new UninferredClosure(rules, expression, cast);
+    }
+    if (expression is InstanceCreationExpression) {
+      // fromT should be an exact type - this will almost certainly fail at
+      // runtime.
+      return new StaticTypeError(rules, expression, toT, reason: reason);
+    }
+
+    // Composite cast: these are more likely to fail.
+    if (!rules.isGroundType(toT)) {
+      // This cast is (probably) due to our different treatment of dynamic.
+      // It may be more likely to fail at runtime.
+      return new DownCastComposite(rules, expression, cast);
+    }
+
+    // Dynamic cast
+    if (fromT.isDynamic) {
+      return new DynamicCast(rules, expression, cast);
+    }
+
+    // Assignment cast
+    var parent = expression.parent;
+    if (parent is VariableDeclaration && (parent.initializer == expression)) {
+      return new AssignmentCast(rules, expression, cast);
+    }
+
+    // Other casts
+    return new DownCastImplicit(rules, expression, cast);
+  }
+}
+
+//
+// Standard down casts.  These casts are implicitly injected by the compiler.
+//
+
+// A down cast from dynamic to T.
+class DynamicCast extends DownCast {
+  DynamicCast(TypeRules rules, Expression expression, Cast cast)
+      : super._internal(rules, expression, cast);
+
+  toErrorCode() => new HintCode(name, message);
+}
+
+// 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.
+class AssignmentCast extends DownCast {
+  AssignmentCast(TypeRules rules, Expression expression, Cast cast)
+      : super._internal(rules, expression, cast);
+
+  toErrorCode() => new HintCode(name, message);
+}
+
+//
+// Temporary "casts" of allocation sites - literals, constructor invocations,
+// and closures.  These should be handled by contextual inference.  In most
+// cases, inference will be sufficient, though in some it may unmask an actual
+// error: e.g.,
+//   List<int> l = [1, 2, 3]; // Inference succeeds
+//   List<String> l = [1, 2, 3]; // Inference reveals static type error
+// We're marking all as warnings for now.
+//
+// TODO(vsm,leafp): Remove this.
+class UninferredClosure extends DownCast {
+  UninferredClosure(TypeRules rules, FunctionExpression expression, Cast cast)
+      : super._internal(rules, expression, cast);
+
+  toErrorCode() => new StaticTypeWarningCode(name, message);
+}
+
+//
+// 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(TypeRules rules, Expression expression, Cast cast)
+      : super._internal(rules, expression, cast);
+
+  toErrorCode() => new StaticTypeWarningCode(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.
+class DownCastImplicit extends DownCast {
+  DownCastImplicit(TypeRules rules, Expression expression, Cast cast)
+      : super._internal(rules, expression, cast);
+
+  toErrorCode() => new HintCode(name, message);
+}
+
+// An inferred type for the wrapped expression, which may need to be
+// reified into the term
+abstract class InferredTypeBase extends CoercionInfo {
+  final DartType _type;
+
+  InferredTypeBase._internal(TypeRules rules, Expression expression, this._type)
+      : super(rules, expression);
+
+  DartType get type => _type;
+  DartType get convertedType => type;
+  @override String get message => '{0} has inferred type {1}';
+  @override List get arguments => [node, type];
+
+  toErrorCode() => new HintCode(name, message);
+}
+
+// Standard / unspecialized inferred type
+class InferredType extends InferredTypeBase {
+  InferredType(TypeRules rules, Expression expression, DartType type)
+      : super._internal(rules, expression, type);
+
+  // Factory to create correct InferredType variant.
+  static InferredTypeBase create(
+      TypeRules rules, Expression expression, DartType type) {
+    // Specialized inference:
+    if (expression is Literal) {
+      return new InferredTypeLiteral(rules, expression, type);
+    }
+    if (expression is InstanceCreationExpression) {
+      return new InferredTypeAllocation(rules, expression, type);
+    }
+    if (expression is FunctionExpression) {
+      return new InferredTypeClosure(rules, expression, type);
+    }
+    return new InferredType(rules, expression, type);
+  }
+}
+
+// An infered type for a literal expression.
+class InferredTypeLiteral extends InferredTypeBase {
+  InferredTypeLiteral(TypeRules rules, Expression expression, DartType type)
+      : super._internal(rules, expression, type);
+}
+
+// An inferred type for a non-literal allocation site.
+class InferredTypeAllocation extends InferredTypeBase {
+  InferredTypeAllocation(TypeRules rules, Expression expression, DartType type)
+      : super._internal(rules, expression, type);
+}
+
+// An inferred type for a closure expression
+class InferredTypeClosure extends InferredTypeBase {
+  InferredTypeClosure(TypeRules rules, Expression expression, DartType type)
+      : super._internal(rules, expression, type);
+}
+
+class DynamicInvoke extends CoercionInfo {
+  DynamicInvoke(TypeRules rules, Expression expression)
+      : super(rules, expression);
+
+  DartType get convertedType => rules.provider.dynamicType;
+  String get message => '{0} requires dynamic invoke';
+  toErrorCode() => new HintCode(name, message);
+
+  static const String _propertyName = 'dev_compiler.src.info.DynamicInvoke';
+
+  /// Whether this [node] is the target of a dynamic operation.
+  static bool get(AstNode node) {
+    var value = node.getProperty(_propertyName);
+    return value != null ? value : false;
+  }
+
+  /// Sets whether this node is the target of a dynamic operation.
+  static bool set(AstNode node, bool value) {
+    // Free the storage for things that aren't dynamic.
+    if (value == false) value = null;
+    node.setProperty(_propertyName, value);
+    return value;
+  }
+}
+
+abstract class StaticError extends StaticInfo {
+  final AstNode node;
+
+  StaticError(this.node);
+
+  String get message;
+
+  toErrorCode() => new CompileTimeErrorCode(name, message);
+}
+
+class StaticTypeError extends StaticError {
+  final DartType baseType;
+  final DartType expectedType;
+  String reason = null;
+
+  StaticTypeError(TypeRules rules, Expression expression, this.expectedType,
+      {this.reason})
+      : baseType = rules.getStaticType(expression),
+        super(expression);
+
+  @override List<Object> get arguments => [node, baseType, expectedType];
+  @override String get message =>
+      'Type check failed: {0} ({1}) is not of type {2}' +
+          ((reason == null) ? '' : ' because $reason');
+}
+
+class InvalidVariableDeclaration extends StaticError {
+  final DartType expectedType;
+
+  InvalidVariableDeclaration(
+      TypeRules rules, AstNode declaration, this.expectedType)
+      : super(declaration);
+
+  @override List<Object> get arguments => [expectedType];
+  @override String get message => 'Type check failed: null is not of type {0}';
+}
+
+class InvalidParameterDeclaration extends StaticError {
+  final DartType expectedType;
+
+  InvalidParameterDeclaration(
+      TypeRules rules, FormalParameter declaration, this.expectedType)
+      : super(declaration);
+
+  @override List<Object> get arguments => [node, expectedType];
+  @override String get message => 'Type check failed: {0} is not of type {1}';
+}
+
+class NonGroundTypeCheckInfo extends StaticInfo {
+  final DartType type;
+  final AstNode node;
+
+  NonGroundTypeCheckInfo(this.node, this.type) {
+    assert(node is IsExpression || node is AsExpression);
+  }
+
+  @override List<Object> get arguments => [type];
+  String get message =>
+      "Runtime check on non-ground type {0} may throw StrongModeError";
+
+  toErrorCode() => new HintCode(name, message);
+}
+
+// Invalid override of an instance member of a class.
+abstract class InvalidOverride extends StaticError {
+  /// Member declaration with the invalid override.
+  final ExecutableElement element;
+
+  /// Type (class or interface) that provides the base declaration.
+  final InterfaceType base;
+
+  /// Actual type of the overridden member.
+  final DartType subType;
+
+  /// Actual type of the base member.
+  final DartType baseType;
+
+  /// Whether the error comes from combining a base class and an interface
+  final bool fromBaseClass;
+
+  /// Whether the error comes from a mixin (either overriding a base class or an
+  /// interface declaration).
+  final bool fromMixin;
+
+  InvalidOverride(
+      AstNode node, this.element, this.base, this.subType, this.baseType)
+      : fromBaseClass = node is ExtendsClause,
+        fromMixin = node.parent is WithClause,
+        super(node);
+
+  ClassElement get parent => element.enclosingElement;
+
+  @override List<Object> get arguments =>
+      [parent.name, element.name, subType, base, baseType];
+
+  String _messageHelper(String errorName) {
+    var lcErrorName = errorName.toLowerCase();
+    var intro = fromBaseClass
+        ? 'Base class introduces an $lcErrorName'
+        : (fromMixin ? 'Mixin introduces an $lcErrorName' : errorName);
+    return '$intro. The type of {0}.{1} ({2}) is not a '
+        'subtype of {3}.{1} ({4}).';
+  }
+}
+
+// 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)
+      : super(node, element, base, subType, baseType);
+
+  String get message => _messageHelper('Invalid override');
+}
+
+/// Used to mark unexpected situations in our compiler were we couldn't compute
+/// the type of an expression.
+// TODO(sigmund): This is normally a result of another error that is caught by
+// the analyzer, so this should likely be removed in the future.
+class MissingTypeError extends StaticInfo {
+  final AstNode node;
+  toErrorCode() => new StaticTypeWarningCode(name, message);
+
+  MissingTypeError(this.node);
+
+  @override List<Object> get arguments => [node, node.runtimeType];
+  String get message => "type analysis didn't compute the type of: {0} {1}";
+}
+
+/// Dart constructors have one weird quirk, illustrated with this example:
+///
+///     class Base {
+///       var x;
+///       Base() : x = print('Base.1') {
+///         print('Base.2');
+///       }
+///     }
+///
+///     class Derived extends Base {
+///       var y, z;
+///       Derived()
+///           : y = print('Derived.1'),
+///             super(),
+///             z = print('Derived.2') {
+///         print('Derived.3');
+///       }
+///     }
+///
+/// The order will be Derived.1, Base.1, Derived.2, Base.2, Derived.3; this
+/// ordering preserves the invariant that code can't observe uninitialized
+/// state, however it results in super constructor body not being run
+/// immediately after super initializers. Normally this isn't observable, but it
+/// could be if initializers have side effects.
+///
+/// Better to have `super` at the end, as required by the Dart style guide:
+/// <http://goo.gl/q1T4BB>
+///
+/// For now this is the only pattern we support.
+class InvalidSuperInvocation extends StaticError {
+  InvalidSuperInvocation(SuperConstructorInvocation node) : super(node);
+
+  @override String get message => "super call must be last in an initializer "
+      "list (see http://goo.gl/q1T4BB): {0}";
+}
diff --git a/pkg/analyzer/lib/src/task/strong/rules.dart b/pkg/analyzer/lib/src/task/strong/rules.dart
new file mode 100644
index 0000000..b575dbf
--- /dev/null
+++ b/pkg/analyzer/lib/src/task/strong/rules.dart
@@ -0,0 +1,770 @@
+// 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.
+
+// TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
+// refactored to fit into analyzer.
+library analyzer.src.task.strong.rules;
+
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+
+import 'info.dart';
+
+// TODO(jmesserly): this entire file needs to be removed in favor of TypeSystem.
+
+final _objectMap = new Expando('providerToObjectMap');
+Map<String, DartType> getObjectMemberMap(TypeProvider typeProvider) {
+  var map = _objectMap[typeProvider] as Map<String, DartType>;
+  if (map == null) {
+    map = <String, DartType>{};
+    _objectMap[typeProvider] = map;
+    var objectType = typeProvider.objectType;
+    var element = objectType.element;
+    // Only record methods (including getters) with no parameters.  As parameters are contravariant wrt
+    // type, using Object's version may be too strict.
+    // Add instance methods.
+    element.methods.where((method) => !method.isStatic).forEach((method) {
+      map[method.name] = method.type;
+    });
+    // Add getters.
+    element.accessors
+        .where((member) => !member.isStatic && member.isGetter)
+        .forEach((member) {
+      map[member.name] = member.type.returnType;
+    });
+  }
+  return map;
+}
+
+class TypeRules {
+  final TypeProvider provider;
+
+  /// Map of fields / properties / methods on Object.
+  final Map<String, DartType> objectMembers;
+
+  DownwardsInference inferrer;
+
+  TypeRules(TypeProvider provider)
+      : provider = provider,
+        objectMembers = getObjectMemberMap(provider) {
+    inferrer = new DownwardsInference(this);
+  }
+
+  /// Given a type t, if t is an interface type with a call method
+  /// defined, return the function type for the call method, otherwise
+  /// return null.
+  FunctionType getCallMethodType(DartType t) {
+    if (t is InterfaceType) {
+      ClassElement element = t.element;
+      InheritanceManager manager = new InheritanceManager(element.library);
+      FunctionType callType = manager.lookupMemberType(t, "call");
+      return callType;
+    }
+    return null;
+  }
+
+  /// Given an expression, return its type assuming it is
+  /// in the caller position of a call (that is, accounting
+  /// for the possibility of a call method).  Returns null
+  /// if expression is not statically callable.
+  FunctionType getTypeAsCaller(Expression applicand) {
+    var t = getStaticType(applicand);
+    if (t is InterfaceType) {
+      return getCallMethodType(t);
+    }
+    if (t is FunctionType) return t;
+    return null;
+  }
+
+  /// Gets the expected return type of the given function [body], either from
+  /// a normal return/yield, or from a yield*.
+  DartType getExpectedReturnType(FunctionBody body, {bool yieldStar: false}) {
+    FunctionType functionType;
+    var parent = body.parent;
+    if (parent is Declaration) {
+      functionType = elementType(parent.element);
+    } else {
+      assert(parent is FunctionExpression);
+      functionType = getStaticType(parent);
+    }
+
+    var type = functionType.returnType;
+
+    InterfaceType expectedType = null;
+    if (body.isAsynchronous) {
+      if (body.isGenerator) {
+        // Stream<T> -> T
+        expectedType = provider.streamType;
+      } else {
+        // Future<T> -> T
+        // TODO(vsm): Revisit with issue #228.
+        expectedType = provider.futureType;
+      }
+    } else {
+      if (body.isGenerator) {
+        // Iterable<T> -> T
+        expectedType = provider.iterableType;
+      } else {
+        // T -> T
+        return type;
+      }
+    }
+    if (yieldStar) {
+      if (type.isDynamic) {
+        // Ensure it's at least a Stream / Iterable.
+        return expectedType.substitute4([provider.dynamicType]);
+      } else {
+        // Analyzer will provide a separate error if expected type
+        // is not compatible with type.
+        return type;
+      }
+    }
+    if (type.isDynamic) {
+      return type;
+    } else if (type is InterfaceType && type.element == expectedType.element) {
+      return type.typeArguments[0];
+    } else {
+      // Malformed type - fallback on analyzer error.
+      return null;
+    }
+  }
+
+  DartType getStaticType(Expression expr) {
+    return expr.staticType ?? provider.dynamicType;
+  }
+
+  bool _isBottom(DartType t, {bool dynamicIsBottom: false}) {
+    if (t.isDynamic && dynamicIsBottom) return true;
+    // TODO(vsm): We need direct support for non-nullability in DartType.
+    // This should check on "true/nonnullable" Bottom
+    if (t.isBottom) return true;
+    return false;
+  }
+
+  bool _isTop(DartType t, {bool dynamicIsBottom: false}) {
+    if (t.isDynamic && !dynamicIsBottom) return true;
+    if (t.isObject) return true;
+    return false;
+  }
+
+  bool _anyParameterType(FunctionType ft, bool predicate(DartType t)) {
+    return ft.normalParameterTypes.any(predicate) ||
+        ft.optionalParameterTypes.any(predicate) ||
+        ft.namedParameterTypes.values.any(predicate);
+  }
+
+  // TODO(leafp): Revisit this.
+  bool isGroundType(DartType t) {
+    if (t is TypeParameterType) return false;
+    if (_isTop(t)) return true;
+
+    if (t is FunctionType) {
+      if (!_isTop(t.returnType) ||
+          _anyParameterType(t, (pt) => !_isBottom(pt, dynamicIsBottom: true))) {
+        return false;
+      } else {
+        return true;
+      }
+    }
+
+    if (t is InterfaceType) {
+      var typeArguments = t.typeArguments;
+      for (var typeArgument in typeArguments) {
+        if (!_isTop(typeArgument)) return false;
+      }
+      return true;
+    }
+
+    // We should not see any other type aside from malformed code.
+    return false;
+  }
+
+  /// Check that f1 is a subtype of f2. [ignoreReturn] is used in the DDC
+  /// checker to determine whether f1 would be a subtype of f2 if the return
+  /// type of f1 is set to match f2's return type.
+  // [fuzzyArrows] indicates whether or not the f1 and f2 should be
+  // treated as fuzzy arrow types (and hence dynamic parameters to f2 treated as
+  // bottom).
+  bool isFunctionSubTypeOf(FunctionType f1, FunctionType f2,
+      {bool fuzzyArrows: true, bool ignoreReturn: false}) {
+    final r1s = f1.normalParameterTypes;
+    final o1s = f1.optionalParameterTypes;
+    final n1s = f1.namedParameterTypes;
+    final r2s = f2.normalParameterTypes;
+    final o2s = f2.optionalParameterTypes;
+    final n2s = f2.namedParameterTypes;
+    final ret1 = ignoreReturn ? f2.returnType : f1.returnType;
+    final ret2 = f2.returnType;
+
+    // A -> B <: C -> D if C <: A and
+    // either D is void or B <: D
+    if (!ret2.isVoid && !isSubTypeOf(ret1, ret2)) return false;
+
+    // Reject if one has named and the other has optional
+    if (n1s.length > 0 && o2s.length > 0) return false;
+    if (n2s.length > 0 && o1s.length > 0) return false;
+
+    // f2 has named parameters
+    if (n2s.length > 0) {
+      // Check that every named parameter in f2 has a match in f1
+      for (String k2 in n2s.keys) {
+        if (!n1s.containsKey(k2)) return false;
+        if (!isSubTypeOf(n2s[k2], n1s[k2],
+            dynamicIsBottom: fuzzyArrows)) return false;
+      }
+    }
+    // If we get here, we either have no named parameters,
+    // or else the named parameters match and we have no optional
+    // parameters
+
+    // If f1 has more required parameters, reject
+    if (r1s.length > r2s.length) return false;
+
+    // If f2 has more required + optional parameters, reject
+    if (r2s.length + o2s.length > r1s.length + o1s.length) return false;
+
+    // The parameter lists must look like the following at this point
+    // where rrr is a region of required, and ooo is a region of optionals.
+    // f1: rrr ooo ooo ooo
+    // f2: rrr rrr ooo
+    int rr = r1s.length; // required in both
+    int or = r2s.length - r1s.length; // optional in f1, required in f2
+    int oo = o2s.length; // optional in both
+
+    for (int i = 0; i < rr; ++i) {
+      if (!isSubTypeOf(r2s[i], r1s[i],
+          dynamicIsBottom: fuzzyArrows)) return false;
+    }
+    for (int i = 0, j = rr; i < or; ++i, ++j) {
+      if (!isSubTypeOf(r2s[j], o1s[i],
+          dynamicIsBottom: fuzzyArrows)) return false;
+    }
+    for (int i = or, j = 0; i < oo; ++i, ++j) {
+      if (!isSubTypeOf(o2s[j], o1s[i],
+          dynamicIsBottom: fuzzyArrows)) return false;
+    }
+    return true;
+  }
+
+  bool _isInterfaceSubTypeOf(InterfaceType i1, InterfaceType i2) {
+    if (i1 == i2) return true;
+
+    if (i1.element == i2.element) {
+      List<DartType> tArgs1 = i1.typeArguments;
+      List<DartType> tArgs2 = i2.typeArguments;
+
+      // TODO(leafp): Verify that this is always true
+      // Do raw types get filled in?
+      assert(tArgs1.length == tArgs2.length);
+
+      for (int i = 0; i < tArgs1.length; i++) {
+        DartType t1 = tArgs1[i];
+        DartType t2 = tArgs2[i];
+        if (!isSubTypeOf(t1, t2)) return false;
+      }
+      return true;
+    }
+
+    if (i2.isDartCoreFunction) {
+      if (i1.element.getMethod("call") != null) return true;
+    }
+
+    if (i1 == provider.objectType) return false;
+
+    if (_isInterfaceSubTypeOf(i1.superclass, i2)) return true;
+
+    for (final parent in i1.interfaces) {
+      if (_isInterfaceSubTypeOf(parent, i2)) return true;
+    }
+
+    for (final parent in i1.mixins) {
+      if (_isInterfaceSubTypeOf(parent, i2)) return true;
+    }
+
+    return false;
+  }
+
+  bool isSubTypeOf(DartType t1, DartType t2, {bool dynamicIsBottom: false}) {
+    if (t1 == t2) return true;
+
+    // Trivially true.
+    if (_isTop(t2, dynamicIsBottom: dynamicIsBottom) ||
+        _isBottom(t1, dynamicIsBottom: dynamicIsBottom)) {
+      return true;
+    }
+
+    // Trivially false.
+    if (_isTop(t1, dynamicIsBottom: dynamicIsBottom) ||
+        _isBottom(t2, dynamicIsBottom: dynamicIsBottom)) {
+      return false;
+    }
+
+    // The null type is a subtype of any nullable type, which is all Dart types.
+    // TODO(vsm): Note, t1.isBottom still allows for null confusingly.
+    // _isBottom(t1) does not necessarily imply t1.isBottom if there are
+    // nonnullable types in the system.
+    if (t1.isBottom) {
+      return true;
+    }
+
+    // S <: T where S is a type variable
+    //  T is not dynamic or object (handled above)
+    //  S != T (handled above)
+    //  So only true if bound of S is S' and
+    //  S' <: T
+    if (t1 is TypeParameterType) {
+      DartType bound = t1.element.bound;
+      if (bound == null) return false;
+      return isSubTypeOf(bound, t2);
+    }
+
+    if (t2 is TypeParameterType) {
+      return false;
+    }
+
+    if (t2.isDartCoreFunction) {
+      if (t1 is FunctionType) return true;
+      if (t1.element is ClassElement) {
+        if ((t1.element as ClassElement).getMethod("call") != null) return true;
+      }
+    }
+
+    // "Traditional" name-based subtype check.
+    if (t1 is InterfaceType && t2 is InterfaceType) {
+      return _isInterfaceSubTypeOf(t1, t2);
+    }
+
+    if (t1 is! FunctionType && t2 is! FunctionType) return false;
+
+    if (t1 is InterfaceType && t2 is FunctionType) {
+      var callType = getCallMethodType(t1);
+      if (callType == null) return false;
+      return isFunctionSubTypeOf(callType, t2);
+    }
+
+    if (t1 is FunctionType && t2 is InterfaceType) {
+      return false;
+    }
+
+    // Functions
+    // Note: it appears under the hood all Dart functions map to a class /
+    // hidden type that:
+    //  (a) subtypes Object (an internal _FunctionImpl in the VM)
+    //  (b) implements Function
+    //  (c) provides standard Object members (hashCode, toString)
+    //  (d) contains private members (corresponding to _FunctionImpl?)
+    //  (e) provides a call method to handle the actual function invocation
+    //
+    // The standard Dart subtyping rules are structural in nature.  I.e.,
+    // bivariant on arguments and return type.
+    //
+    // The below tries for a more traditional subtyping rule:
+    // - covariant on return type
+    // - contravariant on parameters
+    // - 'sensible' (?) rules on optional and/or named params
+    // but doesn't properly mix with class subtyping.  I suspect Java 8 lambdas
+    // essentially map to dynamic (and rely on invokedynamic) due to similar
+    // issues.
+    return isFunctionSubTypeOf(t1 as FunctionType, t2 as FunctionType);
+  }
+
+  bool isAssignable(DartType t1, DartType t2) {
+    return isSubTypeOf(t1, t2);
+  }
+
+  // Produce a coercion which coerces something of type fromT
+  // to something of type toT.
+  // If wrap is true and both are function types, a closure
+  // wrapper coercion is produced using _wrapTo (see above)
+  // Returns the error coercion if the types cannot be coerced
+  // according to our current criteria.
+  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 (isSubTypeOf(fromT, toT)) return Coercion.identity(toT);
+
+    // For now, reject conversions between function types and
+    // call method objects.  We could choose to allow casts here.
+    // Wrapping a function type to assign it to a call method
+    // object will never succeed.  Wrapping the other way could
+    // be allowed.
+    if ((fromT is FunctionType && getCallMethodType(toT) != null) ||
+        (toT is FunctionType && getCallMethodType(fromT) != null)) {
+      return Coercion.error();
+    }
+
+    // Downcast if toT <: fromT
+    if (isSubTypeOf(toT, fromT)) return Coercion.cast(fromT, toT);
+
+    // 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();
+  }
+
+  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(this, expr, toT);
+    var reason = null;
+
+    var errors = <String>[];
+    var ok = inferrer.inferExpression(expr, toT, errors);
+    if (ok) return InferredType.create(this, expr, toT);
+    reason = (errors.isNotEmpty) ? errors.first : null;
+
+    if (c is Cast) return DownCast.create(this, expr, c, reason: reason);
+    assert(false);
+    return null;
+  }
+
+  DartType elementType(Element e) {
+    if (e == null) {
+      // Malformed code - just return dynamic.
+      return provider.dynamicType;
+    }
+    return (e as dynamic).type;
+  }
+
+  bool _isLibraryPrefix(Expression node) =>
+      node is SimpleIdentifier && node.staticElement is PrefixElement;
+
+  /// Returns `true` if the target expression is dynamic.
+  bool isDynamicTarget(Expression node) {
+    if (node == null) return false;
+
+    if (_isLibraryPrefix(node)) return false;
+
+    // Null type happens when we have unknown identifiers, like a dart: import
+    // that doesn't resolve.
+    var type = node.staticType;
+    return type == null || type.isDynamic;
+  }
+
+  /// Returns `true` if the expression is a dynamic function call or method
+  /// invocation.
+  bool isDynamicCall(Expression call) {
+    var ft = getTypeAsCaller(call);
+    // TODO(leafp): This will currently return true if t is Function
+    // This is probably the most correct thing to do for now, since
+    // this code is also used by the back end.  Maybe revisit at some
+    // point?
+    if (ft == null) return true;
+    // Dynamic as the parameter type is treated as bottom.  A function with
+    // a dynamic parameter type requires a dynamic call in general.
+    // However, as an optimization, if we have an original definition, we know
+    // dynamic is reified as Object - in this case a regular call is fine.
+    if (call is SimpleIdentifier) {
+      var element = call.staticElement;
+      if (element is FunctionElement || element is MethodElement) {
+        // An original declaration.
+        return false;
+      }
+    }
+
+    return _anyParameterType(ft, (pt) => pt.isDynamic);
+  }
+}
+
+class DownwardsInference {
+  final TypeRules rules;
+
+  DownwardsInference(this.rules);
+
+  /// Called for each list literal which gets inferred
+  void annotateListLiteral(ListLiteral e, List<DartType> targs) {}
+
+  /// Called for each map literal which gets inferred
+  void annotateMapLiteral(MapLiteral e, List<DartType> targs) {}
+
+  /// Called for each new/const which gets inferred
+  void annotateInstanceCreationExpression(
+      InstanceCreationExpression e, List<DartType> targs) {}
+
+  /// Called for cast from dynamic required for inference to succeed
+  void annotateCastFromDynamic(Expression e, DartType t) {}
+
+  /// Called for each function expression return type inferred
+  void annotateFunctionExpression(FunctionExpression e, DartType returnType) {}
+
+  /// Downward inference
+  bool inferExpression(Expression e, DartType t, List<String> errors) {
+    // Don't cast top level expressions, only sub-expressions
+    return _inferExpression(e, t, errors, cast: false);
+  }
+
+  /// Downward inference
+  bool _inferExpression(Expression e, DartType t, List<String> errors,
+      {cast: true}) {
+    if (e is ConditionalExpression) {
+      return _inferConditionalExpression(e, t, errors);
+    }
+    if (e is ParenthesizedExpression) {
+      return _inferParenthesizedExpression(e, t, errors);
+    }
+    if (rules.isSubTypeOf(rules.getStaticType(e), t)) return true;
+    if (cast && rules.getStaticType(e).isDynamic) {
+      annotateCastFromDynamic(e, t);
+      return true;
+    }
+    if (e is FunctionExpression) return _inferFunctionExpression(e, t, errors);
+    if (e is ListLiteral) return _inferListLiteral(e, t, errors);
+    if (e is MapLiteral) return _inferMapLiteral(e, t, errors);
+    if (e is NamedExpression) return _inferNamedExpression(e, t, errors);
+    if (e is InstanceCreationExpression) {
+      return _inferInstanceCreationExpression(e, t, errors);
+    }
+    errors.add("$e cannot be typed as $t");
+    return false;
+  }
+
+  /// If t1 = I<dynamic, ..., dynamic>, then look for a supertype
+  /// of t1 of the form K<S0, ..., Sm> where t2 = K<S0', ..., Sm'>
+  /// If the supertype exists, use the constraints S0 <: S0', ... Sm <: Sm'
+  /// to derive a concrete instantation for I of the form <T0, ..., Tn>,
+  /// such that I<T0, .., Tn> <: t2
+  List<DartType> _matchTypes(InterfaceType t1, InterfaceType t2) {
+    if (t1 == t2) return t2.typeArguments;
+    var tArgs1 = t1.typeArguments;
+    var tArgs2 = t2.typeArguments;
+    // If t1 isn't a raw type, bail out
+    if (tArgs1 != null && tArgs1.any((t) => !t.isDynamic)) return null;
+
+    // This is our inferred type argument list.  We start at all dynamic,
+    // and fill in with inferred types when we reach a match.
+    var actuals =
+        new List<DartType>.filled(tArgs1.length, rules.provider.dynamicType);
+
+    // When we find the supertype of t1 with the same
+    // classname as t2 (see below), we have the following:
+    // If t1 is an instantiation of a class T1<X0, ..., Xn>
+    // and t2 is an instantiation of a class T2<Y0, ...., Ym>
+    // of the form t2 = T2<S0, ..., Sm>
+    // then we want to choose instantiations for the Xi
+    // T0, ..., Tn such that T1<T0, ..., Tn> <: t2 .
+    // To find this, we simply instantate T1 with
+    // X0, ..., Xn, and then find its superclass
+    // T2<T0', ..., Tn'>.  We then solve the constraint
+    // set T0' <: S0, ..., Tn' <: Sn for the Xi.
+    // Currently, we only handle constraints where
+    // the Ti' is one of the Xi'.  If there are multiple
+    // constraints on some Xi, we choose the lower of the
+    // two (if it exists).
+    bool permute(List<DartType> permutedArgs) {
+      if (permutedArgs == null) return false;
+      var ps = t1.typeParameters;
+      var ts = ps.map((p) => p.type).toList();
+      for (int i = 0; i < permutedArgs.length; i++) {
+        var tVar = permutedArgs[i];
+        var tActual = tArgs2[i];
+        var index = ts.indexOf(tVar);
+        if (index >= 0 && rules.isSubTypeOf(tActual, actuals[index])) {
+          actuals[index] = tActual;
+        }
+      }
+      return actuals.any((x) => !x.isDynamic);
+    }
+
+    // Look for the first supertype of t1 with the same class name as t2.
+    bool match(InterfaceType t1) {
+      if (t1.element == t2.element) {
+        return permute(t1.typeArguments);
+      }
+
+      if (t1 == rules.provider.objectType) return false;
+
+      if (match(t1.superclass)) return true;
+
+      for (final parent in t1.interfaces) {
+        if (match(parent)) return true;
+      }
+
+      for (final parent in t1.mixins) {
+        if (match(parent)) return true;
+      }
+      return false;
+    }
+
+    // We have that t1 = T1<dynamic, ..., dynamic>.
+    // To match t1 against t2, we use the uninstantiated version
+    // of t1, essentially treating it as an instantiation with
+    // fresh variables, and solve for the variables.
+    // t1.element.type will be of the form T1<X0, ..., Xn>
+    if (!match(t1.element.type)) return null;
+    var newT1 = t1.element.type.substitute4(actuals);
+    // If we found a solution, return it.
+    if (rules.isSubTypeOf(newT1, t2)) return actuals;
+    return null;
+  }
+
+  /// These assume that e is not already a subtype of t
+
+  bool _inferConditionalExpression(
+      ConditionalExpression e, DartType t, errors) {
+    return _inferExpression(e.thenExpression, t, errors) &&
+        _inferExpression(e.elseExpression, t, errors);
+  }
+
+  bool _inferParenthesizedExpression(
+      ParenthesizedExpression e, DartType t, errors) {
+    return _inferExpression(e.expression, t, errors);
+  }
+
+  bool _inferInstanceCreationExpression(
+      InstanceCreationExpression e, DartType t, errors) {
+    var arguments = e.argumentList.arguments;
+    var rawType = rules.getStaticType(e);
+    // rawType is the instantiated type of the instance
+    if (rawType is! InterfaceType) return false;
+    var type = (rawType as InterfaceType);
+    if (type.typeParameters == null ||
+        type.typeParameters.length == 0) return false;
+    if (e.constructorName.type == null) return false;
+    // classTypeName is the type name of the class being instantiated
+    var classTypeName = e.constructorName.type;
+    // Check that we were not passed any type arguments
+    if (classTypeName.typeArguments != null) return false;
+    // Infer type arguments
+    if (t is! InterfaceType) return false;
+    var targs = _matchTypes(type, t);
+    if (targs == null) return false;
+    if (e.staticElement == null) return false;
+    var constructorElement = e.staticElement;
+    // From the constructor element get:
+    //  the instantiated type of the constructor, then
+    //     the uninstantiated element for the constructor, then
+    //        the uninstantiated type for the constructor
+    var rawConstructorElement =
+        constructorElement.type.element as ConstructorElement;
+    var baseType = rawConstructorElement.type;
+    if (baseType == null) return false;
+    // From the interface type (instantiated), get:
+    //  the uninstantiated element, then
+    //    the uninstantiated type, then
+    //      the type arguments (aka the type parameters)
+    var tparams = type.element.type.typeArguments;
+    // Take the uninstantiated constructor type, and replace the type
+    // parameters with the inferred arguments.
+    var fType = baseType.substitute2(targs, tparams);
+    {
+      var rTypes = fType.normalParameterTypes;
+      var oTypes = fType.optionalParameterTypes;
+      var pTypes = new List.from(rTypes)..addAll(oTypes);
+      var pArgs = arguments.where((x) => x is! NamedExpression);
+      var pi = 0;
+      for (var arg in pArgs) {
+        if (pi >= pTypes.length) return false;
+        var argType = pTypes[pi];
+        if (!_inferExpression(arg, argType, errors)) return false;
+        pi++;
+      }
+      var nTypes = fType.namedParameterTypes;
+      for (var arg0 in arguments) {
+        if (arg0 is! NamedExpression) continue;
+        var arg = arg0 as NamedExpression;
+        SimpleIdentifier nameNode = arg.name.label;
+        String name = nameNode.name;
+        var argType = nTypes[name];
+        if (argType == null) return false;
+        if (!_inferExpression(arg, argType, errors)) return false;
+      }
+    }
+    annotateInstanceCreationExpression(e, targs);
+    return true;
+  }
+
+  bool _inferNamedExpression(NamedExpression e, DartType t, errors) {
+    return _inferExpression(e.expression, t, errors);
+  }
+
+  bool _inferFunctionExpression(FunctionExpression e, DartType t, errors) {
+    if (t is! FunctionType) return false;
+    var fType = t as FunctionType;
+    var eType = e.staticType as FunctionType;
+    if (eType is! FunctionType) return false;
+
+    // We have a function literal, so we can treat the arrow type
+    // as non-fuzzy.  Since we're not improving on parameter types
+    // currently, if this check fails then we cannot succeed, so
+    // bail out.  Otherwise, we never need to check the parameter types
+    // again.
+    if (!rules.isFunctionSubTypeOf(eType, fType,
+        fuzzyArrows: false, ignoreReturn: true)) return false;
+
+    // This only entered inference because of fuzzy typing.
+    // The function type is already specific enough, we can just
+    // succeed and treat it as a successful inference
+    if (rules.isSubTypeOf(eType.returnType, fType.returnType)) return true;
+
+    // Fuzzy typing again, handle the void case (not caught by the previous)
+    if (fType.returnType.isVoid) return true;
+
+    if (e.body is! ExpressionFunctionBody) return false;
+    var body = (e.body as ExpressionFunctionBody).expression;
+    if (!_inferExpression(body, fType.returnType, errors)) return false;
+
+    // TODO(leafp): Try narrowing the argument types if possible
+    // to get better code in the function body.  This requires checking
+    // that the body is well-typed at the more specific type.
+
+    // At this point, we know that the parameter types are in the appropriate subtype
+    // relation, and we have checked that we can type the body at the appropriate return
+    // type, so we can are done.
+    annotateFunctionExpression(e, fType.returnType);
+    return true;
+  }
+
+  bool _inferListLiteral(ListLiteral e, DartType t, errors) {
+    var dyn = rules.provider.dynamicType;
+    var listT = rules.provider.listType.substitute4([dyn]);
+    // List <: t (using dart rules) must be true
+    if (!listT.isSubtypeOf(t)) return false;
+    // The list literal must have no type arguments
+    if (e.typeArguments != null) return false;
+    if (t is! InterfaceType) return false;
+    var targs = _matchTypes(listT, t);
+    if (targs == null) return false;
+    assert(targs.length == 1);
+    var etype = targs[0];
+    assert(!etype.isDynamic);
+    var elements = e.elements;
+    var b = elements.every((e) => _inferExpression(e, etype, errors));
+    if (b) annotateListLiteral(e, targs);
+    return b;
+  }
+
+  bool _inferMapLiteral(MapLiteral e, DartType t, errors) {
+    var dyn = rules.provider.dynamicType;
+    var mapT = rules.provider.mapType.substitute4([dyn, dyn]);
+    // Map <: t (using dart rules) must be true
+    if (!mapT.isSubtypeOf(t)) return false;
+    // The map literal must have no type arguments
+    if (e.typeArguments != null) return false;
+    if (t is! InterfaceType) return false;
+    var targs = _matchTypes(mapT, t);
+    if (targs == null) return false;
+    assert(targs.length == 2);
+    var kType = targs[0];
+    var vType = targs[1];
+    assert(!(kType.isDynamic && vType.isDynamic));
+    var entries = e.entries;
+    bool inferEntry(MapLiteralEntry entry) {
+      return _inferExpression(entry.key, kType, errors) &&
+          _inferExpression(entry.value, vType, errors);
+    }
+    var b = entries.every(inferEntry);
+    if (b) annotateMapLiteral(e, targs);
+    return b;
+  }
+}
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 022f3f8..3e8fa88 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.26.1+7
+version: 0.26.1+9
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: http://www.dartlang.org
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 3d239ae..d0d3e55 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -339,6 +339,13 @@
     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'));
+    expect(resolved.toString(), 'dart:core/int.dart');
+  }
+
   void test_shortName() {
     expect(source.shortName, 'test.dart');
   }
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index cabe5d7..db5a1f2 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -6673,6 +6673,34 @@
     expect(variable.setter, isNull);
   }
 
+  void test_visitVariableDeclaration_top_docRange() {
+    // final a, b;
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    VariableDeclaration variableDeclaration1 =
+        AstFactory.variableDeclaration('a');
+    VariableDeclaration variableDeclaration2 =
+        AstFactory.variableDeclaration('b');
+    TopLevelVariableDeclaration topLevelVariableDeclaration = AstFactory
+        .topLevelVariableDeclaration(
+            Keyword.FINAL, null, [variableDeclaration1, variableDeclaration2]);
+    topLevelVariableDeclaration.documentationComment = AstFactory
+        .documentationComment(
+            [TokenFactory.tokenFromString('/// aaa')..offset = 50], []);
+
+    topLevelVariableDeclaration.accept(builder);
+    List<TopLevelVariableElement> variables = holder.topLevelVariables;
+    expect(variables, hasLength(2));
+
+    TopLevelVariableElement variable1 = variables[0];
+    expect(variable1, isNotNull);
+    _assertHasDocRange(variable1, 50, 7);
+
+    TopLevelVariableElement variable2 = variables[1];
+    expect(variable2, isNotNull);
+    _assertHasDocRange(variable2, 50, 7);
+  }
+
   void test_visitVariableDeclaration_top_final() {
     // final v;
     ElementHolder holder = new ElementHolder();
@@ -8944,7 +8972,7 @@
 final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {
   'first' : const LibraryInfo(
     'first/first.dart',
-    category: 'First',
+    categories: 'Client',
     documented: true,
     platforms: VM_PLATFORM,
     dart2jsPath: 'first/first_dart2js.dart'),
@@ -8953,7 +8981,7 @@
     expect(libraryMap.size(), 1);
     SdkLibrary first = libraryMap.getLibrary("dart:first");
     expect(first, isNotNull);
-    expect(first.category, "First");
+    expect(first.category, "Client");
     expect(first.path, "first/first_dart2js.dart");
     expect(first.shortName, "dart:first");
     expect(first.isDart2JsLibrary, false);
@@ -8976,13 +9004,13 @@
 final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {
   'first' : const LibraryInfo(
     'first/first.dart',
-    category: 'First',
+    categories: 'Client',
     documented: true,
     platforms: VM_PLATFORM),
 
   'second' : const LibraryInfo(
     'second/second.dart',
-    category: 'Second',
+    categories: 'Server',
     documented: false,
     implementation: true,
     platforms: 0),
@@ -8991,7 +9019,7 @@
     expect(libraryMap.size(), 2);
     SdkLibrary first = libraryMap.getLibrary("dart:first");
     expect(first, isNotNull);
-    expect(first.category, "First");
+    expect(first.category, "Client");
     expect(first.path, "first/first.dart");
     expect(first.shortName, "dart:first");
     expect(first.isDart2JsLibrary, false);
@@ -9000,7 +9028,7 @@
     expect(first.isVmLibrary, true);
     SdkLibrary second = libraryMap.getLibrary("dart:second");
     expect(second, isNotNull);
-    expect(second.category, "Second");
+    expect(second.category, "Server");
     expect(second.path, "second/second.dart");
     expect(second.shortName, "dart:second");
     expect(second.isDart2JsLibrary, false);
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 310df94..43bc54f 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -31,7 +31,7 @@
 import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/string_source.dart';
-import 'package:analyzer/task/model.dart' hide AnalysisTask, WorkManager;
+import 'package:analyzer/task/model.dart' as newContext;
 import 'package:html/dom.dart' show Document;
 import 'package:path/path.dart' as pathos;
 import 'package:typed_mock/typed_mock.dart';
@@ -5695,7 +5695,7 @@
   }
 
   @override
-  List<AnalysisTarget> get explicitTargets {
+  List<newContext.AnalysisTarget> get explicitTargets {
     fail("Unexpected invocation of visitCacheItems");
     return null;
   }
@@ -5766,7 +5766,7 @@
   }
 
   @override
-  List<AnalysisTarget> get priorityTargets {
+  List<newContext.AnalysisTarget> get priorityTargets {
     fail("Unexpected invocation of visitCacheItems");
     return null;
   }
@@ -5818,15 +5818,20 @@
   }
 
   @override
+  TypeResolverVisitorFactory get typeResolverVisitorFactory {
+    fail("Unexpected invocation of getTypeResolverVisitorFactory");
+    return null;
+  }
+
+  @override
   TypeSystem get typeSystem {
     fail("Unexpected invocation of getTypeSystem");
     return null;
   }
 
   @override
-  TypeResolverVisitorFactory get typeResolverVisitorFactory {
-    fail("Unexpected invocation of getTypeResolverVisitorFactory");
-    return null;
+  List<newContext.WorkManager> get workManagers {
+    fail("Unexpected invocation of workManagers");
   }
 
   @override
@@ -5907,7 +5912,8 @@
   }
 
   @override
-  Object computeResult(AnalysisTarget target, ResultDescriptor result) {
+  Object computeResult(
+      newContext.AnalysisTarget target, newContext.ResultDescriptor result) {
     fail("Unexpected invocation of computeResult");
     return null;
   }
@@ -5930,7 +5936,7 @@
   }
 
   @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
+  CacheEntry getCacheEntry(newContext.AnalysisTarget target) {
     fail("Unexpected invocation of visitCacheItems");
     return null;
   }
@@ -6055,7 +6061,8 @@
   }
 
   @override
-  Object getResult(AnalysisTarget target, ResultDescriptor result) {
+  Object getResult(
+      newContext.AnalysisTarget target, newContext.ResultDescriptor result) {
     fail("Unexpected invocation of getResult");
     return null;
   }
@@ -6091,7 +6098,8 @@
   }
 
   @override
-  Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
+  Stream<ComputedResult> onResultComputed(
+      newContext.ResultDescriptor descriptor) {
     fail("Unexpected invocation of onResultComputed");
     return null;
   }
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index dedbb2a..8a6c71f 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -691,6 +691,32 @@
     verify([source]);
   }
 
+  void test_bug_24539_getter() {
+    Source source = addSource('''
+class C<T> {
+  List<Foo> get x => null;
+}
+
+typedef Foo(param);
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  void test_bug_24539_setter() {
+    Source source = addSource('''
+class C<T> {
+  void set x(List<Foo> value) {}
+}
+
+typedef Foo(param);
+''');
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   void test_builtInIdentifierAsType_dynamic() {
     Source source = addSource(r'''
 f() {
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 0544bf5..554bc0a 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -905,7 +905,7 @@
     List<AnalysisError> errors = errorInfo.errors;
     expect(errors, hasLength(0));
     errors = context.computeErrors(source);
-    expect(errors, hasLength(3));
+    expect(errors, hasLength(2));
   }
 
   void test_getHtmlFilesReferencing_html() {
@@ -1191,6 +1191,43 @@
     fail("The added source was not in the list of library sources");
   }
 
+  void test_getLibrarySources_inSDK() {
+    Source source = addSource(
+        '/test.dart',
+        r'''
+import 'dart:async';
+Stream S = null;
+''');
+    LibraryElement testLibrary = context.computeLibraryElement(source);
+    // prepare "Stream" ClassElement
+    ClassElement streamElement;
+    {
+      CompilationUnitElement testUnit = testLibrary.definingCompilationUnit;
+      InterfaceType streamType = testUnit.topLevelVariables[0].type;
+      streamElement = streamType.element;
+    }
+    // must be from SDK context
+    AnalysisContext sdkContext = context.sourceFactory.dartSdk.context;
+    expect(sdkContext, streamElement.context);
+    Source intSource = streamElement.source;
+    // must be in the "async" library - SDK context
+    {
+      List<Source> coreLibraries = sdkContext.getLibrariesContaining(intSource);
+      expect(coreLibraries, hasLength(1));
+      Source coreSource = coreLibraries[0];
+      expect(coreSource.isInSystemLibrary, isTrue);
+      expect(coreSource.shortName, 'async.dart');
+    }
+    // must be in the "async" library - main context
+    {
+      List<Source> coreLibraries = context.getLibrariesContaining(intSource);
+      expect(coreLibraries, hasLength(1));
+      Source coreSource = coreLibraries[0];
+      expect(coreSource.isInSystemLibrary, isTrue);
+      expect(coreSource.shortName, 'async.dart');
+    }
+  }
+
   void test_getLineInfo() {
     Source source = addSource(
         "/test.dart",
@@ -1718,9 +1755,9 @@
 </script></body></html>''');
     _analyzeAll_assertFinished();
     context.computeErrors(htmlSource);
-    expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(htmlSource)),
-        isTrue,
-        reason: "htmlSource has an error");
+//    expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(htmlSource)),
+//        isTrue,
+//        reason: "htmlSource has an error");
     // add libB.dart and analyze
     Source libBSource = addSource("/libB.dart", "library libB;");
     _analyzeAll_assertFinished();
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index 25de8b3..121fb5d 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -118,15 +118,23 @@
 
 import 'dart:math';
 
+part 'stream.dart';
+
 class Future<T> {
   factory Future.delayed(Duration duration, [T computation()]) => null;
   factory Future.value([value]) => null;
   static Future wait(List<Future> futures) => null;
 }
-
+''',
+      const <_MockSdkFile>[
+    const _MockSdkFile(
+        '/lib/async/stream.dart',
+        r'''
+part of dart.async;
 class Stream<T> {}
 abstract class StreamTransformer<S, T> {}
-''');
+''')
+  ]);
 
   static const _MockSdkLibrary LIB_COLLECTION = const _MockSdkLibrary(
       'dart:collection',
@@ -197,6 +205,9 @@
   MockSdk() {
     LIBRARIES.forEach((_MockSdkLibrary library) {
       provider.newFile(library.path, library.content);
+      library.parts.forEach((file) {
+        provider.newFile(file.path, file.content);
+      });
     });
   }
 
@@ -280,6 +291,7 @@
       "dart:core": "/lib/core/core.dart",
       "dart:html": "/lib/html/dartium/html_dartium.dart",
       "dart:async": "/lib/async/async.dart",
+      "dart:async/stream.dart": "/lib/async/stream.dart",
       "dart:collection": "/lib/collection/collection.dart",
       "dart:convert": "/lib/convert/convert.dart",
       "dart:math": "/lib/math/math.dart"
@@ -302,8 +314,10 @@
   final String shortName;
   final String path;
   final String content;
+  final List<_MockSdkFile> parts;
 
-  const _MockSdkLibrary(this.shortName, this.path, this.content);
+  const _MockSdkLibrary(this.shortName, this.path, this.content,
+      [this.parts = const <_MockSdkFile>[]]);
 
   @override
   String get category => throw unimplemented;
@@ -329,6 +343,13 @@
   UnimplementedError get unimplemented => new UnimplementedError();
 }
 
+class _MockSdkFile {
+  final String path;
+  final String content;
+
+  const _MockSdkFile(this.path, this.content);
+}
+
 /**
  * An [AnalysisContextImpl] that only contains sources for a Dart SDK.
  */
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 1c94faf..0142fcb 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/task/html.dart';
+import 'package:analyzer/src/task/strong/info.dart';
 import 'package:analyzer/task/dart.dart';
 import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/model.dart';
@@ -43,6 +44,7 @@
   runReflectiveTests(ComputeConstantDependenciesTaskTest);
   runReflectiveTests(ComputeConstantValueTaskTest);
   runReflectiveTests(ComputeInferableStaticVariableDependenciesTaskTest);
+  runReflectiveTests(ComputeLibraryCycleTaskTest);
   runReflectiveTests(ContainingLibrariesTaskTest);
   runReflectiveTests(DartErrorsTaskTest);
   runReflectiveTests(EvaluateUnitConstantsTaskTest);
@@ -57,12 +59,14 @@
   runReflectiveTests(LibraryUnitErrorsTaskTest);
   runReflectiveTests(ParseDartTaskTest);
   runReflectiveTests(PartiallyResolveUnitReferencesTaskTest);
-  runReflectiveTests(ResolveFunctionBodiesInUnitTaskTest);
+  runReflectiveTests(ResolveInstanceFieldsInUnitTaskTest);
   runReflectiveTests(ResolveLibraryTypeNamesTaskTest);
+  runReflectiveTests(ResolveUnitTaskTest);
   runReflectiveTests(ResolveUnitTypeNamesTaskTest);
   runReflectiveTests(ResolveVariableReferencesTaskTest);
   runReflectiveTests(ScanDartTaskTest);
   runReflectiveTests(StrongModeInferenceTest);
+  runReflectiveTests(StrongModeVerifyUnitTaskTest);
   runReflectiveTests(VerifyUnitTaskTest);
 }
 
@@ -114,15 +118,16 @@
 isInstanceOf isParseDartTask = new isInstanceOf<ParseDartTask>();
 isInstanceOf isPartiallyResolveUnitReferencesTask =
     new isInstanceOf<PartiallyResolveUnitReferencesTask>();
-isInstanceOf isResolveFunctionBodiesInUnitTask =
-    new isInstanceOf<ResolveFunctionBodiesInUnitTask>();
 isInstanceOf isResolveLibraryTypeNamesTask =
     new isInstanceOf<ResolveLibraryTypeNamesTask>();
+isInstanceOf isResolveUnitTask = new isInstanceOf<ResolveUnitTask>();
 isInstanceOf isResolveUnitTypeNamesTask =
     new isInstanceOf<ResolveUnitTypeNamesTask>();
 isInstanceOf isResolveVariableReferencesTask =
     new isInstanceOf<ResolveVariableReferencesTask>();
 isInstanceOf isScanDartTask = new isInstanceOf<ScanDartTask>();
+isInstanceOf isStrongModeVerifyUnitTask =
+    new isInstanceOf<StrongModeVerifyUnitTask>();
 isInstanceOf isVerifyUnitTask = new isInstanceOf<VerifyUnitTask>();
 
 final LintCode _testLintCode = new LintCode('test lint', 'test lint code');
@@ -1429,6 +1434,13 @@
 @reflectiveTest
 class ComputeInferableStaticVariableDependenciesTaskTest
     extends _AbstractDartTaskTest {
+  @override
+  void setUp() {
+    super.setUp();
+    // Variable dependencies are only available in strong mode.
+    enableStrongMode();
+  }
+
   test_perform() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -1452,6 +1464,305 @@
 }
 
 @reflectiveTest
+class ComputeLibraryCycleTaskTest extends _AbstractDartTaskTest {
+  @override
+  void setUp() {
+    super.setUp();
+    enableStrongMode();
+  }
+
+  void test_library_cycle_linear() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+''',
+      '/b.dart': '''
+import 'a.dart';
+  '''
+    });
+    List<Map<ResultDescriptor, dynamic>> results =
+        computeLibraryResultsMap(sources, LIBRARY_CYCLE);
+    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
+    List<LibraryElement> component1 = results[1][LIBRARY_CYCLE];
+    expect(component0, hasLength(1));
+    expect(component1, hasLength(1));
+
+    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
+    List<CompilationUnitElement> units1 = results[1][LIBRARY_CYCLE_UNITS];
+    expect(units0, hasLength(1));
+    expect(units1, hasLength(1));
+
+    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
+    List<CompilationUnitElement> dep1 = results[1][LIBRARY_CYCLE_DEPENDENCIES];
+    expect(dep0, hasLength(1)); // dart:core
+    expect(dep1, hasLength(2)); // dart:core, a.dart
+  }
+
+  void test_library_cycle_loop() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+  import 'c.dart';
+''',
+      '/b.dart': '''
+  import 'a.dart';
+  ''',
+      '/c.dart': '''
+  import 'b.dart';
+  '''
+    });
+    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];
+
+    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];
+    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];
+    expect(dep0, hasLength(1)); // dart:core
+    expect(dep1, hasLength(1)); // dart:core
+    expect(dep2, hasLength(1)); // dart:core
+  }
+
+  void test_library_cycle_self_loop() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+  import 'a.dart';
+'''
+    });
+    List<Map<ResultDescriptor, dynamic>> results =
+        computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
+    List<LibraryElement> component0 = results[0][LIBRARY_CYCLE];
+    expect(component0, hasLength(1));
+
+    List<CompilationUnitElement> units0 = results[0][LIBRARY_CYCLE_UNITS];
+    expect(units0, hasLength(1));
+
+    List<CompilationUnitElement> dep0 = results[0][LIBRARY_CYCLE_DEPENDENCIES];
+    expect(dep0, hasLength(1)); // dart:core
+  }
+
+  void test_library_cycle_singleton() {
+    Source source = newSource(
+        '/test.dart',
+        '''
+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];
+    expect(component, hasLength(1));
+    expect(units, hasLength(1));
+    expect(deps, hasLength(1));
+  }
+
+  void test_library_cycle_tree() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+''',
+      '/b.dart': '''
+  ''',
+      '/c.dart': '''
+  import 'a.dart';
+  import 'b.dart';
+  '''
+    });
+    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];
+    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];
+    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];
+    expect(dep0, hasLength(1)); // dart:core
+    expect(dep1, hasLength(1)); // dart:core,
+    expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart
+  }
+
+  void test_library_double_loop() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+  import 'b.dart';
+''',
+      '/b.dart': '''
+  import 'a.dart';
+  ''',
+      '/c.dart': '''
+  import 'd.dart' as foo;
+  import 'a.dart' as bar;
+  export 'b.dart';
+  ''',
+      '/d.dart': '''
+  import 'c.dart' as foo;
+  import 'b.dart' as bar;
+  export 'a.dart';
+  '''
+    });
+    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];
+
+    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];
+    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];
+    expect(dep0, hasLength(1)); // dart:core
+    expect(dep1, hasLength(1)); // dart:core
+    expect(dep3, hasLength(3)); // dart:core, a.dart, b.dart
+    expect(dep3, hasLength(3)); // dart:core, a.dart, b.dart
+  }
+
+  void test_library_double_loop_parts() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+  import 'b.dart';
+  part 'aa.dart';
+  part 'ab.dart';
+''',
+      '/b.dart': '''
+  import 'a.dart';
+''',
+      '/aa.dart': '''
+''',
+      '/ab.dart': '''
+''',
+      '/c.dart': '''
+  import 'd.dart' as foo;
+  import 'a.dart' as bar;
+  export 'b.dart';
+''',
+      '/d.dart': '''
+  import 'c.dart' as foo;
+  import 'b.dart' as bar;
+  export 'a.dart';
+  part 'da.dart';
+  part 'db.dart';
+''',
+      '/da.dart': '''
+''',
+      '/db.dart': '''
+'''
+    });
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[0]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results0 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[1], sources[1]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results1 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[2]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results2 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[3]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results3 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[4], sources[4]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results4 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[5], sources[5]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results5 = outputs;
+    computeResult(
+        new LibrarySpecificUnit(sources[5], sources[6]), LIBRARY_CYCLE);
+    Map<ResultDescriptor, dynamic> results6 = outputs;
+    computeResult(
+        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];
+
+    expect(component0, hasLength(2));
+    expect(component1, hasLength(2));
+    expect(component2, hasLength(2));
+    expect(component3, hasLength(2));
+    expect(component4, hasLength(2));
+    expect(component5, hasLength(2));
+    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];
+    expect(units0, hasLength(4));
+    expect(units1, hasLength(4));
+    expect(units2, hasLength(4));
+    expect(units3, hasLength(4));
+    expect(units4, hasLength(4));
+    expect(units5, hasLength(4));
+    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];
+    expect(dep0, hasLength(1)); // dart:core
+    expect(dep1, hasLength(1)); // dart:core
+    expect(dep2, hasLength(1)); // dart:core
+    expect(dep3, hasLength(1)); // dart:core
+    expect(dep4, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
+    expect(dep5, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
+    expect(dep6, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
+    expect(dep7, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
+  }
+}
+
+@reflectiveTest
 class ContainingLibrariesTaskTest extends _AbstractDartTaskTest {
   test_perform_definingCompilationUnit() {
     AnalysisTarget library = newSource('/test.dart', 'library test;');
@@ -1537,8 +1848,9 @@
 const x = const C();
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT, matcher: isEvaluateUnitConstantsTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT];
+    computeResult(target, RESOLVED_UNIT10,
+        matcher: isEvaluateUnitConstantsTask);
+    CompilationUnit unit = outputs[RESOLVED_UNIT10];
     CompilationUnitElement unitElement = unit.element;
     expect(
         (unitElement.types[0].constructors[0] as ConstructorElementImpl)
@@ -1600,6 +1912,56 @@
   UsedLocalElements usedElements;
   Set<String> usedElementNames;
 
+  fail_perform_forPart_afterLibraryUpdate() {
+    Source libSource = newSource(
+        '/my_lib.dart',
+        '''
+library my_lib;
+part 'my_part.dart';
+foo() => null;
+class _LocalClass {}
+''');
+    Source partSource = newSource(
+        '/my_part.dart',
+        '''
+part of my_lib;
+bar() {
+  print(_LocalClass);
+}
+''');
+    AnalysisTarget libTarget = new LibrarySpecificUnit(libSource, libSource);
+    AnalysisTarget partTarget = new LibrarySpecificUnit(libSource, partSource);
+    computeResult(libTarget, USED_LOCAL_ELEMENTS);
+    computeResult(partTarget, USED_LOCAL_ELEMENTS);
+    // _LocalClass is used in my_part.dart
+    {
+      UsedLocalElements usedElements =
+          analysisCache.getValue(partTarget, USED_LOCAL_ELEMENTS);
+      expect(usedElements.elements, contains(predicate((Element e) {
+        return e.displayName == '_LocalClass';
+      })));
+    }
+    // change my_lib.dart and recompute
+    context.setContents(
+        libSource,
+        '''
+library my_lib;
+part 'my_part.dart';
+String foo() => null;
+class _LocalClass {}
+''');
+    computeResult(libTarget, USED_LOCAL_ELEMENTS);
+    computeResult(partTarget, USED_LOCAL_ELEMENTS);
+    // _LocalClass should still be used in my_part.dart
+    {
+      UsedLocalElements usedElements =
+          analysisCache.getValue(partTarget, USED_LOCAL_ELEMENTS);
+      expect(usedElements.elements, contains(predicate((Element e) {
+        return e.displayName == '_LocalClass';
+      })));
+    }
+  }
+
   test_perform_localVariable() {
     Source source = newSource(
         '/test.dart',
@@ -1892,11 +2254,12 @@
   void setUp() {
     super.setUp();
     enableLints();
+    lintRegistry[context] = [new GenerateLintsTaskTest_TestLinter()];
   }
 
   @override
   void tearDown() {
-    LintGenerator.LINTERS.clear();
+    lintRegistry[context] = [];
     super.tearDown();
   }
 
@@ -1907,9 +2270,6 @@
 class a { }
 ''');
 
-    LintGenerator.LINTERS.clear();
-    LintGenerator.LINTERS.add(new GenerateLintsTaskTest_TestLinter());
-
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
     computeResult(target, LINTS, matcher: isGenerateLintsTask);
     // validate
@@ -1955,9 +2315,9 @@
 class Y {}
 class Z {}
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8,
         matcher: isInferInstanceMembersInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT7];
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     VariableDeclaration field = getFieldInClass(unit, 'B', 'f');
     MethodDeclaration method = getMethodInClass(unit, 'B', 'm');
     DartType typeX = getClass(unit, 'X').element.type;
@@ -1989,12 +2349,12 @@
 }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT7,
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8,
         matcher: isInferInstanceMembersInUnitTask);
-    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 = getTopLevelVariable(firstUnit, 'a');
     VariableDeclaration variableB = getTopLevelVariable(secondUnit, 'b');
@@ -2018,8 +2378,8 @@
   String field = topLevel;
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7);
-    CompilationUnit unit = outputs[RESOLVED_UNIT7];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     VariableDeclaration topLevelDecl = getTopLevelVariable(unit, 'topLevel');
     VariableDeclaration fieldDecl = getFieldInClass(unit, 'C', 'field');
     VariableElement topLevel = topLevelDecl.name.staticElement;
@@ -2165,6 +2525,7 @@
   }
 
   void test_perform() {
+    enableStrongMode();
     AnalysisTarget source = newSource(
         '/test3.dart',
         '''
@@ -2186,10 +2547,10 @@
     expect(topLevel.type, stringType);
     expect(field.type, stringType);
     expect(fieldDecl.initializer.staticType, stringType);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(0));
   }
 
   void test_perform_const() {
+    enableStrongMode();
     AnalysisTarget source = newSource(
         '/test.dart',
         '''
@@ -2210,10 +2571,10 @@
     InterfaceType stringType = context.typeProvider.stringType;
     expect(topLevel.type, stringType);
     expect(field.type, stringType);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(0));
   }
 
   void test_perform_cycle() {
+    enableStrongMode();
     AnalysisTarget source = newSource(
         '/test.dart',
         '''
@@ -2233,10 +2594,10 @@
     expect(piFirst.type, context.typeProvider.boolType);
     expect(pi.type.isDynamic, isTrue);
     expect(tau.type.isDynamic, isTrue);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(0));
   }
 
   void test_perform_error() {
+    enableStrongMode();
     AnalysisTarget source = newSource(
         '/test.dart',
         '''
@@ -2249,10 +2610,10 @@
     computeResult(a, INFERRED_STATIC_VARIABLE,
         matcher: isInferStaticVariableTypeTask);
     expect(a.type.isDynamic, isTrue);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(1));
   }
 
   void test_perform_null() {
+    enableStrongMode();
     AnalysisTarget source = newSource(
         '/test.dart',
         '''
@@ -2265,32 +2626,6 @@
     computeResult(a, INFERRED_STATIC_VARIABLE,
         matcher: isInferStaticVariableTypeTask);
     expect(a.type.isDynamic, isTrue);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(0));
-  }
-
-  void test_perform_reresolution() {
-    AnalysisTarget source = newSource(
-        '/test.dart',
-        '''
-const topLevel = '';
-class C {
-  String field = topLevel;
-}
-''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
-    VariableDeclaration topLevelDecl = getTopLevelVariable(unit, 'topLevel');
-    VariableDeclaration fieldDecl = getFieldInClass(unit, 'C', 'field');
-    VariableElement topLevel = topLevelDecl.name.staticElement;
-    VariableElement field = fieldDecl.name.staticElement;
-
-    computeResult(field, INFERRED_STATIC_VARIABLE,
-        matcher: isInferStaticVariableTypeTask);
-    InterfaceType stringType = context.typeProvider.stringType;
-    expect(topLevel.type, stringType);
-    expect(field.type, stringType);
-    expect(fieldDecl.initializer.staticType, stringType);
-    expect(outputs[INFER_STATIC_VARIABLE_ERRORS], hasLength(0));
   }
 }
 
@@ -2498,7 +2833,7 @@
     computeResult(target, RESOLVED_UNIT5,
         matcher: isPartiallyResolveUnitReferencesTask);
     // Test the outputs
-    expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(5));
+    expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(4));
     CompilationUnit unit = outputs[RESOLVED_UNIT5];
     expect(unit, same(outputs[RESOLVED_UNIT5]));
     // Test the state of the AST
@@ -2506,9 +2841,6 @@
     VariableDeclaration variableA = a.variables.variables[0];
     SimpleIdentifier initializer = variableA.initializer;
     expect(initializer.staticElement, isNotNull);
-    // Test the error generation
-    _fillErrorListener(PARTIALLY_RESOLVE_REFERENCES_ERRORS);
-    errorListener.assertNoErrors();
   }
 
   test_perform_importExport() {
@@ -2619,38 +2951,231 @@
 }
 
 @reflectiveTest
-class ResolveFunctionBodiesInUnitTaskTest extends _AbstractDartTaskTest {
-  void test_perform() {
-    AnalysisTarget source = newSource(
-        '/test.dart',
-        '''
-void f() {
-  var c = new C();
-  c.m();
-}
-class C {
-  void m() {
-    f();
-  }
-}
-''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8,
-        matcher: isResolveFunctionBodiesInUnitTask);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
-
-    FunctionDeclaration f = unit.declarations[0];
-    _assertResolved(f.functionExpression.body);
-
-    MethodDeclaration m = (unit.declarations[1] as ClassDeclaration).members[0];
-    _assertResolved(m.body);
-
-    expect(outputs[RESOLVE_FUNCTION_BODIES_ERRORS], hasLength(0));
+class ResolveInstanceFieldsInUnitTaskTest extends _AbstractDartTaskTest {
+  @override
+  void setUp() {
+    super.setUp();
+    enableStrongMode();
   }
 
-  void _assertResolved(FunctionBody body) {
-    ResolutionVerifier verifier = new ResolutionVerifier();
-    body.accept(verifier);
-    verifier.assertResolved();
+  // Test inference of instance fields across units
+  void test_perform_inference_cross_unit_instance() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            final a2 = new B().b2;
+          }
+      ''',
+      '/b.dart': '''
+          class B {
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            x = new A().a2;
+          }
+    '''
+    });
+    InterfaceType intType = context.typeProvider.intType;
+    DartType dynamicType = context.typeProvider.dynamicType;
+
+    computeResult(
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT7);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT7];
+
+    // B.b2 shoud be resolved on the rhs, but not yet inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), dynamicType, intType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT7);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT7];
+
+    // B.b2 should now be fully resolved and inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+
+    // A.a2 should now be resolved on the rhs, but not yet inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, intType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT7);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT7];
+
+    // A.a2 should now be fully resolved and inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), intType, intType);
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+  }
+
+  // Test inference of instance fields across units
+  void test_perform_inference_cross_unit_instance_cyclic() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            final a2 = new B().b2;
+          }
+      ''',
+      '/b.dart': '''
+          import 'a.dart';
+          class B {
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            x = new A().a2;
+          }
+    '''
+    });
+    InterfaceType intType = context.typeProvider.intType;
+    DartType dynamicType = context.typeProvider.dynamicType;
+
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT7);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT7];
+
+    // A.a2 should now be resolved on the rhs, but not yet inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, dynamicType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT7);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT7];
+
+    // A.a2 should now be fully resolved and inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, dynamicType);
+  }
+
+  // Test inference of instance fields across units with cycles
+  void test_perform_inference_cross_unit_static_instance() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            static final a1 = B.b1;
+            final a2 = new B().b2;
+          }
+      ''',
+      '/b.dart': '''
+          class B {
+            static final b1 = 1;
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            // inference in A now works.
+            x = A.a1;
+            x = new A().a2;
+          }
+    '''
+    });
+    InterfaceType intType = context.typeProvider.intType;
+    DartType dynamicType = context.typeProvider.dynamicType;
+
+    computeResult(
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT7);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT7];
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), dynamicType, intType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT7);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT7];
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, intType);
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[2], sources[2]), RESOLVED_UNIT7);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT7];
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), intType, intType);
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+  }
+
+  // Test inference between static and instance fields
+  void test_perform_inference_instance() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            final a2 = new B().b2;
+          }
+
+          class B {
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            x = new A().a2;
+          }
+    '''
+    });
+    InterfaceType intType = context.typeProvider.intType;
+    DartType dynamicType = context.typeProvider.dynamicType;
+
+    computeResult(
+        new LibrarySpecificUnit(sources[0], sources[0]), RESOLVED_UNIT7);
+    CompilationUnit unit0 = outputs[RESOLVED_UNIT7];
+
+    // A.a2 should now be resolved on the rhs, but not yet inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, dynamicType);
+
+    // B.b2 shoud be resolved on the rhs, but not yet inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "B", "b2"), dynamicType, intType);
+
+    computeResult(
+        new LibrarySpecificUnit(sources[1], sources[1]), RESOLVED_UNIT7);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT7];
+
+    // A.a2 should now be fully resolved and inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), dynamicType, dynamicType);
+
+    // B.b2 should now be fully resolved and inferred.
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "B", "b2"), intType, intType);
   }
 }
 
@@ -2715,6 +3240,42 @@
 }
 
 @reflectiveTest
+class ResolveUnitTaskTest extends _AbstractDartTaskTest {
+  void test_perform() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+void f() {
+  var c = new C();
+  c.m();
+}
+class C {
+  void m() {
+    f();
+  }
+}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9,
+        matcher: isResolveUnitTask);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
+
+    FunctionDeclaration f = unit.declarations[0];
+    _assertResolved(f.functionExpression.body);
+
+    MethodDeclaration m = (unit.declarations[1] as ClassDeclaration).members[0];
+    _assertResolved(m.body);
+
+    expect(outputs[RESOLVE_UNIT_ERRORS], hasLength(0));
+  }
+
+  void _assertResolved(FunctionBody body) {
+    ResolutionVerifier verifier = new ResolutionVerifier();
+    body.accept(verifier);
+    verifier.assertResolved();
+  }
+}
+
+@reflectiveTest
 class ResolveUnitTypeNamesTaskTest extends _AbstractDartTaskTest {
   test_perform() {
     Source source = newSource(
@@ -2934,128 +3495,14 @@
 
 @reflectiveTest
 class StrongModeInferenceTest extends _AbstractDartTaskTest {
-  void assertAssignmentStatementTypes(
-      Statement stmt, DartType leftType, DartType rightType) {
-    AssignmentExpression assgn = (stmt as ExpressionStatement).expression;
-    expect(assgn.leftHandSide.staticType, leftType);
-    expect(assgn.rightHandSide.staticType, rightType);
-  }
-
-  // Check that even within a static variable cycle, inferred
-  // types get propagated to the members of the cycle.
-  void assertVariableDeclarationStatementTypes(
-      Statement stmt, DartType varType, DartType initializerType) {
-    VariableDeclaration decl =
-        (stmt as VariableDeclarationStatement).variables.variables[0];
-    assertVariableDeclarationTypes(decl, varType, initializerType);
-  }
-
-  void assertVariableDeclarationTypes(
-      VariableDeclaration decl, DartType varType, DartType initializerType) {
-    expect(decl.element.type, varType);
-    expect(decl.initializer.staticType, initializerType);
-  }
-
-  void fail_perform_inference_cross_unit_instance() {
-    List<Source> sources = newSources({
-      '/a7.dart': '''
-          import 'b7.dart';
-          class A {
-            final a2 = new B().b2;
-          }
-      ''',
-      '/b7.dart': '''
-          class B {
-            final b2 = 1;
-          }
-      ''',
-      '/main7.dart': '''
-          import "a7.dart";
-
-          test1() {
-            int x = 0;
-            x = new A().a2;
-          }
-    '''
-    });
-    List<dynamic> units =
-        computeLibraryResults(sources, RESOLVED_UNIT8).toList();
-    CompilationUnit unit0 = units[0];
-    CompilationUnit unit1 = units[1];
-    CompilationUnit unit2 = units[2];
-
-    InterfaceType intType = context.typeProvider.intType;
-
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit0, "A", "a2"), intType, intType);
-
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit1, "B", "b2"), intType, intType);
-
-    List<Statement> statements =
-        getStatementsInTopLevelFunction(unit2, "test1");
-
-    assertAssignmentStatementTypes(statements[1], intType, intType);
-  }
-
-  void fail_perform_inference_cross_unit_static_instance() {
-    List<Source> sources = newSources({
-      '/a.dart': '''
-          import 'b.dart';
-          class A {
-            static final a1 = B.b1;
-            final a2 = new B().b2;
-          }
-      ''',
-      '/b.dart': '''
-          class B {
-            static final b1 = 1;
-            final b2 = 1;
-          }
-      ''',
-      '/main.dart': '''
-          import "a.dart";
-
-          test1() {
-            int x = 0;
-            // inference in A now works.
-            x = A.a1;
-            x = new A().a2;
-          }
-    '''
-    });
-    List<dynamic> units =
-        computeLibraryResults(sources, RESOLVED_UNIT8).toList();
-    CompilationUnit unit0 = units[0];
-    CompilationUnit unit1 = units[1];
-    CompilationUnit unit2 = units[2];
-
-    InterfaceType intType = context.typeProvider.intType;
-
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit0, "A", "a1"), intType, intType);
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit0, "A", "a2"), intType, intType);
-
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit1, "B", "b1"), intType, intType);
-    assertVariableDeclarationTypes(
-        getFieldInClass(unit1, "B", "b2"), intType, intType);
-
-    List<Statement> statements =
-        getStatementsInTopLevelFunction(unit2, "test1");
-
-    assertAssignmentStatementTypes(statements[1], intType, intType);
-    assertAssignmentStatementTypes(statements[2], intType, intType);
-  }
-
   @override
   void setUp() {
     super.setUp();
     enableStrongMode();
   }
 
-  // Test that local variables in method bodies are inferred appropriately
+  // Check that even within a static variable cycle, inferred
+  // types get propagated to the members of the cycle.
   void test_perform_cycle() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3064,8 +3511,8 @@
 var pi = piFirst ? 3.14 : tau / 2;
 var tau = piFirst ? pi * 2 : 6.28;
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
     VariableElement piFirst =
         getTopLevelVariable(unit, 'piFirst').name.staticElement;
     VariableElement pi = getTopLevelVariable(unit, 'pi').name.staticElement;
@@ -3079,7 +3526,6 @@
     expect(tau.type.isDynamic, isTrue);
   }
 
-  // Test inference interactions between local variables and fields
   void test_perform_inference_cross_unit_cyclic() {
     AnalysisTarget firstSource = newSource(
         '/a.dart',
@@ -3104,11 +3550,11 @@
           }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT9);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT9];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8);
-    CompilationUnit unit2 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT9);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
 
@@ -3131,6 +3577,91 @@
     assertAssignmentStatementTypes(statements[4], intType, intType);
   }
 
+  // Test that local variables in method bodies are inferred appropriately
+  void test_perform_inference_cross_unit_instance() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            final a2 = new B().b2;
+          }
+      ''',
+      '/b.dart': '''
+          class B {
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            x = new A().a2;
+          }
+    '''
+    });
+    List<dynamic> units =
+        computeLibraryResults(sources, RESOLVED_UNIT9).toList();
+    CompilationUnit unit0 = units[0];
+    CompilationUnit unit1 = units[1];
+    CompilationUnit unit2 = units[2];
+
+    InterfaceType intType = context.typeProvider.intType;
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), intType, intType);
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+
+    List<Statement> statements =
+        getStatementsInTopLevelFunction(unit2, "test1");
+
+    assertAssignmentStatementTypes(statements[1], intType, intType);
+  }
+
+  // Test inference interactions between local variables and fields
+  void test_perform_inference_cross_unit_instance_member() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+            var bar = new B();
+            void foo() {
+              String x = bar.f.z;
+            }
+      ''',
+      '/b.dart': '''
+        class C {
+          var z = 3;
+        }
+
+        class B {
+          var f = new C();
+        }
+      ''',
+      '/c.dart': '''
+          import 'b.dart';
+            var bar = new B();
+            void foo() {
+              String x = bar.f.z;
+            }
+    '''
+    });
+    List<dynamic> units =
+        computeLibraryResults(sources, RESOLVED_UNIT9).toList();
+    CompilationUnit unit0 = units[0];
+    CompilationUnit unit1 = units[1];
+    CompilationUnit unit2 = units[2];
+
+    InterfaceType intType = context.typeProvider.intType;
+    InterfaceType stringType = context.typeProvider.stringType;
+
+    assertVariableDeclarationStatementTypes(
+        getStatementsInTopLevelFunction(unit0, "foo")[0], stringType, intType);
+    assertVariableDeclarationStatementTypes(
+        getStatementsInTopLevelFunction(unit2, "foo")[0], stringType, intType);
+  }
+
   // Test inference interactions between local variables and top level
   // variables
   void test_perform_inference_cross_unit_non_cyclic() {
@@ -3155,11 +3686,11 @@
           }
 ''');
     computeResult(
-        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8);
-    CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT9);
+    CompilationUnit unit1 = outputs[RESOLVED_UNIT9];
     computeResult(
-        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8);
-    CompilationUnit unit2 = outputs[RESOLVED_UNIT8];
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT9);
+    CompilationUnit unit2 = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3182,6 +3713,58 @@
   }
 
   // Test that inference does not propagate from null
+  void test_perform_inference_cross_unit_static_instance() {
+    List<Source> sources = newSources({
+      '/a.dart': '''
+          import 'b.dart';
+          class A {
+            static final a1 = B.b1;
+            final a2 = new B().b2;
+          }
+      ''',
+      '/b.dart': '''
+          class B {
+            static final b1 = 1;
+            final b2 = 1;
+          }
+      ''',
+      '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            // inference in A now works.
+            x = A.a1;
+            x = new A().a2;
+          }
+    '''
+    });
+    List<dynamic> units =
+        computeLibraryResults(sources, RESOLVED_UNIT9).toList();
+    CompilationUnit unit0 = units[0];
+    CompilationUnit unit1 = units[1];
+    CompilationUnit unit2 = units[2];
+
+    InterfaceType intType = context.typeProvider.intType;
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit0, "A", "a2"), intType, intType);
+
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b1"), intType, intType);
+    assertVariableDeclarationTypes(
+        getFieldInClass(unit1, "B", "b2"), intType, intType);
+
+    List<Statement> statements =
+        getStatementsInTopLevelFunction(unit2, "test1");
+
+    assertAssignmentStatementTypes(statements[1], intType, intType);
+    assertAssignmentStatementTypes(statements[2], intType, intType);
+  }
+
+  // Test inference across units (non-cyclic)
   void test_perform_inference_local_variables() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3193,8 +3776,8 @@
         y = "hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3207,7 +3790,7 @@
     assertAssignmentStatementTypes(statements[3], intType, stringType);
   }
 
-  // Test inference across units (non-cyclic)
+  // Test inference across units (cyclic)
   void test_perform_inference_local_variables_fields() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3231,8 +3814,8 @@
         final z = 42; // should infer `int`
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3257,7 +3840,7 @@
         getFieldInClass(unit, "A", "z"), intType, intType);
   }
 
-  // Test inference across units (cyclic)
+  // Test inference of instance fields across units
   void test_perform_inference_local_variables_topLevel() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3279,8 +3862,8 @@
       int y = 0; // field def after use
       final z = 42; // should infer `int`
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3307,9 +3890,7 @@
         getTopLevelVariable(unit, "z"), intType, intType);
   }
 
-  // Test inference of instance fields across units
-  // TODO(leafp): Fix this
-  // https://github.com/dart-lang/dev_compiler/issues/354
+  // Test inference between static and instance fields
   void test_perform_inference_null() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3333,8 +3914,8 @@
         new A().y2 = /*severe:StaticTypeError*/"hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3364,9 +3945,7 @@
     assertAssignmentStatementTypes(statements[5], intType, stringType);
   }
 
-  // Test inference between static and instance fields
-  // TODO(leafp): Fix this
-  // https://github.com/dart-lang/dev_compiler/issues/354
+  // Test inference between fields and method bodies
   void test_perform_local_explicit_disabled() {
     AnalysisTarget source = newSource(
         '/test.dart',
@@ -3376,8 +3955,8 @@
         x = "hi";
       }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT8);
-    CompilationUnit unit = outputs[RESOLVED_UNIT8];
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT9);
+    CompilationUnit unit = outputs[RESOLVED_UNIT9];
 
     InterfaceType intType = context.typeProvider.intType;
     InterfaceType stringType = context.typeProvider.stringType;
@@ -3396,6 +3975,59 @@
 }
 
 @reflectiveTest
+class StrongModeVerifyUnitTaskTest extends _AbstractDartTaskTest {
+  @override
+  void setUp() {
+    super.setUp();
+    enableStrongMode();
+  }
+
+  void test_perform_verifyError() {
+    enableStrongMode();
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+int topLevel = 3;
+class C {
+  String field = topLevel;
+}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), STRONG_MODE_ERRORS);
+    // validate
+    _fillErrorListener(STRONG_MODE_ERRORS);
+
+    var errors = errorListener.errors;
+    expect(errors.length, 1);
+    expect(errors[0].errorCode.name, "dev_compiler.StaticTypeError");
+  }
+
+  void test_perform_recordDynamicInvoke() {
+    enableStrongMode();
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+void main() {
+  dynamic a = [];
+  a[0];
+}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), STRONG_MODE_ERRORS);
+    CompilationUnit unit = outputs[RESOLVED_UNIT];
+
+    // validate
+    _fillErrorListener(STRONG_MODE_ERRORS);
+    expect(errorListener.errors, isEmpty);
+
+    List<Statement> statements = getStatementsInTopLevelFunction(unit, "main");
+    ExpressionStatement statement = statements[1];
+    IndexExpression idx = statement.expression;
+    expect(DynamicInvoke.get(idx.target), isNotNull);
+    expect(DynamicInvoke.get(idx.target), isNotNull);
+    expect(DynamicInvoke.get(idx.target), isTrue);
+  }
+}
+
+@reflectiveTest
 class VerifyUnitTaskTest extends _AbstractDartTaskTest {
   test_perform_constantError() {
     Source source = newSource(
@@ -3441,8 +4073,10 @@
     computeResult(new LibrarySpecificUnit(source, source), VERIFY_ERRORS);
     // validate
     _fillErrorListener(VERIFY_ERRORS);
-    errorListener.assertErrorsWithCodes(
-        <ErrorCode>[StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+
+    var errors = errorListener.errors;
+    expect(errors.length, 1);
+    expect(errors[0].errorCode, StaticTypeWarningCode.INVALID_ASSIGNMENT);
   }
 
   test_perform_verifyError() {
@@ -3469,6 +4103,13 @@
 
   GatheringErrorListener errorListener = new GatheringErrorListener();
 
+  void assertAssignmentStatementTypes(
+      Statement stmt, DartType leftType, DartType rightType) {
+    AssignmentExpression assgn = (stmt as ExpressionStatement).expression;
+    expect(assgn.leftHandSide.staticType, leftType);
+    expect(assgn.rightHandSide.staticType, rightType);
+  }
+
   void assertIsInvalid(AnalysisTarget target, ResultDescriptor descriptor) {
     CacheEntry entry = context.getCacheEntry(target);
     expect(entry.isInvalid(descriptor), isTrue);
@@ -3487,6 +4128,19 @@
     });
   }
 
+  void assertVariableDeclarationStatementTypes(
+      Statement stmt, DartType varType, DartType initializerType) {
+    VariableDeclaration decl =
+        (stmt as VariableDeclarationStatement).variables.variables[0];
+    assertVariableDeclarationTypes(decl, varType, initializerType);
+  }
+
+  void assertVariableDeclarationTypes(
+      VariableDeclaration decl, DartType varType, DartType initializerType) {
+    expect(decl.element.type, varType);
+    expect(decl.initializer.staticType, initializerType);
+  }
+
   List<dynamic> computeLibraryResults(
       List<Source> sources, ResultDescriptor result,
       {isInstanceOf matcher: null}) {
@@ -3498,6 +4152,17 @@
     return sources.map(compute).toList();
   }
 
+  List<Map<ResultDescriptor, dynamic>> computeLibraryResultsMap(
+      List<Source> sources, ResultDescriptor result,
+      {isInstanceOf matcher: null}) {
+    Map<ResultDescriptor, dynamic> compute(Source source) {
+      computeResult(new LibrarySpecificUnit(source, source), result,
+          matcher: matcher);
+      return outputs;
+    }
+    return sources.map(compute).toList();
+  }
+
   /**
    * Create a script object with a single fragment containing the given
    * [scriptContent].
diff --git a/pkg/analyzer/test/src/task/dart_work_manager_test.dart b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
index e15aa7b..8dd7dbc 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -16,6 +16,7 @@
 import 'package:analyzer/src/generated/error.dart' show AnalysisError;
 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
 import 'package:analyzer/src/generated/scanner.dart' show ScannerErrorCode;
+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/task/dart.dart';
@@ -331,6 +332,32 @@
     expect(manager.getLibrariesContainingPart(part3), isEmpty);
   }
 
+  void test_getLibrariesContainingPart_inSDK() {
+    Source part = new _SourceMock('part.dart');
+    when(part.isInSystemLibrary).thenReturn(true);
+    // SDK work manager
+    DartWorkManager sdkDartWorkManagerMock = new _DartWorkManagerMock();
+    when(sdkDartWorkManagerMock.getLibrariesContainingPart(part))
+        .thenReturn([source2, source3]);
+    // SDK context mock
+    InternalAnalysisContext sdkContextMock = new _InternalAnalysisContextMock();
+    when(sdkContextMock.workManagers).thenReturn([sdkDartWorkManagerMock]);
+    // SDK mock
+    DartSdk sdkMock = new _DartSdkMock();
+    when(sdkMock.context).thenReturn(sdkContextMock);
+    // SourceFactory mock
+    SourceFactory sourceFactory = new _SourceFactoryMock();
+    when(sourceFactory.dartSdk).thenReturn(sdkMock);
+    when(context.sourceFactory).thenReturn(sourceFactory);
+    // SDK source mock
+    Source source = new _SourceMock('test.dart');
+    when(source.source).thenReturn(source);
+    when(source.isInSystemLibrary).thenReturn(true);
+    // validate
+    expect(manager.getLibrariesContainingPart(part),
+        unorderedEquals([source2, source3]));
+  }
+
   void test_getNextResult_hasLibraries_firstIsError() {
     entry1.setErrorState(caughtException, [LIBRARY_ERRORS_READY]);
     manager.librarySourceQueue.addAll([source1, source2]);
@@ -604,6 +631,28 @@
     expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID);
   }
 
+  void test_resultsComputed_inSDK() {
+    DartWorkManager sdkDartWorkManagerMock = new _DartWorkManagerMock();
+    // SDK context mock
+    InternalAnalysisContext sdkContextMock = new _InternalAnalysisContextMock();
+    when(sdkContextMock.workManagers).thenReturn([sdkDartWorkManagerMock]);
+    // SDK mock
+    DartSdk sdkMock = new _DartSdkMock();
+    when(sdkMock.context).thenReturn(sdkContextMock);
+    // SourceFactory mock
+    SourceFactory sourceFactory = new _SourceFactoryMock();
+    when(sourceFactory.dartSdk).thenReturn(sdkMock);
+    when(context.sourceFactory).thenReturn(sourceFactory);
+    // SDK source mock
+    Source source = new _SourceMock('test.dart');
+    when(source.source).thenReturn(source);
+    when(source.isInSystemLibrary).thenReturn(true);
+    // notify and validate
+    Map<ResultDescriptor, dynamic> outputs = <ResultDescriptor, dynamic>{};
+    manager.resultsComputed(source, outputs);
+    verify(sdkDartWorkManagerMock.resultsComputed(source, outputs)).once();
+  }
+
   void test_resultsComputed_noSourceKind() {
     manager.unknownSourceQueue.addAll([source1, source2]);
     manager.resultsComputed(source1, {});
@@ -706,6 +755,14 @@
   }
 }
 
+class _DartSdkMock extends TypedMock implements DartSdk {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class _DartWorkManagerMock extends TypedMock implements DartWorkManager {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
 class _InternalAnalysisContextMock extends TypedMock
     implements InternalAnalysisContext {
   @override
@@ -739,3 +796,17 @@
 
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
+
+class _SourceFactoryMock extends TypedMock implements SourceFactory {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class _SourceMock extends TypedMock implements Source {
+  final String shortName;
+  _SourceMock(this.shortName);
+  @override
+  String get fullName => '/' + shortName;
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  @override
+  String toString() => fullName;
+}
diff --git a/pkg/analyzer/test/src/task/html_test.dart b/pkg/analyzer/test/src/task/html_test.dart
index 7d8da56..a901165 100644
--- a/pkg/analyzer/test/src/task/html_test.dart
+++ b/pkg/analyzer/test/src/task/html_test.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/html.dart';
 import 'package:analyzer/task/model.dart';
+import 'package:html/dom.dart';
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
@@ -228,7 +229,7 @@
         r'''
 <html>
   <head>
-    <title>test page</title>
+    <title>test page</not-title>
   </head>
   <body>
     Test
@@ -335,4 +336,33 @@
       }
     }
   }
+
+  test_perform_noDocType() {
+    String code = r'''
+<div>AAA</div>
+<span>BBB</span>
+''';
+    AnalysisTarget target = newSource('/test.html', code);
+    computeResult(target, HTML_DOCUMENT);
+    expect(task, isParseHtmlTask);
+    // validate Document
+    {
+      Document document = outputs[HTML_DOCUMENT];
+      expect(document, isNotNull);
+      // artificial <html>
+      expect(document.nodes, hasLength(1));
+      Element htmlElement = document.nodes[0];
+      expect(htmlElement.localName, 'html');
+      // artificial <body>
+      expect(htmlElement.nodes, hasLength(2));
+      Element bodyElement = htmlElement.nodes[1];
+      expect(bodyElement.localName, 'body');
+      // actual nodes
+      expect(bodyElement.nodes, hasLength(4));
+      expect((bodyElement.nodes[0] as Element).localName, 'div');
+      expect((bodyElement.nodes[2] as Element).localName, 'span');
+    }
+    // it's OK to don't have DOCTYPE
+    expect(outputs[HTML_DOCUMENT_ERRORS], isEmpty);
+  }
 }
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
new file mode 100644
index 0000000..874916c
--- /dev/null
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -0,0 +1,2311 @@
+// 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.
+
+// TODO(jmesserly): this file needs to be refactored, it's a port from
+// package:dev_compiler's tests
+/// General type checking tests
+library test.src.task.strong.checker_test;
+
+import 'package:unittest/unittest.dart';
+
+import 'strong_test_helper.dart';
+
+void main() {
+  testChecker('ternary operator', {
+    '/main.dart': '''
+        abstract class Comparable<T> {
+          int compareTo(T other);
+          static int compare(Comparable a, Comparable b) => a.compareTo(b);
+        }
+        typedef int Comparator<T>(T a, T b);
+
+        typedef bool _Predicate<T>(T value);
+
+        class SplayTreeMap<K, V> {
+          Comparator<K> _comparator;
+          _Predicate _validKey;
+
+          // Initializing _comparator needs a cast, since K may not always be
+          // Comparable.
+          // Initializing _validKey shouldn't need a cast.  Currently
+          // it requires inference to work because of dartbug.com/23381
+          SplayTreeMap([int compare(K key1, K key2),
+                        bool isValidKey(potentialKey)]) {
+            : _comparator = /*warning:DownCastComposite*/(compare == null) ? Comparable.compare : compare,
+              _validKey = /*info:InferredType should be pass*/(isValidKey != null) ? isValidKey : ((v) => true);
+              _Predicate<Object> _v = /*warning:DownCastComposite*/(isValidKey != null) ? isValidKey : ((v) => true);
+              _v = /*info:InferredType should be pass*/(isValidKey != null) ? _v : ((v) => true);
+          }
+        }
+        void main() {
+          Object obj = 42;
+          dynamic dyn = 42;
+          int i = 42;
+
+          // Check the boolean conversion of the condition.
+          print((/*severe:StaticTypeError*/i) ? false : true);
+          print((/*info:DownCastImplicit*/obj) ? false : true);
+          print((/*info:DynamicCast*/dyn) ? false : true);
+        }
+      '''
+  });
+
+  testChecker('if/for/do/while statements use boolean conversion', {
+    '/main.dart': '''
+      main() {
+        dynamic d = 42;
+        Object obj = 42;
+        int i = 42;
+        bool b = false;
+
+        if (b) {}
+        if (/*info:DynamicCast*/dyn) {}
+        if (/*info:DownCastImplicit*/obj) {}
+        if (/*severe:StaticTypeError*/i) {}
+
+        while (b) {}
+        while (/*info:DynamicCast*/dyn) {}
+        while (/*info:DownCastImplicit*/obj) {}
+        while (/*severe:StaticTypeError*/i) {}
+
+        do {} while (b);
+        do {} while (/*info:DynamicCast*/dyn);
+        do {} while (/*info:DownCastImplicit*/obj);
+        do {} while (/*severe:StaticTypeError*/i);
+
+        for (;b;) {}
+        for (;/*info:DynamicCast*/dyn;) {}
+        for (;/*info:DownCastImplicit*/obj;) {}
+        for (;/*severe:StaticTypeError*/i;) {}
+      }
+    '''
+  });
+
+  testChecker('dynamic invocation', {
+    '/main.dart': '''
+
+      class A {
+        dynamic call(dynamic x) => x;
+      }
+      class B extends A {
+        int call(int x) => x;
+        double col(double x) => x;
+      }
+      void main() {
+        {
+          B f = new B();
+          int x;
+          double y;
+          // The analyzer has what I believe is a bug (dartbug.com/23252) which
+          // causes the return type of calls to f to be treated as dynamic.
+          x = /*info:DynamicCast should be pass*/f(3);
+          x = /*severe:StaticTypeError*/f.col(3.0);
+          y = /*info:DynamicCast should be severe:StaticTypeError*/f(3);
+          y = f.col(3.0);
+          f(/*severe:StaticTypeError*/3.0);
+          f.col(/*severe:StaticTypeError*/3);
+        }
+        {
+          Function f = new B();
+          int x;
+          double y;
+          x = /*info:DynamicCast, info:DynamicInvoke*/f(3);
+          x = /*info:DynamicCast, info:DynamicInvoke*/f.col(3.0);
+          y = /*info:DynamicCast, info:DynamicInvoke*/f(3);
+          y = /*info:DynamicCast, info:DynamicInvoke*/f.col(3.0);
+          (/*info:DynamicInvoke*/f(3.0));
+          (/*info:DynamicInvoke*/f.col(3));
+        }
+        {
+          A f = new B();
+          int x;
+          double y;
+          x = /*info:DynamicCast, info:DynamicInvoke*/f(3);
+          y = /*info:DynamicCast, info:DynamicInvoke*/f(3);
+          (/*info:DynamicInvoke*/f(3.0));
+        }
+      }
+    '''
+  });
+
+  testChecker('conversion and dynamic invoke', {
+    '/helper.dart': '''
+      dynamic toString = (int x) => x + 42;
+      dynamic hashCode = "hello";
+      ''',
+    '/main.dart': '''
+      import 'helper.dart' as helper;
+
+      class A {
+        String x = "hello world";
+
+        void baz1(y) => x + /*info:DynamicCast*/y;
+        static baz2(y) => /*info:DynamicInvoke*/y + y;
+      }
+
+      void foo(String str) {
+        print(str);
+      }
+
+      class B {
+        String toString([int arg]) => arg.toString();
+      }
+
+      void bar(a) {
+        foo(/*info:DynamicCast,info:DynamicInvoke*/a.x);
+      }
+
+      baz() => new B();
+
+      typedef DynFun(x);
+      typedef StrFun(String x);
+
+      var bar1 = bar;
+
+      void main() {
+        var a = new A();
+        bar(a);
+        (/*info:DynamicInvoke*/bar1(a));
+        var b = bar;
+        (/*info:DynamicInvoke*/b(a));
+        var f1 = foo;
+        f1("hello");
+        dynamic f2 = foo;
+        (/*info:DynamicInvoke*/f2("hello"));
+        DynFun f3 = foo;
+        (/*info:DynamicInvoke*/f3("hello"));
+        (/*info:DynamicInvoke*/f3(42));
+        StrFun f4 = foo;
+        f4("hello");
+        a.baz1("hello");
+        var b1 = a.baz1;
+        (/*info:DynamicInvoke*/b1("hello"));
+        A.baz2("hello");
+        var b2 = A.baz2;
+        (/*info:DynamicInvoke*/b2("hello"));
+
+        dynamic a1 = new B();
+        (/*info:DynamicInvoke*/a1.x);
+        a1.toString();
+        (/*info:DynamicInvoke*/a1.toString(42));
+        var toStringClosure = a1.toString;
+        (/*info:DynamicInvoke*/a1.toStringClosure());
+        (/*info:DynamicInvoke*/a1.toStringClosure(42));
+        (/*info:DynamicInvoke*/a1.toStringClosure("hello"));
+        a1.hashCode;
+
+        dynamic toString = () => null;
+        (/*info:DynamicInvoke*/toString());
+
+        (/*info:DynamicInvoke*/helper.toString());
+        var toStringClosure2 = helper.toString;
+        (/*info:DynamicInvoke*/toStringClosure2());
+        int hashCode = /*info:DynamicCast*/helper.hashCode;
+
+        baz().toString();
+        baz().hashCode;
+      }
+    '''
+  });
+
+  testChecker('Constructors', {
+    '/main.dart': '''
+      const num z = 25;
+      Object obj = "world";
+
+      class A {
+        int x;
+        String y;
+
+        A(this.x) : this.y = /*severe:StaticTypeError*/42;
+
+        A.c1(p): this.x = /*info:DownCastImplicit*/z, this.y = /*info:DynamicCast*/p;
+
+        A.c2(this.x, this.y);
+
+        A.c3(/*severe:InvalidParameterDeclaration*/num this.x, String this.y);
+      }
+
+      class B extends A {
+        B() : super(/*severe:StaticTypeError*/"hello");
+
+        B.c2(int x, String y) : super.c2(/*severe:StaticTypeError*/y, 
+                                         /*severe:StaticTypeError*/x);
+
+        B.c3(num x, Object y) : super.c3(x, /*info:DownCastImplicit*/y);
+      }
+
+      void main() {
+         A a = new A.c2(/*info:DownCastImplicit*/z, /*severe:StaticTypeError*/z);
+         var b = new B.c2(/*severe:StaticTypeError*/"hello", /*info:DownCastImplicit*/obj);
+      }
+   '''
+  });
+
+  testChecker('Unbound variable', {
+    '/main.dart': '''
+      void main() {
+         dynamic y = /*pass should be severe:StaticTypeError*/unboundVariable;
+      }
+   '''
+  });
+
+  testChecker('Unbound type name', {
+    '/main.dart': '''
+      void main() {
+         /*pass should be severe:StaticTypeError*/AToB y;
+      }
+   '''
+  });
+
+  testChecker('Ground type subtyping: dynamic is top', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      void main() {
+         dynamic y;
+         Object o;
+         int i = 0;
+         double d = 0.0;
+         num n;
+         A a;
+         B b;
+         y = o;
+         y = i;
+         y = d;
+         y = n;
+         y = a;
+         y = b;
+      }
+   '''
+  });
+
+  testChecker('Ground type subtyping: dynamic downcasts', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      void main() {
+         dynamic y;
+         Object o;
+         int i = 0;
+         double d = 0.0;
+         num n;
+         A a;
+         B b;
+         o = y;
+         i = /*info:DynamicCast*/y;
+         d = /*info:DynamicCast*/y;
+         n = /*info:DynamicCast*/y;
+         a = /*info:DynamicCast*/y;
+         b = /*info:DynamicCast*/y;
+      }
+   '''
+  });
+
+  testChecker('Ground type subtyping: assigning a class', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      void main() {
+         dynamic y;
+         Object o;
+         int i = 0;
+         double d = 0.0;
+         num n;
+         A a;
+         B b;
+         y = a;
+         o = a;
+         i = /*severe:StaticTypeError*/a;
+         d = /*severe:StaticTypeError*/a;
+         n = /*severe:StaticTypeError*/a;
+         a = a;
+         b = /*info:DownCastImplicit*/a;
+      }
+   '''
+  });
+
+  testChecker('Ground type subtyping: assigning a subclass', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+      class C extends A {}
+
+      void main() {
+         dynamic y;
+         Object o;
+         int i = 0;
+         double d = 0.0;
+         num n;
+         A a;
+         B b;
+         C c;
+         y = b;
+         o = b;
+         i = /*severe:StaticTypeError*/b;
+         d = /*severe:StaticTypeError*/b;
+         n = /*severe:StaticTypeError*/b;
+         a = b;
+         b = b;
+         c = /*severe:StaticTypeError*/b;
+      }
+   '''
+  });
+
+  testChecker('Ground type subtyping: interfaces', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+      class C extends A {}
+      class D extends B implements C {}
+
+      void main() {
+         A top;
+         B left;
+         C right;
+         D bot;
+         {
+           top = top;
+           top = left;
+           top = right;
+           top = bot;
+         }
+         {
+           left = /*info:DownCastImplicit*/top;
+           left = left;
+           left = /*severe:StaticTypeError*/right;
+           left = bot;
+         }
+         {
+           right = /*info:DownCastImplicit*/top;
+           right = /*severe:StaticTypeError*/left;
+           right = right;
+           right = bot;
+         }
+         {
+           bot = /*info:DownCastImplicit*/top;
+           bot = /*info:DownCastImplicit*/left;
+           bot = /*info:DownCastImplicit*/right;
+           bot = bot;
+         }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: int and object', {
+    '/main.dart': '''
+
+      typedef Object Top(int x);      // Top of the lattice
+      typedef int Left(int x);        // Left branch
+      typedef int Left2(int x);       // Left branch
+      typedef Object Right(Object x); // Right branch
+      typedef int Bot(Object x);      // Bottom of the lattice
+
+      Object top(int x) => x;
+      int left(int x) => x;
+      Object right(Object x) => x;
+      int _bot(Object x) => /*info:DownCastImplicit*/x;
+      int bot(Object x) => x as int;
+
+      void main() {
+        { // Check typedef equality
+          Left f = left;
+          Left2 g = f;
+        }
+        {
+          Top f;
+          f = top;
+          f = left;
+          f = right;
+          f = bot;
+        }
+        {
+          Left f;
+          f = /*warning:DownCastComposite*/top;
+          f = left;
+          f = /*warning:DownCastComposite*/right; // Should we reject this?
+          f = bot;
+        }
+        {
+          Right f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left; // Should we reject this?
+          f = right;
+          f = bot;
+        }
+        {
+          Bot f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+          f = /*warning:DownCastComposite*/right;
+          f = bot;
+        }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: classes', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      typedef A Top(B x);   // Top of the lattice
+      typedef B Left(B x);  // Left branch
+      typedef B Left2(B x); // Left branch
+      typedef A Right(A x); // Right branch
+      typedef B Bot(A x);   // Bottom of the lattice
+
+      B left(B x) => x;
+      B _bot(A x) => /*info:DownCastImplicit*/x;
+      B bot(A x) => x as B;
+      A top(B x) => x;
+      A right(A x) => x;
+
+      void main() {
+        { // Check typedef equality
+          Left f = left;
+          Left2 g = f;
+        }
+        {
+          Top f;
+          f = top;
+          f = left;
+          f = right;
+          f = bot;
+        }
+        {
+          Left f;
+          f = /*warning:DownCastComposite*/top;
+          f = left;
+          f = /*warning:DownCastComposite*/right; // Should we reject this?
+          f = bot;
+        }
+        {
+          Right f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left; // Should we reject this?
+          f = right;
+          f = bot;
+        }
+        {
+          Bot f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+          f = /*warning:DownCastComposite*/right;
+          f = bot;
+        }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: dynamic', {
+    '/main.dart': '''
+
+      class A {}
+
+      typedef dynamic Top(dynamic x);     // Top of the lattice
+      typedef dynamic Left(A x);          // Left branch
+      typedef A Right(dynamic x);         // Right branch
+      typedef A Bottom(A x);              // Bottom of the lattice
+
+      dynamic left(A x) => x;
+      A bot(A x) => x;
+      dynamic top(dynamic x) => x;
+      A right(dynamic x) => /*info:DynamicCast*/x;
+
+      void main() {
+        {
+          Top f;
+          f = top;
+          f = left;
+          f = right;
+          f = bot;
+        }
+        {
+          Left f;
+          f = /*warning:DownCastComposite*/top;
+          f = left;
+          f = /*warning:DownCastComposite*/right;
+          f = bot;
+        }
+        {
+          Right f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+          f = right;
+          f = bot;
+        }
+        {
+          Bottom f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+          f = /*warning:DownCastComposite*/right;
+          f = bot;
+        }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: function literal variance', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      typedef T Function2<S, T>(S z);
+
+      A top(B x) => x;
+      B left(B x) => x;
+      A right(A x) => x;
+      B bot(A x) => x as B;
+
+      void main() {
+        {
+          Function2<B, A> f;
+          f = top;
+          f = left;
+          f = right;
+          f = bot;
+        }
+        {
+          Function2<B, B> f;
+          f = /*warning:DownCastComposite*/top;
+          f = left;
+          f = /*warning:DownCastComposite*/right; // Should we reject this?
+          f = bot;
+        }
+        {
+          Function2<A, A> f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left; // Should we reject this?
+          f = right;
+          f = bot;
+        }
+        {
+          Function2<A, B> f;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+          f = /*warning:DownCastComposite*/right;
+          f = bot;
+        }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: function variable variance', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      typedef T Function2<S, T>(S z);
+
+      void main() {
+        {
+          Function2<B, A> top;
+          Function2<B, B> left;
+          Function2<A, A> right;
+          Function2<A, B> bot;
+
+          top = right;
+          top = bot;
+          top = top;
+          top = left;
+
+          left = /*warning:DownCastComposite*/top;
+          left = left;
+          left = /*warning:DownCastComposite*/right; // Should we reject this?
+          left = bot;
+
+          right = /*warning:DownCastComposite*/top;
+          right = /*warning:DownCastComposite*/left; // Should we reject this?
+          right = right;
+          right = bot;
+
+          bot = /*warning:DownCastComposite*/top;
+          bot = /*warning:DownCastComposite*/left;
+          bot = /*warning:DownCastComposite*/right;
+          bot = bot;
+        }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: higher order function literals', {
+    '/main.dart': '''
+
+      class A {}
+      class B extends A {}
+
+      typedef T Function2<S, T>(S z);
+
+      typedef A BToA(B x);  // Top of the base lattice
+      typedef B AToB(A x);  // Bot of the base lattice
+
+      BToA top(AToB f) => f;
+      AToB left(AToB f) => f;
+      BToA right(BToA f) => f;
+      AToB _bot(BToA f) => /*warning:DownCastComposite*/f;
+      AToB bot(BToA f) => f as AToB;
+
+      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:DownCastComposite*/f;
+      Function2<A, B> bot(BToA f) => f as Function2<A, B>;
+
+
+      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:DownCastComposite*/f;
+      AToB bot(Function2<B, A> f) => f as AToB;
+
+      void main() {
+        {
+          Function2<AToB, BToA> f; // Top
+          f = top;
+          f = left;
+          f = right;
+          f = bot;
+        }
+        {
+          Function2<AToB, AToB> f; // Left
+          f = /*warning:DownCastComposite*/top;
+          f = left;
+          f = /*warning:DownCastComposite*/right; // Should we reject this?
+          f = bot;
+        }
+        {
+          Function2<BToA, BToA> f; // Right
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left; // Should we reject this?
+          f = right;
+          f = bot;
+        }
+        {
+          Function2<BToA, AToB> f; // Bot
+          f = bot;
+          f = /*warning:DownCastComposite*/left;
+          f = /*warning:DownCastComposite*/top;
+          f = /*warning:DownCastComposite*/left;
+        }
+      }
+   '''
+  });
+
+  testChecker(
+      'Function typing and subtyping: higher order function variables', {
+    '/main.dart': '''
+
+    class A {}
+    class B extends A {}
+
+    typedef T Function2<S, T>(S z);
+
+    void main() {
+      {
+        Function2<Function2<A, B>, Function2<B, A>> top;
+        Function2<Function2<B, A>, Function2<B, A>> right;
+        Function2<Function2<A, B>, Function2<A, B>> left;
+        Function2<Function2<B, A>, Function2<A, B>> bot;
+
+        top = right;
+        top = bot;
+        top = top;
+        top = left;
+
+        left = /*warning:DownCastComposite*/top;
+        left = left;
+        left =
+            /*warning:DownCastComposite should be severe:StaticTypeError*/right;
+        left = bot;
+
+        right = /*warning:DownCastComposite*/top;
+        right =
+            /*warning:DownCastComposite should be severe:StaticTypeError*/left;
+        right = right;
+        right = bot;
+
+        bot = /*warning:DownCastComposite*/top;
+        bot = /*warning:DownCastComposite*/left;
+        bot = /*warning:DownCastComposite*/right;
+        bot = bot;
+      }
+    }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: named and optional parameters', {
+    '/main.dart': '''
+
+      class A {}
+
+      typedef A FR(A x);
+      typedef A FO([A x]);
+      typedef A FN({A x});
+      typedef A FRR(A x, A y);
+      typedef A FRO(A x, [A y]);
+      typedef A FRN(A x, {A n});
+      typedef A FOO([A x, A y]);
+      typedef A FNN({A x, A y});
+      typedef A FNNN({A z, A y, A x});
+
+      void main() {
+         FR r;
+         FO o;
+         FN n;
+         FRR rr;
+         FRO ro;
+         FRN rn;
+         FOO oo;
+         FNN nn;
+         FNNN nnn;
+
+         r = r;
+         r = o;
+         r = /*severe:StaticTypeError*/n;
+         r = /*severe:StaticTypeError*/rr;
+         r = ro;
+         r = rn;
+         r = oo;
+         r = /*severe:StaticTypeError*/nn;
+         r = /*severe:StaticTypeError*/nnn;
+
+         o = /*warning:DownCastComposite*/r;
+         o = o;
+         o = /*severe:StaticTypeError*/n;
+         o = /*severe:StaticTypeError*/rr;
+         o = /*severe:StaticTypeError*/ro;
+         o = /*severe:StaticTypeError*/rn;
+         o = oo;
+         o = /*severe:StaticTypeError*/nn
+         o = /*severe:StaticTypeError*/nnn;
+
+         n = /*severe:StaticTypeError*/r;
+         n = /*severe:StaticTypeError*/o;
+         n = n;
+         n = /*severe:StaticTypeError*/rr;
+         n = /*severe:StaticTypeError*/ro;
+         n = /*severe:StaticTypeError*/rn;
+         n = /*severe:StaticTypeError*/oo;
+         n = nn;
+         n = nnn;
+
+         rr = /*severe:StaticTypeError*/r;
+         rr = /*severe:StaticTypeError*/o;
+         rr = /*severe:StaticTypeError*/n;
+         rr = rr;
+         rr = ro;
+         rr = /*severe:StaticTypeError*/rn;
+         rr = oo;
+         rr = /*severe:StaticTypeError*/nn;
+         rr = /*severe:StaticTypeError*/nnn;
+
+         ro = /*warning:DownCastComposite*/r;
+         ro = /*severe:StaticTypeError*/o;
+         ro = /*severe:StaticTypeError*/n;
+         ro = /*warning:DownCastComposite*/rr;
+         ro = ro;
+         ro = /*severe:StaticTypeError*/rn;
+         ro = oo;
+         ro = /*severe:StaticTypeError*/nn;
+         ro = /*severe:StaticTypeError*/nnn;
+
+         rn = /*warning:DownCastComposite*/r;
+         rn = /*severe:StaticTypeError*/o;
+         rn = /*severe:StaticTypeError*/n;
+         rn = /*severe:StaticTypeError*/rr;
+         rn = /*severe:StaticTypeError*/ro;
+         rn = rn;
+         rn = /*severe:StaticTypeError*/oo;
+         rn = /*severe:StaticTypeError*/nn;
+         rn = /*severe:StaticTypeError*/nnn;
+
+         oo = /*warning:DownCastComposite*/r;
+         oo = /*warning:DownCastComposite*/o;
+         oo = /*severe:StaticTypeError*/n;
+         oo = /*warning:DownCastComposite*/rr;
+         oo = /*warning:DownCastComposite*/ro;
+         oo = /*severe:StaticTypeError*/rn;
+         oo = oo;
+         oo = /*severe:StaticTypeError*/nn;
+         oo = /*severe:StaticTypeError*/nnn;
+
+         nn = /*severe:StaticTypeError*/r;
+         nn = /*severe:StaticTypeError*/o;
+         nn = /*warning:DownCastComposite*/n;
+         nn = /*severe:StaticTypeError*/rr;
+         nn = /*severe:StaticTypeError*/ro;
+         nn = /*severe:StaticTypeError*/rn;
+         nn = /*severe:StaticTypeError*/oo;
+         nn = nn;
+         nn = nnn;
+
+         nnn = /*severe:StaticTypeError*/r;
+         nnn = /*severe:StaticTypeError*/o;
+         nnn = /*warning:DownCastComposite*/n;
+         nnn = /*severe:StaticTypeError*/rr;
+         nnn = /*severe:StaticTypeError*/ro;
+         nnn = /*severe:StaticTypeError*/rn;
+         nnn = /*severe:StaticTypeError*/oo;
+         nnn = /*warning:DownCastComposite*/nn;
+         nnn = nnn;
+      }
+   '''
+  });
+
+  testChecker('Function subtyping: objects with call methods', {
+    '/main.dart': '''
+
+      typedef int I2I(int x);
+      typedef num N2N(num x);
+      class A {
+         int call(int x) => x;
+      }
+      class B {
+         num call(num x) => x;
+      }
+      int i2i(int x) => x;
+      num n2n(num x) => x;
+      void main() {
+         {
+           I2I f;
+           f = new A();
+           f = /*severe:StaticTypeError*/new B();
+           f = i2i;
+           f = /*warning:DownCastComposite*/n2n;
+           f = /*warning:DownCastComposite*/i2i as Object;
+           f = /*warning:DownCastComposite*/n2n as Function;
+         }
+         {
+           N2N f;
+           f = /*severe:StaticTypeError*/new A();
+           f = new B();
+           f = /*warning:DownCastComposite*/i2i;
+           f = n2n;
+           f = /*warning:DownCastComposite*/i2i as Object;
+           f = /*warning:DownCastComposite*/n2n as Function;
+         }
+         {
+           A f;
+           f = new A();
+           f = /*severe:StaticTypeError*/new B();
+           f = /*severe:StaticTypeError*/i2i;
+           f = /*severe:StaticTypeError*/n2n;
+           f = /*info:DownCastImplicit*/i2i as Object;
+           f = /*info:DownCastImplicit*/n2n as Function;
+         }
+         {
+           B f;
+           f = /*severe:StaticTypeError*/new A();
+           f = new B();
+           f = /*severe:StaticTypeError*/i2i;
+           f = /*severe:StaticTypeError*/n2n;
+           f = /*info:DownCastImplicit*/i2i as Object;
+           f = /*info:DownCastImplicit*/n2n as Function;
+         }
+         {
+           Function f;
+           f = new A();
+           f = new B();
+           f = i2i;
+           f = n2n;
+           f = /*info:DownCastImplicit*/i2i as Object;
+           f = (n2n as Function);
+         }
+      }
+   '''
+  });
+
+  testChecker('Function typing and subtyping: void', {
+    '/main.dart': '''
+
+      class A {
+        void bar() => null;
+        void foo() => bar; // allowed
+      }
+   '''
+  });
+
+  testChecker('Relaxed casts', {
+    '/main.dart': '''
+
+      class A {}
+
+      class L<T> {}
+      class M<T> extends L<T> {}
+      //     L<dynamic|Object>
+      //    /              \
+      // M<dynamic|Object>  L<A>
+      //    \              /
+      //          M<A>
+      // In normal Dart, there are additional edges
+      //  from M<A> to M<dynamic>
+      //  from L<A> to M<dynamic>
+      //  from L<A> to L<dynamic>
+      void main() {
+        L lOfDs;
+        L<Object> lOfOs;
+        L<A> lOfAs;
+
+        M mOfDs;
+        M<Object> mOfOs;
+        M<A> mOfAs;
+
+        {
+          lOfDs = mOfDs;
+          lOfDs = mOfOs;
+          lOfDs = mOfAs;
+          lOfDs = lOfDs;
+          lOfDs = lOfOs;
+          lOfDs = lOfAs;
+        }
+        {
+          lOfOs = mOfDs;
+          lOfOs = mOfOs;
+          lOfOs = mOfAs;
+          lOfOs = lOfDs;
+          lOfOs = lOfOs;
+          lOfOs = lOfAs;
+        }
+        {
+          lOfAs = /*warning:DownCastComposite*/mOfDs;
+          lOfAs = /*severe:StaticTypeError*/mOfOs;
+          lOfAs = mOfAs;
+          lOfAs = /*warning:DownCastComposite*/lOfDs;
+          lOfAs = /*warning:DownCastComposite*/lOfOs;
+          lOfAs = lOfAs;
+        }
+        {
+          mOfDs = mOfDs;
+          mOfDs = mOfOs;
+          mOfDs = mOfAs;
+          mOfDs = /*info:DownCastImplicit*/lOfDs;
+          mOfDs = /*info:DownCastImplicit*/lOfOs;
+          mOfDs = /*info:DownCastImplicit*/lOfAs;
+        }
+        {
+          mOfOs = mOfDs;
+          mOfOs = mOfOs;
+          mOfOs = mOfAs;
+          mOfOs = /*info:DownCastImplicit*/lOfDs;
+          mOfOs = /*info:DownCastImplicit*/lOfOs;
+          mOfOs = /*severe:StaticTypeError*/lOfAs;
+        }
+        {
+          mOfAs = /*warning:DownCastComposite*/mOfDs;
+          mOfAs = /*warning:DownCastComposite*/mOfOs;
+          mOfAs = mOfAs;
+          mOfAs = /*warning:DownCastComposite*/lOfDs;
+          mOfAs = /*warning:DownCastComposite*/lOfOs;
+          mOfAs = /*warning:DownCastComposite*/lOfAs;
+        }
+
+      }
+   '''
+  });
+
+  testChecker('Type checking literals', {
+    '/main.dart': '''
+          test() {
+            num n = 3;
+            int i = 3;
+            String s = "hello";
+            {
+               List<int> l = <int>[i];
+               l = <int>[/*severe:StaticTypeError*/s];
+               l = <int>[/*info:DownCastImplicit*/n];
+               l = <int>[i, /*info:DownCastImplicit*/n, /*severe:StaticTypeError*/s];
+            }
+            {
+               List l = [i];
+               l = [s];
+               l = [n];
+               l = [i, n, s];
+            }
+            {
+               Map<String, int> m = <String, int>{s: i};
+               m = <String, int>{s: /*severe:StaticTypeError*/s};
+               m = <String, int>{s: /*info:DownCastImplicit*/n};
+               m = <String, int>{s: i,
+                                 s: /*info:DownCastImplicit*/n,
+                                 s: /*severe:StaticTypeError*/s};
+            }
+           // TODO(leafp): We can't currently test for key errors since the
+           // error marker binds to the entire entry.
+            {
+               Map m = {s: i};
+               m = {s: s};
+               m = {s: n};
+               m = {s: i,
+                    s: n,
+                    s: s};
+               m = {i: s,
+                    n: s,
+                    s: s};
+            }
+          }
+   '''
+  });
+
+  testChecker('casts in constant contexts', {
+    '/main.dart': '''
+          class A {
+            static const num n = 3.0;
+            static const int i = /*info:AssignmentCast*/n;
+            final int fi;
+            const A(num a) : this.fi = /*info:DownCastImplicit*/a;
+          }
+          class B extends A {
+            const B(Object a) : super(/*info:DownCastImplicit*/a);
+          }
+          void foo(Object o) {
+            var a = const A(/*info:DownCastImplicit*/o);
+          }
+     '''
+  });
+
+  testChecker('casts in conditionals', {
+    '/main.dart': '''
+          main() {
+            bool b = true;
+            num x = b ? 1 : 2.3;
+            int y = /*info:AssignmentCast*/b ? 1 : 2.3;
+            String z = !b ? "hello" : null;
+            z = b ? null : "hello";
+          }
+      '''
+  });
+
+  testChecker('redirecting constructor', {
+    '/main.dart': '''
+          class A {
+            A(A x) {}
+            A.two() : this(/*severe:StaticTypeError*/3);
+          }
+       '''
+  });
+
+  testChecker('super constructor', {
+    '/main.dart': '''
+          class A { A(A x) {} }
+          class B extends A {
+            B() : super(/*severe:StaticTypeError*/3);
+          }
+       '''
+  });
+
+  testChecker('field/field override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          class C extends B {}
+
+          class Base {
+            B f1;
+            B f2;
+            B f3;
+            B f4;
+          }
+
+          class Child extends Base {
+            /*severe:InvalidMethodOverride*/A f1; // invalid for getter
+            /*severe:InvalidMethodOverride*/C f2; // invalid for setter
+            var f3;
+            /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/dynamic f4;
+          }
+       '''
+  });
+
+  testChecker('getter/getter override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          class C extends B {}
+
+          abstract class Base {
+            B get f1;
+            B get f2;
+            B get f3;
+            B get f4;
+          }
+
+          class Child extends Base {
+            /*severe:InvalidMethodOverride*/A get f1 => null;
+            C get f2 => null;
+            get f3 => null;
+            /*severe:InvalidMethodOverride*/dynamic get f4 => null;
+          }
+       '''
+  });
+
+  testChecker('field/getter override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          class C extends B {}
+
+          abstract class Base {
+            B f1;
+            B f2;
+            B f3;
+            B f4;
+          }
+
+          class Child extends Base {
+            /*severe:InvalidMethodOverride*/A get f1 => null;
+            C get f2 => null;
+            get f3 => null;
+            /*severe:InvalidMethodOverride*/dynamic get f4 => null;
+          }
+       '''
+  });
+
+  testChecker('setter/setter override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          class C extends B {}
+
+          abstract class Base {
+            void set f1(B value);
+            void set f2(B value);
+            void set f3(B value);
+            void set f4(B value);
+            void set f5(B value);
+          }
+
+          class Child extends Base {
+            void set f1(A value) {}
+            /*severe:InvalidMethodOverride*/void set f2(C value) {}
+            void set f3(value) {}
+            /*severe:InvalidMethodOverride*/void set f4(dynamic value) {}
+            set f5(B value) {}
+          }
+       '''
+  });
+
+  testChecker('field/setter override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          class C extends B {}
+
+          class Base {
+            B f1;
+            B f2;
+            B f3;
+            B f4;
+            B f5;
+          }
+
+          class Child extends Base {
+            B get f1 => null;
+            B get f2 => null;
+            B get f3 => null;
+            B get f4 => null;
+            B get f5 => null;
+
+            void set f1(A value) {}
+            /*severe:InvalidMethodOverride*/void set f2(C value) {}
+            void set f3(value) {}
+            /*severe:InvalidMethodOverride*/void set f4(dynamic value) {}
+            set f5(B value) {}
+          }
+       '''
+  });
+
+  testChecker('method override', {
+    '/main.dart': '''
+          class A {}
+          class B extends A {}
+          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);
+          }
+
+          class Child extends Base {
+            /*severe:InvalidMethodOverride*/A m1(A value) {}
+            /*severe:InvalidMethodOverride*/C m2(C value) {}
+            /*severe:InvalidMethodOverride*/A m3(C value) {}
+            C m4(A value) {}
+            m5(value) {}
+            /*severe:InvalidMethodOverride*/dynamic m6(dynamic value) {}
+          }
+       '''
+  });
+
+  testChecker('unary operators', {
+    '/main.dart': '''
+      class A {
+        A operator ~() {}
+        A operator +(int x) {}
+        A operator -(int x) {}
+        A operator -() {}
+      }
+
+      foo() => new A();
+
+      test() {
+        A a = new A();
+        var c = foo();
+
+        ~a;
+        (/*info:DynamicInvoke*/~d);
+
+        !/*severe:StaticTypeError*/a;
+        !/*info:DynamicCast*/d;
+
+        -a;
+        (/*info:DynamicInvoke*/-d);
+
+        ++a;
+        --a;
+        (/*info:DynamicInvoke*/++d);
+        (/*info:DynamicInvoke*/--d);
+
+        a++;
+        a--;
+        (/*info:DynamicInvoke*/d++);
+        (/*info:DynamicInvoke*/d--);
+      }'''
+  });
+
+  testChecker('binary and index operators', {
+    '/main.dart': '''
+          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) {}
+          }
+
+          class B {
+            A operator -(B b) {}
+          }
+
+          foo() => new A();
+
+          test() {
+            A a = new A();
+            B b = new B();
+            var c = foo();
+            a = a * b;
+            a = a * /*info:DynamicCast*/c;
+            a = a / b;
+            a = a ~/ b;
+            a = a % b;
+            a = a + b;
+            a = a + /*severe:StaticTypeError*/a;
+            a = a - b;
+            b = /*severe:StaticTypeError*/b - b;
+            a = a << b;
+            a = a >> b;
+            a = a & b;
+            a = a ^ b;
+            a = a | b;
+            c = (/*info:DynamicInvoke*/c + b);
+
+            String x = 'hello';
+            int y = 42;
+            x = x + x;
+            x = x + /*info:DynamicCast*/c;
+            x = x + /*severe:StaticTypeError*/y;
+
+            bool p = true;
+            p = p && p;
+            p = p && /*info:DynamicCast*/c;
+            p = (/*info:DynamicCast*/c) && p;
+            p = (/*info:DynamicCast*/c) && /*info:DynamicCast*/c;
+            p = (/*severe:StaticTypeError*/y) && p;
+            p = c == y;
+
+            a = a[b];
+            a = a[/*info:DynamicCast*/c];
+            c = (/*info:DynamicInvoke*/c[b]);
+            a[/*severe:StaticTypeError*/y];
+          }
+       '''
+  });
+
+  testChecker('compound assignments', {
+    '/main.dart': '''
+          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) {}
+          }
+
+          class B {
+            A operator -(B b) {}
+          }
+
+          class D {
+            D operator +(D d) {}
+          }
+
+          foo() => new A();
+
+          test() {
+            int x = 0;
+            x += 5;
+            (/*severe:StaticTypeError*/x += 3.14);
+
+            double y = 0.0;
+            y += 5;
+            y += 3.14;
+
+            num z = 0;
+            z += 5;
+            z += 3.14;
+
+            x = /*info:DownCastImplicit*/x + z;
+            x += /*info:DownCastImplicit*/z;
+            y = /*info:DownCastImplicit*/y + z;
+            y += /*info:DownCastImplicit*/z;
+
+            dynamic w = 42;
+            x += /*info:DynamicCast*/w;
+            y += /*info:DynamicCast*/w;
+            z += /*info:DynamicCast*/w;
+
+            A a = new A();
+            B b = new B();
+            var c = foo();
+            a = a * b;
+            a *= b;
+            a *= /*info:DynamicCast*/c;
+            a /= b;
+            a ~/= b;
+            a %= b;
+            a += b;
+            a += /*severe:StaticTypeError*/a;
+            a -= b;
+            (/*severe:StaticTypeError*/b -= b);
+            a <<= b;
+            a >>= b;
+            a &= b;
+            a ^= b;
+            a |= b;
+            (/*info:DynamicInvoke*/c += b);
+
+            var d = new D();
+            a[b] += d;
+            a[/*info:DynamicCast*/c] += d;
+            a[/*severe:StaticTypeError*/z] += d;
+            a[b] += /*info:DynamicCast*/c;
+            a[b] += /*severe:StaticTypeError*/z;
+            (/*info:DynamicInvoke*/(/*info:DynamicInvoke*/c[b]) += d);
+          }
+       '''
+  });
+
+  testChecker('super call placement', {
+    '/main.dart': '''
+          class Base {
+            var x;
+            Base() : x = print('Base.1') { print('Base.2'); }
+          }
+
+          class Derived extends Base {
+            var y, z;
+            Derived()
+                : y = print('Derived.1'),
+                  /*severe:InvalidSuperInvocation*/super(),
+                  z = print('Derived.2') {
+              print('Derived.3');
+            }
+          }
+
+          class Valid extends Base {
+            var y, z;
+            Valid()
+                : y = print('Valid.1'),
+                  z = print('Valid.2'),
+                  super() {
+              print('Valid.3');
+            }
+          }
+
+          class AlsoValid extends Base {
+            AlsoValid() : super();
+          }
+
+          main() => new Derived();
+       '''
+  });
+
+  testChecker('for loop variable', {
+    '/main.dart': '''
+          foo() {
+            for (int i = 0; i < 10; i++) {
+              i = /*severe:StaticTypeError*/"hi";
+            }
+          }
+          bar() {
+            for (var i = 0; i < 10; i++) {
+              int j = i + 1;
+            }
+          }
+        '''
+  });
+
+  group('invalid overrides', () {
+    testChecker('child override', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+                A f;
+            }
+
+            class T1 extends Base {
+              /*severe:InvalidMethodOverride*/B get f => null;
+            }
+
+            class T2 extends Base {
+              /*severe:InvalidMethodOverride*/set f(B b) => null;
+            }
+
+            class T3 extends Base {
+              /*severe:InvalidMethodOverride*/final B f;
+            }
+            class T4 extends Base {
+              // two: one for the getter one for the setter.
+              /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/B f;
+            }
+         '''
+    });
+
+    testChecker('child override 2', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+                m(A a) {}
+            }
+
+            class Test extends Base {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+            }
+         '''
+    });
+    testChecker('grandchild override', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Grandparent {
+                m(A a) {}
+            }
+            class Parent extends Grandparent {
+            }
+
+            class Test extends Parent {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+            }
+         '''
+    });
+
+    testChecker('double override', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Grandparent {
+                m(A a) {}
+            }
+            class Parent extends Grandparent {
+                m(A a) {}
+            }
+
+            class Test extends Parent {
+                // Reported only once
+                /*severe:InvalidMethodOverride*/m(B a) {}
+            }
+         '''
+    });
+
+    testChecker('double override 2', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Grandparent {
+                m(A a) {}
+            }
+            class Parent extends Grandparent {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+            }
+
+            class Test extends Parent {
+                m(B a) {}
+            }
+         '''
+    });
+
+    testChecker('mixin override to base', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+                m(A a) {}
+            }
+
+            class M1 {
+                m(B a) {}
+            }
+
+            class M2 {}
+
+            class T1 extends Base with /*severe:InvalidMethodOverride*/M1 {}
+            class T2 extends Base with /*severe:InvalidMethodOverride*/M1, M2 {}
+            class T3 extends Base with M2, /*severe:InvalidMethodOverride*/M1 {}
+         '''
+    });
+
+    testChecker('mixin override to mixin', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+            }
+
+            class M1 {
+                m(B a) {}
+            }
+
+            class M2 {
+                m(A a) {}
+            }
+
+            class T1 extends Base with M1, /*severe:InvalidMethodOverride*/M2 {}
+         '''
+    });
+
+    // This is a regression test for a bug in an earlier implementation were
+    // names were hiding errors if the first mixin override looked correct,
+    // but subsequent ones did not.
+    testChecker('no duplicate mixin override', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+                m(A a) {}
+            }
+
+            class M1 {
+                m(A a) {}
+            }
+
+            class M2 {
+                m(B a) {}
+            }
+
+            class M3 {
+                m(B a) {}
+            }
+
+            class T1 extends Base
+                with M1, /*severe:InvalidMethodOverride*/M2, M3 {}
+         '''
+    });
+
+    testChecker('class override of interface', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            abstract class I {
+                m(A a);
+            }
+
+            class T1 implements I {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+            }
+         '''
+    });
+
+    testChecker('base class override to child interface', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            abstract class I {
+                m(A a);
+            }
+
+            class Base {
+                m(B a) {}
+            }
+
+
+            class T1 /*severe:InvalidMethodOverride*/extends Base implements I {
+            }
+         '''
+    });
+
+    testChecker('mixin override of interface', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            abstract class I {
+                m(A a);
+            }
+
+            class M {
+                m(B a) {}
+            }
+
+            class T1 extends Object with /*severe:InvalidMethodOverride*/M
+               implements I {}
+         '''
+    });
+
+    // This is a case were it is incorrect to say that the base class
+    // incorrectly overrides the interface.
+    testChecker(
+        'no errors if subclass correctly overrides base and interface', {
+      '/main.dart': '''
+            class A {}
+            class B {}
+
+            class Base {
+                m(A a) {}
+            }
+
+            class I1 {
+                m(B a) {}
+            }
+
+            class T1 /*severe:InvalidMethodOverride*/extends Base
+                implements I1 {}
+
+            class T2 extends Base implements I1 {
+                /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/m(a) {}
+            }
+
+            class T3 extends Object with /*severe:InvalidMethodOverride*/Base
+                implements I1 {}
+
+            class T4 extends Object with Base implements I1 {
+                /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/m(a) {}
+            }
+         '''
+    });
+  });
+
+  group('class override of grand interface', () {
+    testChecker('interface of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 implements I1 {}
+
+              class T1 implements I2 {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+    testChecker('superclass of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 extends I1 {}
+
+              class T1 implements I2 {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+    testChecker('mixin of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class M1 {
+                  m(A a);
+              }
+              abstract class I2 extends Object with M1 {}
+
+              class T1 implements I2 {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+    testChecker('interface of abstract superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class Base implements I1 {}
+
+              class T1 extends Base {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+    testChecker('interface of concrete superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              // See issue #25
+              /*pass should be warning:AnalyzerError*/class 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) {}
+              }
+           '''
+    });
+  });
+
+  group('mixin override of grand interface', () {
+    testChecker('interface of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 implements I1 {}
+
+              class M {
+                  m(B a) {}
+              }
+
+              class T1 extends Object with /*severe:InvalidMethodOverride*/M
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('superclass of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 extends I1 {}
+
+              class M {
+                  m(B a) {}
+              }
+
+              class T1 extends Object with /*severe:InvalidMethodOverride*/M
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('mixin of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class M1 {
+                  m(A a);
+              }
+              abstract class I2 extends Object with M1 {}
+
+              class M {
+                  m(B a) {}
+              }
+
+              class T1 extends Object with /*severe:InvalidMethodOverride*/M
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('interface of abstract superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class Base implements I1 {}
+
+              class M {
+                  m(B a) {}
+              }
+
+              class T1 extends Base with /*severe:InvalidMethodOverride*/M {
+              }
+           '''
+    });
+    testChecker('interface of concrete superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              // See issue #25
+              /*pass should be warning:AnalyzerError*/class Base implements I1 {
+              }
+
+              class M {
+                  m(B a) {}
+              }
+
+              class T1 extends Base with M {
+              }
+           '''
+    });
+  });
+
+  group('superclass override of grand interface', () {
+    testChecker('interface of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 implements I1 {}
+
+              class Base {
+                  m(B a) {}
+              }
+
+              class T1 /*severe:InvalidMethodOverride*/extends Base
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('superclass of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 extends I1 {}
+
+              class Base {
+                  m(B a) {}
+              }
+
+              class T1 /*severe:InvalidMethodOverride*/extends Base
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('mixin of interface of child', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class M1 {
+                  m(A a);
+              }
+              abstract class I2 extends Object with M1 {}
+
+              class Base {
+                  m(B a) {}
+              }
+
+              class T1 /*severe:InvalidMethodOverride*/extends Base
+                  implements I2 {
+              }
+           '''
+    });
+    testChecker('interface of abstract superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              abstract class Base implements I1 {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+
+              class T1 extends Base {
+                  // we consider the base class incomplete because it is
+                  // abstract, so we report the error here too.
+                  // TODO(sigmund): consider tracking overrides in a fine-grain
+                  // manner, then this and the double-overrides would not be
+                  // reported.
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+    testChecker('interface of concrete superclass', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class Base implements I1 {
+                  /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+
+              class T1 extends Base {
+                  m(B a) {}
+              }
+           '''
+    });
+  });
+
+  group('no duplicate reports from overriding interfaces', () {
+    testChecker('type overrides same method in multiple interfaces', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+              abstract class I2 implements I1 {
+                  m(A a);
+              }
+
+              class Base {
+              }
+
+              class T1 implements I2 {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+           '''
+    });
+
+    testChecker('type and base type override same method in interface', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class Base {
+                  m(B a);
+              }
+
+              // Note: no error reported in `extends Base` to avoid duplicating
+              // the error in T1.
+              class T1 extends Base implements I1 {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+
+              // If there is no error in the class, we do report the error at
+              // the base class:
+              class T2 /*severe:InvalidMethodOverride*/extends Base
+                  implements I1 {
+              }
+           '''
+    });
+
+    testChecker('type and mixin override same method in interface', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class M {
+                  m(B a);
+              }
+
+              class T1 extends Object with M implements I1 {
+                /*severe:InvalidMethodOverride*/m(B a) {}
+              }
+
+              class T2 extends Object with /*severe:InvalidMethodOverride*/M
+                  implements I1 {
+              }
+           '''
+    });
+
+    testChecker('two grand types override same method in interface', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class Grandparent {
+                  m(B a) {}
+              }
+
+              class Parent1 extends Grandparent {
+                  m(B a) {}
+              }
+              class Parent2 extends Grandparent {
+              }
+
+              // Note: otherwise both errors would be reported on this line
+              class T1 /*severe:InvalidMethodOverride*/extends Parent1
+                  implements I1 {
+              }
+              class T2 /*severe:InvalidMethodOverride*/extends Parent2
+                  implements I1 {
+              }
+           '''
+    });
+
+    testChecker('two mixins override same method in interface', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class M1 {
+                  m(B a) {}
+              }
+
+              class M2 {
+                  m(B a) {}
+              }
+
+              // Here we want to report both, because the error location is
+              // different.
+              // TODO(sigmund): should we merge these as well?
+              class T1 extends Object
+                  with /*severe:InvalidMethodOverride*/M1
+                  with /*severe:InvalidMethodOverride*/M2
+                  implements I1 {
+              }
+           '''
+    });
+
+    testChecker('base type and mixin override same method in interface', {
+      '/main.dart': '''
+              class A {}
+              class B {}
+
+              abstract class I1 {
+                  m(A a);
+              }
+
+              class Base {
+                  m(B a) {}
+              }
+
+              class M {
+                  m(B a) {}
+              }
+
+              // Here we want to report both, because the error location is
+              // different.
+              // TODO(sigmund): should we merge these as well?
+              class T1 /*severe:InvalidMethodOverride*/extends Base
+                  with /*severe:InvalidMethodOverride*/M
+                  implements I1 {
+              }
+           '''
+    });
+  });
+
+  testChecker('invalid runtime checks', {
+    '/main.dart': '''
+          typedef int I2I(int x);
+          typedef int D2I(x);
+          typedef int II2I(int x, int y);
+          typedef int DI2I(x, int y);
+          typedef int ID2I(int x, y);
+          typedef int DD2I(x, y);
+
+          typedef I2D(int x);
+          typedef D2D(x);
+          typedef II2D(int x, int y);
+          typedef DI2D(x, int y);
+          typedef ID2D(int x, y);
+          typedef DD2D(x, y);
+
+          int foo(int x) => x;
+          int bar(int x, int y) => x + y;
+
+          void main() {
+            bool b;
+            b = /*info:NonGroundTypeCheckInfo*/foo is I2I;
+            b = /*info:NonGroundTypeCheckInfo*/foo is D2I;
+            b = /*info:NonGroundTypeCheckInfo*/foo is I2D;
+            b = foo is D2D;
+
+            b = /*info:NonGroundTypeCheckInfo*/bar is II2I;
+            b = /*info:NonGroundTypeCheckInfo*/bar is DI2I;
+            b = /*info:NonGroundTypeCheckInfo*/bar is ID2I;
+            b = /*info:NonGroundTypeCheckInfo*/bar is II2D;
+            b = /*info:NonGroundTypeCheckInfo*/bar is DD2I;
+            b = /*info:NonGroundTypeCheckInfo*/bar is DI2D;
+            b = /*info:NonGroundTypeCheckInfo*/bar is ID2D;
+            b = bar is DD2D;
+
+            // For as, the validity of checks is deferred to runtime.
+            Function f;
+            f = foo as I2I;
+            f = foo as D2I;
+            f = foo as I2D;
+            f = foo as D2D;
+
+            f = bar as II2I;
+            f = bar as DI2I;
+            f = bar as ID2I;
+            f = bar as II2D;
+            f = bar as DD2I;
+            f = bar as DI2D;
+            f = bar as ID2D;
+            f = bar as DD2D;
+          }
+      '''
+  });
+
+  group('function modifiers', () {
+    testChecker('async', {
+      '/main.dart': '''
+        import 'dart:async';
+        import 'dart:math' show Random;
+
+        dynamic x;
+
+        foo1() async => x;
+        Future foo2() async => x;
+        Future<int> foo3() async => (/*info:DynamicCast*/x);
+        Future<int> foo4() async => (/*severe:StaticTypeError*/new Future<int>.value(/*info:DynamicCast*/x));
+
+        bar1() async { return x; }
+        Future bar2() async { return x; }
+        Future<int> bar3() async { return (/*info:DynamicCast*/x); }
+        Future<int> bar4() async { return (/*severe:StaticTypeError*/new Future<int>.value(/*info:DynamicCast*/x)); }
+
+        int y;
+        Future<int> z;
+
+        void baz() async {
+          int a = /*info:DynamicCast*/await x;
+          int b = await y;
+          int c = await z;
+          String d = /*severe:StaticTypeError*/await z;
+        }
+
+        Future<bool> get issue_264 async {
+          await 42;
+          if (new Random().nextBool()) {
+            return true;
+          } else {
+            return /*severe:StaticTypeError*/new Future<bool>.value(false);
+          }
+        }
+    '''
+    });
+
+    testChecker('async*', {
+      '/main.dart': '''
+        import 'dart:async';
+
+        dynamic x;
+
+        bar1() async* { yield x; }
+        Stream bar2() async* { yield x; }
+        Stream<int> bar3() async* { yield (/*info:DynamicCast*/x); }
+        Stream<int> bar4() async* { yield (/*severe:StaticTypeError*/new Stream<int>()); }
+
+        baz1() async* { yield* (/*info:DynamicCast*/x); }
+        Stream baz2() async* { yield* (/*info:DynamicCast*/x); }
+        Stream<int> baz3() async* { yield* (/*warning:DownCastComposite*/x); }
+        Stream<int> baz4() async* { yield* new Stream<int>(); }
+        Stream<int> baz5() async* { yield* (/*info:InferredTypeAllocation*/new Stream()); }
+    '''
+    });
+
+    testChecker('sync*', {
+      '/main.dart': '''
+        import 'dart:async';
+
+        dynamic x;
+
+        bar1() sync* { yield x; }
+        Iterable bar2() sync* { yield x; }
+        Iterable<int> bar3() sync* { yield (/*info:DynamicCast*/x); }
+        Iterable<int> bar4() sync* { yield (/*severe:StaticTypeError*/new Iterable<int>()); }
+
+        baz1() sync* { yield* (/*info:DynamicCast*/x); }
+        Iterable baz2() sync* { yield* (/*info:DynamicCast*/x); }
+        Iterable<int> baz3() sync* { yield* (/*warning:DownCastComposite*/x); }
+        Iterable<int> baz4() sync* { yield* new Iterable<int>(); }
+        Iterable<int> baz5() sync* { yield* (/*info:InferredTypeAllocation*/new Iterable()); }
+    '''
+    });
+  });
+}
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
new file mode 100644
index 0000000..51d4a1d
--- /dev/null
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -0,0 +1,1293 @@
+// 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.
+
+// TODO(jmesserly): this file needs to be refactored, it's a port from
+// package:dev_compiler's tests
+/// Tests for type inference.
+library test.src.task.strong.inferred_type_test;
+
+import 'package:unittest/unittest.dart';
+
+import 'strong_test_helper.dart';
+
+void main() {
+  // Error also expected when declared type is `int`.
+  testChecker('infer type on var', {
+    '/main.dart': '''
+      test1() {
+        int x = 3;
+        x = /*severe:StaticTypeError*/"hi";
+      }
+    '''
+  });
+
+  // If inferred type is `int`, error is also reported
+  testChecker('infer type on var 2', {
+    '/main.dart': '''
+      test2() {
+        var x = 3;
+        x = /*severe:StaticTypeError*/"hi";
+      }
+    '''
+  });
+
+  testChecker('No error when declared type is `num` and assigned null.', {
+    '/main.dart': '''
+        test1() {
+          num x = 3;
+          x = null;
+        }
+      '''
+  });
+
+  testChecker('do not infer type on dynamic', {
+    '/main.dart': '''
+      test() {
+        dynamic x = 3;
+        x = "hi";
+      }
+    '''
+  });
+
+  testChecker('do not infer type when initializer is null', {
+    '/main.dart': '''
+      test() {
+        var x = null;
+        x = "hi";
+        x = 3;
+      }
+    '''
+  });
+
+  testChecker('infer type on var from field', {
+    '/main.dart': '''
+      class A {
+        int x = 0;
+
+        test1() {
+          var a = x;
+          a = /*severe:StaticTypeError*/"hi";
+          a = 3;
+          var b = y;
+          b = /*severe:StaticTypeError*/"hi";
+          b = 4;
+          var c = z;
+          c = /*severe:StaticTypeError*/"hi";
+          c = 4;
+        }
+
+        int y; // field def after use
+        final z = 42; // should infer `int`
+      }
+    '''
+  });
+
+  testChecker('infer type on var from top-level', {
+    '/main.dart': '''
+      int x = 0;
+
+      test1() {
+        var a = x;
+        a = /*severe:StaticTypeError*/"hi";
+        a = 3;
+        var b = y;
+        b = /*severe:StaticTypeError*/"hi";
+        b = 4;
+        var c = z;
+        c = /*severe:StaticTypeError*/"hi";
+        c = 4;
+      }
+
+      int y = 0; // field def after use
+      final z = 42; // should infer `int`
+    '''
+  });
+
+  testChecker('do not infer field type when initializer is null', {
+    '/main.dart': '''
+      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:StaticTypeError*/"hi";
+        A.x = "hi";
+        A.y = /*severe:StaticTypeError*/"hi";
+        new A().x2 = "hi";
+        new A().y2 = /*severe:StaticTypeError*/"hi";
+      }
+    '''
+  });
+
+  testChecker('infer from variables in non-cycle imports with flag', {
+    '/a.dart': '''
+          var x = 2;
+      ''',
+    '/main.dart': '''
+          import 'a.dart';
+          var y = x;
+
+          test1() {
+            x = /*severe:StaticTypeError*/"hi";
+            y = /*severe:StaticTypeError*/"hi";
+          }
+    '''
+  });
+
+  testChecker('infer from variables in non-cycle imports with flag 2', {
+    '/a.dart': '''
+          class A { static var x = 2; }
+      ''',
+    '/main.dart': '''
+          import 'a.dart';
+          class B { static var y = A.x; }
+
+          test1() {
+            A.x = /*severe:StaticTypeError*/"hi";
+            B.y = /*severe:StaticTypeError*/"hi";
+          }
+    '''
+  });
+
+  testChecker('infer from variables in cycle libs when flag is on', {
+    '/a.dart': '''
+          import 'main.dart';
+          var x = 2; // ok to infer
+      ''',
+    '/main.dart': '''
+          import 'a.dart';
+          var y = x; // now ok :)
+
+          test1() {
+            int t = 3;
+            t = x;
+            t = y;
+          }
+    '''
+  });
+
+  testChecker('infer from variables in cycle libs when flag is on 2', {
+    '/a.dart': '''
+          import 'main.dart';
+          class A { static var x = 2; }
+      ''',
+    '/main.dart': '''
+          import 'a.dart';
+          class B { static var y = A.x; }
+
+          test1() {
+            int t = 3;
+            t = A.x;
+            t = B.y;
+          }
+    '''
+  });
+
+  testChecker('can infer also from static and instance fields (flag on)', {
+    '/a.dart': '''
+          import 'b.dart';
+          class A {
+            static final a1 = B.b1;
+            final a2 = new B().b2;
+          }
+      ''',
+    '/b.dart': '''
+          class B {
+            static final b1 = 1;
+            final b2 = 1;
+          }
+      ''',
+    '/main.dart': '''
+          import "a.dart";
+
+          test1() {
+            int x = 0;
+            // inference in A now works.
+            x = A.a1;
+            x = new A().a2;
+          }
+    '''
+  });
+
+  testChecker('inference in cycles is deterministic', {
+    '/a.dart': '''
+          import 'b.dart';
+          class A {
+            static final a1 = B.b1;
+            final a2 = new B().b2;
+          }
+      ''',
+    '/b.dart': '''
+          class B {
+            static final b1 = 1;
+            final b2 = 1;
+          }
+      ''',
+    '/c.dart': '''
+          import "main.dart"; // creates a cycle
+
+          class C {
+            static final c1 = 1;
+            final c2 = 1;
+          }
+      ''',
+    '/e.dart': '''
+          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;
+          }
+      ''',
+    '/f.dart': '''
+          part 'f2.dart';
+      ''',
+    '/e2.dart': '''
+          class F {
+            static final f1 = 1;
+            final f2 = 1;
+          }
+      ''',
+    '/main.dart': '''
+          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:DynamicCast*/new D().d4;
+
+
+            // Similarly if the library contains parts.
+            x = E.e1;
+            x = E.e2;
+            x = E.e3;
+            x = new E().e4;
+            x = /*info:DynamicCast*/new E().e5;
+            x = new E().e6;
+            x = F.f1;
+            x = new F().f2;
+          }
+    '''
+  });
+
+  testChecker(
+      'infer from complex expressions if the outer-most value is precise', {
+    '/main.dart': '''
+        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(x);       // allocations
+        var c1 = [x];           // list literals
+        var c2 = const [];
+        var d = {'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 = - new A();
+        var j = null as B;
+
+        test1() {
+          a = /*severe:StaticTypeError*/"hi";
+          a = new B(3);
+          b = /*severe:StaticTypeError*/"hi";
+          b = new B(3);
+          c1 = [];
+          c1 = /*severe:StaticTypeError*/{};
+          c2 = [];
+          c2 = /*severe:StaticTypeError*/{};
+          d = {};
+          d = /*severe:StaticTypeError*/3;
+          e = new A();
+          e = /*severe:StaticTypeError*/{};
+          f = 3;
+          f = /*severe:StaticTypeError*/false;
+          g = 1;
+          g = /*severe:StaticTypeError*/false;
+          h = /*severe:StaticTypeError*/false;
+          h = new B();
+          i = false;
+          j = new B();
+          j = /*severe:StaticTypeError*/false;
+          j = /*severe:StaticTypeError*/[];
+        }
+    '''
+  });
+
+  // but flags can enable this behavior.
+  testChecker('infer if complex expressions read possibly inferred field', {
+    '/a.dart': '''
+        class A {
+          var x = 3;
+        }
+      ''',
+    '/main.dart': '''
+        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:DynamicCast*/t4;
+          i = new B().y; // B.y was inferred though
+        }
+    '''
+  });
+
+  group('infer types on loop indices', () {
+    testChecker('foreach loop', {
+      '/main.dart': '''
+      class Foo {
+        int bar = 42;
+      }
+
+      test() {
+        var list = <Foo>[];
+        for (var x in list) {
+          String y = /*severe:StaticTypeError*/x;
+        }
+
+        for (dynamic x in list) {
+          String y = /*info:DynamicCast*/x;
+        }
+
+        for (String x in /*severe:StaticTypeError*/list) {
+          String y = x;
+        }
+
+        var z;
+        for(z in list) {
+          String y = /*info:DynamicCast*/z;
+        }
+
+        Iterable iter = list;
+        for (Foo x in /*warning:DownCastComposite*/iter) {
+          var y = x;
+        }
+
+        dynamic iter2 = list;
+        for (Foo x in /*warning:DownCastComposite*/iter2) {
+          var y = x;
+        }
+
+        var map = <String, Foo>{};
+        // Error: map must be an Iterable.
+        for (var x in /*severe:StaticTypeError*/map) {
+          String y = /*info:DynamicCast*/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;
+        }
+      }
+      '''
+    });
+
+    testChecker('for loop, with inference', {
+      '/main.dart': '''
+      test() {
+        for (var i = 0; i < 10; i++) {
+          int j = i + 1;
+        }
+      }
+      '''
+    });
+  });
+
+  testChecker('propagate inference to field in class', {
+    '/main.dart': '''
+      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
+      }
+    '''
+  });
+
+  testChecker('propagate inference to field in class dynamic warnings', {
+    '/main.dart': '''
+      class A {
+        int x = 2;
+      }
+
+      test() {
+        dynamic a = new A();
+        A b = /*info:DynamicCast*/a;
+        print(/*info:DynamicInvoke*/a.x);
+        print(/*info:DynamicInvoke*/(/*info:DynamicInvoke*/a.x) + 2);
+      }
+    '''
+  });
+
+  testChecker('propagate inference transitively', {
+    '/main.dart': '''
+      class A {
+        int x = 2;
+      }
+
+      test5() {
+        var a1 = new A();
+        a1.x = /*severe:StaticTypeError*/"hi";
+
+        A a2 = new A();
+        a2.x = /*severe:StaticTypeError*/"hi";
+      }
+    '''
+  });
+
+  testChecker('propagate inference transitively 2', {
+    '/main.dart': '''
+      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', () {
+    testChecker('2', {
+      '/main.dart': '''
+        class A {
+          int x = 2;
+        }
+
+        class B extends A {
+          get x => 3;
+        }
+
+        foo() {
+          String y = /*severe:StaticTypeError*/new B().x;
+          int z = new B().x;
+        }
+    '''
+    });
+
+    testChecker('4', {
+      '/main.dart': '''
+        class A {
+          int x = 2;
+        }
+
+        class B implements A {
+          get x => 3;
+        }
+
+        foo() {
+          String y = /*severe:StaticTypeError*/new B().x;
+          int z = new B().x;
+        }
+    '''
+    });
+  });
+
+  group('infer types on generic instantiations', () {
+    testChecker('infer', {
+      '/main.dart': '''
+        class A<T> {
+          T x;
+        }
+
+        class B implements A<int> {
+          /*severe:InvalidMethodOverride*/dynamic get x => 3;
+        }
+
+        foo() {
+          String y = /*info:DynamicCast*/new B().x;
+          int z = /*info:DynamicCast*/new B().x;
+        }
+    '''
+    });
+
+    testChecker('3', {
+      '/main.dart': '''
+        class A<T> {
+          T x;
+          T w;
+        }
+
+        class B implements A<int> {
+          get x => 3;
+          get w => /*severe:StaticTypeError*/"hello";
+        }
+
+        foo() {
+          String y = /*severe:StaticTypeError*/new B().x;
+          int z = new B().x;
+        }
+    '''
+    });
+
+    testChecker('4', {
+      '/main.dart': '''
+        class A<T> {
+          T x;
+        }
+
+        class B<E> extends A<E> {
+          E y;
+          get x => y;
+        }
+
+        foo() {
+          int y = /*severe:StaticTypeError*/new B<String>().x;
+          String z = new B<String>().x;
+        }
+    '''
+    });
+
+    testChecker('5', {
+      '/main.dart': '''
+        abstract class I<E> {
+          String m(a, String f(v, T e));
+        }
+
+        abstract class A<E> implements I<E> {
+          const A();
+          String m(a, String f(v, T e));
+        }
+
+        abstract class M {
+          int y;
+        }
+
+        class B<E> extends A<E> implements M {
+          const B();
+          int get y => 0;
+
+          m(a, f(v, T e)) {}
+        }
+
+        foo () {
+          int y = /*severe:StaticTypeError*/new B().m(null, null);
+          String z = new B().m(null, null);
+        }
+    '''
+    });
+  });
+
+  testChecker('infer type regardless of declaration order or cycles', {
+    '/b.dart': '''
+        import 'main.dart';
+
+        class B extends A { }
+      ''',
+    '/main.dart': '''
+        import 'b.dart';
+        class C extends B {
+          get x;
+        }
+        class A {
+          int get x;
+        }
+        foo () {
+          int y = new C().x;
+          String y = /*severe:StaticTypeError*/new C().x;
+        }
+    '''
+  });
+
+  // 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.
+  testChecker('infer types on generic instantiations in library cycle', {
+    '/a.dart': '''
+          import 'main.dart';
+        abstract class I<E> {
+          A<E> m(a, String f(v, int e));
+        }
+      ''',
+    '/main.dart': '''
+          import 'a.dart';
+
+        abstract class A<E> implements I<E> {
+          const A();
+
+          E value;
+        }
+
+        abstract class M {
+          int y;
+        }
+
+        class B<E> extends A<E> implements M {
+          const B();
+          int get y => 0;
+
+          m(a, f(v, int e)) {}
+        }
+
+        foo () {
+          int y = /*severe:StaticTypeError*/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', () {
+    testChecker('infer', {
+      '/main.dart': '''
+          class A {
+            int x = 2;
+          }
+
+          class B implements A {
+            /*severe:InvalidMethodOverride*/dynamic get x => 3;
+          }
+
+          foo() {
+            String y = /*info:DynamicCast*/new B().x;
+            int z = /*info:DynamicCast*/new B().x;
+          }
+      '''
+    });
+  });
+
+  testChecker('conflicts can happen', {
+    '/main.dart': '''
+        class I1 {
+          int x;
+        }
+        class I2 extends I1 {
+          int y;
+        }
+
+        class A {
+          final I1 a;
+        }
+
+        class B {
+          final I2 a;
+        }
+
+        class C1 extends A implements B {
+          /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/get a => null;
+        }
+
+        // Still ambiguous
+        class C2 extends B implements A {
+          /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/get a => null;
+        }
+    '''
+  });
+
+  testChecker('conflicts can happen 2', {
+    '/main.dart': '''
+        class I1 {
+          int x;
+        }
+        class I2 {
+          int y;
+        }
+
+        class I3 implements I1, I2 {
+          int x;
+          int y;
+        }
+
+        class A {
+          final I1 a;
+        }
+
+        class B {
+          final I2 a;
+        }
+
+        class C1 extends A implements B {
+          I3 get a => null;
+        }
+
+        class C2 extends A implements B {
+          /*severe:InvalidMethodOverride,severe:InvalidMethodOverride*/get a => null;
+        }
+    '''
+  });
+
+  testChecker(
+      'infer from RHS only if it wont conflict with overridden fields', {
+    '/main.dart': '''
+        class A {
+          var x;
+        }
+
+        class B extends A {
+          var x = 2;
+        }
+
+        foo() {
+          String y = /*info:DynamicCast*/new B().x;
+          int z = /*info:DynamicCast*/new B().x;
+        }
+    '''
+  });
+
+  testChecker(
+      'infer from RHS only if it wont conflict with overridden fields 2', {
+    '/main.dart': '''
+        class A {
+          final x;
+        }
+
+        class B extends A {
+          final x = 2;
+        }
+
+        foo() {
+          String y = /*severe:StaticTypeError*/new B().x;
+          int z = new B().x;
+        }
+    '''
+  });
+
+  testChecker('infer correctly on multiple variables declared together', {
+    '/main.dart': '''
+        class A {
+          var x, y = 2, z = "hi";
+        }
+
+        class B extends A {
+          var x = 2, y = 3, z, w = 2;
+        }
+
+        foo() {
+          String s;
+          int i;
+
+          s = /*info:DynamicCast*/new B().x;
+          s = /*severe:StaticTypeError*/new B().y;
+          s = new B().z;
+          s = /*severe:StaticTypeError*/new B().w;
+
+          i = /*info:DynamicCast*/new B().x;
+          i = new B().y;
+          i = /*severe:StaticTypeError*/new B().z;
+          i = new B().w;
+        }
+    '''
+  });
+
+  testChecker('infer consts transitively', {
+    '/b.dart': '''
+        const b1 = 2;
+      ''',
+    '/a.dart': '''
+        import 'main.dart';
+        import 'b.dart';
+        const a1 = m2;
+        const a2 = b1;
+      ''',
+    '/main.dart': '''
+        import 'a.dart';
+        const m1 = a1;
+        const m2 = a2;
+
+        foo() {
+          int i;
+          i = m1;
+        }
+    '''
+  });
+
+  testChecker('infer statics transitively', {
+    '/b.dart': '''
+        final b1 = 2;
+      ''',
+    '/a.dart': '''
+        import 'main.dart';
+        import 'b.dart';
+        final a1 = m2;
+        class A {
+          static final a2 = b1;
+        }
+      ''',
+    '/main.dart': '''
+        import 'a.dart';
+        final m1 = a1;
+        final m2 = A.a2;
+
+        foo() {
+          int i;
+          i = m1;
+        }
+    '''
+  });
+
+  testChecker('infer statics transitively 2', {
+    '/main.dart': '''
+        const x1 = 1;
+        final x2 = 1;
+        final y1 = x1;
+        final y2 = x2;
+
+        foo() {
+          int i;
+          i = y1;
+          i = y2;
+        }
+    '''
+  });
+
+  testChecker('infer statics transitively 3', {
+    '/a.dart': '''
+        const a1 = 3;
+        const a2 = 4;
+        class A {
+          a3;
+        }
+      ''',
+    '/main.dart': '''
+        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;
+        }
+    '''
+  });
+
+  testChecker('infer statics with method invocations', {
+    '/a.dart': '''
+        m3(String a, String b, [a1,a2]) {}
+      ''',
+    '/main.dart': '''
+        import 'a.dart';
+        class T {
+          static final T foo = m1(m2(m3('', '')));
+          static T m1(String m) { return null; }
+          static String m2(e) { return ''; }
+        }
+
+
+    '''
+  });
+
+  testChecker('downwards inference: miscellaneous', {
+    '/main.dart': '''
+      typedef (T x);
+      class A<T> {
+        Function2<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:InferredTypeLiteral*/[{y: x}]);
+          }
+          {
+            int f(int x) {};
+            A<int> a = /*info:InferredTypeAllocation*/new A(f);
+          }
+      }
+      '''
+  });
+
+  group('downwards inference on instance creations', () {
+    String info = 'info:InferredTypeAllocation';
+    String code = '''
+      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*/new A(3, "hello");
+          A<int, String> a1 = /*$info*/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:StaticTypeError*/new A<int, dynamic>(3, "hello");
+          A<int, String> a5 = /*severe:StaticTypeError*/new A<dynamic, dynamic>.named(3, "hello");
+        }
+        {
+          A<int, String> a0 = /*severe:StaticTypeError*/new A("hello", 3);
+          A<int, String> a1 = /*severe:StaticTypeError*/new A.named("hello", 3);
+        }
+        {
+          A<int, String> a0 = /*$info*/new B("hello", 3);
+          A<int, String> a1 = /*$info*/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:StaticTypeError*/new B<String, dynamic>("hello", 3);
+          A<int, String> a5 = /*severe:StaticTypeError*/new B<dynamic, dynamic>.named("hello", 3);
+        }
+        {
+          A<int, String> a0 = /*severe:StaticTypeError*/new B(3, "hello");
+          A<int, String> a1 = /*severe:StaticTypeError*/new B.named(3, "hello");
+        }
+        {
+          A<int, int> a0 = /*$info*/new C(3);
+          A<int, int> a1 = /*$info*/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:StaticTypeError*/new C<dynamic>(3);
+          A<int, int> a5 = /*severe:StaticTypeError*/new C<dynamic>.named(3);
+        }
+        {
+          A<int, int> a0 = /*severe:StaticTypeError*/new C("hello");
+          A<int, int> a1 = /*severe:StaticTypeError*/new C.named("hello");
+        }
+        {
+          A<int, String> a0 = /*$info*/new D("hello");
+          A<int, String> a1 = /*$info*/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:StaticTypeError*/new D<num, dynamic>("hello");
+          A<int, String> a5 = /*severe:StaticTypeError*/new D<dynamic, dynamic>.named("hello");
+        }
+        {
+          A<int, String> a0 = /*severe:StaticTypeError*/new D(3);
+          A<int, String> a1 = /*severe:StaticTypeError*/new D.named(3);
+        }
+        { // Currently we only allow variable constraints.  Test that we reject.
+          A<C<int>, String> a0 = /*severe:StaticTypeError*/new E("hello");
+        }
+        { // Check named and optional arguments
+          A<int, String> a0 = /*$info*/new F(3, "hello", a: [3], b: ["hello"]);
+          A<int, String> a1 = /*severe:StaticTypeError*/new F(3, "hello", a: ["hello"], b:[3]);
+          A<int, String> a2 = /*$info*/new F.named(3, "hello", 3, "hello");
+          A<int, String> a3 = /*$info*/new F.named(3, "hello");
+          A<int, String> a4 = /*severe:StaticTypeError*/new F.named(3, "hello", "hello", 3);
+          A<int, String> a5 = /*severe:StaticTypeError*/new F.named(3, "hello", "hello");
+        }
+      }
+        ''';
+    testChecker('infer downwards', {'/main.dart': code});
+  });
+
+  group('downwards inference on list literals', () {
+    String info = "info:InferredTypeLiteral";
+    String code = '''
+      void foo([List<String> list1 = /*$info*/const [],
+                List<String> list2 = /*severe:StaticTypeError*/const [42]]) {
+      }
+
+      void main() {
+        {
+          List<int> l0 = /*$info*/[];
+          List<int> l1 = /*$info*/[3];
+          List<int> l2 = /*severe:StaticTypeError*/["hello"];
+          List<int> l3 = /*severe:StaticTypeError*/["hello", 3];
+        }
+        {
+          List<dynamic> l0 = [];
+          List<dynamic> l1 = [3];
+          List<dynamic> l2 = ["hello"];
+          List<dynamic> l3 = ["hello", 3];
+        }
+        {
+          List<int> l0 = /*severe:StaticTypeError*/<num>[];
+          List<int> l1 = /*severe:StaticTypeError*/<num>[3];
+          List<int> l2 = /*severe:StaticTypeError*/<num>[/*severe:StaticTypeError*/"hello"];
+          List<int> l3 = /*severe:StaticTypeError*/<num>[/*severe:StaticTypeError*/"hello", 3];
+        }
+        {
+          Iterable<int> i0 = /*$info*/[];
+          Iterable<int> i1 = /*$info*/[3];
+          Iterable<int> i2 = /*severe:StaticTypeError*/["hello"];
+          Iterable<int> i3 = /*severe:StaticTypeError*/["hello", 3];
+        }
+        {
+          const List<int> c0 = /*$info*/const [];
+          const List<int> c1 = /*$info*/const [3];
+          const List<int> c2 = /*severe:StaticTypeError*/const ["hello"];
+          const List<int> c3 = /*severe:StaticTypeError*/const ["hello", 3];
+        }
+      }
+      ''';
+    testChecker('infer downwards', {'/main.dart': code});
+  });
+
+  group('downwards inference on function arguments', () {
+    String info = "info:InferredTypeLiteral";
+    String code = '''
+      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*/[]);
+        f0(/*$info*/[3]);
+        f0(/*severe:StaticTypeError*/["hello"]);
+        f0(/*severe:StaticTypeError*/["hello", 3]);
+
+        f1(a: /*$info*/[]);
+        f1(a: /*$info*/[3]);
+        f1(a: /*severe:StaticTypeError*/["hello"]);
+        f1(a: /*severe:StaticTypeError*/["hello", 3]);
+
+        f2(/*$info*/[]);
+        f2(/*$info*/[3]);
+        f2(/*severe:StaticTypeError*/["hello"]);
+        f2(/*severe:StaticTypeError*/["hello", 3]);
+
+        f3(/*$info*/[]);
+        f3(/*$info*/[[3]]);
+        f3(/*severe:StaticTypeError*/[["hello"]]);
+        f3(/*severe:StaticTypeError*/[["hello"], [3]]);
+
+        f4(a: /*$info*/[]);
+        f4(a: /*$info*/[[3]]);
+        f4(a: /*severe:StaticTypeError*/[["hello"]]);
+        f4(a: /*severe:StaticTypeError*/[["hello"], [3]]);
+      }
+      ''';
+    testChecker('infer downwards', {'/main.dart': code});
+  });
+
+  group('downwards inference on map literals', () {
+    String info = "info:InferredTypeLiteral";
+    String code = '''
+      void foo([Map<int, String> m1 = /*$info*/const {1: "hello"},
+                Map<int, String> m1 = /*severe:StaticTypeError*/const {"hello": "world"}]) {
+      }
+      void main() {
+        {
+          Map<int, String> l0 = /*$info*/{};
+          Map<int, String> l1 = /*$info*/{3: "hello"};
+          Map<int, String> l2 = /*severe:StaticTypeError*/{"hello": "hello"};
+          Map<int, String> l3 = /*severe:StaticTypeError*/{3: 3};
+          Map<int, String> l4 = /*severe:StaticTypeError*/{3:"hello", "hello": 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*/{};
+          Map<dynamic, String> l1 = /*$info*/{3: "hello"};
+          Map<dynamic, String> l2 = /*$info*/{"hello": "hello"};
+          Map<dynamic, String> l3 = /*severe:StaticTypeError*/{3: 3};
+          Map<dynamic, String> l4 = /*severe:StaticTypeError*/{3:"hello", "hello": 3};
+        }
+        {
+          Map<int, dynamic> l0 = /*$info*/{};
+          Map<int, dynamic> l1 = /*$info*/{3: "hello"};
+          Map<int, dynamic> l2 = /*severe:StaticTypeError*/{"hello": "hello"};
+          Map<int, dynamic> l3 = /*$info*/{3: 3};
+          Map<int, dynamic> l3 = /*severe:StaticTypeError*/{3:"hello", "hello": 3};
+        }
+        {
+          Map<int, String> l0 = /*severe:StaticTypeError*/<num, dynamic>{};
+          Map<int, String> l1 = /*severe:StaticTypeError*/<num, dynamic>{3: "hello"};
+          Map<int, String> l3 = /*severe:StaticTypeError*/<num, dynamic>{3: 3};
+        }
+        {
+          const Map<int, String> l0 = /*$info*/const {};
+          const Map<int, String> l1 = /*$info*/const {3: "hello"};
+          const Map<int, String> l2 = /*severe:StaticTypeError*/const {"hello": "hello"};
+          const Map<int, String> l3 = /*severe:StaticTypeError*/const {3: 3};
+          const Map<int, String> l4 = /*severe:StaticTypeError*/const {3:"hello", "hello": 3};
+        }
+      }
+      ''';
+    testChecker('infer downwards', {'/main.dart': code});
+  });
+
+  testChecker('downwards inference on function expressions', {
+    '/main.dart': '''
+      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 = /*severe:StaticTypeError*/(String x) => "hello";
+          Function2<int, String> l3 = /*severe:StaticTypeError*/(int x) => 3;
+          Function2<int, String> l4 = /*warning:UninferredClosure should be severe:StaticTypeError*/(int x) {return 3};
+        }
+        {
+          Function2<int, String> l0 = /*info:InferredTypeClosure*/(x) => null;
+          Function2<int, String> l1 = /*info:InferredTypeClosure*/(x) => "hello";
+          Function2<int, String> l2 = /*severe:StaticTypeError*/(x) => 3;
+          Function2<int, String> l3 = /*warning:UninferredClosure should be severe:StaticTypeError*/(x) {return 3};
+        }
+        {
+          Function2<int, List<String>> l0 = (int x) => null;
+          Function2<int, List<String>> l1 = /*info:InferredTypeClosure*/(int x) => ["hello"];
+          Function2<int, List<String>> l2 = /*severe:StaticTypeError*/(String x) => ["hello"];
+          Function2<int, List<String>> l3 = /*warning:UninferredClosure should be severe:StaticTypeError*/(int x) => [3];
+          Function2<int, List<String>> l4 = /*warning:UninferredClosure should be severe:StaticTypeError*/(int x) {return [3]};
+        }
+        {
+          Function2<int, int> l0 = /*info:InferredTypeClosure*/(x) => x;
+          Function2<int, int> l1 = /*info:InferredTypeClosure*/(x) => /*info:DynamicInvoke should be pass*/x+1;
+          Function2<int, String> l2 = /*info:InferredTypeClosure should be severe:StaticTypeError*/(x) => x;
+          Function2<int, String> l3 = /*info:InferredTypeClosure should be severe:StaticTypeError*/(x) => /*info:DynamicInvoke should be pass*/x.substring(3);
+          Function2<String, String> l4 = /*info:InferredTypeClosure*/(x) => /*info:DynamicInvoke should be pass*/x.substring(3);
+        }
+      }
+      '''
+  });
+
+  testChecker('inferred initializing formal checks default value', {
+    '/main.dart': '''
+      class Foo {
+        var x = 1;
+        Foo([this.x = /*severe:StaticTypeError*/"1"]);
+      }'''
+  });
+
+  group('quasi-generics', () {
+    testChecker('dart:math min/max', {
+      '/main.dart': '''
+        import 'dart:math';
+
+        void printInt(int x) => print(x);
+        void printDouble(double x) => print(x);
+
+        num myMax(num x, num y) => max(x, y);
+
+        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));
+
+          // No help for user-defined functions from num->num->num.
+          printInt(/*info:DownCastImplicit*/myMax(1, 2));
+          printInt(myMax(1, 2) as int);
+
+          // Mixing int and double means return type is num.
+          printInt(/*info:DownCastImplicit*/max(1, 2.0));
+          printInt(/*info:DownCastImplicit*/min(1, 2.0));
+          printDouble(/*info:DownCastImplicit*/max(1, 2.0));
+          printDouble(/*info:DownCastImplicit*/min(1, 2.0));
+
+          // Types other than int and double are not accepted.
+          printInt(
+              /*info:DownCastImplicit*/min(
+                  /*severe:StaticTypeError*/"hi",
+                  /*severe:StaticTypeError*/"there"));
+        }
+    '''
+    });
+
+    testChecker('Iterable and Future', {
+      '/main.dart': '''
+        import 'dart:async';
+
+        Future<int> make(int x) => (/*info:InferredTypeAllocation*/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('', (String x, int y) => x + y.toString()));
+        }
+    '''
+    });
+  });
+}
diff --git a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
new file mode 100644
index 0000000..330801f
--- /dev/null
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -0,0 +1,500 @@
+// 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.
+
+// TODO(jmesserly): this file needs to be refactored, it's a port from
+// package:dev_compiler's tests
+library test.src.task.strong.strong_test_helper;
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/context/context.dart' show SdkAnalysisContext;
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/engine.dart' hide SdkAnalysisContext;
+import 'package:analyzer/src/generated/error.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/task/strong/checker.dart';
+import 'package:analyzer/src/task/strong/rules.dart';
+import 'package:logging/logging.dart'; // TODO(jmesserly): remove
+import 'package:source_span/source_span.dart'; // TODO(jmesserly): remove
+import 'package:unittest/unittest.dart';
+
+/// Run the checker on a program with files contents as indicated in
+/// [testFiles].
+///
+/// This function makes several assumptions to make it easier to describe error
+/// expectations:
+///
+///   * a file named `/main.dart` exists in [testFiles].
+///   * 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 warning about a boxing
+/// conversion, you can describe the test as follows:
+///
+///     testChecker({
+///       '/main.dart': '''
+///           testMethod() {
+///             dynamic x = /*warning:Box*/3;
+///           }
+///       '''
+///     });
+///
+void testChecker(String name, Map<String, String> testFiles) {
+  test(name, () {
+    expect(testFiles.containsKey('/main.dart'), isTrue,
+        reason: '`/main.dart` is missing in testFiles');
+
+    var provider = new MemoryResourceProvider();
+    testFiles.forEach((key, value) {
+      var scheme = 'package:';
+      if (key.startsWith(scheme)) {
+        key = '/packages/${key.substring(scheme.length)}';
+      }
+      provider.newFile(key, value);
+    });
+    var uriResolver = new TestUriResolver(provider);
+    // Enable task model strong mode
+    AnalysisEngine.instance.useTaskModel = true;
+    var context = AnalysisEngine.instance.createAnalysisContext();
+    context.analysisOptions.strongMode = true;
+
+    context.sourceFactory = new SourceFactory([
+      new MockDartSdk(mockSdkSources, reportMissing: true).resolver,
+      uriResolver
+    ]);
+
+    // Run the checker on /main.dart.
+    Source mainSource = uriResolver.resolveAbsolute(new Uri.file('/main.dart'));
+    var initialLibrary =
+        context.resolveCompilationUnit2(mainSource, mainSource);
+
+    var collector = new _ErrorCollector();
+    var checker = new CodeChecker(
+        new TypeRules(context.typeProvider), collector,
+        hints: true);
+
+    // Extract expectations from the comments in the test files, and
+    // check that all errors we emit are included in the expected map.
+    var allLibraries = reachableLibraries(initialLibrary.element.library);
+    for (var lib in allLibraries) {
+      for (var unit in lib.units) {
+        var errors = <AnalysisError>[];
+        collector.errors = errors;
+
+        var source = unit.source;
+        if (source.uri.scheme == 'dart') continue;
+
+        var librarySource = context.getLibrariesContaining(source).single;
+        var resolved = context.resolveCompilationUnit2(source, librarySource);
+        checker.visitCompilationUnit(resolved);
+
+        new _ExpectedErrorVisitor(errors).validate(resolved);
+      }
+    }
+  });
+}
+
+class _ErrorCollector implements AnalysisErrorListener {
+  List<AnalysisError> errors;
+  final bool hints;
+  _ErrorCollector({this.hints: true});
+
+  void onError(AnalysisError error) {
+    // Unless DDC hints are requested, filter them out.
+    var HINT = ErrorSeverity.INFO.ordinal;
+    if (hints || error.errorCode.errorSeverity.ordinal > HINT) {
+      errors.add(error);
+    }
+  }
+}
+
+class TestUriResolver extends ResourceUriResolver {
+  final MemoryResourceProvider provider;
+  TestUriResolver(provider)
+      : provider = provider,
+        super(provider);
+
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
+    if (uri.scheme == 'package') {
+      return (provider.getResource('/packages/' + uri.path) as File)
+          .createSource(uri);
+    }
+    return super.resolveAbsolute(uri, actualUri);
+  }
+}
+
+class _ExpectedErrorVisitor extends UnifyingAstVisitor {
+  final Set<AnalysisError> _actualErrors;
+  CompilationUnit _unit;
+  String _unitSourceCode;
+
+  _ExpectedErrorVisitor(List<AnalysisError> actualErrors)
+      : _actualErrors = new Set.from(actualErrors);
+
+  validate(CompilationUnit unit) {
+    _unit = unit;
+    // This reads the file. Only safe because tests use MemoryFileSystem.
+    _unitSourceCode = unit.element.source.contents.data;
+
+    // Visit the compilation unit.
+    unit.accept(this);
+
+    if (_actualErrors.isNotEmpty) {
+      var actualMsgs = _actualErrors.map(_formatActualError).join('\n');
+      fail('Unexpected errors reported by checker:\n\n$actualMsgs');
+    }
+  }
+
+  visitNode(AstNode node) {
+    var token = node.beginToken;
+    var comment = token.precedingComments;
+    // Use error marker found in an immediately preceding comment,
+    // and attach it to the outermost expression that starts at that token.
+    if (comment != null) {
+      while (comment.next != null) {
+        comment = comment.next;
+      }
+      if (comment.end == token.offset && node.parent.beginToken != token) {
+        var commentText = '$comment';
+        var start = commentText.lastIndexOf('/*');
+        var end = commentText.lastIndexOf('*/');
+        if (start != -1 && end != -1) {
+          expect(start, lessThan(end));
+          var errors = commentText.substring(start + 2, end).split(',');
+          var expectations =
+              errors.map(_ErrorExpectation.parse).where((x) => x != null);
+
+          for (var e in expectations) _expectError(node, e);
+        }
+      }
+    }
+    return super.visitNode(node);
+  }
+
+  void _expectError(AstNode node, _ErrorExpectation expected) {
+    // See if we can find the expected error in our actual errors
+    for (var actual in _actualErrors) {
+      if (actual.offset == node.offset && actual.length == node.length) {
+        var actualMsg = _formatActualError(actual);
+        expect(_actualErrorLevel(actual), expected.level,
+            reason: 'expected different error code at:\n\n$actualMsg');
+        expect(errorCodeName(actual.errorCode), expected.typeName,
+            reason: 'expected different error type at:\n\n$actualMsg');
+
+        // We found it. Stop the search.
+        _actualErrors.remove(actual);
+        return;
+      }
+    }
+
+    var span = _createSpan(node.offset, node.length);
+    var levelName = expected.level.name.toLowerCase();
+    var msg = span.message(expected.typeName, color: colorOf(levelName));
+    fail('expected error was not reported at:\n\n$levelName: $msg');
+  }
+
+  Level _actualErrorLevel(AnalysisError actual) {
+    return const <ErrorSeverity, Level>{
+      ErrorSeverity.ERROR: Level.SEVERE,
+      ErrorSeverity.WARNING: Level.WARNING,
+      ErrorSeverity.INFO: Level.INFO
+    }[actual.errorCode.errorSeverity];
+  }
+
+  String _formatActualError(AnalysisError actual) {
+    var span = _createSpan(actual.offset, actual.length);
+    var levelName = _actualErrorLevel(actual).name.toLowerCase();
+    var msg = span.message(actual.message, color: colorOf(levelName));
+    return '$levelName: [${errorCodeName(actual.errorCode)}] $msg';
+  }
+
+  SourceSpan _createSpan(int offset, int len) {
+    return createSpanHelper(_unit.lineInfo, offset, offset + len,
+        _unit.element.source, _unitSourceCode);
+  }
+}
+
+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);
+}
+
+SourceSpanWithContext createSpanHelper(
+    LineInfo lineInfo, int start, int end, Source source, String content) {
+  var startLoc = locationForOffset(lineInfo, source.uri, start);
+  var endLoc = locationForOffset(lineInfo, source.uri, end);
+
+  var lineStart = startLoc.offset - startLoc.column;
+  // Find the end of the line. This is not exposed directly on LineInfo, but
+  // we can find it pretty easily.
+  // TODO(jmesserly): for now we do the simple linear scan. Ideally we can get
+  // some help from the LineInfo API.
+  int lineEnd = endLoc.offset;
+  int lineNum = lineInfo.getLocation(lineEnd).lineNumber;
+  while (lineEnd < content.length &&
+      lineInfo.getLocation(++lineEnd).lineNumber == lineNum);
+
+  var text = content.substring(start, end);
+  var lineText = content.substring(lineStart, lineEnd);
+  return new SourceSpanWithContext(startLoc, endLoc, text, lineText);
+}
+
+/// Describes an expected message that should be produced by the checker.
+class _ErrorExpectation {
+  final Level level;
+  final String typeName;
+  _ErrorExpectation(this.level, this.typeName);
+
+  static _ErrorExpectation _parse(String descriptor) {
+    var tokens = descriptor.split(':');
+    expect(tokens.length, 2, reason: 'invalid error descriptor');
+    var name = tokens[0].toUpperCase();
+    var typeName = tokens[1];
+
+    var level =
+        Level.LEVELS.firstWhere((l) => l.name == name, orElse: () => null);
+    expect(level, isNotNull,
+        reason: 'invalid level in error descriptor: `${tokens[0]}`');
+    expect(typeName, isNotNull,
+        reason: 'invalid type in error descriptor: ${tokens[1]}');
+    return new _ErrorExpectation(level, typeName);
+  }
+
+  static _ErrorExpectation parse(String descriptor) {
+    descriptor = descriptor.trim();
+    var tokens = descriptor.split(' ');
+    if (tokens.length == 1) return _parse(tokens[0]);
+    expect(tokens.length, 4, reason: 'invalid error descriptor');
+    expect(tokens[1], "should", reason: 'invalid error descriptor');
+    expect(tokens[2], "be", reason: 'invalid error descriptor');
+    if (tokens[0] == "pass") return null;
+    // TODO(leafp) For now, we just use whatever the current expectation is,
+    // eventually we could do more automated reporting here.
+    return _parse(tokens[0]);
+  }
+
+  String toString() => '$level $typeName';
+}
+
+/// Dart SDK which contains a mock implementation of the SDK libraries. May be
+/// used to speed up execution when most of the core libraries is not needed.
+class MockDartSdk implements DartSdk {
+  final Map<Uri, _MockSdkSource> _sources = {};
+  final bool reportMissing;
+  final Map<String, SdkLibrary> _libs = {};
+  final String sdkVersion = '0';
+  List<String> get uris => _sources.keys.map((uri) => '$uri').toList();
+  final AnalysisContext context = new SdkAnalysisContext();
+  DartUriResolver _resolver;
+  DartUriResolver get resolver => _resolver;
+
+  MockDartSdk(Map<String, String> sources, {this.reportMissing}) {
+    sources.forEach((uriString, contents) {
+      var uri = Uri.parse(uriString);
+      _sources[uri] = new _MockSdkSource(uri, contents);
+      _libs[uriString] = new SdkLibraryImpl(uri.path)
+        ..setDart2JsLibrary()
+        ..setVmLibrary();
+    });
+    _resolver = new DartUriResolver(this);
+    context.sourceFactory = new SourceFactory([_resolver]);
+  }
+
+  List<SdkLibrary> get sdkLibraries => _libs.values.toList();
+  SdkLibrary getSdkLibrary(String dartUri) => _libs[dartUri];
+  Source mapDartUri(String dartUri) => _getSource(Uri.parse(dartUri));
+
+  Source fromEncoding(UriKind kind, Uri uri) {
+    if (kind != UriKind.DART_URI) {
+      throw new UnsupportedError('expected dart: uri kind, got $kind.');
+    }
+    return _getSource(uri);
+  }
+
+  Source _getSource(Uri uri) {
+    var src = _sources[uri];
+    if (src == null) {
+      if (reportMissing) print('warning: missing mock for $uri.');
+      _sources[uri] =
+          src = new _MockSdkSource(uri, 'library dart.${uri.path};');
+    }
+    return src;
+  }
+
+  @override
+  Source fromFileUri(Uri uri) {
+    throw new UnsupportedError('MockDartSdk.fromFileUri');
+  }
+}
+
+class _MockSdkSource implements Source {
+  /// Absolute URI which this source can be imported from.
+  final Uri uri;
+  final String _contents;
+
+  _MockSdkSource(this.uri, this._contents);
+
+  bool exists() => true;
+
+  int get hashCode => uri.hashCode;
+
+  final int modificationStamp = 1;
+
+  TimestampedData<String> get contents =>
+      new TimestampedData(modificationStamp, _contents);
+
+  String get encoding => "${uriKind.encoding}$uri";
+
+  Source get source => this;
+
+  String get fullName => shortName;
+
+  String get shortName => uri.path;
+
+  UriKind get uriKind => UriKind.DART_URI;
+
+  bool get isInSystemLibrary => true;
+
+  Source resolveRelative(Uri relativeUri) =>
+      throw new UnsupportedError('not expecting relative urls in dart: mocks');
+
+  Uri resolveRelativeUri(Uri relativeUri) =>
+      throw new UnsupportedError('not expecting relative urls in dart: mocks');
+}
+
+/// Sample mock SDK sources.
+final Map<String, String> mockSdkSources = {
+  // The list of types below is derived from:
+  //   * types we use via our smoke queries, including HtmlElement and
+  //     types from `_typeHandlers` (deserialize.dart)
+  //   * types that are used internally by the resolver (see
+  //   _initializeFrom in resolver.dart).
+  'dart:core': '''
+        library dart.core;
+
+        void print(Object o) {}
+
+        class Object {
+          int get hashCode {}
+          Type get runtimeType {}
+          String toString(){}
+          bool ==(other){}
+        }
+        class Function {}
+        class StackTrace {}
+        class Symbol {}
+        class Type {}
+
+        class String {
+          String operator +(String other) {}
+        }
+        class bool {}
+        class num {
+          num operator +(num other) {}
+        }
+        class int extends num {
+          bool operator<(num other) {}
+          int operator-() {}
+        }
+        class double extends num {}
+        class DateTime {}
+        class Null {}
+
+        class Deprecated {
+          final String expires;
+          const Deprecated(this.expires);
+        }
+        const Object deprecated = const Deprecated("next release");
+        class _Override { const _Override(); }
+        const Object override = const _Override();
+        class _Proxy { const _Proxy(); }
+        const Object proxy = const _Proxy();
+
+        class Iterable<E> {
+          fold(initialValue, combine(previousValue, E element)) {}
+          Iterable map(f(E element)) {}
+        }
+        class List<E> implements Iterable<E> {
+          List([int length]);
+          List.filled(int length, E fill);
+        }
+        class Map<K, V> {
+          Iterable<K> get keys {}
+        }
+        ''',
+  'dart:async': '''
+        class Future<T> {
+          Future(computation()) {}
+          Future.value(T t) {}
+          Future then(onValue(T value)) {}
+          static Future<List> wait(Iterable<Future> futures) {}
+        }
+        class Stream<T> {}
+  ''',
+  'dart:html': '''
+        library dart.html;
+        class HtmlElement {}
+        ''',
+  'dart:math': '''
+        library dart.math;
+        class Random {
+          bool nextBool() {}
+        }
+        num min(num x, num y) {}
+        num max(num x, num y) {}
+        ''',
+};
+
+/// 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;
+}
+
+String errorCodeName(ErrorCode errorCode) {
+  var name = errorCode.name;
+  final prefix = 'dev_compiler.';
+  if (name.startsWith(prefix)) {
+    return name.substring(prefix.length);
+  } else {
+    // TODO(jmesserly): this is for backwards compat, but not sure it's very
+    // useful to log this.
+    return 'AnalyzerMessage';
+  }
+}
+
+/// Returns an ANSII color escape sequence corresponding to [levelName]. Colors
+/// are defined for: severe, error, warning, or info. Returns null if the level
+/// name is not recognized.
+String colorOf(String levelName) {
+  levelName = levelName.toLowerCase();
+  if (levelName == 'shout' || levelName == 'severe' || levelName == 'error') {
+    return _RED_COLOR;
+  }
+  if (levelName == 'warning') return _MAGENTA_COLOR;
+  if (levelName == 'info') return _CYAN_COLOR;
+  return null;
+}
+
+const String _RED_COLOR = '\u001b[31m';
+const String _MAGENTA_COLOR = '\u001b[35m';
+const String _CYAN_COLOR = '\u001b[36m';
+const String GREEN_COLOR = '\u001b[32m';
+const String NO_COLOR = '\u001b[0m';
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index e515631..fdcbd37 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -14,24 +14,18 @@
     NonFilePackagesDirectoryPackages;
 import 'package:package_config/src/util.dart' show
     checkValidPackageUri;
-import 'package:sdk_library_metadata/libraries.dart' hide LIBRARIES;
-import 'package:sdk_library_metadata/libraries.dart' as library_info show
-    LIBRARIES;
+import 'package:sdk_library_metadata/libraries.dart' as library_info;
 
 import '../compiler_new.dart' as api;
 import 'commandline_options.dart';
+import 'common.dart';
 import 'common/tasks.dart' show
     GenericTask;
 import 'compiler.dart' as leg;
 import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
     DiagnosticOptions;
-import 'diagnostics/messages.dart';
-import 'diagnostics/source_span.dart' show
-    SourceSpan;
-import 'diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE,
-    Spannable;
+import 'diagnostics/messages.dart' show
+    Message;
 import 'elements/elements.dart' as elements;
 import 'io/source_file.dart';
 import 'script.dart';
@@ -50,7 +44,7 @@
   List<String> options;
   Map<String, dynamic> environment;
   bool mockableLibraryUsed = false;
-  final Set<String> allowedLibraryCategories;
+  final Set<library_info.Category> allowedLibraryCategories;
 
   GenericTask userHandlerTask;
   GenericTask userProviderTask;
@@ -179,38 +173,24 @@
     return const <String>[];
   }
 
-  static Set<String> getAllowedLibraryCategories(List<String> options) {
-    var result = extractCsvOption(options, '--categories=');
-    if (result.isEmpty) {
-      result = ['Client'];
+  static Set<library_info.Category> getAllowedLibraryCategories(
+      List<String> options) {
+    Iterable<library_info.Category> categories =
+      extractCsvOption(options, '--categories=')
+          .map(library_info.parseCategory)
+          .where((x) => x != null);
+    if (categories.isEmpty) {
+      return new Set.from([library_info.Category.client]);
     }
-    result.add('Shared');
-    result.add('Internal');
-    return new Set<String>.from(result);
+    return new Set.from(categories);
   }
 
   static bool hasOption(List<String> options, String option) {
     return options.indexOf(option) >= 0;
   }
 
-  // TODO(johnniwinther): Merge better with [translateDartUri] when
-  // [scanBuiltinLibrary] is removed.
-  String lookupLibraryPath(Uri uri, LibraryInfo info) {
-    if (info == null) return null;
-    if (!info.isDart2jsLibrary) return null;
-    if (!allowedLibraryCategories.contains(info.category)) {
-      registerDisallowedLibraryUse(uri);
-      return null;
-    }
-    String path = info.dart2jsPath;
-    if (path == null) {
-      path = info.path;
-    }
-    return "lib/$path";
-  }
-
   String lookupPatchPath(String dartLibraryName) {
-    LibraryInfo info = lookupLibraryInfo(dartLibraryName);
+    library_info.LibraryInfo info = lookupLibraryInfo(dartLibraryName);
     if (info == null) return null;
     if (!info.isDart2jsLibrary) return null;
     String path = info.dart2jsPatchPath;
@@ -321,36 +301,68 @@
     }
   }
 
+  /// Translates "resolvedUri" with scheme "dart" to a [uri] resolved relative
+  /// to [libraryRoot] according to the information in [library_info.libraries].
+  ///
+  /// Returns null and emits an error if the library could not be found or
+  /// imported into [importingLibrary].
+  ///
+  /// If [importingLibrary] is a platform or patch library all dart2js libraries
+  /// can be resolved. Otherwise only libraries with categories in
+  /// [allowedLibraryCategories] can be resolved.
   Uri translateDartUri(elements.LibraryElement importingLibrary,
                        Uri resolvedUri, Spannable spannable) {
-    LibraryInfo libraryInfo = lookupLibraryInfo(resolvedUri.path);
-    String path = lookupLibraryPath(resolvedUri, libraryInfo);
-    if (libraryInfo != null &&
-        libraryInfo.category == "Internal") {
-      bool allowInternalLibraryAccess = false;
-      if (importingLibrary != null) {
-        if (importingLibrary.isPlatformLibrary || importingLibrary.isPatch) {
-          allowInternalLibraryAccess = true;
-        } else if (importingLibrary.canonicalUri.path.contains(
-                       'sdk/tests/compiler/dart2js_native')) {
-          allowInternalLibraryAccess = true;
-        }
+
+    library_info.LibraryInfo libraryInfo = lookupLibraryInfo(resolvedUri.path);
+
+    bool allowInternalLibraryAccess = false;
+    if (importingLibrary != null) {
+      if (importingLibrary.isPlatformLibrary || importingLibrary.isPatch) {
+        allowInternalLibraryAccess = true;
+      } else if (importingLibrary.canonicalUri.path.contains(
+          'sdk/tests/compiler/dart2js_native')) {
+        allowInternalLibraryAccess = true;
       }
-      if (!allowInternalLibraryAccess) {
-        if (importingLibrary != null) {
-          reporter.reportErrorMessage(
-              spannable,
-              MessageKind.INTERNAL_LIBRARY_FROM,
-              {'resolvedUri': resolvedUri,
-               'importingUri': importingLibrary.canonicalUri});
+    }
+
+    String computePath() {
+      if (libraryInfo == null) {
+        return null;
+      } else if (!libraryInfo.isDart2jsLibrary) {
+        return null;
+      } else {
+        if (libraryInfo.isInternal &&
+            !allowInternalLibraryAccess) {
+          if (importingLibrary != null) {
+            reporter.reportErrorMessage(
+                spannable,
+                MessageKind.INTERNAL_LIBRARY_FROM,
+                {'resolvedUri': resolvedUri,
+                  'importingUri': importingLibrary.canonicalUri});
+          } else {
+            reporter.reportErrorMessage(
+                spannable,
+                MessageKind.INTERNAL_LIBRARY,
+                {'resolvedUri': resolvedUri});
+            registerDisallowedLibraryUse(resolvedUri);
+          }
+          return null;
+        } else if (!allowInternalLibraryAccess &&
+            !allowedLibraryCategories.any(libraryInfo.categories.contains)) {
+          registerDisallowedLibraryUse(resolvedUri);
+          // TODO(sigurdm): Currently we allow the sdk libraries to import
+          // libraries from any category. We might want to revisit this.
+          return null;
         } else {
-          reporter.reportErrorMessage(
-              spannable,
-              MessageKind.INTERNAL_LIBRARY,
-              {'resolvedUri': resolvedUri});
+          return (libraryInfo.dart2jsPath != null)
+              ? libraryInfo.dart2jsPath
+              : libraryInfo.path;
         }
       }
     }
+
+    String path = computePath();
+
     if (path == null) {
       if (libraryInfo == null) {
         reporter.reportErrorMessage(
@@ -367,13 +379,14 @@
       // value.
       return null;
     }
+
     if (resolvedUri.path == 'html' ||
         resolvedUri.path == 'io') {
       // TODO(ahe): Get rid of mockableLibraryUsed when test.dart
       // supports this use case better.
       mockableLibraryUsed = true;
     }
-    return libraryRoot.resolve(path);
+    return libraryRoot.resolve("lib/$path");
   }
 
   Uri resolvePatchUri(String dartLibraryPath) {
@@ -547,7 +560,7 @@
 
   fromEnvironment(String name) => environment[name];
 
-  LibraryInfo lookupLibraryInfo(String libraryName) {
-    return library_info.LIBRARIES[libraryName];
+  library_info.LibraryInfo lookupLibraryInfo(String libraryName) {
+    return library_info.libraries[libraryName];
   }
 }
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index b0fff43..da13773 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -4,6 +4,7 @@
 
 library closureToClassMapper;
 
+import 'common.dart';
 import 'common/names.dart' show
     Identifiers;
 import 'common/resolution.dart' show
@@ -15,9 +16,6 @@
     Compiler;
 import 'constants/expressions.dart';
 import 'dart_types.dart';
-import 'diagnostics/diagnostic_listener.dart';
-import 'diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
 import 'elements/elements.dart';
 import 'elements/modelx.dart' show
     BaseFunctionElementX,
diff --git a/pkg/compiler/lib/src/common.dart b/pkg/compiler/lib/src/common.dart
index 400ba5d..df3ad46 100644
--- a/pkg/compiler/lib/src/common.dart
+++ b/pkg/compiler/lib/src/common.dart
@@ -2,61 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+/// Library that re-exports libraries used throughout the compiler regardless
+/// of phase or subfunctionality.
 library dart2js.common;
 
-
-export 'common/names.dart' show
-    Names;
-
-export 'common/tasks.dart' show
-    CompilerTask;
-
-export 'compiler.dart' show
-    Compiler;
-
-export 'constants/values.dart' show
-    ConstantValue,
-    InterceptorConstantValue,
-    NullConstantValue,
-    TypeConstantValue;
-
-export 'dart_types.dart' show
-    DartType,
-    FunctionType,
-    InterfaceType,
-    TypeVariableType,
-    Types;
-
+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 'elements/elements.dart' show
-    ClassElement,
-    CompilationUnitElement,
-    Element,
-    Elements,
-    FunctionElement,
-    FunctionSignature,
-    LibraryElement,
-    MetadataAnnotation,
-    MixinApplicationElement,
-    TypedefElement,
-    VariableElement;
-
-export 'tree/tree.dart' show
-    Node;
-
-export 'types/types.dart' show
-    TypeMask;
-
-export 'universe/call_structure.dart' show
-    CallStructure;
-
-export 'universe/selector.dart' show
-    Selector;
-
-export 'util/util.dart' show
-    Link;
+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 948fdba..4638207 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -6,6 +6,7 @@
 
 import 'dart:async' show Future;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../compile_time_constants.dart' show
@@ -20,9 +21,6 @@
 import '../dart_types.dart' show
     DartType,
     InterfaceType;
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
 import '../elements/elements.dart' show
     ClassElement,
     ConstructorElement,
@@ -47,7 +45,7 @@
 import '../native/native.dart' as native show
     NativeEnqueuer;
 import '../patch_parser.dart' show
-    checkNativeAnnotation;
+    checkNativeAnnotation, checkJsInteropAnnotation;
 import '../resolution/tree_elements.dart' show
     TreeElements;
 import '../tree/tree.dart' show
@@ -229,8 +227,7 @@
 
   void registerRequiredType(DartType type) {}
 
-  void registerConstSymbol(String name, Registry registry) {}
-  void registerNewSymbol(Registry registry) {}
+  void registerConstSymbol(String name) {}
 
   bool isNullImplementation(ClassElement cls) {
     return cls == compiler.nullClass;
@@ -296,6 +293,16 @@
         }
       });
     }
+    checkJsInteropAnnotation(compiler, library);
+    library.forEachLocalMember((Element element) {
+      checkJsInteropAnnotation(compiler, element);
+      if (element.isClass && element.isJsInterop) {
+        ClassElement classElement = element;
+        classElement.forEachMember((_, memberElement) {
+          checkJsInteropAnnotation(compiler, memberElement);
+        });
+      }
+    });
     return new Future.value();
   }
 
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index e5554c9..ab154f9 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -4,6 +4,7 @@
 
 library dart2js.common.codegen;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../constants/values.dart' show
@@ -11,8 +12,6 @@
 import '../dart_types.dart' show
     DartType,
     InterfaceType;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart' show
     AstElement,
     ClassElement,
@@ -52,10 +51,6 @@
 
   String toString() => 'CodegenRegistry for $currentElement';
 
-  // TODO(johnniwinther): Remove this getter when [Registry] creates a
-  // dependency node.
-  Setlet<Element> get otherDependencies => treeElements.otherDependencies;
-
   CodegenEnqueuer get world => compiler.enqueuer.codegen;
   JavaScriptBackend get backend => compiler.backend;
 
@@ -64,16 +59,6 @@
     assert(false);
   }
 
-  void registerDependency(Element element) {
-    treeElements.registerDependency(element);
-  }
-
-  void registerInlining(Element inlinedElement, Element context) {
-    if (compiler.dumpInfo) {
-      compiler.dumpInfoTask.registerInlined(inlinedElement, context);
-    }
-  }
-
   void registerInstantiatedClass(ClassElement element) {
     backend.registerInstantiatedType(element.rawType, world, this);
   }
@@ -140,7 +125,7 @@
   }
 
   void registerConstSymbol(String name) {
-    backend.registerConstSymbol(name, this);
+    backend.registerConstSymbol(name);
   }
 
   void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
diff --git a/pkg/compiler/lib/src/common/registry.dart b/pkg/compiler/lib/src/common/registry.dart
index 47510b5..055a7c6 100644
--- a/pkg/compiler/lib/src/common/registry.dart
+++ b/pkg/compiler/lib/src/common/registry.dart
@@ -14,11 +14,8 @@
 
 /// Interface for registration of element dependencies.
 abstract class Registry {
-  // TODO(johnniwinther): Remove this getter when [Registry] creates a
-  // dependency node.
-  Iterable<Element> get otherDependencies;
-
-  void registerDependency(Element element);
+  // TODO(johnniwinther): Remove this.
+  void registerDependency(Element element) {}
 
   bool get isForResolution;
 
@@ -33,6 +30,4 @@
   void registerInstantiation(InterfaceType type);
 
   void registerGetOfStaticFunction(FunctionElement element);
-
-  void registerAssert(bool hasMessage);
 }
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index 474b10e..88cb4b9 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -5,6 +5,7 @@
 
 library dart2js.common.resolution;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../core_types.dart' show
@@ -12,8 +13,6 @@
 import '../dart_types.dart' show
     DartType,
     InterfaceType;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
 import '../elements/elements.dart' show
     AstElement,
     ClassElement,
@@ -53,7 +52,6 @@
 
   WorldImpact run(Compiler compiler, ResolutionEnqueuer world) {
     WorldImpact impact = compiler.analyze(this, world);
-    impact = compiler.backend.resolutionCallbacks.transformImpact(impact);
     _isAnalyzed = true;
     return impact;
   }
@@ -65,89 +63,13 @@
 // and clean up the interface.
 /// Backend callbacks function specific to the resolution phase.
 class ResolutionCallbacks {
-  ///
-  WorldImpact transformImpact(ResolutionWorldImpact worldImpact) => worldImpact;
-
-  /// Register that an assert has been seen.
-  void onAssert(bool hasMessage, Registry registry) {}
-
-  /// Register that an 'await for' has been seen.
-  void onAsyncForIn(AsyncForIn node, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses string interpolation.
-  void onStringInterpolation(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a catch statement.
-  void onCatchStatement(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program explicitly throws an exception.
-  void onThrowExpression(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a global variable with a lazy initializer.
-  void onLazyField(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses a type variable as an expression.
-  void onTypeVariableExpression(Registry registry,
-                                TypeVariableElement variable) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses a type literal.
-  void onTypeLiteral(DartType type, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a catch statement with a stack trace.
-  void onStackTraceInCatch(Registry registry) {}
-
-  /// Register an is check to the backend.
-  void onIsCheck(DartType type, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a for-in loop.
-  void onSyncForIn(Registry registry) {}
-
-  /// Register an as check to the backend.
-  void onAsCheck(DartType type, Registry registry) {}
-
-  /// Registers that a type variable bounds check might occur at runtime.
-  void onTypeVariableBoundCheck(Registry registry) {}
-
-  /// Register that the application may throw a [NoSuchMethodError].
-  void onThrowNoSuchMethod(Registry registry) {}
-
-  /// Register that the application may throw a [RuntimeError].
-  void onThrowRuntimeError(Registry registry) {}
-
-  /// Register that the application has a compile time error.
-  void onCompileTimeError(Registry registry, ErroneousElement error) {}
-
-  /// Register that the application may throw an
-  /// [AbstractClassInstantiationError].
-  void onAbstractClassInstantiation(Registry registry) {}
-
-  /// Register that the application may throw a [FallThroughError].
-  void onFallThroughError(Registry registry) {}
-
-  /// Register that a super call will end up calling
-  /// [: super.noSuchMethod :].
-  void onSuperNoSuchMethod(Registry registry) {}
-
-  /// Register that the application creates a constant map.
-  void onMapLiteral(Registry registry, DartType type, bool isConstant) {}
-
-  /// Called when resolving the `Symbol` constructor.
-  void onSymbolConstructor(Registry registry) {}
-
-  /// Called when resolving a prefix or postfix expression.
-  void onIncDecOperation(Registry registry) {}
+  /// Transform the [ResolutionImpact] into a [WorldImpact] adding the
+  /// backend dependencies for features used in [worldImpact].
+  WorldImpact transformImpact(ResolutionImpact worldImpact) => worldImpact;
 }
 
-class ResolutionWorldImpact extends WorldImpact {
-  const ResolutionWorldImpact();
+class ResolutionImpact extends WorldImpact {
+  const ResolutionImpact();
 
   // TODO(johnniwinther): Remove this.
   void registerDependency(Element element) {}
@@ -185,8 +107,6 @@
   INC_DEC_OPERATION,
   /// A field whose initialization is not a constant.
   LAZY_FIELD,
-  /// A call to `new Symbol`.
-  NEW_SYMBOL,
   /// A catch clause with a variable for the stack trace.
   STACK_TRACE_IN_CATCH,
   /// String interpolation.
@@ -263,11 +183,11 @@
 }
 
 /// Mutable implementation of [WorldImpact] used to transform
-/// [ResolutionWorldImpact] to [WorldImpact].
+/// [ResolutionImpact] to [WorldImpact].
 // TODO(johnniwinther): Remove [Registry] when dependency is tracked directly
 // on [WorldImpact].
-class TransformedWorldImpact implements WorldImpact, Registry {
-  final ResolutionWorldImpact worldImpact;
+class TransformedWorldImpact extends WorldImpact {
+  final ResolutionImpact worldImpact;
 
   Setlet<Element> _staticUses;
   Setlet<InterfaceType> _instantiatedTypes;
@@ -317,24 +237,8 @@
     return _staticUses;
   }
 
-  @override
-  bool get isForResolution => true;
-
   _unsupported(String message) => throw new UnsupportedError(message);
 
-  @override
-  Iterable<Element> get otherDependencies => _unsupported('otherDependencies');
-
-  // TODO(johnniwinther): Remove this.
-  @override
-  void registerAssert(bool hasMessage) => _unsupported('registerAssert');
-
-  @override
-  void registerDependency(Element element) {
-    worldImpact.registerDependency(element);
-  }
-
-  @override
   void registerDynamicGetter(UniverseSelector selector) {
     if (_dynamicGetters == null) {
       _dynamicGetters = new Setlet<UniverseSelector>();
@@ -343,7 +247,6 @@
     _dynamicGetters.add(selector);
   }
 
-  @override
   void registerDynamicInvocation(UniverseSelector selector) {
     if (_dynamicInvocations == null) {
       _dynamicInvocations = new Setlet<UniverseSelector>();
@@ -352,7 +255,6 @@
     _dynamicInvocations.add(selector);
   }
 
-  @override
   void registerDynamicSetter(UniverseSelector selector) {
     if (_dynamicSetters == null) {
       _dynamicSetters = new Setlet<UniverseSelector>();
@@ -361,16 +263,10 @@
     _dynamicSetters.add(selector);
   }
 
-  @override
-  void registerGetOfStaticFunction(FunctionElement element) {
-    _unsupported('registerGetOfStaticFunction($element)');
-  }
-
-  @override
-  void registerInstantiation(InterfaceType type) {
+  void registerInstantiatedType(InterfaceType type) {
     // TODO(johnniwinther): Remove this when dependency tracking is done on
     // the world impact itself.
-    registerDependency(type.element);
+    worldImpact.registerDependency(type.element);
     if (_instantiatedTypes == null) {
       _instantiatedTypes = new Setlet<InterfaceType>();
     }
@@ -384,10 +280,14 @@
   }
 
   @override
-  void registerStaticInvocation(Element element) {
+  Iterable<DartType> get typeLiterals {
+    return worldImpact.typeLiterals;
+  }
+
+  void registerStaticUse(Element element) {
     // TODO(johnniwinther): Remove this when dependency tracking is done on
     // the world impact itself.
-    registerDependency(element);
+    worldImpact.registerDependency(element);
     if (_staticUses == null) {
       _staticUses = new Setlet<Element>();
     }
@@ -396,6 +296,13 @@
 
   @override
   Iterable<LocalFunctionElement> get closures => worldImpact.closures;
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('TransformedWorldImpact($worldImpact)');
+    sb.write(super.toString());
+    return sb.toString();
+  }
 }
 
 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`.
@@ -412,7 +319,8 @@
   DartType resolveTypeAnnotation(Element element, TypeAnnotation node);
 
   bool hasBeenResolved(Element element);
-  ResolutionWorldImpact analyzeElement(Element element);
+  WorldImpact getWorldImpact(Element element);
+  WorldImpact computeWorldImpact(Element element);
 }
 
 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`.
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index 56253db..737c2a9 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -4,12 +4,12 @@
 
 library dart2js.common.tasks;
 
-import 'dart:profiler' show
+import 'dart:developer' show
     UserTag;
+
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
 import '../elements/elements.dart' show
     Element;
 
diff --git a/pkg/compiler/lib/src/common/work.dart b/pkg/compiler/lib/src/common/work.dart
index 2efcf81..49f23c0 100644
--- a/pkg/compiler/lib/src/common/work.dart
+++ b/pkg/compiler/lib/src/common/work.dart
@@ -4,10 +4,9 @@
 
 library dart2js.common.work;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart' show
     AstElement;
 import '../enqueue.dart' show
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index 59166a0..99672db 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -4,6 +4,7 @@
 
 library dart2js.compile_time_constant_evaluator;
 
+import 'common.dart';
 import 'common/resolution.dart' show
     Resolution;
 import 'common/tasks.dart' show
@@ -16,17 +17,10 @@
 import 'constants/expressions.dart';
 import 'constants/values.dart';
 import 'dart_types.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/messages.dart' show
-    MessageKind;
-import 'enqueue.dart' show
-    WorldImpact;
 import 'elements/elements.dart';
 import 'elements/modelx.dart' show
     FunctionElementX;
+import 'helpers/helpers.dart';
 import 'resolution/tree_elements.dart' show
     TreeElements;
 import 'resolution/operators.dart';
@@ -865,10 +859,10 @@
       concreteArguments = normalizedArguments;
     }
 
-    if (target == compiler.intEnvironment ||
-        target == compiler.boolEnvironment ||
-        target == compiler.stringEnvironment) {
-      return createFromEnvironmentConstant(node, constructedType, target,
+    if (constructor == compiler.intEnvironment ||
+        constructor == compiler.boolEnvironment ||
+        constructor == compiler.stringEnvironment) {
+      return createFromEnvironmentConstant(node, constructedType, constructor,
           callStructure, normalizedArguments, concreteArguments);
     } else {
       return makeConstructedConstant(compiler, handler, context, node, type,
@@ -953,6 +947,7 @@
         expression =
             new StringFromEnvironmentConstantExpression(name, defaultValue);
       }
+      assert(expression != null);
       return new AstConstant(context, node, expression, value);
     }
 
@@ -1267,7 +1262,7 @@
 
 // TODO(johnniwinther): Clean this up.
 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) {
-  compiler.resolution.analyzeElement(element.declaration);
+  compiler.resolution.computeWorldImpact(element.declaration);
   return element.resolvedAst.elements;
 }
 
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index e3105d7..9f14843 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -13,6 +13,7 @@
     CacheStrategy;
 import 'closure.dart' as closureMapping show
     ClosureTask;
+import 'common.dart';
 import 'common/backend_api.dart' show
     Backend;
 import 'common/codegen.dart' show
@@ -27,7 +28,7 @@
     Parsing,
     Resolution,
     ResolutionWorkItem,
-    ResolutionWorldImpact;
+    ResolutionImpact;
 import 'common/tasks.dart' show
     CompilerTask,
     GenericTask;
@@ -46,23 +47,12 @@
 import 'deferred_load.dart' show DeferredLoadTask, OutputUnit;
 import 'diagnostics/code_location.dart';
 import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticOptions,
-    DiagnosticReporter;
+    DiagnosticOptions;
 import 'diagnostics/invariant.dart' show
-    invariant,
     REPORT_EXCESS_RESOLUTION;
 import 'diagnostics/messages.dart' show
     Message,
-    MessageKind,
     MessageTemplate;
-import 'diagnostics/source_span.dart' show
-    SourceSpan;
-import 'diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE,
-    NO_LOCATION_SPANNABLE,
-    Spannable,
-    SpannableAssertionFailure;
 import 'dump_info.dart' show
     DumpInfoTask;
 import 'elements/elements.dart';
@@ -168,7 +158,7 @@
    * We should get rid of this and ensure that all dependencies are
    * associated with a particular element.
    */
-  Registry globalDependencies;
+  GlobalDependencyRegistry globalDependencies;
 
   /**
    * Dependencies that are only included due to mirrors.
@@ -496,7 +486,7 @@
     _parsing = new _CompilerParsing(this);
     _resolution = new _CompilerResolution(this);
     _coreTypes = new _CompilerCoreTypes(_resolution);
-    types = new Types(this);
+    types = new Types(_resolution);
     tracer = new Tracer(this, this.outputProvider);
 
     if (verbose) {
@@ -505,8 +495,7 @@
 
     // TODO(johnniwinther): Separate the dependency tracking from the enqueuing
     // for global dependencies.
-    globalDependencies =
-        new CodegenRegistry(this, new TreeElementMapping(null));
+    globalDependencies = new GlobalDependencyRegistry(this);
 
     if (emitJavaScript) {
       js_backend.JavaScriptBackend jsBackend =
@@ -988,8 +977,16 @@
       reporter.log('Enqueuing ${library.canonicalUri}');
         fullyEnqueueLibrary(library, enqueuer.resolution);
       });
-    } else if (analyzeMain && mainApp != null) {
-      fullyEnqueueLibrary(mainApp, enqueuer.resolution);
+    } else if (analyzeMain) {
+      if (mainApp != null) {
+        fullyEnqueueLibrary(mainApp, enqueuer.resolution);
+      }
+      if (librariesToAnalyzeWhenRun != null) {
+        for (Uri libraryUri in librariesToAnalyzeWhenRun) {
+          fullyEnqueueLibrary(libraryLoader.lookupLibrary(libraryUri),
+              enqueuer.resolution);
+        }
+      }
     }
     // Elements required by enqueueHelpers are global dependencies
     // that are not pulled in by a particular element.
@@ -1172,7 +1169,7 @@
     }
   }
 
-  ResolutionWorldImpact analyzeElement(Element element) {
+  WorldImpact analyzeElement(Element element) {
     assert(invariant(element,
            element.impliesType ||
            element.isField ||
@@ -1184,11 +1181,11 @@
     assert(invariant(element, element is AnalyzableElement,
         message: 'Element $element is not analyzable.'));
     assert(invariant(element, element.isDeclaration));
-    return resolution.analyzeElement(element);
+    return resolution.computeWorldImpact(element);
   }
 
-  ResolutionWorldImpact 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'));
@@ -1204,9 +1201,9 @@
     }
     AstElement element = work.element;
     if (world.hasBeenProcessed(element)) {
-      return const ResolutionWorldImpact();
+      return const WorldImpact();
     }
-    ResolutionWorldImpact worldImpact = analyzeElement(element);
+    WorldImpact worldImpact = analyzeElement(element);
     backend.onElementResolved(element, element.resolvedAst.elements);
     world.registerProcessedElement(element);
     return worldImpact;
@@ -1932,8 +1929,7 @@
 // TODO(johnniwinther): Move [ResolverTask] here.
 class _CompilerResolution implements Resolution {
   final Compiler compiler;
-  final Map<Element, ResolutionWorldImpact> _worldImpactCache =
-      <Element, ResolutionWorldImpact>{};
+  final Map<Element, WorldImpact> _worldImpactCache = <Element, WorldImpact>{};
 
   _CompilerResolution(this.compiler);
 
@@ -1976,18 +1972,31 @@
     return compiler.resolver.resolveTypeAnnotation(element, node);
   }
 
-  ResolutionWorldImpact analyzeElement(Element element) {
+  @override
+  WorldImpact getWorldImpact(Element element) {
+    WorldImpact worldImpact = _worldImpactCache[element];
+    assert(invariant(element, worldImpact != null,
+        message: "WorldImpact not computed for $element."));
+    return worldImpact;
+  }
+
+  @override
+  WorldImpact computeWorldImpact(Element element) {
     return _worldImpactCache.putIfAbsent(element, () {
       assert(compiler.parser != null);
       Node tree = compiler.parser.parse(element);
       assert(invariant(element, !element.isSynthesized || tree == null));
-      ResolutionWorldImpact worldImpact = compiler.resolver.resolve(element);
+      ResolutionImpact resolutionImpact =
+          compiler.resolver.resolve(element);
       if (tree != null &&
           !compiler.analyzeSignaturesOnly &&
           !reporter.options.suppressWarnings) {
         // Only analyze nodes with a corresponding [TreeElements].
         compiler.checker.check(element);
       }
+      WorldImpact worldImpact =
+          compiler.backend.resolutionCallbacks.transformImpact(
+              resolutionImpact);
       return worldImpact;
     });
   }
@@ -2020,3 +2029,22 @@
     });
   }
 }
+
+class GlobalDependencyRegistry extends CodegenRegistry {
+  Setlet<Element> _otherDependencies;
+
+  GlobalDependencyRegistry(Compiler compiler)
+      : super(compiler, new TreeElementMapping(null));
+
+  void registerDependency(Element element) {
+    if (element == null) return;
+    if (_otherDependencies == null) {
+      _otherDependencies = new Setlet<Element>();
+    }
+    _otherDependencies.add(element.implementation);
+  }
+
+  Iterable<Element> get otherDependencies {
+    return _otherDependencies != null ? _otherDependencies : const <Element>[];
+  }
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart
index fa774e8..4cc77b3 100644
--- a/pkg/compiler/lib/src/constants/constant_constructors.dart
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart
@@ -6,9 +6,8 @@
 // computed during resolution.
 library dart2js.constants.constant_constructors;
 
+import '../common.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart';
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
@@ -20,6 +19,7 @@
 import '../tree/tree.dart';
 import '../universe/call_structure.dart' show
     CallStructure;
+
 import 'constructors.dart';
 import 'expressions.dart';
 
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 3edb116..f1ad90b 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -4,11 +4,10 @@
 
 library dart2js.constants.expressions;
 
+import '../common.dart';
 import '../constants/constant_system.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    assertDebugMode;
 import '../elements/elements.dart' show
     ConstructorElement,
     Element,
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 19a89b1..24b6370 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -4,10 +4,9 @@
 
 library dart2js.constants.values;
 
+import '../common.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart'
-    show assertDebugMode;
 import '../elements/elements.dart'
     show ClassElement,
          Element,
diff --git a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
new file mode 100644
index 0000000..1467745
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
@@ -0,0 +1,616 @@
+// 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.cps_ir.bounds_checker;
+
+import 'cps_ir_nodes.dart';
+import 'optimizers.dart' show Pass;
+import 'octagon.dart';
+import '../constants/values.dart';
+import 'cps_fragment.dart';
+import 'type_mask_system.dart';
+import '../world.dart';
+import '../elements/elements.dart';
+
+/// Eliminates bounds checks when they can be proven safe.
+///
+/// In general, this pass will try to eliminate any branch with arithmetic
+/// in the condition, i.e. `x < y`, `x <= y`, `x == y` etc.
+///
+/// The analysis uses an [Octagon] abstract domain. Unlike traditional octagon
+/// analyzers, we do not use a closed matrix representation, but just maintain
+/// a bucket of constraints.  Constraints can therefore be added and removed
+/// on-the-fly without significant overhead.
+///
+/// We never copy the constraint system.  While traversing the IR, the
+/// constraint system is mutated to take into account the knowledge that is
+/// valid for the current location.  Constraints are added when entering a
+/// branch, for instance, and removed again after the branch has been processed.
+///
+/// Loops are analyzed in two passes. The first pass establishes monotonicity
+/// of loop variables, which the second pass uses to compute upper/lower bounds.
+/// The first pass also records whether any side effects occurred in the loop.
+///
+/// The two-pass scheme is suboptimal compared to a least fixed-point
+/// computation, but does not require repeated iteration.  Repeated iteration
+/// would be expensive, since we cannot perform a sparse analysis with our
+/// mutable octagon representation.
+class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
+  String get passName => 'Bounds checker';
+
+  static const int MAX_UINT32 = (1 << 32) - 1;
+
+  /// All integers of this magnitude or less are representable as JS numbers.
+  static const int MAX_SAFE_INT = (1 << 53) - 1;
+
+  /// Marker to indicate that a continuation should get a unique effect number.
+  static const int NEW_EFFECT = -1;
+
+  final TypeMaskSystem types;
+  final World world;
+
+  /// Fields for the constraint system and its variables.
+  final Octagon octagon = new Octagon();
+  final Map<Primitive, SignedVariable> valueOf = {};
+  final Map<Primitive, Map<int, SignedVariable>> lengthOf = {};
+
+  /// Fields for the two-pass handling of loops.
+  final Set<Continuation> loopsWithSideEffects = new Set<Continuation>();
+  final Map<Parameter, Monotonicity> monotonicity = <Parameter, Monotonicity>{};
+  bool isStrongLoopPass;
+  bool foundLoop = false;
+
+  /// Fields for tracking side effects.
+  ///
+  /// The IR is divided into regions wherein the lengths of indexable objects
+  /// are known not to change. Regions are identified by their "effect number".
+  final Map<Continuation, int> effectNumberAt = <Continuation, int>{};
+  int currentEffectNumber = 0;
+  int effectNumberCounter = 0;
+
+  BoundsChecker(this.types, this.world);
+
+  void rewrite(FunctionDefinition node) {
+    isStrongLoopPass = false;
+    visit(node);
+    if (foundLoop) {
+      isStrongLoopPass = true;
+      effectNumberAt.clear();
+      visit(node);
+    }
+  }
+
+  // ------------- VARIABLES -----------------
+
+  int makeNewEffect() => ++effectNumberCounter;
+
+  bool isInt(Primitive prim) {
+    return types.isDefinitelyInt(prim.type);
+  }
+
+  bool isUInt32(Primitive prim) {
+    return types.isDefinitelyUint32(prim.type);
+  }
+
+  bool isNonNegativeInt(Primitive prim) {
+    return types.isDefinitelyNonNegativeInt(prim.type);
+  }
+
+  /// Get a constraint variable representing the numeric value of [number].
+  SignedVariable getValue(Primitive number) {
+    number = number.effectiveDefinition;
+    int min, max;
+    if (isUInt32(number)) {
+      min = 0;
+      max = MAX_UINT32;
+    } else if (isNonNegativeInt(number)) {
+      min = 0;
+    }
+    return valueOf.putIfAbsent(number, () => octagon.makeVariable(min, max));
+  }
+
+  /// Get a constraint variable representing the length of [indexableObject] at
+  /// program locations with the given [effectCounter].
+  SignedVariable getLength(Primitive indexableObject, int effectCounter) {
+    indexableObject = indexableObject.effectiveDefinition;
+    if (indexableObject.type != null &&
+        types.isDefinitelyFixedLengthIndexable(indexableObject.type)) {
+      // Always use the same effect counter if the length is immutable.
+      effectCounter = 0;
+    }
+    return lengthOf
+        .putIfAbsent(indexableObject, () => <int, SignedVariable>{})
+        .putIfAbsent(effectCounter, () => octagon.makeVariable(0, MAX_UINT32));
+  }
+
+  // ------------- CONSTRAINT HELPERS -----------------
+
+  /// Puts the given constraint "in scope" by adding it to the octagon, and
+  /// pushing a stack action that will remove it again.
+  void applyConstraint(SignedVariable v1, SignedVariable v2, int k) {
+    Constraint constraint = new Constraint(v1, v2, k);
+    octagon.pushConstraint(constraint);
+    pushAction(() => octagon.popConstraint(constraint));
+  }
+
+  /// Return true if we can prove that `v1 + v2 <= k`.
+  bool testConstraint(SignedVariable v1, SignedVariable v2, int k) {
+    // Add the negated constraint and check for solvability.
+    // !(v1 + v2 <= k)   <==>   -v1 - v2 <= -k-1
+    Constraint constraint = new Constraint(v1.negated, v2.negated, -k - 1);
+    octagon.pushConstraint(constraint);
+    bool answer = octagon.isUnsolvable;
+    octagon.popConstraint(constraint);
+    return answer;
+  }
+
+  void makeLessThanOrEqual(SignedVariable v1, SignedVariable v2) {
+    // v1 <= v2   <==>   v1 - v2 <= 0
+    applyConstraint(v1, v2.negated, 0);
+  }
+
+  void makeLessThan(SignedVariable v1, SignedVariable v2) {
+    // v1 < v2   <==>   v1 - v2 <= -1
+    applyConstraint(v1, v2.negated, -1);
+  }
+
+  void makeGreaterThanOrEqual(SignedVariable v1, SignedVariable v2) {
+    // v1 >= v2   <==>   v2 - v1 <= 0
+    applyConstraint(v2, v1.negated, 0);
+  }
+
+  void makeGreaterThan(SignedVariable v1, SignedVariable v2) {
+    // v1 > v2   <==>    v2 - v1 <= -1
+    applyConstraint(v2, v1.negated, -1);
+  }
+
+  void makeConstant(SignedVariable v1, int k) {
+    // We model this using the constraints:
+    //    v1 + v1 <=  2k
+    //   -v1 - v1 <= -2k
+    applyConstraint(v1, v1, 2 * k);
+    applyConstraint(v1.negated, v1.negated, -2 * k);
+  }
+
+  /// Make `v1 = v2 + k`.
+  void makeExactSum(SignedVariable v1, SignedVariable v2, int k) {
+    applyConstraint(v1, v2.negated, k);
+    applyConstraint(v1.negated, v2, -k);
+  }
+
+  /// Make `v1 = v2 [+] k` where [+] represents floating-point addition.
+  void makeFloatingPointSum(SignedVariable v1, SignedVariable v2, int k) {
+    if (isDefinitelyLessThanOrEqualToConstant(v2, MAX_SAFE_INT - k) &&
+        isDefinitelyGreaterThanOrEqualToConstant(v2, -MAX_SAFE_INT + k)) {
+      // The result is known to be in the 53-bit range, so no rounding occurs.
+      makeExactSum(v1, v2, k);
+    } else {
+      // A rounding error may occur, so the result may not be exactly v2 + k.
+      // We can still add monotonicity constraints:
+      //   adding a positive number cannot return a lesser number
+      //   adding a negative number cannot return a greater number
+      if (k >= 0) {
+        // v1 >= v2   <==>   v2 - v1 <= 0   <==>   -v1 + v2 <= 0
+        applyConstraint(v1.negated, v2, 0);
+      } else {
+        // v1 <= v2   <==>   v1 - v2 <= 0
+        applyConstraint(v1, v2.negated, 0);
+      }
+    }
+  }
+
+  void makeEqual(SignedVariable v1, SignedVariable v2) {
+    // We model this using the constraints:
+    //    v1 <= v2   <==>   v1 - v2 <= 0
+    //    v1 >= v2   <==>   v2 - v1 <= 0
+    applyConstraint(v1, v2.negated, 0);
+    applyConstraint(v2, v1.negated, 0);
+  }
+
+  void makeNotEqual(SignedVariable v1, SignedVariable v2) {
+    // The octagon cannot represent non-equality, but we can sharpen a weak
+    // inequality to a sharp one. If v1 and v2 are already known to be equal,
+    // this will create a contradiction and eliminate a dead branch.
+    // This is necessary for eliminating concurrent modification checks.
+    if (isDefinitelyLessThanOrEqualTo(v1, v2)) {
+      makeLessThan(v1, v2);
+    } else if (isDefinitelyGreaterThanOrEqualTo(v1, v2)) {
+      makeGreaterThan(v1, v2);
+    }
+  }
+
+  /// Return true if we can prove that `v1 <= v2`.
+  bool isDefinitelyLessThanOrEqualTo(SignedVariable v1, SignedVariable v2) {
+    return testConstraint(v1, v2.negated, 0);
+  }
+
+  /// Return true if we can prove that `v1 >= v2`.
+  bool isDefinitelyGreaterThanOrEqualTo(SignedVariable v1, SignedVariable v2) {
+    return testConstraint(v2, v1.negated, 0);
+  }
+
+  bool isDefinitelyLessThanOrEqualToConstant(SignedVariable v1, int value) {
+    // v1 <= value   <==>   v1 + v1 <= 2 * value
+    return testConstraint(v1, v1, 2 * value);
+  }
+
+  bool isDefinitelyGreaterThanOrEqualToConstant(SignedVariable v1, int value) {
+    // v1 >= value   <==>   -v1 - v1 <= -2 * value
+    return testConstraint(v1.negated, v1.negated, -2 * value);
+  }
+
+  // ------------- TAIL EXPRESSIONS -----------------
+
+  @override
+  void visitBranch(Branch node) {
+    Primitive condition = node.condition.definition;
+    Continuation trueCont = node.trueContinuation.definition;
+    Continuation falseCont = node.falseContinuation.definition;
+    effectNumberAt[trueCont] = currentEffectNumber;
+    effectNumberAt[falseCont] = currentEffectNumber;
+    pushAction(() {
+      // If the branching condition is known statically, either or both of the
+      // branch continuations will be replaced by Unreachable. Clean up the
+      // branch afterwards.
+      if (trueCont.body is Unreachable && falseCont.body is Unreachable) {
+        destroyAndReplace(node, new Unreachable());
+      } else if (trueCont.body is Unreachable) {
+        destroyAndReplace(
+            node, new InvokeContinuation(falseCont, <Parameter>[]));
+      } else if (falseCont.body is Unreachable) {
+        destroyAndReplace(
+            node, new InvokeContinuation(trueCont, <Parameter>[]));
+      }
+    });
+    void pushTrue(makeConstraint()) {
+      pushAction(() {
+        makeConstraint();
+        push(trueCont);
+      });
+    }
+    void pushFalse(makeConstraint()) {
+      pushAction(() {
+        makeConstraint();
+        push(falseCont);
+      });
+    }
+    if (condition is ApplyBuiltinOperator &&
+        condition.arguments.length == 2 &&
+        isInt(condition.arguments[0].definition) &&
+        isInt(condition.arguments[1].definition)) {
+      SignedVariable v1 = getValue(condition.arguments[0].definition);
+      SignedVariable v2 = getValue(condition.arguments[1].definition);
+      switch (condition.operator) {
+        case BuiltinOperator.NumLe:
+          pushTrue(() => makeLessThanOrEqual(v1, v2));
+          pushFalse(() => makeGreaterThan(v1, v2));
+          return;
+        case BuiltinOperator.NumLt:
+          pushTrue(() => makeLessThan(v1, v2));
+          pushFalse(() => makeGreaterThanOrEqual(v1, v2));
+          return;
+        case BuiltinOperator.NumGe:
+          pushTrue(() => makeGreaterThanOrEqual(v1, v2));
+          pushFalse(() => makeLessThan(v1, v2));
+          return;
+        case BuiltinOperator.NumGt:
+          pushTrue(() => makeGreaterThan(v1, v2));
+          pushFalse(() => makeLessThanOrEqual(v1, v2));
+          return;
+        case BuiltinOperator.StrictEq:
+          pushTrue(() => makeEqual(v1, v2));
+          pushFalse(() => makeNotEqual(v1, v2));
+          return;
+        case BuiltinOperator.StrictNeq:
+          pushTrue(() => makeNotEqual(v1, v2));
+          pushFalse(() => makeEqual(v1, v2));
+          return;
+        default:
+      }
+    }
+
+    push(trueCont);
+    push(falseCont);
+  }
+
+  @override
+  void visitConstant(Constant node) {
+    // TODO(asgerf): It might be faster to inline the constant in the
+    //               constraints that reference it.
+    if (node.value.isInt) {
+      IntConstantValue constant = node.value;
+      makeConstant(getValue(node), constant.primitiveValue);
+    }
+  }
+
+  @override
+  void visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
+    if (node.operator != BuiltinOperator.NumAdd &&
+        node.operator != BuiltinOperator.NumSubtract) {
+      return;
+    }
+    if (!isInt(node.arguments[0].definition) ||
+        !isInt(node.arguments[1].definition)) {
+      return;
+    }
+    if (!isInt(node)) {
+      // TODO(asgerf): The result of this operation should always be an integer,
+      // but currently type propagation does not always prove this.
+      return;
+    }
+    // We have `v1 = v2 +/- v3`, but the octagon cannot represent constraints
+    // involving more than two variables. Check if one operand is a constant.
+    int getConstantArgument(int n) {
+      Primitive prim = node.arguments[n].definition;
+      if (prim is Constant && prim.value.isInt) {
+        IntConstantValue constant = prim.value;
+        return constant.primitiveValue;
+      }
+      return null;
+    }
+    int constant = getConstantArgument(0);
+    int operandIndex = 1;
+    if (constant == null) {
+      constant = getConstantArgument(1);
+      operandIndex = 0;
+    }
+    if (constant == null) {
+      // Neither argument was a constant.
+      // Classical octagon-based analyzers would compute upper and lower bounds
+      // for the two operands and add constraints for the result based on
+      // those.  For performance reasons we omit that.
+      // TODO(asgerf): It seems expensive, but we should evaluate it.
+      return;
+    }
+    SignedVariable v1 = getValue(node);
+    SignedVariable v2 = getValue(node.arguments[operandIndex].definition);
+
+    if (node.operator == BuiltinOperator.NumAdd) {
+      // v1 = v2 + const
+      makeFloatingPointSum(v1, v2, constant);
+    } else if (operandIndex == 0) {
+      // v1 = v2 - const
+      makeFloatingPointSum(v1, v2, -constant);
+    } else {
+      // v1 = const - v2   <==>   v1 = (-v2) + const
+      makeFloatingPointSum(v1, v2.negated, constant);
+    }
+  }
+
+  @override
+  void visitGetLength(GetLength node) {
+    valueOf[node] = getLength(node.object.definition, currentEffectNumber);
+  }
+
+  void analyzeLoopEntry(InvokeContinuation node) {
+    foundLoop = true;
+    Continuation cont = node.continuation.definition;
+    if (isStrongLoopPass) {
+      for (int i = 0; i < node.arguments.length; ++i) {
+        Parameter param = cont.parameters[i];
+        if (!isInt(param)) continue;
+        Primitive initialValue = node.arguments[i].definition;
+        SignedVariable initialVariable = getValue(initialValue);
+        Monotonicity mono = monotonicity[param];
+        if (mono == null) {
+          // Value never changes. This is extremely uncommon.
+          initialValue.substituteFor(param);
+        } else if (mono == Monotonicity.Increasing) {
+          makeGreaterThanOrEqual(getValue(param), initialVariable);
+        } else if (mono == Monotonicity.Decreasing) {
+          makeLessThanOrEqual(getValue(param), initialVariable);
+        }
+      }
+      if (loopsWithSideEffects.contains(cont)) {
+        currentEffectNumber = makeNewEffect();
+      }
+    } else {
+      // During the weak pass, conservatively make a new effect number in the
+      // loop body. This may be strengthened during the strong pass.
+      currentEffectNumber = effectNumberAt[cont] = makeNewEffect();
+    }
+    push(cont);
+  }
+
+  void analyzeLoopContinue(InvokeContinuation node) {
+    Continuation cont = node.continuation.definition;
+
+    // During the strong loop phase, there is no need to compute monotonicity,
+    // and we already put bounds on the loop variables when we went into the
+    // loop.
+    if (isStrongLoopPass) return;
+
+    // For each loop parameter, try to prove that the new value is definitely
+    // less/greater than its old value. When we fail to prove this, update the
+    // monotonicity flag accordingly.
+    for (int i = 0; i < node.arguments.length; ++i) {
+      Parameter param = cont.parameters[i];
+      if (!isInt(param)) continue;
+      SignedVariable arg = getValue(node.arguments[i].definition);
+      SignedVariable paramVar = getValue(param);
+      if (!isDefinitelyLessThanOrEqualTo(arg, paramVar)) {
+        // We couldn't prove that the value does not increase, so assume
+        // henceforth that it might be increasing.
+        markMonotonicity(cont.parameters[i], Monotonicity.Increasing);
+      }
+      if (!isDefinitelyGreaterThanOrEqualTo(arg, paramVar)) {
+        // We couldn't prove that the value does not decrease, so assume
+        // henceforth that it might be decreasing.
+        markMonotonicity(cont.parameters[i], Monotonicity.Decreasing);
+      }
+    }
+
+    // If a side effect has occurred between the entry and continue, mark
+    // the loop as having side effects.
+    if (currentEffectNumber != effectNumberAt[cont]) {
+      loopsWithSideEffects.add(cont);
+    }
+  }
+
+  void markMonotonicity(Parameter param, Monotonicity mono) {
+    Monotonicity current = monotonicity[param];
+    if (current == null) {
+      monotonicity[param] = mono;
+    } else if (current != mono) {
+      monotonicity[param] = Monotonicity.NotMonotone;
+    }
+  }
+
+  @override
+  void visitInvokeContinuation(InvokeContinuation node) {
+    Continuation cont = node.continuation.definition;
+    if (node.isRecursive) {
+      analyzeLoopContinue(node);
+    } else if (cont.isRecursive) {
+      analyzeLoopEntry(node);
+    } else {
+      int effect = effectNumberAt[cont];
+      if (effect == null) {
+        effectNumberAt[cont] = currentEffectNumber;
+      } else if (effect != currentEffectNumber && effect != NEW_EFFECT) {
+        effectNumberAt[cont] = NEW_EFFECT;
+      }
+      // TODO(asgerf): Compute join for parameters to increase precision?
+    }
+  }
+
+  // ---------------- CALL EXPRESSIONS --------------------
+
+  @override
+  void visitInvokeMethod(InvokeMethod node) {
+    // TODO(asgerf): What we really need is a "changes length" side effect flag.
+    if (world
+        .getSideEffectsOfSelector(node.selector, node.mask)
+        .changesIndex()) {
+      currentEffectNumber = makeNewEffect();
+    }
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitInvokeStatic(InvokeStatic node) {
+    if (world.getSideEffectsOfElement(node.target).changesIndex()) {
+      currentEffectNumber = makeNewEffect();
+    }
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitInvokeMethodDirectly(InvokeMethodDirectly node) {
+    FunctionElement target = node.target;
+    if (target is ConstructorBodyElement) {
+      ConstructorBodyElement body = target;
+      target = body.constructor;
+    }
+    if (world.getSideEffectsOfElement(target).changesIndex()) {
+      currentEffectNumber = makeNewEffect();
+    }
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitInvokeConstructor(InvokeConstructor node) {
+    if (world.getSideEffectsOfElement(node.target).changesIndex()) {
+      currentEffectNumber = makeNewEffect();
+    }
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitTypeCast(TypeCast node) {
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitGetLazyStatic(GetLazyStatic node) {
+    // TODO(asgerf): How do we get the side effects of a lazy field initializer?
+    currentEffectNumber = makeNewEffect();
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitForeignCode(ForeignCode node) {
+    if (node.nativeBehavior.sideEffects.changesIndex()) {
+      currentEffectNumber = makeNewEffect();
+    }
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitAwait(Await node) {
+    currentEffectNumber = makeNewEffect();
+    push(node.continuation.definition);
+  }
+
+  @override
+  void visitYield(Yield node) {
+    currentEffectNumber = makeNewEffect();
+    push(node.continuation.definition);
+  }
+
+  // ---------------- PRIMITIVES --------------------
+
+  @override
+  void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    Primitive receiver = node.receiver.definition;
+    int effectBefore = currentEffectNumber;
+    currentEffectNumber = makeNewEffect();
+    int effectAfter = currentEffectNumber;
+    SignedVariable lengthBefore = getLength(receiver, effectBefore);
+    SignedVariable lengthAfter = getLength(receiver, effectAfter);
+    switch (node.method) {
+      case BuiltinMethod.Push:
+        // after = before + count
+        int count = node.arguments.length;
+        makeExactSum(lengthAfter, lengthBefore, count);
+        break;
+
+      case BuiltinMethod.Pop:
+        // after = before - 1
+        makeExactSum(lengthAfter, lengthBefore, -1);
+        break;
+    }
+  }
+
+  @override
+  void visitLiteralList(LiteralList node) {
+    makeConstant(getLength(node, currentEffectNumber), node.values.length);
+  }
+
+  // ---------------- INTERIOR EXPRESSIONS --------------------
+
+  @override
+  Expression traverseContinuation(Continuation cont) {
+    if (octagon.isUnsolvable) {
+      destroyAndReplace(cont.body, new Unreachable());
+    } else {
+      int effect = effectNumberAt[cont];
+      if (effect != null) {
+        currentEffectNumber = effect == NEW_EFFECT ? makeNewEffect() : effect;
+      }
+    }
+    return cont.body;
+  }
+
+  @override
+  Expression traverseLetCont(LetCont node) {
+    // Join continuations should be pushed at declaration-site, so all their
+    // call sites are seen before they are analyzed.
+    // Other continuations are pushed at the use site.
+    for (Continuation cont in node.continuations) {
+      if (cont.hasAtLeastOneUse &&
+          !cont.isRecursive &&
+          cont.firstRef.parent is InvokeContinuation) {
+        push(cont);
+      }
+    }
+    return node.body;
+  }
+}
+
+/// Lattice representing the known (weak) monotonicity of a loop variable.
+///
+/// The lattice bottom is represented by `null` and represents the case where
+/// the loop variable never changes value during the loop.
+enum Monotonicity { NotMonotone, Increasing, Decreasing, }
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 28397eb..31f815a 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -29,6 +29,7 @@
   NumAdd,
   NumSubtract,
   NumMultiply,
+  NumDivide,
   NumAnd,
   NumOr,
   NumXor,
@@ -38,6 +39,22 @@
   NumGt,
   NumGe,
 
+  /// NumShr behaves like JS '>>>' but is valid only when the left is in the
+  /// uint32 range and the right in the range [0, 31].
+  NumShr,
+
+  /// NumRemainder corresponds to JavaScript's `a % b`, and Dart's
+  /// `a.remainder(b)`, except at zero, since JavaScript `1 % 0` is `NaN`.
+  /// Dart's modulo (`%`) is the same as remainder only when if both arguments
+  /// are non-negative.
+  NumRemainder,
+
+  /// Corresponds to `a ~/ b` when b is non-zero and the result fits in a signed
+  /// 32 bit value.
+  ///
+  /// This case can be compiled to  `(a / b) | 0`.
+  NumTruncatingDivideToSigned32,
+
   /// Concatenates any number of strings.
   ///
   /// Takes any number of arguments, and each argument must be a string.
@@ -103,6 +120,26 @@
   ///
   /// Compiles to `typeof x === 'number' && Math.floor(x) === x`
   IsNumberAndFloor,
+
+  /// Returns true if the argument is a fixed length Array.
+  ///
+  /// Uses one argument.
+  ///
+  /// Precondition: Argument is a JavaScript Array.
+  IsFixedLengthJSArray,
+
+  // TODO(sra): Remove this and replace with IsFalsy(IsFixedLengthJSArray(x)).
+  IsExtendableJSArray,
+
+  /// Returns true if the argument is an unmodifiable Array.
+  ///
+  /// Uses one argument.
+  ///
+  /// Precondition: Argument is a JavaScript Array.
+  IsUnmodifiableJSArray,
+
+  // TODO(sra): Remove this and replace with IsFalsy(IsUnmodifiableArray(x)).
+  IsModifiableJSArray,
 }
 
 /// A method supported natively in the CPS and Tree IRs using the
diff --git a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
index 4a1f340..7fc2ae3 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
@@ -83,6 +83,7 @@
     }
     if (context != null) {
       context.body = node;
+      node.parent = context;
     }
     context = null;
   }
@@ -297,4 +298,27 @@
     put(let);
     context = let;
   }
+
+  void insertBelow(InteriorNode node) {
+    assert(isOpen);
+    if (isEmpty) return;
+    Expression child = node.body;
+    node.body = root;
+    root.parent = node;
+    context.body = child;
+    child.parent = context;
+    root = context = null;
+  }
+
+  void insertAbove(InteriorExpression node) {
+    insertBelow(node.parent);
+  }
+}
+
+/// Removes [node], unlinking all its references and replaces it with [newNode].
+void destroyAndReplace(Expression node, Expression newNode) {
+  InteriorNode parent = node.parent;
+  RemovalVisitor.remove(node);
+  parent.body = newNode;
+  newNode.parent = parent;
 }
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 ca34d15..3f69cd0 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -4,6 +4,8 @@
 
 library dart2js.ir_builder;
 
+import '../closure.dart' hide ClosureScope;
+import '../common.dart';
 import '../common/names.dart' show
     Names,
     Selectors;
@@ -14,29 +16,28 @@
     ConstantValue,
     PrimitiveConstantValue;
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart';
 import '../io/source_information.dart';
+import '../js/js.dart' as js show
+    js,
+    LiteralStatement,
+    Template;
+import '../native/native.dart' show
+    NativeBehavior;
 import '../tree/tree.dart' as ast;
 import '../types/types.dart' show
     TypeMask;
-import '../closure.dart' hide ClosureScope;
 import '../universe/call_structure.dart' show
     CallStructure;
 import '../universe/selector.dart' show
     Selector,
     SelectorKind;
-import 'cps_ir_nodes.dart' as ir;
+
 import 'cps_ir_builder_task.dart' show
     DartCapturedVariables,
     GlobalProgramInformation;
+import 'cps_ir_nodes.dart' as ir;
 
-import '../common.dart' as types show
-    TypeMask;
-import '../js/js.dart' as js show Template, js, LiteralStatement;
-import '../native/native.dart' show
-    NativeBehavior;
 
 /// A mapping from variable elements to their compile-time values.
 ///
@@ -2696,7 +2697,7 @@
                                 NativeBehavior behavior,
                                 {Element dependency}) {
     assert(behavior != null);
-    types.TypeMask type = program.getTypeMaskForForeign(behavior);
+    TypeMask type = program.getTypeMaskForForeign(behavior);
     ir.Primitive result = _continueWithExpression((k) => new ir.ForeignCode(
         codeTemplate,
         type,
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 3d168d3..9f2ad07 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,6 +6,7 @@
 
 import '../closure.dart' as closurelib;
 import '../closure.dart' hide ClosureScope;
+import '../common.dart';
 import '../common/names.dart' show
     Names,
     Selectors;
@@ -15,10 +16,6 @@
     Compiler;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     SynthesizedConstructorElementX,
@@ -503,7 +500,7 @@
     ir.Primitive value = visit(node.expression);
     JumpTarget target = elements.getTargetDefinition(node);
     Element error =
-        (compiler.backend as JavaScriptBackend).getFallThroughError();
+        (compiler.backend as JavaScriptBackend).helpers.fallThroughError;
     irBuilder.buildSimpleSwitch(target, value, cases, defaultCase, error,
         sourceInformationBuilder.buildGeneric(node));
   }
@@ -2492,14 +2489,14 @@
   }
 
   FunctionElement get stringifyFunction {
-    return _backend.getStringInterpolationHelper();
+    return _backend.helpers.stringInterpolationHelper;
   }
 
-  FunctionElement get throwTypeErrorHelper => _backend.getThrowTypeError();
+  FunctionElement get throwTypeErrorHelper => _backend.helpers.throwTypeError;
 
   ClassElement get nullClass => _compiler.nullClass;
 
-  DartType unaliasType(DartType type) => type.unalias(_compiler.resolution);
+  DartType unaliasType(DartType type) => type.unaliased;
 
   TypeMask getTypeMaskForForeign(NativeBehavior behavior) {
     if (behavior == null) {
@@ -2513,7 +2510,7 @@
   }
 
   Element get closureConverter {
-    return _backend.getClosureConverter();
+    return _backend.helpers.closureConverter;
   }
 
   void addNativeMethod(FunctionElement function) {
@@ -3288,7 +3285,7 @@
   @override
   ir.Primitive buildStaticNoSuchMethod(Selector selector,
                                        List<ir.Primitive> arguments) {
-    Element thrower = backend.getThrowNoSuchMethod();
+    Element thrower = backend.helpers.throwNoSuchMethod;
     ir.Primitive receiver = irBuilder.buildStringConstant('');
     ir.Primitive name = irBuilder.buildStringConstant(selector.name);
     ir.Primitive argumentList = irBuilder.buildListLiteral(null, arguments);
@@ -3313,7 +3310,7 @@
   @override
   ir.Primitive buildRuntimeError(String message) {
     return irBuilder.buildStaticFunctionInvocation(
-        backend.getThrowRuntimeError(),
+        backend.helpers.throwRuntimeError,
         new CallStructure.unnamed(1),
         [irBuilder.buildStringConstant(message)]);
   }
@@ -3321,7 +3318,7 @@
   @override
   ir.Primitive buildAbstractClassInstantiationError(ClassElement element) {
     return irBuilder.buildStaticFunctionInvocation(
-        backend.getThrowAbstractClassInstantiationError(),
+        backend.helpers.throwAbstractClassInstantiationError,
         new CallStructure.unnamed(1),
         [irBuilder.buildStringConstant(element.name)]);
   }
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 88faa4d..dfc07a3 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart
@@ -24,9 +24,10 @@
 /// - Each definition object occurs only once in the IR (no redeclaring).
 /// - Each reference object occurs only once in the IR (no sharing).
 ///
-class CheckCpsIntegrity extends RecursiveVisitor {
+class CheckCpsIntegrity extends TrampolineRecursiveVisitor {
 
   FunctionDefinition topLevelNode;
+  String previousPass;
 
   Set<Definition> seenDefinitions = new Set<Definition>();
   Map<Definition, Set<Reference>> seenReferences =
@@ -52,8 +53,10 @@
     pushAction(() => insideContinuations.remove(cont));
   }
 
-  void check(FunctionDefinition node) {
+  void check(FunctionDefinition node, String previousPass) {
     topLevelNode = node;
+    this.previousPass = previousPass;
+    ParentChecker.checkParents(node, this);
     visit(node);
     // Check for broken reference chains. We check this last, so out-of-scope
     // references are not classified as a broken reference chain.
@@ -181,16 +184,58 @@
       try {
         Decorator decorator = (n, String s) => n == node ? '**$s**' : s;
         sexpr = new SExpressionStringifier(decorator).visit(topLevelNode);
+        sexpr = 'SExpr dump (offending node marked with **):\n\n$sexpr';
       } catch (e) {
         sexpr = '(Exception thrown by SExpressionStringifier: $e)';
       }
     } else {
-      sexpr = '(Set DUMP_IR flag to enable)';
+      sexpr = '(Set DUMP_IR flag to enable SExpr dump)';
     }
-    throw 'CPS integrity violation in ${topLevelNode.element}:\n'
+    throw 'CPS integrity violation\n'
+          'After $previousPass on ${topLevelNode.element}\n'
           '$message\n\n'
-          'SExpr dump (offending node marked with **):\n\n'
           '$sexpr\n';
   }
+}
 
+/// Traverses the CPS term and checks that node.parent is correctly set
+/// for each visited node.
+class ParentChecker extends DeepRecursiveVisitor {
+  static void checkParents(Node node, CheckCpsIntegrity main) {
+    ParentChecker visitor = new ParentChecker._make(main);
+    visitor._worklist.add(node);
+    visitor.trampoline();
+  }
+
+  ParentChecker._make(this.main);
+
+  Node _parent;
+  final List<Node> _worklist = <Node>[];
+  final CheckCpsIntegrity main;
+
+  void trampoline() {
+    while (_worklist.isNotEmpty) {
+      _parent = _worklist.removeLast();
+      _parent.accept(this);
+    }
+  }
+
+  error(String message, node) => main.error(message, node);
+
+  @override
+  visit(Node node) {
+    _worklist.add(node);
+    if (node.parent != _parent) {
+      error('Parent pointer on $node is ${node.parent} but should be $_parent',
+            node);
+    }
+  }
+
+  @override
+  processReference(Reference node) {
+    if (node.parent != _parent) {
+      error('Parent pointer on $node is ${node.parent} but should be $_parent',
+            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 19b0543..cbb45f0 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -28,7 +28,16 @@
   static int _usedHashCodes = 0;
   final int hashCode = ++_usedHashCodes;
 
+  Node() {
+    setParentPointers();
+  }
+
   accept(Visitor visitor);
+
+  /// Updates the [parent] of the immediate children to refer to this node.
+  ///
+  /// All constructors call this method to initialize parent pointers.
+  void setParentPointers();
 }
 
 /// Expressions can be evaluated, and may diverge, throw, and/or have
@@ -318,8 +327,12 @@
   }
 
   accept(Visitor visitor) => visitor.visitLetPrim(this);
-}
 
+  void setParentPointers() {
+    primitive.parent = this;
+    if (body != null) body.parent = this;
+  }
+}
 
 /// Binding continuations.
 ///
@@ -354,6 +367,11 @@
   }
 
   accept(Visitor visitor) => visitor.visitLetCont(this);
+
+  void setParentPointers() {
+    _setParentsOnNodes(continuations, this);
+    if (body != null) body.parent = this;
+  }
 }
 
 // Binding an exception handler.
@@ -372,6 +390,11 @@
   LetHandler(this.handler, this.body);
 
   accept(Visitor visitor) => visitor.visitLetHandler(this);
+
+  void setParentPointers() {
+    handler.parent = this;
+    if (body != null) body.parent = this;
+  }
 }
 
 /// Binding mutable variables.
@@ -396,6 +419,12 @@
   }
 
   accept(Visitor visitor) => visitor.visitLetMutable(this);
+
+  void setParentPointers() {
+    variable.parent = this;
+    value.parent = this;
+    if (body != null) body.parent = this;
+  }
 }
 
 /// Invoke a static function.
@@ -428,6 +457,11 @@
                            [this.sourceInformation]);
 
   accept(Visitor visitor) => visitor.visitInvokeStatic(this);
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+    continuation.parent = this;
+  }
 }
 
 /// Invoke a method on an object.
@@ -479,6 +513,12 @@
                            this.sourceInformation);
 
   accept(Visitor visitor) => visitor.visitInvokeMethod(this);
+
+  void setParentPointers() {
+    receiver.parent = this;
+    _setParentsOnList(arguments, this);
+    continuation.parent = this;
+  }
 }
 
 /// Invoke [target] on [receiver], bypassing dispatch and override semantics.
@@ -519,6 +559,12 @@
         this.continuation = new Reference<Continuation>(continuation);
 
   accept(Visitor visitor) => visitor.visitInvokeMethodDirectly(this);
+
+  void setParentPointers() {
+    receiver.parent = this;
+    _setParentsOnList(arguments, this);
+    continuation.parent = this;
+  }
 }
 
 /// Non-const call to a constructor.
@@ -554,6 +600,11 @@
         continuation = new Reference<Continuation>(cont);
 
   accept(Visitor visitor) => visitor.visitInvokeConstructor(this);
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+    continuation.parent = this;
+  }
 }
 
 /// An alias for [value] in a context where the value is known to satisfy
@@ -576,6 +627,10 @@
   accept(Visitor visitor) => visitor.visitRefinement(this);
 
   Primitive get effectiveDefinition => value.definition.effectiveDefinition;
+
+  void setParentPointers() {
+    value.parent = this;
+  }
 }
 
 /// An "is" type test.
@@ -589,29 +644,61 @@
   Reference<Primitive> value;
   final DartType dartType;
 
-  /// If [type] is an [InterfaceType], this holds the internal representation of
-  /// the type arguments to [type]. Since these may reference type variables
-  /// from the enclosing class, they are not constant.
+  /// If [dartType] is an [InterfaceType], this holds the internal
+  /// representation of the type arguments to [dartType]. Since these may
+  /// reference type variables from the enclosing class, they are not constant.
   ///
-  /// If [type] is a [TypeVariableType], this is a singleton list with
-  /// the internal representation of the type held in that type variable.
+  /// If [dartType] is a [TypeVariableType], this is a singleton list with the
+  /// internal representation of the type held in that type variable.
   ///
-  /// If [type] is a [FunctionType], this is a singleton list with the
+  /// If [dartType] is a [FunctionType], this is a singleton list with the
   /// internal representation of that type,
   ///
   /// Otherwise the list is empty.
   final List<Reference<Primitive>> typeArguments;
 
+  /// The Interceptor for [value].  May be `null` if the test can be done
+  /// without an interceptor.  May be the same as [value] after self-interceptor
+  /// optimization.
+  // TODO(24523): Remove this field.
+  Reference<Primitive> interceptor;
+
   TypeTest(Primitive value,
            this.dartType,
            List<Primitive> typeArguments)
-  : this.value = new Reference<Primitive>(value),
-    this.typeArguments = _referenceList(typeArguments);
+      : this.value = new Reference<Primitive>(value),
+        this.typeArguments = _referenceList(typeArguments);
 
   accept(Visitor visitor) => visitor.visitTypeTest(this);
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    value.parent = this;
+    _setParentsOnList(typeArguments, this);
+    if (interceptor != null) interceptor.parent = this;
+  }
+}
+
+/// An "is" type test for a raw type, performed by testing a flag property.
+///
+/// Returns `true` if [interceptor] is for [dartType].
+class TypeTestViaFlag extends Primitive {
+  Reference<Primitive> interceptor;
+  final DartType dartType;
+
+  TypeTestViaFlag(Primitive interceptor, this.dartType)
+      : this.interceptor = new Reference<Primitive>(interceptor);
+
+  accept(Visitor visitor) => visitor.visitTypeTestViaFlag(this);
+
+  bool get isSafeForElimination => true;
+  bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    interceptor.parent = this;
+  }
 }
 
 /// An "as" type cast.
@@ -641,6 +728,10 @@
         this.continuation = new Reference<Continuation>(cont);
 
   accept(Visitor visitor) => visitor.visitTypeCast(this);
+
+  void setParentPointers() {
+    value.parent = this;
+  }
 }
 
 /// Apply a built-in operator.
@@ -660,6 +751,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+  }
 }
 
 /// Apply a built-in method.
@@ -685,6 +780,11 @@
 
   bool get isSafeForElimination => false;
   bool get isSafeForReordering => false;
+
+  void setParentPointers() {
+    receiver.parent = this;
+    _setParentsOnList(arguments, this);
+  }
 }
 
 /// Throw a value.
@@ -697,6 +797,10 @@
   Throw(Primitive value) : value = new Reference<Primitive>(value);
 
   accept(Visitor visitor) => visitor.visitThrow(this);
+
+  void setParentPointers() {
+    value.parent = this;
+  }
 }
 
 /// Rethrow
@@ -706,6 +810,7 @@
 /// the same stack trace as the enclosing handler.
 class Rethrow extends TailExpression {
   accept(Visitor visitor) => visitor.visitRethrow(this);
+  void setParentPointers() {}
 }
 
 /// An expression that is known to be unreachable.
@@ -714,6 +819,7 @@
 /// known never to invoke it, e.g. because the calling expression always throws.
 class Unreachable extends TailExpression {
   accept(Visitor visitor) => visitor.visitUnreachable(this);
+  void setParentPointers() {}
 }
 
 /// Gets the value from a [MutableVariable].
@@ -733,6 +839,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => false;
+
+  void setParentPointers() {
+    variable.parent = this;
+  }
 }
 
 /// Assign a [MutableVariable].
@@ -753,6 +863,11 @@
 
   bool get isSafeForElimination => false;
   bool get isSafeForReordering => false;
+
+  void setParentPointers() {
+    variable.parent = this;
+    value.parent = this;
+  }
 }
 
 /// Invoke a continuation in tail position.
@@ -791,6 +906,11 @@
         sourceInformation = null;
 
   accept(Visitor visitor) => visitor.visitInvokeContinuation(this);
+
+  void setParentPointers() {
+    if (continuation != null) continuation.parent = this;
+    if (arguments != null) _setParentsOnList(arguments, this);
+  }
 }
 
 /// Choose between a pair of continuations based on a condition value.
@@ -825,6 +945,12 @@
         this.isStrictCheck = false;
 
   accept(Visitor visitor) => visitor.visitBranch(this);
+
+  void setParentPointers() {
+    condition.parent = this;
+    trueContinuation.parent = this;
+    falseContinuation.parent = this;
+  }
 }
 
 /// Directly assigns to a field on a given object.
@@ -841,6 +967,11 @@
 
   bool get isSafeForElimination => false;
   bool get isSafeForReordering => false;
+
+  void setParentPointers() {
+    object.parent = this;
+    value.parent = this;
+  }
 }
 
 /// Directly reads from a field on a given object.
@@ -864,6 +995,10 @@
   bool get isSafeForReordering => false;
 
   toString() => 'GetField($field)';
+
+  void setParentPointers() {
+    object.parent = this;
+  }
 }
 
 /// Get the length of a string or native list.
@@ -879,6 +1014,10 @@
   bool get isSafeForReordering => false;
 
   accept(Visitor v) => v.visitGetLength(this);
+
+  void setParentPointers() {
+    object.parent = this;
+  }
 }
 
 /// Read an entry from a string or native list.
@@ -900,6 +1039,11 @@
   bool get isSafeForReordering => false;
 
   accept(Visitor v) => v.visitGetIndex(this);
+
+  void setParentPointers() {
+    object.parent = this;
+    index.parent = this;
+  }
 }
 
 /// Set an entry on a native list.
@@ -921,6 +1065,12 @@
   bool get isSafeForReordering => false;
 
   accept(Visitor v) => v.visitSetIndex(this);
+
+  void setParentPointers() {
+    object.parent = this;
+    index.parent = this;
+    value.parent = this;
+  }
 }
 
 /// Reads the value of a static field or tears off a static method.
@@ -941,6 +1091,8 @@
   bool get isSafeForReordering {
     return element is FunctionElement || element.isFinal;
   }
+
+  void setParentPointers() {}
 }
 
 /// Sets the value of a static field.
@@ -956,6 +1108,10 @@
 
   bool get isSafeForElimination => false;
   bool get isSafeForReordering => false;
+
+  void setParentPointers() {
+    value.parent = this;
+  }
 }
 
 /// Reads the value of a lazily initialized static field.
@@ -975,6 +1131,10 @@
       : continuation = new Reference<Continuation>(continuation);
 
   accept(Visitor visitor) => visitor.visitGetLazyStatic(this);
+
+  void setParentPointers() {
+    continuation.parent = this;
+  }
 }
 
 /// Creates an object for holding boxed variables captured by a closure.
@@ -983,6 +1143,8 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {}
 }
 
 /// Creates an instance of a class and initializes its fields and runtime type
@@ -1015,6 +1177,11 @@
   bool get isSafeForReordering => true;
 
   toString() => 'CreateInstance($classElement)';
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+    if (typeInformation != null) _setParentsOnList(typeInformation, this);
+  }
 }
 
 class Interceptor extends Primitive {
@@ -1041,6 +1208,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    input.parent = this;
+  }
 }
 
 /// Create an instance of [Invocation] for use in a call to `noSuchMethod`.
@@ -1055,6 +1226,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+  }
 }
 
 class ForeignCode extends CallExpression {
@@ -1071,6 +1246,11 @@
         this.continuation = new Reference<Continuation>(continuation);
 
   accept(Visitor visitor) => visitor.visitForeignCode(this);
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+    continuation.parent = this;
+  }
 }
 
 class Constant extends Primitive {
@@ -1085,6 +1265,8 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {}
 }
 
 class LiteralList extends Primitive {
@@ -1099,6 +1281,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    _setParentsOnList(values, this);
+  }
 }
 
 class LiteralMapEntry {
@@ -1120,6 +1306,13 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    for (LiteralMapEntry entry in entries) {
+      entry.key.parent = this;
+      entry.value.parent = this;
+    }
+  }
 }
 
 /// Currently unused.
@@ -1141,6 +1334,8 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {}
 }
 
 class Parameter extends Primitive {
@@ -1148,18 +1343,14 @@
     super.hint = hint;
   }
 
-  // In addition to a parent pointer to the containing Continuation or
-  // FunctionDefinition, parameters have an index into the list of parameters
-  // bound by the parent.  This gives constant-time access to the continuation
-  // from the parent.
-  int parentIndex;
-
   accept(Visitor visitor) => visitor.visitParameter(this);
 
   String toString() => 'Parameter(${hint == null ? null : hint.name})';
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {}
 }
 
 /// Continuations are normally bound by 'let cont'.  A continuation with one
@@ -1169,11 +1360,6 @@
   final List<Parameter> parameters;
   Expression body = null;
 
-  // In addition to a parent pointer to the containing LetCont, continuations
-  // have an index into the list of continuations bound by the LetCont.  This
-  // gives constant-time access to the continuation from the parent.
-  int parent_index;
-
   // A continuation is recursive if it has any recursive invocations.
   bool isRecursive;
 
@@ -1186,6 +1372,11 @@
       isRecursive = false;
 
   accept(Visitor visitor) => visitor.visitContinuation(this);
+
+  void setParentPointers() {
+    _setParentsOnNodes(parameters, this);
+    if (body != null) body.parent = this;
+  }
 }
 
 /// Common interface for [Primitive] and [MutableVariable].
@@ -1203,6 +1394,8 @@
   MutableVariable(this.hint);
 
   accept(Visitor v) => v.visitMutableVariable(this);
+
+  void setParentPointers() {}
 }
 
 /// A function definition, consisting of parameters and a body.
@@ -1223,6 +1416,13 @@
       this.body);
 
   accept(Visitor visitor) => visitor.visitFunctionDefinition(this);
+
+  void setParentPointers() {
+    if (thisParameter != null) thisParameter.parent = this;
+    _setParentsOnNodes(parameters, this);
+    returnContinuation.parent = this;
+    if (body != null) body.parent = this;
+  }
 }
 
 /// Converts the internal representation of a type to a Dart object of type
@@ -1242,6 +1442,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    value.parent = this;
+  }
 }
 
 /// Read the value the type variable [variable] from the target object.
@@ -1262,6 +1466,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    target.parent = this;
+  }
 }
 
 /// Representation of a closed type (that is, a type without type variables).
@@ -1287,6 +1495,10 @@
 
   bool get isSafeForElimination => true;
   bool get isSafeForReordering => true;
+
+  void setParentPointers() {
+    _setParentsOnList(arguments, this);
+  }
 }
 
 class Await extends CallExpression {
@@ -1301,6 +1513,11 @@
   accept(Visitor visitor) {
     return visitor.visitAwait(this);
   }
+
+  void setParentPointers() {
+    input.parent = this;
+    continuation.parent = this;
+  }
 }
 
 class Yield extends CallExpression {
@@ -1316,12 +1533,29 @@
   accept(Visitor visitor) {
     return visitor.visitYield(this);
   }
+
+  void setParentPointers() {
+    input.parent = this;
+    continuation.parent = this;
+  }
 }
 
 List<Reference<Primitive>> _referenceList(Iterable<Primitive> definitions) {
   return definitions.map((e) => new Reference<Primitive>(e)).toList();
 }
 
+void _setParentsOnNodes(List<Node> nodes, Node parent) {
+  for (Node node in nodes) {
+    node.parent = parent;
+  }
+}
+
+void _setParentsOnList(List<Reference> nodes, Node parent) {
+  for (Reference node in nodes) {
+    node.parent = parent;
+  }
+}
+
 abstract class Visitor<T> {
   const Visitor();
 
@@ -1371,6 +1605,7 @@
   T visitTypeExpression(TypeExpression node);
   T visitCreateInvocationMirror(CreateInvocationMirror node);
   T visitTypeTest(TypeTest node);
+  T visitTypeTestViaFlag(TypeTestViaFlag node);
   T visitApplyBuiltinOperator(ApplyBuiltinOperator node);
   T visitApplyBuiltinMethod(ApplyBuiltinMethod node);
   T visitGetLength(GetLength node);
@@ -1382,13 +1617,20 @@
   T visitForeignCode(ForeignCode node);
 }
 
-/// Visits all non-recursive children of a CPS term, i.e. anything
-/// not of type [Expression] or [Continuation].
+/// Recursively visits all children of a CPS term.
+///
+/// The user of the class is responsible for avoiding stack overflows from
+/// deep recursion, e.g. by overriding methods to cut off recursion at certain
+/// points.
+///
+/// All recursive invocations occur through the [visit] method, which the
+/// subclass may override as a generic way to control the visitor without
+/// overriding all visitor methods.
 ///
 /// The `process*` methods are called in pre-order for every node visited.
 /// These can be overridden without disrupting the visitor traversal.
-class LeafVisitor implements Visitor {
-  const LeafVisitor();
+class DeepRecursiveVisitor implements Visitor {
+  const DeepRecursiveVisitor();
 
   visit(Node node) => node.accept(this);
 
@@ -1400,25 +1642,36 @@
     if (node.thisParameter != null) visit(node.thisParameter);
     node.parameters.forEach(visit);
     visit(node.returnContinuation);
+    visit(node.body);
+  }
+
+  processContinuation(Continuation node) {}
+  visitContinuation(Continuation node) {
+    processContinuation(node);
+    node.parameters.forEach(visit);
+    if (node.body != null) visit(node.body);
   }
 
   // Expressions.
-
   processLetPrim(LetPrim node) {}
   visitLetPrim(LetPrim node) {
     processLetPrim(node);
     visit(node.primitive);
+    visit(node.body);
   }
 
   processLetCont(LetCont node) {}
   visitLetCont(LetCont node) {
     processLetCont(node);
     node.continuations.forEach(visit);
+    visit(node.body);
   }
 
   processLetHandler(LetHandler node) {}
   visitLetHandler(LetHandler node) {
     processLetHandler(node);
+    visit(node.handler);
+    visit(node.body);
   }
 
   processLetMutable(LetMutable node) {}
@@ -1426,6 +1679,7 @@
     processLetMutable(node);
     visit(node.variable);
     processReference(node.value);
+    visit(node.body);
   }
 
   processInvokeStatic(InvokeStatic node) {}
@@ -1496,9 +1750,16 @@
   visitTypeTest(TypeTest node) {
     processTypeTest(node);
     processReference(node.value);
+    if (node.interceptor != null) processReference(node.interceptor);
     node.typeArguments.forEach(processReference);
   }
 
+  processTypeTestViaFlag(TypeTestViaFlag node) {}
+  visitTypeTestViaFlag(TypeTestViaFlag node) {
+    processTypeTestViaFlag(node);
+    processReference(node.interceptor);
+  }
+
   processSetMutable(SetMutable node) {}
   visitSetMutable(SetMutable node) {
     processSetMutable(node);
@@ -1554,12 +1815,6 @@
     processParameter(node);
   }
 
-  processContinuation(Continuation node) {}
-  visitContinuation(Continuation node) {
-    processContinuation(node);
-    node.parameters.forEach(visitParameter);
-  }
-
   processInterceptor(Interceptor node) {}
   visitInterceptor(Interceptor node) {
     processInterceptor(node);
@@ -1720,7 +1975,7 @@
 ///
 /// Subclasses should not override the `visit` methods for the nodes that have
 /// a `traverse` method.
-class RecursiveVisitor extends LeafVisitor {
+class TrampolineRecursiveVisitor extends DeepRecursiveVisitor {
   List<StackAction> _stack = <StackAction>[];
 
   void pushAction(StackAction callback) {
@@ -1815,7 +2070,7 @@
 }
 
 /// Visit a just-deleted subterm and unlink all [Reference]s in it.
-class RemovalVisitor extends RecursiveVisitor {
+class RemovalVisitor extends TrampolineRecursiveVisitor {
   processReference(Reference reference) {
     reference.unlink();
   }
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 3fd8503..79164b5 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
@@ -9,8 +9,6 @@
 import 'cps_ir_nodes.dart';
 import '../universe/call_structure.dart' show
     CallStructure;
-import '../universe/selector.dart' show
-    Selector;
 
 /// A [Decorator] is a function used by [SExpressionStringifier] to augment the
 /// output produced for a node or reference.  It can be provided to the
@@ -243,7 +241,15 @@
   String visitTypeTest(TypeTest node) {
     String value = access(node.value);
     String typeArguments = node.typeArguments.map(access).join(' ');
-    return '(TypeTest $value ${node.dartType} ($typeArguments))';
+    String interceptor = node.interceptor == null
+        ? ''
+        : access(node.interceptor);
+    return '(TypeTest $value ${node.dartType} ($typeArguments) ($interceptor))';
+  }
+
+  String visitTypeTestViaFlag(TypeTestViaFlag node) {
+    String interceptor = access(node.interceptor);
+    return '(TypeTestViaFlag $interceptor ${node.dartType})';
   }
 
   String visitLiteralList(LiteralList node) {
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 a969bdb..1b4d2f4 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -238,6 +238,21 @@
     printStmt(dummy, "Branch $condition ($trueCont, $falseCont) $strict");
   }
 
+  visitAwait(cps_ir.Await node) {
+    String dummy = names.name(node);
+    String value = formatReference(node.input);
+    String continuation = formatReference(node.continuation);
+    printStmt(dummy, 'Await $value $continuation');
+  }
+
+  visitYield(cps_ir.Yield node) {
+    String dummy = names.name(node);
+    String name = node.hasStar ? 'YieldStar' : 'Yield';
+    String value = formatReference(node.input);
+    String continuation = formatReference(node.continuation);
+    printStmt(dummy, '$name $value $continuation');
+  }
+
   visitSetMutable(cps_ir.SetMutable node) {
     String variable = names.name(node.variable.definition);
     String value = formatReference(node.value);
@@ -346,7 +361,15 @@
   visitTypeTest(cps_ir.TypeTest node) {
     String value = formatReference(node.value);
     String args = node.typeArguments.map(formatReference).join(', ');
-    return "TypeTest ($value ${node.dartType} ($args))";
+    String interceptor = node.interceptor == null
+        ? ''
+        : ' ${formatReference(node.interceptor)}';
+    return "TypeTest ($value ${node.dartType} ($args)$interceptor)";
+  }
+
+  visitTypeTestViaFlag(cps_ir.TypeTestViaFlag node) {
+    String interceptor = formatReference(node.interceptor);
+    return "TypeTestViaFlag ($interceptor ${node.dartType})";
   }
 
   visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
@@ -390,20 +413,6 @@
   }
 
   @override
-  visitAwait(cps_ir.Await node) {
-    String value = formatReference(node.input);
-    String continuation = formatReference(node.continuation);
-    return 'Await $value $continuation';
-  }
-
-  @override
-  visitYield(cps_ir.Yield node) {
-    String value = formatReference(node.input);
-    String continuation = formatReference(node.continuation);
-    return 'Yield $value $continuation';
-  }
-
-  @override
   visitRefinement(cps_ir.Refinement node) {
     String value = formatReference(node.value);
     return 'Refinement $value ${node.type}';
@@ -643,6 +652,10 @@
     unexpectedNode(node);
   }
 
+  visitTypeTestViaFlag(cps_ir.TypeTestViaFlag node) {
+    unexpectedNode(node);
+  }
+
   visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
     unexpectedNode(node);
   }
diff --git a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
index afea3976..e9a0364 100644
--- a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart
@@ -5,13 +5,8 @@
 library cps_ir.optimization.insert_refinements;
 
 import 'optimizers.dart' show Pass;
-import 'shrinking_reductions.dart' show ParentVisitor;
 import 'cps_ir_nodes.dart';
-import '../types/constants.dart';
-import '../constants/values.dart';
 import '../common/names.dart';
-import '../universe/universe.dart';
-import '../elements/elements.dart';
 import '../types/types.dart' show TypeMask;
 import 'type_mask_system.dart';
 
@@ -23,7 +18,7 @@
 ///
 /// Refinement nodes are inserted after a method invocation to refine the
 /// receiver to the types that can respond to the given selector.
-class InsertRefinements extends RecursiveVisitor implements Pass {
+class InsertRefinements extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Insert refinement nodes';
 
   final TypeMaskSystem types;
@@ -34,7 +29,6 @@
   InsertRefinements(this.types);
 
   void rewrite(FunctionDefinition node) {
-    new ParentVisitor().visit(node);
     visit(node.body);
   }
 
@@ -121,7 +115,8 @@
     } else {
       // Filter away receivers that throw on this selector.
       TypeMask type = types.receiverTypeFor(node.selector, node.mask);
-      pushRefinement(cont, new Refinement(receiver, type));
+      Refinement refinement = new Refinement(receiver, type);
+      pushRefinement(cont, refinement);
     }
   }
 
diff --git a/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart b/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
index e2252c4..d4630b5 100644
--- a/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
+++ b/pkg/compiler/lib/src/cps_ir/mutable_ssa.dart
@@ -12,7 +12,7 @@
 ///
 /// We do not rewrite variables that have an assignment inside a try block that
 /// does not contain its declaration.
-class MutableVariablePreanalysis extends RecursiveVisitor {
+class MutableVariablePreanalysis extends TrampolineRecursiveVisitor {
   // Number of try blocks enclosing the current position.
   int currentDepth = 0;
 
diff --git a/pkg/compiler/lib/src/cps_ir/octagon.dart b/pkg/compiler/lib/src/cps_ir/octagon.dart
new file mode 100644
index 0000000..8dfd5f1
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/octagon.dart
@@ -0,0 +1,215 @@
+// 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.cps_ir.octagon;
+
+/// For every variable in the constraint system, two [SignedVariable]s exist,
+/// representing the positive and negative uses of the variable.
+///
+/// For instance, `v1 - v2` is represented as `v1 + (-v2)`, with -v2 being
+/// a "negative use" of v2.
+class SignedVariable {
+  /// Negated version of this variable.
+  SignedVariable _negated;
+  SignedVariable get negated => _negated;
+
+  /// Constraints that mention this signed variable.
+  final List<Constraint> _constraints = <Constraint>[];
+
+  static int _hashCount = 0;
+  final int hashCode = (_hashCount = _hashCount + 1) & 0x0fffffff;
+
+  /// Temporary field used by the constraint solver's graph search.
+  bool _isBeingVisited = false;
+
+  SignedVariable._make() {
+    _negated = new SignedVariable._makeTwin(this);
+  }
+
+  SignedVariable._makeTwin(this._negated);
+}
+
+/// A constraint of form `v1 + v2 <= k`.
+class Constraint {
+  final SignedVariable v1, v2;
+  final int bound;
+
+  Constraint(this.v1, this.v2, this.bound);
+}
+
+/// A system of constraints of form `v1 + v2 <= k`.
+///
+/// Constraints can be added and removed in stack-order.  The octagon will
+/// always determine whether it is in a solvable state, but will otherwise
+/// not optimize its internal representation.
+///
+/// There is currently no support for querying the upper and lower bounds
+/// of a variable, (which can be used to approximate ternary constraints
+/// `v1 + v2 + v3 <= k`), but it is something we could consider adding.
+class Octagon {
+  /// Number of constraints that have been added since the constraint system
+  /// became unsolvable (including the constraint that made it unsolvable).
+  ///
+  /// This is well-defined because constraints are pushed/popped in stack order.
+  int _unsolvableCounter = 0;
+
+  /// True if the constraint system is unsolvable in its current state.
+  ///
+  /// It will remain unsolvable until a number of constraints have been popped.
+  bool get isUnsolvable => _unsolvableCounter > 0;
+
+  /// True if the constraint system is solvable in its current state.
+  bool get isSolvable => _unsolvableCounter == 0;
+
+  /// Make a new variable, optionally with known lower and upper bounds
+  /// (both inclusive).
+  ///
+  /// The constraints generated for [min] and [max] are also expressible using
+  /// [Constraint] objects, but the constraints added in [makeVariable] live
+  /// outside the stack discipline (i.e. the bounds are never popped), which is
+  /// useful when generating variables on-the-fly.
+  SignedVariable makeVariable([int min, int max]) {
+    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));
+    }
+    if (max != null) {
+      // v1 <= max   <==>   v1 + v1 <= 2 * max
+      v1._constraints.add(new Constraint(v1, v1, 2 * max));
+    }
+    return v1;
+  }
+
+  /// Add the constraint `v1 + v2 <= k`.
+  ///
+  /// The constraint should be removed again using [popConstraint].
+  void pushConstraint(Constraint constraint) {
+    if (_unsolvableCounter > 0) {
+      ++_unsolvableCounter;
+    }
+    constraint.v1._constraints.add(constraint);
+    if (constraint.v1 != constraint.v2) {
+      constraint.v2._constraints.add(constraint);
+    }
+    // Check if this constraint has made the system unsolvable.
+    if (_unsolvableCounter == 0 && _checkUnsolvable(constraint)) {
+      _unsolvableCounter = 1;
+    }
+  }
+
+  /// Remove a constraint that was previously added with [pushConstraint].
+  ///
+  /// Constraints must be added and removed in stack-order.
+  void popConstraint(Constraint constraint) {
+    assert(constraint.v1._constraints.last == constraint);
+    assert(constraint.v2._constraints.last == constraint);
+    constraint.v1._constraints.removeLast();
+    if (constraint.v1 != constraint.v2) {
+      constraint.v2._constraints.removeLast();
+    }
+    if (_unsolvableCounter > 0) {
+      --_unsolvableCounter;
+    }
+  }
+
+  // Temporaries using during path finding.
+  SignedVariable _goal;
+  Map<SignedVariable, int> _distanceToGoal;
+
+  /// Return true if the recently added [constraint] made the system unsolvable.
+  ///
+  /// This function assumes the system was solvable before adding [constraint].
+  bool _checkUnsolvable(Constraint constraint) {
+    // Constraints are transitively composed like so:
+    //    v1 - v2 <= k1
+    //    v2 - v3 <= k2
+    // implies:
+    //    v1 - v3 <= k1 + k2
+    //
+    // We construct a graph such that the tightest bound on `v1 - v3` is the
+    // weight of the shortest path from `v1` to `v3`.
+    //
+    // Ever constraint `v1 - v2 <= k` gives rise to two edges:
+    //     (v1)  --k--> (v2)
+    //     (-v2) --k--> (-v2)
+    //
+    // The system is unsolvable if and only if a negative-weight cycle exists
+    // in this graph (this corresponds to a variable being less than itself).
+
+    // We assume the system was solvable to begin with, so we only look for
+    // cycles that use the new edges.
+    //
+    // The new [constraint] `v1 + v2 <= k` just added the edges:
+    //     (v1)  --k--> (-v2)
+    //     (v2)  --k--> (-v1)
+    //
+    // Look for a path from (-v2) to (v1) with weight at most -k-1, as this
+    // will complete a negative-weight cycle.
+
+    // It suffices to do this once. We need not check for the converse path
+    // (-v1) to (v2) because of the symmetry in the graph.
+    //
+    // Note that the graph symmetry is not a redundancy. Some cycles include
+    // both of the new edges at once, so they must be added to the graph
+    // beforehand.
+    _goal = constraint.v2;
+    _distanceToGoal = <SignedVariable, int>{};
+    int targetWeight = -constraint.bound - 1;
+    int pathWeight = _search(constraint.v1.negated, targetWeight, 0);
+    return pathWeight != null && pathWeight <= targetWeight;
+  }
+
+  static const int MAX_DEPTH = 100;
+
+  /// Returns the shortest path from [v1] to [_goal] (or any path shorter than
+  /// [budget]), or `null` if no path exists.
+  int _search(SignedVariable v1, int budget, int depth) {
+    if (v1 == _goal && budget >= 0) return 0;
+
+    // Disregard paths that use a lot of edges.
+    // In extreme cases (e.g. hundreds of `push` calls or nested ifs) this can
+    // get slow and/or overflow the stack.  Most paths that matter are very
+    // short (1-5 edges) with some occasional 10-30 length paths in math code.
+    if (depth >= MAX_DEPTH) return null;
+
+    // We found a cycle, but not the one we're looking for. If the constraint
+    // system was solvable to being with, then this must be a positive-weight
+    // cycle, and no shortest path goes through a positive-weight cycle.
+    if (v1._isBeingVisited) return null;
+
+    // Check if we have previously searched from here.
+    if (_distanceToGoal.containsKey(v1)) {
+      // We have already searched this node, return the cached answer.
+      // Note that variables may explicitly map to null, so the double lookup
+      // is necessary.
+      return _distanceToGoal[v1];
+    }
+
+    v1._isBeingVisited = true;
+
+    int shortestDistance = v1 == _goal ? 0 : null;
+    for (Constraint c in v1._constraints) {
+      SignedVariable v2 = c.v1 == v1 ? c.v2 : c.v1;
+      int distance = _search(v2.negated, budget - c.bound, depth + 1);
+      if (distance != null) {
+        distance += c.bound; // Pay the cost of using the edge.
+         if (distance <= budget) {
+          // Success! We found a path that is short enough so return fast.
+          // All recursive calls will now return immediately, so there is no
+          // need to update distanceToGoal, but we need to clear the
+          // beingVisited flag for the next query.
+          v1._isBeingVisited = false;
+          return distance;
+        } else if (shortestDistance == null || distance < shortestDistance) {
+          shortestDistance = distance;
+        }
+      }
+    }
+    v1._isBeingVisited = false;
+    _distanceToGoal[v1] = shortestDistance;
+    return shortestDistance;
+  }
+}
diff --git a/pkg/compiler/lib/src/cps_ir/optimizers.dart b/pkg/compiler/lib/src/cps_ir/optimizers.dart
index 1f7f02e..336806d 100644
--- a/pkg/compiler/lib/src/cps_ir/optimizers.dart
+++ b/pkg/compiler/lib/src/cps_ir/optimizers.dart
@@ -11,11 +11,13 @@
 export 'scalar_replacement.dart' show ScalarReplacer;
 export 'redundant_phi.dart' show RedundantPhiEliminator;
 export 'redundant_join.dart' show RedundantJoinEliminator;
-export 'shrinking_reductions.dart' show ShrinkingReducer, ParentVisitor;
+export 'shrinking_reductions.dart' show ShrinkingReducer;
 export 'mutable_ssa.dart' show MutableVariableEliminator;
 export 'insert_refinements.dart' show InsertRefinements;
 export 'remove_refinements.dart' show RemoveRefinements;
 export 'share_interceptors.dart' show ShareInterceptors;
+export 'bounds_checker.dart' show BoundsChecker;
+export 'parent_visitor.dart' show ParentVisitor;
 
 /// An optimization pass over the CPS IR.
 abstract class Pass {
diff --git a/pkg/compiler/lib/src/cps_ir/parent_visitor.dart b/pkg/compiler/lib/src/cps_ir/parent_visitor.dart
new file mode 100644
index 0000000..33896e0
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/parent_visitor.dart
@@ -0,0 +1,43 @@
+// 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 cps_ir.parent_visitor;
+
+import 'cps_ir_nodes.dart';
+
+/// Traverses the CPS term and sets node.parent for each visited node.
+class ParentVisitor extends DeepRecursiveVisitor {
+  static void setParents(Node node) {
+    ParentVisitor visitor = new ParentVisitor._make();
+    visitor._worklist.add(node);
+    visitor.trampoline();
+  }
+
+  /// Private to avoid accidental `new ParentVisitor().visit(node)` calls.
+  ParentVisitor._make();
+
+  Node _parent;
+  final List<Node> _worklist = <Node>[];
+
+  void trampoline() {
+    while (_worklist.isNotEmpty) {
+      _parent = _worklist.removeLast();
+      _parent.accept(this);
+    }
+  }
+
+  @override
+  visit(Node node) {
+    _worklist.add(node);
+    assert(_parent != node);
+    assert(_parent != null);
+    node.parent = _parent;
+  }
+
+  @override
+  processReference(Reference node) {
+    node.parent = _parent;
+  }
+}
+
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_join.dart b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
index d07d519..92f64ae 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_join.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_join.dart
@@ -19,7 +19,7 @@
 /// one continuation. The reference chains for parameters are therefore 
 /// meaningless during this pass, until repaired by [AlphaRenamer] at
 /// the end.
-class RedundantJoinEliminator extends RecursiveVisitor implements Pass {
+class RedundantJoinEliminator extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Redundant join elimination';
 
   final Set<Branch> workSet = new Set<Branch>();
@@ -139,7 +139,7 @@
           Expression use = ref.parent;
           if (use is InvokeContinuation) {
             for (Parameter param in branchCont.parameters) {
-              use.arguments.add(new Reference<Primitive>(param));
+              use.arguments.add(new Reference<Primitive>(param)..parent = use);
             }
           } else {
             // The branch will be eliminated, so don't worry about updating it.
@@ -215,7 +215,7 @@
 /// 
 /// This returns the IR to its normal form after redundant joins have been
 /// eliminated.
-class AlphaRenamer extends RecursiveVisitor {
+class AlphaRenamer extends TrampolineRecursiveVisitor {
   Map<Parameter, Parameter> renaming = <Parameter, Parameter>{};
 
   processContinuation(Continuation cont) {
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
index 693b612..183f8e3 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
@@ -15,16 +15,13 @@
 /// (except for feedback). Redundant parameters are removed from the
 /// continuation signature, all invocations, and replaced within the
 /// continuation body.
-class RedundantPhiEliminator extends RecursiveVisitor implements Pass {
+class RedundantPhiEliminator extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Redundant phi elimination';
 
   final Set<Continuation> workSet = new Set<Continuation>();
 
   @override
   void rewrite(FunctionDefinition root) {
-    // Set all parent pointers.
-    new ParentVisitor().visit(root);
-
     // Traverse the tree once to build the work set.
     visit(root);
 
diff --git a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
index 4d7aae3..98f1c17 100644
--- a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
@@ -5,18 +5,16 @@
 library cps_ir.optimization.remove_refinements;
 
 import 'optimizers.dart' show Pass;
-import 'shrinking_reductions.dart' show ParentVisitor;
 import 'cps_ir_nodes.dart';
 
 /// Removes all [Refinement] nodes from the IR.
 ///
 /// This simplifies subsequent passes that don't rely on path-sensitive
 /// type information but depend on equality between primitives.
-class RemoveRefinements extends RecursiveVisitor implements Pass {
+class RemoveRefinements extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Remove refinement nodes';
 
   void rewrite(FunctionDefinition node) {
-    new ParentVisitor().visit(node);
     visit(node);
   }
 
diff --git a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
index 4de0cab..0ff315c 100644
--- a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
+++ b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
@@ -7,30 +7,14 @@
 
 import 'dart:collection' show Queue;
 
-import '../closure.dart' show
-    ClosureClassElement;
-import '../common/names.dart' show
-    Selectors, Identifiers;
+import '../common.dart';
 import '../compiler.dart' as dart2js show
     Compiler;
-import '../constants/constant_system.dart';
 import '../constants/values.dart';
-import '../dart_types.dart' as types;
-import '../diagnostics/invariant.dart' as dart2js show
-    InternalErrorFunction;
 import '../elements/elements.dart';
-import '../io/source_information.dart' show SourceInformation;
-import '../resolution/access_semantics.dart';
-import '../resolution/operators.dart';
-import '../resolution/send_structure.dart';
-import '../tree/tree.dart' as ast;
 import '../types/types.dart';
-import '../types/constants.dart' show computeTypeMask;
-import '../universe/universe.dart';
 import '../world.dart' show World;
-import 'cps_fragment.dart';
 import 'cps_ir_nodes.dart';
-import 'cps_ir_nodes_sexpr.dart' show SExpressionStringifier;
 
 /**
  * Replaces aggregates with a set of local values.  Performs inlining of
@@ -39,7 +23,7 @@
 class ScalarReplacer extends Pass {
   String get passName => 'Scalar replacement';
 
-  final dart2js.InternalErrorFunction _internalError;
+  final InternalErrorFunction _internalError;
   final World _classWorld;
 
   ScalarReplacer(dart2js.Compiler compiler)
@@ -48,8 +32,6 @@
 
   @override
   void rewrite(FunctionDefinition root) {
-    // Set all parent pointers.
-    new ParentVisitor().visit(root);
     ScalarReplacementVisitor analyzer =
         new ScalarReplacementVisitor(_internalError, _classWorld);
     analyzer.analyze(root);
@@ -61,9 +43,9 @@
  * Do scalar replacement of aggregates on instances. Since scalar replacement
  * can create new candidiates, iterate until all scalar replacements are done.
  */
-class ScalarReplacementVisitor extends RecursiveVisitor {
+class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
 
-  final dart2js.InternalErrorFunction internalError;
+  final InternalErrorFunction internalError;
   final World classWorld;
   ScalarReplacementRemovalVisitor removalVisitor;
 
@@ -192,6 +174,7 @@
   void replacePrimitive(Primitive old, Primitive primitive) {
     LetPrim letPrim = old.parent;
     letPrim.primitive = primitive;
+    primitive.parent = letPrim;
   }
 
   void deleteLetPrimOf(Primitive primitive) {
@@ -233,7 +216,7 @@
 
 /// Visit a just-deleted subterm and unlink all [Reference]s in it.  Reconsider
 /// allocations for scalar replacement.
-class ScalarReplacementRemovalVisitor extends RecursiveVisitor {
+class ScalarReplacementRemovalVisitor extends TrampolineRecursiveVisitor {
   ScalarReplacementVisitor process;
 
   ScalarReplacementRemovalVisitor(this.process);
diff --git a/pkg/compiler/lib/src/cps_ir/share_interceptors.dart b/pkg/compiler/lib/src/cps_ir/share_interceptors.dart
index 5ae912e..3706725 100644
--- a/pkg/compiler/lib/src/cps_ir/share_interceptors.dart
+++ b/pkg/compiler/lib/src/cps_ir/share_interceptors.dart
@@ -15,7 +15,7 @@
 ///- pull interceptors out of loops
 ///- replace interceptors with constants
 ///- share interceptors when one is in scope of the other
-class ShareInterceptors extends RecursiveVisitor implements Pass {
+class ShareInterceptors extends TrampolineRecursiveVisitor implements Pass {
   String get passName => 'Share interceptors';
 
   /// The innermost loop containing a given primitive.
@@ -115,6 +115,7 @@
       // The interceptor could not be shared. Replace it with a constant.
       Constant constantPrim = new Constant(constant);
       node.primitive = constantPrim;
+      constantPrim.parent = node;
       constantPrim.hint = interceptor.hint;
       constantPrim.type = interceptor.type;
       constantPrim.substituteFor(interceptor);
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index 4aa4ba0..a6017cb 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -24,9 +24,6 @@
     _worklist = new List<_ReductionTask>();
     _RedexVisitor redexVisitor = new _RedexVisitor(_worklist);
 
-    // Set all parent pointers.
-    new ParentVisitor().visit(root);
-
     // Sweep over the term, collecting redexes into the worklist.
     redexVisitor.visit(root);
 
@@ -54,16 +51,9 @@
   void _removeContinuation(Continuation cont) {
     LetCont parent = cont.parent;
     if (parent.continuations.length == 1) {
-      assert(cont.parent_index == 0);
       _removeNode(parent);
     } else {
-      List<Continuation> continuations = parent.continuations;
-      for (int i = cont.parent_index; i < continuations.length - 1; ++i) {
-        Continuation current = continuations[i + 1];
-        continuations[i] = current;
-        current.parent_index = i;
-      }
-      continuations.removeLast();
+      parent.continuations.remove(cont);
     }
     cont.parent = _DELETED;
   }
@@ -204,7 +194,8 @@
 
     Parameter parameter = task.node;
     Continuation continuation = parameter.parent;
-    int index = parameter.parentIndex;
+    int index = continuation.parameters.indexOf(parameter);
+    assert(index != -1);
 
     // Remove the index'th argument from each invocation.
     Reference<Continuation> current = continuation.firstRef;
@@ -229,14 +220,7 @@
       invoke.arguments.removeAt(index);
       current = current.next;
     }
-    // Copy the parameters above index down.
-    List<Parameter> parameters = continuation.parameters;
-    for (int i = index; i < parameters.length - 1; ++i) {
-      Parameter p = parameters[i + 1];
-      parameters[i] = p;
-      p.parentIndex = i;
-    }
-    parameters.removeLast();
+    continuation.parameters.removeAt(index);
 
     // Removing an unused parameter can create an eta-redex.
     if (_isEtaCont(continuation)) {
@@ -398,7 +382,7 @@
 }
 
 /// Traverses a term and adds any found redexes to the worklist.
-class _RedexVisitor extends RecursiveVisitor {
+class _RedexVisitor extends TrampolineRecursiveVisitor {
   final List<_ReductionTask> worklist;
 
   _RedexVisitor(this.worklist);
@@ -444,7 +428,7 @@
 /// Deleted nodes that might participate in a reduction task are marked so that
 /// any corresponding tasks can be skipped.  Nodes are marked so by setting
 /// their parent to the deleted sentinel.
-class _RemovalVisitor extends RecursiveVisitor {
+class _RemovalVisitor extends TrampolineRecursiveVisitor {
   final List<_ReductionTask> worklist;
 
   _RemovalVisitor(this.worklist);
@@ -490,219 +474,7 @@
   }
 }
 
-/// Traverses the CPS term and sets node.parent for each visited node.
-class ParentVisitor extends RecursiveVisitor {
-  processFunctionDefinition(FunctionDefinition node) {
-    node.body.parent = node;
-    if (node.thisParameter != null) node.thisParameter.parent = node;
-    int index = 0;
-    node.parameters.forEach((Definition parameter) {
-      parameter.parent = node;
-      if (parameter is Parameter) parameter.parentIndex = index++;
-    });
-    node.returnContinuation.parent = node;
-    node.body.parent = node;
-  }
 
-  processLetPrim(LetPrim node) {
-    node.primitive.parent = node;
-    node.body.parent = node;
-  }
-
-  processLetCont(LetCont node) {
-    int index = 0;
-    node.continuations.forEach((Continuation continuation) {
-      continuation.parent = node;
-      continuation.parent_index = index++;
-    });
-    node.body.parent = node;
-  }
-
-  processLetHandler(LetHandler node) {
-    node.handler.parent = node;
-    node.body.parent = node;
-  }
-
-  processLetMutable(LetMutable node) {
-    node.variable.parent = node;
-    node.value.parent = node;
-    node.body.parent = node;
-  }
-
-  processInvokeStatic(InvokeStatic node) {
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-    node.continuation.parent = node;
-  }
-
-  processInvokeContinuation(InvokeContinuation node) {
-    node.continuation.parent = node;
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processInvokeMethod(InvokeMethod node) {
-    node.receiver.parent = node;
-    node.continuation.parent = node;
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processInvokeMethodDirectly(InvokeMethodDirectly node) {
-    node.receiver.parent = node;
-    node.continuation.parent = node;
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processInvokeConstructor(InvokeConstructor node) {
-    node.continuation.parent = node;
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processBranch(Branch node) {
-    node.condition.parent = node;
-    node.trueContinuation.parent = node;
-    node.falseContinuation.parent = node;
-  }
-
-  processTypeCast(TypeCast node) {
-    node.typeArguments.forEach((Reference ref) => ref.parent = node);
-    node.continuation.parent = node;
-    node.value.parent = node;
-  }
-
-  processTypeTest(TypeTest node) {
-    node.typeArguments.forEach((Reference ref) => ref.parent = node);
-    node.value.parent = node;
-  }
-
-  processSetMutable(SetMutable node) {
-    node.variable.parent = node;
-    node.value.parent = node;
-  }
-
-  processThrow(Throw node) {
-    node.value.parent = node;
-  }
-
-  processGetLazyStatic(GetLazyStatic node) {
-    node.continuation.parent = node;
-  }
-
-  processLiteralList(LiteralList node) {
-    node.values.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processLiteralMap(LiteralMap node) {
-    node.entries.forEach((LiteralMapEntry entry) {
-      entry.key.parent = node;
-      entry.value.parent = node;
-    });
-  }
-
-  processCreateFunction(CreateFunction node) {
-    node.definition.parent = node;
-  }
-
-  processContinuation(Continuation node) {
-    if (node.body != null) node.body.parent = node;
-    int index = 0;
-    node.parameters.forEach((Parameter parameter) {
-      parameter.parent = node;
-      parameter.parentIndex = index++;
-    });
-  }
-
-  processInterceptor(Interceptor node) {
-    node.input.parent = node;
-  }
-
-  processSetField(SetField node) {
-    node.object.parent = node;
-    node.value.parent = node;
-  }
-
-  processGetField(GetField node) {
-    node.object.parent = node;
-  }
-
-  processGetStatic(GetStatic node) {
-  }
-
-  processSetStatic(SetStatic node) {
-    node.value.parent = node;
-  }
-
-  processGetMutable(GetMutable node) {
-    node.variable.parent = node;
-  }
-
-  processCreateInstance(CreateInstance node) {
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-    node.typeInformation.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processCreateBox(CreateBox node) {
-  }
-
-  processReifyRuntimeType(ReifyRuntimeType node) {
-    node.value.parent = node;
-  }
-
-  processReadTypeVariable(ReadTypeVariable node) {
-    node.target.parent = node;
-  }
-
-  processTypeExpression(TypeExpression node) {
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processCreateInvocationMirror(CreateInvocationMirror node) {
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processApplyBuiltinOperator(ApplyBuiltinOperator node) {
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processApplyBuiltinMethod(ApplyBuiltinMethod node) {
-    node.receiver.parent = node;
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processForeignCode(ForeignCode node) {
-    if (node.continuation != null) {
-      node.continuation.parent = node;
-    }
-    node.arguments.forEach((Reference ref) => ref.parent = node);
-  }
-
-  processGetLength(GetLength node) {
-    node.object.parent = node;
-  }
-
-  processGetIndex(GetIndex node) {
-    node.object.parent = node;
-    node.index.parent = node;
-  }
-
-  processSetIndex(SetIndex node) {
-    node.object.parent = node;
-    node.index.parent = node;
-    node.value.parent = node;
-  }
-
-  processAwait(Await node) {
-    node.continuation.parent = node;
-    node.input.parent = node;
-  }
-
-  processRefinement(Refinement node) {
-    node.value.parent = node;
-  }
-
-  processYield(Yield node) {
-    node.continuation.parent = node;
-    node.input.parent = node;
-  }
-}
 
 class _ReductionKind {
   final String name;
@@ -746,5 +518,6 @@
 /// A dummy class used solely to mark nodes as deleted once they are removed
 /// from a term.
 class _DeletedNode extends Node {
-  accept(_) => null;
+  accept(_) {}
+  setParentPointers() {}
 }
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 a84d28d..ba44ed1 100644
--- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
@@ -4,14 +4,11 @@
 
 library dart2js.type_mask_system;
 
-import '../closure.dart' show ClosureClassElement;
 import '../common/names.dart' show Selectors, Identifiers;
 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/js_backend.dart' show JavaScriptBackend;
 import '../types/types.dart';
 import '../types/constants.dart' show computeTypeMask;
@@ -41,7 +38,13 @@
   TypeMask get nullType => inferrer.nullType;
   TypeMask get extendableNativeListType => backend.extendableArrayType;
 
+  TypeMask get uint31Type => inferrer.uint31Type;
+  TypeMask get uint32Type => inferrer.uint32Type;
+  TypeMask get uintType => inferrer.positiveIntType;
+
   TypeMask numStringBoolType;
+  TypeMask fixedLengthType;
+  TypeMask interceptorType;
 
   ClassElement get jsNullClass => backend.jsNullClass;
 
@@ -63,6 +66,13 @@
     numStringBoolType =
         new TypeMask.unionOf(<TypeMask>[anyNum, anyString, anyBool],
             classWorld);
+    interceptorType =
+        new TypeMask.nonNullSubtype(backend.jsInterceptorClass, classWorld);
+
+    TypeMask typedArray = nonNullSubclass(backend.typedArrayClass);
+    fixedLengthType = new TypeMask.unionOf(
+            <TypeMask>[stringType, backend.fixedArrayType, typedArray],
+            classWorld);
   }
 
   bool methodUsesReceiverArgument(FunctionElement function) {
@@ -194,11 +204,35 @@
     return areDisjoint(t, doubleType);
   }
 
+  bool isDefinitelyNonNegativeInt(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    // The JSPositiveInt class includes zero, despite the name.
+    return t.satisfies(backend.jsPositiveIntClass, classWorld);
+  }
+
   bool isDefinitelyInt(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
     return t.satisfies(backend.jsIntClass, classWorld);
   }
 
+  bool isDefinitelyUint31(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.satisfies(backend.jsUInt31Class, classWorld);
+  }
+
+  bool isDefinitelyUint32(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.satisfies(backend.jsUInt32Class, classWorld);
+  }
+
+  bool isDefinitelyUint(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.satisfies(backend.jsPositiveIntClass, classWorld);
+  }
+
+  // TODO(sra): Find a better name.  'NativeList' is a bad name because there
+  // are many native classes in dart:html that implement List but are not (and
+  // should not be) included in this predicate.
   bool isDefinitelyNativeList(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
     return t.nonNullable().satisfies(backend.jsArrayClass, classWorld);
@@ -225,6 +259,17 @@
     return t.nonNullable().satisfies(backend.jsIndexableClass, classWorld);
   }
 
+  bool isDefinitelyMutableIndexable(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.nonNullable().satisfies(backend.jsMutableIndexableClass,
+        classWorld);
+  }
+
+  bool isDefinitelyFixedLengthIndexable(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return fixedLengthType.containsMask(t.nonNullable(), classWorld);
+  }
+
   bool areDisjoint(TypeMask leftType, TypeMask rightType) {
     TypeMask intersection = leftType.intersection(rightType, classWorld);
     return intersection.isEmpty && !intersection.isNullable;
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index ecf555d..5784d3d 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -7,6 +7,7 @@
 
 import '../closure.dart' show
     ClosureClassElement;
+import '../common.dart';
 import '../common/names.dart' show
     Identifiers,
     Selectors;
@@ -15,8 +16,6 @@
 import '../constants/constant_system.dart';
 import '../constants/values.dart';
 import '../dart_types.dart' as types;
-import '../diagnostics/invariant.dart' as dart2js show
-    InternalErrorFunction;
 import '../elements/elements.dart';
 import '../io/source_information.dart' show
     SourceInformation;
@@ -29,8 +28,6 @@
 import '../resolution/send_structure.dart';
 import '../tree/tree.dart' as ast;
 import '../types/types.dart';
-import '../types/constants.dart' show
-    computeTypeMask;
 import '../universe/selector.dart' show
     Selector;
 import '../world.dart' show World;
@@ -43,12 +40,15 @@
   final ConstantSystem constantSystem;
   final types.DartTypes dartTypes;
   final AbstractValue anything;
+  final AbstractValue nullValue;
 
   ConstantPropagationLattice(TypeMaskSystem typeSystem,
                              this.constantSystem,
                              this.dartTypes)
     : this.typeSystem = typeSystem,
-      anything = new AbstractValue.nonConstant(typeSystem.dynamicType);
+      anything = new AbstractValue.nonConstant(typeSystem.dynamicType),
+      nullValue = new AbstractValue.constantValue(
+          new NullConstantValue(), new TypeMask.empty());
 
   final AbstractValue nothing = new AbstractValue.nothing();
 
@@ -124,6 +124,24 @@
         typeSystem.isDefinitelyInt(value.type, allowNull: allowNull);
   }
 
+  bool isDefinitelyUint31(AbstractValue value,
+                       {bool allowNull: false}) {
+    return value.isNothing ||
+        typeSystem.isDefinitelyUint31(value.type, allowNull: allowNull);
+  }
+
+  bool isDefinitelyUint32(AbstractValue value,
+                       {bool allowNull: false}) {
+    return value.isNothing ||
+        typeSystem.isDefinitelyUint32(value.type, allowNull: allowNull);
+  }
+
+  bool isDefinitelyUint(AbstractValue value,
+                       {bool allowNull: false}) {
+    return value.isNothing ||
+        typeSystem.isDefinitelyUint(value.type, allowNull: allowNull);
+  }
+
   bool isDefinitelyNativeList(AbstractValue value,
                               {bool allowNull: false}) {
     return value.isNothing ||
@@ -156,6 +174,19 @@
         typeSystem.isDefinitelyIndexable(value.type, allowNull: allowNull);
   }
 
+  /// Returns `true` if [value] represents an int value that must be in the
+  /// inclusive range.
+  bool isDefinitelyIntInRange(AbstractValue value, {int min, int max}) {
+    if (value.isNothing) return true;
+    if (!isDefinitelyInt(value)) return false;
+    PrimitiveConstantValue constant = value.constant;
+    if (constant == null) return false;
+    if (!constant.isInt) return false;
+    if (min != null && constant.primitiveValue < min) return false;
+    if (max != null && constant.primitiveValue > max) return false;
+    return true;
+  }
+
   /// Returns whether the given [value] is an instance of [type].
   ///
   /// Since [value] and [type] are not always known, [AbstractBool.Maybe] is
@@ -239,40 +270,229 @@
   AbstractValue binaryOp(BinaryOperator operator,
                          AbstractValue left,
                          AbstractValue right) {
+    switch (operator.kind) {
+      case BinaryOperatorKind.ADD:
+        return addSpecial(left, right);
+
+      case BinaryOperatorKind.SUB:
+        return subtractSpecial(left, right);
+
+      case BinaryOperatorKind.MUL:
+        return multiplySpecial(left, right);
+
+      case BinaryOperatorKind.DIV:
+        return divideSpecial(left, right);
+
+      case BinaryOperatorKind.IDIV:
+        return truncatingDivideSpecial(left, right);
+
+      case BinaryOperatorKind.MOD:
+        return moduloSpecial(left, right);
+
+      case BinaryOperatorKind.EQ:
+        return equalSpecial(left, right);
+
+      case BinaryOperatorKind.AND:
+        return andSpecial(left, right);
+
+      case BinaryOperatorKind.OR:
+        return orSpecial(left, right);
+
+      case BinaryOperatorKind.XOR:
+        return xorSpecial(left, right);
+
+      case BinaryOperatorKind.SHL:
+        return shiftLeftSpecial(left, right);
+
+      case BinaryOperatorKind.SHR:
+        return shiftRightSpecial(left, right);
+
+      case BinaryOperatorKind.LT:
+        return lessSpecial(left, right);
+
+      case BinaryOperatorKind.LTEQ:
+        return lessEqualSpecial(left, right);
+
+      case BinaryOperatorKind.GT:
+        return greaterSpecial(left, right);
+
+      case BinaryOperatorKind.GTEQ:
+        return greaterEqualSpecial(left, right);
+
+      default:
+        break;
+    }
+
     if (left.isNothing || right.isNothing) {
       return nothing;
     }
     if (left.isConstant && right.isConstant) {
       BinaryOperation operation = constantSystem.lookupBinary(operator);
       ConstantValue result = operation.fold(left.constant, right.constant);
-      if (result == null) return anything;
-      return constant(result);
+      if (result != null) return constant(result);
     }
-    // TODO(asgerf): Handle remaining operators and the UIntXX types.
-    switch (operator.kind) {
-      case BinaryOperatorKind.ADD:
-      case BinaryOperatorKind.SUB:
-      case BinaryOperatorKind.MUL:
-        if (isDefinitelyInt(left) && isDefinitelyInt(right)) {
-          return nonConstant(typeSystem.intType);
-        }
-        return null;
-
-      case BinaryOperatorKind.EQ:
-        bool behavesLikeIdentity =
-          isDefinitelyNumStringBool(left, allowNull: true) ||
-          right.isNullConstant;
-        if (behavesLikeIdentity &&
-            typeSystem.areDisjoint(left.type, right.type)) {
-          return constant(new FalseConstantValue());
-        }
-        return null;
-
-      default:
-        return null; // The caller will use return type from type inference.
-    }
+    return null; // The caller will use return type from type inference.
   }
 
+  AbstractValue foldBinary(BinaryOperation operation,
+      AbstractValue left, AbstractValue right) {
+    if (left.isNothing || right.isNothing) return nothing;
+    if (left.isConstant && right.isConstant) {
+      ConstantValue result = operation.fold(left.constant, right.constant);
+      if (result != null) return constant(result);
+    }
+    return null;
+  }
+
+  AbstractValue closedOnInt(AbstractValue left, AbstractValue right) {
+    if (isDefinitelyInt(left) && isDefinitelyInt(right)) {
+      return nonConstant(typeSystem.intType);
+    }
+    return null;
+  }
+
+  AbstractValue closedOnUint(AbstractValue left, AbstractValue right) {
+    if (isDefinitelyUint(left) && isDefinitelyUint(right)) {
+      return nonConstant(typeSystem.uintType);
+    }
+    return null;
+  }
+
+  AbstractValue closedOnUint31(AbstractValue left, AbstractValue right) {
+    if (isDefinitelyUint31(left) && isDefinitelyUint31(right)) {
+      return nonConstant(typeSystem.uint31Type);
+    }
+    return null;
+  }
+
+  AbstractValue addSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.add, left, right);
+    if (folded != null) return folded;
+    if (isDefinitelyNum(left)) {
+      if (isDefinitelyUint31(left) && isDefinitelyUint31(right)) {
+        return nonConstant(typeSystem.uint32Type);
+      }
+      return closedOnUint(left, right) ?? closedOnInt(left, right);
+    }
+    return null;
+  }
+
+  AbstractValue subtractSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.subtract, left, right);
+    return folded ?? closedOnInt(left, right);
+  }
+
+  AbstractValue multiplySpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.multiply, left, right);
+    return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
+  }
+
+  AbstractValue divideSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.divide, left, right);
+  }
+
+  AbstractValue truncatingDivideSpecial(
+      AbstractValue left, AbstractValue right) {
+    AbstractValue folded =
+        foldBinary(constantSystem.truncatingDivide, left, right);
+    if (folded != null) return folded;
+    if (isDefinitelyNum(left)) {
+      if (isDefinitelyUint32(left) && isDefinitelyIntInRange(right, min: 2)) {
+        return nonConstant(typeSystem.uint31Type);
+      }
+      if (isDefinitelyUint(right)) {
+        // `0` will be an exception, other values will shrink the result.
+        if (isDefinitelyUint31(left)) return nonConstant(typeSystem.uint31Type);
+        if (isDefinitelyUint32(left)) return nonConstant(typeSystem.uint32Type);
+        if (isDefinitelyUint(left)) return nonConstant(typeSystem.uintType);
+      }
+      return nonConstant(typeSystem.intType);
+    }
+    return null;
+  }
+
+  AbstractValue moduloSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.modulo, left, right);
+    return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
+  }
+
+  AbstractValue remainderSpecial(AbstractValue left, AbstractValue right) {
+    if (left.isNothing || right.isNothing) return nothing;
+    AbstractValue folded = null;  // Remainder not in constant system.
+    return folded ?? closedOnUint(left, right) ?? closedOnInt(left, right);
+  }
+
+  AbstractValue equalSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue 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)) {
+      return constant(new FalseConstantValue());
+    }
+    return null;
+  }
+
+  AbstractValue andSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.bitAnd, left, right);
+    if (folded != null) return folded;
+    if (isDefinitelyNum(left)) {
+      if (isDefinitelyUint31(left) || isDefinitelyUint31(right)) {
+        // Either 31-bit argument will truncate the other.
+        return nonConstant(typeSystem.uint31Type);
+      }
+    }
+    return null;
+  }
+
+  AbstractValue orSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.bitOr, left, right);
+    return folded ?? closedOnUint31(left, right);
+  }
+
+  AbstractValue xorSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.bitXor, left, right);
+    return folded ?? closedOnUint31(left, right);
+  }
+
+  AbstractValue shiftLeftSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.shiftLeft, left, right);
+  }
+
+  AbstractValue shiftRightSpecial(AbstractValue left, AbstractValue right) {
+    AbstractValue folded = foldBinary(constantSystem.shiftRight, left, right);
+    if (folded != null) return folded;
+    if (isDefinitelyUint31(left)) {
+      return nonConstant(typeSystem.uint31Type);
+    } else if (isDefinitelyUint32(left)) {
+      if (isDefinitelyIntInRange(right, min: 1, max: 31)) {
+        // A zero will be shifted into the 'sign' bit.
+        return nonConstant(typeSystem.uint31Type);
+      }
+      return nonConstant(typeSystem.uint32Type);
+    }
+    return null;
+  }
+
+  AbstractValue lessSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.less, left, right);
+  }
+
+  AbstractValue lessEqualSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.lessEqual, left, right);
+  }
+
+  AbstractValue greaterSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.greater, left, right);
+  }
+
+  AbstractValue greaterEqualSpecial(AbstractValue left, AbstractValue right) {
+    return foldBinary(constantSystem.greaterEqual, left, right);
+  }
+
+
   AbstractValue stringConstant(String value) {
     return constant(new StringConstantValue(new ast.DartString.literal(value)));
   }
@@ -347,7 +567,7 @@
   final dart2js.Compiler _compiler;
   final CpsFunctionCompiler _functionCompiler;
   final ConstantPropagationLattice _lattice;
-  final dart2js.InternalErrorFunction _internalError;
+  final InternalErrorFunction _internalError;
   final Map<Variable, ConstantValue> _values = <Variable, ConstantValue>{};
   final TypeMaskSystem _typeSystem;
 
@@ -364,9 +584,6 @@
 
   @override
   void rewrite(FunctionDefinition root) {
-    // Set all parent pointers.
-    new ParentVisitor().visit(root);
-
     Map<Expression, ConstantValue> replacements = <Expression, ConstantValue>{};
 
     // Analyze. In this phase, the entire term is analyzed for reachability
@@ -398,6 +615,7 @@
     '+':  BuiltinOperator.NumAdd,
     '-':  BuiltinOperator.NumSubtract,
     '*':  BuiltinOperator.NumMultiply,
+    '/':  BuiltinOperator.NumDivide,
     '&':  BuiltinOperator.NumAnd,
     '|':  BuiltinOperator.NumOr,
     '^':  BuiltinOperator.NumXor,
@@ -411,7 +629,7 @@
  * Uses the information from a preceding analysis pass in order to perform the
  * actual transformations on the CPS graph.
  */
-class TransformingVisitor extends LeafVisitor {
+class TransformingVisitor extends DeepRecursiveVisitor {
   final TypePropagationVisitor analyzer;
   final Map<Expression, ConstantValue> replacements;
   final ConstantPropagationLattice lattice;
@@ -423,7 +641,7 @@
   types.DartTypes get dartTypes => lattice.dartTypes;
   Map<Variable, ConstantValue> get values => analyzer.values;
 
-  final dart2js.InternalErrorFunction internalError;
+  final InternalErrorFunction internalError;
 
   final List<Node> stack = <Node>[];
 
@@ -518,7 +736,7 @@
 
   /// Sets parent pointers and computes types for the given subtree.
   void reanalyze(Node node) {
-    new ParentVisitor().visit(node);
+    ParentVisitor.setParents(node);
     analyzer.reanalyzeSubtree(node);
   }
 
@@ -563,7 +781,6 @@
     // traversing the entire subtree of [node]. Temporarily close the
     // term with a dummy node while recomputing types.
     context.body = new Unreachable();
-    new ParentVisitor().visit(insertedCode.root);
     reanalyze(insertedCode.root);
 
     context.body = node;
@@ -772,21 +989,39 @@
           if (operator != null) {
             return replaceWithBinary(operator, leftArg, rightArg);
           }
-          // Try to insert a shift-left operator.
           // Shift operators are not in [NumBinaryBuiltins] because Dart shifts
-          // behave different than JS shifts.
-          // We do not introduce shift-right operators yet because the operator
-          // to use depends on whether the left-hand operand is negative.
-          // See js_number.dart in js_runtime for details.
-          PrimitiveConstantValue rightConstant = right.constant;
+          // behave different to JS shifts, especially in the handling of the
+          // shift count.
+          // Try to insert a shift-left operator.
           if (opname == '<<' &&
               lattice.isDefinitelyInt(left) &&
-              rightConstant != null &&
-              rightConstant.isInt &&
-              rightConstant.primitiveValue >= 0 &&
-              rightConstant.primitiveValue <= 31) {
-            return replaceWithBinary(BuiltinOperator.NumShl,
-                                     leftArg, rightArg);
+              lattice.isDefinitelyIntInRange(right, min: 0, max: 31)) {
+            return replaceWithBinary(BuiltinOperator.NumShl, leftArg, rightArg);
+          }
+          // Try to insert a shift-right operator. JavaScript's right shift is
+          // consistent with Dart's only for left operands in the unsigned
+          // 32-bit range.
+          if (opname == '>>' &&
+              lattice.isDefinitelyUint32(left) &&
+              lattice.isDefinitelyIntInRange(right, min: 0, max: 31)) {
+            return replaceWithBinary(BuiltinOperator.NumShr, leftArg, rightArg);
+          }
+          // Try to use remainder for '%'. Both operands must be non-negative
+          // and the divisor must be non-zero.
+          if (opname == '%' &&
+              lattice.isDefinitelyUint(left) &&
+              lattice.isDefinitelyUint(right) &&
+              lattice.isDefinitelyIntInRange(right, min: 1)) {
+            return replaceWithBinary(
+                BuiltinOperator.NumRemainder, leftArg, rightArg);
+          }
+
+          if (opname == '~/' &&
+              lattice.isDefinitelyUint32(left) &&
+              lattice.isDefinitelyIntInRange(right, min: 2)) {
+            return replaceWithBinary(
+                BuiltinOperator.NumTruncatingDivideToSigned32,
+                leftArg, rightArg);
           }
         }
         if (lattice.isDefinitelyString(left, allowNull: false) &&
@@ -797,11 +1032,34 @@
         }
       }
     }
+    if (node.selector.isCall) {
+      String name = node.selector.name;
+      Primitive receiver = getDartReceiver(node);
+      AbstractValue receiverValue = getValue(receiver);
+      if (name == 'remainder') {
+        if (node.arguments.length == 2) {
+          Primitive arg = getDartArgument(node, 0);
+          AbstractValue argValue = getValue(arg);
+          if (lattice.isDefinitelyInt(receiverValue) &&
+              lattice.isDefinitelyInt(argValue) &&
+              isIntNotZero(argValue)) {
+            return
+                replaceWithBinary(BuiltinOperator.NumRemainder, receiver, arg);
+          }
+        }
+      }
+    }
     // We should only get here if the node was not specialized.
     assert(node.parent != null);
     return false;
   }
 
+  /// Returns `true` if [value] represents an int value that cannot be zero.
+  bool isIntNotZero(AbstractValue value) {
+    return lattice.isDefinitelyIntInRange(value, min: 1) ||
+        lattice.isDefinitelyIntInRange(value, max: -1);
+  }
+
   bool isInterceptedSelector(Selector selector) {
     return backend.isInterceptedSelector(selector);
   }
@@ -834,7 +1092,7 @@
     if (target is! FieldElement) return false;
     // TODO(asgerf): Inlining native fields will make some tests pass for the
     // wrong reason, so for testing reasons avoid inlining them.
-    if (target.isNative) return false;
+    if (target.isNative || target.isJsInterop) return false;
     Continuation cont = node.continuation.definition;
     if (node.selector.isGetter) {
       GetField get = new GetField(getDartReceiver(node), target);
@@ -877,7 +1135,7 @@
         <Primitive>[index, cps.letPrim(new GetLength(list))]);
     cps.ifTruthy(isTooLarge).invokeContinuation(fail);
     cps.insideContinuation(fail).invokeStaticThrower(
-        backend.getThrowIndexOutOfBoundsError(),
+        backend.helpers.throwIndexOutOfBoundsError,
         <Primitive>[list, index]);
     return cps;
   }
@@ -895,42 +1153,21 @@
         BuiltinOperator.StrictNeq,
         <Primitive>[originalLength, cps.letPrim(new GetLength(list))]);
     cps.ifTruthy(lengthChanged).invokeStaticThrower(
-        backend.getThrowConcurrentModificationError(),
+        backend.helpers.throwConcurrentModificationError,
         <Primitive>[list]);
     return cps;
   }
 
-  /// Counts number of index accesses on [receiver] and determines based on
-  /// that number if we should try to inline them.
-  ///
-  /// This is a short-term solution to avoid inserting a lot of bounds checks,
-  /// since there is currently no optimization for eliminating them.
-  bool hasTooManyIndexAccesses(Primitive receiver) {
-    receiver = receiver.effectiveDefinition;
-    int count = 0;
-    for (Reference ref in receiver.effectiveUses) {
-      Node use = ref.parent;
-      if (use is InvokeMethod &&
-          (use.selector.isIndex || use.selector.isIndexSet) &&
-          getDartReceiver(use).sameValue(receiver)) {
-        ++count;
-      } else if (use is GetIndex && use.object.definition.sameValue(receiver)) {
-        ++count;
-      } else if (use is SetIndex && use.object.definition.sameValue(receiver)) {
-        ++count;
-      }
-      if (count > 2) return true;
-    }
-    return false;
-  }
-
   /// Tries to replace [node] with a direct `length` or index access.
   ///
   /// Returns `true` if the node was replaced.
   bool specializeIndexableAccess(InvokeMethod node) {
     Primitive receiver = getDartReceiver(node);
     AbstractValue receiverValue = getValue(receiver);
-    if (!lattice.isDefinitelyIndexable(receiverValue)) return false;
+    if (!typeSystem.isDefinitelyIndexable(receiverValue.type,
+            allowNull: true)) {
+      return false;
+    }
     SourceInformation sourceInfo = node.sourceInformation;
     Continuation cont = node.continuation.definition;
     switch (node.selector.name) {
@@ -943,7 +1180,6 @@
         return true;
 
       case '[]':
-        if (hasTooManyIndexAccesses(receiver)) return false;
         Primitive index = getDartArgument(node, 0);
         if (!lattice.isDefinitelyInt(getValue(index))) return false;
         CpsFragment cps = makeBoundsCheck(receiver, index, sourceInfo);
@@ -953,6 +1189,23 @@
         push(cps.result);
         return true;
 
+      case '[]=':
+        if (receiverValue.isNullable) return false;
+        if (!typeSystem.isDefinitelyMutableIndexable(receiverValue.type)) {
+          return false;
+        }
+        Primitive index = getDartArgument(node, 0);
+        Primitive value = getDartArgument(node, 1);
+        if (!lattice.isDefinitelyInt(getValue(index))) return false;
+        CpsFragment cps = makeBoundsCheck(receiver, index, sourceInfo);
+        cps.letPrim(new SetIndex(receiver, index, value));
+        assert(cont.parameters.single.hasNoUses);
+        cont.parameters.clear();
+        cps.invokeContinuation(cont, []);
+        replaceSubtree(node, cps.result);
+        push(cps.result);
+        return true;
+
       default:
         return false;
     }
@@ -1007,7 +1260,7 @@
             [length, cps.makeZero()]);
         CpsFragment fail = cps.ifTruthy(isEmpty);
         fail.invokeStaticThrower(
-            backend.getThrowIndexOutOfBoundsError(),
+            backend.helpers.throwIndexOutOfBoundsError,
             [list, fail.makeConstant(new IntConstantValue(-1))]);
         Primitive removedItem = cps.invokeBuiltin(BuiltinMethod.Pop,
             list,
@@ -1048,7 +1301,6 @@
           return false;
         }
         if (listValue.isNullable) return false;
-        if (hasTooManyIndexAccesses(list)) return false;
         Primitive index = getDartArgument(node, 0);
         if (!lattice.isDefinitelyInt(getValue(index))) return false;
         CpsFragment cps = makeBoundsCheck(list, index, sourceInfo);
@@ -1058,22 +1310,6 @@
         push(cps.result);
         return true;
 
-      case '[]=':
-        if (listValue.isNullable) return false;
-        if (hasTooManyIndexAccesses(list)) return false;
-        Primitive index = getDartArgument(node, 0);
-        Primitive value = getDartArgument(node, 1);
-        if (!isMutable) return false;
-        if (!lattice.isDefinitelyInt(getValue(index))) return false;
-        CpsFragment cps = makeBoundsCheck(list, index, sourceInfo);
-        cps.letPrim(new SetIndex(list, index, value));
-        assert(cont.parameters.single.hasNoUses);
-        cont.parameters.clear();
-        cps.invokeContinuation(cont, []);
-        replaceSubtree(node, cps.result);
-        push(cps.result);
-        return true;
-
       case 'forEach':
         Element element =
             compiler.world.locateSingleElement(node.selector, listValue.type);
@@ -1505,8 +1741,7 @@
         // target definitely does not use it.
         Constant dummy = makeConstantPrimitive(new IntConstantValue(0));
         insertLetPrim(node, dummy);
-        node.arguments[0].unlink();
-        node.arguments[0] = new Reference<Primitive>(dummy);
+        node.arguments[0].changeTo(dummy);
         node.receiverIsIntercepted = false;
       }
     }
@@ -1806,8 +2041,29 @@
 
   Primitive visitTypeTest(TypeTest node) {
     Primitive prim = node.value.definition;
+
+    Primitive unaryBuiltinOperator(BuiltinOperator operator) =>
+        new ApplyBuiltinOperator(
+            operator, <Primitive>[prim], node.sourceInformation);
+
+    void unlinkInterceptor() {
+      if (node.interceptor != null) {
+        node.interceptor.unlink();
+        node.interceptor = null;
+      }
+    }
+
     AbstractValue value = getValue(prim);
-    if (node.dartType == dartTypes.coreTypes.intType) {
+    types.DartType dartType = node.dartType;
+
+    if (!(dartType.isInterfaceType && dartType.isRaw)) {
+      // TODO(23685): Efficient function arity check.
+      // TODO(sra): Pass interceptor to runtime subtype functions.
+      unlinkInterceptor();
+      return null;
+    }
+
+    if (dartType == dartTypes.coreTypes.intType) {
       // 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.
@@ -1819,10 +2075,7 @@
       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 new ApplyBuiltinOperator(
-            BuiltinOperator.IsNumber,
-            <Primitive>[prim],
-            node.sourceInformation);
+        return unaryBuiltinOperator(BuiltinOperator.IsNumber);
       }
       return new ApplyBuiltinOperator(
           BuiltinOperator.IsNumberAndFloor,
@@ -1836,6 +2089,59 @@
           <Primitive>[prim],
           node.sourceInformation);
     }
+
+    AbstractBool isNullableSubtype =
+        lattice.isSubtypeOf(value, node.dartType, allowNull: true);
+    AbstractBool isNullPassingTest =
+        lattice.isSubtypeOf(lattice.nullValue, node.dartType, allowNull: false);
+    if (isNullableSubtype == AbstractBool.True &&
+        isNullPassingTest == AbstractBool.False) {
+      // Null is the only value not satisfying the type test.
+      // Replace the type test with a null-check.
+      // This has lower priority than the 'typeof'-based tests because
+      // 'typeof' expressions might give the VM some more useful information.
+      Primitive nullConst = makeConstantPrimitive(new NullConstantValue());
+      insertLetPrim(node.parent, nullConst);
+      return new ApplyBuiltinOperator(
+          BuiltinOperator.LooseNeq,
+          <Primitive>[prim, nullConst],
+          node.sourceInformation);
+    }
+
+    if (dartType.element == functionCompiler.glue.jsFixedArrayClass) {
+      // TODO(sra): Check input is restricted to JSArray.
+      return unaryBuiltinOperator(BuiltinOperator.IsFixedLengthJSArray);
+    }
+
+    if (dartType.element == functionCompiler.glue.jsExtendableArrayClass) {
+      // TODO(sra): Check input is restricted to JSArray.
+      return unaryBuiltinOperator(BuiltinOperator.IsExtendableJSArray);
+    }
+
+    if (dartType.element == functionCompiler.glue.jsMutableArrayClass) {
+      // TODO(sra): Check input is restricted to JSArray.
+      return unaryBuiltinOperator(BuiltinOperator.IsModifiableJSArray);
+    }
+
+    if (dartType.element == functionCompiler.glue.jsUnmodifiableArrayClass) {
+      // TODO(sra): Check input is restricted to JSArray.
+      return unaryBuiltinOperator(BuiltinOperator.IsUnmodifiableJSArray);
+    }
+
+    if (dartType == dartTypes.coreTypes.stringType ||
+        dartType == dartTypes.coreTypes.boolType) {
+      // These types are recognized in tree_ir TypeOperator codegen.
+      unlinkInterceptor();
+      return null;
+    }
+
+    // TODO(sra): Propagate sourceInformation.
+    // TODO(sra): If getInterceptor(x) === x or JSNull, rewrite
+    //     getInterceptor(x).$isFoo ---> x != null && x.$isFoo
+    return new TypeTestViaFlag(node.interceptor.definition, dartType);
+  }
+
+  Primitive visitTypeTestViaFlag(TypeTestViaFlag node) {
     return null;
   }
 
@@ -1898,7 +2204,7 @@
   final List<Definition> defWorklist = <Definition>[];
 
   final ConstantPropagationLattice lattice;
-  final dart2js.InternalErrorFunction internalError;
+  final InternalErrorFunction internalError;
 
   TypeMaskSystem get typeSystem => lattice.typeSystem;
 
@@ -2176,6 +2482,30 @@
   }
 
   void visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
+
+    void binaryOp(
+        AbstractValue operation(AbstractValue left, AbstractValue right),
+        TypeMask defaultType) {
+      AbstractValue left = getValue(node.arguments[0].definition);
+      AbstractValue right = getValue(node.arguments[1].definition);
+      setValue(node, operation(left, right) ?? nonConstant(defaultType));
+    }
+
+    void binaryNumOp(
+        AbstractValue operation(AbstractValue left, AbstractValue right)) {
+      binaryOp(operation, typeSystem.numType);
+    }
+
+    void binaryUint32Op(
+        AbstractValue operation(AbstractValue left, AbstractValue right)) {
+      binaryOp(operation, typeSystem.uint32Type);
+    }
+
+    void binaryBoolOp(
+        AbstractValue operation(AbstractValue left, AbstractValue right)) {
+      binaryOp(operation, typeSystem.boolType);
+    }
+
     switch (node.operator) {
       case BuiltinOperator.StringConcatenate:
         ast.DartString stringValue = const ast.LiteralDartString('');
@@ -2225,6 +2555,7 @@
           assert(leftConst.isConstant && rightConst.isConstant);
           PrimitiveConstantValue left = leftValue;
           PrimitiveConstantValue right = rightValue;
+          // Should this be constantSystem.identity.fold(left, right)?
           ConstantValue result =
             new BoolConstantValue(left.primitiveValue == right.primitiveValue);
           setValue(node, constantValue(result, typeSystem.boolType));
@@ -2233,27 +2564,66 @@
         }
         break;
 
-      // TODO(asgerf): Implement constant propagation for builtins.
       case BuiltinOperator.NumAdd:
+        binaryNumOp(lattice.addSpecial);
+        break;
+
       case BuiltinOperator.NumSubtract:
+        binaryNumOp(lattice.subtractSpecial);
+        break;
+
       case BuiltinOperator.NumMultiply:
+        binaryNumOp(lattice.multiplySpecial);
+        break;
+
+      case BuiltinOperator.NumDivide:
+        binaryNumOp(lattice.divideSpecial);
+        break;
+
+      case BuiltinOperator.NumRemainder:
+        binaryNumOp(lattice.remainderSpecial);
+        break;
+
+      case BuiltinOperator.NumTruncatingDivideToSigned32:
+        binaryNumOp(lattice.truncatingDivideSpecial);
+        break;
+
       case BuiltinOperator.NumAnd:
+        binaryUint32Op(lattice.andSpecial);
+        break;
+
       case BuiltinOperator.NumOr:
+        binaryUint32Op(lattice.orSpecial);
+        break;
+
       case BuiltinOperator.NumXor:
+        binaryUint32Op(lattice.xorSpecial);
+        break;
+
       case BuiltinOperator.NumShl:
-        AbstractValue left = getValue(node.arguments[0].definition);
-        AbstractValue right = getValue(node.arguments[1].definition);
-        if (lattice.isDefinitelyInt(left) && lattice.isDefinitelyInt(right)) {
-          setValue(node, nonConstant(typeSystem.intType));
-        } else {
-          setValue(node, nonConstant(typeSystem.numType));
-        }
+        binaryUint32Op(lattice.shiftLeftSpecial);
+        break;
+
+      case BuiltinOperator.NumShr:
+        binaryUint32Op(lattice.shiftRightSpecial);
         break;
 
       case BuiltinOperator.NumLt:
+        binaryBoolOp(lattice.lessSpecial);
+        break;
+
       case BuiltinOperator.NumLe:
+        binaryBoolOp(lattice.lessEqualSpecial);
+        break;
+
       case BuiltinOperator.NumGt:
+        binaryBoolOp(lattice.greaterSpecial);
+        break;
+
       case BuiltinOperator.NumGe:
+        binaryBoolOp(lattice.greaterEqualSpecial);
+        break;
+
       case BuiltinOperator.StrictNeq:
       case BuiltinOperator.LooseNeq:
       case BuiltinOperator.IsFalsy:
@@ -2263,6 +2633,13 @@
       case BuiltinOperator.IsNumberAndFloor:
         setValue(node, nonConstant(typeSystem.boolType));
         break;
+
+      case BuiltinOperator.IsFixedLengthJSArray:
+      case BuiltinOperator.IsExtendableJSArray:
+      case BuiltinOperator.IsUnmodifiableJSArray:
+      case BuiltinOperator.IsModifiableJSArray:
+        setValue(node, nonConstant(typeSystem.boolType));
+        break;
     }
   }
 
@@ -2316,9 +2693,21 @@
   }
 
   void visitTypeTest(TypeTest node) {
-    AbstractValue input = getValue(node.value.definition);
+    handleTypeTest(node, getValue(node.value.definition), node.dartType);
+  }
+
+  void visitTypeTestViaFlag(TypeTestViaFlag node) {
+    // TODO(sra): We could see if we can find the value in the interceptor
+    // expression. It would probably have no benefit - we only see
+    // TypeTestViaFlag after rewriting TypeTest and the rewrite of TypeTest
+    // would already have done the interesting optimizations.
+    setValue(node, nonConstant(typeSystem.boolType));
+  }
+
+  void handleTypeTest(
+      Primitive node, AbstractValue input, types.DartType dartType) {
     TypeMask boolType = typeSystem.boolType;
-    switch(lattice.isSubtypeOf(input, node.dartType, allowNull: false)) {
+    switch(lattice.isSubtypeOf(input, dartType, allowNull: false)) {
       case AbstractBool.Nothing:
         break; // And come back later.
 
@@ -2632,7 +3021,7 @@
   String get name => 'length';
 }
 
-class ResetAnalysisInfo extends RecursiveVisitor {
+class ResetAnalysisInfo extends TrampolineRecursiveVisitor {
   Set<Continuation> reachableContinuations;
   Map<Variable, ConstantValue> values;
 
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index bc511e4..fa7aeb7 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -19,7 +19,6 @@
 import 'util/uri_extras.dart';
 import 'util/util.dart' show stackTraceFilePrefix;
 import 'util/command_line.dart';
-import 'package:sdk_library_metadata/libraries.dart';
 import 'package:package_config/discovery.dart' show findPackages;
 
 const String LIBRARY_ROOT = '../../../../../sdk';
@@ -246,21 +245,13 @@
 
   setCategories(String argument) {
     List<String> categories = extractParameter(argument).split(',');
-    Set<String> allowedCategories =
-        LIBRARIES.values.map((x) => x.category).toSet();
-    allowedCategories.remove('Shared');
-    allowedCategories.remove('Internal');
-    List<String> allowedCategoriesList =
-        new List<String>.from(allowedCategories);
-    allowedCategoriesList.sort();
     if (categories.contains('all')) {
-      categories = allowedCategoriesList;
+      categories = ["Client", "Server"];
     } else {
-      String allowedCategoriesString = allowedCategoriesList.join(', ');
       for (String category in categories) {
-        if (!allowedCategories.contains(category)) {
+        if (!["Client", "Server"].contains(category)) {
           fail('Unsupported library category "$category", '
-               'supported categories are: $allowedCategoriesString');
+               'supported categories are: Client, Server, all');
         }
       }
     }
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index 85427b1..5001b54 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -263,6 +263,22 @@
                                 Enqueuer enqueuer,
                                 Registry registry,
                                 {bool mirrorUsage: false}) {
+    registerPlatformMembers(type,
+        registerGetter: registry.registerDynamicGetter,
+        registerSetter: registry.registerDynamicSetter,
+        registerInvocation: registry.registerDynamicInvocation);
+    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 registerGetter(UniverseSelector selector),
+       void registerSetter(UniverseSelector selector),
+       void registerInvocation(UniverseSelector selector)}) {
+
     // Without patching, dart2dart has no way of performing sound tree-shaking
     // in face external functions. Therefore we employ another scheme:
     //
@@ -314,13 +330,13 @@
               element.computeType(resolution);
               Selector selector = new Selector.fromElement(element);
               if (selector.isGetter) {
-                registry.registerDynamicGetter(
+                registerGetter(
                     new UniverseSelector(selector, null));
               } else if (selector.isSetter) {
-                registry.registerDynamicSetter(
+                registerSetter(
                     new UniverseSelector(selector, null));
               } else {
-                registry.registerDynamicInvocation(
+                registerInvocation(
                     new UniverseSelector(selector, null));
               }
             });
@@ -328,8 +344,6 @@
         }
       }
     }
-    super.registerInstantiatedType(
-        type, enqueuer, registry, mirrorUsage: mirrorUsage);
   }
 
   @override
@@ -347,28 +361,25 @@
   DartResolutionCallbacks(this.backend);
 
   @override
-  WorldImpact transformImpact(ResolutionWorldImpact worldImpact) {
+  WorldImpact transformImpact(ResolutionImpact worldImpact) {
     TransformedWorldImpact transformed =
         new TransformedWorldImpact(worldImpact);
     for (DartType typeLiteral in worldImpact.typeLiterals) {
-      onTypeLiteral(typeLiteral, transformed);
+      if (typeLiteral.isInterfaceType) {
+        backend.usedTypeLiterals.add(typeLiteral.element);
+      }
     }
     for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) {
       // TODO(johnniwinther): Remove this when dependency tracking is done on
       // the world impact itself.
-      transformed.registerInstantiation(instantiatedType);
-      backend.registerInstantiatedType(
-          instantiatedType, backend.compiler.enqueuer.resolution, transformed);
+      transformed.registerInstantiatedType(instantiatedType);
+      backend.registerPlatformMembers(instantiatedType,
+          registerGetter: transformed.registerDynamicGetter,
+          registerSetter: transformed.registerDynamicSetter,
+          registerInvocation: transformed.registerDynamicInvocation);
     }
     return transformed;
   }
-
-  @override
-  void onTypeLiteral(DartType type, Registry registry) {
-    if (type.isInterfaceType) {
-      backend.usedTypeLiterals.add(type.element);
-    }
-  }
 }
 
 class EmitterUnparser extends Unparser {
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 d215de3..2500c44 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
@@ -4,10 +4,9 @@
 
 library dart_tree_printer;
 
+import '../common.dart';
 import '../constants/values.dart' as values;
 import '../dart_types.dart' as types;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart' as elements;
 import '../resolution/tree_elements.dart' show
     TreeElementMapping;
diff --git a/pkg/compiler/lib/src/dart_backend/dart_backend.dart b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
index fcfc0c8..57b7af5 100644
--- a/pkg/compiler/lib/src/dart_backend/dart_backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
@@ -9,6 +9,7 @@
 
 import '../../compiler.dart' show
     CompilerOutputProvider;
+import '../common.dart';
 import '../common/backend_api.dart' show
     Backend;
 import '../common/codegen.dart' show
@@ -21,7 +22,7 @@
 import '../common/resolution.dart' show
     Resolution,
     ResolutionCallbacks,
-    ResolutionWorldImpact,
+    ResolutionImpact,
     TransformedWorldImpact;
 import '../common/tasks.dart' show
     CompilerTask;
@@ -32,15 +33,6 @@
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE,
-    Spannable,
-    SpannableAssertionFailure;
 import '../elements/elements.dart';
 import '../enqueue.dart' show
     Enqueuer,
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index 353c00a..db02d23 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -6,18 +6,12 @@
 
 import 'dart:math' show min;
 
+import 'common.dart';
 import 'common/resolution.dart' show
     Resolution;
 import 'compiler.dart' show
     Compiler;
 import 'core_types.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE,
-    NO_LOCATION_SPANNABLE;
 import 'elements/modelx.dart' show
     LibraryElementX,
     TypeDeclarationElementX,
@@ -76,17 +70,27 @@
     return subst(type.typeArguments, type.element.typeVariables);
   }
 
-  /**
-   * Returns the unaliased type of this type.
-   *
-   * The unaliased type of a typedef'd type is the unaliased type to which its
-   * name is bound. The unaliased version of any other type is the type itself.
-   *
-   * For example, the unaliased type of [: typedef A Func<A,B>(B b) :] is the
-   * function type [: (B) -> A :] and the unaliased type of
-   * [: Func<int,String> :] is the function type [: (String) -> int :].
-   */
-  DartType unalias(Resolution resolution);
+  /// Computes the unaliased type of this type.
+  ///
+  /// The unaliased type of a typedef'd type is the unaliased type to which its
+  /// name is bound. The unaliased version of any other type is the type itself.
+  ///
+  /// For example, the unaliased type of `typedef A Func<A,B>(B b)` is the
+  /// function type `(B) -> A` and the unaliased type of `Func<int,String>`
+  /// is the function type `(String) -> int`.
+  // 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
+  /// name is bound. The unaliased version of any other type is the type itself.
+  ///
+  /// For example, the unaliased type of `typedef A Func<A,B>(B b)` is the
+  /// function type `(B) -> A` and the unaliased type of `Func<int,String>`
+  /// is the function type `(String) -> int`.
+  DartType get unaliased => this;
 
   /**
    * If this type is malformed or a generic type created with the wrong number
@@ -219,8 +223,6 @@
     return this;
   }
 
-  DartType unalias(Resolution resolution) => this;
-
   TypeVariableType get typeVariableOccurrence => this;
 
   void forEachTypeVariable(f(TypeVariableType variable)) {
@@ -253,8 +255,6 @@
 
   DartType subst(List<DartType> arguments, List<DartType> parameters) => this;
 
-  DartType unalias(Resolution resolution) => this;
-
   accept(DartTypeVisitor visitor, var argument) {
     return visitor.visitStatementType(this, argument);
   }
@@ -274,8 +274,6 @@
     return this;
   }
 
-  DartType unalias(Resolution resolution) => this;
-
   accept(DartTypeVisitor visitor, var argument) {
     return visitor.visitVoidType(this, argument);
   }
@@ -324,8 +322,6 @@
   // Malformed types are treated as dynamic.
   bool get treatAsDynamic => true;
 
-  DartType unalias(Resolution resolution) => this;
-
   accept(DartTypeVisitor visitor, var argument) {
     return visitor.visitMalformedType(this, argument);
   }
@@ -491,8 +487,6 @@
     return null;
   }
 
-  DartType unalias(Resolution resolution) => this;
-
   MemberSignature lookupInterfaceMember(Name name) {
     MemberSignature member = element.lookupInterfaceMember(name);
     if (member != null && isGeneric) {
@@ -660,8 +654,6 @@
     return this;
   }
 
-  DartType unalias(Resolution resolution) => this;
-
   TypeVariableType get typeVariableOccurrence {
     TypeVariableType typeVariableType = returnType.typeVariableOccurrence;
     if (typeVariableType != null) return typeVariableType;
@@ -766,6 +758,8 @@
 }
 
 class TypedefType extends GenericType {
+  DartType _unaliased;
+
   TypedefType(TypedefElement element,
               [List<DartType> typeArguments = const <DartType>[]])
       : super(element, typeArguments);
@@ -785,11 +779,21 @@
     return new TypedefType(element, newTypeArguments);
   }
 
-  DartType unalias(Resolution resolution) {
-    element.ensureResolved(resolution);
-    element.checkCyclicReference(resolution);
-    DartType definition = element.alias.unalias(resolution);
-    return definition.substByContext(this);
+  void computeUnaliased(Resolution resolution) {
+    if (_unaliased == null) {
+      element.ensureResolved(resolution);
+      element.checkCyclicReference(resolution);
+      element.alias.computeUnaliased(resolution);
+      _unaliased = element.alias.unaliased.substByContext(this);
+    }
+  }
+
+  DartType get unaliased {
+    if (_unaliased == null) {
+      DartType definition = element.alias.unaliased;
+      _unaliased = definition.substByContext(this);
+    }
+    return _unaliased;
   }
 
   int get hashCode => super.hashCode;
@@ -801,21 +805,6 @@
   }
 }
 
-/// A typedef which has already been resolved to its alias.
-class ResolvedTypedefType extends TypedefType {
-  FunctionType alias;
-
-  ResolvedTypedefType(TypedefElement element,
-                      List<DartType> typeArguments,
-                      this.alias)
-        : super(element, typeArguments) {
-    assert(invariant(element, alias != null,
-        message: 'Alias must be non-null on $element.'));
-  }
-
-  FunctionType unalias(Resolution resolution) => alias;
-}
-
 /**
  * Special type for the `dynamic` type.
  */
@@ -830,8 +819,6 @@
 
   TypeKind get kind => TypeKind.DYNAMIC;
 
-  DartType unalias(Resolution resolution) => this;
-
   DartType subst(List<DartType> arguments, List<DartType> parameters) => this;
 
   accept(DartTypeVisitor visitor, var argument) {
@@ -949,11 +936,11 @@
  */
 abstract class AbstractTypeRelation
     extends BaseDartTypeVisitor<bool, DartType> {
-  final Compiler compiler;
-  CoreTypes get coreTypes => compiler.coreTypes;
-  Resolution get resolution => compiler.resolution;
+  final Resolution resolution;
 
-  AbstractTypeRelation(this.compiler);
+  AbstractTypeRelation(this.resolution);
+
+  CoreTypes get coreTypes => resolution.coreTypes;
 
   bool visitType(DartType t, DartType s) {
     throw 'internal error: unknown type kind ${t.kind}';
@@ -1130,7 +1117,7 @@
 }
 
 class MoreSpecificVisitor extends AbstractTypeRelation {
-  MoreSpecificVisitor(Compiler compiler) : super(compiler);
+  MoreSpecificVisitor(Resolution resolution) : super(resolution);
 
   bool isMoreSpecific(DartType t, DartType s) {
     if (identical(t, s) || s.treatAsDynamic || t == coreTypes.nullType) {
@@ -1145,8 +1132,10 @@
     if (s == coreTypes.objectType) {
       return true;
     }
-    t = t.unalias(resolution);
-    s = s.unalias(resolution);
+    t.computeUnaliased(resolution);
+    t = t.unaliased;
+    s.computeUnaliased(resolution);
+    s = s.unaliased;
 
     return t.accept(this, s);
   }
@@ -1174,7 +1163,7 @@
  */
 class SubtypeVisitor extends MoreSpecificVisitor {
 
-  SubtypeVisitor(Compiler compiler) : super(compiler);
+  SubtypeVisitor(Resolution resolution) : super(resolution);
 
   bool isSubtype(DartType t, DartType s) {
     return t.treatAsDynamic || isMoreSpecific(t, s);
@@ -1237,26 +1226,23 @@
 }
 
 class Types implements DartTypes {
-  // TODO(johnniwinther): Replace by [CoreTypes].
-  final Compiler compiler;
+  final Resolution resolution;
   final MoreSpecificVisitor moreSpecificVisitor;
   final SubtypeVisitor subtypeVisitor;
   final PotentialSubtypeVisitor potentialSubtypeVisitor;
 
-  CoreTypes get coreTypes => compiler.coreTypes;
+  CoreTypes get coreTypes => resolution.coreTypes;
 
-  DiagnosticReporter get reporter => compiler.reporter;
+  DiagnosticReporter get reporter => resolution.reporter;
 
-  Resolution get resolution => compiler.resolution;
+  Types(Resolution resolution)
+      : this.resolution = resolution,
+        this.moreSpecificVisitor = new MoreSpecificVisitor(resolution),
+        this.subtypeVisitor = new SubtypeVisitor(resolution),
+        this.potentialSubtypeVisitor = new PotentialSubtypeVisitor(resolution);
 
-  Types(Compiler compiler)
-      : this.compiler = compiler,
-        this.moreSpecificVisitor = new MoreSpecificVisitor(compiler),
-        this.subtypeVisitor = new SubtypeVisitor(compiler),
-        this.potentialSubtypeVisitor = new PotentialSubtypeVisitor(compiler);
-
-  Types copy(Compiler compiler) {
-    return new Types(compiler);
+  Types copy(Resolution resolution) {
+    return new Types(resolution);
   }
 
   /// Flatten [type] by recursively removing enclosing `Future` annotations.
@@ -1290,15 +1276,13 @@
     return type;
   }
 
-  /** Returns true if [t] is more specific than [s]. */
+  /// Returns true if [t] is more specific than [s].
   bool isMoreSpecific(DartType t, DartType s) {
     return moreSpecificVisitor.isMoreSpecific(t, s);
   }
 
-  /**
-   * Returns the most specific type of [t] and [s] or `null` if neither is more
-   * specific than the other.
-   */
+  /// Returns the most specific type of [t] and [s] or `null` if neither is more
+  /// specific than the other.
   DartType getMostSpecific(DartType t, DartType s) {
     if (isMoreSpecific(t, s)) {
       return t;
@@ -1644,13 +1628,14 @@
   DartType computeLeastUpperBound(DartType a, DartType b) {
     if (a == b) return a;
 
-    if (a.isTypeVariable ||
-           b.isTypeVariable) {
+    if (a.isTypeVariable || b.isTypeVariable) {
       return computeLeastUpperBoundTypeVariableTypes(a, b);
     }
 
-    a = a.unalias(resolution);
-    b = b.unalias(resolution);
+    a.computeUnaliased(resolution);
+    a = a.unaliased;
+    b.computeUnaliased(resolution);
+    b = b.unaliased;
 
     if (a.treatAsDynamic || b.treatAsDynamic) return const DynamicType();
     if (a.isVoid || b.isVoid) return const VoidType();
@@ -1699,19 +1684,22 @@
   ///     unaliasedBound(U) = unaliasedBound(Baz) = ()->dynamic
   ///     unaliasedBound(X) = unaliasedBound(Y) = `Object`
   ///
-  static DartType computeUnaliasedBound(Compiler compiler, DartType type) {
+  static DartType computeUnaliasedBound(
+      Resolution resolution,
+      DartType type) {
     DartType originalType = type;
     while (type.isTypeVariable) {
       TypeVariableType variable = type;
       type = variable.element.bound;
       if (type == originalType) {
-        type = compiler.objectClass.rawType;
+        type = resolution.coreTypes.objectType;
       }
     }
     if (type.isMalformed) {
       return const DynamicType();
     }
-    return type.unalias(compiler.resolution);
+    type.computeUnaliased(resolution);
+    return type.unaliased;
   }
 
   /// Computes the interface type of [type], which is the type that defines
@@ -1741,13 +1729,15 @@
   /// When typechecking `o.foo` the interface type of the static type of `o` is
   /// used to lookup the existence and type of `foo`.
   ///
-  static InterfaceType computeInterfaceType(Compiler compiler, DartType type) {
-    type = computeUnaliasedBound(compiler, type);
+  static InterfaceType computeInterfaceType(
+      Resolution resolution,
+      DartType type) {
+    type = computeUnaliasedBound(resolution, type);
     if (type.treatAsDynamic) {
       return null;
     }
     if (type.isFunctionType) {
-      type = compiler.functionClass.rawType;
+      type = resolution.coreTypes.functionType;
     }
     assert(invariant(NO_LOCATION_SPANNABLE, type.isInterfaceType,
         message: "unexpected type kind ${type.kind}."));
@@ -1761,7 +1751,7 @@
  * [:false:] only if we are sure no such substitution exists.
  */
 class PotentialSubtypeVisitor extends SubtypeVisitor {
-  PotentialSubtypeVisitor(Compiler compiler) : super(compiler);
+  PotentialSubtypeVisitor(Resolution resolution) : super(resolution);
 
   bool isSubtype(DartType t, DartType s) {
     if (t is TypeVariableType || s is TypeVariableType) {
@@ -1779,10 +1769,10 @@
 /// constraints are too complex or the two types are too different, `false`
 /// is returned. Otherwise, the [constraintMap] holds the valid constraints.
 class MoreSpecificSubtypeVisitor extends BaseDartTypeVisitor<bool, DartType> {
-  final Compiler compiler;
+  final Types types;
   Map<TypeVariableType, DartType> constraintMap;
 
-  MoreSpecificSubtypeVisitor(Compiler this.compiler);
+  MoreSpecificSubtypeVisitor(this.types);
 
   /// Compute an instance of [element] which is more specific than [supertype].
   /// If no instance is found, `null` is returned.
@@ -1809,7 +1799,7 @@
   }
 
   bool visitType(DartType type, DartType argument) {
-    return compiler.types.isMoreSpecific(type, argument);
+    return types.isMoreSpecific(type, argument);
   }
 
   bool visitTypes(List<DartType> a, List<DartType> b) {
@@ -1822,7 +1812,7 @@
 
   bool visitTypeVariableType(TypeVariableType type, DartType argument) {
     DartType constraint =
-        compiler.types.getMostSpecific(constraintMap[type], argument);
+        types.getMostSpecific(constraintMap[type], argument);
     constraintMap[type] = constraint;
     return constraint != null;
   }
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index d0f3120..4e095df 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -4,10 +4,9 @@
 
 library deferred_load;
 
+import 'common.dart';
 import 'common/backend_api.dart' show
     Backend;
-import 'common/resolution.dart' show
-    Resolution;
 import 'common/tasks.dart' show
     CompilerTask;
 import 'compiler.dart' show
@@ -18,10 +17,6 @@
     DeferredConstantValue,
     StringConstantValue;
 import 'dart_types.dart';
-import 'diagnostics/messages.dart' show
-    MessageKind;
-import 'diagnostics/spannable.dart' show
-    Spannable;
 import 'elements/elements.dart' show
     AccessorElement,
     AstElement,
@@ -37,6 +32,8 @@
     PrefixElement,
     ScopeContainerElement,
     TypedefElement;
+import 'enqueue.dart' show
+    WorldImpact;
 import 'js_backend/js_backend.dart' show
     JavaScriptBackend;
 import 'resolution/resolution.dart' show
@@ -269,6 +266,8 @@
 
     /// Recursively collects all the dependencies of [type].
     void collectTypeDependencies(DartType type) {
+      // TODO(het): we would like to separate out types that are only needed for
+      // rti from types that are needed for their members.
       if (type is GenericType) {
         type.typeArguments.forEach(collectTypeDependencies);
       }
@@ -285,7 +284,7 @@
         collectTypeDependencies(type.returnType);
       } else if (type is TypedefType) {
         elements.add(type.element);
-        collectTypeDependencies(type.unalias(compiler.resolution));
+        collectTypeDependencies(type.unaliased);
       } else if (type is InterfaceType) {
         elements.add(type.element);
       }
@@ -299,42 +298,49 @@
       // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been
       // removed.
       if (element is! AstElement) return;
-      AstElement astElement = element;
 
-      // TODO(sigurdm): We want to be more specific about this - need a better
-      // way to query "liveness".
-      if (astElement is! TypedefElement &&
-          !compiler.enqueuer.resolution.hasBeenProcessed(astElement)) {
-        return;
-      }
-
-      TreeElements treeElements = astElement.resolvedAst.elements;
-
-      assert(treeElements != null);
-
-      for (Element dependency in treeElements.allElements) {
-        if (dependency.isLocal && !dependency.isFunction) continue;
-        if (dependency.isErroneous) continue;
-        if (dependency.isTypeVariable) continue;
-
-        elements.add(dependency);
-      }
-
-      for (DartType type in treeElements.requiredTypes) {
-        collectTypeDependencies(type);
-      }
-
-      treeElements.forEachConstantNode((Node node, _) {
-        // Explicitly depend on the backend constants.
-        ConstantValue value =
-            backend.constants.getConstantValueForNode(node, treeElements);
-        if (value != null) {
-          // TODO(johnniwinther): Assert that all constants have values when
-          // these are directly evaluated.
-          constants.add(value);
+      if (element.isTypedef) {
+        TypedefElement typdef = element;
+        collectTypeDependencies(typdef.thisType);
+      } else {
+        // TODO(sigurdm): We want to be more specific about this - need a better
+        // way to query "liveness".
+        AstElement analyzableElement = element.analyzableElement.declaration;
+        if (!compiler.enqueuer.resolution.hasBeenProcessed(analyzableElement)) {
+          return;
         }
-      });
-      elements.addAll(treeElements.otherDependencies);
+
+        WorldImpact worldImpact =
+            compiler.resolution.getWorldImpact(analyzableElement);
+        elements.addAll(worldImpact.staticUses);
+        elements.addAll(worldImpact.closures);
+        for (DartType type in worldImpact.typeLiterals) {
+          if (type.isTypedef || type.isInterfaceType) {
+            elements.add(type.element);
+          }
+        }
+        for (InterfaceType type in worldImpact.instantiatedTypes) {
+          elements.add(type.element);
+        }
+
+        TreeElements treeElements = analyzableElement.resolvedAst.elements;
+        assert(treeElements != null);
+
+        for (DartType type in treeElements.requiredTypes) {
+          collectTypeDependencies(type);
+        }
+
+        treeElements.forEachConstantNode((Node node, _) {
+          // Explicitly depend on the backend constants.
+          ConstantValue value =
+              backend.constants.getConstantValueForNode(node, treeElements);
+          if (value != null) {
+            // TODO(johnniwinther): Assert that all constants have values when
+            // these are directly evaluated.
+            constants.add(value);
+          }
+        });
+      }
     }
 
     // TODO(sigurdm): How is metadata on a patch-class handled?
@@ -346,8 +352,7 @@
       }
     }
 
-    if (element is FunctionElement &&
-        compiler.resolverWorld.closurizedMembers.contains(element)) {
+    if (element is FunctionElement) {
       collectTypeDependencies(element.type);
     }
 
@@ -358,7 +363,8 @@
       void addLiveInstanceMember(Element element) {
         if (!compiler.enqueuer.resolution.hasBeenProcessed(element)) return;
         if (!isMirrorUsage && !element.isInstanceMember) return;
-        collectDependencies(element.implementation);
+        elements.add(element);
+        collectDependencies(element);
       }
       ClassElement cls = element.declaration;
       cls.forEachLocalMember(addLiveInstanceMember);
@@ -372,6 +378,7 @@
       elements.add(cls.implementation);
     } else if (Elements.isStaticOrTopLevel(element) ||
                element.isConstructor) {
+      elements.add(element);
       collectDependencies(element);
     }
     if (element.isGenerativeConstructor) {
@@ -868,6 +875,41 @@
     });
     return mapping;
   }
+
+  /// 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>>{};
+    _elementToOutputUnit.forEach((Element element, OutputUnit output) {
+      elementMap.putIfAbsent(output, () => <String>[]).add('$element');
+    });
+    _constantToOutputUnit.forEach((ConstantValue value, OutputUnit output) {
+      constantMap.putIfAbsent(output, () => <String>[])
+          .add(value.toStructuredString());
+    });
+
+    StringBuffer sb = new StringBuffer();
+    for (OutputUnit outputUnit in allOutputUnits) {
+      sb.write(outputUnit.name);
+      List<String> elements = elementMap[outputUnit];
+      if (elements != null) {
+        sb.write('\n elements:');
+        for (String element in elements..sort()) {
+          sb.write('\n  $element');
+        }
+      }
+      List<String> constants = constantMap[outputUnit];
+      if (constants != null) {
+        sb.write('\n constants:');
+        for (String value in constants..sort()) {
+          sb.write('\n  $value');
+        }
+      }
+    }
+    return sb.toString();
+  }
+
 }
 
 class ImportDescription {
diff --git a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
index 7d624b2..e4bd449 100644
--- a/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
+++ b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
@@ -13,7 +13,6 @@
 import 'messages.dart';
 
 class DiagnosticOptions {
-
   /// Emit terse diagnostics without howToFix.
   final bool terseDiagnostics;
 
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 347b25b..edaf69c 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -275,6 +275,8 @@
   INVALID_UNNAMED_CONSTRUCTOR_NAME,
   INVALID_URI,
   INVALID_USE_OF_SUPER,
+  JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
+  JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
   LIBRARY_NAME_MISMATCH,
   LIBRARY_NOT_FOUND,
   LIBRARY_NOT_SUPPORTED,
@@ -2130,6 +2132,45 @@
         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 [
+              """
+              import 'package:js/js.dart';
+
+              class Foo { }
+
+              @Js()
+              class Bar extends Foo { }
+
+              main() {
+                new Bar();
+              }
+              """]),
+
+      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()
+              class Foo {
+                bar() {}
+              }
+
+              main() {
+                new Foo().bar();
+              }
+              """]),
+
       MessageKind.LIBRARY_NOT_FOUND:
         const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND,
           "Library not found '#{resolvedUri}'."),
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index e9d7c05..22fa2f0 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -9,15 +9,12 @@
 
 import 'package:dart2js_info/info.dart';
 
+import 'common.dart';
 import 'common/tasks.dart' show
     CompilerTask;
 import 'constants/values.dart' show ConstantValue;
 import 'compiler.dart' show
     Compiler;
-import 'diagnostics/messages.dart' show
-    MessageKind;
-import 'diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
 import 'elements/elements.dart';
 import 'elements/visitor.dart';
 import 'types/types.dart' show
@@ -115,7 +112,7 @@
   }
 
   TypedefInfo visitTypedefElement(TypedefElement element, _) {
-    if (element.alias == null) return null;
+    if (!element.isResolved) return null;
     TypedefInfo info = new TypedefInfo(element.name, '${element.alias}',
         _unitInfoForElement(element));
     _elementToInfo[element] = info;
@@ -348,7 +345,17 @@
   Selection(this.selectedElement, this.mask);
 }
 
-class DumpInfoTask extends CompilerTask {
+/// Interface used to record information from different parts of the compiler so
+/// we can emit them in the dump-info task.
+// TODO(sigmund,het): move more features here. Ideally the dump-info task
+// shouldn't reach into internals of other parts of the compiler. For example,
+// we currently reach into the full emitter and as a result we don't support
+// dump-info when using the startup-emitter (issue #24190).
+abstract class InfoReporter {
+  void reportInlined(Element element, Element inlinedFrom);
+}
+
+class DumpInfoTask extends CompilerTask implements InfoReporter {
   DumpInfoTask(Compiler compiler) : super(compiler);
 
   String get name => "Dump Info";
@@ -382,7 +389,7 @@
     _programSize = programSize;
   }
 
-  void registerInlined(Element element, Element inlinedFrom) {
+  void reportInlined(Element element, Element inlinedFrom) {
     inlineCount.putIfAbsent(element, () => 0);
     inlineCount[element] += 1;
     inlineMap.putIfAbsent(inlinedFrom, () => new List<Element>());
@@ -548,6 +555,7 @@
     result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap();
     stopwatch.stop();
     result.program = new ProgramInfo(
+        entrypoint: infoCollector._elementToInfo[compiler.mainFunction],
         size: _programSize,
         dart2jsVersion: compiler.hasBuildId ? compiler.buildId : null,
         compilationMoment: new DateTime.now(),
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index 9d04582..f9c4e59 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -406,13 +406,8 @@
 
   @override
   bool implementsInterface(ClassElement intrface) {
-    for (DartType implementedInterfaceType in allSupertypes) {
-      ClassElement implementedInterface = implementedInterfaceType.element;
-      if (identical(implementedInterface, intrface)) {
-        return true;
-      }
-    }
-    return false;
+    return this != intrface &&
+        allSupertypesAndSelf.asInstanceOf(intrface) != null;
   }
 
   @override
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index d10bf45..60fcb20 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -4,6 +4,7 @@
 
 library elements;
 
+import '../common.dart';
 import '../common/resolution.dart' show
     Resolution;
 import '../compiler.dart' show
@@ -11,13 +12,6 @@
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/messages.dart' show
-MessageKind;
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../resolution/scope.dart' show
     Scope;
 import '../resolution/tree_elements.dart' show
@@ -312,6 +306,8 @@
   bool get isTopLevel;
   bool get isAssignable;
   bool get isNative;
+  bool get isJsInterop;
+
   bool get isDeferredLoaderGetter;
 
   /// True if the element is declared in a patch library but has no
@@ -408,6 +404,8 @@
   bool get hasFixedBackendName;
   String get fixedBackendName;
 
+  String get jsInteropName;
+
   bool get isAbstract;
 
   Scope buildScope();
@@ -417,6 +415,9 @@
   AnalyzableElement get analyzableElement;
 
   accept(ElementVisitor visitor, arg);
+
+  void setJsInteropName(String name);
+  void markAsJsInterop();
 }
 
 class Elements {
@@ -521,7 +522,7 @@
 
   static bool isNativeOrExtendsNative(ClassElement element) {
     if (element == null) return false;
-    if (element.isNative) return true;
+    if (element.isNative || element.isJsInterop) return true;
     assert(element.isResolved);
     return isNativeOrExtendsNative(element.superclass);
   }
@@ -1290,7 +1291,8 @@
   /// `null` otherwise.
   ConstantConstructor get constantConstructor;
 
-  /// `true` if this constructor is either `bool.fromEnviroment`
+  /// `true` if this constructor is one of `bool.fromEnvironment`,
+  /// `int.fromEnvironment`, or `String.fromEnvironment`.
   bool get isFromEnvironmentConstructor;
 
   /// Use [enclosingClass] instead.
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 488c7e1..6dfd751 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -4,6 +4,7 @@
 
 library elements.modelx;
 
+import '../common.dart';
 import '../common/resolution.dart' show
     Resolution,
     Parsing;
@@ -13,16 +14,8 @@
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart';
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
-import '../helpers/helpers.dart';
+import '../diagnostics/messages.dart' show
+    MessageTemplate;
 import '../ordered_typeset.dart' show
     OrderedTypeSet;
 import '../resolution/class_members.dart' show
@@ -241,9 +234,54 @@
 
   String _fixedBackendName = null;
   bool _isNative = false;
-  bool get isNative => _isNative;
-  bool get hasFixedBackendName => _fixedBackendName != null;
-  String get fixedBackendName => _fixedBackendName;
+  String _jsInteropName = null;
+  bool _isJsInterop = false;
+
+  /// Whether the element is implemented via typed JavaScript interop.
+  bool get isJsInterop => _isJsInterop;
+  /// JavaScript name for the element if it is implemented via typed JavaScript
+  /// interop.
+  String get jsInteropName => _jsInteropName;
+
+  void markAsJsInterop() {
+    _isJsInterop = true;
+  }
+
+  void setJsInteropName(String name) {
+    assert(invariant(this,
+        _isJsInterop,
+        message: 'Element is not js interop but given a js interop name.'));
+    _jsInteropName = name;
+  }
+
+  /// Whether the element corresponds to a native JavaScript construct either
+  /// through the existing [setNative] mechanism which is only allowed
+  /// for internal libraries or via the new typed JavaScriptInterop mechanism
+  /// which is allowed for user libraries.
+  bool get isNative => _isNative || isJsInterop;
+  bool get hasFixedBackendName => fixedBackendName != null || isJsInterop;
+
+  String _jsNameHelper(Element e) {
+    assert(invariant(this,
+        !(_isJsInterop &&  _jsInteropName == null),
+        message:
+            'Element is js interop but js interop name has not yet been'
+            'computed.'));
+    if (e.jsInteropName != null && e.jsInteropName.isNotEmpty) {
+      return e.jsInteropName;
+    }
+    return e.isLibrary ? 'self' : e.name;
+  }
+
+  String get fixedBackendName {
+    if (_fixedBackendName == null && isJsInterop) {
+      // If an element isJsInterop but _isJsInterop is false that means it is
+      // considered interop as the parent class is interop.
+      _fixedBackendName =  _jsNameHelper(isConstructor ? enclosingClass : this);
+    }
+    return _fixedBackendName;
+  }
+
   // Marks this element as a native element.
   void setNative(String name) {
     _isNative = true;
@@ -1318,7 +1356,13 @@
   /**
    * The type annotation which defines this typedef.
    */
-  DartType alias;
+  DartType aliasCache;
+
+  DartType get alias {
+    assert(invariant(this, hasBeenCheckedForCycles,
+        message: "$this has not been checked for cycles."));
+    return aliasCache;
+  }
 
   /// [:true:] if the typedef has been checked for cyclic reference.
   bool hasBeenCheckedForCycles = false;
@@ -2009,6 +2053,18 @@
     typeCache = _functionSignatureCache.type;
   }
 
+  /// 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.
+  bool get isJsInterop {
+    if (!isExternal) return false;
+
+    if (super.isJsInterop) return true;
+    if (isClassMember) return contextClass.isJsInterop;
+    if (isTopLevel) return library.isJsInterop;
+    return false;
+  }
+
   List<ParameterElement> get parameters {
     // TODO(johnniwinther): Store the list directly, possibly by using List
     // instead of Link in FunctionSignature.
@@ -2228,7 +2284,11 @@
       return immediateRedirectionTarget;
     }
     assert(!isRedirectingFactory || internalEffectiveTarget != null);
-    return isRedirectingFactory ? internalEffectiveTarget : this;
+    if (isRedirectingFactory) return internalEffectiveTarget;
+    if (isPatched) {
+      return internalEffectiveTarget ?? this;
+    }
+    return this;
   }
 
   InterfaceType computeEffectiveTargetType(InterfaceType newType) {
@@ -2625,7 +2685,7 @@
     return asInstanceOf(compiler.functionClass) != null || callType != null;
   }
 
-  bool get isNative => nativeTagInfo != null;
+  bool get isNative => nativeTagInfo != null || isJsInterop;
 
   void setNative(String name) {
     // TODO(johnniwinther): Assert that this is only called once. The memory
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 212218d..522bb29 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -7,6 +7,7 @@
 import 'dart:collection' show
     Queue;
 
+import 'common.dart';
 import 'common/names.dart' show
     Identifiers;
 import 'common/resolution.dart' show
@@ -27,12 +28,6 @@
 import 'dart_types.dart' show
     DartType,
     InterfaceType;
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
 import 'elements/elements.dart' show
     AnalyzableElement,
     AstElement,
@@ -51,10 +46,6 @@
     TypedefElement;
 import 'js/js.dart' as js;
 import 'native/native.dart' as native;
-import 'resolution/members.dart' show
-    ResolverVisitor;
-import 'tree/tree.dart' show
-    Send;
 import 'types/types.dart' show
     TypeMaskStrategy;
 import 'universe/selector.dart' show
@@ -121,6 +112,33 @@
   Iterable<MethodElement> get closurizedFunctions => const <MethodElement>[];
 
   Iterable<LocalFunctionElement> get closures => const <LocalFunctionElement>[];
+
+  Iterable<DartType> get typeLiterals => const <DartType>[];
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+
+    void add(String title, Iterable iterable) {
+      if (iterable.isNotEmpty) {
+        sb.write('\n $title:');
+        iterable.forEach((e) => sb.write('\n  $e'));
+      }
+    }
+
+    add('dynamic invocations', dynamicInvocations);
+    add('dynamic getters', dynamicGetters);
+    add('dynamic setters', dynamicSetters);
+    add('static uses', staticUses);
+    add('instantiated types', instantiatedTypes);
+    add('is-checks', isChecks);
+    add('checked-mode checks', checkedModeChecks);
+    add('as-casts', asCasts);
+    add('closurized functions', closurizedFunctions);
+    add('closures', closures);
+    add('type literals', typeLiterals);
+
+    return sb.toString();
+  }
 }
 
 abstract class Enqueuer {
@@ -784,12 +802,7 @@
 
 /// [Enqueuer] which is specific to resolution.
 class ResolutionEnqueuer extends Enqueuer {
-  /**
-   * Map from declaration elements to the [TreeElements] object holding the
-   * resolution mapping for the element implementation.
-   *
-   * Invariant: Key elements are declaration elements.
-   */
+  /// All declaration elements that have been processed by the resolver.
   final Set<AstElement> processedElements;
 
   final Queue<ResolutionWorkItem> queue;
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index 42e28c0..8ff4be2 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart
@@ -233,7 +233,9 @@
     return set.add(value);
   }
 
-  void addAll(Iterable<E> elements) => set.addAll(elements);
+  void addAll(Iterable<E> elements) {
+    elements.forEach(add);
+  }
 
   bool remove(Object value) => set.remove(value);
 
diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart
index 6b3e787..f956850 100644
--- a/pkg/compiler/lib/src/helpers/helpers.dart
+++ b/pkg/compiler/lib/src/helpers/helpers.dart
@@ -13,16 +13,11 @@
 import 'dart:convert';
 
 import '../../compiler.dart';
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
 import '../diagnostics/invariant.dart' show
     DEBUG_MODE;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../util/util.dart';
 
 part 'debug_collection.dart';
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index b1cf504..7daed4e 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -7,15 +7,12 @@
 import 'dart:collection' show
     IterableMixin;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 30c9c8c..5e817af 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -7,6 +7,7 @@
 import '../closure.dart' show
     ClosureClassMap,
     ClosureScope;
+import '../common.dart';
 import '../common/names.dart' show
     Selectors;
 import '../compiler.dart' show
@@ -21,8 +22,6 @@
     FunctionType,
     InterfaceType,
     TypeKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../js_backend/js_backend.dart' as js;
 import '../native/native.dart' as native;
@@ -2283,7 +2282,7 @@
     TypeMask moveNextMask = elements.getMoveNextTypeMask(node);
 
     js.JavaScriptBackend backend = compiler.backend;
-    Element ctor = backend.getStreamIteratorConstructor();
+    Element ctor = backend.helpers.streamIteratorConstructor;
 
     /// Synthesize a call to the [StreamIterator] constructor.
     T iteratorType = handleStaticSend(node, null, null, ctor,
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index d1f9253..86551cb 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -8,6 +8,7 @@
     IterableBase,
     Queue;
 
+import '../common.dart';
 import '../common/names.dart' show
     Identifiers,
     Names;
@@ -21,12 +22,6 @@
     FunctionType,
     InterfaceType,
     TypeKind;
-import '../diagnostics/diagnostic_listener.dart' show
-  DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../js_backend/js_backend.dart' show
     Annotations,
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index c1d51cc..dd50651 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -415,7 +415,8 @@
       } else {
         assert(element.isFunction ||
                element.isGetter ||
-               element.isSetter);
+               element.isSetter ||
+               element.isConstructor);
         TypedElement typedElement = element;
         var elementType = typedElement.type;
         if (elementType.kind != TypeKind.FUNCTION) {
diff --git a/pkg/compiler/lib/src/info/send_info.dart b/pkg/compiler/lib/src/info/send_info.dart
index 0299142..b29fe96 100644
--- a/pkg/compiler/lib/src/info/send_info.dart
+++ b/pkg/compiler/lib/src/info/send_info.dart
@@ -6,26 +6,33 @@
 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 '../diagnostics/diagnostic_listener.dart' show DiagnosticReporter;
-import '../diagnostics/messages.dart' show MessageKind;
-import '../compiler.dart' show Compiler;
-import '../common/tasks.dart' show CompilerTask;
+import 'package:dart2js_info/src/measurements.dart';
+import 'package:dart2js_info/src/util.dart' show
+    recursiveDiagnosticString;
+
+import '../common.dart';
+import '../common/tasks.dart' show
+    CompilerTask;
+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/send_resolver.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/selector.dart' show Selector;
-import '../universe/call_structure.dart' show CallStructure;
+import '../universe/call_structure.dart' show
+    CallStructure;
+import '../universe/selector.dart' show
+    Selector;
 
 import 'analysis_result.dart';
 import 'naive_analysis_result.dart';
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 31c545c..0e384c3 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -7,12 +7,7 @@
 
 library dart2js.source_information.position;
 
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
+import '../common.dart';
 import '../elements/elements.dart' show
     AstElement,
     LocalElement;
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index 8f83f9b..1855755 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -4,8 +4,7 @@
 
 library dart2js.source_information;
 
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
+import '../common.dart';
 import '../elements/elements.dart' show
     AstElement,
     LocalElement;
diff --git a/pkg/compiler/lib/src/io/start_end_information.dart b/pkg/compiler/lib/src/io/start_end_information.dart
index 794aa7a..988c77d 100644
--- a/pkg/compiler/lib/src/io/start_end_information.dart
+++ b/pkg/compiler/lib/src/io/start_end_information.dart
@@ -7,11 +7,9 @@
 
 library dart2js.source_information.start_end;
 
+import '../common.dart';
 import '../diagnostics/messages.dart' show
-    MessageKind,
     MessageTemplate;
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
 import '../elements/elements.dart' show
     AstElement,
     LocalElement;
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index a72da8f..1a08cfb 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -7,12 +7,9 @@
 import 'package:js_ast/js_ast.dart';
 export 'package:js_ast/js_ast.dart';
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
 import '../dump_info.dart' show
     DumpInfoTask;
 import '../io/code_output.dart' show
diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
index 854213b..4be28d1 100644
--- a/pkg/compiler/lib/src/js/rewrite_async.dart
+++ b/pkg/compiler/lib/src/js/rewrite_async.dart
@@ -12,10 +12,7 @@
 
 import "js.dart" as js;
 
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE,
-    Spannable;
+import '../common.dart';
 import '../util/util.dart' show
     Pair;
 
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index cbf7de4..8370d13 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -233,6 +233,8 @@
       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_LOOKUP_MAP =
       new Uri(scheme: 'package', path: 'lookup_map/lookup_map.dart');
 
@@ -278,9 +280,6 @@
 
   ClassElement closureClass;
   ClassElement boundClosureClass;
-  Element assertTestMethod;
-  Element assertThrowMethod;
-  Element assertHelperMethod;
   Element assertUnreachableMethod;
   Element invokeOnMethod;
 
@@ -294,6 +293,8 @@
   ClassElement jsBoolClass;
   ClassElement jsPlainJavaScriptObjectClass;
   ClassElement jsUnknownJavaScriptObjectClass;
+  ClassElement jsJavaScriptFunctionClass;
+  ClassElement jsJavaScriptObjectClass;
 
   ClassElement jsIndexableClass;
   ClassElement jsMutableIndexableClass;
@@ -314,7 +315,6 @@
   Element jsStringToString;
   Element jsStringOperatorAdd;
   Element objectEquals;
-  Element cachedCheckConcurrentModificationError;
 
   ClassElement typeLiteralClass;
   ClassElement mapLiteralClass;
@@ -331,6 +331,8 @@
   ClassElement forceInlineClass;
   ClassElement irRepresentationClass;
 
+  ClassElement jsAnnotationClass;
+
   Element getInterceptorMethod;
 
   ClassElement jsInvocationMirrorClass;
@@ -511,6 +513,7 @@
   }
 
   final RuntimeTypes rti;
+  final RuntimeTypesEncoder rtiEncoder;
 
   /// Holds the method "disableTreeShaking" in js_mirrors when
   /// dart:mirrors has been loaded.
@@ -619,6 +622,9 @@
   /// Codegen support for tree-shaking entries of `LookupMap`.
   LookupMapAnalysis lookupMapAnalysis;
 
+  /// Codegen support for typed JavaScript interop.
+  JsInteropAnalysis jsInteropAnalysis;
+
   /// Support for classifying `noSuchMethod` implementations.
   NoSuchMethodRegistry noSuchMethodRegistry;
 
@@ -632,13 +638,17 @@
 
   final SourceInformationStrategy sourceInformationStrategy;
 
+  final BackendHelpers helpers;
+  final BackendImpacts impacts;
+
   JavaScriptBackend(Compiler compiler,
                     {bool generateSourceMap: true,
                      bool useStartupEmitter: false})
       : namer = determineNamer(compiler),
         oneShotInterceptors = new Map<jsAst.Name, Selector>(),
         interceptedElements = new Map<String, Set<Element>>(),
-        rti = new RuntimeTypes(compiler),
+        rti = new _RuntimeTypes(compiler),
+        rtiEncoder = new _RuntimeTypesEncoder(compiler),
         specializedGetInterceptors = new Map<jsAst.Name, Set<ClassElement>>(),
         annotations = new Annotations(compiler),
         this.sourceInformationStrategy =
@@ -647,12 +657,16 @@
                      ? const PositionSourceInformationStrategy()
                      : const StartEndSourceInformationStrategy())
                 : const JavaScriptSourceInformationStrategy(),
+        helpers = new BackendHelpers(compiler),
+        impacts = new BackendImpacts(compiler),
         super(compiler) {
     emitter = new CodeEmitterTask(
         compiler, namer, generateSourceMap, useStartupEmitter);
     typeVariableHandler = new TypeVariableHandler(compiler);
     customElementsAnalysis = new CustomElementsAnalysis(this);
     lookupMapAnalysis = new LookupMapAnalysis(this, reporter);
+    jsInteropAnalysis = new JsInteropAnalysis(this);
+
     noSuchMethodRegistry = new NoSuchMethodRegistry(this);
     constantCompilerTask = new JavaScriptConstantTask(compiler);
     resolutionCallbacks = new JavaScriptResolutionCallbacks(this);
@@ -676,7 +690,7 @@
   }
 
   FunctionElement resolveExternalFunction(FunctionElement element) {
-    if (isForeign(element)) return element;
+    if (isForeign(element) || element.isJsInterop) return element;
     return patchResolverTask.measure(() {
       return patchResolverTask.resolveExternalFunction(element);
     });
@@ -997,7 +1011,7 @@
       InterceptorConstantValue interceptor = constant;
       registerInstantiatedConstantType(interceptor.dispatchedType, registry);
     } else if (constant.isType) {
-      enqueueInResolution(getCreateRuntimeType(), registry);
+      enqueueInResolution(helpers.createRuntimeType, registry);
       registry.registerInstantiation(typeImplementation.rawType);
     }
     lookupMapAnalysis.registerConstantKey(constant);
@@ -1009,13 +1023,13 @@
     if (type is InterfaceType) {
       registry.registerInstantiation(instantiatedType);
       if (!type.treatAsRaw && classNeedsRti(type.element)) {
-        registry.registerStaticInvocation(getSetRuntimeTypeInfo());
+        registry.registerStaticInvocation(helpers.setRuntimeTypeInfo);
       }
       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.registerStaticInvocation(getCreateRuntimeType());
+        registry.registerStaticInvocation(helpers.createRuntimeType);
       }
     }
   }
@@ -1079,7 +1093,9 @@
       } else if (Elements.isNativeOrExtendsNative(cls)) {
         enqueue(enqueuer, getNativeInterceptorMethod, registry);
         enqueueClass(enqueuer, jsInterceptorClass, compiler.globalDependencies);
+        enqueueClass(enqueuer, jsJavaScriptObjectClass, registry);
         enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, registry);
+        enqueueClass(enqueuer, jsJavaScriptFunctionClass, registry);
       } else if (cls == mapLiteralClass) {
         // For map literals, the dependency between the implementation class
         // and [Map] is not visible, so we have to add it manually.
@@ -1156,10 +1172,14 @@
       addInterceptors(jsUInt31Class, enqueuer, registry);
       addInterceptors(jsDoubleClass, enqueuer, registry);
       addInterceptors(jsNumberClass, enqueuer, registry);
+    } else if (cls == jsJavaScriptObjectClass) {
+      addInterceptors(jsJavaScriptObjectClass, enqueuer, registry);
     } else if (cls == jsPlainJavaScriptObjectClass) {
       addInterceptors(jsPlainJavaScriptObjectClass, enqueuer, registry);
     } else if (cls == jsUnknownJavaScriptObjectClass) {
       addInterceptors(jsUnknownJavaScriptObjectClass, enqueuer, registry);
+    } else if (cls == jsJavaScriptFunctionClass) {
+      addInterceptors(jsJavaScriptFunctionClass, enqueuer, registry);
     } else if (Elements.isNativeOrExtendsNative(cls)) {
       addInterceptorsForNativeClassMembers(cls, enqueuer);
     } else if (cls == jsIndexingBehaviorInterface) {
@@ -1189,7 +1209,9 @@
     if (!enqueuer.nativeEnqueuer.hasInstantiatedNativeClasses()) return;
     Registry registry = compiler.globalDependencies;
     enqueue(enqueuer, getNativeInterceptorMethod, registry);
+    enqueueClass(enqueuer, jsJavaScriptObjectClass, registry);
     enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, registry);
+    enqueueClass(enqueuer, jsJavaScriptFunctionClass, registry);
     needToInitializeIsolateAffinityTag = true;
     needToInitializeDispatchProperty = true;
   }
@@ -1235,9 +1257,10 @@
   }
 
   void registerGetRuntimeTypeArgument(Registry registry) {
-    enqueueInResolution(getGetRuntimeTypeArgument(), registry);
-    enqueueInResolution(getGetTypeArgumentByIndex(), registry);
-    enqueueInResolution(getCopyTypeArguments(), registry);
+    enqueueImpact(
+        compiler.enqueuer.resolution,
+        impacts.getRuntimeTypeArgument,
+        registry);
   }
 
   void registerCallMethodWithFreeTypeVariables(
@@ -1288,18 +1311,14 @@
     // Calls to [:computeSignature:] are generated by the emitter and we
     // therefore need to enqueue the used elements in the codegen enqueuer as
     // well as in the resolution enqueuer.
-    enqueue(enqueuer, getSetRuntimeTypeInfo(), registry);
-    enqueue(enqueuer, getGetRuntimeTypeInfo(), registry);
-    enqueue(enqueuer, getComputeSignature(), registry);
-    enqueue(enqueuer, getGetRuntimeTypeArguments(), registry);
-    enqueueClass(enqueuer, compiler.listClass, registry);
+    enqueueImpact(enqueuer, impacts.computeSignature, registry);
   }
 
   void registerRuntimeType(Enqueuer enqueuer, Registry registry) {
     registerComputeSignature(enqueuer, registry);
-    enqueueInResolution(getSetRuntimeTypeInfo(), registry);
-    enqueueInResolution(getGetRuntimeTypeInfo(), registry);
+    enqueueInResolution(helpers.setRuntimeTypeInfo, registry);
     registerGetRuntimeTypeArgument(registry);
+    enqueueInResolution(helpers.getRuntimeTypeInfo, registry);
     enqueueClass(enqueuer, compiler.listClass, registry);
   }
 
@@ -1307,7 +1326,7 @@
                                  Enqueuer world,
                                  Registry registry) {
     assert(!registry.isForResolution);
-    type = type.unalias(resolution);
+    type = type.unaliased;
     enqueueClass(world, compiler.boolClass, registry);
     bool inCheckedMode = compiler.enableTypeAssertions;
     // [registerIsCheck] is also called for checked mode checks, so we
@@ -1344,7 +1363,7 @@
   }
 
   void registerCheckDeferredIsLoaded(Registry registry) {
-    enqueueInResolution(getCheckDeferredIsLoaded(), registry);
+    enqueueInResolution(helpers.checkDeferredIsLoaded, registry);
     // Also register the types of the arguments passed to this method.
     enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry);
   }
@@ -1388,7 +1407,7 @@
   }
 
   void enableNoSuchMethod(Enqueuer world) {
-    enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
+    enqueue(world, helpers.createInvocationMirror, compiler.globalDependencies);
     world.registerInvocation(
         new UniverseSelector(Selectors.noSuchMethod_, null));
   }
@@ -1503,6 +1522,38 @@
     registerInstantiatedType(cls.rawType, enqueuer, registry);
   }
 
+  /// Register instantiation of [type] in [enqueuer].
+  ///
+  /// This method calls [registerBackendUse].
+  void enqueueType(Enqueuer enqueuer, InterfaceType type, Registry registry) {
+    if (type == null) return;
+    ClassElement cls = type.element;
+    registerBackendUse(cls);
+    helpersUsed.add(cls.declaration);
+    if (cls.declaration != cls.implementation) {
+      helpersUsed.add(cls.implementation);
+    }
+    cls.ensureResolved(resolution);
+    registerInstantiatedType(type, enqueuer, registry);
+  }
+
+  void enqueueImpact(Enqueuer enqueuer,
+                     BackendImpact impact,
+                     Registry registry) {
+    for (Element staticUse in impact.staticUses) {
+      enqueue(enqueuer, staticUse, registry);
+    }
+    for (InterfaceType type in impact.instantiatedTypes) {
+      enqueueType(enqueuer, type, registry);
+    }
+    for (ClassElement cls in impact.instantiatedClasses) {
+      enqueueClass(enqueuer, cls, registry);
+    }
+    for (BackendImpact otherImpact in impact.otherImpacts) {
+      enqueueImpact(enqueuer, otherImpact, registry);
+    }
+  }
+
   WorldImpact codegen(CodegenWorkItem work) {
     Element element = work.element;
     if (compiler.elementHasCompileTimeError(element)) {
@@ -1534,7 +1585,8 @@
         // 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(getCyclicThrowHelper());
+        compiler.enqueuer.codegen.registerStaticUse(
+            helpers.cyclicThrowHelper);
       }
     }
 
@@ -1551,6 +1603,7 @@
   }
 
   ClassElement defaultSuperclass(ClassElement element) {
+    if (element.isJsInterop) return jsJavaScriptObjectClass;
     // Native classes inherit from Interceptor.
     return element.isNative ? jsInterceptorClass : compiler.objectClass;
   }
@@ -1793,218 +1846,6 @@
     return compiler.world.hasOnlySubclasses(classElement);
   }
 
-  Element getExceptionUnwrapper() {
-    return findHelper('unwrapException');
-  }
-
-  Element getThrowRuntimeError() {
-    return findHelper('throwRuntimeError');
-  }
-
-  Element getThrowTypeError() {
-    return findHelper('throwTypeError');
-  }
-
-  Element getThrowAbstractClassInstantiationError() {
-    return findHelper('throwAbstractClassInstantiationError');
-  }
-
-  Element getCheckConcurrentModificationError() {
-    if (cachedCheckConcurrentModificationError == null) {
-      cachedCheckConcurrentModificationError =
-          findHelper('checkConcurrentModificationError');
-    }
-    return cachedCheckConcurrentModificationError;
-  }
-
-  Element getThrowConcurrentModificationError() {
-    return findHelper('throwConcurrentModificationError');
-  }
-
-  Element getThrowIndexOutOfBoundsError() {
-    return findHelper('ioore');
-  }
-
-  Element getStringInterpolationHelper() {
-    return findHelper('S');
-  }
-
-  Element getWrapExceptionHelper() {
-    return findHelper(r'wrapException');
-  }
-
-  Element getThrowExpressionHelper() {
-    return findHelper('throwExpression');
-  }
-
-  Element getClosureConverter() {
-    return findHelper('convertDartClosureToJS');
-  }
-
-  Element getTraceFromException() {
-    return findHelper('getTraceFromException');
-  }
-
-  Element getSetRuntimeTypeInfo() {
-    return findHelper('setRuntimeTypeInfo');
-  }
-
-  Element getGetRuntimeTypeInfo() {
-    return findHelper('getRuntimeTypeInfo');
-  }
-
-  Element getGetTypeArgumentByIndex() {
-    return findHelper('getTypeArgumentByIndex');
-  }
-
-  Element getCopyTypeArguments() {
-    return findHelper('copyTypeArguments');
-  }
-
-  Element getComputeSignature() {
-    return findHelper('computeSignature');
-  }
-
-  Element getGetRuntimeTypeArguments() {
-    return findHelper('getRuntimeTypeArguments');
-  }
-
-  Element getGetRuntimeTypeArgument() {
-    return findHelper('getRuntimeTypeArgument');
-  }
-
-  Element getRuntimeTypeToString() {
-    return findHelper('runtimeTypeToString');
-  }
-
-  Element getAssertIsSubtype() {
-    return findHelper('assertIsSubtype');
-  }
-
-  Element getCheckSubtype() {
-    return findHelper('checkSubtype');
-  }
-
-  Element getAssertSubtype() {
-    return findHelper('assertSubtype');
-  }
-
-  Element getSubtypeCast() {
-    return findHelper('subtypeCast');
-  }
-
-  Element getCheckSubtypeOfRuntimeType() {
-    return findHelper('checkSubtypeOfRuntimeType');
-  }
-
-  Element getAssertSubtypeOfRuntimeType() {
-    return findHelper('assertSubtypeOfRuntimeType');
-  }
-
-  Element getSubtypeOfRuntimeTypeCast() {
-    return findHelper('subtypeOfRuntimeTypeCast');
-  }
-
-  Element getCheckDeferredIsLoaded() {
-    return findHelper('checkDeferredIsLoaded');
-  }
-
-  Element getThrowNoSuchMethod() {
-    return findHelper('throwNoSuchMethod');
-  }
-
-  Element getCreateRuntimeType() {
-    return findHelper('createRuntimeType');
-  }
-
-  Element getFallThroughError() {
-    return findHelper("getFallThroughError");
-  }
-
-  Element getCreateInvocationMirror() {
-    return findHelper(Compiler.CREATE_INVOCATION_MIRROR);
-  }
-
-  Element getCyclicThrowHelper() {
-    return findHelper("throwCyclicInit");
-  }
-
-  Element getAsyncHelper() {
-    return findAsyncHelper("_asyncHelper");
-  }
-
-  Element getWrapBody() {
-    return findAsyncHelper("_wrapJsFunctionForAsync");
-  }
-
-  Element getYieldStar() {
-    ClassElement classElement = findAsyncHelper("_IterationMarker");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupLocalMember("yieldStar");
-  }
-
-  Element getYieldSingle() {
-    ClassElement classElement = findAsyncHelper("_IterationMarker");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupLocalMember("yieldSingle");
-  }
-
-  Element getSyncStarUncaughtError() {
-    ClassElement classElement = findAsyncHelper("_IterationMarker");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupLocalMember("uncaughtError");
-  }
-
-  Element getAsyncStarHelper() {
-    return findAsyncHelper("_asyncStarHelper");
-  }
-
-  Element getStreamOfController() {
-    return findAsyncHelper("_streamOfController");
-  }
-
-  Element getEndOfIteration() {
-    ClassElement classElement = findAsyncHelper("_IterationMarker");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupLocalMember("endOfIteration");
-  }
-
-  Element getSyncStarIterable() {
-    ClassElement classElement = findAsyncHelper("_SyncStarIterable");
-    classElement.ensureResolved(resolution);
-    return classElement;
-  }
-
-  Element getSyncStarIterableConstructor() {
-    ClassElement classElement = getSyncStarIterable();
-    classElement.ensureResolved(resolution);
-    return classElement.lookupConstructor("");
-  }
-
-  Element getSyncCompleterConstructor() {
-    ClassElement classElement = find(compiler.asyncLibrary, "Completer");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupConstructor("sync");
-  }
-
-  Element getASyncStarController() {
-    ClassElement classElement =
-        findAsyncHelper("_AsyncStarStreamController");
-    classElement.ensureResolved(resolution);
-    return classElement;
-  }
-
-  Element getASyncStarControllerConstructor() {
-    ClassElement classElement = getASyncStarController();
-    return classElement.lookupConstructor("");
-  }
-
-  Element getStreamIteratorConstructor() {
-    ClassElement classElement = find(compiler.asyncLibrary, "StreamIterator");
-    classElement.ensureResolved(resolution);
-    return classElement.lookupConstructor("");
-  }
-
   bool isNullImplementation(ClassElement cls) {
     return cls == jsNullClass;
   }
@@ -2055,7 +1896,7 @@
   }
 
   /// Called when [:const Symbol(name):] is seen.
-  void registerConstSymbol(String name, Registry registry) {
+  void registerConstSymbol(String name) {
     symbolsUsed.add(name);
     if (name.endsWith('=')) {
       symbolsUsed.add(name.substring(0, name.length - 1));
@@ -2179,14 +2020,16 @@
         jsExtendableArrayClass = findClass('JSExtendableArray');
         jsUnmodifiableArrayClass = findClass('JSUnmodifiableArray');
         jsPlainJavaScriptObjectClass = findClass('PlainJavaScriptObject');
+        jsJavaScriptObjectClass = findClass('JavaScriptObject');
+        jsJavaScriptFunctionClass = findClass('JavaScriptFunction');
         jsUnknownJavaScriptObjectClass = findClass('UnknownJavaScriptObject');
         jsIndexableClass = findClass('JSIndexable');
         jsMutableIndexableClass = findClass('JSMutableIndexable');
       } else if (uri == DART_JS_HELPER) {
         initializeHelperClasses();
-        assertTestMethod = findHelper('assertTest');
-        assertThrowMethod = findHelper('assertThrow');
-        assertHelperMethod = findHelper('assertHelper');
+        helpers.assertTest = findHelper('assertTest');
+        helpers.assertThrow = findHelper('assertThrow');
+        helpers.assertHelper = findHelper('assertHelper');
         assertUnreachableMethod = findHelper('assertUnreachable');
 
         typeLiteralClass = findClass('TypeImpl');
@@ -2221,6 +2064,8 @@
       } else if (uri == Uris.dart__native_typed_data) {
         typedArrayClass = findClass('NativeTypedArray');
         typedArrayOfIntClass = findClass('NativeTypedArrayOfInt');
+      } else if (uri == PACKAGE_JS) {
+        jsAnnotationClass = find(library, 'Js');
       }
       annotations.onLibraryScanned(library);
     });
@@ -2675,6 +2520,7 @@
 
   void onQueueClosed() {
     lookupMapAnalysis.onQueueClosed();
+    jsInteropAnalysis.onQueueClosed();
   }
 
   void onCodegenStart() {
@@ -2816,36 +2662,17 @@
 
   void _registerAsync(Enqueuer enqueuer,
                       Registry registry) {
-    enqueue(enqueuer, getAsyncHelper(), registry);
-    enqueue(enqueuer, getSyncCompleterConstructor(), registry);
-    enqueue(enqueuer, getStreamIteratorConstructor(), registry);
-    enqueue(enqueuer, getWrapBody(), registry);
+    enqueueImpact(enqueuer, impacts.asyncBody, registry);
   }
 
   void _registerSyncStar(Enqueuer enqueuer,
                          Registry registry) {
-    ClassElement clsSyncStarIterable = getSyncStarIterable();
-    clsSyncStarIterable.ensureResolved(compiler.resolution);
-    registerInstantiatedType(clsSyncStarIterable.rawType, enqueuer, registry);
-    enqueue(enqueuer, getSyncStarIterableConstructor(), registry);
-    enqueue(enqueuer, getEndOfIteration(), registry);
-    enqueue(enqueuer, getYieldStar(), registry);
-    enqueue(enqueuer, getSyncStarUncaughtError(), registry);
+    enqueueImpact(enqueuer, impacts.syncStarBody, registry);
   }
 
   void _registerAsyncStar(Enqueuer enqueuer,
                           Registry registry) {
-    ClassElement clsASyncStarController = getASyncStarController();
-    clsASyncStarController.ensureResolved(compiler.resolution);
-    registerInstantiatedType(
-        clsASyncStarController.rawType, enqueuer, registry);
-    enqueue(enqueuer, getAsyncStarHelper(), registry);
-    enqueue(enqueuer, getStreamOfController(), registry);
-    enqueue(enqueuer, getYieldSingle(), registry);
-    enqueue(enqueuer, getYieldStar(), registry);
-    enqueue(enqueuer, getASyncStarControllerConstructor(), registry);
-    enqueue(enqueuer, getStreamIteratorConstructor(), registry);
-    enqueue(enqueuer, getWrapBody(), registry);
+    enqueueImpact(enqueuer, impacts.asyncStarBody, registry);
   }
 
   @override
@@ -2877,11 +2704,11 @@
             reporter,
             element,
             asyncHelper:
-                emitter.staticFunctionAccess(getAsyncHelper()),
+                emitter.staticFunctionAccess(helpers.asyncHelper),
             wrapBody:
-                emitter.staticFunctionAccess(getWrapBody()),
+                emitter.staticFunctionAccess(helpers.wrapBody),
             newCompleter: emitter.staticFunctionAccess(
-                getSyncCompleterConstructor()),
+                helpers.syncCompleterConstructor),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
             bodyName: namer.deriveAsyncBodyName(name));
         break;
@@ -2890,13 +2717,13 @@
             reporter,
             element,
             endOfIteration: emitter.staticFunctionAccess(
-                getEndOfIteration()),
+                helpers.endOfIteration),
             newIterable: emitter.staticFunctionAccess(
-                getSyncStarIterableConstructor()),
+                helpers.syncStarIterableConstructor),
             yieldStarExpression: emitter.staticFunctionAccess(
-                getYieldStar()),
+                helpers.yieldStar),
             uncaughtErrorExpression: emitter.staticFunctionAccess(
-                getSyncStarUncaughtError()),
+                helpers.syncStarUncaughtError),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
             bodyName: namer.deriveAsyncBodyName(name));
          break;
@@ -2905,18 +2732,18 @@
             reporter,
             element,
             asyncStarHelper: emitter.staticFunctionAccess(
-                getAsyncStarHelper()),
+                helpers.asyncStarHelper),
             streamOfController: emitter.staticFunctionAccess(
-                getStreamOfController()),
+                helpers.streamOfController),
             wrapBody:
-                emitter.staticFunctionAccess(getWrapBody()),
+                emitter.staticFunctionAccess(helpers.wrapBody),
             newController: emitter.staticFunctionAccess(
-                getASyncStarControllerConstructor()),
+                helpers.asyncStarControllerConstructor),
             safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
             yieldExpression: emitter.staticFunctionAccess(
-                getYieldSingle()),
+                helpers.yieldSingle),
             yieldStarExpression: emitter.staticFunctionAccess(
-                getYieldStar()),
+                helpers.yieldStar),
             bodyName: namer.deriveAsyncBodyName(name));
         break;
       default:
@@ -3006,390 +2833,212 @@
 
   JavaScriptResolutionCallbacks(this.backend);
 
-  WorldImpact transformImpact(ResolutionWorldImpact worldImpact) {
+  BackendImpacts get impacts => backend.impacts;
+
+  WorldImpact transformImpact(ResolutionImpact worldImpact) {
     TransformedWorldImpact transformed =
         new TransformedWorldImpact(worldImpact);
     for (Feature feature in worldImpact.features) {
       switch (feature) {
         case Feature.ABSTRACT_CLASS_INSTANTIATION:
-          onAbstractClassInstantiation(transformed);
+          registerBackendImpact(
+              transformed, impacts.abstractClassInstantiation);
           break;
         case Feature.ASSERT:
-          onAssert(false, transformed);
+          registerBackendImpact(transformed, impacts.assertWithoutMessage);
           break;
         case Feature.ASSERT_WITH_MESSAGE:
-          onAssert(true, transformed);
+          registerBackendImpact(transformed, impacts.assertWithMessage);
           break;
         case Feature.ASYNC:
-          backend._registerAsync(
-              backend.compiler.enqueuer.resolution, transformed);
+          registerBackendImpact(transformed, impacts.asyncBody);
           break;
         case Feature.ASYNC_FOR_IN:
-          onAsyncForIn(null, transformed);
+          registerBackendImpact(transformed, impacts.asyncForIn);
           break;
         case Feature.ASYNC_STAR:
-          backend._registerAsyncStar(
-              backend.compiler.enqueuer.resolution, transformed);
+          registerBackendImpact(transformed, impacts.asyncStarBody);
           break;
         case Feature.CATCH_STATEMENT:
-          onCatchStatement(transformed);
+          registerBackendImpact(transformed, impacts.catchStatement);
           break;
         case Feature.COMPILE_TIME_ERROR:
-          onCompileTimeError(transformed, null);
+          if (backend.compiler.generateCodeWithCompileTimeErrors) {
+            // TODO(johnniwinther): This should have its own uncatchable error.
+            registerBackendImpact(transformed, impacts.throwRuntimeError);
+          }
           break;
         case Feature.FALL_THROUGH_ERROR:
-          onFallThroughError(transformed);
+          registerBackendImpact(transformed, impacts.fallThroughError);
           break;
         case Feature.INC_DEC_OPERATION:
-          onIncDecOperation(transformed);
+          registerBackendImpact(transformed, impacts.incDecOperation);
           break;
         case Feature.LAZY_FIELD:
-          onLazyField(transformed);
-          break;
-        case Feature.NEW_SYMBOL:
-          backend.registerNewSymbol(transformed);
+          registerBackendImpact(transformed, impacts.lazyField);
           break;
         case Feature.STACK_TRACE_IN_CATCH:
-          onStackTraceInCatch(transformed);
+          registerBackendImpact(transformed, impacts.stackTraceInCatch);
           break;
         case Feature.STRING_INTERPOLATION:
-          onStringInterpolation(transformed);
+          registerBackendImpact(transformed, impacts.stringInterpolation);
           break;
         case Feature.SUPER_NO_SUCH_METHOD:
-          onSuperNoSuchMethod(transformed);
+          registerBackendImpact(transformed, impacts.superNoSuchMethod);
           break;
         case Feature.SYMBOL_CONSTRUCTOR:
-          onSymbolConstructor(transformed);
+          registerBackendImpact(transformed, impacts.symbolConstructor);
           break;
         case Feature.SYNC_FOR_IN:
-          onSyncForIn(transformed);
+          registerBackendImpact(transformed, impacts.syncForIn);
           break;
         case Feature.SYNC_STAR:
-          backend._registerSyncStar(
-              backend.compiler.enqueuer.resolution, transformed);
+          registerBackendImpact(transformed, impacts.syncStarBody);
           break;
         case Feature.THROW_EXPRESSION:
-          onThrowExpression(transformed);
+          registerBackendImpact(transformed, impacts.throwExpression);
           break;
         case Feature.THROW_NO_SUCH_METHOD:
-          onThrowNoSuchMethod(transformed);
+          registerBackendImpact(transformed, impacts.throwNoSuchMethod);
           break;
         case Feature.THROW_RUNTIME_ERROR:
-          onThrowRuntimeError(transformed);
+          registerBackendImpact(transformed, impacts.throwRuntimeError);
           break;
         case Feature.TYPE_VARIABLE_BOUNDS_CHECK:
-          onTypeVariableBoundCheck(transformed);
+          registerBackendImpact(transformed, impacts.typeVariableBoundCheck);
           break;
       }
     }
     for (DartType type in worldImpact.isChecks) {
       onIsCheck(type, transformed);
     }
-    for (DartType type in worldImpact.asCasts) {
-      onIsCheck(type, transformed);
-      onAsCheck(type, transformed);
+
+    if (worldImpact.asCasts.isNotEmpty) {
+      for (DartType type in worldImpact.asCasts) {
+        onIsCheck(type, transformed);
+      }
+      registerBackendImpact(transformed, impacts.asCheck);
     }
+
     if (backend.compiler.enableTypeAssertions) {
       for (DartType type in worldImpact.checkedModeChecks) {
         onIsCheck(type, transformed);
       }
     }
+
     for (DartType requiredType in worldImpact.requiredTypes) {
       backend.registerRequiredType(requiredType);
     }
+
     for (MapLiteralUse mapLiteralUse in worldImpact.mapLiterals) {
       // TODO(johnniwinther): Use the [isEmpty] property when factory
       // constructors are registered directly.
-      onMapLiteral(transformed, mapLiteralUse.type, mapLiteralUse.isConstant);
+      if (mapLiteralUse.isConstant) {
+        registerBackendImpact(transformed, impacts.constantMapLiteral);
+      } else {
+        transformed.registerInstantiatedType(mapLiteralUse.type);
+      }
     }
+
     for (ListLiteralUse listLiteralUse in worldImpact.listLiterals) {
       // TODO(johnniwinther): Use the [isConstant] and [isEmpty] property when
       // factory constructors are registered directly.
-      transformed.registerInstantiation(listLiteralUse.type);
+      transformed.registerInstantiatedType(listLiteralUse.type);
     }
-    for (DartType typeLiteral in worldImpact.typeLiterals) {
-      onTypeLiteral(typeLiteral, transformed);
-      transformed.registerInstantiation(backend.compiler.coreTypes.typeType);
-      if (typeLiteral.isTypeVariable) {
-        onTypeVariableExpression(transformed, typeLiteral.element);
+
+    if (worldImpact.typeLiterals.isNotEmpty) {
+      transformed.registerInstantiatedType(backend.compiler.coreTypes.typeType);
+      registerBackendImpact(transformed, impacts.typeLiteral);
+      for (DartType typeLiteral in worldImpact.typeLiterals) {
+        backend.customElementsAnalysis.registerTypeLiteral(typeLiteral);
+        if (typeLiteral.isTypedef) {
+          backend.compiler.world.allTypedefs.add(typeLiteral.element);
+        }
+        if (typeLiteral.isTypeVariable) {
+          ClassElement cls = typeLiteral.element.enclosingClass;
+          backend.rti.registerClassUsingTypeVariableExpression(cls);
+          registerBackendImpact(transformed, impacts.typeVariableExpression);
+        }
       }
     }
+
     for (String constSymbolName in worldImpact.constSymbolNames) {
-      backend.registerConstSymbol(constSymbolName, transformed);
+      backend.registerConstSymbol(constSymbolName);
     }
+
     for (LocalFunctionElement closure in worldImpact.closures) {
       if (closure.computeType(backend.resolution).containsTypeVariables) {
-        backend.registerClosureWithFreeTypeVariables(
-            closure, backend.compiler.enqueuer.resolution, transformed);
+        backend.compiler.enqueuer.resolution.universe
+            .closuresWithFreeTypeVariables.add(closure);
+        registerBackendImpact(transformed, impacts.computeSignature);
       }
     }
     // TODO(johnniwinther): Remove this when dependency tracking is done on
     // the world impact itself.
     for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) {
-      transformed.registerInstantiation(instantiatedType);
+      transformed.registerInstantiatedType(instantiatedType);
     }
     for (Element element in worldImpact.staticUses) {
-      transformed.registerStaticInvocation(element);
+      transformed.registerStaticUse(element);
     }
 
     return transformed;
   }
 
-  void registerBackendStaticInvocation(Element element, Registry registry) {
-    registry.registerStaticInvocation(backend.registerBackendUse(element));
-  }
-
-  void registerBackendInstantiation(ClassElement element, Registry registry) {
-    backend.registerBackendUse(element);
-    element.ensureResolved(backend.resolution);
-    registry.registerInstantiation(element.rawType);
-  }
-
-  void onAssert(bool hasMessage, Registry registry) {
-    if (hasMessage) {
-      registerBackendStaticInvocation(backend.assertTestMethod, registry);
-      registerBackendStaticInvocation(backend.assertThrowMethod, registry);
-    } else {
-      registerBackendStaticInvocation(backend.assertHelperMethod, registry);
+  void registerBackendImpact(TransformedWorldImpact worldImpact,
+                             BackendImpact backendImpact) {
+    for (Element staticUse in backendImpact.staticUses) {
+      assert(staticUse != null);
+      backend.registerBackendUse(staticUse);
+      worldImpact.registerStaticUse(staticUse);
     }
-  }
-
-  void onAsyncForIn(AsyncForIn node, Registry registry) {
-    registerBackendStaticInvocation(backend.getStreamIteratorConstructor(),
-                                    registry);
-  }
-
-  void onStringInterpolation(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(
-        backend.getStringInterpolationHelper(), registry);
-  }
-
-  void onCatchStatement(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getExceptionUnwrapper(), registry);
-    registerBackendInstantiation(
-        backend.jsPlainJavaScriptObjectClass, registry);
-    registerBackendInstantiation(
-        backend.jsUnknownJavaScriptObjectClass, registry);
-  }
-
-  void onThrowExpression(Registry registry) {
-    assert(registry.isForResolution);
-    // We don't know ahead of time whether we will need the throw in a
-    // statement context or an expression context, so we register both
-    // here, even though we may not need the throwExpression helper.
-    registerBackendStaticInvocation(backend.getWrapExceptionHelper(), registry);
-    registerBackendStaticInvocation(
-        backend.getThrowExpressionHelper(), registry);
-  }
-
-  void onLazyField(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getCyclicThrowHelper(), registry);
-  }
-
-  void onTypeLiteral(DartType type, Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendInstantiation(backend.typeImplementation, registry);
-    registerBackendStaticInvocation(backend.getCreateRuntimeType(), registry);
-    // TODO(ahe): Might want to register [element] as an instantiated class
-    // when reflection is used.  However, as long as we disable tree-shaking
-    // eagerly it doesn't matter.
-    if (type.isTypedef) {
-      backend.compiler.world.allTypedefs.add(type.element);
+    for (InterfaceType instantiatedType in backendImpact.instantiatedTypes) {
+      backend.registerBackendUse(instantiatedType.element);
+      worldImpact.registerInstantiatedType(instantiatedType);
     }
-    backend.customElementsAnalysis.registerTypeLiteral(type, registry);
-  }
-
-  void onStackTraceInCatch(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getTraceFromException(), registry);
-  }
-
-  void onSyncForIn(Registry registry) {
-    assert(registry.isForResolution);
-    // The SSA builder recognizes certain for-in loops and can generate calls to
-    // throwConcurrentModificationError.
-    registerBackendStaticInvocation(
-        backend.getCheckConcurrentModificationError(), registry);
-  }
-
-  void onTypeVariableExpression(Registry registry,
-                                TypeVariableElement variable) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getSetRuntimeTypeInfo(), registry);
-    registerBackendStaticInvocation(backend.getGetRuntimeTypeInfo(), registry);
-    backend.registerGetRuntimeTypeArgument(registry);
-    registerBackendInstantiation(backend.compiler.listClass, registry);
-    registerBackendStaticInvocation(backend.getRuntimeTypeToString(), registry);
-    registerBackendStaticInvocation(backend.getCreateRuntimeType(), registry);
-    needsInt(registry, 'Needed for accessing a type variable literal on this.');
-    ClassElement cls = variable.enclosingClass;
-    backend.rti.classesUsingTypeVariableExpression.add(cls);
+    for (ClassElement cls in backendImpact.instantiatedClasses) {
+      cls.ensureResolved(backend.resolution);
+      backend.registerBackendUse(cls);
+      worldImpact.registerInstantiatedType(cls.rawType);
+    }
+    for (BackendImpact otherImpact in backendImpact.otherImpacts) {
+      registerBackendImpact(worldImpact, otherImpact);
+    }
   }
 
   // TODO(johnniwinther): Maybe split this into [onAssertType] and [onTestType].
-  void onIsCheck(DartType type, Registry registry) {
-    assert(registry.isForResolution);
-    type = type.unalias(backend.resolution);
-    registerBackendInstantiation(backend.compiler.boolClass, registry);
+  void onIsCheck(DartType type, TransformedWorldImpact transformed) {
+    type.computeUnaliased(backend.resolution);
+    type = type.unaliased;
+    registerBackendImpact(transformed, impacts.typeCheck);
+
     bool inCheckedMode = backend.compiler.enableTypeAssertions;
     if (inCheckedMode) {
-      registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry);
+      registerBackendImpact(transformed, impacts.checkedModeTypeCheck);
     }
     if (type.isMalformed) {
-      registerBackendStaticInvocation(backend.getThrowTypeError(), registry);
+      registerBackendImpact(transformed, impacts.malformedTypeCheck);
     }
     if (!type.treatAsRaw || type.containsTypeVariables || type.isFunctionType) {
-      // TODO(johnniwinther): Investigate why this is needed.
-      registerBackendStaticInvocation(
-          backend.getSetRuntimeTypeInfo(), registry);
-      registerBackendStaticInvocation(
-          backend.getGetRuntimeTypeInfo(), registry);
-      backend.registerGetRuntimeTypeArgument(registry);
+      registerBackendImpact(transformed, impacts.genericTypeCheck);
       if (inCheckedMode) {
-        registerBackendStaticInvocation(backend.getAssertSubtype(), registry);
+        registerBackendImpact(transformed, impacts.genericCheckedModeTypeCheck);
       }
-      registerBackendStaticInvocation(backend.getCheckSubtype(), registry);
       if (type.isTypeVariable) {
-        registerBackendStaticInvocation(
-            backend.getCheckSubtypeOfRuntimeType(), registry);
+        registerBackendImpact(transformed, impacts.typeVariableTypeCheck);
         if (inCheckedMode) {
-          registerBackendStaticInvocation(
-              backend.getAssertSubtypeOfRuntimeType(), registry);
+          registerBackendImpact(transformed,
+              impacts.typeVariableCheckedModeTypeCheck);
         }
       }
-      registerBackendInstantiation(backend.compiler.listClass, registry);
     }
     if (type is FunctionType) {
-      registerBackendStaticInvocation(
-          backend.find(backend.jsHelperLibrary, 'functionTypeTestMetaHelper'),
-          registry);
+      registerBackendImpact(transformed, impacts.functionTypeCheck);
     }
     if (type.element != null && type.element.isNative) {
-      // We will neeed to add the "$is" and "$as" properties on the
-      // JavaScript object prototype, so we make sure
-      // [:defineProperty:] is compiled.
-      registerBackendStaticInvocation(
-          backend.find(backend.jsHelperLibrary, 'defineProperty'), registry);
+      registerBackendImpact(transformed, impacts.nativeTypeCheck);
     }
   }
-
-  void onTypeVariableBoundCheck(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getThrowTypeError(), registry);
-    registerBackendStaticInvocation(backend.getAssertIsSubtype(), registry);
-  }
-
-  void onAbstractClassInstantiation(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(
-        backend.getThrowAbstractClassInstantiationError(), registry);
-    // Also register the types of the arguments passed to this method.
-    needsString(registry, '// Needed to encode the message.');
-  }
-
-  void onFallThroughError(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getFallThroughError(), registry);
-  }
-
-  void onAsCheck(DartType type, Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry);
-  }
-
-  void onThrowNoSuchMethod(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getThrowNoSuchMethod(), registry);
-    // Also register the types of the arguments passed to this method.
-    needsList(registry,
-        'Needed to encode the arguments for throw NoSuchMethodError.');
-    needsString(registry,
-        'Needed to encode the name for throw NoSuchMethodError.');
-  }
-
-  void onThrowRuntimeError(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry);
-    // Also register the types of the arguments passed to this method.
-    registerBackendInstantiation(backend.compiler.stringClass, registry);
-  }
-
-  void onCompileTimeError(Registry registry, ErroneousElement error) {
-    if (backend.compiler.generateCodeWithCompileTimeErrors) {
-      // TODO(johnniwinther): This should have its own uncatchable error.
-      onThrowRuntimeError(registry);
-    }
-  }
-
-  void onSuperNoSuchMethod(Registry registry) {
-    assert(registry.isForResolution);
-    registerBackendStaticInvocation(
-        backend.getCreateInvocationMirror(), registry);
-    registerBackendStaticInvocation(
-        backend.compiler.objectClass.lookupLocalMember(
-            Identifiers.noSuchMethod_),
-        registry);
-    needsInt(registry,
-        'Needed to encode the invocation kind of super.noSuchMethod.');
-    needsList(registry,
-        'Needed to encode the arguments of super.noSuchMethod.');
-    needsString(registry,
-        'Needed to encode the name of super.noSuchMethod.');
-  }
-
-  void onMapLiteral(Registry registry,
-                    DartType type,
-                    bool isConstant) {
-    assert(registry.isForResolution);
-    void enqueue(String name) {
-      Element e = backend.find(backend.jsHelperLibrary, name);
-      registerBackendInstantiation(e, registry);
-    }
-
-    if (isConstant) {
-      enqueue(JavaScriptMapConstant.DART_CLASS);
-      enqueue(JavaScriptMapConstant.DART_PROTO_CLASS);
-      enqueue(JavaScriptMapConstant.DART_STRING_CLASS);
-      enqueue(JavaScriptMapConstant.DART_GENERAL_CLASS);
-    } else {
-      registry.registerInstantiation(type);
-    }
-  }
-
-  /// Called when resolving the `Symbol` constructor.
-  void onSymbolConstructor(Registry registry) {
-    assert(registry.isForResolution);
-    // Make sure that _internals.Symbol.validated is registered.
-    assert(backend.compiler.symbolValidatedConstructor != null);
-    registerBackendStaticInvocation(
-        backend.compiler.symbolValidatedConstructor, registry);
-  }
-
-  /// Called when resolving a prefix or postfix expression.
-  void onIncDecOperation(Registry registry) {
-    needsInt(registry, 'Needed for the `+ 1` or `- 1` operation of ++/--.');
-  }
-
-  /// Helper for registering that `int` is needed.
-  void needsInt(Registry registry, String reason) {
-    // TODO(johnniwinther): Register [reason] for use in dump-info.
-    registerBackendInstantiation(backend.compiler.intClass, registry);
-  }
-
-  /// Helper for registering that `List` is needed.
-  void needsList(Registry registry, String reason) {
-    // TODO(johnniwinther): Register [reason] for use in dump-info.
-    registerBackendInstantiation(backend.compiler.listClass, registry);
-  }
-
-  /// Helper for registering that `String` is needed.
-  void needsString(Registry registry, String reason) {
-    // TODO(johnniwinther): Register [reason] for use in dump-info.
-    registerBackendInstantiation(backend.compiler.stringClass, registry);
-  }
 }
 
 /// Records that [constant] is used by the element behind [registry].
@@ -3399,3 +3048,4 @@
 
   const Dependency(this.constant, this.annotatedElement);
 }
+
diff --git a/pkg/compiler/lib/src/js_backend/backend_helpers.dart b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
new file mode 100644
index 0000000..3c59891
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
@@ -0,0 +1,262 @@
+// 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.js_backend.helpers;
+
+import '../common/resolution.dart' show
+    Resolution;
+import '../compiler.dart' show
+    Compiler;
+import '../elements/elements.dart' show
+    ClassElement,
+    Element,
+    LibraryElement,
+    MethodElement;
+
+import 'js_backend.dart';
+
+/// Helper classes and functions for the JavaScript backend.
+class BackendHelpers {
+  final Compiler compiler;
+
+  Element cachedCheckConcurrentModificationError;
+
+  BackendHelpers(this.compiler);
+
+  JavaScriptBackend get backend => compiler.backend;
+
+  Resolution get resolution => backend.resolution;
+
+  MethodElement assertTest;
+  MethodElement assertThrow;
+  MethodElement assertHelper;
+
+  Element findHelper(String name) => backend.findHelper(name);
+  Element findAsyncHelper(String name) => backend.findAsyncHelper(name);
+  Element findInterceptor(String name) => backend.findInterceptor(name);
+
+  Element find(LibraryElement library, String name) {
+    return backend.find(library, name);
+  }
+
+  Element get exceptionUnwrapper {
+    return findHelper('unwrapException');
+  }
+
+  Element get throwRuntimeError {
+    return findHelper('throwRuntimeError');
+  }
+
+  Element get throwTypeError {
+    return findHelper('throwTypeError');
+  }
+
+  Element get throwAbstractClassInstantiationError {
+    return findHelper('throwAbstractClassInstantiationError');
+  }
+
+  Element get checkConcurrentModificationError {
+    if (cachedCheckConcurrentModificationError == null) {
+      cachedCheckConcurrentModificationError =
+          findHelper('checkConcurrentModificationError');
+    }
+    return cachedCheckConcurrentModificationError;
+  }
+
+  Element get throwConcurrentModificationError {
+    return findHelper('throwConcurrentModificationError');
+  }
+
+  Element get throwIndexOutOfBoundsError {
+    return findHelper('ioore');
+  }
+
+  Element get stringInterpolationHelper {
+    return findHelper('S');
+  }
+
+  Element get wrapExceptionHelper {
+    return findHelper(r'wrapException');
+  }
+
+  Element get throwExpressionHelper {
+    return findHelper('throwExpression');
+  }
+
+  Element get closureConverter {
+    return findHelper('convertDartClosureToJS');
+  }
+
+  Element get traceFromException {
+    return findHelper('getTraceFromException');
+  }
+
+  Element get setRuntimeTypeInfo {
+    return findHelper('setRuntimeTypeInfo');
+  }
+
+  Element get getRuntimeTypeInfo {
+    return findHelper('getRuntimeTypeInfo');
+  }
+
+  Element get getTypeArgumentByIndex {
+    return findHelper('getTypeArgumentByIndex');
+  }
+
+  Element get copyTypeArguments {
+    return findHelper('copyTypeArguments');
+  }
+
+  Element get computeSignature {
+    return findHelper('computeSignature');
+  }
+
+  Element get getRuntimeTypeArguments {
+    return findHelper('getRuntimeTypeArguments');
+  }
+
+  Element get getRuntimeTypeArgument {
+    return findHelper('getRuntimeTypeArgument');
+  }
+
+  Element get runtimeTypeToString {
+    return findHelper('runtimeTypeToString');
+  }
+
+  Element get assertIsSubtype {
+    return findHelper('assertIsSubtype');
+  }
+
+  Element get checkSubtype {
+    return findHelper('checkSubtype');
+  }
+
+  Element get assertSubtype {
+    return findHelper('assertSubtype');
+  }
+
+  Element get subtypeCast {
+    return findHelper('subtypeCast');
+  }
+
+  Element get checkSubtypeOfRuntimeType {
+    return findHelper('checkSubtypeOfRuntimeType');
+  }
+
+  Element get assertSubtypeOfRuntimeType {
+    return findHelper('assertSubtypeOfRuntimeType');
+  }
+
+  Element get subtypeOfRuntimeTypeCast {
+    return findHelper('subtypeOfRuntimeTypeCast');
+  }
+
+  Element get checkDeferredIsLoaded {
+    return findHelper('checkDeferredIsLoaded');
+  }
+
+  Element get throwNoSuchMethod {
+    return findHelper('throwNoSuchMethod');
+  }
+
+  Element get createRuntimeType {
+    return findHelper('createRuntimeType');
+  }
+
+  Element get fallThroughError {
+    return findHelper("getFallThroughError");
+  }
+
+  Element get createInvocationMirror {
+    return findHelper(Compiler.CREATE_INVOCATION_MIRROR);
+  }
+
+  Element get cyclicThrowHelper {
+    return findHelper("throwCyclicInit");
+  }
+
+  Element get asyncHelper {
+    return findAsyncHelper("_asyncHelper");
+  }
+
+  Element get wrapBody {
+    return findAsyncHelper("_wrapJsFunctionForAsync");
+  }
+
+  Element get yieldStar {
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupLocalMember("yieldStar");
+  }
+
+  Element get yieldSingle {
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupLocalMember("yieldSingle");
+  }
+
+  Element get syncStarUncaughtError {
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupLocalMember("uncaughtError");
+  }
+
+  Element get asyncStarHelper {
+    return findAsyncHelper("_asyncStarHelper");
+  }
+
+  Element get streamOfController {
+    return findAsyncHelper("_streamOfController");
+  }
+
+  Element get endOfIteration {
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupLocalMember("endOfIteration");
+  }
+
+  Element get syncStarIterable {
+    ClassElement classElement = findAsyncHelper("_SyncStarIterable");
+    classElement.ensureResolved(resolution);
+    return classElement;
+  }
+
+  Element get syncStarIterableConstructor {
+    ClassElement classElement = syncStarIterable;
+    classElement.ensureResolved(resolution);
+    return classElement.lookupConstructor("");
+  }
+
+  Element get syncCompleterConstructor {
+    ClassElement classElement = find(compiler.asyncLibrary, "Completer");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupConstructor("sync");
+  }
+
+  Element get asyncStarController {
+    ClassElement classElement =
+        findAsyncHelper("_AsyncStarStreamController");
+    classElement.ensureResolved(resolution);
+    return classElement;
+  }
+
+  Element get asyncStarControllerConstructor {
+    ClassElement classElement = asyncStarController;
+    return classElement.lookupConstructor("");
+  }
+
+  Element get streamIteratorConstructor {
+    ClassElement classElement = find(compiler.asyncLibrary, "StreamIterator");
+    classElement.ensureResolved(resolution);
+    return classElement.lookupConstructor("");
+  }
+
+  MethodElement get functionTypeTestMetaHelper {
+    return findHelper('functionTypeTestMetaHelper');
+  }
+
+  MethodElement get defineProperty {
+    return findHelper('defineProperty');
+  }
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
new file mode 100644
index 0000000..90dba81
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -0,0 +1,289 @@
+// 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.js_helpers.impact;
+
+import '../common/names.dart' show
+    Identifiers;
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart' show
+    InterfaceType;
+import '../elements/elements.dart' show
+    ClassElement,
+    Element;
+
+import 'backend_helpers.dart';
+import 'constant_system_javascript.dart';
+import 'js_backend.dart';
+
+/// A set of JavaScript backend dependencies.
+class BackendImpact {
+  final List<Element> staticUses;
+  final List<InterfaceType> instantiatedTypes;
+  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>[]});
+}
+
+/// The JavaScript backend dependencies for various features.
+class BackendImpacts {
+  final Compiler compiler;
+
+  BackendImpacts(this.compiler);
+
+  JavaScriptBackend get backend => compiler.backend;
+
+  BackendHelpers get helpers => backend.helpers;
+
+  BackendImpact get getRuntimeTypeArgument => new BackendImpact(
+      staticUses: [
+        helpers.getRuntimeTypeArgument,
+        helpers.getTypeArgumentByIndex,
+        helpers.copyTypeArguments]);
+
+  BackendImpact get computeSignature => new BackendImpact(
+      staticUses: [
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo,
+        helpers.computeSignature,
+        helpers.getRuntimeTypeArguments],
+      instantiatedClasses: [
+        compiler.listClass]);
+
+  BackendImpact get asyncBody => new BackendImpact(
+      staticUses: [
+        helpers.asyncHelper,
+        helpers.syncCompleterConstructor,
+        helpers.streamIteratorConstructor,
+        helpers.wrapBody]);
+
+  BackendImpact get syncStarBody => new BackendImpact(
+      staticUses: [
+        helpers.syncStarIterableConstructor,
+        helpers.endOfIteration,
+        helpers.yieldStar,
+        helpers.syncStarUncaughtError],
+      instantiatedClasses: [
+        helpers.syncStarIterable]);
+
+  BackendImpact get asyncStarBody => new BackendImpact(
+      staticUses: [
+        helpers.asyncStarHelper,
+        helpers.streamOfController,
+        helpers.yieldSingle,
+        helpers.yieldStar,
+        helpers.asyncStarControllerConstructor,
+        helpers.streamIteratorConstructor,
+        helpers.wrapBody],
+      instantiatedClasses: [
+        helpers.asyncStarController]);
+
+  BackendImpact get typeVariableBoundCheck => new BackendImpact(
+      staticUses: [
+        helpers.throwTypeError,
+        helpers.assertIsSubtype]);
+
+  BackendImpact get abstractClassInstantiation => new BackendImpact(
+      staticUses: [
+        helpers.throwAbstractClassInstantiationError],
+      otherImpacts: [
+        needsString('Needed to encode the message.')]);
+
+  BackendImpact get fallThroughError => new BackendImpact(
+      staticUses: [
+        helpers.fallThroughError]);
+
+  BackendImpact get asCheck => new BackendImpact(
+      staticUses: [
+        helpers.throwRuntimeError]);
+
+  BackendImpact get 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.')]);
+
+  BackendImpact get throwRuntimeError => new BackendImpact(
+      staticUses: [
+        helpers.throwRuntimeError],
+      // Also register the types of the arguments passed to this method.
+      instantiatedClasses: [
+        helpers.compiler.stringClass]);
+
+  BackendImpact get superNoSuchMethod => new BackendImpact(
+      staticUses: [
+        helpers.createInvocationMirror,
+        helpers.compiler.objectClass.lookupLocalMember(
+            Identifiers.noSuchMethod_)],
+      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.')]);
+
+  BackendImpact get constantMapLiteral {
+
+    ClassElement find(String name) {
+      return helpers.find(backend.jsHelperLibrary, name);
+    }
+
+    return new BackendImpact(
+      instantiatedClasses: [
+        find(JavaScriptMapConstant.DART_CLASS),
+        find(JavaScriptMapConstant.DART_PROTO_CLASS),
+        find(JavaScriptMapConstant.DART_STRING_CLASS),
+        find(JavaScriptMapConstant.DART_GENERAL_CLASS)]);
+  }
+
+  BackendImpact get symbolConstructor => new BackendImpact(
+      staticUses: [
+        helpers.compiler.symbolValidatedConstructor]);
+
+
+  BackendImpact get incDecOperation =>
+      needsInt('Needed for the `+ 1` or `- 1` operation of ++/--.');
+
+  /// Helper for registering that `int` is needed.
+  BackendImpact needsInt(String reason) {
+    // TODO(johnniwinther): Register [reason] for use in dump-info.
+    return new BackendImpact(
+        instantiatedClasses: [helpers.compiler.intClass]);
+  }
+
+  /// Helper for registering that `List` is needed.
+  BackendImpact needsList(String reason) {
+    // TODO(johnniwinther): Register [reason] for use in dump-info.
+    return new BackendImpact(
+        instantiatedClasses: [helpers.compiler.listClass]);
+  }
+
+  /// Helper for registering that `String` is needed.
+  BackendImpact needsString(String reason) {
+    // TODO(johnniwinther): Register [reason] for use in dump-info.
+    return new BackendImpact(
+        instantiatedClasses: [
+          helpers.compiler.stringClass]);
+  }
+
+  BackendImpact get assertWithoutMessage => new BackendImpact(
+      staticUses: [
+        helpers.assertHelper]);
+
+  BackendImpact get assertWithMessage => new BackendImpact(
+      staticUses: [
+        helpers.assertTest,
+        helpers.assertThrow]);
+
+  BackendImpact get asyncForIn => new BackendImpact(
+      staticUses: [
+        helpers.streamIteratorConstructor]);
+
+  BackendImpact get stringInterpolation => new BackendImpact(
+      staticUses: [
+        helpers.stringInterpolationHelper]);
+
+  BackendImpact get catchStatement => new BackendImpact(
+      staticUses: [
+        helpers.exceptionUnwrapper],
+      instantiatedClasses: [
+        backend.jsPlainJavaScriptObjectClass,
+        backend.jsUnknownJavaScriptObjectClass]);
+
+  BackendImpact get throwExpression => new BackendImpact(
+      // We don't know ahead of time whether we will need the throw in a
+      // statement context or an expression context, so we register both
+      // here, even though we may not need the throwExpression helper.
+      staticUses: [
+        helpers.wrapExceptionHelper,
+        helpers.throwExpressionHelper]);
+
+  BackendImpact get lazyField => new BackendImpact(
+      staticUses: [
+        helpers.cyclicThrowHelper]);
+
+  BackendImpact get typeLiteral => new BackendImpact(
+      instantiatedClasses: [
+        backend.typeImplementation],
+      staticUses: [
+        helpers.createRuntimeType]);
+
+  BackendImpact get stackTraceInCatch => new BackendImpact(
+      staticUses: [
+        helpers.traceFromException]);
+
+  BackendImpact get syncForIn => new BackendImpact(
+      // The SSA builder recognizes certain for-in loops and can generate calls
+      // to throwConcurrentModificationError.
+      staticUses: [
+        helpers.checkConcurrentModificationError]);
+
+  BackendImpact get typeVariableExpression => new BackendImpact(
+      staticUses: [
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo,
+        helpers.runtimeTypeToString,
+        helpers.createRuntimeType],
+      instantiatedClasses: [
+        helpers.compiler.listClass],
+      otherImpacts: [
+        getRuntimeTypeArgument,
+        needsInt('Needed for accessing a type variable literal on this.')]);
+
+  BackendImpact get typeCheck => new BackendImpact(
+      instantiatedClasses: [
+        helpers.compiler.boolClass]);
+
+  BackendImpact get checkedModeTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.throwRuntimeError]);
+
+  BackendImpact get malformedTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.throwTypeError]);
+
+  BackendImpact get genericTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.checkSubtype,
+        // TODO(johnniwinther): Investigate why this is needed.
+        helpers.setRuntimeTypeInfo,
+        helpers.getRuntimeTypeInfo],
+      instantiatedClasses: [
+        helpers.compiler.listClass],
+      otherImpacts: [
+        getRuntimeTypeArgument]);
+
+  BackendImpact get genericCheckedModeTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.assertSubtype]);
+
+  BackendImpact get typeVariableTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.checkSubtypeOfRuntimeType]);
+
+  BackendImpact get typeVariableCheckedModeTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.assertSubtypeOfRuntimeType]);
+
+  BackendImpact get functionTypeCheck => new BackendImpact(
+      staticUses: [
+        helpers.functionTypeTestMetaHelper]);
+
+  BackendImpact get 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]);
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index 963f1d7..92852b7 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -6,18 +6,23 @@
 
 import 'glue.dart';
 
-import '../../closure.dart' show ClosureClassElement;
-import '../../common/codegen.dart' show CodegenRegistry;
+import '../../closure.dart' show
+    ClosureClassElement;
+import '../../common.dart';
+import '../../common/codegen.dart' show
+    CodegenRegistry;
 import '../../constants/values.dart';
 import '../../dart_types.dart';
-import '../../diagnostics/invariant.dart' show invariant;
-import '../../diagnostics/spannable.dart' show CURRENT_ELEMENT_SPANNABLE;
 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 BuiltinOperator, BuiltinMethod;
-import '../../types/types.dart' show TypeMask;
+import '../../tree_ir/tree_ir_nodes.dart' show
+    BuiltinMethod,
+    BuiltinOperator;
+import '../../types/types.dart' show
+    TypeMask;
 import '../../universe/selector.dart' show
     Selector;
 import '../../universe/universe.dart' show
@@ -357,18 +362,6 @@
       glue.registerIsCheck(type, registry);
       ClassElement clazz = type.element;
 
-      // Handle some special checks against classes that exist only in
-      // the compile-time class hierarchy, not at runtime.
-      // TODO(sra): Is this correct? The field tests are only valid with the
-      // precondition that [value] is an Array. They will crash on `null`.
-      if (clazz == glue.jsExtendableArrayClass) {
-        assert(node.isTypeTest);
-        return js.js(r'!#.fixed$length', <js.Expression>[value]);
-      } else if (clazz == glue.jsMutableArrayClass) {
-        assert(node.isTypeTest);
-        return js.js(r'!#.immutable$list', <js.Expression>[value]);
-      }
-
       if (glue.isStringClass(clazz)) {
         if (node.isTypeTest) {
           return js.js(r'typeof # === "string"', <js.Expression>[value]);
@@ -428,6 +421,16 @@
   }
 
   @override
+  js.Expression visitGetTypeTestProperty(tree_ir.GetTypeTestProperty node) {
+    js.Expression object = visitExpression(node.object);
+    DartType dartType = node.dartType;
+    assert(dartType.isInterfaceType);
+    glue.registerIsCheck(dartType, registry);
+    js.Expression property = glue.getTypeTestTag(dartType);
+    return js.js(r'#.#', [object, property]);
+  }
+
+  @override
   js.Expression visitVariableUse(tree_ir.VariableUse node) {
     return buildVariableAccess(node.variable);
   }
@@ -819,11 +822,13 @@
   @override
   js.Expression visitTypeExpression(tree_ir.TypeExpression node) {
     List<js.Expression> arguments = visitExpressionList(node.arguments);
-    return glue.generateTypeRepresentation(node.dartType, arguments);
+    return glue.generateTypeRepresentation(node.dartType, arguments, registry);
   }
 
   js.Node handleForeignCode(tree_ir.ForeignCode node) {
     registry.registerStaticUse(node.dependency);
+    // TODO(sra): Should this be in CodegenRegistry?
+    glue.registerNativeBehavior(node.nativeBehavior, node);
     return node.codeTemplate.instantiate(visitExpressionList(node.arguments));
   }
 
@@ -853,12 +858,18 @@
         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 js.js('(# & #) >>> 0', args);
+        return normalizeBitOp(js.js('# & #', args), node);
       case BuiltinOperator.NumOr:
-        return js.js('(# | #) >>> 0', args);
+        return normalizeBitOp(js.js('# | #', args), node);
       case BuiltinOperator.NumXor:
-        return js.js('(# ^ #) >>> 0', args);
+        return normalizeBitOp(js.js('# ^ #', args), node);
       case BuiltinOperator.NumLt:
         return new js.Binary('<', args[0], args[1]);
       case BuiltinOperator.NumLe:
@@ -868,7 +879,10 @@
       case BuiltinOperator.NumGe:
         return new js.Binary('>=', args[0], args[1]);
       case BuiltinOperator.NumShl:
-        return js.js('(# << #) >>> 0', args);
+        return normalizeBitOp(js.js('# << #', args), node);
+      case BuiltinOperator.NumShr:
+        // No normalization required since output is always uint32.
+        return js.js('# >>> #', args);
       case BuiltinOperator.StringConcatenate:
         if (args.isEmpty) return js.string('');
         return args.reduce((e1,e2) => new js.Binary('+', e1, e2));
@@ -893,9 +907,87 @@
         return js.js('Math.floor(#) === #', args);
       case BuiltinOperator.IsNumberAndFloor:
         return js.js('typeof # === "number" && Math.floor(#) === #', 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);
     }
   }
 
+  /// 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) {
+    const MAX_UINT31 = 0x7fffffff;
+    const MAX_UINT32 = 0xffffffff;
+
+    int constantValue(tree_ir.Expression e) {
+      if (e is tree_ir.Constant) {
+        ConstantValue value = e.value;
+        if (!value.isInt) return null;
+        IntConstantValue intConstant = value;
+        if (intConstant.primitiveValue < 0) return null;
+        if (intConstant.primitiveValue > MAX_UINT32) return null;
+        return intConstant.primitiveValue;
+      }
+      return null;
+    }
+
+    /// Returns a value of the form 0b0001xxxx to represent the highest bit set
+    /// in the result.  This represents the range [0, 0b00011111], up to 32
+    /// bits.  `null` represents a result possibly outside the uint32 range.
+    int maxBitOf(tree_ir.Expression e) {
+      if (e is tree_ir.Constant) {
+        return constantValue(e);
+      }
+      if (e is tree_ir.ApplyBuiltinOperator) {
+        if (e.operator == BuiltinOperator.NumAnd) {
+          int left = maxBitOf(e.arguments[0]);
+          int right = maxBitOf(e.arguments[1]);
+          if (left == null && right == null) return MAX_UINT32;
+          if (left == null) return right;
+          if (right == null) return left;
+          return (left < right) ? left : right;
+        }
+        if (e.operator == BuiltinOperator.NumOr ||
+            e.operator == BuiltinOperator.NumXor) {
+          int left = maxBitOf(e.arguments[0]);
+          int right = maxBitOf(e.arguments[1]);
+          if (left == null || right == null) return MAX_UINT32;
+          return left | right;
+        }
+        if (e.operator == BuiltinOperator.NumShr) {
+          int right = constantValue(e.arguments[1]);
+          // NumShr is JavaScript '>>>' so always generates a uint32 result.
+          if (right == null || right <= 0 || right > 31) return MAX_UINT32;
+          int left = maxBitOf(e.arguments[0]);
+          if (left == null) return MAX_UINT32;
+          return left >> right;
+        }
+        if (e.operator == BuiltinOperator.NumShl) {
+          int right = constantValue(e.arguments[1]);
+          if (right == null || right <= 0 || right > 31) return MAX_UINT32;
+          int left = maxBitOf(e.arguments[0]);
+          if (left == null) return MAX_UINT32;
+          if (left.bitLength + right > 31) return MAX_UINT32;
+          return left << right;
+        }
+      }
+      return null;
+    }
+
+    int maxBit = maxBitOf(node);
+    if (maxBit != null && maxBit <= MAX_UINT31) return op;
+    return js.js('# >>> 0', [op]);
+  }
+
+
   /// The JS name of a built-in method.
   static final Map<BuiltinMethod, String> builtinMethodName =
     const <BuiltinMethod, String>{
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index 3a229e3..e6f5909 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -5,8 +5,12 @@
 library code_generator_dependencies;
 
 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 '../../constants/values.dart';
@@ -14,15 +18,12 @@
     DartType,
     TypeVariableType,
     InterfaceType;
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../../diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE;
 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
@@ -109,7 +110,7 @@
   }
 
   FunctionElement get createInvocationMirrorMethod {
-    return _backend.getCreateInvocationMirror();
+    return _backend.helpers.createInvocationMirror;
   }
 
   void registerUseInterceptorInCodegen() {
@@ -132,6 +133,10 @@
     return _backend.getInterceptedClassesOn(selector.name);
   }
 
+  Set<ClassElement> get interceptedClasses {
+    return _backend.interceptedClasses;
+  }
+
   void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
     _backend.registerSpecializedGetInterceptor(classes);
   }
@@ -164,55 +169,55 @@
   }
 
   FunctionElement getWrapExceptionHelper() {
-    return _backend.getWrapExceptionHelper();
+    return _backend.helpers.wrapExceptionHelper;
   }
 
   FunctionElement getExceptionUnwrapper() {
-    return _backend.getExceptionUnwrapper();
+    return _backend.helpers.exceptionUnwrapper;
   }
 
   FunctionElement getTraceFromException() {
-    return _backend.getTraceFromException();
+    return _backend.helpers.traceFromException;
   }
 
   FunctionElement getCreateRuntimeType() {
-    return _backend.getCreateRuntimeType();
+    return _backend.helpers.createRuntimeType;
   }
 
   FunctionElement getRuntimeTypeToString() {
-    return _backend.getRuntimeTypeToString();
+    return _backend.helpers.runtimeTypeToString;
   }
 
   FunctionElement getRuntimeTypeArgument() {
-    return _backend.getGetRuntimeTypeArgument();
+    return _backend.helpers.getRuntimeTypeArgument;
   }
 
   FunctionElement getTypeArgumentByIndex() {
-    return _backend.getGetTypeArgumentByIndex();
+    return _backend.helpers.getTypeArgumentByIndex;
   }
 
   FunctionElement getAddRuntimeTypeInformation() {
-    return _backend.getSetRuntimeTypeInfo();
+    return _backend.helpers.setRuntimeTypeInfo;
   }
 
   /// checkSubtype(value, $isT, typeArgs, $asT)
   FunctionElement getCheckSubtype() {
-    return _backend.getCheckSubtype();
+    return _backend.helpers.checkSubtype;
   }
 
   /// subtypeCast(value, $isT, typeArgs, $asT)
   FunctionElement getSubtypeCast() {
-    return _backend.getSubtypeCast();
+    return _backend.helpers.subtypeCast;
   }
 
   /// checkSubtypeOfRuntime(value, runtimeType)
   FunctionElement getCheckSubtypeOfRuntimeType() {
-    return _backend.getCheckSubtypeOfRuntimeType();
+    return _backend.helpers.checkSubtypeOfRuntimeType;
   }
 
   /// subtypeOfRuntimeTypeCast(value, runtimeType)
   FunctionElement getSubtypeOfRuntimeTypeCast() {
-    return _backend.getSubtypeOfRuntimeTypeCast();
+    return _backend.helpers.subtypeOfRuntimeTypeCast;
   }
 
   js.Expression getRuntimeTypeName(ClassElement cls) {
@@ -220,7 +225,7 @@
   }
 
   int getTypeVariableIndex(TypeVariableType variable) {
-    return RuntimeTypes.getTypeVariableIndex(variable.element);
+    return variable.element.index;
   }
 
   bool needsSubstitutionForTypeVariableAccess(ClassElement cls) {
@@ -234,12 +239,15 @@
   }
 
   js.Expression generateTypeRepresentation(DartType dartType,
-                                           List<js.Expression> arguments) {
+                                           List<js.Expression> arguments,
+                                           CodegenRegistry registry) {
     int variableIndex = 0;
-    js.Expression representation = _backend.rti.getTypeRepresentation(
+    js.Expression representation = _backend.rtiEncoder.getTypeRepresentation(
         dartType,
         (_) => arguments[variableIndex++]);
     assert(variableIndex == arguments.length);
+    // Representation contains JavaScript Arrays.
+    registry.registerInstantiatedClass(_backend.jsArrayClass);
     return representation;
   }
 
@@ -264,7 +272,10 @@
     return _compiler.world.hasAnyStrictSubtype(element);
   }
 
+  ClassElement get jsFixedArrayClass => _backend.jsFixedArrayClass;
   ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass;
+  ClassElement get jsUnmodifiableArrayClass =>
+      _backend.jsUnmodifiableArrayClass;
   ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
 
   bool isStringClass(ClassElement classElement) =>
@@ -274,4 +285,10 @@
   bool isBoolClass(ClassElement classElement) =>
       classElement == _backend.jsBoolClass ||
       classElement == _compiler.boolClass;
+
+  // TODO(sra): Should this be part of CodegenRegistry?
+  void registerNativeBehavior(NativeBehavior nativeBehavior, node) {
+    if (nativeBehavior == null) return;
+    _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node);
+  }
 }
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index 0e12e63..28beb1c 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -10,38 +10,42 @@
 import 'unsugar.dart';
 
 import '../js_backend.dart';
+
+import '../../common.dart';
 import '../../common/codegen.dart' show
     CodegenWorkItem;
 import '../../common/tasks.dart' show
-    CompilerTask;
+    CompilerTask,
+    GenericTask;
 import '../../compiler.dart' show
     Compiler;
 import '../../constants/constant_system.dart';
-import '../../cps_ir/cps_ir_nodes.dart' as cps;
-import '../../cps_ir/cps_ir_integrity.dart';
 import '../../cps_ir/cps_ir_builder_task.dart';
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../../diagnostics/invariant.dart' show
-    DEBUG_MODE;
-import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
-import '../../types/types.dart' show TypeMask, UnionTypeMask, FlatTypeMask,
-    ForwardingTypeMask;
-import '../../elements/elements.dart';
-import '../../js/js.dart' as js;
-import '../../io/source_information.dart' show SourceInformationStrategy;
-import '../../tree_ir/tree_ir_builder.dart' as tree_builder;
+import '../../cps_ir/cps_ir_nodes.dart' as cps;
+import '../../cps_ir/cps_ir_nodes_sexpr.dart';
+import '../../cps_ir/cps_ir_integrity.dart';
 import '../../cps_ir/optimizers.dart';
 import '../../cps_ir/optimizers.dart' as cps_opt;
-import '../../tracer.dart';
+import '../../cps_ir/type_mask_system.dart';
+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 '../../tree_ir/tree_ir_builder.dart' as tree_builder;
+import '../../tracer.dart';
 import '../../ssa/ssa.dart' as ssa;
 import '../../tree_ir/optimization/optimization.dart';
 import '../../tree_ir/optimization/optimization.dart' as tree_opt;
 import '../../tree_ir/tree_ir_integrity.dart';
-import '../../cps_ir/cps_ir_nodes_sexpr.dart';
-import '../../cps_ir/type_mask_system.dart';
-import '../../common/tasks.dart';
+import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
+import '../../types/types.dart' show
+    FlatTypeMask,
+    ForwardingTypeMask,
+    TypeMask,
+    UnionTypeMask;
 
 class CpsFunctionCompiler implements FunctionCompiler {
   final ConstantSystem constantSystem;
@@ -125,7 +129,7 @@
     });
     traceGraph(pass.passName, cpsFunction);
     dumpTypedIr(pass.passName, cpsFunction);
-    assert(checkCpsIntegrity(cpsFunction));
+    assert(checkCpsIntegrity(cpsFunction, pass.passName));
   }
 
   cps.FunctionDefinition compileToCpsIr(AstElement element) {
@@ -137,6 +141,7 @@
         giveUp(cpsBuilderTask.bailoutMessage);
       }
     }
+    ParentVisitor.setParents(cpsFunction);
     traceGraph('IR Builder', cpsFunction);
     dumpTypedIr('IR Builder', cpsFunction);
     // Eliminating redundant phis before the unsugaring pass will make it
@@ -180,8 +185,8 @@
     }
   }
 
-  static bool checkCpsIntegrity(cps.FunctionDefinition node) {
-    new CheckCpsIntegrity().check(node);
+  static bool checkCpsIntegrity(cps.FunctionDefinition node, String pass) {
+    new CheckCpsIntegrity().check(node, pass);
     return true; // So this can be used from assert().
   }
 
@@ -198,6 +203,7 @@
     applyCpsPass(new MutableVariableEliminator(), cpsFunction);
     applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
     applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
+    applyCpsPass(new BoundsChecker(typeSystem, compiler.world), cpsFunction);
     applyCpsPass(new ShrinkingReducer(), cpsFunction);
     applyCpsPass(new ShareInterceptors(), cpsFunction);
     applyCpsPass(new ShrinkingReducer(), cpsFunction);
diff --git a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
index 3f68eed..3fa6f18 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
@@ -5,10 +5,10 @@
 import '../../cps_ir/optimizers.dart' show ParentVisitor, Pass;
 import '../../constants/values.dart';
 import '../../elements/elements.dart';
-import '../../io/source_information.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';
 
 class ExplicitReceiverParameterEntity implements Local {
   String get name => 'receiver';
@@ -26,7 +26,6 @@
   String get name => interceptedVariable.name + '_';
 }
 
-
 /// Rewrites the initial CPS IR to make Dart semantics explicit and inserts
 /// special nodes that respect JavaScript behavior.
 ///
@@ -35,9 +34,8 @@
 ///  - Add explicit receiver argument for methods that are called in interceptor
 ///    calling convention.
 ///  - Convert two-parameter exception handlers to one-parameter ones.
-class UnsugarVisitor extends RecursiveVisitor implements Pass {
+class UnsugarVisitor extends TrampolineRecursiveVisitor implements Pass {
   Glue _glue;
-  ParentVisitor _parentVisitor = new ParentVisitor();
 
   Parameter thisParameter;
   Parameter explicitReceiverParameter;
@@ -73,14 +71,11 @@
     if (inInterceptedMethod) {
       ThisParameterLocal holder = thisParameter.hint;
       explicitReceiverParameter = new Parameter(
-          new ExplicitReceiverParameterEntity(
-              holder.executableContext));
+          new ExplicitReceiverParameterEntity(holder.executableContext));
+      explicitReceiverParameter.parent = function;
       function.parameters.insert(0, explicitReceiverParameter);
     }
 
-    // Set all parent pointers.
-    _parentVisitor.visit(function);
-
     if (inInterceptedMethod && methodUsesReceiverArgument(function.element)) {
       explicitReceiverParameter.substituteFor(thisParameter);
     }
@@ -102,11 +97,7 @@
 
   void insertLetPrim(Primitive primitive, Expression node) {
     LetPrim let = new LetPrim(primitive);
-    InteriorNode parent = node.parent;
-    parent.body = let;
-    let.body = node;
-    node.parent = let;
-    let.parent = parent;
+    let.insertAbove(node);
   }
 
   void insertEqNullCheck(FunctionDefinition function) {
@@ -121,28 +112,14 @@
     //     else
     //       body;
     //
-    Continuation originalBody = new Continuation(<Parameter>[]);
-    originalBody.body = function.body;
-
-    Continuation returnFalse = new Continuation(<Parameter>[]);
-    Primitive falsePrimitive = falseConstant;
-    returnFalse.body =
-        new LetPrim(falsePrimitive,
-            new InvokeContinuation(
-                function.returnContinuation, <Primitive>[falsePrimitive]));
-
-    Primitive nullPrimitive = nullConstant;
-    Primitive test = new ApplyBuiltinOperator(
+    CpsFragment cps = new CpsFragment();
+    Primitive isNull = cps.applyBuiltin(
         BuiltinOperator.Identical,
-          <Primitive>[function.parameters.single, nullPrimitive],
-          function.parameters.single.sourceInformation);
-
-    Expression newBody =
-        new LetCont.many(<Continuation>[returnFalse, originalBody],
-            new LetPrim(nullPrimitive,
-                new LetPrim(test,
-                    new Branch.loose(test, returnFalse, originalBody))));
-    function.body = newBody;
+        <Primitive>[function.parameters.single, cps.makeNull()]);
+    CpsFragment trueBranch = cps.ifTruthy(isNull);
+    trueBranch.invokeContinuation(function.returnContinuation,
+        <Primitive>[trueBranch.makeFalse()]);
+    cps.insertAbove(function.body);
   }
 
   /// Insert a static call to [function] at the point of [node] with result
@@ -153,25 +130,22 @@
   /// let cont continuation(result) = node
   /// in invoke function arguments continuation
   void insertStaticCall(FunctionElement function, List<Primitive> arguments,
-      Parameter result,
-      Expression node) {
+      Parameter result, Expression node) {
     InteriorNode parent = node.parent;
     Continuation continuation = new Continuation([result]);
-    continuation.body = node;
-    _parentVisitor.processContinuation(continuation);
 
     Selector selector = new Selector.fromElement(function);
     // 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(
         function, selector, arguments, continuation, null);
-    _parentVisitor.processInvokeStatic(invoke);
 
     LetCont letCont = new LetCont(continuation, invoke);
-    _parentVisitor.processLetCont(letCont);
 
     parent.body = letCont;
     letCont.parent = parent;
+    continuation.body = node;
+    node.parent = continuation;
   }
 
   @override
@@ -211,11 +185,10 @@
 
   processThrow(Throw node) {
     // The subexpression of throw is wrapped in the JavaScript output.
-    Parameter value = new Parameter(null);
+    Parameter wrappedException = new Parameter(null);
     insertStaticCall(_glue.getWrapExceptionHelper(), [node.value.definition],
-        value, node);
-    node.value.unlink();
-    node.value = new Reference<Primitive>(value);
+        wrappedException, node);
+    node.value.changeTo(wrappedException);
   }
 
   processRethrow(Rethrow node) {
@@ -229,6 +202,18 @@
     // worry about unlinking.
   }
 
+  // TODO(24523): Insert interceptor on demand when we discover we want to use
+  // one rather than on every check.
+  processTypeTest(TypeTest node) {
+    assert(node.interceptor == null);
+    Primitive receiver = node.value.definition;
+    Primitive interceptor = new Interceptor(receiver, node.sourceInformation)
+        ..interceptedClasses.addAll(_glue.interceptedClasses);
+    insertLetPrim(interceptor, node.parent);
+    node.interceptor = new Reference<Primitive>(interceptor);
+    node.interceptor.parent = node;
+  }
+
   processInvokeMethod(InvokeMethod node) {
     Selector selector = node.selector;
     if (!_glue.isInterceptedSelector(selector)) return;
@@ -251,7 +236,7 @@
       insertLetPrim(newReceiver, contBinding);
     }
     node.arguments.insert(0, node.receiver);
-    node.receiver = new Reference<Primitive>(newReceiver);
+    node.receiver = new Reference<Primitive>(newReceiver)..parent = node;
     node.receiverIsIntercepted = true;
   }
 
@@ -277,7 +262,7 @@
       insertLetPrim(newReceiver, contBinding);
     }
     node.arguments.insert(0, node.receiver);
-    node.receiver = new Reference<Primitive>(newReceiver);
+    node.receiver = new Reference<Primitive>(newReceiver)..parent = node;
   }
 
   processInterceptor(Interceptor node) {
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index f1d7f74..5b87b15 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -255,7 +255,7 @@
   jsAst.Expression visitType(TypeConstantValue constant, [_]) {
     DartType type = constant.representedType;
     jsAst.Name typeName = namer.runtimeTypeName(type.element);
-    return new jsAst.Call(getHelperProperty(backend.getCreateRuntimeType()),
+    return new jsAst.Call(getHelperProperty(backend.helpers.createRuntimeType),
                           [js.quoteName(typeName)]);
   }
 
@@ -309,14 +309,15 @@
         !type.treatAsRaw &&
         backend.classNeedsRti(type.element)) {
       InterfaceType interface = type;
-      RuntimeTypes rti = backend.rti;
+      RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder;
       Iterable<jsAst.Expression> arguments = interface.typeArguments
           .map((DartType type) =>
-              rti.getTypeRepresentationWithPlaceholders(type, (_){}));
+              rtiEncoder.getTypeRepresentationWithPlaceholders(type, (_){}));
       jsAst.Expression argumentList =
           new jsAst.ArrayInitializer(arguments.toList());
-      return new jsAst.Call(getHelperProperty(backend.getSetRuntimeTypeInfo()),
-                            [value, argumentList]);
+      return new jsAst.Call(
+          getHelperProperty(backend.helpers.setRuntimeTypeInfo),
+          [value, argumentList]);
     }
     return value;
   }
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 00394a5..8ddbb43 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -71,14 +71,13 @@
     if (!Elements.isNativeOrExtendsNative(classElement)) return;
     if (classElement.isMixinApplication) return;
     if (classElement.isAbstract) return;
+    // JsInterop classes are opaque interfaces without a concrete
+    // implementation.
+    if (classElement.isJsInterop) return;
     joinFor(enqueuer).instantiatedClasses.add(classElement);
   }
 
-  void registerTypeLiteral(DartType type, Registry registry) {
-    assert(registry.isForResolution);
-    // In codegen we see the TypeConstants instead.
-    if (!registry.isForResolution) return;
-
+  void registerTypeLiteral(DartType type) {
     if (type.isInterfaceType) {
       // TODO(sra): If we had a flow query from the type literal expression to
       // the Type argument of the metadata lookup, we could tell if this type
diff --git a/pkg/compiler/lib/src/js_backend/js_backend.dart b/pkg/compiler/lib/src/js_backend/js_backend.dart
index f195be4..3da429f 100644
--- a/pkg/compiler/lib/src/js_backend/js_backend.dart
+++ b/pkg/compiler/lib/src/js_backend/js_backend.dart
@@ -11,6 +11,7 @@
 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName;
 
 import '../closure.dart';
+import '../common.dart';
 import '../common/backend_api.dart' show
     Backend,
     ForeignResolver;
@@ -31,7 +32,7 @@
     MapLiteralUse,
     Resolution,
     ResolutionCallbacks,
-    ResolutionWorldImpact,
+    ResolutionImpact,
     TransformedWorldImpact;
 import '../common/work.dart' show
     ItemCompilationContext;
@@ -42,17 +43,6 @@
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show MessageKind;
-import '../diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE,
-    NO_LOCATION_SPANNABLE,
-    Spannable,
-    SpannableAssertionFailure;
 import '../elements/elements.dart';
 import '../elements/visitor.dart' show
     BaseElementVisitor;
@@ -60,6 +50,7 @@
     Enqueuer,
     ResolutionEnqueuer,
     WorldImpact;
+import '../helpers/helpers.dart';
 import '../io/code_output.dart';
 import '../io/source_information.dart' show
     SourceInformationStrategy,
@@ -81,6 +72,8 @@
     USE_LAZY_EMITTER;
 import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
 import '../native/native.dart' as native;
+import '../patch_parser.dart' show
+    checkJsInteropAnnotation;
 import '../resolution/registry.dart' show
     EagerRegistry;
 import '../resolution/tree_elements.dart' show
@@ -99,9 +92,12 @@
 import '../world.dart' show
     ClassWorld;
 
+import 'backend_helpers.dart';
+import 'backend_impact.dart';
 import 'codegen/task.dart';
 import 'constant_system_javascript.dart';
 import 'patch_resolver.dart';
+import 'js_interop_analysis.dart' show JsInteropAnalysis;
 import 'lookup_map_analysis.dart' show LookupMapAnalysis;
 
 part 'backend.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
new file mode 100644
index 0000000..777a368
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -0,0 +1,142 @@
+// 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.
+
+/// 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
+        ConstantValue,
+        ConstructedConstantValue,
+        ListConstantValue,
+        NullConstantValue,
+        StringConstantValue,
+        TypeConstantValue;
+import '../elements/elements.dart'
+    show
+        ClassElement,
+        Element,
+        FieldElement,
+        FunctionElement,
+        LibraryElement,
+        MetadataAnnotation;
+
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../universe/selector.dart' show Selector;
+import '../universe/universe.dart' show SelectorConstraints;
+
+import 'js_backend.dart' show JavaScriptBackend;
+
+class JsInteropAnalysis {
+  final JavaScriptBackend backend;
+
+  /// The resolved [FieldElement] for `Js.name`.
+  FieldElement nameField;
+  bool enabledJsInterop = false;
+
+  /// Whether the backend is currently processing the codegen queue.
+  bool _inCodegen = false;
+
+  JsInteropAnalysis(this.backend);
+
+  void onQueueClosed() {
+    if (_inCodegen) return;
+
+    if (backend.jsAnnotationClass != null) {
+      nameField = backend.jsAnnotationClass.lookupMember('name');
+      backend.compiler.libraryLoader.libraries
+          .forEach(processJsInteropAnnotationsInLibrary);
+    }
+  }
+
+  void onCodegenStart() {
+    _inCodegen = true;
+  }
+
+  void processJsInteropAnnotation(Element e) {
+    for (MetadataAnnotation annotation in e.implementation.metadata) {
+      ConstantValue constant = backend.compiler.constants.getConstantValue(
+          annotation.constant);
+      if (constant == null || constant is! ConstructedConstantValue) continue;
+      ConstructedConstantValue constructedConstant = constant;
+      if (constructedConstant.type.element == backend.jsAnnotationClass) {
+        ConstantValue value = constructedConstant.fields[nameField];
+        if (value.isString) {
+          StringConstantValue stringValue = value;
+          e.setJsInteropName(stringValue.primitiveValue.slowToString());
+        } else {
+          // TODO(jacobr): report a warning if the value is not a String.
+          e.setJsInteropName('');
+        }
+        enabledJsInterop = true;
+        return;
+      }
+    }
+  }
+
+  void processJsInteropAnnotationsInLibrary(LibraryElement library) {
+    processJsInteropAnnotation(library);
+    library.implementation.forEachLocalMember((Element element) {
+      processJsInteropAnnotation(element);
+      if (!element.isClass || !element.isJsInterop) return;
+
+      ClassElement classElement = element;
+
+      if (!classElement
+          .implementsInterface(backend.jsJavaScriptObjectClass)) {
+        backend.reporter.reportErrorMessage(classElement,
+            MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, {
+          'cls': classElement.name,
+          'superclass': classElement.superclass.name
+        });
+      }
+
+      classElement.forEachMember(
+          (ClassElement classElement, Element member) {
+        processJsInteropAnnotation(member);
+
+        if (!member.isSynthesized &&
+            classElement.isJsInterop &&
+            member is FunctionElement) {
+          FunctionElement fn = member;
+          if (!fn.isExternal && !fn.isAbstract) {
+            backend.reporter.reportErrorMessage(
+                fn,
+                MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
+                {'cls': classElement.name, 'member': member.name});
+          }
+        }
+      });
+    });
+  }
+
+  jsAst.Statement buildJsInteropBootstrap() {
+    if (!enabledJsInterop) return null;
+    List<jsAst.Statement> statements = <jsAst.Statement>[];
+    backend.compiler.codegenWorld.forEachInvokedName(
+        (String name, Map<Selector, SelectorConstraints> selectors) {
+      selectors.forEach((Selector selector, SelectorConstraints constraints) {
+        if (selector.isClosureCall) {
+          // TODO(jacobr): support named arguments.
+          if (selector.namedArgumentCount > 0) return;
+          int argumentCount = selector.argumentCount;
+          var candidateParameterNames =
+              'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMOPQRSTUVWXYZ';
+          var parameters = new List<String>.generate(
+              argumentCount, (i) => candidateParameterNames[i]);
+
+          var name = backend.namer.invocationName(selector);
+          statements.add(js.statement(
+              'Function.prototype.# = function(#) { return this(#) }',
+              [name, parameters, parameters]));
+        }
+      });
+    });
+    return new jsAst.Block(statements);
+  }
+}
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 21a643a..a6c1990 100644
--- a/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart
@@ -5,12 +5,9 @@
 /// Analysis to determine how to generate code for `LookupMap`s.
 library compiler.src.js_backend.lookup_map_analysis;
 
+import '../common.dart';
 import '../common/registry.dart' show Registry;
 import '../compiler.dart' show Compiler;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../constants/values.dart' show
     ConstantValue,
     ConstructedConstantValue,
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index de1279f..783b518 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -636,6 +636,32 @@
     return invocationName(new Selector.fromElement(method));
   }
 
+  String _jsNameHelper(Element e) {
+    if (e.jsInteropName != null && e.jsInteropName.isNotEmpty)
+      return e.jsInteropName;
+    return e.isLibrary ? 'self' : e.name;
+  }
+
+  /// Returns a JavaScript path specifying the context in which
+  /// [element.fixedBackendName] should be evaluated. Only applicable for
+  /// elements using typed JavaScript interop.
+  /// For example: fixedBackendPath for the static method createMap in the
+  /// Map class of the goog.map JavaScript library would have path
+  /// "goog.maps.Map".
+  String fixedBackendPath(Element element) {
+    if (!element.isJsInterop) return null;
+    if (element.isInstanceMember) return 'this';
+    if (element.isConstructor) return fixedBackendPath(element.enclosingClass);
+    if (element.isLibrary) return 'self';
+    var sb = new StringBuffer();
+    sb..write(_jsNameHelper(element.library));
+
+    if (element.enclosingClass != null && element.enclosingClass != element) {
+      sb..write('.')..write(_jsNameHelper(element.enclosingClass));
+    }
+    return sb.toString();
+  }
+
   /// Returns the annotated name for a variant of `call`.
   /// The result has the form:
   ///
@@ -766,11 +792,6 @@
     ClassElement enclosingClass = element.enclosingClass;
 
     if (element.hasFixedBackendName) {
-      // Certain native fields must be given a specific name. Native names must
-      // not contain '$'. We rely on this to avoid clashes.
-      assert(enclosingClass.isNative &&
-             !element.fixedBackendName.contains(r'$'));
-
       return new StringBackedName(element.fixedBackendName);
     }
 
@@ -1723,7 +1744,7 @@
     String name = type.element?.name;
     if (name == null) {  // e.g. DartType 'dynamic' has no element.
       JavaScriptBackend backend = compiler.backend;
-      name = backend.rti.getTypeRepresentationForTypeConstant(type);
+      name = backend.rtiEncoder.getTypeRepresentationForTypeConstant(type);
     }
     addIdentifier(name);
     add(getHashTag(constant, 3));
@@ -1844,7 +1865,7 @@
     DartType type = constant.representedType;
     JavaScriptBackend backend = compiler.backend;
     // This name includes the library name and type parameters.
-    String name = backend.rti.getTypeRepresentationForTypeConstant(type);
+    String name = backend.rtiEncoder.getTypeRepresentationForTypeConstant(type);
     return _hashString(4, name);
   }
 
@@ -1970,7 +1991,7 @@
   }
 
   visitFunctionType(FunctionType type, _) {
-    if (backend.rti.isSimpleFunctionType(type)) {
+    if (backend.rtiEncoder.isSimpleFunctionType(type)) {
       sb.write('args${type.parameterTypes.length}');
       return;
     }
diff --git a/pkg/compiler/lib/src/js_backend/patch_resolver.dart b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
index d827a3e..c8e609d 100644
--- a/pkg/compiler/lib/src/js_backend/patch_resolver.dart
+++ b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
@@ -4,6 +4,7 @@
 
 library dart2js.js_backend.patch_resolver;
 
+import '../common.dart';
 import '../common/resolution.dart' show
     Resolution;
 import '../common/tasks.dart' show
@@ -11,12 +12,6 @@
 import '../compiler.dart' show
     Compiler;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
 import '../tree/tree.dart';
@@ -36,7 +31,7 @@
       });
       checkMatchingPatchSignatures(element, patch);
       element = patch;
-    } else {
+    } else if (!element.isJsInterop) {
       reporter.reportErrorMessage(
          element, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION);
     }
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 81b4dd5..a5136ad 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -15,29 +15,122 @@
 typedef jsAst.Expression OnVariableCallback(TypeVariableType variable);
 typedef bool ShouldEncodeTypedefCallback(TypedefType variable);
 
-class RuntimeTypes {
+// TODO(johnniwinther): Rename to something like [RuntimeTypeUsageCollector]
+// we semantics is more clear.
+abstract class RuntimeTypes {
+  TypeChecks get requiredChecks;
+  Iterable<ClassElement> get classesNeedingRti;
+  Iterable<Element> get methodsNeedingRti;
+
+  /// The set of classes that use one of their type variables as expressions
+  /// to get the runtime type.
+  Iterable<ClassElement> get classesUsingTypeVariableExpression;
+
+  void registerClassUsingTypeVariableExpression(ClassElement cls);
+  void registerRtiDependency(Element element, Element dependency);
+  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
+                                              DartType bound);
+
+  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);
+
+  /// 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);
+
+  /// Return all classes that are referenced in the type of the function, i.e.,
+  /// in the return type or the argument types.
+  Set<ClassElement> getReferencedClasses(FunctionType type);
+
+  /// Return all classes that are uses a type arguments.
+  Set<ClassElement> getRequiredArgumentClasses(JavaScriptBackend backend);
+
+  bool isTrivialSubstitution(ClassElement cls, ClassElement check);
+
+  Substitution getSubstitution(ClassElement cls, ClassElement other);
+
+  static bool hasTypeArguments(DartType type) {
+    if (type is InterfaceType) {
+      InterfaceType interfaceType = type;
+      return !interfaceType.treatAsRaw;
+    }
+    return false;
+  }
+}
+
+abstract class RuntimeTypesEncoder {
+  bool isSimpleFunctionType(FunctionType type);
+
+  jsAst.Expression getSignatureEncoding(DartType type, jsAst.Expression this_);
+
+  jsAst.Expression getSubstitutionRepresentation(
+        List<DartType> types,
+        OnVariableCallback onVariable);
+  jsAst.Expression getSubstitutionCode(Substitution substitution);
+  jsAst.Expression getSubstitutionCodeForVariable(
+      Substitution substitution, int index);
+
+  /// Returns the JavaScript template to determine at runtime if a type object
+  /// is a function type.
+  jsAst.Template get templateForIsFunctionType;
+
+  /// Returns the JavaScript template that creates at runtime a new function
+  /// type object.
+  jsAst.Template get templateForCreateFunctionType;
+  jsAst.Name get getFunctionThatReturnsNullName;
+
+  jsAst.Expression getTypeRepresentation(
+        DartType type,
+        OnVariableCallback onVariable,
+        [ShouldEncodeTypedefCallback shouldEncodeTypedef]);
+  /**
+   * Returns a [jsAst.Expression] representing the given [type]. Type
+   * variables are replaced by placeholders in the ast.
+   *
+   * [firstPlaceholderIndex] is the index to use for the first placeholder.
+   * 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});
+
+  String getTypeRepresentationForTypeConstant(DartType type);
+}
+
+class _RuntimeTypes implements RuntimeTypes {
   final Compiler compiler;
-  final TypeRepresentationGenerator representationGenerator;
 
   final Map<ClassElement, Set<ClassElement>> rtiDependencies;
+
+  @override
   final Set<ClassElement> classesNeedingRti;
+
+  @override
   final Set<Element> methodsNeedingRti;
-  // The set of classes that use one of their type variables as expressions
-  // to get the runtime type.
+
+  @override
   final Set<ClassElement> classesUsingTypeVariableExpression;
+
   // The set of type arguments tested against type variable bounds.
   final Set<DartType> checkedTypeArguments;
   // The set of tested type variable bounds.
   final Set<DartType> checkedBounds;
 
+  TypeChecks cachedRequiredChecks;
+
   JavaScriptBackend get backend => compiler.backend;
 
-  jsAst.Name get getFunctionThatReturnsNullName
-      => backend.namer.internalGlobal('functionThatReturnsNull');
-
-  RuntimeTypes(Compiler compiler)
+  _RuntimeTypes(Compiler compiler)
       : this.compiler = compiler,
-        representationGenerator = new TypeRepresentationGenerator(compiler),
         classesNeedingRti = new Set<ClassElement>(),
         methodsNeedingRti = new Set<Element>(),
         rtiDependencies = new Map<ClassElement, Set<ClassElement>>(),
@@ -49,6 +142,12 @@
   Set<ClassElement> allInstantiatedArguments;
   Set<ClassElement> checkedArguments;
 
+  @override
+  void registerClassUsingTypeVariableExpression(ClassElement cls) {
+    classesUsingTypeVariableExpression.add(cls);
+  }
+
+  @override
   void registerRtiDependency(Element element, Element dependency) {
     // We're not dealing with typedef for now.
     if (!element.isClass || !dependency.isClass) return;
@@ -57,6 +156,7 @@
     classes.add(dependency);
   }
 
+  @override
   void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
                                               DartType bound) {
     checkedTypeArguments.add(typeArgument);
@@ -77,6 +177,7 @@
    * TODO(karlklose): move these computations into a function producing an
    * immutable datastructure.
    */
+  @override
   void addImplicitChecks(Universe universe,
                          Iterable<ClassElement> classesUsingChecks) {
     // If there are no classes that use their variables in checks, there is
@@ -121,6 +222,7 @@
     }
   }
 
+  @override
   void computeClassesNeedingRti() {
     // Find the classes that need runtime type information. Such
     // classes are:
@@ -217,8 +319,7 @@
     classesUsingTypeVariableExpression.forEach(potentiallyAddForRti);
   }
 
-  TypeChecks cachedRequiredChecks;
-
+  @override
   TypeChecks get requiredChecks {
     if (cachedRequiredChecks == null) {
       computeRequiredChecks();
@@ -227,8 +328,7 @@
     return cachedRequiredChecks;
   }
 
-  /// Compute the required type checkes and substitutions for the given
-  /// instantitated and checked classes.
+  @override
   TypeChecks computeChecks(Set<ClassElement> instantiated,
                            Set<ClassElement> checked) {
     // Run through the combination of instantiated and checked
@@ -373,6 +473,7 @@
         collector.classes..addAll(functionArgumentCollector.classes);
   }
 
+  @override
   Set<ClassElement> getClassesUsedInSubstitutions(JavaScriptBackend backend,
                                                   TypeChecks checks) {
     Set<ClassElement> instantiated = new Set<ClassElement>();
@@ -389,6 +490,7 @@
     return instantiated..addAll(collector.classes);
   }
 
+  @override
   Set<ClassElement> getRequiredArgumentClasses(JavaScriptBackend backend) {
     Set<ClassElement> requiredArgumentClasses =
         new Set<ClassElement>.from(
@@ -398,26 +500,16 @@
         ..addAll(checkedArguments);
   }
 
-  String getTypeRepresentationForTypeConstant(DartType type) {
-    JavaScriptBackend backend = compiler.backend;
-    Namer namer = backend.namer;
-    if (type.isDynamic) return "dynamic";
-    String name = namer.uniqueNameForTypeConstantElement(type.element);
-    if (!type.element.isClass) return name;
-    InterfaceType interface = type;
-    List<DartType> variables = interface.element.typeVariables;
-    // Type constants can currently only be raw types, so there is no point
-    // adding ground-term type parameters, as they would just be 'dynamic'.
-    // TODO(sra): Since the result string is used only in constructing constant
-    // 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(', ');
-    return '$name<$arguments>';
+  @override
+  Set<ClassElement> getReferencedClasses(FunctionType type) {
+    FunctionArgumentCollector collector =
+        new FunctionArgumentCollector(backend);
+    collector.collect(type);
+    return collector.classes;
   }
 
   // TODO(karlklose): maybe precompute this value and store it in typeChecks?
+  @override
   bool isTrivialSubstitution(ClassElement cls, ClassElement check) {
     if (cls.isClosure) {
       // TODO(karlklose): handle closures.
@@ -452,31 +544,7 @@
     return true;
   }
 
-  /**
-   * Compute a JavaScript expression that describes the necessary substitution
-   * for type arguments in a subtype test.
-   *
-   * The result can be:
-   *  1) `null`, if no substituted check is necessary, because the
-   *     type variables are the same or there are no type variables in the class
-   *     that is checked for.
-   *  2) A list expression describing the type arguments to be used in the
-   *     subtype check, if the type arguments to be used in the check do not
-   *     depend on the type arguments of the object.
-   *  3) A function mapping the type variables of the object to be checked to
-   *     a list expression.
-   */
-  jsAst.Expression getSupertypeSubstitution(
-       ClassElement cls,
-       ClassElement check) {
-    Substitution substitution = getSubstitution(cls, check);
-    if (substitution != null) {
-      return substitution.getCode(this);
-    } else {
-      return null;
-    }
-  }
-
+  @override
   Substitution getSubstitution(ClassElement cls, ClassElement other) {
     // Look for a precomputed check.
     for (TypeCheck check in cachedRequiredChecks[cls]) {
@@ -505,7 +573,56 @@
       return new Substitution.function(target.typeArguments, typeVariables);
     }
   }
+}
 
+class _RuntimeTypesEncoder implements RuntimeTypesEncoder {
+  final Compiler compiler;
+  @override
+  final TypeRepresentationGenerator representationGenerator;
+
+  _RuntimeTypesEncoder(Compiler compiler)
+      : this.compiler = compiler,
+        representationGenerator = new TypeRepresentationGenerator(compiler);
+
+  JavaScriptBackend get backend => compiler.backend;
+
+  /// Returns the JavaScript template to determine at runtime if a type object
+  /// is a function type.
+  @override
+  jsAst.Template get templateForIsFunctionType {
+    return representationGenerator.templateForIsFunctionType;
+  }
+
+  /// Returns the JavaScript template that creates at runtime a new function
+  /// type object.
+  @override
+  jsAst.Template get templateForCreateFunctionType {
+    return representationGenerator.templateForCreateFunctionType;
+  }
+
+  @override
+  jsAst.Expression getTypeRepresentation(
+      DartType type,
+      OnVariableCallback onVariable,
+      [ShouldEncodeTypedefCallback shouldEncodeTypedef]) {
+    return representationGenerator.getTypeRepresentation(
+        type, onVariable, shouldEncodeTypedef);
+  }
+
+  @override
+  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;
+    jsAst.Expression representation = getTypeRepresentation(type, (variable) {
+      onVariable(variable);
+      return new jsAst.InterpolatedExpression(positions++);
+    });
+    return representation;
+  }
+
+  @override
   jsAst.Expression getSubstitutionRepresentation(
       List<DartType> types,
       OnVariableCallback onVariable) {
@@ -535,6 +652,7 @@
     }
   }
 
+  @override
   jsAst.Expression getSignatureEncoding(DartType type, jsAst.Expression this_) {
     ClassElement contextClass = Types.getClassContext(type);
     jsAst.Expression encoding =
@@ -543,7 +661,8 @@
       JavaScriptBackend backend = compiler.backend;
       jsAst.Name contextName = backend.namer.className(contextClass);
       return js('function () { return #(#, #, #); }',
-          [ backend.emitter.staticFunctionAccess(backend.getComputeSignature()),
+          [ backend.emitter.staticFunctionAccess(
+                backend.helpers.computeSignature),
               encoding, this_, js.quoteName(contextName) ]);
     } else {
       return encoding;
@@ -551,33 +670,95 @@
   }
 
   /**
-   * Returns a [jsAst.Expression] representing the given [type]. Type
-   * variables are replaced by placeholders in the ast.
+   * Compute a JavaScript expression that describes the necessary substitution
+   * for type arguments in a subtype test.
    *
-   * [firstPlaceholderIndex] is the index to use for the first placeholder.
-   * This is useful if the returned [jsAst.Expression] is only part of a
-   * larger template. By default, indexing starts with 0.
+   * The result can be:
+   *  1) `null`, if no substituted check is necessary, because the
+   *     type variables are the same or there are no type variables in the class
+   *     that is checked for.
+   *  2) A list expression describing the type arguments to be used in the
+   *     subtype check, if the type arguments to be used in the check do not
+   *     depend on the type arguments of the object.
+   *  3) A function mapping the type variables of the object to be checked to
+   *     a list expression.
    */
-  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;
-    jsAst.Expression representation = getTypeRepresentation(type, (variable) {
-      onVariable(variable);
-      return new jsAst.InterpolatedExpression(positions++);
-    });
-    return representation;
+  @override
+  jsAst.Expression getSubstitutionCode(Substitution substitution) {
+    jsAst.Expression declaration(TypeVariableType variable) {
+      return new jsAst.Parameter(getVariableName(variable.name));
+    }
+
+    jsAst.Expression use(TypeVariableType variable) {
+      return new jsAst.VariableUse(getVariableName(variable.name));
+    }
+
+    if (substitution.arguments.every((DartType type) => type.isDynamic)) {
+      return backend.emitter.emitter.generateFunctionThatReturnsNull();
+    } else {
+      jsAst.Expression value =
+          getSubstitutionRepresentation(substitution.arguments, use);
+      if (substitution.isFunction) {
+        Iterable<jsAst.Expression> formals =
+            substitution.parameters.map(declaration);
+        return js('function(#) { return # }', [formals, value]);
+      } else {
+        return js('function() { return # }', value);
+      }
+    }
   }
 
-  jsAst.Expression getTypeRepresentation(
-      DartType type,
-      OnVariableCallback onVariable,
-      [ShouldEncodeTypedefCallback shouldEncodeTypedef]) {
-    return representationGenerator.getTypeRepresentation(
-        type, onVariable, shouldEncodeTypedef);
+  @override
+  jsAst.Expression getSubstitutionCodeForVariable(Substitution substitution,
+                                                  int index) {
+    jsAst.Expression declaration(TypeVariableType variable) {
+      return new jsAst.Parameter(getVariableName(variable.name));
+    }
+
+    jsAst.Expression use(TypeVariableType variable) {
+      return new jsAst.VariableUse(getVariableName(variable.name));
+    }
+
+    if (substitution.arguments[index].isDynamic) {
+      return backend.emitter.emitter.generateFunctionThatReturnsNull();
+    } else {
+      jsAst.Expression value =
+          getTypeRepresentation(substitution.arguments[index], use);
+      Iterable<jsAst.Expression> formals =
+          substitution.parameters.map(declaration);
+      return js('function(#) { return # }', [formals, value]);
+    }
   }
 
+  String getVariableName(String name) {
+    return backend.namer.safeVariableName(name);
+  }
+
+  @override
+  jsAst.Name get getFunctionThatReturnsNullName
+      => backend.namer.internalGlobal('functionThatReturnsNull');
+
+  @override
+  String getTypeRepresentationForTypeConstant(DartType type) {
+    JavaScriptBackend backend = compiler.backend;
+    Namer namer = backend.namer;
+    if (type.isDynamic) return "dynamic";
+    String name = namer.uniqueNameForTypeConstantElement(type.element);
+    if (!type.element.isClass) return name;
+    InterfaceType interface = type;
+    List<DartType> variables = interface.element.typeVariables;
+    // Type constants can currently only be raw types, so there is no point
+    // adding ground-term type parameters, as they would just be 'dynamic'.
+    // TODO(sra): Since the result string is used only in constructing constant
+    // 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(', ');
+    return '$name<$arguments>';
+  }
+
+  @override
   bool isSimpleFunctionType(FunctionType type) {
     if (!type.returnType.isDynamic) return false;
     if (!type.optionalParameterTypes.isEmpty) return false;
@@ -587,33 +768,6 @@
     }
     return true;
   }
-
-  static bool hasTypeArguments(DartType type) {
-    if (type is InterfaceType) {
-      InterfaceType interfaceType = type;
-      return !interfaceType.treatAsRaw;
-    }
-    return false;
-  }
-
-  static int getTypeVariableIndex(TypeVariableElement variable) {
-    ClassElement classElement = variable.enclosingClass;
-    List<DartType> variables = classElement.typeVariables;
-    for (int index = 0; index < variables.length; index++) {
-      if (variables[index].element == variable) return index;
-    }
-    throw invariant(variable, false,
-                    message: "Couldn't find type-variable index");
-  }
-
-  /// Return all classes that are referenced in the type of the function, i.e.,
-  /// in the return type or the argument types.
-  Set<ClassElement> getReferencedClasses(FunctionType type) {
-    FunctionArgumentCollector collector =
-        new FunctionArgumentCollector(backend);
-    collector.collect(type);
-    return collector.classes;
-  }
 }
 
 class TypeRepresentationGenerator implements DartTypeVisitor {
@@ -745,7 +899,7 @@
 
   visitTypedefType(TypedefType type, _) {
     bool shouldEncode = shouldEncodeTypedef(type);
-    DartType unaliasedType = type.unalias(compiler.resolution);
+    DartType unaliasedType = type.unaliased;
     if (shouldEncode) {
       jsAst.ObjectInitializer initializer = unaliasedType.accept(this, null);
       // We have to encode the aliased type.
@@ -815,7 +969,7 @@
   }
 
   visitTypedefType(TypedefType type, bool isTypeArgument) {
-    type.unalias(backend.resolution).accept(this, isTypeArgument);
+    type.unaliased.accept(this, isTypeArgument);
   }
 
   visitInterfaceType(InterfaceType type, bool isTypeArgument) {
@@ -847,7 +1001,7 @@
   }
 
   visitTypedefType(TypedefType type, bool inFunctionType) {
-    type.unalias(backend.resolution).accept(this, inFunctionType);
+    type.unaliased.accept(this, inFunctionType);
   }
 
   visitInterfaceType(InterfaceType type, bool inFunctionType) {
@@ -883,52 +1037,6 @@
 
   Substitution.function(this.arguments, this.parameters)
       : isFunction = true;
-
-  jsAst.Expression getCode(RuntimeTypes rti) {
-    jsAst.Expression declaration(TypeVariableType variable) {
-      return new jsAst.Parameter(
-          rti.backend.namer.safeVariableName(variable.name));
-    }
-
-    jsAst.Expression use(TypeVariableType variable) {
-      return new jsAst.VariableUse(
-          rti.backend.namer.safeVariableName(variable.name));
-    }
-
-    if (arguments.every((DartType type) => type.isDynamic)) {
-      return rti.backend.emitter.emitter.generateFunctionThatReturnsNull();
-    } else {
-      jsAst.Expression value =
-          rti.getSubstitutionRepresentation(arguments, use);
-      if (isFunction) {
-        Iterable<jsAst.Expression> formals = parameters.map(declaration);
-        return js('function(#) { return # }', [formals, value]);
-      } else {
-        return js('function() { return # }', value);
-      }
-    }
-  }
-
-  jsAst.Expression getCodeForVariable(int index, RuntimeTypes rti) {
-    jsAst.Expression declaration(TypeVariableType variable) {
-      return new jsAst.Parameter(
-          rti.backend.namer.safeVariableName(variable.name));
-    }
-
-    jsAst.Expression use(TypeVariableType variable) {
-      return new jsAst.VariableUse(
-          rti.backend.namer.safeVariableName(variable.name));
-    }
-
-    if (arguments[index].isDynamic) {
-      return rti.backend.emitter.emitter.generateFunctionThatReturnsNull();
-    } else {
-      jsAst.Expression value =
-          rti.getTypeRepresentation(arguments[index], use);
-      Iterable<jsAst.Expression> formals = parameters.map(declaration);
-      return js('function(#) { return # }', [formals, value]);
-    }
-  }
 }
 
 /**
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 ec6eecf..2ebda27 100644
--- a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
+++ b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
@@ -56,7 +56,7 @@
         _backend.registerInstantiatedType(
             _typeVariableClass.rawType, enqueuer, registry);
         enqueuer.registerStaticUse(
-            _backend.registerBackendUse(_backend.getCreateRuntimeType()));
+            _backend.registerBackendUse(_backend.helpers.createRuntimeType));
         _seenClassesWithTypeVariables = true;
       }
     } else {
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 1ea0be0..cdd676b 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -167,7 +167,7 @@
             'noSuchMethodName': namer.noSuchMethodName,
             'createInvocationMirror':
                 backend.emitter.staticFunctionAccess(
-                    backend.getCreateInvocationMirror()),
+                    backend.helpers.createInvocationMirror),
             'methodName':
                 js.quoteName(compiler.enableMinification
                     ? internalName : methodName),
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 5a84ef2..cb03c3e 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
@@ -341,7 +341,7 @@
 
     String reflectionName = emitter.getReflectionName(classElement, className);
     if (reflectionName != null) {
-      if (!backend.isAccessibleByReflection(classElement)) {
+      if (!backend.isAccessibleByReflection(classElement) || cls.onlyForRti) {
         // TODO(herhut): Fix use of reflection name here.
         enclosingBuilder.addPropertyByName("+$reflectionName", js.number(0));
       } else {
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 62f5e81..473766a 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -13,52 +13,47 @@
     JsGetName;
 
 import '../headers.dart';
-
 import '../js_emitter.dart' hide Emitter;
 import '../js_emitter.dart' as js_emitter show Emitter;
-
 import '../model.dart';
 import '../program_builder/program_builder.dart';
 
 import '../../common.dart';
-
+import '../../common/names.dart' show
+    Names;
+import '../../compiler.dart' show
+    Compiler;
 import '../../constants/values.dart';
-
+import '../../dart_types.dart' show
+    DartType;
 import '../../deferred_load.dart' show OutputUnit;
-
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-
-import '../../diagnostics/messages.dart' show
-    MessageKind;
-
-import '../../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
-
 import '../../elements/elements.dart' show
+    ClassElement,
     ConstructorBodyElement,
+    Element,
+    Elements,
     ElementKind,
     FieldElement,
+    FunctionElement,
+    FunctionSignature,
+    LibraryElement,
+    MetadataAnnotation,
+    MethodElement,
+    MemberElement,
     Name,
     ParameterElement,
+    TypedefElement,
     TypeVariableElement,
-    MethodElement,
-    MemberElement;
-
+    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 '../../js/js.dart' as jsAst;
 import '../../js/js.dart' show js;
-
 import '../../js_backend/js_backend.dart' show
     CheckedModeHelper,
     CompoundName,
@@ -74,7 +69,10 @@
     TypeCheck,
     TypeChecks,
     TypeVariableHandler;
-
+import '../../universe/call_structure.dart' show
+    CallStructure;
+import '../../universe/selector.dart' show
+    Selector;
 import '../../util/characters.dart' show
     $$,
     $A,
@@ -83,10 +81,8 @@
     $Z,
     $a,
     $z;
-
 import '../../util/uri_extras.dart' show
     relativize;
-
 import '../../util/util.dart' show
     equalElements;
 
@@ -381,7 +377,7 @@
         return jsAst.js.expressionTemplateFor('#.substring($isPrefixLength)');
 
       case JsBuiltin.isFunctionType:
-        return backend.rti.representationGenerator.templateForIsFunctionType;
+        return backend.rtiEncoder.templateForIsFunctionType;
 
       case JsBuiltin.rawRtiToJsConstructorName:
         return jsAst.js.expressionTemplateFor("#.$typeNameProperty");
@@ -390,8 +386,7 @@
         return jsAst.js.expressionTemplateFor("#.constructor");
 
       case JsBuiltin.createFunctionTypeRti:
-        return backend.rti.representationGenerator
-            .templateForCreateFunctionType;
+        return backend.rtiEncoder.templateForCreateFunctionType;
 
       case JsBuiltin.isSubtype:
         // TODO(floitsch): move this closer to where is-check properties are
@@ -845,12 +840,12 @@
   jsAst.Statement buildFunctionThatReturnsNull() {
     return js.statement('#.# = function() {}',
                         [namer.isolateName,
-                         backend.rti.getFunctionThatReturnsNullName]);
+                         backend.rtiEncoder.getFunctionThatReturnsNullName]);
   }
 
   jsAst.Expression generateFunctionThatReturnsNull() {
     return js("#.#", [namer.isolateName,
-                      backend.rti.getFunctionThatReturnsNullName]);
+                      backend.rtiEncoder.getFunctionThatReturnsNullName]);
   }
 
   buildMain(jsAst.Statement invokeMain) {
@@ -892,7 +887,7 @@
     jsAst.Expression finishedClassesAccess =
         generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES);
     jsAst.Expression cyclicThrow =
-        staticFunctionAccess(backend.getCyclicThrowHelper());
+        staticFunctionAccess(backend.helpers.cyclicThrowHelper);
     jsAst.Expression laziesAccess =
         generateEmbeddedGlobalAccess(embeddedNames.LAZIES);
 
@@ -1017,7 +1012,7 @@
             'outputContainsConstantList': outputContainsConstantList,
             'makeConstListProperty': makeConstListProperty,
             'functionThatReturnsNullProperty':
-                backend.rti.getFunctionThatReturnsNullName,
+                backend.rtiEncoder.getFunctionThatReturnsNullName,
             'hasIncrementalSupport': compiler.hasIncrementalSupport,
             'lazyInitializerProperty': lazyInitializerProperty,});
   }
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 cf823c1..f14b9a3 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
@@ -162,7 +162,7 @@
     // Object class to catch noSuchMethod invocations.
     ClassElement objectClass = compiler.objectClass;
     jsAst.Expression createInvocationMirror = backend.emitter
-        .staticFunctionAccess(backend.getCreateInvocationMirror());
+        .staticFunctionAccess(backend.helpers.createInvocationMirror);
     if (useDiffEncoding) {
       statements.add(js.statement('''{
           var objectClassObject = processedClasses.collected[#objectClass],
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 309e121..e256e7b 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
@@ -127,6 +127,8 @@
      'finishedClassesAccess': finishedClassesAccess,
      'needsMixinSupport': emitter.needsMixinSupport,
      'needsNativeSupport': program.needsNativeSupport,
+     'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop,
+     'jsInteropBoostrap':backend.jsInteropAnalysis.buildJsInteropBootstrap(),
      'isInterceptorClass': namer.operatorIs(backend.jsInterceptorClass),
      'isObject' : namer.operatorIs(compiler.objectClass),
      'specProperty': js.string(namer.nativeSpecProperty),
@@ -142,7 +144,6 @@
      'nativeInfoHandler': nativeInfoHandler,
      'operatorIsPrefix' : js.string(namer.operatorIsPrefix),
      'deferredActionString': js.string(namer.deferredAction)};
-
    String skeleton = '''
 function $setupProgramName(programData, typesOffset) {
   "use strict";
@@ -754,6 +755,9 @@
       }
     }
 
+    if (#enabledJsInterop) {
+      #jsInteropBoostrap
+    }
     #tearOffCode;
   }
 
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 1da1a03..886d3ed 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -140,10 +140,14 @@
 
     if (hasNative) {
       statements.add(js.statement(r'''{
-          if (typeof receiver != "object") return receiver;
+          if (typeof receiver != "object") {
+              if (typeof receiver == "function" ) return #;
+              return receiver;
+          }
           if (receiver instanceof #) return receiver;
           return #(receiver);
       }''', [
+          interceptorFor(backend.jsJavaScriptFunctionClass),
           backend.emitter.constructorAccess(compiler.objectClass),
           backend.emitter
               .staticFunctionAccess(backend.getNativeInterceptorMethod)]));
diff --git a/pkg/compiler/lib/src/js_emitter/js_emitter.dart b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
index 4289e7c..540aad6 100644
--- a/pkg/compiler/lib/src/js_emitter/js_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
@@ -4,42 +4,50 @@
 
 library dart2js.js_emitter;
 
-import '../common.dart';
+import 'package:js_ast/src/precedence.dart' as js_precedence;
+import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
+import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
 
+
+import '../common.dart';
 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 '../dart_types.dart' show
-    TypedefType;
-
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
-
+    DartType,
+    FunctionType,
+    InterfaceType,
+    TypedefType,
+    Types,
+    TypeVariableType;
+import '../deferred_load.dart' show
+    OutputUnit;
 import '../elements/elements.dart' show
+    ClassElement,
     ConstructorBodyElement,
+    Element,
+    Elements,
     ElementKind,
     FieldElement,
-    ParameterElement,
-    TypeVariableElement,
+    FunctionElement,
+    FunctionSignature,
+    MetadataAnnotation,
     MethodElement,
-    MemberElement;
-
+    MemberElement,
+    MixinApplicationElement,
+    ParameterElement,
+    TypeVariableElement;
 import '../js/js.dart' as jsAst;
 import '../js/js.dart' show js;
-
-import 'package:js_ast/src/precedence.dart' as js_precedence;
-
 import '../js_backend/js_backend.dart' show
     CheckedModeHelper,
     CompoundName,
@@ -50,32 +58,28 @@
     JavaScriptConstantCompiler,
     Namer,
     RuntimeTypes,
+    RuntimeTypesEncoder,
     SetterName,
     Substitution,
     TypeCheck,
     TypeChecks,
     TypeVariableHandler;
-
-import 'model.dart';
-import 'program_builder/program_builder.dart';
-
-import 'full_emitter/emitter.dart' as full_js_emitter;
-import 'lazy_emitter/emitter.dart' as lazy_js_emitter;
-import 'startup_emitter/emitter.dart' as startup_js_emitter;
-
+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 '../deferred_load.dart' show
-    OutputUnit;
 
-import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
-import 'package:js_runtime/shared/embedded_names.dart' show JsBuiltin;
-
-import '../native/native.dart' as native;
+import 'full_emitter/emitter.dart' as full_js_emitter;
+import 'lazy_emitter/emitter.dart' as lazy_js_emitter;
+import 'model.dart';
+import 'program_builder/program_builder.dart';
+import 'startup_emitter/emitter.dart' as startup_js_emitter;
 
 part 'class_stub_generator.dart';
 part 'code_emitter_task.dart';
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
index 2c2f303..6a325ff 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
@@ -9,28 +9,30 @@
     METADATA,
     TYPES;
 
-import '../program_builder/program_builder.dart' show ProgramBuilder;
-import '../model.dart';
-import 'model_emitter.dart';
 import '../../common.dart';
-import '../../elements/elements.dart' show FieldElement;
+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_emitter.dart' show
     NativeEmitter;
-
 import '../js_emitter.dart' as emitterTask show
     Emitter;
+import '../model.dart';
+import '../program_builder/program_builder.dart' show
+    ProgramBuilder;
 
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-
-import '../../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
+import 'model_emitter.dart';
 
 class Emitter implements emitterTask.Emitter {
   final Compiler _compiler;
@@ -155,7 +157,7 @@
         return js.js.expressionTemplateFor('#.substring($isPrefixLength)');
 
       case JsBuiltin.isFunctionType:
-        return _backend.rti.representationGenerator.templateForIsFunctionType;
+        return _backend.rtiEncoder.templateForIsFunctionType;
 
       case JsBuiltin.rawRtiToJsConstructorName:
         return js.js.expressionTemplateFor("#.$typeNameProperty");
@@ -164,8 +166,7 @@
         return js.js.expressionTemplateFor("#.constructor");
 
       case JsBuiltin.createFunctionTypeRti:
-        return _backend.rti.representationGenerator
-            .templateForCreateFunctionType;
+        return _backend.rtiEncoder.templateForCreateFunctionType;
 
       case JsBuiltin.isSubtype:
         // TODO(floitsch): move this closer to where is-check properties are
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 3982bf8..0545b57 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
@@ -213,7 +213,8 @@
                 'callName': js.string(namer.callNameField)}),
 
        'cyclicThrow':
-           backend.emitter.staticFunctionAccess(backend.getCyclicThrowHelper()),
+           backend.emitter.staticFunctionAccess(
+               backend.helpers.cyclicThrowHelper),
        'outputContainsConstantList': program.outputContainsConstantList,
        'embeddedGlobals': emitEmbeddedGlobals(program),
        'readMetadataTypeFunction': readMetadataTypeFunction,
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index e0a9b03..43aa528 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
@@ -243,7 +243,7 @@
 
   jsAst.Expression _computeTypeRepresentation(DartType type,
                                               {ignoreTypeVariables: false}) {
-    jsAst.Expression representation = _backend.rti.getTypeRepresentation(
+    jsAst.Expression representation = _backend.rtiEncoder.getTypeRepresentation(
         type,
         (variable) {
           if (ignoreTypeVariables) return new jsAst.LiteralNull();
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 15a1271..29ad8ae 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -4,16 +4,22 @@
 
 library dart2js.new_js_emitter.model;
 
-import '../js/js.dart' as js show Expression, Statement, Name, Literal,
+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 'js_emitter.dart' show MetadataCollector;
 
-import '../common.dart';
-
 class Program {
   final List<Fragment> fragments;
   final List<Holder> holders;
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index df8778df..9f87335 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -134,8 +134,9 @@
       } else if (extensionPoints.containsKey(cls)) {
         needed = true;
       }
-      if (cls.isNative &&
-          native.nativeTagsForcedNonLeaf(classElement)) {
+      if (classElement.isJsInterop) {
+        needed = true;  // TODO(jacobr): we don't need all interop classes.
+      } else if (cls.isNative && native.nativeTagsForcedNonLeaf(classElement)) {
         needed = true;
         nonLeafClasses.add(cls);
       }
@@ -154,6 +155,7 @@
 
     for (Class cls in classes) {
       if (!cls.isNative) continue;
+      if (cls.element.isJsInterop) continue;
       List<String> nativeTags = native.nativeTagsOfClass(cls.element);
 
       if (nonLeafClasses.contains(cls) ||
@@ -268,7 +270,7 @@
       // parameter that was not provided for this stub.
       for (jsAst.Parameter stubParameter in stubParameters) {
         if (stubParameter.name == name) {
-          DartType type = parameter.type.unalias(compiler.resolution);
+          DartType type = parameter.type.unaliased;
           if (type is FunctionType) {
             // The parameter type is a function type either directly or through
             // typedef(s).
@@ -294,7 +296,7 @@
     // The target JS function may check arguments.length so we need to
     // make sure not to pass any unspecified optional arguments to it.
     // For example, for the following Dart method:
-    //   foo([x, y, z]);
+    //   foo({x, y, z});
     // The call:
     //   foo(y: 1)
     // must be turned into a JS call to:
@@ -319,9 +321,20 @@
     } else {
       // Native methods that are not intercepted must be static.
       assert(invariant(member, member.isStatic));
-      receiver = js('this');
       arguments = argumentsBuffer.sublist(0,
           indexOfLastOptionalArgumentInParameters + 1);
+      if (member.isJsInterop) {
+        // fixedBackendPath is allowed to have the form foo.bar.baz for
+        // interop. This template is uncached to avoid possibly running out of
+        // memory when Dart2Js is run in server mode. In reality the risk of
+        // 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([]);
+      } else {
+        receiver = js('this');
+      }
     }
     statements.add(
         js.statement('return #.#(#)', [receiver, target, arguments]));
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 54e15f9..01d3f3846 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,34 +4,59 @@
 
 library dart2js.js_emitter.program_builder;
 
-import '../js_emitter.dart' show computeMixinClass, Emitter;
-import '../model.dart';
-
-import '../../common.dart';
-import '../../closure.dart' show ClosureFieldElement;
-import '../../js/js.dart' as js;
-
-import '../../js_backend/js_backend.dart' show
-    Namer,
-    JavaScriptBackend,
-    JavaScriptConstantCompiler;
-
 import '../js_emitter.dart' show
     ClassStubGenerator,
     CodeEmitterTask,
+    computeMixinClass,
+    Emitter,
     InterceptorStubGenerator,
     MainCallStubGenerator,
     ParameterStubGenerator,
     RuntimeTypeGenerator,
     TypeTestProperties;
+import '../model.dart';
 
+import '../../common.dart';
+import '../../common/names.dart' show
+    Names;
+import '../../compiler.dart' show
+    Compiler;
+import '../../constants/values.dart' show
+    ConstantValue,
+    InterceptorConstantValue;
+import '../../closure.dart' show
+    ClosureFieldElement;
+import '../../dart_types.dart' show
+    DartType;
 import '../../elements/elements.dart' show
+    ClassElement,
+    Element,
+    Elements,
     FieldElement,
+    FunctionElement,
+    FunctionSignature,
+    LibraryElement,
     MethodElement,
-    ParameterElement;
-
-import '../../universe/universe.dart' show Universe, SelectorConstraints;
-import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit;
+    Name,
+    ParameterElement,
+    TypedefElement,
+    VariableElement;
+import '../../js/js.dart' as js;
+import '../../js_backend/js_backend.dart' show
+    Namer,
+    JavaScriptBackend,
+    JavaScriptConstantCompiler,
+    StringBackedName;
+import '../../universe/call_structure.dart' show
+    CallStructure;
+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';
@@ -142,6 +167,8 @@
         nativeClasses, interceptorClassesNeededByConstants,
         classesModifiedByEmitRTISupport);
 
+    _addJsInteropStubs(_registry.mainLibrariesMap);
+
     MainFragment mainFragment = _buildMainFragment(_registry.mainLibrariesMap);
     Iterable<Fragment> deferredFragments =
         _registry.deferredLibrariesMap.map(_buildDeferredFragment);
@@ -319,6 +346,99 @@
     return libraries;
   }
 
+  void _addJsInteropStubs(LibrariesMap librariesMap) {
+    if (_classes.containsKey(_compiler.objectClass)) {
+      var toStringInvocation = namer.invocationName(new Selector.call(
+          new Name("toString", _compiler.objectClass.library),
+          CallStructure.NO_ARGS));
+      // TODO(jacobr): register toString as used so that it is always accessible
+      // from JavaScript.
+      _classes[_compiler.objectClass].callStubs.add(_buildStubMethod(
+          new StringBackedName("toString"),
+          js.js('function() { return this.#(this) }', toStringInvocation)));
+    }
+
+    // We add all members from classes marked with isJsInterop to the base
+    // Interceptor class with implementations that directly call the
+    // corresponding JavaScript member. We do not attempt to bind this when
+    // tearing off JavaScript methods as we cannot distinguish between calling
+    // a regular getter that returns a JavaScript function and tearing off
+    // a method in the case where there exist multiple JavaScript classes
+    // that conflict on whether the member is a getter or a method.
+    var interceptorClass = _classes[backend.jsJavaScriptObjectClass];
+    var stubNames = new Set<String>();
+    librariesMap.forEach((LibraryElement library, List<Element> elements) {
+      for (Element e in elements) {
+        if (e is ClassElement && e.isJsInterop) {
+          e.declaration.forEachMember((_, Element member) {
+            if (!member.isInstanceMember) return;
+            if (member.isGetter || member.isField || member.isFunction) {
+              var selectors =
+                  _compiler.codegenWorld.getterInvocationsByName(member.name);
+              if (selectors != null && !selectors.isEmpty) {
+                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]),
+                        element: member));
+                  }
+                }
+              }
+            }
+
+            if (member.isSetter || (member.isField && !member.isConst)) {
+              var selectors =
+                  _compiler.codegenWorld.setterInvocationsByName(member.name);
+              if (selectors != null && !selectors.isEmpty) {
+                var stubName = namer.setterForElement(member);
+                if (stubNames.add(stubName.key)) {
+                  interceptorClass.callStubs.add(_buildStubMethod(
+                      stubName,
+                      js.js('function(obj, v) { return obj.# = v }',
+                          [member.name]),
+                      element: member));
+                }
+              }
+            }
+
+            if (member.isFunction) {
+              var selectors =
+                  _compiler.codegenWorld.invocationsByName(member.name);
+              FunctionElement fn = member;
+              // Named arguments are not yet supported. In the future we
+              // may want to map named arguments to an object literal containing
+              // all named arguments.
+              if (selectors != null && !selectors.isEmpty) {
+                for (var selector in selectors.keys) {
+                  // Check whether the arity matches this member.
+                  var argumentCount = selector.argumentCount;
+                  if (argumentCount > fn.parameters.length) break;
+                  if (argumentCount < fn.parameters.length &&
+                      !fn.parameters[argumentCount].isOptional) break;
+                  var stubName = namer.invocationName(selector);
+                  if (!stubNames.add(stubName.key)) break;
+                  var candidateParameterNames =
+                      'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMOPQRSTUVWXYZ';
+                  var parameters = new List<String>.generate(argumentCount,
+                      (i) => candidateParameterNames[i]);
+
+                  interceptorClass.callStubs.add(_buildStubMethod(
+                      stubName,
+                      js.js('function(receiver, #) { return receiver.#(#) }',
+                          [parameters, member.name, parameters]),
+                      element: member));
+                }
+              }
+            }
+          });
+        }
+      }
+    });
+  }
+
   // Note that a library-element may have multiple [Library]s, if it is split
   // into multiple output units.
   Library _buildLibrary(LibraryElement library, List<Element> elements) {
@@ -366,6 +486,11 @@
 
   Class _buildClass(ClassElement element) {
     bool onlyForRti = collector.classesOnlyNeededForRti.contains(element);
+    if (element.isJsInterop) {
+      // TODO(jacobr): check whether the class has any active static fields
+      // if it does not we can suppress it completely.
+      onlyForRti = true;
+    }
 
     List<Method> methods = [];
     List<StubMethod> callStubs = <StubMethod>[];
@@ -446,28 +571,35 @@
             storeFunctionTypeInMetadata: _storeFunctionTypesInMetadata);
 
     List<StubMethod> checkedSetters = <StubMethod>[];
-    for (Field field in instanceFields) {
-      if (field.needsCheckedSetter) {
-        assert(!field.needsUncheckedSetter);
-        Element element = field.element;
-        js.Expression code = backend.generatedCode[element];
-        assert(code != null);
-        js.Name name = namer.deriveSetterName(field.accessorName);
-        checkedSetters.add(_buildStubMethod(name, code, element: element));
-      }
-    }
-
     List<StubMethod> isChecks = <StubMethod>[];
-    typeTests.properties.forEach((js.Name name, js.Node code) {
-      isChecks.add(_buildStubMethod(name, code));
-    });
+    if (element.isJsInterop) {
+      typeTests.properties.forEach((js.Name name, js.Node code) {
+        _classes[backend.jsInterceptorClass].isChecks.add(
+            _buildStubMethod(name, code));
+      });
+    } else {
+      for (Field field in instanceFields) {
+        if (field.needsCheckedSetter) {
+          assert(!field.needsUncheckedSetter);
+          Element element = field.element;
+          js.Expression code = backend.generatedCode[element];
+          assert(code != null);
+          js.Name name = namer.deriveSetterName(field.accessorName);
+          checkedSetters.add(_buildStubMethod(name, code, element: element));
+        }
+      }
+
+      typeTests.properties.forEach((js.Name name, js.Node code) {
+        isChecks.add(_buildStubMethod(name, code));
+      });
+    }
 
     js.Name name = namer.className(element);
     String holderName = namer.globalObjectFor(element);
     // TODO(floitsch): we shouldn't update the registry in the middle of
     // building a class.
     Holder holder = _registry.registerHolder(holderName);
-    bool isInstantiated =
+    bool isInstantiated = !element.isJsInterop &&
         _compiler.codegenWorld.directlyInstantiatedClasses.contains(element);
 
     Class result;
@@ -638,7 +770,7 @@
   js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) {
     if (type.containsTypeVariables) {
       js.Expression thisAccess = js.js(r'this.$receiver');
-      return backend.rti.getSignatureEncoding(type, thisAccess);
+      return backend.rtiEncoder.getSignatureEncoding(type, thisAccess);
     } else {
       return backend.emitter.metadataCollector
           .reifyTypeForOutputUnit(type, outputUnit);
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 233835b..8b20e2d 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -68,7 +68,7 @@
     /// native classes.
     /// TODO(herhut): Generate tests for native classes dynamically, as well.
     void generateIsTest(Element other) {
-      if (classElement.isNative ||
+      if (classElement.isJsInterop || classElement.isNative ||
           !classElement.isSubclassOf(other)) {
         result.properties[namer.operatorIs(other)] = js('1');
       }
@@ -78,9 +78,8 @@
                                        FunctionType type) {
       assert(method.isImplementation);
       jsAst.Expression thisAccess = new jsAst.This();
-      Node node = method.node;
       ClosureClassMap closureData =
-          compiler.closureToClassMapper.closureMappingCache[node];
+          compiler.closureToClassMapper.closureMappingCache[method.node];
       if (closureData != null) {
         ClosureFieldElement thisLocal =
             closureData.freeVariableMap[closureData.thisLocal];
@@ -94,8 +93,9 @@
         result.functionTypeIndex =
             emitterTask.metadataCollector.reifyType(type);
       } else {
-        RuntimeTypes rti = backend.rti;
-        jsAst.Expression encoding = rti.getSignatureEncoding(type, thisAccess);
+        RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder;
+        jsAst.Expression encoding =
+            rtiEncoder.getSignatureEncoding(type, thisAccess);
         jsAst.Name operatorSignature =
             namer.asName(namer.operatorSignature);
         result.properties[operatorSignature] = encoding;
@@ -105,10 +105,14 @@
     void generateSubstitution(ClassElement cls, {bool emitNull: false}) {
       if (cls.typeVariables.isEmpty) return;
       RuntimeTypes rti = backend.rti;
+      RuntimeTypesEncoder rtiEncoder = backend.rtiEncoder;
       jsAst.Expression expression;
       bool needsNativeCheck =
           emitterTask.nativeEmitter.requiresNativeIsCheck(cls);
-      expression = rti.getSupertypeSubstitution(classElement, cls);
+      Substitution substitution = rti.getSubstitution(classElement, cls);
+      if (substitution != null) {
+        expression = rtiEncoder.getSubstitutionCode(substitution);
+      }
       if (expression == null && (emitNull || needsNativeCheck)) {
         expression = new jsAst.LiteralNull();
       }
@@ -122,7 +126,8 @@
       generateIsTest(checkedClass);
       Substitution substitution = check.substitution;
       if (substitution != null) {
-        jsAst.Expression body = substitution.getCode(backend.rti);
+        jsAst.Expression body =
+            backend.rtiEncoder.getSubstitutionCode(substitution);
         result.properties[namer.substitutionName(checkedClass)] = body;
       }
     }
@@ -291,16 +296,16 @@
   StubMethod _generateTypeVariableReader(ClassElement cls,
                                          TypeVariableElement element) {
     jsAst.Name name = namer.nameForReadTypeVariable(element);
-    int index = RuntimeTypes.getTypeVariableIndex(element);
+    int index = element.index;
     jsAst.Expression computeTypeVariable;
 
     Substitution substitution =
-        backend.rti.computeSubstitution(
-            cls, element.typeDeclaration, alwaysGenerateFunction: true);
+        backend.rti.getSubstitution(cls, element.typeDeclaration);
     if (substitution != null) {
       computeTypeVariable =
           js(r'#.apply(null, this.$builtinTypeInfo)',
-             substitution.getCodeForVariable(index, backend.rti));
+                 backend.rtiEncoder.getSubstitutionCodeForVariable(
+                     substitution, index));
     } else {
       // TODO(ahe): These can be generated dynamically.
       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 ea0537a..7f8e845 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -10,28 +10,29 @@
     STATIC_FUNCTION_NAME_TO_CLOSURE,
     TYPES;
 
-import '../program_builder/program_builder.dart' show ProgramBuilder;
-import '../model.dart';
-import 'model_emitter.dart';
 import '../../common.dart';
-import '../../elements/elements.dart' show FieldElement;
+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_emitter.dart' show
     NativeEmitter;
-
 import '../js_emitter.dart' as emitterTask show
     Emitter;
+import '../program_builder/program_builder.dart' show ProgramBuilder;
+import '../model.dart';
 
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-
-import '../../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
+import 'model_emitter.dart';
 
 class Emitter implements emitterTask.Emitter {
   final Compiler _compiler;
@@ -152,7 +153,7 @@
         return js.js.expressionTemplateFor('#.substring($isPrefixLength)');
 
       case JsBuiltin.isFunctionType:
-        return _backend.rti.representationGenerator.templateForIsFunctionType;
+        return _backend.rtiEncoder.templateForIsFunctionType;
 
       case JsBuiltin.rawRtiToJsConstructorName:
         return js.js.expressionTemplateFor("#.$typeNameProperty");
@@ -161,8 +162,7 @@
         return js.js.expressionTemplateFor("#.constructor");
 
       case JsBuiltin.createFunctionTypeRti:
-        return _backend.rti.representationGenerator
-        .templateForCreateFunctionType;
+        return _backend.rtiEncoder.templateForCreateFunctionType;
 
       case JsBuiltin.isSubtype:
       // TODO(floitsch): move this closer to where is-check properties are
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 c01ab90..c8e6a75 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
@@ -444,7 +444,7 @@
         {'deferredInitializer': emitDeferredInitializerGlobal(program.loadMap),
          'typeNameProperty': js.string(ModelEmitter.typeNameProperty),
          'cyclicThrow': backend.emitter.staticFunctionAccess(
-                 backend.getCyclicThrowHelper()),
+                 backend.helpers.cyclicThrowHelper),
          'operatorIsPrefix': js.string(namer.operatorIsPrefix),
          'tearOffCode': new js.Block(buildTearOffCode(backend)),
          'embeddedTypes': generateEmbeddedGlobalAccess(TYPES),
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 ec8ac00..2a06960 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,43 +6,6 @@
 
 import 'dart:convert' show JsonEncoder;
 
-import '../../common.dart';
-
-import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
-import '../../compiler.dart' show Compiler;
-import '../../diagnostics/messages.dart' show
-    MessageKind;
-
-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 '../../js/js.dart' as js;
-import '../../js_backend/js_backend.dart' show
-    JavaScriptBackend,
-    Namer,
-    ConstantEmitter;
-
-import '../../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-
-import '../../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
-
-import '../../util/uri_extras.dart' show
-    relativize;
-
-import '../headers.dart';
-import '../js_emitter.dart' show NativeEmitter;
-
 import 'package:js_runtime/shared/embedded_names.dart' show
     CLASS_FIELDS_EXTRACTOR,
     CLASS_ID_EXTRACTOR,
@@ -66,7 +29,38 @@
     TYPE_TO_INTERCEPTOR_MAP,
     TYPES;
 
-import '../js_emitter.dart' show NativeGenerator, buildTearOffCode;
+import '../../common.dart';
+import '../../constants/values.dart' show
+    ConstantValue,
+    FunctionConstantValue;
+import '../../compiler.dart' show
+    Compiler;
+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 '../../js/js.dart' as js;
+import '../../js_backend/js_backend.dart' show
+    JavaScriptBackend,
+    Namer,
+    ConstantEmitter;
+import '../../util/uri_extras.dart' show
+    relativize;
+
+import '../headers.dart';
+import '../js_emitter.dart' show
+    NativeEmitter;
+
+import '../js_emitter.dart' show
+    buildTearOffCode,
+    NativeGenerator;
 import '../model.dart';
 
 part 'deferred_fragment_hash.dart';
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 241516b..5759b52 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -6,19 +6,13 @@
 
 import 'dart:async';
 
+import 'common.dart';
 import 'common/names.dart' show
     Uris;
 import 'common/tasks.dart' show
     CompilerTask;
 import 'compiler.dart' show
     Compiler;
-import 'diagnostics/diagnostic_listener.dart';
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/messages.dart' show
-    MessageKind;
-import 'diagnostics/spannable.dart' show
-    Spannable;
 import 'elements/elements.dart' show
     CompilationUnitElement,
     Element,
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
index 247e3f5..0e64cc3 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
@@ -6,17 +6,12 @@
 
 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     LibraryElementX;
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index 8a72eff..1928d10 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -4,6 +4,7 @@
 
 library dart2js.mirrors_used;
 
+import 'common.dart';
 import 'common/tasks.dart' show
     CompilerTask;
 import 'compile_time_constants.dart' show
@@ -21,12 +22,6 @@
     DartType,
     InterfaceType,
     TypeKind;
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/messages.dart' show
-    MessageKind;
-import 'diagnostics/spannable.dart' show
-    Spannable;
 import 'elements/elements.dart' show
     ClassElement,
     Element,
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index c742a7d..7dbab30 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -749,7 +749,8 @@
   /// Models the behavior of having intances of [type] escape from Dart code
   /// into native code.
   void _escape(DartType type, Resolution resolution) {
-    type = type.unalias(resolution);
+    type.computeUnaliased(resolution);
+    type = type.unaliased;
     if (type is FunctionType) {
       FunctionType functionType = type;
       // A function might be called from native code, passing us novel
@@ -765,7 +766,8 @@
   /// from native code.  We usually start the analysis by capturing a native
   /// method that has been used.
   void _capture(DartType type, Resolution resolution) {
-    type = type.unalias(resolution);
+    type.computeUnaliased(resolution);
+    type = type.unaliased;
     if (type is FunctionType) {
       FunctionType functionType = type;
       _capture(functionType.returnType, resolution);
@@ -780,7 +782,8 @@
   static dynamic _parseType(
       String typeString,
       Parsing parsing,
-      lookup(name), locationNodeOrElement) {
+      lookup(name),
+      locationNodeOrElement) {
     DiagnosticReporter reporter = parsing.reporter;
     if (typeString == '=Object') return SpecialType.JsObject;
     if (typeString == 'dynamic') {
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index 6b39359..42ceba2 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -544,6 +544,8 @@
   void processNativeClass(ClassElement classElement) {
     super.processNativeClass(classElement);
 
+    // Js Interop interfaces do not have tags.
+    if (classElement.isJsInterop) return;
     // Since we map from dispatch tags to classes, a dispatch tag must be used
     // on only one native class.
     for (String tag in nativeTagsOfClass(classElement)) {
diff --git a/pkg/compiler/lib/src/native/native.dart b/pkg/compiler/lib/src/native/native.dart
index c6bd3f1..994ff37 100644
--- a/pkg/compiler/lib/src/native/native.dart
+++ b/pkg/compiler/lib/src/native/native.dart
@@ -6,6 +6,7 @@
 
 import 'dart:collection' show Queue;
 
+import '../common.dart';
 import '../common/backend_api.dart' show
     ForeignResolver;
 import '../common/registry.dart' show
@@ -19,13 +20,6 @@
 import '../core_types.dart' show
     CoreTypes;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE,
-    Spannable;
 import '../enqueue.dart' show
     Enqueuer,
     ResolutionEnqueuer;
@@ -44,8 +38,6 @@
     Listener;
 import '../parser/element_listener.dart' show
     ElementListener;
-import '../parser/partial_elements.dart' show
-    PartialMetadataAnnotation;
 import '../ssa/ssa.dart';
 import '../tokens/token.dart' show
     BeginGroupToken,
diff --git a/pkg/compiler/lib/src/native/ssa.dart b/pkg/compiler/lib/src/native/ssa.dart
index a93338b..1dfa536 100644
--- a/pkg/compiler/lib/src/native/ssa.dart
+++ b/pkg/compiler/lib/src/native/ssa.dart
@@ -8,7 +8,7 @@
 
 void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
   Compiler compiler = builder.compiler;
-  FunctionElement element = builder.work.element;
+  FunctionElement element = builder.target;
   NativeEmitter nativeEmitter = builder.nativeEmitter;
   JavaScriptBackend backend = builder.backend;
   DiagnosticReporter reporter = compiler.reporter;
@@ -21,7 +21,7 @@
     HInstruction arity = builder.graph.addConstant(arityConstant, compiler);
     // TODO(ngeoffray): For static methods, we could pass a method with a
     // defined arity.
-    Element helper = backend.getClosureConverter();
+    Element helper = backend.helpers.closureConverter;
     builder.pushInvokeStatic(nativeBody, helper, [local, arity]);
     HInstruction closure = builder.pop();
     return closure;
@@ -61,7 +61,7 @@
       inputs.add(builder.localsHandler.readThis());
     }
     parameters.forEachParameter((ParameterElement parameter) {
-      DartType type = parameter.type.unalias(compiler.resolution);
+      DartType type = parameter.type.unaliased;
       HInstruction input = builder.localsHandler.readLocal(parameter);
       if (type is FunctionType) {
         // The parameter type is a function type either directly or through
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index 290b94f..a5da246 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -4,15 +4,10 @@
 
 library ordered_typeset;
 
+import 'common.dart';
 import 'compiler.dart' show
     Compiler;
 import 'dart_types.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/messages.dart' show
-    MessageKind;
 import 'elements/elements.dart' show
     ClassElement;
 import 'util/util.dart' show
diff --git a/pkg/compiler/lib/src/parser/diet_parser_task.dart b/pkg/compiler/lib/src/parser/diet_parser_task.dart
index ee65817..4ae413b 100644
--- a/pkg/compiler/lib/src/parser/diet_parser_task.dart
+++ b/pkg/compiler/lib/src/parser/diet_parser_task.dart
@@ -4,14 +4,13 @@
 
 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 '../diagnostics/invariant.dart' show
-    invariant;
 import '../tokens/token.dart' show
     Token;
 
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 4b97999..94da7df 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -4,10 +4,9 @@
 
 library dart2js.parser.element_listener;
 
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/messages.dart';
-import '../diagnostics/spannable.dart' show
-    Spannable;
+import '../common.dart';
+import '../diagnostics/messages.dart' show
+    MessageTemplate;
 import '../elements/elements.dart' show
     Element,
     LibraryElement,
diff --git a/pkg/compiler/lib/src/parser/listener.dart b/pkg/compiler/lib/src/parser/listener.dart
index ec8274d..6511abc 100644
--- a/pkg/compiler/lib/src/parser/listener.dart
+++ b/pkg/compiler/lib/src/parser/listener.dart
@@ -4,10 +4,9 @@
 
 library dart2js.parser.listener;
 
-import '../diagnostics/messages.dart';
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
+import '../common.dart';
+import '../diagnostics/messages.dart' show
+    MessageTemplate;
 import '../tokens/precedence_constants.dart' as Precedence show
     EOF_INFO,
     IDENTIFIER_INFO;
diff --git a/pkg/compiler/lib/src/parser/member_listener.dart b/pkg/compiler/lib/src/parser/member_listener.dart
index 4982d90..a6856b3 100644
--- a/pkg/compiler/lib/src/parser/member_listener.dart
+++ b/pkg/compiler/lib/src/parser/member_listener.dart
@@ -4,10 +4,7 @@
 
 library dart2js.parser.member_listener;
 
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/messages.dart' show
-    MessageKind;
+import '../common.dart';
 import '../elements/elements.dart' show
     Element,
     ElementKind,
@@ -21,8 +18,6 @@
 import '../tokens/token.dart' show
     Token;
 import '../tree/tree.dart';
-import '../util/util.dart' show
-    Link;
 
 import 'partial_elements.dart' show
     PartialConstructorElement,
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index 1344c5d..c6bd18a 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -4,11 +4,7 @@
 
 library dart2js.parser.node_listener;
 
-import '../diagnostics/diagnostic_listener.dart';
-import '../diagnostics/messages.dart';
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
+import '../common.dart';
 import '../elements/elements.dart' show
     CompilationUnitElement;
 import '../native/native.dart' as native;
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart
index 6ed2657..7adddb5 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -4,8 +4,7 @@
 
 library dart2js.parser;
 
-import '../diagnostics/messages.dart' show
-    MessageKind;
+import '../common.dart';
 import '../tokens/keyword.dart' show
     Keyword;
 import '../tokens/precedence.dart' show
diff --git a/pkg/compiler/lib/src/parser/parser_task.dart b/pkg/compiler/lib/src/parser/parser_task.dart
index 24429ad..0a84c12 100644
--- a/pkg/compiler/lib/src/parser/parser_task.dart
+++ b/pkg/compiler/lib/src/parser/parser_task.dart
@@ -4,12 +4,11 @@
 
 library dart2js.parser.task;
 
+import '../common.dart';
 import '../common/tasks.dart' show
     CompilerTask;
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/modelx.dart' show
     ElementX;
 import '../tokens/token.dart' show
diff --git a/pkg/compiler/lib/src/parser/partial_elements.dart b/pkg/compiler/lib/src/parser/partial_elements.dart
index b0a1b79..6e3e11c 100644
--- a/pkg/compiler/lib/src/parser/partial_elements.dart
+++ b/pkg/compiler/lib/src/parser/partial_elements.dart
@@ -4,15 +4,11 @@
 
 library dart2js.parser.partial_elements;
 
+import '../common.dart';
 import '../common/resolution.dart' show
     Parsing,
     Resolution;
 import '../dart_types.dart' show DynamicType;
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart';
 import '../elements/elements.dart' show
     CompilationUnitElement,
     ConstructorElement,
diff --git a/pkg/compiler/lib/src/parser/partial_parser.dart b/pkg/compiler/lib/src/parser/partial_parser.dart
index b0f5cd5..01de07c 100644
--- a/pkg/compiler/lib/src/parser/partial_parser.dart
+++ b/pkg/compiler/lib/src/parser/partial_parser.dart
@@ -4,8 +4,7 @@
 
 library dart2js.parser.partial;
 
-import '../diagnostics/messages.dart' show
-    MessageKind;
+import '../common.dart';
 import '../util/characters.dart' as Characters show
     $CLOSE_CURLY_BRACKET;
 import '../tokens/token.dart' show
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index fb5096b..a0ad4d9 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -118,15 +118,13 @@
 
 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 'diagnostics/diagnostic_listener.dart';
-import 'diagnostics/messages.dart' show
-    MessageKind;
 import 'elements/elements.dart';
 import 'elements/modelx.dart' show
     BaseFunctionElementX,
@@ -135,6 +133,8 @@
     LibraryElementX,
     MetadataAnnotationX,
     SetterElementX;
+import 'js_backend/js_backend.dart' show
+    JavaScriptBackend;
 import 'library_loader.dart' show
     LibraryLoader;
 import 'parser/listener.dart' show
@@ -306,6 +306,7 @@
         patch, MessageKind.PATCH_NON_EXISTING, {'name': patch.name});
     return;
   }
+
   if (!(origin.isClass ||
         origin.isConstructor ||
         origin.isFunction ||
@@ -370,6 +371,12 @@
       const NativeAnnotationHandler());
 }
 
+checkJsInteropAnnotation(Compiler compiler, element) {
+  EagerAnnotationHandler.checkAnnotation(compiler, element,
+      const JsInteropAnnotationHandler());
+}
+
+
 /// Abstract interface for pre-resolution detection of metadata.
 ///
 /// The detection is handled in two steps:
@@ -458,6 +465,39 @@
   }
 }
 
+/// Annotation handler for pre-resolution detection of `@Js(...)`
+/// annotations.
+class JsInteropAnnotationHandler implements EagerAnnotationHandler<bool> {
+  const JsInteropAnnotationHandler();
+
+  bool hasJsNameAnnotation(MetadataAnnotation annotation) =>
+      annotation.beginToken != null && annotation.beginToken.next.value == 'Js';
+
+  bool apply(Compiler compiler,
+             Element element,
+             MetadataAnnotation annotation) {
+    bool hasJsInterop = hasJsNameAnnotation(annotation);
+    if (hasJsInterop) {
+      element.markAsJsInterop();
+    }
+    // Due to semantics of apply in the baseclass we have to return null to
+    // indicate that no match was found.
+    return hasJsInterop ? true : null;
+  }
+
+  @override
+  void validate(Compiler compiler,
+                Element element,
+                MetadataAnnotation annotation,
+                ConstantValue constant) {
+    JavaScriptBackend backend = compiler.backend;
+    if (constant.getType(compiler.coreTypes).element !=
+        backend.jsAnnotationClass) {
+      compiler.reporter.internalError(annotation, 'Invalid @Js(...) annotation.');
+    }
+  }
+}
+
 /// Annotation handler for pre-resolution detection of `@patch` annotations.
 class PatchAnnotationHandler implements EagerAnnotationHandler<PatchVersion> {
   const PatchAnnotationHandler();
diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
index 9f1ce4b..c156e8f 100644
--- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
@@ -4,13 +4,10 @@
 
 library dart2js.resolution.class_hierarchy;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     BaseClassElementX,
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index b8f8784..125d4bf 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -4,6 +4,7 @@
 
 library dart2js.resolution.compute_members;
 
+import '../common.dart';
 import '../common/names.dart' show
     Identifiers;
 import '../common/resolution.dart' show
@@ -11,13 +12,6 @@
 import '../compiler.dart' show
     Compiler;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart' show
     ClassElement,
     Element,
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index 256be2d..76aa6fc 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library dart2js.resolution.constructors;
+
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../constants/constructors.dart' show
@@ -10,15 +12,6 @@
     RedirectingGenerativeConstantConstructor;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter,
-    DiagnosticMessage;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     ConstructorElementX,
@@ -130,9 +123,11 @@
       reporter.reportErrorMessage(
           init, MessageKind.INVALID_RECEIVER_IN_INITIALIZER);
     }
-    registry.useElement(init, target);
-    registry.registerStaticUse(target);
-    checkForDuplicateInitializers(target, init);
+    if (target != null) {
+      registry.useElement(init, target);
+      registry.registerStaticUse(target);
+      checkForDuplicateInitializers(target, init);
+    }
     // Resolve initializing value.
     ResolutionResult result = visitor.visitInStaticContext(
         init.arguments.head,
@@ -186,9 +181,10 @@
                                      call,
                                      className,
                                      constructorSelector);
-
-    registry.useElement(call, calledConstructor);
-    registry.registerStaticUse(calledConstructor);
+    if (calledConstructor != null) {
+      registry.useElement(call, calledConstructor);
+      registry.registerStaticUse(calledConstructor);
+    }
     if (isConst) {
       if (isValidAsConstant &&
           calledConstructor.isConst &&
@@ -235,8 +231,10 @@
                                        functionNode,
                                        className,
                                        constructorSelector);
-      registry.registerImplicitSuperCall(calledConstructor);
-      registry.registerStaticUse(calledConstructor);
+      if (calledConstructor != null) {
+        registry.registerImplicitSuperCall(calledConstructor);
+        registry.registerStaticUse(calledConstructor);
+      }
 
       if (isConst && isValidAsConstant) {
         return new ConstructedConstantExpression(
diff --git a/pkg/compiler/lib/src/resolution/enum_creator.dart b/pkg/compiler/lib/src/resolution/enum_creator.dart
index 127833d..f9913c2 100644
--- a/pkg/compiler/lib/src/resolution/enum_creator.dart
+++ b/pkg/compiler/lib/src/resolution/enum_creator.dart
@@ -4,11 +4,10 @@
 
 library dart2js.resolution.enum_creator;
 
+import '../common.dart';
 import '../core_types.dart' show
     CoreTypes;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
 import '../tokens/keyword.dart' show
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 2237a60..90f5365 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -4,6 +4,7 @@
 
 library dart2js.resolution.members;
 
+import '../common.dart';
 import '../common/names.dart' show
     Selectors;
 import '../compiler.dart' show
@@ -14,15 +15,6 @@
 import '../constants/values.dart';
 import '../core_types.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     ConstructorElementX,
@@ -3881,7 +3873,6 @@
               node.newToken, MessageKind.NON_CONST_BLOAT,
               {'name': compiler.symbolClass.name});
         }
-        registry.registerNewSymbol();
       }
     } else if (isMirrorsUsedConstant) {
       compiler.mirrorUsageAnalyzerTask.validate(node, registry.mapping);
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 51aa37c..b93c6e9 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -4,6 +4,7 @@
 
 library dart2js.resolution.registry;
 
+import '../common.dart';
 import '../common/backend_api.dart' show
     Backend,
     ForeignResolver;
@@ -11,19 +12,16 @@
     Feature,
     ListLiteralUse,
     MapLiteralUse,
-    ResolutionWorldImpact;
+    ResolutionImpact;
 import '../common/registry.dart' show
     Registry;
 import '../compiler.dart' show
     Compiler;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../enqueue.dart' show
     ResolutionEnqueuer;
 import '../elements/elements.dart';
-import '../helpers/helpers.dart';
 import '../tree/tree.dart';
 import '../util/util.dart' show
     Setlet;
@@ -43,7 +41,7 @@
     TreeElementMapping;
 
 // TODO(johnniwinther): Remove this.
-class EagerRegistry implements Registry {
+class EagerRegistry extends Registry {
   final Compiler compiler;
   final TreeElementMapping mapping;
 
@@ -55,19 +53,6 @@
   bool get isForResolution => true;
 
   @override
-  Iterable<Element> get otherDependencies => mapping.otherDependencies;
-
-  @override
-  void registerAssert(bool hasMessage) {
-    // TODO(johnniwinther): Do something here?
-  }
-
-  @override
-  void registerDependency(Element element) {
-    mapping.registerDependency(element);
-  }
-
-  @override
   void registerDynamicGetter(UniverseSelector selector) {
     world.registerDynamicGetter(selector);
   }
@@ -101,7 +86,7 @@
   String toString() => 'EagerRegistry for ${mapping.analyzedElement}';
 }
 
-class _ResolutionWorldImpact implements ResolutionWorldImpact {
+class _ResolutionWorldImpact implements ResolutionImpact {
   final Registry registry;
   // TODO(johnniwinther): Do we benefit from lazy initialization of the
   // [Setlet]s?
@@ -127,10 +112,12 @@
       : this.registry = new EagerRegistry(compiler, mapping);
 
   void registerDependency(Element element) {
+    assert(element != null);
     registry.registerDependency(element);
   }
 
   void registerDynamicGetter(UniverseSelector selector) {
+    assert(selector != null);
     if (_dynamicGetters == null) {
       _dynamicGetters = new Setlet<UniverseSelector>();
     }
@@ -144,6 +131,7 @@
   }
 
   void registerDynamicInvocation(UniverseSelector selector) {
+    assert(selector != null);
     if (_dynamicInvocations == null) {
       _dynamicInvocations = new Setlet<UniverseSelector>();
     }
@@ -157,6 +145,7 @@
   }
 
   void registerDynamicSetter(UniverseSelector selector) {
+    assert(selector != null);
     if (_dynamicSetters == null) {
       _dynamicSetters = new Setlet<UniverseSelector>();
     }
@@ -170,6 +159,7 @@
   }
 
   void registerInstantiatedType(InterfaceType type) {
+    assert(type != null);
     if (_instantiatedTypes == null) {
       _instantiatedTypes = new Setlet<InterfaceType>();
     }
@@ -183,6 +173,7 @@
   }
 
   void registerTypeLiteral(DartType type) {
+    assert(type != null);
     if (_typeLiterals == null) {
       _typeLiterals = new Setlet<DartType>();
     }
@@ -196,6 +187,7 @@
   }
 
   void registerRequiredType(DartType type) {
+    assert(type != null);
     if (_requiredTypes == null) {
       _requiredTypes = new Setlet<DartType>();
     }
@@ -209,6 +201,7 @@
   }
 
   void registerMapLiteral(MapLiteralUse mapLiteralUse) {
+    assert(mapLiteralUse != null);
     if (_mapLiterals == null) {
       _mapLiterals = new Setlet<MapLiteralUse>();
     }
@@ -222,6 +215,7 @@
   }
 
   void registerListLiteral(ListLiteralUse listLiteralUse) {
+    assert(listLiteralUse != null);
     if (_listLiterals == null) {
       _listLiterals = new Setlet<ListLiteralUse>();
     }
@@ -235,6 +229,7 @@
   }
 
   void registerStaticUse(Element element) {
+    assert(element != null);
     if (_staticUses == null) {
       _staticUses = new Setlet<Element>();
     }
@@ -247,6 +242,7 @@
   }
 
   void registerIsCheck(DartType type) {
+    assert(type != null);
     if (_isChecks == null) {
       _isChecks = new Setlet<DartType>();
     }
@@ -343,7 +339,7 @@
 /// related information in a [TreeElements] mapping and registers calls with
 /// [Backend], [World] and [Enqueuer].
 // TODO(johnniwinther): Split this into an interface and implementation class.
-class ResolutionRegistry implements Registry {
+class ResolutionRegistry extends Registry {
   final Compiler compiler;
   final TreeElementMapping mapping;
   final _ResolutionWorldImpact worldImpact;
@@ -668,10 +664,6 @@
     worldImpact.registerFeature(Feature.ABSTRACT_CLASS_INSTANTIATION);
   }
 
-  void registerNewSymbol() {
-    worldImpact.registerFeature(Feature.NEW_SYMBOL);
-  }
-
   void registerRequiredType(DartType type, Element enclosingElement) {
     worldImpact.registerRequiredType(type);
     mapping.addRequiredType(type);
@@ -710,18 +702,11 @@
     worldImpact.registerFeature(Feature.THROW_EXPRESSION);
   }
 
-  void registerDependency(Element element) {
-    mapping.registerDependency(element);
-  }
-
-  Setlet<Element> get otherDependencies => mapping.otherDependencies;
-
   void registerStaticInvocation(Element element) {
     // TODO(johnniwinther): Increase precision of [registerStaticUse] and
     // [registerDependency].
     if (element == null) return;
     registerStaticUse(element);
-    registerDependency(element);
   }
 
   void registerInstantiation(InterfaceType type) {
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 2f5a617..d0bae84 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -6,12 +6,13 @@
 
 import 'dart:collection' show Queue;
 
+import '../common.dart';
 import '../common/names.dart' show
     Identifiers;
 import '../common/resolution.dart' show
     Parsing,
     Resolution,
-    ResolutionWorldImpact;
+    ResolutionImpact;
 import '../common/tasks.dart' show
     CompilerTask,
     DeferredAction;
@@ -22,15 +23,6 @@
 import '../constants/values.dart' show
     ConstantValue;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     BaseClassElementX,
@@ -78,14 +70,14 @@
 
   Parsing get parsing => compiler.parsing;
 
-  ResolutionWorldImpact resolve(Element element) {
+  ResolutionImpact resolve(Element element) {
     return measure(() {
       if (Elements.isErroneous(element)) {
         // TODO(johnniwinther): Add a predicate for this.
         assert(invariant(element, element is! ErroneousElement,
             message: "Element $element expected to have parse errors."));
         _ensureTreeElements(element);
-        return const ResolutionWorldImpact();
+        return const ResolutionImpact();
       }
 
       WorldImpact processMetadata([WorldImpact result]) {
@@ -109,7 +101,7 @@
       if (element.isClass) {
         ClassElement cls = element;
         cls.ensureResolved(resolution);
-        return processMetadata(const ResolutionWorldImpact());
+        return processMetadata(const ResolutionImpact());
       } else if (element.isTypedef) {
         TypedefElement typdef = element;
         return processMetadata(resolveTypedef(typdef));
@@ -293,7 +285,7 @@
         assert(invariant(element, element.isConstructor,
             message: 'Non-constructor element $element '
                      'has already been analyzed.'));
-        return const ResolutionWorldImpact();
+        return const ResolutionImpact();
       }
       if (element.isSynthesized) {
         if (element.isGenerativeConstructor) {
@@ -313,7 +305,7 @@
         } else {
           assert(element.isDeferredLoaderGetter || element.isErroneous);
           _ensureTreeElements(element);
-          return const ResolutionWorldImpact();
+          return const ResolutionImpact();
         }
       } else {
         element.parseNode(resolution.parsing);
@@ -424,7 +416,7 @@
     InterfaceType targetType;
     List<Element> seen = new List<Element>();
     // Follow the chain of redirections and check for cycles.
-    while (target.isRedirectingFactory) {
+    while (target.isRedirectingFactory || target.isPatched) {
       if (target.internalEffectiveTarget != null) {
         // We found a constructor that already has been processed.
         targetType = target.effectiveTargetType;
@@ -435,7 +427,13 @@
         break;
       }
 
-      Element nextTarget = target.immediateRedirectionTarget;
+      Element nextTarget;
+      if (target.isPatched) {
+        nextTarget = target.patch;
+      } else {
+        nextTarget = target.immediateRedirectionTarget;
+      }
+
       if (seen.contains(nextTarget)) {
         reporter.reportErrorMessage(
             node, MessageKind.CYCLIC_REDIRECTING_FACTORY);
@@ -466,11 +464,13 @@
       TreeElements treeElements = factory.treeElements;
       assert(invariant(node, treeElements != null,
           message: 'No TreeElements cached for $factory.'));
-      FunctionExpression functionNode = factory.parseNode(parsing);
-      RedirectingFactoryBody redirectionNode = functionNode.body;
-      DartType factoryType = treeElements.getType(redirectionNode);
-      if (!factoryType.isDynamic) {
-        targetType = targetType.substByContext(factoryType);
+      if (!factory.isPatched) {
+        FunctionExpression functionNode = factory.parseNode(parsing);
+        RedirectingFactoryBody redirectionNode = functionNode.body;
+        DartType factoryType = treeElements.getType(redirectionNode);
+        if (!factoryType.isDynamic) {
+          targetType = targetType.substByContext(factoryType);
+        }
       }
       factory.effectiveTarget = target;
       factory.effectiveTargetType = targetType;
@@ -995,7 +995,7 @@
   }
 
   WorldImpact resolveTypedef(TypedefElementX element) {
-    if (element.isResolved) return const ResolutionWorldImpact();
+    if (element.isResolved) return const ResolutionImpact();
     compiler.world.allTypedefs.add(element);
     return _resolveTypeDeclaration(element, () {
       ResolutionRegistry registry = new ResolutionRegistry(
diff --git a/pkg/compiler/lib/src/resolution/resolution_common.dart b/pkg/compiler/lib/src/resolution/resolution_common.dart
index 1b0b6b5..e1e0d28 100644
--- a/pkg/compiler/lib/src/resolution/resolution_common.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_common.dart
@@ -4,19 +4,13 @@
 
 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 '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 
diff --git a/pkg/compiler/lib/src/resolution/secret_tree_element.dart b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
index 644f845..c4d2029 100644
--- a/pkg/compiler/lib/src/resolution/secret_tree_element.dart
+++ b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
@@ -18,8 +18,7 @@
  */
 library dart2js.resolution.secret_tree_element;
 
-import '../diagnostics/invariant.dart' show invariant;
-import '../diagnostics/spannable.dart' show Spannable;
+import '../common.dart';
 
 /// Interface for associating
 abstract class TreeElementMixin {
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor.dart b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
index f87664b..92db2c4 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
@@ -4,11 +4,9 @@
 
 library dart2js.semantics_visitor;
 
+import '../common.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
 import '../tree/tree.dart';
 import '../elements/elements.dart';
 import '../universe/call_structure.dart' show
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index 93297f6..479dca0 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -4,13 +4,9 @@
 
 library dart2js.semantics_visitor.resolver;
 
+import '../common.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/messages.dart' show
-    MessageKind;
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 import '../universe/call_structure.dart' show
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index a427db9..06c58de 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -4,10 +4,9 @@
 
 library dart2js.resolution.send_structure;
 
-import '../dart_types.dart';
-import '../diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
+import '../common.dart';
 import '../constants/expressions.dart';
+import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 import '../universe/call_structure.dart' show
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index 831aed0..41f3033 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -4,15 +4,10 @@
 
 library dart2js.resolution.signatures;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     ErroneousFieldElementX,
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
index ca76d2b..8d3071c 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -4,35 +4,26 @@
 
 library dart2js.resolution.tree_elements;
 
+import '../common.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/spannable.dart' show
-    Spannable;
 import '../elements/elements.dart';
 import '../types/types.dart' show
     TypeMask;
 import '../tree/tree.dart';
 import '../util/util.dart';
-import '../universe/call_structure.dart' show
-    CallStructure;
 import '../universe/selector.dart' show
     Selector;
-import '../universe/universe.dart' show
-    UniverseSelector;
 
-import 'secret_tree_element.dart' show getTreeElement, setTreeElement;
+import 'secret_tree_element.dart' show
+    getTreeElement,
+    setTreeElement;
 import 'send_structure.dart';
 
 abstract class TreeElements {
   AnalyzableElement get analyzedElement;
   Iterable<Node> get superUses;
 
-  /// Iterables of the dependencies that this [TreeElement] records of
-  /// [analyzedElement].
-  Iterable<Element> get allElements;
-
   /// The set of types that this TreeElement depends on.
   /// This includes instantiated types, types in is-checks and as-expressions
   /// and in checked mode the types of all type-annotations.
@@ -40,9 +31,6 @@
 
   void forEachConstantNode(f(Node n, ConstantExpression c));
 
-  /// A set of additional dependencies.  See [registerDependency] below.
-  Iterable<Element> get otherDependencies;
-
   Element operator[](Node node);
   Map<Node, DartType> get typesCache;
 
@@ -92,10 +80,6 @@
   /// Returns the type that the type literal [node] refers to.
   DartType getTypeLiteralType(Send node);
 
-  /// Register additional dependencies required by [analyzedElement].
-  /// For example, elements that are used by a backend.
-  void registerDependency(Element element);
-
   /// Register a dependency on [type].
   void addRequiredType(DartType type);
 
@@ -135,13 +119,11 @@
   Map<Node, DartType> _types;
   Map<Node, DartType> typesCache = <Node, DartType>{};
   Setlet<Node> _superUses;
-  Setlet<Element> _otherDependencies;
   Map<Node, ConstantExpression> _constants;
   Map<VariableElement, List<Node>> _potentiallyMutated;
   Map<Node, Map<VariableElement, List<Node>>> _potentiallyMutatedIn;
   Map<VariableElement, List<Node>> _potentiallyMutatedInClosure;
   Map<Node, Map<VariableElement, List<Node>>> _accessedByClosureIn;
-  Setlet<Element> _elements;
   Maplet<Send, SendStructure> _sendStructureMap;
   Setlet<DartType> _requiredTypes;
   bool containsTryStatement = false;
@@ -178,10 +160,6 @@
     //                  getTreeElement(node) == null,
     //                  message: '${getTreeElement(node)}; $element'));
 
-    if (_elements == null) {
-      _elements = new Setlet<Element>();
-    }
-    _elements.add(element);
     setTreeElement(node, element);
   }
 
@@ -318,18 +296,6 @@
     return getType(node);
   }
 
-  void registerDependency(Element element) {
-    if (element == null) return;
-    if (_otherDependencies == null) {
-      _otherDependencies = new Setlet<Element>();
-    }
-    _otherDependencies.add(element.implementation);
-  }
-
-  Iterable<Element> get otherDependencies {
-    return _otherDependencies != null ? _otherDependencies : const <Element>[];
-  }
-
   List<Node> getPotentialMutations(VariableElement element) {
     if (_potentiallyMutated == null) return const <Node>[];
     List<Node> mutations = _potentiallyMutated[element];
@@ -403,10 +369,6 @@
 
   String toString() => 'TreeElementMapping($analyzedElement)';
 
-  Iterable<Element> get allElements {
-    return _elements != null ? _elements : const <Element>[];
-  }
-
   void forEachConstantNode(f(Node n, ConstantExpression c)) {
     if (_constants != null) {
       _constants.forEach(f);
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart
index 0101625..3c6ab75 100644
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart
@@ -4,6 +4,7 @@
 
 library dart2js.resolution.types;
 
+import '../common.dart';
 import '../common/resolution.dart' show
     Resolution;
 import '../compiler.dart' show
@@ -11,11 +12,6 @@
 import '../dart_backend/dart_backend.dart' show
     DartBackend;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter,
-    DiagnosticMessage;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart' show
     AmbiguousElement,
     ClassElement,
diff --git a/pkg/compiler/lib/src/resolution/typedefs.dart b/pkg/compiler/lib/src/resolution/typedefs.dart
index 11f57c7..87acbd6 100644
--- a/pkg/compiler/lib/src/resolution/typedefs.dart
+++ b/pkg/compiler/lib/src/resolution/typedefs.dart
@@ -4,13 +4,10 @@
 
 library dart2js.resolution.typedefs;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/elements.dart' show
     FunctionSignature,
     TypedefElement,
@@ -53,7 +50,7 @@
     scope = new MethodScope(scope, element);
     signature.forEachParameter(addToScope);
 
-    element.alias = signature.type;
+    element.aliasCache = signature.type;
 
     void checkCyclicReference() {
       element.checkCyclicReference(resolution);
@@ -118,15 +115,15 @@
               MessageKind.CYCLIC_TYPEDEF,
               {'typedefName': element.name},
               element.name, element);
-        element.alias =
-            new MalformedType(erroneousElement, typedefElement.alias);
+        element.aliasCache =
+            new MalformedType(erroneousElement, typedefElement.aliasCache);
         element.hasBeenCheckedForCycles = true;
       }
     } else {
       seenTypedefs = seenTypedefs.prepend(typedefElement);
       seenTypedefsCount++;
       type.visitChildren(this, null);
-      typedefElement.alias.accept(this, null);
+      typedefElement.aliasCache.accept(this, null);
       seenTypedefs = seenTypedefs.tail;
       seenTypedefsCount--;
     }
diff --git a/pkg/compiler/lib/src/resolution/variables.dart b/pkg/compiler/lib/src/resolution/variables.dart
index 03d0fb8..e9d6b94 100644
--- a/pkg/compiler/lib/src/resolution/variables.dart
+++ b/pkg/compiler/lib/src/resolution/variables.dart
@@ -4,10 +4,9 @@
 
 library dart2js.resolution.variables;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/messages.dart' show
-    MessageKind;
 import '../elements/modelx.dart' show
     LocalVariableElementX,
     VariableList;
diff --git a/pkg/compiler/lib/src/serialization/element_serialization.dart b/pkg/compiler/lib/src/serialization/element_serialization.dart
index 71dffef..6e7f5d4 100644
--- a/pkg/compiler/lib/src/serialization/element_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/element_serialization.dart
@@ -4,11 +4,10 @@
 
 library dart2js.serialization.elements;
 
+import '../common.dart';
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../diagnostics/source_span.dart' show
-    SourceSpan;
 import '../elements/elements.dart';
 import 'constant_serialization.dart';
 import 'keys.dart';
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index a4719ed..86d27901 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -9,16 +9,13 @@
 
 library dart2js.serialization.modelz;
 
-import 'serialization.dart';
-import 'keys.dart';
+import '../common.dart';
 import '../common/resolution.dart' show
     Resolution;
 import '../compiler.dart'
     show Compiler;
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
-import '../diagnostics/source_span.dart'
-    show SourceSpan;
 import '../dart_types.dart';
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
@@ -41,6 +38,9 @@
     Link,
     LinkBuilder;
 
+import 'keys.dart';
+import 'serialization.dart';
+
 /// Compute a [Link] from an [Iterable].
 Link toLink(Iterable iterable) {
   LinkBuilder builder = new LinkBuilder();
@@ -137,6 +137,12 @@
   bool get isNative => false;
 
   @override
+  bool get isJsInterop => false;
+
+  @override
+  String get jsInteropName => null;
+
+  @override
   bool get isOperator => false;
 
   @override
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index bcf70e2..bb00a26 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -66,40 +66,23 @@
     return measure(() {
       Element element = work.element.implementation;
       return reporter.withCurrentElement(element, () {
-        HInstruction.idCounter = 0;
         SsaBuilder builder =
-            new SsaBuilder(
-                backend, work, emitter.nativeEmitter,
+            new SsaBuilder(work.element.implementation,
+                work.resolutionTree, work.compilationContext, work.registry,
+                backend, emitter.nativeEmitter,
                 sourceInformationFactory);
-        HGraph graph;
-        ElementKind kind = element.kind;
-        if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
-          graph = compileConstructor(builder, work);
-        } else if (kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY ||
-                   kind == ElementKind.FUNCTION ||
-                   kind == ElementKind.GETTER ||
-                   kind == ElementKind.SETTER) {
-          graph = builder.buildMethod(element);
-        } else if (kind == ElementKind.FIELD) {
-          if (element.isInstanceMember) {
-            assert(compiler.enableTypeAssertions);
-            graph = builder.buildCheckedSetter(element);
-          } else {
-            graph = builder.buildLazyInitializer(element);
-          }
-        } else {
-          reporter.internalError(element, 'Unexpected element kind $kind.');
-        }
-        assert(graph.isValid());
-        if (!identical(kind, ElementKind.FIELD)) {
+        HGraph graph = builder.build();
+
+        // Default arguments are handled elsewhere, but we must ensure
+        // that the default values are computed during codegen.
+        if (!identical(element.kind, ElementKind.FIELD)) {
           FunctionElement function = element;
           FunctionSignature signature = function.functionSignature;
           signature.forEachOptionalParameter((ParameterElement parameter) {
             // This ensures the default value will be computed.
             ConstantValue constant =
                 backend.constants.getConstantValueForVariable(parameter);
-            CodegenRegistry registry = work.registry;
-            registry.registerCompileTimeConstant(constant);
+            work.registry.registerCompileTimeConstant(constant);
           });
         }
         if (compiler.tracer.isEnabled) {
@@ -123,9 +106,6 @@
     });
   }
 
-  HGraph compileConstructor(SsaBuilder builder, CodegenWorkItem work) {
-    return builder.buildFactory(work.element);
-  }
 }
 
 /**
@@ -998,18 +978,44 @@
          NewBulkMixin,
          ErrorBulkMixin
     implements SemanticSendVisitor {
+
+  /// The element for which this SSA builder is being used.
+  final Element target;
+
+  /// Reference to resolved elements in [target]'s AST.
+  TreeElements elements;
+
+  /// Used to report information about inlining (which occurs while building the
+  /// SSA graph), when dump-info is enabled.
+  final InfoReporter infoReporter;
+
+  /// If not null, the builder will store in [context] data that is used later
+  /// during the optimization phases.
+  final JavaScriptItemCompilationContext context;
+
+  /// Registry used to enqueue work during codegen, may be null to avoid
+  /// enqueing any work.
+  // TODO(sigmund,johnniwinther): get rid of registry entirely. We should be
+  // able to return the impact as a result after building and avoid enqueing
+  // things here. Later the codegen task can decide whether to enqueue
+  // something. In the past this didn't matter as much because the SSA graph was
+  // used only for codegen, but currently we want to experiment using it for
+  // code-analysis too.
+  final CodegenRegistry registry;
   final Compiler compiler;
   final JavaScriptBackend backend;
   final ConstantSystem constantSystem;
-  final CodegenWorkItem work;
   final RuntimeTypes rti;
-  TreeElements elements;
+
   SourceInformationBuilder sourceInformationBuilder;
+
   bool inLazyInitializerExpression = false;
 
+  // TODO(sigmund): make all comments /// instead of /* */
   /* This field is used by the native handler. */
   final NativeEmitter nativeEmitter;
 
+  /// Holds the resulting SSA graph.
   final HGraph graph = new HGraph();
 
   /**
@@ -1089,30 +1095,29 @@
             element.asyncMarker == AsyncMarker.ASYNC);
   }
 
-  SsaBuilder(JavaScriptBackend backend,
-             CodegenWorkItem work,
-             this.nativeEmitter,
-             SourceInformationStrategy sourceInformationFactory)
+  // TODO(sigmund): make most args optional
+  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.work = work,
-      this.rti = backend.rti,
-      this.elements = work.resolutionTree {
-    graph.element = work.element;
-    localsHandler = new LocalsHandler(this, work.element, null);
-    sourceElementStack.add(work.element);
-    sourceInformationBuilder =
-        sourceInformationFactory.createBuilderForContext(
-            work.element.implementation);
+      this.rti = backend.rti {
+    assert(target.isImplementation);
+    graph.element = target;
+    localsHandler = new LocalsHandler(this, target, null);
+    sourceElementStack.add(target);
+    sourceInformationBuilder = sourceInformationFactory.createBuilderForContext(
+            target);
   }
 
+  BackendHelpers get helpers => backend.helpers;
+
+  RuntimeTypesEncoder get rtiEncoder => backend.rtiEncoder;
 
   DiagnosticReporter get reporter => compiler.reporter;
 
-  // TODO(johnniwinther): Avoid the need for this.
-  Resolution get resolution => compiler.resolution;
-
   @override
   SemanticSendVisitor get sendVisitor => this;
 
@@ -1126,8 +1131,6 @@
     node.accept(this);
   }
 
-  CodegenRegistry get registry => work.registry;
-
   /// Returns the current source element.
   ///
   /// The returned element is a declaration element.
@@ -1138,6 +1141,36 @@
   bool get _checkOrTrustTypes =>
       compiler.enableTypeAssertions || compiler.trustTypeAnnotations;
 
+  /// Build the graph for [target].
+  HGraph build() {
+    assert(invariant(target, target.isImplementation));
+    HInstruction.idCounter = 0;
+    ElementKind kind = target.kind;
+    // TODO(sigmund): remove `result` and return graph directly, need to ensure
+    // that it can never be null (see result in buildFactory for instance).
+    var result;
+    if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
+      result = buildFactory(target);
+    } else if (kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY ||
+               kind == ElementKind.FUNCTION ||
+               kind == ElementKind.GETTER ||
+               kind == ElementKind.SETTER) {
+      result = buildMethod(target);
+    } else if (kind == ElementKind.FIELD) {
+      if (target.isInstanceMember) {
+        assert(compiler.enableTypeAssertions);
+        result = buildCheckedSetter(target);
+      } else {
+        result = buildLazyInitializer(target);
+      }
+    } else {
+      reporter.internalError(target, 'Unexpected element kind $kind.');
+    }
+    assert(result.isValid());
+    return result;
+  }
+
+
   HBasicBlock addNewBlock() {
     HBasicBlock block = graph.addNewBlock();
     // If adding a new block during building of an expression, it is due to
@@ -1306,6 +1339,11 @@
     // enqueued.
     backend.registerStaticUse(element, compiler.enqueuer.codegen);
 
+    if (element.isJsInterop && !element.isFactoryConstructor) {
+      // We only inline factory JavaScript interop constructors.
+      return false;
+    }
+
     // Ensure that [element] is an implementation element.
     element = element.implementation;
 
@@ -1336,6 +1374,8 @@
         }
       }
 
+      if (element.isJsInterop) return false;
+
       // Don't inline operator== methods if the parameter can be null.
       if (element.name == '==') {
         if (element.enclosingClass != compiler.objectClass
@@ -1480,9 +1520,8 @@
 
     if (meetsHardConstraints() && heuristicSayGoodToGo()) {
       doInlining();
-      registry.registerInlining(
-          element,
-          compiler.currentElement);
+      infoReporter?.reportInlined(element,
+          inliningStack.isEmpty ? target : inliningStack.last.function);
       return true;
     }
 
@@ -1515,6 +1554,13 @@
     });
   }
 
+  /**
+   * Return null so it is simple to remove the optional parameters completely
+   * from interop methods to match JavaScript semantics for ommitted arguments.
+   */
+  HInstruction handleConstantForOptionalParameterJsInterop(Element parameter) =>
+      null;
+
   HInstruction handleConstantForOptionalParameter(Element parameter) {
     ConstantValue constantValue =
         backend.constants.getConstantValueForVariable(parameter);
@@ -1533,13 +1579,6 @@
     }
   }
 
-  /**
-   * Returns whether this builder is building code for [element].
-   */
-  bool isBuildingFor(Element element) {
-    return work.element == element;
-  }
-
   /// A stack of [DartType]s the have been seen during inlining of factory
   /// constructors.  These types are preserved in [HInvokeStatic]s and
   /// [HForeignNew]s inside the inline code and registered during code
@@ -1609,10 +1648,19 @@
     graph.calledInLoop = compiler.world.isCalledInLoop(functionElement);
     ast.FunctionExpression function = functionElement.node;
     assert(function != null);
-    assert(!function.modifiers.isExternal);
     assert(elements.getFunctionDefinition(function) != null);
     openFunction(functionElement, function);
     String name = functionElement.name;
+    if (functionElement.isJsInterop) {
+      push(invokeJsInteropFunction(functionElement, parameters.values.toList(),
+          sourceInformationBuilder.buildGeneric(function)));
+      var value = pop();
+      closeAndGotoExit(new HReturn(value,
+          sourceInformationBuilder.buildReturn(functionElement.node)));
+      return closeFunction();
+    }
+    assert(invariant(functionElement, !function.modifiers.isExternal));
+
     // If [functionElement] is `operator==` we explicitely add a null check at
     // the beginning of the method. This is to avoid having call sites do the
     // null check.
@@ -1680,10 +1728,10 @@
 
   HGraph buildLazyInitializer(VariableElement variable) {
     inLazyInitializerExpression = true;
-    ast.VariableDefinitions node = variable.node;
-    openFunction(variable, node);
     assert(invariant(variable, variable.initializer != null,
         message: "Non-constant variable $variable has no initializer."));
+    ast.VariableDefinitions node = variable.node;
+    openFunction(variable, node);
     visit(variable.initializer);
     HInstruction value = pop();
     value = potentiallyCheckOrTrustType(value, variable.type);
@@ -1817,6 +1865,7 @@
    */
   void visitInlinedFunction(FunctionElement function) {
     potentiallyCheckInlinedParameterTypes(function);
+
     if (function.isGenerativeConstructor) {
       buildFactory(function);
     } else {
@@ -2120,7 +2169,8 @@
     ClassElement classElement =
         functionElement.enclosingClass.implementation;
     bool isNativeUpgradeFactory =
-        Elements.isNativeOrExtendsNative(classElement);
+        Elements.isNativeOrExtendsNative(classElement)
+            && !classElement.isJsInterop;
     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
@@ -2240,7 +2290,7 @@
       bool isIndexedTypeArgumentGet(HInstruction instruction) {
         if (instruction is! HInvokeStatic) return false;
         HInvokeStatic invoke = instruction;
-        if (invoke.element != backend.getGetTypeArgumentByIndex()) {
+        if (invoke.element != helpers.getTypeArgumentByIndex) {
           return false;
         }
         HConstant index = invoke.inputs[1];
@@ -2487,7 +2537,7 @@
                                    DartType type,
                                    int kind) {
     if (type == null) return original;
-    type = type.unalias(resolution);
+    type = type.unaliased;
     assert(assertTypeInContext(type, original));
     if (type.isInterfaceType && !type.treatAsRaw) {
       TypeMask subtype = new TypeMask.subtype(type.element, compiler.world);
@@ -2523,7 +2573,7 @@
     assert(compiler.trustTypeAnnotations);
     assert(type != null);
     type = localsHandler.substInContext(type);
-    type = type.unalias(resolution);
+    type = type.unaliased;
     if (type.isDynamic) return original;
     if (!type.isInterfaceType) return original;
     // The type element is either a class or the void element.
@@ -2538,7 +2588,7 @@
     assert(type != null);
     type = localsHandler.substInContext(type);
     HInstruction other = buildTypeConversion(original, type, kind);
-    registry.registerIsCheck(type);
+    registry?.registerIsCheck(type);
     return other;
   }
 
@@ -2564,12 +2614,12 @@
         analyzeTypeArgument(localsHandler.substInContext(supertype));
     HInstruction messageInstruction =
         graph.addConstantString(new ast.DartString.literal(message), compiler);
-    Element element = backend.getAssertIsSubtype();
+    Element element = helpers.assertIsSubtype;
     var inputs = <HInstruction>[subtypeInstruction, supertypeInstruction,
                                 messageInstruction];
     HInstruction assertIsSubtype = new HInvokeStatic(
         element, inputs, subtypeInstruction.instructionType);
-    registry.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
+    registry?.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
     add(assertIsSubtype);
   }
 
@@ -2636,7 +2686,7 @@
       //     assertHelper(condition);
       //
       visit(node.condition);
-      pushInvokeStatic(node, backend.assertHelperMethod, [pop()]);
+      pushInvokeStatic(node, helpers.assertHelper, [pop()]);
       pop();
       return;
     }
@@ -2646,11 +2696,11 @@
     //
     void buildCondition() {
       visit(node.condition);
-      pushInvokeStatic(node, backend.assertTestMethod, [pop()]);
+      pushInvokeStatic(node, helpers.assertTest, [pop()]);
     }
     void fail() {
       visit(node.message);
-      pushInvokeStatic(node, backend.assertThrowMethod, [pop()]);
+      pushInvokeStatic(node, helpers.assertThrow, [pop()]);
       pop();
     }
     handleIf(node,
@@ -3184,7 +3234,7 @@
     // TODO(ahe): This should be registered in codegen, not here.
     // TODO(johnniwinther): Is [registerStaticUse] equivalent to
     // [addToWorkList]?
-    registry.registerStaticUse(callElement);
+    registry?.registerStaticUse(callElement);
 
     List<HInstruction> capturedVariables = <HInstruction>[];
     closureClassElement.closureFields.forEach((ClosureFieldElement field) {
@@ -3200,7 +3250,7 @@
         ..sourceInformation = sourceInformationBuilder.buildCreate(node));
 
     Element methodElement = nestedClosureData.closureElement;
-    registry.registerInstantiatedClosure(methodElement);
+    registry?.registerInstantiatedClosure(methodElement);
   }
 
   visitFunctionDeclaration(ast.FunctionDeclaration node) {
@@ -3393,7 +3443,7 @@
     HInstruction loadIdConstant = addConstantString(loadId);
     String uri = prefixElement.deferredImport.uri.toString();
     HInstruction uriConstant = addConstantString(uri);
-    Element helper = backend.getCheckDeferredIsLoaded();
+    Element helper = helpers.checkDeferredIsLoaded;
     pushInvokeStatic(location, helper, [loadIdConstant, uriConstant]);
     pop();
   }
@@ -3769,7 +3819,8 @@
         // 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(
-            rti.getTypeRepresentationWithPlaceholders(argument, (variable) {
+            rtiEncoder.getTypeRepresentationWithPlaceholders(
+                argument, (variable) {
               HInstruction runtimeType = addTypeVariableReference(variable);
               inputs.add(runtimeType);
             }, firstPlaceholderIndex: inputs.length));
@@ -3818,7 +3869,7 @@
   HInstruction buildIsNode(ast.Node node,
                            DartType type,
                            HInstruction expression) {
-    type = localsHandler.substInContext(type).unalias(resolution);
+    type = localsHandler.substInContext(type).unaliased;
     if (type.isFunctionType) {
       List arguments = [buildFunctionType(type), expression];
       pushInvokeDynamic(
@@ -3831,14 +3882,14 @@
       return new HIs.compound(type, expression, pop(), backend.boolType);
     } else if (type.isTypeVariable) {
       HInstruction runtimeType = addTypeVariableReference(type);
-      Element helper = backend.getCheckSubtypeOfRuntimeType();
+      Element helper = helpers.checkSubtypeOfRuntimeType;
       List<HInstruction> inputs = <HInstruction>[expression, runtimeType];
       pushInvokeStatic(null, helper, inputs, typeMask: backend.boolType);
       HInstruction call = pop();
       return new HIs.variable(type, expression, call, backend.boolType);
     } else if (RuntimeTypes.hasTypeArguments(type)) {
       ClassElement element = type.element;
-      Element helper = backend.getCheckSubtype();
+      Element helper = helpers.checkSubtype;
       HInstruction representations =
           buildTypeArgumentRepresentations(type);
       add(representations);
@@ -3930,7 +3981,9 @@
         arguments,
         element,
         compileArgument,
-        handleConstantForOptionalParameter);
+        element.isJsInterop ?
+            handleConstantForOptionalParameterJsInterop :
+            handleConstantForOptionalParameter);
   }
 
   void addGenericSendArgumentsToList(Link<ast.Node> link, List<HInstruction> list) {
@@ -4391,7 +4444,7 @@
           '"$name" does not handle closure with optional parameters.');
     }
 
-    registry.registerStaticUse(element);
+    registry?.registerStaticUse(element);
     push(new HForeignCode(
         js.js.expressionTemplateYielding(
             backend.emitter.staticFunctionAccess(element)),
@@ -4498,7 +4551,7 @@
       // class is _not_ the default implementation from [Object], in
       // case the [noSuchMethod] implementation calls
       // [JSInvocationMirror._invokeOn].
-      registry.registerSelectorUse(selector);
+      registry?.registerSelectorUse(selector);
     }
     String publicName = name;
     if (selector.isSetter) publicName += '=';
@@ -4508,7 +4561,7 @@
 
     js.Name internalName = backend.namer.invocationName(selector);
 
-    Element createInvocationMirror = backend.getCreateInvocationMirror();
+    Element createInvocationMirror = helpers.createInvocationMirror;
     var argumentsInstruction = buildLiteralList(arguments);
     add(argumentsInstruction);
 
@@ -4799,9 +4852,7 @@
     assert(sourceElement.isInstanceMember);
 
     HInstruction target = localsHandler.readThis();
-    HConstant index = graph.addConstantInt(
-        RuntimeTypes.getTypeVariableIndex(variable),
-        compiler);
+    HConstant index = graph.addConstantInt(variable.index, compiler);
 
     if (needsSubstitutionForTypeVariableAccess(cls)) {
       // TODO(ahe): Creating a string here is unfortunate. It is slow (due to
@@ -4811,14 +4862,14 @@
       HInstruction substitutionNameInstr = graph.addConstantStringFromName(
           substitutionName, compiler);
       pushInvokeStatic(null,
-                       backend.getGetRuntimeTypeArgument(),
+                       helpers.getRuntimeTypeArgument,
                        [target, substitutionNameInstr, index],
                        typeMask: backend.dynamicType,
                        sourceInformation: sourceInformation);
     } else {
       pushInvokeStatic(
           null,
-          backend.getGetTypeArgumentByIndex(),
+          helpers.getTypeArgumentByIndex,
           [target, index],
           typeMask: backend.dynamicType,
           sourceInformation: sourceInformation);
@@ -4879,9 +4930,9 @@
                // 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 [isBuildingFor] will
-               // always return true when seeing one.
-               (member.isField && !isBuildingFor(member))) {
+               // 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);
@@ -4916,7 +4967,7 @@
     List<HInstruction> inputs = <HInstruction>[];
 
     js.Expression template =
-        rti.getTypeRepresentationWithPlaceholders(argument, (variable) {
+        rtiEncoder.getTypeRepresentationWithPlaceholders(argument, (variable) {
             inputs.add(addTypeVariableReference(variable));
         });
 
@@ -4939,12 +4990,12 @@
       inputs.add(analyzeTypeArgument(argument));
     });
     // TODO(15489): Register at codegen.
-    registry.registerInstantiatedType(type);
+    registry?.registerInstantiatedType(type);
     return callSetRuntimeTypeInfo(type.element, inputs, newObject);
   }
 
   void copyRuntimeTypeInfo(HInstruction source, HInstruction target) {
-    Element copyHelper = backend.getCopyTypeArguments();
+    Element copyHelper = helpers.copyTypeArguments;
     pushInvokeStatic(null, copyHelper, [source, target],
         sourceInformation: target.sourceInformation);
     pop();
@@ -4961,7 +5012,7 @@
     add(typeInfo);
 
     // Set the runtime type information on the object.
-    Element typeInfoSetterElement = backend.getSetRuntimeTypeInfo();
+    Element typeInfoSetterElement = helpers.setRuntimeTypeInfo;
     pushInvokeStatic(
         null,
         typeInfoSetterElement,
@@ -5077,7 +5128,8 @@
 
     var inputs = <HInstruction>[];
     if (constructor.isGenerativeConstructor &&
-        Elements.isNativeOrExtendsNative(constructor.enclosingClass)) {
+        Elements.isNativeOrExtendsNative(constructor.enclosingClass) &&
+        !constructor.isJsInterop) {
       // Native class generative constructors take a pre-constructed object.
       inputs.add(graph.addConstantNull(compiler));
     }
@@ -5152,8 +5204,9 @@
       // Overwrite the element type, in case the allocation site has
       // been inlined.
       newInstance.instructionType = elementType;
-      JavaScriptItemCompilationContext context = work.compilationContext;
-      context.allocatedFixedLists.add(newInstance);
+      if (context != null) {
+        context.allocatedFixedLists.add(newInstance);
+      }
     }
 
     // The List constructor forwards to a Dart static method that does
@@ -5541,11 +5594,11 @@
     HInstruction value = analyzeTypeArgument(type,
         sourceInformation: sourceInformationBuilder.buildGet(node));
     pushInvokeStatic(node,
-                     backend.getRuntimeTypeToString(),
+                     helpers.runtimeTypeToString,
                      [value],
                      typeMask: backend.stringType);
     pushInvokeStatic(node,
-                     backend.getCreateRuntimeType(),
+                     helpers.createRuntimeType,
                      [pop()]);
   }
 
@@ -5588,17 +5641,17 @@
   }
 
   void generateRuntimeError(ast.Node node, String message) {
-    generateError(node, message, backend.getThrowRuntimeError());
+    generateError(node, message, helpers.throwRuntimeError);
   }
 
   void generateTypeError(ast.Node node, String message) {
-    generateError(node, message, backend.getThrowTypeError());
+    generateError(node, message, helpers.throwTypeError);
   }
 
   void generateAbstractClassInstantiationError(ast.Node node, String message) {
     generateError(node,
                   message,
-                  backend.getThrowAbstractClassInstantiationError());
+                  helpers.throwAbstractClassInstantiationError);
   }
 
   void generateThrowNoSuchMethod(ast.Node diagnosticNode,
@@ -5607,7 +5660,7 @@
                                   List<HInstruction> argumentValues,
                                   List<String> existingArguments,
                                   SourceInformation sourceInformation}) {
-    Element helper = backend.getThrowNoSuchMethod();
+    Element helper = helpers.throwNoSuchMethod;
     ConstantValue receiverConstant =
         constantSystem.createString(new ast.DartString.empty());
     HInstruction receiver = graph.addConstant(receiverConstant, compiler);
@@ -5698,7 +5751,7 @@
         ConstructedConstantValue symbol = getConstantForNode(node);
         StringConstantValue stringConstant = symbol.fields.values.single;
         String nameString = stringConstant.toDartString().slowToString();
-        registry.registerConstSymbol(nameString);
+        registry?.registerConstSymbol(nameString);
       }
     } else {
       handleNewSend(node);
@@ -5730,13 +5783,13 @@
       bool isLength = selector.isGetter
           && selector.name == "length";
       if (isLength || selector.isIndex) {
-        TypeMask type = new TypeMask.nonNullExact(
-            element.enclosingClass.declaration, compiler.world);
-        return type.satisfies(backend.jsIndexableClass, compiler.world);
+        return compiler.world.isSubtypeOf(
+            element.enclosingClass.declaration,
+            backend.jsIndexableClass);
       } else if (selector.isIndexSet) {
-        TypeMask type = new TypeMask.nonNullExact(
-            element.enclosingClass.declaration, compiler.world);
-        return type.satisfies(backend.jsMutableIndexableClass, compiler.world);
+        return compiler.world.isSubtypeOf(
+            element.enclosingClass.declaration,
+            backend.jsMutableIndexableClass);
       } else {
         return false;
       }
@@ -5793,6 +5846,96 @@
     }
   }
 
+  HForeignCode invokeJsInteropFunction(Element element,
+                                       List<HInstruction> arguments,
+                                       SourceInformation sourceInformation) {
+    assert(element.isJsInterop);
+    nativeEmitter.nativeMethods.add(element);
+    String templateString;
+
+    if (element.isFactoryConstructor) {
+      // Treat factory constructors as syntactic sugar for creating object
+      // literals.
+      ConstructorElement constructor = element;
+      FunctionSignature params = constructor.functionSignature;
+      int i = 0;
+      int positions = 0;
+      var filteredArguments = <HInstruction>[];
+      var parameterNameMap = new Map<String, js.Expression>();
+      params.orderedForEachParameter((ParameterElement parameter) {
+        // TODO(jacobr): throw if parameter names do not match names of property
+        // names in the class.
+        assert (parameter.isNamed);
+        if (!parameter.isNamed) {
+          reporter.reportErrorMessage(
+              parameter, MessageKind.GENERIC,
+              {'text': 'All arguments to external constructors of JavaScript '
+                       'interop classes must be named as these constructors '
+                       'are syntactic sugar for object literals.'});
+        }
+        HInstruction argument = arguments[i];
+        if (argument != null) {
+          filteredArguments.add(argument);
+          parameterNameMap[parameter.name] =
+              new js.InterpolatedExpression(positions++);
+        }
+        i++;
+      });
+      var codeTemplate = new js.Template(null,
+          js.objectLiteral(parameterNameMap));
+
+      var nativeBehavior = new native.NativeBehavior()
+        ..codeTemplate = codeTemplate;
+      return new HForeignCode(
+          codeTemplate,
+          backend.dynamicType, filteredArguments,
+          nativeBehavior: nativeBehavior)
+        ..sourceInformation = sourceInformation;
+    }
+    var target = new HForeignCode(js.js.parseForeignJS(
+            "${backend.namer.fixedBackendPath(element)}."
+            "${element.fixedBackendName}"),
+        backend.dynamicType,
+        <HInstruction>[]);
+    add(target);
+    // Strip off trailing arguments that were not specified.
+    // we could assert that the trailing arguments are all null.
+    // TODO(jacobr): rewrite named arguments to an object literal matching
+    // the factory constructor case.
+    arguments = arguments.where((arg) => arg != null).toList();
+    var inputs = <HInstruction>[target]..addAll(arguments);
+
+    js.Template codeTemplate;
+    if (element.isGetter) {
+      codeTemplate = js.js.parseForeignJS("#");
+    } else if (element.isSetter) {
+      codeTemplate = js.js.parseForeignJS("# = #");
+    } else {
+      var argsStub = <String>[];
+      for (int i = 0; i < arguments.length; i++) {
+        argsStub.add('#');
+      }
+      if (element.isConstructor) {
+        codeTemplate = js.js.parseForeignJS("new #(${argsStub.join(",")})");
+      } else {
+        codeTemplate = js.js.parseForeignJS("#(${argsStub.join(",")})");
+      }
+    }
+
+    var nativeBehavior = new native.NativeBehavior()
+      ..codeTemplate = codeTemplate
+      ..typesReturned.add(
+          backend.jsJavaScriptObjectClass.thisType)
+      ..typesInstantiated.add(
+          backend.jsJavaScriptObjectClass.thisType)
+      ..sideEffects.setAllSideEffects();
+    return new HForeignCode(
+        codeTemplate,
+        backend.dynamicType, inputs,
+        nativeBehavior: nativeBehavior)
+      ..sourceInformation = sourceInformation;
+  }
+
   void pushInvokeStatic(ast.Node location,
                         Element element,
                         List<HInstruction> arguments,
@@ -5811,16 +5954,22 @@
     }
     bool targetCanThrow = !compiler.world.getCannotThrow(element);
     // TODO(5346): Try to avoid the need for calling [declaration] before
-    // creating an [HInvokeStatic].
-    HInvokeStatic instruction = new HInvokeStatic(
-        element.declaration, arguments, typeMask,
-        targetCanThrow: targetCanThrow)
-            ..sourceInformation = sourceInformation;
-    if (!currentInlinedInstantiations.isEmpty) {
-      instruction.instantiatedTypes = new List<DartType>.from(
-          currentInlinedInstantiations);
+    var instruction;
+    if (element.isJsInterop) {
+      instruction = invokeJsInteropFunction(element, arguments,
+          sourceInformation);
+    } else {
+      // creating an [HInvokeStatic].
+      instruction = new HInvokeStatic(
+          element.declaration, arguments, typeMask,
+          targetCanThrow: targetCanThrow)
+        ..sourceInformation = sourceInformation;
+      if (!currentInlinedInstantiations.isEmpty) {
+        instruction.instantiatedTypes = new List<DartType>.from(
+            currentInlinedInstantiations);
+      }
+      instruction.sideEffects = compiler.world.getSideEffectsOfElement(element);
     }
-    instruction.sideEffects = compiler.world.getSideEffectsOfElement(element);
     if (location == null) {
       push(instruction);
     } else {
@@ -6878,7 +7027,7 @@
 
   void visitLiteralSymbol(ast.LiteralSymbol node) {
     stack.add(addConstant(node));
-    registry.registerConstSymbol(node.slowNameString);
+    registry?.registerConstSymbol(node.slowNameString);
   }
 
   void visitStringJuxtaposition(ast.StringJuxtaposition node) {
@@ -7100,7 +7249,7 @@
       arguments.add(analyzeTypeArgument(argument));
     }
     // TODO(15489): Register at codegen.
-    registry.registerInstantiatedType(type);
+    registry?.registerInstantiatedType(type);
     return callSetRuntimeTypeInfo(type.element, arguments, object);
   }
 
@@ -7215,7 +7364,7 @@
     visit(node.expression);
     HInstruction expression = pop();
     pushInvokeStatic(node,
-                     backend.getStreamIteratorConstructor(),
+                     helpers.streamIteratorConstructor,
                      [expression, graph.addConstantNull(compiler)]);
     streamIterator = pop();
 
@@ -7400,7 +7549,7 @@
       HInstruction length = buildGetLength();
       push(new HIdentity(length, originalLength, null, boolType));
       pushInvokeStatic(node,
-          backend.getCheckConcurrentModificationError(),
+          helpers.checkConcurrentModificationError,
           [pop(), array]);
       pop();
     }
@@ -7862,7 +8011,7 @@
 
     List<HStatementInformation> statements = <HStatementInformation>[];
     bool hasDefault = false;
-    Element getFallThroughErrorElement = backend.getFallThroughError();
+    Element getFallThroughErrorElement = helpers.fallThroughError;
     HasNextIterator<ast.Node> caseIterator =
         new HasNextIterator<ast.Node>(switchCases.iterator);
     while (caseIterator.hasNext) {
@@ -8108,7 +8257,7 @@
       HInstruction oldRethrowableException = rethrowableException;
       rethrowableException = exception;
 
-      pushInvokeStatic(node, backend.getExceptionUnwrapper(), [exception]);
+      pushInvokeStatic(node, helpers.exceptionUnwrapper, [exception]);
       HInvokeStatic unwrappedException = pop();
       tryInstruction.exception = exception;
       Link<ast.Node> link = node.catchBlocks.nodes;
@@ -8154,7 +8303,7 @@
         }
         ast.Node trace = catchBlock.trace;
         if (trace != null) {
-          pushInvokeStatic(trace, backend.getTraceFromException(), [exception]);
+          pushInvokeStatic(trace, helpers.traceFromException, [exception]);
           HInstruction traceInstruction = pop();
           LocalVariableElement traceVariable = elements[trace];
           localsHandler.updateLocal(traceVariable, traceInstruction);
@@ -8992,7 +9141,7 @@
   }
 
   void visitTypedefType(TypedefType type, SsaBuilder builder) {
-    DartType unaliased = type.unalias(builder.compiler.resolution);
+    DartType unaliased = type.unaliased;
     if (unaliased is TypedefType) throw 'unable to unalias $type';
     unaliased.accept(this, builder);
   }
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 7b7596e..1edaf6e 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1697,7 +1697,7 @@
 
     List<js.Expression> arguments = visitArguments(node.inputs, start: 0);
 
-    if (element == backend.getCheckConcurrentModificationError()) {
+    if (element == backend.helpers.checkConcurrentModificationError) {
       // Manually inline the [checkConcurrentModificationError] function.  This
       // function is only called from a for-loop update.  Ideally we would just
       // generate the conditionalcontrol flow in the builder but it adds basic
@@ -1705,7 +1705,7 @@
       // confuses loop recognition.
 
       assert(arguments.length == 2);
-      Element throwFunction = backend.getThrowConcurrentModificationError();
+      Element throwFunction = backend.helpers.throwConcurrentModificationError;
       registry.registerStaticInvocation(throwFunction);
 
       // Calling using `(0, #)(#)` instead of `#(#)` separates the property load
@@ -1755,8 +1755,11 @@
           // If the selector we need to register a typed getter to the
           // [world]. The emitter needs to know if it needs to emit a
           // bound closure for a method.
+
+          // If [superMethod] is mixed in, [superClass] might not be live.
+          // We use the superclass of the access instead.
           TypeMask receiverType =
-              new TypeMask.nonNullExact(superClass, compiler.world);
+              new TypeMask.nonNullExact(node.caller.superclass, compiler.world);
           // TODO(floitsch): we know the target. We shouldn't register a
           // dynamic getter.
           registry.registerDynamicGetter(
@@ -2262,7 +2265,7 @@
             .withSourceInformation(node.sourceInformation));
       }
     } else {
-      Element convertToString = backend.getStringInterpolationHelper();
+      Element convertToString = backend.helpers.stringInterpolationHelper;
       registry.registerStaticUse(convertToString);
       js.Expression jsHelper =
           backend.emitter.staticFunctionAccess(convertToString);
@@ -2827,7 +2830,7 @@
     use(node.inputs[0]);
     if (node.hasReceiver) {
       if (backend.isInterceptorClass(element.enclosingClass)) {
-        int index = RuntimeTypes.getTypeVariableIndex(element);
+        int index = element.index;
         js.Expression receiver = pop();
         js.Expression helper = backend.emitter
             .staticFunctionAccess(helperElement);
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index ed3f955..08f6987 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1312,7 +1312,7 @@
 
   HInstruction convertType(Compiler compiler, DartType type, int kind) {
     if (type == null) return this;
-    type = type.unalias(compiler.resolution);
+    type = type.unaliased;
     // Only the builder knows how to create [HTypeConversion]
     // instructions with generics. It has the generic type context
     // available.
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 741dd32..563b503 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -473,7 +473,7 @@
     bool canInline = true;
     signature.forEachParameter((ParameterElement element) {
       if (inputPosition++ < inputs.length && canInline) {
-        DartType type = element.type.unalias(compiler.resolution);
+        DartType type = element.type.unaliased;
         if (type is FunctionType) {
           canInline = false;
         }
@@ -905,7 +905,7 @@
 
   HInstruction visitInvokeStatic(HInvokeStatic node) {
     propagateConstantValueToUses(node);
-    if (node.element == backend.getCheckConcurrentModificationError()) {
+    if (node.element == backend.helpers.checkConcurrentModificationError) {
       if (node.inputs.length == 2) {
         HInstruction firstArgument = node.inputs[0];
         if (firstArgument is HConstant) {
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 3ab874f..5d56ba3 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -9,14 +9,13 @@
 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/resolution.dart' show
-    Resolution;
 import '../common/tasks.dart' show
     CompilerTask;
 import '../compiler.dart' show
@@ -26,14 +25,9 @@
 import '../constants/expressions.dart';
 import '../constants/values.dart';
 import '../dart_types.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/messages.dart';
-import '../diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE,
-    Spannable;
+import '../diagnostics/messages.dart' show
+    Message,
+    MessageTemplate;
 import '../elements/elements.dart';
 import '../elements/modelx.dart' show
     ConstructorBodyElementX,
@@ -41,6 +35,8 @@
     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,
@@ -68,6 +64,7 @@
 import '../world.dart' show
     ClassWorld,
     World;
+import '../dump_info.dart' show InfoReporter;
 
 part 'builder.dart';
 part 'codegen.dart';
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index a1e5e4d..841b0a2 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -4,11 +4,15 @@
 
 library ssa.tracer;
 
-import 'dart:async' show EventSink;
+import 'dart:async' show
+  EventSink;
 
 import 'ssa.dart';
-import '../compiler.dart' show Compiler;
-import '../diagnostics/invariant.dart' show DEBUG_MODE;
+import '../common.dart';
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/invariant.dart' show
+    DEBUG_MODE;
 import '../js_backend/js_backend.dart';
 import '../tracer.dart';
 
diff --git a/pkg/compiler/lib/src/string_validator.dart b/pkg/compiler/lib/src/string_validator.dart
index b790774..60f31dc 100644
--- a/pkg/compiler/lib/src/string_validator.dart
+++ b/pkg/compiler/lib/src/string_validator.dart
@@ -8,8 +8,7 @@
 
 import 'dart:collection';
 
-import 'diagnostics/diagnostic_listener.dart';
-import 'diagnostics/messages.dart' show MessageKind;
+import 'common.dart';
 import 'tokens/token.dart' show Token;
 import 'tree/tree.dart';
 import 'util/characters.dart';
diff --git a/pkg/compiler/lib/src/tokens/token.dart b/pkg/compiler/lib/src/tokens/token.dart
index e656f9e..4c33648 100644
--- a/pkg/compiler/lib/src/tokens/token.dart
+++ b/pkg/compiler/lib/src/tokens/token.dart
@@ -9,9 +9,7 @@
 import 'dart:collection' show
     HashSet;
 
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
+import '../common.dart';
 import '../util/util.dart' show
     computeHashCode;
 
diff --git a/pkg/compiler/lib/src/tree/tree.dart b/pkg/compiler/lib/src/tree/tree.dart
index d4331b5..8c65fab 100644
--- a/pkg/compiler/lib/src/tree/tree.dart
+++ b/pkg/compiler/lib/src/tree/tree.dart
@@ -6,9 +6,7 @@
 
 import 'dart:collection';
 
-import '../diagnostics/spannable.dart' show
-    Spannable,
-    SpannableAssertionFailure;
+import '../common.dart';
 import '../tokens/precedence_constants.dart' as Precedence show
     FUNCTION_INFO;
 import '../tokens/token.dart' show
@@ -21,10 +19,12 @@
 import '../util/util.dart';
 import '../util/characters.dart';
 
-import '../resolution/secret_tree_element.dart'
-    show StoredTreeElementMixin, NullTreeElementMixin;
+import '../resolution/secret_tree_element.dart' show
+    NullTreeElementMixin,
+    StoredTreeElementMixin;
 
-import '../elements/elements.dart' show MetadataAnnotation;
+import '../elements/elements.dart' show
+    MetadataAnnotation;
 
 part 'dartstring.dart';
 part 'nodes.dart';
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 bc49dc7..4f0be4a 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
@@ -335,8 +335,13 @@
     return isTrue(e) ||
            isFalse(e) ||
            e is Not ||
-           e is LogicalOperator ||
-           e is ApplyBuiltinOperator && operatorReturnsBool(e.operator);
+           e is LogicalOperator && isBooleanValuedLogicalOperator(e) ||
+           e is ApplyBuiltinOperator && operatorReturnsBool(e.operator) ||
+           e is TypeOperator && isBooleanValuedTypeOperator(e);
+  }
+
+  bool isBooleanValuedLogicalOperator(LogicalOperator e) {
+    return isBooleanValued(e.left) && isBooleanValued(e.right);
   }
 
   /// True if the given operator always returns `true` or `false`.
@@ -361,6 +366,10 @@
     }
   }
 
+  bool isBooleanValuedTypeOperator(TypeOperator e) {
+    return e.isTypeTest;
+  }
+
   BuiltinOperator negateBuiltin(BuiltinOperator operator) {
     switch (operator) {
       case BuiltinOperator.StrictEq: return BuiltinOperator.StrictNeq;
@@ -552,4 +561,3 @@
     --node.variable.readCount;
   }
 }
-
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 994f142..878d8e1 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
@@ -315,6 +315,11 @@
     return node;
   }
 
+  Expression visitGetTypeTestProperty(GetTypeTestProperty node) {
+    super.visitGetTypeTestProperty(node);
+    return node;
+  }
+
   Expression visitGetLength(GetLength node) {
     super.visitGetLength(node);
     ++impureCounter;
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 00487ee..0091ef9 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
@@ -737,6 +737,11 @@
     return node;
   }
 
+  Expression visitGetTypeTestProperty(GetTypeTestProperty node) {
+    node.object = visitExpression(node.object);
+    return node;
+  }
+
   Expression visitCreateBox(CreateBox node) {
     return node;
   }
@@ -1142,6 +1147,7 @@
   @override
   Statement visitYield(Yield node) {
     node.input = visitExpression(node.input);
+    node.next = visitStatement(node.next);
     return node;
   }
 }
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 8adf3a9..5eddb37 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -4,14 +4,12 @@
 
 library tree_ir_builder;
 
-import '../diagnostics/invariant.dart' show
-    InternalErrorFunction;
-import '../diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE;
-import '../elements/elements.dart';
-import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
-import 'tree_ir_nodes.dart';
+import '../common.dart';
 import '../constants/values.dart';
+import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
+import '../elements/elements.dart';
+
+import 'tree_ir_nodes.dart';
 
 typedef Statement NodeCallback(Statement next);
 
@@ -641,6 +639,12 @@
     return new TypeOperator(value, node.dartType, typeArgs, isTypeTest: true);
   }
 
+  Expression visitTypeTestViaFlag(cps_ir.TypeTestViaFlag node) {
+    Expression value = getVariableUse(node.interceptor);
+    // TODO(sra): Move !! to cps_ir level.
+    return new Not(new Not(new GetTypeTestProperty(value, node.dartType)));
+  }
+
   Expression visitGetStatic(cps_ir.GetStatic node) {
     return new GetStatic(node.element, node.sourceInformation);
   }
@@ -700,4 +704,3 @@
   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_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index ddaf34d..4693bad 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -404,6 +404,8 @@
 
 /// An && or || expression. The operator is internally represented as a boolean
 /// [isAnd] to simplify rewriting of logical operators.
+/// Note the the result of && and || is one of the arguments, which might not be
+/// boolean. 'ShortCircuitOperator' might have been a better name.
 class LogicalOperator extends Expression {
   Expression left;
   bool isAnd;
@@ -742,6 +744,22 @@
   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 {
+  Expression object;
+  DartType dartType;
+
+  GetTypeTestProperty(this.object, this.dartType);
+
+  accept(ExpressionVisitor visitor) =>
+      visitor.visitGetTypeTestProperty(this);
+  accept1(ExpressionVisitor1 visitor, arg) =>
+      visitor.visitGetTypeTestProperty(this, arg);
+}
+
+
 /// Read the value of a field, possibly provoking its initializer to evaluate,
 /// or tear off a static method.
 class GetStatic extends Expression {
@@ -975,6 +993,7 @@
   E visitSetField(SetField node);
   E visitGetStatic(GetStatic node);
   E visitSetStatic(SetStatic node);
+  E visitGetTypeTestProperty(GetTypeTestProperty node);
   E visitCreateBox(CreateBox node);
   E visitCreateInstance(CreateInstance node);
   E visitReifyRuntimeType(ReifyRuntimeType node);
@@ -1012,6 +1031,7 @@
   E visitSetField(SetField node, A arg);
   E visitGetStatic(GetStatic node, A arg);
   E visitSetStatic(SetStatic node, A arg);
+  E visitGetTypeTestProperty(GetTypeTestProperty node, A arg);
   E visitCreateBox(CreateBox node, A arg);
   E visitCreateInstance(CreateInstance node, A arg);
   E visitReifyRuntimeType(ReifyRuntimeType node, A arg);
@@ -1206,6 +1226,10 @@
     visitExpression(node.value);
   }
 
+  visitGetTypeTestProperty(GetTypeTestProperty node) {
+    visitExpression(node.object);
+  }
+
   visitCreateBox(CreateBox node) {
   }
 
@@ -1451,6 +1475,11 @@
     return node;
   }
 
+  visitGetTypeTestProperty(GetTypeTestProperty node) {
+    node.object = visitExpression(node.object);
+    return node;
+  }
+
   visitCreateBox(CreateBox node) => node;
 
   visitCreateInstance(CreateInstance node) {
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 01b5847..130d268 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
@@ -133,7 +133,6 @@
 
     _addBlock(whileBlock);
     _addStatement(node);
-    whileBlock.statements.add(node);
     blocks.last.addEdgeTo(whileBlock);
 
     Block bodyBlock = new Block();
@@ -179,9 +178,9 @@
     _addStatement(node);
   }
 
-  @override
   visitYield(Yield node) {
     _addStatement(node);
+    visitStatement(node.next);
   }
 }
 
@@ -344,7 +343,8 @@
 
   @override
   visitYield(Yield node) {
-    printStatement(null, 'yield ${expr(node.input)}');
+    String name = node.hasStar ? 'yield*' : 'yield';
+    printStatement(null, '$name ${expr(node.input)}');
   }
 }
 
@@ -498,6 +498,15 @@
     return '$element = $value';
   }
 
+  String visitGetTypeTestProperty(GetTypeTestProperty node) {
+    String object = visitExpression(node.object);
+    if (usesInfixNotation(node.object)) {
+      object = '($object)';
+    }
+    // TODO(sra): Fix up this.
+    return '$object."is-${node.dartType}"';
+  }
+
   String visitCreateBox(CreateBox node) {
     return 'CreateBox';
   }
@@ -611,4 +620,4 @@
     }
     return name;
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index fe017ef..a21913a 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -4,6 +4,7 @@
 
 library dart2js.typechecker;
 
+import 'common.dart';
 import 'common/names.dart' show
     Identifiers;
 import 'common/resolution.dart' show
@@ -16,14 +17,6 @@
 import 'constants/values.dart';
 import 'core_types.dart';
 import 'dart_types.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticMessage,
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
-import 'diagnostics/messages.dart';
-import 'diagnostics/spannable.dart' show
-    Spannable;
 import 'elements/elements.dart' show
     AbstractFieldElement,
     AstElement,
@@ -59,7 +52,6 @@
 import 'util/util.dart' show
     Link,
     LinkBuilder;
-import '../compiler_new.dart' as api;
 
 class TypeCheckerTask extends CompilerTask {
   TypeCheckerTask(Compiler compiler) : super(compiler);
@@ -775,12 +767,12 @@
     }
 
     DartType unaliasedBound =
-        Types.computeUnaliasedBound(compiler, receiverType);
+        Types.computeUnaliasedBound(resolution, receiverType);
     if (unaliasedBound.treatAsDynamic) {
       return new DynamicAccess();
     }
     InterfaceType interface =
-        Types.computeInterfaceType(compiler, unaliasedBound);
+        Types.computeInterfaceType(resolution, unaliasedBound);
     ElementAccess access = getAccess(memberName, unaliasedBound, interface);
     if (access != null) {
       return access;
@@ -793,10 +785,10 @@
           TypePromotion typePromotion = typePromotions.head;
           if (!typePromotion.isValid) {
             DartType unaliasedBound =
-                Types.computeUnaliasedBound(compiler, typePromotion.type);
+                Types.computeUnaliasedBound(resolution, typePromotion.type);
             if (!unaliasedBound.treatAsDynamic) {
               InterfaceType interface =
-                  Types.computeInterfaceType(compiler, unaliasedBound);
+                  Types.computeInterfaceType(resolution, unaliasedBound);
               if (getAccess(memberName, unaliasedBound, interface) != null) {
                 reportTypePromotionHint(typePromotion);
               }
@@ -891,7 +883,8 @@
   void analyzeArguments(Send send, Element element, DartType type,
                         [LinkBuilder<DartType> argumentTypes]) {
     Link<Node> arguments = send.arguments;
-    DartType unaliasedType = type.unalias(resolution);
+    type.computeUnaliased(resolution);
+    DartType unaliasedType = type.unaliased;
     if (identical(unaliasedType.kind, TypeKind.FUNCTION)) {
 
       /// Report [warning] including info(s) about the declaration of [element]
@@ -1013,8 +1006,9 @@
       analyzeArguments(node, elementAccess.element, const DynamicType(),
                        argumentTypes);
     }
-    type = type.unalias(resolution);
-    if (identical(type.kind, TypeKind.FUNCTION)) {
+    type.computeUnaliased(resolution);
+    type = type.unaliased;
+    if (type.isFunctionType) {
       FunctionType funType = type;
       return funType.returnType;
     } else {
@@ -1151,7 +1145,7 @@
       // Compute `B<double, dynamic>` as the subtype of `A<double, int>` using
       // the relation between `A<S, int>` and `A<double, int>`.
       MoreSpecificSubtypeVisitor visitor =
-          new MoreSpecificSubtypeVisitor(compiler);
+          new MoreSpecificSubtypeVisitor(types);
       InterfaceType shownTypeGeneric = visitor.computeMoreSpecific(
           shownClass, knownInterfaceType);
 
@@ -1845,7 +1839,7 @@
           isHint: true);
     } else {
       InterfaceType interfaceType =
-          Types.computeInterfaceType(compiler, expressionType);
+          Types.computeInterfaceType(resolution, expressionType);
       if (interfaceType != null) {
         InterfaceType streamType =
             interfaceType.asInstanceOf(compiler.streamClass);
diff --git a/pkg/compiler/lib/src/types/constants.dart b/pkg/compiler/lib/src/types/constants.dart
index 0a303d4..1129465 100644
--- a/pkg/compiler/lib/src/types/constants.dart
+++ b/pkg/compiler/lib/src/types/constants.dart
@@ -4,13 +4,10 @@
 
 library types.constants;
 
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
 import '../constants/values.dart';
-import '../diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import '../diagnostics/spannable.dart' show
-    CURRENT_ELEMENT_SPANNABLE;
 import '../js_backend/js_backend.dart' show
     SyntheticConstantKind;
 import 'types.dart';
diff --git a/pkg/compiler/lib/src/types/type_mask.dart b/pkg/compiler/lib/src/types/type_mask.dart
index a290aa2..2f5754f 100644
--- a/pkg/compiler/lib/src/types/type_mask.dart
+++ b/pkg/compiler/lib/src/types/type_mask.dart
@@ -122,7 +122,7 @@
   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()}"));
+                 "uninstantiated class $base.\n${classWorld.dump(base)}"));
     return new FlatTypeMask.nonNullExact(base);
   }
 
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 6b18981..9d91f99 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -4,6 +4,7 @@
 
 library types;
 
+import '../common.dart';
 import '../common/backend_api.dart' show
     Backend;
 import '../common/tasks.dart' show
@@ -12,10 +13,6 @@
     Compiler;
 import '../constants/values.dart' show
     PrimitiveConstantValue;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/spannable.dart' show
-    NO_LOCATION_SPANNABLE;
 import '../elements/elements.dart';
 import '../inferrer/type_graph_inferrer.dart' show
     TypeGraphInferrer;
@@ -289,6 +286,10 @@
    */
   TypeMask getGuaranteedTypeOfElement(Element element) {
     return measure(() {
+      // TODO(24489): trust some JsInterop types.
+      if (element.isJsInterop) {
+        return dynamicType;
+      }
       TypeMask guaranteedType = typesInferrer.getTypeOfElement(element);
       return guaranteedType;
     });
@@ -296,6 +297,11 @@
 
   TypeMask getGuaranteedReturnTypeOfElement(Element element) {
     return measure(() {
+      // TODO(24489): trust some JsInterop types.
+      if (element.isJsInterop) {
+        return dynamicType;
+      }
+
       TypeMask guaranteedType =
           typesInferrer.getReturnTypeOfElement(element);
       return guaranteedType;
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index d37d2c9..461950f 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -4,26 +4,14 @@
 
 library dart2js.call_structure;
 
-import 'dart:collection';
-
+import '../common.dart';
 import '../common/names.dart' show
     Identifiers,
     Names,
     Selectors;
-import '../compiler.dart' show
-    Compiler;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
 import '../elements/elements.dart';
-import '../dart_types.dart';
 import '../tree/tree.dart';
-import '../types/types.dart';
 import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld,
-    World;
 
 import 'selector.dart' show
     Selector;
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index 6cafa09..b418976 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -102,7 +102,13 @@
   }
 
   void printOn(StringBuffer sb, String indentation,
-               {bool instantiatedOnly: false}) {
+               {bool instantiatedOnly: false,
+                ClassElement withRespectTo}) {
+
+    bool isRelatedTo(ClassElement subclass) {
+      return subclass.implementsInterface(withRespectTo);
+    }
+
     sb.write('$indentation$cls');
     if (isDirectlyInstantiated) {
       sb.write(' directly');
@@ -118,7 +124,11 @@
       for (Link<ClassHierarchyNode> link = _directSubclasses;
            !link.isEmpty;
            link = link.tail) {
-        if (instantiatedOnly && !link.head.isInstantiated) {
+        ClassHierarchyNode child = link.head;
+        if (instantiatedOnly && !child.isInstantiated) {
+          continue;
+        }
+        if (withRespectTo != null && !child.subclasses().any(isRelatedTo)) {
           continue;
         }
         if (needsComma) {
@@ -126,8 +136,11 @@
         } else {
           sb.write('\n');
         }
-        link.head.printOn(
-            sb, '$indentation  ', instantiatedOnly: instantiatedOnly);
+        child.printOn(
+            sb,
+            '$indentation  ',
+            instantiatedOnly: instantiatedOnly,
+            withRespectTo: withRespectTo);
         needsComma = true;
       }
       if (needsComma) {
@@ -139,9 +152,13 @@
     }
   }
 
-  String dump({String indentation: '', bool instantiatedOnly: false}) {
+  String dump({String indentation: '',
+               bool instantiatedOnly: false,
+               ClassElement withRespectTo}) {
     StringBuffer sb = new StringBuffer();
-    printOn(sb, indentation, instantiatedOnly: instantiatedOnly);
+    printOn(sb, indentation,
+        instantiatedOnly: instantiatedOnly,
+        withRespectTo: withRespectTo);
     return sb.toString();
   }
 
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index 357055a..f8a44e6 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -4,10 +4,9 @@
 
 library dart2js.selector;
 
+import '../common.dart';
 import '../common/names.dart' show
     Names;
-import '../diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
 import '../elements/elements.dart' show
     Element,
     Elements,
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index 4c5a719..f7625e4 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -4,29 +4,7 @@
 
 library universe.side_effects;
 
-import 'dart:collection';
-
-import '../common/names.dart' show
-    Identifiers,
-    Names,
-    Selectors;
-import '../compiler.dart' show
-    Compiler;
-import '../diagnostics/invariant.dart' show
-    invariant;
-import '../diagnostics/spannable.dart' show
-    SpannableAssertionFailure;
-import '../elements/elements.dart';
-import '../dart_types.dart';
-import '../tree/tree.dart';
-import '../types/types.dart';
-import '../util/util.dart';
-import '../world.dart' show
-    ClassWorld,
-    World;
-
-import 'selector.dart' show
-    Selector;
+import '../common.dart';
 
 class SideEffects {
   // Changes flags.
diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart
index 6e572b5..78e586f 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/universe.dart
@@ -6,12 +6,9 @@
 
 import 'dart:collection';
 
-import '../common/resolution.dart' show
-    Resolution;
+import '../common.dart';
 import '../compiler.dart' show
     Compiler;
-import '../diagnostics/invariant.dart' show
-    invariant;
 import '../elements/elements.dart';
 import '../dart_types.dart';
 import '../util/util.dart';
@@ -384,7 +381,8 @@
   }
 
   DartType registerIsCheck(DartType type, Compiler compiler) {
-    type = type.unalias(compiler.resolution);
+    type.computeUnaliased(compiler.resolution);
+    type = type.unaliased;
     // 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.
diff --git a/pkg/compiler/lib/src/use_unused_api.dart b/pkg/compiler/lib/src/use_unused_api.dart
index 7a9c03c..772e231 100644
--- a/pkg/compiler/lib/src/use_unused_api.dart
+++ b/pkg/compiler/lib/src/use_unused_api.dart
@@ -22,7 +22,7 @@
 import 'tree_ir/tree_ir_nodes.dart' as tree_ir;
 import 'dart_types.dart' as dart_types;
 import 'dart2js.dart' as dart2js;
-import 'compiler.dart' as dart2jslib;
+import 'deferred_load.dart' as deferred;
 import 'diagnostics/source_span.dart' as diagnostics;
 import 'elements/elements.dart' as elements;
 import 'elements/modelx.dart' as modelx;
@@ -82,6 +82,7 @@
   useProgramBuilder(null);
   useSemanticVisitor();
   useTreeVisitors();
+  useDeferred();
 }
 
 useApi([api.ReadStringFromUri uri, compiler.Compiler compiler]) {
@@ -258,8 +259,6 @@
   // TODO(ahe): We should try to avoid including API used only for tests. In
   // most cases, such API can be moved to a test library.
   World world = null;
-  dart2jslib.Compiler compiler = null;
-  compiler.currentlyInUserCode();
   type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null;
   source_file_provider.SourceFileProvider sourceFileProvider = null;
   sourceFileProvider.getSourceFile(null);
@@ -270,7 +269,7 @@
   world.haveAnyCommonSubtypes(null, null);
   typeGraphInferrer.getCallersOf(null);
   dart_types.Types.sorted(null);
-  new dart_types.Types(compiler).copy(compiler);
+  new dart_types.Types(null).copy(null);
   sourceFileProvider.readStringFromUri(null);
 }
 
@@ -295,17 +294,18 @@
     ..buildStringConstant(null);
 }
 
-useCompiler(dart2jslib.Compiler compiler) {
-  compiler.libraryLoader
+useCompiler(compiler.Compiler c) {
+  c.libraryLoader
       ..reset()
       ..resetAsync(null)
       ..lookupLibrary(null);
-  compiler.forgetElement(null);
-  compiler.backend.constantCompilerTask.copyConstantValues(null);
+  c.forgetElement(null);
+  c.backend.constantCompilerTask.copyConstantValues(null);
+  c.currentlyInUserCode();
+
 }
 
 useTypes() {
-  new dart_types.ResolvedTypedefType(null, null, null).unalias(null);
 }
 
 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) {
@@ -340,3 +340,7 @@
   new TreeVisitor1().visitExpression(null, null);
   new TreeVisitor1().visitStatement(null, null);
 }
+
+useDeferred([deferred.DeferredLoadTask task]) {
+  task.dump();
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 46cc830..b8c6387 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -6,17 +6,12 @@
 
 import 'closure.dart' show
     SynthesizedCallMethodElementX;
+import 'common.dart';
 import 'common/backend_api.dart' show
     Backend;
-import 'common/registry.dart' show
-    Registry;
 import 'compiler.dart' show
     Compiler;
 import 'dart_types.dart';
-import 'diagnostics/diagnostic_listener.dart' show
-    DiagnosticReporter;
-import 'diagnostics/invariant.dart' show
-    invariant;
 import 'elements/elements.dart' show
     ClassElement,
     Element,
@@ -134,7 +129,9 @@
   bool get hasClosedWorldAssumption;
 
   /// Returns a string representation of the closed world.
-  String dump();
+  ///
+  /// If [cls] is provided, the dump will contain only classes related to [cls].
+  String dump([ClassElement cls]);
 }
 
 class World implements ClassWorld {
@@ -548,11 +545,15 @@
   }
 
   @override
-  String dump() {
+  String dump([ClassElement cls]) {
     StringBuffer sb = new StringBuffer();
-    sb.write("Instantiated classes in the closed world:\n");
+    if (cls != null) {
+      sb.write("Classes in the closed world related to $cls:\n");
+    } else {
+      sb.write("Instantiated classes in the closed world:\n");
+    }
     getClassHierarchyNode(compiler.objectClass)
-        .printOn(sb, ' ', instantiatedOnly: true);
+        .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls);
     return sb.toString();
   }
 
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index f396ed0..c885986 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -5,6 +5,8 @@
 dependencies:
   package_config: ^0.1.1
   pub_semver: ^1.2.1
+  js:
+    path: ../js
   js_ast:
     path: ../js_ast
   js_runtime:
diff --git a/pkg/compiler/samples/darttags/darttags.dart b/pkg/compiler/samples/darttags/darttags.dart
index 0653a09..2000b9b 100644
--- a/pkg/compiler/samples/darttags/darttags.dart
+++ b/pkg/compiler/samples/darttags/darttags.dart
@@ -33,7 +33,7 @@
 import 'dart:mirrors';
 
 import 'package:sdk_library_metadata/libraries.dart'
-    show LIBRARIES, LibraryInfo;
+    show libraries, LibraryInfo;
 
 import 'package:compiler/src/mirrors/analyze.dart'
     show analyze;
@@ -51,7 +51,7 @@
 const SDK_ROOT = '../../../../sdk/';
 
 bool isPublicDart2jsLibrary(String name) {
-  return !name.startsWith('_') && LIBRARIES[name].isDart2jsLibrary;
+  return !name.startsWith('_') && libraries[name].isDart2jsLibrary;
 }
 
 var handler;
@@ -82,7 +82,7 @@
   }
 
   // Get the names of public dart2js libraries.
-  Iterable<String> names = LIBRARIES.keys.where(isPublicDart2jsLibrary);
+  Iterable<String> names = libraries.keys.where(isPublicDart2jsLibrary);
 
   // Prepend "dart:" to the names.
   uris.addAll(names.map((String name) => Uri.parse('dart:$name')));
diff --git a/pkg/compiler/samples/jsonify/jsonify.dart b/pkg/compiler/samples/jsonify/jsonify.dart
index 0d0c7e6..7638ca5 100644
--- a/pkg/compiler/samples/jsonify/jsonify.dart
+++ b/pkg/compiler/samples/jsonify/jsonify.dart
@@ -8,7 +8,7 @@
 import 'dart:mirrors';
 
 import 'package:sdk_library_metadata/libraries.dart'
-    show LIBRARIES, LibraryInfo;
+    show libraries, LibraryInfo;
 
 import '../../lib/src/mirrors/analyze.dart'
     show analyze;
@@ -25,7 +25,7 @@
 const SDK_ROOT = '../../../../sdk/';
 
 bool isPublicDart2jsLibrary(String name) {
-  return !name.startsWith('_') && LIBRARIES[name].isDart2jsLibrary;
+  return !name.startsWith('_') && libraries[name].isDart2jsLibrary;
 }
 
 var handler;
@@ -54,7 +54,7 @@
   sdkRoot = libraryRoot.resolve('../');
 
   // Get the names of public dart2js libraries.
-  Iterable<String> names = LIBRARIES.keys.where(isPublicDart2jsLibrary);
+  Iterable<String> names = libraries.keys.where(isPublicDart2jsLibrary);
 
   // Turn the names into uris by prepending dart: to them.
   List<Uri> uris = names.map((String name) => Uri.parse('dart:$name')).toList();
@@ -75,7 +75,7 @@
     });
   });
 
-  LIBRARIES.forEach((name, info) {
+  libraries.forEach((name, info) {
     var patch = info.dart2jsPatchPath;
     if (patch != null) {
       Uri uri = sdkRoot.resolve('sdk/lib/$patch');
diff --git a/pkg/dart2js_incremental/lib/dart2js_incremental.dart b/pkg/dart2js_incremental/lib/dart2js_incremental.dart
index bcbc760..12d285c 100644
--- a/pkg/dart2js_incremental/lib/dart2js_incremental.dart
+++ b/pkg/dart2js_incremental/lib/dart2js_incremental.dart
@@ -8,7 +8,7 @@
     EventSink,
     Future;
 
-import 'dart:profiler' show
+import 'dart:developer' show
     UserTag;
 
 import 'package:compiler/src/apiimpl.dart' show
diff --git a/pkg/js/AUTHORS b/pkg/js/AUTHORS
new file mode 100644
index 0000000..d773d3a
--- /dev/null
+++ b/pkg/js/AUTHORS
@@ -0,0 +1,8 @@
+# Below is a list of people and organizations that have contributed
+# to the Dart project. Names should be added to the list like so:
+#
+#   Name/Organization <email address>
+
+Google Inc.
+
+Alexandre Ardhuin <alexandre.ardhuin@gmail.com>
diff --git a/pkg/js/LICENSE b/pkg/js/LICENSE
new file mode 100644
index 0000000..abbb072
--- /dev/null
+++ b/pkg/js/LICENSE
@@ -0,0 +1,24 @@
+Copyright 2012, 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/js/PATENTS b/pkg/js/PATENTS
new file mode 100644
index 0000000..6954196
--- /dev/null
+++ b/pkg/js/PATENTS
@@ -0,0 +1,23 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Dart Project.
+
+Google hereby grants to you a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this
+section) patent license to make, have made, use, offer to sell, sell,
+import, transfer, and otherwise run, modify and propagate the contents
+of this implementation of Dart, where such license applies only to
+those patent claims, both currently owned by Google and acquired in
+the future, licensable by Google that are necessarily infringed by
+this implementation of Dart. This grant does not include claims that
+would be infringed only as a consequence of further modification of
+this implementation. If you or your agent or exclusive licensee
+institute or order or agree to the institution of patent litigation
+against any entity (including a cross-claim or counterclaim in a
+lawsuit) alleging that this implementation of Dart or any code
+incorporated within this implementation of Dart constitutes direct or
+contributory patent infringement, or inducement of patent
+infringement, then any patent rights granted to you under this License
+for this implementation of Dart shall terminate as of the date such
+litigation is filed.
diff --git a/pkg/js/README.md b/pkg/js/README.md
new file mode 100644
index 0000000..d27b6eb
--- /dev/null
+++ b/pkg/js/README.md
@@ -0,0 +1,60 @@
+Dart-JavaScript Interop
+=======================
+
+Status
+------
+
+Version 0.6.0 is a complete rewrite of package:js 
+
+The package now only contains annotations specifying the shape of the
+JavaScript API to import into Dart.
+The core implementation is defined directly in Dart2Js, Dartium, and DDC.
+
+**Warning: support in Dartium and Dart2Js is still in progress.
+
+#### Example - TODO(jacobr)
+
+Configuration and Initialization
+--------------------------------
+
+### Adding the dependency
+
+Add the following to your `pubspec.yaml`:
+
+```yaml
+dependencies:
+  js: ">=0.6.0 <0.7.0"
+```
+
+##### main.html
+
+```html
+<html>
+  <head>
+  </head>
+  <body>
+    <script type="application/dart" src="main.dart"></script>
+  </body>
+</html>
+```
+
+##### main.dart
+
+TODO(jacobr): example under construction.
+```dart
+library main;
+
+import 'package:js/js.dart';
+
+main() {
+}
+```
+
+Contributing and Filing Bugs
+----------------------------
+
+Please file bugs and features requests on the Github issue tracker: https://github.com/dart-lang/js-interop/issues
+
+We also love and accept community contributions, from API suggestions to pull requests. Please file an issue before beginning work so we can discuss the design and implementation. We are trying to create issues for all current and future work, so if something there intrigues you (or you need it!) join in on the discussion.
+
+All we require is that you sign the Google Individual Contributor License Agreement https://developers.google.com/open-source/cla/individual?csw=1
diff --git a/pkg/js/lib/js.dart b/pkg/js/lib/js.dart
new file mode 100644
index 0000000..c31794b
--- /dev/null
+++ b/pkg/js/lib/js.dart
@@ -0,0 +1,68 @@
+// 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.
+
+/**
+ * The js library allows Dart library authors to export their APIs to JavaScript
+ * and to define Dart interfaces for JavaScript objects.
+ */
+library js;
+
+export 'dart:js' show allowInterop, allowInteropCaptureThis;
+
+/// A metadata annotation that indicates that a Library, Class, or member is
+/// implemented directly in JavaScript. All external members of a class or
+/// library with this annotation implicitly have it as well.
+///
+/// Specifying [name] customizes the JavaScript name to use. By default the
+/// dart name is used. It is not valid to specify a custom [name] for class
+/// instance members.
+///
+/// Example 1:
+///
+///     @Js('google.maps')
+///     library maps;
+///
+///     external Map get map;
+///
+///     @Js("LatLng")
+///     class Location {
+///       external Location(num lat, num lng);
+///     }
+///
+///     @Js()
+///     class Map {
+///       external Map(Location location);
+///       external Location getLocation();
+///     }
+///
+/// In this example the top level map getter will invoke the JavaScript getter
+///     google.maps.map
+/// Calls to the Map constructor will be translated to calls to the JavaScript
+///     new google.maps.Map(location)
+/// Calls to the Location constructor willbe translated to calls to the
+/// JavaScript
+///     new google.maps.LatLng(lat, lng)
+/// because a custom JavaScript name for the Location class.
+/// In general, we recommend against using custom JavaScript names whenever
+/// possible as it is easier for users if the JavaScript names and Dart names
+/// are consistent.
+///
+/// Example 2:
+///     library utils;
+///
+///     @Js("JSON.stringify")
+///     external String stringify(obj);
+///
+///     @Js()
+///     void debugger();
+///
+/// In this example no custom JavaScript namespace is specified.
+/// Calls to debugger map to calls to JavaScript
+///     self.debugger()
+/// Calls to stringify map to calls to
+///     JSON.stringify(obj)
+class Js {
+  final String name;
+  const Js([this.name]);
+}
diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml
new file mode 100644
index 0000000..d558126
--- /dev/null
+++ b/pkg/js/pubspec.yaml
@@ -0,0 +1,9 @@
+name: js
+version: 0.6.0-dev.1
+authors:
+- Dart Team <misc@dartlang.org>
+- Alexandre Ardhuin <alexandre.ardhuin@gmail.com>
+description: Access JavaScript from Dart.
+homepage: https://github.com/dart-lang/js-interop
+environment:
+  sdk: '>=1.13.0-dev <2.0.0'
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 40e35e9..674f7eb 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -167,31 +167,33 @@
 lookup_map/test/lookup_map_test: RuntimeError # $async$temp1.get$tests is not a function
 
 [ $compiler == dart2js && $cps_ir && $host_checked ]
-analyzer/test/src/task/html_test: Crash # Issue 24485
-analyzer/test/src/task/incremental_element_builder_test: Crash # Issue 24485
-analyzer/test/src/task/strong_mode_test: Crash # Issue 24485
-analyzer/test/src/task/inputs_test: Crash # Issue 24485
-analyzer/test/src/task/model_test: Crash # Issue 24485
-analyzer/test/src/task/manager_test: Crash # Issue 24485
-analyzer/test/generated/static_warning_code_test: Crash # Issue 24485
-analyzer/test/generated/utilities_test: Crash # Issue 24485
-analyzer/test/src/task/dart_test: Crash # Issue 24485
-analyzer/test/src/task/html_work_manager_test: Crash # Issue 24485
-analyzer/test/src/task/general_test: Crash # Issue 24485
-analyzer/test/src/task/dart_work_manager_test: Crash # Issue 24485
-analyzer/test/generated/parser_test: Crash # Issue 24485
-analyzer/test/generated/static_type_warning_code_test: Crash # Issue 24485
-analyzer/test/src/context/cache_test: Crash # Issue 24485
-analyzer/test/generated/incremental_resolver_test: Crash # Issue 24485
-analyzer/test/generated/element_test: Crash # Issue 24485
-analyzer/test/generated/incremental_scanner_test: Crash # Issue 24485
-analyzer/test/generated/scanner_test: Crash # Issue 24485
-analyzer/test/src/task/driver_test: Crash # Issue 24485
-analyzer/test/generated/compile_time_error_code_test: Crash # Issue 24485
-analyzer/test/generated/non_error_resolver_test: Crash # Issue 24485
-analyzer/test/generated/resolver_test: Crash # Issue 24485
-analyzer/test/generated/source_factory_test: Crash # Issue 24485
-analyzer/test/generated/ast_test: Crash # Issue 24485
-analyzer/test/src/context/context_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/compile_time_error_code_test: Crash # Issue 24485
+analyzer/test/generated/element_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/non_error_resolver_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/source_factory_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/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/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
+analyzer/test/src/task/general_test: Crash # Issue 24485
+analyzer/test/src/task/html_test: Crash # Issue 24485
+analyzer/test/src/task/html_work_manager_test: Crash # Issue 24485
+analyzer/test/src/task/incremental_element_builder_test: Crash # Issue 24485
+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/strong_mode_test: Crash # Issue 24485
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 8ee15ce..d6d945e 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -514,6 +514,34 @@
 }
 
 
+// Embedder Entrypoint:
+// Add mapping from package name to URI.
+void _addPackageMapEntry(String key, String value) {
+  if (!_setupCompleted) {
+    _setupHooks();
+  }
+  if (_traceLoading) {
+    _log("Adding packages map entry: $key -> $value");
+  }
+  if (_packageRoot != null) {
+    if (_traceLoading) {
+      _log("_packageRoot already set: $_packageRoot");
+    }
+    throw "Cannot add package map entry to an exisiting package root.";
+  }
+  if (_packagesPort != null) {
+    if (_traceLoading) {
+      _log("Package map load request already pending.");
+    }
+    throw "Cannot add package map entry during package map resolution.";
+  }
+  if (_packageMap == null) {
+    _packageMap = new Map<String, Uri>();
+  }
+  _packageMap[key] = _workingDirectory.resolve(value);
+}
+
+
 void _asyncLoadError(_LoadRequest req, _LoadError error, StackTrace stack) {
   if (_traceLoading) {
     _log("_asyncLoadError(${req._uri}), error: $error\nstack: $stack");
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 83ffcd3..3c01e64 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -637,6 +637,7 @@
                                              bool is_service_isolate,
                                              bool trace_loading,
                                              const char* package_root,
+                                             const char** package_map,
                                              const char* packages_file) {
   // Setup the internal library's 'internalPrint' function.
   Dart_Handle print = Dart_Invoke(
@@ -670,6 +671,7 @@
 
   // Set up package root if specified.
   if (package_root != NULL) {
+    ASSERT(package_map == NULL);
     ASSERT(packages_file == NULL);
     result = NewString(package_root);
     RETURN_IF_ERROR(result);
@@ -681,6 +683,33 @@
                          kNumArgs,
                          dart_args);
     RETURN_IF_ERROR(result);
+  } else if (package_map != NULL) {
+    ASSERT(packages_file == NULL);
+    Dart_Handle func_name = NewString("_addPackageMapEntry");
+    RETURN_IF_ERROR(func_name);
+
+    for (int i = 0; package_map[i] != NULL; i +=2) {
+      const int kNumArgs = 2;
+      Dart_Handle dart_args[kNumArgs];
+      // Get the key.
+      result = NewString(package_map[i]);
+      RETURN_IF_ERROR(result);
+      dart_args[0] = result;
+      if (package_map[i + 1] == NULL) {
+        return Dart_NewUnhandledExceptionError(
+            NewDartArgumentError("Adding package map entry without value."));
+      }
+      // Get the value.
+      result = NewString(package_map[i + 1]);
+      RETURN_IF_ERROR(result);
+      dart_args[1] = result;
+      // Setup the next package map entry.
+      result = Dart_Invoke(builtin_lib,
+                           func_name,
+                           kNumArgs,
+                           dart_args);
+      RETURN_IF_ERROR(result);
+    }
   } else if (packages_file != NULL) {
     result = NewString(packages_file);
     RETURN_IF_ERROR(result);
@@ -738,6 +767,7 @@
 
 
 Dart_Handle DartUtils::PrepareForScriptLoading(const char* package_root,
+                                               const char** package_map,
                                                const char* packages_file,
                                                bool is_service_isolate,
                                                bool trace_loading,
@@ -772,6 +802,7 @@
                                  is_service_isolate,
                                  trace_loading,
                                  package_root,
+                                 package_map,
                                  packages_file);
   RETURN_IF_ERROR(result);
 
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 3118950..d337a10 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -129,6 +129,7 @@
                                            bool is_service_isolate,
                                            bool trace_loading,
                                            const char* package_root,
+                                           const char** package_map,
                                            const char* packages_file);
   static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib,
                                  Dart_Handle builtin_lib,
@@ -138,6 +139,7 @@
   static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib);
   static Dart_Handle PrepareIsolateLibrary(Dart_Handle isolate_lib);
   static Dart_Handle PrepareForScriptLoading(const char* package_root,
+                                             const char** package_map,
                                              const char* packages_file,
                                              bool is_service_isolate,
                                              bool trace_loading,
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index fbecffa5..5c0d430 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -7,7 +7,7 @@
 
 #include "bin/file_system_watcher.h"
 
-#if !defined(TARGET_OS_IOS)
+#if !TARGET_OS_IOS
 
 #include <errno.h>  // NOLINT
 #include <fcntl.h>  // NOLINT
@@ -394,7 +394,7 @@
 }  // namespace bin
 }  // namespace dart
 
-#else  // !defined(TARGET_OS_IOS)
+#else  // !TARGET_OS_IOS
 
 namespace dart {
 namespace bin {
@@ -432,6 +432,6 @@
 }  // namespace bin
 }  // namespace dart
 
-#endif  // !defined(TARGET_OS_IOS)
+#endif  // !TARGET_OS_IOS
 
 #endif  // defined(TARGET_OS_MACOS)
diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc
index f537606..5e87f62 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -154,7 +154,14 @@
   uint8_t* buffer = NULL;
   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) {
+      Dart_TypedDataReleaseData(data_obj);
+      Dart_ThrowException(DartUtils::NewInternalError(
+          "Invalid argument passed to Filter_Process"));
+    }
     uint8_t* zlib_buffer = new uint8_t[chunk_length];
     if (zlib_buffer == NULL) {
       Dart_TypedDataReleaseData(data_obj);
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 7c6c798..72ee0f1 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -594,6 +594,7 @@
     result =
         DartUtils::PrepareForScriptLoading(package_root,
                                            NULL,
+                                           NULL,
                                            false,
                                            false,
                                            builtin_lib);
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index d829587..1429ff4e 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -706,6 +706,7 @@
 static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
                                                 const char* main,
                                                 const char* package_root,
+                                                const char** package_map,
                                                 const char* packages_file,
                                                 Dart_IsolateFlags* flags,
                                                 char** error,
@@ -767,6 +768,7 @@
   // Prepare for script loading by setting up the 'print' and 'timer'
   // closures and setting up 'package root' for URI resolution.
   result = DartUtils::PrepareForScriptLoading(package_root,
+                                              package_map,
                                               packages_file,
                                               false,
                                               has_trace_loading,
@@ -815,13 +817,18 @@
 static Dart_Isolate CreateIsolateAndSetup(const char* script_uri,
                                           const char* main,
                                           const char* package_root,
+                                          const char** package_map,
                                           Dart_IsolateFlags* flags,
                                           void* data, char** error) {
   // The VM should never call the isolate helper with a NULL flags.
   ASSERT(flags != NULL);
   ASSERT(flags->version == DART_FLAGS_CURRENT_VERSION);
+  if ((package_root != NULL) && (package_map != NULL)) {
+    *error = strdup("Invalid arguments - Cannot simultaneously specify "
+                    "package root and package map.");
+    return NULL;
+  }
   IsolateData* parent_isolate_data = reinterpret_cast<IsolateData*>(data);
-  int exit_code = 0;
   if (script_uri == NULL) {
     if (data == NULL) {
       *error = strdup("Invalid 'callback_data' - Unable to spawn new isolate");
@@ -834,15 +841,20 @@
     }
   }
   const char* packages_file = NULL;
-  if (package_root == NULL) {
+  // If neither a package root nor a package map are requested pass on the
+  // inherited values.
+  if ((package_root == NULL) && (package_map == NULL)) {
     if (parent_isolate_data != NULL) {
       package_root = parent_isolate_data->package_root;
       packages_file = parent_isolate_data->packages_file;
     }
   }
+
+  int exit_code = 0;
   return CreateIsolateAndSetupHelper(script_uri,
                                      main,
                                      package_root,
+                                     package_map,
                                      packages_file,
                                      flags,
                                      error,
@@ -1116,6 +1128,7 @@
   Dart_Isolate isolate = CreateIsolateAndSetupHelper(script_name,
                                                      "main",
                                                      commandline_package_root,
+                                                     NULL,
                                                      commandline_packages_file,
                                                      NULL,
                                                      &error,
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index e970d6e..54b48d6 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -12,9 +12,9 @@
 #include "bin/file.h"
 #include "bin/platform.h"
 
-#if !defined(TARGET_OS_IOS)
+#if !TARGET_OS_IOS
 #include <crt_externs.h>  // NOLINT
-#endif  // !defined(TARGET_OS_IOS)
+#endif  // !TARGET_OS_IOS
 #include <signal.h>  // NOLINT
 #include <string.h>  // NOLINT
 #include <unistd.h>  // NOLINT
@@ -68,7 +68,7 @@
 
 
 char** Platform::Environment(intptr_t* count) {
-#if defined(TARGET_OS_IOS)
+#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
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index bf81a8c..f694958 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -7,7 +7,7 @@
 
 #include "bin/process.h"
 
-#if !defined(TARGET_OS_IOS)
+#if !TARGET_OS_IOS
 #include <crt_externs.h>  // NOLINT
 #endif
 #include <errno.h>  // NOLINT
@@ -451,7 +451,7 @@
       ReportChildError();
     }
 
-#if !defined(TARGET_OS_IOS)
+#if !TARGET_OS_IOS
     if (program_environment_ != NULL) {
       // On MacOS you have to do a bit of magic to get to the
       // environment strings.
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index 1b82008..d29e7cf 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -45,30 +45,38 @@
 
 static const int SSL_ERROR_MESSAGE_BUFFER_SIZE = 1000;
 
+
+/* Get the error messages from BoringSSL, and put them in buffer as a
+ * null-terminated string. */
+static void FetchErrorString(char* buffer, int length) {
+  buffer[0] = '\0';
+  int error = ERR_get_error();
+  while (error != 0) {
+    int used = strlen(buffer);
+    int free_length = length - used;
+    if (free_length > 16) {
+      // Enough room for error code at least.
+      if (used > 0) {
+        buffer[used] = '\n';
+        buffer[used + 1] = '\0';
+        used++;
+        free_length--;
+      }
+      ERR_error_string_n(error, buffer + used, free_length);
+      // ERR_error_string_n is guaranteed to leave a null-terminated string.
+    }
+    error = ERR_get_error();
+  }
+}
+
+
 /* Handle an error reported from the BoringSSL library. */
 static void ThrowIOException(int status,
                              const char* exception_type,
                              const char* message,
                              bool free_message = false) {
   char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
-  error_string[0] = '\0';
-  int error = ERR_get_error();
-  while (error != 0) {
-    int length = strlen(error_string);
-    int free_length = SSL_ERROR_MESSAGE_BUFFER_SIZE - length;
-    if (free_length > 16) {
-      // Enough room for error code at least.
-      if (length > 0) {
-        error_string[length] = '\n';
-        error_string[length + 1] = '\0';
-        length++;
-        free_length--;
-      }
-      ERR_error_string_n(error, error_string + length, free_length);
-      // ERR_error_string_n is guaranteed to leave a null-terminated string.
-    }
-    error = ERR_get_error();
-  }
+  FetchErrorString(error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
   OSError os_error_struct(status, error_string, OSError::kBoringSSL);
   Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
   Dart_Handle exception =
@@ -602,12 +610,12 @@
     }
     return result;
   } else {
-    // TODO(24185): Extract the BoringSSL OS error here and return it.
-    int error_code = 1;
-    const char* error_message = "Obsolete PR Error message";
+    int32_t error_code = static_cast<int32_t>(ERR_peek_error());
+    char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
+    FetchErrorString(error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
     CObjectArray* result = new CObjectArray(CObject::NewArray(2));
     result->SetAt(0, new CObjectInt32(CObject::NewInt32(error_code)));
-    result->SetAt(1, new CObjectString(CObject::NewString(error_message)));
+    result->SetAt(1, new CObjectString(CObject::NewString(error_string)));
     return result;
   }
 }
diff --git a/runtime/bin/vmservice_dartium.cc b/runtime/bin/vmservice_dartium.cc
index 195a6ce..40e61ef 100644
--- a/runtime/bin/vmservice_dartium.cc
+++ b/runtime/bin/vmservice_dartium.cc
@@ -65,7 +65,7 @@
   // Prepare for script loading by setting up the 'print' and 'timer'
   // closures and setting up 'package root' for URI resolution.
   result = DartUtils::PrepareForScriptLoading(
-      NULL, NULL, true, false, builtin_lib);
+      NULL, NULL, NULL, true, false, builtin_lib);
   CHECK_RESULT(result);
 
   ASSERT(Dart_IsServiceIsolate(isolate));
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index 553093f..6ffe61e 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -174,7 +174,7 @@
   // Prepare for script loading by setting up the 'print' and 'timer'
   // closures and setting up 'package root' for URI resolution.
   result = DartUtils::PrepareForScriptLoading(
-      NULL, NULL, true, false, builtin_lib);
+      NULL, NULL, NULL, true, false, builtin_lib);
   SHUTDOWN_ON_ERROR(result);
 
   // Load main script.
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index c5658951..e6f643c 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -755,8 +755,14 @@
  *   improve debugging messages.  The main function is not invoked by
  *   this function.
  * \param package_root The package root path for this isolate to resolve
- *   package imports against. If this parameter is NULL, the package root path
- *   of the parent isolate should be used.
+ *   package imports against. Only one of package_root and package_map
+ *   parameters is non-NULL. If neither parameter is passed the package
+ *   resolution of the parent isolate should be used.
+ * \param package_map The package map for this isolate to resolve package
+ *   imports against. The array contains alternating keys and values,
+ *   terminated by a NULL key. Only one of package_root and package_map
+ *   parameters is non-NULL. If neither parameter is passed the package
+ *   resolution of the parent isolate should be used.
  * \param flags Default flags for this isolate being spawned. Either inherited
  *   from the spawning isolate or passed as parameters when spawning the
  *   isolate from Dart code.
@@ -771,6 +777,7 @@
 typedef Dart_Isolate (*Dart_IsolateCreateCallback)(const char* script_uri,
                                                    const char* main,
                                                    const char* package_root,
+                                                   const char** package_map,
                                                    Dart_IsolateFlags* flags,
                                                    void* callback_data,
                                                    char** error);
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index 6d1567c..88c2616 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -341,6 +341,7 @@
   kNoPauseOnExceptions = 1,
   kPauseOnUnhandledExceptions,
   kPauseOnAllExceptions,
+  kInvalidExceptionPauseInfo
 } Dart_ExceptionPauseInfo;
 
 /**
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index 82f468f..349788c 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -125,43 +125,6 @@
 }
 
 
-static bool CanonicalizeUri(Isolate* isolate,
-                            const Library& library,
-                            const String& uri,
-                            char** canonical_uri,
-                            char** error) {
-  Zone* zone = isolate->current_zone();
-  bool retval = false;
-  Dart_LibraryTagHandler handler = isolate->library_tag_handler();
-  if (handler != NULL) {
-    Dart_EnterScope();
-    Dart_Handle result = handler(Dart_kCanonicalizeUrl,
-                                 Api::NewHandle(isolate, library.raw()),
-                                 Api::NewHandle(isolate, uri.raw()));
-    const Object& obj = Object::Handle(Api::UnwrapHandle(result));
-    if (obj.IsString()) {
-      *canonical_uri = zone->MakeCopyOfString(String::Cast(obj).ToCString());
-      retval = true;
-    } else if (obj.IsError()) {
-      Error& error_obj = Error::Handle();
-      error_obj ^= obj.raw();
-      *error = zone->PrintToString("Unable to canonicalize uri '%s': %s",
-                                   uri.ToCString(), error_obj.ToErrorCString());
-    } else {
-      *error = zone->PrintToString("Unable to canonicalize uri '%s': "
-                                   "library tag handler returned wrong type",
-                                   uri.ToCString());
-    }
-    Dart_ExitScope();
-  } else {
-    *error = zone->PrintToString(
-        "Unable to canonicalize uri '%s': no library tag handler found.",
-        uri.ToCString());
-  }
-  return retval;
-}
-
-
 static bool CreateIsolate(Isolate* parent_isolate,
                           IsolateSpawnState* state,
                           char** error) {
@@ -179,6 +142,7 @@
       (callback)(state->script_url(),
                  state->function_name(),
                  state->package_root(),
+                 state->package_map(),
                  &api_flags,
                  init_data,
                  error));
@@ -259,6 +223,51 @@
 }
 
 
+static char* String2UTF8(const String& str) {
+  intptr_t len = Utf8::Length(str);
+  char* result = new char[len + 1];
+  str.ToUTF8(reinterpret_cast<uint8_t*>(result), len);
+  result[len] = 0;
+
+  return result;
+}
+
+
+static char* CanonicalizeUri(Isolate* isolate,
+                             const Library& library,
+                             const String& uri,
+                             char** error) {
+  char* result = NULL;
+  Zone* zone = isolate->current_zone();
+  Dart_LibraryTagHandler handler = isolate->library_tag_handler();
+  if (handler != NULL) {
+    Dart_EnterScope();
+    Dart_Handle handle = handler(Dart_kCanonicalizeUrl,
+                                 Api::NewHandle(isolate, library.raw()),
+                                 Api::NewHandle(isolate, uri.raw()));
+    const Object& obj = Object::Handle(Api::UnwrapHandle(handle));
+    if (obj.IsString()) {
+      result = String2UTF8(String::Cast(obj));
+    } else if (obj.IsError()) {
+      Error& error_obj = Error::Handle();
+      error_obj ^= obj.raw();
+      *error = zone->PrintToString("Unable to canonicalize uri '%s': %s",
+                                   uri.ToCString(), error_obj.ToErrorCString());
+    } else {
+      *error = zone->PrintToString("Unable to canonicalize uri '%s': "
+                                   "library tag handler returned wrong type",
+                                   uri.ToCString());
+    }
+    Dart_ExitScope();
+  } else {
+    *error = zone->PrintToString(
+        "Unable to canonicalize uri '%s': no library tag handler found.",
+        uri.ToCString());
+  }
+  return result;
+}
+
+
 DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 12) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(1));
@@ -280,37 +289,52 @@
 
 
   // Canonicalize the uri with respect to the current isolate.
-  char* error = NULL;
-  char* canonical_uri = NULL;
   const Library& root_lib =
       Library::Handle(isolate->object_store()->root_library());
-  if (!CanonicalizeUri(isolate, root_lib, uri,
-                       &canonical_uri, &error)) {
+  char* error = NULL;
+  char* canonical_uri = CanonicalizeUri(isolate, root_lib, uri, &error);
+  if (canonical_uri == NULL) {
     const String& msg = String::Handle(String::New(error));
     ThrowIsolateSpawnException(msg);
   }
 
-  char* utf8_package_root = NULL;
-  if (!package_root.IsNull()) {
-    const intptr_t len = Utf8::Length(package_root);
-    utf8_package_root = zone->Alloc<char>(len + 1);
-    package_root.ToUTF8(reinterpret_cast<uint8_t*>(utf8_package_root), len);
-    utf8_package_root[len] = '\0';
+  char* utf8_package_root =
+      package_root.IsNull() ? NULL : String2UTF8(package_root);
+
+  char** utf8_package_map = NULL;
+  if (!packages.IsNull()) {
+    intptr_t len = packages.Length();
+    utf8_package_map = new char*[len + 1];
+
+    Object& entry = Object::Handle();
+    for (intptr_t i = 0; i < len; i++) {
+      entry = packages.At(i);
+      if (!entry.IsString()) {
+        const String& msg = String::Handle(String::NewFormatted(
+            "Bad value in package map: %s", entry.ToCString()));
+        ThrowIsolateSpawnException(msg);
+      }
+      utf8_package_map[i] = String2UTF8(String::Cast(entry));
+    }
+    // NULL terminated array.
+    utf8_package_map[len] = NULL;
   }
 
   bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
   Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
   Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
 
-  IsolateSpawnState* state = new IsolateSpawnState(port.Id(),
-                                                   canonical_uri,
-                                                   utf8_package_root,
-                                                   args,
-                                                   message,
-                                                   paused.value(),
-                                                   fatal_errors,
-                                                   on_exit_port,
-                                                   on_error_port);
+  IsolateSpawnState* state = new IsolateSpawnState(
+      port.Id(),
+      canonical_uri,
+      utf8_package_root,
+      const_cast<const char**>(utf8_package_map),
+      args,
+      message,
+      paused.value(),
+      fatal_errors,
+      on_exit_port,
+      on_error_port);
   // If we were passed a value then override the default flags state for
   // checked mode.
   if (!checked.IsNull()) {
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 08fc247..6d59fff 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -127,7 +127,7 @@
   }
 
   int get hashCode {
-    return sendPort.hashCode();
+    return sendPort.hashCode;
   }
 
   Uri get remotePortUri => new Uri.https('localhost', '55');
@@ -331,17 +331,23 @@
        bool checked,
        Map<String, String> environment,
        Uri packageRoot,
-       Map<String, Uri> packages}) {
+       Map<String, Uri> packageMap}) {
     RawReceivePort readyPort;
     if (environment != null) throw new UnimplementedError("environment");
-    if (packages != null) throw new UnimplementedError("packages");
     try {
       // The VM will invoke [_startIsolate] and not `main`.
-      // TODO: Handle [packages].
       readyPort = new RawReceivePort();
       var packageRootString =
           (packageRoot == null) ? null : packageRoot.toString();
       var packagesList = null;
+      if (packageMap != null) {
+        packagesList = new List(2 * packageMap.length);
+        var i = 0;
+        packageMap.forEach((key, value) {
+          packagesList[i++] = key;
+          packagesList[i++] = Uri.base.resolveUri(value).toString();
+        });
+      }
 
       _spawnUri(readyPort.sendPort, uri.toString(),
                 args, message,
diff --git a/runtime/lib/math.cc b/runtime/lib/math.cc
index 94662e6..f4b4626 100644
--- a/runtime/lib/math.cc
+++ b/runtime/lib/math.cc
@@ -110,9 +110,9 @@
 }
 
 
-RawTypedData* CreateRandomState(Isolate* isolate, uint64_t seed) {
+RawTypedData* CreateRandomState(Zone* zone, uint64_t seed) {
   const TypedData& result = TypedData::Handle(
-      isolate, TypedData::New(kTypedDataUint32ArrayCid, 2));
+      zone, TypedData::New(kTypedDataUint32ArrayCid, 2));
   result.SetUint32(0, static_cast<uint32_t>(seed));
   result.SetUint32(result.ElementSizeInBytes(),
                    static_cast<uint32_t>(seed >> 32));
@@ -187,7 +187,7 @@
   if (seed == 0) {
     seed = 0x5a17;
   }
-  return CreateRandomState(isolate, seed);
+  return CreateRandomState(zone, seed);
 }
 
 
@@ -195,7 +195,7 @@
   Random* rnd = isolate->random();
   uint64_t seed = rnd->NextUInt32();
   seed |= (static_cast<uint64_t>(rnd->NextUInt32()) << 32);
-  return CreateRandomState(isolate, seed);
+  return CreateRandomState(zone, seed);
 }
 
 }  // namespace dart
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 8e80deb..7edb1c0 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -580,10 +580,11 @@
 
 
 static RawInstance* CreateIsolateMirror() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   const String& debug_name = String::Handle(String::New(isolate->name()));
-  const Library& root_library =
-      Library::Handle(isolate, isolate->object_store()->root_library());
+  const Library& root_library = Library::Handle(thread->zone(),
+      isolate->object_store()->root_library());
   const Instance& root_library_mirror =
       Instance::Handle(CreateLibraryMirror(root_library));
 
@@ -796,13 +797,13 @@
 
 DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0) {
   const GrowableObjectArray& libraries = GrowableObjectArray::Handle(
-      isolate, isolate->object_store()->libraries());
+      zone, isolate->object_store()->libraries());
 
   const intptr_t num_libraries = libraries.Length();
   const GrowableObjectArray& library_mirrors = GrowableObjectArray::Handle(
-      isolate, GrowableObjectArray::New(num_libraries));
-  Library& library = Library::Handle(isolate);
-  Instance& library_mirror = Instance::Handle(isolate);
+      zone, GrowableObjectArray::New(num_libraries));
+  Library& library = Library::Handle(zone);
+  Instance& library_mirror = Instance::Handle(zone);
 
   for (int i = 0; i < num_libraries; i++) {
     library ^= libraries.At(i);
diff --git a/runtime/lib/profiler_sources.gypi b/runtime/lib/profiler_sources.gypi
deleted file mode 100644
index 9175427..0000000
--- a/runtime/lib/profiler_sources.gypi
+++ /dev/null
@@ -1,12 +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.
-
-# Sources list to keep vm/BUILD.gn generate_core_libraries happy.
-
-{
-  'sources': [
-    'empty_source.dart'
-  ],
-}
-
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index ac2426e..32f5896 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -19,7 +19,23 @@
 }
 
 
-DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 5) {
+DEFINE_NATIVE_ENTRY(Timeline_getNextAsyncId, 0) {
+  TimelineEventRecorder* recorder = Timeline::recorder();
+  if (recorder == NULL) {
+    return Integer::New(0);
+  }
+  return Integer::New(recorder->GetNextAsyncId());
+}
+
+
+DEFINE_NATIVE_ENTRY(Timeline_reportTaskEvent, 6) {
+  GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0));
+  GET_NON_NULL_NATIVE_ARGUMENT(Integer, id, arguments->NativeArgAt(1));
+  GET_NON_NULL_NATIVE_ARGUMENT(String, phase, arguments->NativeArgAt(2));
+  GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(3));
+  GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(4));
+  GET_NON_NULL_NATIVE_ARGUMENT(String, args, arguments->NativeArgAt(5));
+
   TimelineEventRecorder* recorder = Timeline::recorder();
   if (recorder == NULL) {
     return Object::null();
@@ -30,12 +46,46 @@
     return Object::null();
   }
 
+
+  int64_t pid = OS::ProcessId();
+  int64_t tid = OSThread::ThreadIdToIntPtr(OSThread::GetCurrentThreadTraceId());
+
+  char* event = OS::SCreate(zone,
+      "{\"name\":\"%s\",\"cat\":\"%s\",\"tid\":%" Pd64 ",\"pid\":%" Pd64 ","
+      "\"ts\":%" Pd64 ",\"ph\":\"%s\",\"id\":%" Pd64 ", \"args\":%s}",
+      name.ToCString(),
+      category.ToCString(),
+      tid,
+      pid,
+      start.AsInt64Value(),
+      phase.ToCString(),
+      id.AsInt64Value(),
+      args.ToCString());
+
+  // event was allocated in the zone and will be copied by AppendDartEvent.
+  recorder->AppendDartEvent(isolate, event);
+
+  return Object::null();
+}
+
+
+DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 5) {
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, end, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(2));
   GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(3));
   GET_NON_NULL_NATIVE_ARGUMENT(String, args, arguments->NativeArgAt(4));
 
+  TimelineEventRecorder* recorder = Timeline::recorder();
+  if (recorder == NULL) {
+    return Object::null();
+  }
+
+  if (!isolate->GetDartStream()->Enabled()) {
+    // Dart stream is not enabled for this isolate, do nothing.
+    return Object::null();
+  }
+
   int64_t duration = end.AsInt64Value() - start.AsInt64Value();
   int64_t pid = OS::ProcessId();
   int64_t tid = OSThread::ThreadIdToIntPtr(OSThread::GetCurrentThreadTraceId());
diff --git a/runtime/lib/timeline.dart b/runtime/lib/timeline.dart
index 38ffa5f..12b9278 100644
--- a/runtime/lib/timeline.dart
+++ b/runtime/lib/timeline.dart
@@ -6,6 +6,16 @@
 
 patch int _getTraceClock() native "Timeline_getTraceClock";
 
+patch int _getNextAsyncId() native "Timeline_getNextAsyncId";
+
+patch void _reportTaskEvent(
+    int start,
+    int taskId,
+    String phase,
+    String category,
+    String name,
+    String argumentsAsJson) native "Timeline_reportTaskEvent";
+
 patch void _reportCompleteEvent(
     int start,
     int end,
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index 29581b4..9a2cb2a 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -25,10 +25,10 @@
 
 class RegisterRunningIsolatesVisitor : public IsolateVisitor {
  public:
-  explicit RegisterRunningIsolatesVisitor(Isolate* service_isolate)
+  explicit RegisterRunningIsolatesVisitor(Thread* thread)
       : IsolateVisitor(),
-        register_function_(Function::Handle(service_isolate)),
-        service_isolate_(service_isolate) {
+        register_function_(Function::Handle(thread->zone())),
+        service_isolate_(thread->isolate()) {
     ASSERT(ServiceIsolate::IsServiceIsolate(Isolate::Current()));
     // Get library.
     const String& library_url = Symbols::DartVMService();
@@ -63,7 +63,7 @@
     args.SetAt(0, port_int);
     args.SetAt(1, send_port);
     args.SetAt(2, name);
-    Object& r = Object::Handle(service_isolate_);
+    Object& r = Object::Handle(service_isolate_->current_zone());
     r = DartEntry::InvokeFunction(register_function_, args);
     if (FLAG_trace_service) {
       OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n",
@@ -115,7 +115,7 @@
   ServiceIsolate::BootVmServiceLibrary();
 
   // Register running isolates with service.
-  RegisterRunningIsolatesVisitor register_isolates(isolate);
+  RegisterRunningIsolatesVisitor register_isolates(thread);
   if (FLAG_trace_service) {
     OS::Print("vm-service: Registering running isolates.\n");
   }
diff --git a/runtime/lib/vmservice_patch.dart b/runtime/lib/vmservice_patch.dart
new file mode 100644
index 0000000..e9b4da7
--- /dev/null
+++ b/runtime/lib/vmservice_patch.dart
@@ -0,0 +1,12 @@
+// 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.
+
+patch bool sendIsolateServiceMessage(SendPort sp, List m)
+    native "VMService_SendIsolateServiceMessage";
+patch void sendRootServiceMessage(List m)
+    native "VMService_SendRootServiceMessage";
+patch void _onStart() native "VMService_OnStart";
+patch void _onExit() native "VMService_OnExit";
+patch bool _vmListenStream(String streamId) native "VMService_ListenStream";
+patch void _vmCancelStream(String streamId) native "VMService_CancelStream";
diff --git a/runtime/lib/vmservice_sources.gypi b/runtime/lib/vmservice_sources.gypi
index 9fb590a..6eeb759 100644
--- a/runtime/lib/vmservice_sources.gypi
+++ b/runtime/lib/vmservice_sources.gypi
@@ -2,18 +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.
 
-# Sources that make up the library "dart:_vmservice".
+# Sources that patch the library "dart:_vmservice".
 
 {
   'sources': [
-    'vmservice/vmservice.dart',
+    'vmservice_patch.dart',
     # The above file needs to be first as it imports required libraries.
-    'vmservice/client.dart',
-    'vmservice/constants.dart',
-    'vmservice/running_isolate.dart',
-    'vmservice/running_isolates.dart',
-    'vmservice/message.dart',
-    'vmservice/message_router.dart',
     'vmservice.cc',
   ],
 }
diff --git a/runtime/observatory/lib/elements.dart b/runtime/observatory/lib/elements.dart
index bcaf0ab..51309f5 100644
--- a/runtime/observatory/lib/elements.dart
+++ b/runtime/observatory/lib/elements.dart
@@ -37,6 +37,7 @@
 export 'package:observatory/src/elements/library_ref.dart';
 export 'package:observatory/src/elements/library_view.dart';
 export 'package:observatory/src/elements/logging.dart';
+export 'package:observatory/src/elements/megamorphiccache_view.dart';
 export 'package:observatory/src/elements/metrics.dart';
 export 'package:observatory/src/elements/nav_bar.dart';
 export 'package:observatory/src/elements/object_common.dart';
diff --git a/runtime/observatory/lib/elements.html b/runtime/observatory/lib/elements.html
index 9888697..87376f0 100644
--- a/runtime/observatory/lib/elements.html
+++ b/runtime/observatory/lib/elements.html
@@ -30,6 +30,7 @@
 <link rel="import" href="src/elements/library_ref.html">
 <link rel="import" href="src/elements/library_view.html">
 <link rel="import" href="src/elements/logging.html">
+<link rel="import" href="src/elements/megamorphiccache_view.html">
 <link rel="import" href="src/elements/metrics.html">
 <link rel="import" href="src/elements/nav_bar.html">
 <link rel="import" href="src/elements/object_common.html">
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index 7b2217a..c4050e5 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -88,6 +88,7 @@
 
   void _onEvent(ServiceEvent event) {
     switch(event.kind) {
+      case ServiceEvent.kVMUpdate:
       case ServiceEvent.kIsolateStart:
       case ServiceEvent.kIsolateRunnable:
       case ServiceEvent.kIsolateUpdate:
@@ -223,6 +224,13 @@
   }
 
   void handleException(e, st) {
+    if (e is ServerRpcException) {
+      if (e.code == ServerRpcException.kFeatureDisabled) return;
+      if (e.code == ServerRpcException.kVMMustBePaused) return;
+      if (e.code == ServerRpcException.kCannotAddBreakpoint) return;
+      Logger.root.fine('Dropping exception: ${e}\n${st}');
+    }
+
     // TODO(turnidge): Report this failure via analytics.
     Logger.root.warning('Caught exception: ${e}\n${st}');
     notifications.add(new Notification.fromException(e, st));
diff --git a/runtime/observatory/lib/src/app/view_model.dart b/runtime/observatory/lib/src/app/view_model.dart
index 659091b..072b156 100644
--- a/runtime/observatory/lib/src/app/view_model.dart
+++ b/runtime/observatory/lib/src/app/view_model.dart
@@ -68,7 +68,7 @@
 
   HtmlElement _makeExpander() {
     var expander = new SpanElement();
-    expander.style.minWidth = '1.5em';
+    expander.style.minWidth = '2em';
     listeners.add(expander.onClick.listen(onClick));
     return expander;
   }
diff --git a/runtime/observatory/lib/src/debugger/debugger_location.dart b/runtime/observatory/lib/src/debugger/debugger_location.dart
index a517cd2..31facf2 100644
--- a/runtime/observatory/lib/src/debugger/debugger_location.dart
+++ b/runtime/observatory/lib/src/debugger/debugger_location.dart
@@ -42,23 +42,29 @@
         "Invalid source location '${locDesc}'"));
   }
 
-  static Future<DebuggerLocation> _currentLocation(Debugger debugger) {
+  static Future<Frame> _currentFrame(Debugger debugger) async {
     ServiceMap stack = debugger.stack;
     if (stack == null || stack['frames'].length == 0) {
-      return new Future.value(new DebuggerLocation.error(
-          'A script must be provided when the stack is empty'));
+      return null;
     }
-    var frame = stack['frames'][debugger.currentFrame];
+    return stack['frames'][debugger.currentFrame];
+  }
+
+  static Future<DebuggerLocation> _currentLocation(Debugger debugger) async {
+    var frame = await _currentFrame(debugger);
+    if (frame == null) {
+      return new DebuggerLocation.error(
+          'A script must be provided when the stack is empty');
+    }
     Script script = frame.location.script;
-    return script.load().then((_) {
-      var line = script.tokenToLine(frame.location.tokenPos);
-      var col = script.tokenToCol(frame.location.tokenPos);
-      return new Future.value(new DebuggerLocation.file(script, line, col));
-    });
+    await script.load();
+    var line = script.tokenToLine(frame.location.tokenPos);
+    var col = script.tokenToCol(frame.location.tokenPos);
+    return new DebuggerLocation.file(script, line, col);
   }
 
   static Future<DebuggerLocation> _parseScriptLine(Debugger debugger,
-                                                   Match match) {
+                                                   Match match) async {
     var scriptName = match.group(1);
     if (scriptName != null) {
       scriptName = scriptName.substring(0, scriptName.length - 1);
@@ -84,28 +90,25 @@
 
     if (scriptName != null) {
       // Resolve the script.
-      return _lookupScript(debugger.isolate, scriptName).then((scripts) {
-        if (scripts.length == 0) {
-          return new DebuggerLocation.error("Script '${scriptName}' not found");
-        } else if (scripts.length == 1) {
-          return new DebuggerLocation.file(scripts[0], line, col);
-        } else {
-          // TODO(turnidge): Allow the user to disambiguate.
-          return new DebuggerLocation.error("Script '${scriptName}' is ambigous");
-        }
-      });
+      var scripts = await _lookupScript(debugger.isolate, scriptName);
+      if (scripts.length == 0) {
+        return new DebuggerLocation.error("Script '${scriptName}' not found");
+      } else if (scripts.length == 1) {
+        return new DebuggerLocation.file(scripts[0], line, col);
+      } else {
+        // TODO(turnidge): Allow the user to disambiguate.
+        return new DebuggerLocation.error("Script '${scriptName}' is ambigous");
+      }
     } else {
       // No script provided.  Default to top of stack for now.
-      ServiceMap stack = debugger.stack;
-      if (stack == null || stack['frames'].length == 0) {
+      var frame = await _currentFrame(debugger);
+      if (frame == null) {
         return new Future.value(new DebuggerLocation.error(
             'A script must be provided when the stack is empty'));
       }
-      var frame = stack['frames'][debugger.currentFrame];
       Script script = frame.location.script;
-      return script.load().then((_) {
-        return new Future.value(new DebuggerLocation.file(script, line, col));
-      });
+      await script.load();
+      return new DebuggerLocation.file(script, line, col);
     }
   }
 
@@ -160,7 +163,10 @@
 
   static Future<List<Class>> _lookupClass(Isolate isolate,
                                           String name,
-                                          { bool allowPrefix: false }) {
+                                          { bool allowPrefix: false }) async {
+    if (isolate == null) {
+      return [];
+    }
     var pending = [];
     for (var lib in isolate.libraries) {
       assert(lib.loaded);
@@ -170,23 +176,22 @@
         }
       }
     }
-    return Future.wait(pending).then((_) {
-      var matches = [];
-      for (var lib in isolate.libraries) {
-        for (var cls in lib.classes) {
-          if (allowPrefix) {
-            if (cls.name.startsWith(name)) {
-              matches.add(cls);
-            }
-          } else {
-            if (name == cls.name) {
-              matches.add(cls);
-            }
+    await Future.wait(pending);
+    var matches = [];
+    for (var lib in isolate.libraries) {
+      for (var cls in lib.classes) {
+        if (allowPrefix) {
+          if (cls.name.startsWith(name)) {
+            matches.add(cls);
+          }
+        } else {
+          if (name == cls.name) {
+            matches.add(cls);
           }
         }
       }
-      return matches;
-    });
+    }
+    return matches;
   }
 
   static ServiceFunction _getConstructor(Class cls, String name) {
@@ -255,7 +260,7 @@
   }
 
   static RegExp partialSourceLocMatcher =
-      new RegExp(r'^([^\d:]?[^:]+[:]?)?(\d+)?([:]\d+)?');
+      new RegExp(r'^([^\d:]?[^:]+[:]?)?(\d+)?([:]\d*)?');
   static RegExp partialFunctionMatcher = new RegExp(r'^([^.]*)([.][^.]*)?');
 
   /// Completes a partial source location description.
@@ -326,25 +331,105 @@
     }
   }
 
-  static Future<List<String>> _completeFile(Debugger debugger, Match match) {
-    var scriptName = match.group(1);
-    var lineStr = match.group(2);
-    var colStr = match.group(3);
-    if (lineStr != null || colStr != null) {
-      // TODO(turnidge): Complete valid line and column numbers.
-      return new Future.value([]);
-    }
-    scriptName = (scriptName == null ? '' : scriptName);
+  static bool _startsWithDigit(String s) {
+    return '0'.compareTo(s[0]) <= 0 && '9'.compareTo(s[0]) >= 0;
+  }
 
-    return _lookupScript(debugger.isolate, scriptName, allowPrefix:true)
-      .then((scripts) {
+  static Future<List<String>> _completeFile(
+      Debugger debugger, Match match) async {
+    var scriptName;
+    var scriptNameComplete = false;
+    var lineStr;
+    var lineStrComplete = false;
+    var colStr;
+    if (_startsWithDigit(match.group(1))) {
+      // CASE 1: We have matched a prefix of (lineStr:)(colStr)
+      var frame = await _currentFrame(debugger);
+      if (frame == null) {
+        return [];
+      }
+      scriptName = frame.location.script.name;
+      scriptNameComplete = true;
+      lineStr = match.group(1);
+      lineStr = (lineStr == null ? '' : lineStr);
+      if (lineStr.endsWith(':')) {
+        lineStr = lineStr.substring(0, lineStr.length - 1);
+        lineStrComplete = true;
+      }
+      colStr = match.group(2);
+      colStr = (colStr == null ? '' : colStr);
+    } else {
+      // CASE 2: We have matched a prefix of (scriptName:)(lineStr)(:colStr)
+      scriptName = match.group(1);
+      scriptName = (scriptName == null ? '' : scriptName);
+      if (scriptName.endsWith(':')) {
+        scriptName = scriptName.substring(0, scriptName.length - 1);
+        scriptNameComplete = true;
+      }
+      lineStr = match.group(2);
+      lineStr = (lineStr == null ? '' : lineStr);
+      colStr = match.group(3);
+      colStr = (colStr == null ? '' : colStr);
+      if (colStr.startsWith(':')) {
+        lineStrComplete = true;
+        colStr = colStr.substring(1);
+      }
+    }
+
+    if (!scriptNameComplete) {
+      // The script name is incomplete.  Complete it.
+      var scripts =
+          await _lookupScript(debugger.isolate, scriptName, allowPrefix:true);
+      List completions = [];
+      for (var script in scripts) {
+        completions.add(script.name + ':');
+      }
+      completions.sort();
+      return completions;
+
+    } else {
+      // The script name is complete.  Look it up.
+      var scripts =
+          await _lookupScript(debugger.isolate, scriptName, allowPrefix:false);
+      if (scripts.isEmpty) {
+        return [];
+      }
+      var script = scripts[0];
+      await script.load();
+      if (!lineStrComplete) {
+        // Complete the line.
+        var sharedPrefix = '${script.name}:';
         List completions = [];
-        for (var script in scripts) {
-          completions.add(script.name + ':');
+        for (var line in script.lines) {
+          if (line.possibleBpt) {
+            var currentLineStr = line.line.toString();
+            if (currentLineStr.startsWith(lineStr)) {
+              completions.add('${sharedPrefix}${currentLineStr} ');
+              completions.add('${sharedPrefix}${currentLineStr}:');
+            }
+          }
         }
-        completions.sort();
         return completions;
-      });
+
+      } else {
+        // Complete the column.
+        int lineNum = int.parse(lineStr);
+        var scriptLine = script.getLine(lineNum);
+        if (!scriptLine.possibleBpt) {
+          return [];
+        }
+        var sharedPrefix = '${script.name}:${lineStr}:';
+        List completions = [];
+        int maxCol = scriptLine.text.trimRight().runes.length;
+        for (int i = 1; i <= maxCol; i++) {
+          var currentColStr = i.toString();
+          if (currentColStr.startsWith(colStr)) {
+            completions.add('${sharedPrefix}${currentColStr} ');
+          }
+        }
+        return completions;
+      }
+    }
   }
 
   String toString() {
diff --git a/runtime/observatory/lib/src/elements/class_tree.html b/runtime/observatory/lib/src/elements/class_tree.html
index 5217e61..7f40600 100644
--- a/runtime/observatory/lib/src/elements/class_tree.html
+++ b/runtime/observatory/lib/src/elements/class_tree.html
@@ -11,7 +11,7 @@
         border-spacing: 0px;
         width: 100%;
         margin-bottom: 20px
-      vertical-align: middle;
+        vertical-align: middle;
       }
 
       tr {
@@ -21,6 +21,10 @@
       tr:hover {
         background-color: #FAFAFA;
       }
+
+      th {
+        text-align: left;
+      }
     </style>
     <nav-bar>
       <top-nav-menu last="{{ true }}"></top-nav-menu>
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index 4723358..4310075 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -6,6 +6,7 @@
 
 import 'dart:async';
 import 'dart:html';
+import 'dart:math';
 import 'observatory_element.dart';
 import 'package:observatory/app.dart';
 import 'package:observatory/cli.dart';
@@ -516,7 +517,7 @@
   SetCommand(Debugger debugger)
       : super(debugger, 'set', []);
 
-  static var _boeValues = ['all', 'none', 'unhandled'];
+  static var _boeValues = ['All', 'None', 'Unhandled'];
   static var _boolValues = ['false', 'true'];
 
   static var _options = {
@@ -529,7 +530,7 @@
   };
 
   static Future _setBreakOnException(debugger, name, value) async {
-    var result = await debugger.isolate.setExceptionPauseInfo(value);
+    var result = await debugger.isolate.setExceptionPauseMode(value);
     if (result.isError) {
       debugger.console.print(result.toString());
     } else {
@@ -963,27 +964,62 @@
   String helpShort = 'Switch the current isolate';
 
   String helpLong =
-      'Switch the current isolate.\n'
+      'Switch, list, or rename isolates.\n'
       '\n'
       'Syntax: isolate <number>\n'
       '        isolate <name>\n';
 }
 
+String _isolateRunState(Isolate isolate) {
+  if (isolate.paused) {
+    return 'paused';
+  } else if (isolate.running) {
+    return 'running';
+  } else if (isolate.idle) {
+    return 'idle';
+  } else {
+    return 'unknown';
+  }
+}
+
 class IsolateListCommand extends DebuggerCommand {
   IsolateListCommand(Debugger debugger) : super(debugger, 'list', []);
 
-  Future run(List<String> args) {
+  Future run(List<String> args) async {
     if (debugger.vm == null) {
       debugger.console.print(
           "Internal error: vm has not been set");
-      return new Future.value(null);
+      return;
     }
+
+    // Refresh all isolates first.
+    var pending = [];
     for (var isolate in debugger.vm.isolates) {
-      String current = (isolate == debugger.isolate ? ' *' : '');
-      debugger.console.print(
-          "Isolate ${isolate.number} '${isolate.name}'${current}");
+      pending.add(isolate.reload());
     }
-    return new Future.value(null);
+    await Future.wait(pending);
+
+    const maxIdLen = 10;
+    const maxRunStateLen = 7;
+    var maxNameLen = 'NAME'.length;
+    for (var isolate in debugger.vm.isolates) {
+      maxNameLen = max(maxNameLen, isolate.name.length);
+    }
+    debugger.console.print("${'ID'.padLeft(maxIdLen, ' ')} "
+                           "${'ORIGIN'.padLeft(maxIdLen, ' ')} "
+                           "${'NAME'.padRight(maxNameLen, ' ')} "
+                           "${'STATE'.padRight(maxRunStateLen, ' ')} "
+                           "CURRENT");
+    for (var isolate in debugger.vm.isolates) {
+      String current = (isolate == debugger.isolate ? '*' : '');
+      debugger.console.print(
+          "${isolate.number.toString().padLeft(maxIdLen, ' ')} "
+          "${isolate.originNumber.toString().padLeft(maxIdLen, ' ')} "
+          "${isolate.name.padRight(maxNameLen, ' ')} "
+          "${_isolateRunState(isolate).padRight(maxRunStateLen, ' ')} "
+          "${current}");
+    }
+    debugger.console.newline();
   }
 
   String helpShort = 'List all isolates';
@@ -1087,6 +1123,72 @@
       'Syntax: refresh <subcommand>\n';
 }
 
+class VmListCommand extends DebuggerCommand {
+  VmListCommand(Debugger debugger) : super(debugger, 'list', []);
+
+  Future run(List<String> args) async {
+    if (args.length > 0) {
+      debugger.console.print('vm list expects no arguments');
+      return;
+    }
+    if (debugger.vm == null) {
+      debugger.console.print("No connected VMs");
+      return;
+    }
+    // TODO(turnidge): Right now there is only one vm listed.
+    var vmList = [debugger.vm];
+
+    var maxAddrLen = 'ADDRESS'.length;
+    var maxNameLen = 'NAME'.length;
+
+    for (var vm in vmList) {
+      maxAddrLen = max(maxAddrLen, vm.target.networkAddress.length);
+      maxNameLen = max(maxNameLen, vm.name.length);
+    }
+
+    debugger.console.print("${'ADDRESS'.padRight(maxAddrLen, ' ')} "
+                           "${'NAME'.padRight(maxNameLen, ' ')} "
+                           "CURRENT");
+    for (var vm in vmList) {
+      String current = (vm == debugger.vm ? '*' : '');
+      debugger.console.print(
+          "${vm.target.networkAddress.padRight(maxAddrLen, ' ')} "
+          "${vm.name.padRight(maxNameLen, ' ')} "
+          "${current}");
+    }
+  }
+
+  String helpShort = 'List all connected Dart virtual machines';
+
+  String helpLong =
+      'List all connected Dart virtual machines..\n'
+      '\n'
+      'Syntax: vm list\n';
+}
+
+class VmNameCommand extends DebuggerCommand {
+  VmNameCommand(Debugger debugger) : super(debugger, 'name', []);
+
+  Future run(List<String> args) async {
+    if (args.length != 1) {
+      debugger.console.print('vm name expects one argument');
+      return;
+    }
+    if (debugger.vm == null) {
+      debugger.console.print('There is no current vm');
+      return;
+    }
+    await debugger.vm.setName(args[0]);
+  }
+
+  String helpShort = 'Rename the current Dart virtual machine';
+
+  String helpLong =
+      'Rename the current Dart virtual machine.\n'
+      '\n'
+      'Syntax: vm name <name>\n';
+}
+
 class VmRestartCommand extends DebuggerCommand {
   VmRestartCommand(Debugger debugger) : super(debugger, 'restart', []);
 
@@ -1117,6 +1219,8 @@
 
 class VmCommand extends DebuggerCommand {
   VmCommand(Debugger debugger) : super(debugger, 'vm', [
+      new VmListCommand(debugger),
+      new VmNameCommand(debugger),
       new VmRestartCommand(debugger),
   ]);
 
@@ -1479,6 +1583,11 @@
 
   void onEvent(ServiceEvent event) {
     switch(event.kind) {
+      case ServiceEvent.kVMUpdate:
+        var vm = event.owner;
+        console.print("VM ${vm.target.networkAddress} renamed to '${vm.name}'");
+        break;
+
       case ServiceEvent.kIsolateStart:
         {
           var iso = event.owner;
@@ -1771,6 +1880,7 @@
   }
 
   StreamSubscription _resizeSubscription;
+  Future<StreamSubscription> _vmSubscriptionFuture;
   Future<StreamSubscription> _isolateSubscriptionFuture;
   Future<StreamSubscription> _debugSubscriptionFuture;
   Future<StreamSubscription> _stdoutSubscriptionFuture;
@@ -1792,6 +1902,8 @@
     debugger.init();
 
     _resizeSubscription = window.onResize.listen(_onResize);
+    _vmSubscriptionFuture =
+        app.vm.listenEventStream(VM.kVMStream, debugger.onEvent);
     _isolateSubscriptionFuture =
         app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent);
     _debugSubscriptionFuture =
@@ -1854,6 +1966,8 @@
     debugger.isolate = null;
     _resizeSubscription.cancel();
     _resizeSubscription = null;
+    cancelFutureSubscription(_vmSubscriptionFuture);
+    _vmSubscriptionFuture = null;
     cancelFutureSubscription(_isolateSubscriptionFuture);
     _isolateSubscriptionFuture = null;
     cancelFutureSubscription(_debugSubscriptionFuture);
@@ -2321,13 +2435,13 @@
   var modalCallback = null;
 
   void enterMode(String prompt, callback) {
-    assert(prompt == null);
+    assert(modalPrompt == null);
     modalPrompt = prompt;
     modalCallback = callback;
   }
 
   void exitMode() {
-    assert(prompt != null);
+    assert(modalPrompt != null);
     modalPrompt = null;
     modalCallback = null;
   }
diff --git a/runtime/observatory/lib/src/elements/heap_profile.html b/runtime/observatory/lib/src/elements/heap_profile.html
index 362a8cb..5e05d55 100644
--- a/runtime/observatory/lib/src/elements/heap_profile.html
+++ b/runtime/observatory/lib/src/elements/heap_profile.html
@@ -57,10 +57,10 @@
 }
 
 .chart-host-wrapper {
-height: 300px;
+height: 200px;
 }
 .chart-legend-host {
-max-height: 300px;
+max-height: 200px;
 overflow-x: auto;
 overflow-y: auto;
 }
@@ -129,10 +129,11 @@
             <div class="memberValue">{{ isolate.newSpace.averageCollectionPeriodInMillis.toStringAsFixed(2) }} ms</div>
           </div>
         </div>
+        <br>
         <div class="chart-wrapper" id="new-pie-chart">
           <div class="chart-host-wrapper">
-              <div class="chart-host"></div>
               <div class="chart-legend-host"></div>
+              <div class="chart-host"></div>
           </div>
         </div>
       </div>
@@ -171,6 +172,7 @@
             <div class="memberValue">{{ isolate.oldSpace.averageCollectionPeriodInMillis.toStringAsFixed(2) }} ms</div>
           </div>
         </div>
+        <br>
         <div class="chart-wrapper" id="old-pie-chart">
           <div class="chart-host-wrapper">
               <div class="chart-host"></div>
diff --git a/runtime/observatory/lib/src/elements/inbound_reference.dart b/runtime/observatory/lib/src/elements/inbound_reference.dart
index eb369ba..c291cf6 100644
--- a/runtime/observatory/lib/src/elements/inbound_reference.dart
+++ b/runtime/observatory/lib/src/elements/inbound_reference.dart
@@ -14,11 +14,10 @@
   @published ObservableMap ref;
   InboundReferenceElement.created() : super.created();
 
-  ServiceObject get source => ref['source'];
-
   // I.e., inbound references to 'source' for recursive pointer chasing.
   @observable ObservableList inboundReferences;
   Future<ServiceObject> fetchInboundReferences(arg) {
+    var source = ref['source'];
     return source.isolate.getInboundReferences(source, arg)
         .then((ServiceMap response) {
           inboundReferences = new ObservableList.from(response['references']);
diff --git a/runtime/observatory/lib/src/elements/inbound_reference.html b/runtime/observatory/lib/src/elements/inbound_reference.html
index e1803e5..4ca13c3 100644
--- a/runtime/observatory/lib/src/elements/inbound_reference.html
+++ b/runtime/observatory/lib/src/elements/inbound_reference.html
@@ -17,12 +17,12 @@
       <template if="{{ ref['_parentWordOffset'] != null }}">
         from word[{{ ref['_parentWordOffset'] }}] of
       </template>
-      <any-service-ref ref="{{ source }}"></any-service-ref>
+      <any-service-ref ref="{{ ref['source'] }}"></any-service-ref>
       <curly-block callback="{{ expander() }}">
         <div class="memberList">
           <div class="memberItem">
             <div class="memberName">
-              <template repeat="{{ reference in inboundReferences] }}">
+              <template repeat="{{ reference in inboundReferences }}">
                 <inbound-reference ref="{{ reference }}"></inbound-reference>
               </template>
             </div>
diff --git a/runtime/observatory/lib/src/elements/isolate_ref.html b/runtime/observatory/lib/src/elements/isolate_ref.html
index ccc8a20..edfb3ea 100644
--- a/runtime/observatory/lib/src/elements/isolate_ref.html
+++ b/runtime/observatory/lib/src/elements/isolate_ref.html
@@ -2,7 +2,7 @@
 <link rel="import" href="service_ref.html">
 <polymer-element name="isolate-ref" extends="service-ref">
 <template><link rel="stylesheet" href="css/shared.css">
-  <a on-click="{{ goto }}" _href="{{ url }}">{{ ref.name }}</a>
+  <a on-click="{{ goto }}" _href="{{ url }}">Isolate {{ ref.number }} ({{ ref.name }})</a>
 </template>
 </polymer-element>
 
diff --git a/runtime/observatory/lib/src/elements/isolate_summary.dart b/runtime/observatory/lib/src/elements/isolate_summary.dart
index 12ebe81..b0b2e06 100644
--- a/runtime/observatory/lib/src/elements/isolate_summary.dart
+++ b/runtime/observatory/lib/src/elements/isolate_summary.dart
@@ -97,6 +97,15 @@
         new CounterChart(shadowRoot.querySelector('#isolate-counter-chart'));
   }
 
+  detached() {
+    super.detached();
+    var host = shadowRoot.querySelector('#isolate-counter-chart-host');
+    host.children.clear();
+    var legendHost =
+        shadowRoot.querySelector('#isolate-counter-chart-legend-host');
+    legendHost.children.clear();
+  }
+
   void countersChanged(oldValue) {
     if (counters == null) {
       return;
diff --git a/runtime/observatory/lib/src/elements/isolate_summary.html b/runtime/observatory/lib/src/elements/isolate_summary.html
index 6f63472..c146bfa 100644
--- a/runtime/observatory/lib/src/elements/isolate_summary.html
+++ b/runtime/observatory/lib/src/elements/isolate_summary.html
@@ -9,36 +9,18 @@
   <template>
     <link rel="stylesheet" href="css/shared.css">
     <div class="flex-row">
-      <div class="flex-item-10-percent">
-        <img src="img/isolate_icon.png">
-      </div>
-      <div class="flex-item-10-percent">
-        {{ isolate.number }}
-      </div>
-      <div class="flex-item-20-percent">
+      <div>
         <isolate-ref ref="{{ isolate }}"></isolate-ref>
       </div>
-      <div class="flex-item-10-percent">
+      <div style="flex:1"></div>
+      <div>
         <isolate-run-state isolate="{{ isolate }}"></isolate-run-state>
-      </div>
-      <div class="flex-item-40-percent">
         <isolate-location isolate="{{ isolate }}"></isolate-location>
         [<a on-click="{{ goto }}" _href="{{ gotoLink('/debugger', isolate) }}">debug</a>]
       </div>
-      <div class="flex-item-10-percent">
-      </div>
     </div>
-
-    <div class="flex-row">
-      <div class="flex-item-20-percent"></div>
-      <div class="flex-item-60-percent">
-        <hr>
-      </div>
-      <div class="flex-item-20-percent"></div>
-    </div>
-
+    <br>
     <isolate-shared-summary isolate="{{ isolate }}"></isolate-shared-summary>
-
   </template>
 </polymer-element>
 
@@ -106,7 +88,7 @@
       .errorBox {
         background-color: #f5f5f5;
         border: 1px solid #ccc;
-        padding: 10px;
+        padding: 2em;
         font-family: consolas, courier, monospace;
         font-size: 1em;
         line-height: 1.2em;
@@ -121,10 +103,10 @@
       </div>
     </template>
     <div class="flex-row">
-      <div class="flex-item-50-percent">
+      <div style="flex:2">
         <isolate-counter-chart counters="{{ isolate.counters }}"></isolate-counter-chart>
       </div>
-      <div class="flex-item-40-percent">
+      <div style="flex:1">
         <div class="memberList">
           <div class="memberItem">
             <div class="memberName">new heap</div>
@@ -204,8 +186,6 @@
         </template>
         -->
       </div>
-      <div class="flex-item-10-percent">
-      </div>
     </div>
   </template>
 </polymer-element>
@@ -216,20 +196,24 @@
     <style>
 .chart-wrapper {
 }
-
 .chart-host-wrapper {
-  height: 200px;
+  display: flex;
+  flex-direction: row;
+  max-height: 250px;
+}
+.chart-host {
+  flex: 1;
 }
 .chart-legend-host {
-  max-height: 200px;
+  flex: 1;
   overflow-x: auto;
   overflow-y: auto;
 }
     </style>
     <div class="chart-wrapper" id="isolate-counter-chart">
       <div class="chart-host-wrapper">
-          <div class="chart-host"></div>
-          <div class="chart-legend-host"></div>
+        <div class="chart-host" id="isolate-counter-chart-host"></div>
+        <div class="chart-legend-host" id="isolate-counter-chart-legend-host"></div>
       </div>
   </div>
   </template>
diff --git a/runtime/observatory/lib/src/elements/isolate_view.html b/runtime/observatory/lib/src/elements/isolate_view.html
index 8a928e7..915930fc 100644
--- a/runtime/observatory/lib/src/elements/isolate_view.html
+++ b/runtime/observatory/lib/src/elements/isolate_view.html
@@ -32,28 +32,22 @@
       <nav-refresh callback="{{ refresh }}"></nav-refresh>
     </nav-bar>
 
-    <div class="content">
+    <div class="content-centered">
       <h1>isolate '{{ isolate.name }}'</h1>
-    </div>
-
-    <br>
-    <div class="flex-row">
-      <div class="flex-item-10-percent">
-      </div>
-      <div class="flex-item-30-percent">
-        <isolate-run-state isolate="{{ isolate }}"></isolate-run-state>
-      </div>
-      <div class="flex-item-50-percent">
-        <isolate-location isolate="{{ isolate }}"></isolate-location>
-      </div>
-      <div class="flex-item-10-percent">
+      <br>
+      <div class="flex-row">
+        <div style="flex:1"></div>
+        <div>
+          <isolate-run-state isolate="{{ isolate }}"></isolate-run-state>
+          <isolate-location isolate="{{ isolate }}"></isolate-location>
+          [<a on-click="{{ goto }}" _href="{{ gotoLink('/debugger', isolate) }}">debug</a>]
+        </div>
       </div>
     </div>
-    <br>
 
     <template if="{{ isolate.topFrame != null }}">
       <br>
-      <div class="content-centered-big">
+      <div class="content-centered">
         <source-inset location="{{ isolate.topFrame.function.location }}"
                       currentPos="{{ isolate.topFrame.location.tokenPos }}"
                       height="200px">
@@ -61,23 +55,13 @@
       </div>
     </template>
 
-    <div class="flex-row">
-      <div class="flex-item-20-percent"></div>
-      <div class="flex-item-60-percent"><hr></div>
-      <div class="flex-item-20-percent"></div>
-    </div>
-
-    <br>
-
-    <isolate-shared-summary isolate="{{ isolate }}"></isolate-shared-summary>
-
-    <div class="flex-row">
-      <div class="flex-item-20-percent"></div>
-      <div class="flex-item-60-percent"><hr></div>
-      <div class="flex-item-20-percent"></div>
+    <div class="content-centered">
+      <hr>
+      <isolate-shared-summary isolate="{{ isolate }}"></isolate-shared-summary>
     </div>
 
     <div class="content-centered">
+      <hr>
       <div class="flex-row">
         <div class="flex-item-50-percent">
           <div class="memberList">
@@ -112,9 +96,8 @@
       </div>
     </div>
 
-    <hr>
-
-    <div class="content">
+    <div class="content-centered">
+      <hr>
       libraries ({{ isolate.libraries.length }})
       <curly-block expand="{{ isolate.libraries.length <= 8 }}">
         <div class="memberList">
@@ -129,13 +112,12 @@
       </curly-block>
     </div>
 
-    <hr>
-
-    <div class="content">
+    <div class="content-centered">
+      <hr>
       <eval-box callback="{{ evaluate }}"></eval-box>
     </div>
 
-    <div class="content-centered-big">
+    <div class="content-centered">
       <hr>
       <script-inset script="{{ rootLibrary.rootScript }}">
       </script-inset>
diff --git a/runtime/observatory/lib/src/elements/megamorphiccache_view.dart b/runtime/observatory/lib/src/elements/megamorphiccache_view.dart
new file mode 100644
index 0000000..59cb301
--- /dev/null
+++ b/runtime/observatory/lib/src/elements/megamorphiccache_view.dart
@@ -0,0 +1,21 @@
+// 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 megamorphiccache_view;
+
+import 'dart:async';
+import 'observatory_element.dart';
+import 'package:observatory/service.dart';
+import 'package:polymer/polymer.dart';
+
+@CustomTag('megamorphiccache-view')
+class MegamorphicCacheViewElement extends ObservatoryElement {
+  @published MegamorphicCache megamorphicCache;
+
+  MegamorphicCacheViewElement.created() : super.created();
+
+  Future refresh() {
+    return megamorphicCache.reload();
+  }
+}
diff --git a/runtime/observatory/lib/src/elements/megamorphiccache_view.html b/runtime/observatory/lib/src/elements/megamorphiccache_view.html
new file mode 100644
index 0000000..db073e6
--- /dev/null
+++ b/runtime/observatory/lib/src/elements/megamorphiccache_view.html
@@ -0,0 +1,51 @@
+<link rel="import" href="../../../../packages/polymer/polymer.html">
+<link rel="import" href="class_ref.html">
+<link rel="import" href="error_view.html">
+<link rel="import" href="field_ref.html">
+<link rel="import" href="function_ref.html">
+<link rel="import" href="inbound_reference.html">
+<link rel="import" href="instance_ref.html">
+<link rel="import" href="observatory_element.html">
+<link rel="import" href="object_common.html">
+<link rel="import" href="nav_bar.html">
+<link rel="import" href="eval_link.html">
+
+<polymer-element name="megamorphiccache-view" extends="observatory-element">
+  <template>
+    <link rel="stylesheet" href="css/shared.css">
+    <nav-bar>
+      <top-nav-menu></top-nav-menu>
+      <vm-nav-menu vm="{{ megamorphicCache.isolate.vm }}"></vm-nav-menu>
+      <isolate-nav-menu isolate="{{ megamorphicCache.isolate }}"></isolate-nav-menu>
+      <nav-menu link="." anchor="object" last="{{ true }}"></nav-menu>
+      <nav-refresh callback="{{ refresh }}"></nav-refresh>
+    </nav-bar>
+
+    <div class="content">
+      <object-common object="{{ megamorphicCache }}"></object-common>
+
+      <br><br>
+
+      <div class="memberList">
+        <div class="memberItem">
+          <div class="memberName">mask</div>
+          <div class="memberValue"> 
+            {{ megamorphicCache.mask }}
+          </div>
+        </div>
+        <div class="memberItem">
+          <div class="memberName">buckets</div>
+          <div class="memberValue">
+            <any-service-ref ref="{{ megamorphicCache.buckets }}"></any-service-ref>
+          </div>
+        </div>
+      </div>
+
+    </div>
+  
+    <hr>
+    <view-footer></view-footer>
+  </template>
+</polymer-element>
+
+<script type="application/dart" src="megamorphiccache_view.dart"></script>
diff --git a/runtime/observatory/lib/src/elements/nav_bar.dart b/runtime/observatory/lib/src/elements/nav_bar.dart
index f8ce11e..db77700 100644
--- a/runtime/observatory/lib/src/elements/nav_bar.dart
+++ b/runtime/observatory/lib/src/elements/nav_bar.dart
@@ -76,6 +76,14 @@
   @published bool last = false;
   @published VM vm;
 
+  String nameAndAddress(name, target) {
+    if (name != null && target != null) {
+      return '${name}@${target.networkAddress}';
+    } else {
+      return '<initializing>';
+    }
+  }
+
   VMNavMenuElement.created() : super.created();
 }
 
diff --git a/runtime/observatory/lib/src/elements/nav_bar.html b/runtime/observatory/lib/src/elements/nav_bar.html
index c52370d..c9e6b62 100644
--- a/runtime/observatory/lib/src/elements/nav_bar.html
+++ b/runtime/observatory/lib/src/elements/nav_bar.html
@@ -178,7 +178,7 @@
 
 <polymer-element name="vm-nav-menu">
   <template>
-    <nav-menu link="/vm" anchor="{{ vm.target.name }}" last="{{ last }}">
+    <nav-menu link="/vm" anchor="{{ nameAndAddress(vm.name, vm.target) }}" last="{{ last }}">
       <template repeat="{{ isolate in vm.isolates }}">
         <nav-menu-item link="{{ makeLink('/inspect', isolate) }}"
 	               anchor="{{ isolate.name }}"></nav-menu-item>
diff --git a/runtime/observatory/lib/src/elements/objectpool_view.dart b/runtime/observatory/lib/src/elements/objectpool_view.dart
index 5b320a1..1e08198 100644
--- a/runtime/observatory/lib/src/elements/objectpool_view.dart
+++ b/runtime/observatory/lib/src/elements/objectpool_view.dart
@@ -12,32 +12,12 @@
 @CustomTag('objectpool-view')
 class ObjectPoolViewElement extends ObservatoryElement {
   @published ObjectPool pool;
-  @published List annotatedEntries;
 
   ObjectPoolViewElement.created() : super.created();
 
   bool isServiceObject(o) => o is ServiceObject;
 
-  void poolChanged(oldValue) {
-    annotateExternalLabels();
-  }
-
-  Future annotateExternalLabels() {
-    var tasks = pool.entries.map((entry) {
-     if (entry is String) {
-       var addr = entry.substring(2);
-       return pool.isolate.getObjectByAddress(addr).then((result) {
-         return result is ServiceObject ? result : null;
-       });
-     } else {
-       return new Future.value(null);
-     }
-    });
-
-    return Future.wait(tasks).then((results) => annotatedEntries = results);
-  }
-
   Future refresh() {
-    return pool.reload().then((_) => annotateExternalLabels());
+    return pool.reload();
   }
 }
diff --git a/runtime/observatory/lib/src/elements/objectpool_view.html b/runtime/observatory/lib/src/elements/objectpool_view.html
index d358fea..4177eea 100644
--- a/runtime/observatory/lib/src/elements/objectpool_view.html
+++ b/runtime/observatory/lib/src/elements/objectpool_view.html
@@ -28,19 +28,19 @@
 
       entries ({{ pool.entries.length }})
       <div class="memberList">
-        <template repeat="{{ index in pool.entries.asMap().keys }}">
+        <template repeat="{{ entry in pool.entries }}">
           <div class="memberItem">
-            <div class="memberName">[{{ index }}]</div>
+            <div class="memberName">[PP+0x{{ entry['offset'].toRadixString(16) }}]</div>
             <div class="memberValue">
-              <template if="{{ isServiceObject(pool.entries[index]) }}">
-                <any-service-ref ref="{{ pool.entries[index] }}">
+              <template if="{{ entry['kind'] == 'Object' }}">
+                <any-service-ref ref="{{ entry['value'] }}">
                 </any-service-ref>
               </template>
-              <template if="{{ !isServiceObject(pool.entries[index]) }}">
-                {{ pool.entries[index] }}
-                <template if="{{ annotatedEntries != null && annotatedEntries[index] != null }}">
-                  (<any-service-ref ref="{{ annotatedEntries[index] }}"></any-service-ref>)
-                </template>
+              <template if="{{ entry['kind'] == 'Immediate' }}">
+                Immediate 0x{{ entry['value'].toRadixString(16) }}
+             </template>
+              <template if="{{ entry['kind'] == 'NativeEntry' }}">
+                NativeEntry 0x{{ entry['value'].toRadixString(16) }}
              </template>
             </div>
           </div>
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index d9d9b64..92930a9 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -425,7 +425,12 @@
       case ServiceEvent.kBreakpointRemoved:
         var loc = event.breakpoint.location;
         if (loc.script == script) {
-          int line = script.tokenToLine(loc.tokenPos);
+          int line;
+          if (loc.tokenPos != null) {
+            line = script.tokenToLine(loc.tokenPos);
+          } else {
+            line = script.tokenToLine(loc.line);
+          }
           if ((line >= _startLine) && (line <= _endLine)) {
             _updateTask.queue();
           }
@@ -539,6 +544,10 @@
                 ? script.tokenToLine(endPos)
                 : script.lines.length + script.lineOffset);
 
+    if (_startLine == null || _endLine == null) {
+      return;
+    }
+
     annotations.clear();
 
     addCurrentExecutionAnnotation();
diff --git a/runtime/observatory/lib/src/elements/service_view.dart b/runtime/observatory/lib/src/elements/service_view.dart
index 26ffd36..c9924a6 100644
--- a/runtime/observatory/lib/src/elements/service_view.dart
+++ b/runtime/observatory/lib/src/elements/service_view.dart
@@ -89,6 +89,11 @@
                   new Element.tag('instructions-view');
               element.instructions = object;
               return element;
+            case 'MegamorphicCache':
+              MegamorphicCacheViewElement element =
+                  new Element.tag('megamorphiccache-view');
+              element.megamorphicCache = object;
+              return element;
             case 'ObjectPool':
               ObjectPoolViewElement element = new Element.tag('objectpool-view');
               element.pool = object;
diff --git a/runtime/observatory/lib/src/elements/vm_view.html b/runtime/observatory/lib/src/elements/vm_view.html
index 3ea8909..55fc712 100644
--- a/runtime/observatory/lib/src/elements/vm_view.html
+++ b/runtime/observatory/lib/src/elements/vm_view.html
@@ -19,10 +19,19 @@
       <nav-refresh callback="{{ refresh }}"></nav-refresh>
     </nav-bar>
 
-    <div class="content">
+    <div class="content-centered">
       <h1>VM</h1>
+      <hr>
       <div class="memberList">
         <div class="memberItem">
+          <div class="memberName">name</div>
+          <div class="memberValue">{{ vm.name }}</div>
+        </div>
+        <div class="memberItem">
+          <div class="memberName">address</div>
+          <div class="memberValue">{{ vm.target.networkAddress }}</div>
+        </div>
+        <div class="memberItem">
           <div class="memberName">version</div>
           <div class="memberValue">{{ vm.version }}</div>
         </div>
@@ -39,14 +48,6 @@
           <div class="memberValue">{{ vm.refreshTime.toString() }}</div>
         </div>
         <div class="memberItem">
-          <div class="memberName">type checks enabled</div>
-          <div class="memberValue">{{ vm.typeChecksEnabled }}</div>
-        </div>
-        <div class="memberItem">
-          <div class="memberName">asserts enabled</div>
-          <div class="memberValue">{{ vm.assertsEnabled }}</div>
-        </div>
-        <div class="memberItem">
           <div class="memberName">pid</div>
           <div class="memberValue">{{ vm.pid }}</div>
         </div>
@@ -57,17 +58,19 @@
           </div>
         </div>
       </div>
+      <br>
+      <br>
+      <h1>Isolates ({{ vm.isolates.length }})</h1>
+      <hr>
+      <ul class="list-group">
+        <template repeat="{{ isolate in vm.isolates }}">
+          <li class="list-group-item">
+            <isolate-summary isolate="{{ isolate }}"></isolate-summary>
+          </li>
+          <hr>
+        </template>
+      </ul>
     </div>
-    <br>
-    <hr>
-    <ul class="list-group">
-      <template repeat="{{ isolate in vm.isolates }}">
-      	<li class="list-group-item">
-          <isolate-summary isolate="{{ isolate }}"></isolate-summary>
-        </li>
-        <hr>
-      </template>
-    </ul>
     <view-footer></view-footer>
   </template>
 </polymer-element>
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index e65f5b7..acb3edf 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -231,6 +231,9 @@
           case 'LocalVarDescriptors':
             obj = new LocalVarDescriptors._empty(owner);
             break;
+          case 'MegamorphicCache':
+            obj = new MegamorphicCache._empty(owner);
+            break;
           case 'ObjectPool':
             obj = new ObjectPool._empty(owner);
             break;
@@ -640,14 +643,15 @@
   @observable int pid = 0;
   @observable DateTime startTime;
   @observable DateTime refreshTime;
-  @observable Duration get upTime =>
-      (new DateTime.now().difference(startTime));
+  @observable Duration get upTime {
+    if (startTime == null) {
+      return null;
+    }
+    return (new DateTime.now().difference(startTime));
+  }
 
   VM() : super._empty(null) {
-    name = 'vm';
-    vmName = 'vm';
-    _cache['vm'] = this;
-    update(toObservable({'id':'vm', 'type':'@VM'}));
+    update(toObservable({'name':'vm', 'type':'@VM'}));
   }
 
   void postServiceEvent(String streamId, Map response, ByteData data) {
@@ -674,6 +678,11 @@
         _isolateCache.remove(isolate.id);
         _buildIsolateList();
       }
+      if (event.kind == ServiceEvent.kIsolateRunnable) {
+        // Force reload once the isolate becomes runnable so that we
+        // update the root library.
+        isolate.reload();
+      }
     }
     var eventStream = _eventStreams[streamId];
     if (eventStream != null) {
@@ -728,6 +737,14 @@
     if (map == null) {
       return null;
     }
+    var type = _stripRef(map['type']);
+    if (type == 'VM') {
+      // Update this VM object.
+      update(map);
+      return this;
+    }
+
+    assert(type == 'Isolate');
     String id = map['id'];
     if (!id.startsWith(_isolateIdPrefix)) {
       // Currently the VM only supports upgrading Isolate ServiceObjects.
@@ -811,6 +828,7 @@
     if (!loaded) {
       // The vm service relies on these events to keep the VM and
       // Isolate types up to date.
+      await listenEventStream(kVMStream, _dispatchEventToIsolate);
       await listenEventStream(kIsolateStream, _dispatchEventToIsolate);
       await listenEventStream(kDebugStream, _dispatchEventToIsolate);
       await listenEventStream(_kGraphStream, _dispatchEventToIsolate);
@@ -818,6 +836,10 @@
     return await invokeRpcNoUpgrade('getVM', {});
   }
 
+  Future setName(String newName) {
+    return invokeRpc('setVMName', { 'name': newName });
+  }
+
   Future<ServiceObject> getFlagList() {
     return invokeRpc('getFlagList', {});
   }
@@ -840,6 +862,7 @@
   Map<String,_EventStreamState> _eventStreams = {};
 
   // Well-known stream ids.
+  static const kVMStream = 'VM';
   static const kIsolateStream = 'Isolate';
   static const kDebugStream = 'Debug';
   static const kGCStream = 'GC';
@@ -870,6 +893,8 @@
   Future get onDisconnect;
 
   void _update(ObservableMap map, bool mapIsRef) {
+    name = map['name'];
+    vmName = map.containsKey('_vmName') ? map['_vmName'] : name;
     if (mapIsRef) {
       return;
     }
@@ -1104,9 +1129,14 @@
   @reflectable VM get vm => owner;
   @reflectable Isolate get isolate => this;
   @observable int number;
+  @observable int originNumber;
   @observable DateTime startTime;
-  @observable Duration get upTime =>
-      (new DateTime.now().difference(startTime));
+  @observable Duration get upTime {
+    if (startTime == null) {
+      return null;
+    }
+    return (new DateTime.now().difference(startTime));
+  }
 
   @observable ObservableMap counters = new ObservableMap();
 
@@ -1335,7 +1365,7 @@
 
   void _update(ObservableMap map, bool mapIsRef) {
     name = map['name'];
-    vmName = map['name'];
+    vmName = map.containsKey('_vmName') ? map['_vmName'] : name;
     number = int.parse(map['number'], onError:(_) => null);
     if (mapIsRef) {
       return;
@@ -1344,6 +1374,7 @@
     loading = false;
 
     _upgradeCollection(map, isolate);
+    originNumber = int.parse(map['_originNumber'], onError:(_) => null);
     rootLibrary = map['rootLib'];
     if (map['entry'] != null) {
       entry = map['entry'];
@@ -1478,8 +1509,8 @@
         break;
 
       default:
-        // Log unrecognized events.
-        Logger.root.severe('Unrecognized event: $event');
+        // Log unexpected events.
+        Logger.root.severe('Unexpected event: $event');
         break;
     }
   }
@@ -1506,7 +1537,9 @@
     } on ServerRpcException catch(e) {
       if (e.code == ServerRpcException.kCannotAddBreakpoint) {
         // Unable to set a breakpoint at the desired line.
-        script.getLine(line).possibleBpt = false;
+        if (script.loaded) {
+          script.getLine(line).possibleBpt = false;
+        }
       }
       rethrow;
     }
@@ -1624,8 +1657,8 @@
     return invokeRpc('setName', {'name': newName});
   }
 
-  Future setExceptionPauseInfo(String exceptions) {
-    return invokeRpc('_setExceptionPauseInfo', {'exceptions': exceptions});
+  Future setExceptionPauseMode(String mode) {
+    return invokeRpc('setExceptionPauseMode', {'mode': mode});
   }
 
   Future<ServiceMap> getStack() {
@@ -1827,6 +1860,7 @@
 /// A [ServiceEvent] is an asynchronous event notification from the vm.
 class ServiceEvent extends ServiceObject {
   /// The possible 'kind' values.
+  static const kVMUpdate               = 'VMUpdate';
   static const kIsolateStart           = 'IsolateStart';
   static const kIsolateRunnable        = 'IsolateRunnable';
   static const kIsolateExit            = 'IsolateExit';
@@ -1944,11 +1978,12 @@
   }
 
   String toString() {
+    var ownerName = owner.id != null ? owner.id.toString() : owner.name;
     if (data == null) {
-      return "ServiceEvent(owner='${owner.id}', kind='${kind}', "
+      return "ServiceEvent(owner='${ownerName}', kind='${kind}', "
           "time=${timestamp})";
     } else {
-      return "ServiceEvent(owner='${owner.id}', kind='${kind}', "
+      return "ServiceEvent(owner='${ownerName}', kind='${kind}', "
           "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})";
     }
   }
@@ -3300,6 +3335,28 @@
   }
 }
 
+class MegamorphicCache extends HeapObject {
+  @observable int mask;
+  @observable Instance buckets;
+
+  bool get canCache => false;
+  bool get immutable => false;
+
+  MegamorphicCache._empty(ServiceObjectOwner owner) : super._empty(owner);
+
+  void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
+    if (mapIsRef) {
+      return;
+    }
+
+    mask = map['_mask'];
+    buckets = map['_buckets'];
+  }
+}
+
 class Instructions extends HeapObject {
   bool get canCache => false;
   bool get immutable => true;
diff --git a/runtime/observatory/observatory_sources.gypi b/runtime/observatory/observatory_sources.gypi
index 87b546f..630ca4c 100644
--- a/runtime/observatory/observatory_sources.gypi
+++ b/runtime/observatory/observatory_sources.gypi
@@ -104,6 +104,8 @@
     'lib/src/elements/library_view.html',
     'lib/src/elements/logging.dart',
     'lib/src/elements/logging.html',
+    'lib/src/elements/megamorphiccache_view.dart',
+    'lib/src/elements/megamorphiccache_view.html',
     'lib/src/elements/metrics.dart',
     'lib/src/elements/metrics.html',
     'lib/src/elements/nav_bar.dart',
diff --git a/runtime/observatory/pubspec.yaml b/runtime/observatory/pubspec.yaml
index dd23a9c..ade59b1 100644
--- a/runtime/observatory/pubspec.yaml
+++ b/runtime/observatory/pubspec.yaml
@@ -1,3 +1,4 @@
+# Generated file DO NOT EDIT
 name: observatory
 version: 1.6.0-dev.1
 transformers:
@@ -14,91 +15,91 @@
 dependencies:
   args: any
   charted: ^0.2.9
-  polymer: any
+  polymer: ^0.16.3
   unittest: < 0.12.0
   usage: any
-  code_transformers: 0.2.9
 dependency_overrides:
   analyzer:
-    path: ../../third_party/observatory_pub_packages/analyzer
+    path: ../../third_party/observatory_pub_packages/packages/analyzer
   args:
-    path: ../../third_party/observatory_pub_packages/args
+    path: ../../third_party/observatory_pub_packages/packages/args
+  async:
+    path: ../../third_party/observatory_pub_packages/packages/async
   barback:
-    path: ../../third_party/observatory_pub_packages/barback
+    path: ../../third_party/observatory_pub_packages/packages/barback
   browser:
-    path: ../../third_party/observatory_pub_packages/browser
+    path: ../../third_party/observatory_pub_packages/packages/browser
   charcode:
-    path: ../../third_party/observatory_pub_packages/charcode
+    path: ../../third_party/observatory_pub_packages/packages/charcode
   charted:
-    path: ../../third_party/observatory_pub_packages/charted
+    path: ../../third_party/observatory_pub_packages/packages/charted
   cli_util:
-    path: ../../third_party/observatory_pub_packages/cli_util
+    path: ../../third_party/observatory_pub_packages/packages/cli_util
   code_transformers:
-    path: ../../third_party/observatory_pub_packages/code_transformers
+    path: ../../third_party/observatory_pub_packages/packages/code_transformers
   collection:
-    path: ../../third_party/observatory_pub_packages/collection
+    path: ../../third_party/observatory_pub_packages/packages/collection
   csslib:
-    path: ../../third_party/observatory_pub_packages/csslib
+    path: ../../third_party/observatory_pub_packages/packages/csslib
   dart_style:
-    path: ../../third_party/observatory_pub_packages/dart_style
+    path: ../../third_party/observatory_pub_packages/packages/dart_style
   glob:
-    path: ../../third_party/observatory_pub_packages/glob
+    path: ../../third_party/observatory_pub_packages/packages/glob
   html:
-    path: ../../third_party/observatory_pub_packages/html
+    path: ../../third_party/observatory_pub_packages/packages/html
   initialize:
-    path: ../../third_party/observatory_pub_packages/initialize
+    path: ../../third_party/observatory_pub_packages/packages/initialize
   intl:
-    path: ../../third_party/observatory_pub_packages/intl
+    path: ../../third_party/observatory_pub_packages/packages/intl
   logging:
-    path: ../../third_party/observatory_pub_packages/logging
+    path: ../../third_party/observatory_pub_packages/packages/logging
   matcher:
-    path: ../../third_party/observatory_pub_packages/matcher
+    path: ../../third_party/observatory_pub_packages/packages/matcher
   observe:
-    path: ../../third_party/observatory_pub_packages/observe
+    path: ../../third_party/observatory_pub_packages/packages/observe
   package_config:
-    path: ../../third_party/observatory_pub_packages/package_config
+    path: ../../third_party/observatory_pub_packages/packages/package_config
   path:
-    path: ../../third_party/observatory_pub_packages/path
+    path: ../../third_party/observatory_pub_packages/packages/path
   petitparser:
-    path: ../../third_party/observatory_pub_packages/petitparser
+    path: ../../third_party/observatory_pub_packages/packages/petitparser
   plugin:
-    path: ../../third_party/observatory_pub_packages/plugin
+    path: ../../third_party/observatory_pub_packages/packages/plugin
   polymer:
-    path: ../../third_party/observatory_pub_packages/polymer
+    path: ../../third_party/observatory_pub_packages/packages/polymer
   polymer_expressions:
-    path: ../../third_party/observatory_pub_packages/polymer_expressions
+    path: ../../third_party/observatory_pub_packages/packages/polymer_expressions
   polymer_interop:
-    path: ../../third_party/observatory_pub_packages/polymer_interop
+    path: ../../third_party/observatory_pub_packages/packages/polymer_interop
   pool:
-    path: ../../third_party/observatory_pub_packages/pool
+    path: ../../third_party/observatory_pub_packages/packages/pool
   quiver:
-    path: ../../third_party/observatory_pub_packages/quiver
+    path: ../../third_party/observatory_pub_packages/packages/quiver
   smoke:
-    path: ../../third_party/observatory_pub_packages/smoke
+    path: ../../third_party/observatory_pub_packages/packages/smoke
   source_maps:
-    path: ../../third_party/observatory_pub_packages/source_maps
+    path: ../../third_party/observatory_pub_packages/packages/source_maps
   source_span:
-    path: ../../third_party/observatory_pub_packages/source_span
+    path: ../../third_party/observatory_pub_packages/packages/source_span
   stack_trace:
-    path: ../../third_party/observatory_pub_packages/stack_trace
+    path: ../../third_party/observatory_pub_packages/packages/stack_trace
   string_scanner:
-    path: ../../third_party/observatory_pub_packages/string_scanner
+    path: ../../third_party/observatory_pub_packages/packages/string_scanner
   template_binding:
-    path: ../../third_party/observatory_pub_packages/template_binding
+    path: ../../third_party/observatory_pub_packages/packages/template_binding
   unittest:
-    path: ../../third_party/observatory_pub_packages/unittest
+    path: ../../third_party/observatory_pub_packages/packages/unittest
   usage:
-    path: ../../third_party/observatory_pub_packages/usage
+    path: ../../third_party/observatory_pub_packages/packages/usage
   utf:
-    path: ../../third_party/observatory_pub_packages/utf
+    path: ../../third_party/observatory_pub_packages/packages/utf
   watcher:
-    path: ../../third_party/observatory_pub_packages/watcher
+    path: ../../third_party/observatory_pub_packages/packages/watcher
   web_components:
-    path: ../../third_party/observatory_pub_packages/web_components
+    path: ../../third_party/observatory_pub_packages/packages/web_components
   when:
-    path: ../../third_party/observatory_pub_packages/when
+    path: ../../third_party/observatory_pub_packages/packages/when
   which:
-    path: ../../third_party/observatory_pub_packages/which
+    path: ../../third_party/observatory_pub_packages/packages/which
   yaml:
-    path: ../../third_party/observatory_pub_packages/yaml
-
+    path: ../../third_party/observatory_pub_packages/packages/yaml
diff --git a/runtime/observatory/tests/service/add_breakpoint_rpc_test.dart b/runtime/observatory/tests/service/add_breakpoint_rpc_test.dart
index f1b3a10..a51a2b3 100644
--- a/runtime/observatory/tests/service/add_breakpoint_rpc_test.dart
+++ b/runtime/observatory/tests/service/add_breakpoint_rpc_test.dart
@@ -8,7 +8,6 @@
 import 'test_helper.dart';
 import 'deferred_library.dart' deferred as deferredLib;
 import 'dart:async';
-import 'dart:developer' as developer;
 
 int value = 0;
 
@@ -18,9 +17,9 @@
 }
 
 Future testMain() async {
-  incValue(incValue(1));  // line 21
+  incValue(incValue(1));  // line 20
 
-  incValue(incValue(1));  // line 23
+  incValue(incValue(1));  // line 22
 
   await deferredLib.loadLibrary();
   deferredLib.deferredTest();
@@ -36,17 +35,17 @@
     var script = rootLib.scripts[0];
 
     // Future breakpoint.
-    var futureBpt1 = await isolate.addBreakpoint(script, 21);
+    var futureBpt1 = await isolate.addBreakpoint(script, 20);
     expect(futureBpt1.number, equals(1));
     expect(futureBpt1.resolved, isFalse);
-    expect(await futureBpt1.location.getLine(), equals(21));
+    expect(await futureBpt1.location.getLine(), equals(20));
     expect(await futureBpt1.location.getColumn(), equals(null));
 
     // Future breakpoint with specific column.
-    var futureBpt2 = await isolate.addBreakpoint(script, 21, 3);
+    var futureBpt2 = await isolate.addBreakpoint(script, 20, 3);
     expect(futureBpt2.number, equals(2));
     expect(futureBpt2.resolved, isFalse);
-    expect(await futureBpt2.location.getLine(), equals(21));
+    expect(await futureBpt2.location.getLine(), equals(20));
     expect(await futureBpt2.location.getColumn(), equals(3));
 
     var stream = await isolate.vm.getEventStream(VM.kDebugStream);
@@ -68,10 +67,10 @@
     // After resolution the breakpoints have assigned line & column.
     expect(resolvedCount, equals(2));
     expect(futureBpt1.resolved, isTrue);
-    expect(await futureBpt1.location.getLine(), equals(21));
+    expect(await futureBpt1.location.getLine(), equals(20));
     expect(await futureBpt1.location.getColumn(), equals(12));
     expect(futureBpt2.resolved, isTrue);
-    expect(await futureBpt2.location.getLine(), equals(21));
+    expect(await futureBpt2.location.getLine(), equals(20));
     expect(await futureBpt2.location.getColumn(), equals(3));
 
     // The first breakpoint hits before value is modified.
@@ -177,19 +176,19 @@
     var script = isolate.rootLibrary.scripts[0];
     // Try all columns, including some columns that are too big.
     for (int col = 1; col <= 50; col++) {
-      var bpt = await isolate.addBreakpoint(script, 21, col);
+      var bpt = await isolate.addBreakpoint(script, 20, col);
       expect(bpt.resolved, isTrue);
       int resolvedLine = await bpt.location.getLine();
       int resolvedCol = await bpt.location.getColumn();
-      print('21:${col} -> ${resolvedLine}:${resolvedCol}');
+      print('20:${col} -> ${resolvedLine}:${resolvedCol}');
       if (col <= 10) {
-        expect(resolvedLine, equals(21));
+        expect(resolvedLine, equals(20));
         expect(resolvedCol, equals(3));
       } else if (col <= 19) {
-        expect(resolvedLine, equals(21));
+        expect(resolvedLine, equals(20));
         expect(resolvedCol, equals(12));
       } else {
-        expect(resolvedLine, equals(23));
+        expect(resolvedLine, equals(22));
         expect(resolvedCol, equals(12));
       }
       expect((await isolate.removeBreakpoint(bpt)).type, equals('Success'));
@@ -198,7 +197,7 @@
     // Make sure that a zero column is an error.
     var caughtException = false;
     try {
-      await isolate.addBreakpoint(script, 21, 0);
+      await isolate.addBreakpoint(script, 20, 0);
       expect(false, isTrue, reason:'Unreachable');
     } on ServerRpcException catch(e) {
       caughtException = true;
diff --git a/runtime/observatory/tests/service/debugger_location_test.dart b/runtime/observatory/tests/service/debugger_location_test.dart
index 33ca476..7825ae6 100644
--- a/runtime/observatory/tests/service/debugger_location_test.dart
+++ b/runtime/observatory/tests/service/debugger_location_test.dart
@@ -55,209 +55,233 @@
 hasStoppedAtBreakpoint,
 
 // Parse '' => current position
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, '').then((DebuggerLocation loc) {
-      expect(loc.valid, isTrue);
-      expect(loc.toString(), equals('debugger_location_test.dart:17:5'));
-    });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, '');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('debugger_location_test.dart:17:5'));
 },
 
 // Parse line
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, '18').then((DebuggerLocation loc) {
-      expect(loc.valid, isTrue);
-      expect(loc.toString(), equals('debugger_location_test.dart:18'));
-    });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, '18');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('debugger_location_test.dart:18'));
 },
 
 // Parse line + col
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, '16:11').then((DebuggerLocation loc) {
-      expect(loc.valid, isTrue);
-      expect(loc.toString(), equals('debugger_location_test.dart:16:11'));
-    });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, '16:11');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('debugger_location_test.dart:16:11'));
 },
 
 // Parse script + line
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'unittest.dart:15')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        expect(loc.toString(), equals('unittest.dart:15'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'unittest.dart:15');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('unittest.dart:15'));
 },
 
 // Parse script + line + col
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'unittest.dart:15:10')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        expect(loc.toString(), equals('unittest.dart:15:10'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'unittest.dart:15:10');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('unittest.dart:15:10'));
 },
 
 // Parse bad script
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'bad.dart:15')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isFalse);
-        expect(loc.toString(), equals(
-            'invalid source location (Script \'bad.dart\' not found)'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'bad.dart:15');
+  expect(loc.valid, isFalse);
+  expect(loc.toString(), equals(
+      'invalid source location (Script \'bad.dart\' not found)'));
 },
 
 // Parse function
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'testFunction')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        expect(loc.toString(), equals('testFunction'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'testFunction');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('testFunction'));
 },
 
 // Parse bad function
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'doesNotReallyExit')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isFalse);
-        expect(loc.toString(), equals(
-            'invalid source location (Function \'doesNotReallyExit\' not found)'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'doesNotReallyExist');
+  expect(loc.valid, isFalse);
+  expect(loc.toString(), equals(
+      'invalid source location (Function \'doesNotReallyExist\' not found)'));
 },
 
 // Parse constructor
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        // TODO(turnidge): Printing a constructor currently adds
-        // another class qualifier at the front.  Do we want to change
-        // this to be more consistent?
-        expect(loc.toString(), equals(
-            'DebuggerLocationTestFoo.DebuggerLocationTestFoo'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc = await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo');
+  expect(loc.valid, isTrue);
+  // TODO(turnidge): Printing a constructor currently adds
+  // another class qualifier at the front.  Do we want to change
+  // this to be more consistent?
+  expect(loc.toString(), equals(
+      'DebuggerLocationTestFoo.DebuggerLocationTestFoo'));
 },
 
 // Parse named constructor
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.named')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        // TODO(turnidge): Printing a constructor currently adds
-        // another class qualifier at the front.  Do we want to change
-        // this to be more consistent?
-        expect(loc.toString(), equals(
-            'DebuggerLocationTestFoo.DebuggerLocationTestFoo.named'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc =
+      await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.named');
+  expect(loc.valid, isTrue);
+  // TODO(turnidge): Printing a constructor currently adds
+  // another class qualifier at the front.  Do we want to change
+  // this to be more consistent?
+  expect(loc.toString(), equals(
+      'DebuggerLocationTestFoo.DebuggerLocationTestFoo.named'));
 },
 
 // Parse method
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.method')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        expect(loc.toString(), equals('DebuggerLocationTestFoo.method'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc =
+      await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.method');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('DebuggerLocationTestFoo.method'));
 },
 
 // Parse method
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.field=')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isTrue);
-        expect(loc.toString(), equals('DebuggerLocationTestFoo.field='));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc =
+      await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.field=');
+  expect(loc.valid, isTrue);
+  expect(loc.toString(), equals('DebuggerLocationTestFoo.field='));
 },
 
 // Parse bad method
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.missing')
-      .then((DebuggerLocation loc) {
-        expect(loc.valid, isFalse);
-        expect(loc.toString(), equals(
-            'invalid source location '
-            '(Function \'DebuggerLocationTestFoo.missing\' not found)'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var loc =
+    await DebuggerLocation.parse(debugger, 'DebuggerLocationTestFoo.missing');
+  expect(loc.valid, isFalse);
+  expect(loc.toString(), equals(
+      'invalid source location '
+      '(Function \'DebuggerLocationTestFoo.missing\' not found)'));
 },
 
 // Complete function + script
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.complete(debugger, 'debugger_loc')
-      .then((List<String> completions) {
-        expect(completions.toString(), equals(
-            '[debugger_location_dummy_function, '
-             'debugger_location.dart:, debugger_location_test.dart:]'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions = await DebuggerLocation.complete(debugger, 'debugger_loc');
+  expect(completions.toString(), equals(
+      '[debugger_location_dummy_function,'
+      ' debugger_location.dart:,'
+      ' debugger_location_test.dart:]'));
 },
 
 // Complete class
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.complete(debugger, 'DebuggerLocationTe')
-      .then((List<String> completions) {
-        expect(completions.toString(), equals(
-            '[DebuggerLocationTestBar, DebuggerLocationTestFoo]'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger, 'DebuggerLocationTe');
+  expect(completions.toString(), equals(
+      '[DebuggerLocationTestBar,'
+      ' DebuggerLocationTestFoo]'));
 },
 
 // No completions: unqualified name
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.complete(debugger, 'debugger_locXYZZY')
-      .then((List<String> completions) {
-        expect(completions.toString(), equals('[]'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger, 'debugger_locXYZZY');
+  expect(completions.toString(), equals('[]'));
 },
 
 // Complete method
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.m')
-      .then((List<String> completions) {
-        expect(completions.toString(), equals(
-          '[DebuggerLocationTestFoo.madness, DebuggerLocationTestFoo.method]'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.m');
+  expect(completions.toString(), equals(
+      '[DebuggerLocationTestFoo.madness,'
+      ' DebuggerLocationTestFoo.method]'));
 },
 
 // No completions: qualified name
-(Isolate isolate) {
-  return initDebugger(isolate).then((debugger) {
-    return DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.q')
-      .then((List<String> completions) {
-        expect(completions.toString(), equals('[]'));
-      });
-  });
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger, 'DebuggerLocationTestFoo.q');
+  expect(completions.toString(), equals('[]'));
+},
+
+// Complete script
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger, 'debugger_location_te');
+  expect(completions.toString(), equals(
+      '[debugger_location_test.dart:]'));
+},
+
+// Complete script:line
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger,
+                                      'debugger_location_test.dart:11');
+  expect(completions.toString(), equals(
+      '[debugger_location_test.dart:11 ,'
+      ' debugger_location_test.dart:11:,'
+      ' debugger_location_test.dart:110 ,'
+      ' debugger_location_test.dart:110:,'
+      ' debugger_location_test.dart:111 ,'
+      ' debugger_location_test.dart:111:,'
+      ' debugger_location_test.dart:112 ,'
+      ' debugger_location_test.dart:112:,'
+      ' debugger_location_test.dart:115 ,'
+      ' debugger_location_test.dart:115:,'
+      ' debugger_location_test.dart:116 ,'
+      ' debugger_location_test.dart:116:,'
+      ' debugger_location_test.dart:117 ,'
+      ' debugger_location_test.dart:117:,'
+      ' debugger_location_test.dart:118 ,'
+      ' debugger_location_test.dart:118:,'
+      ' debugger_location_test.dart:119 ,'
+      ' debugger_location_test.dart:119:]'));
+},
+
+// Complete script:line:col
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions =
+      await DebuggerLocation.complete(debugger,
+                                      'debugger_location_test.dart:11:2');
+  expect(completions.toString(), equals(
+      '[debugger_location_test.dart:11:2 ,'
+      ' debugger_location_test.dart:11:20 ,'
+      ' debugger_location_test.dart:11:21 ,'
+      ' debugger_location_test.dart:11:22 ,'
+      ' debugger_location_test.dart:11:23 ,'
+      ' debugger_location_test.dart:11:24 ]'));
+},
+
+// Complete without the script name.
+(Isolate isolate) async {
+  var debugger = await initDebugger(isolate);
+  var completions = await DebuggerLocation.complete(debugger, '11:2');
+  expect(completions.toString(), equals(
+      '[debugger_location_test.dart:11:2 ,'
+      ' debugger_location_test.dart:11:20 ,'
+      ' debugger_location_test.dart:11:21 ,'
+      ' debugger_location_test.dart:11:22 ,'
+      ' debugger_location_test.dart:11:23 ,'
+      ' debugger_location_test.dart:11:24 ]'));
 },
 
 ];
diff --git a/runtime/observatory/tests/service/eval_test.dart b/runtime/observatory/tests/service/eval_test.dart
index c251be3..99dfe8f 100644
--- a/runtime/observatory/tests/service/eval_test.dart
+++ b/runtime/observatory/tests/service/eval_test.dart
@@ -3,18 +3,19 @@
 // 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 'test_helper.dart';
-import 'dart:async';
 
 int globalVar = 100;
 
 class MyClass {
   static int staticVar = 1000;
 
-  static void printValue(int value) {
-    print(value);   // line 17
+  static void method(int value) {
+    debugger();
   }
 }
 
@@ -22,37 +23,14 @@
   int i = 0;
   while (true) {
     if (++i % 100000000 == 0) {
-      MyClass.printValue(10000);
+      MyClass.method(10000);
     }
   }
 }
 
 var tests = [
 
-// Go to breakpoint at line 16.
-(Isolate isolate) {
-  return isolate.rootLibrary.load().then((_) {
-      // Set up a listener to wait for breakpoint events.
-      Completer completer = new Completer();
-      isolate.vm.getEventStream(VM.kDebugStream).then((stream) {
-        var subscription;
-        subscription = stream.listen((ServiceEvent event) {
-          if (event.kind == ServiceEvent.kPauseBreakpoint) {
-            print('Breakpoint reached');
-            subscription.cancel();
-            completer.complete();
-          }
-        });
-      });
-
-      // Add the breakpoint.
-      var script = isolate.rootLibrary.scripts[0];
-      var line = 17;
-      return isolate.addBreakpoint(script, line).then((ServiceObject bpt) {
-          return completer.future;  // Wait for breakpoint reached.
-      });
-    });
-},
+hasStoppedAtBreakpoint,
 
 // Evaluate against library, class, and instance.
 (Isolate isolate) {
@@ -60,7 +38,7 @@
       // 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('printValue'));
+      expect(stack['frames'][0].function.name, equals('method'));
       expect(stack['frames'][0].function.dartOwner.name, equals('MyClass'));
 
       var lib = isolate.rootLibrary;
diff --git a/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart b/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart
new file mode 100644
index 0000000..053fd15
--- /dev/null
+++ b/runtime/observatory/tests/service/evaluate_in_frame_rpc_test.dart
@@ -0,0 +1,47 @@
+// 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 'dart:async';
+import 'dart:developer';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+
+void method(int value, _) {
+  debugger();
+}
+
+void testFunction() {
+  int i = 0;
+  while (true) {
+    if (++i % 100000000 == 0) {
+      method(10000, 50);
+    }
+  }
+}
+
+var tests = [
+
+hasStoppedAtBreakpoint,
+
+// Evaluate against library, class, and instance.
+(Isolate isolate) async {
+  var result;
+  result = await isolate.evalFrame(0, 'value');
+  expect(result.valueAsString, equals('10000'));
+
+  result = await isolate.evalFrame(0, '_');
+  expect(result.valueAsString, equals('50'));
+
+  result = await isolate.evalFrame(0, 'value + _');
+  expect(result.valueAsString, equals('10050'));
+
+  result = await isolate.evalFrame(1, 'i');
+  expect(result.valueAsString, equals('100000000'));
+},
+
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
diff --git a/runtime/observatory/tests/service/get_isolate_rpc_test.dart b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
index 5cc4a63..840c705 100644
--- a/runtime/observatory/tests/service/get_isolate_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
@@ -17,6 +17,7 @@
     expect(result['type'], equals('Isolate'));
     expect(result['id'], startsWith('isolates/'));
     expect(result['number'], new isInstanceOf<String>());
+    expect(result['_originNumber'], equals(result['number']));
     expect(result['startTime'], isPositive);
     expect(result['livePorts'], isPositive);
     expect(result['pauseOnExit'], isFalse);
diff --git a/runtime/observatory/tests/service/get_vm_rpc_test.dart b/runtime/observatory/tests/service/get_vm_rpc_test.dart
index d9884bd..f16c2b7 100644
--- a/runtime/observatory/tests/service/get_vm_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_rpc_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=--error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override --vm-name=Walter
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
@@ -12,6 +12,7 @@
   (VM vm) async {
     var result = await vm.invokeRpcNoUpgrade('getVM', {});
     expect(result['type'], equals('VM'));
+    expect(result['name'], equals('Walter'));
     expect(result['architectureBits'], isPositive);
     expect(result['targetCPU'], new isInstanceOf<String>());
     expect(result['hostCPU'], new isInstanceOf<String>());
@@ -20,8 +21,6 @@
     expect(result['startTime'], isPositive);
     expect(result['isolates'].length, isPositive);
     expect(result['isolates'][0]['type'], equals('@Isolate'));
-    expect(result['_assertsEnabled'], new isInstanceOf<bool>());
-    expect(result['_typeChecksEnabled'], new isInstanceOf<bool>());
   },
 ];
 
diff --git a/runtime/observatory/tests/service/parameters_in_scope_at_entry_test.dart b/runtime/observatory/tests/service/parameters_in_scope_at_entry_test.dart
new file mode 100644
index 0000000..0e4209a
--- /dev/null
+++ b/runtime/observatory/tests/service/parameters_in_scope_at_entry_test.dart
@@ -0,0 +1,67 @@
+// 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  --verbose_debug
+
+import 'package:observatory/service_io.dart';
+import 'test_helper.dart';
+import 'dart:developer';
+import 'package:unittest/unittest.dart';
+
+foo(param) {
+  return param;
+}
+
+fooClosure() {
+  theClosureFunction(param) {
+    return param;
+  }
+  return theClosureFunction;
+}
+
+testMain() {
+  debugger();
+  foo("in-scope");  // Line 24
+
+  var f = fooClosure();
+  debugger();
+  f("in-scope");  // Line 28
+}
+
+var tests = [
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(24),
+  (isolate) => isolate.stepInto(),
+  hasStoppedAtBreakpoint,
+  (isolate) async {
+    var stack = await isolate.getStack();
+    Frame top = stack['frames'][0];
+    print(top);
+    expect(top.function.name, equals("foo"));
+    print(top.variables);
+    expect(top.variables.length, equals(1));
+    var param = top.variables[0];
+    expect(param['name'], equals("param"));
+    expect(param['value'].valueAsString, equals("in-scope"));
+  },
+  resumeIsolate,
+
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(28),
+  (isolate) => isolate.stepInto(),
+  hasStoppedAtBreakpoint,
+  (isolate) async {
+    var stack = await isolate.getStack();
+    Frame top = stack['frames'][0];
+    print(top);
+    expect(top.function.name, equals("theClosureFunction"));
+    print(top.variables);
+    expect(top.variables.length, equals(1));
+    var param = top.variables[0];
+    expect(param['name'], equals("param"));
+    expect(param['value'].valueAsString, equals("in-scope"));
+  },
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory/tests/service/pause_on_exceptions_test.dart b/runtime/observatory/tests/service/pause_on_exceptions_test.dart
index a9f9ece..03d4731 100644
--- a/runtime/observatory/tests/service/pause_on_exceptions_test.dart
+++ b/runtime/observatory/tests/service/pause_on_exceptions_test.dart
@@ -51,13 +51,13 @@
     }
   });
 
-  test(String pauseInfo,
+  test(String pauseMode,
        String expression,
        bool shouldPause,
        bool shouldBeCaught) async {
-    print("Evaluating $expression with pause on $pauseInfo exception");
+    print("Evaluating $expression with pause on $pauseMode exception");
 
-    expect((await isolate.setExceptionPauseInfo(pauseInfo)) is DartError,
+    expect((await isolate.setExceptionPauseMode(pauseMode)) is DartError,
            isFalse);
 
     var t;
@@ -94,14 +94,14 @@
     }
   }
 
-  await test("all", "doCaught()", true, true);
-  await test("all", "doUncaught()", true, false);
+  await test("All", "doCaught()", true, true);
+  await test("All", "doUncaught()", true, false);
 
-  await test("unhandled", "doCaught()", false, true);
-  await test("unhandled", "doUncaught()", true, false);
+  await test("Unhandled", "doCaught()", false, true);
+  await test("Unhandled", "doUncaught()", true, false);
 
-  await test("none", "doCaught()", false, true);
-  await test("none", "doUncaught()", false, false);
+  await test("None", "doCaught()", false, true);
+  await test("None", "doUncaught()", false, false);
 
   subscription.cancel();
 },
diff --git a/runtime/observatory/tests/service/set_vm_name_rpc_test.dart b/runtime/observatory/tests/service/set_vm_name_rpc_test.dart
new file mode 100644
index 0000000..7e3a53a
--- /dev/null
+++ b/runtime/observatory/tests/service/set_vm_name_rpc_test.dart
@@ -0,0 +1,35 @@
+// 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 --vm-name=Walter
+
+import 'dart:async';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+
+var tests = [
+  (VM vm) async {
+    expect(vm.name, equals('Walter'));
+
+    Completer completer = new Completer();
+    var stream = await vm.getEventStream(VM.kVMStream);
+    var subscription;
+    subscription = stream.listen((ServiceEvent event) {
+      if (event.kind == ServiceEvent.kVMUpdate) {
+        expect(event.owner.type, equals('VM'));
+        expect(event.owner.name, equals('Barbara'));
+        subscription.cancel();
+        completer.complete();
+      }
+    });
+    
+    var result = await vm.setName('Barbara');
+    expect(result.type, equals('Success'));
+
+    await completer.future;
+    expect(vm.name, equals('Barbara'));
+  },
+];
+
+main(args) async => runVMTests(args, tests, trace_service: true);
diff --git a/runtime/observatory/tests/service/step_into_async_no_await_test.dart b/runtime/observatory/tests/service/step_into_async_no_await_test.dart
index f2a8a23..f9dddd5 100644
--- a/runtime/observatory/tests/service/step_into_async_no_await_test.dart
+++ b/runtime/observatory/tests/service/step_into_async_no_await_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--error_on_bad_type --error_on_bad_override  --verbose_debug
 
-import 'package:observatory/service_io.dart';
 import 'test_helper.dart';
 import 'dart:developer';
 
@@ -15,12 +14,12 @@
 
 testMain() {
   debugger();
-  asyncWithoutAwait();
+  asyncWithoutAwait();  // Line 17
 }
 
 var tests = [
   hasStoppedAtBreakpoint,
-  stoppedAtLine(18),
+  stoppedAtLine(17),
   (isolate) => isolate.stepInto(),
   hasStoppedAtBreakpoint,
   (isolate) => isolate.getStack(),  // Should not crash.
diff --git a/runtime/observatory/tests/service/vm_restart_test.dart b/runtime/observatory/tests/service/vm_restart_test.dart
index de6397f..8f5da2e 100644
--- a/runtime/observatory/tests/service/vm_restart_test.dart
+++ b/runtime/observatory/tests/service/vm_restart_test.dart
@@ -5,7 +5,6 @@
 
 import 'dart:async';
 import 'dart:developer';
-import 'dart:io';
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
 import 'test_helper.dart';
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 0d49310..cd7b058 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -94,8 +94,8 @@
 // TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit
 // the value defined in TargetConditionals.h
 #define TARGET_OS_MACOS 1
-#if TARGET_OS_IPHONE
-#define TARGET_OS_IOS
+#if TARGET_OS_IPHONE && !defined(TARGET_OS_IOS)
+#define TARGET_OS_IOS 1
 #endif
 
 #elif defined(_WIN32)
@@ -279,17 +279,17 @@
 #elif defined(TARGET_ARCH_X64)
   // No simulator used.
 #elif defined(TARGET_ARCH_ARM)
-#if !defined(HOST_ARCH_ARM) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_ARM) || TARGET_OS_IOS
 #define USING_SIMULATOR 1
 #endif
 
 #elif defined(TARGET_ARCH_ARM64)
-#if !defined(HOST_ARCH_ARM64) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_ARM64) || TARGET_OS_IOS
 #define USING_SIMULATOR 1
 #endif
 
 #elif defined(TARGET_ARCH_MIPS)
-#if !defined(HOST_ARCH_MIPS) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_MIPS) || TARGET_OS_IOS
 #define USING_SIMULATOR 1
 #endif
 
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index dabc8b2..3c0182f 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -31,6 +31,7 @@
 cc/Service_Profile: Skip
 cc/Dart2JSCompilerStats: Skip
 cc/CorelibCompilerStats: Skip
+cc/ThreadIterator_AddFindRemove: Skip  # Issue 23474
 
 
 [ $system == linux ]
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn
index 601f041..0afda71 100644
--- a/runtime/vm/BUILD.gn
+++ b/runtime/vm/BUILD.gn
@@ -47,7 +47,6 @@
 static_library("libdart_vm") {
   configs += ["..:dart_config"]
   public_configs = [":libdart_vm_config"]
-  deps = [ ":generate_service_cc_file", ]
 
   vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
                                 [rebase_path("vm_sources.gypi")],
@@ -56,7 +55,6 @@
 
   set_sources_assignment_filter(["*_test.cc", "*_test.h"])
   sources = vm_sources_list.sources
-            + ["$target_gen_dir/service_gen.cc",]
             - ["vtune.cc", "vtune.h"]
   include_dirs = [
     "..",
@@ -67,7 +65,6 @@
 static_library("libdart_vm_nosnapshot") {
   configs += ["..:dart_config"]
   public_configs = [":libdart_vm_config"]
-  deps = [ ":generate_service_cc_file", ]
   defines = [ "DART_NO_SNAPSHOT" ]
   vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
                                 [rebase_path("vm_sources.gypi")],
@@ -76,7 +73,6 @@
 
   set_sources_assignment_filter(["*_test.cc", "*_test.h"])
   sources = vm_sources_list.sources
-            + ["$target_gen_dir/service_gen.cc",]
             - ["vtune.cc", "vtune.h"]
   include_dirs = [
     "..",
@@ -197,32 +193,7 @@
     ["isolate", "isolate"],
     ["math", "math"],
     ["mirrors", "mirrors"],
-    ["profiler", "profiler"],
     ["typed_data", "typed_data"],
+    ["_vmservice", "vmservice"],
   ]
 }
-
-
-action("generate_service_cc_file") {
-  visibility = [ ":*" ]  # Only targets in this file can see this.
-  script = "../tools/create_resources.py"
-  sources = [
-    "service/client.dart",
-    "service/constants.dart",
-    "service/message.dart",
-    "service/message_router.dart",
-    "service/running_isolate.dart",
-    "service/running_isolates.dart",
-    "service/vmservice.dart",
-  ]
-
-  output = "$target_gen_dir/service_gen.cc"
-  outputs = [ output, ]
-
-  args = [
-    "--output", rebase_path(output, root_build_dir),
-    "--outer_namespace", "dart",
-    "--table_name", "service",
-    "--root_prefix", rebase_path("service/", root_build_dir)] +
-    rebase_path(sources, root_build_dir)
-}
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index 0919521..04e82d8 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -3283,8 +3283,8 @@
     // Store XMM registers with the lowest register number at the lowest
     // address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
-      XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfXmmRegisters; ++i) {
+      XmmRegister xmm_reg = static_cast<XmmRegister>(i);
       if (RegisterSet::Contains(xmm_register_set, xmm_reg)) {
         movups(Address(RSP, offset), xmm_reg);
         offset += kFpuRegisterSize;
@@ -3293,11 +3293,10 @@
     ASSERT(offset == (xmm_regs_count * kFpuRegisterSize));
   }
 
-  // Store general purpose registers with the highest register number at the
-  // lowest address. The order in which the registers are pushed must match the
-  // order in which the registers are encoded in the safe point's stack map.
-  for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  // The order in which the registers are pushed must match the order
+  // in which the registers are encoded in the safe point's stack map.
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+    Register reg = static_cast<Register>(i);
     if (RegisterSet::Contains(cpu_register_set, reg)) {
       pushq(reg);
     }
@@ -3307,10 +3306,8 @@
 
 void Assembler::PopRegisters(intptr_t cpu_register_set,
                              intptr_t xmm_register_set) {
-  // General purpose registers have the highest register number at the
-  // lowest address.
-  for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
+    Register reg = static_cast<Register>(i);
     if (RegisterSet::Contains(cpu_register_set, reg)) {
       popq(reg);
     }
@@ -3320,8 +3317,8 @@
   if (xmm_regs_count > 0) {
     // XMM registers have the lowest register number at the lowest address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
-      XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfXmmRegisters; ++i) {
+      XmmRegister xmm_reg = static_cast<XmmRegister>(i);
       if (RegisterSet::Contains(xmm_register_set, xmm_reg)) {
         movups(xmm_reg, Address(RSP, offset));
         offset += kFpuRegisterSize;
diff --git a/runtime/vm/base_isolate.h b/runtime/vm/base_isolate.h
index 33c5f4d3..833f7e5 100644
--- a/runtime/vm/base_isolate.h
+++ b/runtime/vm/base_isolate.h
@@ -26,28 +26,13 @@
   void AssertCurrentThreadIsMutator() const {}
 #endif  // DEBUG
 
-  int32_t no_callback_scope_depth() const {
-    return no_callback_scope_depth_;
-  }
-
-  void IncrementNoCallbackScopeDepth() {
-    ASSERT(no_callback_scope_depth_ < INT_MAX);
-    no_callback_scope_depth_ += 1;
-  }
-
-  void DecrementNoCallbackScopeDepth() {
-    ASSERT(no_callback_scope_depth_ > 0);
-    no_callback_scope_depth_ -= 1;
-  }
-
 #if defined(DEBUG)
   static void AssertCurrent(BaseIsolate* isolate);
 #endif
 
  protected:
   BaseIsolate()
-      : mutator_thread_(NULL),
-        no_callback_scope_depth_(0) {
+      : mutator_thread_(NULL) {
   }
 
   ~BaseIsolate() {
@@ -55,7 +40,6 @@
   }
 
   Thread* mutator_thread_;
-  int32_t no_callback_scope_depth_;
 
  private:
   // During migration, some deprecated interfaces will default to using the
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 900a689..9fcb4d00 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -41,7 +41,7 @@
   bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
   Timer timer(true, "Compile all of Core lib benchmark");
   timer.Start();
-  const Error& error = Error::Handle(benchmark->isolate(),
+  const Error& error = Error::Handle(benchmark->isolate()->current_zone(),
                                      Library::CompileAll());
   if (!error.IsNull()) {
     OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s",
@@ -61,7 +61,7 @@
   stats->EnableBenchmark();
   Timer timer(true, "Compiler stats compiling all of Core lib");
   timer.Start();
-  const Error& error = Error::Handle(benchmark->isolate(),
+  const Error& error = Error::Handle(benchmark->isolate()->current_zone(),
                                      Library::CompileAll());
   if (!error.IsNull()) {
     OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s",
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index a01f107..c445f4a 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -67,18 +67,14 @@
                mirrors,
                Bootstrap::mirrors_source_paths_,
                Bootstrap::mirrors_patch_paths_),
-  INIT_LIBRARY(ObjectStore::kProfiler,
-               profiler,
-               Bootstrap::profiler_source_paths_,
-               NULL),
   INIT_LIBRARY(ObjectStore::kTypedData,
                typed_data,
                Bootstrap::typed_data_source_paths_,
                Bootstrap::typed_data_patch_paths_),
   INIT_LIBRARY(ObjectStore::kVMService,
                _vmservice,
-               Bootstrap::vmservice_source_paths_,
-               NULL),
+               Bootstrap::_vmservice_source_paths_,
+               Bootstrap::_vmservice_patch_paths_),
   { ObjectStore::kNone, NULL, NULL, NULL, NULL }
 };
 
@@ -165,28 +161,30 @@
 }
 
 
-static Dart_Handle LoadPartSource(Isolate* isolate,
+static Dart_Handle LoadPartSource(Thread* thread,
                                   const Library& lib,
                                   const String& uri) {
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   const String& part_source = String::Handle(
-      isolate, GetLibrarySource(lib, uri, false));
-  const String& lib_uri = String::Handle(isolate, lib.url());
+      zone, GetLibrarySource(lib, uri, false));
+  const String& lib_uri = String::Handle(zone, lib.url());
   if (part_source.IsNull()) {
     return Api::NewError("Unable to read part file '%s' of library '%s'",
                          uri.ToCString(), lib_uri.ToCString());
   }
 
   // Prepend the library URI to form a unique script URI for the part.
-  const Array& strings = Array::Handle(isolate, Array::New(3));
+  const Array& strings = Array::Handle(zone, Array::New(3));
   strings.SetAt(0, lib_uri);
   strings.SetAt(1, Symbols::Slash());
   strings.SetAt(2, uri);
-  const String& part_uri = String::Handle(isolate, String::ConcatAll(strings));
+  const String& part_uri = String::Handle(zone, String::ConcatAll(strings));
 
   // Create a script object and compile the part.
   const Script& part_script = Script::Handle(
-      isolate, Script::New(part_uri, part_source, RawScript::kSourceTag));
-  const Error& error = Error::Handle(isolate, Compile(lib, part_script));
+      zone, Script::New(part_uri, part_source, RawScript::kSourceTag));
+  const Error& error = Error::Handle(zone, Compile(lib, part_script));
   return Api::NewHandle(isolate, error.raw());
 }
 
@@ -194,7 +192,8 @@
 static Dart_Handle BootstrapLibraryTagHandler(Dart_LibraryTag tag,
                                               Dart_Handle library,
                                               Dart_Handle uri) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   if (!Dart_IsLibrary(library)) {
     return Api::NewError("not a library");
   }
@@ -205,7 +204,7 @@
     // In the bootstrap loader we do not try and do any canonicalization.
     return uri;
   }
-  const String& uri_str = Api::UnwrapStringHandle(isolate, uri);
+  const String& uri_str = Api::UnwrapStringHandle(zone, uri);
   ASSERT(!uri_str.IsNull());
   if (tag == Dart_kImportTag) {
     // We expect the core bootstrap libraries to only import other
@@ -217,21 +216,21 @@
                          uri_str.ToCString());
   }
   ASSERT(tag == Dart_kSourceTag);
-  const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
+  const Library& lib = Api::UnwrapLibraryHandle(zone, library);
   ASSERT(!lib.IsNull());
-  return LoadPartSource(isolate, lib, uri_str);
+  return LoadPartSource(thread, lib, uri_str);
 }
 
 
-static RawError* LoadPatchFiles(Isolate* isolate,
+static RawError* LoadPatchFiles(Zone* zone,
                                 const Library& lib,
                                 const String& patch_uri,
                                 const char** patch_files) {
-  String& patch_file_uri = String::Handle(isolate);
-  String& source = String::Handle(isolate);
-  Script& script = Script::Handle(isolate);
-  Error& error = Error::Handle(isolate);
-  const Array& strings = Array::Handle(isolate, Array::New(3));
+  String& patch_file_uri = String::Handle(zone);
+  String& source = String::Handle(zone);
+  Script& script = Script::Handle(zone);
+  Error& error = Error::Handle(zone);
+  const Array& strings = Array::Handle(zone, Array::New(3));
   strings.SetAt(0, patch_uri);
   strings.SetAt(1, Symbols::Slash());
   for (intptr_t j = 0; patch_files[j] != NULL; j += 2) {
@@ -259,12 +258,13 @@
 RawError* Bootstrap::LoadandCompileScripts() {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  String& uri = String::Handle(isolate);
-  String& patch_uri = String::Handle(isolate);
-  String& source = String::Handle(isolate);
-  Script& script = Script::Handle(isolate);
-  Library& lib = Library::Handle(isolate);
-  Error& error = Error::Handle(isolate);
+  Zone* zone = thread->zone();
+  String& uri = String::Handle(zone);
+  String& patch_uri = String::Handle(zone);
+  String& source = String::Handle(zone);
+  Script& script = Script::Handle(zone);
+  Library& lib = Library::Handle(zone);
+  Error& error = Error::Handle(zone);
   Dart_LibraryTagHandler saved_tag_handler = isolate->library_tag_handler();
 
   // Set the library tag handler for the isolate to the bootstrap
@@ -311,7 +311,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_);
-      error = LoadPatchFiles(isolate,
+      error = LoadPatchFiles(zone,
                              lib,
                              patch_uri,
                              bootstrap_libraries[i].patch_paths_);
@@ -324,12 +324,12 @@
     SetupNativeResolver();
     ClassFinalizer::ProcessPendingClasses();
 
-    Class& cls = Class::Handle(isolate);
+    Class& cls = Class::Handle(zone);
     // Eagerly compile the function implementation class as it is the super
     // class of signature classes. This allows us to just finalize signature
     // classes without going through the hoops of trying to compile them.
     const Type& type =
-        Type::Handle(isolate, isolate->object_store()->function_impl_type());
+        Type::Handle(zone, isolate->object_store()->function_impl_type());
     cls = type.type_class();
     Compiler::CompileClass(cls);
   }
diff --git a/runtime/vm/bootstrap.h b/runtime/vm/bootstrap.h
index ddb7d74..4cae370 100644
--- a/runtime/vm/bootstrap.h
+++ b/runtime/vm/bootstrap.h
@@ -30,10 +30,9 @@
   static const char* json_source_paths_[];
   static const char* math_source_paths_[];
   static const char* mirrors_source_paths_[];
-  static const char* profiler_source_paths_[];
   static const char* typed_data_source_paths_[];
   static const char* utf_source_paths_[];
-  static const char* vmservice_source_paths_[];
+  static const char* _vmservice_source_paths_[];
 
   // Source path mapping for patch URI and 'parts'.
   static const char* async_patch_paths_[];
@@ -45,8 +44,8 @@
   static const char* isolate_patch_paths_[];
   static const char* math_patch_paths_[];
   static const char* mirrors_patch_paths_[];
-  static const char* profiler_patch_paths_[];
   static const char* typed_data_patch_paths_[];
+  static const char* _vmservice_patch_paths_[];
 };
 
 }  // namespace dart
diff --git a/runtime/vm/bootstrap_natives.cc b/runtime/vm/bootstrap_natives.cc
index d0bef86..2e705ec 100644
--- a/runtime/vm/bootstrap_natives.cc
+++ b/runtime/vm/bootstrap_natives.cc
@@ -121,11 +121,6 @@
   library.set_native_entry_resolver(resolver);
   library.set_native_entry_symbol_resolver(symbol_resolver);
 
-  library = Library::ProfilerLibrary();
-  ASSERT(!library.IsNull());
-  library.set_native_entry_resolver(resolver);
-  library.set_native_entry_symbol_resolver(symbol_resolver);
-
   library = Library::TypedDataLibrary();
   ASSERT(!library.IsNull());
   library.set_native_entry_resolver(resolver);
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 9e6e507..e416b7f 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -155,8 +155,10 @@
   V(AbstractClassInstantiationError_throwNew, 2)                               \
   V(Stopwatch_now, 0)                                                          \
   V(Stopwatch_frequency, 0)                                                    \
+  V(Timeline_getNextAsyncId, 0)                                                \
   V(Timeline_getTraceClock, 0)                                                 \
   V(Timeline_reportCompleteEvent, 5)                                           \
+  V(Timeline_reportTaskEvent, 6)                                               \
   V(TypedData_Int8Array_new, 1)                                                \
   V(TypedData_Uint8Array_new, 1)                                               \
   V(TypedData_Uint8ClampedArray_new, 1)                                        \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 7638850..4d8178b 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -120,7 +120,8 @@
   ASSERT(isolate != NULL);
   HANDLESCOPE(thread);
   ObjectStore* object_store = isolate->object_store();
-  const Error& error = Error::Handle(isolate, object_store->sticky_error());
+  const Error& error =
+      Error::Handle(thread->zone(), object_store->sticky_error());
   if (!error.IsNull()) {
     return false;
   }
@@ -562,15 +563,15 @@
 void ClassFinalizer::CheckRecursiveType(const Class& cls,
                                         const Type& type,
                                         PendingTypes* pending_types) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   if (FLAG_trace_type_finalization) {
     THR_Print("Checking recursive type '%s': %s\n",
               String::Handle(type.Name()).ToCString(),
               type.ToCString());
   }
-  const Class& type_cls = Class::Handle(isolate, type.type_class());
+  const Class& type_cls = Class::Handle(zone, type.type_class());
   const TypeArguments& arguments =
-      TypeArguments::Handle(isolate, type.arguments());
+      TypeArguments::Handle(zone, type.arguments());
   // A type can only be recursive via its type arguments.
   ASSERT(!arguments.IsNull());
   const intptr_t num_type_args = arguments.Length();
@@ -589,7 +590,7 @@
   // The type parameters are not instantiated. Verify that there is no other
   // type pending finalization with the same type class, but different
   // uninstantiated type parameters.
-  TypeArguments& pending_arguments = TypeArguments::Handle(isolate);
+  TypeArguments& pending_arguments = TypeArguments::Handle(zone);
   const intptr_t num_pending_types = pending_types->length();
   for (intptr_t i = num_pending_types - 1; i >= 0; i--) {
     const Type& pending_type = Type::Cast(pending_types->At(i));
@@ -607,7 +608,7 @@
           !pending_arguments.IsSubvectorInstantiated(first_type_param,
                                                      num_type_params)) {
         // Reject the non-contractive recursive type.
-        const String& type_name = String::Handle(isolate, type.Name());
+        const String& type_name = String::Handle(zone, type.Name());
         ReportError(cls, type.token_pos(),
                     "illegal recursive type '%s'", type_name.ToCString());
       }
@@ -1573,14 +1574,15 @@
 // bound BT on T of M is applied to T of S&M. See comments below.
 void ClassFinalizer::CloneMixinAppTypeParameters(const Class& mixin_app_class) {
   ASSERT(mixin_app_class.type_parameters() == TypeArguments::null());
-  Isolate* isolate = Isolate::Current();
-  const AbstractType& super_type = AbstractType::Handle(isolate,
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const AbstractType& super_type = AbstractType::Handle(zone,
       mixin_app_class.super_type());
   ASSERT(super_type.IsResolved());
-  const Class& super_class = Class::Handle(isolate, super_type.type_class());
+  const Class& super_class = Class::Handle(zone, super_type.type_class());
   const intptr_t num_super_type_params = super_class.NumTypeParameters();
-  const Type& mixin_type = Type::Handle(isolate, mixin_app_class.mixin());
-  const Class& mixin_class = Class::Handle(isolate, mixin_type.type_class());
+  const Type& mixin_type = Type::Handle(zone, mixin_app_class.mixin());
+  const Class& mixin_class = Class::Handle(zone, mixin_type.type_class());
   const intptr_t num_mixin_type_params = mixin_class.NumTypeParameters();
 
   // The mixin type (in raw form) should have been added to the interfaces
@@ -1593,14 +1595,14 @@
   // If both the super type and the mixin type are non generic, the mixin
   // application class is non generic as well and we can skip type parameter
   // cloning.
-  TypeArguments& instantiator = TypeArguments::Handle(isolate);
+  TypeArguments& instantiator = TypeArguments::Handle(zone);
   if ((num_super_type_params + num_mixin_type_params) > 0) {
     // If the last ampersand in the name of the mixin application class is
     // doubled, the same type parameters can propagate the type arguments to
     // the super type and to the mixin type.
     bool share_type_params = false;
     if (num_super_type_params == num_mixin_type_params) {
-      const String& name = String::Handle(isolate, mixin_app_class.Name());
+      const String& name = String::Handle(zone, mixin_app_class.Name());
       for (intptr_t i = name.Length() - 1; i > 0; --i) {
         if (name.CharAt(i) == '&') {
           if (name.CharAt(i - 1) == '&') {
@@ -1611,13 +1613,13 @@
       }
     }
 
-    const TypeArguments& cloned_type_params = TypeArguments::Handle(isolate,
+    const TypeArguments& cloned_type_params = TypeArguments::Handle(zone,
         TypeArguments::New((share_type_params ? 0 : num_super_type_params) +
                            num_mixin_type_params));
-    TypeParameter& param = TypeParameter::Handle(isolate);
-    TypeParameter& cloned_param = TypeParameter::Handle(isolate);
-    String& param_name = String::Handle(isolate);
-    AbstractType& param_bound = AbstractType::Handle(isolate);
+    TypeParameter& param = TypeParameter::Handle(zone);
+    TypeParameter& cloned_param = TypeParameter::Handle(zone);
+    String& param_name = String::Handle(zone);
+    AbstractType& param_bound = AbstractType::Handle(zone);
     intptr_t cloned_index = 0;
 
     // First, clone the super class type parameters. Rename them so that
@@ -1625,8 +1627,8 @@
     // class and the mixin class.
     if (!share_type_params && (num_super_type_params > 0)) {
       const TypeArguments& super_type_params =
-          TypeArguments::Handle(isolate, super_class.type_parameters());
-      const TypeArguments& super_type_args = TypeArguments::Handle(isolate,
+          TypeArguments::Handle(zone, super_class.type_parameters());
+      const TypeArguments& super_type_args = TypeArguments::Handle(zone,
           TypeArguments::New(num_super_type_params));
       // The cloned super class type parameters do not need to repeat their
       // bounds, since the bound checks will be performed at the super class
@@ -1636,7 +1638,7 @@
       // the super class of its mixin. Note also that the other mixin
       // application will only mixin the last mixin type listed in the first
       // mixin application it is mixing in.
-      param_bound = isolate->object_store()->object_type();
+      param_bound = thread->isolate()->object_store()->object_type();
       for (intptr_t i = 0; i < num_super_type_params; i++) {
         param ^= super_type_params.TypeAt(i);
         param_name = param.name();
@@ -1665,10 +1667,10 @@
     // with that name. We also retain the type parameter bounds.
     if (num_mixin_type_params > 0) {
       const TypeArguments& mixin_params =
-          TypeArguments::Handle(isolate, mixin_class.type_parameters());
+          TypeArguments::Handle(zone, mixin_class.type_parameters());
       const intptr_t offset =
           mixin_class.NumTypeArguments() - mixin_class.NumTypeParameters();
-      const TypeArguments& mixin_type_args = TypeArguments::Handle(isolate,
+      const TypeArguments& mixin_type_args = TypeArguments::Handle(zone,
           TypeArguments::New(num_mixin_type_params));
       instantiator ^= TypeArguments::New(offset + num_mixin_type_params);
       bool has_uninstantiated_bounds = false;
@@ -1700,7 +1702,7 @@
       // is not a problem since they will get finalized shortly as the mixin
       // application class gets finalized.
       if (has_uninstantiated_bounds) {
-        Error& bound_error = Error::Handle(isolate);
+        Error& bound_error = Error::Handle(zone);
         for (intptr_t i = 0; i < num_mixin_type_params; i++) {
           param ^= mixin_type_args.TypeAt(i);
           param_bound = param.bound();
@@ -1821,13 +1823,13 @@
   // 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.
-  Isolate* isolate = Isolate::Current();
-  AbstractType& super_type = AbstractType::Handle(isolate,
+  Zone* zone = Thread::Current()->zone();
+  AbstractType& super_type = AbstractType::Handle(zone,
                                                   mixin_app_class.super_type());
-  const Type& mixin_type = Type::Handle(isolate, mixin_app_class.mixin());
-  const Class& mixin_class = Class::Handle(isolate, mixin_type.type_class());
+  const Type& mixin_type = Type::Handle(zone, mixin_app_class.mixin());
+  const Class& mixin_class = Class::Handle(zone, mixin_type.type_class());
   ASSERT(mixin_class.is_mixin_app_alias());
-  const Class& aliased_mixin_app_class = Class::Handle(isolate,
+  const Class& aliased_mixin_app_class = Class::Handle(zone,
       mixin_class.SuperClass());
   // Note that the super class of aliased_mixin_app_class can itself be a
   // mixin application class (this happens if the alias is mixing more than one
@@ -1835,19 +1837,19 @@
   // super class of this inserted class, we apply the composition rules of the
   // spec and only mixin the members of aliased_mixin_app_class, not those of
   // its super class. In other words, we only mixin the last mixin of the alias.
-  const Type& aliased_mixin_type = Type::Handle(isolate,
+  const Type& aliased_mixin_type = Type::Handle(zone,
       aliased_mixin_app_class.mixin());
   // The name of the inserted mixin application class is the name of mixin
   // class name with a backtick added.
-  String& inserted_class_name = String::Handle(isolate, mixin_app_class.Name());
+  String& inserted_class_name = String::Handle(zone, mixin_app_class.Name());
   inserted_class_name = String::Concat(inserted_class_name,
                                        Symbols::Backtick());
-  const Library& library = Library::Handle(isolate, mixin_app_class.library());
-  Class& inserted_class = Class::Handle(isolate,
+  const Library& library = Library::Handle(zone, mixin_app_class.library());
+  Class& inserted_class = Class::Handle(zone,
       library.LookupLocalClass(inserted_class_name));
   if (inserted_class.IsNull()) {
     inserted_class_name = Symbols::New(inserted_class_name);
-    const Script& script = Script::Handle(isolate, mixin_app_class.script());
+    const Script& script = Script::Handle(zone, mixin_app_class.script());
     inserted_class = Class::New(
         inserted_class_name, script, mixin_app_class.token_pos());
     inserted_class.set_is_synthesized_class();
@@ -1872,8 +1874,8 @@
     // After FinalizeTypesInClass, if the mixin type and interface type are
     // generic, their type arguments will refer to the type parameters of
     // inserted_class.
-    const Type& inserted_class_mixin_type = Type::Handle(isolate,
-        Type::New(Class::Handle(isolate, aliased_mixin_type.type_class()),
+    const Type& inserted_class_mixin_type = Type::Handle(zone,
+        Type::New(Class::Handle(zone, aliased_mixin_type.type_class()),
                   Object::null_type_arguments(),
                   aliased_mixin_type.token_pos()));
     inserted_class.set_mixin(inserted_class_mixin_type);
@@ -1904,33 +1906,33 @@
   // It is important that the type parameters of the mixin application class
   // are not finalized yet, because new type parameters may have been added
   // to the super class.
-  const Class& super_class = Class::Handle(isolate, super_type.type_class());
+  const Class& super_class = Class::Handle(zone, super_type.type_class());
   ASSERT(mixin_app_class.SuperClass() == super_class.raw());  // Will change.
   const intptr_t num_super_type_params = super_class.NumTypeParameters();
-  AbstractType& type = AbstractType::Handle(isolate);
+  AbstractType& type = AbstractType::Handle(zone);
   // The instantiator is mapping finalized type parameters of mixin_class to
   // unfinalized type parameters of mixin_app_class.
   ASSERT(aliased_mixin_type.IsFinalized());
-  const Class& aliased_mixin_type_class = Class::Handle(isolate,
+  const Class& aliased_mixin_type_class = Class::Handle(zone,
       aliased_mixin_type.type_class());
   const intptr_t num_aliased_mixin_type_params =
       aliased_mixin_type_class.NumTypeParameters();
   ASSERT(inserted_class.NumTypeParameters() ==
          (num_super_type_params + num_aliased_mixin_type_params));
   const AbstractType& mixin_class_super_type =
-      AbstractType::Handle(isolate, mixin_class.super_type());
+      AbstractType::Handle(zone, mixin_class.super_type());
   ASSERT(mixin_class_super_type.IsFinalized());
   // The aliased_mixin_type may be raw.
   const TypeArguments& mixin_class_super_type_args =
-      TypeArguments::Handle(isolate, mixin_class_super_type.arguments());
-  TypeArguments& new_mixin_type_args = TypeArguments::Handle(isolate);
+      TypeArguments::Handle(zone, mixin_class_super_type.arguments());
+  TypeArguments& new_mixin_type_args = TypeArguments::Handle(zone);
   if ((num_aliased_mixin_type_params > 0) &&
       !mixin_class_super_type_args.IsNull()) {
     new_mixin_type_args = TypeArguments::New(num_aliased_mixin_type_params);
-    AbstractType& bounded_type = AbstractType::Handle(isolate);
-    AbstractType& upper_bound = AbstractType::Handle(isolate);
-    TypeParameter& type_parameter = TypeParameter::Handle(isolate);
-    Error& bound_error = Error::Handle(isolate);
+    AbstractType& bounded_type = AbstractType::Handle(zone);
+    AbstractType& upper_bound = AbstractType::Handle(zone);
+    TypeParameter& type_parameter = TypeParameter::Handle(zone);
+    Error& bound_error = Error::Handle(zone);
     const intptr_t offset =
         mixin_class_super_type_args.Length() - num_aliased_mixin_type_params;
     for (intptr_t i = 0; i < num_aliased_mixin_type_params; i++) {
@@ -1960,12 +1962,12 @@
       new_mixin_type_args.SetTypeAt(i, type);
     }
   }
-  TypeArguments& new_super_type_args = TypeArguments::Handle(isolate);
+  TypeArguments& new_super_type_args = TypeArguments::Handle(zone);
   if ((num_super_type_params + num_aliased_mixin_type_params) > 0) {
     new_super_type_args = TypeArguments::New(num_super_type_params +
                                              num_aliased_mixin_type_params);
     const TypeArguments& type_params =
-        TypeArguments::Handle(isolate, mixin_app_class.type_parameters());
+        TypeArguments::Handle(zone, mixin_app_class.type_parameters());
     for (intptr_t i = 0; i < num_super_type_params; i++) {
       type = type_params.TypeAt(i);
       new_super_type_args.SetTypeAt(i, type);
@@ -1995,7 +1997,7 @@
               String::Handle(inserted_class.Name()).ToCString(),
               TypeArguments::Handle(
                   inserted_class.type_parameters()).ToCString(),
-              String::Handle(isolate, super_type.Name()).ToCString(),
+              String::Handle(zone, super_type.Name()).ToCString(),
               num_super_type_params + num_aliased_mixin_type_params,
               super_type.ToCString(),
               String::Handle(mixin_app_class.Name()).ToCString(),
@@ -2627,27 +2629,27 @@
     const MixinAppType& mixin_app_type) {
   // Lookup or create mixin application classes in the library of cls
   // and resolve super type and mixin types.
-  Isolate* isolate = Isolate::Current();
-  const Library& library = Library::Handle(isolate, cls.library());
+  Zone* zone = Thread::Current()->zone();
+  const Library& library = Library::Handle(zone, cls.library());
   ASSERT(!library.IsNull());
-  const Script& script = Script::Handle(isolate, cls.script());
+  const Script& script = Script::Handle(zone, cls.script());
   ASSERT(!script.IsNull());
   const GrowableObjectArray& type_args =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
   AbstractType& mixin_super_type =
-      AbstractType::Handle(isolate, mixin_app_type.super_type());
+      AbstractType::Handle(zone, mixin_app_type.super_type());
   ResolveType(cls, mixin_super_type);
   ASSERT(mixin_super_type.HasResolvedTypeClass());  // Even if malformed.
   // The super type may have a BoundedType as type argument, but cannot be
   // a BoundedType itself.
   CollectTypeArguments(cls, Type::Cast(mixin_super_type), type_args);
-  AbstractType& mixin_type = AbstractType::Handle(isolate);
-  Class& mixin_type_class = Class::Handle(isolate);
-  Class& mixin_app_class = Class::Handle(isolate);
-  String& mixin_app_class_name = String::Handle(isolate);
-  String& mixin_type_class_name = String::Handle(isolate);
-  AbstractType& super_type_arg = AbstractType::Handle(isolate);
-  AbstractType& mixin_type_arg = AbstractType::Handle(isolate);
+  AbstractType& mixin_type = AbstractType::Handle(zone);
+  Class& mixin_type_class = Class::Handle(zone);
+  Class& mixin_app_class = Class::Handle(zone);
+  String& mixin_app_class_name = String::Handle(zone);
+  String& mixin_type_class_name = String::Handle(zone);
+  AbstractType& super_type_arg = AbstractType::Handle(zone);
+  AbstractType& mixin_type_arg = AbstractType::Handle(zone);
   const intptr_t depth = mixin_app_type.Depth();
   for (intptr_t i = 0; i < depth; i++) {
     mixin_type = mixin_app_type.MixinTypeAt(i);
@@ -2702,7 +2704,7 @@
                                    mixin_type.token_pos());
       mixin_app_class.set_super_type(mixin_super_type);
       mixin_type_class = mixin_type.type_class();
-      const Type& generic_mixin_type = Type::Handle(isolate,
+      const Type& generic_mixin_type = Type::Handle(zone,
           Type::New(mixin_type_class,
                     Object::null_type_arguments(),
                     mixin_type.token_pos()));
@@ -2710,7 +2712,7 @@
       // Add the mixin type to the list of interfaces that the mixin application
       // class implements. This is necessary so that cycle check work at
       // compile time (type arguments are ignored by that check).
-      const Array& interfaces = Array::Handle(isolate, Array::New(1));
+      const Array& interfaces = Array::Handle(zone, Array::New(1));
       interfaces.SetAt(0, generic_mixin_type);
       ASSERT(mixin_app_class.interfaces() == Object::empty_array().raw());
       mixin_app_class.set_interfaces(interfaces);
@@ -2732,10 +2734,10 @@
                                  Object::null_type_arguments(),
                                  mixin_type.token_pos());
   }
-  TypeArguments& mixin_app_args = TypeArguments::Handle(isolate);
+  TypeArguments& mixin_app_args = TypeArguments::Handle(zone);
   if (type_args.Length() > 0) {
     mixin_app_args = TypeArguments::New(type_args.Length());
-    AbstractType& type_arg = AbstractType::Handle(isolate);
+    AbstractType& type_arg = AbstractType::Handle(zone);
     for (intptr_t i = 0; i < type_args.Length(); i++) {
       type_arg ^= type_args.At(i);
       mixin_app_args.SetTypeAt(i, type_arg);
@@ -2771,12 +2773,12 @@
   if (FLAG_trace_class_finalization) {
     THR_Print("Resolving super and interfaces: %s\n", cls.ToCString());
   }
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   const intptr_t cls_index = cls.id();
   for (intptr_t i = 0; i < visited->length(); i++) {
     if ((*visited)[i] == cls_index) {
       // We have already visited class 'cls'. We found a cycle.
-      const String& class_name = String::Handle(isolate, cls.Name());
+      const String& class_name = String::Handle(zone, cls.Name());
       ReportError(cls, cls.token_pos(),
                   "cyclic reference found for class '%s'",
                   class_name.ToCString());
@@ -2785,8 +2787,8 @@
 
   // If the class/interface has no explicit super class/interfaces
   // and is not a mixin application, we are done.
-  AbstractType& super_type = AbstractType::Handle(isolate, cls.super_type());
-  Array& super_interfaces = Array::Handle(isolate, cls.interfaces());
+  AbstractType& super_type = AbstractType::Handle(zone, cls.super_type());
+  Array& super_interfaces = Array::Handle(zone, cls.interfaces());
   if ((super_type.IsNull() || super_type.IsObjectType()) &&
       (super_interfaces.Length() == 0)) {
     cls.set_is_cycle_free();
@@ -2809,32 +2811,32 @@
 
   // Resolve and check the super type and interfaces of cls.
   visited->Add(cls_index);
-  AbstractType& interface = AbstractType::Handle(isolate);
-  Class& interface_class = Class::Handle(isolate);
+  AbstractType& interface = AbstractType::Handle(zone);
+  Class& interface_class = Class::Handle(zone);
 
   // Resolve super type. Failures lead to a longjmp.
   ResolveType(cls, super_type);
   if (super_type.IsMalformedOrMalbounded()) {
-    ReportError(Error::Handle(isolate, super_type.error()));
+    ReportError(Error::Handle(zone, super_type.error()));
   }
   if (super_type.IsDynamicType()) {
     ReportError(cls, cls.token_pos(),
                 "class '%s' may not extend 'dynamic'",
-                String::Handle(isolate, cls.Name()).ToCString());
+                String::Handle(zone, cls.Name()).ToCString());
   }
   interface_class = super_type.type_class();
   if (interface_class.IsSignatureClass()) {
     ReportError(cls, cls.token_pos(),
                 "class '%s' may not extend function type alias '%s'",
-                String::Handle(isolate, cls.Name()).ToCString(),
-                String::Handle(isolate,
+                String::Handle(zone, cls.Name()).ToCString(),
+                String::Handle(zone,
                                super_type.UserVisibleName()).ToCString());
   }
   if (interface_class.is_enum_class()) {
     ReportError(cls, cls.token_pos(),
                 "class '%s' may not extend enum '%s'",
-                String::Handle(isolate, cls.Name()).ToCString(),
-                String::Handle(isolate, interface_class.Name()).ToCString());
+                String::Handle(zone, cls.Name()).ToCString(),
+                String::Handle(zone, interface_class.Name()).ToCString());
   }
 
   // If cls belongs to core lib or to core lib's implementation, restrictions
@@ -2879,11 +2881,11 @@
       }
     }
     if (is_error) {
-      const String& interface_name = String::Handle(isolate,
+      const String& interface_name = String::Handle(zone,
                                                     interface_class.Name());
       ReportError(cls, cls.token_pos(),
                   "'%s' is not allowed to extend '%s'",
-                  String::Handle(isolate, cls.Name()).ToCString(),
+                  String::Handle(zone, cls.Name()).ToCString(),
                   interface_name.ToCString());
     }
   }
@@ -2897,7 +2899,7 @@
     ASSERT(!interface.IsTypeParameter());  // Should be detected by parser.
     // A malbounded interface is only reported when involved in a type test.
     if (interface.IsMalformed()) {
-      ReportError(Error::Handle(isolate, interface.error()));
+      ReportError(Error::Handle(zone, interface.error()));
     }
     if (interface.IsDynamicType()) {
       ReportError(cls, cls.token_pos(),
@@ -2905,14 +2907,14 @@
     }
     interface_class = interface.type_class();
     if (interface_class.IsSignatureClass()) {
-      const String& interface_name = String::Handle(isolate,
+      const String& interface_name = String::Handle(zone,
                                                     interface_class.Name());
       ReportError(cls, cls.token_pos(),
                   "function type alias '%s' may not be used as interface",
                   interface_name.ToCString());
     }
     if (interface_class.is_enum_class()) {
-      const String& interface_name = String::Handle(isolate,
+      const String& interface_name = String::Handle(zone,
                                                     interface_class.Name());
       ReportError(cls, cls.token_pos(),
                   "enum '%s' may not be used as interface",
@@ -2928,7 +2930,7 @@
           interface.IsDoubleType() ||
           interface.IsStringType() ||
           interface.IsDynamicType()) {
-        const String& interface_name = String::Handle(isolate,
+        const String& interface_name = String::Handle(zone,
                                                       interface_class.Name());
         if (cls.IsMixinApplication()) {
           ReportError(cls, cls.token_pos(),
@@ -2937,7 +2939,7 @@
         } else {
           ReportError(cls, cls.token_pos(),
                       "'%s' is not allowed to extend or implement '%s'",
-                      String::Handle(isolate, cls.Name()).ToCString(),
+                      String::Handle(zone, cls.Name()).ToCString(),
                       interface_name.ToCString());
         }
       }
diff --git a/runtime/vm/class_finalizer_test.cc b/runtime/vm/class_finalizer_test.cc
index 648ab6e..828ecac 100644
--- a/runtime/vm/class_finalizer_test.cc
+++ b/runtime/vm/class_finalizer_test.cc
@@ -23,10 +23,11 @@
 
 
 TEST_CASE(ClassFinalizer) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ObjectStore* object_store = isolate->object_store();
   const GrowableObjectArray& pending_classes =
-      GrowableObjectArray::Handle(isolate, object_store->pending_classes());
+      GrowableObjectArray::Handle(zone, object_store->pending_classes());
   GrowableArray<const Class*> classes_1;
   classes_1.Add(&Class::Handle(CreateTestClass("BMW")));
   pending_classes.Add(*classes_1[0]);
@@ -53,10 +54,11 @@
 
 
 TEST_CASE(ClassFinalize_Cycles) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ObjectStore* object_store = isolate->object_store();
   const GrowableObjectArray& pending_classes =
-      GrowableObjectArray::Handle(isolate, object_store->pending_classes());
+      GrowableObjectArray::Handle(zone, object_store->pending_classes());
   GrowableArray<const Class*> classes;
   classes.Add(&Class::Handle(CreateTestClass("Jungfrau")));
   pending_classes.Add(*classes[0]);
@@ -78,10 +80,11 @@
 
 
 TEST_CASE(ClassFinalize_Resolve) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ObjectStore* object_store = isolate->object_store();
   const GrowableObjectArray& pending_classes =
-      GrowableObjectArray::Handle(isolate, object_store->pending_classes());
+      GrowableObjectArray::Handle(zone, object_store->pending_classes());
   Class& rhb = Class::Handle(CreateTestClass("RhB"));
   pending_classes.Add(rhb);
   Class& sbb = Class::Handle(CreateTestClass("SBB"));
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index 5a9ba10..adc7853 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -13,7 +13,7 @@
                                    intptr_t try_index) {
   ASSERT((kind == RawPcDescriptors::kRuntimeCall) ||
          (kind == RawPcDescriptors::kOther) ||
-         (deopt_id != Isolate::kNoDeoptId));
+         (deopt_id != Thread::kNoDeoptId));
 
   intptr_t merged_kind_try =
       RawPcDescriptors::MergedKindTry::Encode(kind, try_index);
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 5179b4a..60a3ab3 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -278,7 +278,7 @@
   const Context& ctx = Context::CheckedHandle(arguments.ArgAt(0));
   Context& cloned_ctx = Context::Handle(Context::New(ctx.num_variables()));
   cloned_ctx.set_parent(Context::Handle(ctx.parent()));
-  Object& inst = Object::Handle(isolate);
+  Object& inst = Object::Handle(zone);
   for (int i = 0; i < ctx.num_variables(); i++) {
     inst = ctx.At(i);
     cloned_ctx.SetAt(i, inst);
@@ -1387,7 +1387,7 @@
     ASSERT(function.unoptimized_code() != Object::null());
     intptr_t osr_id =
         Code::Handle(function.unoptimized_code()).GetDeoptIdForOsr(frame->pc());
-    ASSERT(osr_id != Isolate::kNoDeoptId);
+    ASSERT(osr_id != Thread::kNoDeoptId);
     if (FLAG_trace_osr) {
       OS::Print("Attempting OSR for %s at id=%" Pd ", count=%" Pd "\n",
                 function.ToFullyQualifiedCString(),
@@ -1456,7 +1456,7 @@
       ASSERT(isolate->background_compiler() != NULL);
       isolate->background_compiler()->CompileOptimized(function);
       // Continue in the same code.
-      arguments.SetReturn(Code::Handle(isolate, function.CurrentCode()));
+      arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
       return;
     }
     if (FLAG_trace_compiler) {
@@ -1466,14 +1466,14 @@
       }
     }
     const Error& error = Error::Handle(
-        isolate, Compiler::CompileOptimizedFunction(thread, function));
+        zone, Compiler::CompileOptimizedFunction(thread, function));
     if (!error.IsNull()) {
       Exceptions::PropagateError(error);
     }
-    const Code& optimized_code = Code::Handle(isolate, function.CurrentCode());
+    const Code& optimized_code = Code::Handle(zone, function.CurrentCode());
     ASSERT(!optimized_code.IsNull());
   }
-  arguments.SetReturn(Code::Handle(isolate, function.CurrentCode()));
+  arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
 }
 
 
@@ -1493,16 +1493,16 @@
     UNREACHABLE();
   }
   ASSERT(frame->IsDartFrame());
-  const Code& caller_code = Code::Handle(isolate, frame->LookupDartCode());
+  const Code& caller_code = Code::Handle(zone, frame->LookupDartCode());
   ASSERT(caller_code.is_optimized());
   const Function& target_function = Function::Handle(
-      isolate, caller_code.GetStaticCallTargetFunctionAt(frame->pc()));
+      zone, caller_code.GetStaticCallTargetFunctionAt(frame->pc()));
   const Code& target_code = Code::Handle(
-      isolate, caller_code.GetStaticCallTargetCodeAt(frame->pc()));
+      zone, caller_code.GetStaticCallTargetCodeAt(frame->pc()));
   ASSERT(!target_code.IsNull());
   if (!target_function.HasCode()) {
     const Error& error = Error::Handle(
-        isolate, Compiler::CompileFunction(thread, target_function));
+        zone, Compiler::CompileFunction(thread, target_function));
     if (!error.IsNull()) {
       Exceptions::PropagateError(error);
     }
@@ -1511,7 +1511,7 @@
   ASSERT(target_function.raw() == target_code.function());
 
   const Code& current_target_code = Code::Handle(
-      isolate, target_function.CurrentCode());
+      zone, target_function.CurrentCode());
   CodePatcher::PatchStaticCallAt(frame->pc(),
                                  caller_code,
                                  current_target_code);
@@ -1543,13 +1543,13 @@
     UNREACHABLE();
   }
   ASSERT(frame->IsDartFrame());
-  const Code& caller_code = Code::Handle(isolate, frame->LookupDartCode());
+  const Code& caller_code = Code::Handle(zone, frame->LookupDartCode());
   ASSERT(!caller_code.IsNull());
   const Code& stub = Code::Handle(
       CodePatcher::GetStaticCallTargetAt(frame->pc(), caller_code));
   Class& alloc_class = Class::ZoneHandle(zone);
   alloc_class ^= stub.owner();
-  Code& alloc_stub = Code::Handle(isolate, alloc_class.allocation_stub());
+  Code& alloc_stub = Code::Handle(zone, alloc_class.allocation_stub());
   if (alloc_stub.IsNull()) {
     alloc_stub = StubCode::GetAllocationStubForClass(alloc_class);
     ASSERT(!alloc_stub.IsDisabled());
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 666a47b..5d683ce 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -64,6 +64,7 @@
 DEFINE_FLAG(bool, verify_compiler, false,
     "Enable compiler verification assertions");
 
+DECLARE_FLAG(bool, background_compilation);
 DECLARE_FLAG(bool, load_deferred_eagerly);
 DECLARE_FLAG(bool, trace_failed_optimization_attempts);
 DECLARE_FLAG(bool, trace_inlining_intervals);
@@ -215,10 +216,10 @@
     const Class& cls,
     GrowableHandlePtrArray<const Class>* parse_list,
     GrowableHandlePtrArray<const Class>* patch_list) {
-  Isolate* isolate = Isolate::Current();
-  Class& parse_class = Class::Handle(isolate);
-  AbstractType& interface_type = Type::Handle(isolate);
-  Array& interfaces = Array::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  Class& parse_class = Class::Handle(zone);
+  AbstractType& interface_type = Type::Handle(zone);
+  Array& interfaces = Array::Handle(zone);
 
   // Add all the interfaces implemented by the class that have not been
   // already parsed to the parse list. Mark the interface as parsed so that
@@ -281,8 +282,9 @@
       ClassFinalizer::FinalizeClass(cls);
       return Error::null();
     } else {
-      Isolate* isolate = Isolate::Current();
-      Error& error = Error::Handle(isolate);
+      Thread* thread = Thread::Current();
+      Isolate* isolate = thread->isolate();
+      Error& error = Error::Handle(thread->zone());
       error = isolate->object_store()->sticky_error();
       isolate->object_store()->clear_sticky_error();
       return error.raw();
@@ -365,7 +367,7 @@
         parse_class.reset_is_marked_for_parsing();
       }
     }
-    Error& error = Error::Handle(isolate);
+    Error& error = Error::Handle(zone.GetZone());
     error = isolate->object_store()->sticky_error();
     isolate->object_store()->clear_sticky_error();
     return error.raw();
@@ -401,8 +403,8 @@
   // volatile because the variable may be clobbered by a longjmp.
   volatile bool use_far_branches = false;
   while (!done) {
-    const intptr_t prev_deopt_id = isolate->deopt_id();
-    isolate->set_deopt_id(0);
+    const intptr_t prev_deopt_id = thread->deopt_id();
+    thread->set_deopt_id(0);
     LongJumpScope jump;
     if (setjmp(*jump.Set()) == 0) {
       FlowGraph* flow_graph = NULL;
@@ -445,7 +447,7 @@
           FlowGraphPrinter::ShouldPrint(function);
 
       if (print_flow_graph) {
-        if (osr_id == Isolate::kNoDeoptId) {
+        if (osr_id == Thread::kNoDeoptId) {
           FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
         } else {
           FlowGraphPrinter::PrintGraph("For OSR", flow_graph);
@@ -756,7 +758,7 @@
 
         if (optimized) {
           // We may not have previous code if 'always_optimize' is set.
-          if ((osr_id == Isolate::kNoDeoptId) && function.HasCode()) {
+          if ((osr_id == Thread::kNoDeoptId) && function.HasCode()) {
             Code::Handle(function.CurrentCode()).DisableDartCode();
           }
           function.AttachCode(code);
@@ -794,7 +796,7 @@
         }
       }
       // Mark that this isolate now has compiled code.
-      isolate->set_has_compiled(true);
+      isolate->set_has_compiled_code(true);
       // Exit the loop and the function with the correct result value.
       is_compiled = true;
       done = true;
@@ -828,7 +830,7 @@
       is_compiled = false;
     }
     // Reset global isolate state.
-    isolate->set_deopt_id(prev_deopt_id);
+    thread->set_deopt_id(prev_deopt_id);
   }
   return is_compiled;
 }
@@ -1017,7 +1019,7 @@
         thread, Function::ZoneHandle(zone, function.raw()));
     if (FLAG_trace_compiler) {
       THR_Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
-                (osr_id == Isolate::kNoDeoptId ? "" : "osr "),
+                (osr_id == Thread::kNoDeoptId ? "" : "osr "),
                 (optimized ? "optimized " : ""),
                 function.ToFullyQualifiedCString(),
                 function.token_pos(),
@@ -1119,7 +1121,7 @@
       Compiler::always_optimize() && function.IsOptimizable();
 
   return CompileFunctionHelper(pipeline, function, optimized,
-      Isolate::kNoDeoptId);
+      Thread::kNoDeoptId);
 }
 
 
@@ -1135,7 +1137,7 @@
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
   const Error& error = Error::Handle(
-      CompileFunctionHelper(pipeline, function, false, Isolate::kNoDeoptId));
+      CompileFunctionHelper(pipeline, function, false, Thread::kNoDeoptId));
   if (!error.IsNull()) {
     return error.raw();
   }
@@ -1160,6 +1162,10 @@
   TIMELINE_FUNCTION_COMPILATION_DURATION(thread,
                                          "OptimizedFunction", function);
 
+  // Optimization must happen in non-mutator/Dart thread if background
+  // compilation is on.
+  ASSERT(!FLAG_background_compilation ||
+         !thread->isolate()->MutatorThreadIsCurrentThread());
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
   return CompileFunctionHelper(pipeline, function, true, osr_id);
@@ -1176,7 +1182,7 @@
     CompileParsedFunctionHelper(&pipeline,
                                 parsed_function,
                                 false,
-                                Isolate::kNoDeoptId);
+                                Thread::kNoDeoptId);
     if (FLAG_disassemble) {
       DisassembleCode(parsed_function->function(), false);
     }
@@ -1282,7 +1288,7 @@
   CompileParsedFunctionHelper(&pipeline,
                               parsed_function,
                               false,  // optimized
-                              Isolate::kNoDeoptId);
+                              Thread::kNoDeoptId);
 
   const Function& initializer = parsed_function->function();
   field.SetPrecompiledInitializer(initializer);
@@ -1313,7 +1319,7 @@
       CompileParsedFunctionHelper(&pipeline,
                                   parsed_function,
                                   false,  // optimized
-                                  Isolate::kNoDeoptId);
+                                  Thread::kNoDeoptId);
       initializer = parsed_function->function().raw();
       Code::Handle(initializer.unoptimized_code()).set_var_descriptors(
           Object::empty_var_descriptors());
@@ -1383,7 +1389,7 @@
     CompileParsedFunctionHelper(&pipeline,
                                 parsed_function,
                                 false,
-                                Isolate::kNoDeoptId);
+                                Thread::kNoDeoptId);
     Code::Handle(func.unoptimized_code()).set_var_descriptors(
         Object::empty_var_descriptors());
 
@@ -1470,19 +1476,13 @@
       Function& function = Function::Handle();
       function = RemoveOrNull();
       while (!function.IsNull()) {
-        if (true) {
-          // Debugging printing
-          THR_Print("Background compilation: %s\n",
-              function.ToQualifiedCString());
-        } else {
-          const Error& error = Error::Handle(
-              Compiler::CompileOptimizedFunction(thread, function));
-          // TODO(srdjan): We do not expect errors while compiling optimized
-          // code, any errors should have been caught when compiling
-          // unotpimized code.
-          // If it still happens mark function as not optimizable.
-          ASSERT(error.IsNull());
-        }
+        const Error& error = Error::Handle(
+            Compiler::CompileOptimizedFunction(thread, function));
+        // TODO(srdjan): We do not expect errors while compiling optimized
+        // code, any errors should have been caught when compiling
+        // unoptimized code.
+        // If it still happens mark function as not optimizable.
+        ASSERT(error.IsNull());
         function = RemoveOrNull();
       }
     }
@@ -1552,8 +1552,8 @@
     if (isolate->background_compiler() == NULL) {
       BackgroundCompiler* task = new BackgroundCompiler(isolate);
       isolate->set_background_compiler(task);
-      isolate->set_background_compilation_queue(
-          GrowableObjectArray::Handle(isolate, GrowableObjectArray::New()));
+      isolate->set_background_compilation_queue(GrowableObjectArray::Handle(
+          isolate->current_zone(), GrowableObjectArray::New()));
       start_task = true;
     }
   }
diff --git a/runtime/vm/compiler.h b/runtime/vm/compiler.h
index f31e00a..9c3e73f 100644
--- a/runtime/vm/compiler.h
+++ b/runtime/vm/compiler.h
@@ -50,7 +50,7 @@
   static RawError* CompileOptimizedFunction(
       Thread* thread,
       const Function& function,
-      intptr_t osr_id = Isolate::kNoDeoptId);
+      intptr_t osr_id = Thread::kNoDeoptId);
 
   // Generates code for given parsed function (without parsing it again) and
   // sets its code field.
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index f6431d2..19e4953 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -183,8 +183,8 @@
       lib_handle.LookupClass(String::Handle(Symbols::New("A"))));
   EXPECT(!cls.IsNull());
 
-  Isolate* isolate = Isolate::Current();
-  const Code& stub = Code::Handle(isolate,
+  Zone* zone = thread->zone();
+  const Code& stub = Code::Handle(zone,
                                   StubCode::GetAllocationStubForClass(cls));
   Class& owner = Class::Handle();
   owner ^= stub.owner();
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 6ccc307..61c09a6 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -431,7 +431,7 @@
     ASSERT(value.IsBool());
     bool result = Bool::Cast(value).value();
     SetValue(instr,
-             Smi::Handle(I, Smi::New(
+             Smi::Handle(Z, Smi::New(
                  result ? instr->if_true() : instr->if_false())));
   }
 }
@@ -521,9 +521,9 @@
         !left.IsBigint() && !right.IsBigint()) {
       const bool result = CompareIntegers(
           instr->kind(),
-          Integer::Handle(I, Integer::Cast(left).BitOp(Token::kBIT_AND,
+          Integer::Handle(Z, Integer::Cast(left).BitOp(Token::kBIT_AND,
                                                        Integer::Cast(right))),
-          Smi::Handle(I, Smi::New(0)));
+          Smi::Handle(Z, Smi::New(0)));
       SetValue(instr, result ? Bool::True() : Bool::False());
     } else {
       SetValue(instr, non_constant_);
@@ -662,14 +662,14 @@
       if (array_obj.IsString()) {
         const String& str = String::Cast(array_obj);
         if (str.Length() > index) {
-          SetValue(instr, Smi::Handle(I,
+          SetValue(instr, Smi::Handle(Z,
               Smi::New(static_cast<intptr_t>(str.CharAt(index)))));
           return;
         }
       } else if (array_obj.IsArray()) {
         const Array& a = Array::Cast(array_obj);
         if ((a.Length() > index) && a.IsImmutable()) {
-          Instance& result = Instance::Handle(I);
+          Instance& result = Instance::Handle(Z);
           result ^= a.At(index);
           SetValue(instr, result);
           return;
@@ -706,7 +706,7 @@
 void ConstantPropagator::VisitLoadStaticField(LoadStaticFieldInstr* instr) {
   const Field& field = instr->StaticField();
   ASSERT(field.is_static());
-  Instance& obj = Instance::Handle(I, field.StaticValue());
+  Instance& obj = Instance::Handle(Z, field.StaticValue());
   if (field.is_final() && (obj.raw() != Object::sentinel().raw()) &&
       (obj.raw() != Object::transition_sentinel().raw())) {
     if (obj.IsSmi() || obj.IsOld()) {
@@ -924,7 +924,7 @@
       const Integer& left_int = Integer::Cast(left);
       const Integer& right_int = Integer::Cast(right);
       const Integer& result =
-          Integer::Handle(I, binary_op->Evaluate(left_int, right_int));
+          Integer::Handle(Z, binary_op->Evaluate(left_int, right_int));
       if (!result.IsNull()) {
         SetValue(binary_op, Integer::ZoneHandle(Z, result.raw()));
         return;
@@ -983,7 +983,7 @@
   if (IsConstant(value) && value.IsInteger()) {
     const Integer& value_int = Integer::Cast(value);
     const Integer& result =
-        Integer::Handle(I, unary_op->Evaluate(value_int));
+        Integer::Handle(Z, unary_op->Evaluate(value_int));
     if (!result.IsNull()) {
       SetValue(unary_op, Integer::ZoneHandle(Z, result.raw()));
       return;
@@ -1018,7 +1018,7 @@
 void ConstantPropagator::VisitSmiToDouble(SmiToDoubleInstr* instr) {
   const Object& value = instr->value()->definition()->constant_value();
   if (IsConstant(value) && value.IsInteger()) {
-    SetValue(instr, Double::Handle(I,
+    SetValue(instr, Double::Handle(Z,
         Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
   } else if (!IsUnknown(value)) {
     SetValue(instr, non_constant_);
@@ -1029,7 +1029,7 @@
 void ConstantPropagator::VisitMintToDouble(MintToDoubleInstr* instr) {
   const Object& value = instr->value()->definition()->constant_value();
   if (IsConstant(value) && value.IsInteger()) {
-    SetValue(instr, Double::Handle(I,
+    SetValue(instr, Double::Handle(Z,
         Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
   } else if (!IsUnknown(value)) {
     SetValue(instr, non_constant_);
@@ -1040,7 +1040,7 @@
 void ConstantPropagator::VisitInt32ToDouble(Int32ToDoubleInstr* instr) {
   const Object& value = instr->value()->definition()->constant_value();
   if (IsConstant(value) && value.IsInteger()) {
-    SetValue(instr, Double::Handle(I,
+    SetValue(instr, Double::Handle(Z,
         Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
   } else if (!IsUnknown(value)) {
     SetValue(instr, non_constant_);
diff --git a/runtime/vm/coverage.cc b/runtime/vm/coverage.cc
index 65dc7e1..73fb5b6 100644
--- a/runtime/vm/coverage.cc
+++ b/runtime/vm/coverage.cc
@@ -231,7 +231,7 @@
 }
 
 
-void CodeCoverage::Write(Isolate* isolate) {
+void CodeCoverage::Write(Thread* thread) {
   if (FLAG_coverage_dir == NULL) {
     return;
   }
@@ -244,12 +244,12 @@
   }
 
   JSONStream stream;
-  PrintJSON(isolate, &stream, NULL, false);
+  PrintJSON(thread, &stream, NULL, false);
 
   intptr_t pid = OS::ProcessId();
-  char* filename = OS::SCreate(Thread::Current()->zone(),
+  char* filename = OS::SCreate(thread->zone(),
       "%s/dart-cov-%" Pd "-%" Pd64 ".json",
-      FLAG_coverage_dir, pid, isolate->main_port());
+      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);
@@ -260,7 +260,7 @@
 }
 
 
-void CodeCoverage::PrintJSON(Isolate* isolate,
+void CodeCoverage::PrintJSON(Thread* thread,
                              JSONStream* stream,
                              CoverageFilter* filter,
                              bool as_call_sites) {
@@ -269,7 +269,8 @@
     filter = &default_filter;
   }
   const GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      isolate, isolate->object_store()->libraries());
+      thread->zone(),
+      thread->isolate()->object_store()->libraries());
   Library& lib = Library::Handle();
   Class& cls = Class::Handle();
   JSONObject coverage(stream);
diff --git a/runtime/vm/coverage.h b/runtime/vm/coverage.h
index 496ff65..8c2ce23 100644
--- a/runtime/vm/coverage.h
+++ b/runtime/vm/coverage.h
@@ -34,8 +34,8 @@
 
 class CodeCoverage : public AllStatic {
  public:
-  static void Write(Isolate* isolate);
-  static void PrintJSON(Isolate* isolate,
+  static void Write(Thread* thread);
+  static void PrintJSON(Thread* thread,
                         JSONStream* stream,
                         CoverageFilter* filter,
                         bool as_call_sites);
diff --git a/runtime/vm/coverage_test.cc b/runtime/vm/coverage_test.cc
index 92a98cd..1a2b0eb 100644
--- a/runtime/vm/coverage_test.cc
+++ b/runtime/vm/coverage_test.cc
@@ -39,13 +39,12 @@
       "main() {\n"
       "}";
 
-  Isolate* isolate = Isolate::Current();
   Library& lib = Library::Handle();
   lib ^= ExecuteScript(kScript);
   ASSERT(!lib.IsNull());
 
   JSONStream js;
-  CodeCoverage::PrintJSON(isolate, &js, NULL, false);
+  CodeCoverage::PrintJSON(thread, &js, NULL, false);
 
   char buf[1024];
   OS::SNPrint(buf, sizeof(buf),
@@ -72,13 +71,12 @@
       "  foo.bar();\n"
       "}\n";
 
-  Isolate* isolate = Isolate::Current();
   Library& lib = Library::Handle();
   lib ^= ExecuteScript(kScript);
   ASSERT(!lib.IsNull());
 
   JSONStream js;
-  CodeCoverage::PrintJSON(isolate, &js, NULL, false);
+  CodeCoverage::PrintJSON(thread, &js, NULL, false);
 
   char buf[1024];
   // Coverage data is printed per class, i.e., there should be two sections
@@ -115,7 +113,6 @@
       "  var foo = new Foo(7);\n"
       "}\n";
 
-  Isolate* isolate = Isolate::Current();
   Library& lib = Library::Handle();
   lib ^= ExecuteScript(kScript);
   ASSERT(!lib.IsNull());
@@ -128,7 +125,7 @@
 
   JSONStream js;
   FunctionCoverageFilter filter(func);
-  CodeCoverage::PrintJSON(isolate, &js, &filter, false);
+  CodeCoverage::PrintJSON(thread, &js, &filter, false);
   // Only expect coverage data for Foo.yetAnother() on line 6.
   char buf[1024];
   OS::SNPrint(buf, sizeof(buf),
diff --git a/runtime/vm/cpu_arm.cc b/runtime/vm/cpu_arm.cc
index 5a66954..44964d2 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -165,14 +165,21 @@
       FLAG_use_vfp;
 
   // Has integer division.
+  // Special cases:
+  // - Qualcomm Krait CPUs (QCT APQ8064) in Nexus 4 and 7 incorrectly report
+  //   that they lack integer division.
+  // - Marvell Armada 370/XP incorrectly reports that it has integer division.
   bool is_krait = CpuInfo::FieldContains(kCpuInfoHardware, "QCT APQ8064");
+  bool is_armada_370xp =
+      CpuInfo::FieldContains(kCpuInfoHardware, "Marvell Armada 370/XP");
   if (is_krait) {
-    // Special case for Qualcomm Krait CPUs in Nexus 4 and 7.
     integer_division_supported_ = FLAG_use_integer_division;
-  } else {
+  } else if (!is_armada_370xp) {
     integer_division_supported_ =
         (CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64) &&
         FLAG_use_integer_division;
+  } else {
+    integer_division_supported_ = false;
   }
   neon_supported_ =
       (CpuInfo::FieldContains(kCpuInfoFeatures, "neon") || is_arm64) &&
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 1d9105d..8ed714a 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -90,8 +90,8 @@
   OS::InitOnce();
   VirtualMemory::InitOnce();
   Thread::InitOnceBeforeIsolate();
-  Timeline::InitOnce();
   Thread::EnsureInit();
+  Timeline::InitOnce();
   TimelineDurationScope tds(Timeline::GetVMStream(),
                             "Dart::InitOnce");
   Isolate::InitOnce();
@@ -256,6 +256,8 @@
 
     TargetCPUFeatures::Cleanup();
     StoreBuffer::ShutDown();
+
+    Thread::Shutdown();
   } else {
     // Shutdown the service isolate.
     ServiceIsolate::Shutdown();
@@ -281,7 +283,7 @@
   // Initialize the new isolate.
   Thread* T = Thread::Current();
   Isolate* I = T->isolate();
-  TimelineDurationScope tds(I, I->GetIsolateStream(), "InitializeIsolate");
+  TimelineDurationScope tds(T, I->GetIsolateStream(), "InitializeIsolate");
   tds.SetNumArguments(1);
   tds.CopyArgument(0, "isolateName", I->name());
 
@@ -289,7 +291,7 @@
   StackZone zone(T);
   HandleScope handle_scope(T);
   {
-    TimelineDurationScope tds(I, I->GetIsolateStream(), "ObjectStore::Init");
+    TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init");
     ObjectStore::Init(I);
   }
 
@@ -303,7 +305,7 @@
   if (snapshot_buffer != NULL) {
     // Read the snapshot and setup the initial state.
     TimelineDurationScope tds(
-        I, I->GetIsolateStream(), "IsolateSnapshotReader");
+        T, I->GetIsolateStream(), "IsolateSnapshotReader");
     // TODO(turnidge): Remove once length is not part of the snapshot.
     const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
     if (snapshot == NULL) {
@@ -341,7 +343,7 @@
 #endif
 
   {
-    TimelineDurationScope tds(I, I->GetIsolateStream(), "StubCode::Init");
+    TimelineDurationScope tds(T, I->GetIsolateStream(), "StubCode::Init");
     StubCode::Init(I);
   }
 
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 473a665..55a352f 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -85,11 +85,11 @@
 // or not. An assertion is raised if a type is not canonicalized.
 class FunctionVisitor : public ObjectVisitor {
  public:
-  explicit FunctionVisitor(Isolate* isolate) :
-      ObjectVisitor(isolate),
-      classHandle_(Class::Handle(isolate)),
-      funcHandle_(Function::Handle(isolate)),
-      typeHandle_(AbstractType::Handle(isolate)) {}
+  explicit FunctionVisitor(Thread* thread) :
+      ObjectVisitor(thread->isolate()),
+      classHandle_(Class::Handle(thread->zone())),
+      funcHandle_(Function::Handle(thread->zone())),
+      typeHandle_(AbstractType::Handle(thread->zone())) {}
 
   void VisitObject(RawObject* obj) {
     if (obj->IsFunction()) {
@@ -172,11 +172,12 @@
     *str = NULL;
     return true;
   }
-  Isolate* isolate = arguments->thread()->isolate();
+  Thread* thread = arguments->thread();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate == Isolate::Current());
   *peer = NULL;
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = arguments->NativeArgAt(arg_index);
   if (RawObject::IsStringClassId(obj.GetClassId())) {
     ASSERT(isolate->api_state() &&
@@ -199,10 +200,10 @@
   if (Api::GetNativeIntegerArgument(arguments, arg_index, value)) {
     return true;
   }
-  Isolate* isolate = arguments->thread()->isolate();
-  ASSERT(isolate == Isolate::Current());
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = arguments->thread();
+  ASSERT(thread == Thread::Current());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = arguments->NativeArgAt(arg_index);
   intptr_t cid = obj.GetClassId();
   if (cid == kBigintCid) {
@@ -225,10 +226,10 @@
     *value = static_cast<uint64_t>(arg_value);
     return true;
   }
-  Isolate* isolate = arguments->thread()->isolate();
-  ASSERT(isolate == Isolate::Current());
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = arguments->thread();
+  ASSERT(thread == Thread::Current());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = arguments->NativeArgAt(arg_index);
   intptr_t cid = obj.GetClassId();
   if (cid == kBigintCid) {
@@ -249,10 +250,10 @@
   if (Api::GetNativeDoubleArgument(arguments, arg_index, value)) {
     return true;
   }
-  Isolate* isolate = arguments->thread()->isolate();
-  ASSERT(isolate == Isolate::Current());
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = arguments->thread();
+  ASSERT(thread == Thread::Current());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = arguments->NativeArgAt(arg_index);
   intptr_t cid = obj.GetClassId();
   if (cid == kBigintCid) {
@@ -275,10 +276,10 @@
                                      field_values)) {
     return Api::Success();
   }
-  Isolate* isolate = arguments->thread()->isolate();
-  ASSERT(isolate == Isolate::Current());
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = arguments->thread();
+  ASSERT(thread == Thread::Current());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = arguments->NativeArgAt(arg_index);
   if (obj.IsNull()) {
     memset(field_values, 0, (num_fields * sizeof(field_values[0])));
@@ -396,13 +397,13 @@
 
 
 #define DEFINE_UNWRAP(type)                                                    \
-  const type& Api::Unwrap##type##Handle(Isolate* iso,                          \
+  const type& Api::Unwrap##type##Handle(Zone* zone,                            \
                                         Dart_Handle dart_handle) {             \
-    const Object& obj = Object::Handle(iso, Api::UnwrapHandle(dart_handle));   \
+    const Object& obj = Object::Handle(zone, Api::UnwrapHandle(dart_handle));  \
     if (obj.Is##type()) {                                                      \
       return type::Cast(obj);                                                  \
     }                                                                          \
-    return type::Handle(iso);                                                  \
+    return type::Handle(zone  );                                               \
   }
 CLASS_LIST_FOR_HANDLES(DEFINE_UNWRAP)
 #undef DEFINE_UNWRAP
@@ -450,7 +451,7 @@
 
 Dart_Handle Api::NewError(const char* format, ...) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   va_list args;
   va_start(args, format);
@@ -813,7 +814,7 @@
 // fix this but not sure if it available on all of our builds.
 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   const String& message = String::Handle(Z, String::New(error));
   return Api::NewHandle(I, ApiError::New(message));
@@ -822,16 +823,16 @@
 
 DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   Instance& obj = Instance::Handle(Z);
   intptr_t class_id = Api::ClassId(exception);
   if ((class_id == kApiErrorCid) || (class_id == kLanguageErrorCid)) {
     obj = String::New(::Dart_GetError(exception));
   } else {
-    obj = Api::UnwrapInstanceHandle(I, exception).raw();
+    obj = Api::UnwrapInstanceHandle(Z, exception).raw();
     if (obj.IsNull()) {
-      RETURN_TYPE_ERROR(I, exception, Instance);
+      RETURN_TYPE_ERROR(Z, exception, Instance);
     }
   }
   const Stacktrace& stacktrace = Stacktrace::Handle(Z);
@@ -840,9 +841,11 @@
 
 
 DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   {
-    const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(handle));
+    const Object& obj = Object::Handle(thread->zone(),
+        Api::UnwrapHandle(handle));
     if (!obj.IsError()) {
       return Api::NewError(
           "%s expects argument 'handle' to be an error handle.  "
@@ -866,9 +869,11 @@
     // that GC won't touch the raw error object before creating a valid
     // handle for it in the surviving zone.
     NoSafepointScope no_safepoint;
-    RawError* raw_error = Api::UnwrapErrorHandle(isolate, handle).raw();
+    RawError* raw_error = Api::UnwrapErrorHandle(thread->zone(), handle).raw();
     state->UnwindScopes(isolate->top_exit_frame_info());
-    error = &Error::Handle(isolate, raw_error);
+    // Note that thread's zone is different here than at the beginning of this
+    // function.
+    error = &Error::Handle(thread->zone(), raw_error);
   }
   Exceptions::PropagateError(*error);
   UNREACHABLE();
@@ -892,11 +897,11 @@
   if (obj.IsString()) {
     return Api::NewHandle(I, obj.raw());
   } else if (obj.IsInstance()) {
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
     const Instance& receiver = Instance::Cast(obj);
     return Api::NewHandle(I, DartLibraryCalls::ToString(receiver));
   } else {
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
     // This is a VM internal object. Call the C++ method of printing.
     return Api::NewHandle(I, String::New(obj.ToCString()));
   }
@@ -1009,17 +1014,17 @@
 
 
 static Dart_WeakPersistentHandle AllocateFinalizableHandle(
-    Isolate* isolate,
+    Thread* thread,
     Dart_Handle object,
     bool is_prologue,
     void* peer,
     intptr_t external_allocation_size,
     Dart_WeakPersistentHandleFinalizer callback) {
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& ref = isolate->ObjectHandle();
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& ref = thread->ObjectHandle();
   ref = Api::UnwrapHandle(object);
   FinalizablePersistentHandle* finalizable_ref =
-      FinalizablePersistentHandle::New(isolate,
+      FinalizablePersistentHandle::New(thread->isolate(),
                                        is_prologue,
                                        ref,
                                        peer,
@@ -1034,12 +1039,12 @@
     void* peer,
     intptr_t external_allocation_size,
     Dart_WeakPersistentHandleFinalizer callback) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
   if (callback == NULL) {
     return NULL;
   }
-  return AllocateFinalizableHandle(isolate,
+  return AllocateFinalizableHandle(thread,
                                    object,
                                    false,
                                    peer,
@@ -1053,12 +1058,12 @@
     void* peer,
     intptr_t external_allocation_size,
     Dart_WeakPersistentHandleFinalizer callback) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
   if (callback == NULL) {
     return NULL;
   }
-  return AllocateFinalizableHandle(isolate,
+  return AllocateFinalizableHandle(thread,
                                    object,
                                    true,
                                    peer,
@@ -1212,12 +1217,13 @@
 
 class PrologueWeakVisitor : public HandleVisitor {
  public:
-  PrologueWeakVisitor(Isolate* isolate,
+  PrologueWeakVisitor(Thread* thread,
                       Dart_GcPrologueWeakHandleCallback callback)
-      :  HandleVisitor(isolate),
+      :  HandleVisitor(thread),
          callback_(callback) {
   }
 
+
   void VisitHandle(uword addr) {
     NoSafepointScope no_safepoint;
     FinalizablePersistentHandle* handle =
@@ -1225,13 +1231,13 @@
     RawObject* raw_obj = handle->raw();
     if (raw_obj->IsHeapObject()) {
       ASSERT(handle->IsPrologueWeakPersistent());
-      ReusableInstanceHandleScope reused_instance_handle(isolate());
+      ReusableInstanceHandleScope reused_instance_handle(thread());
       Instance& instance = reused_instance_handle.Handle();
       instance ^= reinterpret_cast<RawInstance*>(handle->raw());
       intptr_t num_native_fields = instance.NumNativeFields();
       intptr_t* native_fields = instance.NativeFieldsDataAddr();
       if (native_fields != NULL) {
-        callback_(isolate()->init_callback_data(),
+        callback_(thread()->isolate()->init_callback_data(),
                   reinterpret_cast<Dart_WeakPersistentHandle>(addr),
                   num_native_fields,
                   native_fields);
@@ -1248,10 +1254,10 @@
 
 DART_EXPORT Dart_Handle Dart_VisitPrologueWeakHandles(
     Dart_GcPrologueWeakHandleCallback callback) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  PrologueWeakVisitor visitor(isolate, callback);
-  isolate->VisitPrologueWeakPersistentHandles(&visitor);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  PrologueWeakVisitor visitor(thread, callback);
+  thread->isolate()->VisitPrologueWeakPersistentHandles(&visitor);
   return Api::Success();
 }
 
@@ -1483,7 +1489,7 @@
 DART_EXPORT Dart_Handle Dart_IsolateSetStrictCompilation(bool value) {
   CHECK_ISOLATE(Isolate::Current());
   Isolate* isolate = Isolate::Current();
-  if (isolate->has_compiled()) {
+  if (isolate->has_compiled_code()) {
     return Api::NewError(
         "%s expects that the isolate has not yet compiled code.", CURRENT_FUNC);
   }
@@ -1528,7 +1534,7 @@
   }
   I->heap()->CollectAllGarbage();
 #if defined(DEBUG)
-  FunctionVisitor check_canonical(I);
+  FunctionVisitor check_canonical(T);
   I->heap()->IterateObjects(&check_canonical);
 #endif  // #if defined(DEBUG).
 
@@ -1570,7 +1576,7 @@
   }
   I->heap()->CollectAllGarbage();
 #if defined(DEBUG)
-  FunctionVisitor check_canonical(I);
+  FunctionVisitor check_canonical(T);
   I->heap()->IterateObjects(&check_canonical);
 #endif  // #if defined(DEBUG).
   ScriptSnapshotWriter writer(buffer, ApiReallocate);
@@ -1648,7 +1654,7 @@
   Thread* T = Thread::Current();
   Isolate* I = T->isolate();
   CHECK_ISOLATE_SCOPE(I);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   Monitor monitor;
   MonitorLocker ml(&monitor);
   {
@@ -1678,9 +1684,10 @@
 
 
 DART_EXPORT Dart_Handle Dart_HandleMessage() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   CHECK_ISOLATE_SCOPE(isolate);
-  CHECK_CALLBACK_STATE(isolate);
+  CHECK_CALLBACK_STATE(thread);
   if (isolate->message_handler()->HandleNextMessage() != MessageHandler::kOK) {
     Dart_Handle error = Api::NewHandle(isolate,
                                        isolate->object_store()->sticky_error());
@@ -1692,9 +1699,10 @@
 
 
 DART_EXPORT bool Dart_HandleServiceMessages() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   CHECK_ISOLATE_SCOPE(isolate);
-  CHECK_CALLBACK_STATE(isolate);
+  CHECK_CALLBACK_STATE(thread);
 
   ASSERT(isolate->GetAndClearResumeRequest() == false);
   MessageHandler::MessageStatus status =
@@ -1741,7 +1749,7 @@
 
 DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   if (port_id == ILLEGAL_PORT) {
     return Api::NewError("%s: illegal port_id %" Pd64 ".",
                          CURRENT_FUNC,
@@ -1754,10 +1762,10 @@
 DART_EXPORT Dart_Handle Dart_SendPortGetId(Dart_Handle port,
                                            Dart_Port* port_id) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
-  const SendPort& send_port = Api::UnwrapSendPortHandle(I, port);
+  CHECK_CALLBACK_STATE(T);
+  const SendPort& send_port = Api::UnwrapSendPortHandle(Z, port);
   if (send_port.IsNull()) {
-    RETURN_TYPE_ERROR(I, port, SendPort);
+    RETURN_TYPE_ERROR(Z, port, SendPort);
   }
   if (port_id == NULL) {
     RETURN_NULL_ERROR(port_id);
@@ -1854,7 +1862,7 @@
 DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, Dart_Handle obj2,
                                           bool* value) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   const Instance& expected =
       Instance::CheckedHandle(Z, Api::UnwrapHandle(obj1));
   const Instance& actual =
@@ -1880,10 +1888,10 @@
                                           bool* value) {
   DARTSCOPE(Thread::Current());
 
-  const Type& type_obj = Api::UnwrapTypeHandle(I, type);
+  const Type& type_obj = Api::UnwrapTypeHandle(Z, type);
   if (type_obj.IsNull()) {
     *value = false;
-    RETURN_TYPE_ERROR(I, type, Type);
+    RETURN_TYPE_ERROR(Z, type, Type);
   }
   if (!type_obj.IsFinalized()) {
     return Api::NewError(
@@ -1894,12 +1902,12 @@
     *value = false;
     return Api::Success();
   }
-  const Instance& instance = Api::UnwrapInstanceHandle(I, object);
+  const Instance& instance = Api::UnwrapInstanceHandle(Z, object);
   if (instance.IsNull()) {
     *value = false;
-    RETURN_TYPE_ERROR(I, object, Instance);
+    RETURN_TYPE_ERROR(Z, object, Instance);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   Error& malformed_type_error = Error::Handle(Z);
   *value = instance.IsInstanceOf(type_obj,
                                  Object::null_type_arguments(),
@@ -1910,10 +1918,10 @@
 
 
 DART_EXPORT bool Dart_IsInstance(Dart_Handle object) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& ref = isolate->ObjectHandle();
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& ref = thread->ObjectHandle();
   ref = Api::UnwrapHandle(object);
   return ref.IsInstance();
 }
@@ -2013,9 +2021,9 @@
 DART_EXPORT bool Dart_IsClosure(Dart_Handle object) {
   // We can't use a fast class index check here because there are many
   // different signature classes for closures.
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const Instance& closure_obj =
       Api::UnwrapInstanceHandle(reused_obj_handle, object);
   return (!closure_obj.IsNull() && closure_obj.IsClosure());
@@ -2067,7 +2075,7 @@
     return Api::NewHandle(I, I->object_store()->null_type());
   }
   if (!obj.IsInstance()) {
-    RETURN_TYPE_ERROR(I, instance, Instance);
+    RETURN_TYPE_ERROR(Z, instance, Instance);
   }
   const Type& type = Type::Handle(Instance::Cast(obj).GetType());
   return Api::NewHandle(I, type.Canonicalize());
@@ -2089,9 +2097,9 @@
   }
   // Slow path for Mints and Bigints.
   DARTSCOPE(thread);
-  const Integer& int_obj = Api::UnwrapIntegerHandle(isolate, integer);
+  const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   if (int_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, integer, Integer);
+    RETURN_TYPE_ERROR(Z, integer, Integer);
   }
   ASSERT(!Bigint::Cast(int_obj).FitsIntoInt64());
   *fits = false;
@@ -2111,9 +2119,9 @@
   }
   // Slow path for Mints and Bigints.
   DARTSCOPE(thread);
-  const Integer& int_obj = Api::UnwrapIntegerHandle(isolate, integer);
+  const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   if (int_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, integer, Integer);
+    RETURN_TYPE_ERROR(Z, integer, Integer);
   }
   ASSERT(!int_obj.IsSmi());
   if (int_obj.IsMint()) {
@@ -2136,21 +2144,21 @@
   }
   // Slow path for Mints and Bigints.
   DARTSCOPE(thread);
-  CHECK_CALLBACK_STATE(isolate);
+  CHECK_CALLBACK_STATE(thread);
   return Api::NewHandle(isolate, Integer::New(value));
 }
 
 
 DART_EXPORT Dart_Handle Dart_NewIntegerFromUint64(uint64_t value) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, Integer::NewFromUint64(value));
 }
 
 
 DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* str) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   const String& str_obj = String::Handle(Z, String::New(str));
   return Api::NewHandle(I, Integer::New(str_obj));
 }
@@ -2168,9 +2176,9 @@
   }
   // Slow path for Mints and Bigints.
   DARTSCOPE(thread);
-  const Integer& int_obj = Api::UnwrapIntegerHandle(isolate, integer);
+  const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   if (int_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, integer, Integer);
+    RETURN_TYPE_ERROR(Z, integer, Integer);
   }
   ASSERT(!int_obj.IsSmi());
   if (int_obj.IsMint()) {
@@ -2203,9 +2211,9 @@
   }
   // Slow path for Mints and Bigints.
   DARTSCOPE(thread);
-  const Integer& int_obj = Api::UnwrapIntegerHandle(isolate, integer);
+  const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   if (int_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, integer, Integer);
+    RETURN_TYPE_ERROR(Z, integer, Integer);
   }
   if (int_obj.IsSmi()) {
     ASSERT(int_obj.IsNegative());
@@ -2232,9 +2240,9 @@
 DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
                                                  const char** value) {
   DARTSCOPE(Thread::Current());
-  const Integer& int_obj = Api::UnwrapIntegerHandle(I, integer);
+  const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   if (int_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, integer, Integer);
+    RETURN_TYPE_ERROR(Z, integer, Integer);
   }
   if (int_obj.IsSmi() || int_obj.IsMint()) {
     const Bigint& bigint = Bigint::Handle(Z,
@@ -2249,7 +2257,7 @@
 
 DART_EXPORT Dart_Handle Dart_NewDouble(double value) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, Double::New(value));
 }
 
@@ -2257,9 +2265,9 @@
 DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj,
                                          double* value) {
   DARTSCOPE(Thread::Current());
-  const Double& obj = Api::UnwrapDoubleHandle(I, double_obj);
+  const Double& obj = Api::UnwrapDoubleHandle(Z, double_obj);
   if (obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, double_obj, Double);
+    RETURN_TYPE_ERROR(Z, double_obj, Double);
   }
   *value = obj.value();
   return Api::Success();
@@ -2290,9 +2298,9 @@
 DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle boolean_obj,
                                           bool* value) {
   DARTSCOPE(Thread::Current());
-  const Bool& obj = Api::UnwrapBoolHandle(I, boolean_obj);
+  const Bool& obj = Api::UnwrapBoolHandle(Z, boolean_obj);
   if (obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, boolean_obj, Bool);
+    RETURN_TYPE_ERROR(Z, boolean_obj, Bool);
   }
   *value = obj.value();
   return Api::Success();
@@ -2303,12 +2311,12 @@
 
 
 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str_obj = Api::UnwrapStringHandle(reused_obj_handle, str);
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, str, String);
+    RETURN_TYPE_ERROR(thread->zone(), str, String);
   }
   *len = str_obj.Length();
   return Api::Success();
@@ -2320,7 +2328,7 @@
   if (str == NULL) {
     RETURN_NULL_ERROR(str);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, String::New(str));
 }
 
@@ -2336,7 +2344,7 @@
     return Api::NewError("%s expects argument 'str' to be valid UTF-8.",
                          CURRENT_FUNC);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, String::FromUTF8(utf8_array, length));
 }
 
@@ -2348,7 +2356,7 @@
     RETURN_NULL_ERROR(utf16_array);
   }
   CHECK_LENGTH(length, String::kMaxElements);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, String::FromUTF16(utf16_array, length));
 }
 
@@ -2360,7 +2368,7 @@
     RETURN_NULL_ERROR(utf32_array);
   }
   CHECK_LENGTH(length, String::kMaxElements);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, String::FromUTF32(utf32_array, length));
 }
 
@@ -2375,7 +2383,7 @@
     RETURN_NULL_ERROR(latin1_array);
   }
   CHECK_LENGTH(length, String::kMaxElements);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I,
                         String::NewExternal(latin1_array,
                                             length,
@@ -2394,7 +2402,7 @@
     RETURN_NULL_ERROR(utf16_array);
   }
   CHECK_LENGTH(length, String::kMaxElements);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   intptr_t bytes = length * sizeof(*utf16_array);
   return Api::NewHandle(I,
                         String::NewExternal(utf16_array,
@@ -2411,9 +2419,9 @@
   if (cstr == NULL) {
     RETURN_NULL_ERROR(cstr);
   }
-  const String& str_obj = Api::UnwrapStringHandle(I, object);
+  const String& str_obj = Api::UnwrapStringHandle(Z, object);
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, object, String);
+    RETURN_TYPE_ERROR(Z, object, String);
   }
   intptr_t string_length = Utf8::Length(str_obj);
   char* res = Api::TopScope(I)->zone()->Alloc<char>(string_length + 1);
@@ -2438,9 +2446,9 @@
   if (length == NULL) {
     RETURN_NULL_ERROR(length);
   }
-  const String& str_obj = Api::UnwrapStringHandle(I, str);
+  const String& str_obj = Api::UnwrapStringHandle(Z, str);
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, str, String);
+    RETURN_TYPE_ERROR(Z, str, String);
   }
   intptr_t str_len = Utf8::Length(str_obj);
   *utf8_array = Api::TopScope(I)->zone()->Alloc<uint8_t>(str_len);
@@ -2463,9 +2471,9 @@
   if (length == NULL) {
     RETURN_NULL_ERROR(length);
   }
-  const String& str_obj = Api::UnwrapStringHandle(I, str);
+  const String& str_obj = Api::UnwrapStringHandle(Z, str);
   if (str_obj.IsNull() || !str_obj.IsOneByteString()) {
-    RETURN_TYPE_ERROR(I, str, String);
+    RETURN_TYPE_ERROR(Z, str, String);
   }
   intptr_t str_len = str_obj.Length();
   intptr_t copy_len = (str_len > *length) ? *length : str_len;
@@ -2484,9 +2492,9 @@
                                            uint16_t* utf16_array,
                                            intptr_t* length) {
   DARTSCOPE(Thread::Current());
-  const String& str_obj = Api::UnwrapStringHandle(I, str);
+  const String& str_obj = Api::UnwrapStringHandle(Z, str);
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, str, String);
+    RETURN_TYPE_ERROR(Z, str, String);
   }
   intptr_t str_len = str_obj.Length();
   intptr_t copy_len = (str_len > *length) ? *length : str_len;
@@ -2500,12 +2508,12 @@
 
 DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str,
                                                intptr_t* size) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str_obj = Api::UnwrapStringHandle(reused_obj_handle, str);
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, str, String);
+    RETURN_TYPE_ERROR(thread->zone(), str, String);
   }
   if (size == NULL) {
     RETURN_NULL_ERROR(size);
@@ -2521,12 +2529,12 @@
                                                 void* peer,
                                                 Dart_PeerFinalizer cback) {
   DARTSCOPE(Thread::Current());
-  const String& str_obj = Api::UnwrapStringHandle(I, str);
+  const String& str_obj = Api::UnwrapStringHandle(Z, str);
   if (str_obj.IsExternal()) {
     return str;  // String is already an external string.
   }
   if (str_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, str, String);
+    RETURN_TYPE_ERROR(Z, str, String);
   }
   if (array == NULL) {
     RETURN_NULL_ERROR(array);
@@ -2571,19 +2579,19 @@
                                                  intptr_t* char_size,
                                                  intptr_t* str_len,
                                                  void** peer) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str = Api::UnwrapStringHandle(reused_obj_handle, object);
   if (str.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, object, String);
+    RETURN_TYPE_ERROR(thread->zone(), object, String);
   }
   if (str.IsExternal()) {
     *peer = str.GetPeer();
     ASSERT(*peer != NULL);
   } else {
     NoSafepointScope no_safepoint_scope;
-    *peer = isolate->heap()->GetPeer(str.raw());
+    *peer = thread->isolate()->heap()->GetPeer(str.raw());
   }
   *char_size = str.CharSize();
   *str_len = str.Length();
@@ -2596,7 +2604,7 @@
 DART_EXPORT Dart_Handle Dart_NewList(intptr_t length) {
   DARTSCOPE(Thread::Current());
   CHECK_LENGTH(length, Array::kMaxElements);
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   return Api::NewHandle(I, Array::New(length));
 }
 
@@ -2627,7 +2635,7 @@
   if (obj.IsExternalTypedData()) {
     GET_LIST_LENGTH(Z, ExternalTypedData, obj, len);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   // Now check and handle a dart object that implements the List interface.
   const Instance& instance = Instance::Handle(Z, GetListInstance(Z, obj));
@@ -2696,7 +2704,7 @@
   } else if (obj.IsError()) {
     return list;
   } else {
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
     // Check and handle a dart object that implements the List interface.
     const Instance& instance = Instance::Handle(Z, GetListInstance(Z, obj));
     if (!instance.IsNull()) {
@@ -2737,7 +2745,7 @@
   } else if (obj.IsError()) {
     return list;
   } else {
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
     // Check and handle a dart object that implements the List interface.
     const Instance& instance = Instance::Handle(Z, GetListInstance(Z, obj));
     if (!instance.IsNull()) {
@@ -2773,7 +2781,7 @@
   const type& array = type::Cast(obj);                                         \
   const Object& value_obj = Object::Handle(Z, Api::UnwrapHandle(value));       \
   if (!value_obj.IsNull() && !value_obj.IsInstance()) {                        \
-    RETURN_TYPE_ERROR(I, value, Instance);                                     \
+    RETURN_TYPE_ERROR(Z, value, Instance);                                     \
   }                                                                            \
   if ((index >= 0) && (index < array.Length())) {                              \
     array.SetAt(index, value_obj);                                             \
@@ -2796,7 +2804,7 @@
   } else if (obj.IsError()) {
     return list;
   } else {
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
 
     // Check and handle a dart object that implements the List interface.
     const Instance& instance = Instance::Handle(Z, GetListInstance(Z, obj));
@@ -2812,7 +2820,7 @@
         const Integer& index_obj = Integer::Handle(Z, Integer::New(index));
         const Object& value_obj = Object::Handle(Z, Api::UnwrapHandle(value));
         if (!value_obj.IsNull() && !value_obj.IsInstance()) {
-          RETURN_TYPE_ERROR(I, value, Instance);
+          RETURN_TYPE_ERROR(Z, value, Instance);
         }
         const Array& args = Array::Handle(Z, Array::New(kNumArgs));
         args.SetAt(0, instance);
@@ -2837,11 +2845,12 @@
 static RawObject* ThrowArgumentError(const char* exception_message) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   // Lookup the class ArgumentError in dart:core.
   const String& lib_url = String::Handle(String::New("dart:core"));
   const String& class_name = String::Handle(String::New("ArgumentError"));
   const Library& lib =
-      Library::Handle(isolate, Library::LookupLibrary(lib_url));
+      Library::Handle(zone, Library::LookupLibrary(lib_url));
   if (lib.IsNull()) {
     const String& message = String::Handle(
         String::NewFormatted("%s: library '%s' not found.",
@@ -2849,15 +2858,15 @@
     return ApiError::New(message);
   }
   const Class& cls = Class::Handle(
-      isolate, lib.LookupClassAllowPrivate(class_name));
+      zone, lib.LookupClassAllowPrivate(class_name));
   ASSERT(!cls.IsNull());
-  Object& result = Object::Handle(isolate);
+  Object& result = Object::Handle(zone);
   String& dot_name = String::Handle(String::New("."));
   String& constr_name = String::Handle(String::Concat(class_name, dot_name));
   result = ResolveConstructor(CURRENT_FUNC, cls, class_name, constr_name, 1);
   if (result.IsError()) return result.raw();
   ASSERT(result.IsFunction());
-  Function& constructor = Function::Handle(isolate);
+  Function& constructor = Function::Handle(zone);
   constructor ^= result.raw();
   if (!constructor.IsGenerativeConstructor()) {
     const String& message = String::Handle(
@@ -2865,12 +2874,11 @@
                              CURRENT_FUNC, class_name.ToCString()));
     return ApiError::New(message);
   }
-  Instance& exception = Instance::Handle(isolate);
+  Instance& exception = Instance::Handle(zone);
   exception = Instance::New(cls);
-  const Array& args = Array::Handle(isolate, Array::New(3));
+  const Array& args = Array::Handle(zone, Array::New(3));
   args.SetAt(0, exception);
-  args.SetAt(1,
-             Smi::Handle(isolate, Smi::New(Function::kCtorPhaseAll)));
+  args.SetAt(1, Smi::Handle(zone, Smi::New(Function::kCtorPhaseAll)));
   args.SetAt(2, String::Handle(String::New(exception_message)));
   result = DartEntry::InvokeFunction(constructor, args);
   if (result.IsError()) return result.raw();
@@ -2991,7 +2999,7 @@
   if (obj.IsError()) {
     return list;
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   // Check and handle a dart object that implements the List interface.
   const Instance& instance =
@@ -3077,7 +3085,7 @@
   if (obj.IsError()) {
     return list;
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   // Check and handle a dart object that implements the List interface.
   const Instance& instance = Instance::Handle(Z, GetListInstance(Z, obj));
@@ -3116,7 +3124,7 @@
 
 DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   const Object& obj = Object::Handle(Z, Api::UnwrapHandle(map));
   const Instance& instance = Instance::Handle(Z, GetMapInstance(Z, obj));
   if (!instance.IsNull()) {
@@ -3133,7 +3141,7 @@
 
 DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   const Object& obj = Object::Handle(Z, Api::UnwrapHandle(map));
   const Instance& instance = Instance::Handle(Z, GetMapInstance(Z, obj));
   if (!instance.IsNull()) {
@@ -3152,7 +3160,7 @@
 
 DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   Object& obj = Object::Handle(Z, Api::UnwrapHandle(map));
   Instance& instance = Instance::Handle(Z, GetMapInstance(Z, obj));
   if (!instance.IsNull()) {
@@ -3266,11 +3274,11 @@
   }
   if (RawObject::IsTypedDataViewClassId(class_id)) {
     // Check if data object of the view is external.
-    Isolate* isolate = Isolate::Current();
-    const Instance& view_obj = Api::UnwrapInstanceHandle(isolate, object);
+    Zone* zone = Thread::Current()->zone();
+    const Instance& view_obj = Api::UnwrapInstanceHandle(zone, object);
     ASSERT(!view_obj.IsNull());
     const Instance& data_obj =
-        Instance::Handle(isolate, TypedDataView::Data(view_obj));
+        Instance::Handle(zone, TypedDataView::Data(view_obj));
     if (ExternalTypedData::IsExternalTypedData(data_obj)) {
       return GetType(class_id);
     }
@@ -3279,14 +3287,14 @@
 }
 
 
-static RawObject* GetByteDataConstructor(Isolate* isolate,
+static RawObject* GetByteDataConstructor(Thread* thread,
                                          const String& constructor_name,
                                          intptr_t num_args) {
   const Library& lib =
-      Library::Handle(isolate->object_store()->typed_data_library());
+      Library::Handle(thread->isolate()->object_store()->typed_data_library());
   ASSERT(!lib.IsNull());
   const Class& cls = Class::Handle(
-      isolate, lib.LookupClassAllowPrivate(Symbols::ByteData()));
+      thread->zone(), lib.LookupClassAllowPrivate(Symbols::ByteData()));
   ASSERT(!cls.IsNull());
   return ResolveConstructor(CURRENT_FUNC,
                             cls,
@@ -3296,20 +3304,22 @@
 }
 
 
-static Dart_Handle NewByteData(Isolate* isolate, intptr_t length) {
+static Dart_Handle NewByteData(Thread* thread, intptr_t length) {
   CHECK_LENGTH(length, TypedData::MaxElements(kTypedDataInt8ArrayCid));
-  Object& result = Object::Handle(isolate);
-  result = GetByteDataConstructor(isolate, Symbols::ByteDataDot(), 1);
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
+  Object& result = Object::Handle(zone);
+  result = GetByteDataConstructor(thread, Symbols::ByteDataDot(), 1);
   ASSERT(!result.IsNull());
   ASSERT(result.IsFunction());
   const Function& factory = Function::Cast(result);
   ASSERT(!factory.IsGenerativeConstructor());
 
   // Create the argument list.
-  const Array& args = Array::Handle(isolate, Array::New(2));
+  const Array& args = Array::Handle(zone, Array::New(2));
   // Factories get type arguments.
   args.SetAt(0, Object::null_type_arguments());
-  args.SetAt(1, Smi::Handle(isolate, Smi::New(length)));
+  args.SetAt(1, Smi::Handle(zone, Smi::New(length)));
 
   // Invoke the constructor and return the new object.
   result = DartEntry::InvokeFunction(factory, args);
@@ -3327,11 +3337,13 @@
 
 
 static Dart_Handle NewExternalTypedData(
-    Isolate* isolate, intptr_t cid, void* data, intptr_t length) {
+    Thread* thread, intptr_t cid, void* data, intptr_t length) {
   CHECK_LENGTH(length, ExternalTypedData::MaxElements(cid));
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   intptr_t bytes = length * ExternalTypedData::ElementSizeInBytes(cid);
   const ExternalTypedData& result = ExternalTypedData::Handle(
-      isolate,
+      zone,
       ExternalTypedData::New(cid,
                              reinterpret_cast<uint8_t*>(data),
                              length,
@@ -3341,14 +3353,16 @@
 
 
 static Dart_Handle NewExternalByteData(
-    Isolate* isolate, void* data, intptr_t length) {
+    Thread* thread, void* data, intptr_t length) {
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   Dart_Handle ext_data = NewExternalTypedData(
-      isolate, kExternalTypedDataUint8ArrayCid, data, length);
+      thread, kExternalTypedDataUint8ArrayCid, data, length);
   if (::Dart_IsError(ext_data)) {
     return ext_data;
   }
-  Object& result = Object::Handle(isolate);
-  result = GetByteDataConstructor(isolate, Symbols::ByteDataDot_view(), 3);
+  Object& result = Object::Handle(zone);
+  result = GetByteDataConstructor(thread, Symbols::ByteDataDot_view(), 3);
   ASSERT(!result.IsNull());
   ASSERT(result.IsFunction());
   const Function& factory = Function::Cast(result);
@@ -3356,13 +3370,13 @@
 
   // Create the argument list.
   const intptr_t num_args = 3;
-  const Array& args = Array::Handle(isolate, Array::New(num_args + 1));
+  const Array& args = Array::Handle(zone, Array::New(num_args + 1));
   // Factories get type arguments.
   args.SetAt(0, Object::null_type_arguments());
   const ExternalTypedData& array =
-      Api::UnwrapExternalTypedDataHandle(isolate, ext_data);
+      Api::UnwrapExternalTypedDataHandle(zone, ext_data);
   args.SetAt(1, array);
-  Smi& smi = Smi::Handle(isolate);
+  Smi& smi = Smi::Handle(zone);
   smi = Smi::New(0);
   args.SetAt(2, smi);
   smi = Smi::New(length);
@@ -3378,10 +3392,10 @@
 DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type,
                                           intptr_t length) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   switch (type) {
     case Dart_TypedData_kByteData :
-      return NewByteData(I, length);
+      return NewByteData(T, length);
     case Dart_TypedData_kInt8 :
       return NewTypedData(I, kTypedDataInt8ArrayCid, length);
     case Dart_TypedData_kUint8 :
@@ -3423,45 +3437,45 @@
   if (data == NULL && length != 0) {
     RETURN_NULL_ERROR(data);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   switch (type) {
     case Dart_TypedData_kByteData:
-      return NewExternalByteData(I, data, length);
+      return NewExternalByteData(T, data, length);
     case Dart_TypedData_kInt8:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataInt8ArrayCid, data, length);
     case Dart_TypedData_kUint8:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataUint8ArrayCid, data, length);
     case Dart_TypedData_kUint8Clamped:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataUint8ClampedArrayCid, data, length);
     case Dart_TypedData_kInt16:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataInt16ArrayCid, data, length);
     case Dart_TypedData_kUint16:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataUint16ArrayCid, data, length);
     case Dart_TypedData_kInt32:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataInt32ArrayCid, data, length);
     case Dart_TypedData_kUint32:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataUint32ArrayCid, data, length);
     case Dart_TypedData_kInt64:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataInt64ArrayCid, data, length);
     case Dart_TypedData_kUint64:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataUint64ArrayCid, data, length);
     case Dart_TypedData_kFloat32:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataFloat32ArrayCid, data, length);
     case Dart_TypedData_kFloat64:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataFloat64ArrayCid, data, length);
     case Dart_TypedData_kFloat32x4:
-      return NewExternalTypedData(I,
+      return NewExternalTypedData(T,
           kExternalTypedDataFloat32x4ArrayCid, data, length);
     default:
       return Api::NewError("%s expects argument 'type' to be of"
@@ -3472,15 +3486,15 @@
 }
 
 
-static RawObject* GetByteBufferConstructor(Isolate* isolate,
+static RawObject* GetByteBufferConstructor(Thread* thread,
                                            const String& class_name,
                                            const String& constructor_name,
                                            intptr_t num_args) {
   const Library& lib =
-      Library::Handle(isolate->object_store()->typed_data_library());
+      Library::Handle(thread->isolate()->object_store()->typed_data_library());
   ASSERT(!lib.IsNull());
   const Class& cls = Class::Handle(
-      isolate, lib.LookupClassAllowPrivate(class_name));
+      thread->zone(), lib.LookupClassAllowPrivate(class_name));
   ASSERT(!cls.IsNull());
   return ResolveConstructor(CURRENT_FUNC,
                             cls,
@@ -3496,10 +3510,10 @@
   if (!RawObject::IsExternalTypedDataClassId(class_id) &&
       !RawObject::IsTypedDataViewClassId(class_id) &&
       !RawObject::IsTypedDataClassId(class_id)) {
-    RETURN_TYPE_ERROR(I, typed_data, 'TypedData');
+    RETURN_TYPE_ERROR(Z, typed_data, 'TypedData');
   }
   Object& result = Object::Handle(Z);
-  result = GetByteBufferConstructor(I,
+  result = GetByteBufferConstructor(T,
                                     Symbols::_ByteBuffer(),
                                     Symbols::_ByteBufferDot_New(),
                                     1);
@@ -3564,7 +3578,7 @@
   if (!RawObject::IsExternalTypedDataClassId(class_id) &&
       !RawObject::IsTypedDataViewClassId(class_id) &&
       !RawObject::IsTypedDataClassId(class_id)) {
-    RETURN_TYPE_ERROR(I, object, 'TypedData');
+    RETURN_TYPE_ERROR(Z, object, 'TypedData');
   }
   if (type == NULL) {
     RETURN_NULL_ERROR(type);
@@ -3584,7 +3598,7 @@
   // If it is an external typed data object just return the data field.
   if (RawObject::IsExternalTypedDataClassId(class_id)) {
     const ExternalTypedData& obj =
-        Api::UnwrapExternalTypedDataHandle(I, object);
+        Api::UnwrapExternalTypedDataHandle(Z, object);
     ASSERT(!obj.IsNull());
     length = obj.Length();
     size_in_bytes = length * ExternalTypedData::ElementSizeInBytes(class_id);
@@ -3592,16 +3606,16 @@
     external = true;
   } else if (RawObject::IsTypedDataClassId(class_id)) {
     // Regular typed data object, set up some GC and API callback guards.
-    const TypedData& obj = Api::UnwrapTypedDataHandle(I, object);
+    const TypedData& obj = Api::UnwrapTypedDataHandle(Z, object);
     ASSERT(!obj.IsNull());
     length = obj.Length();
     size_in_bytes = length * TypedData::ElementSizeInBytes(class_id);
     T->IncrementNoSafepointScopeDepth();
-    START_NO_CALLBACK_SCOPE(I);
+    START_NO_CALLBACK_SCOPE(T);
     data_tmp = obj.DataAddr(0);
   } else {
     ASSERT(RawObject::IsTypedDataViewClassId(class_id));
-    const Instance& view_obj = Api::UnwrapInstanceHandle(I, object);
+    const Instance& view_obj = Api::UnwrapInstanceHandle(Z, object);
     ASSERT(!view_obj.IsNull());
     Smi& val = Smi::Handle();
     val ^= TypedDataView::Length(view_obj);
@@ -3611,7 +3625,7 @@
     intptr_t offset_in_bytes = val.Value();
     const Instance& obj = Instance::Handle(TypedDataView::Data(view_obj));
     T->IncrementNoSafepointScopeDepth();
-    START_NO_CALLBACK_SCOPE(I);
+    START_NO_CALLBACK_SCOPE(T);
     if (TypedData::IsTypedData(obj)) {
       const TypedData& data_obj = TypedData::Cast(obj);
       data_tmp = data_obj.DataAddr(offset_in_bytes);
@@ -3653,11 +3667,11 @@
   if (!RawObject::IsExternalTypedDataClassId(class_id) &&
       !RawObject::IsTypedDataViewClassId(class_id) &&
       !RawObject::IsTypedDataClassId(class_id)) {
-    RETURN_TYPE_ERROR(I, object, 'TypedData');
+    RETURN_TYPE_ERROR(Z, object, 'TypedData');
   }
   if (!RawObject::IsExternalTypedDataClassId(class_id)) {
     T->DecrementNoSafepointScopeDepth();
-    END_NO_CALLBACK_SCOPE(I);
+    END_NO_CALLBACK_SCOPE(T);
   }
   if (FLAG_verify_acquired_data) {
     const Object& obj = Object::Handle(Z, Api::UnwrapHandle(object));
@@ -3675,13 +3689,15 @@
 
 
 DART_EXPORT Dart_Handle Dart_GetDataFromByteBuffer(Dart_Handle object) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
   intptr_t class_id = Api::ClassId(object);
   if (class_id != kByteBufferCid) {
-    RETURN_TYPE_ERROR(isolate, object, 'ByteBuffer');
+    RETURN_TYPE_ERROR(zone, object, 'ByteBuffer');
   }
-  const Instance& instance = Api::UnwrapInstanceHandle(isolate, object);
+  const Instance& instance = Api::UnwrapInstanceHandle(zone, object);
   ASSERT(!instance.IsNull());
   return Api::NewHandle(isolate, ByteBuffer::Data(instance));
 }
@@ -3742,7 +3758,7 @@
                                  int number_of_arguments,
                                  Dart_Handle* arguments) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   Object& result = Object::Handle(Z);
 
   if (number_of_arguments < 0) {
@@ -3754,7 +3770,7 @@
   // Get the class to instantiate.
   Object& unchecked_type = Object::Handle(Api::UnwrapHandle(type));
   if (unchecked_type.IsNull() || !unchecked_type.IsType()) {
-    RETURN_TYPE_ERROR(I, type, Type);
+    RETURN_TYPE_ERROR(Z, type, Type);
   }
   Type& type_obj = Type::Handle();
   type_obj ^= unchecked_type.raw();
@@ -3777,7 +3793,7 @@
   } else if (result.IsString()) {
     dot_name = String::Concat(Symbols::Dot(), String::Cast(result));
   } else {
-    RETURN_TYPE_ERROR(I, constructor_name, String);
+    RETURN_TYPE_ERROR(Z, constructor_name, String);
   }
 
   // Resolve the constructor.
@@ -3877,12 +3893,13 @@
 }
 
 
-static RawInstance* AllocateObject(Isolate* isolate, const Class& cls) {
+static RawInstance* AllocateObject(Thread* thread, const Class& cls) {
   if (!cls.is_fields_marked_nullable()) {
     // Mark all fields as nullable.
-    Class& iterate_cls = Class::Handle(isolate, cls.raw());
-    Field& field = Field::Handle(isolate);
-    Array& fields = Array::Handle(isolate);
+    Zone* zone = thread->zone();
+    Class& iterate_cls = Class::Handle(zone, cls.raw());
+    Field& field = Field::Handle(zone);
+    Array& fields = Array::Handle(zone);
     while (!iterate_cls.IsNull()) {
       ASSERT(iterate_cls.is_finalized());
       iterate_cls.set_is_fields_marked_nullable();
@@ -3905,12 +3922,12 @@
 
 DART_EXPORT Dart_Handle Dart_Allocate(Dart_Handle type) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
-  const Type& type_obj = Api::UnwrapTypeHandle(I, type);
+  const Type& type_obj = Api::UnwrapTypeHandle(Z, type);
   // Get the class to instantiate.
   if (type_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, type, Type);
+    RETURN_TYPE_ERROR(Z, type, Type);
   }
   const Class& cls = Class::Handle(Z, type_obj.type_class());
   const Error& error = Error::Handle(Z, cls.EnsureIsFinalized(T));
@@ -3918,7 +3935,7 @@
     // An error occurred, return error object.
     return Api::NewHandle(I, error.raw());
   }
-  return Api::NewHandle(I, AllocateObject(I, cls));
+  return Api::NewHandle(I, AllocateObject(T, cls));
 }
 
 
@@ -3927,12 +3944,12 @@
     intptr_t num_native_fields,
     const intptr_t* native_fields) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
-  const Type& type_obj = Api::UnwrapTypeHandle(I, type);
+  const Type& type_obj = Api::UnwrapTypeHandle(Z, type);
   // Get the class to instantiate.
   if (type_obj.IsNull()) {
-    RETURN_TYPE_ERROR(I, type, Type);
+    RETURN_TYPE_ERROR(Z, type, Type);
   }
   if (native_fields == NULL) {
     RETURN_NULL_ERROR(native_fields);
@@ -3948,20 +3965,22 @@
         "%s: invalid number of native fields %" Pd " passed in, expected %d",
         CURRENT_FUNC, num_native_fields, cls.num_native_fields());
   }
-  const Instance& instance = Instance::Handle(Z, AllocateObject(I, cls));
+  const Instance& instance = Instance::Handle(Z, AllocateObject(T, cls));
   instance.SetNativeFields(num_native_fields, native_fields);
   return Api::NewHandle(I, instance.raw());
 }
 
 
-static Dart_Handle SetupArguments(Isolate* isolate,
+static Dart_Handle SetupArguments(Thread* thread,
                                   int num_args,
                                   Dart_Handle* arguments,
                                   int extra_args,
                                   Array* args) {
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   // Check for malformed arguments in the arguments list.
   *args = Array::New(num_args + extra_args);
-  Object& arg = Object::Handle(isolate);
+  Object& arg = Object::Handle(zone);
   for (int i = 0; i < num_args; i++) {
     arg = Api::UnwrapHandle(arguments[i]);
     if (!arg.IsNull() && !arg.IsInstance()) {
@@ -3985,20 +4004,20 @@
                                                int number_of_arguments,
                                                Dart_Handle* arguments) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   if (number_of_arguments < 0) {
     return Api::NewError(
         "%s expects argument 'number_of_arguments' to be non-negative.",
         CURRENT_FUNC);
   }
-  const String& constructor_name = Api::UnwrapStringHandle(I, name);
+  const String& constructor_name = Api::UnwrapStringHandle(Z, name);
   if (constructor_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, name, String);
+    RETURN_TYPE_ERROR(Z, name, String);
   }
-  const Instance& instance = Api::UnwrapInstanceHandle(I, object);
+  const Instance& instance = Api::UnwrapInstanceHandle(Z, object);
   if (instance.IsNull()) {
-    RETURN_TYPE_ERROR(I, object, Instance);
+    RETURN_TYPE_ERROR(Z, object, Instance);
   }
 
   // Since we have allocated an object it would mean that the type
@@ -4036,7 +4055,7 @@
     }
     Dart_Handle result;
     Array& args = Array::Handle(Z);
-    result = SetupArguments(I,
+    result = SetupArguments(T,
         number_of_arguments, arguments, extra_args, &args);
     if (!::Dart_IsError(result)) {
       args.SetAt(0, instance);
@@ -4062,11 +4081,11 @@
                                     int number_of_arguments,
                                     Dart_Handle* arguments) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
-  const String& function_name = Api::UnwrapStringHandle(I, name);
+  const String& function_name = Api::UnwrapStringHandle(Z, name);
   if (function_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, name, String);
+    RETURN_TYPE_ERROR(Z, name, String);
   }
   if (number_of_arguments < 0) {
     return Api::NewError(
@@ -4100,7 +4119,7 @@
                            function_name.ToCString());
     }
     // Setup args and check for malformed arguments in the arguments list.
-    result = SetupArguments(I, number_of_arguments, arguments, 0, &args);
+    result = SetupArguments(T, number_of_arguments, arguments, 0, &args);
     if (!::Dart_IsError(result)) {
       result = Api::NewHandle(I, DartEntry::InvokeFunction(function, args));
     }
@@ -4117,7 +4136,7 @@
         Resolver::ResolveDynamic(instance, function_name, args_desc));
     if (function.IsNull()) {
       // Setup args and check for malformed arguments in the arguments list.
-      result = SetupArguments(I,
+      result = SetupArguments(T,
                               number_of_arguments,
                               arguments,
                               1,
@@ -4135,7 +4154,7 @@
       return result;
     }
     // Setup args and check for malformed arguments in the arguments list.
-    result = SetupArguments(I, number_of_arguments, arguments, 1, &args);
+    result = SetupArguments(T, number_of_arguments, arguments, 1, &args);
     if (!::Dart_IsError(result)) {
       args.SetAt(0, instance);
       result = Api::NewHandle(I, DartEntry::InvokeFunction(function, args));
@@ -4171,7 +4190,7 @@
                            error_message.ToCString());
     }
     // Setup args and check for malformed arguments in the arguments list.
-    result = SetupArguments(I, number_of_arguments, arguments, 0, &args);
+    result = SetupArguments(T, number_of_arguments, arguments, 0, &args);
     if (!::Dart_IsError(result)) {
       result = Api::NewHandle(I, DartEntry::InvokeFunction(function, args));
     }
@@ -4188,10 +4207,10 @@
                                            int number_of_arguments,
                                            Dart_Handle* arguments) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
-  const Instance& closure_obj = Api::UnwrapInstanceHandle(I, closure);
+  CHECK_CALLBACK_STATE(T);
+  const Instance& closure_obj = Api::UnwrapInstanceHandle(Z, closure);
   if (closure_obj.IsNull() || !closure_obj.IsCallable(NULL)) {
-    RETURN_TYPE_ERROR(I, closure, Instance);
+    RETURN_TYPE_ERROR(Z, closure, Instance);
   }
   if (number_of_arguments < 0) {
     return Api::NewError(
@@ -4206,7 +4225,7 @@
   for (int i = 0; i < number_of_arguments; i++) {
     obj = Api::UnwrapHandle(arguments[i]);
     if (!obj.IsNull() && !obj.IsInstance()) {
-      RETURN_TYPE_ERROR(I, arguments[i], Instance);
+      RETURN_TYPE_ERROR(Z, arguments[i], Instance);
     }
     args.SetAt(i + 1, obj);
   }
@@ -4217,11 +4236,11 @@
 
 DART_EXPORT Dart_Handle Dart_GetField(Dart_Handle container, Dart_Handle name) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
-  const String& field_name = Api::UnwrapStringHandle(I, name);
+  const String& field_name = Api::UnwrapStringHandle(Z, name);
   if (field_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, name, String);
+    RETURN_TYPE_ERROR(Z, name, String);
   }
 
   Field& field = Field::Handle(Z);
@@ -4338,17 +4357,17 @@
                                       Dart_Handle name,
                                       Dart_Handle value) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
-  const String& field_name = Api::UnwrapStringHandle(I, name);
+  const String& field_name = Api::UnwrapStringHandle(Z, name);
   if (field_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, name, String);
+    RETURN_TYPE_ERROR(Z, name, String);
   }
 
   // Since null is allowed for value, we don't use UnwrapInstanceHandle.
   const Object& value_obj = Object::Handle(Z, Api::UnwrapHandle(value));
   if (!value_obj.IsNull() && !value_obj.IsInstance()) {
-    RETURN_TYPE_ERROR(I, value, Instance);
+    RETURN_TYPE_ERROR(Z, value, Instance);
   }
   Instance& value_instance = Instance::Handle(Z);
   value_instance ^= value_obj.raw();
@@ -4490,13 +4509,14 @@
 
 DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception) {
   Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
-  CHECK_CALLBACK_STATE(isolate);
+  CHECK_CALLBACK_STATE(thread);
   {
-    const Instance& excp = Api::UnwrapInstanceHandle(isolate, exception);
+    const Instance& excp = Api::UnwrapInstanceHandle(zone, exception);
     if (excp.IsNull()) {
-      RETURN_TYPE_ERROR(isolate, exception, Instance);
+      RETURN_TYPE_ERROR(zone, exception, Instance);
     }
   }
   if (isolate->top_exit_frame_info() == 0) {
@@ -4513,7 +4533,7 @@
   {
     NoSafepointScope no_safepoint;
     RawInstance* raw_exception =
-        Api::UnwrapInstanceHandle(isolate, exception).raw();
+        Api::UnwrapInstanceHandle(zone, exception).raw();
     state->UnwindScopes(isolate->top_exit_frame_info());
     saved_exception = &Instance::Handle(raw_exception);
   }
@@ -4525,17 +4545,18 @@
 DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception,
                                               Dart_Handle stacktrace) {
   Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
-  CHECK_CALLBACK_STATE(isolate);
+  CHECK_CALLBACK_STATE(thread);
   {
-    const Instance& excp = Api::UnwrapInstanceHandle(isolate, exception);
+    const Instance& excp = Api::UnwrapInstanceHandle(zone, exception);
     if (excp.IsNull()) {
-      RETURN_TYPE_ERROR(isolate, exception, Instance);
+      RETURN_TYPE_ERROR(zone, exception, Instance);
     }
-    const Instance& stk = Api::UnwrapInstanceHandle(isolate, stacktrace);
+    const Instance& stk = Api::UnwrapInstanceHandle(zone, stacktrace);
     if (stk.IsNull()) {
-      RETURN_TYPE_ERROR(isolate, stacktrace, Instance);
+      RETURN_TYPE_ERROR(zone, stacktrace, Instance);
     }
   }
   if (isolate->top_exit_frame_info() == 0) {
@@ -4553,9 +4574,9 @@
   {
     NoSafepointScope no_safepoint;
     RawInstance* raw_exception =
-        Api::UnwrapInstanceHandle(isolate, exception).raw();
+        Api::UnwrapInstanceHandle(zone, exception).raw();
     RawStacktrace* raw_stacktrace =
-        Api::UnwrapStacktraceHandle(isolate, stacktrace).raw();
+        Api::UnwrapStacktraceHandle(zone, stacktrace).raw();
     state->UnwindScopes(isolate->top_exit_frame_info());
     saved_exception = &Instance::Handle(raw_exception);
     saved_stacktrace = &Stacktrace::Handle(raw_stacktrace);
@@ -4571,19 +4592,19 @@
                                                       Dart_Handle name,
                                                       int field_count) {
   DARTSCOPE(Thread::Current());
-  const String& cls_name = Api::UnwrapStringHandle(I, name);
+  const String& cls_name = Api::UnwrapStringHandle(Z, name);
   if (cls_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, name, String);
+    RETURN_TYPE_ERROR(Z, name, String);
   }
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   if (!Utils::IsUint(16, field_count)) {
     return Api::NewError(
         "Invalid field_count passed to Dart_CreateNativeWrapperClass");
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   String& cls_symbol = String::Handle(Z, Symbols::New(cls_name));
   const Class& cls = Class::Handle(Z,
@@ -4598,12 +4619,12 @@
 
 DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj,
                                                          int* count) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
   if (instance.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, obj, Instance);
+    RETURN_TYPE_ERROR(thread->zone(), obj, Instance);
   }
   *count = instance.NumNativeFields();
   return Api::Success();
@@ -4613,12 +4634,12 @@
 DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj,
                                                     int index,
                                                     intptr_t* value) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  ReusableObjectHandleScope reused_obj_handle(isolate);
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  ReusableObjectHandleScope reused_obj_handle(thread);
   const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
   if (instance.IsNull()) {
-    RETURN_TYPE_ERROR(isolate, obj, Instance);
+    RETURN_TYPE_ERROR(thread->zone(), obj, Instance);
   }
   if (!instance.IsValidNativeIndex(index)) {
     return Api::NewError(
@@ -4634,9 +4655,9 @@
                                                     int index,
                                                     intptr_t value) {
   DARTSCOPE(Thread::Current());
-  const Instance& instance = Api::UnwrapInstanceHandle(I, obj);
+  const Instance& instance = Api::UnwrapInstanceHandle(Z, obj);
   if (instance.IsNull()) {
-    RETURN_TYPE_ERROR(I, obj, Instance);
+    RETURN_TYPE_ERROR(Z, obj, Instance);
   }
   if (!instance.IsValidNativeIndex(index)) {
     return Api::NewError(
@@ -4947,14 +4968,14 @@
 RawString* Api::CallEnvironmentCallback(Isolate* isolate, const String& name) {
   Scope api_scope(isolate);
   Dart_EnvironmentCallback callback = isolate->environment_callback();
-  String& result = String::Handle(isolate);
+  String& result = String::Handle(isolate->current_zone());
   if (callback != NULL) {
     Dart_Handle response = callback(Api::NewHandle(isolate, name.raw()));
     if (::Dart_IsString(response)) {
       result ^= Api::UnwrapHandle(response);
     } else if (::Dart_IsError(response)) {
       const Object& error =
-          Object::Handle(isolate, Api::UnwrapHandle(response));
+          Object::Handle(isolate->current_zone(), Api::UnwrapHandle(response));
       Exceptions::ThrowArgumentError(
           String::Handle(String::New(Error::Cast(error).ToErrorCString())));
     } else if (!::Dart_IsNull(response)) {
@@ -5002,7 +5023,7 @@
     Api::SetSmiReturnValue(arguments, static_cast<intptr_t>(retval));
   } else {
     // Slow path for Mints and Bigints.
-    ASSERT_CALLBACK_STATE(arguments->thread()->isolate());
+    ASSERT_CALLBACK_STATE(arguments->thread());
     Api::SetIntegerReturnValue(arguments, retval);
   }
 }
@@ -5011,11 +5032,7 @@
 DART_EXPORT void Dart_SetDoubleReturnValue(Dart_NativeArguments args,
                                            double retval) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
-#if defined(DEBUG)
-  Isolate* isolate = arguments->thread()->isolate();
-  ASSERT(isolate == Isolate::Current());
-  ASSERT_CALLBACK_STATE(isolate);
-#endif
+  ASSERT_CALLBACK_STATE(arguments->thread());
   Api::SetDoubleReturnValue(arguments, retval);
 }
 
@@ -5044,7 +5061,8 @@
     lib.SetLoadInProgress();
   }
   ASSERT(isolate != NULL);
-  const Error& error = Error::Handle(isolate, Compiler::Compile(lib, script));
+  const Error& error =
+      Error::Handle(isolate->current_zone(), Compiler::Compile(lib, script));
   if (error.IsNull()) {
     *result = Api::NewHandle(isolate, lib.raw());
   } else {
@@ -5061,13 +5079,13 @@
                                         intptr_t line_offset,
                                         intptr_t column_offset) {
   DARTSCOPE(Thread::Current());
-  const String& url_str = Api::UnwrapStringHandle(I, url);
+  const String& url_str = Api::UnwrapStringHandle(Z, url);
   if (url_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, url, String);
+    RETURN_TYPE_ERROR(Z, url, String);
   }
-  const String& source_str = Api::UnwrapStringHandle(I, source);
+  const String& source_str = Api::UnwrapStringHandle(Z, source);
   if (source_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, source, String);
+    RETURN_TYPE_ERROR(Z, source, String);
   }
   Library& library = Library::Handle(Z, I->object_store()->root_library());
   if (!library.IsNull()) {
@@ -5083,7 +5101,7 @@
     return Api::NewError("%s: argument 'column_offset' must be positive number",
                          CURRENT_FUNC);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   NoHeapGrowthControlScope no_growth_control;
@@ -5127,7 +5145,7 @@
     return Api::NewError("%s: A script has already been loaded from '%s'.",
                          CURRENT_FUNC, library_url.ToCString());
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   ASSERT(snapshot->kind() == Snapshot::kScript);
@@ -5153,13 +5171,13 @@
 DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library,
                                       Dart_Handle class_name) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
-  const String& cls_name = Api::UnwrapStringHandle(I, class_name);
+  const String& cls_name = Api::UnwrapStringHandle(Z, class_name);
   if (cls_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, class_name, String);
+    RETURN_TYPE_ERROR(Z, class_name, String);
   }
   const Class& cls = Class::Handle(Z, lib.LookupClassAllowPrivate(cls_name));
   if (cls.IsNull()) {
@@ -5179,18 +5197,18 @@
   DARTSCOPE(Thread::Current());
 
   // Validate the input arguments.
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   if (!lib.Loaded()) {
     return Api::NewError(
         "%s expects library argument 'library' to be loaded.",
         CURRENT_FUNC);
   }
-  const String& name_str = Api::UnwrapStringHandle(I, class_name);
+  const String& name_str = Api::UnwrapStringHandle(Z, class_name);
   if (name_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, class_name, String);
+    RETURN_TYPE_ERROR(Z, class_name, String);
   }
   const Class& cls = Class::Handle(Z, lib.LookupClassAllowPrivate(name_str));
   if (cls.IsNull()) {
@@ -5217,9 +5235,9 @@
                            number_of_type_arguments,
                            num_expected_type_arguments);
     }
-    const Array& array = Api::UnwrapArrayHandle(I, *type_arguments);
+    const Array& array = Api::UnwrapArrayHandle(Z, *type_arguments);
     if (array.IsNull()) {
-      RETURN_TYPE_ERROR(I, *type_arguments, Array);
+      RETURN_TYPE_ERROR(Z, *type_arguments, Array);
     }
     if (array.Length() != num_expected_type_arguments) {
       return Api::NewError("Invalid type arguments specified, expected an "
@@ -5247,9 +5265,9 @@
 
 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   const String& url = String::Handle(Z, lib.url());
   ASSERT(!url.IsNull());
@@ -5259,9 +5277,9 @@
 
 DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url) {
   DARTSCOPE(Thread::Current());
-  const String& url_str = Api::UnwrapStringHandle(I, url);
+  const String& url_str = Api::UnwrapStringHandle(Z, url);
   if (url_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, url, String);
+    RETURN_TYPE_ERROR(Z, url, String);
   }
   const Library& library = Library::Handle(Z, Library::LookupLibrary(url_str));
   if (library.IsNull()) {
@@ -5277,15 +5295,15 @@
                                                 Dart_Handle error_in) {
   DARTSCOPE(Thread::Current());
 
-  const Library& lib = Api::UnwrapLibraryHandle(I, library_in);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library_in);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library_in, Library);
+    RETURN_TYPE_ERROR(Z, library_in, Library);
   }
-  const Instance& err = Api::UnwrapInstanceHandle(I, error_in);
+  const Instance& err = Api::UnwrapInstanceHandle(Z, error_in);
   if (err.IsNull()) {
-    RETURN_TYPE_ERROR(I, error_in, Instance);
+    RETURN_TYPE_ERROR(Z, error_in, Instance);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   const GrowableObjectArray& pending_deferred_loads =
       GrowableObjectArray::Handle(Z,
@@ -5305,13 +5323,13 @@
                                          intptr_t line_offset,
                                          intptr_t column_offset) {
   DARTSCOPE(Thread::Current());
-  const String& url_str = Api::UnwrapStringHandle(I, url);
+  const String& url_str = Api::UnwrapStringHandle(Z, url);
   if (url_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, url, String);
+    RETURN_TYPE_ERROR(Z, url, String);
   }
-  const String& source_str = Api::UnwrapStringHandle(I, source);
+  const String& source_str = Api::UnwrapStringHandle(Z, source);
   if (source_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, source, String);
+    RETURN_TYPE_ERROR(Z, source, String);
   }
   if (line_offset < 0) {
     return Api::NewError("%s: argument 'line_offset' must be positive number",
@@ -5321,7 +5339,7 @@
     return Api::NewError("%s: argument 'column_offset' must be positive number",
                          CURRENT_FUNC);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   NoHeapGrowthControlScope no_growth_control;
@@ -5364,22 +5382,22 @@
                                                   Dart_Handle import,
                                                   Dart_Handle prefix) {
   DARTSCOPE(Thread::Current());
-  const Library& library_vm = Api::UnwrapLibraryHandle(I, library);
+  const Library& library_vm = Api::UnwrapLibraryHandle(Z, library);
   if (library_vm.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
-  const Library& import_vm = Api::UnwrapLibraryHandle(I, import);
+  const Library& import_vm = Api::UnwrapLibraryHandle(Z, import);
   if (import_vm.IsNull()) {
-    RETURN_TYPE_ERROR(I, import, Library);
+    RETURN_TYPE_ERROR(Z, import, Library);
   }
   const Object& prefix_object = Object::Handle(Z, Api::UnwrapHandle(prefix));
   const String& prefix_vm = prefix_object.IsNull()
       ? Symbols::Empty()
       : String::Cast(prefix_object);
   if (prefix_vm.IsNull()) {
-    RETURN_TYPE_ERROR(I, prefix, String);
+    RETURN_TYPE_ERROR(Z, prefix, String);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   const String& prefix_symbol = String::Handle(Z, Symbols::New(prefix_vm));
@@ -5408,17 +5426,17 @@
                                         intptr_t line_offset,
                                         intptr_t column_offset) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
-  const String& url_str = Api::UnwrapStringHandle(I, url);
+  const String& url_str = Api::UnwrapStringHandle(Z, url);
   if (url_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, url, String);
+    RETURN_TYPE_ERROR(Z, url, String);
   }
-  const String& source_str = Api::UnwrapStringHandle(I, source);
+  const String& source_str = Api::UnwrapStringHandle(Z, source);
   if (source_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, source, String);
+    RETURN_TYPE_ERROR(Z, source, String);
   }
   if (line_offset < 0) {
     return Api::NewError("%s: argument 'line_offset' must be positive number",
@@ -5428,7 +5446,7 @@
     return Api::NewError("%s: argument 'column_offset' must be positive number",
                          CURRENT_FUNC);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   NoHeapGrowthControlScope no_growth_control;
@@ -5446,19 +5464,19 @@
                                               Dart_Handle url,
                                               Dart_Handle patch_source) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
-  const String& url_str = Api::UnwrapStringHandle(I, url);
+  const String& url_str = Api::UnwrapStringHandle(Z, url);
   if (url_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, url, String);
+    RETURN_TYPE_ERROR(Z, url, String);
   }
-  const String& source_str = Api::UnwrapStringHandle(I, patch_source);
+  const String& source_str = Api::UnwrapStringHandle(Z, patch_source);
   if (source_str.IsNull()) {
-    RETURN_TYPE_ERROR(I, patch_source, String);
+    RETURN_TYPE_ERROR(Z, patch_source, String);
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CHECK_COMPILATION_ALLOWED(I);
 
   NoHeapGrowthControlScope no_growth_control;
@@ -5475,7 +5493,7 @@
 // futures of loadLibrary calls (deferred library loading).
 DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
   DARTSCOPE(Thread::Current());
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
 
   I->DoneLoading();
 
@@ -5527,9 +5545,9 @@
     Dart_NativeEntryResolver resolver,
     Dart_NativeEntrySymbol symbol) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   lib.set_native_entry_resolver(resolver);
   lib.set_native_entry_symbol_resolver(symbol);
@@ -5543,10 +5561,10 @@
   if (peer == NULL) {
     RETURN_NULL_ERROR(peer);
   }
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = Api::UnwrapHandle(object);
   if (obj.IsNull() || obj.IsNumber() || obj.IsBool()) {
     const char* msg =
@@ -5556,17 +5574,17 @@
   {
     NoSafepointScope no_safepoint;
     RawObject* raw_obj = obj.raw();
-    *peer = isolate->heap()->GetPeer(raw_obj);
+    *peer = thread->isolate()->heap()->GetPeer(raw_obj);
   }
   return Api::Success();
 }
 
 
 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer) {
-  Isolate* isolate = Isolate::Current();
-  CHECK_ISOLATE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& obj = isolate->ObjectHandle();
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& obj = thread->ObjectHandle();
   obj = Api::UnwrapHandle(object);
   if (obj.IsNull() || obj.IsNumber() || obj.IsBool()) {
     const char* msg =
@@ -5576,7 +5594,7 @@
   {
     NoSafepointScope no_safepoint;
     RawObject* raw_obj = obj.raw();
-    isolate->heap()->SetPeer(raw_obj, peer);
+    thread->isolate()->heap()->SetPeer(raw_obj, peer);
   }
   return Api::Success();
 }
@@ -6021,7 +6039,7 @@
   if (::Dart_IsError(result)) {
     return result;
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   const Error& error = Error::Handle(Precompiler::CompileAll(entry_points,
                                                              reset_fields));
   if (!error.IsNull()) {
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index 2f635d3..613778a 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -75,10 +75,10 @@
   HANDLESCOPE(T);
 
 
-#define RETURN_TYPE_ERROR(isolate, dart_handle, type)                          \
+#define RETURN_TYPE_ERROR(zone, dart_handle, type)                             \
   do {                                                                         \
     const Object& tmp =                                                        \
-        Object::Handle(isolate, Api::UnwrapHandle((dart_handle)));             \
+        Object::Handle(zone, Api::UnwrapHandle((dart_handle)));                \
     if (tmp.IsNull()) {                                                        \
       return Api::NewError("%s expects argument '%s' to be non-null.",         \
                            CURRENT_FUNC, #dart_handle);                        \
@@ -132,7 +132,7 @@
   // Unwraps a raw Type from the handle.  The handle will be null if
   // the object was not of the requested Type.
 #define DECLARE_UNWRAP(Type)                                                   \
-  static const Type& Unwrap##Type##Handle(Isolate* isolate,                    \
+  static const Type& Unwrap##Type##Handle(Zone* zone,                          \
                                           Dart_Handle object);
   CLASS_LIST_FOR_HANDLES(DECLARE_UNWRAP)
 #undef DECLARE_UNWRAP
@@ -304,16 +304,17 @@
 };
 
 // Start a scope in which no Dart API call backs are allowed.
-#define START_NO_CALLBACK_SCOPE(isolate)                                       \
-  isolate->IncrementNoCallbackScopeDepth()
+#define START_NO_CALLBACK_SCOPE(thread)                                        \
+  thread->IncrementNoCallbackScopeDepth()
 
 // End a no Dart API call backs Scope.
-#define END_NO_CALLBACK_SCOPE(isolate)                                         \
-  isolate->DecrementNoCallbackScopeDepth()
+#define END_NO_CALLBACK_SCOPE(thread)                                          \
+  thread->DecrementNoCallbackScopeDepth()
 
-#define CHECK_CALLBACK_STATE(isolate)                                          \
-  if (isolate->no_callback_scope_depth() != 0) {                               \
-    return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate));         \
+#define CHECK_CALLBACK_STATE(thread)                                           \
+  if (thread->no_callback_scope_depth() != 0) {                                \
+    return reinterpret_cast<Dart_Handle>(                                      \
+        Api::AcquiredError(thread->isolate()));                                \
   }                                                                            \
 
 #define CHECK_COMPILATION_ALLOWED(isolate)                                     \
@@ -322,8 +323,8 @@
                          CURRENT_FUNC);                                        \
   }                                                                            \
 
-#define ASSERT_CALLBACK_STATE(isolate)                                         \
-  ASSERT(isolate->no_callback_scope_depth() == 0)
+#define ASSERT_CALLBACK_STATE(thread)                                         \
+  ASSERT(thread->no_callback_scope_depth() == 0)
 
 }  // namespace dart.
 
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 34c5cb5..6a53ff7 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -21,6 +21,7 @@
 
 DECLARE_FLAG(int, optimization_counter_threshold);
 DECLARE_FLAG(bool, verify_acquired_data);
+DECLARE_FLAG(bool, ignore_patch_signature_mismatch);
 
 TEST_CASE(ErrorHandleBasics) {
   const char* kScriptChars =
@@ -706,19 +707,19 @@
 
 
 TEST_CASE(InstanceGetType) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
   // Get the handle from a valid instance handle.
   Dart_Handle type = Dart_InstanceGetType(Dart_Null());
   EXPECT_VALID(type);
   EXPECT(Dart_IsType(type));
-  const Type& null_type_obj = Api::UnwrapTypeHandle(isolate, type);
+  const Type& null_type_obj = Api::UnwrapTypeHandle(zone, type);
   EXPECT(null_type_obj.raw() == Type::NullType());
 
   Dart_Handle instance = Dart_True();
   type = Dart_InstanceGetType(instance);
   EXPECT_VALID(type);
   EXPECT(Dart_IsType(type));
-  const Type& bool_type_obj = Api::UnwrapTypeHandle(isolate, type);
+  const Type& bool_type_obj = Api::UnwrapTypeHandle(zone, type);
   EXPECT(bool_type_obj.raw() == Type::BoolType());
 
   Dart_Handle cls_name = Dart_TypeName(type);
@@ -5332,10 +5333,10 @@
 
 static Dart_Handle PrivateLibName(Dart_Handle lib, const char* str) {
   EXPECT(Dart_IsLibrary(lib));
-  Isolate* isolate = Isolate::Current();
-  const Library& library_obj = Api::UnwrapLibraryHandle(isolate, lib);
+  Thread* thread = Thread::Current();
+  const Library& library_obj = Api::UnwrapLibraryHandle(thread->zone(), lib);
   const String& name = String::Handle(String::New(str));
-  return Api::NewHandle(isolate, library_obj.PrivateName(name));
+  return Api::NewHandle(thread->isolate(), library_obj.PrivateName(name));
 }
 
 
@@ -6885,6 +6886,121 @@
   EXPECT_EQ(42, value);
 }
 
+TEST_CASE(LoadPatchSignatureMismatch) {
+  // This tests the sort of APIs with intentional signature mismatches we need
+  // for typed Dart-JavaScript interop where we emulated JavaScript semantics
+  // for optional arguments.
+  const char* kLibrary1Chars =
+      "library library1_name;";
+  const char* kSourceChars =
+      "part of library1_name;\n"
+      "external int foo([int x]);\n"
+      "class Foo {\n"
+      "  external static int addDefault10([int x, int y]);\n"
+      "}";
+  const char* kPatchChars =
+      "const _UNDEFINED = const Object();\n"
+      "patch foo([x=_UNDEFINED]) => identical(x, _UNDEFINED) ? 42 : x;\n"
+      "patch class Foo {\n"
+      "  static addDefault10([x=_UNDEFINED, y=_UNDEFINED]) {\n"
+      "    if (identical(x, _UNDEFINED)) x = 10;\n"
+      "    if (identical(y, _UNDEFINED)) y = 10;\n"
+      "    return x + y;\n"
+      "  }\n"
+      "}";
+
+  bool old_flag_value = FLAG_ignore_patch_signature_mismatch;
+  FLAG_ignore_patch_signature_mismatch = true;
+
+  // Load up a library.
+  Dart_Handle url = NewString("library1_url");
+  Dart_Handle source = NewString(kLibrary1Chars);
+  Dart_Handle lib = Dart_LoadLibrary(url, source, 0, 0);
+  EXPECT_VALID(lib);
+  EXPECT(Dart_IsLibrary(lib));
+
+  url = NewString("source_url");
+  source = NewString(kSourceChars);
+
+  Dart_Handle result = Dart_LoadSource(lib, url, source, 0, 0);
+  EXPECT_VALID(result);
+
+  url = NewString("patch_url");
+  source = NewString(kPatchChars);
+
+  result = Dart_LibraryLoadPatch(lib, url, source);
+  EXPECT_VALID(result);
+  result = Dart_FinalizeLoading(false);
+  EXPECT_VALID(result);
+
+  // Test a top level method
+  {
+    result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsInteger(result));
+    int64_t value = 0;
+    EXPECT_VALID(Dart_IntegerToInt64(result, &value));
+    EXPECT_EQ(42, value);
+  }
+
+  {
+    Dart_Handle dart_args[1];
+    dart_args[0] = Dart_Null();
+    result = Dart_Invoke(lib, NewString("foo"), 1, dart_args);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsNull(result));
+  }
+
+  {
+    Dart_Handle dart_args[1];
+    dart_args[0] = Dart_NewInteger(100);
+    result = Dart_Invoke(lib, NewString("foo"), 1, dart_args);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsInteger(result));
+    int64_t value = 0;
+    EXPECT_VALID(Dart_IntegerToInt64(result, &value));
+    EXPECT_EQ(100, value);
+  }
+
+  // Test static method
+  Dart_Handle type = Dart_GetType(lib, NewString("Foo"), 0, NULL);
+  EXPECT_VALID(type);
+
+  {
+    result = Dart_Invoke(type, NewString("addDefault10"), 0, NULL);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsInteger(result));
+    int64_t value = 0;
+    EXPECT_VALID(Dart_IntegerToInt64(result, &value));
+    EXPECT_EQ(20, value);
+  }
+
+  {
+    Dart_Handle dart_args[1];
+    dart_args[0] = Dart_NewInteger(100);
+    result = Dart_Invoke(type, NewString("addDefault10"), 1, dart_args);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsInteger(result));
+    int64_t value = 0;
+    EXPECT_VALID(Dart_IntegerToInt64(result, &value));
+    EXPECT_EQ(110, value);
+  }
+
+  {
+    Dart_Handle dart_args[2];
+    dart_args[0] = Dart_NewInteger(100);
+    dart_args[1] = Dart_NewInteger(100);
+    result = Dart_Invoke(type, NewString("addDefault10"), 2, dart_args);
+    EXPECT_VALID(result);
+    EXPECT(Dart_IsInteger(result));
+    int64_t value = 0;
+    EXPECT_VALID(Dart_IntegerToInt64(result, &value));
+    EXPECT_EQ(200, value);
+  }
+
+  FLAG_ignore_patch_signature_mismatch = old_flag_value;
+}
+
 
 static void PatchNativeFunction(Dart_NativeArguments args) {
   Dart_EnterScope();
@@ -7447,6 +7563,7 @@
 static Dart_Isolate RunLoopTestCallback(const char* script_name,
                                         const char* main,
                                         const char* package_root,
+                                        const char** package_map,
                                         Dart_IsolateFlags* flags,
                                         void* data,
                                         char** error) {
@@ -7521,7 +7638,7 @@
   Isolate::SetCreateCallback(RunLoopTestCallback);
   Isolate::SetUnhandledExceptionCallback(RunLoopUnhandledExceptionCallback);
   Dart_Isolate isolate = RunLoopTestCallback(
-      NULL, NULL, NULL, NULL, NULL, NULL);
+      NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
   Dart_EnterIsolate(isolate);
   Dart_EnterScope();
@@ -8757,6 +8874,7 @@
       EXPECT_EQ(0x4e8c, ext_utf16_str[i]);
     }
 
+    Zone* zone = thread->zone();
     // Test with a symbol (hash value should be preserved on externalization).
     const char* symbol_ascii = "?unseen";
     expected_length = strlen(symbol_ascii);
@@ -8768,7 +8886,7 @@
     EXPECT(!Dart_IsExternalString(symbol_str));
     EXPECT_VALID(Dart_StringLength(symbol_str, &length));
     EXPECT_EQ(expected_length, length);
-    EXPECT(Api::UnwrapStringHandle(isolate, symbol_str).HasHash());
+    EXPECT(Api::UnwrapStringHandle(zone, symbol_str).HasHash());
 
     uint8_t ext_symbol_ascii[kLength];
     EXPECT_VALID(Dart_StringStorageSize(symbol_str, &size));
@@ -8777,9 +8895,9 @@
                                   size,
                                   &peer8,
                                   MakeExternalCback);
-    EXPECT(Api::UnwrapStringHandle(isolate, str).HasHash());
-    EXPECT(Api::UnwrapStringHandle(isolate, str).Hash() ==
-           Api::UnwrapStringHandle(isolate, symbol_str).Hash());
+    EXPECT(Api::UnwrapStringHandle(zone, str).HasHash());
+    EXPECT(Api::UnwrapStringHandle(zone, str).Hash() ==
+           Api::UnwrapStringHandle(zone, symbol_str).Hash());
     EXPECT(Dart_IsString(str));
     EXPECT(Dart_IsString(symbol_str));
     EXPECT(Dart_IsStringLatin1(str));
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
index d9debad..a4e47bb 100644
--- a/runtime/vm/dart_api_message.cc
+++ b/runtime/vm/dart_api_message.cc
@@ -794,7 +794,7 @@
       value = AllocateDartCObjectArray(0);
       AddBackRef(object_id, value, kIsDeserialized);
       // Read the content of the GrowableObjectArray.
-      Dart_CObject* content = ReadObjectImpl();
+      Dart_CObject* content = ReadObjectRef();
       ASSERT(content->type == Dart_CObject_kArray);
       // Make the empty array allocated point to the backing store content.
       value->value.as_array.length = len;
@@ -1235,7 +1235,7 @@
       }
 
       WriteIndexedObject(class_id);
-      WriteTags(RawObject::ClassIdTag::update(class_id, 0));
+      WriteTags(0);
       WriteSmi(len);
       switch (class_id) {
         case kTypedDataInt8ArrayCid:
@@ -1269,8 +1269,7 @@
       WriteInlinedHeader(object);
       // Write out the class and tag information.
       WriteIndexedObject(kExternalTypedDataUint8ArrayCid);
-      WriteTags(RawObject::ClassIdTag::update(
-          kExternalTypedDataUint8ArrayCid, 0));
+      WriteTags(0);
       intptr_t length = object->value.as_external_typed_data.length;
       if (length < 0 ||
           length > ExternalTypedData::MaxElements(
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 82055bb..2f5a79e 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -84,6 +84,7 @@
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
+  ASSERT(isolate->MutatorThreadIsCurrentThread());
   if (!function.HasCode()) {
     const Error& error = Error::Handle(
         zone, Compiler::CompileFunction(thread, function));
@@ -96,7 +97,7 @@
       StubCode::InvokeDartCode_entry()->EntryPoint());
   const Code& code = Code::Handle(zone, function.CurrentCode());
   ASSERT(!code.IsNull());
-  ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
+  ASSERT(thread->no_callback_scope_depth() == 0);
   ScopedIsolateStackLimits stack_limit(isolate);
   SuspendLongJumpScope suspend_long_jump_scope(thread);
 #if defined(USING_SIMULATOR)
@@ -229,9 +230,10 @@
   if (function.IsNull()) {
     ASSERT(!FLAG_lazy_dispatchers);
     // If noSuchMethod(invocation) is not found, call Object::noSuchMethod.
-    Isolate* isolate = Isolate::Current();
+    Thread* thread = Thread::Current();
     function ^= Resolver::ResolveDynamicForReceiverClass(
-        Class::Handle(isolate, isolate->object_store()->object_class()),
+        Class::Handle(thread->zone(),
+                      thread->isolate()->object_store()->object_class()),
         Symbols::NoSuchMethod(),
         args_desc);
   }
@@ -483,10 +485,9 @@
 
 
 RawObject* DartLibraryCalls::LookupHandler(Dart_Port port_id) {
-  Isolate* isolate = Isolate::Current();
-  Function& function =
-      Function::Handle(isolate,
-                       isolate->object_store()->lookup_port_handler());
+  Thread* thread = Thread::Current();
+  Function& function = Function::Handle(thread->zone(),
+      thread->isolate()->object_store()->lookup_port_handler());
   const int kNumArguments = 1;
   if (function.IsNull()) {
     Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
@@ -501,7 +502,7 @@
                                        kNumArguments,
                                        Object::empty_array());
     ASSERT(!function.IsNull());
-    isolate->object_store()->set_lookup_port_handler(function);
+    thread->isolate()->object_store()->set_lookup_port_handler(function);
   }
   const Array& args = Array::Handle(Array::New(kNumArguments));
   args.SetAt(0, Integer::Handle(Integer::New(port_id)));
@@ -513,16 +514,18 @@
 
 RawObject* DartLibraryCalls::HandleMessage(const Object& handler,
                                            const Instance& message) {
-  Isolate* isolate = Isolate::Current();
-  Function& function = Function::Handle(isolate,
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  Function& function = Function::Handle(zone,
       isolate->object_store()->handle_message_function());
   const int kNumArguments = 2;
   if (function.IsNull()) {
-    Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary());
+    Library& isolate_lib = Library::Handle(zone, Library::IsolateLibrary());
     ASSERT(!isolate_lib.IsNull());
-    const String& class_name = String::Handle(isolate,
+    const String& class_name = String::Handle(zone,
         isolate_lib.PrivateName(Symbols::_RawReceivePortImpl()));
-    const String& function_name = String::Handle(isolate,
+    const String& function_name = String::Handle(zone,
         isolate_lib.PrivateName(Symbols::_handleMessage()));
     function = Resolver::ResolveStatic(isolate_lib,
                                        class_name,
@@ -532,7 +535,7 @@
     ASSERT(!function.IsNull());
     isolate->object_store()->set_handle_message_function(function);
   }
-  const Array& args = Array::Handle(isolate, Array::New(kNumArguments));
+  const Array& args = Array::Handle(zone, Array::New(kNumArguments));
   args.SetAt(0, handler);
   args.SetAt(1, message);
   if (isolate->debugger()->IsStepping()) {
@@ -541,7 +544,7 @@
     // at the first location the user is interested in.
     isolate->debugger()->SetSingleStep();
   }
-  const Object& result = Object::Handle(isolate,
+  const Object& result = Object::Handle(zone,
       DartEntry::InvokeFunction(function, args));
   ASSERT(result.IsNull() || result.IsError());
   return result.raw();
@@ -549,13 +552,13 @@
 
 
 RawObject* DartLibraryCalls::DrainMicrotaskQueue() {
-  Isolate* isolate = Isolate::Current();
-  Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary());
+  Zone* zone = Thread::Current()->zone();
+  Library& isolate_lib = Library::Handle(zone, Library::IsolateLibrary());
   ASSERT(!isolate_lib.IsNull());
-  Function& function = Function::Handle(isolate,
+  Function& function = Function::Handle(zone,
       isolate_lib.LookupFunctionAllowPrivate(
           Symbols::_runPendingImmediateCallback()));
-  const Object& result = Object::Handle(isolate,
+  const Object& result = Object::Handle(zone,
       DartEntry::InvokeFunction(function, Object::empty_array()));
   ASSERT(result.IsNull() || result.IsError());
   return result.raw();
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 5e4dfd9..a92b4d5 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -310,8 +310,8 @@
 
   if (ServiceNeedsDebuggerEvent(event->type()) && event->IsPauseEvent()) {
     // If we were paused, notify the service that we have resumed.
-    const Error& error =
-        Error::Handle(isolate_, isolate_->object_store()->sticky_error());
+    const Error& error = Error::Handle(zone(),
+        isolate_->object_store()->sticky_error());
     ASSERT(error.IsNull() || error.IsUnwindError());
 
     // Only send a resume event when the isolate is not unwinding.
@@ -365,7 +365,7 @@
 
   // If any error occurred while in the debug message loop, return it here.
   const Error& error =
-      Error::Handle(isolate_, isolate_->object_store()->sticky_error());
+      Error::Handle(zone(), isolate_->object_store()->sticky_error());
   ASSERT(error.IsNull() || error.IsUnwindError());
   isolate_->object_store()->clear_sticky_error();
   return error.raw();
@@ -474,7 +474,7 @@
     // is a user-defined breakpoint that falls into the token
     // range of the function. This may be a false positive: the breakpoint
     // might be inside a local closure.
-    Script& script = Script::Handle(isolate_);
+    Script& script = Script::Handle(zone());
     BreakpointLocation* sbpt = breakpoint_locations_;
     while (sbpt != NULL) {
       script = sbpt->script();
@@ -1028,6 +1028,11 @@
 }
 
 
+bool IsPrivateVariableName(const String& var_name) {
+  return (var_name.Length() >= 1) && (var_name.CharAt(0) == '_');
+}
+
+
 RawObject* ActivationFrame::Evaluate(const String& expr) {
   GetDescIndices();
   const GrowableObjectArray& param_names =
@@ -1041,6 +1046,9 @@
     intptr_t ignore;
     VariableAt(i, &name, &ignore, &ignore, &value);
     if (!name.Equals(Symbols::This())) {
+      if (IsPrivateVariableName(name)) {
+        name = String::IdentifierPrettyName(name);
+      }
       param_names.Add(name);
       param_values.Add(value);
     }
@@ -1424,11 +1432,11 @@
 }
 
 
-RawArray* Debugger::DeoptimizeToArray(Isolate* isolate,
+RawArray* Debugger::DeoptimizeToArray(Thread* thread,
                                       StackFrame* frame,
                                       const Code& code) {
   ASSERT(code.is_optimized());
-
+  Isolate* isolate = thread->isolate();
   // Create the DeoptContext for this deoptimization.
   DeoptContext* deopt_context =
       new DeoptContext(frame, code,
@@ -1440,7 +1448,7 @@
 
   deopt_context->FillDestFrame();
   deopt_context->MaterializeDeferredObjects();
-  const Array& dest_frame = Array::Handle(isolate,
+  const Array& dest_frame = Array::Handle(thread->zone(),
                                           deopt_context->DestFrameAsArray());
 
   isolate->set_deopt_context(NULL);
@@ -1451,12 +1459,14 @@
 
 
 DebuggerStackTrace* Debugger::CollectStackTrace() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   DebuggerStackTrace* stack_trace = new DebuggerStackTrace(8);
   StackFrameIterator iterator(false);
-  Code& code = Code::Handle(isolate);
-  Code& inlined_code = Code::Handle(isolate);
-  Array& deopt_frame = Array::Handle(isolate);
+  Code& code = Code::Handle(zone);
+  Code& inlined_code = Code::Handle(zone);
+  Array& deopt_frame = Array::Handle(zone);
 
   for (StackFrame* frame = iterator.NextFrame();
        frame != NULL;
@@ -1469,14 +1479,14 @@
     if (frame->IsDartFrame()) {
       code = frame->LookupDartCode();
       if (code.is_optimized() && !Compiler::always_optimize()) {
-        deopt_frame = DeoptimizeToArray(isolate, frame, code);
+        deopt_frame = DeoptimizeToArray(thread, frame, code);
         for (InlinedFunctionsIterator it(code, frame->pc());
              !it.Done();
              it.Advance()) {
           inlined_code = it.code();
           if (FLAG_trace_debugger_stacktrace) {
             const Function& function =
-                Function::Handle(isolate, inlined_code.function());
+                Function::Handle(zone, inlined_code.function());
             ASSERT(!function.IsNull());
             OS::PrintErr("CollectStackTrace: visiting inlined function: %s\n",
                          function.ToFullyQualifiedCString());
@@ -1509,7 +1519,7 @@
   while ((frame != NULL) && !frame->IsDartFrame()) {
     frame = iterator.NextFrame();
   }
-  Code& code = Code::Handle(isolate_, frame->LookupDartCode());
+  Code& code = Code::Handle(zone(), frame->LookupDartCode());
   ActivationFrame* activation =
       new ActivationFrame(frame->pc(), frame->fp(), frame->sp(), code,
                           Object::null_array(), 0);
@@ -1856,10 +1866,11 @@
                                      intptr_t start_pos,
                                      intptr_t end_pos,
                                      GrowableObjectArray* function_list) {
-  Class& cls = Class::Handle(isolate_);
-  Array& functions = Array::Handle(isolate_);
-  GrowableObjectArray& closures = GrowableObjectArray::Handle(isolate_);
-  Function& function = Function::Handle(isolate_);
+  Zone* zn = zone();
+  Class& cls = Class::Handle(zn);
+  Array& functions = Array::Handle(zn);
+  GrowableObjectArray& closures = GrowableObjectArray::Handle(zn);
+  Function& function = Function::Handle(zn);
 
   const ClassTable& class_table = *isolate_->class_table();
   const intptr_t num_classes = class_table.NumCids();
@@ -1939,12 +1950,13 @@
 
 RawFunction* Debugger::FindBestFit(const Script& script,
                                    intptr_t token_pos) {
-  Class& cls = Class::Handle(isolate_);
-  Array& functions = Array::Handle(isolate_);
-  GrowableObjectArray& closures = GrowableObjectArray::Handle(isolate_);
-  Function& function = Function::Handle(isolate_);
-  Function& best_fit = Function::Handle(isolate_);
-  Error& error = Error::Handle(isolate_);
+  Zone* zn = zone();
+  Class& cls = Class::Handle(zn);
+  Array& functions = Array::Handle(zn);
+  GrowableObjectArray& closures = GrowableObjectArray::Handle(zn);
+  Function& function = Function::Handle(zn);
+  Function& best_fit = Function::Handle(zn);
+  Error& error = Error::Handle(zn);
 
   const ClassTable& class_table = *isolate_->class_table();
   const intptr_t num_classes = class_table.NumCids();
@@ -2003,7 +2015,7 @@
                                             intptr_t last_token_pos,
                                             intptr_t requested_line,
                                             intptr_t requested_column) {
-  Function& func = Function::Handle(isolate_);
+  Function& func = Function::Handle(zone());
   func = FindBestFit(script, token_pos);
   if (func.IsNull()) {
     return NULL;
@@ -2195,12 +2207,12 @@
     const String& script_url,
     intptr_t line_number,
     intptr_t column_number) {
-  Library& lib = Library::Handle(isolate_);
-  Script& script = Script::Handle(isolate_);
+  Library& lib = Library::Handle(zone());
+  Script& script = Script::Handle(zone());
   const GrowableObjectArray& libs =
       GrowableObjectArray::Handle(isolate_->object_store()->libraries());
   const GrowableObjectArray& scripts =
-    GrowableObjectArray::Handle(isolate_, GrowableObjectArray::New());
+    GrowableObjectArray::Handle(zone(), GrowableObjectArray::New());
   for (intptr_t i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
     script = lib.LookupScript(script_url);
@@ -2390,10 +2402,10 @@
                                     const String& prefix,
                                     bool include_private_fields) {
   DictionaryIterator it(lib);
-  Object& entry = Object::Handle(isolate_);
-  Field& field = Field::Handle(isolate_);
-  String& field_name = String::Handle(isolate_);
-  PassiveObject& field_value = PassiveObject::Handle(isolate_);
+  Object& entry = Object::Handle(isolate_->current_zone());
+  Field& field = Field::Handle(zone());
+  String& field_name = String::Handle(zone());
+  PassiveObject& field_value = PassiveObject::Handle(isolate_->current_zone());
   while (it.HasNext()) {
     entry = it.GetNext();
     if (entry.IsField()) {
@@ -2426,7 +2438,7 @@
 RawArray* Debugger::GetLibraryFields(const Library& lib) {
   const GrowableObjectArray& field_list =
       GrowableObjectArray::Handle(GrowableObjectArray::New(8));
-  CollectLibraryFields(field_list, lib, String::Handle(isolate_), true);
+  CollectLibraryFields(field_list, lib, String::Handle(zone()), true);
   return Array::MakeArray(field_list);
 }
 
@@ -2434,16 +2446,16 @@
 RawArray* Debugger::GetGlobalFields(const Library& lib) {
   const GrowableObjectArray& field_list =
       GrowableObjectArray::Handle(GrowableObjectArray::New(8));
-  String& prefix_name = String::Handle(isolate_);
+  String& prefix_name = String::Handle(zone());
   CollectLibraryFields(field_list, lib, prefix_name, true);
-  Library& imported = Library::Handle(isolate_);
+  Library& imported = Library::Handle(zone());
   intptr_t num_imports = lib.num_imports();
   for (intptr_t i = 0; i < num_imports; i++) {
     imported = lib.ImportLibraryAt(i);
     ASSERT(!imported.IsNull());
     CollectLibraryFields(field_list, imported, prefix_name, false);
   }
-  LibraryPrefix& prefix = LibraryPrefix::Handle(isolate_);
+  LibraryPrefix& prefix = LibraryPrefix::Handle(zone());
   LibraryPrefixIterator it(lib);
   while (it.HasNext()) {
     prefix = it.GetNext();
@@ -2652,7 +2664,7 @@
 
   // If any error occurred while in the debug message loop, return it here.
   const Error& error =
-      Error::Handle(isolate_, isolate_->object_store()->sticky_error());
+      Error::Handle(zone(), isolate_->object_store()->sticky_error());
   isolate_->object_store()->clear_sticky_error();
   return error.raw();
 }
@@ -2741,7 +2753,7 @@
 
   // If any error occurred while in the debug message loop, return it here.
   const Error& error =
-      Error::Handle(isolate_, isolate_->object_store()->sticky_error());
+      Error::Handle(zone(), isolate_->object_store()->sticky_error());
   isolate_->object_store()->clear_sticky_error();
   return error.raw();
 }
@@ -2798,7 +2810,7 @@
 // the given token position.
 RawFunction* Debugger::FindInnermostClosure(const Function& function,
                                             intptr_t token_pos) {
-  const Class& owner = Class::Handle(isolate_, function.Owner());
+  const Class& owner = Class::Handle(zone(), function.Owner());
   if (owner.closures() == GrowableObjectArray::null()) {
     return Function::null();
   }
@@ -2806,12 +2818,12 @@
   // script as the outer function. We could have closures originating
   // in mixin classes whose source code is contained in a different
   // script.
-  const Script& outer_origin = Script::Handle(isolate_, function.script());
+  const Script& outer_origin = Script::Handle(zone(), function.script());
   const GrowableObjectArray& closures =
-     GrowableObjectArray::Handle(isolate_, owner.closures());
+     GrowableObjectArray::Handle(zone(), owner.closures());
   const intptr_t num_closures = closures.Length();
-  Function& closure = Function::Handle(isolate_);
-  Function& best_fit = Function::Handle(isolate_);
+  Function& closure = Function::Handle(zone());
+  Function& best_fit = Function::Handle(zone());
   for (intptr_t i = 0; i < num_closures; i++) {
     closure ^= closures.At(i);
     if ((function.token_pos() < closure.token_pos()) &&
@@ -2839,13 +2851,13 @@
   }
   // Iterate over all source breakpoints to check whether breakpoints
   // need to be set in the newly compiled function.
-  Script& script = Script::Handle(isolate_);
+  Script& script = Script::Handle(zone());
   for (BreakpointLocation* loc = breakpoint_locations_;
       loc != NULL;
       loc = loc->next()) {
     script = loc->script();
     if (FunctionContains(func, script, loc->token_pos())) {
-      Function& inner_function = Function::Handle(isolate_);
+      Function& inner_function = Function::Handle(zone());
       inner_function = FindInnermostClosure(func, loc->token_pos());
       if (!inner_function.IsNull()) {
         // The local function of a function we just compiled cannot
@@ -2926,9 +2938,10 @@
     // Common, fast path.
     return;
   }
-  Library& lib = Library::Handle(isolate_);
-  Script& script = Script::Handle(isolate_);
-  String& url = String::Handle(isolate_);
+  Zone* zn = zone();
+  Library& lib = Library::Handle(zn);
+  Script& script = Script::Handle(zn);
+  String& url = String::Handle(zn);
   BreakpointLocation* loc = latent_locations_;
   BreakpointLocation* prev_loc = NULL;
   const GrowableObjectArray& libs =
@@ -3201,7 +3214,7 @@
                                                   intptr_t line,
                                                   intptr_t column) {
   BreakpointLocation* bpt = latent_locations_;
-  String& bpt_url = String::Handle(isolate_);
+  String& bpt_url = String::Handle(zone());
   while (bpt != NULL) {
     bpt_url = bpt->url();
     if (bpt_url.Equals(url) &&
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 7c4cb8a..a9d0547 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -626,7 +626,7 @@
                                            const Code& code,
                                            const Array& deopt_frame,
                                            intptr_t deopt_frame_offset);
-  static RawArray* DeoptimizeToArray(Isolate* isolate,
+  static RawArray* DeoptimizeToArray(Thread* thread,
                                      StackFrame* frame,
                                      const Code& code);
   static DebuggerStackTrace* CollectStackTrace();
@@ -650,6 +650,8 @@
 
   void HandleSteppingRequest(DebuggerStackTrace* stack_trace);
 
+  Zone* zone() const { return isolate_->current_zone(); }
+
   Isolate* isolate_;
   Dart_Port isolate_id_;  // A unique ID for the isolate in the debugger.
   bool initialized_;
diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc
index ad0198b..bd6883c 100644
--- a/runtime/vm/debugger_api_impl.cc
+++ b/runtime/vm/debugger_api_impl.cc
@@ -108,7 +108,8 @@
 
 
 static void DebuggerEventHandler(DebuggerEvent* event) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
   Dart_EnterScope();
   Dart_IsolateId isolate_id = isolate->debugger()->GetIsolateId();
@@ -132,8 +133,9 @@
       Breakpoint* bpt = event->breakpoint();
       ASSERT(bpt != NULL);
       Dart_CodeLocation location;
-      Library& library = Library::Handle(isolate);
-      Script& script = Script::Handle(isolate);
+      Zone* zone = thread->zone();
+      Library& library = Library::Handle(zone);
+      Script& script = Script::Handle(zone);
       intptr_t token_pos;
       bpt->bpt_location()->GetCodeLocation(&library, &script, &token_pos);
       location.script_url = Api::NewHandle(isolate, script.url());
@@ -483,7 +485,7 @@
 
 DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle target) {
   DARTSCOPE(Thread::Current());
-  const Type& type_obj = Api::UnwrapTypeHandle(I, target);
+  const Type& type_obj = Api::UnwrapTypeHandle(Z, target);
   if (type_obj.IsNull()) {
     return Api::NewError("%s expects argument 'target' to be a type",
                          CURRENT_FUNC);
@@ -838,9 +840,9 @@
 DART_EXPORT Dart_Handle Dart_LibraryId(Dart_Handle library,
                                        intptr_t* library_id) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   if (library_id == NULL) {
     RETURN_NULL_ERROR(library_id);
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index bd9e3e1..ca260f2 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -663,6 +663,7 @@
       "foo",       // entry
       "foo",       // call f1
         "f1",      // entry
+        "f1",      // return
       "foo",       // call initializer
       "foo",       // call kvmk
         "X.kvmk",  // entry
@@ -832,7 +833,7 @@
   Dart_StackTrace trace;
   Dart_GetStackTrace(&trace);
   const char* expected_bpts[] = {
-      "moo", "foo", "moo", "foo", "moo", "foo", "main"};
+      "moo", "moo", "foo", "moo", "moo", "foo", "moo", "moo", "foo", "main"};
   const intptr_t expected_bpts_length = ARRAY_SIZE(expected_bpts);
   intptr_t trace_len;
   Dart_Handle res = Dart_StackTraceLength(trace, &trace_len);
@@ -2138,6 +2139,7 @@
       "}\n";
 
   Isolate* isolate = Isolate::Current();
+  Zone* zone = isolate->current_zone();
   LoadScript(kScriptChars);
   ASSERT(script_lib != NULL);
   ASSERT(Dart_IsLibrary(script_lib));
@@ -2188,34 +2190,34 @@
   }
   {
     Dart_Handle super_type = Dart_GetSupertype(Test1_type);
-    const Type& expected_type = Api::UnwrapTypeHandle(isolate, Test_type);
-    const Type& actual_type = Api::UnwrapTypeHandle(isolate, super_type);
+    const Type& expected_type = Api::UnwrapTypeHandle(zone, Test_type);
+    const Type& actual_type = Api::UnwrapTypeHandle(zone, super_type);
     EXPECT(expected_type.raw() == actual_type.raw());
   }
   {
     Dart_Handle super_type = Dart_GetSupertype(Test3_type);
-    const Type& expected_type = Api::UnwrapTypeHandle(isolate, Test2_int_type);
-    const Type& actual_type = Api::UnwrapTypeHandle(isolate, super_type);
+    const Type& expected_type = Api::UnwrapTypeHandle(zone, Test2_int_type);
+    const Type& actual_type = Api::UnwrapTypeHandle(zone, super_type);
     EXPECT(expected_type.raw() == actual_type.raw());
   }
   {
     Dart_Handle super_type = Dart_GetSupertype(Test4_int_type);
-    const Type& expected_type = Api::UnwrapTypeHandle(isolate, Test2_int_type);
-    const Type& actual_type = Api::UnwrapTypeHandle(isolate, super_type);
+    const Type& expected_type = Api::UnwrapTypeHandle(zone, Test2_int_type);
+    const Type& actual_type = Api::UnwrapTypeHandle(zone, super_type);
     EXPECT(expected_type.raw() == actual_type.raw());
   }
   {
     Dart_Handle super_type = Dart_GetSupertype(Test5_int_type);
-    const Type& expected_type = Api::UnwrapTypeHandle(isolate, Test4_int_type);
-    const Type& actual_type = Api::UnwrapTypeHandle(isolate, super_type);
+    const Type& expected_type = Api::UnwrapTypeHandle(zone, Test4_int_type);
+    const Type& actual_type = Api::UnwrapTypeHandle(zone, super_type);
     EXPECT(expected_type.raw() == actual_type.raw());
   }
   {
     Dart_Handle set_type = Dart_GetType(core_lib, set_name, 0, NULL);
     Dart_Handle super_type = Dart_GetSupertype(set_type);
     Dart_Handle iterable_type = Dart_GetType(core_lib, iterable_name, 0, NULL);
-    const Type& expected_type = Api::UnwrapTypeHandle(isolate, iterable_type);
-    const Type& actual_type = Api::UnwrapTypeHandle(isolate, super_type);
+    const Type& expected_type = Api::UnwrapTypeHandle(zone, iterable_type);
+    const Type& actual_type = Api::UnwrapTypeHandle(zone, super_type);
     EXPECT(expected_type.raw() == actual_type.raw());
   }
   {
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 6aac45a..3d86592 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -114,7 +114,7 @@
   // Check that deopt_id exists.
   // TODO(vegorov): verify after deoptimization targets as well.
 #ifdef DEBUG
-  ASSERT(Isolate::IsDeoptAfter(deopt_id_) ||
+  ASSERT(Thread::IsDeoptAfter(deopt_id_) ||
          (code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt) != 0));
 #endif
 
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 79f08d8..134d85c 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -826,7 +826,7 @@
       static_cast<DeoptRetAddressInstr*>(instr);
   // The following assert may trigger when displaying a backtrace
   // from the simulator.
-  ASSERT(Isolate::IsDeoptAfter(ret_address_instr->deopt_id()));
+  ASSERT(Thread::IsDeoptAfter(ret_address_instr->deopt_id()));
   ASSERT(!object_table.IsNull());
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 8230ac7..d5d4b39 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -37,11 +37,11 @@
 
 class RegularStacktraceBuilder : public StacktraceBuilder {
  public:
-  explicit RegularStacktraceBuilder(Isolate* isolate)
+  explicit RegularStacktraceBuilder(Zone* zone)
       : code_list_(
-          GrowableObjectArray::Handle(isolate, GrowableObjectArray::New())),
+          GrowableObjectArray::Handle(zone, GrowableObjectArray::New())),
         pc_offset_list_(
-          GrowableObjectArray::Handle(isolate, GrowableObjectArray::New())) { }
+          GrowableObjectArray::Handle(zone, GrowableObjectArray::New())) { }
   ~RegularStacktraceBuilder() { }
 
   const GrowableObjectArray& code_list() const { return code_list_; }
@@ -111,7 +111,7 @@
 }
 
 
-static void BuildStackTrace(Isolate* isolate, StacktraceBuilder* builder) {
+static void BuildStackTrace(StacktraceBuilder* builder) {
   StackFrameIterator frames(StackFrameIterator::kDontValidateFrames);
   StackFrame* frame = frames.NextFrame();
   ASSERT(frame != NULL);  // We expect to find a dart invocation frame.
@@ -247,18 +247,20 @@
     // 'class Error' is not a predefined class.
     return Field::null();
   }
-  Isolate* isolate = Isolate::Current();
-  Class& error_class = Class::Handle(isolate,
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  Class& error_class = Class::Handle(zone,
                                      isolate->object_store()->error_class());
   if (error_class.IsNull()) {
-    const Library& core_lib = Library::Handle(isolate, Library::CoreLibrary());
+    const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
     error_class = core_lib.LookupClass(Symbols::Error());
     ASSERT(!error_class.IsNull());
     isolate->object_store()->set_error_class(error_class);
   }
   // If instance class extends 'class Error' return '_stackTrace' field.
-  Class& test_class = Class::Handle(isolate, instance.clazz());
-  AbstractType& type = AbstractType::Handle(isolate, AbstractType::null());
+  Class& test_class = Class::Handle(zone, instance.clazz());
+  AbstractType& type = AbstractType::Handle(zone, AbstractType::null());
   while (true) {
     if (test_class.raw() == error_class.raw()) {
       return error_class.LookupInstanceField(Symbols::_stackTrace());
@@ -273,14 +275,14 @@
 
 
 RawStacktrace* Exceptions::CurrentStacktrace() {
-  Isolate* isolate = Isolate::Current();
-  RegularStacktraceBuilder frame_builder(isolate);
-  BuildStackTrace(isolate, &frame_builder);
+  Zone* zone = Thread::Current()->zone();
+  RegularStacktraceBuilder frame_builder(zone);
+  BuildStackTrace(&frame_builder);
 
   // Create arrays for code and pc_offset tuples of each frame.
-  const Array& full_code_array = Array::Handle(isolate,
+  const Array& full_code_array = Array::Handle(zone,
       Array::MakeArray(frame_builder.code_list()));
-  const Array& full_pc_offset_array = Array::Handle(isolate,
+  const Array& full_pc_offset_array = Array::Handle(zone,
       Array::MakeArray(frame_builder.pc_offset_list()));
   const Stacktrace& full_stacktrace = Stacktrace::Handle(
       Stacktrace::New(full_code_array, full_pc_offset_array));
@@ -292,9 +294,10 @@
                                  const Instance& incoming_exception,
                                  const Instance& existing_stacktrace,
                                  const bool is_rethrow) {
+  Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
   bool use_preallocated_stacktrace = false;
-  Instance& exception = Instance::Handle(isolate, incoming_exception.raw());
+  Instance& exception = Instance::Handle(zone, incoming_exception.raw());
   if (exception.IsNull()) {
     exception ^= Exceptions::Create(Exceptions::kNullThrown,
                                     Object::empty_array());
@@ -305,7 +308,7 @@
   uword handler_pc = 0;
   uword handler_sp = 0;
   uword handler_fp = 0;
-  Instance& stacktrace = Instance::Handle(isolate);
+  Instance& stacktrace = Instance::Handle(zone);
   bool handler_exists = false;
   bool handler_needs_stacktrace = false;
   if (use_preallocated_stacktrace) {
@@ -317,13 +320,13 @@
                                           &handler_fp,
                                           &handler_needs_stacktrace);
     if (handler_needs_stacktrace) {
-      BuildStackTrace(isolate, &frame_builder);
+      BuildStackTrace(&frame_builder);
     }
   } else {
     // Get stacktrace field of class Error. This is needed to determine whether
     // we have a subclass of Error which carries around its stack trace.
     const Field& stacktrace_field =
-        Field::Handle(isolate, LookupStacktraceField(exception));
+        Field::Handle(zone, LookupStacktraceField(exception));
 
     // Find the exception handler and determine if the handler needs a
     // stacktrace.
@@ -379,7 +382,7 @@
     // dart invocation sequence above it, print diagnostics and terminate
     // the isolate etc.).
     const UnhandledException& unhandled_exception = UnhandledException::Handle(
-        isolate, UnhandledException::New(exception, stacktrace));
+        zone, UnhandledException::New(exception, stacktrace));
     stacktrace = Stacktrace::null();
     JumpToExceptionHandler(thread,
                            handler_pc,
@@ -485,7 +488,8 @@
     isolate->debugger()->SignalExceptionThrown(exception);
   }
   // Null object is a valid exception object.
-  ThrowExceptionHelper(thread, exception, Stacktrace::Handle(isolate), false);
+  ThrowExceptionHelper(thread, exception,
+      Stacktrace::Handle(thread->zone()), false);
 }
 
 void Exceptions::ReThrow(Thread* thread,
@@ -499,13 +503,14 @@
 void Exceptions::PropagateError(const Error& error) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   ASSERT(isolate->top_exit_frame_info() != 0);
   if (error.IsUnhandledException()) {
     // If the error object represents an unhandled exception, then
     // rethrow the exception in the normal fashion.
     const UnhandledException& uhe = UnhandledException::Cast(error);
-    const Instance& exc = Instance::Handle(isolate, uhe.exception());
-    const Instance& stk = Instance::Handle(isolate, uhe.stacktrace());
+    const Instance& exc = Instance::Handle(zone, uhe.exception());
+    const Instance& stk = Instance::Handle(zone, uhe.stacktrace());
     Exceptions::ReThrow(thread, exc, stk);
   } else {
     // Return to the invocation stub and return this error object.  The
@@ -516,7 +521,7 @@
     uword handler_fp = 0;
     FindErrorHandler(&handler_pc, &handler_sp, &handler_fp);
     JumpToExceptionHandler(thread, handler_pc, handler_sp, handler_fp, error,
-                           Stacktrace::Handle(isolate));  // Null stacktrace.
+                           Stacktrace::Handle(zone));  // Null stacktrace.
   }
   UNREACHABLE();
 }
@@ -524,8 +529,8 @@
 
 void Exceptions::ThrowByType(ExceptionType type, const Array& arguments) {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
-  const Object& result = Object::Handle(isolate, Create(type, arguments));
+  const Object& result =
+      Object::Handle(thread->zone(), Create(type, arguments));
   if (result.IsError()) {
     // We got an error while constructing the exception object.
     // Propagate the error instead of throwing the exception.
@@ -541,7 +546,7 @@
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   const Instance& oom = Instance::Handle(
-      isolate, isolate->object_store()->out_of_memory());
+      thread->zone(), isolate->object_store()->out_of_memory());
   Throw(thread, oom);
 }
 
@@ -550,7 +555,7 @@
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   const Instance& stack_overflow = Instance::Handle(
-      isolate, isolate->object_store()->stack_overflow());
+      thread->zone(), isolate->object_store()->stack_overflow());
   Throw(thread, stack_overflow);
 }
 
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index b6984ac..a4753f2 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -921,7 +921,7 @@
         PhiInstr* phi = (*join->phis())[i];
         if (phi != NULL) {
           (*env)[i] = phi;
-          phi->set_ssa_temp_index(alloc_ssa_temp_index());  // New SSA temp.
+          AllocateSSAIndexes(phi);  // New SSA temp.
           if (block_entry->InsideTryBlock() && !phi->is_alive()) {
             // This is a safe approximation.  Inside try{} all locals are
             // used at every call implicitly, so we mark all phis as live
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 93d964a..208a4af 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -222,11 +222,14 @@
     if (block->IsJoinEntry()) {
       JoinEntryInstr* join = block->AsJoinEntry();
       for (PhiIterator it(join); !it.Done(); it.Advance()) {
-        // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
         PhiInstr* phi = it.Current();
         ASSERT(phi != NULL);
         kill->Add(phi->ssa_temp_index());
         live_in->Remove(phi->ssa_temp_index());
+        if (phi->HasPairRepresentation()) {
+          kill->Add(ToSecondPairVreg(phi->ssa_temp_index()));
+          live_in->Remove(ToSecondPairVreg(phi->ssa_temp_index()));
+        }
 
         // If a phi input is not defined by the corresponding predecessor it
         // must be marked live-in for that predecessor.
@@ -239,6 +242,12 @@
           if (!kill_[pred->postorder_number()]->Contains(use)) {
             live_in_[pred->postorder_number()]->Add(use);
           }
+          if (phi->HasPairRepresentation()) {
+            const intptr_t second_use = ToSecondPairVreg(use);
+            if (!kill_[pred->postorder_number()]->Contains(second_use)) {
+              live_in_[pred->postorder_number()]->Add(second_use);
+            }
+          }
         }
       }
     } else if (block->IsCatchBlockEntry()) {
@@ -774,20 +783,18 @@
 
   // Search for the index of the current block in the predecessors of
   // the join.
-  const intptr_t pred_idx = join->IndexOfPredecessor(block);
+  const intptr_t pred_index = join->IndexOfPredecessor(block);
 
   // Record the corresponding phi input use for each phi.
-  intptr_t move_idx = 0;
+  intptr_t move_index = 0;
   for (PhiIterator it(join); !it.Done(); it.Advance()) {
-    // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
     PhiInstr* phi = it.Current();
-    Value* val = phi->InputAt(pred_idx);
-    MoveOperands* move = parallel_move->MoveOperandsAt(move_idx);
+    Value* val = phi->InputAt(pred_index);
+    MoveOperands* move = parallel_move->MoveOperandsAt(move_index++);
 
     ConstantInstr* constant = val->definition()->AsConstant();
     if (constant != NULL) {
       move->set_src(Location::Constant(constant));
-      move_idx++;
       continue;
     }
 
@@ -796,8 +803,7 @@
     //                 g  g'
     //      value    --*
     //
-
-    const intptr_t vreg = val->definition()->ssa_temp_index();
+    intptr_t vreg = val->definition()->ssa_temp_index();
     LiveRange* range = GetLiveRange(vreg);
     if (interfere_at_backedge != NULL) interfere_at_backedge->Add(vreg);
 
@@ -806,9 +812,23 @@
         pos,
         move->src_slot(),
         GetLiveRange(phi->ssa_temp_index())->assigned_location_slot());
-
     move->set_src(Location::PrefersRegister());
-    move_idx++;
+
+    if (val->definition()->HasPairRepresentation()) {
+      move = parallel_move->MoveOperandsAt(move_index++);
+      vreg = ToSecondPairVreg(vreg);
+      range = GetLiveRange(vreg);
+      if (interfere_at_backedge != NULL) {
+        interfere_at_backedge->Add(vreg);
+      }
+      range->AddUseInterval(block->start_pos(), pos);
+      range->AddHintedUse(
+          pos,
+          move->src_slot(),
+          GetLiveRange(ToSecondPairVreg(
+              phi->ssa_temp_index()))->assigned_location_slot());
+      move->set_src(Location::PrefersRegister());
+    }
   }
 
   // Begin backward iteration with the instruction before the parallel
@@ -826,11 +846,11 @@
   const bool is_loop_header = BlockInfoAt(join->start_pos())->is_loop_header();
   intptr_t move_idx = 0;
   for (PhiIterator it(join); !it.Done(); it.Advance()) {
-    // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
     PhiInstr* phi = it.Current();
     ASSERT(phi != NULL);
     const intptr_t vreg = phi->ssa_temp_index();
     ASSERT(vreg >= 0);
+    const bool is_pair_phi = phi->HasPairRepresentation();
 
     // Expected shape of live range:
     //
@@ -839,9 +859,14 @@
     //
     LiveRange* range = GetLiveRange(vreg);
     range->DefineAt(pos);  // Shorten live range.
-
     if (is_loop_header) range->mark_loop_phi();
 
+    if (is_pair_phi) {
+      LiveRange* second_range = GetLiveRange(ToSecondPairVreg(vreg));
+      second_range->DefineAt(pos);  // Shorten live range.
+      if (is_loop_header) second_range->mark_loop_phi();
+    }
+
     for (intptr_t pred_idx = 0; pred_idx < phi->InputCount(); pred_idx++) {
       BlockEntryInstr* pred = join->PredecessorAt(pred_idx);
       GotoInstr* goto_instr = pred->last_instruction()->AsGoto();
@@ -850,15 +875,26 @@
           goto_instr->parallel_move()->MoveOperandsAt(move_idx);
       move->set_dest(Location::PrefersRegister());
       range->AddUse(pos, move->dest_slot());
+      if (is_pair_phi) {
+        LiveRange* second_range = GetLiveRange(ToSecondPairVreg(vreg));
+        MoveOperands* second_move =
+            goto_instr->parallel_move()->MoveOperandsAt(move_idx + 1);
+        second_move->set_dest(Location::PrefersRegister());
+        second_range->AddUse(pos, second_move->dest_slot());
+      }
     }
 
     // All phi resolution moves are connected. Phi's live range is
     // complete.
     AssignSafepoints(phi, range);
-
     CompleteRange(range, RegisterKindForResult(phi));
+    if (is_pair_phi) {
+      LiveRange* second_range = GetLiveRange(ToSecondPairVreg(vreg));
+      AssignSafepoints(phi, second_range);
+      CompleteRange(second_range, RegisterKindForResult(phi));
+    }
 
-    move_idx++;
+    move_idx += is_pair_phi ? 2 : 1;
   }
 }
 
@@ -1499,10 +1535,11 @@
     // For join entry predecessors create phi resolution moves if
     // necessary. They will be populated by the register allocator.
     JoinEntryInstr* join = block->AsJoinEntry();
-    if ((join != NULL) &&
-        (join->phis() != NULL) &&
-        !join->phis()->is_empty()) {
-      const intptr_t phi_count = join->phis()->length();
+    if (join != NULL) {
+      intptr_t move_count = 0;
+      for (PhiIterator it(join); !it.Done(); it.Advance()) {
+        move_count += it.Current()->HasPairRepresentation() ? 2 : 1;
+      }
       for (intptr_t i = 0; i < block->PredecessorCount(); i++) {
         // Insert the move between the last two instructions of the
         // predecessor block (all such blocks have at least two instructions:
@@ -1513,7 +1550,7 @@
         ParallelMoveInstr* move = last->AsGoto()->GetParallelMove();
 
         // Populate the ParallelMove with empty moves.
-        for (intptr_t j = 0; j < phi_count; j++) {
+        for (intptr_t j = 0; j < move_count; j++) {
           move->AddMove(Location::NoLocation(), Location::NoLocation());
         }
       }
@@ -2023,7 +2060,6 @@
 
 
 void ReachingDefs::AddPhi(PhiInstr* phi) {
-  // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
   if (phi->reaching_defs() == NULL) {
     Zone* zone = flow_graph_.zone();
     phi->set_reaching_defs(new(zone) BitVector(
@@ -2037,6 +2073,9 @@
         depends_on_phi = true;
       }
       phi->reaching_defs()->Add(input->ssa_temp_index());
+      if (phi->HasPairRepresentation()) {
+        phi->reaching_defs()->Add(ToSecondPairVreg(input->ssa_temp_index()));
+      }
     }
 
     // If this phi depends on another phi then we need fix point iteration.
@@ -2048,7 +2087,6 @@
 void ReachingDefs::Compute() {
   // Transitively collect all phis that are used by the given phi.
   for (intptr_t i = 0; i < phis_.length(); i++) {
-    // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
     PhiInstr* phi = phis_[i];
 
     // Add all phis that affect this phi to the list.
@@ -2153,18 +2191,27 @@
     for (PhiIterator it(loop_header->entry()->AsJoinEntry());
          !it.Done();
          it.Advance()) {
-      // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
       PhiInstr* phi = it.Current();
       ASSERT(phi->is_alive());
       const intptr_t phi_vreg = phi->ssa_temp_index();
       LiveRange* range = GetLiveRange(phi_vreg);
       if (range->assigned_location().kind() == register_kind_) {
         const intptr_t reg = range->assigned_location().register_code();
-
         if (!reaching_defs_.Get(phi)->Contains(unallocated->vreg())) {
           used_on_backedge[reg] = true;
         }
       }
+      if (phi->HasPairRepresentation()) {
+        const intptr_t second_phi_vreg = ToSecondPairVreg(phi_vreg);
+        LiveRange* second_range = GetLiveRange(second_phi_vreg);
+        if (second_range->assigned_location().kind() == register_kind_) {
+          const intptr_t reg =
+              second_range->assigned_location().register_code();
+          if (!reaching_defs_.Get(phi)->Contains(unallocated->vreg())) {
+            used_on_backedge[reg] = true;
+          }
+        }
+      }
     }
 
     if (used_on_backedge[candidate]) {
@@ -2877,11 +2924,12 @@
     if (block->IsJoinEntry()) {
       JoinEntryInstr* join = block->AsJoinEntry();
       for (PhiIterator it(join); !it.Done(); it.Advance()) {
-        // TODO(johnmccutchan): Fix handling of PhiInstr with PairLocation.
         PhiInstr* phi = it.Current();
-        if ((phi != NULL) && (phi->ssa_temp_index() >= 0)) {
-          ASSERT(!phi->HasPairRepresentation());
-          value_representations_[phi->ssa_temp_index()] =
+        ASSERT(phi != NULL && phi->ssa_temp_index() >= 0);
+        value_representations_[phi->ssa_temp_index()] =
+            RepresentationForRange(phi->representation());
+        if (phi->HasPairRepresentation()) {
+          value_representations_[ToSecondPairVreg(phi->ssa_temp_index())] =
               RepresentationForRange(phi->representation());
         }
       }
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 9bbd9e0..ea31f96 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -489,7 +489,7 @@
     if (call_->HasUses()) {
       // Add a phi of the return values.
       PhiInstr* phi = new(Z) PhiInstr(join, num_exits);
-      phi->set_ssa_temp_index(caller_graph_->alloc_ssa_temp_index());
+      caller_graph_->AllocateSSAIndexes(phi);
       phi->mark_alive();
       for (intptr_t i = 0; i < num_exits; ++i) {
         ReturnAt(i)->RemoveEnvironment();
@@ -1606,7 +1606,7 @@
                             &instantiator_type_arguments);
   }
 
-  const intptr_t deopt_id = Isolate::Current()->GetNextDeoptId();
+  const intptr_t deopt_id = Thread::Current()->GetNextDeoptId();
   return new(Z) AssertAssignableInstr(token_pos,
                                       value,
                                       instantiator,
@@ -2461,7 +2461,7 @@
 
   { LocalVariable* tmp_var = EnterTempLocalScope(array_val);
     const intptr_t class_id = kArrayCid;
-    const intptr_t deopt_id = Isolate::kNoDeoptId;
+    const intptr_t deopt_id = Thread::kNoDeoptId;
     for (int i = 0; i < node->length(); ++i) {
       Value* array = Bind(new(Z) LoadLocalInstr(*tmp_var));
       Value* index =
@@ -2530,14 +2530,17 @@
 static void CollectClosureFunction(const Function& function) {
   if (function.HasCode()) return;
 
-  Isolate* isolate = Isolate::Current();
-  if (isolate->collected_closures() == GrowableObjectArray::null()) {
-    isolate->set_collected_closures(
-        GrowableObjectArray::Handle(GrowableObjectArray::New()));
+  // Although this is only called when precompiling, this can happen before
+  // Dart_Precompile as part of loading code, so check for a non-null work
+  // list.
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  if (isolate->collected_closures() != GrowableObjectArray::null()) {
+    const GrowableObjectArray& functions =
+        GrowableObjectArray::Handle(thread->zone(),
+                                    isolate->collected_closures());
+    functions.Add(function);
   }
-  const GrowableObjectArray& functions =
-      GrowableObjectArray::Handle(isolate, isolate->collected_closures());
-  functions.Add(function);
 }
 
 
@@ -3781,13 +3784,13 @@
     GuardFieldClassInstr* guard_field_class =
         new(Z) GuardFieldClassInstr(store_value,
                                  node->field(),
-                                 isolate()->GetNextDeoptId());
+                                 thread()->GetNextDeoptId());
     AddInstruction(guard_field_class);
     store_value = Bind(BuildLoadExprTemp());
     GuardFieldLengthInstr* guard_field_length =
         new(Z) GuardFieldLengthInstr(store_value,
                                      node->field(),
-                                     isolate()->GetNextDeoptId());
+                                     thread()->GetNextDeoptId());
     AddInstruction(guard_field_length);
     store_value = Bind(BuildLoadExprTemp());
   }
@@ -4079,11 +4082,6 @@
   ASSERT((node->label() == NULL) || !is_top_level_sequence);
   NestedBlock nested_block(owner(), node);
 
-  if (FLAG_support_debugger && is_top_level_sequence) {
-    AddInstruction(new(Z) DebugStepCheckInstr(function.token_pos(),
-                                              RawPcDescriptors::kRuntimeCall));
-  }
-
   if (num_context_variables > 0) {
     // The local scope declares variables that are captured.
     // Allocate and chain a new context (Except don't chain when at the function
@@ -4146,6 +4144,27 @@
     }
   }
 
+  if (FLAG_support_debugger &&
+      is_top_level_sequence &&
+      function.is_debuggable()) {
+    // Place a debug check at method entry to ensure breaking on a method always
+    // happens, even if there are no assignments/calls/runtimecalls in the first
+    // basic block. Place this check at the last parameter to ensure parameters
+    // are in scope in the debugger at method entry.
+    const int num_params = function.NumParameters();
+    intptr_t check_pos = Scanner::kNoSourcePos;
+    if (num_params > 0) {
+      const LocalVariable& parameter = *scope->VariableAt(num_params - 1);
+      check_pos = parameter.token_pos();
+    }
+    if (check_pos == Scanner::kNoSourcePos) {
+      // No parameters or synthetic parameters.
+      check_pos = node->token_pos();
+    }
+    AddInstruction(new(Z) DebugStepCheckInstr(check_pos,
+                                              RawPcDescriptors::kRuntimeCall));
+  }
+
   // This check may be deleted if the generated code is leaf.
   // Native functions don't need a stack check at entry.
   if (is_top_level_sequence && !function.is_native()) {
@@ -4654,7 +4673,7 @@
   // When compiling for OSR, use a depth first search to prune instructions
   // unreachable from the OSR entry. Catch entries are always considered
   // reachable, even if they become unreachable after OSR.
-  if (osr_id_ != Isolate::kNoDeoptId) {
+  if (osr_id_ != Thread::kNoDeoptId) {
     PruneUnreachable();
   }
 
@@ -4665,7 +4684,7 @@
 
 
 void FlowGraphBuilder::PruneUnreachable() {
-  ASSERT(osr_id_ != Isolate::kNoDeoptId);
+  ASSERT(osr_id_ != Thread::kNoDeoptId);
   BitVector* block_marks = new(Z) BitVector(Z, last_used_block_id_ + 1);
   bool found = graph_entry_->PruneUnreachable(this, graph_entry_, NULL, osr_id_,
                                               block_marks);
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 7070e2a..109a9a1 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -124,7 +124,7 @@
 class FlowGraphBuilder : public ValueObject {
  public:
   // The inlining context is NULL if not inlining.  The osr_id is the deopt
-  // id of the OSR entry or Isolate::kNoDeoptId if not compiling for OSR.
+  // id of the OSR entry or Thread::kNoDeoptId if not compiling for OSR.
   FlowGraphBuilder(const ParsedFunction& parsed_function,
                    const ZoneGrowableArray<const ICData*>& ic_data_array,
                    InlineExitCollector* exit_collector,
@@ -210,6 +210,7 @@
   // Returns address where the constant 'value' is stored or 0 if not found.
   static uword FindDoubleConstant(double value);
 
+  Thread* thread() const { return parsed_function().thread(); }
   Isolate* isolate() const { return parsed_function().isolate(); }
   Zone* zone() const { return parsed_function().zone(); }
 
@@ -247,7 +248,7 @@
   // A stack of enclosing nested statements.
   NestedStatement* nesting_stack_;
 
-  // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling
+  // The deopt id of the OSR entry or Thread::kNoDeoptId if not compiling
   // for OSR.
   const intptr_t osr_id_;
 
@@ -466,6 +467,7 @@
   void BuildInstanceGetterConditional(InstanceGetterNode* node);
   void BuildInstanceCallConditional(InstanceCallNode* node);
 
+  Thread* thread() const { return owner()->thread(); }
   Isolate* isolate() const { return owner()->isolate(); }
   Zone* zone() const { return owner()->zone(); }
 
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index ee6bdfd..dd4adfd 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -165,7 +165,8 @@
     bool is_optimizing,
     const GrowableArray<const Function*>& inline_id_to_function,
     const GrowableArray<intptr_t>& caller_inline_id)
-      : isolate_(Isolate::Current()),
+      : thread_(Thread::Current()),
+        isolate_(Isolate::Current()),
         zone_(Thread::Current()->zone()),
         assembler_(assembler),
         parsed_function_(parsed_function),
@@ -205,7 +206,7 @@
   ASSERT(flow_graph->parsed_function().function().raw() ==
          parsed_function.function().raw());
   if (!is_optimizing) {
-    const intptr_t len = isolate()->deopt_id();
+    const intptr_t len = thread()->deopt_id();
     deopt_id_to_ic_data_ = new(zone()) ZoneGrowableArray<const ICData*>(len);
     deopt_id_to_ic_data_->SetLength(len);
     for (intptr_t i = 0; i < len; i++) {
@@ -812,9 +813,9 @@
           }
         }
       }
-      // General purpose registers have the lowest register number at the
+      // General purpose registers have the highest register number at the
       // highest address (i.e., first in the stackmap).
-      for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
+      for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
         Register reg = static_cast<Register>(i);
         if (locs->live_registers()->ContainsRegister(reg)) {
           bitmap->Set(bitmap->Length(), locs->live_registers()->IsTagged(reg));
@@ -863,9 +864,9 @@
       fpu_reg_slots[i] = -1;
     }
   }
-  // General purpose registers are spilled from lowest to highest register
+  // General purpose registers are spilled from highest to lowest register
   // number.
-  for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
     Register reg = static_cast<Register>(i);
     if (regs->ContainsRegister(reg)) {
       cpu_reg_slots[i] = next_slot++;
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index 1451776..df9f7e4 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -525,6 +525,7 @@
     return *deopt_id_to_ic_data_;
   }
 
+  Thread* thread() const { return thread_; }
   Isolate* isolate() const { return isolate_; }
   Zone* zone() const { return zone_; }
 
@@ -681,6 +682,7 @@
     DISALLOW_COPY_AND_ASSIGN(StaticCallsStruct);
   };
 
+  Thread* thread_;
   Isolate* isolate_;
   Zone* zone_;
   Assembler* assembler_;
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 9299a95..444a0d8 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -129,7 +129,7 @@
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
         current->function(),
-        Isolate::ToDeoptAfter(current->deopt_id()),
+        Thread::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
@@ -1134,7 +1134,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   __ BranchLinkPatchable(stub_entry);
-  AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
 }
 
@@ -1149,7 +1149,7 @@
   RecordSafepoint(locs);
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1169,10 +1169,10 @@
   __ CallRuntime(entry, argument_count);
   AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
   RecordSafepoint(locs);
-  if (deopt_id != Isolate::kNoDeoptId) {
+  if (deopt_id != Thread::kNoDeoptId) {
     // Marks either the continuation point in unoptimized code or the
     // deoptimization point in optimized code, after call.
-    const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+    const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
     if (is_optimizing()) {
       AddDeoptIndexAtCall(deopt_id_after, token_pos);
     } else {
@@ -1279,10 +1279,9 @@
   __ LoadObject(R5, ic_data);
   __ LoadObject(R4, arguments_descriptor);
   __ blx(targetR);
-  AddCurrentDescriptor(RawPcDescriptors::kOther,
-      Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1351,7 +1350,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmp, we need Z computed).
@@ -1380,7 +1379,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmp, we need Z computed).
@@ -1408,8 +1407,8 @@
     // Store fpu registers with the lowest register number at the lowest
     // address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
-      QRegister fpu_reg = static_cast<QRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfFpuRegisters; ++i) {
+      QRegister fpu_reg = static_cast<QRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         DRegister d1 = EvenDRegisterOf(fpu_reg);
         DRegister d2 = OddDRegisterOf(fpu_reg);
@@ -1422,36 +1421,40 @@
     ASSERT(offset == (fpu_regs_count * kFpuRegisterSize));
   }
 
-  // Store general purpose registers with the highest register number at the
-  // lowest address. The order in which the registers are pushed must match the
-  // order in which the registers are encoded in the safe point's stack map.
-  // NOTE: Using ARM's multi-register push, pushes the registers in the wrong
-  // order.
-  for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  // The order in which the registers are pushed must match the order
+  // in which the registers are encoded in the safe point's stack map.
+  // NOTE: This matches the order of ARM's multi-register push.
+  RegList reg_list = 0;
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
-      __ Push(reg);
+      reg_list |= (1 << reg);
     }
   }
+  if (reg_list != 0) {
+    __ PushList(reg_list);
+  }
 }
 
 
 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
-  // General purpose registers have the highest register number at the
-  // lowest address.
-  for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  RegList reg_list = 0;
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
-      __ Pop(reg);
+      reg_list |= (1 << reg);
     }
   }
+  if (reg_list != 0) {
+    __ PopList(reg_list);
+  }
 
   const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
   if (fpu_regs_count > 0) {
     // Fpu registers have the lowest register number at the lowest address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
-      QRegister fpu_reg = static_cast<QRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfFpuRegisters; ++i) {
+      QRegister fpu_reg = static_cast<QRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         DRegister d1 = EvenDRegisterOf(fpu_reg);
         DRegister d2 = OddDRegisterOf(fpu_reg);
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index 86167ac..2c9a717 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -126,7 +126,7 @@
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
         current->function(),
-        Isolate::ToDeoptAfter(current->deopt_id()),
+        Thread::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
@@ -1135,7 +1135,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   __ BranchLinkPatchable(stub_entry);
-  AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
 }
 
@@ -1150,7 +1150,7 @@
   RecordSafepoint(locs);
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1169,10 +1169,10 @@
   __ CallRuntime(entry, argument_count);
   AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
   RecordSafepoint(locs);
-  if (deopt_id != Isolate::kNoDeoptId) {
+  if (deopt_id != Thread::kNoDeoptId) {
     // Marks either the continuation point in unoptimized code or the
     // deoptimization point in optimized code, after call.
-    const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+    const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
     if (is_optimizing()) {
       AddDeoptIndexAtCall(deopt_id_after, token_pos);
     } else {
@@ -1270,9 +1270,9 @@
   __ LoadObject(R4, arguments_descriptor);
   __ blr(targetR);
   AddCurrentDescriptor(RawPcDescriptors::kOther,
-      Isolate::kNoDeoptId, token_pos);
+      Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1340,7 +1340,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmp, we need Z computed).
@@ -1369,7 +1369,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmp, we need Z computed).
@@ -1395,20 +1395,18 @@
   if (fpu_regs_count > 0) {
     // Store fpu registers with the lowest register number at the lowest
     // address.
-    for (intptr_t reg_idx = kNumberOfVRegisters - 1;
-                  reg_idx >= 0; --reg_idx) {
-      VRegister fpu_reg = static_cast<VRegister>(reg_idx);
+    for (intptr_t i = kNumberOfVRegisters - 1; i >= 0; --i) {
+      VRegister fpu_reg = static_cast<VRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         __ PushQuad(fpu_reg);
       }
     }
   }
 
-  // Store general purpose registers with the highest register number at the
-  // lowest address. The order in which the registers are pushed must match the
-  // order in which the registers are encoded in the safe point's stack map.
-  for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  // The order in which the registers are pushed must match the order
+  // in which the registers are encoded in the safe point's stack map.
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
       __ Push(reg);
     }
@@ -1417,10 +1415,8 @@
 
 
 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
-  // General purpose registers have the highest register number at the
-  // lowest address.
-  for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
       __ Pop(reg);
     }
@@ -1429,8 +1425,8 @@
   const intptr_t fpu_regs_count = locs->live_registers()->FpuRegisterCount();
   if (fpu_regs_count > 0) {
     // Fpu registers have the lowest register number at the lowest address.
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfVRegisters; ++reg_idx) {
-      VRegister fpu_reg = static_cast<VRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfVRegisters; ++i) {
+      VRegister fpu_reg = static_cast<VRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         __ PopQuad(fpu_reg);
       }
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 2794ff5..72dda0a 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -129,7 +129,7 @@
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
         current->function(),
-        Isolate::ToDeoptAfter(current->deopt_id()),
+        Thread::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
@@ -1151,7 +1151,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   __ Call(stub_entry);
-  AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
 }
 
@@ -1166,7 +1166,7 @@
   RecordSafepoint(locs);
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1185,10 +1185,10 @@
   __ CallRuntime(entry, argument_count);
   AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
   RecordSafepoint(locs);
-  if (deopt_id != Isolate::kNoDeoptId) {
+  if (deopt_id != Thread::kNoDeoptId) {
     // Marks either the continuation point in unoptimized code or the
     // deoptimization point in optimized code, after call.
-    const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+    const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
     if (is_optimizing()) {
       AddDeoptIndexAtCall(deopt_id_after, token_pos);
     } else {
@@ -1301,9 +1301,9 @@
   __ LoadObject(EDX, arguments_descriptor);
   __ call(targetR);
   AddCurrentDescriptor(RawPcDescriptors::kOther,
-      Isolate::kNoDeoptId, token_pos);
+      Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1359,7 +1359,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmpl, we need ZF computed).
@@ -1386,7 +1386,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmpl, we need ZF computed).
@@ -1414,8 +1414,8 @@
     // Store XMM registers with the lowest register number at the lowest
     // address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
-      XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfXmmRegisters; ++i) {
+      XmmRegister xmm_reg = static_cast<XmmRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(xmm_reg)) {
         __ movups(Address(ESP, offset), xmm_reg);
         offset += kFpuRegisterSize;
@@ -1424,11 +1424,10 @@
     ASSERT(offset == (xmm_regs_count * kFpuRegisterSize));
   }
 
-  // Store general purpose registers with the highest register number at the
-  // lowest address. The order in which the registers are pushed must match the
-  // order in which the registers are encoded in the safe point's stack map.
-  for (intptr_t reg_idx = 0; reg_idx < kNumberOfCpuRegisters; ++reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  // The order in which the registers are pushed must match the order
+  // in which the registers are encoded in the safe point's stack map.
+  for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
       __ pushl(reg);
     }
@@ -1437,10 +1436,8 @@
 
 
 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
-  // General purpose registers have the highest register number at the
-  // lowest address.
-  for (intptr_t reg_idx = kNumberOfCpuRegisters - 1; reg_idx >= 0; --reg_idx) {
-    Register reg = static_cast<Register>(reg_idx);
+  for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) {
+    Register reg = static_cast<Register>(i);
     if (locs->live_registers()->ContainsRegister(reg)) {
       __ popl(reg);
     }
@@ -1450,8 +1447,8 @@
   if (xmm_regs_count > 0) {
     // XMM registers have the lowest register number at the lowest address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
-      XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfXmmRegisters; ++i) {
+      XmmRegister xmm_reg = static_cast<XmmRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(xmm_reg)) {
         __ movups(xmm_reg, Address(ESP, offset));
         offset += kFpuRegisterSize;
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 93ec487..d2670eb 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -126,7 +126,7 @@
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
         current->function(),
-        Isolate::ToDeoptAfter(current->deopt_id()),
+        Thread::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
@@ -1151,7 +1151,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   __ BranchLinkPatchable(stub_entry);
-  AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
 }
 
@@ -1166,7 +1166,7 @@
   RecordSafepoint(locs);
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1187,10 +1187,10 @@
   __ CallRuntime(entry, argument_count);
   AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
   RecordSafepoint(locs);
-  if (deopt_id != Isolate::kNoDeoptId) {
+  if (deopt_id != Thread::kNoDeoptId) {
     // Marks either the continuation point in unoptimized code or the
     // deoptimization point in optimized code, after call.
-    const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+    const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
     if (is_optimizing()) {
       AddDeoptIndexAtCall(deopt_id_after, token_pos);
     } else {
@@ -1292,9 +1292,9 @@
   __ LoadObject(S4, arguments_descriptor);
   __ jalr(targetR);
   AddCurrentDescriptor(RawPcDescriptors::kOther,
-      Isolate::kNoDeoptId, token_pos);
+      Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1368,7 +1368,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     __ Comment("EqualityRegConstCompare return");
@@ -1402,7 +1402,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     __ Comment("EqualityRegRegCompare return");
@@ -1434,8 +1434,8 @@
     // Store fpu registers with the lowest register number at the lowest
     // address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
-      DRegister fpu_reg = static_cast<DRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfFpuRegisters; ++i) {
+      DRegister fpu_reg = static_cast<DRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         __ StoreDToOffset(fpu_reg, SP, offset);
         offset += kFpuRegisterSize;
@@ -1444,16 +1444,15 @@
     ASSERT(offset == (fpu_regs_count * kFpuRegisterSize));
   }
 
-  // Store general purpose registers with the highest register number at the
-  // lowest address. The order in which the registers are pushed must match the
-  // order in which the registers are encoded in the safe point's stack map.
+  // The order in which the registers are pushed must match the order
+  // in which the registers are encoded in the safe point's stack map.
   const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
   ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
   const int register_count = Utils::CountOneBits(cpu_registers);
   if (register_count > 0) {
     __ addiu(SP, SP, Immediate(-register_count * kWordSize));
     intptr_t offset = register_count * kWordSize;
-    for (int i = 0; i < kNumberOfCpuRegisters; i++) {
+    for (int i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
       Register r = static_cast<Register>(i);
       if (locs->live_registers()->ContainsRegister(r)) {
         offset -= kWordSize;
@@ -1466,15 +1465,13 @@
 
 
 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) {
-  // General purpose registers have the highest register number at the
-  // lowest address.
   __ Comment("RestoreLiveRegisters");
   const intptr_t cpu_registers = locs->live_registers()->cpu_registers();
   ASSERT((cpu_registers & ~kAllCpuRegistersList) == 0);
   const int register_count = Utils::CountOneBits(cpu_registers);
   if (register_count > 0) {
     intptr_t offset = register_count * kWordSize;
-    for (int i = 0; i < kNumberOfCpuRegisters; i++) {
+    for (int i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
       Register r = static_cast<Register>(i);
       if (locs->live_registers()->ContainsRegister(r)) {
         offset -= kWordSize;
@@ -1489,8 +1486,8 @@
   if (fpu_regs_count > 0) {
     // Fpu registers have the lowest register number at the lowest address.
     intptr_t offset = 0;
-    for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
-      DRegister fpu_reg = static_cast<DRegister>(reg_idx);
+    for (intptr_t i = 0; i < kNumberOfFpuRegisters; ++i) {
+      DRegister fpu_reg = static_cast<DRegister>(i);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
         __ LoadDFromOffset(fpu_reg, SP, offset);
         offset += kFpuRegisterSize;
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 4247722..2a80633 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -129,7 +129,7 @@
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
         current->function(),
-        Isolate::ToDeoptAfter(current->deopt_id()),
+        Thread::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
@@ -1151,7 +1151,7 @@
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
   __ Call(stub_entry);
-  AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
+  AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
 }
 
@@ -1166,7 +1166,7 @@
   RecordSafepoint(locs);
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1185,10 +1185,10 @@
   __ CallRuntime(entry, argument_count);
   AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
   RecordSafepoint(locs);
-  if (deopt_id != Isolate::kNoDeoptId) {
+  if (deopt_id != Thread::kNoDeoptId) {
     // Marks either the continuation point in unoptimized code or the
     // deoptimization point in optimized code, after call.
-    const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+    const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
     if (is_optimizing()) {
       AddDeoptIndexAtCall(deopt_id_after, token_pos);
     } else {
@@ -1301,9 +1301,9 @@
   __ LoadObject(R10, arguments_descriptor);
   __ call(targetR);
   AddCurrentDescriptor(RawPcDescriptors::kOther,
-      Isolate::kNoDeoptId, token_pos);
+      Thread::kNoDeoptId, token_pos);
   RecordSafepoint(locs);
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
   if (is_optimizing()) {
     AddDeoptIndexAtCall(deopt_id_after, token_pos);
   } else {
@@ -1359,7 +1359,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmpq, we need ZF computed).
@@ -1386,7 +1386,7 @@
     }
     if (token_pos != Scanner::kNoSourcePos) {
       AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            token_pos);
     }
     // Stub returns result in flags (result of a cmpq, we need ZF computed).
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 5cda51f..f8bcb22 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -677,8 +677,8 @@
     }
 
     // Save and clear deopt id.
-    const intptr_t prev_deopt_id = isolate()->deopt_id();
-    isolate()->set_deopt_id(0);
+    const intptr_t prev_deopt_id = thread()->deopt_id();
+    thread()->set_deopt_id(0);
     // Install bailout jump.
     LongJumpScope jump;
     if (setjmp(*jump.Set()) == 0) {
@@ -701,7 +701,7 @@
       FlowGraphBuilder builder(*parsed_function,
                                *ic_data_array,
                                exit_collector,
-                               Isolate::kNoDeoptId);
+                               Thread::kNoDeoptId);
       builder.SetInitialBlockId(caller_graph_->max_block_id());
       FlowGraph* callee_graph;
       {
@@ -813,7 +813,7 @@
             (size > FLAG_inlining_constant_arguments_max_size_threshold)) {
           function.set_is_inlinable(false);
         }
-        isolate()->set_deopt_id(prev_deopt_id);
+        thread()->set_deopt_id(prev_deopt_id);
         TRACE_INLINING(THR_Print("     Bailout: heuristics with "
                                  "code size:  %" Pd ", "
                                  "call sites: %" Pd ", "
@@ -843,7 +843,7 @@
       if (is_recursive_call) {
         inlined_recursive_call_ = true;
       }
-      isolate()->set_deopt_id(prev_deopt_id);
+      thread()->set_deopt_id(prev_deopt_id);
 
       call_data->callee_graph = callee_graph;
       call_data->parameter_stubs = param_stubs;
@@ -873,7 +873,7 @@
       Error& error = Error::Handle();
       error = isolate()->object_store()->sticky_error();
       isolate()->object_store()->clear_sticky_error();
-      isolate()->set_deopt_id(prev_deopt_id);
+      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);
@@ -1220,7 +1220,7 @@
     // Otherwise, build a collection of name/argument pairs.
     GrowableArray<NamedArgument> named_args(argument_names_count);
     for (intptr_t i = 0; i < argument_names.Length(); ++i) {
-      String& arg_name = String::Handle(Isolate::Current());
+      String& arg_name = String::Handle(caller_graph_->zone());
       arg_name ^= argument_names.At(i);
       named_args.Add(
           NamedArgument(&arg_name, (*arguments)[i + fixed_param_count]));
@@ -1497,7 +1497,7 @@
     GraphEntryInstr* graph_entry =
         new(Z) GraphEntryInstr(*temp_parsed_function,
                                entry,
-                               Isolate::kNoDeoptId);  // No OSR id.
+                               Thread::kNoDeoptId);  // No OSR id.
     // Update polymorphic inliner state.
     inlined_entries_.Add(graph_entry);
     exit_collector_->Union(exit_collector);
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 9de736b..4a1aa37 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -394,7 +394,7 @@
         Token::kBIT_AND,
         new(Z) Value(left_instr),
         new(Z) Value(right_instr),
-        Isolate::kNoDeoptId);  // BIT_AND cannot deoptimize.
+        Thread::kNoDeoptId);  // BIT_AND cannot deoptimize.
     bit_and_instr->ReplaceWith(smi_op, current_iterator());
   }
 }
@@ -415,7 +415,7 @@
                                       new(Z) Value(index_instr),
                                       index_scale,
                                       cid,
-                                      Isolate::kNoDeoptId,
+                                      Thread::kNoDeoptId,
                                       instr->token_pos());
   instr->ReplaceUsesWith(load);
   flow_graph()->InsertAfter(instr, load, NULL, FlowGraph::kValue);
@@ -626,7 +626,7 @@
                                Definition* replacement) {
   if ((replacement->ssa_temp_index() == -1) &&
       (defn->ssa_temp_index() != -1)) {
-    replacement->set_ssa_temp_index(graph->alloc_ssa_temp_index());
+    graph->AllocateSSAIndexes(replacement);
   }
 }
 
@@ -713,7 +713,7 @@
   Definition* converted = NULL;
   if (IsUnboxedInteger(from) && IsUnboxedInteger(to)) {
     const intptr_t deopt_id = (to == kUnboxedInt32) && (deopt_target != NULL) ?
-      deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
+      deopt_target->DeoptimizationTarget() : Thread::kNoDeoptId;
     converted = new(Z) UnboxedIntConverterInstr(from,
                                                 to,
                                                 use->CopyWithType(),
@@ -724,12 +724,12 @@
              (to == kUnboxedDouble) &&
              CanConvertUnboxedMintToDouble()) {
     const intptr_t deopt_id = (deopt_target != NULL) ?
-      deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
+      deopt_target->DeoptimizationTarget() : Thread::kNoDeoptId;
     ASSERT(CanUnboxDouble());
     converted = new MintToDoubleInstr(use->CopyWithType(), deopt_id);
   } else if ((from == kTagged) && Boxing::Supports(to)) {
     const intptr_t deopt_id = (deopt_target != NULL) ?
-      deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
+      deopt_target->DeoptimizationTarget() : Thread::kNoDeoptId;
     converted = UnboxInstr::Create(to, use->CopyWithType(), deopt_id);
   } else if ((to == kTagged) && Boxing::Supports(from)) {
     converted = BoxInstr::Create(from, use->CopyWithType());
@@ -739,7 +739,7 @@
     // "from" and "to" representation. The inserted instructions will
     // trigger a deoptimization if executed. See #12417 for a discussion.
     const intptr_t deopt_id = (deopt_target != NULL) ?
-      deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
+      deopt_target->DeoptimizationTarget() : Thread::kNoDeoptId;
     ASSERT(Boxing::Supports(from));
     ASSERT(Boxing::Supports(to));
     Definition* boxed = BoxInstr::Create(from, use->CopyWithType());
@@ -838,10 +838,10 @@
   if ((kSmiBits < 32) &&
       (unboxed == kTagged) &&
       phi->Type()->IsInt() &&
-      RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt32)) {
+      RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt64)) {
     // On 32-bit platforms conservatively unbox phis that:
     //   - are proven to be of type Int;
-    //   - fit into 32bits range;
+    //   - fit into 64bits range;
     //   - have either constants or Box() operations as inputs;
     //   - have at least one Box() operation as an input;
     //   - are used in at least 1 Unbox() operation.
@@ -850,7 +850,7 @@
       Definition* input = phi->InputAt(i)->definition();
       if (input->IsBox() &&
           RangeUtils::Fits(input->range(),
-                           RangeBoundary::kRangeBoundaryInt32)) {
+                           RangeBoundary::kRangeBoundaryInt64)) {
         should_unbox = true;
       } else if (!input->IsConstant()) {
         should_unbox = false;
@@ -882,7 +882,9 @@
     }
 
     if (should_unbox) {
-      unboxed = kUnboxedInt32;
+      unboxed =
+          RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt32)
+          ? kUnboxedInt32 : kUnboxedMint;
     }
   }
 
@@ -1752,11 +1754,11 @@
                                      index,
                                      &cursor);
 
-  intptr_t deopt_id = Isolate::kNoDeoptId;
+  intptr_t deopt_id = Thread::kNoDeoptId;
   if ((array_cid == kTypedDataInt32ArrayCid) ||
       (array_cid == kTypedDataUint32ArrayCid)) {
     // Deoptimization may be needed if result does not always fit in a Smi.
-    deopt_id = (kSmiBits >= 32) ? Isolate::kNoDeoptId : call->deopt_id();
+    deopt_id = (kSmiBits >= 32) ? Thread::kNoDeoptId : call->deopt_id();
   }
 
   // Array load and return.
@@ -1770,14 +1772,14 @@
   cursor = flow_graph()->AppendTo(
       cursor,
       *last,
-      deopt_id != Isolate::kNoDeoptId ? call->env() : NULL,
+      deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
       FlowGraph::kValue);
 
   if (array_cid == kTypedDataFloat32ArrayCid) {
     *last = new(Z) FloatToDoubleInstr(new(Z) Value(*last), deopt_id);
     flow_graph()->AppendTo(cursor,
                            *last,
-                           deopt_id != Isolate::kNoDeoptId ? call->env() : NULL,
+                           deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
                            FlowGraph::kValue);
   }
   return true;
@@ -2793,7 +2795,7 @@
       new(Z) Value(index),
       Instance::ElementSizeFor(cid),
       cid,
-      Isolate::kNoDeoptId,
+      Thread::kNoDeoptId,
       call->token_pos());
 
   cursor = flow_graph()->AppendTo(cursor,
@@ -3658,11 +3660,11 @@
                                            index,
                                            &cursor);
 
-  intptr_t deopt_id = Isolate::kNoDeoptId;
+  intptr_t deopt_id = Thread::kNoDeoptId;
   if ((array_cid == kTypedDataInt32ArrayCid) ||
       (array_cid == kTypedDataUint32ArrayCid)) {
     // Deoptimization may be needed if result does not always fit in a Smi.
-    deopt_id = (kSmiBits >= 32) ? Isolate::kNoDeoptId : call->deopt_id();
+    deopt_id = (kSmiBits >= 32) ? Thread::kNoDeoptId : call->deopt_id();
   }
 
   *last = new(Z) LoadIndexedInstr(new(Z) Value(array),
@@ -3674,14 +3676,14 @@
   cursor = flow_graph()->AppendTo(
       cursor,
       *last,
-      deopt_id != Isolate::kNoDeoptId ? call->env() : NULL,
+      deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
       FlowGraph::kValue);
 
   if (view_cid == kTypedDataFloat32ArrayCid) {
     *last = new(Z) FloatToDoubleInstr(new(Z) Value(*last), deopt_id);
     flow_graph()->AppendTo(cursor,
                            *last,
-                           deopt_id != Isolate::kNoDeoptId ? call->env() : NULL,
+                           deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
                            FlowGraph::kValue);
   }
   return true;
@@ -3734,7 +3736,7 @@
       value_check = ICData::New(flow_graph_->function(),
                                 i_call->function_name(),
                                 Object::empty_array(),  // Dummy args. descr.
-                                Isolate::kNoDeoptId,
+                                Thread::kNoDeoptId,
                                 1);
       value_check.AddReceiverCheck(kSmiCid, target);
       break;
@@ -3746,7 +3748,7 @@
         value_check = ICData::New(flow_graph_->function(),
                                   i_call->function_name(),
                                   Object::empty_array(),  // Dummy args. descr.
-                                  Isolate::kNoDeoptId,
+                                  Thread::kNoDeoptId,
                                   1);
         value_check.AddReceiverCheck(kSmiCid, target);
       }
@@ -3757,7 +3759,7 @@
       value_check = ICData::New(flow_graph_->function(),
                                 i_call->function_name(),
                                 Object::empty_array(),  // Dummy args. descr.
-                                Isolate::kNoDeoptId,
+                                Thread::kNoDeoptId,
                                 1);
       value_check.AddReceiverCheck(kDoubleCid, target);
       break;
@@ -3767,7 +3769,7 @@
       value_check = ICData::New(flow_graph_->function(),
                                 i_call->function_name(),
                                 Object::empty_array(),  // Dummy args. descr.
-                                Isolate::kNoDeoptId,
+                                Thread::kNoDeoptId,
                                 1);
       value_check.AddReceiverCheck(kInt32x4Cid, target);
       break;
@@ -3777,7 +3779,7 @@
       value_check = ICData::New(flow_graph_->function(),
                                 i_call->function_name(),
                                 Object::empty_array(),  // Dummy args. descr.
-                                Isolate::kNoDeoptId,
+                                Thread::kNoDeoptId,
                                 1);
       value_check.AddReceiverCheck(kFloat32x4Cid, target);
       break;
@@ -3832,7 +3834,7 @@
 
   flow_graph()->AppendTo(cursor,
                          *last,
-                         call->deopt_id() != Isolate::kNoDeoptId ?
+                         call->deopt_id() != Thread::kNoDeoptId ?
                             call->env() : NULL,
                          FlowGraph::kEffect);
   return true;
@@ -4188,7 +4190,7 @@
             negate ? Token::kISNOT : Token::kIS,
             new(Z) Value(left),
             *results,
-            can_deopt ? call->deopt_id() : Isolate::kNoDeoptId);
+            can_deopt ? call->deopt_id() : Thread::kNoDeoptId);
         // Remove type.
         ReplaceCall(call, test_cids);
         return;
@@ -7073,7 +7075,7 @@
       replacement->AddInputUse(input);
     }
 
-    phi->set_ssa_temp_index(graph_->alloc_ssa_temp_index());
+    graph_->AllocateSSAIndexes(phi);
     phis_.Add(phi);  // Postpone phi insertion until after load forwarding.
 
     if (FLAG_trace_load_optimization) {
diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc
index 9016d1c..35a7a5d 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -1082,7 +1082,7 @@
       CheckArrayBoundInstr* precondition = new CheckArrayBoundInstr(
           new Value(max_smi),
           new Value(non_positive_symbols[i]),
-          Isolate::kNoDeoptId);
+          Thread::kNoDeoptId);
       precondition->mark_generalized();
       precondition = scheduler_.Emit(precondition, check);
       if (precondition == NULL) {
@@ -1097,7 +1097,7 @@
     CheckArrayBoundInstr* new_check = new CheckArrayBoundInstr(
           new Value(UnwrapConstraint(check->length()->definition())),
           new Value(upper_bound),
-          Isolate::kNoDeoptId);
+          Thread::kNoDeoptId);
     new_check->mark_generalized();
     if (new_check->IsRedundant(array_length)) {
       if (FLAG_trace_range_analysis) {
@@ -1138,7 +1138,7 @@
     return new BinarySmiOpInstr(op_kind,
                                 new Value(left),
                                 new Value(right),
-                                Isolate::kNoDeoptId);
+                                Thread::kNoDeoptId);
   }
 
 
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 2c53a07..2e63be3 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -23,9 +23,11 @@
 
 namespace dart {
 
-DEFINE_FLAG(int, marker_tasks, 1,
+DEFINE_FLAG(int, marker_tasks, 2,
             "The number of tasks to spawn during old gen GC marking (0 means "
             "perform all marking on main thread).");
+DEFINE_FLAG(bool, log_marker_tasks, false,
+            "Log debugging information for old gen GC marking tasks.");
 
 class DelaySet {
  private:
@@ -36,24 +38,33 @@
   DelaySet() : mutex_(new Mutex()) {}
   ~DelaySet() { delete mutex_; }
 
-  // Returns 'true' if this inserted a new key (not just added a value).
-  bool Insert(RawWeakProperty* raw_weak) {
+  // After atomically setting the watched bit on a white key (see
+  // EnsureWatchedIfWhitewhich; this means the mark bit cannot be set
+  // without observing the watched bit), this method atomically
+  // inserts raw_weak if its key is *still* white, so that any future
+  // call to VisitValuesForKey is guaranteed to include its
+  // value. Returns true on success, and false if the key is no longer white.
+  bool InsertIfWhite(RawWeakProperty* raw_weak) {
     MutexLocker ml(mutex_);
     RawObject* raw_key = raw_weak->ptr()->key_;
-    bool new_key = (delay_set_.find(raw_key) == delay_set_.end());
+    if (raw_key->IsMarked()) return false;
+    // The key was white *after* acquiring the lock. Thus any future call to
+    // VisitValuesForKey is guaranteed to include the entry inserted below.
     delay_set_.insert(std::make_pair(raw_key, raw_weak));
-    return new_key;
+    return true;
   }
 
   void ClearReferences() {
     MutexLocker ml(mutex_);
     for (Map::iterator it = delay_set_.begin(); it != delay_set_.end(); ++it) {
+      ASSERT(!it->first->IsMarked());
       WeakProperty::Clear(it->second);
     }
   }
 
-  // Visit all values with a key equal to raw_obj.
+  // Visit all values with a key equal to raw_obj, which must already be marked.
   void VisitValuesForKey(RawObject* raw_obj, ObjectPointerVisitor* visitor) {
+    ASSERT(raw_obj->IsMarked());
     // Extract the range into a temporary vector to iterate over it
     // while delay_set_ may be modified.
     std::vector<MapEntry> temp_copy;
@@ -140,9 +151,62 @@
 };
 
 
-class MarkingVisitor : public ObjectPointerVisitor {
+class MarkerWorkList : public ValueObject {
  public:
-  MarkingVisitor(Isolate* isolate,
+  explicit MarkerWorkList(MarkingStack* marking_stack)
+      : marking_stack_(marking_stack) {
+    work_ = marking_stack_->PopEmptyBlock();
+  }
+
+  ~MarkerWorkList() {
+    ASSERT(work_ == NULL);
+    ASSERT(marking_stack_ == NULL);
+  }
+
+  // Returns NULL if no more work was found.
+  RawObject* Pop() {
+    ASSERT(work_ != NULL);
+    if (work_->IsEmpty()) {
+      // TODO(koda): Track over/underflow events and use in heuristics to
+      // distribute work and prevent degenerate flip-flopping.
+      MarkingStack::Block* new_work = marking_stack_->PopNonEmptyBlock();
+      if (new_work == NULL) {
+        return NULL;
+      }
+      marking_stack_->PushBlock(work_);
+      work_ = new_work;
+    }
+    return work_->Pop();
+  }
+
+  void Push(RawObject* raw_obj) {
+    if (work_->IsFull()) {
+      // TODO(koda): Track over/underflow events and use in heuristics to
+      // distribute work and prevent degenerate flip-flopping.
+      marking_stack_->PushBlock(work_);
+      work_ = marking_stack_->PopEmptyBlock();
+    }
+    work_->Push(raw_obj);
+  }
+
+  void Finalize() {
+    ASSERT(work_->IsEmpty());
+    marking_stack_->PushBlock(work_);
+    work_ = NULL;
+    // Fail fast on attempts to mark after finalizing.
+    marking_stack_ = NULL;
+  }
+
+ private:
+  MarkingStack::Block* work_;
+  MarkingStack* marking_stack_;
+};
+
+
+template<bool sync>
+class MarkingVisitorBase : public ObjectPointerVisitor {
+ public:
+  MarkingVisitorBase(Isolate* isolate,
                  Heap* heap,
                  PageSpace* page_space,
                  MarkingStack* marking_stack,
@@ -190,9 +254,6 @@
     do {
       VisitingOldObject(raw_obj);
       const intptr_t class_id = raw_obj->GetClassId();
-      // Currently, classes are considered roots (see issue 18284), so at this
-      // point, they should all be marked.
-      ASSERT(isolate()->class_table()->At(class_id)->IsMarked());
       if (class_id != kWeakPropertyCid) {
         marked_bytes_ += raw_obj->VisitPointers(this);
       } else {
@@ -221,32 +282,35 @@
     skipped_code_functions_->Add(func);
   }
 
-  // Returns the mark bit. Sets the watch bit if unmarked. (The prior value of
-  // the watched bit is returned in 'watched_before' for validation purposes.)
-  // TODO(koda): When synchronizing header bits, this goes in a single CAS loop.
-  static bool EnsureWatchedIfWhite(RawObject* obj, bool* watched_before) {
-    if (obj->IsMarked()) {
-      return false;
+  // If unmarked, sets the watch bit and returns true.
+  // If marked, does nothing and returns false.
+  static bool EnsureWatchedIfWhite(RawObject* obj) {
+    if (!sync) {
+      if (obj->IsMarked()) return false;
+      if (!obj->IsWatched()) obj->SetWatchedBitUnsynchronized();
+      return true;
     }
-    if (!obj->IsWatched()) {
-      *watched_before = false;
-      obj->SetWatchedBitUnsynchronized();
-    } else {
-      *watched_before = true;
-    }
+    uword tags = obj->ptr()->tags_;
+    uword old_tags;
+    do {
+      old_tags = tags;
+      if (RawObject::MarkBit::decode(tags)) return false;
+      if (RawObject::WatchedBit::decode(tags)) return true;
+      uword new_tags = RawObject::WatchedBit::update(true, old_tags);
+      tags = AtomicOperations::CompareAndSwapWord(
+          &obj->ptr()->tags_, old_tags, new_tags);
+    } while (tags != old_tags);
     return true;
   }
 
   void ProcessWeakProperty(RawWeakProperty* raw_weak) {
     // The fate of the weak property is determined by its key.
     RawObject* raw_key = raw_weak->ptr()->key_;
-    bool watched_before = false;
     if (raw_key->IsHeapObject() &&
         raw_key->IsOldObject() &&
-        EnsureWatchedIfWhite(raw_key, &watched_before)) {
-      // Key is white.  Delay the weak property.
-      bool new_key = delay_set_->Insert(raw_weak);
-      ASSERT(new_key == !watched_before);
+        EnsureWatchedIfWhite(raw_key) &&
+        delay_set_->InsertIfWhite(raw_weak)) {
+      // Key was white.  Delayed the weak property.
     } else {
       // Key is gray or black.  Make the weak property black.
       raw_weak->VisitPointers(this);
@@ -267,67 +331,18 @@
   }
 
  private:
-  class WorkList : public ValueObject {
-   public:
-    explicit WorkList(MarkingStack* marking_stack)
-        : marking_stack_(marking_stack) {
-      work_ = marking_stack_->PopEmptyBlock();
-    }
-
-    ~WorkList() {
-      ASSERT(work_ == NULL);
-      ASSERT(marking_stack_ == NULL);
-    }
-
-    // Returns NULL if no more work was found.
-    RawObject* Pop() {
-      ASSERT(work_ != NULL);
-      if (work_->IsEmpty()) {
-        // TODO(koda): Track over/underflow events and use in heuristics to
-        // distribute work and prevent degenerate flip-flopping.
-        MarkingStack::Block* new_work = marking_stack_->PopNonEmptyBlock();
-        if (new_work == NULL) {
-          return NULL;
-        }
-        marking_stack_->PushBlock(work_);
-        work_ = new_work;
-      }
-      return work_->Pop();
-    }
-
-    void Push(RawObject* raw_obj) {
-      if (work_->IsFull()) {
-        // TODO(koda): Track over/underflow events and use in heuristics to
-        // distribute work and prevent degenerate flip-flopping.
-        marking_stack_->PushBlock(work_);
-        work_ = marking_stack_->PopEmptyBlock();
-      }
-      work_->Push(raw_obj);
-    }
-
-    void Finalize() {
-      ASSERT(work_->IsEmpty());
-      marking_stack_->PushBlock(work_);
-      work_ = NULL;
-      // Fail fast on attempts to mark after finalizing.
-      marking_stack_ = NULL;
-    }
-
-   private:
-    MarkingStack::Block* work_;
-    MarkingStack* marking_stack_;
-  };
-
-  void MarkAndPush(RawObject* raw_obj) {
+  void PushMarked(RawObject* raw_obj) {
     ASSERT(raw_obj->IsHeapObject());
     ASSERT((FLAG_verify_before_gc || FLAG_verify_before_gc) ?
            page_space_->Contains(RawObject::ToAddr(raw_obj)) :
            true);
 
-    // Mark the object and push it on the marking stack.
-    ASSERT(!raw_obj->IsMarked());
+    // Push the marked object on the marking stack.
+    ASSERT(raw_obj->IsMarked());
     const bool is_watched = raw_obj->IsWatched();
-    raw_obj->SetMarkBitUnsynchronized();
+    // We acquired the mark bit => no other task is modifying the header.
+    // TODO(koda): For concurrent mutator, this needs synchronization. Consider
+    // clearing these bits already in the CAS for the mark bit.
     raw_obj->ClearRememberedBitUnsynchronized();
     raw_obj->ClearWatchedBitUnsynchronized();
     if (is_watched) {
@@ -336,6 +351,15 @@
     work_list_.Push(raw_obj);
   }
 
+  static bool TryAcquireMarkBit(RawObject* raw_obj) {
+    if (!sync) {
+      if (raw_obj->IsMarked()) return false;
+      raw_obj->SetMarkBitUnsynchronized();
+      return true;
+    }
+    return raw_obj->TryAcquireMarkBit();
+  }
+
   void MarkObject(RawObject* raw_obj, RawObject** p) {
     // Fast exit if the raw object is a Smi.
     if (!raw_obj->IsHeapObject()) {
@@ -347,15 +371,19 @@
       return;
     }
 
-    // Skip over new objects, but verify consistency of heap while at it.
+    // TODO(koda): Investigate performance impact of alternative branching:
+    // if (smi or new) <-- can be done as single compare + conditional jump
+    //   if (smi) return;
+    //   else ...
+    // if (marked) return;
+    // ...
     if (raw_obj->IsNewObject()) {
-      // TODO(iposva): Add consistency check.
-      if ((visiting_old_object_ != NULL) &&
-          !visiting_old_object_->IsRemembered()) {
-        ASSERT(p != NULL);
-        visiting_old_object_->SetRememberedBitUnsynchronized();
-        thread_->StoreBufferAddObjectGC(visiting_old_object_);
-      }
+      ProcessNewSpaceObject(raw_obj, p);
+      return;
+    }
+
+    if (!TryAcquireMarkBit(raw_obj)) {
+      // Already marked.
       return;
     }
     if (RawObject::IsVariableSizeClassId(raw_obj->GetClassId())) {
@@ -364,7 +392,32 @@
       UpdateLiveOld(raw_obj->GetClassId(), 0);
     }
 
-    MarkAndPush(raw_obj);
+    PushMarked(raw_obj);
+  }
+
+  static bool TryAcquireRememberedBit(RawObject* raw_obj) {
+    if (!sync) {
+      if (raw_obj->IsRemembered()) return false;
+      raw_obj->SetRememberedBitUnsynchronized();
+      return true;
+    }
+    return raw_obj->TryAcquireRememberedBit();
+  }
+
+  void ProcessNewSpaceObject(RawObject* raw_obj, RawObject** p) {
+    // TODO(iposva): Add consistency check.
+    if ((visiting_old_object_ != NULL) &&
+        TryAcquireRememberedBit(visiting_old_object_)) {
+      // NOTE: We pass in the pointer to the address we are visiting
+      // allows us to get a distance from the object start. At some
+      // point we might want to store exact addresses in store buffers
+      // for locations far enough from the header, so that we do not
+      // need to walk big objects only to find the single new
+      // reference in the last word during scavenge. This doesn't seem
+      // to be a problem though currently.
+      ASSERT(p != NULL);
+      thread_->StoreBufferAddObjectGC(visiting_old_object_);
+    }
   }
 
   void UpdateLiveOld(intptr_t class_id, intptr_t size) {
@@ -380,16 +433,20 @@
   GrowableArray<intptr_t> class_stats_count_;
   GrowableArray<intptr_t> class_stats_size_;
   PageSpace* page_space_;
-  WorkList work_list_;
+  MarkerWorkList work_list_;
   DelaySet* delay_set_;
   RawObject* visiting_old_object_;
   SkippedCodeFunctions* skipped_code_functions_;
   uintptr_t marked_bytes_;
 
-  DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitor);
+  DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitorBase);
 };
 
 
+typedef MarkingVisitorBase<false> UnsyncMarkingVisitor;
+typedef MarkingVisitorBase<true> SyncMarkingVisitor;
+
+
 static bool IsUnreachable(const RawObject* raw_obj) {
   if (!raw_obj->IsHeapObject()) {
     return false;
@@ -406,7 +463,7 @@
 
 class MarkingWeakVisitor : public HandleVisitor {
  public:
-  MarkingWeakVisitor() : HandleVisitor(Isolate::Current()) {
+  MarkingWeakVisitor() : HandleVisitor(Thread::Current()) {
   }
 
   void VisitHandle(uword addr) {
@@ -414,7 +471,7 @@
         reinterpret_cast<FinalizablePersistentHandle*>(addr);
     RawObject* raw_obj = handle->raw();
     if (IsUnreachable(raw_obj)) {
-      handle->UpdateUnreachable(isolate());
+      handle->UpdateUnreachable(thread()->isolate());
     }
   }
 
@@ -442,11 +499,20 @@
 
 void GCMarker::IterateRoots(Isolate* isolate,
                             ObjectPointerVisitor* visitor,
-                            bool visit_prologue_weak_persistent_handles) {
-  isolate->VisitObjectPointers(visitor,
-                               visit_prologue_weak_persistent_handles,
-                               StackFrameIterator::kDontValidateFrames);
-  heap_->new_space()->VisitObjectPointers(visitor);
+                            bool visit_prologue_weak_persistent_handles,
+                            intptr_t slice_index, intptr_t num_slices) {
+  ASSERT(0 <= slice_index && slice_index < num_slices);
+  if ((slice_index == 0) || (num_slices <= 1)) {
+    isolate->VisitObjectPointers(visitor,
+                                 visit_prologue_weak_persistent_handles,
+                                 StackFrameIterator::kDontValidateFrames);
+  }
+  if ((slice_index == 1) || (num_slices <= 1)) {
+    heap_->new_space()->VisitObjectPointers(visitor);
+  }
+
+  // For now, we just distinguish two parts of the root set, so any remaining
+  // slices are empty.
 }
 
 
@@ -460,8 +526,9 @@
 }
 
 
+template<class MarkingVisitorType>
 void GCMarker::IterateWeakReferences(Isolate* isolate,
-                                     MarkingVisitor* visitor) {
+                                     MarkingVisitorType* visitor) {
   ApiState* state = isolate->api_state();
   ASSERT(state != NULL);
   while (true) {
@@ -576,7 +643,10 @@
            DelaySet* delay_set,
            ThreadBarrier* barrier,
            bool collect_code,
-           bool visit_prologue_weak_persistent_handles)
+           bool visit_prologue_weak_persistent_handles,
+           intptr_t task_index,
+           intptr_t num_tasks,
+           uintptr_t* num_busy)
       : marker_(marker),
         isolate_(isolate),
         heap_(heap),
@@ -586,7 +656,10 @@
         barrier_(barrier),
         collect_code_(collect_code),
         visit_prologue_weak_persistent_handles_(
-            visit_prologue_weak_persistent_handles) {
+            visit_prologue_weak_persistent_handles),
+        task_index_(task_index),
+        num_tasks_(num_tasks),
+        num_busy_(num_busy) {
   }
 
   virtual void Run() {
@@ -596,20 +669,47 @@
       Zone* zone = stack_zone.GetZone();
       SkippedCodeFunctions* skipped_code_functions =
           collect_code_ ? new(zone) SkippedCodeFunctions() : NULL;
-      MarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_,
-                             delay_set_, skipped_code_functions);
-      // Phase 1: Populate and drain marking stack in task.
-      // TODO(koda): Split root iteration work among multiple tasks.
+      SyncMarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_,
+                                 delay_set_, skipped_code_functions);
+      // Phase 1: Iterate over roots and drain marking stack in tasks.
       marker_->IterateRoots(isolate_, &visitor,
-                            visit_prologue_weak_persistent_handles_);
-      visitor.DrainMarkingStack();
+                            visit_prologue_weak_persistent_handles_,
+                            task_index_, num_tasks_);
+      do {
+        visitor.DrainMarkingStack();
+
+        // I can't find more work right now. If no other task is busy,
+        // then there will never be more work (NB: 1 is *before* decrement).
+        if (AtomicOperations::FetchAndDecrement(num_busy_) == 1) break;
+
+        // Wait for some work to appear.
+        // TODO(iposva): Replace busy-waiting with a solution using Monitor,
+        // and redraw the boundaries between stack/visitor/task as needed.
+        while (marking_stack_->IsEmpty() &&
+               AtomicOperations::LoadRelaxed(num_busy_) > 0) {
+        }
+
+        // If no tasks are busy, there will never be more work.
+        if (AtomicOperations::LoadRelaxed(num_busy_) == 0) break;
+
+        // I saw some work; get busy and compete for it.
+        AtomicOperations::FetchAndIncrement(num_busy_);
+      } while (true);
+      ASSERT(AtomicOperations::LoadRelaxed(num_busy_) == 0);
       barrier_->Sync();
+
       // Phase 2: Weak processing and follow-up marking on main thread.
       barrier_->Sync();
+
       // Phase 3: Finalize results from all markers (detach code, etc.).
+      if (FLAG_log_marker_tasks) {
+        THR_Print("Task %" Pd " marked %" Pd " bytes.\n",
+                  task_index_, visitor.marked_bytes());
+      }
       marker_->FinalizeResultsFrom(&visitor);
     }
     Thread::ExitIsolateAsHelper(true);
+
     // This task is done. Notify the original thread.
     barrier_->Exit();
   }
@@ -624,12 +724,16 @@
   ThreadBarrier* barrier_;
   bool collect_code_;
   bool visit_prologue_weak_persistent_handles_;
+  const intptr_t task_index_;
+  const intptr_t num_tasks_;
+  uintptr_t* num_busy_;
 
   DISALLOW_COPY_AND_ASSIGN(MarkTask);
 };
 
 
-void GCMarker::FinalizeResultsFrom(MarkingVisitor* visitor) {
+template<class MarkingVisitorType>
+void GCMarker::FinalizeResultsFrom(MarkingVisitorType* visitor) {
   {
     MutexLocker ml(&stats_mutex_);
     marked_bytes_ += visitor->marked_bytes();
@@ -667,9 +771,10 @@
       // Mark everything on main thread.
       SkippedCodeFunctions* skipped_code_functions =
           collect_code ? new(zone) SkippedCodeFunctions() : NULL;
-      MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
-                          &delay_set, skipped_code_functions);
-      IterateRoots(isolate, &mark, visit_prologue_weak_persistent_handles);
+      UnsyncMarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
+                                &delay_set, skipped_code_functions);
+      IterateRoots(isolate, &mark, visit_prologue_weak_persistent_handles,
+                   0, 1);
       mark.DrainMarkingStack();
       IterateWeakReferences(isolate, &mark);
       MarkingWeakVisitor mark_weak;
@@ -678,32 +783,37 @@
       // All marking done; detach code, etc.
       FinalizeResultsFrom(&mark);
     } else {
-      if (num_tasks > 1) {
-        // TODO(koda): Support multiple:
-        // 1. non-concurrent tasks, after splitting root iteration work, then
-        // 2. concurrent tasks, after synchronizing headers.
-        FATAL("Multiple marking tasks not yet supported");
+      ThreadBarrier barrier(num_tasks + 1);
+      // Used to coordinate draining among tasks; all start out as 'busy'.
+      uintptr_t num_busy = num_tasks;
+      // Phase 1: Iterate over roots and drain marking stack in tasks.
+      for (intptr_t i = 0; i < num_tasks; ++i) {
+        MarkTask* mark_task =
+            new MarkTask(this, isolate, heap_, page_space, &marking_stack,
+                         &delay_set, &barrier, collect_code,
+                         visit_prologue_weak_persistent_handles,
+                         i, num_tasks, &num_busy);
+        ThreadPool* pool = Dart::thread_pool();
+        pool->Run(mark_task);
       }
-      ThreadBarrier barrier(num_tasks + 1);  // +1 for the main thread.
-      // Phase 1: Populate and drain marking stack in task.
-      MarkTask* mark_task =
-          new MarkTask(this, isolate, heap_, page_space, &marking_stack,
-                       &delay_set, &barrier, collect_code,
-                       visit_prologue_weak_persistent_handles);
-      ThreadPool* pool = Dart::thread_pool();
-      pool->Run(mark_task);
       barrier.Sync();
+
       // Phase 2: Weak processing and follow-up marking on main thread.
       SkippedCodeFunctions* skipped_code_functions =
           collect_code ? new(zone) SkippedCodeFunctions() : NULL;
-      MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
-                          &delay_set, skipped_code_functions);
+      SyncMarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
+                              &delay_set, skipped_code_functions);
       IterateWeakReferences(isolate, &mark);
       MarkingWeakVisitor mark_weak;
       IterateWeakRoots(isolate, &mark_weak,
                        !visit_prologue_weak_persistent_handles);
       barrier.Sync();
+
       // Phase 3: Finalize results from all markers (detach code, etc.).
+      if (FLAG_log_marker_tasks) {
+        THR_Print("Main thread marked %" Pd " bytes.\n",
+                  mark.marked_bytes());
+      }
       FinalizeResultsFrom(&mark);
       barrier.Exit();
     }
diff --git a/runtime/vm/gc_marker.h b/runtime/vm/gc_marker.h
index e2f8293..93b209a 100644
--- a/runtime/vm/gc_marker.h
+++ b/runtime/vm/gc_marker.h
@@ -14,7 +14,6 @@
 class HandleVisitor;
 class Heap;
 class Isolate;
-class MarkingVisitor;
 class ObjectPointerVisitor;
 class PageSpace;
 class RawWeakProperty;
@@ -39,16 +38,19 @@
   void Epilogue(Isolate* isolate, bool invoke_api_callbacks);
   void IterateRoots(Isolate* isolate,
                     ObjectPointerVisitor* visitor,
-                    bool visit_prologue_weak_persistent_handles);
+                    bool visit_prologue_weak_persistent_handles,
+                    intptr_t slice_index, intptr_t num_slices);
   void IterateWeakRoots(Isolate* isolate,
                         HandleVisitor* visitor,
                         bool visit_prologue_weak_persistent_handles);
-  void IterateWeakReferences(Isolate* isolate, MarkingVisitor* visitor);
+  template<class MarkingVisitorType>
+  void IterateWeakReferences(Isolate* isolate, MarkingVisitorType* visitor);
   void ProcessWeakTables(PageSpace* page_space);
   void ProcessObjectIdTable(Isolate* isolate);
 
   // Called by anyone: finalize and accumulate stats from 'visitor'.
-  void FinalizeResultsFrom(MarkingVisitor* visitor);
+  template<class MarkingVisitorType>
+  void FinalizeResultsFrom(MarkingVisitorType* visitor);
 
   Heap* heap_;
 
diff --git a/runtime/vm/handles.h b/runtime/vm/handles.h
index 343d139..c5bcac7 100644
--- a/runtime/vm/handles.h
+++ b/runtime/vm/handles.h
@@ -58,21 +58,22 @@
 
 // Forward declarations.
 class ObjectPointerVisitor;
+class Thread;
 
 DECLARE_FLAG(bool, verify_handles);
 DECLARE_DEBUG_FLAG(bool, trace_handles);
 
 class HandleVisitor {
  public:
-  explicit HandleVisitor(Isolate* isolate) : isolate_(isolate) {}
+  explicit HandleVisitor(Thread* thread) : thread_(thread) {}
   virtual ~HandleVisitor() {}
 
-  Isolate* isolate() const { return isolate_; }
+  Thread* thread() const { return thread_; }
 
   virtual void VisitHandle(uword addr) = 0;
 
  private:
-  Isolate* isolate_;
+  Thread* thread_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(HandleVisitor);
 };
@@ -238,7 +239,7 @@
   friend class HandleScope;
   friend class Dart;
   friend class ObjectStore;
-  friend class Isolate;
+  friend class Thread;
   DISALLOW_ALLOCATION();
   DISALLOW_COPY_AND_ASSIGN(Handles);
 };
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 670c868..2b319fd 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -647,8 +647,20 @@
 
 
 int64_t Heap::HashCount() const {
-  return
-      new_weak_tables_[kHashes]->count() + old_weak_tables_[kHashes]->count();
+  return new_weak_tables_[kHashes]->count() +
+      old_weak_tables_[kHashes]->count();
+}
+
+
+int64_t Heap::ObjectIdCount() const {
+  return new_weak_tables_[kObjectIds]->count() +
+      old_weak_tables_[kObjectIds]->count();
+}
+
+
+void Heap::ResetObjectIdTable() {
+  new_weak_tables_[kObjectIds]->Reset();
+  old_weak_tables_[kObjectIds]->Reset();
 }
 
 
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 4639c26..22a109e 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -42,6 +42,7 @@
   enum WeakSelector {
     kPeers = 0,
     kHashes,
+    kObjectIds,
     kNumWeakSelectors
   };
 
@@ -189,6 +190,17 @@
   }
   int64_t HashCount() const;
 
+  // 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) {
+    SetWeakEntry(raw_obj, kObjectIds, object_id);
+  }
+  intptr_t GetObjectId(RawObject* raw_obj) const {
+    return GetWeakEntry(raw_obj, kObjectIds);
+  }
+  int64_t ObjectIdCount() const;
+  void ResetObjectIdTable();
+
   // Used by the GC algorithms to propagate weak entries.
   intptr_t GetWeakEntry(RawObject* raw_obj, WeakSelector sel) const;
   void SetWeakEntry(RawObject* raw_obj, WeakSelector sel, intptr_t val);
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc
index 47cfafe..e609901 100644
--- a/runtime/vm/heap_test.cc
+++ b/runtime/vm/heap_test.cc
@@ -12,6 +12,8 @@
 
 namespace dart {
 
+DECLARE_FLAG(int, marker_tasks);
+
 TEST_CASE(OldGC) {
   const char* kScriptChars =
   "main() {\n"
@@ -30,6 +32,25 @@
 }
 
 
+TEST_CASE(OldGC_Unsync) {
+  FLAG_marker_tasks = 0;
+  const char* kScriptChars =
+  "main() {\n"
+  "  return [1, 2, 3];\n"
+  "}\n";
+  FLAG_verbose_gc = true;
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+
+  EXPECT_VALID(result);
+  EXPECT(!Dart_IsNull(result));
+  EXPECT(Dart_IsList(result));
+  Isolate* isolate = Isolate::Current();
+  Heap* heap = isolate->heap();
+  heap->CollectGarbage(Heap::kOld);
+}
+
+
 TEST_CASE(LargeSweep) {
   const char* kScriptChars =
   "main() {\n"
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 1387730..30c4a6f 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -257,7 +257,7 @@
 
 
 void Instruction::PrintTo(BufferFormatter* f) const {
-  if (GetDeoptId() != Isolate::kNoDeoptId) {
+  if (GetDeoptId() != Thread::kNoDeoptId) {
     f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
   } else {
     f->Print("%s(", DebugName());
@@ -278,7 +278,7 @@
 void Definition::PrintTo(BufferFormatter* f) const {
   PrintUse(f, *this);
   if (HasSSATemp() || HasTemp()) f->Print(" <- ");
-  if (GetDeoptId() != Isolate::kNoDeoptId) {
+  if (GetDeoptId() != Thread::kNoDeoptId) {
     f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
   } else {
     f->Print("%s(", DebugName());
@@ -1050,7 +1050,12 @@
 
 
 void PhiInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("v%" Pd " <- phi(", ssa_temp_index());
+  if (HasPairRepresentation()) {
+    f->Print("(v%" Pd ", v%" Pd ") <- phi(",
+             ssa_temp_index(), ssa_temp_index() + 1);
+  } else {
+    f->Print("v%" Pd " <- phi(", ssa_temp_index());
+  }
   for (intptr_t i = 0; i < inputs_.length(); ++i) {
     if (inputs_[i] != NULL) inputs_[i]->PrintTo(f);
     if (i < inputs_.length() - 1) f->Print(", ");
@@ -1150,7 +1155,7 @@
     parallel_move()->PrintTo(f);
     f->Print(" ");
   }
-  if (GetDeoptId() != Isolate::kNoDeoptId) {
+  if (GetDeoptId() != Thread::kNoDeoptId) {
     f->Print("goto:%" Pd " B%" Pd "", GetDeoptId(), successor()->block_id());
   } else {
     f->Print("goto: B%" Pd "", successor()->block_id());
@@ -1159,7 +1164,7 @@
 
 
 void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
-  if (GetDeoptId() != Isolate::kNoDeoptId) {
+  if (GetDeoptId() != Thread::kNoDeoptId) {
     f->Print("igoto:%" Pd "(", GetDeoptId());
   } else {
     f->Print("igoto:(");
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index e2d1ad8..2389dfc 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -84,7 +84,7 @@
     const ZoneGrowableArray<const ICData*>& ic_data_array) const {
   // The deopt_id can be outside the range of the IC data array for
   // computations added in the optimizing compiler.
-  ASSERT(deopt_id_ != Isolate::kNoDeoptId);
+  ASSERT(deopt_id_ != Thread::kNoDeoptId);
   if (deopt_id_ < ic_data_array.length()) {
     return ic_data_array[deopt_id_];
   }
@@ -798,7 +798,7 @@
                                           Definition* call,
                                           Definition* result) {
   ASSERT(call->env() != NULL);
-  deopt_id_ = Isolate::ToDeoptAfter(call->deopt_id_);
+  deopt_id_ = Thread::ToDeoptAfter(call->deopt_id_);
   call->env()->DeepCopyAfterTo(flow_graph->zone(),
                                this,
                                call->ArgumentCount(),
@@ -2202,7 +2202,7 @@
           representation(),
           box_defn->value()->CopyWithType(),
           (representation() == kUnboxedInt32) ?
-              GetDeoptId() : Isolate::kNoDeoptId);
+              GetDeoptId() : Thread::kNoDeoptId);
       // TODO(vegorov): marking resulting converter as truncating when
       // unboxing can't deoptimize is a workaround for the missing
       // deoptimization environment when we insert converter after
@@ -2265,7 +2265,7 @@
         box_defn->from(),
         representation(),
         box_defn->value()->CopyWithType(),
-        (to() == kUnboxedInt32) ? GetDeoptId() : Isolate::kNoDeoptId);
+        (to() == kUnboxedInt32) ? GetDeoptId() : Thread::kNoDeoptId);
     if ((representation() == kUnboxedInt32) && is_truncating()) {
       converter->mark_truncating();
     }
@@ -2944,7 +2944,7 @@
                       kind,
                       left,
                       right,
-                      Isolate::Current()->GetNextDeoptId()),
+                      Thread::Current()->GetNextDeoptId()),
       needs_number_check_(needs_number_check) {
   ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT));
 }
@@ -3172,7 +3172,7 @@
   Environment* env =
       new(zone) Environment(definitions.length(),
                                fixed_parameter_count,
-                               Isolate::kNoDeoptId,
+                               Thread::kNoDeoptId,
                                parsed_function,
                                NULL);
   for (intptr_t i = 0; i < definitions.length(); ++i) {
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 68a8800..7f01ecc 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -608,7 +608,7 @@
   };
 #undef DECLARE_TAG
 
-  explicit Instruction(intptr_t deopt_id = Isolate::kNoDeoptId)
+  explicit Instruction(intptr_t deopt_id = Thread::kNoDeoptId)
       : deopt_id_(deopt_id),
         lifetime_position_(kNoPlaceId),
         previous_(NULL),
@@ -772,7 +772,7 @@
   // to.
   virtual intptr_t DeoptimizationTarget() const {
     UNREACHABLE();
-    return Isolate::kNoDeoptId;
+    return Thread::kNoDeoptId;
   }
 
   // Returns a replacement for the instruction or NULL if the instruction can
@@ -945,7 +945,7 @@
          template<typename Default, typename Pure> class CSETrait = NoCSE>
 class TemplateInstruction: public CSETrait<Instruction, PureInstruction>::Base {
  public:
-  explicit TemplateInstruction(intptr_t deopt_id = Isolate::kNoDeoptId)
+  explicit TemplateInstruction(intptr_t deopt_id = Thread::kNoDeoptId)
       : CSETrait<Instruction, PureInstruction>::Base(deopt_id), inputs_() { }
 
   virtual intptr_t InputCount() const { return N; }
@@ -1205,7 +1205,7 @@
 
  protected:
   BlockEntryInstr(intptr_t block_id, intptr_t try_index)
-      : Instruction(Isolate::Current()->GetNextDeoptId()),
+      : Instruction(Thread::Current()->GetNextDeoptId()),
         block_id_(block_id),
         try_index_(try_index),
         preorder_number_(-1),
@@ -1331,7 +1331,7 @@
   }
   ConstantInstr* constant_null();
 
-  bool IsCompiledForOsr() const { return osr_id_ != Isolate::kNoDeoptId; }
+  bool IsCompiledForOsr() const { return osr_id_ != Thread::kNoDeoptId; }
 
   intptr_t entry_count() const { return entry_count_; }
   void set_entry_count(intptr_t count) { entry_count_ = count; }
@@ -1639,7 +1639,7 @@
 // Abstract super-class of all instructions that define a value (Bind, Phi).
 class Definition : public Instruction {
  public:
-  explicit Definition(intptr_t deopt_id = Isolate::kNoDeoptId);
+  explicit Definition(intptr_t deopt_id = Thread::kNoDeoptId);
 
   // Overridden by definitions that have call counts.
   virtual intptr_t CallCount() const {
@@ -1842,7 +1842,7 @@
          template<typename Impure, typename Pure> class CSETrait = NoCSE>
 class TemplateDefinition : public CSETrait<Definition, PureDefinition>::Base {
  public:
-  explicit TemplateDefinition(intptr_t deopt_id = Isolate::kNoDeoptId)
+  explicit TemplateDefinition(intptr_t deopt_id = Thread::kNoDeoptId)
       : CSETrait<Definition, PureDefinition>::Base(deopt_id), inputs_() { }
 
   virtual intptr_t InputCount() const { return N; }
@@ -2049,7 +2049,7 @@
 class ReturnInstr : public TemplateInstruction<1, NoThrow> {
  public:
   ReturnInstr(intptr_t token_pos, Value* value)
-      : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+      : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos) {
     SetInputAt(0, value);
   }
@@ -2079,7 +2079,7 @@
 class ThrowInstr : public TemplateInstruction<0, Throws> {
  public:
   explicit ThrowInstr(intptr_t token_pos)
-      : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+      : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos) {
   }
 
@@ -2105,7 +2105,7 @@
   // 'catch_try_index' can be CatchClauseNode::kInvalidTryIndex if the
   // rethrow has been artifically generated by the parser.
   ReThrowInstr(intptr_t token_pos, intptr_t catch_try_index)
-      : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+      : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         catch_try_index_(catch_try_index) {
   }
@@ -2158,7 +2158,7 @@
 class GotoInstr : public TemplateInstruction<0, NoThrow> {
  public:
   explicit GotoInstr(JoinEntryInstr* entry)
-    : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+    : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
       block_(NULL),
       successor_(entry),
       edge_weight_(0.0),
@@ -2322,7 +2322,7 @@
                   Token::Kind kind,
                   Value* left,
                   Value* right,
-                  intptr_t deopt_id = Isolate::kNoDeoptId)
+                  intptr_t deopt_id = Thread::kNoDeoptId)
       : TemplateDefinition(deopt_id),
         token_pos_(token_pos),
         kind_(kind),
@@ -2345,7 +2345,7 @@
 class BranchInstr : public Instruction {
  public:
   explicit BranchInstr(ComparisonInstr* comparison)
-      : Instruction(Isolate::Current()->GetNextDeoptId()),
+      : Instruction(Thread::Current()->GetNextDeoptId()),
         comparison_(comparison),
         is_checked_(false),
         constrained_type_(NULL),
@@ -2653,7 +2653,7 @@
 class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> {
  public:
   AssertBooleanInstr(intptr_t token_pos, Value* value)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos) {
     SetInputAt(0, value);
   }
@@ -2684,7 +2684,7 @@
 class CurrentContextInstr : public TemplateDefinition<0, NoThrow> {
  public:
   CurrentContextInstr()
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()) {
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()) {
   }
 
   DECLARE_INSTRUCTION(CurrentContext)
@@ -2706,7 +2706,7 @@
   ClosureCallInstr(Value* function,
                    ClosureCallNode* node,
                    ZoneGrowableArray<PushArgumentInstr*>* arguments)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         ast_node_(*node),
         arguments_(arguments) {
     SetInputAt(0, function);
@@ -2748,7 +2748,7 @@
                     const Array& argument_names,
                     intptr_t checked_argument_count,
                     const ZoneGrowableArray<const ICData*>& ic_data_array)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         ic_data_(NULL),
         token_pos_(token_pos),
         function_name_(function_name),
@@ -2972,7 +2972,7 @@
   virtual CompileType ComputeType() const;
 
   virtual bool CanDeoptimize() const {
-    return GetDeoptId() != Isolate::kNoDeoptId;
+    return GetDeoptId() != Thread::kNoDeoptId;
   }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
@@ -3084,7 +3084,7 @@
   IfThenElseInstr(ComparisonInstr* comparison,
                   Value* if_true,
                   Value* if_false)
-      : Definition(Isolate::Current()->GetNextDeoptId()),
+      : Definition(Thread::Current()->GetNextDeoptId()),
         comparison_(comparison),
         if_true_(Smi::Cast(if_true->BoundConstant()).Value()),
         if_false_(Smi::Cast(if_false->BoundConstant()).Value()) {
@@ -3165,7 +3165,7 @@
                   const Array& argument_names,
                   ZoneGrowableArray<PushArgumentInstr*>* arguments,
                   const ZoneGrowableArray<const ICData*>& ic_data_array)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         ic_data_(NULL),
         token_pos_(token_pos),
         function_(function),
@@ -3740,7 +3740,7 @@
   intptr_t class_id() const { return class_id_; }
 
   virtual bool CanDeoptimize() const {
-    return GetDeoptId() != Isolate::kNoDeoptId;
+    return GetDeoptId() != Thread::kNoDeoptId;
   }
 
   virtual Representation representation() const;
@@ -3883,7 +3883,7 @@
 class StringInterpolateInstr : public TemplateDefinition<1, Throws> {
  public:
   StringInterpolateInstr(Value* value, intptr_t token_pos)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         function_(Function::ZoneHandle()) {
     SetInputAt(0, value);
@@ -4250,7 +4250,7 @@
   CreateArrayInstr(intptr_t token_pos,
                    Value* element_type,
                    Value* num_elements)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         identity_(AliasIdentity::Unknown())  {
     SetInputAt(kElementTypePos, element_type);
@@ -4453,7 +4453,7 @@
                        const AbstractType& type,
                        const Class& instantiator_class,
                        Value* instantiator)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         type_(type),
         instantiator_class_(instantiator_class) {
@@ -4490,7 +4490,7 @@
                                 const TypeArguments& type_arguments,
                                 const Class& instantiator_class,
                                 Value* instantiator)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         type_arguments_(type_arguments),
         instantiator_class_(instantiator_class) {
@@ -4554,7 +4554,7 @@
 class InitStaticFieldInstr : public TemplateInstruction<1, Throws> {
  public:
   InitStaticFieldInstr(Value* input, const Field& field)
-      : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+      : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
         field_(field) {
     SetInputAt(0, input);
   }
@@ -4578,7 +4578,7 @@
 class CloneContextInstr : public TemplateDefinition<1, NoThrow> {
  public:
   CloneContextInstr(intptr_t token_pos, Value* context_value)
-      : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
+      : TemplateDefinition(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos) {
     SetInputAt(0, context_value);
   }
@@ -4700,7 +4700,7 @@
 
   virtual bool CanDeoptimize() const { return false; }
   virtual intptr_t DeoptimizationTarget() const {
-    return Isolate::kNoDeoptId;
+    return Thread::kNoDeoptId;
   }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const {
@@ -7102,7 +7102,7 @@
 class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> {
  public:
   CheckStackOverflowInstr(intptr_t token_pos, intptr_t loop_depth)
-      : TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+      : TemplateInstruction(Thread::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
         loop_depth_(loop_depth) {
   }
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 026d0ed..f7030f8 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -233,7 +233,7 @@
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
   if (compiler->is_optimizing()) {
     compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
   }
@@ -6221,14 +6221,17 @@
         } else {
           if (shift == 32) {
             __ mov(out_lo, Operand(left_hi));
-          } else {
+          } else if (shift < 64) {
             __ Asr(out_lo, left_hi, Operand(shift - 32));
+          } else {
+            __ Asr(out_lo, left_hi, Operand(31));
           }
           __ Asr(out_hi, left_hi, Operand(31));
         }
         break;
       }
       case Token::kSHL: {
+        ASSERT(shift < 64);
         if (shift < 32) {
           __ Lsr(out_hi, left_lo, Operand(32 - shift));
           __ orr(out_hi, out_hi, Operand(left_hi, LSL, shift));
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 16ce91f..892a296 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -230,7 +230,7 @@
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
   if (compiler->is_optimizing()) {
     compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
   }
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index e0bfb7f..eab55fb 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -6088,7 +6088,7 @@
           __ movl(left_lo, left_hi);  // Shift by 32.
           __ sarl(left_hi, Immediate(31));  // Sign extend left hi.
           if (shift > 32) {
-            __ sarl(left_lo, Immediate(shift - 32));
+            __ sarl(left_lo, Immediate(shift > 63 ? 31 : shift - 32));
           }
         } else {
           __ shrdl(left_lo, left_hi, Immediate(shift));
@@ -6097,6 +6097,7 @@
         break;
       }
       case Token::kSHL: {
+        ASSERT(shift < 64);
         if (can_overflow()) {
           Register temp1 = locs()->temp(0).reg();
           Register temp2 = locs()->temp(1).reg();
@@ -6782,7 +6783,7 @@
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
   if (compiler->is_optimizing()) {
     compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
   }
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 15fc876..8c07b90 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -279,7 +279,7 @@
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
   if (compiler->is_optimizing()) {
     compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
   }
@@ -4931,12 +4931,19 @@
           __ or_(out_lo, out_lo, TMP);
           __ sra(out_hi, left_hi, shift);
         } else {
-          __ sra(out_lo, left_hi, shift - 32);
+          if (shift == 32) {
+            __ mov(out_lo, left_hi);
+          } else if (shift < 64) {
+            __ sra(out_lo, left_hi, shift - 32);
+          } else {
+            __ sra(out_lo, left_hi, 31);
+          }
           __ sra(out_hi, left_hi, 31);
         }
         break;
       }
       case Token::kSHL: {
+        ASSERT(shift < 64);
         if (shift < 32) {
           __ srl(out_hi, left_lo, 32 - shift);
           __ sll(TMP, left_hi, shift);
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index ea5e685..cc19675 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -6364,7 +6364,7 @@
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
   // deoptimization point in optimized code, after call.
-  const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
+  const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
   if (compiler->is_optimizing()) {
     compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
   }
@@ -6422,7 +6422,7 @@
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(!compiler->is_optimizing());
   __ CallPatchable(*StubCode::DebugStepCheck_entry());
-  compiler->AddCurrentDescriptor(stub_kind_, Isolate::kNoDeoptId, token_pos());
+  compiler->AddCurrentDescriptor(stub_kind_, Thread::kNoDeoptId, token_pos());
   compiler->RecordSafepoint(locs());
 }
 
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index bc1e24b..83681cd 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -133,14 +133,14 @@
   FlowGraphBuilder builder(parsed_function,
                            *ic_data_array,
                            NULL,  // NULL = not inlining.
-                           Isolate::kNoDeoptId);  // No OSR id.
+                           Thread::kNoDeoptId);  // No OSR id.
 
   intptr_t block_id = builder.AllocateBlockId();
   TargetEntryInstr* normal_entry =
       new TargetEntryInstr(block_id,
                            CatchClauseNode::kInvalidTryIndex);
   GraphEntryInstr* graph_entry = new GraphEntryInstr(
-      parsed_function, normal_entry, Isolate::kNoDeoptId);  // No OSR id.
+      parsed_function, normal_entry, Thread::kNoDeoptId);  // No OSR id.
   FlowGraph* graph = new FlowGraph(parsed_function, graph_entry, block_id);
   const Function& function = parsed_function.function();
   switch (function.recognized_kind()) {
@@ -274,7 +274,7 @@
 
   Definition* AddUnboxInstr(Representation rep, Value* value) {
     Definition* unboxed_value = AddDefinition(
-        UnboxInstr::Create(rep, value, Isolate::kNoDeoptId));
+        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(
@@ -296,7 +296,7 @@
   intptr_t token_pos = builder->TokenPos();
   builder->AddInstruction(
       new CheckSmiInstr(new Value(index),
-                        Isolate::kNoDeoptId,
+                        Thread::kNoDeoptId,
                         token_pos));
 
   Definition* length = builder->AddDefinition(
@@ -307,7 +307,7 @@
   builder->AddInstruction(
       new CheckArrayBoundInstr(new Value(length),
                                new Value(index),
-                               Isolate::kNoDeoptId));
+                               Thread::kNoDeoptId));
 }
 
 
@@ -326,7 +326,7 @@
                            new Value(index),
                            Instance::ElementSizeFor(kArrayCid),  // index scale
                            kArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   builder.AddIntrinsicReturn(new Value(result));
   return true;
@@ -353,7 +353,7 @@
                            new Value(index),
                            1,  // index scale
                            kTypedDataUint8ArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   builder.AddIntrinsicReturn(new Value(result));
   return true;
@@ -378,7 +378,7 @@
                            new Value(index),
                            1,  // index scale
                            kExternalTypedDataUint8ArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   builder.AddIntrinsicReturn(new Value(result));
   return true;
@@ -398,7 +398,7 @@
 
   builder.AddInstruction(
       new CheckSmiInstr(new Value(value),
-                        Isolate::kNoDeoptId,
+                        Thread::kNoDeoptId,
                         builder.TokenPos()));
 
   builder.AddInstruction(
@@ -408,7 +408,7 @@
                             kNoStoreBarrier,
                             1,  // index scale
                             kTypedDataUint8ArrayCid,
-                            Isolate::kNoDeoptId,
+                            Thread::kNoDeoptId,
                             builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -430,7 +430,7 @@
 
   builder.AddInstruction(
       new CheckSmiInstr(new Value(value),
-                        Isolate::kNoDeoptId,
+                        Thread::kNoDeoptId,
                         builder.TokenPos()));
   Definition* elements = builder.AddDefinition(
       new LoadUntaggedInstr(new Value(array),
@@ -442,7 +442,7 @@
                             kNoStoreBarrier,
                             1,  // index scale
                             kExternalTypedDataUint8ArrayCid,
-                            Isolate::kNoDeoptId,
+                            Thread::kNoDeoptId,
                             builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -472,7 +472,7 @@
                             kNoStoreBarrier,
                             4,  // index scale
                             kTypedDataUint32ArrayCid,
-                            Isolate::kNoDeoptId,
+                            Thread::kNoDeoptId,
                             builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -496,7 +496,7 @@
                            new Value(index),
                            4,  // index scale
                            kTypedDataUint32ArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedUint32, new Value(unboxed_value)));
@@ -522,12 +522,12 @@
       flow_graph->function(),
       String::Handle(flow_graph->function().name()),
       Object::empty_array(),  // Dummy args. descr.
-      Isolate::kNoDeoptId,
+      Thread::kNoDeoptId,
       1));
   value_check.AddReceiverCheck(kDoubleCid, flow_graph->function());
   builder.AddInstruction(
       new CheckClassInstr(new Value(value),
-                          Isolate::kNoDeoptId,
+                          Thread::kNoDeoptId,
                           value_check,
                           builder.TokenPos()));
   Definition* double_value =
@@ -540,7 +540,7 @@
                             kNoStoreBarrier,
                             8,  // index scale
                             kTypedDataFloat64ArrayCid,
-                            Isolate::kNoDeoptId,
+                            Thread::kNoDeoptId,
                             builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -566,7 +566,7 @@
                            new Value(index),
                            8,  // index scale
                            kTypedDataFloat64ArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedDouble, new Value(unboxed_value)));
@@ -589,13 +589,13 @@
       flow_graph->function(),
       String::Handle(flow_graph->function().name()),
       Object::empty_array(),  // Dummy args. descr.
-      Isolate::kNoDeoptId,
+      Thread::kNoDeoptId,
       1));
   value_check.AddReceiverCheck(kFloat32x4Cid, flow_graph->function());
   // Check argument. Receiver (left) is known to be a Float32x4.
   builder.AddInstruction(
       new CheckClassInstr(new Value(right),
-                          Isolate::kNoDeoptId,
+                          Thread::kNoDeoptId,
                           value_check,
                           builder.TokenPos()));
   Definition* left_simd =
@@ -608,7 +608,7 @@
       new BinaryFloat32x4OpInstr(kind,
                                  new Value(left_simd),
                                  new Value(right_simd),
-                                 Isolate::kNoDeoptId));
+                                 Thread::kNoDeoptId));
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedFloat32x4, new Value(unboxed_result)));
   builder.AddIntrinsicReturn(new Value(result));
@@ -647,7 +647,7 @@
       new Simd32x4ShuffleInstr(kind,
                                new Value(unboxed_receiver),
                                0,
-                               Isolate::kNoDeoptId));
+                               Thread::kNoDeoptId));
 
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
@@ -765,7 +765,7 @@
                            new Value(index),
                            Instance::ElementSizeFor(kArrayCid),  // index scale
                            kArrayCid,
-                           Isolate::kNoDeoptId,
+                           Thread::kNoDeoptId,
                            builder.TokenPos()));
   builder.AddIntrinsicReturn(new Value(result));
   return true;
@@ -801,7 +801,7 @@
                             kEmitStoreBarrier,
                             Instance::ElementSizeFor(kArrayCid),  // index scale
                             kArrayCid,
-                            Isolate::kNoDeoptId,
+                            Thread::kNoDeoptId,
                             builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
@@ -822,12 +822,12 @@
       flow_graph->function(),
       String::Handle(flow_graph->function().name()),
       Object::empty_array(),  // Dummy args. descr.
-      Isolate::kNoDeoptId,
+      Thread::kNoDeoptId,
       1));
   value_check.AddReceiverCheck(kArrayCid, flow_graph->function());
   builder.AddInstruction(
       new CheckClassInstr(new Value(data),
-                          Isolate::kNoDeoptId,
+                          Thread::kNoDeoptId,
                           value_check,
                           builder.TokenPos()));
 
@@ -854,7 +854,7 @@
 
   builder.AddInstruction(
       new CheckSmiInstr(new Value(length),
-                        Isolate::kNoDeoptId,
+                        Thread::kNoDeoptId,
                         builder.TokenPos()));
   builder.AddInstruction(
       new StoreInstanceFieldInstr(GrowableObjectArray::length_offset(),
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index e542420..f7caee1 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -217,14 +217,15 @@
 // [ OOB dispatch, Isolate library dispatch, <message specific data> ]
 RawError* IsolateMessageHandler::HandleLibMessage(const Array& message) {
   if (message.Length() < 2) return Error::null();
-  const Object& type = Object::Handle(I, message.At(1));
+  Zone* zone = I->current_zone();
+  const Object& type = Object::Handle(zone, message.At(1));
   if (!type.IsSmi()) return Error::null();
   const intptr_t msg_type = Smi::Cast(type).Value();
   switch (msg_type) {
     case Isolate::kPauseMsg: {
       // [ OOB, kPauseMsg, pause capability, resume capability ]
       if (message.Length() != 4) return Error::null();
-      Object& obj = Object::Handle(I, message.At(2));
+      Object& obj = Object::Handle(zone, message.At(2));
       if (!I->VerifyPauseCapability(obj)) return Error::null();
       obj = message.At(3);
       if (!obj.IsCapability()) return Error::null();
@@ -236,7 +237,7 @@
     case Isolate::kResumeMsg: {
       // [ OOB, kResumeMsg, pause capability, resume capability ]
       if (message.Length() != 4) return Error::null();
-      Object& obj = Object::Handle(I, message.At(2));
+      Object& obj = Object::Handle(zone, message.At(2));
       if (!I->VerifyPauseCapability(obj)) return Error::null();
       obj = message.At(3);
       if (!obj.IsCapability()) return Error::null();
@@ -248,13 +249,13 @@
     case Isolate::kPingMsg: {
       // [ OOB, kPingMsg, responsePort, priority, response ]
       if (message.Length() != 5) return Error::null();
-      const Object& obj2 = Object::Handle(I, message.At(2));
+      const Object& obj2 = Object::Handle(zone, message.At(2));
       if (!obj2.IsSendPort()) return Error::null();
       const SendPort& send_port = SendPort::Cast(obj2);
-      const Object& obj3 = Object::Handle(I, message.At(3));
+      const Object& obj3 = Object::Handle(zone, message.At(3));
       if (!obj3.IsSmi()) return Error::null();
       const intptr_t priority = Smi::Cast(obj3).Value();
-      const Object& obj4 = Object::Handle(I, message.At(4));
+      const Object& obj4 = Object::Handle(zone, message.At(4));
       if (!obj4.IsInstance() && !obj4.IsNull()) return Error::null();
       const Instance& response =
           obj4.IsNull() ? Instance::null_instance() : Instance::Cast(obj4);
@@ -270,9 +271,10 @@
                (priority == Isolate::kAsEventAction));
         // Update the message so that it will be handled immediately when it
         // is picked up from the message queue the next time.
-        message.SetAt(
-            0, Smi::Handle(I, Smi::New(Message::kDelayedIsolateLibOOBMsg)));
-        message.SetAt(3, Smi::Handle(I, Smi::New(Isolate::kImmediateAction)));
+        message.SetAt(0, Smi::Handle(zone,
+            Smi::New(Message::kDelayedIsolateLibOOBMsg)));
+        message.SetAt(3, Smi::Handle(zone,
+            Smi::New(Isolate::kImmediateAction)));
         uint8_t* data = NULL;
         intptr_t len = 0;
         SerializeObject(message, &data, &len, false);
@@ -289,7 +291,7 @@
     case Isolate::kVMRestartMsg: {
       // [ OOB, kKillMsg, terminate capability, priority ]
       if (message.Length() != 4) return Error::null();
-      Object& obj = Object::Handle(I, message.At(3));
+      Object& obj = Object::Handle(zone, message.At(3));
       if (!obj.IsSmi()) return Error::null();
       const intptr_t priority = Smi::Cast(obj).Value();
       if (priority == Isolate::kImmediateAction) {
@@ -328,9 +330,10 @@
                (priority == Isolate::kAsEventAction));
         // Update the message so that it will be handled immediately when it
         // is picked up from the message queue the next time.
-        message.SetAt(
-            0, Smi::Handle(I, Smi::New(Message::kDelayedIsolateLibOOBMsg)));
-        message.SetAt(3, Smi::Handle(I, Smi::New(Isolate::kImmediateAction)));
+        message.SetAt(0, Smi::Handle(zone,
+            Smi::New(Message::kDelayedIsolateLibOOBMsg)));
+        message.SetAt(3, Smi::Handle(zone,
+            Smi::New(Isolate::kImmediateAction)));
         uint8_t* data = NULL;
         intptr_t len = 0;
         SerializeObject(message, &data, &len, false);
@@ -345,7 +348,7 @@
     case Isolate::kInterruptMsg: {
       // [ OOB, kInterruptMsg, pause capability ]
       if (message.Length() != 3) return Error::null();
-      Object& obj = Object::Handle(I, message.At(2));
+      Object& obj = Object::Handle(zone, message.At(2));
       if (!I->VerifyPauseCapability(obj)) return Error::null();
 
       // If we are already paused, don't pause again.
@@ -361,14 +364,14 @@
     case Isolate::kDelErrorMsg: {
       // [ OOB, msg, listener port ]
       if (message.Length() < 3) return Error::null();
-      const Object& obj = Object::Handle(I, message.At(2));
+      const Object& obj = Object::Handle(zone, message.At(2));
       if (!obj.IsSendPort()) return Error::null();
       const SendPort& listener = SendPort::Cast(obj);
       switch (msg_type) {
         case Isolate::kAddExitMsg: {
           if (message.Length() != 4) return Error::null();
           // [ OOB, msg, listener port, response object ]
-          const Object& response = Object::Handle(I, message.At(3));
+          const Object& response = Object::Handle(zone, message.At(3));
           if (!response.IsInstance() && !response.IsNull()) {
             return Error::null();
           }
@@ -398,7 +401,7 @@
       // [ OOB, kErrorFatalMsg, terminate capability, val ]
       if (message.Length() != 4) return Error::null();
       // Check that the terminate capability has been passed correctly.
-      Object& obj = Object::Handle(I, message.At(2));
+      Object& obj = Object::Handle(zone, message.At(2));
       if (!I->VerifyTerminateCapability(obj)) return Error::null();
       // Get the value to be set.
       obj = message.At(3);
@@ -637,19 +640,20 @@
   }
 
   // Generate the error and stacktrace strings for the error message.
-  String& exc_str = String::Handle(I);
-  String& stacktrace_str = String::Handle(I);
+  String& exc_str = String::Handle(I->current_zone());
+  String& stacktrace_str = String::Handle(I->current_zone());
   if (result.IsUnhandledException()) {
+    Zone* zone = I->current_zone();
     const UnhandledException& uhe = UnhandledException::Cast(result);
-    const Instance& exception = Instance::Handle(I, uhe.exception());
-    Object& tmp = Object::Handle(I);
+    const Instance& exception = Instance::Handle(zone, uhe.exception());
+    Object& tmp = Object::Handle(zone);
     tmp = DartLibraryCalls::ToString(exception);
     if (!tmp.IsString()) {
       tmp = String::New(exception.ToCString());
     }
     exc_str ^= tmp.raw();
 
-    const Instance& stacktrace = Instance::Handle(I, uhe.stacktrace());
+    const Instance& stacktrace = Instance::Handle(zone, uhe.stacktrace());
     tmp = DartLibraryCalls::ToString(stacktrace);
     if (!tmp.IsString()) {
       tmp = String::New(stacktrace.ToCString());
@@ -757,11 +761,10 @@
       debugger_(NULL),
       resume_request_(false),
       last_resume_timestamp_(OS::GetCurrentTimeMillis()),
-      has_compiled_(false),
+      has_compiled_code_(false),
       flags_(),
       random_(),
       simulator_(NULL),
-      deopt_id_(0),
       mutex_(new Mutex()),
       saved_stack_limit_(0),
       stack_base_(0),
@@ -792,12 +795,8 @@
       registered_service_extension_handlers_(GrowableObjectArray::null()),
       metrics_list_head_(NULL),
       compilation_allowed_(true),
-      cha_(NULL),
       next_(NULL),
-      pause_loop_monitor_(NULL),
-      REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
-      REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
-      reusable_handles_() {
+      pause_loop_monitor_(NULL) {
   flags_.CopyFrom(api_flags);
   Thread::Current()->set_vm_tag(VMTag::kEmbedderTagId);
   set_user_tag(UserTags::kDefaultUserTag);
@@ -882,12 +881,6 @@
   // the current isolate.
   Thread::EnterIsolate(result);
 
-  // Setup the isolate specific resuable handles.
-#define REUSABLE_HANDLE_ALLOCATION(object)                                     \
-  result->object##_handle_ = result->AllocateReusableHandle<object>();
-  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_ALLOCATION)
-#undef REUSABLE_HANDLE_ALLOCATION
-
   // Setup the isolate message handler.
   MessageHandler* handler = new IsolateMessageHandler(result);
   ASSERT(handler != NULL);
@@ -1071,9 +1064,9 @@
 
 
 void Isolate::DoneLoading() {
-  GrowableObjectArray& libs =
-      GrowableObjectArray::Handle(this, object_store()->libraries());
-  Library& lib = Library::Handle(this);
+  GrowableObjectArray& libs = GrowableObjectArray::Handle(current_zone(),
+      object_store()->libraries());
+  Library& lib = Library::Handle(current_zone());
   intptr_t num_libs = libs.Length();
   for (intptr_t i = 0; i < num_libs; i++) {
     lib ^= libs.At(i);
@@ -1141,8 +1134,8 @@
   static const intptr_t kMaxResumeCapabilities = kSmiMax / (6 * kWordSize);
 
   const GrowableObjectArray& caps = GrowableObjectArray::Handle(
-      this, object_store()->resume_capabilities());
-  Capability& current = Capability::Handle(this);
+      current_zone(), object_store()->resume_capabilities());
+  Capability& current = Capability::Handle(current_zone());
   intptr_t insertion_index = -1;
   for (intptr_t i = 0; i < caps.Length(); i++) {
     current ^= caps.At(i);
@@ -1171,8 +1164,8 @@
 
 bool Isolate::RemoveResumeCapability(const Capability& capability) {
   const GrowableObjectArray& caps = GrowableObjectArray::Handle(
-       this, object_store()->resume_capabilities());
-  Capability& current = Capability::Handle(this);
+       current_zone(), object_store()->resume_capabilities());
+  Capability& current = Capability::Handle(current_zone());
   for (intptr_t i = 0; i < caps.Length(); i++) {
     current ^= caps.At(i);
     if (!current.IsNull() && (current.Id() == capability.Id())) {
@@ -1194,8 +1187,8 @@
   static const intptr_t kMaxListeners = kSmiMax / (12 * kWordSize);
 
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-       this, object_store()->exit_listeners());
-  SendPort& current = SendPort::Handle(this);
+       current_zone(), object_store()->exit_listeners());
+  SendPort& current = SendPort::Handle(current_zone());
   intptr_t insertion_index = -1;
   for (intptr_t i = 0; i < listeners.Length(); i += 2) {
     current ^= listeners.At(i);
@@ -1226,8 +1219,8 @@
 
 void Isolate::RemoveExitListener(const SendPort& listener) {
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-      this, object_store()->exit_listeners());
-  SendPort& current = SendPort::Handle(this);
+      current_zone(), object_store()->exit_listeners());
+  SendPort& current = SendPort::Handle(current_zone());
   for (intptr_t i = 0; i < listeners.Length(); i += 2) {
     current ^= listeners.At(i);
     if (!current.IsNull() && (current.Id() == listener.Id())) {
@@ -1243,11 +1236,11 @@
 
 void Isolate::NotifyExitListeners() {
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-      this, this->object_store()->exit_listeners());
+      current_zone(), this->object_store()->exit_listeners());
   if (listeners.IsNull()) return;
 
-  SendPort& listener = SendPort::Handle(this);
-  Instance& response = Instance::Handle(this);
+  SendPort& listener = SendPort::Handle(current_zone());
+  Instance& response = Instance::Handle(current_zone());
   for (intptr_t i = 0; i < listeners.Length(); i += 2) {
     listener ^= listeners.At(i);
     if (!listener.IsNull()) {
@@ -1268,8 +1261,8 @@
   static const intptr_t kMaxListeners = kSmiMax / (6 * kWordSize);
 
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-      this, object_store()->error_listeners());
-  SendPort& current = SendPort::Handle(this);
+      current_zone(), object_store()->error_listeners());
+  SendPort& current = SendPort::Handle(current_zone());
   intptr_t insertion_index = -1;
   for (intptr_t i = 0; i < listeners.Length(); i++) {
     current ^= listeners.At(i);
@@ -1297,8 +1290,8 @@
 
 void Isolate::RemoveErrorListener(const SendPort& listener) {
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-      this, object_store()->error_listeners());
-  SendPort& current = SendPort::Handle(this);
+      current_zone(), object_store()->error_listeners());
+  SendPort& current = SendPort::Handle(current_zone());
   for (intptr_t i = 0; i < listeners.Length(); i++) {
     current ^= listeners.At(i);
     if (!current.IsNull() && (current.Id() == listener.Id())) {
@@ -1314,13 +1307,13 @@
 bool Isolate::NotifyErrorListeners(const String& msg,
                                    const String& stacktrace) {
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
-      this, this->object_store()->error_listeners());
+      current_zone(), this->object_store()->error_listeners());
   if (listeners.IsNull()) return false;
 
-  const Array& arr = Array::Handle(this, Array::New(2));
+  const Array& arr = Array::Handle(current_zone(), Array::New(2));
   arr.SetAt(0, msg);
   arr.SetAt(1, stacktrace);
-  SendPort& listener = SendPort::Handle(this);
+  SendPort& listener = SendPort::Handle(current_zone());
   for (intptr_t i = 0; i < listeners.Length(); i++) {
     listener ^= listeners.At(i);
     if (!listener.IsNull()) {
@@ -1385,7 +1378,7 @@
       return StoreError(isolate, Error::Cast(result));
     }
     ASSERT(result.IsFunction());
-    Function& func = Function::Handle(isolate);
+    Function& func = Function::Handle(thread->zone());
     func ^= result.raw();
 
     // TODO(turnidge): Currently we need a way to force a one-time
@@ -1580,13 +1573,13 @@
 
 class FinalizeWeakPersistentHandlesVisitor : public HandleVisitor {
  public:
-  FinalizeWeakPersistentHandlesVisitor() : HandleVisitor(Isolate::Current()) {
+  FinalizeWeakPersistentHandlesVisitor() : HandleVisitor(Thread::Current()) {
   }
 
   void VisitHandle(uword addr) {
     FinalizablePersistentHandle* handle =
         reinterpret_cast<FinalizablePersistentHandle*>(addr);
-    handle->UpdateUnreachable(I);
+    handle->UpdateUnreachable(thread()->isolate());
   }
 
  private:
@@ -1677,7 +1670,7 @@
     // Write out the coverage data if collection has been enabled.
     if ((this != Dart::vm_isolate()) &&
         !ServiceIsolate::IsServiceIsolateDescendant(this)) {
-      CodeCoverage::Write(this);
+      CodeCoverage::Write(thread);
     }
 
     // Write compiler stats data if enabled.
@@ -1771,9 +1764,6 @@
   // Visit objects in per isolate stubs.
   StubCode::VisitObjectPointers(visitor);
 
-  // Visit objects in isolate specific handles area.
-  reusable_handles_.VisitObjectPointers(visitor);
-
   // Visit the dart api state for all local and persistent handles.
   if (api_state() != NULL) {
     api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles);
@@ -1834,6 +1824,21 @@
 }
 
 
+static const char* ExceptionPauseInfoToServiceEnum(Dart_ExceptionPauseInfo pi) {
+  switch (pi) {
+    case kPauseOnAllExceptions:
+      return "All";
+    case kNoPauseOnExceptions:
+      return "None";
+    case kPauseOnUnhandledExceptions:
+      return "Unhandled";
+    default:
+      UNIMPLEMENTED();
+      return NULL;
+  }
+}
+
+
 void Isolate::PrintJSON(JSONStream* stream, bool ref) {
   JSONObject jsobj(stream);
   jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
@@ -1846,6 +1851,8 @@
   if (ref) {
     return;
   }
+  jsobj.AddPropertyF("_originNumber", "%" Pd "",
+                     static_cast<intptr_t>(origin_id()));
   int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond;
   jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
   {
@@ -1879,6 +1886,9 @@
     jsobj.AddProperty("pauseEvent", &pause_event);
   }
 
+  jsobj.AddProperty("exceptionPauseMode",
+      ExceptionPauseInfoToServiceEnum(debugger()->GetExceptionPauseInfo()));
+
   const Library& lib =
       Library::Handle(object_store()->root_library());
   if (!lib.IsNull()) {
@@ -1890,7 +1900,8 @@
     vm_tag_counters()->PrintToJSONObject(&tagCounters);
   }
   if (object_store()->sticky_error() != Object::null()) {
-    Error& error = Error::Handle(this, object_store()->sticky_error());
+    Error& error = Error::Handle(current_zone(),
+        object_store()->sticky_error());
     ASSERT(!error.IsNull());
     jsobj.AddProperty("error", error, false);
   }
@@ -2311,14 +2322,6 @@
 }
 
 
-template<class C>
-C* Isolate::AllocateReusableHandle() {
-  C* handle = reinterpret_cast<C*>(reusable_handles_.AllocateScopedHandle());
-  C::initializeHandle(handle, C::null());
-  return handle;
-}
-
-
 void Isolate::KillLocked(LibMsgId msg_id) {
   Dart_CObject kill_msg;
   Dart_CObject* list_values[4];
@@ -2424,6 +2427,14 @@
 }
 
 
+static const char* NewConstChar(const char* chars) {
+  size_t len = strlen(chars);
+  char* mem = new char[len + 1];
+  memmove(mem, chars, len + 1);
+  return mem;
+}
+
+
 IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
                                      const Function& func,
                                      const Instance& message,
@@ -2437,6 +2448,7 @@
       on_error_port_(on_error_port),
       script_url_(NULL),
       package_root_(NULL),
+      package_map_(NULL),
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
@@ -2447,17 +2459,16 @@
       isolate_flags_(),
       paused_(paused),
       errors_are_fatal_(errors_are_fatal) {
-  script_url_ = NULL;
   const Class& cls = Class::Handle(func.Owner());
   const Library& lib = Library::Handle(cls.library());
   const String& lib_url = String::Handle(lib.url());
-  library_url_ = strdup(lib_url.ToCString());
+  library_url_ = NewConstChar(lib_url.ToCString());
 
   const String& func_name = String::Handle(func.name());
-  function_name_ = strdup(func_name.ToCString());
+  function_name_ = NewConstChar(func_name.ToCString());
   if (!cls.IsTopLevel()) {
     const String& class_name = String::Handle(cls.Name());
-    class_name_ = strdup(class_name.ToCString());
+    class_name_ = NewConstChar(class_name.ToCString());
   }
   bool can_send_any_object = true;
   SerializeObject(message,
@@ -2472,6 +2483,7 @@
 IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
                                      const char* script_url,
                                      const char* package_root,
+                                     const char** package_map,
                                      const Instance& args,
                                      const Instance& message,
                                      bool paused,
@@ -2482,7 +2494,9 @@
       parent_port_(parent_port),
       on_exit_port_(on_exit_port),
       on_error_port_(on_error_port),
-      package_root_(NULL),
+      script_url_(script_url),
+      package_root_(package_root),
+      package_map_(package_map),
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
@@ -2493,12 +2507,7 @@
       isolate_flags_(),
       paused_(paused),
       errors_are_fatal_(errors_are_fatal) {
-  script_url_ = strdup(script_url);
-  if (package_root != NULL) {
-    package_root_ = strdup(package_root);
-  }
-  library_url_ = NULL;
-  function_name_ = strdup("main");
+  function_name_ = NewConstChar("main");
   bool can_send_any_object = false;
   SerializeObject(args,
                   &serialized_args_,
@@ -2515,11 +2524,19 @@
 
 
 IsolateSpawnState::~IsolateSpawnState() {
-  free(script_url_);
-  free(package_root_);
-  free(library_url_);
-  free(function_name_);
-  free(class_name_);
+  delete[] script_url_;
+  delete[] package_root_;
+  for (int i = 0; package_map_ != NULL; i++) {
+    if (package_map_[i] != NULL) {
+      delete[] package_map_[i];
+    } else {
+      delete[] package_map_;
+      package_map_ = NULL;
+    }
+  }
+  delete[] library_url_;
+  delete[] class_name_;
+  delete[] function_name_;
   free(serialized_args_);
   free(serialized_message_);
 }
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 00406ed..00abb13 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -24,31 +24,19 @@
 namespace dart {
 
 // Forward declarations.
-class AbstractType;
 class ApiState;
-class Array;
 class BackgroundCompiler;
 class Capability;
-class CHA;
-class Class;
-class Code;
 class CodeIndexTable;
 class CompilerStats;
 class Debugger;
 class DeoptContext;
-class Error;
-class ExceptionHandlers;
-class Field;
-class Function;
-class GrowableObjectArray;
 class HandleScope;
 class HandleVisitor;
 class Heap;
 class ICData;
-class Instance;
 class IsolateProfilerData;
 class IsolateSpawnState;
-class Library;
 class Log;
 class MessageHandler;
 class Mutex;
@@ -56,7 +44,6 @@
 class ObjectIdRing;
 class ObjectPointerVisitor;
 class ObjectStore;
-class PcDescriptors;
 class RawInstance;
 class RawArray;
 class RawContext;
@@ -78,8 +65,6 @@
 class StoreBuffer;
 class StubCode;
 class ThreadRegistry;
-class TypeArguments;
-class TypeParameter;
 class UserTag;
 
 
@@ -94,23 +79,6 @@
   DISALLOW_COPY_AND_ASSIGN(IsolateVisitor);
 };
 
-#define REUSABLE_HANDLE_LIST(V)                                                \
-  V(AbstractType)                                                              \
-  V(Array)                                                                     \
-  V(Class)                                                                     \
-  V(Code)                                                                      \
-  V(Error)                                                                     \
-  V(ExceptionHandlers)                                                         \
-  V(Field)                                                                     \
-  V(Function)                                                                  \
-  V(GrowableObjectArray)                                                       \
-  V(Instance)                                                                  \
-  V(Library)                                                                   \
-  V(Object)                                                                    \
-  V(PcDescriptors)                                                             \
-  V(String)                                                                    \
-  V(TypeArguments)                                                             \
-  V(TypeParameter)                                                             \
 
 class Isolate : public BaseIsolate {
  public:
@@ -357,35 +325,6 @@
   IsolateSpawnState* spawn_state() const { return spawn_state_; }
   void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; }
 
-  static const intptr_t kNoDeoptId = -1;
-  static const intptr_t kDeoptIdStep = 2;
-  static const intptr_t kDeoptIdBeforeOffset = 0;
-  static const intptr_t kDeoptIdAfterOffset = 1;
-  intptr_t deopt_id() const { return deopt_id_; }
-  void set_deopt_id(int value) {
-    ASSERT(value >= 0);
-    deopt_id_ = value;
-  }
-  intptr_t GetNextDeoptId() {
-    ASSERT(deopt_id_ != kNoDeoptId);
-    const intptr_t id = deopt_id_;
-    deopt_id_ += kDeoptIdStep;
-    return id;
-  }
-
-  static intptr_t ToDeoptAfter(intptr_t deopt_id) {
-    ASSERT(IsDeoptBefore(deopt_id));
-    return deopt_id + kDeoptIdAfterOffset;
-  }
-
-  static bool IsDeoptBefore(intptr_t deopt_id) {
-    return (deopt_id % kDeoptIdStep) == kDeoptIdBeforeOffset;
-  }
-
-  static bool IsDeoptAfter(intptr_t deopt_id) {
-    return (deopt_id % kDeoptIdStep) == kDeoptIdAfterOffset;
-  }
-
   Mutex* mutex() const { return mutex_; }
 
   Debugger* debugger() const {
@@ -399,8 +338,8 @@
     return OFFSET_OF(Isolate, single_step_);
   }
 
-  void set_has_compiled(bool value) { has_compiled_ = value; }
-  bool has_compiled() const { return has_compiled_; }
+  void set_has_compiled_code(bool value) { has_compiled_code_ = value; }
+  bool has_compiled_code() const { return has_compiled_code_; }
 
   // TODO(iposva): Evaluate whether two different isolate flag structures are
   // needed. Currently it serves as a separation between publicly visible flags
@@ -442,7 +381,7 @@
   // executing generated code. Needs to be called before any code has been
   // compiled.
   void set_strict_compilation() {
-    ASSERT(!has_compiled());
+    ASSERT(!has_compiled_code());
     flags_.type_checks_ = true;
     flags_.asserts_ = true;
     flags_.error_on_bad_type_ = true;
@@ -730,25 +669,6 @@
                                        const Instance& closure);
   RawInstance* LookupServiceExtensionHandler(const String& name);
 
-#if defined(DEBUG)
-#define REUSABLE_HANDLE_SCOPE_ACCESSORS(object)                                \
-  void set_reusable_##object##_handle_scope_active(bool value) {               \
-    reusable_##object##_handle_scope_active_ = value;                          \
-  }                                                                            \
-  bool reusable_##object##_handle_scope_active() const {                       \
-    return reusable_##object##_handle_scope_active_;                           \
-  }
-  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS)
-#undef REUSABLE_HANDLE_SCOPE_ACCESSORS
-#endif  // defined(DEBUG)
-
-#define REUSABLE_HANDLE(object)                                                \
-  object& object##Handle() const {                                             \
-    return *object##_handle_;                                                  \
-  }
-  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE)
-#undef REUSABLE_HANDLE
-
   static void VisitIsolates(IsolateVisitor* visitor);
 
   // Handle service messages until we are told to resume execution.
@@ -829,8 +749,6 @@
   bool IsIsolateOf(Thread* thread);
 #endif  // DEBUG
 
-  template<class T> T* AllocateReusableHandle();
-
   // Accessed from generated code:
   uword stack_limit_;
   StoreBuffer* store_buffer_;
@@ -861,11 +779,10 @@
   Debugger* debugger_;
   bool resume_request_;
   int64_t last_resume_timestamp_;
-  bool has_compiled_;
+  bool has_compiled_code_;  // Can check that no compilation occured.
   Flags flags_;
   Random random_;
   Simulator* simulator_;
-  intptr_t deopt_id_;
   Mutex* mutex_;  // protects stack_limit_ and saved_stack_limit_.
   uword saved_stack_limit_;
   uword stack_base_;
@@ -933,28 +850,12 @@
 
   bool compilation_allowed_;
 
-  // TODO(23153): Move this out of Isolate/Thread.
-  CHA* cha_;
-
   // Isolate list next pointer.
   Isolate* next_;
 
   // Used to wake the isolate when it is in the pause event loop.
   Monitor* pause_loop_monitor_;
 
-  // Reusable handles support.
-#define REUSABLE_HANDLE_FIELDS(object)                                         \
-  object* object##_handle_;
-  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
-#undef REUSABLE_HANDLE_FIELDS
-
-#if defined(DEBUG)
-#define REUSABLE_HANDLE_SCOPE_VARIABLE(object)                                 \
-  bool reusable_##object##_handle_scope_active_;
-  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE);
-#undef REUSABLE_HANDLE_SCOPE_VARIABLE
-#endif  // defined(DEBUG)
-
 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit)                    \
   type metric_##variable##_;
   ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
@@ -965,8 +866,6 @@
   ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE)
 #undef ISOLATE_TIMELINE_STREAM_VARIABLE
 
-  VMHandles reusable_handles_;
-
   static Dart_IsolateCreateCallback create_callback_;
   static Dart_IsolateInterruptCallback interrupt_callback_;
   static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_;
@@ -1099,6 +998,7 @@
   IsolateSpawnState(Dart_Port parent_port,
                     const char* script_url,
                     const char* package_root,
+                    const char** package_map,
                     const Instance& args,
                     const Instance& message,
                     bool paused,
@@ -1113,11 +1013,12 @@
   Dart_Port parent_port() const { return parent_port_; }
   Dart_Port on_exit_port() const { return on_exit_port_; }
   Dart_Port on_error_port() const { return on_error_port_; }
-  char* script_url() const { return script_url_; }
-  char* package_root() const { return package_root_; }
-  char* library_url() const { return library_url_; }
-  char* class_name() const { return class_name_; }
-  char* function_name() const { return function_name_; }
+  const char* script_url() const { return script_url_; }
+  const char* package_root() const { return package_root_; }
+  const char** package_map() const { return package_map_; }
+  const char* library_url() const { return library_url_; }
+  const char* class_name() const { return class_name_; }
+  const char* function_name() const { return function_name_; }
   bool is_spawn_uri() const { return library_url_ == NULL; }
   bool paused() const { return paused_; }
   bool errors_are_fatal() const { return errors_are_fatal_; }
@@ -1133,11 +1034,12 @@
   Dart_Port parent_port_;
   Dart_Port on_exit_port_;
   Dart_Port on_error_port_;
-  char* script_url_;
-  char* package_root_;
-  char* library_url_;
-  char* class_name_;
-  char* function_name_;
+  const char* script_url_;
+  const char* package_root_;
+  const char** package_map_;
+  const char* library_url_;
+  const char* class_name_;
+  const char* function_name_;
   uint8_t* serialized_args_;
   intptr_t serialized_args_len_;
   uint8_t* serialized_message_;
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index b5da5dd..0f4f3a6 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -10,8 +10,8 @@
 #include "vm/message.h"
 #include "vm/metrics.h"
 #include "vm/object.h"
-#include "vm/service_event.h"
 #include "vm/service.h"
+#include "vm/service_event.h"
 #include "vm/timeline.h"
 #include "vm/unicode.h"
 
@@ -443,6 +443,12 @@
 }
 
 
+void JSONStream::PrintValueVM(bool ref) {
+  PrintCommaIfNeeded();
+  Service::PrintJSONForVM(this, ref);
+}
+
+
 void JSONStream::PrintServiceId(const Object& o) {
   ASSERT(id_zone_ != NULL);
   PrintProperty("id", id_zone_->GetServiceId(o));
@@ -594,6 +600,12 @@
 }
 
 
+void JSONStream::PrintPropertyVM(const char* name, bool ref) {
+  PrintPropertyName(name);
+  PrintValueVM(ref);
+}
+
+
 void JSONStream::PrintPropertyName(const char* name) {
   ASSERT(name != NULL);
   PrintCommaIfNeeded();
@@ -723,9 +735,9 @@
 void JSONObject::AddLocation(const BreakpointLocation* bpt_loc) const {
   ASSERT(bpt_loc->IsResolved());
 
-  Isolate* isolate = Isolate::Current();
-  Library& library = Library::Handle(isolate);
-  Script& script = Script::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  Library& library = Library::Handle(zone);
+  Script& script = Script::Handle(zone);
   intptr_t token_pos;
   bpt_loc->GetCodeLocation(&library, &script, &token_pos);
   AddLocation(script, token_pos);
@@ -736,9 +748,9 @@
     const BreakpointLocation* bpt_loc) const {
   ASSERT(!bpt_loc->IsResolved());
 
-  Isolate* isolate = Isolate::Current();
-  Library& library = Library::Handle(isolate);
-  Script& script = Script::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  Library& library = Library::Handle(zone);
+  Script& script = Script::Handle(zone);
   intptr_t token_pos;
   bpt_loc->GetCodeLocation(&library, &script, &token_pos);
 
@@ -747,7 +759,7 @@
   if (!script.IsNull()) {
     location.AddProperty("script", script);
   } else {
-    const String& scriptUri = String::Handle(isolate, bpt_loc->url());
+    const String& scriptUri = String::Handle(zone, bpt_loc->url());
     location.AddPropertyStr("scriptUri", scriptUri);
   }
   if (bpt_loc->requested_line_number() >= 0) {
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 78f6fdd..cd8fe62 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -138,6 +138,7 @@
   void PrintValue(Isolate* isolate, bool ref = true);
   bool PrintValueStr(const String& s, intptr_t limit);
   void PrintValue(TimelineEvent* timeline_event);
+  void PrintValueVM(bool ref = true);
 
   void PrintServiceId(const Object& o);
   void PrintPropertyBool(const char* name, bool b);
@@ -162,6 +163,7 @@
   void PrintProperty(const char* name, MessageQueue* queue);
   void PrintProperty(const char* name, Isolate* isolate);
   void PrintProperty(const char* name, TimelineEvent* timeline_event);
+  void PrintPropertyVM(const char* name, bool ref = true);
   void PrintPropertyName(const char* name);
   void PrintCommaIfNeeded();
   bool NeedComma();
@@ -276,6 +278,9 @@
   void AddProperty(const char* name, TimelineEvent* timeline_event) const {
     stream_->PrintProperty(name, timeline_event);
   }
+  void AddPropertyVM(const char* name, bool ref = true) const {
+    stream_->PrintPropertyVM(name, ref);
+  }
   void AddPropertyF(const char* name, const char* format, ...) const
       PRINTF_ATTRIBUTE(3, 4);
 
@@ -336,6 +341,9 @@
   void AddValue(TimelineEvent* timeline_event) const {
     stream_->PrintValue(timeline_event);
   }
+  void AddValueVM(bool ref = true) const {
+    stream_->PrintValueVM(ref);
+  }
   void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3);
 
  private:
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index 0e53b60..e2cf726 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -53,7 +53,7 @@
 
 #if defined(DEBUG)
 #define CHECK_REUSABLE_HANDLE(name)                                            \
-  ASSERT(!isolate->reusable_##name##_handle_scope_active());
+  ASSERT(!thread->reusable_##name##_handle_scope_active());
 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE)
 #undef CHECK_REUSABLE_HANDLE
 #endif  // defined(DEBUG)
diff --git a/runtime/vm/message.cc b/runtime/vm/message.cc
index 810a348..dc638b2 100644
--- a/runtime/vm/message.cc
+++ b/runtime/vm/message.cc
@@ -181,10 +181,9 @@
 
 
 void MessageQueue::PrintJSON(JSONStream* stream) {
-  Isolate* isolate = Isolate::Current();
   JSONArray messages(stream);
 
-  Object& msg_handler = Object::Handle(isolate);
+  Object& msg_handler = Object::Handle();
 
   MessageQueue::Iterator it(this);
   intptr_t depth = 0;
diff --git a/runtime/vm/mirrors_api_impl.cc b/runtime/vm/mirrors_api_impl.cc
index cb3b93f..13b896c 100644
--- a/runtime/vm/mirrors_api_impl.cc
+++ b/runtime/vm/mirrors_api_impl.cc
@@ -27,12 +27,12 @@
 
 DART_EXPORT Dart_Handle Dart_TypeName(Dart_Handle object) {
   DARTSCOPE(Thread::Current());
-  const Object& obj = Object::Handle(I, Api::UnwrapHandle(object));
+  const Object& obj = Object::Handle(Z, Api::UnwrapHandle(object));
   if (obj.IsType()) {
     const Class& cls = Class::Handle(Type::Cast(obj).type_class());
     return Api::NewHandle(I, cls.UserVisibleName());
   } else {
-    RETURN_TYPE_ERROR(I, object, Class/Type);
+    RETURN_TYPE_ERROR(Z, object, Class/Type);
   }
 }
 
@@ -47,10 +47,10 @@
     if (str == NULL) {
       RETURN_NULL_ERROR(str);
     }
-    CHECK_CALLBACK_STATE(I);
+    CHECK_CALLBACK_STATE(T);
     return Api::NewHandle(I, String::New(str));
   } else {
-    RETURN_TYPE_ERROR(I, object, Class/Type);
+    RETURN_TYPE_ERROR(Z, object, Class/Type);
   }
 }
 
@@ -135,9 +135,9 @@
   if (obj.IsError()) {
     return target;
   }
-  const String& func_name = Api::UnwrapStringHandle(I, function_name);
+  const String& func_name = Api::UnwrapStringHandle(Z, function_name);
   if (func_name.IsNull()) {
-    RETURN_TYPE_ERROR(I, function_name, String);
+    RETURN_TYPE_ERROR(Z, function_name, String);
   }
 
   Function& func = Function::Handle(Z);
@@ -211,9 +211,9 @@
 
 DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function) {
   DARTSCOPE(Thread::Current());
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   return Api::NewHandle(I, func.UserVisibleName());
 }
@@ -221,9 +221,9 @@
 
 DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function) {
   DARTSCOPE(Thread::Current());
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   if (func.IsNonImplicitClosureFunction()) {
     RawFunction* parent_function = func.parent_function();
@@ -253,9 +253,9 @@
   if (is_static == NULL) {
     RETURN_NULL_ERROR(is_static);
   }
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   *is_static = func.is_static();
   return Api::Success();
@@ -268,9 +268,9 @@
   if (is_constructor == NULL) {
     RETURN_NULL_ERROR(is_constructor);
   }
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   *is_constructor = func.kind() == RawFunction::kConstructor;
   return Api::Success();
@@ -283,9 +283,9 @@
   if (is_getter == NULL) {
     RETURN_NULL_ERROR(is_getter);
   }
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   *is_getter = func.IsGetterFunction();
   return Api::Success();
@@ -298,9 +298,9 @@
   if (is_setter == NULL) {
     RETURN_NULL_ERROR(is_setter);
   }
-  const Function& func = Api::UnwrapFunctionHandle(I, function);
+  const Function& func = Api::UnwrapFunctionHandle(Z, function);
   if (func.IsNull()) {
-    RETURN_TYPE_ERROR(I, function, Function);
+    RETURN_TYPE_ERROR(Z, function, Function);
   }
   *is_setter = (func.kind() == RawFunction::kSetterFunction);
   return Api::Success();
@@ -311,9 +311,9 @@
 
 DART_EXPORT Dart_Handle Dart_LibraryName(Dart_Handle library) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
   const String& name = String::Handle(Z, lib.name());
   ASSERT(!name.IsNull());
@@ -322,9 +322,9 @@
 
 DART_EXPORT Dart_Handle Dart_LibraryGetClassNames(Dart_Handle library) {
   DARTSCOPE(Thread::Current());
-  const Library& lib = Api::UnwrapLibraryHandle(I, library);
+  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
   if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(I, library, Library);
+    RETURN_TYPE_ERROR(Z, library, Library);
   }
 
   const GrowableObjectArray& names =
@@ -355,9 +355,9 @@
 
 DART_EXPORT Dart_Handle Dart_ClosureFunction(Dart_Handle closure) {
   DARTSCOPE(Thread::Current());
-  const Instance& closure_obj = Api::UnwrapInstanceHandle(I, closure);
+  const Instance& closure_obj = Api::UnwrapInstanceHandle(Z, closure);
   if (closure_obj.IsNull() || !closure_obj.IsClosure()) {
-    RETURN_TYPE_ERROR(I, closure, Instance);
+    RETURN_TYPE_ERROR(Z, closure, Instance);
   }
 
   ASSERT(ClassFinalizer::AllClassesFinalized());
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index da1d099..ce05529 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -71,7 +71,8 @@
 
 static void CompileAll(Isolate* isolate, Dart_Handle* result) {
   ASSERT(isolate != NULL);
-  const Error& error = Error::Handle(isolate, Library::CompileAll());
+  const Error& error =
+      Error::Handle(isolate->current_zone(), Library::CompileAll());
   if (error.IsNull()) {
     *result = Api::Success();
   } else {
@@ -86,7 +87,7 @@
   if (::Dart_IsError(result)) {
     return result;
   }
-  CHECK_CALLBACK_STATE(I);
+  CHECK_CALLBACK_STATE(T);
   CompileAll(I, &result);
   return result;
 }
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
index 29cb8d7..5d5a596 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -56,14 +56,14 @@
 
 
 const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
-  Isolate* isolate = Isolate::Current();
-  REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(isolate);
+  Thread* thread = Thread::Current();
+  REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(thread);
   GrowableObjectArray& libs = reused_growable_object_array_handle.Handle();
-  libs ^= isolate->object_store()->libraries();
+  libs ^= thread->isolate()->object_store()->libraries();
   ASSERT(!libs.IsNull());
   intptr_t num_libs = libs.Length();
   for (intptr_t i = 0; i < num_libs; i++) {
-    REUSABLE_LIBRARY_HANDLESCOPE(isolate);
+    REUSABLE_LIBRARY_HANDLESCOPE(thread);
     Library& lib = reused_library_handle.Handle();
     lib ^= libs.At(i);
     ASSERT(!lib.IsNull());
@@ -135,17 +135,17 @@
 }
 
 
-static NativeFunction ResolveNativeFunction(Isolate *isolate,
+static NativeFunction ResolveNativeFunction(Zone* zone,
                                             const Function& func,
                                             bool* is_bootstrap_native) {
-  const Script& script = Script::Handle(isolate, func.script());
-  const Class& cls = Class::Handle(isolate, func.Owner());
-  const Library& library = Library::Handle(isolate, cls.library());
+  const Script& script = Script::Handle(zone, func.script());
+  const Class& cls = Class::Handle(zone, func.Owner());
+  const Library& library = Library::Handle(zone, cls.library());
 
   *is_bootstrap_native =
       Bootstrap::IsBootstapResolver(library.native_entry_resolver());
 
-  TokenStream::Iterator it(TokenStream::Handle(isolate, script.tokens()),
+  TokenStream::Iterator it(TokenStream::Handle(zone, script.tokens()),
                            func.token_pos());
 
   const intptr_t end_pos = func.end_token_pos();
@@ -206,7 +206,7 @@
 
     bool is_bootstrap_native = false;
     target_function = ResolveNativeFunction(
-        arguments->thread()->isolate(), func, &is_bootstrap_native);
+        arguments->thread()->zone(), func, &is_bootstrap_native);
     ASSERT(target_function != NULL);
 
 #if defined(DEBUG)
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 87f3f10..ceecf06 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -66,6 +66,8 @@
 DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids.");
 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache");
 DEFINE_FLAG(bool, trace_field_guards, false, "Trace changes in field's cids.");
+DEFINE_FLAG(bool, ignore_patch_signature_mismatch, false,
+            "Ignore patch file member signature mismatch.");
 
 DECLARE_FLAG(charp, coverage_dir);
 DECLARE_FLAG(bool, load_deferred_eagerly);
@@ -910,7 +912,7 @@
 
 
   // Set up names for all VM singleton classes.
-  Class& cls = Class::Handle(isolate);
+  Class& cls = Class::Handle();
 
   SET_CLASS_NAME(class, Class);
   SET_CLASS_NAME(dynamic, Dynamic);
@@ -1021,9 +1023,9 @@
 
 void Object::VerifyBuiltinVtables() {
 #if defined(DEBUG)
-  Isolate* isolate = Isolate::Current();
-  ASSERT(isolate != NULL);
-  Class& cls = Class::Handle(isolate, Class::null());
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  Class& cls = Class::Handle(thread->zone(), Class::null());
   for (intptr_t cid = (kIllegalCid + 1); cid < kNumPredefinedCids; cid++) {
     if (isolate->class_table()->HasValidClassAt(cid)) {
       cls ^= isolate->class_table()->At(cid);
@@ -1059,8 +1061,9 @@
 
 RawError* Object::Init(Isolate* isolate) {
   Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   ASSERT(isolate == thread->isolate());
-  TimelineDurationScope tds(isolate,
+  TimelineDurationScope tds(thread,
                             isolate->GetIsolateStream(),
                             "Object::Init");
 
@@ -1069,10 +1072,10 @@
   // not have a full snapshot linked in.
   ObjectStore* object_store = isolate->object_store();
 
-  Class& cls = Class::Handle(isolate);
-  Type& type = Type::Handle(isolate);
-  Array& array = Array::Handle(isolate);
-  Library& lib = Library::Handle(isolate);
+  Class& cls = Class::Handle(zone);
+  Type& type = Type::Handle(zone);
+  Array& array = Array::Handle(zone);
+  Library& lib = Library::Handle(zone);
 
   // All RawArray fields will be initialized to an empty array, therefore
   // initialize array class first.
@@ -1100,19 +1103,19 @@
   const intptr_t kInitialCanonicalTypeArgumentsSize = 4;
   array = Array::New(kInitialCanonicalTypeArgumentsSize + 1);
   array.SetAt(kInitialCanonicalTypeArgumentsSize,
-              Smi::Handle(isolate, Smi::New(0)));
+              Smi::Handle(zone, Smi::New(0)));
   object_store->set_canonical_type_arguments(array);
 
   // Setup type class early in the process.
-  const Class& type_cls = Class::Handle(isolate, Class::New<Type>());
-  const Class& type_ref_cls = Class::Handle(isolate, Class::New<TypeRef>());
-  const Class& type_parameter_cls = Class::Handle(isolate,
+  const Class& type_cls = Class::Handle(zone, Class::New<Type>());
+  const Class& type_ref_cls = Class::Handle(zone, Class::New<TypeRef>());
+  const Class& type_parameter_cls = Class::Handle(zone,
                                                   Class::New<TypeParameter>());
-  const Class& bounded_type_cls = Class::Handle(isolate,
+  const Class& bounded_type_cls = Class::Handle(zone,
                                                 Class::New<BoundedType>());
-  const Class& mixin_app_type_cls = Class::Handle(isolate,
+  const Class& mixin_app_type_cls = Class::Handle(zone,
                                                   Class::New<MixinAppType>());
-  const Class& library_prefix_cls = Class::Handle(isolate,
+  const Class& library_prefix_cls = Class::Handle(zone,
                                                   Class::New<LibraryPrefix>());
 
   // Pre-allocate the OneByteString class needed by the symbol table.
@@ -1128,27 +1131,27 @@
 
   // Set up the libraries array before initializing the core library.
   const GrowableObjectArray& libraries = GrowableObjectArray::Handle(
-      isolate, GrowableObjectArray::New(Heap::kOld));
+      zone, GrowableObjectArray::New(Heap::kOld));
   object_store->set_libraries(libraries);
 
   // Pre-register the core library.
   Library::InitCoreLibrary(isolate);
 
   // Basic infrastructure has been setup, initialize the class dictionary.
-  const Library& core_lib = Library::Handle(isolate, Library::CoreLibrary());
+  const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
   ASSERT(!core_lib.IsNull());
 
   const GrowableObjectArray& pending_classes =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
   object_store->set_pending_classes(pending_classes);
 
-  Context& context = Context::Handle(isolate, Context::New(0, Heap::kOld));
+  Context& context = Context::Handle(zone, Context::New(0, Heap::kOld));
   object_store->set_empty_context(context);
 
   // Now that the symbol table is initialized and that the core dictionary as
   // well as the core implementation dictionary have been setup, preallocate
   // remaining classes and register them by name in the dictionaries.
-  String& name = String::Handle(isolate);
+  String& name = String::Handle(zone);
   cls = object_store->array_class();  // Was allocated above.
   RegisterPrivateClass(cls, Symbols::_List(), core_lib);
   pending_classes.Add(cls);
@@ -1157,8 +1160,8 @@
   // parameters is still 0. It will become 1 after patching. The array type
   // allocated below represents the raw type _List and not _List<E> as we
   // could expect. Use with caution.
-  type ^= Type::New(Object::Handle(isolate, cls.raw()),
-                    TypeArguments::Handle(isolate),
+  type ^= Type::New(Object::Handle(zone, cls.raw()),
+                    TypeArguments::Handle(zone),
                     Scanner::kNoSourcePos);
   type.SetIsFinalized();
   type ^= type.Canonicalize();
@@ -1198,7 +1201,7 @@
   // Pre-register the isolate library so the native class implementations
   // can be hooked up before compiling it.
   Library& isolate_lib =
-      Library::Handle(isolate, Library::LookupLibrary(Symbols::DartIsolate()));
+      Library::Handle(zone, Library::LookupLibrary(Symbols::DartIsolate()));
   if (isolate_lib.IsNull()) {
     isolate_lib = Library::NewLibraryHelper(Symbols::DartIsolate(), true);
     isolate_lib.SetLoadRequested();
@@ -1220,7 +1223,7 @@
   RegisterPrivateClass(cls, Symbols::_SendPortImpl(), isolate_lib);
   pending_classes.Add(cls);
 
-  const Class& stacktrace_cls = Class::Handle(isolate,
+  const Class& stacktrace_cls = Class::Handle(zone,
                                               Class::New<Stacktrace>());
   RegisterPrivateClass(stacktrace_cls, Symbols::_StackTrace(), core_lib);
   pending_classes.Add(stacktrace_cls);
@@ -1547,9 +1550,9 @@
   ASSERT(!lib.IsNull());
   cls = lib.LookupClassAllowPrivate(Symbols::ClassID());
   ASSERT(!cls.IsNull());
-  Field& field = Field::Handle(isolate);
-  Smi& value = Smi::Handle(isolate);
-  String& field_name = String::Handle(isolate);
+  Field& field = Field::Handle(zone);
+  Smi& value = Smi::Handle(zone);
+  String& field_name = String::Handle(zone);
 
 #define CLASS_LIST_WITH_NULL(V)                                                \
   V(Null)                                                                      \
@@ -1677,7 +1680,7 @@
   cls = Class::New<MirrorReference>();
   cls = Class::New<UserTag>();
 
-  const Context& context = Context::Handle(isolate,
+  const Context& context = Context::Handle(zone,
                                            Context::New(0, Heap::kOld));
   object_store->set_empty_context(context);
 
@@ -1823,7 +1826,9 @@
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  ASSERT(isolate->no_callback_scope_depth() == 0);
+  // New space allocation allowed only in mutator thread (Dart thread);
+  ASSERT(isolate->MutatorThreadIsCurrentThread() || (space != Heap::kNew));
+  ASSERT(thread->no_callback_scope_depth() == 0);
   Heap* heap = isolate->heap();
 
   uword address = heap->Allocate(size, space);
@@ -2211,14 +2216,13 @@
 
 intptr_t Class::FindFunctionIndex(const Function& needle) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return -1;
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
-  Function& function = isolate->FunctionHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
+  Function& function = thread->FunctionHandle();
   funcs ^= functions();
   ASSERT(!funcs.IsNull());
   const intptr_t len = funcs.Length();
@@ -2265,17 +2269,16 @@
 
 intptr_t Class::FindImplicitClosureFunctionIndex(const Function& needle) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return -1;
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
-  Function& function = isolate->FunctionHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
+  Function& function = thread->FunctionHandle();
   funcs ^= functions();
   ASSERT(!funcs.IsNull());
-  Function& implicit_closure = Function::Handle(isolate);
+  Function& implicit_closure = Function::Handle(thread->zone());
   const intptr_t len = funcs.Length();
   for (intptr_t i = 0; i < len; i++) {
     function ^= funcs.At(i);
@@ -2297,14 +2300,13 @@
 intptr_t Class::FindInvocationDispatcherFunctionIndex(
     const Function& needle) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return -1;
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
-  Object& object = isolate->ObjectHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
+  Object& object = thread->ObjectHandle();
   funcs ^= invocation_dispatcher_cache();
   ASSERT(!funcs.IsNull());
   const intptr_t len = funcs.Length();
@@ -2325,11 +2327,11 @@
 
 
 RawFunction* Class::InvocationDispatcherFunctionFromIndex(intptr_t idx) const {
-  Isolate* isolate = Isolate::Current();
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Array& dispatcher_cache = isolate->ArrayHandle();
-  Object& object = isolate->ObjectHandle();
+  Thread* thread = Thread::Current();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Array& dispatcher_cache = thread->ArrayHandle();
+  Object& object = thread->ObjectHandle();
   dispatcher_cache ^= invocation_dispatcher_cache();
   object = dispatcher_cache.At(idx);
   if (!object.IsFunction()) {
@@ -2339,6 +2341,11 @@
 }
 
 
+void Class::set_closures(const GrowableObjectArray& value) const {
+  StorePointer(&raw_ptr()->closure_functions_, value.raw());
+}
+
+
 void Class::AddClosureFunction(const Function& function) const {
   GrowableObjectArray& closures =
       GrowableObjectArray::Handle(raw_ptr()->closure_functions_);
@@ -2384,11 +2391,11 @@
   if (closures() == GrowableObjectArray::null()) {
     return -1;
   }
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
   const GrowableObjectArray& closures_array =
-      GrowableObjectArray::Handle(isolate, closures());
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  Function& closure = isolate->FunctionHandle();
+      GrowableObjectArray::Handle(thread->zone(), closures());
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  Function& closure = thread->FunctionHandle();
   intptr_t num_closures = closures_array.Length();
   for (intptr_t i = 0; i < num_closures; i++) {
     closure ^= closures_array.At(i);
@@ -2442,9 +2449,8 @@
   if (type_parameters() == TypeArguments::null()) {
     return 0;
   }
-  Isolate* isolate = thread->isolate();
-  REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(isolate);
-  TypeArguments& type_params = isolate->TypeArgumentsHandle();
+  REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(thread);
+  TypeArguments& type_params = thread->TypeArgumentsHandle();
   type_params = type_parameters();
   return type_params.Length();
 }
@@ -2455,7 +2461,9 @@
   if (num_own_type_arguments() != kUnknownNumTypeArguments) {
     return num_own_type_arguments();
   }
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   const intptr_t num_type_params = NumTypeParameters();
   if (!FLAG_overlap_type_arguments ||
       (num_type_params == 0) ||
@@ -2465,9 +2473,9 @@
     return num_type_params;
   }
   ASSERT(!IsMixinApplication() || is_mixin_type_applied());
-  const AbstractType& sup_type = AbstractType::Handle(isolate, super_type());
+  const AbstractType& sup_type = AbstractType::Handle(zone, super_type());
   const TypeArguments& sup_type_args =
-      TypeArguments::Handle(isolate, sup_type.arguments());
+      TypeArguments::Handle(zone, sup_type.arguments());
   if (sup_type_args.IsNull()) {
     // The super type is raw or the super class is non generic.
     // In either case, overlapping is not possible.
@@ -2484,7 +2492,7 @@
   // The super type may not even be resolved yet. This is not necessary, since
   // we only check for matching type parameters, which are resolved by default.
   const TypeArguments& type_params =
-      TypeArguments::Handle(isolate, type_parameters());
+      TypeArguments::Handle(zone, type_parameters());
   // Determine the maximum overlap of a prefix of the vector consisting of the
   // type parameters of this class with a suffix of the vector consisting of the
   // type arguments of the super type of this class.
@@ -2493,8 +2501,8 @@
   // Attempt to overlap the whole vector of type parameters; reduce the size
   // of the vector (keeping the first type parameter) until it fits or until
   // its size is zero.
-  TypeParameter& type_param = TypeParameter::Handle(isolate);
-  AbstractType& sup_type_arg = AbstractType::Handle(isolate);
+  TypeParameter& type_param = TypeParameter::Handle(zone);
+  AbstractType& sup_type_arg = AbstractType::Handle(zone);
   for (intptr_t num_overlapping_type_args =
            (num_type_params < num_sup_type_args) ?
                num_type_params : num_sup_type_args;
@@ -2536,14 +2544,16 @@
   // To work properly, this call requires the super class of this class to be
   // resolved, which is checked by the type_class() call on the super type.
   // Note that calling type_class() on a MixinAppType fails.
-  Isolate* isolate = Isolate::Current();
-  Class& cls = Class::Handle(isolate);
-  AbstractType& sup_type = AbstractType::Handle(isolate);
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  Class& cls = Class::Handle(zone);
+  AbstractType& sup_type = AbstractType::Handle(zone);
   cls = raw();
   intptr_t num_type_args = 0;
   do {
     if (cls.IsSignatureClass()) {
-      Function& signature_fun = Function::Handle(isolate);
+      Function& signature_fun = Function::Handle(zone);
       signature_fun ^= cls.signature_function();
       if (!signature_fun.is_static() &&
           !signature_fun.HasInstantiatedSignature()) {
@@ -2588,13 +2598,13 @@
 // Return null otherwise.
 RawTypeParameter* Class::LookupTypeParameter(const String& type_name) const {
   ASSERT(!type_name.IsNull());
-  Isolate* isolate = Isolate::Current();
-  REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(isolate);
-  REUSABLE_TYPE_PARAMETER_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  TypeArguments& type_params = isolate->TypeArgumentsHandle();
-  TypeParameter&  type_param = isolate->TypeParameterHandle();
-  String& type_param_name = isolate->StringHandle();
+  Thread* thread = Thread::Current();
+  REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(thread);
+  REUSABLE_TYPE_PARAMETER_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  TypeArguments& type_params = thread->TypeArgumentsHandle();
+  TypeParameter&  type_param = thread->TypeParameterHandle();
+  String& type_param_name = thread->StringHandle();
 
   type_params ^= type_parameters();
   if (!type_params.IsNull()) {
@@ -2899,7 +2909,8 @@
         new_functions.Add(orig_func);
       }
     } else if (func.UserVisibleSignature() !=
-               orig_func.UserVisibleSignature()) {
+               orig_func.UserVisibleSignature()
+               && !FLAG_ignore_patch_signature_mismatch) {
       // Compare user visible signatures to ignore different implicit parameters
       // when patching a constructor with a factory.
       *error = LanguageError::NewFormatted(
@@ -3093,19 +3104,18 @@
 
 intptr_t Class::FindFieldIndex(const Field& needle) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return -1;
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FIELD_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  Array& fields_array = isolate->ArrayHandle();
-  Field& field = isolate->FieldHandle();
-  String& field_name = isolate->StringHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FIELD_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  Array& fields_array = thread->ArrayHandle();
+  Field& field = thread->FieldHandle();
+  String& field_name = thread->StringHandle();
   fields_array ^= fields();
   ASSERT(!fields_array.IsNull());
-  String& needle_name = String::Handle(isolate);
+  String& needle_name = String::Handle(thread->zone());
   needle_name ^= needle.name();
   const intptr_t len = fields_array.Length();
   for (intptr_t i = 0; i < len; i++) {
@@ -3708,7 +3718,6 @@
 
 intptr_t Class::FindCanonicalTypeIndex(const Type& needle) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return -1;
   }
@@ -3717,15 +3726,15 @@
     // same type. It will never be returned by this function.
     return 0;
   }
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  Object& types = isolate->ObjectHandle();
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& types = thread->ObjectHandle();
   types = canonical_types();
   if (types.IsNull()) {
     return -1;
   }
   const intptr_t len = Array::Cast(types).Length();
-  REUSABLE_ABSTRACT_TYPE_HANDLESCOPE(isolate);
-  AbstractType& type = isolate->AbstractTypeHandle();
+  REUSABLE_ABSTRACT_TYPE_HANDLESCOPE(thread);
+  AbstractType& type = thread->AbstractTypeHandle();
   for (intptr_t i = 0; i < len; i++) {
     type ^= Array::Cast(types).At(i);
     if (needle.raw() == type.raw()) {
@@ -3806,8 +3815,8 @@
                                  Heap::Space space) {
   // Use the thsi object as if it was the receiver of this method, but instead
   // of recursing reset it to the super class and loop.
-  Isolate* isolate = Isolate::Current();
-  Class& thsi = Class::Handle(isolate, cls.raw());
+  Zone* zone = Thread::Current()->zone();
+  Class& thsi = Class::Handle(zone, cls.raw());
   while (true) {
     ASSERT(!thsi.IsVoidClass());
     // Check for DynamicType.
@@ -3865,7 +3874,7 @@
     }
     const bool other_is_function_class = other.IsFunctionClass();
     if (other.IsSignatureClass() || other_is_function_class) {
-      const Function& other_fun = Function::Handle(isolate,
+      const Function& other_fun = Function::Handle(zone,
                                                    other.signature_function());
       if (thsi.IsSignatureClass()) {
         if (other_is_function_class) {
@@ -3873,7 +3882,7 @@
         }
         // Check for two function types.
         const Function& fun =
-            Function::Handle(isolate, thsi.signature_function());
+            Function::Handle(zone, thsi.signature_function());
         return fun.TypeTest(test_kind,
                             type_arguments,
                             other_fun,
@@ -3883,11 +3892,10 @@
       }
       // Check if type S has a call() method of function type T.
       Function& function =
-          Function::Handle(isolate,
-                           thsi.LookupDynamicFunction(Symbols::Call()));
+          Function::Handle(zone, thsi.LookupDynamicFunction(Symbols::Call()));
       if (function.IsNull()) {
         // Walk up the super_class chain.
-        Class& cls = Class::Handle(isolate, thsi.SuperClass());
+        Class& cls = Class::Handle(zone, thsi.SuperClass());
         while (!cls.IsNull() && function.IsNull()) {
           function = cls.LookupDynamicFunction(Symbols::Call());
           cls = cls.SuperClass();
@@ -3907,11 +3915,11 @@
     }
     // Check for 'direct super type' specified in the implements clause
     // and check for transitivity at the same time.
-    Array& interfaces = Array::Handle(isolate, thsi.interfaces());
-    AbstractType& interface = AbstractType::Handle(isolate);
-    Class& interface_class = Class::Handle(isolate);
-    TypeArguments& interface_args = TypeArguments::Handle(isolate);
-    Error& error = Error::Handle(isolate);
+    Array& interfaces = Array::Handle(zone, thsi.interfaces());
+    AbstractType& interface = AbstractType::Handle(zone);
+    Class& interface_class = Class::Handle(zone);
+    TypeArguments& interface_args = TypeArguments::Handle(zone);
+    Error& error = Error::Handle(zone);
     for (intptr_t i = 0; i < interfaces.Length(); i++) {
       interface ^= interfaces.At(i);
       if (!interface.IsFinalized()) {
@@ -4106,21 +4114,20 @@
 
 RawFunction* Class::LookupFunction(const String& name, MemberKind kind) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return Function::null();
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
   funcs ^= functions();
   ASSERT(!funcs.IsNull());
   const intptr_t len = funcs.Length();
-  Function& function = isolate->FunctionHandle();
+  Function& function = thread->FunctionHandle();
   if (len >= kFunctionLookupHashTreshold) {
     ClassFunctionsSet set(raw_ptr()->functions_hash_table_);
-    REUSABLE_STRING_HANDLESCOPE(isolate);
-    function ^= set.GetOrNull(FunctionName(name, &(isolate->StringHandle())));
+    REUSABLE_STRING_HANDLESCOPE(thread);
+    function ^= set.GetOrNull(FunctionName(name, &(thread->StringHandle())));
     // No mutations.
     ASSERT(set.Release().raw() == raw_ptr()->functions_hash_table_);
     return function.IsNull() ? Function::null()
@@ -4136,8 +4143,8 @@
       }
     }
   } else {
-    REUSABLE_STRING_HANDLESCOPE(isolate);
-    String& function_name = isolate->StringHandle();
+    REUSABLE_STRING_HANDLESCOPE(thread);
+    String& function_name = thread->StringHandle();
     for (intptr_t i = 0; i < len; i++) {
       function ^= funcs.At(i);
       function_name ^= function.name();
@@ -4154,19 +4161,18 @@
 RawFunction* Class::LookupFunctionAllowPrivate(const String& name,
                                                MemberKind kind) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return Function::null();
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
   funcs ^= functions();
   ASSERT(!funcs.IsNull());
   const intptr_t len = funcs.Length();
-  Function& function = isolate->FunctionHandle();
-  String& function_name = isolate->StringHandle();
+  Function& function = thread->FunctionHandle();
+  String& function_name = thread->StringHandle();
   for (intptr_t i = 0; i < len; i++) {
     function ^= funcs.At(i);
     function_name ^= function.name();
@@ -4193,18 +4199,17 @@
                                            intptr_t prefix_length,
                                            const String& name) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return Function::null();
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FUNCTION_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  Array& funcs = isolate->ArrayHandle();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_FUNCTION_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  Array& funcs = thread->ArrayHandle();
   funcs ^= functions();
   intptr_t len = funcs.Length();
-  Function& function = isolate->FunctionHandle();
-  String& function_name = isolate->StringHandle();
+  Function& function = thread->FunctionHandle();
+  String& function_name = thread->StringHandle();
   for (intptr_t i = 0; i < len; i++) {
     function ^= funcs.At(i);
     function_name ^= function.name();
@@ -4222,16 +4227,16 @@
   // TODO(hausner): we can shortcut the negative case if we knew the
   // beginning and end token position of the class.
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return Function::null();
   }
-  Function& func = Function::Handle(isolate);
+  Function& func = Function::Handle(zone);
   func = LookupClosureFunction(token_pos);
   if (!func.IsNull()) {
     return func.raw();
   }
-  Array& funcs = Array::Handle(isolate, functions());
+  Array& funcs = Array::Handle(zone, functions());
   intptr_t len = funcs.Length();
   for (intptr_t i = 0; i < len; i++) {
     func ^= funcs.At(i);
@@ -4262,19 +4267,18 @@
 
 RawField* Class::LookupField(const String& name, MemberKind kind) const {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
   if (EnsureIsFinalized(thread) != Error::null()) {
     return Field::null();
   }
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_FIELD_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  Array& flds = isolate->ArrayHandle();
+  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 = isolate->FieldHandle();
-  String& field_name = isolate->StringHandle();
+  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();
@@ -4299,9 +4303,9 @@
 
 
 RawLibraryPrefix* Class::LookupLibraryPrefix(const String& name) const {
-  Isolate* isolate = Isolate::Current();
-  const Library& lib = Library::Handle(isolate, library());
-  const Object& obj = Object::Handle(isolate, lib.LookupLocalObject(name));
+  Zone* zone = Thread::Current()->zone();
+  const Library& lib = Library::Handle(zone, library());
+  const Object& obj = Object::Handle(zone, lib.LookupLocalObject(name));
   if (!obj.IsNull() && obj.IsLibraryPrefix()) {
     return LibraryPrefix::Cast(obj).raw();
   }
@@ -5036,15 +5040,17 @@
 }
 
 
-static void GrowCanonicalTypeArguments(Isolate* isolate, const Array& table) {
+static void GrowCanonicalTypeArguments(Thread* thread, const Array& table) {
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   // Last element of the array is the number of used elements.
   const intptr_t table_size = table.Length() - 1;
   const intptr_t new_table_size = table_size * 2;
-  Array& new_table = Array::Handle(isolate, Array::New(new_table_size + 1));
+  Array& new_table = Array::Handle(zone, Array::New(new_table_size + 1));
   // Copy all elements from the original table to the newly allocated
   // array.
-  TypeArguments& element = TypeArguments::Handle(isolate);
-  Object& new_element = Object::Handle(isolate);
+  TypeArguments& element = TypeArguments::Handle(zone);
+  Object& new_element = Object::Handle(zone);
   for (intptr_t i = 0; i < table_size; i++) {
     element ^= table.At(i);
     if (!element.IsNull()) {
@@ -5067,10 +5073,11 @@
 }
 
 
-static void InsertIntoCanonicalTypeArguments(Isolate* isolate,
+static void InsertIntoCanonicalTypeArguments(Thread* thread,
                                              const Array& table,
                                              const TypeArguments& arguments,
                                              intptr_t index) {
+  Zone* zone = thread->zone();
   arguments.SetCanonical();  // Mark object as being canonical.
   table.SetAt(index, arguments);  // Remember the new element.
   // Update used count.
@@ -5078,7 +5085,7 @@
   const intptr_t table_size = table.Length() - 1;
   const intptr_t used_elements =
       Smi::Value(Smi::RawCast(table.At(table_size))) + 1;
-  const Smi& used = Smi::Handle(isolate, Smi::New(used_elements));
+  const Smi& used = Smi::Handle(zone, Smi::New(used_elements));
   table.SetAt(table_size, used);
 
 #ifdef DEBUG
@@ -5101,13 +5108,13 @@
 
   // Rehash if table is 75% full.
   if (used_elements > ((table_size / 4) * 3)) {
-    GrowCanonicalTypeArguments(isolate, table);
+    GrowCanonicalTypeArguments(thread, table);
   }
 }
 
 
 static intptr_t FindIndexInCanonicalTypeArguments(
-    Isolate* isolate,
+    Zone* zone,
     const Array& table,
     const TypeArguments& arguments,
     intptr_t hash) {
@@ -5116,7 +5123,7 @@
   ASSERT(Utils::IsPowerOfTwo(table_size));
   intptr_t index = hash & (table_size - 1);
 
-  TypeArguments& current = TypeArguments::Handle(isolate);
+  TypeArguments& current = TypeArguments::Handle(zone);
   current ^= table.At(index);
   while (!current.IsNull() && !current.Equals(arguments)) {
     index = (index + 1) & (table_size - 1);  // Move to next element.
@@ -5176,21 +5183,22 @@
   if (IsRaw(0, num_types)) {
     return TypeArguments::null();
   }
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ObjectStore* object_store = isolate->object_store();
-  Array& table = Array::Handle(isolate,
+  Array& table = Array::Handle(zone,
                                object_store->canonical_type_arguments());
   // Last element of the array is the number of used elements.
   const intptr_t num_used =
       Smi::Value(Smi::RawCast(table.At(table.Length() - 1)));
   const intptr_t hash = Hash();
-  intptr_t index =
-      FindIndexInCanonicalTypeArguments(isolate, table, *this, hash);
-  TypeArguments& result = TypeArguments::Handle(isolate);
+  intptr_t index = FindIndexInCanonicalTypeArguments(zone, table, *this, hash);
+  TypeArguments& result = TypeArguments::Handle(zone);
   result ^= table.At(index);
   if (result.IsNull()) {
     // Canonicalize each type argument.
-    AbstractType& type_arg = AbstractType::Handle(isolate);
+    AbstractType& type_arg = AbstractType::Handle(zone);
     for (intptr_t i = 0; i < num_types; i++) {
       type_arg = TypeAt(i);
       type_arg = type_arg.Canonicalize(trail);
@@ -5208,7 +5216,7 @@
     if ((canonical_hash != hash) ||
         (Smi::Value(Smi::RawCast(table.At(table.Length() - 1))) != num_used)) {
       index = FindIndexInCanonicalTypeArguments(
-          isolate, table, *this, canonical_hash);
+          zone, table, *this, canonical_hash);
       result ^= table.At(index);
     }
     if (result.IsNull()) {
@@ -5219,7 +5227,7 @@
         result ^= this->raw();
       }
       ASSERT(result.IsOld());
-      InsertIntoCanonicalTypeArguments(isolate, table, result, index);
+      InsertIntoCanonicalTypeArguments(thread, table, result, index);
     }
   }
   ASSERT(result.Equals(*this));
@@ -5936,9 +5944,9 @@
     return false;
   }
   // Verify that all argument names are valid parameter names.
-  Isolate* isolate = Isolate::Current();
-  String& argument_name = String::Handle(isolate);
-  String& parameter_name = String::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  String& argument_name = String::Handle(zone);
+  String& parameter_name = String::Handle(zone);
   for (intptr_t i = 0; i < num_named_arguments; i++) {
     argument_name ^= argument_names.At(i);
     ASSERT(argument_name.IsSymbol());
@@ -5984,9 +5992,9 @@
     return false;
   }
   // Verify that all argument names are valid parameter names.
-  Isolate* isolate = Isolate::Current();
-  String& argument_name = String::Handle(isolate);
-  String& parameter_name = String::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  String& argument_name = String::Handle(zone);
+  String& parameter_name = String::Handle(zone);
   for (intptr_t i = 0; i < num_named_arguments; i++) {
     argument_name ^= args_desc.NameAt(i);
     ASSERT(argument_name.IsSymbol());
@@ -6665,12 +6673,14 @@
 
 RawInstance* Function::ImplicitStaticClosure() const {
   if (implicit_static_closure() == Instance::null()) {
-    Isolate* isolate = Isolate::Current();
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    Zone* zone = thread->zone();
     ObjectStore* object_store = isolate->object_store();
     const Context& context =
-        Context::Handle(isolate, object_store->empty_context());
+        Context::Handle(zone, object_store->empty_context());
     Instance& closure =
-        Instance::Handle(isolate, Closure::New(*this, context, Heap::kOld));
+        Instance::Handle(zone, Closure::New(*this, context, Heap::kOld));
     const char* error_str = NULL;
     closure ^= closure.CheckAndCanonicalize(&error_str);
     ASSERT(!closure.IsNull());
@@ -8185,13 +8195,13 @@
   }
   uint8_t* data = reinterpret_cast<uint8_t*>(::malloc(len));
   ASSERT(data != NULL);
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   const ExternalTypedData& stream = ExternalTypedData::Handle(
-      isolate,
+      zone,
       ExternalTypedData::New(kExternalTypedDataUint8ArrayCid,
                              data, len, Heap::kOld));
   stream.AddFinalizer(data, DataFinalizer);
-  const TokenStream& result = TokenStream::Handle(isolate, TokenStream::New());
+  const TokenStream& result = TokenStream::Handle(zone, TokenStream::New());
   result.SetStream(stream);
   return result.raw();
 }
@@ -8318,7 +8328,7 @@
 
 RawTokenStream* TokenStream::New(const Scanner::GrowableTokenStream& tokens,
                                  const String& private_key) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   // Copy the relevant data out of the scanner into a compressed stream of
   // tokens.
   CompressedTokenStreamData data;
@@ -8338,14 +8348,14 @@
 
   // Create and setup the token stream object.
   const ExternalTypedData& stream = ExternalTypedData::Handle(
-      isolate,
+      zone,
       ExternalTypedData::New(kExternalTypedDataUint8ArrayCid,
                              data.GetStream(), data.Length(), Heap::kOld));
   stream.AddFinalizer(data.GetStream(), DataFinalizer);
-  const TokenStream& result = TokenStream::Handle(isolate, New());
+  const TokenStream& result = TokenStream::Handle(zone, New());
   result.SetPrivateKey(private_key);
   const Array& token_objects =
-      Array::Handle(isolate, data.MakeTokenObjectsArray());
+      Array::Handle(zone, data.MakeTokenObjectsArray());
   {
     NoSafepointScope no_safepoint;
     result.SetStream(stream);
@@ -8533,15 +8543,15 @@
 
 
 RawGrowableObjectArray* Script::GenerateLineNumberArray() const {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   const GrowableObjectArray& info =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
-  const String& source = String::Handle(isolate, Source());
+      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
+  const String& source = String::Handle(zone, Source());
   const String& key = Symbols::Empty();
-  const Object& line_separator = Object::Handle(isolate);
-  const TokenStream& tkns = TokenStream::Handle(isolate, tokens());
-  Smi& value = Smi::Handle(isolate);
-  String& tokenValue = String::Handle(isolate);
+  const Object& line_separator = Object::Handle(zone);
+  const TokenStream& tkns = TokenStream::Handle(zone, tokens());
+  Smi& value = Smi::Handle(zone);
+  String& tokenValue = String::Handle(zone);
   ASSERT(!tkns.IsNull());
   TokenStream::Iterator tkit(tkns, 0, TokenStream::Iterator::kAllTokens);
   int current_line = -1;
@@ -8884,9 +8894,11 @@
 
 
 RawLibrary* Script::FindLibrary() const {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   const GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      isolate, isolate->object_store()->libraries());
+      zone, isolate->object_store()->libraries());
   Library& lib = Library::Handle();
   Array& scripts = Array::Handle();
   for (intptr_t i = 0; i < libs.Length(); i++) {
@@ -8911,11 +8923,10 @@
   const String& encoded_uri = String::Handle(String::EncodeIRI(uri));
   ASSERT(!encoded_uri.IsNull());
   const Library& lib = Library::Handle(FindLibrary());
-  if (lib.IsNull()) {
-    ASSERT(kind() == RawScript::kEvaluateTag);
+  if (kind() == RawScript::kEvaluateTag) {
     jsobj.AddServiceId(*this);
   } else {
-    ASSERT(kind() != RawScript::kEvaluateTag);
+    ASSERT(!lib.IsNull());
     jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s",
         lib.index(), encoded_uri.ToCString());
   }
@@ -9133,6 +9144,7 @@
   }
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   ObjectStore* object_store = isolate->object_store();
   LibraryLoadErrorSet set(object_store->library_load_error_table());
   bool present = false;
@@ -9144,8 +9156,8 @@
   set.Insert(*this);
   object_store->set_library_load_error_table(set.Release());
   intptr_t num_imp = num_imports();
-  Library& lib = Library::Handle(isolate);
-  Instance& error = Instance::Handle(isolate);
+  Library& lib = Library::Handle(zone);
+  Instance& error = Instance::Handle(zone);
   for (intptr_t i = 0; i < num_imp; i++) {
     HANDLESCOPE(thread);
     lib = ImportLibraryAt(i);
@@ -9502,16 +9514,16 @@
 
 
 RawObject* Library::LookupEntry(const String& name, intptr_t *index) const {
-  Isolate* isolate = Isolate::Current();
-  REUSABLE_ARRAY_HANDLESCOPE(isolate);
-  REUSABLE_OBJECT_HANDLESCOPE(isolate);
-  REUSABLE_STRING_HANDLESCOPE(isolate);
-  Array& dict = isolate->ArrayHandle();
+  Thread* thread = Thread::Current();
+  REUSABLE_ARRAY_HANDLESCOPE(thread);
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  REUSABLE_STRING_HANDLESCOPE(thread);
+  Array& dict = thread->ArrayHandle();
   dict ^= dictionary();
   intptr_t dict_size = dict.Length() - 1;
   *index = name.Hash() % dict_size;
-  Object& entry = isolate->ObjectHandle();
-  String& entry_name = isolate->StringHandle();
+  Object& entry = thread->ObjectHandle();
+  String& entry_name = thread->StringHandle();
   entry = dict.At(*index);
   // Search the entry in the hash set.
   while (!entry.IsNull()) {
@@ -9717,11 +9729,12 @@
 
 
 RawObject* Library::LookupLocalObjectAllowPrivate(const String& name) const {
-  Isolate* isolate = Isolate::Current();
-  Object& obj = Object::Handle(isolate, Object::null());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Object& obj = Object::Handle(zone, Object::null());
   obj = LookupLocalObject(name);
   if (obj.IsNull() && ShouldBePrivate(name)) {
-    String& private_name = String::Handle(isolate, PrivateName(name));
+    String& private_name = String::Handle(zone, PrivateName(name));
     obj = LookupLocalObject(private_name);
   }
   return obj.raw();
@@ -9820,8 +9833,8 @@
 RawClass* Library::LookupClassAllowPrivate(const String& name) const {
   // See if the class is available in this library or in the top level
   // scope of any imported library.
-  Isolate* isolate = Isolate::Current();
-  const Class& cls = Class::Handle(isolate, LookupClass(name));
+  Zone* zone = Thread::Current()->zone();
+  const Class& cls = Class::Handle(zone, LookupClass(name));
   if (!cls.IsNull()) {
     return cls.raw();
   }
@@ -9829,7 +9842,7 @@
   // Now try to lookup the class using its private name, but only in
   // this library (not in imported libraries).
   if (ShouldBePrivate(name)) {
-    String& private_name = String::Handle(isolate, PrivateName(name));
+    String& private_name = String::Handle(zone, PrivateName(name));
     const Object& obj = Object::Handle(LookupLocalObject(private_name));
     if (obj.IsClass()) {
       return Class::Cast(obj).raw();
@@ -9881,8 +9894,8 @@
 
 
 bool Library::ImportsCorelib() const {
-  Isolate* isolate = Isolate::Current();
-  Library& imported = Library::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  Library& imported = Library::Handle(zone);
   intptr_t count = num_imports();
   for (int i = 0; i < count; i++) {
     imported = ImportLibraryAt(i);
@@ -9890,7 +9903,7 @@
       return true;
     }
   }
-  LibraryPrefix& prefix = LibraryPrefix::Handle(isolate);
+  LibraryPrefix& prefix = LibraryPrefix::Handle(zone);
   LibraryPrefixIterator it(*this);
   while (it.HasNext()) {
     prefix = it.GetNext();
@@ -10088,11 +10101,13 @@
 
 // Returns library with given url in current isolate, or NULL.
 RawLibrary* Library::LookupLibrary(const String &url) {
-  Isolate* isolate = Isolate::Current();
-  Library& lib = Library::Handle(isolate, Library::null());
-  String& lib_url = String::Handle(isolate, String::null());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  Library& lib = Library::Handle(zone, Library::null());
+  String& lib_url = String::Handle(zone, String::null());
   GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      isolate, isolate->object_store()->libraries());
+      zone, isolate->object_store()->libraries());
   for (int i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
     lib_url ^= lib.url();
@@ -10261,11 +10276,6 @@
 }
 
 
-RawLibrary* Library::ProfilerLibrary() {
-  return Isolate::Current()->object_store()->profiler_library();
-}
-
-
 RawLibrary* Library::TypedDataLibrary() {
   return Isolate::Current()->object_store()->typed_data_library();
 }
@@ -10426,14 +10436,15 @@
 RawInstance* LibraryPrefix::LoadError() const {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   ObjectStore* object_store = isolate->object_store();
   GrowableObjectArray& libs =
-      GrowableObjectArray::Handle(isolate, object_store->libraries());
+      GrowableObjectArray::Handle(zone, object_store->libraries());
   ASSERT(!libs.IsNull());
   LibraryLoadErrorSet set(HashTables::New<LibraryLoadErrorSet>(libs.Length()));
   object_store->set_library_load_error_table(set.Release());
-  Library& lib = Library::Handle(isolate);
-  Instance& error = Instance::Handle(isolate);
+  Library& lib = Library::Handle(zone);
+  Instance& error = Instance::Handle(zone);
   for (int32_t i = 0; i < num_imports(); i++) {
     lib = GetLibrary(i);
     ASSERT(!lib.IsNull());
@@ -10562,14 +10573,16 @@
     this->set_is_loaded();
     return true;
   } else if (deferred_lib.LoadNotStarted()) {
-    Isolate* isolate = Isolate::Current();
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
     Api::Scope api_scope(isolate);
+    Zone* zone = thread->zone();
     deferred_lib.SetLoadRequested();
     const GrowableObjectArray& pending_deferred_loads =
         GrowableObjectArray::Handle(
             isolate->object_store()->pending_deferred_loads());
     pending_deferred_loads.Add(deferred_lib);
-    const String& lib_url = String::Handle(isolate, deferred_lib.url());
+    const String& lib_url = String::Handle(zone, deferred_lib.url());
     Dart_LibraryTagHandler handler = isolate->library_tag_handler();
     handler(Dart_kImportTag,
             Api::NewHandle(isolate, importer()),
@@ -10802,12 +10815,12 @@
 // Look up object with given name in library and filter out hidden
 // names. Also look up getters and setters.
 RawObject* Namespace::Lookup(const String& name) const {
-  Isolate* isolate = Isolate::Current();
-  const Library& lib = Library::Handle(isolate, library());
+  Zone* zone = Thread::Current()->zone();
+  const Library& lib = Library::Handle(zone, library());
   intptr_t ignore = 0;
 
   // Lookup the name in the library's symbols.
-  Object& obj = Object::Handle(isolate, lib.LookupEntry(name, &ignore));
+  Object& obj = Object::Handle(zone, lib.LookupEntry(name, &ignore));
   if (!Field::IsGetterName(name) &&
       !Field::IsSetterName(name) &&
       (obj.IsNull() || obj.IsLibraryPrefix())) {
@@ -11111,18 +11124,23 @@
     uword imm;
     Object& obj = Object::Handle();
     for (intptr_t i = 0; i < Length(); i++) {
+      JSONObject jsentry(stream);
+      jsentry.AddProperty("offset", OffsetFromIndex(i));
       switch (InfoAt(i)) {
       case ObjectPool::kTaggedObject:
         obj = ObjectAt(i);
-        jsarr.AddValue(obj);
+        jsentry.AddProperty("kind", "Object");
+        jsentry.AddProperty("value", obj);
         break;
       case ObjectPool::kImmediate:
         imm = RawValueAt(i);
-        jsarr.AddValue64(imm);
+        jsentry.AddProperty("kind", "Immediate");
+        jsentry.AddProperty64("value", imm);
         break;
       case ObjectPool::kNativeEntry:
         imm = RawValueAt(i);
-        jsarr.AddValueF("0x%" Px, imm);
+        jsentry.AddProperty("kind", "NativeEntry");
+        jsentry.AddProperty64("value", imm);
         break;
       default:
         UNREACHABLE();
@@ -11325,7 +11343,7 @@
   Iterator iter(*this, RawPcDescriptors::kDeopt | RawPcDescriptors::kIcCall);
   while (iter.MoveNext()) {
     // 'deopt_id' is set for kDeopt and kIcCall and must be unique for one kind.
-    if (Isolate::IsDeoptAfter(iter.DeoptId())) {
+    if (Thread::IsDeoptAfter(iter.DeoptId())) {
       // TODO(vegorov): some instructions contain multiple calls and have
       // multiple "after" targets recorded. Right now it is benign but might
       // lead to issues in the future. Fix that and enable verification.
@@ -12489,7 +12507,7 @@
     NoSafepointScope no_safepoint;
     result ^= raw;
   }
-  result.set_deopt_id(Isolate::kNoDeoptId);
+  result.set_deopt_id(Thread::kNoDeoptId);
   result.set_state_bits(0);
   return result.raw();
 }
@@ -13244,7 +13262,7 @@
       return iter.DeoptId();
     }
   }
-  return Isolate::kNoDeoptId;
+  return Thread::kNoDeoptId;
 }
 
 
@@ -13920,7 +13938,14 @@
 
 
 void MegamorphicCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Object::PrintJSONImpl(stream, ref);
+  JSONObject jsobj(stream);
+  AddCommonObjectProperties(&jsobj, "Object", ref);
+  jsobj.AddServiceId(*this);
+  if (ref) {
+    return;
+  }
+  jsobj.AddProperty("_buckets", Object::Handle(buckets()));
+  jsobj.AddProperty("_mask", mask());
 }
 
 
@@ -14582,9 +14607,9 @@
   if (other.IsVoidType()) {
     return false;
   }
-  Isolate* isolate = Isolate::Current();
-  const Class& cls = Class::Handle(isolate, clazz());
-  TypeArguments& type_arguments = TypeArguments::Handle(isolate);
+  Zone* zone = Thread::Current()->zone();
+  const Class& cls = Class::Handle(zone, clazz());
+  TypeArguments& type_arguments = TypeArguments::Handle(zone);
   if (cls.NumTypeArguments() > 0) {
     type_arguments = GetTypeArguments();
     ASSERT(type_arguments.IsNull() || type_arguments.IsCanonical());
@@ -14599,12 +14624,12 @@
     ASSERT(type_arguments.IsNull() ||
            (type_arguments.Length() >= cls.NumTypeArguments()));
   }
-  Class& other_class = Class::Handle(isolate);
-  TypeArguments& other_type_arguments = TypeArguments::Handle(isolate);
+  Class& other_class = Class::Handle(zone);
+  TypeArguments& other_type_arguments = TypeArguments::Handle(zone);
   // Note that we may encounter a bound error in checked mode.
   if (!other.IsInstantiated()) {
     const AbstractType& instantiated_other = AbstractType::Handle(
-        isolate, other.InstantiateFrom(other_instantiator, bound_error));
+        zone, other.InstantiateFrom(other_instantiator, bound_error));
     if ((bound_error != NULL) && !bound_error->IsNull()) {
       ASSERT(Isolate::Current()->flags().type_checks());
       return false;
@@ -14722,9 +14747,9 @@
 
 
 bool Instance::IsValidFieldOffset(intptr_t offset) const {
-  Isolate* isolate = Isolate::Current();
-  REUSABLE_CLASS_HANDLESCOPE(isolate);
-  Class& cls = isolate->ClassHandle();
+  Thread* thread = Thread::Current();
+  REUSABLE_CLASS_HANDLESCOPE(thread);
+  Class& cls = thread->ClassHandle();
   cls = clazz();
   return (offset >= 0 && offset <= (cls.instance_size() - kWordSize));
 }
@@ -15791,9 +15816,11 @@
     ASSERT(IsMalformed() || TypeArguments::Handle(arguments()).IsOld());
     return this->raw();
   }
-  Isolate* isolate = Isolate::Current();
-  Type& type = Type::Handle(isolate);
-  const Class& cls = Class::Handle(isolate, type_class());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  Type& type = Type::Handle(zone);
+  const Class& cls = Class::Handle(zone, type_class());
   if (cls.raw() == Object::dynamic_class() && (isolate != Dart::vm_isolate())) {
     return Object::dynamic_type();
   }
@@ -15811,7 +15838,7 @@
     return type.raw();
   }
 
-  Array& canonical_types = Array::Handle(isolate);
+  Array& canonical_types = Array::Handle(zone);
   canonical_types ^= cls.canonical_types();
   if (canonical_types.IsNull()) {
     canonical_types = empty_array().raw();
@@ -15837,7 +15864,7 @@
   // The type was not found in the table. It is not canonical yet.
 
   // Canonicalize the type arguments.
-  TypeArguments& type_args = TypeArguments::Handle(isolate, 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()));
@@ -15871,7 +15898,7 @@
         (length + 64) :
         ((length == 0) ? 2 : (length * 2));
     const Array& new_canonical_types = Array::Handle(
-        isolate, Array::Grow(canonical_types, new_length, Heap::kOld));
+        zone, Array::Grow(canonical_types, new_length, Heap::kOld));
     cls.set_canonical_types(new_canonical_types);
     canonical_types = new_canonical_types.raw();
   }
@@ -15891,11 +15918,11 @@
     // of the super class of the owner class of its signature function will be
     // prepended to the type argument vector during class finalization.
     const TypeArguments& type_params =
-      TypeArguments::Handle(isolate, cls.type_parameters());
+        TypeArguments::Handle(zone, cls.type_parameters());
     const intptr_t num_type_params = cls.NumTypeParameters();
     const intptr_t num_type_args = cls.NumTypeArguments();
-    AbstractType& type_arg = AbstractType::Handle(isolate);
-    TypeParameter& type_param = TypeParameter::Handle(isolate);
+    AbstractType& type_arg = AbstractType::Handle(zone);
+    TypeParameter& type_param = TypeParameter::Handle(zone);
     for (intptr_t i = 0; i < num_type_params; i++) {
       type_arg = type_args.TypeAt(num_type_args - num_type_params + i);
       while (type_arg.IsBoundedType()) {
@@ -17539,9 +17566,11 @@
 
 
 RawBigint* Bigint::New(Heap::Space space) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate->object_store()->bigint_class() != Class::null());
-  Bigint& result = Bigint::Handle(isolate);
+  Bigint& result = Bigint::Handle(zone);
   {
     RawObject* raw = Object::Allocate(Bigint::kClassId,
                                       Bigint::InstanceSize(),
@@ -17552,7 +17581,7 @@
   result.SetNeg(false);
   result.SetUsed(0);
   result.set_digits(
-      TypedData::Handle(isolate, TypedData::EmptyUint32Array(isolate)));
+      TypedData::Handle(zone, TypedData::EmptyUint32Array(isolate)));
   return result.raw();
 }
 
@@ -17561,9 +17590,11 @@
                        Heap::Space space) {
   ASSERT((used == 0) ||
          (!digits.IsNull() && (digits.Length() >= (used + (used & 1)))));
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate->object_store()->bigint_class() != Class::null());
-  Bigint& result = Bigint::Handle(isolate);
+  Bigint& result = Bigint::Handle(zone);
   {
     RawObject* raw = Object::Allocate(Bigint::kClassId,
                                       Bigint::InstanceSize(),
@@ -17584,7 +17615,7 @@
   } else {
     neg = false;
     result.set_digits(
-        TypedData::Handle(isolate, TypedData::EmptyUint32Array(isolate)));
+        TypedData::Handle(zone, TypedData::EmptyUint32Array(isolate)));
   }
   result.SetNeg(neg);
   result.SetUsed(used);
@@ -20069,17 +20100,17 @@
 RawArray* Array::Grow(const Array& source,
                       intptr_t new_length,
                       Heap::Space space) {
-  Isolate* isolate = Isolate::Current();
-  const Array& result = Array::Handle(isolate, Array::New(new_length, space));
+  Zone* zone = Thread::Current()->zone();
+  const Array& result = Array::Handle(zone, Array::New(new_length, space));
   intptr_t len = 0;
   if (!source.IsNull()) {
     len = source.Length();
     result.SetTypeArguments(
-        TypeArguments::Handle(isolate, source.GetTypeArguments()));
+        TypeArguments::Handle(zone, source.GetTypeArguments()));
   }
   ASSERT(new_length >= len);  // Cannot copy 'source' into new array.
   ASSERT(new_length != len);  // Unnecessary copying of array.
-  PassiveObject& obj = PassiveObject::Handle(isolate);
+  PassiveObject& obj = PassiveObject::Handle(zone);
   for (int i = 0; i < len; i++) {
     obj = source.At(i);
     result.SetAt(i, obj);
@@ -20100,8 +20131,8 @@
     return Object::empty_array().raw();
   }
   intptr_t capacity_len = growable_array.Capacity();
-  Isolate* isolate = Isolate::Current();
-  const Array& array = Array::Handle(isolate, growable_array.data());
+  Zone* zone = Thread::Current()->zone();
+  const Array& array = Array::Handle(zone, growable_array.data());
   array.SetTypeArguments(type_arguments);
   intptr_t capacity_size = Array::InstanceSize(capacity_len);
   intptr_t used_size = Array::InstanceSize(used_len);
@@ -20320,9 +20351,9 @@
     }
     // TODO(koda): Ensure VM classes only produce Smi hash codes, and remove
     // non-Smi cases once Dart-side implementation is complete.
-    Isolate* isolate = Isolate::Current();
-    REUSABLE_INSTANCE_HANDLESCOPE(isolate);
-    Instance& hash_code = isolate->InstanceHandle();
+    Thread* thread = Thread::Current();
+    REUSABLE_INSTANCE_HANDLESCOPE(thread);
+    Instance& hash_code = thread->InstanceHandle();
     hash_code ^= Instance::Cast(obj).HashCode();
     if (hash_code.IsSmi()) {
       // May waste some bits on 64-bit, to ensure consistency with non-Smi case.
@@ -20777,7 +20808,7 @@
     // Already created.
     return isolate->object_store()->empty_uint32_array();
   }
-  const TypedData& array = TypedData::Handle(isolate,
+  const TypedData& array = TypedData::Handle(isolate->current_zone(),
       TypedData::New(kTypedDataUint32ArrayCid, 0, Heap::kOld));
   isolate->object_store()->set_empty_uint32_array(array);
   return array.raw();
@@ -20889,11 +20920,12 @@
                                  bool is_control_port,
                                  Heap::Space space) {
   ASSERT(id != ILLEGAL_PORT);
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
   const SendPort& send_port =
-      SendPort::Handle(isolate, SendPort::New(id, isolate->origin_id()));
+      SendPort::Handle(zone, SendPort::New(id, thread->isolate()->origin_id()));
 
-  ReceivePort& result = ReceivePort::Handle(isolate);
+  ReceivePort& result = ReceivePort::Handle(zone);
   {
     RawObject* raw = Object::Allocate(ReceivePort::kClassId,
                                       ReceivePort::InstanceSize(),
@@ -21448,14 +21480,16 @@
 
 
 RawUserTag* UserTag::DefaultTag() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
   if (isolate->default_tag() != UserTag::null()) {
     // Already created.
     return isolate->default_tag();
   }
   // Create default tag.
-  const UserTag& result = UserTag::Handle(isolate,
+  const UserTag& result = UserTag::Handle(zone,
                                           UserTag::New(Symbols::Default()));
   ASSERT(result.tag() == UserTags::kDefaultUserTag);
   isolate->set_default_tag(result);
@@ -21466,9 +21500,9 @@
 RawUserTag* UserTag::FindTagInIsolate(Isolate* isolate, const String& label) {
   ASSERT(isolate->tag_table() != GrowableObjectArray::null());
   const GrowableObjectArray& tag_table = GrowableObjectArray::Handle(
-      isolate, isolate->tag_table());
-  UserTag& other = UserTag::Handle(isolate);
-  String& tag_label = String::Handle(isolate);
+      isolate->current_zone(), isolate->tag_table());
+  UserTag& other = UserTag::Handle(isolate->current_zone());
+  String& tag_label = String::Handle(isolate->current_zone());
   for (intptr_t i = 0; i < tag_table.Length(); i++) {
     other ^= tag_table.At(i);
     ASSERT(!other.IsNull());
@@ -21485,11 +21519,11 @@
 void UserTag::AddTagToIsolate(Isolate* isolate, const UserTag& tag) {
   ASSERT(isolate->tag_table() != GrowableObjectArray::null());
   const GrowableObjectArray& tag_table = GrowableObjectArray::Handle(
-      isolate, isolate->tag_table());
+      isolate->current_zone(), isolate->tag_table());
   ASSERT(!TagTableIsFull(isolate));
 #if defined(DEBUG)
   // Verify that no existing tag has the same tag id.
-  UserTag& other = UserTag::Handle(isolate);
+  UserTag& other = UserTag::Handle(isolate->current_zone());
   for (intptr_t i = 0; i < tag_table.Length(); i++) {
     other ^= tag_table.At(i);
     ASSERT(!other.IsNull());
@@ -21509,18 +21543,20 @@
 bool UserTag::TagTableIsFull(Isolate* isolate) {
   ASSERT(isolate->tag_table() != GrowableObjectArray::null());
   const GrowableObjectArray& tag_table = GrowableObjectArray::Handle(
-      isolate, isolate->tag_table());
+      isolate->current_zone(), isolate->tag_table());
   ASSERT(tag_table.Length() <= UserTags::kMaxUserTags);
   return tag_table.Length() == UserTags::kMaxUserTags;
 }
 
 
 RawUserTag* UserTag::FindTagById(uword tag_id) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate->tag_table() != GrowableObjectArray::null());
   const GrowableObjectArray& tag_table = GrowableObjectArray::Handle(
-      isolate, isolate->tag_table());
-  UserTag& tag = UserTag::Handle(isolate);
+      zone, isolate->tag_table());
+  UserTag& tag = UserTag::Handle(zone);
   for (intptr_t i = 0; i < tag_table.Length(); i++) {
     tag ^= tag_table.At(i);
     if (tag.tag() == tag_id) {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 6a7076a..2c94f2d 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -65,20 +65,12 @@
     initializeHandle(obj, raw_ptr);                                            \
     return *obj;                                                               \
   }                                                                            \
-  /* DEPRECATED: Use Zone version. */                                          \
-  static object& Handle(Isolate* isolate, Raw##object* raw_ptr) {              \
-    return Handle(isolate->current_zone(), raw_ptr);                           \
-  }                                                                            \
   static object& Handle() {                                                    \
     return Handle(Thread::Current()->zone(), object::null());                  \
   }                                                                            \
   static object& Handle(Zone* zone) {                                          \
     return Handle(zone, object::null());                                       \
   }                                                                            \
-  /* DEPRECATED: Use Zone version. */                                          \
-  static object& Handle(Isolate* isolate) {                                    \
-    return Handle(isolate->current_zone(), object::null());                    \
-  }                                                                            \
   static object& Handle(Raw##object* raw_ptr) {                                \
     return Handle(Thread::Current()->zone(), raw_ptr);                         \
   }                                                                            \
@@ -180,7 +172,8 @@
   static Raw##object* ReadFrom(SnapshotReader* reader,                         \
                                intptr_t object_id,                             \
                                intptr_t tags,                                  \
-                               Snapshot::Kind);                                \
+                               Snapshot::Kind,                                 \
+                               bool as_reference);                             \
   friend class SnapshotReader;                                                 \
 
 #define OBJECT_IMPLEMENTATION(object, super)                                   \
@@ -203,8 +196,8 @@
     return raw()->ptr();                                                       \
   }                                                                            \
   SNAPSHOT_READER_SUPPORT(object)                                              \
-  friend class Isolate;                                                        \
   friend class StackFrame;                                                     \
+  friend class Thread;                                                         \
 
 // This macro is used to denote types that do not have a sub-type.
 #define FINAL_HEAP_OBJECT_IMPLEMENTATION_HELPER(object, rettype, super)        \
@@ -228,8 +221,8 @@
     return -kWordSize;                                                         \
   }                                                                            \
   SNAPSHOT_READER_SUPPORT(rettype)                                             \
-  friend class Isolate;                                                        \
   friend class StackFrame;                                                     \
+  friend class Thread;                                                         \
 
 #define FINAL_HEAP_OBJECT_IMPLEMENTATION(object, super)                        \
   FINAL_HEAP_OBJECT_IMPLEMENTATION_HELPER(object, object, super)               \
@@ -327,10 +320,6 @@
     initializeHandle(obj, raw_ptr);
     return *obj;
   }
-  // DEPRECATED: Use Zone version.
-  static Object& Handle(Isolate* isolate, RawObject* raw_ptr) {
-    return Handle(isolate->current_zone(), raw_ptr);
-  }
   static Object* ReadOnlyHandle() {
     Object* obj = reinterpret_cast<Object*>(
         Dart::AllocateReadOnlyHandle());
@@ -345,10 +334,6 @@
   static Object& Handle(Zone* zone) {
     return Handle(zone, null_);
   }
-  // DEPRECATED: Use Zone version.
-  static Object& Handle(Isolate* isolate) {
-    return Handle(isolate->current_zone(), null_);
-  }
 
   static Object& Handle(RawObject* raw_ptr) {
     return Handle(Thread::Current()->zone(), raw_ptr);
@@ -822,7 +807,8 @@
   friend class TwoByteString;
   friend class ExternalOneByteString;
   friend class ExternalTwoByteString;
-  friend class Isolate;
+  friend class Thread;
+
 #define REUSABLE_FRIEND_DECLARATION(name)                                      \
   friend class Reusable##name##HandleScope;
 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
@@ -849,10 +835,6 @@
     obj->set_vtable(0);
     return *obj;
   }
-  // DEPRECATED - use Zone version.
-  static PassiveObject& Handle(Isolate* I, RawObject* raw_ptr) {
-    return Handle(I->current_zone(), raw_ptr);
-  }
   static PassiveObject& Handle(RawObject* raw_ptr) {
     return Handle(Thread::Current()->zone(), raw_ptr);
   }
@@ -862,10 +844,6 @@
   static PassiveObject& Handle(Zone* zone) {
     return Handle(zone, Object::null());
   }
-  // DEPRECATED - use Zone version.
-  static PassiveObject& Handle(Isolate* I) {
-    return Handle(I, Object::null());
-  }
   static PassiveObject& ZoneHandle(Zone* zone, RawObject* raw_ptr) {
     PassiveObject* obj = reinterpret_cast<PassiveObject*>(
         VMHandles::AllocateZoneHandle(zone));
@@ -1182,6 +1160,7 @@
   RawGrowableObjectArray* closures() const {
     return raw_ptr()->closure_functions_;
   }
+  void set_closures(const GrowableObjectArray& value) const;
   void AddClosureFunction(const Function& function) const;
   RawFunction* LookupClosureFunction(intptr_t token_pos) const;
   intptr_t FindClosureIndex(const Function& function) const;
@@ -3489,7 +3468,6 @@
   static RawLibrary* MathLibrary();
   static RawLibrary* MirrorsLibrary();
   static RawLibrary* NativeWrappersLibrary();
-  static RawLibrary* ProfilerLibrary();
   static RawLibrary* TypedDataLibrary();
   static RawLibrary* VMServiceLibrary();
 
@@ -3956,6 +3934,14 @@
     StoreNonPointer(&raw_ptr()->register_bit_count_, register_bit_count);
   }
 
+  bool Equals(const Stackmap& other) const {
+    if (Length() != other.Length()) {
+      return false;
+    }
+    NoSafepointScope no_safepoint;
+    return memcmp(raw_ptr(), other.raw_ptr(), InstanceSize(Length())) == 0;
+  }
+
   static const intptr_t kMaxLengthInBytes = kSmiMax;
 
   static intptr_t InstanceSize() {
@@ -6392,7 +6378,8 @@
   static RawOneByteString* ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind);
+                                    Snapshot::Kind kind,
+                                    bool as_reference);
 
   friend class Class;
   friend class String;
@@ -6507,7 +6494,8 @@
   static RawTwoByteString* ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind);
+                                    Snapshot::Kind kind,
+                                    bool as_reference);
 
   friend class Class;
   friend class String;
@@ -6585,7 +6573,8 @@
   static RawExternalOneByteString* ReadFrom(SnapshotReader* reader,
                                             intptr_t object_id,
                                             intptr_t tags,
-                                            Snapshot::Kind kind);
+                                            Snapshot::Kind kind,
+                                            bool as_reference);
 
   static intptr_t NextFieldOffset() {
     // Indicates this class cannot be extended by dart code.
@@ -6664,7 +6653,8 @@
   static RawExternalTwoByteString* ReadFrom(SnapshotReader* reader,
                                             intptr_t object_id,
                                             intptr_t tags,
-                                            Snapshot::Kind kind);
+                                            Snapshot::Kind kind,
+                                            bool as_reference);
 
   static intptr_t NextFieldOffset() {
     // Indicates this class cannot be extended by dart code.
@@ -6836,7 +6826,8 @@
   static RawImmutableArray* ReadFrom(SnapshotReader* reader,
                                      intptr_t object_id,
                                      intptr_t tags,
-                                     Snapshot::Kind kind);
+                                     Snapshot::Kind kind,
+                                     bool as_reference);
 
   static const ClassId kClassId = kImmutableArrayCid;
 
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index b32fa20..3a56dc9 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -442,9 +442,9 @@
 
   virtual Direction VisitObject(ObjectGraph::StackIterator* it) {
     RawObject* raw_obj = it->Get();
-    Isolate* isolate = Isolate::Current();
-    REUSABLE_OBJECT_HANDLESCOPE(isolate);
-    Object& obj = isolate->ObjectHandle();
+    Thread* thread = Thread::Current();
+    REUSABLE_OBJECT_HANDLESCOPE(thread);
+    Object& obj = thread->ObjectHandle();
     obj = raw_obj;
     // Each object is a header + a zero-terminated list of its neighbors.
     WriteHeader(raw_obj, raw_obj->Size(), obj.GetClassId(), stream_);
diff --git a/runtime/vm/object_id_ring.h b/runtime/vm/object_id_ring.h
index a936a8f..b3ad0c9 100644
--- a/runtime/vm/object_id_ring.h
+++ b/runtime/vm/object_id_ring.h
@@ -36,7 +36,7 @@
 
   static const int32_t kMaxId = 0x3FFFFFFF;
   static const int32_t kInvalidId = -1;
-  static const int32_t kDefaultCapacity = 1024;
+  static const int32_t kDefaultCapacity = 8192;
 
   static void Init(Isolate* isolate, int32_t capacity = kDefaultCapacity);
 
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index 88c77eb..e70c76a 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -68,7 +68,6 @@
     math_library_(Library::null()),
     mirrors_library_(Library::null()),
     native_wrappers_library_(Library::null()),
-    profiler_library_(Library::null()),
     root_library_(Library::null()),
     typed_data_library_(Library::null()),
     vmservice_library_(Library::null()),
@@ -117,7 +116,9 @@
 
 
 bool ObjectStore::PreallocateObjects() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   ASSERT(isolate != NULL && isolate->object_store() == this);
   if (this->stack_overflow() != Instance::null()) {
     ASSERT(this->out_of_memory() != Instance::null());
@@ -161,14 +162,14 @@
   // pre-allocated OutOfMemoryError.
   const UnhandledException& unhandled_exception = UnhandledException::Handle(
       UnhandledException::New(Instance::Cast(result),
-                              Stacktrace::Handle(isolate)));
+                              Stacktrace::Handle(zone)));
   set_preallocated_unhandled_exception(unhandled_exception);
 
-  const Array& code_array = Array::Handle(isolate,
+  const Array& code_array = Array::Handle(zone,
       Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
-  const Array& pc_offset_array = Array::Handle(isolate,
+  const Array& pc_offset_array = Array::Handle(zone,
       Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
-  const Stacktrace& stack_trace = Stacktrace::Handle(isolate,
+  const Stacktrace& stack_trace = Stacktrace::Handle(zone,
       Stacktrace::New(code_array, pc_offset_array));
   // Expansion of inlined functions requires additional memory at run time,
   // avoid it.
@@ -180,12 +181,14 @@
 
 
 void ObjectStore::InitKnownObjects() {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL && isolate->object_store() == this);
 
   const Library& async_lib = Library::Handle(async_library());
   ASSERT(!async_lib.IsNull());
-  Class& cls = Class::Handle(isolate);
+  Class& cls = Class::Handle(zone);
   cls = async_lib.LookupClass(Symbols::Future());
   ASSERT(!cls.IsNull());
   set_future_class(cls);
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index 805b9b1..ed902e0 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -30,7 +30,6 @@
     kIsolate,
     kMath,
     kMirrors,
-    kProfiler,
     kTypedData,
     kVMService,
   };
@@ -264,7 +263,6 @@
   RawLibrary* isolate_library() const { return isolate_library_; }
   RawLibrary* math_library() const { return math_library_; }
   RawLibrary* mirrors_library() const { return mirrors_library_; }
-  RawLibrary* profiler_library() const { return profiler_library_; }
   RawLibrary* typed_data_library() const { return typed_data_library_; }
   RawLibrary* vmservice_library() const { return vmservice_library_; }
 
@@ -297,9 +295,6 @@
       case kMirrors:
         mirrors_library_ = value.raw();
         break;
-      case kProfiler:
-        profiler_library_ = value.raw();
-        break;
       case kTypedData:
         typed_data_library_ = value.raw();
         break;
@@ -522,7 +517,6 @@
   RawLibrary* math_library_;
   RawLibrary* mirrors_library_;
   RawLibrary* native_wrappers_library_;
-  RawLibrary* profiler_library_;
   RawLibrary* root_library_;
   RawLibrary* typed_data_library_;
   RawLibrary* vmservice_library_;
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc
index a447e41..aed5d33 100644
--- a/runtime/vm/os_macos.cc
+++ b/runtime/vm/os_macos.cc
@@ -15,7 +15,7 @@
 #include <sys/time.h>  // NOLINT
 #include <sys/resource.h>  // NOLINT
 #include <unistd.h>  // NOLINT
-#if defined(TARGET_OS_IOS)
+#if TARGET_OS_IOS
 #include <sys/sysctl.h>
 #endif
 
@@ -86,7 +86,7 @@
 
 
 int64_t OS::GetCurrentTraceMicros() {
-#if defined(TARGET_OS_IOS)
+#if TARGET_OS_IOS
   // On iOS mach_absolute_time stops while the device is sleeping. Instead use
   // now - KERN_BOOTTIME to get a time difference that is not impacted by clock
   // changes. KERN_BOOTTIME will be updated by the system whenever the system
@@ -118,7 +118,7 @@
   result *= timebase_info.numer;
   result /= timebase_info.denom;
   return result;
-#endif  // defined(TARGET_OS_IOS)
+#endif  // TARGET_OS_IOS
 }
 
 
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index 78580ec..d6ae2b5 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -74,7 +74,12 @@
   bool IsOwnedByCurrentThread() const {
     return owner_ == OSThread::GetCurrentThreadId();
   }
-#endif  // defined(DEBUG)
+#else
+  bool IsOwnedByCurrentThread() const {
+    UNREACHABLE();
+    return false;
+  }
+#endif
 
  private:
   MutexData data_;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index a33c4cc..ec199ea 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -46,6 +46,7 @@
 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
 DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
 DEFINE_FLAG(bool, link_natives_lazily, false, "Link native calls lazily");
+DEFINE_FLAG(bool, move_super, false, "Move super initializer to end of list");
 
 DECLARE_FLAG(bool, lazy_dispatchers);
 DECLARE_FLAG(bool, load_deferred_eagerly);
@@ -2328,11 +2329,12 @@
 }
 
 
-void Parser::GenerateSuperConstructorCall(const Class& cls,
-                                          intptr_t supercall_pos,
-                                          LocalVariable* receiver,
-                                          AstNode* phase_parameter,
-                                          ArgumentListNode* forwarding_args) {
+StaticCallNode* Parser::GenerateSuperConstructorCall(
+      const Class& cls,
+      intptr_t supercall_pos,
+      LocalVariable* receiver,
+      AstNode* phase_parameter,
+      ArgumentListNode* forwarding_args) {
   const Class& super_class = Class::Handle(Z, cls.SuperClass());
   // Omit the implicit super() if there is no super class (i.e.
   // we're not compiling class Object), or if the super class is an
@@ -2340,7 +2342,7 @@
   if (super_class.IsNull() ||
       (super_class.num_native_fields() > 0 &&
        Class::Handle(Z, super_class.SuperClass()).IsObjectClass())) {
-    return;
+    return NULL;
   }
   String& super_ctor_name = String::Handle(Z, super_class.Name());
   super_ctor_name = Symbols::FromConcat(super_ctor_name, Symbols::Dot());
@@ -2391,13 +2393,12 @@
                 String::Handle(Z, super_class.Name()).ToCString(),
                 error_message.ToCString());
   }
-  current_block_->statements->Add(
-      new StaticCallNode(supercall_pos, super_ctor, arguments));
+  return new StaticCallNode(supercall_pos, super_ctor, arguments);
 }
 
 
-AstNode* Parser::ParseSuperInitializer(const Class& cls,
-                                       LocalVariable* receiver) {
+StaticCallNode* Parser::ParseSuperInitializer(const Class& cls,
+                                              LocalVariable* receiver) {
   TRACE_PARSER("ParseSuperInitializer");
   ASSERT(CurrentToken() == Token::kSUPER);
   const intptr_t supercall_pos = TokenPos();
@@ -2728,30 +2729,67 @@
                                LocalVariable* receiver,
                                GrowableArray<Field*>* initialized_fields) {
   TRACE_PARSER("ParseInitializers");
-  bool super_init_seen = false;
+  bool super_init_is_last = false;
+  intptr_t super_init_index = -1;
+  StaticCallNode* super_init_call = NULL;
   if (CurrentToken() == Token::kCOLON) {
     do {
       ConsumeToken();  // Colon or comma.
-      AstNode* init_statement;
       if (CurrentToken() == Token::kSUPER) {
-        if (super_init_seen) {
+        if (super_init_call != NULL) {
           ReportError("duplicate call to super constructor");
         }
-        init_statement = ParseSuperInitializer(cls, receiver);
-        super_init_seen = true;
+        super_init_call = ParseSuperInitializer(cls, receiver);
+        super_init_index = current_block_->statements->length();
+        current_block_->statements->Add(super_init_call);
+        super_init_is_last = true;
       } else {
-        init_statement = ParseInitializer(cls, receiver, initialized_fields);
+        AstNode* init_statement =
+            ParseInitializer(cls, receiver, initialized_fields);
+        super_init_is_last = false;
+        current_block_->statements->Add(init_statement);
       }
-      current_block_->statements->Add(init_statement);
     } while (CurrentToken() == Token::kCOMMA);
   }
-  if (!super_init_seen) {
+  if (super_init_call == NULL) {
     // Generate implicit super() if we haven't seen an explicit super call
     // or constructor redirection.
     AstNode* phase_parameter = new LiteralNode(
         TokenPos(), Smi::ZoneHandle(Z, Smi::New(Function::kCtorPhaseAll)));
-    GenerateSuperConstructorCall(
+    super_init_call = GenerateSuperConstructorCall(
         cls, TokenPos(), receiver, phase_parameter, NULL);
+    if (super_init_call != NULL) {
+      super_init_index = current_block_->statements->length();
+      current_block_->statements->Add(super_init_call);
+      super_init_is_last = true;
+    }
+  }
+  if (FLAG_move_super && (super_init_call != NULL) && !super_init_is_last) {
+    // If the super initializer call is not at the end of the initializer
+    // list, implicitly move it to the end. The actual parameter values
+    // are evaluated at the original position in the list and preserved
+    // in temporary variables. (The following initializer expressions
+    // could have side effects that alter the arguments to the super
+    // initializer.) E.g:
+    // A(x) : super(x), f = x++ { ... }
+    // is transformed to:
+    // A(x) : temp = x, f = x++, super(temp) { ... }
+    ReportWarning("Super initizlizer not at end");
+    ASSERT(super_init_index >= 0);
+    ArgumentListNode* ctor_args = super_init_call->arguments();
+    LetNode* saved_args = new(Z) LetNode(super_init_call->token_pos());
+    // The super initializer call has at least 2 arguments: the
+    // implicit receiver, and the hidden construction phase.
+    ASSERT(ctor_args->length() >= 2);
+    for (int i = 2; i < ctor_args->length(); i++) {
+      AstNode* arg = ctor_args->NodeAt(i);
+      LocalVariable* temp = CreateTempConstVariable(arg->token_pos(), "sca");
+      AstNode* save_temp = new(Z) StoreLocalNode(arg->token_pos(), temp, arg);
+      saved_args->AddNode(save_temp);
+      ctor_args->SetNodeAt(i, new(Z) LoadLocalNode(arg->token_pos(), temp));
+    }
+    current_block_->statements->ReplaceNodeAt(super_init_index, saved_args);
+    current_block_->statements->Add(super_init_call);
   }
   CheckFieldsInitialized(cls);
 }
@@ -2874,12 +2912,15 @@
     }
   }
 
-  GenerateSuperConstructorCall(
+  AstNode* super_call = GenerateSuperConstructorCall(
       current_class(),
       Scanner::kNoSourcePos,
       receiver,
       new LoadLocalNode(Scanner::kNoSourcePos, phase_parameter),
       forwarding_args);
+  if (super_call != NULL) {
+    current_block_->statements->Add(super_call);
+  }
   CheckFieldsInitialized(current_class());
 
   // Empty constructor body.
@@ -3091,6 +3132,7 @@
     }
   }
   if (super_call != NULL) {
+    ASSERT(!FLAG_move_super);
     // Generate an implicit call to the super constructor's body.
     // We need to patch the super _initializer_ call so that it
     // saves the evaluated actual arguments in temporary variables.
@@ -3119,6 +3161,7 @@
 
   // Insert the implicit super call to the super constructor body.
   if (super_call != NULL) {
+    ASSERT(!FLAG_move_super);
     ArgumentListNode* initializer_args = super_call->arguments();
     const Function& super_ctor = super_call->function();
     // Patch the initializer call so it only executes the super initializer.
@@ -4826,7 +4869,7 @@
   enum_members.AddFunction(to_string_func);
 
   // Clone the hashCode getter function from the helper class.
-  Function& hash_code_func = Function::Handle(I,
+  Function& hash_code_func = Function::Handle(Z,
       helper_class.LookupDynamicFunctionAllowPrivate(Symbols::hashCode()));
   ASSERT(!hash_code_func.IsNull());
   hash_code_func = hash_code_func.Clone(cls);
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 24ff1ac..433a0c4 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -476,12 +476,15 @@
       AstNode* instance,
       Field* field,
       AstNode* init_value);
-  void GenerateSuperConstructorCall(const Class& cls,
-                                    intptr_t supercall_pos,
-                                    LocalVariable* receiver,
-                                    AstNode* phase_parameter,
-                                    ArgumentListNode* forwarding_args);
-  AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver);
+  StaticCallNode* GenerateSuperConstructorCall(
+      const Class& cls,
+      intptr_t supercall_pos,
+      LocalVariable* receiver,
+      AstNode* phase_parameter,
+      ArgumentListNode* forwarding_args);
+  StaticCallNode* ParseSuperInitializer(
+      const Class& cls,
+      LocalVariable* receiver);
   AstNode* ParseInitializer(const Class& cls,
                             LocalVariable* receiver,
                             GrowableArray<Field*>* initialized_fields);
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index b08183f..f061da0 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -47,21 +47,23 @@
 
 
 Precompiler::Precompiler(Thread* thread, bool reset_fields) :
-  thread_(thread),
-  zone_(thread->zone()),
-  isolate_(thread->isolate()),
-  reset_fields_(reset_fields),
-  changed_(false),
-  function_count_(0),
-  class_count_(0),
-  selector_count_(0),
-  dropped_function_count_(0),
-  libraries_(GrowableObjectArray::Handle(Z, I->object_store()->libraries())),
-  pending_functions_(GrowableObjectArray::Handle(Z,
-                                                 GrowableObjectArray::New())),
-  collected_closures_(GrowableObjectArray::Handle(Z, I->collected_closures())),
-  sent_selectors_(Z),
-  error_(Error::Handle(Z)) {
+    thread_(thread),
+    zone_(thread->zone()),
+    isolate_(thread->isolate()),
+    reset_fields_(reset_fields),
+    changed_(false),
+    function_count_(0),
+    class_count_(0),
+    selector_count_(0),
+    dropped_function_count_(0),
+    libraries_(GrowableObjectArray::Handle(Z, I->object_store()->libraries())),
+    pending_functions_(
+        GrowableObjectArray::Handle(Z, GrowableObjectArray::New())),
+    collected_closures_(
+        GrowableObjectArray::Handle(Z, GrowableObjectArray::New())),
+    sent_selectors_(),
+    error_(Error::Handle(Z)) {
+  I->set_collected_closures(collected_closures_);
 }
 
 
@@ -97,35 +99,13 @@
 
 
 void Precompiler::ClearAllCode() {
-  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();
-      error_ = cls.EnsureIsFinalized(thread_);
-      if (!error_.IsNull()) {
-        Jump(error_);
-      }
+  class CodeCodeFunctionVisitor : public FunctionVisitor {
+    void VisitFunction(const Function& function) {
+      function.ClearCode();
     }
-  }
-
-  for (intptr_t i = 0; i < libraries_.Length(); i++) {
-    lib ^= libraries_.At(i);
-    ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
-    while (it.HasNext()) {
-      cls = it.GetNextClass();
-      functions = cls.functions();
-      for (intptr_t i = 0; i < functions.Length(); i++) {
-        function ^= functions.At(i);
-        function.ClearCode();
-      }
-    }
-  }
+  };
+  CodeCodeFunctionVisitor visitor;
+  VisitFunctions(&visitor);
 }
 
 
@@ -331,6 +311,8 @@
   // TODO(rmacnak): DropEmptyClasses();
 
   BindStaticCalls();
+
+  DedupStackmaps();
 }
 
 
@@ -483,7 +465,7 @@
   if (selector.IsNull()) {
     return false;
   }
-  return sent_selectors_.Includes(selector);
+  return sent_selectors_.Lookup(&selector) != NULL;
 }
 
 
@@ -491,7 +473,7 @@
   ASSERT(!selector.IsNull());
 
   if (!IsSent(selector)) {
-    sent_selectors_.Add(selector);
+    sent_selectors_.Insert(&String::ZoneHandle(Z, selector.raw()));
     selector_count_++;
     changed_ = true;
 
@@ -685,10 +667,20 @@
 
       closures = cls.closures();
       if (!closures.IsNull()) {
+        retained_functions = GrowableObjectArray::New();
         for (intptr_t j = 0; j < closures.Length(); j++) {
           function ^= closures.At(j);
-          ASSERT(function.HasCode());
+          if (function.HasCode()) {
+            retained_functions.Add(function);
+          } else {
+            dropped_function_count_++;
+            if (FLAG_trace_precompiler) {
+              THR_Print("Precompilation dropping %s\n",
+                        function.ToLibNamePrefixedQualifiedCString());
+            }
+          }
         }
+        cls.set_closures(retained_functions);
       }
     }
   }
@@ -696,6 +688,110 @@
 
 
 void Precompiler::BindStaticCalls() {
+  class BindStaticCallsVisitor : public FunctionVisitor {
+   public:
+    explicit BindStaticCallsVisitor(Zone* zone) :
+        code_(Code::Handle(zone)),
+        table_(Array::Handle(zone)),
+        pc_offset_(Smi::Handle(zone)),
+        target_(Function::Handle(zone)),
+        target_code_(Code::Handle(zone)) {
+    }
+
+    void VisitFunction(const Function& function) {
+      ASSERT(function.HasCode());
+      code_ = function.CurrentCode();
+      table_ = code_.static_calls_target_table();
+
+      for (intptr_t i = 0;
+           i < table_.Length();
+           i += Code::kSCallTableEntryLength) {
+        pc_offset_ ^= table_.At(i + Code::kSCallTableOffsetEntry);
+        target_ ^= table_.At(i + Code::kSCallTableFunctionEntry);
+        if (target_.IsNull()) {
+          target_code_ ^= table_.At(i + Code::kSCallTableCodeEntry);
+          ASSERT(!target_code_.IsNull());
+          ASSERT(!target_code_.IsFunctionCode());
+          // Allocation stub or AllocateContext or AllocateArray or ...
+        } else {
+          // Static calls initially call the CallStaticFunction stub because
+          // their target might not be compiled yet. After tree shaking, all
+          // static call targets are compiled.
+          // Cf. runtime entry PatchStaticCall called from CallStaticFunction
+          // stub.
+          ASSERT(target_.HasCode());
+          target_code_ ^= target_.CurrentCode();
+          uword pc = pc_offset_.Value() + code_.EntryPoint();
+          CodePatcher::PatchStaticCallAt(pc, code_, target_code_);
+        }
+      }
+
+      // We won't patch static calls anymore, so drop the static call table to
+      // save space.
+      code_.set_static_calls_target_table(Object::empty_array());
+    }
+
+   private:
+    Code& code_;
+    Array& table_;
+    Smi& pc_offset_;
+    Function& target_;
+    Code& target_code_;
+  };
+
+  BindStaticCallsVisitor visitor(Z);
+  VisitFunctions(&visitor);
+}
+
+
+void Precompiler::DedupStackmaps() {
+  class DedupStackmapsVisitor : public FunctionVisitor {
+   public:
+    explicit DedupStackmapsVisitor(Zone* zone) :
+      zone_(zone),
+      canonical_stackmaps_(),
+      code_(Code::Handle(zone)),
+      stackmaps_(Array::Handle(zone)),
+      stackmap_(Stackmap::Handle(zone)) {
+    }
+
+    void VisitFunction(const Function& function) {
+      code_ = function.CurrentCode();
+      stackmaps_ = code_.stackmaps();
+      if (stackmaps_.IsNull()) return;
+      for (intptr_t i = 0; i < stackmaps_.Length(); i++) {
+        stackmap_ ^= stackmaps_.At(i);
+        stackmap_ = DedupStackmap(stackmap_);
+        stackmaps_.SetAt(i, stackmap_);
+      }
+    }
+
+    RawStackmap* DedupStackmap(const Stackmap& stackmap) {
+      const Stackmap* canonical_stackmap =
+          canonical_stackmaps_.Lookup(&stackmap);
+      if (canonical_stackmap == NULL) {
+        canonical_stackmaps_.Insert(
+            &Stackmap::ZoneHandle(zone_, stackmap.raw()));
+        return stackmap.raw();
+      } else {
+        return canonical_stackmap->raw();
+      }
+    }
+
+   private:
+    Zone* zone_;
+    StackmapSet canonical_stackmaps_;
+    Code& code_;
+    Array& stackmaps_;
+    Stackmap& stackmap_;
+  };
+
+  DedupStackmapsVisitor visitor(Z);
+  VisitFunctions(&visitor);
+}
+
+
+void Precompiler::VisitFunctions(FunctionVisitor* visitor) {
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
   Array& functions = Array::Handle(Z);
@@ -714,54 +810,18 @@
       functions = cls.functions();
       for (intptr_t j = 0; j < functions.Length(); j++) {
         function ^= functions.At(j);
-        BindStaticCalls(function);
+        visitor->VisitFunction(function);
       }
 
       closures = cls.closures();
       if (!closures.IsNull()) {
         for (intptr_t j = 0; j < closures.Length(); j++) {
           function ^= closures.At(j);
-          BindStaticCalls(function);
+          visitor->VisitFunction(function);
         }
       }
     }
   }
 }
 
-
-void Precompiler::BindStaticCalls(const Function& function) {
-  ASSERT(function.HasCode());
-
-  const Code& code = Code::Handle(Z, function.CurrentCode());
-
-  const Array& table = Array::Handle(Z, code.static_calls_target_table());
-  Smi& pc_offset = Smi::Handle(Z);
-  Function& target = Function::Handle(Z);
-  Code& target_code = Code::Handle(Z);
-
-  for (intptr_t i = 0; i < table.Length(); i += Code::kSCallTableEntryLength) {
-    pc_offset ^= table.At(i + Code::kSCallTableOffsetEntry);
-    target ^= table.At(i + Code::kSCallTableFunctionEntry);
-    if (target.IsNull()) {
-      target_code ^= table.At(i + Code::kSCallTableCodeEntry);
-      ASSERT(!target_code.IsNull());
-      ASSERT(!target_code.IsFunctionCode());
-      // Allocation stub or AllocateContext or AllocateArray or ...
-    } else {
-      // Static calls initially call the CallStaticFunction stub because
-      // their target might not be compiled yet. After tree shaking, all
-      // static call targets are compiled.
-      // Cf. runtime entry PatchStaticCall called from CallStaticFunction stub.
-      ASSERT(target.HasCode());
-      target_code ^= target.CurrentCode();
-      CodePatcher::PatchStaticCallAt(pc_offset.Value() + code.EntryPoint(),
-                                     code, target_code);
-    }
-  }
-
-  // We won't patch static calls anymore, so drop the static call table to save
-  // space.
-  code.set_static_calls_target_table(Object::empty_array());
-}
-
 }  // namespace dart
diff --git a/runtime/vm/precompiler.h b/runtime/vm/precompiler.h
index 3106984..5051ead 100644
--- a/runtime/vm/precompiler.h
+++ b/runtime/vm/precompiler.h
@@ -20,61 +20,50 @@
 class RawError;
 class String;
 
-class SymbolPair {
+class SymbolKeyValueTrait {
  public:
   // Typedefs needed for the DirectChainedHashMap template.
   typedef const String* Key;
-  typedef bool Value;
-  typedef SymbolPair Pair;
+  typedef const String* Value;
+  typedef const String* Pair;
 
-  SymbolPair() : key_(NULL), value_(false) {}
-  SymbolPair(Key key, Value value) : key_(key), value_(value) {
-    ASSERT(key->IsNotTemporaryScopedHandle());
-  }
+  static Key KeyOf(Pair kv) { return kv; }
 
-  static Key KeyOf(Pair kv) { return kv.key_; }
-
-  static Value ValueOf(Pair kv) { return kv.value_; }
+  static Value ValueOf(Pair kv) { return kv; }
 
   static inline intptr_t Hashcode(Key key) {
     return key->Hash();
   }
 
   static inline bool IsKeyEqual(Pair pair, Key key) {
-    return pair.key_->raw() == key->raw();
+    return pair->raw() == key->raw();
   }
-
- private:
-  Key key_;
-  Value value_;
 };
 
+typedef DirectChainedHashMap<SymbolKeyValueTrait> SymbolSet;
 
-class SymbolSet : public ValueObject {
+class StackmapKeyValueTrait {
  public:
-  explicit SymbolSet(Zone* zone) : zone_(zone), map_() {}
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef const Stackmap* Key;
+  typedef const Stackmap* Value;
+  typedef const Stackmap* Pair;
 
-  void Add(const String& symbol) {
-    ASSERT(symbol.IsSymbol());
-    if (symbol.IsNotTemporaryScopedHandle()) {
-      SymbolPair pair(&symbol, true);
-      map_.Insert(pair);
-    } else {
-      SymbolPair pair(&String::ZoneHandle(zone_, symbol.raw()), true);
-      map_.Insert(pair);
-    }
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) {
+    return key->PcOffset();
   }
 
-  bool Includes(const String& symbol) {
-    ASSERT(symbol.IsSymbol());
-    return map_.Lookup(&symbol);
+  static inline bool IsKeyEqual(Pair pair, Key key) {
+    return pair->Equals(*key);
   }
-
- private:
-  Zone* zone_;
-  DirectChainedHashMap<SymbolPair> map_;
 };
 
+typedef DirectChainedHashMap<StackmapKeyValueTrait> StackmapSet;
+
 
 class Precompiler : public ValueObject {
  public:
@@ -105,7 +94,15 @@
 
   void DropUncompiledFunctions();
   void BindStaticCalls();
-  void BindStaticCalls(const Function& function);
+  void DedupStackmaps();
+
+  class FunctionVisitor : public ValueObject {
+   public:
+    virtual ~FunctionVisitor() {}
+    virtual void VisitFunction(const Function& function) = 0;
+  };
+
+  void VisitFunctions(FunctionVisitor* visitor);
 
   Thread* thread() const { return thread_; }
   Zone* zone() const { return zone_; }
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 079b350..1515eed 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -1253,9 +1253,8 @@
   }
 
   if (!sample->exit_frame_sample()) {
-    Isolate* isolate = thread->isolate();
     Isolate* vm_isolate = Dart::vm_isolate();
-    processed_sample->FixupCaller(isolate,
+    processed_sample->FixupCaller(thread,
                                   vm_isolate,
                                   sample->pc_marker(),
                                   sample->GetStackBuffer());
@@ -1296,14 +1295,14 @@
 }
 
 
-void ProcessedSample::FixupCaller(Isolate* isolate,
+void ProcessedSample::FixupCaller(Thread* thread,
                                   Isolate* vm_isolate,
                                   uword pc_marker,
                                   uword* stack_buffer) {
-  REUSABLE_CODE_HANDLESCOPE(isolate);
+  REUSABLE_CODE_HANDLESCOPE(thread);
   // Lookup code object for leaf frame.
   Code& code = reused_code_handle.Handle();
-  code = FindCodeForPC(isolate, vm_isolate, At(0));
+  code = FindCodeForPC(thread->isolate(), vm_isolate, At(0));
   if (code.IsNull()) {
     return;
   }
@@ -1311,7 +1310,8 @@
     // Code compiled after sample. Ignore.
     return;
   }
-  CheckForMissingDartFrame(isolate, vm_isolate, code, pc_marker, stack_buffer);
+  CheckForMissingDartFrame(
+      thread->isolate(), vm_isolate, code, pc_marker, stack_buffer);
 }
 
 
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 3f32901..ff8e148 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -505,7 +505,7 @@
   }
 
  private:
-  void FixupCaller(Isolate* isolate,
+  void FixupCaller(Thread* thread,
                    Isolate* vm_isolate,
                    uword pc_marker,
                    uword* stack_buffer);
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index abb5bb0..6419707 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -1845,7 +1845,7 @@
   ProfileCode* CreateProfileCode(uword pc) {
     const intptr_t kDartCodeAlignment = OS::PreferredCodeAlignment();
     const intptr_t kDartCodeAlignmentMask = ~(kDartCodeAlignment - 1);
-    Code& code = Code::Handle(isolate_);
+    Code& code = Code::Handle(isolate_->current_zone());
 
     // Check current isolate for pc.
     if (isolate_->heap()->CodeContains(pc)) {
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 288584a..bc68552 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -194,7 +194,8 @@
 
 #define SNAPSHOT_WRITER_SUPPORT()                                              \
   void WriteTo(                                                                \
-      SnapshotWriter* writer, intptr_t object_id, Snapshot::Kind kind);        \
+      SnapshotWriter* writer, intptr_t object_id,                              \
+      Snapshot::Kind kind, bool as_reference);                                 \
   friend class SnapshotWriter;                                                 \
 
 #define VISITOR_SUPPORT(object)                                                \
@@ -344,6 +345,11 @@
     ASSERT(IsMarked());
     UpdateTagBit<MarkBit>(false);
   }
+  // Returns false if the bit was already set.
+  // TODO(koda): Add "must use result" annotation here, after we add support.
+  bool TryAcquireMarkBit() {
+    return TryAcquireTagBit<MarkBit>();
+  }
 
   // Support for GC watched bit.
   // TODO(iposva): Get rid of this.
@@ -397,6 +403,11 @@
     uword tags = ptr()->tags_;
     ptr()->tags_ = RememberedBit::update(false, tags);
   }
+  // Returns false if the bit was already set.
+  // TODO(koda): Add "must use result" annotation here, after we add support.
+  bool TryAcquireRememberedBit() {
+    return TryAcquireTagBit<RememberedBit>();
+  }
 
   bool IsDartInstance() {
     return (!IsHeapObject() || (GetClassId() >= kInstanceCid));
@@ -517,6 +528,20 @@
     } while (tags != old_tags);
   }
 
+  template<class TagBitField>
+  bool TryAcquireTagBit() {
+    uword tags = ptr()->tags_;
+    uword old_tags;
+    do {
+      old_tags = tags;
+      if (TagBitField::decode(tags)) return false;
+      uword new_tags = TagBitField::update(true, old_tags);
+      tags = AtomicOperations::CompareAndSwapWord(
+          &ptr()->tags_, old_tags, new_tags);
+    } while (tags != old_tags);
+    return true;
+  }
+
   // All writes to heap objects should ultimately pass through one of the
   // methods below or their counterparts in Object, to ensure that the
   // write barrier is correctly applied.
@@ -577,7 +602,7 @@
   friend class Heap;
   friend class HeapMapAsJSONVisitor;
   friend class ClassStatsVisitor;
-  friend class MarkingVisitor;
+  template<bool> friend class MarkingVisitorBase;
   friend class Mint;
   friend class Object;
   friend class OneByteString;  // StoreSmi
@@ -1052,7 +1077,7 @@
   static bool ContainsPC(RawObject* raw_obj, uword pc);
 
   friend class Function;
-  friend class MarkingVisitor;
+  template<bool> friend class MarkingVisitorBase;
   friend class SkippedCodeFunctions;
   friend class StackFrame;
   friend class Profiler;
@@ -1106,7 +1131,7 @@
   friend class RawFunction;
   friend class Code;
   friend class StackFrame;
-  friend class MarkingVisitor;
+  template<bool> friend class MarkingVisitorBase;
   friend class SkippedCodeFunctions;
   friend class Function;
   friend class InstructionsReader;
@@ -1986,7 +2011,7 @@
 
   friend class DelaySet;
   friend class GCMarker;
-  friend class MarkingVisitor;
+  template<bool> friend class MarkingVisitorBase;
   friend class Scavenger;
   friend class ScavengerVisitor;
 };
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index aa2d0d0..8a65fdb 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -42,7 +42,8 @@
 RawClass* Class::ReadFrom(SnapshotReader* reader,
                           intptr_t object_id,
                           intptr_t tags,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(reader != NULL);
 
   Class& cls = Class::ZoneHandle(reader->zone(), Class::null());
@@ -92,7 +93,8 @@
 
 void RawClass::WriteTo(SnapshotWriter* writer,
                        intptr_t object_id,
-                       Snapshot::Kind kind) {
+                       Snapshot::Kind kind,
+                       bool as_reference) {
   ASSERT(writer != NULL);
   bool is_in_fullsnapshot = Class::IsInFullSnapshot(this);
 
@@ -148,7 +150,8 @@
 RawUnresolvedClass* UnresolvedClass::ReadFrom(SnapshotReader* reader,
                                               intptr_t object_id,
                                               intptr_t tags,
-                                              Snapshot::Kind kind) {
+                                              Snapshot::Kind kind,
+                                              bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate unresolved class object.
@@ -171,7 +174,8 @@
 
 void RawUnresolvedClass::WriteTo(SnapshotWriter* writer,
                                  intptr_t object_id,
-                                 Snapshot::Kind kind) {
+                                 Snapshot::Kind kind,
+                                 bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -193,7 +197,8 @@
 RawAbstractType* AbstractType::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   UNREACHABLE();  // AbstractType is an abstract class.
   return NULL;
 }
@@ -201,7 +206,8 @@
 
 void RawAbstractType::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   UNREACHABLE();  // AbstractType is an abstract class.
 }
 
@@ -209,7 +215,8 @@
 RawType* Type::ReadFrom(SnapshotReader* reader,
                         intptr_t object_id,
                         intptr_t tags,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(reader != NULL);
 
   // Determine if the type class of this type is in the full snapshot.
@@ -240,7 +247,8 @@
 
 void RawType::WriteTo(SnapshotWriter* writer,
                       intptr_t object_id,
-                      Snapshot::Kind kind) {
+                      Snapshot::Kind kind,
+                      bool as_reference) {
   ASSERT(writer != NULL);
 
   // Only resolved and finalized types should be written to a snapshot.
@@ -279,7 +287,8 @@
 RawTypeRef* TypeRef::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate type ref object.
@@ -298,7 +307,8 @@
 
 void RawTypeRef::WriteTo(SnapshotWriter* writer,
                          intptr_t object_id,
-                         Snapshot::Kind kind) {
+                         Snapshot::Kind kind,
+                         bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -317,7 +327,8 @@
 RawTypeParameter* TypeParameter::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate type parameter object.
@@ -341,7 +352,8 @@
 
 void RawTypeParameter::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   ASSERT(writer != NULL);
 
   // Only finalized type parameters should be written to a snapshot.
@@ -368,7 +380,8 @@
 RawBoundedType* BoundedType::ReadFrom(SnapshotReader* reader,
                                       intptr_t object_id,
                                       intptr_t tags,
-                                      Snapshot::Kind kind) {
+                                      Snapshot::Kind kind,
+                                      bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate bounded type object.
@@ -387,7 +400,8 @@
 
 void RawBoundedType::WriteTo(SnapshotWriter* writer,
                              intptr_t object_id,
-                             Snapshot::Kind kind) {
+                             Snapshot::Kind kind,
+                             bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -406,7 +420,8 @@
 RawMixinAppType* MixinAppType::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   UNREACHABLE();  // MixinAppType objects do not survive finalization.
   return MixinAppType::null();
 }
@@ -414,7 +429,8 @@
 
 void RawMixinAppType::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   UNREACHABLE();  // MixinAppType objects do not survive finalization.
 }
 
@@ -422,7 +438,8 @@
 RawTypeArguments* TypeArguments::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader != NULL);
 
   // Read the length so that we can determine instance size to allocate.
@@ -465,7 +482,8 @@
 
 void RawTypeArguments::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -494,7 +512,8 @@
 RawPatchClass* PatchClass::ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind) {
+                                    Snapshot::Kind kind,
+                                    bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate function object.
@@ -512,7 +531,8 @@
 
 void RawPatchClass::WriteTo(SnapshotWriter* writer,
                             intptr_t object_id,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -531,7 +551,8 @@
 RawClosureData* ClosureData::ReadFrom(SnapshotReader* reader,
                                       intptr_t object_id,
                                       intptr_t tags,
-                                      Snapshot::Kind kind) {
+                                      Snapshot::Kind kind,
+                                      bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -551,7 +572,8 @@
 
 void RawClosureData::WriteTo(SnapshotWriter* writer,
                              intptr_t object_id,
-                             Snapshot::Kind kind) {
+                             Snapshot::Kind kind,
+                             bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -589,7 +611,8 @@
 RawRedirectionData* RedirectionData::ReadFrom(SnapshotReader* reader,
                                               intptr_t object_id,
                                               intptr_t tags,
-                                              Snapshot::Kind kind) {
+                                              Snapshot::Kind kind,
+                                              bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -609,7 +632,8 @@
 
 void RawRedirectionData::WriteTo(SnapshotWriter* writer,
                                  intptr_t object_id,
-                                 Snapshot::Kind kind) {
+                                 Snapshot::Kind kind,
+                                 bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -629,7 +653,8 @@
 RawFunction* Function::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -682,7 +707,8 @@
 
 void RawFunction::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
   bool is_in_fullsnapshot = false;
@@ -750,7 +776,8 @@
 RawField* Field::ReadFrom(SnapshotReader* reader,
                           intptr_t object_id,
                           intptr_t tags,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -777,7 +804,8 @@
 
 void RawField::WriteTo(SnapshotWriter* writer,
                        intptr_t object_id,
-                       Snapshot::Kind kind) {
+                       Snapshot::Kind kind,
+                       bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -829,7 +857,8 @@
 RawLiteralToken* LiteralToken::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT(kind != Snapshot::kMessage);
 
@@ -853,7 +882,8 @@
 
 void RawLiteralToken::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT(kind != Snapshot::kMessage);
 
@@ -876,7 +906,8 @@
 RawTokenStream* TokenStream::ReadFrom(SnapshotReader* reader,
                                       intptr_t object_id,
                                       intptr_t tags,
-                                      Snapshot::Kind kind) {
+                                      Snapshot::Kind kind,
+                                      bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -909,7 +940,8 @@
 
 void RawTokenStream::WriteTo(SnapshotWriter* writer,
                              intptr_t object_id,
-                             Snapshot::Kind kind) {
+                             Snapshot::Kind kind,
+                             bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -936,7 +968,8 @@
 RawScript* Script::ReadFrom(SnapshotReader* reader,
                             intptr_t object_id,
                             intptr_t tags,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -970,7 +1003,8 @@
 
 void RawScript::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT(tokens_ != TokenStream::null());
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
@@ -996,7 +1030,8 @@
 RawLibrary* Library::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT(kind != Snapshot::kMessage);
 
@@ -1063,7 +1098,8 @@
 
 void RawLibrary::WriteTo(SnapshotWriter* writer,
                          intptr_t object_id,
-                         Snapshot::Kind kind) {
+                         Snapshot::Kind kind,
+                         bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT(kind != Snapshot::kMessage);
 
@@ -1109,7 +1145,8 @@
 RawLibraryPrefix* LibraryPrefix::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -1136,7 +1173,8 @@
 
 void RawLibraryPrefix::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -1161,7 +1199,8 @@
 RawNamespace* Namespace::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -1179,7 +1218,8 @@
 
 void RawNamespace::WriteTo(SnapshotWriter* writer,
                            intptr_t object_id,
-                           Snapshot::Kind kind) {
+                           Snapshot::Kind kind,
+                           bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
@@ -1199,7 +1239,8 @@
 RawCode* Code::ReadFrom(SnapshotReader* reader,
                         intptr_t object_id,
                         intptr_t tags,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1226,7 +1267,8 @@
 
 void RawCode::WriteTo(SnapshotWriter* writer,
                       intptr_t object_id,
-                      Snapshot::Kind kind) {
+                      Snapshot::Kind kind,
+                      bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1260,7 +1302,8 @@
 RawInstructions* Instructions::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1277,7 +1320,8 @@
 
 void RawInstructions::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1300,7 +1344,8 @@
 RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind) {
+                                    Snapshot::Kind kind,
+                                    bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1353,49 +1398,63 @@
 
 void RawObjectPool::WriteTo(SnapshotWriter* writer,
                             intptr_t object_id,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
-
-  // Write out the serialization header value for this object.
-  writer->WriteInlinedObjectHeader(object_id);
-
-  // Write out the class and tags information.
-  writer->WriteVMIsolateObject(kObjectPoolCid);
-  writer->WriteTags(writer->GetObjectTags(this));
-
+  intptr_t tags = writer->GetObjectTags(this);
   intptr_t length = ptr()->length_;
-  RawTypedData* info_array = ptr()->info_array_->ptr();
-  ASSERT(info_array != TypedData::null());
 
-  writer->Write<intptr_t>(length);
-  for (intptr_t i = 0; i < length; i++) {
-    ObjectPool::EntryType entry_type =
-        static_cast<ObjectPool::EntryType>(info_array->data()[i]);
-    writer->Write<int8_t>(entry_type);
-    Entry& entry = ptr()->data()[i];
-    switch (entry_type) {
-      case ObjectPool::kTaggedObject: {
-        if (entry.raw_obj_ == StubCode::CallNativeCFunction_entry()->code()) {
-          // Natives can run while precompiling, becoming linked and switching
-          // their stub. Reset to the initial stub used for lazy-linking.
-          writer->WriteObjectImpl(
-              StubCode::CallBootstrapCFunction_entry()->code(), kAsReference);
-        } else {
-          writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+  if (as_reference) {
+    // Write out the serialization header value for this object.
+    writer->WriteInlinedObjectHeader(kOmittedObjectId);
+
+    // Write out the class information.
+    writer->WriteVMIsolateObject(kObjectPoolCid);
+    writer->WriteTags(tags);
+
+    // Write out the length field.
+    writer->Write<intptr_t>(length);
+  } else {
+    // Write out the serialization header value for this object.
+    writer->WriteInlinedObjectHeader(object_id);
+
+    // Write out the class and tags information.
+    writer->WriteVMIsolateObject(kObjectPoolCid);
+    writer->WriteTags(tags);
+
+    RawTypedData* info_array = ptr()->info_array_->ptr();
+    ASSERT(info_array != TypedData::null());
+
+    writer->Write<intptr_t>(length);
+    for (intptr_t i = 0; i < length; i++) {
+      ObjectPool::EntryType entry_type =
+          static_cast<ObjectPool::EntryType>(info_array->data()[i]);
+      writer->Write<int8_t>(entry_type);
+      Entry& entry = ptr()->data()[i];
+      switch (entry_type) {
+        case ObjectPool::kTaggedObject: {
+          if (entry.raw_obj_ == StubCode::CallNativeCFunction_entry()->code()) {
+            // Natives can run while precompiling, becoming linked and switching
+            // their stub. Reset to the initial stub used for lazy-linking.
+            writer->WriteObjectImpl(
+                StubCode::CallBootstrapCFunction_entry()->code(), kAsReference);
+          } else {
+            writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+          }
+          break;
         }
-        break;
+        case ObjectPool::kImmediate: {
+          writer->Write<intptr_t>(entry.raw_value_);
+          break;
+        }
+        case ObjectPool::kNativeEntry: {
+          // Write nothing. Will initialize with the lazy link entry.
+          break;
+        }
+        default:
+          UNREACHABLE();
       }
-      case ObjectPool::kImmediate: {
-        writer->Write<intptr_t>(entry.raw_value_);
-        break;
-      }
-      case ObjectPool::kNativeEntry: {
-        // Write nothing. Will initialize with the lazy link entry.
-        break;
-      }
-      default:
-        UNREACHABLE();
     }
   }
 }
@@ -1404,7 +1463,8 @@
 RawPcDescriptors* PcDescriptors::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1427,7 +1487,8 @@
 
 void RawPcDescriptors::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1447,7 +1508,8 @@
 RawStackmap* Stackmap::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1473,7 +1535,8 @@
 
 void RawStackmap::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1496,7 +1559,8 @@
 RawLocalVarDescriptors* LocalVarDescriptors::ReadFrom(SnapshotReader* reader,
                                                       intptr_t object_id,
                                                       intptr_t tags,
-                                                      Snapshot::Kind kind) {
+                                                      Snapshot::Kind kind,
+                                                      bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1528,7 +1592,8 @@
 
 void RawLocalVarDescriptors::WriteTo(SnapshotWriter* writer,
                                      intptr_t object_id,
-                                     Snapshot::Kind kind) {
+                                     Snapshot::Kind kind,
+                                     bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1551,7 +1616,8 @@
 RawExceptionHandlers* ExceptionHandlers::ReadFrom(SnapshotReader* reader,
                                                   intptr_t object_id,
                                                   intptr_t tags,
-                                                  Snapshot::Kind kind) {
+                                                  Snapshot::Kind kind,
+                                                  bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1581,7 +1647,8 @@
 
 void RawExceptionHandlers::WriteTo(SnapshotWriter* writer,
                                    intptr_t object_id,
-                                   Snapshot::Kind kind) {
+                                   Snapshot::Kind kind,
+                                   bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1604,7 +1671,8 @@
 RawContext* Context::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate context object.
@@ -1632,7 +1700,8 @@
 
 void RawContext::WriteTo(SnapshotWriter* writer,
                          intptr_t object_id,
-                         Snapshot::Kind kind) {
+                         Snapshot::Kind kind,
+                         bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -1656,7 +1725,8 @@
 RawContextScope* ContextScope::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate context object.
@@ -1690,7 +1760,8 @@
 
 void RawContextScope::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(writer != NULL);
 
   if (ptr()->is_implicit_) {
@@ -1719,7 +1790,8 @@
 RawICData* ICData::ReadFrom(SnapshotReader* reader,
                             intptr_t object_id,
                             intptr_t tags,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
   ICData& result = ICData::ZoneHandle(reader->zone(), NEW_OBJECT(ICData));
@@ -1739,7 +1811,8 @@
 
 void RawICData::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT((kind == Snapshot::kScript) || (kind == Snapshot::kFull));
 
   // Write out the serialization header value for this object.
@@ -1762,7 +1835,8 @@
 RawMegamorphicCache* MegamorphicCache::ReadFrom(SnapshotReader* reader,
                                                 intptr_t object_id,
                                                 intptr_t tags,
-                                                Snapshot::Kind kind) {
+                                                Snapshot::Kind kind,
+                                                bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1784,7 +1858,8 @@
 
 void RawMegamorphicCache::WriteTo(SnapshotWriter* writer,
                                   intptr_t object_id,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1807,7 +1882,8 @@
 RawSubtypeTestCache* SubtypeTestCache::ReadFrom(SnapshotReader* reader,
                                                 intptr_t object_id,
                                                 intptr_t tags,
-                                                Snapshot::Kind kind) {
+                                                Snapshot::Kind kind,
+                                                bool as_reference) {
   ASSERT(reader->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1829,7 +1905,8 @@
 
 void RawSubtypeTestCache::WriteTo(SnapshotWriter* writer,
                                   intptr_t object_id,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(writer->snapshot_code());
   ASSERT(kind == Snapshot::kFull);
 
@@ -1848,7 +1925,8 @@
 RawError* Error::ReadFrom(SnapshotReader* reader,
                           intptr_t object_id,
                           intptr_t tags,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_referenec) {
   UNREACHABLE();
   return Error::null();  // Error is an abstract class.
 }
@@ -1856,7 +1934,8 @@
 
 void RawError::WriteTo(SnapshotWriter* writer,
                        intptr_t object_id,
-                       Snapshot::Kind kind) {
+                       Snapshot::Kind kind,
+                       bool as_reference) {
   UNREACHABLE();  // Error is an abstract class.
 }
 
@@ -1864,7 +1943,8 @@
 RawApiError* ApiError::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate ApiError object.
@@ -1883,7 +1963,8 @@
 
 void RawApiError::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -1902,7 +1983,8 @@
 RawLanguageError* LanguageError::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate LanguageError object.
@@ -1925,7 +2007,8 @@
 
 void RawLanguageError::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -1948,7 +2031,8 @@
 RawUnhandledException* UnhandledException::ReadFrom(SnapshotReader* reader,
                                                     intptr_t object_id,
                                                     intptr_t tags,
-                                                    Snapshot::Kind kind) {
+                                                    Snapshot::Kind kind,
+                                                    bool as_reference) {
   UnhandledException& result = UnhandledException::ZoneHandle(
       reader->zone(), NEW_OBJECT(UnhandledException));
   reader->AddBackRef(object_id, &result, kIsDeserialized);
@@ -1964,7 +2048,8 @@
 
 void RawUnhandledException::WriteTo(SnapshotWriter* writer,
                                     intptr_t object_id,
-                                    Snapshot::Kind kind) {
+                                    Snapshot::Kind kind,
+                                    bool as_reference) {
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
 
@@ -1980,7 +2065,8 @@
 RawUnwindError* UnwindError::ReadFrom(SnapshotReader* reader,
                                       intptr_t object_id,
                                       intptr_t tags,
-                                      Snapshot::Kind kind) {
+                                      Snapshot::Kind kind,
+                                      bool as_reference) {
   UNREACHABLE();
   return UnwindError::null();
 }
@@ -1988,7 +2074,8 @@
 
 void RawUnwindError::WriteTo(SnapshotWriter* writer,
                              intptr_t object_id,
-                             Snapshot::Kind kind) {
+                             Snapshot::Kind kind,
+                             bool as_reference) {
   UNREACHABLE();
 }
 
@@ -1996,7 +2083,8 @@
 RawInstance* Instance::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(reader != NULL);
 
   // Create an Instance object or get canonical one if it is a canonical
@@ -2024,7 +2112,8 @@
 
 void RawInstance::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2039,7 +2128,8 @@
 RawInteger* Mint::ReadFrom(SnapshotReader* reader,
                            intptr_t object_id,
                            intptr_t tags,
-                           Snapshot::Kind kind) {
+                           Snapshot::Kind kind,
+                           bool as_reference) {
   ASSERT(reader != NULL);
 
   // Read the 64 bit value for the object.
@@ -2082,7 +2172,8 @@
 
 void RawMint::WriteTo(SnapshotWriter* writer,
                       intptr_t object_id,
-                      Snapshot::Kind kind) {
+                      Snapshot::Kind kind,
+                      bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2100,7 +2191,8 @@
 RawBigint* Bigint::ReadFrom(SnapshotReader* reader,
                             intptr_t object_id,
                             intptr_t tags,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate bigint object.
@@ -2131,7 +2223,8 @@
 
 void RawBigint::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2150,7 +2243,8 @@
 RawDouble* Double::ReadFrom(SnapshotReader* reader,
                             intptr_t object_id,
                             intptr_t tags,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT(kind != Snapshot::kMessage);
   // Read the double value for the object.
@@ -2183,7 +2277,8 @@
 
 void RawDouble::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2201,7 +2296,8 @@
 RawString* String::ReadFrom(SnapshotReader* reader,
                             intptr_t object_id,
                             intptr_t tags,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   UNREACHABLE();  // String is an abstract class.
   return String::null();
 }
@@ -2209,7 +2305,8 @@
 
 void RawString::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   UNREACHABLE();  // String is an abstract class.
 }
 
@@ -2250,7 +2347,8 @@
 RawOneByteString* OneByteString::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   // Read the length so that we can determine instance size to allocate.
   ASSERT(reader != NULL);
   intptr_t len = reader->ReadSmiValue();
@@ -2284,7 +2382,8 @@
 RawTwoByteString* TwoByteString::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   // Read the length so that we can determine instance size to allocate.
   ASSERT(reader != NULL);
   intptr_t len = reader->ReadSmiValue();
@@ -2355,7 +2454,8 @@
 
 void RawOneByteString::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   StringWriteTo(writer,
                 object_id,
                 kind,
@@ -2369,7 +2469,8 @@
 
 void RawTwoByteString::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   StringWriteTo(writer,
                 object_id,
                 kind,
@@ -2385,7 +2486,8 @@
     SnapshotReader* reader,
     intptr_t object_id,
     intptr_t tags,
-    Snapshot::Kind kind) {
+    Snapshot::Kind kind,
+    bool as_reference) {
   UNREACHABLE();
   return ExternalOneByteString::null();
 }
@@ -2395,7 +2497,8 @@
     SnapshotReader* reader,
     intptr_t object_id,
     intptr_t tags,
-    Snapshot::Kind kind) {
+    Snapshot::Kind kind,
+    bool as_reference) {
   UNREACHABLE();
   return ExternalTwoByteString::null();
 }
@@ -2403,7 +2506,8 @@
 
 void RawExternalOneByteString::WriteTo(SnapshotWriter* writer,
                                        intptr_t object_id,
-                                       Snapshot::Kind kind) {
+                                       Snapshot::Kind kind,
+                                       bool as_reference) {
   // Serialize as a non-external one byte string.
   StringWriteTo(writer,
                 object_id,
@@ -2418,7 +2522,8 @@
 
 void RawExternalTwoByteString::WriteTo(SnapshotWriter* writer,
                                        intptr_t object_id,
-                                       Snapshot::Kind kind) {
+                                       Snapshot::Kind kind,
+                                       bool as_reference) {
   // Serialize as a non-external two byte string.
   StringWriteTo(writer,
                 object_id,
@@ -2434,7 +2539,8 @@
 RawBool* Bool::ReadFrom(SnapshotReader* reader,
                         intptr_t object_id,
                         intptr_t tags,
-                        Snapshot::Kind kind) {
+                        Snapshot::Kind kind,
+                        bool as_reference) {
   UNREACHABLE();
   return Bool::null();
 }
@@ -2442,7 +2548,8 @@
 
 void RawBool::WriteTo(SnapshotWriter* writer,
                       intptr_t object_id,
-                      Snapshot::Kind kind) {
+                      Snapshot::Kind kind,
+                      bool as_reference) {
   UNREACHABLE();
 }
 
@@ -2450,7 +2557,8 @@
 RawArray* Array::ReadFrom(SnapshotReader* reader,
                           intptr_t object_id,
                           intptr_t tags,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(reader != NULL);
 
   // Read the length so that we can determine instance size to allocate.
@@ -2471,7 +2579,8 @@
 RawImmutableArray* ImmutableArray::ReadFrom(SnapshotReader* reader,
                                             intptr_t object_id,
                                             intptr_t tags,
-                                            Snapshot::Kind kind) {
+                                            Snapshot::Kind kind,
+                                            bool as_reference) {
   ASSERT(reader != NULL);
 
   // Read the length so that we can determine instance size to allocate.
@@ -2497,33 +2606,38 @@
 
 void RawArray::WriteTo(SnapshotWriter* writer,
                        intptr_t object_id,
-                       Snapshot::Kind kind) {
-  ASSERT(!RawObject::IsCanonical(writer->GetObjectTags(this)));
+                       Snapshot::Kind kind,
+                       bool as_reference) {
+  ASSERT(!this->IsCanonical());
   writer->ArrayWriteTo(object_id,
                        kArrayCid,
                        writer->GetObjectTags(this),
                        ptr()->length_,
                        ptr()->type_arguments_,
-                       ptr()->data());
+                       ptr()->data(),
+                       as_reference);
 }
 
 
 void RawImmutableArray::WriteTo(SnapshotWriter* writer,
                                 intptr_t object_id,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   writer->ArrayWriteTo(object_id,
                        kImmutableArrayCid,
                        writer->GetObjectTags(this),
                        ptr()->length_,
                        ptr()->type_arguments_,
-                       ptr()->data());
+                       ptr()->data(),
+                       as_reference);
 }
 
 
 RawGrowableObjectArray* GrowableObjectArray::ReadFrom(SnapshotReader* reader,
                                                       intptr_t object_id,
                                                       intptr_t tags,
-                                                      Snapshot::Kind kind) {
+                                                      Snapshot::Kind kind,
+                                                      bool as_reference) {
   ASSERT(reader != NULL);
 
   // Read the length so that we can determine instance size to allocate.
@@ -2548,7 +2662,7 @@
   array.SetLength(reader->ReadSmiValue());
 
   // Read the backing array of growable array object.
-  *(reader->ArrayHandle()) ^= reader->ReadObjectImpl(kAsInlinedObject);
+  *(reader->ArrayHandle()) ^= reader->ReadObjectImpl(kAsReference);
   array.SetData(*(reader->ArrayHandle()));
 
   return array.raw();
@@ -2557,7 +2671,8 @@
 
 void RawGrowableObjectArray::WriteTo(SnapshotWriter* writer,
                                      intptr_t object_id,
-                                     Snapshot::Kind kind) {
+                                     Snapshot::Kind kind,
+                                     bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2574,14 +2689,15 @@
   writer->Write<RawObject*>(ptr()->length_);
 
   // Write out the Array object.
-  writer->WriteObjectImpl(ptr()->data_, kAsInlinedObject);
+  writer->WriteObjectImpl(ptr()->data_, kAsReference);
 }
 
 
 RawLinkedHashMap* LinkedHashMap::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
   ASSERT(reader != NULL);
 
   LinkedHashMap& map = LinkedHashMap::ZoneHandle(
@@ -2632,9 +2748,9 @@
   map.SetHashMask(0);  // Prefer sentinel 0 over null for better type feedback.
 
   // Read the keys and values.
-  bool as_reference = RawObject::IsCanonical(tags) ? false : true;
+  bool read_as_reference = RawObject::IsCanonical(tags) ? false : true;
   for (intptr_t i = 0; i < used_data; i++) {
-    *reader->PassiveObjectHandle() = reader->ReadObjectImpl(as_reference);
+    *reader->PassiveObjectHandle() = reader->ReadObjectImpl(read_as_reference);
     data.SetAt(i, *reader->PassiveObjectHandle());
   }
   return map.raw();
@@ -2643,7 +2759,8 @@
 
 void RawLinkedHashMap::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
-                               Snapshot::Kind kind) {
+                               Snapshot::Kind kind,
+                               bool as_reference) {
   if ((kind == Snapshot::kFull && !writer->snapshot_code()) ||
       kind == Snapshot::kScript) {
     // The immutable maps that seed map literals are not yet VM-internal, so
@@ -2656,8 +2773,7 @@
 
   // Write out the class and tags information.
   writer->WriteIndexedObject(kLinkedHashMapCid);
-  const uword tags = writer->GetObjectTags(this);
-  writer->WriteTags(tags);
+  writer->WriteTags(writer->GetObjectTags(this));
 
   // Write out the type arguments.
   writer->WriteObjectImpl(ptr()->type_arguments_, kAsInlinedObject);
@@ -2670,7 +2786,7 @@
   writer->Write<RawObject*>(Smi::New((used_data >> 1) - deleted_keys));
 
   // Write out the keys and values.
-  const bool as_reference = RawObject::IsCanonical(tags) ? false : true;
+  const bool write_as_reference = this->IsCanonical() ? false : true;
   RawArray* data_array = ptr()->data_;
   RawObject** data_elements = data_array->ptr()->data();
   ASSERT(used_data <= Smi::Value(data_array->ptr()->length_));
@@ -2686,8 +2802,8 @@
       continue;
     }
     RawObject* value = data_elements[i + 1];
-    writer->WriteObjectImpl(key, as_reference);
-    writer->WriteObjectImpl(value, as_reference);
+    writer->WriteObjectImpl(key, write_as_reference);
+    writer->WriteObjectImpl(value, write_as_reference);
   }
   DEBUG_ASSERT(deleted_keys_found == deleted_keys);
 }
@@ -2696,7 +2812,8 @@
 RawFloat32x4* Float32x4::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(reader != NULL);
   // Read the values.
   float value0 = reader->Read<float>();
@@ -2719,7 +2836,8 @@
 
 void RawFloat32x4::WriteTo(SnapshotWriter* writer,
                            intptr_t object_id,
-                           Snapshot::Kind kind) {
+                           Snapshot::Kind kind,
+                           bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2740,7 +2858,8 @@
 RawInt32x4* Int32x4::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(reader != NULL);
   // Read the values.
   uint32_t value0 = reader->Read<uint32_t>();
@@ -2763,7 +2882,8 @@
 
 void RawInt32x4::WriteTo(SnapshotWriter* writer,
                          intptr_t object_id,
-                         Snapshot::Kind kind) {
+                         Snapshot::Kind kind,
+                         bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2784,7 +2904,8 @@
 RawFloat64x2* Float64x2::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(reader != NULL);
   // Read the values.
   double value0 = reader->Read<double>();
@@ -2805,7 +2926,8 @@
 
 void RawFloat64x2::WriteTo(SnapshotWriter* writer,
                            intptr_t object_id,
-                           Snapshot::Kind kind) {
+                           Snapshot::Kind kind,
+                           bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -2830,7 +2952,8 @@
 RawTypedData* TypedData::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
-                                  Snapshot::Kind kind) {
+                                  Snapshot::Kind kind,
+                                  bool as_reference) {
   ASSERT(reader != NULL);
 
   intptr_t cid = RawObject::ClassIdTag::decode(tags);
@@ -2887,7 +3010,8 @@
 RawExternalTypedData* ExternalTypedData::ReadFrom(SnapshotReader* reader,
                                                   intptr_t object_id,
                                                   intptr_t tags,
-                                                  Snapshot::Kind kind) {
+                                                  Snapshot::Kind kind,
+                                                  bool as_reference) {
   ASSERT(kind != Snapshot::kFull);
   intptr_t cid = RawObject::ClassIdTag::decode(tags);
   intptr_t length = reader->ReadSmiValue();
@@ -2915,10 +3039,10 @@
 
 void RawTypedData::WriteTo(SnapshotWriter* writer,
                            intptr_t object_id,
-                           Snapshot::Kind kind) {
+                           Snapshot::Kind kind,
+                           bool as_reference) {
   ASSERT(writer != NULL);
-  intptr_t tags = writer->GetObjectTags(this);
-  intptr_t cid = ClassIdTag::decode(tags);
+  intptr_t cid = this->GetClassId();
   intptr_t len = Smi::Value(ptr()->length_);
 
   // Write out the serialization header value for this object.
@@ -2926,7 +3050,7 @@
 
   // Write out the class and tags information.
   writer->WriteIndexedObject(cid);
-  writer->WriteTags(tags);
+  writer->WriteTags(writer->GetObjectTags(this));
 
   // Write out the length field.
   writer->Write<RawObject*>(ptr()->length_);
@@ -2981,17 +3105,17 @@
 
 #define EXT_TYPED_DATA_WRITE(cid, type)                                        \
   writer->WriteIndexedObject(cid);                                             \
-  writer->WriteTags(RawObject::ClassIdTag::update(cid, tags));                 \
+  writer->WriteTags(writer->GetObjectTags(this));                              \
   writer->Write<RawObject*>(ptr()->length_);                                   \
   TYPED_EXT_DATA_WRITE(type)                                                   \
 
 
 void RawExternalTypedData::WriteTo(SnapshotWriter* writer,
                                    intptr_t object_id,
-                                   Snapshot::Kind kind) {
+                                   Snapshot::Kind kind,
+                                   bool as_reference) {
   ASSERT(writer != NULL);
-  intptr_t tags = writer->GetObjectTags(this);
-  intptr_t cid = ClassIdTag::decode(tags);
+  intptr_t cid = this->GetClassId();
   intptr_t len = Smi::Value(ptr()->length_);
 
   // Write out the serialization header value for this object.
@@ -3042,7 +3166,8 @@
 RawCapability* Capability::ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind) {
+                                    Snapshot::Kind kind,
+                                    bool as_reference) {
   uint64_t id = reader->Read<uint64_t>();
 
   Capability& result = Capability::ZoneHandle(reader->zone(),
@@ -3054,7 +3179,8 @@
 
 void RawCapability::WriteTo(SnapshotWriter* writer,
                             intptr_t object_id,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
 
@@ -3069,7 +3195,8 @@
 RawReceivePort* ReceivePort::ReadFrom(SnapshotReader* reader,
                                       intptr_t object_id,
                                       intptr_t tags,
-                                      Snapshot::Kind kind) {
+                                      Snapshot::Kind kind,
+                                      bool as_reference) {
   UNREACHABLE();
   return ReceivePort::null();
 }
@@ -3077,7 +3204,8 @@
 
 void RawReceivePort::WriteTo(SnapshotWriter* writer,
                              intptr_t object_id,
-                             Snapshot::Kind kind) {
+                             Snapshot::Kind kind,
+                             bool as_reference) {
   if (kind == Snapshot::kMessage) {
     // We do not allow objects with native fields in an isolate message.
     writer->SetWriteException(Exceptions::kArgument,
@@ -3092,7 +3220,8 @@
 RawSendPort* SendPort::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(kind == Snapshot::kMessage || reader->snapshot_code());
 
   uint64_t id = reader->Read<uint64_t>();
@@ -3112,7 +3241,8 @@
 
 void RawSendPort::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
 
@@ -3128,7 +3258,8 @@
 RawStacktrace* Stacktrace::ReadFrom(SnapshotReader* reader,
                                     intptr_t object_id,
                                     intptr_t tags,
-                                    Snapshot::Kind kind) {
+                                    Snapshot::Kind kind,
+                                    bool as_reference) {
   if (kind == Snapshot::kFull) {
     Stacktrace& result = Stacktrace::ZoneHandle(reader->zone(),
                                                 reader->NewStacktrace());
@@ -3151,7 +3282,8 @@
 
 void RawStacktrace::WriteTo(SnapshotWriter* writer,
                             intptr_t object_id,
-                            Snapshot::Kind kind) {
+                            Snapshot::Kind kind,
+                            bool as_reference) {
   if (kind == Snapshot::kFull) {
     ASSERT(writer != NULL);
     ASSERT(this == Isolate::Current()->object_store()->
@@ -3181,7 +3313,8 @@
 RawJSRegExp* JSRegExp::ReadFrom(SnapshotReader* reader,
                                 intptr_t object_id,
                                 intptr_t tags,
-                                Snapshot::Kind kind) {
+                                Snapshot::Kind kind,
+                                bool as_reference) {
   ASSERT(reader != NULL);
   ASSERT(kind == Snapshot::kMessage);
 
@@ -3207,7 +3340,8 @@
 
 void RawJSRegExp::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
-                          Snapshot::Kind kind) {
+                          Snapshot::Kind kind,
+                          bool as_reference) {
   ASSERT(writer != NULL);
   ASSERT(kind == Snapshot::kMessage);
 
@@ -3229,7 +3363,8 @@
 RawWeakProperty* WeakProperty::ReadFrom(SnapshotReader* reader,
                                         intptr_t object_id,
                                         intptr_t tags,
-                                        Snapshot::Kind kind) {
+                                        Snapshot::Kind kind,
+                                        bool as_reference) {
   ASSERT(reader != NULL);
 
   // Allocate the weak property object.
@@ -3247,8 +3382,9 @@
 
 
 void RawWeakProperty::WriteTo(SnapshotWriter* writer,
-                          intptr_t object_id,
-                          Snapshot::Kind kind) {
+                              intptr_t object_id,
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   ASSERT(writer != NULL);
 
   // Write out the serialization header value for this object.
@@ -3265,9 +3401,10 @@
 
 
 RawMirrorReference* MirrorReference::ReadFrom(SnapshotReader* reader,
-                                          intptr_t object_id,
-                                          intptr_t tags,
-                                          Snapshot::Kind kind) {
+                                              intptr_t object_id,
+                                              intptr_t tags,
+                                              Snapshot::Kind kind,
+                                              bool as_referenec) {
   UNREACHABLE();
   return MirrorReference::null();
 }
@@ -3275,7 +3412,8 @@
 
 void RawMirrorReference::WriteTo(SnapshotWriter* writer,
                                  intptr_t object_id,
-                                 Snapshot::Kind kind) {
+                                 Snapshot::Kind kind,
+                                 bool as_reference) {
   if (kind == Snapshot::kMessage) {
     // We do not allow objects with native fields in an isolate message.
     writer->SetWriteException(Exceptions::kArgument,
@@ -3290,7 +3428,8 @@
 RawUserTag* UserTag::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
-                              Snapshot::Kind kind) {
+                              Snapshot::Kind kind,
+                              bool as_reference) {
   UNREACHABLE();
   return UserTag::null();
 }
@@ -3298,7 +3437,8 @@
 
 void RawUserTag::WriteTo(SnapshotWriter* writer,
                          intptr_t object_id,
-                         Snapshot::Kind kind) {
+                         Snapshot::Kind kind,
+                         bool as_reference) {
   if (kind == Snapshot::kMessage) {
     // We do not allow objects with native fields in an isolate message.
     writer->SetWriteException(Exceptions::kArgument,
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index 63ce272..82c314f 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -112,7 +112,7 @@
       new(zone) GraphEntryInstr(
         *parsed_function_,
         new(zone) TargetEntryInstr(block_id_.Alloc(), kInvalidTryIndex),
-        Isolate::kNoDeoptId);
+        Thread::kNoDeoptId);
   start_block_ =
       new(zone) JoinEntryInstr(block_id_.Alloc(), kInvalidTryIndex);
   success_block_ =
diff --git a/runtime/vm/report.cc b/runtime/vm/report.cc
index f1cf495..e65391d 100644
--- a/runtime/vm/report.cc
+++ b/runtime/vm/report.cc
@@ -224,14 +224,14 @@
   ASSERT(caller_frame != NULL);
   ASSERT(FLAG_warn_on_javascript_compatibility);
   if (FLAG_silent_warnings) return;
-  Isolate* isolate = Isolate::Current();
-  const Code& caller_code = Code::Handle(isolate,
+  Zone* zone = Thread::Current()->zone();
+  const Code& caller_code = Code::Handle(zone,
                                          caller_frame->LookupDartCode());
   ASSERT(!caller_code.IsNull());
   const uword caller_pc = caller_frame->pc();
   const intptr_t token_pos = caller_code.GetTokenIndexOfPC(caller_pc);
-  const Function& caller = Function::Handle(isolate, caller_code.function());
-  const Script& script = Script::Handle(isolate, caller.script());
+  const Function& caller = Function::Handle(zone, caller_code.function());
+  const Script& script = Script::Handle(zone, caller.script());
   MessageF(kJSWarning, script, token_pos, "%s", msg);
 }
 
diff --git a/runtime/vm/report_test.cc b/runtime/vm/report_test.cc
index 73f2108..6338f5b 100644
--- a/runtime/vm/report_test.cc
+++ b/runtime/vm/report_test.cc
@@ -9,12 +9,13 @@
 namespace dart {
 
 TEST_CASE(TraceJSWarning) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   TraceBuffer::Init(isolate, 3);
   TraceBuffer* trace_buffer = isolate->trace_buffer();
-  const String& url = String::Handle(isolate, String::New("Plug"));
-  const String& source = String::Handle(isolate, String::New("240 100"));
-  const Script& script = Script::Handle(isolate,
+  const String& url = String::Handle(zone, String::New("Plug"));
+  const String& source = String::Handle(zone, String::New("240 100"));
+  const Script& script = Script::Handle(zone,
       Script::New(url, source, RawScript::kEvaluateTag));
   script.Tokenize(String::Handle(String::New("")));
   {
diff --git a/runtime/vm/reusable_handles.h b/runtime/vm/reusable_handles.h
index c1b5301..8f057ea 100644
--- a/runtime/vm/reusable_handles.h
+++ b/runtime/vm/reusable_handles.h
@@ -30,41 +30,42 @@
 // }
 //
 
+
 #if defined(DEBUG)
 #define REUSABLE_SCOPE(name)                                                   \
   class Reusable##name##HandleScope : public ValueObject {                     \
-    public:                                                                    \
-    explicit Reusable##name##HandleScope(Isolate* isolate)                     \
-        : isolate_(isolate) {                                                  \
-      ASSERT(!isolate->reusable_##name##_handle_scope_active());               \
-      isolate->set_reusable_##name##_handle_scope_active(true);                \
+   public:                                                                     \
+    explicit Reusable##name##HandleScope(Thread* thread)                       \
+        : thread_(thread) {                                                    \
+      ASSERT(!thread->reusable_##name##_handle_scope_active());                \
+      thread->set_reusable_##name##_handle_scope_active(true);                 \
     }                                                                          \
-    Reusable##name##HandleScope() : isolate_(Isolate::Current()) {             \
-      ASSERT(!isolate_->reusable_##name##_handle_scope_active());              \
-      isolate_->set_reusable_##name##_handle_scope_active(true);               \
+    Reusable##name##HandleScope() : thread_(Thread::Current()) {               \
+      ASSERT(!thread_->reusable_##name##_handle_scope_active());               \
+      thread_->set_reusable_##name##_handle_scope_active(true);                \
     }                                                                          \
     ~Reusable##name##HandleScope() {                                           \
-      ASSERT(isolate_->reusable_##name##_handle_scope_active());               \
-      isolate_->set_reusable_##name##_handle_scope_active(false);              \
+      ASSERT(thread_->reusable_##name##_handle_scope_active());                \
+      thread_->set_reusable_##name##_handle_scope_active(false);               \
       Handle().raw_ = name::null();                                            \
     }                                                                          \
     name& Handle() const {                                                     \
-      ASSERT(isolate_->name##_handle_ != NULL);                                \
-      return *isolate_->name##_handle_;                                        \
+      ASSERT(thread_->name##_handle_ != NULL);                                 \
+      return *thread_->name##_handle_;                                         \
     }                                                                          \
-    private:                                                                   \
-    Isolate* isolate_;                                                         \
+   private:                                                                    \
+    Thread* thread_;                                                           \
     DISALLOW_COPY_AND_ASSIGN(Reusable##name##HandleScope);                     \
   };
 #else
 #define REUSABLE_SCOPE(name)                                                   \
   class Reusable##name##HandleScope : public ValueObject {                     \
-    public:                                                                    \
-    explicit Reusable##name##HandleScope(Isolate* isolate)                     \
-        : handle_(isolate->name##_handle_) {                                   \
+   public:                                                                     \
+    explicit Reusable##name##HandleScope(Thread* thread)                       \
+        : handle_(thread->name##_handle_) {                                    \
     }                                                                          \
     Reusable##name##HandleScope()                                              \
-        : handle_(Isolate::Current()->name##_handle_) {                        \
+        : handle_(Thread::Current()->name##_handle_) {                         \
     }                                                                          \
     ~Reusable##name##HandleScope() {                                           \
       handle_->raw_ = name::null();                                            \
@@ -73,7 +74,7 @@
       ASSERT(handle_ != NULL);                                                 \
       return *handle_;                                                         \
     }                                                                          \
-    private:                                                                   \
+   private:                                                                    \
     name* handle_;                                                             \
     DISALLOW_COPY_AND_ASSIGN(Reusable##name##HandleScope);                     \
   };
@@ -81,41 +82,40 @@
 REUSABLE_HANDLE_LIST(REUSABLE_SCOPE)
 #undef REUSABLE_SCOPE
 
-#define REUSABLE_ABSTRACT_TYPE_HANDLESCOPE(isolate)                            \
-  ReusableAbstractTypeHandleScope reused_abstract_type(isolate);
-#define REUSABLE_ARRAY_HANDLESCOPE(isolate)                                    \
-  ReusableArrayHandleScope reused_array_handle(isolate);
-#define REUSABLE_CLASS_HANDLESCOPE(isolate)                                    \
-  ReusableClassHandleScope reused_class_handle(isolate);
-#define REUSABLE_CODE_HANDLESCOPE(isolate)                                     \
-  ReusableCodeHandleScope reused_code_handle(isolate);
-#define REUSABLE_ERROR_HANDLESCOPE(isolate)                                    \
-  ReusableErrorHandleScope reused_error_handle(isolate);
-#define REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(isolate)                       \
+#define REUSABLE_ABSTRACT_TYPE_HANDLESCOPE(thread)                             \
+  ReusableAbstractTypeHandleScope reused_abstract_type(thread);
+#define REUSABLE_ARRAY_HANDLESCOPE(thread)                                     \
+  ReusableArrayHandleScope reused_array_handle(thread);
+#define REUSABLE_CLASS_HANDLESCOPE(thread)                                     \
+  ReusableClassHandleScope reused_class_handle(thread);
+#define REUSABLE_CODE_HANDLESCOPE(thread)                                      \
+  ReusableCodeHandleScope reused_code_handle(thread);
+#define REUSABLE_ERROR_HANDLESCOPE(thread)                                     \
+  ReusableErrorHandleScope reused_error_handle(thread);
+#define REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(thread)                        \
   ReusableExceptionHandlersHandleScope                                         \
-      reused_exception_handlers_handle(isolate);
-#define REUSABLE_FIELD_HANDLESCOPE(isolate)                                    \
-  ReusableFieldHandleScope reused_field_handle(isolate);
-#define REUSABLE_FUNCTION_HANDLESCOPE(isolate)                                 \
-  ReusableFunctionHandleScope reused_function_handle(isolate);
-#define REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(isolate)                    \
+      reused_exception_handlers_handle(thread);
+#define REUSABLE_FIELD_HANDLESCOPE(thread)                                     \
+  ReusableFieldHandleScope reused_field_handle(thread);
+#define REUSABLE_FUNCTION_HANDLESCOPE(thread)                                  \
+  ReusableFunctionHandleScope reused_function_handle(thread);
+#define REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(thread)                     \
   ReusableGrowableObjectArrayHandleScope                                       \
-      reused_growable_object_array_handle(isolate)
-#define REUSABLE_INSTANCE_HANDLESCOPE(isolate)                                 \
-  ReusableInstanceHandleScope reused_instance_handle(isolate);
-#define REUSABLE_LIBRARY_HANDLESCOPE(isolate)                                  \
-  ReusableLibraryHandleScope reused_library_handle(isolate);
-#define REUSABLE_OBJECT_HANDLESCOPE(isolate)                                   \
-  ReusableObjectHandleScope reused_object_handle(isolate);
-#define REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(isolate)                           \
-  ReusablePcDescriptorsHandleScope reused_pc_descriptors_handle(isolate);
-#define REUSABLE_STRING_HANDLESCOPE(isolate)                                   \
-  ReusableStringHandleScope reused_string_handle(isolate);
-#define REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(isolate)                           \
-  ReusableTypeArgumentsHandleScope reused_type_arguments_handle(isolate);
-#define REUSABLE_TYPE_PARAMETER_HANDLESCOPE(isolate)                           \
-  ReusableTypeParameterHandleScope reused_type_parameter(isolate);
-
+      reused_growable_object_array_handle(thread)
+#define REUSABLE_INSTANCE_HANDLESCOPE(thread)                                  \
+  ReusableInstanceHandleScope reused_instance_handle(thread);
+#define REUSABLE_LIBRARY_HANDLESCOPE(thread)                                   \
+  ReusableLibraryHandleScope reused_library_handle(thread);
+#define REUSABLE_OBJECT_HANDLESCOPE(thread)                                    \
+  ReusableObjectHandleScope reused_object_handle(thread);
+#define REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(thread)                            \
+  ReusablePcDescriptorsHandleScope reused_pc_descriptors_handle(thread);
+#define REUSABLE_STRING_HANDLESCOPE(thread)                                    \
+  ReusableStringHandleScope reused_string_handle(thread);
+#define REUSABLE_TYPE_ARGUMENTS_HANDLESCOPE(thread)                            \
+  ReusableTypeArgumentsHandleScope reused_type_arguments_handle(thread);
+#define REUSABLE_TYPE_PARAMETER_HANDLESCOPE(thread)                            \
+  ReusableTypeParameterHandleScope reused_type_parameter(thread);
 
 }  // namespace dart
 
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index f526af1..c2822b5 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -258,9 +258,10 @@
   // 'prologue_weak_were_strong' is currently only used for sanity checking.
   explicit ScavengerWeakVisitor(Scavenger* scavenger,
                                 bool prologue_weak_were_strong)
-      :  HandleVisitor(scavenger->heap_->isolate()),
+      :  HandleVisitor(Thread::Current()),
          scavenger_(scavenger),
          prologue_weak_were_strong_(prologue_weak_were_strong) {
+    ASSERT(scavenger->heap_->isolate() == Thread::Current()->isolate());
   }
 
   void VisitHandle(uword addr) {
@@ -270,9 +271,9 @@
     if (scavenger_->IsUnreachable(p)) {
       ASSERT(!handle->IsPrologueWeakPersistent() ||
              !prologue_weak_were_strong_);
-      handle->UpdateUnreachable(isolate());
+      handle->UpdateUnreachable(thread()->isolate());
     } else {
-      handle->UpdateRelocated(isolate());
+      handle->UpdateRelocated(thread()->isolate());
     }
   }
 
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 70d9e43..450aadc 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -42,6 +42,21 @@
 
 DECLARE_FLAG(bool, trace_service);
 DECLARE_FLAG(bool, trace_service_pause_events);
+DEFINE_FLAG(charp, vm_name, "vm",
+            "The default name of this vm as reported by the VM service "
+            "protocol");
+
+// The name of this of this vm as reported by the VM service protocol.
+static char* vm_name = NULL;
+
+
+static const char* GetVMName() {
+  if (vm_name == NULL) {
+    return FLAG_vm_name;
+  }
+  return vm_name;
+}
+
 
 ServiceIdZone::ServiceIdZone() {
 }
@@ -91,6 +106,7 @@
 
 
 // These are the set of streams known to the core VM.
+StreamInfo Service::vm_stream("VM");
 StreamInfo Service::isolate_stream("Isolate");
 StreamInfo Service::debug_stream("Debug");
 StreamInfo Service::gc_stream("GC");
@@ -99,6 +115,7 @@
 StreamInfo Service::logging_stream("_Logging");
 
 static StreamInfo* streams_[] = {
+  &Service::vm_stream,
   &Service::isolate_stream,
   &Service::debug_stream,
   &Service::gc_stream,
@@ -651,13 +668,13 @@
 void Service::SendEvent(const char* stream_id,
                         const char* event_type,
                         const Object& event_message) {
-  ASSERT(!ServiceIsolate::IsServiceIsolateDescendant(Isolate::Current()));
-  if (!ServiceIsolate::IsRunning()) {
-    return;
-  }
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
+  ASSERT(!ServiceIsolate::IsServiceIsolateDescendant(isolate));
+  if (!ServiceIsolate::IsRunning()) {
+    return;
+  }
   HANDLESCOPE(thread);
 
   const Array& list = Array::Handle(Array::New(2));
@@ -715,7 +732,8 @@
 
 
 void Service::HandleEvent(ServiceEvent* event) {
-  if (ServiceIsolate::IsServiceIsolateDescendant(event->isolate())) {
+  if (event->isolate() != NULL &&
+      ServiceIsolate::IsServiceIsolateDescendant(event->isolate())) {
     return;
   }
   if (!ServiceIsolate::IsRunning()) {
@@ -1095,8 +1113,8 @@
       *kind = ObjectIdRing::kInvalid;
       return Object::null();
     }
-    const Integer& obj =
-        Integer::Handle(isolate, Smi::New(static_cast<intptr_t>(value)));
+    const Integer& obj = Integer::Handle(isolate->current_zone(),
+        Smi::New(static_cast<intptr_t>(value)));
     return obj.raw();
   } else if (strcmp(arg, "bool-true") == 0) {
     return Bool::True().raw();
@@ -1220,7 +1238,8 @@
       return Object::sentinel().raw();
     }
     const char* encoded_id = parts[3];
-    String& id = String::Handle(isolate, String::New(encoded_id));
+    String& id = String::Handle(isolate->current_zone(),
+        String::New(encoded_id));
     id = String::DecodeIRI(id);
     if (id.IsNull()) {
       return Object::sentinel().raw();
@@ -1410,7 +1429,7 @@
 
   if (strcmp(parts[0], "objects") == 0) {
     // Object ids look like "objects/1123"
-    Object& obj = Object::Handle(isolate);
+    Object& obj = Object::Handle(isolate->current_zone());
     ObjectIdRing::LookupResult lookup_result;
     obj = LookupObjectId(isolate, parts[1], &lookup_result);
     if (lookup_result != ObjectIdRing::kValid) {
@@ -1572,7 +1591,7 @@
     return true;
   }
 
-  Object& obj = Object::Handle(isolate);
+  Object& obj = Object::Handle(thread->zone());
   ObjectIdRing::LookupResult lookup_result;
   {
     HANDLESCOPE(thread);
@@ -1674,7 +1693,7 @@
     return true;
   }
 
-  Object& obj = Object::Handle(isolate);
+  Object& obj = Object::Handle(thread->zone());
   ObjectIdRing::LookupResult lookup_result;
   {
     HANDLESCOPE(thread);
@@ -1745,6 +1764,11 @@
 
 
 static bool Evaluate(Isolate* isolate, JSONStream* js) {
+  if (!isolate->compilation_allowed()) {
+    js->PrintError(kFeatureDisabled,
+                   "Cannot evaluate when running a precompiled program.");
+    return true;
+  }
   const char* target_id = js->LookupParam("targetId");
   if (target_id == NULL) {
     PrintMissingParamError(js, "targetId");
@@ -1755,7 +1779,8 @@
     PrintMissingParamError(js, "expression");
     return true;
   }
-  const String& expr_str = String::Handle(isolate, String::New(expr));
+  const String& expr_str =
+      String::Handle(isolate->current_zone(), String::New(expr));
   ObjectIdRing::LookupResult lookup_result;
   Object& obj = Object::Handle(LookupHeapObject(isolate, target_id,
                                                 &lookup_result));
@@ -1788,7 +1813,7 @@
   if ((obj.IsInstance() || obj.IsNull()) &&
       !ContainsNonInstance(obj)) {
     // We don't use Instance::Cast here because it doesn't allow null.
-    Instance& instance = Instance::Handle(isolate);
+    Instance& instance = Instance::Handle(isolate->current_zone());
     instance ^= obj.raw();
     const Object& result =
         Object::Handle(instance.Evaluate(expr_str,
@@ -1814,6 +1839,11 @@
 
 
 static bool EvaluateInFrame(Isolate* isolate, JSONStream* js) {
+  if (!isolate->compilation_allowed()) {
+    js->PrintError(kFeatureDisabled,
+                   "Cannot evaluate when running a precompiled program.");
+    return true;
+  }
   DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
   intptr_t framePos = UIntParameter::Parse(js->LookupParam("frameIndex"));
   if (framePos > stack->Length()) {
@@ -1823,7 +1853,8 @@
   ActivationFrame* frame = stack->FrameAt(framePos);
 
   const char* expr = js->LookupParam("expression");
-  const String& expr_str = String::Handle(isolate, String::New(expr));
+  const String& expr_str = String::Handle(isolate->current_zone(),
+      String::New(expr));
 
   const Object& result = Object::Handle(frame->Evaluate(expr_str));
   result.PrintJSON(js, true);
@@ -1841,9 +1872,9 @@
     if (raw_obj->IsFreeListElement()) {
       return kProceed;
     }
-    Isolate* isolate = Isolate::Current();
-    REUSABLE_OBJECT_HANDLESCOPE(isolate);
-    Object& obj = isolate->ObjectHandle();
+    Thread* thread = Thread::Current();
+    REUSABLE_OBJECT_HANDLESCOPE(thread);
+    Object& obj = thread->ObjectHandle();
     obj = raw_obj;
     if (obj.GetClassId() == cls_.id()) {
       if (!storage_.IsNull() && count_ < storage_.Length()) {
@@ -1977,8 +2008,9 @@
 
 
 static bool GetHitsOrSites(Isolate* isolate, JSONStream* js, bool as_sites) {
+  Thread* thread = Thread::Current();
   if (!js->HasParam("targetId")) {
-    CodeCoverage::PrintJSON(isolate, js, NULL, as_sites);
+    CodeCoverage::PrintJSON(thread, js, NULL, as_sites);
     return true;
   }
   const char* target_id = js->LookupParam("targetId");
@@ -1989,22 +2021,22 @@
   }
   if (obj.IsScript()) {
     ScriptCoverageFilter sf(Script::Cast(obj));
-    CodeCoverage::PrintJSON(isolate, js, &sf, as_sites);
+    CodeCoverage::PrintJSON(thread, js, &sf, as_sites);
     return true;
   }
   if (obj.IsLibrary()) {
     LibraryCoverageFilter lf(Library::Cast(obj));
-    CodeCoverage::PrintJSON(isolate, js, &lf, as_sites);
+    CodeCoverage::PrintJSON(thread, js, &lf, as_sites);
     return true;
   }
   if (obj.IsClass()) {
     ClassCoverageFilter cf(Class::Cast(obj));
-    CodeCoverage::PrintJSON(isolate, js, &cf, as_sites);
+    CodeCoverage::PrintJSON(thread, js, &cf, as_sites);
     return true;
   }
   if (obj.IsFunction()) {
     FunctionCoverageFilter ff(Function::Cast(obj));
-    CodeCoverage::PrintJSON(isolate, js, &ff, as_sites);
+    CodeCoverage::PrintJSON(thread, js, &ff, as_sites);
     return true;
   }
   js->PrintError(kInvalidParams,
@@ -2193,14 +2225,15 @@
 
 
 static RawClass* GetMetricsClass(Isolate* isolate) {
+  Zone* zone = isolate->current_zone();
   const Library& prof_lib =
-      Library::Handle(isolate, Library::DeveloperLibrary());
+      Library::Handle(zone, Library::DeveloperLibrary());
   ASSERT(!prof_lib.IsNull());
   const String& metrics_cls_name =
-      String::Handle(isolate, String::New("Metrics"));
+      String::Handle(zone, String::New("Metrics"));
   ASSERT(!metrics_cls_name.IsNull());
   const Class& metrics_cls =
-      Class::Handle(isolate, prof_lib.LookupClass(metrics_cls_name));
+      Class::Handle(zone, prof_lib.LookupClass(metrics_cls_name));
   ASSERT(!metrics_cls.IsNull());
   return metrics_cls.raw();
 }
@@ -2241,17 +2274,18 @@
 
 
 static bool HandleDartMetricsList(Isolate* isolate, JSONStream* js) {
-  const Class& metrics_cls = Class::Handle(isolate, GetMetricsClass(isolate));
+  Zone* zone = isolate->current_zone();
+  const Class& metrics_cls = Class::Handle(zone, GetMetricsClass(isolate));
   const String& print_metrics_name =
       String::Handle(String::New("_printMetrics"));
   ASSERT(!print_metrics_name.IsNull());
   const Function& print_metrics = Function::Handle(
-      isolate,
+      zone,
       metrics_cls.LookupStaticFunctionAllowPrivate(print_metrics_name));
   ASSERT(!print_metrics.IsNull());
   const Array& args = Object::empty_array();
   const Object& result =
-      Object::Handle(isolate, DartEntry::InvokeFunction(print_metrics, args));
+      Object::Handle(zone, DartEntry::InvokeFunction(print_metrics, args));
   ASSERT(!result.IsNull());
   ASSERT(result.IsString());
   TextBuffer* buffer = js->buffer();
@@ -2261,12 +2295,13 @@
 
 
 static bool HandleDartMetric(Isolate* isolate, JSONStream* js, const char* id) {
-  const Class& metrics_cls = Class::Handle(isolate, GetMetricsClass(isolate));
+  Zone* zone = isolate->current_zone();
+  const Class& metrics_cls = Class::Handle(zone, GetMetricsClass(isolate));
   const String& print_metric_name =
       String::Handle(String::New("_printMetric"));
   ASSERT(!print_metric_name.IsNull());
   const Function& print_metric = Function::Handle(
-      isolate,
+      zone,
       metrics_cls.LookupStaticFunctionAllowPrivate(print_metric_name));
   ASSERT(!print_metric.IsNull());
   const String& arg0 = String::Handle(String::New(id));
@@ -2275,7 +2310,7 @@
   ASSERT(!args.IsNull());
   args.SetAt(0, arg0);
   const Object& result =
-      Object::Handle(isolate, DartEntry::InvokeFunction(print_metric, args));
+      Object::Handle(zone, DartEntry::InvokeFunction(print_metric, args));
   if (!result.IsNull()) {
     ASSERT(result.IsString());
     TextBuffer* buffer = js->buffer();
@@ -2729,7 +2764,7 @@
 
 
 static RawObject* GetObjectHelper(Isolate* isolate, uword addr) {
-  Object& object = Object::Handle(isolate);
+  Object& object = Object::Handle(isolate->current_zone());
 
   {
     NoSafepointScope no_safepoint;
@@ -2765,7 +2800,8 @@
     return true;
   }
   bool ref = js->HasParam("ref") && js->ParamIs("ref", "true");
-  const Object& obj = Object::Handle(isolate, GetObjectHelper(isolate, addr));
+  const Object& obj = Object::Handle(isolate->current_zone(),
+      GetObjectHelper(isolate, addr));
   if (obj.IsNull()) {
     PrintSentinel(js, kFreeSentinel);
   } else {
@@ -2945,17 +2981,20 @@
 };
 
 
-static bool GetVM(Isolate* isolate, JSONStream* js) {
+void Service::PrintJSONForVM(JSONStream* js, bool ref) {
   JSONObject jsobj(js);
-  jsobj.AddProperty("type", "VM");
+  jsobj.AddProperty("type", (ref ? "@VM" : "VM"));
+  jsobj.AddProperty("name", GetVMName());
+  if (ref) {
+    return;
+  }
+  Isolate* vm_isolate = Dart::vm_isolate();
   jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord));
   jsobj.AddProperty("targetCPU", CPU::Id());
   jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware());
   jsobj.AddProperty("version", Version::String());
   jsobj.AddProperty("pid", OS::ProcessId());
-  jsobj.AddProperty("_assertsEnabled", isolate->flags().asserts());
-  jsobj.AddProperty("_typeChecksEnabled", isolate->flags().type_checks());
-  int64_t start_time_millis = (Dart::vm_isolate()->start_time() /
+  int64_t start_time_millis = (vm_isolate->start_time() /
                                kMicrosecondsPerMillisecond);
   jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
   // Construct the isolate list.
@@ -2964,6 +3003,11 @@
     ServiceIsolateVisitor visitor(&jsarr);
     Isolate::VisitIsolates(&visitor);
   }
+}
+
+
+static bool GetVM(Isolate* isolate, JSONStream* js) {
+  Service::PrintJSONForVM(js, false);
   return true;
 }
 
@@ -2981,33 +3025,41 @@
 }
 
 
-static const MethodParameter* set_exception_pause_info_params[] = {
-  ISOLATE_PARAMETER,
+static const char* exception_pause_mode_names[] = {
+  "All",
+  "None",
+  "Unhandled",
   NULL,
 };
 
 
-static bool SetExceptionPauseInfo(Isolate* isolate, JSONStream* js) {
-  const char* exceptions = js->LookupParam("exceptions");
-  if (exceptions == NULL) {
-    PrintMissingParamError(js, "exceptions");
+static Dart_ExceptionPauseInfo exception_pause_mode_values[] = {
+  kPauseOnAllExceptions,
+  kNoPauseOnExceptions,
+  kPauseOnUnhandledExceptions,
+  kInvalidExceptionPauseInfo,
+};
+
+
+static const MethodParameter* set_exception_pause_mode_params[] = {
+  ISOLATE_PARAMETER,
+  new EnumParameter("mode", true, exception_pause_mode_names),
+  NULL,
+};
+
+
+static bool SetExceptionPauseMode(Isolate* isolate, JSONStream* js) {
+  const char* mode = js->LookupParam("mode");
+  if (mode == NULL) {
+    PrintMissingParamError(js, "mode");
     return true;
   }
-
-  Dart_ExceptionPauseInfo info = kNoPauseOnExceptions;
-  if (strcmp(exceptions, "none") == 0) {
-    info = kNoPauseOnExceptions;
-  } else if (strcmp(exceptions, "all") == 0) {
-    info = kPauseOnAllExceptions;
-  } else if (strcmp(exceptions, "unhandled") == 0) {
-    info = kPauseOnUnhandledExceptions;
-  } else {
-    JSONObject jsobj(js);
-    jsobj.AddProperty("type", "Error");
-    jsobj.AddProperty("message", "illegal value for parameter 'exceptions'");
+  Dart_ExceptionPauseInfo info =
+      EnumMapper(mode, exception_pause_mode_names, exception_pause_mode_values);
+  if (info == kInvalidExceptionPauseInfo) {
+    PrintInvalidParamError(js, "mode");
     return true;
   }
-
   isolate->debugger()->SetExceptionPauseInfo(info);
   if (Service::debug_stream.enabled()) {
     ServiceEvent event(isolate, ServiceEvent::kDebuggerSettingsUpdate);
@@ -3104,6 +3156,25 @@
 }
 
 
+static const MethodParameter* set_vm_name_params[] = {
+  new MethodParameter("name", true),
+  NULL,
+};
+
+
+static bool SetVMName(Isolate* isolate, JSONStream* js) {
+  const char* name_param = js->LookupParam("name");
+  free(vm_name);
+  vm_name = strdup(name_param);
+  if (Service::vm_stream.enabled()) {
+    ServiceEvent event(NULL, ServiceEvent::kVMUpdate);
+    Service::HandleEvent(&event);
+  }
+  PrintSuccess(js);
+  return true;
+}
+
+
 static const MethodParameter* set_trace_class_allocation_params[] = {
   ISOLATE_PARAMETER,
   new IdParameter("classId", true),
@@ -3213,8 +3284,8 @@
     resume_params },
   { "_requestHeapSnapshot", RequestHeapSnapshot,
     request_heap_snapshot_params },
-  { "_setExceptionPauseInfo", SetExceptionPauseInfo,
-    set_exception_pause_info_params },
+  { "setExceptionPauseMode", SetExceptionPauseMode,
+    set_exception_pause_mode_params },
   { "_setFlag", SetFlag,
     set_flags_params },
   { "setLibraryDebuggable", SetLibraryDebuggable,
@@ -3223,6 +3294,8 @@
     set_name_params },
   { "_setTraceClassAllocation", SetTraceClassAllocation,
     set_trace_class_allocation_params },
+  { "setVMName", SetVMName,
+    set_vm_name_params },
 };
 
 
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 4e4ccd2..3fe90fe 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -129,6 +129,7 @@
                         const Error& error);
 
   // Well-known streams.
+  static StreamInfo vm_stream;
   static StreamInfo isolate_stream;
   static StreamInfo debug_stream;
   static StreamInfo gc_stream;
@@ -146,6 +147,8 @@
     return stream_cancel_callback_;
   }
 
+  static void PrintJSONForVM(JSONStream* js, bool ref);
+
  private:
   static void InvokeMethod(Isolate* isolate, const Array& message);
 
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index df05a47..d0466ef 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -38,8 +38,10 @@
 	- [pause](#pause)
 	- [removeBreakpoint](#removebreakpoint)
 	- [resume](#resume)
-	- [setName](#setname)
+	- [setExceptionPauseMode](#setexceptionpausemode)
 	- [setLibraryDebuggable](#setlibrarydebuggable)
+	- [setName](#setname)
+	- [setVMName](#setvmname)
 	- [streamCancel](#streamcancel)
 	- [streamListen](#streamlisten)
 - [Public Types](#public-types)
@@ -623,16 +625,22 @@
 
 See [Success](#success), [StepOption](#StepOption).
 
-### setName
+### setExceptionPauseMode
 
 ```
-Success setName(string isolateId,
-                string name)
+Success setExceptionPauseMode(string isolateId,
+                              ExceptionPauseMode mode)
 ```
 
-The _setName_ RPC is used to change the debugging name for an isolate.
+The _setExceptionPauseMode_ RPC is used to control if an isolate pauses when
+an exception is thrown.
 
-See [Success](#success).
+mode | meaning
+---- | -------
+None | Do not pause isolate on thrown exceptions
+Unhandled | Pause isolate on unhandled exceptions
+All  | Pause isolate on all thrown exceptions
+
 
 ### setLibraryDebuggable
 
@@ -647,6 +655,27 @@
 
 See [Success](#success).
 
+### setName
+
+```
+Success setName(string isolateId,
+                string name)
+```
+
+The _setName_ RPC is used to change the debugging name for an isolate.
+
+See [Success](#success).
+
+### setVMName
+
+```
+Success setVMName(string name)
+```
+
+The _setVMName_ RPC is used to change the debugging name for the vm.
+
+See [Success](#success).
+
 ### streamCancel
 
 ```
@@ -676,6 +705,7 @@
 
 streamId | event types provided
 -------- | -----------
+VM | VMUpdate
 Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate
 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect
 GC | GC
@@ -757,6 +787,13 @@
   PropertyType1|PropertyType2 complexProperty;
 ```
 
+We also allow parenthesis on type expressions.  This is useful when a property
+is an _Array_ of multiple independent types:
+
+```
+  (PropertyType1|PropertyType2)[]
+```
+
 When a string is only permitted to take one of a certain set of values,
 we indicate this by the use of the _enum_ format:
 
@@ -1027,7 +1064,16 @@
   EventKind kind;
 
   // The isolate with which this event is associated.
-  @Isolate isolate;
+  //
+  // This is provided for all event kinds except for:
+  //   VMUpdate
+  @Isolate isolate [optional];
+
+  // The vm with which this event is associated.
+  //
+  // This is provided for the event kind:
+  //   VMUpdate
+  @VM vm [optional];
 
   // The timestamp (in milliseconds since the epoch) associated with this event.
   // For some isolate pause events, the timestamp is from when the isolate was
@@ -1092,6 +1138,10 @@
 
 ```
 enum EventKind {
+  // Notification that VM identifying information has changed. Currently used
+  // to notify of changes to the VM debugging name via setVMName.
+  VMUpdate,
+
   // Notification that a new isolate has started.
   IsolateStart,
 
@@ -1437,13 +1487,13 @@
   @Class parameterizedClass [optional];
 
   // The fields of this Instance.
-  BoundField fields [optional];
+  BoundField[] fields [optional];
 
   // The elements of a List instance.
   //
   // Provided for instance kinds:
   //   List
-  @Instance|Sentinel[] elements [optional];
+  (@Instance|Sentinel)[] elements [optional];
 
   // The elements of a List instance.
   //
@@ -2011,6 +2061,19 @@
 }
 ```
 
+### ExceptionPauseMode
+
+```
+enum ExceptionPauseMode {
+  None,
+  Unhandled,
+  All,
+}
+```
+
+An _ExceptionPauseMode_ indicates how the isolate pauses when an exception
+is thrown.
+
 ### StepOption
 
 ```
@@ -2115,6 +2178,15 @@
 ### VM
 
 ```
+class @VM extends Response {
+  // A name identifying this vm. Not guaranteed to be unique.
+  string name;
+}
+```
+
+_@VM_ is a reference to a _VM_ object.
+
+```
 class VM extends Response {
   // Word length on target architecture (e.g. 32, 64).
   int architectureBits;
@@ -2147,7 +2219,7 @@
 ------- | --------
 1.0 | initial revision
 2.0 | Describe protocol version 2.0.
-3.0 | Describe protocol version 3.0.  Added UnresolvedSourceLocation.  Added Sentinel return to getIsolate.  Add AddedBreakpointWithScriptUri.  Removed Isolate.entry. The type of VM.pid was changed from string to int.
+3.0 | Describe protocol version 3.0.  Added UnresolvedSourceLocation.  Added Sentinel return to getIsolate.  Add AddedBreakpointWithScriptUri.  Removed Isolate.entry. The type of VM.pid was changed from string to int.  Added VMUpdate events.
 
 
 [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 42dd202..1023043 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -91,6 +91,8 @@
 
 const char* ServiceEvent::KindAsCString() const {
   switch (kind()) {
+    case kVMUpdate:
+      return "VMUpdate";
     case kIsolateStart:
       return "IsolateStart";
     case kIsolateRunnable:
@@ -138,6 +140,9 @@
 
 const char* ServiceEvent::stream_id() const {
   switch (kind()) {
+    case kVMUpdate:
+      return Service::vm_stream.id();
+
     case kIsolateStart:
     case kIsolateRunnable:
     case kIsolateExit:
@@ -234,7 +239,11 @@
   ASSERT(jsobj != NULL);
   jsobj->AddProperty("type", "Event");
   jsobj->AddProperty("kind", KindAsCString());
-  jsobj->AddProperty("isolate", isolate());
+  if (kind() == kVMUpdate) {
+    jsobj->AddPropertyVM("vm");
+  } else {
+    jsobj->AddProperty("isolate", isolate());
+  }
   ASSERT(timestamp_ != -1);
   jsobj->AddPropertyTimeMillis("timestamp", timestamp_);
 }
diff --git a/runtime/vm/service_event.h b/runtime/vm/service_event.h
index 3268051..71516a6 100644
--- a/runtime/vm/service_event.h
+++ b/runtime/vm/service_event.h
@@ -14,6 +14,8 @@
 class ServiceEvent {
  public:
   enum EventKind {
+    kVMUpdate,           // VM identity information has changed
+
     kIsolateStart,       // New isolate has started
     kIsolateRunnable,    // Isolate is ready to run
     kIsolateExit,        // Isolate has exited
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 4448820..cb92d3a 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -313,6 +313,7 @@
         reinterpret_cast<Isolate*>(create_callback(ServiceIsolate::kName,
                                                    NULL,
                                                    NULL,
+                                                   NULL,
                                                    &api_flags,
                                                    NULL,
                                                    &error));
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 406dfbb..de6a0d8 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -55,9 +55,9 @@
   const String& dummy_isolate_id = String::Handle(String::New("isolateId"));
   Dart_Handle expr_val = Dart_EvaluateExpr(lib, NewString(expr));
   EXPECT_VALID(expr_val);
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   const GrowableObjectArray& value =
-      Api::UnwrapGrowableObjectArrayHandle(isolate, expr_val);
+      Api::UnwrapGrowableObjectArrayHandle(zone, expr_val);
   const Array& result = Array::Handle(Array::MakeArray(value));
   GrowableObjectArray& growable = GrowableObjectArray::Handle();
   growable ^= result.At(4);
@@ -107,13 +107,14 @@
 
 
 TEST_CASE(Service_IdZones) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   ObjectIdRing* ring = isolate->object_id_ring();
 
-  const String& test_a = String::Handle(isolate, String::New("a"));
-  const String& test_b = String::Handle(isolate, String::New("b"));
-  const String& test_c = String::Handle(isolate, String::New("c"));
-  const String& test_d = String::Handle(isolate, String::New("d"));
+  const String& test_a = String::Handle(zone, String::New("a"));
+  const String& test_b = String::Handle(zone, String::New("b"));
+  const String& test_c = String::Handle(zone, String::New("c"));
+  const String& test_d = String::Handle(zone, String::New("d"));
 
   // Both RingServiceIdZones share the same backing store and id space.
 
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index e4c757d..d496aaa 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -218,7 +218,7 @@
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
     PassiveObject& obj =
-        PassiveObject::Handle(isolate(), ReadObjectImpl(kAsInlinedObject));
+        PassiveObject::Handle(zone(), ReadObjectImpl(kAsInlinedObject));
     for (intptr_t i = 0; i < backward_references_->length(); i++) {
       if (!(*backward_references_)[i].is_deserialized()) {
         ReadObjectImpl(kAsInlinedObject);
@@ -308,7 +308,7 @@
 
   // First create a function object and associate it with the specified
   // 'object_id'.
-  Function& func = Function::Handle(isolate(), Function::null());
+  Function& func = Function::Handle(zone(), Function::null());
   Instance& obj = Instance::ZoneHandle(zone(), Instance::null());
   AddBackRef(object_id, &obj, kIsDeserialized);
 
@@ -500,7 +500,7 @@
   switch (class_id) {
 #define SNAPSHOT_READ(clazz)                                                   \
     case clazz::kClassId: {                                                    \
-      pobj_ = clazz::ReadFrom(this, object_id, tags, kind_);                   \
+      pobj_ = clazz::ReadFrom(this, object_id, tags, kind_, true);             \
       break;                                                                   \
     }
     CLASS_LIST_NO_OBJECT(SNAPSHOT_READ)
@@ -510,7 +510,7 @@
 
     CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
       tags = RawObject::ClassIdTag::update(class_id, tags);
-      pobj_ = TypedData::ReadFrom(this, object_id, tags, kind_);
+      pobj_ = TypedData::ReadFrom(this, object_id, tags, kind_, true);
       break;
     }
 #undef SNAPSHOT_READ
@@ -519,7 +519,7 @@
 
     CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
       tags = RawObject::ClassIdTag::update(class_id, tags);
-      pobj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_);
+      pobj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_, true);
       break;
     }
 #undef SNAPSHOT_READ
@@ -618,7 +618,7 @@
   switch (class_id) {
 #define SNAPSHOT_READ(clazz)                                                   \
     case clazz::kClassId: {                                                    \
-      pobj_ = clazz::ReadFrom(this, object_id, tags, kind_);                   \
+      pobj_ = clazz::ReadFrom(this, object_id, tags, kind_, false);            \
       break;                                                                   \
     }
     CLASS_LIST_NO_OBJECT(SNAPSHOT_READ)
@@ -628,7 +628,7 @@
 
     CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
       tags = RawObject::ClassIdTag::update(class_id, tags);
-      pobj_ = TypedData::ReadFrom(this, object_id, tags, kind_);
+      pobj_ = TypedData::ReadFrom(this, object_id, tags, kind_, false);
       break;
     }
 #undef SNAPSHOT_READ
@@ -637,7 +637,7 @@
 
     CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
       tags = RawObject::ClassIdTag::update(class_id, tags);
-      pobj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_);
+      pobj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_, false);
       break;
     }
 #undef SNAPSHOT_READ
@@ -1190,10 +1190,7 @@
 
 
 int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions) {
-  // Can't use instructions->Size() because the header was mutated by the
-  // snapshot writer.
-  intptr_t heap_size =
-      Instructions::InstanceSize(instructions->ptr()->size_);
+  intptr_t heap_size = instructions->Size();
   intptr_t offset = next_offset_;
   next_offset_ += heap_size;
   instructions_.Add(InstructionsData(instructions));
@@ -1669,6 +1666,7 @@
 
 
 SnapshotWriter::SnapshotWriter(Snapshot::Kind kind,
+                               Thread* thread,
                                uint8_t** buffer,
                                ReAlloc alloc,
                                intptr_t initial_size,
@@ -1679,9 +1677,9 @@
                                bool vm_isolate_is_symbolic)
     : BaseWriter(buffer, alloc, initial_size),
       kind_(kind),
-      thread_(Thread::Current()),
-      object_store_(thread_->isolate()->object_store()),
-      class_table_(thread_->isolate()->class_table()),
+      thread_(thread),
+      object_store_(isolate()->object_store()),
+      class_table_(isolate()->class_table()),
       forward_list_(forward_list),
       instructions_writer_(instructions_writer),
       exception_type_(Exceptions::kNone),
@@ -1699,6 +1697,12 @@
   WriteForwardedObjects();
 }
 
+
+uword SnapshotWriter::GetObjectTags(RawObject* raw) {
+  return raw->ptr()->tags_;
+}
+
+
 #define VM_OBJECT_CLASS_LIST(V)                                                \
   V(OneByteString)                                                             \
   V(Mint)                                                                      \
@@ -1708,9 +1712,9 @@
 
 #define VM_OBJECT_WRITE(clazz)                                                 \
   case clazz::kClassId: {                                                      \
-    object_id = forward_list_->AddObject(rawobj, kIsSerialized);               \
+    object_id = forward_list_->AddObject(zone(), rawobj, kIsSerialized);       \
     Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(rawobj);               \
-    raw_obj->WriteTo(this, object_id, kind());                                 \
+        raw_obj->WriteTo(this, object_id, kind(), false);                      \
     return true;                                                               \
   }                                                                            \
 
@@ -1792,9 +1796,9 @@
       switch (id) {
         VM_OBJECT_CLASS_LIST(VM_OBJECT_WRITE)
         case kTypedDataUint32ArrayCid: {
-          object_id = forward_list_->AddObject(rawobj, kIsSerialized);
+          object_id = forward_list_->AddObject(zone(), rawobj, kIsSerialized);
           RawTypedData* raw_obj = reinterpret_cast<RawTypedData*>(rawobj);
-          raw_obj->WriteTo(this, object_id, kind());
+          raw_obj->WriteTo(this, object_id, kind(), false);
           return true;
         }
         default:
@@ -1824,13 +1828,13 @@
  public:
   explicit ScriptVisitor(Isolate* isolate) :
       ObjectVisitor(isolate),
-      objHandle_(Object::Handle(isolate)),
+      objHandle_(Object::Handle(isolate->current_zone())),
       count_(0),
       scripts_(NULL) {}
 
   ScriptVisitor(Isolate* isolate, const Array* scripts) :
       ObjectVisitor(isolate),
-      objHandle_(Object::Handle(isolate)),
+      objHandle_(Object::Handle(isolate->current_zone())),
       count_(0),
       scripts_(scripts) {}
 
@@ -1859,7 +1863,7 @@
                                        ReAlloc alloc,
                                        bool snapshot_code,
                                        bool vm_isolate_is_symbolic)
-    : isolate_(Isolate::Current()),
+    : thread_(Thread::Current()),
       vm_isolate_snapshot_buffer_(vm_isolate_snapshot_buffer),
       isolate_snapshot_buffer_(isolate_snapshot_buffer),
       instructions_snapshot_buffer_(instructions_snapshot_buffer),
@@ -1869,42 +1873,41 @@
       instructions_snapshot_size_(0),
       forward_list_(NULL),
       instructions_writer_(NULL),
-      scripts_(Array::Handle(isolate_)),
-      symbol_table_(Array::Handle(isolate_)),
+      scripts_(Array::Handle(zone())),
+      symbol_table_(Array::Handle(zone())),
       snapshot_code_(snapshot_code),
       vm_isolate_is_symbolic_(vm_isolate_is_symbolic) {
   ASSERT(isolate_snapshot_buffer_ != NULL);
   ASSERT(alloc_ != NULL);
-  ASSERT(isolate_ != NULL);
+  ASSERT(isolate() != NULL);
   ASSERT(ClassFinalizer::AllClassesFinalized());
-  ObjectStore* object_store = isolate_->object_store();
+  ASSERT(isolate() != NULL);
+  ASSERT(heap() != NULL);
+  ObjectStore* object_store = isolate()->object_store();
   ASSERT(object_store != NULL);
-  Heap* heap = isolate_->heap();
-  ASSERT(heap != NULL);
   // Ensure the class table is valid.
 #if defined(DEBUG)
-  isolate_->ValidateClassTable();
+  isolate()->ValidateClassTable();
 #endif
 
   // Collect all the script objects and their accompanying token stream objects
   // into an array so that we can write it out as part of the VM isolate
   // snapshot. We first count the number of script objects, allocate an array
   // and then fill it up with the script objects.
-  ASSERT(isolate_ != NULL);
-  ScriptVisitor scripts_counter(isolate_);
-  heap->IterateOldObjects(&scripts_counter);
+  ScriptVisitor scripts_counter(isolate());
+  heap()->IterateOldObjects(&scripts_counter);
   intptr_t count = scripts_counter.count();
   scripts_ = Array::New(count, Heap::kOld);
-  ScriptVisitor script_visitor(isolate_, &scripts_);
-  heap->IterateOldObjects(&script_visitor);
+  ScriptVisitor script_visitor(isolate(), &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_);
+  Symbols::SetupSymbolTable(isolate());
 
-  forward_list_ = new ForwardList(SnapshotWriter::FirstObjectId());
+  forward_list_ = new ForwardList(thread(), SnapshotWriter::FirstObjectId());
   ASSERT(forward_list_ != NULL);
 
   if (instructions_snapshot_buffer != NULL) {
@@ -1925,6 +1928,7 @@
 void FullSnapshotWriter::WriteVmIsolateSnapshot() {
   ASSERT(vm_isolate_snapshot_buffer_ != NULL);
   SnapshotWriter writer(Snapshot::kFull,
+                        thread(),
                         vm_isolate_snapshot_buffer_,
                         alloc_,
                         kInitialSize,
@@ -1975,6 +1979,7 @@
 
 void FullSnapshotWriter::WriteIsolateFullSnapshot() {
   SnapshotWriter writer(Snapshot::kFull,
+                        thread(),
                         isolate_snapshot_buffer_,
                         alloc_,
                         kInitialSize,
@@ -1983,7 +1988,7 @@
                         true, /* can_send_any_object */
                         snapshot_code_,
                         true /* vm_isolate_is_symbolic */);
-  ObjectStore* object_store = isolate_->object_store();
+  ObjectStore* object_store = isolate()->object_store();
   ASSERT(object_store != NULL);
 
   // Write full snapshot for a regular isolate.
@@ -2010,7 +2015,6 @@
     writer.WriteForwardedObjects();
 
     writer.FillHeader(writer.kind());
-    writer.UnmarkAll();
 
     isolate_snapshot_size_ = writer.BytesWritten();
   } else {
@@ -2020,22 +2024,13 @@
 
 
 void FullSnapshotWriter::WriteFullSnapshot() {
-  if (!vm_isolate_is_symbolic_) {
-    // TODO(asiva): Don't mutate object headers during serialization.
-    WritableVMIsolateScope scope(Thread::Current());
-
-    if (vm_isolate_snapshot_buffer() != NULL) {
-      WriteVmIsolateSnapshot();
-    }
-    WriteIsolateFullSnapshot();
-
+  if (vm_isolate_snapshot_buffer() != NULL) {
+    WriteVmIsolateSnapshot();
+  }
+  WriteIsolateFullSnapshot();
+  if (snapshot_code_) {
     instructions_writer_->WriteAssembly();
     instructions_snapshot_size_ = instructions_writer_->BytesWritten();
-  } else {
-    if (vm_isolate_snapshot_buffer() != NULL) {
-      WriteVmIsolateSnapshot();
-    }
-    WriteIsolateFullSnapshot();
   }
 }
 
@@ -2057,91 +2052,42 @@
 PrecompiledSnapshotWriter::~PrecompiledSnapshotWriter() {}
 
 
-uword SnapshotWriter::GetObjectTags(RawObject* raw) {
-  uword tags = raw->ptr()->tags_;
-  if (SerializedHeaderTag::decode(tags) == kObjectId) {
-    intptr_t id = SerializedHeaderData::decode(tags);
-    return forward_list_->NodeForObjectId(id)->tags();
-  } else {
-    return tags;
-  }
-}
-
-
-ForwardList::ForwardList(intptr_t first_object_id)
-    : first_object_id_(first_object_id),
+ForwardList::ForwardList(Thread* thread, intptr_t first_object_id)
+    : thread_(thread),
+      first_object_id_(first_object_id),
       nodes_(),
       first_unprocessed_object_id_(first_object_id) {
-  // The ForwardList encodes information in the header tag word. There cannot
-  // be any concurrent GC tasks while it is in use.
-  Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
-  PageSpace* page_space = isolate->heap()->old_space();
-  MonitorLocker ml(page_space->tasks_lock());
-  while (page_space->tasks() > 0) {
-    ml.Wait();
-  }
-  // Ensure that no GC happens while we are writing out the full snapshot.
-  thread->IncrementNoSafepointScopeDepth();
 }
 
 
 ForwardList::~ForwardList() {
+  heap()->ResetObjectIdTable();
 }
 
 
-intptr_t ForwardList::MarkAndAddObject(RawObject* raw, SerializeState state) {
+intptr_t ForwardList::AddObject(Zone* zone,
+                                RawObject* raw,
+                                SerializeState state) {
   NoSafepointScope no_safepoint;
   intptr_t object_id = next_object_id();
   ASSERT(object_id > 0 && object_id <= kMaxObjectId);
-  uword value = 0;
-  value = SerializedHeaderTag::update(kObjectId, value);
-  value = SerializedHeaderData::update(object_id, value);
-  uword tags = raw->ptr()->tags_;
-  ASSERT(SerializedHeaderTag::decode(tags) != kObjectId);
-  raw->ptr()->tags_ = value;
-  Node* node = new Node(raw, tags, state);
+  const Object& obj = Object::ZoneHandle(zone, raw);
+  Node* node = new Node(&obj, state);
   ASSERT(node != NULL);
   nodes_.Add(node);
-  return object_id;
-}
-
-
-intptr_t ForwardList::AddObject(RawObject* raw, SerializeState state) {
-  NoSafepointScope no_safepoint;
-  intptr_t object_id = next_object_id();
-  ASSERT(object_id > 0 && object_id <= kMaxObjectId);
-  uword tags = raw->ptr()->tags_;
-  ASSERT(SerializedHeaderTag::decode(tags) != kObjectId);
-  Node* node = new Node(raw, tags, state);
-  ASSERT(node != NULL);
-  nodes_.Add(node);
+  ASSERT(SnapshotWriter::FirstObjectId() > 0);
+  ASSERT(object_id != 0);
+  heap()->SetObjectId(raw, object_id);
   return object_id;
 }
 
 
 intptr_t ForwardList::FindObject(RawObject* raw) {
   NoSafepointScope no_safepoint;
-  intptr_t id;
-  for (id = first_object_id(); id < next_object_id(); ++id) {
-    const Node* node = NodeForObjectId(id);
-    if (raw == node->raw()) {
-      return id;
-    }
-  }
-  return kInvalidIndex;
-}
-
-
-void ForwardList::UnmarkAll() const {
-  for (intptr_t id = first_object_id(); id < next_object_id(); ++id) {
-    const Node* node = NodeForObjectId(id);
-    RawObject* raw = node->raw();
-    if (SerializedHeaderTag::decode(raw->ptr()->tags_) == kObjectId) {
-      raw->ptr()->tags_ = node->tags();  // Restore original tags.
-    }
-  }
-  Thread::Current()->DecrementNoSafepointScopeDepth();
+  ASSERT(SnapshotWriter::FirstObjectId() > 0);
+  intptr_t id = heap()->GetObjectId(raw);
+  ASSERT(id == 0 || NodeForObjectId(id)->obj()->raw() == raw);
+  return (id == 0) ? static_cast<intptr_t>(kInvalidIndex) : id;
 }
 
 
@@ -2170,10 +2116,9 @@
 
   // Check if object has already been serialized, in that case just write
   // the object id out.
-  uword tags = rawobj->ptr()->tags_;
-  if (SerializedHeaderTag::decode(tags) == kObjectId) {
-    intptr_t id = SerializedHeaderData::decode(tags);
-    WriteIndexedObject(id);
+  intptr_t object_id = forward_list_->FindObject(rawobj);
+  if (object_id != kInvalidIndex) {
+    WriteIndexedObject(object_id);
     return true;
   }
 
@@ -2224,145 +2169,47 @@
     return;
   }
 
-  // Objects are usually writen as references to avoid deep recursion, but in
-  // some places we know we are dealing with leaf or shallow objects and write
-  // them inline.
-  if (!as_reference || raw->IsCanonical()) {
-    // Object is being serialized, add it to the forward ref list and mark
-    // it so that future references to this object in the snapshot will use
-    // an object id, instead of trying to serialize it again.
-    forward_list_->MarkAndAddObject(raw, kIsSerialized);
+  // When we know that we are dealing with leaf or shallow objects we write
+  // these objects inline even when 'as_reference' is true.
+  const bool write_as_reference = as_reference && !raw->IsCanonical();
+  intptr_t tags = raw->ptr()->tags_;
 
-    WriteInlinedObject(raw);
-  } else {
-    WriteObjectRef(raw);
-  }
-}
-
-
-void SnapshotWriter::WriteObjectRef(RawObject* raw) {
-  NoSafepointScope no_safepoint;
-  RawClass* cls = class_table_->At(raw->GetClassId());
-  intptr_t class_id = cls->ptr()->id_;
-  ASSERT(class_id == raw->GetClassId());
-  if (class_id >= kNumPredefinedCids ||
-      RawObject::IsImplicitFieldClassId(class_id)) {
-    WriteInstanceRef(raw, cls);
-    return;
-  }
-  if (class_id == kArrayCid || class_id == kImmutableArrayCid) {
-    intptr_t tags = GetObjectTags(raw);
-
-    // Object is being referenced, add it to the forward ref list and mark
-    // it so that future references to this object in the snapshot will use
-    // this object id. Mark it as not having been serialized yet so that we
-    // will serialize the object when we go through the forward list.
-    forward_list_->MarkAndAddObject(raw, kIsNotSerialized);
-
-    RawArray* rawarray = reinterpret_cast<RawArray*>(raw);
-
-    // Write out the serialization header value for this object.
-    WriteInlinedObjectHeader(kOmittedObjectId);
-
-    // Write out the class information.
-    WriteIndexedObject(class_id);
-    WriteTags(tags);
-
-    // Write out the length field.
-    Write<RawObject*>(rawarray->ptr()->length_);
-
-    return;
-  }
-  if (class_id == kObjectPoolCid) {
-    intptr_t tags = GetObjectTags(raw);
-
-    // Object is being referenced, add it to the forward ref list and mark
-    // it so that future references to this object in the snapshot will use
-    // this object id. Mark it as not having been serialized yet so that we
-    // will serialize the object when we go through the forward list.
-    forward_list_->MarkAndAddObject(raw, kIsNotSerialized);
-
-    RawObjectPool* rawpool = reinterpret_cast<RawObjectPool*>(raw);
-
-    // Write out the serialization header value for this object.
-    WriteInlinedObjectHeader(kOmittedObjectId);
-
-    // Write out the class information.
-    WriteVMIsolateObject(kObjectPoolCid);
-    WriteTags(tags);
-
-    // Write out the length field.
-    Write<intptr_t>(rawpool->ptr()->length_);
-
-    return;
-  }
   // Add object to the forward ref list and mark it so that future references
-  // to this object in the snapshot will use this object id. Mark it as having
-  // been serialized so that we do not serialize the object when we go through
+  // to this object in the snapshot will use this object id. Mark the
+  // serialization state so that we do the right thing when we go through
   // the forward list.
-  forward_list_->MarkAndAddObject(raw, kIsSerialized);
-  switch (class_id) {
-#define SNAPSHOT_WRITE(clazz)                                                  \
-    case clazz::kClassId: {                                                    \
-      Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(raw);                \
-      raw_obj->WriteTo(this, kOmittedObjectId, kind_);                         \
-      return;                                                                  \
-    }                                                                          \
-
-    CLASS_LIST_NO_OBJECT(SNAPSHOT_WRITE)
-#undef SNAPSHOT_WRITE
-#define SNAPSHOT_WRITE(clazz)                                                  \
-    case kTypedData##clazz##Cid:                                               \
-
-    CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) {
-      RawTypedData* raw_obj = reinterpret_cast<RawTypedData*>(raw);
-      raw_obj->WriteTo(this, kOmittedObjectId, kind_);
-      return;
-    }
-#undef SNAPSHOT_WRITE
-#define SNAPSHOT_WRITE(clazz)                                                  \
-    case kExternalTypedData##clazz##Cid:                                       \
-
-    CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) {
-      RawExternalTypedData* raw_obj =
-        reinterpret_cast<RawExternalTypedData*>(raw);
-      raw_obj->WriteTo(this, kOmittedObjectId, kind_);
-      return;
-    }
-#undef SNAPSHOT_WRITE
-    default: break;
+  intptr_t class_id = raw->GetClassId();
+  intptr_t object_id;
+  if (write_as_reference && IsSplitClassId(class_id)) {
+    object_id = forward_list_->AddObject(zone(), raw, kIsNotSerialized);
+  } else {
+    object_id = forward_list_->AddObject(zone(), raw, kIsSerialized);
   }
-  UNREACHABLE();
-}
-
-
-void SnapshotWriter::WriteInlinedObject(RawObject* raw) {
-  // Now write the object out inline in the stream as follows:
-  // - Object is seen for the first time (inlined as follows):
-  //    (object size in multiples of kObjectAlignment | 0x1)
-  //    serialized fields of the object
-  //    ......
-  NoSafepointScope no_safepoint;
-  uword tags = raw->ptr()->tags_;
-  ASSERT(SerializedHeaderTag::decode(tags) == kObjectId);
-  intptr_t object_id = SerializedHeaderData::decode(tags);
-  tags = forward_list_->NodeForObjectId(object_id)->tags();
-  RawClass* cls = class_table_->At(RawObject::ClassIdTag::decode(tags));
-  intptr_t class_id = cls->ptr()->id_;
-
-  if (!IsSplitClassId(class_id)) {
+  if (write_as_reference || !IsSplitClassId(class_id)) {
     object_id = kOmittedObjectId;
   }
+  WriteMarkedObjectImpl(raw, tags, object_id, write_as_reference);
+}
 
-  if (class_id >= kNumPredefinedCids) {
-    WriteInstance(object_id, raw, cls, tags);
+
+void SnapshotWriter::WriteMarkedObjectImpl(RawObject* raw,
+                                           intptr_t tags,
+                                           intptr_t object_id,
+                                           bool as_reference) {
+  NoSafepointScope no_safepoint;
+  RawClass* cls = class_table_->At(RawObject::ClassIdTag::decode(tags));
+  intptr_t class_id = cls->ptr()->id_;
+  ASSERT(class_id == RawObject::ClassIdTag::decode(tags));
+  if (class_id >= kNumPredefinedCids ||
+      RawObject::IsImplicitFieldClassId(class_id)) {
+    WriteInstance(raw, cls, tags, object_id, as_reference);
     return;
   }
   switch (class_id) {
 #define SNAPSHOT_WRITE(clazz)                                                  \
     case clazz::kClassId: {                                                    \
       Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(raw);                \
-      raw_obj->WriteTo(this, object_id, kind_);                                \
+          raw_obj->WriteTo(this, object_id, kind_, as_reference);              \
       return;                                                                  \
     }                                                                          \
 
@@ -2373,7 +2220,7 @@
 
     CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) {
       RawTypedData* raw_obj = reinterpret_cast<RawTypedData*>(raw);
-      raw_obj->WriteTo(this, object_id, kind_);
+      raw_obj->WriteTo(this, object_id, kind_, as_reference);
       return;
     }
 #undef SNAPSHOT_WRITE
@@ -2383,16 +2230,7 @@
     CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) {
       RawExternalTypedData* raw_obj =
         reinterpret_cast<RawExternalTypedData*>(raw);
-      raw_obj->WriteTo(this, object_id, kind_);
-      return;
-    }
-#undef SNAPSHOT_WRITE
-#define SNAPSHOT_WRITE(clazz)                                                  \
-    case kTypedData##clazz##ViewCid:                                           \
-
-    CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE)
-    case kByteDataViewCid: {
-      WriteInstance(object_id, raw, cls, tags);
+      raw_obj->WriteTo(this, object_id, kind_, as_reference);
       return;
     }
 #undef SNAPSHOT_WRITE
@@ -2400,7 +2238,7 @@
   }
 
   const Object& obj = Object::Handle(raw);
-  FATAL1("Unexpected inlined object: %s\n", obj.ToCString());
+  FATAL1("Unexpected object: %s\n", obj.ToCString());
 }
 
 
@@ -2410,7 +2248,10 @@
       : ObjectVisitor(Isolate::Current()), writer_(writer) {}
 
   virtual void VisitObject(RawObject* obj) {
-    writer_->WriteInlinedObject(obj);
+    intptr_t object_id = writer_->forward_list_->FindObject(obj);
+    ASSERT(object_id != kInvalidIndex);
+    intptr_t tags = writer_->GetObjectTags(obj);
+    writer_->WriteMarkedObjectImpl(obj, tags, object_id, kAsInlinedObject);
   }
 
  private:
@@ -2440,7 +2281,7 @@
        ++id) {
     if (!NodeForObjectId(id)->is_serialized()) {
       // Write the object out in the stream.
-      RawObject* raw = NodeForObjectId(id)->raw();
+      RawObject* raw = NodeForObjectId(id)->obj()->raw();
       writer->VisitObject(raw);
 
       // Mark object as serialized.
@@ -2508,26 +2349,39 @@
                                   intptr_t tags,
                                   RawSmi* length,
                                   RawTypeArguments* type_arguments,
-                                  RawObject* data[]) {
-  intptr_t len = Smi::Value(length);
+                                  RawObject* data[],
+                                  bool as_reference) {
+  if (as_reference) {
+    // Write out the serialization header value for this object.
+    WriteInlinedObjectHeader(kOmittedObjectId);
 
-  // Write out the serialization header value for this object.
-  WriteInlinedObjectHeader(object_id);
+    // Write out the class information.
+    WriteIndexedObject(array_kind);
+    WriteTags(tags);
 
-  // Write out the class and tags information.
-  WriteIndexedObject(array_kind);
-  WriteTags(tags);
+    // Write out the length field.
+    Write<RawObject*>(length);
+  } else {
+    intptr_t len = Smi::Value(length);
 
-  // Write out the length field.
-  Write<RawObject*>(length);
+    // Write out the serialization header value for this object.
+    WriteInlinedObjectHeader(object_id);
 
-  // Write out the type arguments.
-  WriteObjectImpl(type_arguments, kAsInlinedObject);
+    // Write out the class and tags information.
+    WriteIndexedObject(array_kind);
+    WriteTags(tags);
 
-  // Write out the individual object ids.
-  bool as_reference = RawObject::IsCanonical(tags) ? false : true;
-  for (intptr_t i = 0; i < len; i++) {
-    WriteObjectImpl(data[i], as_reference);
+    // Write out the length field.
+    Write<RawObject*>(length);
+
+    // Write out the type arguments.
+    WriteObjectImpl(type_arguments, kAsInlinedObject);
+
+    // Write out the individual object ids.
+    bool write_as_reference = RawObject::IsCanonical(tags) ? false : true;
+    for (intptr_t i = 0; i < len; i++) {
+      WriteObjectImpl(data[i], write_as_reference);
+    }
   }
 }
 
@@ -2549,12 +2403,11 @@
     // exception as we do not allow these objects to be serialized.
     HANDLESCOPE(thread());
 
-    const Class& clazz = Class::Handle(isolate(), cls);
-    const Function& errorFunc = Function::Handle(isolate(), func);
+    const Class& clazz = Class::Handle(zone(), cls);
+    const Function& errorFunc = Function::Handle(zone(), func);
     ASSERT(!errorFunc.IsNull());
 
     // All other closures are errors.
-    UnmarkAll();  // Unmark objects now as we are about to print stuff.
     char* chars = OS::SCreate(thread()->zone(),
         "Illegal argument in isolate message : (object is a closure - %s %s)",
         clazz.ToCString(), errorFunc.ToCString());
@@ -2580,8 +2433,7 @@
   if (cls->ptr()->num_native_fields_ != 0) {
     // We do not allow objects with native fields in an isolate message.
     HANDLESCOPE(thread());
-    UnmarkAll();  // Unmark objects now as we are about to print stuff.
-    const Class& clazz = Class::Handle(isolate(), cls);
+    const Class& clazz = Class::Handle(zone(), cls);
     char* chars = OS::SCreate(thread()->zone(),
         "Illegal argument in isolate message"
         " : (object extends NativeWrapper - %s)",
@@ -2601,10 +2453,11 @@
 }
 
 
-void SnapshotWriter::WriteInstance(intptr_t object_id,
-                                   RawObject* raw,
+void SnapshotWriter::WriteInstance(RawObject* raw,
                                    RawClass* cls,
-                                   intptr_t tags) {
+                                   intptr_t tags,
+                                   intptr_t object_id,
+                                   bool as_reference) {
   // Check if the instance has native fields and throw an exception if it does.
   CheckForNativeFields(cls);
 
@@ -2613,84 +2466,57 @@
     // closure that is not serializable this will throw an exception.
     RawFunction* func = IsSerializableClosure(cls, raw);
     if (func != Function::null()) {
+      forward_list_->SetState(object_id, kIsSerialized);
       WriteStaticImplicitClosure(object_id, func, tags);
       return;
     }
   }
 
   // Object is regular dart instance.
-  intptr_t next_field_offset = Class::IsSignatureClass(cls) ?
-      Closure::InstanceSize() :
-      cls->ptr()->next_field_offset_in_words_ << kWordSizeLog2;
-  ASSERT(next_field_offset > 0);
+  if (as_reference) {
+    // Write out the serialization header value for this object.
+    WriteInlinedObjectHeader(kOmittedObjectId);
 
-  // Write out the serialization header value for this object.
-  WriteInlinedObjectHeader(object_id);
+    // Indicate this is an instance object.
+    Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId));
+    WriteTags(tags);
 
-  // Indicate this is an instance object.
-  Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId));
+    // Write out the class information for this object.
+    WriteObjectImpl(cls, kAsInlinedObject);
+  } else {
+    intptr_t next_field_offset = Class::IsSignatureClass(cls) ?
+        Closure::InstanceSize() :
+        cls->ptr()->next_field_offset_in_words_ << kWordSizeLog2;
+    ASSERT(next_field_offset > 0);
 
-  // Write out the tags.
-  WriteTags(tags);
+    // Write out the serialization header value for this object.
+    WriteInlinedObjectHeader(object_id);
 
-  // Write out the class information for this object.
-  WriteObjectImpl(cls, kAsInlinedObject);
+    // Indicate this is an instance object.
+    Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId));
 
-  // Write out all the fields for the object.
-  // Instance::NextFieldOffset() returns the offset of the first field in
-  // a Dart object.
-  bool as_reference = RawObject::IsCanonical(tags) ? false : true;
-  intptr_t offset = Instance::NextFieldOffset();
-  while (offset < next_field_offset) {
-    RawObject* raw_obj = *reinterpret_cast<RawObject**>(
-        reinterpret_cast<uword>(raw->ptr()) + offset);
-    WriteObjectImpl(raw_obj, as_reference);
-    offset += kWordSize;
+    // Write out the tags.
+    WriteTags(tags);
+
+    // Write out the class information for this object.
+    WriteObjectImpl(cls, kAsInlinedObject);
+
+    // Write out all the fields for the object.
+    // Instance::NextFieldOffset() returns the offset of the first field in
+    // a Dart object.
+    bool write_as_reference = RawObject::IsCanonical(tags) ? false : true;
+    intptr_t offset = Instance::NextFieldOffset();
+    while (offset < next_field_offset) {
+      RawObject* raw_obj = *reinterpret_cast<RawObject**>(
+          reinterpret_cast<uword>(raw->ptr()) + offset);
+      WriteObjectImpl(raw_obj, write_as_reference);
+      offset += kWordSize;
+    }
   }
   return;
 }
 
 
-void SnapshotWriter::WriteInstanceRef(RawObject* raw, RawClass* cls) {
-  // Check if the instance has native fields and throw an exception if it does.
-  CheckForNativeFields(cls);
-
-  // Check if object is a closure that is serializable, if the object is a
-  // closure that is not serializable this will throw an exception.
-  RawFunction* func = IsSerializableClosure(cls, raw);
-  if (func != Function::null()) {
-    // Add object to the forward ref list and mark it so that future references
-    // to this object in the snapshot will use this object id. Mark it as having
-    // been serialized so that we do not serialize the object when we go through
-    // the forward list.
-    forward_list_->MarkAndAddObject(raw, kIsSerialized);
-    uword tags = raw->ptr()->tags_;
-    ASSERT(SerializedHeaderTag::decode(tags) == kObjectId);
-    intptr_t object_id = SerializedHeaderData::decode(tags);
-    tags = forward_list_->NodeForObjectId(object_id)->tags();
-    WriteStaticImplicitClosure(object_id, func, tags);
-    return;
-  }
-
-  // Object is being referenced, add it to the forward ref list and mark
-  // it so that future references to this object in the snapshot will use
-  // this object id. Mark it as not having been serialized yet so that we
-  // will serialize the object when we go through the forward list.
-  intptr_t tags = raw->ptr()->tags_;
-  forward_list_->MarkAndAddObject(raw, kIsNotSerialized);
-
-  // Write out the serialization header value for this object.
-  WriteInlinedObjectHeader(kOmittedObjectId);
-
-  // Indicate this is an instance object.
-  Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId));
-  WriteTags(tags);
-
-  // Write out the class information for this object.
-  WriteObjectImpl(cls, kAsInlinedObject);
-}
-
-
 bool SnapshotWriter::AllowObjectsInDartLibrary(RawLibrary* library) {
   return (library == object_store()->collection_library() ||
           library == object_store()->core_library() ||
@@ -2712,7 +2538,6 @@
 void SnapshotWriter::ThrowException(Exceptions::ExceptionType type,
                                     const char* msg) {
   object_store()->clear_sticky_error();
-  UnmarkAll();
   if (msg != NULL) {
     const String& msg_obj = String::Handle(String::New(msg));
     const Array& args = Array::Handle(Array::New(1));
@@ -2743,6 +2568,7 @@
 ScriptSnapshotWriter::ScriptSnapshotWriter(uint8_t** buffer,
                                            ReAlloc alloc)
     : SnapshotWriter(Snapshot::kScript,
+                     Thread::Current(),
                      buffer,
                      alloc,
                      kInitialSize,
@@ -2751,7 +2577,7 @@
                      true, /* can_send_any_object */
                      false, /* snapshot_code */
                      true /* vm_isolate_is_symbolic */),
-      forward_list_(kMaxPredefinedObjectIds) {
+      forward_list_(thread(), kMaxPredefinedObjectIds) {
   ASSERT(buffer != NULL);
   ASSERT(alloc != NULL);
 }
@@ -2780,7 +2606,6 @@
       WriteObject(lib.raw());
 
       FillHeader(kind());
-      UnmarkAll();
     }
   } else {
     ThrowException(exception_type(), exception_msg());
@@ -2800,6 +2625,7 @@
                              ReAlloc alloc,
                              bool can_send_any_object)
     : SnapshotWriter(Snapshot::kMessage,
+                     Thread::Current(),
                      buffer,
                      alloc,
                      kInitialSize,
@@ -2808,7 +2634,7 @@
                      can_send_any_object,
                      false, /* snapshot_code */
                      true /* vm_isolate_is_symbolic */),
-      forward_list_(kMaxPredefinedObjectIds) {
+      forward_list_(thread(), kMaxPredefinedObjectIds) {
   ASSERT(buffer != NULL);
   ASSERT(alloc != NULL);
 }
@@ -2824,7 +2650,6 @@
   if (setjmp(*jump.Set()) == 0) {
     NoSafepointScope no_safepoint;
     WriteObject(obj.raw());
-    UnmarkAll();
   } else {
     ThrowException(exception_type(), exception_msg());
   }
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 29671b4..949f897 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -750,23 +750,20 @@
 
 class ForwardList {
  public:
-  explicit ForwardList(intptr_t first_object_id);
+  explicit ForwardList(Thread* thread, intptr_t first_object_id);
   ~ForwardList();
 
   class Node : public ZoneAllocated {
    public:
-    Node(RawObject* raw, uword tags, SerializeState state)
-        : raw_(raw), tags_(tags), state_(state) {}
-    RawObject* raw() const { return raw_; }
-    uword tags() const { return tags_; }
+    Node(const Object* obj, SerializeState state) : obj_(obj), state_(state) {}
+    const Object* obj() const { return obj_; }
     bool is_serialized() const { return state_ == kIsSerialized; }
 
    private:
     // Private to ensure the invariant of first_unprocessed_object_id_.
     void set_state(SerializeState value) { state_ = value; }
 
-    RawObject* raw_;
-    uword tags_;
+    const Object* obj_;
     SerializeState state_;
 
     friend class ForwardList;
@@ -778,10 +775,7 @@
   }
 
   // Returns the id for the added object.
-  intptr_t MarkAndAddObject(RawObject* raw, SerializeState state);
-
-  // Returns the id for the added object without marking it.
-  intptr_t AddObject(RawObject* raw, SerializeState state);
+  intptr_t AddObject(Zone* zone, RawObject* raw, SerializeState state);
 
   // Returns the id for the object it it exists in the list.
   intptr_t FindObject(RawObject* raw);
@@ -790,13 +784,17 @@
   // concurrently add more objects.
   void SerializeAll(ObjectVisitor* writer);
 
-  // Restores the tags of all objects in this list.
-  void UnmarkAll() const;
+  // Set state of object in forward list.
+  void SetState(intptr_t object_id, SerializeState state) {
+    NodeForObjectId(object_id)->set_state(state);
+  }
 
  private:
   intptr_t first_object_id() const { return first_object_id_; }
   intptr_t next_object_id() const { return nodes_.length() + first_object_id_; }
+  Heap* heap() const { return thread_->isolate()->heap(); }
 
+  Thread* thread_;
   const intptr_t first_object_id_;
   GrowableArray<Node*> nodes_;
   intptr_t first_unprocessed_object_id_;
@@ -870,6 +868,7 @@
 class SnapshotWriter : public BaseWriter {
  protected:
   SnapshotWriter(Snapshot::Kind kind,
+                 Thread* thread,
                  uint8_t** buffer,
                  ReAlloc alloc,
                  intptr_t initial_size,
@@ -882,6 +881,10 @@
  public:
   // Snapshot kind.
   Snapshot::Kind kind() const { return kind_; }
+  Thread* thread() const { return thread_; }
+  Zone* zone() const { return thread_->zone(); }
+  Isolate* isolate() const { return thread_->isolate(); }
+  Heap* heap() const { return isolate()->heap(); }
 
   // Serialize an object into the buffer.
   void WriteObject(RawObject* raw);
@@ -919,13 +922,6 @@
   void WriteFunctionId(RawFunction* func, bool owner_is_class);
 
  protected:
-  void UnmarkAll() {
-    if (!unmarked_objects_ && forward_list_ != NULL) {
-      forward_list_->UnmarkAll();
-      unmarked_objects_ = true;
-    }
-  }
-
   bool CheckAndWritePredefinedObject(RawObject* raw);
   bool HandleVMIsolateObject(RawObject* raw);
 
@@ -934,24 +930,27 @@
                                   RawFunction* func,
                                   intptr_t tags);
   void WriteObjectImpl(RawObject* raw, bool as_reference);
-  void WriteObjectRef(RawObject* raw);
-  void WriteInlinedObject(RawObject* raw);
+  void WriteMarkedObjectImpl(RawObject* raw,
+                             intptr_t tags,
+                             intptr_t object_id,
+                             bool as_reference);
   void WriteForwardedObjects();
   void ArrayWriteTo(intptr_t object_id,
                     intptr_t array_kind,
                     intptr_t tags,
                     RawSmi* length,
                     RawTypeArguments* type_arguments,
-                    RawObject* data[]);
+                    RawObject* data[],
+                    bool as_reference);
   RawFunction* IsSerializableClosure(RawClass* cls, RawObject* obj);
   RawClass* GetFunctionOwner(RawFunction* func);
   void CheckForNativeFields(RawClass* cls);
   void SetWriteException(Exceptions::ExceptionType type, const char* msg);
-  void WriteInstance(intptr_t object_id,
-                     RawObject* raw,
+  void WriteInstance(RawObject* raw,
                      RawClass* cls,
-                     intptr_t tags);
-  void WriteInstanceRef(RawObject* raw, RawClass* cls);
+                     intptr_t tags,
+                     intptr_t object_id,
+                     bool as_reference);
   bool AllowObjectsInDartLibrary(RawLibrary* library);
   intptr_t FindVmSnapshotObject(RawObject* rawobj);
 
@@ -964,8 +963,6 @@
     forward_list_ = NULL;
   }
 
-  Thread* thread() const { return thread_; }
-  Isolate* isolate() const { return thread_->isolate(); }
   ObjectStore* object_store() const { return object_store_; }
 
  private:
@@ -1032,6 +1029,11 @@
     return isolate_snapshot_buffer_;
   }
 
+  Thread* thread() const { return thread_; }
+  Zone* zone() const { return thread_->zone(); }
+  Isolate* isolate() const { return thread_->isolate(); }
+  Heap* heap() const { return isolate()->heap(); }
+
   // Writes a full snapshot of the Isolate.
   void WriteFullSnapshot();
 
@@ -1052,7 +1054,7 @@
   // Writes a full snapshot of a regular Dart Isolate.
   void WriteIsolateFullSnapshot();
 
-  Isolate* isolate_;
+  Thread* thread_;
   uint8_t** vm_isolate_snapshot_buffer_;
   uint8_t** isolate_snapshot_buffer_;
   uint8_t** instructions_snapshot_buffer_;
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 56cbfd6..5103296 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -255,11 +255,11 @@
 
 
 void CheckMint(int64_t value) {
+  ApiNativeScope scope;
   StackZone zone(Thread::Current());
 
   Mint& mint = Mint::Handle();
   mint ^= Integer::New(value);
-  ApiNativeScope scope;
   Dart_CObject* mint_cobject = SerializeAndDeserializeMint(mint);
   // On 64-bit platforms mints always require 64-bits as the smi range
   // here covers most of the 64-bit range. On 32-bit platforms the smi
@@ -476,10 +476,10 @@
 
 
 void CheckBigint(const char* bigint_value) {
+  ApiNativeScope scope;
   StackZone zone(Thread::Current());
   Bigint& bigint = Bigint::Handle();
   bigint ^= Bigint::NewFromCString(bigint_value);
-  ApiNativeScope scope;
   Dart_CObject* bigint_cobject = SerializeAndDeserializeBigint(bigint);
   EXPECT_EQ(Dart_CObject_kBigint, bigint_cobject->type);
   char* hex_value = TestCase::BigintToHexValue(bigint_cobject);
@@ -831,6 +831,7 @@
   static const intptr_t kInitialSize = 64 * KB;
   TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
       : SnapshotWriter(Snapshot::kScript,
+                       Thread::Current(),
                        buffer,
                        alloc,
                        kInitialSize,
@@ -839,7 +840,7 @@
                        true, /* can_send_any_object */
                        false, /* snapshot_code */
                        true /* vm_isolate_is_symbolic */),
-        forward_list_(kMaxPredefinedObjectIds) {
+        forward_list_(thread(), kMaxPredefinedObjectIds) {
     ASSERT(buffer != NULL);
     ASSERT(alloc != NULL);
   }
@@ -848,7 +849,6 @@
   // Writes just a script object
   void WriteScript(const Script& script) {
     WriteObject(script.raw());
-    UnmarkAll();
   }
 
  private:
@@ -1119,9 +1119,10 @@
 }
 
 TEST_CASE(GenerateSource) {
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
   const GrowableObjectArray& libs = GrowableObjectArray::Handle(
-      isolate, isolate->object_store()->libraries());
+      zone, isolate->object_store()->libraries());
   Library& lib = Library::Handle();
   String& uri = String::Handle();
   for (intptr_t i = 0; i < libs.Length(); i++) {
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 5f86c3b..7594b91 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -207,8 +207,7 @@
                                       uword* handler_pc,
                                       bool* needs_stacktrace,
                                       bool* has_catch_all) const {
-  Isolate* isolate = thread->isolate();
-  REUSABLE_CODE_HANDLESCOPE(isolate);
+  REUSABLE_CODE_HANDLESCOPE(thread);
   Code& code = reused_code_handle.Handle();
   code = LookupDartCode();
   if (code.IsNull()) {
@@ -216,7 +215,7 @@
   }
   uword pc_offset = pc() - code.EntryPoint();
 
-  REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(isolate);
+  REUSABLE_EXCEPTION_HANDLERS_HANDLESCOPE(thread);
   ExceptionHandlers& handlers = reused_exception_handlers_handle.Handle();
   handlers = code.exception_handlers();
   if (handlers.num_entries() == 0) {
@@ -224,7 +223,7 @@
   }
 
   // Find pc descriptor for the current pc.
-  REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(isolate);
+  REUSABLE_PC_DESCRIPTORS_HANDLESCOPE(thread);
   PcDescriptors& descriptors = reused_pc_descriptors_handle.Handle();
   descriptors = code.pc_descriptors();
   PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index c42c21a..7c8fe78 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -95,13 +95,13 @@
 
 RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
   Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
-  const Error& error = Error::Handle(isolate, cls.EnsureIsFinalized(thread));
+  Zone* zone = thread->zone();
+  const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
   ASSERT(error.IsNull());
   if (cls.id() == kArrayCid) {
     return AllocateArray_entry()->code();
   }
-  Code& stub = Code::Handle(isolate, cls.allocation_stub());
+  Code& stub = Code::Handle(zone, cls.allocation_stub());
   if (stub.IsNull()) {
     Assembler assembler;
     const char* name = cls.ToCString();
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index c9cbcf3..e984c1b 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -288,7 +288,7 @@
   Isolate* isolate = thread->isolate();
   Zone* zone = thread->zone();
   ASSERT(isolate != Dart::vm_isolate());
-  String& str = String::Handle(isolate);
+  String& str = String::Handle(zone);
 
   SymbolTable table(zone, isolate->object_store()->symbol_table());
 
diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
index 4349844..0a82be3 100644
--- a/runtime/vm/tags.cc
+++ b/runtime/vm/tags.cc
@@ -145,11 +145,11 @@
 const char* UserTags::TagName(uword tag_id) {
   ASSERT(tag_id >= kUserTagIdOffset);
   ASSERT(tag_id < kUserTagIdOffset + kMaxUserTags);
-  Isolate* isolate = Isolate::Current();
+  Zone* zone = Thread::Current()->zone();
   const UserTag& tag =
-      UserTag::Handle(isolate, UserTag::FindTagById(tag_id));
+      UserTag::Handle(zone, UserTag::FindTagById(tag_id));
   ASSERT(!tag.IsNull());
-  const String& label = String::Handle(isolate, tag.label());
+  const String& label = String::Handle(zone, tag.label());
   return label.ToCString();
 }
 
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 0828f40..46da230 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -23,7 +23,8 @@
 // The single thread local key which stores all the thread local data
 // for a thread.
 ThreadLocalKey Thread::thread_key_ = OSThread::kUnsetThreadLocalKey;
-
+Thread* Thread::thread_list_head_ = NULL;
+Mutex* Thread::thread_list_lock_ = NULL;
 
 // Remove |thread| from each isolate's thread registry.
 class ThreadPruner : public IsolateVisitor {
@@ -43,11 +44,76 @@
 };
 
 
+void Thread::AddThreadToList(Thread* thread) {
+  ASSERT(thread != NULL);
+  ASSERT(thread->isolate() == NULL);
+  ASSERT(thread_list_lock_ != NULL);
+  MutexLocker ml(thread_list_lock_);
+
+  ASSERT(thread->thread_list_next_ == NULL);
+
+#if defined(DEBUG)
+  {
+    // Ensure that we aren't already in the list.
+    Thread* current = thread_list_head_;
+    while (current != NULL) {
+      ASSERT(current != thread);
+      current = current->thread_list_next_;
+    }
+  }
+#endif
+
+  // Insert at head of list.
+  thread->thread_list_next_ = thread_list_head_;
+  thread_list_head_ = thread;
+}
+
+
+void Thread::RemoveThreadFromList(Thread* thread) {
+  ASSERT(thread != NULL);
+  ASSERT(thread->isolate() == NULL);
+  ASSERT(thread_list_lock_ != NULL);
+  MutexLocker ml(thread_list_lock_);
+
+  // Handle case where |thread| is head of list.
+  if (thread_list_head_ == thread) {
+    thread_list_head_ = thread->thread_list_next_;
+    thread->thread_list_next_ = NULL;
+    return;
+  }
+
+  Thread* current = thread_list_head_;
+  Thread* previous = NULL;
+
+  // Scan across list and remove |thread|.
+  while (current != NULL) {
+    previous = current;
+    current = current->thread_list_next_;
+    if (current == thread) {
+      // We found |thread|, remove from list.
+      previous->thread_list_next_ = current->thread_list_next_;
+      thread->thread_list_next_ = NULL;
+      return;
+    }
+  }
+
+  UNREACHABLE();
+}
+
+
 static void DeleteThread(void* thread) {
   delete reinterpret_cast<Thread*>(thread);
 }
 
 
+void Thread::Shutdown() {
+  if (thread_list_lock_ != NULL) {
+    delete thread_list_lock_;
+    thread_list_lock_ = NULL;
+  }
+}
+
+
 Thread::~Thread() {
   // We should cleanly exit any isolate before destruction.
   ASSERT(isolate_ == NULL);
@@ -56,10 +122,14 @@
   Isolate::VisitIsolates(&pruner);
   delete log_;
   log_ = NULL;
+  RemoveThreadFromList(this);
 }
 
 
 void Thread::InitOnceBeforeIsolate() {
+  ASSERT(thread_list_lock_ == NULL);
+  thread_list_lock_ = new Mutex();
+  ASSERT(thread_list_lock_ != NULL);
   ASSERT(thread_key_ == OSThread::kUnsetThreadLocalKey);
   thread_key_ = OSThread::CreateThreadLocal(DeleteThread);
   ASSERT(thread_key_ != OSThread::kUnsetThreadLocalKey);
@@ -105,6 +175,16 @@
 }
 #endif
 
+#if defined(DEBUG)
+#define REUSABLE_HANDLE_SCOPE_INIT(object)                                     \
+  reusable_##object##_handle_scope_active_(false),
+#else
+#define REUSABLE_HANDLE_SCOPE_INIT(object)
+#endif  // defined(DEBUG)
+
+#define REUSABLE_HANDLE_INITIALIZERS(object)                                   \
+  object##_handle_(NULL),
+
 
 Thread::Thread(bool init_vm_constants)
     : id_(OSThread::GetCurrentThreadId()),
@@ -114,7 +194,14 @@
       heap_(NULL),
       store_buffer_block_(NULL),
       log_(new class Log()),
-      vm_tag_(0) {
+      deopt_id_(0),
+      vm_tag_(0),
+      REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
+      REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
+      reusable_handles_(),
+      cha_(NULL),
+      no_callback_scope_depth_(0),
+      thread_list_next_(NULL) {
   ClearState();
 
 #define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value)    \
@@ -136,6 +223,7 @@
     InitVMConstants();
   }
   SetCurrent(this);
+  AddThreadToList(this);
 }
 
 
@@ -162,6 +250,12 @@
   name##_entry_point_ = k##name##RuntimeEntry.GetEntryPoint();
 LEAF_RUNTIME_ENTRY_LIST(INIT_VALUE)
 #undef INIT_VALUE
+
+  // Setup the thread specific reusable handles.
+#define REUSABLE_HANDLE_ALLOCATION(object)                                     \
+  this->object##_handle_ = this->AllocateReusableHandle<object>();
+  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_ALLOCATION)
+#undef REUSABLE_HANDLE_ALLOCATION
 }
 
 
@@ -204,6 +298,11 @@
   Thread* thread = Thread::Current();
   // TODO(koda): Audit callers; they should know whether they're in an isolate.
   if (thread == NULL || thread->isolate() == NULL) return;
+#if defined(DEBUG)
+  ASSERT(!thread->IsAnyReusableHandleScopeActive());
+#endif  // DEBUG
+  // Clear since GC will not visit the thread once it is unscheduled.
+  thread->ClearReusableHandles();
   Isolate* isolate = thread->isolate();
   Profiler::EndExecution(isolate);
   thread->Unschedule();
@@ -303,13 +402,13 @@
 
 CHA* Thread::cha() const {
   ASSERT(isolate_ != NULL);
-  return isolate_->cha_;
+  return cha_;
 }
 
 
 void Thread::set_cha(CHA* value) {
   ASSERT(isolate_ != NULL);
-  isolate_->cha_ = value;
+  cha_ = value;
 }
 
 
@@ -318,6 +417,30 @@
 }
 
 
+template<class C>
+C* Thread::AllocateReusableHandle() {
+  C* handle = reinterpret_cast<C*>(reusable_handles_.AllocateScopedHandle());
+  C::initializeHandle(handle, C::null());
+  return handle;
+}
+
+
+void Thread::ClearReusableHandles() {
+#define CLEAR_REUSABLE_HANDLE(object)                                          \
+  *object##_handle_ = object::null();
+  REUSABLE_HANDLE_LIST(CLEAR_REUSABLE_HANDLE)
+#undef CLEAR_REUSABLE_HANDLE
+}
+
+
+void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor) {
+  ASSERT(visitor != NULL);
+
+  // Visit objects in thread specific handles area.
+  reusable_handles_.VisitObjectPointers(visitor);
+}
+
+
 void Thread::SetThreadInterrupter(ThreadInterruptCallback callback,
                                   void* data) {
   ASSERT(Thread::Current() == this);
@@ -383,4 +506,36 @@
   return -1;
 }
 
+
+ThreadIterator::ThreadIterator() {
+  ASSERT(Thread::thread_list_lock_ != NULL);
+  // Lock the thread list while iterating.
+  Thread::thread_list_lock_->Lock();
+  next_ = Thread::thread_list_head_;
+}
+
+
+ThreadIterator::~ThreadIterator() {
+  ASSERT(Thread::thread_list_lock_ != NULL);
+  // Unlock the thread list when done.
+  Thread::thread_list_lock_->Unlock();
+}
+
+
+bool ThreadIterator::HasNext() const {
+  ASSERT(Thread::thread_list_lock_ != NULL);
+  ASSERT(Thread::thread_list_lock_->IsOwnedByCurrentThread());
+  return next_ != NULL;
+}
+
+
+Thread* ThreadIterator::Next() {
+  ASSERT(Thread::thread_list_lock_ != NULL);
+  ASSERT(Thread::thread_list_lock_->IsOwnedByCurrentThread());
+  Thread* current = next_;
+  next_ = next_->thread_list_next_;
+  return current;
+}
+
+
 }  // namespace dart
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1a7d48f..210fef1 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -6,28 +6,63 @@
 #define VM_THREAD_H_
 
 #include "vm/globals.h"
+#include "vm/handles.h"
 #include "vm/os_thread.h"
 #include "vm/store_buffer.h"
 #include "vm/runtime_entry_list.h"
 
 namespace dart {
 
+class AbstractType;
+class Array;
 class CHA;
+class Class;
+class Code;
+class Error;
+class ExceptionHandlers;
+class Field;
+class Function;
+class GrowableObjectArray;
 class HandleScope;
 class Heap;
+class Instance;
 class Isolate;
+class Library;
 class Log;
 class LongJumpScope;
 class Object;
+class PcDescriptors;
 class RawBool;
 class RawObject;
 class RawCode;
 class RawString;
 class RuntimeEntry;
 class StackResource;
+class String;
 class TimelineEventBlock;
+class TypeArguments;
+class TypeParameter;
 class Zone;
 
+#define REUSABLE_HANDLE_LIST(V)                                                \
+  V(AbstractType)                                                              \
+  V(Array)                                                                     \
+  V(Class)                                                                     \
+  V(Code)                                                                      \
+  V(Error)                                                                     \
+  V(ExceptionHandlers)                                                         \
+  V(Field)                                                                     \
+  V(Function)                                                                  \
+  V(GrowableObjectArray)                                                       \
+  V(Instance)                                                                  \
+  V(Library)                                                                   \
+  V(Object)                                                                    \
+  V(PcDescriptors)                                                             \
+  V(String)                                                                    \
+  V(TypeArguments)                                                             \
+  V(TypeParameter)                                                             \
+
+
 // List of VM-global objects/addresses cached in each Thread object.
 #define CACHED_VM_OBJECTS_LIST(V)                                              \
   V(RawObject*, object_null_, Object::null(), NULL)                            \
@@ -118,6 +153,8 @@
   static void InitOnceBeforeIsolate();
   static void InitOnceAfterObjectAndStubCode();
 
+  // Called at VM shutdown
+  static void Shutdown();
   ~Thread();
 
   // The topmost zone used for allocation in this thread.
@@ -129,11 +166,24 @@
     return OFFSET_OF(Thread, isolate_);
   }
 
-  // The (topmost) CHA for the compilation in the isolate of this thread.
-  // TODO(23153): Move this out of Isolate/Thread.
+  // The (topmost) CHA for the compilation in this thread.
   CHA* cha() const;
   void set_cha(CHA* value);
 
+  int32_t no_callback_scope_depth() const {
+    return no_callback_scope_depth_;
+  }
+
+  void IncrementNoCallbackScopeDepth() {
+    ASSERT(no_callback_scope_depth_ < INT_MAX);
+    no_callback_scope_depth_ += 1;
+  }
+
+  void DecrementNoCallbackScopeDepth() {
+    ASSERT(no_callback_scope_depth_ > 0);
+    no_callback_scope_depth_ -= 1;
+  }
+
   void StoreBufferAddObject(RawObject* obj);
   void StoreBufferAddObjectGC(RawObject* obj);
 #if defined(TESTING)
@@ -277,6 +327,35 @@
 
   class Log* log() const;
 
+  static const intptr_t kNoDeoptId = -1;
+  static const intptr_t kDeoptIdStep = 2;
+  static const intptr_t kDeoptIdBeforeOffset = 0;
+  static const intptr_t kDeoptIdAfterOffset = 1;
+  intptr_t deopt_id() const { return deopt_id_; }
+  void set_deopt_id(int value) {
+    ASSERT(value >= 0);
+    deopt_id_ = value;
+  }
+  intptr_t GetNextDeoptId() {
+    ASSERT(deopt_id_ != kNoDeoptId);
+    const intptr_t id = deopt_id_;
+    deopt_id_ += kDeoptIdStep;
+    return id;
+  }
+
+  static intptr_t ToDeoptAfter(intptr_t deopt_id) {
+    ASSERT(IsDeoptBefore(deopt_id));
+    return deopt_id + kDeoptIdAfterOffset;
+  }
+
+  static bool IsDeoptBefore(intptr_t deopt_id) {
+    return (deopt_id % kDeoptIdStep) == kDeoptIdBeforeOffset;
+  }
+
+  static bool IsDeoptAfter(intptr_t deopt_id) {
+    return (deopt_id % kDeoptIdStep) == kDeoptIdAfterOffset;
+  }
+
   LongJumpScope* long_jump_base() const { return state_.long_jump_base; }
   void set_long_jump_base(LongJumpScope* value) {
     state_.long_jump_base = value;
@@ -302,7 +381,40 @@
   bool IsThreadInterrupterEnabled(ThreadInterruptCallback* callback,
                                   void** data) const;
 
+#if defined(DEBUG)
+#define REUSABLE_HANDLE_SCOPE_ACCESSORS(object)                                \
+  void set_reusable_##object##_handle_scope_active(bool value) {               \
+    reusable_##object##_handle_scope_active_ = value;                          \
+  }                                                                            \
+  bool reusable_##object##_handle_scope_active() const {                       \
+    return reusable_##object##_handle_scope_active_;                           \
+  }
+  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS)
+#undef REUSABLE_HANDLE_SCOPE_ACCESSORS
+
+  bool IsAnyReusableHandleScopeActive() const {
+#define IS_REUSABLE_HANDLE_SCOPE_ACTIVE(object)                                \
+    if (reusable_##object##_handle_scope_active_) return true;
+    REUSABLE_HANDLE_LIST(IS_REUSABLE_HANDLE_SCOPE_ACTIVE)
+    return false;
+#undef IS_REUSABLE_HANDLE_SCOPE_ACTIVE
+  }
+#endif  // defined(DEBUG)
+
+  void ClearReusableHandles();
+
+#define REUSABLE_HANDLE(object)                                                \
+  object& object##Handle() const {                                             \
+    return *object##_handle_;                                                  \
+  }
+  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE)
+#undef REUSABLE_HANDLE
+
+  void VisitObjectPointers(ObjectPointerVisitor* visitor);
+
  private:
+  template<class T> T* AllocateReusableHandle();
+
   static ThreadLocalKey thread_key_;
 
   const ThreadId id_;
@@ -314,6 +426,7 @@
   Mutex timeline_block_lock_;
   StoreBufferBlock* store_buffer_block_;
   class Log* log_;
+  intptr_t deopt_id_;  // Compilation specific counter.
   uword vm_tag_;
 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value)      \
   type_name member_name;
@@ -330,6 +443,33 @@
 LEAF_RUNTIME_ENTRY_LIST(DECLARE_MEMBERS)
 #undef DECLARE_MEMBERS
 
+  // Reusable handles support.
+#define REUSABLE_HANDLE_FIELDS(object)                                         \
+  object* object##_handle_;
+  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
+#undef REUSABLE_HANDLE_FIELDS
+
+#if defined(DEBUG)
+#define REUSABLE_HANDLE_SCOPE_VARIABLE(object)                                 \
+  bool reusable_##object##_handle_scope_active_;
+  REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE);
+#undef REUSABLE_HANDLE_SCOPE_VARIABLE
+#endif  // defined(DEBUG)
+
+  VMHandles reusable_handles_;
+
+  CHA* cha_;
+  int32_t no_callback_scope_depth_;
+
+  // All |Thread|s are registered in the thread list.
+  Thread* thread_list_next_;
+
+  static Thread* thread_list_head_;
+  static Mutex* thread_list_lock_;
+
+  static void AddThreadToList(Thread* thread);
+  static void RemoveThreadFromList(Thread* thread);
+
   explicit Thread(bool init_vm_constants = true);
 
   void InitVMConstants();
@@ -355,13 +495,39 @@
   void Schedule(Isolate* isolate, bool bypass_safepoint = false);
   void Unschedule(bool bypass_safepoint = false);
 
+#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 Isolate;
   friend class StackZone;
+  friend class ThreadIterator;
+  friend class ThreadIteratorTestHelper;
   friend class ThreadRegistry;
+
   DISALLOW_COPY_AND_ASSIGN(Thread);
 };
 
+
+// Note that this takes the thread list lock, prohibiting threads from coming
+// on- or off-line.
+class ThreadIterator : public ValueObject {
+ public:
+  ThreadIterator();
+  ~ThreadIterator();
+
+  // Returns false when there are no more threads left.
+  bool HasNext() const;
+
+  // Returns the current thread and moves forward.
+  Thread* Next();
+
+ private:
+  Thread* next_;
+};
+
 }  // namespace dart
 
 #endif  // VM_THREAD_H_
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index cf32f24..90d83f0 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -129,6 +129,10 @@
       if (state.zone != NULL) {
         state.zone->VisitObjectPointers(visitor);
       }
+      if (entry.scheduled) {
+        ASSERT(entry.thread != NULL);
+        entry.thread->VisitObjectPointers(visitor);
+      }
       // Iterate over all the stack frames and visit objects on the stack.
       StackFrameIterator frames_iterator(state.top_exit_frame_info,
                                          validate_frames);
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 545ed8a..8e78dca 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -358,7 +358,7 @@
 #endif  // USING_SIMULATOR
   char buffer[1024];
   OS::SNPrint(buffer, sizeof(buffer),
-      "import 'dart:profiler';\n"
+      "import 'dart:developer';\n"
       "int dummy = 0;\n"
       "main() {\n"
       "  new UserTag('foo').makeCurrent();\n"
@@ -407,6 +407,115 @@
 }
 
 
+TEST_CASE(ThreadIterator_Count) {
+  intptr_t thread_count_0 = 0;
+  intptr_t thread_count_1 = 0;
+
+  {
+    ThreadIterator ti;
+    while (ti.HasNext()) {
+      Thread* thread = ti.Next();
+      EXPECT(thread != NULL);
+      thread_count_0++;
+    }
+  }
+
+  {
+    ThreadIterator ti;
+    while (ti.HasNext()) {
+      Thread* thread = ti.Next();
+      EXPECT(thread != NULL);
+      thread_count_1++;
+    }
+  }
+
+  EXPECT(thread_count_0 > 0);
+  EXPECT(thread_count_1 > 0);
+  EXPECT(thread_count_0 >= thread_count_1);
+}
+
+
+static bool ThreadInList(Thread* thread) {
+  ThreadIterator it;
+  while (it.HasNext()) {
+    Thread* t = it.Next();
+    if (t == thread) {
+      return true;
+    }
+  }
+  return false;
+}
+
+
+TEST_CASE(ThreadIterator_FindSelf) {
+  Thread* current = Thread::Current();
+  EXPECT(ThreadInList(current));
+}
+
+
+struct ThreadIteratorTestParams {
+  Isolate* isolate;
+  Thread* spawned_thread;
+  ThreadJoinId spawned_thread_join_id;
+  Monitor* monitor;
+};
+
+
+void ThreadIteratorTestMain(uword parameter) {
+  Thread::EnsureInit();
+  ThreadIteratorTestParams* params =
+      reinterpret_cast<ThreadIteratorTestParams*>(parameter);
+  Isolate* isolate = params->isolate;
+  EXPECT(isolate != NULL);
+  Thread* thread = Thread::Current();
+  EXPECT(thread != NULL);
+
+  MonitorLocker ml(params->monitor);
+  params->spawned_thread = thread;
+  params->spawned_thread_join_id = OSThread::GetCurrentThreadJoinId();
+  EXPECT(params->spawned_thread_join_id != OSThread::kInvalidThreadJoinId);
+  EXPECT(ThreadInList(thread));
+  ml.Notify();
+}
+
+
+TEST_CASE(ThreadIterator_AddFindRemove) {
+  Isolate* isolate = thread->isolate();
+  ThreadIteratorTestParams params;
+  params.isolate = isolate;
+  params.spawned_thread = NULL;
+  params.spawned_thread_join_id = OSThread::kInvalidThreadJoinId;
+  params.monitor = new Monitor();
+
+  {
+    MonitorLocker ml(params.monitor);
+    EXPECT(params.spawned_thread_join_id == OSThread::kInvalidThreadJoinId);
+    EXPECT(params.spawned_thread == NULL);
+    // Spawn thread and wait to receive the thread join id.
+    OSThread::Start(ThreadIteratorTestMain, reinterpret_cast<uword>(&params));
+    while (params.spawned_thread_join_id == OSThread::kInvalidThreadJoinId) {
+      ml.Wait();
+    }
+    EXPECT(params.spawned_thread_join_id != OSThread::kInvalidThreadJoinId);
+    EXPECT(params.spawned_thread != NULL);
+    // Join thread.
+    OSThread::Join(params.spawned_thread_join_id);
+  }
+
+  for (intptr_t i = 0; i < 10; i++) {
+    // Sleep for 10 milliseconds.
+    OS::Sleep(10);
+    if (!ThreadInList(params.spawned_thread)) {
+      break;
+    }
+  }
+
+  EXPECT(!ThreadInList(params.spawned_thread))
+
+  delete params.monitor;
+}
+
+
 // Test rendezvous of:
 // - helpers in VM code, and
 // - main thread in VM code,
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 1a8536a..6b96b16 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -260,10 +260,27 @@
 }
 
 
+void TimelineEvent::Begin(const char* label,
+                          int64_t micros) {
+  Init(kBegin, label);
+  timestamp0_ = micros;
+}
+
+
+void TimelineEvent::End(const char* label,
+                        int64_t micros) {
+  Init(kEnd, label);
+  timestamp0_ = micros;
+}
+
+
 void TimelineEvent::SetNumArguments(intptr_t length) {
   // Cannot call this twice.
   ASSERT(arguments_ == NULL);
   ASSERT(arguments_length_ == 0);
+  if (length == 0) {
+    return;
+  }
   arguments_length_ = length;
   arguments_ = reinterpret_cast<TimelineEventArgument*>(
       calloc(sizeof(TimelineEventArgument), length));
@@ -304,6 +321,13 @@
 }
 
 
+void TimelineEvent::StealArguments(intptr_t arguments_length,
+                                   TimelineEventArgument* arguments) {
+  arguments_length_ = arguments_length;
+  arguments_ = arguments;
+}
+
+
 void TimelineEvent::Complete() {
   TimelineEventRecorder* recorder = Timeline::recorder();
   if (recorder != NULL) {
@@ -358,6 +382,14 @@
   obj.AddPropertyTimeMicros("ts", TimeOrigin());
 
   switch (event_type()) {
+    case kBegin: {
+      obj.AddProperty("ph", "B");
+    }
+    break;
+    case kEnd: {
+      obj.AddProperty("ph", "E");
+    }
+    break;
     case kDuration: {
       obj.AddProperty("ph", "X");
       obj.AddPropertyTimeMicros("dur", TimeDuration());
@@ -445,10 +477,106 @@
 }
 
 
+TimelineDurationScope::TimelineDurationScope(TimelineStream* stream,
+                                             const char* label)
+    : StackResource(reinterpret_cast<Thread*>(NULL)),
+      timestamp_(0),
+      stream_(stream),
+      label_(label),
+      arguments_(NULL),
+      arguments_length_(0),
+      enabled_(false) {
+  Init();
+}
+
+
+TimelineDurationScope::TimelineDurationScope(Thread* thread,
+                                             TimelineStream* stream,
+                                             const char* label)
+    : StackResource(thread),
+      timestamp_(0),
+      stream_(stream),
+      label_(label),
+      arguments_(NULL),
+      arguments_length_(0),
+      enabled_(false) {
+  ASSERT(thread != NULL);
+  Init();
+}
+
+
+TimelineDurationScope::~TimelineDurationScope() {
+  if (!enabled_) {
+    FreeArguments();
+    return;
+  }
+  TimelineEvent* event = stream_->StartEvent();
+  ASSERT(event != NULL);
+  event->Duration(label_, timestamp_, OS::GetCurrentTraceMicros());
+  event->StealArguments(arguments_length_, arguments_);
+  event->Complete();
+  arguments_length_ = 0;
+  arguments_ = NULL;
+}
+
+
+void TimelineDurationScope::Init() {
+  ASSERT(enabled_ == false);
+  ASSERT(label_ != NULL);
+  ASSERT(stream_ != NULL);
+  if (!stream_->Enabled()) {
+    // Stream is not enabled, do nothing.
+    return;
+  }
+  timestamp_ = OS::GetCurrentTraceMicros();
+  enabled_ = true;
+}
+
+
+void TimelineDurationScope::SetNumArguments(intptr_t length) {
+  if (!enabled()) {
+    return;
+  }
+  ASSERT(arguments_ == NULL);
+  ASSERT(arguments_length_ == 0);
+  arguments_length_ = length;
+  if (arguments_length_ == 0) {
+    return;
+  }
+  arguments_ = reinterpret_cast<TimelineEventArgument*>(
+      calloc(sizeof(TimelineEventArgument), length));
+}
+
+
+// |name| must be a compile time constant. Takes ownership of |argumentp|.
+void TimelineDurationScope::SetArgument(intptr_t i,
+                                        const char* name,
+                                        char* argument) {
+  if (!enabled()) {
+    return;
+  }
+  ASSERT(i >= 0);
+  ASSERT(i < arguments_length_);
+  arguments_[i].name = name;
+  arguments_[i].value = argument;
+}
+
+
+// |name| must be a compile time constant. Copies |argument|.
+void TimelineDurationScope::CopyArgument(intptr_t i,
+                                         const char* name,
+                                         const char* argument) {
+  if (!enabled()) {
+    return;
+  }
+  SetArgument(i, name, strdup(argument));
+}
+
+
 void TimelineDurationScope::FormatArgument(intptr_t i,
                                            const char* name,
                                            const char* fmt, ...) {
-  if (event_ == NULL) {
+  if (!enabled()) {
     return;
   }
   va_list args;
@@ -462,7 +590,20 @@
   OS::VSNPrint(buffer, (len + 1), fmt, args2);
   va_end(args2);
 
-  event_->SetArgument(i, name, buffer);
+  SetArgument(i, name, buffer);
+}
+
+
+void TimelineDurationScope::FreeArguments() {
+  if (arguments_ == NULL) {
+    return;
+  }
+  for (intptr_t i = 0; i < arguments_length_; i++) {
+    free(arguments_[i].value);
+  }
+  free(arguments_);
+  arguments_ = NULL;
+  arguments_length_ = 0;
 }
 
 
@@ -523,13 +664,12 @@
   // Grab the current thread.
   Thread* thread = Thread::Current();
   ASSERT(thread != NULL);
-  // We are accessing the thread's timeline block- so take the lock.
-  MutexLocker ml(thread->timeline_block_lock());
-
-  if (thread->isolate() == NULL) {
-    // Non-isolate thread case. This should be infrequent.
-    return GlobalBlockStartEvent();
-  }
+  ASSERT(thread->isolate() != NULL);
+  Mutex* thread_block_lock = thread->timeline_block_lock();
+  ASSERT(thread_block_lock != NULL);
+  // We are accessing the thread's timeline block- so take the lock here.
+  // This lock will be held until the call to |CompleteEvent| is made.
+  thread_block_lock->Lock();
 
   TimelineEventBlock* thread_block = thread->timeline_block();
 
@@ -548,16 +688,24 @@
     thread->set_timeline_block(thread_block);
   }
   if (thread_block != NULL) {
+    // NOTE: We are exiting this function with the thread's block lock held.
     ASSERT(!thread_block->IsFull());
-    return thread_block->StartEvent();
+    TimelineEvent* event = thread_block->StartEvent();
+    if (event != NULL) {
+      event->set_global_block(false);
+    }
+    return event;
   }
+  // Drop lock here as no event is being handed out.
+  thread_block_lock->Unlock();
   return NULL;
 }
 
 
-
 TimelineEvent* TimelineEventRecorder::GlobalBlockStartEvent() {
-  MutexLocker ml(&lock_);
+  // Take recorder lock. This lock will be held until the call to
+  // |CompleteEvent| is made.
+  lock_.Lock();
   if (FLAG_trace_timeline) {
     OS::Print("GlobalBlockStartEvent in block %p for thread %" Px "\n",
               global_block_, OSThread::CurrentCurrentThreadIdAsIntPtr());
@@ -573,13 +721,48 @@
     ASSERT(global_block_ != NULL);
   }
   if (global_block_ != NULL) {
+    // NOTE: We are exiting this function with the recorder's lock held.
     ASSERT(!global_block_->IsFull());
-    return global_block_->StartEvent();
+    TimelineEvent* event = global_block_->StartEvent();
+    if (event != NULL) {
+      event->set_global_block(true);
+    }
+    return event;
   }
+  // Drop lock here as no event is being handed out.
+  lock_.Unlock();
   return NULL;
 }
 
 
+void TimelineEventRecorder::ThreadBlockCompleteEvent(TimelineEvent* event) {
+  if (event == NULL) {
+    return;
+  }
+  ASSERT(!event->global_block());
+  // Grab the current thread.
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+  ASSERT(thread->isolate() != NULL);
+  // This event came from the isolate's thread local block. Unlock the
+  // thread's block lock.
+  Mutex* thread_block_lock = thread->timeline_block_lock();
+  ASSERT(thread_block_lock != NULL);
+  thread_block_lock->Unlock();
+}
+
+
+void TimelineEventRecorder::GlobalBlockCompleteEvent(TimelineEvent* event) {
+  if (event == NULL) {
+    return;
+  }
+  ASSERT(event->global_block());
+  // This event came from the global block, unlock the recorder's lock now
+  // that the event is filled.
+  lock_.Unlock();
+}
+
+
 // Trims the ']' character.
 static void TrimOutput(char* output,
                        intptr_t* output_length) {
@@ -847,12 +1030,26 @@
 
 
 TimelineEvent* TimelineEventRingRecorder::StartEvent() {
+  // Grab the current thread.
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+  if (thread->isolate() == NULL) {
+    // Non-isolate thread case. This should be infrequent.
+    return GlobalBlockStartEvent();
+  }
   return ThreadBlockStartEvent();
 }
 
 
 void TimelineEventRingRecorder::CompleteEvent(TimelineEvent* event) {
-  // no-op.
+  if (event == NULL) {
+    return;
+  }
+  if (event->global_block()) {
+    GlobalBlockCompleteEvent(event);
+  } else {
+    ThreadBlockCompleteEvent(event);
+  }
 }
 
 
@@ -974,12 +1171,26 @@
 
 
 TimelineEvent* TimelineEventEndlessRecorder::StartEvent() {
+  // Grab the current thread.
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+  if (thread->isolate() == NULL) {
+    // Non-isolate thread case. This should be infrequent.
+    return GlobalBlockStartEvent();
+  }
   return ThreadBlockStartEvent();
 }
 
 
 void TimelineEventEndlessRecorder::CompleteEvent(TimelineEvent* event) {
-  // no-op.
+  if (event == NULL) {
+    return;
+  }
+  if (event->global_block()) {
+    GlobalBlockCompleteEvent(event);
+  } else {
+    ThreadBlockCompleteEvent(event);
+  }
 }
 
 
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 962a207..82ceb18 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -7,6 +7,7 @@
 
 #include "vm/allocation.h"
 #include "vm/bitfield.h"
+#include "vm/os.h"
 
 namespace dart {
 
@@ -81,12 +82,20 @@
 };
 
 
+struct TimelineEventArgument {
+  const char* name;
+  char* value;
+};
+
+
 // You should get a |TimelineEvent| from a |TimelineStream|.
 class TimelineEvent {
  public:
   // Keep in sync with StateBits below.
   enum EventType {
     kNone,
+    kBegin,
+    kEnd,
     kDuration,
     kInstant,
     kAsyncBegin,
@@ -121,6 +130,12 @@
                 int64_t start_micros,
                 int64_t end_micros);
 
+  void Begin(const char* label,
+             int64_t micros = OS::GetCurrentTraceMicros());
+
+  void End(const char* label,
+           int64_t micros = OS::GetCurrentTraceMicros());
+
   // Set the number of arguments in the event.
   void SetNumArguments(intptr_t length);
   // |name| must be a compile time constant. Takes ownership of |argumentp|.
@@ -132,6 +147,8 @@
                       const char* name,
                       const char* fmt, ...) PRINTF_ATTRIBUTE(4, 5);
 
+  void StealArguments(intptr_t arguments_length,
+                      TimelineEventArgument* arguments);
   // Mandatory to call when this event is completely filled out.
   void Complete();
 
@@ -166,31 +183,53 @@
     return TimeEnd() <= micros;
   }
 
+  bool IsDuration() const {
+    return (event_type() == kDuration);
+  }
+
+  bool IsBegin() const {
+    return (event_type() == kBegin);
+  }
+
+  bool IsEnd() const {
+    return (event_type() == kEnd);
+  }
+
+  // Is this event a synchronous begin or end event?
+  bool IsBeginOrEnd() const {
+    return IsBegin() || IsEnd();
+  }
+
   // Does this duration fully contain |other| ?
   bool DurationContains(TimelineEvent* other) const {
     ASSERT(IsFinishedDuration());
-    ASSERT(other->IsFinishedDuration());
-    if (other->TimeOrigin() < TimeOrigin()) {
-      return false;
+    if (other->IsBegin()) {
+      if (other->TimeOrigin() < TimeOrigin()) {
+        return false;
+      }
+      if (other->TimeOrigin() > TimeEnd()) {
+        return false;
+      }
+      return true;
+    } else {
+      ASSERT(other->IsFinishedDuration());
+      if (other->TimeOrigin() < TimeOrigin()) {
+        return false;
+      }
+      if (other->TimeEnd() < TimeOrigin()) {
+        return false;
+      }
+      if (other->TimeOrigin() > TimeEnd()) {
+        return false;
+      }
+      if (other->TimeEnd() > TimeEnd()) {
+        return false;
+      }
+      return true;
     }
-    if (other->TimeEnd() < TimeOrigin()) {
-      return false;
-    }
-    if (other->TimeOrigin() > TimeEnd()) {
-      return false;
-    }
-    if (other->TimeEnd() > TimeEnd()) {
-      return false;
-    }
-    return true;
   }
 
  private:
-  struct TimelineEventArgument {
-    const char* name;
-    char* value;
-  };
-
   int64_t timestamp0_;
   int64_t timestamp1_;
   TimelineEventArgument* arguments_;
@@ -212,16 +251,29 @@
     state_ = EventTypeField::update(event_type, state_);
   }
 
+  void set_global_block(bool global_block) {
+    state_ = GlobalBlockField::update(global_block, state_);
+  }
+
+  bool global_block() const {
+    return GlobalBlockField::decode(state_);
+  }
+
   enum StateBits {
-    kEventTypeBit = 0,
-    // reserve 4 bits for type.
-    kNextBit = 4,
+    kEventTypeBit = 0,  // reserve 4 bits for type.
+    // Was this event allocated from the global block?
+    kGlobalBlockBit = 4,
+    kNextBit = 5,
   };
 
   class EventTypeField : public BitField<EventType, kEventTypeBit, 4> {};
+  class GlobalBlockField : public BitField<bool, kGlobalBlockBit, 1> {};
 
-  friend class TimelineTestHelper;
+  friend class TimelineEventRecorder;
+  friend class TimelineEventEndlessRecorder;
+  friend class TimelineEventRingRecorder;
   friend class TimelineStream;
+  friend class TimelineTestHelper;
   DISALLOW_COPY_AND_ASSIGN(TimelineEvent);
 };
 
@@ -255,6 +307,8 @@
 
   // Records an event. Will return |NULL| if not enabled. The returned
   // |TimelineEvent| is in an undefined state and must be initialized.
+  // NOTE: It is not allowed to call StartEvent again without completing
+  // the first event.
   TimelineEvent* StartEvent();
 
  private:
@@ -276,77 +330,43 @@
   }
 
 
-// TODO(johnmccutchan): TimelineDurationScope should only allocate the
-// event when complete.
 class TimelineDurationScope : public StackResource {
  public:
-  TimelineDurationScope(Isolate* isolate,
-                        TimelineStream* stream,
-                        const char* label)
-      : StackResource(isolate) {
-    Init(stream, label);
-  }
+  TimelineDurationScope(TimelineStream* stream,
+                        const char* label);
 
   TimelineDurationScope(Thread* thread,
                         TimelineStream* stream,
-                        const char* label)
-      : StackResource(thread) {
-    Init(stream, label);
-  }
+                        const char* label);
 
-  TimelineDurationScope(TimelineStream* stream,
-                        const char* label)
-      : StackResource(reinterpret_cast<Thread*>(NULL)) {
-    Init(stream, label);
-  }
-
-  void Init(TimelineStream* stream, const char* label) {
-    event_ = stream->StartEvent();
-    if (event_ == NULL) {
-      return;
-    }
-    event_->DurationBegin(label);
-  }
+  ~TimelineDurationScope();
 
   bool enabled() const {
-    return event_ != NULL;
+    return enabled_;
   }
 
-  void SetNumArguments(intptr_t length) {
-    if (event_ == NULL) {
-      return;
-    }
-    event_->SetNumArguments(length);
-  }
+  void SetNumArguments(intptr_t length);
 
-  void SetArgument(intptr_t i, const char* name, char* argument) {
-    if (event_ == NULL) {
-      return;
-    }
-    event_->SetArgument(i, name, argument);
-  }
+  void SetArgument(intptr_t i, const char* name, char* argument);
 
-  void CopyArgument(intptr_t i, const char* name, const char* argument) {
-    if (event_ == NULL) {
-      return;
-    }
-    event_->CopyArgument(i, name, argument);
-  }
+  void CopyArgument(intptr_t i, const char* name, const char* argument);
 
   void FormatArgument(intptr_t i,
                       const char* name,
                       const char* fmt, ...)  PRINTF_ATTRIBUTE(4, 5);
 
-  ~TimelineDurationScope() {
-    if (event_ == NULL) {
-      return;
-    }
-    event_->DurationEnd();
-    event_->Complete();
-  }
-
  private:
-  TimelineEvent* event_;
+  void Init();
+  void FreeArguments();
+
+  int64_t timestamp_;
+  TimelineStream* stream_;
+  const char* label_;
+  TimelineEventArgument* arguments_;
+  intptr_t arguments_length_;
+  bool enabled_;
+
+  DISALLOW_COPY_AND_ASSIGN(TimelineDurationScope);
 };
 
 
@@ -552,6 +572,8 @@
   void PrintJSONMeta(JSONArray* array) const;
   TimelineEvent* ThreadBlockStartEvent();
   TimelineEvent* GlobalBlockStartEvent();
+  void ThreadBlockCompleteEvent(TimelineEvent* event);
+  void GlobalBlockCompleteEvent(TimelineEvent* event);
 
   Mutex lock_;
   // Only accessed under |lock_|.
diff --git a/runtime/vm/timeline_analysis.cc b/runtime/vm/timeline_analysis.cc
index 1ca8442..faf2f5e 100644
--- a/runtime/vm/timeline_analysis.cc
+++ b/runtime/vm/timeline_analysis.cc
@@ -199,6 +199,9 @@
   va_start(args, format);
   error_msg_ = zone_->VPrint(format, args);
   ASSERT(error_msg_ != NULL);
+  if (FLAG_trace_timeline_analysis) {
+    OS::Print("TimelineAnalysis error = %s\n", error_msg_);
+  }
 }
 
 
@@ -213,17 +216,36 @@
 
 
 void TimelineLabelPauseInfo::OnPush(int64_t micros, bool already_on_stack) {
+  UpdateInclusiveMicros(micros, already_on_stack);
+}
+
+
+void TimelineLabelPauseInfo::OnPop(int64_t exclusive_micros) {
+  UpdateExclusiveMicros(exclusive_micros);
+}
+
+
+void TimelineLabelPauseInfo::OnBeginPop(int64_t inclusive_micros,
+                                        int64_t exclusive_micros,
+                                        bool already_on_stack) {
+  UpdateInclusiveMicros(inclusive_micros, already_on_stack);
+  UpdateExclusiveMicros(exclusive_micros);
+}
+
+
+void TimelineLabelPauseInfo::UpdateInclusiveMicros(int64_t inclusive_micros,
+                                                   bool already_on_stack) {
   if (!already_on_stack) {
     // Only adjust inclusive counts if we aren't already on the stack.
-    add_inclusive_micros(micros);
-    if (micros > max_inclusive_micros_) {
-      max_inclusive_micros_ = micros;
+    add_inclusive_micros(inclusive_micros);
+    if (inclusive_micros > max_inclusive_micros_) {
+      max_inclusive_micros_ = inclusive_micros;
     }
   }
 }
 
 
-void TimelineLabelPauseInfo::OnPop(int64_t exclusive_micros) {
+void TimelineLabelPauseInfo::UpdateExclusiveMicros(int64_t exclusive_micros) {
   add_exclusive_micros(exclusive_micros);
   if (exclusive_micros > max_exclusive_micros_) {
     max_exclusive_micros_ = exclusive_micros;
@@ -323,23 +345,33 @@
               OSThread::ThreadIdToIntPtr(thread->id()));
   }
   intptr_t event_count = 0;
-  while (it.HasNext()) {
+  while (!has_error() && it.HasNext()) {
     TimelineEvent* event = it.Next();
-    if (!event->IsFinishedDuration()) {
-      // We only care about finished duration events.
-      continue;
+    if (event->IsFinishedDuration()) {
+      int64_t start = event->TimeOrigin();
+      PopFinishedDurations(start);
+      if (!CheckStack(event)) {
+        SetError("Duration check fail.");
+        return;
+      }
+      event_count++;
+      Push(event);
+    } else if (event->IsBeginOrEnd()) {
+      event_count++;
+      if (event->IsBegin()) {
+        PopFinishedDurations(event->TimeOrigin());
+        Push(event);
+      } else {
+        ASSERT(event->IsEnd());
+        PopFinishedDurations(event->TimeOrigin());
+        PopBegin(event->label(), event->TimeOrigin());
+      }
+    } else {
+      // Skip other event kinds.
     }
-    int64_t start = event->TimeOrigin();
-    PopFinished(start);
-    if (!CheckStack(event)) {
-      SetError("Duration check fail.");
-      return;
-    }
-    event_count++;
-    Push(event);
   }
-  // Pop remaining stack.
-  PopFinished(kMaxInt64);
+  // Pop remaining duration stack.
+  PopFinishedDurations(kMaxInt64);
   if (FLAG_trace_timeline_analysis) {
     THR_Print("<<< TimelinePauses::ProcessThread %" Px " had %" Pd " events\n",
               OSThread::ThreadIdToIntPtr(thread->id()),
@@ -353,18 +385,25 @@
   ASSERT(event != NULL);
   for (intptr_t i = 0; i < stack_.length(); i++) {
     const StackItem& slot = stack_.At(i);
-    if (!slot.event->DurationContains(event)) {
-      return false;
+    if (slot.event->IsDuration()) {
+      if (!slot.event->DurationContains(event)) {
+        return false;
+      }
+    } else {
+      ASSERT(slot.event->IsBegin());
+      if (slot.event->TimeOrigin() > event->TimeOrigin()) {
+        return false;
+      }
     }
   }
   return true;
 }
 
 
-void TimelinePauses::PopFinished(int64_t start) {
+void TimelinePauses::PopFinishedDurations(int64_t start) {
   while (stack_.length() > 0) {
     const StackItem& top = stack_.Last();
-    if (top.event->DurationFinishedBefore(start)) {
+    if (top.event->IsDuration() && top.event->DurationFinishedBefore(start)) {
       top.pause_info->OnPop(top.exclusive_micros);
       // Top of stack completes before |start|.
       stack_.RemoveLast();
@@ -381,6 +420,53 @@
 }
 
 
+void TimelinePauses::PopBegin(const char* label, int64_t end) {
+  if (stack_.length() == 0) {
+    SetError("PopBegin(%s, ...) called with empty stack.", label);
+    return;
+  }
+  ASSERT(stack_.length() > 0);
+  const StackItem& top = stack_.Last();
+  const char* top_label = top.event->label();
+  const bool top_is_begin = top.event->IsBegin();
+  const int64_t start = top.event->TimeOrigin();
+  if (start > end) {
+    SetError("Bad time stamps for PopBegin(%s, ...) %" Pd64 " > %" Pd64 "",
+             label, start, end);
+    return;
+  }
+  const int64_t duration = end - start;
+  // Sanity checks.
+  if (strcmp(top_label, label) != 0) {
+    SetError("PopBegin(%s, ...) called with %s at the top of stack",
+             label, top.event->label());
+    return;
+  }
+  if (!top_is_begin) {
+    SetError("kEnd event not paired with kBegin event for label %s",
+             label);
+    return;
+  }
+  // Pop this event.
+  // Add duration to exclusive micros.
+  if (FLAG_trace_timeline_analysis) {
+    THR_Print("Popping %s (%" Pd64 ")\n",
+              top.event->label(),
+              duration);
+  }
+  const int64_t exclusive_micros = top.exclusive_micros + duration;
+  stack_.RemoveLast();
+  top.pause_info->OnBeginPop(duration,
+                             exclusive_micros,
+                             IsLabelOnStack(top_label));
+  if (StackDepth() > 0) {
+    StackItem& top = GetStackTop();
+    // |top| is under the popped |event|'s shadow, adjust the exclusive micros.
+    top.exclusive_micros -= duration;
+  }
+}
+
+
 void TimelinePauses::Push(TimelineEvent* event) {
   TimelineLabelPauseInfo* pause_info = GetOrAddLabelPauseInfo(event->label());
   ASSERT(pause_info != NULL);
@@ -390,18 +476,29 @@
               pause_info->name(),
               event->TimeDuration());
   }
-  pause_info->OnPush(event->TimeDuration(), IsLabelOnStack(event->label()));
-  if (StackDepth() > 0) {
-    StackItem& top = GetStackTop();
-    // |top| is under |event|'s shadow, adjust the exclusive micros.
-    top.exclusive_micros -= event->TimeDuration();
+  if (event->IsDuration()) {
+    pause_info->OnPush(event->TimeDuration(), IsLabelOnStack(event->label()));
+    if (StackDepth() > 0) {
+      StackItem& top = GetStackTop();
+      // |top| is under |event|'s shadow, adjust the exclusive micros.
+      top.exclusive_micros -= event->TimeDuration();
+    }
+    // Push onto the stack.
+    StackItem item;
+    item.event = event;
+    item.pause_info = pause_info;
+    item.exclusive_micros = event->TimeDuration();
+    stack_.Add(item);
+  } else {
+    ASSERT(event->IsBegin());
+    pause_info->OnPush(0, IsLabelOnStack(event->label()));
+    // Push onto the stack.
+    StackItem item;
+    item.event = event;
+    item.pause_info = pause_info;
+    item.exclusive_micros = 0;
+    stack_.Add(item);
   }
-  // Push onto the stack.
-  StackItem item;
-  item.event = event;
-  item.pause_info = pause_info;
-  item.exclusive_micros = event->TimeDuration();
-  stack_.Add(item);
 }
 
 
diff --git a/runtime/vm/timeline_analysis.h b/runtime/vm/timeline_analysis.h
index b49d821..4f733a6 100644
--- a/runtime/vm/timeline_analysis.h
+++ b/runtime/vm/timeline_analysis.h
@@ -138,6 +138,15 @@
   // Also, may adjust |max_exclusive_micros_|.
   void OnPop(int64_t exclusive_micros);
 
+  // Adjusts |inclusive_micros_| and |exclusive_micros_| by |micros|.
+  // Also, may adjust, |max_inclusive_micros_|.
+  void OnBeginPop(int64_t inclusive_micros,
+                  int64_t exclusive_micros,
+                  bool already_on_stack);
+
+  void UpdateInclusiveMicros(int64_t inclusive_micros, bool already_on_stack);
+  void UpdateExclusiveMicros(int64_t exclusive_micros);
+
   // Adjust inclusive micros.
   void add_inclusive_micros(int64_t delta_micros) {
     inclusive_micros_ += delta_micros;
@@ -197,7 +206,8 @@
 
   void ProcessThread(TimelineAnalysisThread* thread);
   bool CheckStack(TimelineEvent* event);
-  void PopFinished(int64_t start);
+  void PopFinishedDurations(int64_t start);
+  void PopBegin(const char* label, int64_t end);
   void Push(TimelineEvent* event);
   bool IsLabelOnStack(const char* label) const;
   intptr_t StackDepth() const;
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 617e8fe..17fea5d 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -37,7 +37,7 @@
     event->StreamInit(stream);
   }
 
-  static TimelineEvent* FakeThreadEvent(
+  static void FakeThreadEvent(
       TimelineEventBlock* block,
       intptr_t ftid,
       const char* label = "fake",
@@ -49,7 +49,6 @@
     if (stream != NULL) {
       event->StreamInit(stream);
     }
-    return event;
   }
 
   static void FakeDuration(
@@ -63,6 +62,33 @@
     TimelineEvent* event = recorder->StartEvent();
     ASSERT(event != NULL);
     event->Duration(label, start, end);
+    event->Complete();
+  }
+
+  static void FakeBegin(
+      TimelineEventRecorder* recorder,
+      const char* label,
+      int64_t start) {
+    ASSERT(recorder != NULL);
+    ASSERT(label != NULL);
+    ASSERT(start >= 0);
+    TimelineEvent* event = recorder->StartEvent();
+    ASSERT(event != NULL);
+    event->Begin(label, start);
+    event->Complete();
+  }
+
+  static void FakeEnd(
+      TimelineEventRecorder* recorder,
+      const char* label,
+      int64_t end) {
+    ASSERT(recorder != NULL);
+    ASSERT(label != NULL);
+    ASSERT(end >= 0);
+    TimelineEvent* event = recorder->StartEvent();
+    ASSERT(event != NULL);
+    event->End(label, end);
+    event->Complete();
   }
 
   static void Clear(TimelineEventEndlessRecorder* recorder) {
@@ -609,4 +635,212 @@
   TimelineTestHelper::Clear(recorder);
 }
 
+
+TEST_CASE(TimelinePauses_BeginEnd) {
+  TimelineEventEndlessRecorder* recorder = new TimelineEventEndlessRecorder();
+  ASSERT(recorder != NULL);
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  ThreadId tid = OSThread::GetCurrentThreadTraceId();
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxExclusiveTime("a"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "b", 0);
+  TimelineTestHelper::FakeEnd(recorder, "b", 10);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.InclusiveTime("b"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(10, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "b", 1);
+  TimelineTestHelper::FakeEnd(recorder, "b", 8);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(3, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(3, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(7, pauses.InclusiveTime("b"));
+    EXPECT_EQ(7, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(7, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(7, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeDuration(recorder, "b", 0, 1);
+  TimelineTestHelper::FakeDuration(recorder, "b", 1, 2);
+  TimelineTestHelper::FakeDuration(recorder, "b", 2, 3);
+  TimelineTestHelper::FakeBegin(recorder, "b", 3);
+  TimelineTestHelper::FakeEnd(recorder, "b", 4);
+  TimelineTestHelper::FakeDuration(recorder, "b", 4, 5);
+  TimelineTestHelper::FakeDuration(recorder, "b", 5, 6);
+  TimelineTestHelper::FakeDuration(recorder, "b", 6, 7);
+  TimelineTestHelper::FakeBegin(recorder, "b", 7);
+  TimelineTestHelper::FakeEnd(recorder, "b", 8);
+  TimelineTestHelper::FakeBegin(recorder, "b", 8);
+  TimelineTestHelper::FakeEnd(recorder, "b", 9);
+  TimelineTestHelper::FakeDuration(recorder, "b", 9, 10);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.InclusiveTime("b"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(1, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(1, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "b", 0);
+  TimelineTestHelper::FakeBegin(recorder, "c", 1);
+  TimelineTestHelper::FakeEnd(recorder, "c", 4);
+  TimelineTestHelper::FakeEnd(recorder, "b", 5);
+  TimelineTestHelper::FakeBegin(recorder, "d", 5);
+  TimelineTestHelper::FakeEnd(recorder, "d", 10);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(5, pauses.InclusiveTime("b"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(5, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("b"));
+    EXPECT_EQ(3, pauses.InclusiveTime("c"));
+    EXPECT_EQ(3, pauses.ExclusiveTime("c"));
+    EXPECT_EQ(3, pauses.MaxInclusiveTime("c"));
+    EXPECT_EQ(3, pauses.MaxExclusiveTime("c"));
+    EXPECT_EQ(5, pauses.InclusiveTime("d"));
+    EXPECT_EQ(5, pauses.ExclusiveTime("d"));
+    EXPECT_EQ(5, pauses.MaxInclusiveTime("d"));
+    EXPECT_EQ(5, pauses.MaxExclusiveTime("d"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "b", 1);
+  TimelineTestHelper::FakeBegin(recorder, "c", 2);
+  TimelineTestHelper::FakeBegin(recorder, "d", 3);
+  TimelineTestHelper::FakeBegin(recorder, "e", 4);
+  TimelineTestHelper::FakeEnd(recorder, "e", 6);
+  TimelineTestHelper::FakeEnd(recorder, "d", 7);
+  TimelineTestHelper::FakeEnd(recorder, "c", 8);
+  TimelineTestHelper::FakeEnd(recorder, "b", 9);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(8, pauses.InclusiveTime("b"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(8, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("b"));
+    EXPECT_EQ(6, pauses.InclusiveTime("c"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("c"));
+    EXPECT_EQ(6, pauses.MaxInclusiveTime("c"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("c"));
+    EXPECT_EQ(4, pauses.InclusiveTime("d"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("d"));
+    EXPECT_EQ(4, pauses.MaxInclusiveTime("d"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("d"));
+    EXPECT_EQ(2, pauses.InclusiveTime("e"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("e"));
+    EXPECT_EQ(2, pauses.MaxInclusiveTime("e"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("e"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "a", 1);
+  TimelineTestHelper::FakeEnd(recorder, "a", 9);
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(8, pauses.MaxExclusiveTime("a"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeBegin(recorder, "a", 0);
+  TimelineTestHelper::FakeBegin(recorder, "b", 1);
+  // Pop "a" without popping "b" first.
+  TimelineTestHelper::FakeEnd(recorder, "a", 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(pauses.has_error());
+  }
+  TimelineTestHelper::Clear(recorder);
+}
+
 }  // namespace dart
diff --git a/runtime/vm/verifier.h b/runtime/vm/verifier.h
index aaee19b..99b6056 100644
--- a/runtime/vm/verifier.h
+++ b/runtime/vm/verifier.h
@@ -66,7 +66,7 @@
 class VerifyWeakPointersVisitor : public HandleVisitor {
  public:
   explicit VerifyWeakPointersVisitor(VerifyPointersVisitor* visitor)
-      :  HandleVisitor(Isolate::Current()),
+      :  HandleVisitor(Thread::Current()),
          visitor_(visitor) {
   }
 
diff --git a/runtime/vm/vm.gypi b/runtime/vm/vm.gypi
index 4397f96..3b2e620 100644
--- a/runtime/vm/vm.gypi
+++ b/runtime/vm/vm.gypi
@@ -25,13 +25,13 @@
     'math_patch_cc_file': '<(gen_source_dir)/math_patch_gen.cc',
     'mirrors_cc_file': '<(gen_source_dir)/mirrors_gen.cc',
     'mirrors_patch_cc_file': '<(gen_source_dir)/mirrors_patch_gen.cc',
-    'profiler_cc_file': '<(gen_source_dir)/profiler_gen.cc',
     'snapshot_test_dat_file': '<(gen_source_dir)/snapshot_test.dat',
     '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',
   },
   'targets': [
     {
@@ -180,10 +180,10 @@
         'generate_math_patch_cc_file#host',
         'generate_mirrors_cc_file#host',
         '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',
       ],
       'includes': [
         '../lib/async_sources.gypi',
@@ -218,10 +218,10 @@
         '<(math_patch_cc_file)',
         '<(mirrors_cc_file)',
         '<(mirrors_patch_cc_file)',
-        '<(profiler_cc_file)',
         '<(typed_data_cc_file)',
         '<(typed_data_patch_cc_file)',
         '<(vmservice_cc_file)',
+        '<(vmservice_patch_cc_file)',
       ],
       'include_dirs': [
         '..',
@@ -970,46 +970,6 @@
       ]
     },
     {
-      'target_name': 'generate_profiler_cc_file',
-      'type': 'none',
-      'toolsets':['host'],
-      'includes': [
-        # Load the shared library sources.
-        '../../sdk/lib/profiler/profiler_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_profiler_cc',
-          'inputs': [
-            '../tools/gen_library_src_paths.py',
-            '<(libgen_in_cc_file)',
-            '<@(_sources)',
-          ],
-          'outputs': [
-            '<(profiler_cc_file)',
-          ],
-          'action': [
-            'python',
-            'tools/gen_library_src_paths.py',
-            '--output', '<(profiler_cc_file)',
-            '--input_cc', '<(libgen_in_cc_file)',
-            '--include', 'vm/bootstrap.h',
-            '--var_name', 'dart::Bootstrap::profiler_source_paths_',
-            '--library_name', 'dart:profiler',
-            '<@(_sources)',
-          ],
-          'message': 'Generating ''<(profiler_cc_file)'' file.'
-        },
-      ]
-    },
-    {
       'target_name': 'generate_developer_cc_file',
       'type': 'none',
       'toolsets':['host'],
@@ -1122,7 +1082,8 @@
       'type': 'none',
       'toolsets':['host'],
       'includes': [
-        '../lib/vmservice_sources.gypi',
+        # Load the shared library sources.
+        '../../sdk/lib/vmservice/vmservice_sources.gypi',
       ],
       'sources/': [
         # Exclude all .[cc|h] files.
@@ -1148,7 +1109,7 @@
             '--output', '<(vmservice_cc_file)',
             '--input_cc', '<(libgen_in_cc_file)',
             '--include', 'vm/bootstrap.h',
-            '--var_name', 'dart::Bootstrap::vmservice_source_paths_',
+            '--var_name', 'dart::Bootstrap::_vmservice_source_paths_',
             '--library_name', 'dart:_vmservice',
             '<@(_sources)',
           ],
@@ -1156,5 +1117,45 @@
         },
       ]
     },
+    {
+      'target_name': 'generate_vmservice_patch_cc_file',
+      'type': 'none',
+      'toolsets':['host'],
+      'includes': [
+        # Load the runtime implementation sources.
+        '../lib/vmservice_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_vmservice_patch_cc',
+          'inputs': [
+            '../tools/gen_library_src_paths.py',
+            '<(libgen_in_cc_file)',
+            '<@(_sources)',
+          ],
+          'outputs': [
+            '<(vmservice_patch_cc_file)',
+          ],
+          'action': [
+            'python',
+            'tools/gen_library_src_paths.py',
+            '--output', '<(vmservice_patch_cc_file)',
+            '--input_cc', '<(libgen_in_cc_file)',
+            '--include', 'vm/bootstrap.h',
+            '--var_name', 'dart::Bootstrap::_vmservice_patch_paths_',
+            '--library_name', 'dart:_vmservice',
+            '<@(_sources)',
+          ],
+          'message': 'Generating ''<(vmservice_patch_cc_file)'' file.'
+        },
+      ]
+    },
   ]
 }
diff --git a/runtime/vm/weak_table.cc b/runtime/vm/weak_table.cc
index cb45d2e..e45e9c8 100644
--- a/runtime/vm/weak_table.cc
+++ b/runtime/vm/weak_table.cc
@@ -75,6 +75,16 @@
 }
 
 
+void WeakTable::Reset() {
+  intptr_t* old_data = data_;
+  used_ = 0;
+  count_ = 0;
+  size_ = kMinSize;
+  data_ = reinterpret_cast<intptr_t*>(calloc(size_, kEntrySize * kWordSize));
+  free(old_data);
+}
+
+
 void WeakTable::Rehash() {
   intptr_t old_size = size();
   intptr_t* old_data = data_;
diff --git a/runtime/vm/weak_table.h b/runtime/vm/weak_table.h
index cc7f54d..aca86fc 100644
--- a/runtime/vm/weak_table.h
+++ b/runtime/vm/weak_table.h
@@ -92,6 +92,8 @@
     return 0;
   }
 
+  void Reset();
+
  private:
   enum {
     kObjectOffset = 0,
diff --git a/sdk/lib/_blink/dartium/_blink_dartium.dart b/sdk/lib/_blink/dartium/_blink_dartium.dart
index eac32e7..4f88a3d 100644
--- a/sdk/lib/_blink/dartium/_blink_dartium.dart
+++ b/sdk/lib/_blink/dartium/_blink_dartium.dart
@@ -6,6 +6,7 @@
 library dart.dom._blink;
 
 import 'dart:js' as js;
+import 'dart:html' show DomException;
 
 // This is a place to put custom renames if we need them.
 final resolverMap = {
@@ -629,60 +630,60 @@
 class BlinkANGLEInstancedArrays {
   static final instance = new BlinkANGLEInstancedArrays();
 
-  drawArraysInstancedANGLE_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("drawArraysInstancedANGLE", [__arg_0, __arg_1]);
+  drawArraysInstancedANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawArraysInstancedANGLE", [__arg_0, __arg_1]);
 
-  drawArraysInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
+  drawArraysInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
 
-  drawArraysInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "drawArraysInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawElementsInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
+  drawElementsInstancedANGLE_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2]);
 
-  drawElementsInstancedANGLE_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawElementsInstancedANGLE_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("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, "drawElementsInstancedANGLE", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  vertexAttribDivisorANGLE_Callback_0_(mthis) => mthis.callMethod("vertexAttribDivisorANGLE", []);
+  vertexAttribDivisorANGLE_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", []);
 
-  vertexAttribDivisorANGLE_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttribDivisorANGLE", [__arg_0]);
+  vertexAttribDivisorANGLE_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", [__arg_0]);
 
-  vertexAttribDivisorANGLE_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttribDivisorANGLE", [__arg_0, __arg_1]);
+  vertexAttribDivisorANGLE_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttribDivisorANGLE", [__arg_0, __arg_1]);
 
 }
 
 class BlinkAnalyserNode extends BlinkAudioNode {
   static final instance = new BlinkAnalyserNode();
 
-  fftSize_Getter_(mthis) => mthis["fftSize"];
+  fftSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fftSize");
 
   fftSize_Setter_(mthis, __arg_0) => mthis["fftSize"] = __arg_0;
 
-  frequencyBinCount_Getter_(mthis) => mthis["frequencyBinCount"];
+  frequencyBinCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequencyBinCount");
 
-  getByteFrequencyData_Callback_0_(mthis) => mthis.callMethod("getByteFrequencyData", []);
+  getByteFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getByteFrequencyData", []);
 
-  getByteFrequencyData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getByteFrequencyData", [__arg_0]);
+  getByteFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getByteFrequencyData", [__arg_0]);
 
-  getByteTimeDomainData_Callback_0_(mthis) => mthis.callMethod("getByteTimeDomainData", []);
+  getByteTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getByteTimeDomainData", []);
 
-  getByteTimeDomainData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getByteTimeDomainData", [__arg_0]);
+  getByteTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getByteTimeDomainData", [__arg_0]);
 
-  getFloatFrequencyData_Callback_0_(mthis) => mthis.callMethod("getFloatFrequencyData", []);
+  getFloatFrequencyData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatFrequencyData", []);
 
-  getFloatFrequencyData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFloatFrequencyData", [__arg_0]);
+  getFloatFrequencyData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatFrequencyData", [__arg_0]);
 
-  getFloatTimeDomainData_Callback_0_(mthis) => mthis.callMethod("getFloatTimeDomainData", []);
+  getFloatTimeDomainData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatTimeDomainData", []);
 
-  getFloatTimeDomainData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFloatTimeDomainData", [__arg_0]);
+  getFloatTimeDomainData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatTimeDomainData", [__arg_0]);
 
-  maxDecibels_Getter_(mthis) => mthis["maxDecibels"];
+  maxDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxDecibels");
 
   maxDecibels_Setter_(mthis, __arg_0) => mthis["maxDecibels"] = __arg_0;
 
-  minDecibels_Getter_(mthis) => mthis["minDecibels"];
+  minDecibels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "minDecibels");
 
   minDecibels_Setter_(mthis, __arg_0) => mthis["minDecibels"] = __arg_0;
 
-  smoothingTimeConstant_Getter_(mthis) => mthis["smoothingTimeConstant"];
+  smoothingTimeConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "smoothingTimeConstant");
 
   smoothingTimeConstant_Setter_(mthis, __arg_0) => mthis["smoothingTimeConstant"] = __arg_0;
 
@@ -691,13 +692,13 @@
 class BlinkAnimation extends BlinkAnimationNode {
   static final instance = new BlinkAnimation();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Animation"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Animation"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Animation"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["Animation"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Animation"), [__arg_0, __arg_1, __arg_2]);
 
 }
 
@@ -709,56 +710,56 @@
 class BlinkAnimationNode {
   static final instance = new BlinkAnimationNode();
 
-  activeDuration_Getter_(mthis) => mthis["activeDuration"];
+  activeDuration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeDuration");
 
-  currentIteration_Getter_(mthis) => mthis["currentIteration"];
+  currentIteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentIteration");
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  endTime_Getter_(mthis) => mthis["endTime"];
+  endTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endTime");
 
-  localTime_Getter_(mthis) => mthis["localTime"];
+  localTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localTime");
 
-  player_Getter_(mthis) => mthis["player"];
+  player_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "player");
 
-  startTime_Getter_(mthis) => mthis["startTime"];
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
 
-  timing_Getter_(mthis) => mthis["timing"];
+  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timing");
 
 }
 
 class BlinkAnimationPlayer extends BlinkEventTarget {
   static final instance = new BlinkAnimationPlayer();
 
-  cancel_Callback_0_(mthis) => mthis.callMethod("cancel", []);
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
   currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
 
-  finish_Callback_0_(mthis) => mthis.callMethod("finish", []);
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "finish", []);
 
-  onfinish_Getter_(mthis) => mthis["onfinish"];
+  onfinish_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfinish");
 
   onfinish_Setter_(mthis, __arg_0) => mthis["onfinish"] = __arg_0;
 
-  pause_Callback_0_(mthis) => mthis.callMethod("pause", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
 
-  playState_Getter_(mthis) => mthis["playState"];
+  playState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playState");
 
-  play_Callback_0_(mthis) => mthis.callMethod("play", []);
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
 
-  playbackRate_Getter_(mthis) => mthis["playbackRate"];
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
 
   playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
 
-  reverse_Callback_0_(mthis) => mthis.callMethod("reverse", []);
+  reverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reverse", []);
 
-  source_Getter_(mthis) => mthis["source"];
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
 
   source_Setter_(mthis, __arg_0) => mthis["source"] = __arg_0;
 
-  startTime_Getter_(mthis) => mthis["startTime"];
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
 
   startTime_Setter_(mthis, __arg_0) => mthis["startTime"] = __arg_0;
 
@@ -767,111 +768,111 @@
 class BlinkAnimationPlayerEvent extends BlinkEvent {
   static final instance = new BlinkAnimationPlayerEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["AnimationPlayerEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AnimationPlayerEvent"), [__arg_0, __arg_1]);
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
-  timelineTime_Getter_(mthis) => mthis["timelineTime"];
+  timelineTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timelineTime");
 
 }
 
 class BlinkAnimationTimeline {
   static final instance = new BlinkAnimationTimeline();
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
-  getAnimationPlayers_Callback_0_(mthis) => mthis.callMethod("getAnimationPlayers", []);
+  getAnimationPlayers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAnimationPlayers", []);
 
-  play_Callback_0_(mthis) => mthis.callMethod("play", []);
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
 
-  play_Callback_1_(mthis, __arg_0) => mthis.callMethod("play", [__arg_0]);
+  play_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "play", [__arg_0]);
 
 }
 
 class BlinkApplicationCache extends BlinkEventTarget {
   static final instance = new BlinkApplicationCache();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  oncached_Getter_(mthis) => mthis["oncached"];
+  oncached_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncached");
 
   oncached_Setter_(mthis, __arg_0) => mthis["oncached"] = __arg_0;
 
-  onchecking_Getter_(mthis) => mthis["onchecking"];
+  onchecking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchecking");
 
   onchecking_Setter_(mthis, __arg_0) => mthis["onchecking"] = __arg_0;
 
-  ondownloading_Getter_(mthis) => mthis["ondownloading"];
+  ondownloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondownloading");
 
   ondownloading_Setter_(mthis, __arg_0) => mthis["ondownloading"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onnoupdate_Getter_(mthis) => mthis["onnoupdate"];
+  onnoupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnoupdate");
 
   onnoupdate_Setter_(mthis, __arg_0) => mthis["onnoupdate"] = __arg_0;
 
-  onobsolete_Getter_(mthis) => mthis["onobsolete"];
+  onobsolete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onobsolete");
 
   onobsolete_Setter_(mthis, __arg_0) => mthis["onobsolete"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onupdateready_Getter_(mthis) => mthis["onupdateready"];
+  onupdateready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupdateready");
 
   onupdateready_Setter_(mthis, __arg_0) => mthis["onupdateready"] = __arg_0;
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
-  swapCache_Callback_0_(mthis) => mthis.callMethod("swapCache", []);
+  swapCache_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "swapCache", []);
 
-  update_Callback_0_(mthis) => mthis.callMethod("update", []);
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
 
 }
 
 class BlinkApplicationCacheErrorEvent extends BlinkEvent {
   static final instance = new BlinkApplicationCacheErrorEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["ApplicationCacheErrorEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ApplicationCacheErrorEvent"), [__arg_0, __arg_1]);
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
-  reason_Getter_(mthis) => mthis["reason"];
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkAttr extends BlinkNode {
   static final instance = new BlinkAttr();
 
-  localName_Getter_(mthis) => mthis["localName"];
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  namespaceURI_Getter_(mthis) => mthis["namespaceURI"];
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
 
-  nodeValue_Getter_(mthis) => mthis["nodeValue"];
+  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeValue");
 
   nodeValue_Setter_(mthis, __arg_0) => mthis["nodeValue"] = __arg_0;
 
-  ownerElement_Getter_(mthis) => mthis["ownerElement"];
+  ownerElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerElement");
 
-  prefix_Getter_(mthis) => mthis["prefix"];
+  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prefix");
 
-  specified_Getter_(mthis) => mthis["specified"];
+  specified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specified");
 
-  textContent_Getter_(mthis) => mthis["textContent"];
+  textContent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textContent");
 
   textContent_Setter_(mthis, __arg_0) => mthis["textContent"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -880,181 +881,181 @@
 class BlinkAudioBuffer {
   static final instance = new BlinkAudioBuffer();
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  getChannelData_Callback_0_(mthis) => mthis.callMethod("getChannelData", []);
+  getChannelData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getChannelData", []);
 
-  getChannelData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getChannelData", [__arg_0]);
+  getChannelData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getChannelData", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfChannels_Getter_(mthis) => mthis["numberOfChannels"];
+  numberOfChannels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfChannels");
 
-  sampleRate_Getter_(mthis) => mthis["sampleRate"];
+  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sampleRate");
 
 }
 
 class BlinkAudioBufferSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkAudioBufferSourceNode();
 
-  buffer_Getter_(mthis) => mthis["buffer"];
+  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffer");
 
   buffer_Setter_(mthis, __arg_0) => mthis["buffer"] = __arg_0;
 
-  loopEnd_Getter_(mthis) => mthis["loopEnd"];
+  loopEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loopEnd");
 
   loopEnd_Setter_(mthis, __arg_0) => mthis["loopEnd"] = __arg_0;
 
-  loopStart_Getter_(mthis) => mthis["loopStart"];
+  loopStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loopStart");
 
   loopStart_Setter_(mthis, __arg_0) => mthis["loopStart"] = __arg_0;
 
-  loop_Getter_(mthis) => mthis["loop"];
+  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loop");
 
   loop_Setter_(mthis, __arg_0) => mthis["loop"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  playbackRate_Getter_(mthis) => mthis["playbackRate"];
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
 
-  start_Callback_0_(mthis) => mthis.callMethod("start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
 
-  start_Callback_1_(mthis, __arg_0) => mthis.callMethod("start", [__arg_0]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
 
-  start_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("start", [__arg_0, __arg_1]);
+  start_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0, __arg_1]);
 
-  start_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("start", [__arg_0, __arg_1, __arg_2]);
+  start_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0, __arg_1, __arg_2]);
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
-  stop_Callback_1_(mthis, __arg_0) => mthis.callMethod("stop", [__arg_0]);
+  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stop", [__arg_0]);
 
 }
 
 class BlinkAudioContext extends BlinkEventTarget {
   static final instance = new BlinkAudioContext();
 
-  constructorCallback_0_() => new js.JsObject(js.context["AudioContext"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AudioContext"), []);
 
-  createAnalyser_Callback_0_(mthis) => mthis.callMethod("createAnalyser", []);
+  createAnalyser_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createAnalyser", []);
 
-  createBiquadFilter_Callback_0_(mthis) => mthis.callMethod("createBiquadFilter", []);
+  createBiquadFilter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBiquadFilter", []);
 
-  createBufferSource_Callback_0_(mthis) => mthis.callMethod("createBufferSource", []);
+  createBufferSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBufferSource", []);
 
-  createBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("createBuffer", [__arg_0]);
+  createBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0]);
 
-  createBuffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createBuffer", [__arg_0, __arg_1]);
+  createBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0, __arg_1]);
 
-  createBuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createBuffer", [__arg_0, __arg_1, __arg_2]);
+  createBuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", [__arg_0, __arg_1, __arg_2]);
 
-  createChannelMerger_Callback_0_(mthis) => mthis.callMethod("createChannelMerger", []);
+  createChannelMerger_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createChannelMerger", []);
 
-  createChannelMerger_Callback_1_(mthis, __arg_0) => mthis.callMethod("createChannelMerger", [__arg_0]);
+  createChannelMerger_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createChannelMerger", [__arg_0]);
 
-  createChannelSplitter_Callback_0_(mthis) => mthis.callMethod("createChannelSplitter", []);
+  createChannelSplitter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createChannelSplitter", []);
 
-  createChannelSplitter_Callback_1_(mthis, __arg_0) => mthis.callMethod("createChannelSplitter", [__arg_0]);
+  createChannelSplitter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createChannelSplitter", [__arg_0]);
 
-  createConvolver_Callback_0_(mthis) => mthis.callMethod("createConvolver", []);
+  createConvolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createConvolver", []);
 
-  createDelay_Callback_0_(mthis) => mthis.callMethod("createDelay", []);
+  createDelay_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDelay", []);
 
-  createDelay_Callback_1_(mthis, __arg_0) => mthis.callMethod("createDelay", [__arg_0]);
+  createDelay_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDelay", [__arg_0]);
 
-  createDynamicsCompressor_Callback_0_(mthis) => mthis.callMethod("createDynamicsCompressor", []);
+  createDynamicsCompressor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDynamicsCompressor", []);
 
-  createGain_Callback_0_(mthis) => mthis.callMethod("createGain", []);
+  createGain_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createGain", []);
 
-  createMediaElementSource_Callback_0_(mthis) => mthis.callMethod("createMediaElementSource", []);
+  createMediaElementSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaElementSource", []);
 
-  createMediaElementSource_Callback_1_(mthis, __arg_0) => mthis.callMethod("createMediaElementSource", [__arg_0]);
+  createMediaElementSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createMediaElementSource", [__arg_0]);
 
-  createMediaStreamDestination_Callback_0_(mthis) => mthis.callMethod("createMediaStreamDestination", []);
+  createMediaStreamDestination_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamDestination", []);
 
-  createMediaStreamSource_Callback_0_(mthis) => mthis.callMethod("createMediaStreamSource", []);
+  createMediaStreamSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamSource", []);
 
-  createMediaStreamSource_Callback_1_(mthis, __arg_0) => mthis.callMethod("createMediaStreamSource", [__arg_0]);
+  createMediaStreamSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createMediaStreamSource", [__arg_0]);
 
-  createOscillator_Callback_0_(mthis) => mthis.callMethod("createOscillator", []);
+  createOscillator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createOscillator", []);
 
-  createPanner_Callback_0_(mthis) => mthis.callMethod("createPanner", []);
+  createPanner_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPanner", []);
 
-  createPeriodicWave_Callback_0_(mthis) => mthis.callMethod("createPeriodicWave", []);
+  createPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", []);
 
-  createPeriodicWave_Callback_1_(mthis, __arg_0) => mthis.callMethod("createPeriodicWave", [__arg_0]);
+  createPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", [__arg_0]);
 
-  createPeriodicWave_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createPeriodicWave", [__arg_0, __arg_1]);
+  createPeriodicWave_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createPeriodicWave", [__arg_0, __arg_1]);
 
-  createScriptProcessor_Callback_0_(mthis) => mthis.callMethod("createScriptProcessor", []);
+  createScriptProcessor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", []);
 
-  createScriptProcessor_Callback_1_(mthis, __arg_0) => mthis.callMethod("createScriptProcessor", [__arg_0]);
+  createScriptProcessor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0]);
 
-  createScriptProcessor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createScriptProcessor", [__arg_0, __arg_1]);
+  createScriptProcessor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0, __arg_1]);
 
-  createScriptProcessor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createScriptProcessor", [__arg_0, __arg_1, __arg_2]);
+  createScriptProcessor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createScriptProcessor", [__arg_0, __arg_1, __arg_2]);
 
-  createWaveShaper_Callback_0_(mthis) => mthis.callMethod("createWaveShaper", []);
+  createWaveShaper_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWaveShaper", []);
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
-  decodeAudioData_Callback_0_(mthis) => mthis.callMethod("decodeAudioData", []);
+  decodeAudioData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", []);
 
-  decodeAudioData_Callback_1_(mthis, __arg_0) => mthis.callMethod("decodeAudioData", [__arg_0]);
+  decodeAudioData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0]);
 
-  decodeAudioData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("decodeAudioData", [__arg_0, __arg_1]);
+  decodeAudioData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0, __arg_1]);
 
-  decodeAudioData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("decodeAudioData", [__arg_0, __arg_1, __arg_2]);
+  decodeAudioData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "decodeAudioData", [__arg_0, __arg_1, __arg_2]);
 
-  destination_Getter_(mthis) => mthis["destination"];
+  destination_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "destination");
 
-  listener_Getter_(mthis) => mthis["listener"];
+  listener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "listener");
 
-  oncomplete_Getter_(mthis) => mthis["oncomplete"];
+  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncomplete");
 
   oncomplete_Setter_(mthis, __arg_0) => mthis["oncomplete"] = __arg_0;
 
-  sampleRate_Getter_(mthis) => mthis["sampleRate"];
+  sampleRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sampleRate");
 
-  startRendering_Callback_0_(mthis) => mthis.callMethod("startRendering", []);
+  startRendering_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "startRendering", []);
 
 }
 
 class BlinkAudioDestinationNode extends BlinkAudioNode {
   static final instance = new BlinkAudioDestinationNode();
 
-  maxChannelCount_Getter_(mthis) => mthis["maxChannelCount"];
+  maxChannelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxChannelCount");
 
 }
 
 class BlinkAudioListener {
   static final instance = new BlinkAudioListener();
 
-  dopplerFactor_Getter_(mthis) => mthis["dopplerFactor"];
+  dopplerFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dopplerFactor");
 
   dopplerFactor_Setter_(mthis, __arg_0) => mthis["dopplerFactor"] = __arg_0;
 
-  setOrientation_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  setOrientation_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  setOrientation_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("setOrientation", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  setPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("setPosition", [__arg_0]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setPosition", [__arg_0, __arg_1]);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
 
-  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setPosition", [__arg_0, __arg_1, __arg_2]);
+  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1, __arg_2]);
 
-  setVelocity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setVelocity", [__arg_0]);
+  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0]);
 
-  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setVelocity", [__arg_0, __arg_1]);
+  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1]);
 
-  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setVelocity", [__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]);
 
-  speedOfSound_Getter_(mthis) => mthis["speedOfSound"];
+  speedOfSound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speedOfSound");
 
   speedOfSound_Setter_(mthis, __arg_0) => mthis["speedOfSound"] = __arg_0;
 
@@ -1063,78 +1064,78 @@
 class BlinkAudioNode extends BlinkEventTarget {
   static final instance = new BlinkAudioNode();
 
-  channelCountMode_Getter_(mthis) => mthis["channelCountMode"];
+  channelCountMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelCountMode");
 
   channelCountMode_Setter_(mthis, __arg_0) => mthis["channelCountMode"] = __arg_0;
 
-  channelCount_Getter_(mthis) => mthis["channelCount"];
+  channelCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelCount");
 
   channelCount_Setter_(mthis, __arg_0) => mthis["channelCount"] = __arg_0;
 
-  channelInterpretation_Getter_(mthis) => mthis["channelInterpretation"];
+  channelInterpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channelInterpretation");
 
   channelInterpretation_Setter_(mthis, __arg_0) => mthis["channelInterpretation"] = __arg_0;
 
-  connect_Callback_0_(mthis) => mthis.callMethod("connect", []);
+  connect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "connect", []);
 
-  connect_Callback_1_(mthis, __arg_0) => mthis.callMethod("connect", [__arg_0]);
+  connect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0]);
 
-  connect_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("connect", [__arg_0, __arg_1]);
+  connect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0, __arg_1]);
 
-  connect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("connect", [__arg_0, __arg_1, __arg_2]);
+  connect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "connect", [__arg_0, __arg_1, __arg_2]);
 
-  context_Getter_(mthis) => mthis["context"];
+  context_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "context");
 
-  disconnect_Callback_0_(mthis) => mthis.callMethod("disconnect", []);
+  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", []);
 
-  disconnect_Callback_1_(mthis, __arg_0) => mthis.callMethod("disconnect", [__arg_0]);
+  disconnect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", [__arg_0]);
 
-  numberOfInputs_Getter_(mthis) => mthis["numberOfInputs"];
+  numberOfInputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfInputs");
 
-  numberOfOutputs_Getter_(mthis) => mthis["numberOfOutputs"];
+  numberOfOutputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfOutputs");
 
 }
 
 class BlinkAudioParam {
   static final instance = new BlinkAudioParam();
 
-  cancelScheduledValues_Callback_0_(mthis) => mthis.callMethod("cancelScheduledValues", []);
+  cancelScheduledValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancelScheduledValues", []);
 
-  cancelScheduledValues_Callback_1_(mthis, __arg_0) => mthis.callMethod("cancelScheduledValues", [__arg_0]);
+  cancelScheduledValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancelScheduledValues", [__arg_0]);
 
-  defaultValue_Getter_(mthis) => mthis["defaultValue"];
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
 
-  exponentialRampToValueAtTime_Callback_0_(mthis) => mthis.callMethod("exponentialRampToValueAtTime", []);
+  exponentialRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", []);
 
-  exponentialRampToValueAtTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("exponentialRampToValueAtTime", [__arg_0]);
+  exponentialRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", [__arg_0]);
 
-  exponentialRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("exponentialRampToValueAtTime", [__arg_0, __arg_1]);
+  exponentialRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "exponentialRampToValueAtTime", [__arg_0, __arg_1]);
 
-  linearRampToValueAtTime_Callback_0_(mthis) => mthis.callMethod("linearRampToValueAtTime", []);
+  linearRampToValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", []);
 
-  linearRampToValueAtTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("linearRampToValueAtTime", [__arg_0]);
+  linearRampToValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", [__arg_0]);
 
-  linearRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("linearRampToValueAtTime", [__arg_0, __arg_1]);
+  linearRampToValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "linearRampToValueAtTime", [__arg_0, __arg_1]);
 
-  setTargetAtTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("setTargetAtTime", [__arg_0]);
+  setTargetAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0]);
 
-  setTargetAtTime_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setTargetAtTime", [__arg_0, __arg_1]);
+  setTargetAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0, __arg_1]);
 
-  setTargetAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setTargetAtTime", [__arg_0, __arg_1, __arg_2]);
+  setTargetAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setTargetAtTime", [__arg_0, __arg_1, __arg_2]);
 
-  setValueAtTime_Callback_0_(mthis) => mthis.callMethod("setValueAtTime", []);
+  setValueAtTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", []);
 
-  setValueAtTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("setValueAtTime", [__arg_0]);
+  setValueAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", [__arg_0]);
 
-  setValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setValueAtTime", [__arg_0, __arg_1]);
+  setValueAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueAtTime", [__arg_0, __arg_1]);
 
-  setValueCurveAtTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("setValueCurveAtTime", [__arg_0]);
+  setValueCurveAtTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0]);
 
-  setValueCurveAtTime_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setValueCurveAtTime", [__arg_0, __arg_1]);
+  setValueCurveAtTime_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0, __arg_1]);
 
-  setValueCurveAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setValueCurveAtTime", [__arg_0, __arg_1, __arg_2]);
+  setValueCurveAtTime_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setValueCurveAtTime", [__arg_0, __arg_1, __arg_2]);
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -1143,11 +1144,11 @@
 class BlinkAudioProcessingEvent extends BlinkEvent {
   static final instance = new BlinkAudioProcessingEvent();
 
-  inputBuffer_Getter_(mthis) => mthis["inputBuffer"];
+  inputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputBuffer");
 
-  outputBuffer_Getter_(mthis) => mthis["outputBuffer"];
+  outputBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outputBuffer");
 
-  playbackTime_Getter_(mthis) => mthis["playbackTime"];
+  playbackTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackTime");
 
 }
 
@@ -1159,40 +1160,40 @@
 class BlinkAudioTrack {
   static final instance = new BlinkAudioTrack();
 
-  enabled_Getter_(mthis) => mthis["enabled"];
+  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabled");
 
   enabled_Setter_(mthis, __arg_0) => mthis["enabled"] = __arg_0;
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  language_Getter_(mthis) => mthis["language"];
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
 
 }
 
 class BlinkAudioTrackList extends BlinkEventTarget {
   static final instance = new BlinkAudioTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getTrackById_Callback_0_(mthis) => mthis.callMethod("getTrackById", []);
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
 
-  getTrackById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTrackById", [__arg_0]);
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  onaddtrack_Getter_(mthis) => mthis["onaddtrack"];
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
 
   onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onremovetrack_Getter_(mthis) => mthis["onremovetrack"];
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
 
   onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
 
@@ -1201,43 +1202,43 @@
 class BlinkAutocompleteErrorEvent extends BlinkEvent {
   static final instance = new BlinkAutocompleteErrorEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["AutocompleteErrorEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "AutocompleteErrorEvent"), [__arg_0, __arg_1]);
 
-  reason_Getter_(mthis) => mthis["reason"];
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
 
 }
 
 class BlinkBarProp {
   static final instance = new BlinkBarProp();
 
-  visible_Getter_(mthis) => mthis["visible"];
+  visible_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "visible");
 
 }
 
 class BlinkBatteryManager extends BlinkEventTarget {
   static final instance = new BlinkBatteryManager();
 
-  chargingTime_Getter_(mthis) => mthis["chargingTime"];
+  chargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "chargingTime");
 
-  charging_Getter_(mthis) => mthis["charging"];
+  charging_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charging");
 
-  dischargingTime_Getter_(mthis) => mthis["dischargingTime"];
+  dischargingTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dischargingTime");
 
-  level_Getter_(mthis) => mthis["level"];
+  level_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "level");
 
-  onchargingchange_Getter_(mthis) => mthis["onchargingchange"];
+  onchargingchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchargingchange");
 
   onchargingchange_Setter_(mthis, __arg_0) => mthis["onchargingchange"] = __arg_0;
 
-  onchargingtimechange_Getter_(mthis) => mthis["onchargingtimechange"];
+  onchargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchargingtimechange");
 
   onchargingtimechange_Setter_(mthis, __arg_0) => mthis["onchargingtimechange"] = __arg_0;
 
-  ondischargingtimechange_Getter_(mthis) => mthis["ondischargingtimechange"];
+  ondischargingtimechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondischargingtimechange");
 
   ondischargingtimechange_Setter_(mthis, __arg_0) => mthis["ondischargingtimechange"] = __arg_0;
 
-  onlevelchange_Getter_(mthis) => mthis["onlevelchange"];
+  onlevelchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlevelchange");
 
   onlevelchange_Setter_(mthis, __arg_0) => mthis["onlevelchange"] = __arg_0;
 
@@ -1246,7 +1247,7 @@
 class BlinkBeforeUnloadEvent extends BlinkEvent {
   static final instance = new BlinkBeforeUnloadEvent();
 
-  returnValue_Getter_(mthis) => mthis["returnValue"];
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
 
   returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
 
@@ -1255,21 +1256,21 @@
 class BlinkBiquadFilterNode extends BlinkAudioNode {
   static final instance = new BlinkBiquadFilterNode();
 
-  Q_Getter_(mthis) => mthis["Q"];
+  Q_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "Q");
 
-  detune_Getter_(mthis) => mthis["detune"];
+  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detune");
 
-  frequency_Getter_(mthis) => mthis["frequency"];
+  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequency");
 
-  gain_Getter_(mthis) => mthis["gain"];
+  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gain");
 
-  getFrequencyResponse_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFrequencyResponse", [__arg_0]);
+  getFrequencyResponse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0]);
 
-  getFrequencyResponse_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getFrequencyResponse", [__arg_0, __arg_1]);
+  getFrequencyResponse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0, __arg_1]);
 
-  getFrequencyResponse_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getFrequencyResponse", [__arg_0, __arg_1, __arg_2]);
+  getFrequencyResponse_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFrequencyResponse", [__arg_0, __arg_1, __arg_2]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -1278,40 +1279,40 @@
 class BlinkBlob {
   static final instance = new BlinkBlob();
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Blob"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Blob"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["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) => new js.JsObject(js.context["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]);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
-  slice_Callback_0_(mthis) => mthis.callMethod("slice", []);
+  slice_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "slice", []);
 
-  slice_Callback_1_(mthis, __arg_0) => mthis.callMethod("slice", [__arg_0]);
+  slice_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0]);
 
-  slice_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("slice", [__arg_0, __arg_1]);
+  slice_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0, __arg_1]);
 
-  slice_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("slice", [__arg_0, __arg_1, __arg_2]);
+  slice_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "slice", [__arg_0, __arg_1, __arg_2]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkBody {
   static final instance = new BlinkBody();
 
-  arrayBuffer_Callback_0_(mthis) => mthis.callMethod("arrayBuffer", []);
+  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
 
-  blob_Callback_0_(mthis) => mthis.callMethod("blob", []);
+  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
 
-  bodyUsed_Getter_(mthis) => mthis["bodyUsed"];
+  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
 
-  json_Callback_0_(mthis) => mthis.callMethod("json", []);
+  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
 
-  text_Callback_0_(mthis) => mthis.callMethod("text", []);
+  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
 
 }
 
@@ -1323,18 +1324,18 @@
 class BlinkCSS {
   static final instance = new BlinkCSS();
 
-  supports_Callback_0_(mthis) => mthis.callMethod("supports", []);
+  supports_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "supports", []);
 
-  supports_Callback_1_(mthis, __arg_0) => mthis.callMethod("supports", [__arg_0]);
+  supports_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "supports", [__arg_0]);
 
-  supports_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("supports", [__arg_0, __arg_1]);
+  supports_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "supports", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCSSCharsetRule extends BlinkCSSRule {
   static final instance = new BlinkCSSCharsetRule();
 
-  encoding_Getter_(mthis) => mthis["encoding"];
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
 
   encoding_Setter_(mthis, __arg_0) => mthis["encoding"] = __arg_0;
 
@@ -1343,52 +1344,52 @@
 class BlinkCSSFontFaceRule extends BlinkCSSRule {
   static final instance = new BlinkCSSFontFaceRule();
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkCSSImportRule extends BlinkCSSRule {
   static final instance = new BlinkCSSImportRule();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
-  styleSheet_Getter_(mthis) => mthis["styleSheet"];
+  styleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheet");
 
 }
 
 class BlinkCSSKeyframeRule extends BlinkCSSRule {
   static final instance = new BlinkCSSKeyframeRule();
 
-  keyText_Getter_(mthis) => mthis["keyText"];
+  keyText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyText");
 
   keyText_Setter_(mthis, __arg_0) => mthis["keyText"] = __arg_0;
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkCSSKeyframesRule extends BlinkCSSRule {
   static final instance = new BlinkCSSKeyframesRule();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  cssRules_Getter_(mthis) => mthis["cssRules"];
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
 
-  deleteRule_Callback_0_(mthis) => mthis.callMethod("deleteRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
 
-  findRule_Callback_0_(mthis) => mthis.callMethod("findRule", []);
+  findRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "findRule", []);
 
-  findRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("findRule", [__arg_0]);
+  findRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "findRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => mthis.callMethod("insertRule", []);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRule", [__arg_0]);
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
@@ -1397,195 +1398,195 @@
 class BlinkCSSMediaRule extends BlinkCSSRule {
   static final instance = new BlinkCSSMediaRule();
 
-  cssRules_Getter_(mthis) => mthis["cssRules"];
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
 
-  deleteRule_Callback_0_(mthis) => mthis.callMethod("deleteRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => mthis.callMethod("insertRule", []);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRule", [__arg_0]);
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
 
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertRule", [__arg_0, __arg_1]);
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
 }
 
 class BlinkCSSPageRule extends BlinkCSSRule {
   static final instance = new BlinkCSSPageRule();
 
-  selectorText_Getter_(mthis) => mthis["selectorText"];
+  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectorText");
 
   selectorText_Setter_(mthis, __arg_0) => mthis["selectorText"] = __arg_0;
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkCSSPrimitiveValue extends BlinkCSSValue {
   static final instance = new BlinkCSSPrimitiveValue();
 
-  getCounterValue_Callback_0_(mthis) => mthis.callMethod("getCounterValue", []);
+  getCounterValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCounterValue", []);
 
-  getFloatValue_Callback_0_(mthis) => mthis.callMethod("getFloatValue", []);
+  getFloatValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFloatValue", []);
 
-  getFloatValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFloatValue", [__arg_0]);
+  getFloatValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFloatValue", [__arg_0]);
 
-  getRGBColorValue_Callback_0_(mthis) => mthis.callMethod("getRGBColorValue", []);
+  getRGBColorValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRGBColorValue", []);
 
-  getRectValue_Callback_0_(mthis) => mthis.callMethod("getRectValue", []);
+  getRectValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRectValue", []);
 
-  getStringValue_Callback_0_(mthis) => mthis.callMethod("getStringValue", []);
+  getStringValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStringValue", []);
 
-  primitiveType_Getter_(mthis) => mthis["primitiveType"];
+  primitiveType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primitiveType");
 
-  setFloatValue_Callback_0_(mthis) => mthis.callMethod("setFloatValue", []);
+  setFloatValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", []);
 
-  setFloatValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("setFloatValue", [__arg_0]);
+  setFloatValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", [__arg_0]);
 
-  setFloatValue_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setFloatValue", [__arg_0, __arg_1]);
+  setFloatValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setFloatValue", [__arg_0, __arg_1]);
 
-  setStringValue_Callback_0_(mthis) => mthis.callMethod("setStringValue", []);
+  setStringValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", []);
 
-  setStringValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStringValue", [__arg_0]);
+  setStringValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", [__arg_0]);
 
-  setStringValue_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setStringValue", [__arg_0, __arg_1]);
+  setStringValue_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStringValue", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCSSRule {
   static final instance = new BlinkCSSRule();
 
-  cssText_Getter_(mthis) => mthis["cssText"];
+  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
 
   cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
 
-  parentRule_Getter_(mthis) => mthis["parentRule"];
+  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentRule");
 
-  parentStyleSheet_Getter_(mthis) => mthis["parentStyleSheet"];
+  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentStyleSheet");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkCSSRuleList {
   static final instance = new BlinkCSSRuleList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkCSSStyleDeclaration {
   static final instance = new BlinkCSSStyleDeclaration();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
   $__propertyQuery___Callback_1_(mthis, __arg_0) => mthis[__arg_0];
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  cssText_Getter_(mthis) => mthis["cssText"];
+  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
 
   cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
 
-  getPropertyPriority_Callback_0_(mthis) => mthis.callMethod("getPropertyPriority", []);
+  getPropertyPriority_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyPriority", []);
 
-  getPropertyPriority_Callback_1_(mthis, __arg_0) => mthis.callMethod("getPropertyPriority", [__arg_0]);
+  getPropertyPriority_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyPriority", [__arg_0]);
 
-  getPropertyValue_Callback_0_(mthis) => mthis.callMethod("getPropertyValue", []);
+  getPropertyValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyValue", []);
 
-  getPropertyValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("getPropertyValue", [__arg_0]);
+  getPropertyValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPropertyValue", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  parentRule_Getter_(mthis) => mthis["parentRule"];
+  parentRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentRule");
 
-  removeProperty_Callback_0_(mthis) => mthis.callMethod("removeProperty", []);
+  removeProperty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeProperty", []);
 
-  removeProperty_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeProperty", [__arg_0]);
+  removeProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeProperty", [__arg_0]);
 
-  setProperty_Callback_0_(mthis) => mthis.callMethod("setProperty", []);
+  setProperty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", []);
 
-  setProperty_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("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) => mthis.callMethod("setProperty", [__arg_0, __arg_1, __arg_2]);
+  setProperty_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setProperty", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkCSSStyleRule extends BlinkCSSRule {
   static final instance = new BlinkCSSStyleRule();
 
-  selectorText_Getter_(mthis) => mthis["selectorText"];
+  selectorText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectorText");
 
   selectorText_Setter_(mthis, __arg_0) => mthis["selectorText"] = __arg_0;
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkCSSStyleSheet extends BlinkStyleSheet {
   static final instance = new BlinkCSSStyleSheet();
 
-  addRule_Callback_0_(mthis) => mthis.callMethod("addRule", []);
+  addRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRule", []);
 
-  addRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("addRule", [__arg_0]);
+  addRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0]);
 
-  addRule_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addRule", [__arg_0, __arg_1]);
+  addRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0, __arg_1]);
 
-  addRule_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("addRule", [__arg_0, __arg_1, __arg_2]);
+  addRule_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addRule", [__arg_0, __arg_1, __arg_2]);
 
-  cssRules_Getter_(mthis) => mthis["cssRules"];
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
 
-  deleteRule_Callback_0_(mthis) => mthis.callMethod("deleteRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => mthis.callMethod("insertRule", []);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRule", [__arg_0]);
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
 
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertRule", [__arg_0, __arg_1]);
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
 
-  ownerRule_Getter_(mthis) => mthis["ownerRule"];
+  ownerRule_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerRule");
 
-  removeRule_Callback_0_(mthis) => mthis.callMethod("removeRule", []);
+  removeRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRule", []);
 
-  removeRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeRule", [__arg_0]);
+  removeRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRule", [__arg_0]);
 
-  rules_Getter_(mthis) => mthis["rules"];
+  rules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rules");
 
 }
 
 class BlinkCSSSupportsRule extends BlinkCSSRule {
   static final instance = new BlinkCSSSupportsRule();
 
-  conditionText_Getter_(mthis) => mthis["conditionText"];
+  conditionText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "conditionText");
 
-  cssRules_Getter_(mthis) => mthis["cssRules"];
+  cssRules_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssRules");
 
-  deleteRule_Callback_0_(mthis) => mthis.callMethod("deleteRule", []);
+  deleteRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", []);
 
-  deleteRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRule", [__arg_0]);
+  deleteRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRule", [__arg_0]);
 
-  insertRule_Callback_0_(mthis) => mthis.callMethod("insertRule", []);
+  insertRule_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", []);
 
-  insertRule_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRule", [__arg_0]);
+  insertRule_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0]);
 
-  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertRule", [__arg_0, __arg_1]);
+  insertRule_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertRule", [__arg_0, __arg_1]);
 
 }
 
@@ -1597,108 +1598,108 @@
 class BlinkCSSValue {
   static final instance = new BlinkCSSValue();
 
-  cssText_Getter_(mthis) => mthis["cssText"];
+  cssText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssText");
 
   cssText_Setter_(mthis, __arg_0) => mthis["cssText"] = __arg_0;
 
-  cssValueType_Getter_(mthis) => mthis["cssValueType"];
+  cssValueType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cssValueType");
 
 }
 
 class BlinkCSSValueList extends BlinkCSSValue {
   static final instance = new BlinkCSSValueList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkCSSViewportRule extends BlinkCSSRule {
   static final instance = new BlinkCSSViewportRule();
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkCache {
   static final instance = new BlinkCache();
 
-  addAll_Callback_0_(mthis) => mthis.callMethod("addAll", []);
+  addAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addAll", []);
 
-  addAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("addAll", [__arg_0]);
+  addAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addAll", [__arg_0]);
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => mthis.callMethod("delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
 
-  delete_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("delete", [__arg_0, __arg_1]);
+  delete_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0, __arg_1]);
 
-  keys_Callback_0_(mthis) => mthis.callMethod("keys", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
 
-  keys_Callback_1_(mthis, __arg_0) => mthis.callMethod("keys", [__arg_0]);
+  keys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "keys", [__arg_0]);
 
-  keys_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("keys", [__arg_0, __arg_1]);
+  keys_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "keys", [__arg_0, __arg_1]);
 
-  matchAll_Callback_0_(mthis) => mthis.callMethod("matchAll", []);
+  matchAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", []);
 
-  matchAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("matchAll", [__arg_0]);
+  matchAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", [__arg_0]);
 
-  matchAll_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("matchAll", [__arg_0, __arg_1]);
+  matchAll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "matchAll", [__arg_0, __arg_1]);
 
-  match_Callback_0_(mthis) => mthis.callMethod("match", []);
+  match_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "match", []);
 
-  match_Callback_1_(mthis, __arg_0) => mthis.callMethod("match", [__arg_0]);
+  match_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "match", [__arg_0]);
 
-  match_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("match", [__arg_0, __arg_1]);
+  match_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "match", [__arg_0, __arg_1]);
 
-  put_Callback_0_(mthis) => mthis.callMethod("put", []);
+  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "put", []);
 
-  put_Callback_1_(mthis, __arg_0) => mthis.callMethod("put", [__arg_0]);
+  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0]);
 
-  put_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("put", [__arg_0, __arg_1]);
+  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCacheStorage {
   static final instance = new BlinkCacheStorage();
 
-  create_Callback_0_(mthis) => mthis.callMethod("create", []);
+  create_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "create", []);
 
-  create_Callback_1_(mthis, __arg_0) => mthis.callMethod("create", [__arg_0]);
+  create_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "create", [__arg_0]);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => mthis.callMethod("delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  has_Callback_0_(mthis) => mthis.callMethod("has", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
 
-  has_Callback_1_(mthis, __arg_0) => mthis.callMethod("has", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
 
-  keys_Callback_0_(mthis) => mthis.callMethod("keys", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
 
 }
 
 class BlinkCanvas2DContextAttributes {
   static final instance = new BlinkCanvas2DContextAttributes();
 
-  alpha_Getter_(mthis) => mthis["alpha"];
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
 
   alpha_Setter_(mthis, __arg_0) => mthis["alpha"] = __arg_0;
 
-  storage_Getter_(mthis) => mthis["storage"];
+  storage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storage");
 
   storage_Setter_(mthis, __arg_0) => mthis["storage"] = __arg_0;
 
@@ -1707,353 +1708,353 @@
 class BlinkCanvasGradient {
   static final instance = new BlinkCanvasGradient();
 
-  addColorStop_Callback_0_(mthis) => mthis.callMethod("addColorStop", []);
+  addColorStop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", []);
 
-  addColorStop_Callback_1_(mthis, __arg_0) => mthis.callMethod("addColorStop", [__arg_0]);
+  addColorStop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", [__arg_0]);
 
-  addColorStop_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addColorStop", [__arg_0, __arg_1]);
+  addColorStop_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addColorStop", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCanvasPattern {
   static final instance = new BlinkCanvasPattern();
 
-  setTransform_Callback_0_(mthis) => mthis.callMethod("setTransform", []);
+  setTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", []);
 
-  setTransform_Callback_1_(mthis, __arg_0) => mthis.callMethod("setTransform", [__arg_0]);
+  setTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTransform", [__arg_0]);
 
 }
 
 class BlinkCanvasRenderingContext2D {
   static final instance = new BlinkCanvasRenderingContext2D();
 
-  addHitRegion_Callback_0_(mthis) => mthis.callMethod("addHitRegion", []);
+  addHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addHitRegion", []);
 
-  addHitRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("addHitRegion", [__arg_0]);
+  addHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addHitRegion", [__arg_0]);
 
-  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2]);
+  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2]);
 
-  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2]);
+  arc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2]);
 
-  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  beginPath_Callback_0_(mthis) => mthis.callMethod("beginPath", []);
+  beginPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginPath", []);
 
-  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("bezierCurveTo", [__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]);
 
-  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("bezierCurveTo", [__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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  canvas_Getter_(mthis) => mthis["canvas"];
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canvas");
 
-  clearHitRegions_Callback_0_(mthis) => mthis.callMethod("clearHitRegions", []);
+  clearHitRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearHitRegions", []);
 
-  clearRect_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("clearRect", [__arg_0, __arg_1]);
+  clearRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clearRect", [__arg_0, __arg_1]);
 
-  clearRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("clearRect", [__arg_0, __arg_1, __arg_2]);
+  clearRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "clearRect", [__arg_0, __arg_1, __arg_2]);
 
-  clearRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("clearRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  clip_Callback_0_(mthis) => mthis.callMethod("clip", []);
+  clip_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clip", []);
 
-  clip_Callback_1_(mthis, __arg_0) => mthis.callMethod("clip", [__arg_0]);
+  clip_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clip", [__arg_0]);
 
-  clip_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("clip", [__arg_0, __arg_1]);
+  clip_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clip", [__arg_0, __arg_1]);
 
-  closePath_Callback_0_(mthis) => mthis.callMethod("closePath", []);
+  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePath", []);
 
-  createImageData_Callback_0_(mthis) => mthis.callMethod("createImageData", []);
+  createImageData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", []);
 
-  createImageData_Callback_1_(mthis, __arg_0) => mthis.callMethod("createImageData", [__arg_0]);
+  createImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", [__arg_0]);
 
-  createImageData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createImageData", [__arg_0, __arg_1]);
+  createImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createImageData", [__arg_0, __arg_1]);
 
-  createLinearGradient_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createLinearGradient", [__arg_0, __arg_1]);
+  createLinearGradient_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createLinearGradient", [__arg_0, __arg_1]);
 
-  createLinearGradient_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createLinearGradient", [__arg_0, __arg_1, __arg_2]);
+  createLinearGradient_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createLinearGradient", [__arg_0, __arg_1, __arg_2]);
 
-  createLinearGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createLinearGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createPattern_Callback_0_(mthis) => mthis.callMethod("createPattern", []);
+  createPattern_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", []);
 
-  createPattern_Callback_1_(mthis, __arg_0) => mthis.callMethod("createPattern", [__arg_0]);
+  createPattern_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", [__arg_0]);
 
-  createPattern_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createPattern", [__arg_0, __arg_1]);
+  createPattern_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createPattern", [__arg_0, __arg_1]);
 
-  createRadialGradient_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createRadialGradient_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  createRadialGradient_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createRadialGradient", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  currentTransform_Getter_(mthis) => mthis["currentTransform"];
+  currentTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTransform");
 
   currentTransform_Setter_(mthis, __arg_0) => mthis["currentTransform"] = __arg_0;
 
-  direction_Getter_(mthis) => mthis["direction"];
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
 
   direction_Setter_(mthis, __arg_0) => mthis["direction"] = __arg_0;
 
-  drawFocusIfNeeded_Callback_0_(mthis) => mthis.callMethod("drawFocusIfNeeded", []);
+  drawFocusIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", []);
 
-  drawFocusIfNeeded_Callback_1_(mthis, __arg_0) => mthis.callMethod("drawFocusIfNeeded", [__arg_0]);
+  drawFocusIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", [__arg_0]);
 
-  drawFocusIfNeeded_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("drawFocusIfNeeded", [__arg_0, __arg_1]);
+  drawFocusIfNeeded_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawFocusIfNeeded", [__arg_0, __arg_1]);
 
-  drawImage_Callback_1_(mthis, __arg_0) => mthis.callMethod("drawImage", [__arg_0]);
+  drawImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0]);
 
-  drawImage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("drawImage", [__arg_0, __arg_1]);
+  drawImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1]);
 
-  drawImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2]);
+  drawImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawImage", [__arg_0, __arg_1, __arg_2]);
 
-  drawImage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  drawImage_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  drawImage_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  drawImage_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  drawImage_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("drawImage", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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]);
 
-  ellipse_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  fillRect_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("fillRect", [__arg_0, __arg_1]);
+  fillRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fillRect", [__arg_0, __arg_1]);
 
-  fillRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("fillRect", [__arg_0, __arg_1, __arg_2]);
+  fillRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "fillRect", [__arg_0, __arg_1, __arg_2]);
 
-  fillRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("fillRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  fillStyle_Getter_(mthis) => mthis["fillStyle"];
+  fillStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fillStyle");
 
   fillStyle_Setter_(mthis, __arg_0) => mthis["fillStyle"] = __arg_0;
 
-  fillText_Callback_1_(mthis, __arg_0) => mthis.callMethod("fillText", [__arg_0]);
+  fillText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0]);
 
-  fillText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("fillText", [__arg_0, __arg_1]);
+  fillText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0, __arg_1]);
 
-  fillText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("fillText", [__arg_0, __arg_1, __arg_2]);
+  fillText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "fillText", [__arg_0, __arg_1, __arg_2]);
 
-  fillText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("fillText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  fill_Callback_0_(mthis) => mthis.callMethod("fill", []);
+  fill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "fill", []);
 
-  fill_Callback_1_(mthis, __arg_0) => mthis.callMethod("fill", [__arg_0]);
+  fill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fill", [__arg_0]);
 
-  fill_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("fill", [__arg_0, __arg_1]);
+  fill_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fill", [__arg_0, __arg_1]);
 
-  font_Getter_(mthis) => mthis["font"];
+  font_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "font");
 
   font_Setter_(mthis, __arg_0) => mthis["font"] = __arg_0;
 
-  getContextAttributes_Callback_0_(mthis) => mthis.callMethod("getContextAttributes", []);
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContextAttributes", []);
 
-  getImageData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getImageData", [__arg_0, __arg_1]);
+  getImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getImageData", [__arg_0, __arg_1]);
 
-  getImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getImageData", [__arg_0, __arg_1, __arg_2]);
+  getImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getImageData", [__arg_0, __arg_1, __arg_2]);
 
-  getImageData_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("getImageData", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  getLineDash_Callback_0_(mthis) => mthis.callMethod("getLineDash", []);
+  getLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getLineDash", []);
 
-  globalAlpha_Getter_(mthis) => mthis["globalAlpha"];
+  globalAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "globalAlpha");
 
   globalAlpha_Setter_(mthis, __arg_0) => mthis["globalAlpha"] = __arg_0;
 
-  globalCompositeOperation_Getter_(mthis) => mthis["globalCompositeOperation"];
+  globalCompositeOperation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "globalCompositeOperation");
 
   globalCompositeOperation_Setter_(mthis, __arg_0) => mthis["globalCompositeOperation"] = __arg_0;
 
-  imageSmoothingEnabled_Getter_(mthis) => mthis["imageSmoothingEnabled"];
+  imageSmoothingEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "imageSmoothingEnabled");
 
   imageSmoothingEnabled_Setter_(mthis, __arg_0) => mthis["imageSmoothingEnabled"] = __arg_0;
 
-  isContextLost_Callback_0_(mthis) => mthis.callMethod("isContextLost", []);
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isContextLost", []);
 
-  isPointInPath_Callback_0_(mthis) => mthis.callMethod("isPointInPath", []);
+  isPointInPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", []);
 
-  isPointInPath_Callback_1_(mthis, __arg_0) => mthis.callMethod("isPointInPath", [__arg_0]);
+  isPointInPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0]);
 
-  isPointInPath_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("isPointInPath", [__arg_0, __arg_1]);
+  isPointInPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInPath", [__arg_0, __arg_1]);
 
-  isPointInPath_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("isPointInPath", [__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]);
 
-  isPointInPath_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("isPointInPath", [__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]);
 
-  isPointInStroke_Callback_0_(mthis) => mthis.callMethod("isPointInStroke", []);
+  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", []);
 
-  isPointInStroke_Callback_1_(mthis, __arg_0) => mthis.callMethod("isPointInStroke", [__arg_0]);
+  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0]);
 
-  isPointInStroke_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("isPointInStroke", [__arg_0, __arg_1]);
+  isPointInStroke_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0, __arg_1]);
 
-  isPointInStroke_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("isPointInStroke", [__arg_0, __arg_1, __arg_2]);
+  isPointInStroke_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0, __arg_1, __arg_2]);
 
-  lineCap_Getter_(mthis) => mthis["lineCap"];
+  lineCap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineCap");
 
   lineCap_Setter_(mthis, __arg_0) => mthis["lineCap"] = __arg_0;
 
-  lineDashOffset_Getter_(mthis) => mthis["lineDashOffset"];
+  lineDashOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineDashOffset");
 
   lineDashOffset_Setter_(mthis, __arg_0) => mthis["lineDashOffset"] = __arg_0;
 
-  lineJoin_Getter_(mthis) => mthis["lineJoin"];
+  lineJoin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineJoin");
 
   lineJoin_Setter_(mthis, __arg_0) => mthis["lineJoin"] = __arg_0;
 
-  lineTo_Callback_0_(mthis) => mthis.callMethod("lineTo", []);
+  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", []);
 
-  lineTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("lineTo", [__arg_0]);
+  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0]);
 
-  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("lineTo", [__arg_0, __arg_1]);
+  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0, __arg_1]);
 
-  lineWidth_Getter_(mthis) => mthis["lineWidth"];
+  lineWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineWidth");
 
   lineWidth_Setter_(mthis, __arg_0) => mthis["lineWidth"] = __arg_0;
 
-  measureText_Callback_0_(mthis) => mthis.callMethod("measureText", []);
+  measureText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "measureText", []);
 
-  measureText_Callback_1_(mthis, __arg_0) => mthis.callMethod("measureText", [__arg_0]);
+  measureText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "measureText", [__arg_0]);
 
-  miterLimit_Getter_(mthis) => mthis["miterLimit"];
+  miterLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "miterLimit");
 
   miterLimit_Setter_(mthis, __arg_0) => mthis["miterLimit"] = __arg_0;
 
-  moveTo_Callback_0_(mthis) => mthis.callMethod("moveTo", []);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveTo", [__arg_0]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
 
-  putImageData_Callback_1_(mthis, __arg_0) => mthis.callMethod("putImageData", [__arg_0]);
+  putImageData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0]);
 
-  putImageData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("putImageData", [__arg_0, __arg_1]);
+  putImageData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1]);
 
-  putImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("putImageData", [__arg_0, __arg_1, __arg_2]);
+  putImageData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "putImageData", [__arg_0, __arg_1, __arg_2]);
 
-  putImageData_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  putImageData_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  putImageData_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("putImageData", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1]);
+  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1]);
 
-  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
+  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
 
-  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("rect", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("rect", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("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, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  removeHitRegion_Callback_0_(mthis) => mthis.callMethod("removeHitRegion", []);
+  removeHitRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeHitRegion", []);
 
-  removeHitRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeHitRegion", [__arg_0]);
+  removeHitRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeHitRegion", [__arg_0]);
 
-  resetTransform_Callback_0_(mthis) => mthis.callMethod("resetTransform", []);
+  resetTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resetTransform", []);
 
-  restore_Callback_0_(mthis) => mthis.callMethod("restore", []);
+  restore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restore", []);
 
-  rotate_Callback_0_(mthis) => mthis.callMethod("rotate", []);
+  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
 
-  rotate_Callback_1_(mthis, __arg_0) => mthis.callMethod("rotate", [__arg_0]);
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
 
-  save_Callback_0_(mthis) => mthis.callMethod("save", []);
+  save_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "save", []);
 
-  scale_Callback_0_(mthis) => mthis.callMethod("scale", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
 
-  scale_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
 
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scale", [__arg_0, __arg_1]);
+  scale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1]);
 
-  scrollPathIntoView_Callback_0_(mthis) => mthis.callMethod("scrollPathIntoView", []);
+  scrollPathIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollPathIntoView", []);
 
-  scrollPathIntoView_Callback_1_(mthis, __arg_0) => mthis.callMethod("scrollPathIntoView", [__arg_0]);
+  scrollPathIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollPathIntoView", [__arg_0]);
 
-  setLineDash_Callback_0_(mthis) => mthis.callMethod("setLineDash", []);
+  setLineDash_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setLineDash", []);
 
-  setLineDash_Callback_1_(mthis, __arg_0) => mthis.callMethod("setLineDash", [__arg_0]);
+  setLineDash_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setLineDash", [__arg_0]);
 
-  setTransform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("setTransform", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  setTransform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  setTransform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("setTransform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  shadowBlur_Getter_(mthis) => mthis["shadowBlur"];
+  shadowBlur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowBlur");
 
   shadowBlur_Setter_(mthis, __arg_0) => mthis["shadowBlur"] = __arg_0;
 
-  shadowColor_Getter_(mthis) => mthis["shadowColor"];
+  shadowColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowColor");
 
   shadowColor_Setter_(mthis, __arg_0) => mthis["shadowColor"] = __arg_0;
 
-  shadowOffsetX_Getter_(mthis) => mthis["shadowOffsetX"];
+  shadowOffsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowOffsetX");
 
   shadowOffsetX_Setter_(mthis, __arg_0) => mthis["shadowOffsetX"] = __arg_0;
 
-  shadowOffsetY_Getter_(mthis) => mthis["shadowOffsetY"];
+  shadowOffsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowOffsetY");
 
   shadowOffsetY_Setter_(mthis, __arg_0) => mthis["shadowOffsetY"] = __arg_0;
 
-  strokeRect_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("strokeRect", [__arg_0, __arg_1]);
+  strokeRect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "strokeRect", [__arg_0, __arg_1]);
 
-  strokeRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("strokeRect", [__arg_0, __arg_1, __arg_2]);
+  strokeRect_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "strokeRect", [__arg_0, __arg_1, __arg_2]);
 
-  strokeRect_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("strokeRect", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  strokeStyle_Getter_(mthis) => mthis["strokeStyle"];
+  strokeStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "strokeStyle");
 
   strokeStyle_Setter_(mthis, __arg_0) => mthis["strokeStyle"] = __arg_0;
 
-  strokeText_Callback_1_(mthis, __arg_0) => mthis.callMethod("strokeText", [__arg_0]);
+  strokeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0]);
 
-  strokeText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("strokeText", [__arg_0, __arg_1]);
+  strokeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0, __arg_1]);
 
-  strokeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("strokeText", [__arg_0, __arg_1, __arg_2]);
+  strokeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "strokeText", [__arg_0, __arg_1, __arg_2]);
 
-  strokeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("strokeText", [__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, "strokeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  stroke_Callback_0_(mthis) => mthis.callMethod("stroke", []);
+  stroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stroke", []);
 
-  stroke_Callback_1_(mthis, __arg_0) => mthis.callMethod("stroke", [__arg_0]);
+  stroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stroke", [__arg_0]);
 
-  textAlign_Getter_(mthis) => mthis["textAlign"];
+  textAlign_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textAlign");
 
   textAlign_Setter_(mthis, __arg_0) => mthis["textAlign"] = __arg_0;
 
-  textBaseline_Getter_(mthis) => mthis["textBaseline"];
+  textBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textBaseline");
 
   textBaseline_Setter_(mthis, __arg_0) => mthis["textBaseline"] = __arg_0;
 
-  transform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("transform", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  transform_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  transform_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("transform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  translate_Callback_0_(mthis) => mthis.callMethod("translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => mthis.callMethod("translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
 
 }
 
@@ -2070,250 +2071,250 @@
 class BlinkCharacterData extends BlinkNode {
   static final instance = new BlinkCharacterData();
 
-  appendData_Callback_0_(mthis) => mthis.callMethod("appendData", []);
+  appendData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendData", []);
 
-  appendData_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendData", [__arg_0]);
+  appendData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendData", [__arg_0]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
   data_Setter_(mthis, __arg_0) => mthis["data"] = __arg_0;
 
-  deleteData_Callback_0_(mthis) => mthis.callMethod("deleteData", []);
+  deleteData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", []);
 
-  deleteData_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteData", [__arg_0]);
+  deleteData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", [__arg_0]);
 
-  deleteData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("deleteData", [__arg_0, __arg_1]);
+  deleteData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "deleteData", [__arg_0, __arg_1]);
 
-  insertData_Callback_0_(mthis) => mthis.callMethod("insertData", []);
+  insertData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertData", []);
 
-  insertData_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertData", [__arg_0]);
+  insertData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertData", [__arg_0]);
 
-  insertData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertData", [__arg_0, __arg_1]);
+  insertData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertData", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  nextElementSibling_Getter_(mthis) => mthis["nextElementSibling"];
+  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextElementSibling");
 
-  previousElementSibling_Getter_(mthis) => mthis["previousElementSibling"];
+  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousElementSibling");
 
-  replaceData_Callback_1_(mthis, __arg_0) => mthis.callMethod("replaceData", [__arg_0]);
+  replaceData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0]);
 
-  replaceData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("replaceData", [__arg_0, __arg_1]);
+  replaceData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0, __arg_1]);
 
-  replaceData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("replaceData", [__arg_0, __arg_1, __arg_2]);
+  replaceData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "replaceData", [__arg_0, __arg_1, __arg_2]);
 
-  substringData_Callback_0_(mthis) => mthis.callMethod("substringData", []);
+  substringData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "substringData", []);
 
-  substringData_Callback_1_(mthis, __arg_0) => mthis.callMethod("substringData", [__arg_0]);
+  substringData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "substringData", [__arg_0]);
 
-  substringData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("substringData", [__arg_0, __arg_1]);
+  substringData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "substringData", [__arg_0, __arg_1]);
 
 }
 
 class BlinkCircularGeofencingRegion extends BlinkGeofencingRegion {
   static final instance = new BlinkCircularGeofencingRegion();
 
-  constructorCallback_0_() => new js.JsObject(js.context["CircularGeofencingRegion"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CircularGeofencingRegion"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["CircularGeofencingRegion"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CircularGeofencingRegion"), [__arg_0]);
 
-  latitude_Getter_(mthis) => mthis["latitude"];
+  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "latitude");
 
-  longitude_Getter_(mthis) => mthis["longitude"];
+  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "longitude");
 
-  radius_Getter_(mthis) => mthis["radius"];
+  radius_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radius");
 
 }
 
 class BlinkClientRect {
   static final instance = new BlinkClientRect();
 
-  bottom_Getter_(mthis) => mthis["bottom"];
+  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  left_Getter_(mthis) => mthis["left"];
+  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
 
-  right_Getter_(mthis) => mthis["right"];
+  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
 
-  top_Getter_(mthis) => mthis["top"];
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
 }
 
 class BlinkClientRectList {
   static final instance = new BlinkClientRectList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkCloseEvent extends BlinkEvent {
   static final instance = new BlinkCloseEvent();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["CloseEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CloseEvent"), [__arg_0, __arg_1]);
 
-  reason_Getter_(mthis) => mthis["reason"];
+  reason_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reason");
 
-  wasClean_Getter_(mthis) => mthis["wasClean"];
+  wasClean_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wasClean");
 
 }
 
 class BlinkComment extends BlinkCharacterData {
   static final instance = new BlinkComment();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Comment"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Comment"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Comment"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Comment"), [__arg_0]);
 
 }
 
 class BlinkCompositionEvent extends BlinkUIEvent {
   static final instance = new BlinkCompositionEvent();
 
-  activeSegmentEnd_Getter_(mthis) => mthis["activeSegmentEnd"];
+  activeSegmentEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSegmentEnd");
 
-  activeSegmentStart_Getter_(mthis) => mthis["activeSegmentStart"];
+  activeSegmentStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSegmentStart");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["CompositionEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CompositionEvent"), [__arg_0, __arg_1]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
-  getSegments_Callback_0_(mthis) => mthis.callMethod("getSegments", []);
+  getSegments_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSegments", []);
 
-  initCompositionEvent_Callback_0_(mthis) => mthis.callMethod("initCompositionEvent", []);
+  initCompositionEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", []);
 
-  initCompositionEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initCompositionEvent", [__arg_0]);
+  initCompositionEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0]);
 
-  initCompositionEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initCompositionEvent", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("initCompositionEvent", [__arg_0, __arg_1, __arg_2]);
+  initCompositionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initCompositionEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initCompositionEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initCompositionEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initCompositionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
 }
 
 class BlinkConsole extends BlinkConsoleBase {
   static final instance = new BlinkConsole();
 
-  memory_Getter_(mthis) => mthis["memory"];
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
 
 }
 
 class BlinkConsoleBase {
   static final instance = new BlinkConsoleBase();
 
-  assert_Callback_0_(mthis) => mthis.callMethod("assert", []);
+  assert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "assert", []);
 
-  assert_Callback_1_(mthis, __arg_0) => mthis.callMethod("assert", [__arg_0]);
+  assert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "assert", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  clear_Callback_1_(mthis, __arg_0) => mthis.callMethod("clear", [__arg_0]);
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clear", [__arg_0]);
 
-  count_Callback_0_(mthis) => mthis.callMethod("count", []);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
 
-  count_Callback_1_(mthis, __arg_0) => mthis.callMethod("count", [__arg_0]);
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
 
-  debug_Callback_0_(mthis) => mthis.callMethod("debug", []);
+  debug_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "debug", []);
 
-  debug_Callback_1_(mthis, __arg_0) => mthis.callMethod("debug", [__arg_0]);
+  debug_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "debug", [__arg_0]);
 
-  dir_Callback_0_(mthis) => mthis.callMethod("dir", []);
+  dir_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dir", []);
 
-  dir_Callback_1_(mthis, __arg_0) => mthis.callMethod("dir", [__arg_0]);
+  dir_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dir", [__arg_0]);
 
-  dirxml_Callback_0_(mthis) => mthis.callMethod("dirxml", []);
+  dirxml_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dirxml", []);
 
-  dirxml_Callback_1_(mthis, __arg_0) => mthis.callMethod("dirxml", [__arg_0]);
+  dirxml_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dirxml", [__arg_0]);
 
-  error_Callback_0_(mthis) => mthis.callMethod("error", []);
+  error_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "error", []);
 
-  error_Callback_1_(mthis, __arg_0) => mthis.callMethod("error", [__arg_0]);
+  error_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "error", [__arg_0]);
 
-  groupCollapsed_Callback_0_(mthis) => mthis.callMethod("groupCollapsed", []);
+  groupCollapsed_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "groupCollapsed", []);
 
-  groupCollapsed_Callback_1_(mthis, __arg_0) => mthis.callMethod("groupCollapsed", [__arg_0]);
+  groupCollapsed_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "groupCollapsed", [__arg_0]);
 
-  groupEnd_Callback_0_(mthis) => mthis.callMethod("groupEnd", []);
+  groupEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "groupEnd", []);
 
-  group_Callback_0_(mthis) => mthis.callMethod("group", []);
+  group_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "group", []);
 
-  group_Callback_1_(mthis, __arg_0) => mthis.callMethod("group", [__arg_0]);
+  group_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "group", [__arg_0]);
 
-  info_Callback_0_(mthis) => mthis.callMethod("info", []);
+  info_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "info", []);
 
-  info_Callback_1_(mthis, __arg_0) => mthis.callMethod("info", [__arg_0]);
+  info_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "info", [__arg_0]);
 
-  log_Callback_0_(mthis) => mthis.callMethod("log", []);
+  log_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "log", []);
 
-  log_Callback_1_(mthis, __arg_0) => mthis.callMethod("log", [__arg_0]);
+  log_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "log", [__arg_0]);
 
-  markTimeline_Callback_0_(mthis) => mthis.callMethod("markTimeline", []);
+  markTimeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "markTimeline", []);
 
-  markTimeline_Callback_1_(mthis, __arg_0) => mthis.callMethod("markTimeline", [__arg_0]);
+  markTimeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "markTimeline", [__arg_0]);
 
-  profileEnd_Callback_0_(mthis) => mthis.callMethod("profileEnd", []);
+  profileEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "profileEnd", []);
 
-  profileEnd_Callback_1_(mthis, __arg_0) => mthis.callMethod("profileEnd", [__arg_0]);
+  profileEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "profileEnd", [__arg_0]);
 
-  profile_Callback_0_(mthis) => mthis.callMethod("profile", []);
+  profile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "profile", []);
 
-  profile_Callback_1_(mthis, __arg_0) => mthis.callMethod("profile", [__arg_0]);
+  profile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "profile", [__arg_0]);
 
-  table_Callback_0_(mthis) => mthis.callMethod("table", []);
+  table_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "table", []);
 
-  table_Callback_1_(mthis, __arg_0) => mthis.callMethod("table", [__arg_0]);
+  table_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "table", [__arg_0]);
 
-  timeEnd_Callback_0_(mthis) => mthis.callMethod("timeEnd", []);
+  timeEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeEnd", []);
 
-  timeEnd_Callback_1_(mthis, __arg_0) => mthis.callMethod("timeEnd", [__arg_0]);
+  timeEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeEnd", [__arg_0]);
 
-  timeStamp_Callback_0_(mthis) => mthis.callMethod("timeStamp", []);
+  timeStamp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeStamp", []);
 
-  timeStamp_Callback_1_(mthis, __arg_0) => mthis.callMethod("timeStamp", [__arg_0]);
+  timeStamp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeStamp", [__arg_0]);
 
-  time_Callback_0_(mthis) => mthis.callMethod("time", []);
+  time_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "time", []);
 
-  time_Callback_1_(mthis, __arg_0) => mthis.callMethod("time", [__arg_0]);
+  time_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "time", [__arg_0]);
 
-  timelineEnd_Callback_0_(mthis) => mthis.callMethod("timelineEnd", []);
+  timelineEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timelineEnd", []);
 
-  timelineEnd_Callback_1_(mthis, __arg_0) => mthis.callMethod("timelineEnd", [__arg_0]);
+  timelineEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timelineEnd", [__arg_0]);
 
-  timeline_Callback_0_(mthis) => mthis.callMethod("timeline", []);
+  timeline_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "timeline", []);
 
-  timeline_Callback_1_(mthis, __arg_0) => mthis.callMethod("timeline", [__arg_0]);
+  timeline_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "timeline", [__arg_0]);
 
-  trace_Callback_0_(mthis) => mthis.callMethod("trace", []);
+  trace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "trace", []);
 
-  trace_Callback_1_(mthis, __arg_0) => mthis.callMethod("trace", [__arg_0]);
+  trace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "trace", [__arg_0]);
 
-  warn_Callback_0_(mthis) => mthis.callMethod("warn", []);
+  warn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "warn", []);
 
-  warn_Callback_1_(mthis, __arg_0) => mthis.callMethod("warn", [__arg_0]);
+  warn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "warn", [__arg_0]);
 
 }
 
 class BlinkConvolverNode extends BlinkAudioNode {
   static final instance = new BlinkConvolverNode();
 
-  buffer_Getter_(mthis) => mthis["buffer"];
+  buffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffer");
 
   buffer_Setter_(mthis, __arg_0) => mthis["buffer"] = __arg_0;
 
-  normalize_Getter_(mthis) => mthis["normalize"];
+  normalize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "normalize");
 
   normalize_Setter_(mthis, __arg_0) => mthis["normalize"] = __arg_0;
 
@@ -2322,464 +2323,464 @@
 class BlinkCoordinates {
   static final instance = new BlinkCoordinates();
 
-  accuracy_Getter_(mthis) => mthis["accuracy"];
+  accuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accuracy");
 
-  altitudeAccuracy_Getter_(mthis) => mthis["altitudeAccuracy"];
+  altitudeAccuracy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altitudeAccuracy");
 
-  altitude_Getter_(mthis) => mthis["altitude"];
+  altitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altitude");
 
-  heading_Getter_(mthis) => mthis["heading"];
+  heading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "heading");
 
-  latitude_Getter_(mthis) => mthis["latitude"];
+  latitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "latitude");
 
-  longitude_Getter_(mthis) => mthis["longitude"];
+  longitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "longitude");
 
-  speed_Getter_(mthis) => mthis["speed"];
+  speed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speed");
 
 }
 
 class BlinkCounter {
   static final instance = new BlinkCounter();
 
-  identifier_Getter_(mthis) => mthis["identifier"];
+  identifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "identifier");
 
-  listStyle_Getter_(mthis) => mthis["listStyle"];
+  listStyle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "listStyle");
 
-  separator_Getter_(mthis) => mthis["separator"];
+  separator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "separator");
 
 }
 
 class BlinkCredential {
   static final instance = new BlinkCredential();
 
-  avatarURL_Getter_(mthis) => mthis["avatarURL"];
+  avatarURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "avatarURL");
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
 }
 
 class BlinkCredentialsContainer {
   static final instance = new BlinkCredentialsContainer();
 
-  notifyFailedSignIn_Callback_0_(mthis) => mthis.callMethod("notifyFailedSignIn", []);
+  notifyFailedSignIn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifyFailedSignIn", []);
 
-  notifyFailedSignIn_Callback_1_(mthis, __arg_0) => mthis.callMethod("notifyFailedSignIn", [__arg_0]);
+  notifyFailedSignIn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "notifyFailedSignIn", [__arg_0]);
 
-  notifySignedIn_Callback_0_(mthis) => mthis.callMethod("notifySignedIn", []);
+  notifySignedIn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedIn", []);
 
-  notifySignedIn_Callback_1_(mthis, __arg_0) => mthis.callMethod("notifySignedIn", [__arg_0]);
+  notifySignedIn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedIn", [__arg_0]);
 
-  notifySignedOut_Callback_0_(mthis) => mthis.callMethod("notifySignedOut", []);
+  notifySignedOut_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "notifySignedOut", []);
 
-  request_Callback_0_(mthis) => mthis.callMethod("request", []);
+  request_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "request", []);
 
-  request_Callback_1_(mthis, __arg_0) => mthis.callMethod("request", [__arg_0]);
+  request_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "request", [__arg_0]);
 
 }
 
 class BlinkCrypto {
   static final instance = new BlinkCrypto();
 
-  getRandomValues_Callback_0_(mthis) => mthis.callMethod("getRandomValues", []);
+  getRandomValues_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRandomValues", []);
 
-  getRandomValues_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRandomValues", [__arg_0]);
+  getRandomValues_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRandomValues", [__arg_0]);
 
-  subtle_Getter_(mthis) => mthis["subtle"];
+  subtle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "subtle");
 
 }
 
 class BlinkCryptoKey {
   static final instance = new BlinkCryptoKey();
 
-  algorithm_Getter_(mthis) => mthis["algorithm"];
+  algorithm_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "algorithm");
 
-  extractable_Getter_(mthis) => mthis["extractable"];
+  extractable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extractable");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  usages_Getter_(mthis) => mthis["usages"];
+  usages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usages");
 
 }
 
 class BlinkCustomEvent extends BlinkEvent {
   static final instance = new BlinkCustomEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["CustomEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "CustomEvent"), [__arg_0, __arg_1]);
 
-  detail_Getter_(mthis) => mthis["detail"];
+  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detail");
 
-  initCustomEvent_Callback_0_(mthis) => mthis.callMethod("initCustomEvent", []);
+  initCustomEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", []);
 
-  initCustomEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initCustomEvent", [__arg_0]);
+  initCustomEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0]);
 
-  initCustomEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initCustomEvent", [__arg_0, __arg_1]);
+  initCustomEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0, __arg_1]);
 
-  initCustomEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initCustomEvent", [__arg_0, __arg_1, __arg_2]);
+  initCustomEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initCustomEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initCustomEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "initCustomEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkDOMError {
   static final instance = new BlinkDOMError();
 
-  constructorCallback_0_() => new js.JsObject(js.context["DOMError"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["DOMError"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["DOMError"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMError"), [__arg_0, __arg_1]);
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
 }
 
 class BlinkDOMException {
   static final instance = new BlinkDOMException();
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
 }
 
 class BlinkDOMFileSystem {
   static final instance = new BlinkDOMFileSystem();
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  root_Getter_(mthis) => mthis["root"];
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
 
 }
 
 class BlinkDOMFileSystemSync {
   static final instance = new BlinkDOMFileSystemSync();
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  root_Getter_(mthis) => mthis["root"];
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
 
 }
 
 class BlinkDOMImplementation {
   static final instance = new BlinkDOMImplementation();
 
-  createDocumentType_Callback_1_(mthis, __arg_0) => mthis.callMethod("createDocumentType", [__arg_0]);
+  createDocumentType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0]);
 
-  createDocumentType_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createDocumentType", [__arg_0, __arg_1]);
+  createDocumentType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0, __arg_1]);
 
-  createDocumentType_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createDocumentType", [__arg_0, __arg_1, __arg_2]);
+  createDocumentType_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentType", [__arg_0, __arg_1, __arg_2]);
 
-  createDocument_Callback_0_(mthis) => mthis.callMethod("createDocument", []);
+  createDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", []);
 
-  createDocument_Callback_1_(mthis, __arg_0) => mthis.callMethod("createDocument", [__arg_0]);
+  createDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", [__arg_0]);
 
-  createDocument_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createDocument", [__arg_0, __arg_1]);
+  createDocument_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDocument", [__arg_0, __arg_1]);
 
-  createDocument_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createDocument", [__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) => mthis.callMethod("createHTMLDocument", []);
+  createHTMLDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createHTMLDocument", []);
 
-  createHTMLDocument_Callback_1_(mthis, __arg_0) => mthis.callMethod("createHTMLDocument", [__arg_0]);
+  createHTMLDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createHTMLDocument", [__arg_0]);
 
-  hasFeature_Callback_0_(mthis) => mthis.callMethod("hasFeature", []);
+  hasFeature_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", []);
 
-  hasFeature_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasFeature", [__arg_0]);
+  hasFeature_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", [__arg_0]);
 
-  hasFeature_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("hasFeature", [__arg_0, __arg_1]);
+  hasFeature_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hasFeature", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDOMMatrix extends BlinkDOMMatrixReadOnly {
   static final instance = new BlinkDOMMatrix();
 
-  a_Getter_(mthis) => mthis["a"];
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
 
   a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
 
-  b_Getter_(mthis) => mthis["b"];
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
 
   b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
 
-  c_Getter_(mthis) => mthis["c"];
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
 
   c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
 
-  constructorCallback_0_() => new js.JsObject(js.context["DOMMatrix"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMMatrix"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["DOMMatrix"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMMatrix"), [__arg_0]);
 
-  d_Getter_(mthis) => mthis["d"];
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
 
   d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
 
-  e_Getter_(mthis) => mthis["e"];
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
 
   e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
 
-  f_Getter_(mthis) => mthis["f"];
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
 
   f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
 
-  m11_Getter_(mthis) => mthis["m11"];
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
 
   m11_Setter_(mthis, __arg_0) => mthis["m11"] = __arg_0;
 
-  m12_Getter_(mthis) => mthis["m12"];
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
 
   m12_Setter_(mthis, __arg_0) => mthis["m12"] = __arg_0;
 
-  m13_Getter_(mthis) => mthis["m13"];
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
 
   m13_Setter_(mthis, __arg_0) => mthis["m13"] = __arg_0;
 
-  m14_Getter_(mthis) => mthis["m14"];
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
 
   m14_Setter_(mthis, __arg_0) => mthis["m14"] = __arg_0;
 
-  m21_Getter_(mthis) => mthis["m21"];
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
 
   m21_Setter_(mthis, __arg_0) => mthis["m21"] = __arg_0;
 
-  m22_Getter_(mthis) => mthis["m22"];
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
 
   m22_Setter_(mthis, __arg_0) => mthis["m22"] = __arg_0;
 
-  m23_Getter_(mthis) => mthis["m23"];
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
 
   m23_Setter_(mthis, __arg_0) => mthis["m23"] = __arg_0;
 
-  m24_Getter_(mthis) => mthis["m24"];
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
 
   m24_Setter_(mthis, __arg_0) => mthis["m24"] = __arg_0;
 
-  m31_Getter_(mthis) => mthis["m31"];
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
 
   m31_Setter_(mthis, __arg_0) => mthis["m31"] = __arg_0;
 
-  m32_Getter_(mthis) => mthis["m32"];
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
 
   m32_Setter_(mthis, __arg_0) => mthis["m32"] = __arg_0;
 
-  m33_Getter_(mthis) => mthis["m33"];
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
 
   m33_Setter_(mthis, __arg_0) => mthis["m33"] = __arg_0;
 
-  m34_Getter_(mthis) => mthis["m34"];
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
 
   m34_Setter_(mthis, __arg_0) => mthis["m34"] = __arg_0;
 
-  m41_Getter_(mthis) => mthis["m41"];
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
 
   m41_Setter_(mthis, __arg_0) => mthis["m41"] = __arg_0;
 
-  m42_Getter_(mthis) => mthis["m42"];
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
 
   m42_Setter_(mthis, __arg_0) => mthis["m42"] = __arg_0;
 
-  m43_Getter_(mthis) => mthis["m43"];
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
 
   m43_Setter_(mthis, __arg_0) => mthis["m43"] = __arg_0;
 
-  m44_Getter_(mthis) => mthis["m44"];
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
 
   m44_Setter_(mthis, __arg_0) => mthis["m44"] = __arg_0;
 
-  multiplySelf_Callback_0_(mthis) => mthis.callMethod("multiplySelf", []);
+  multiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiplySelf", []);
 
-  multiplySelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("multiplySelf", [__arg_0]);
+  multiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiplySelf", [__arg_0]);
 
-  preMultiplySelf_Callback_0_(mthis) => mthis.callMethod("preMultiplySelf", []);
+  preMultiplySelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "preMultiplySelf", []);
 
-  preMultiplySelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("preMultiplySelf", [__arg_0]);
+  preMultiplySelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "preMultiplySelf", [__arg_0]);
 
-  scale3dSelf_Callback_0_(mthis) => mthis.callMethod("scale3dSelf", []);
+  scale3dSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", []);
 
-  scale3dSelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale3dSelf", [__arg_0]);
+  scale3dSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0]);
 
-  scale3dSelf_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scale3dSelf", [__arg_0, __arg_1]);
+  scale3dSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0, __arg_1]);
 
-  scale3dSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scale3dSelf", [__arg_0, __arg_1, __arg_2]);
+  scale3dSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale3dSelf", [__arg_0, __arg_1, __arg_2]);
 
-  scale3dSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "scale3dSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scaleNonUniformSelf_Callback_0_(mthis) => mthis.callMethod("scaleNonUniformSelf", []);
+  scaleNonUniformSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", []);
 
-  scaleNonUniformSelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("scaleNonUniformSelf", [__arg_0]);
+  scaleNonUniformSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0]);
 
-  scaleNonUniformSelf_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scaleNonUniformSelf", [__arg_0, __arg_1]);
+  scaleNonUniformSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1]);
 
-  scaleNonUniformSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2]);
+  scaleNonUniformSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2]);
 
-  scaleNonUniformSelf_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  scaleNonUniformSelf_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("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, "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) => mthis.callMethod("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, "scaleNonUniformSelf", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  scaleSelf_Callback_0_(mthis) => mthis.callMethod("scaleSelf", []);
+  scaleSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", []);
 
-  scaleSelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("scaleSelf", [__arg_0]);
+  scaleSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0]);
 
-  scaleSelf_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scaleSelf", [__arg_0, __arg_1]);
+  scaleSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0, __arg_1]);
 
-  scaleSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scaleSelf", [__arg_0, __arg_1, __arg_2]);
+  scaleSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scaleSelf", [__arg_0, __arg_1, __arg_2]);
 
-  translateSelf_Callback_0_(mthis) => mthis.callMethod("translateSelf", []);
+  translateSelf_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", []);
 
-  translateSelf_Callback_1_(mthis, __arg_0) => mthis.callMethod("translateSelf", [__arg_0]);
+  translateSelf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0]);
 
-  translateSelf_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("translateSelf", [__arg_0, __arg_1]);
+  translateSelf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0, __arg_1]);
 
-  translateSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("translateSelf", [__arg_0, __arg_1, __arg_2]);
+  translateSelf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translateSelf", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDOMMatrixReadOnly {
   static final instance = new BlinkDOMMatrixReadOnly();
 
-  a_Getter_(mthis) => mthis["a"];
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
 
-  b_Getter_(mthis) => mthis["b"];
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
 
-  c_Getter_(mthis) => mthis["c"];
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
 
-  d_Getter_(mthis) => mthis["d"];
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
 
-  e_Getter_(mthis) => mthis["e"];
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
 
-  f_Getter_(mthis) => mthis["f"];
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
 
-  is2D_Getter_(mthis) => mthis["is2D"];
+  is2D_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "is2D");
 
-  isIdentity_Getter_(mthis) => mthis["isIdentity"];
+  isIdentity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isIdentity");
 
-  m11_Getter_(mthis) => mthis["m11"];
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
 
-  m12_Getter_(mthis) => mthis["m12"];
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
 
-  m13_Getter_(mthis) => mthis["m13"];
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
 
-  m14_Getter_(mthis) => mthis["m14"];
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
 
-  m21_Getter_(mthis) => mthis["m21"];
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
 
-  m22_Getter_(mthis) => mthis["m22"];
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
 
-  m23_Getter_(mthis) => mthis["m23"];
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
 
-  m24_Getter_(mthis) => mthis["m24"];
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
 
-  m31_Getter_(mthis) => mthis["m31"];
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
 
-  m32_Getter_(mthis) => mthis["m32"];
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
 
-  m33_Getter_(mthis) => mthis["m33"];
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
 
-  m34_Getter_(mthis) => mthis["m34"];
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
 
-  m41_Getter_(mthis) => mthis["m41"];
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
 
-  m42_Getter_(mthis) => mthis["m42"];
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
 
-  m43_Getter_(mthis) => mthis["m43"];
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
 
-  m44_Getter_(mthis) => mthis["m44"];
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
 
-  multiply_Callback_0_(mthis) => mthis.callMethod("multiply", []);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
 
-  multiply_Callback_1_(mthis, __arg_0) => mthis.callMethod("multiply", [__arg_0]);
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
 
-  scale3d_Callback_0_(mthis) => mthis.callMethod("scale3d", []);
+  scale3d_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", []);
 
-  scale3d_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale3d", [__arg_0]);
+  scale3d_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0]);
 
-  scale3d_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scale3d", [__arg_0, __arg_1]);
+  scale3d_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0, __arg_1]);
 
-  scale3d_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scale3d", [__arg_0, __arg_1, __arg_2]);
+  scale3d_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale3d", [__arg_0, __arg_1, __arg_2]);
 
-  scale3d_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("scale3d", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  scaleNonUniform_Callback_0_(mthis) => mthis.callMethod("scaleNonUniform", []);
+  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", []);
 
-  scaleNonUniform_Callback_1_(mthis, __arg_0) => mthis.callMethod("scaleNonUniform", [__arg_0]);
+  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0]);
 
-  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scaleNonUniform", [__arg_0, __arg_1]);
+  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1]);
 
-  scaleNonUniform_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scaleNonUniform", [__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]);
 
-  scaleNonUniform_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("scaleNonUniform", [__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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("scaleNonUniform", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  scale_Callback_0_(mthis) => mthis.callMethod("scale", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
 
-  scale_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
 
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scale", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("scale", [__arg_0, __arg_1, __arg_2]);
+  scale_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0, __arg_1, __arg_2]);
 
-  toFloat32Array_Callback_0_(mthis) => mthis.callMethod("toFloat32Array", []);
+  toFloat32Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toFloat32Array", []);
 
-  toFloat64Array_Callback_0_(mthis) => mthis.callMethod("toFloat64Array", []);
+  toFloat64Array_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toFloat64Array", []);
 
-  translate_Callback_0_(mthis) => mthis.callMethod("translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => mthis.callMethod("translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
 
-  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("translate", [__arg_0, __arg_1, __arg_2]);
+  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDOMParser {
   static final instance = new BlinkDOMParser();
 
-  constructorCallback_0_() => new js.JsObject(js.context["DOMParser"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMParser"), []);
 
-  parseFromString_Callback_0_(mthis) => mthis.callMethod("parseFromString", []);
+  parseFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", []);
 
-  parseFromString_Callback_1_(mthis, __arg_0) => mthis.callMethod("parseFromString", [__arg_0]);
+  parseFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", [__arg_0]);
 
-  parseFromString_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("parseFromString", [__arg_0, __arg_1]);
+  parseFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "parseFromString", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDOMPoint extends BlinkDOMPointReadOnly {
   static final instance = new BlinkDOMPoint();
 
-  constructorCallback_0_() => new js.JsObject(js.context["DOMPoint"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["DOMPoint"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["DOMPoint"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPoint"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["DOMPoint"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["DOMPoint"], [__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, "DOMPoint"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  w_Getter_(mthis) => mthis["w"];
+  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "w");
 
   w_Setter_(mthis, __arg_0) => mthis["w"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
-  z_Getter_(mthis) => mthis["z"];
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
 
   z_Setter_(mthis, __arg_0) => mthis["z"] = __arg_0;
 
@@ -2788,48 +2789,48 @@
 class BlinkDOMPointReadOnly {
   static final instance = new BlinkDOMPointReadOnly();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["DOMPointReadOnly"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMPointReadOnly"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["DOMPointReadOnly"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["DOMPointReadOnly"], [__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, "DOMPointReadOnly"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  w_Getter_(mthis) => mthis["w"];
+  w_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "w");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
-  z_Getter_(mthis) => mthis["z"];
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
 
 }
 
 class BlinkDOMRect extends BlinkDOMRectReadOnly {
   static final instance = new BlinkDOMRect();
 
-  constructorCallback_0_() => new js.JsObject(js.context["DOMRect"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["DOMRect"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["DOMRect"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DOMRect"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["DOMRect"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["DOMRect"], [__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, "DOMRect"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -2838,36 +2839,36 @@
 class BlinkDOMRectReadOnly {
   static final instance = new BlinkDOMRectReadOnly();
 
-  bottom_Getter_(mthis) => mthis["bottom"];
+  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["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) => new js.JsObject(js.context["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) => new js.JsObject(js.context["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]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  left_Getter_(mthis) => mthis["left"];
+  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
 
-  right_Getter_(mthis) => mthis["right"];
+  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
 
-  top_Getter_(mthis) => mthis["top"];
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkDOMSettableTokenList extends BlinkDOMTokenList {
   static final instance = new BlinkDOMSettableTokenList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -2876,1040 +2877,1040 @@
 class BlinkDOMStringList {
   static final instance = new BlinkDOMStringList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  contains_Callback_0_(mthis) => mthis.callMethod("contains", []);
+  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
 
-  contains_Callback_1_(mthis, __arg_0) => mthis.callMethod("contains", [__arg_0]);
+  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkDOMStringMap {
   static final instance = new BlinkDOMStringMap();
 
-  $__delete___Callback_1_(mthis, __arg_0) => mthis.callMethod("__delete__", [__arg_0]);
+  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__delete__", [__arg_0]);
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDOMTokenList {
   static final instance = new BlinkDOMTokenList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  contains_Callback_0_(mthis) => mthis.callMethod("contains", []);
+  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
 
-  contains_Callback_1_(mthis, __arg_0) => mthis.callMethod("contains", [__arg_0]);
+  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  remove_Callback_1_(mthis, __arg_0) => mthis.callMethod("remove", [__arg_0]);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
 
-  toggle_Callback_0_(mthis) => mthis.callMethod("toggle", []);
+  toggle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toggle", []);
 
-  toggle_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("toggle", [__arg_0, __arg_1]);
+  toggle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "toggle", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDataTransfer {
   static final instance = new BlinkDataTransfer();
 
-  clearData_Callback_0_(mthis) => mthis.callMethod("clearData", []);
+  clearData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearData", []);
 
-  clearData_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearData", [__arg_0]);
+  clearData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearData", [__arg_0]);
 
-  dropEffect_Getter_(mthis) => mthis["dropEffect"];
+  dropEffect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dropEffect");
 
   dropEffect_Setter_(mthis, __arg_0) => mthis["dropEffect"] = __arg_0;
 
-  effectAllowed_Getter_(mthis) => mthis["effectAllowed"];
+  effectAllowed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "effectAllowed");
 
   effectAllowed_Setter_(mthis, __arg_0) => mthis["effectAllowed"] = __arg_0;
 
-  files_Getter_(mthis) => mthis["files"];
+  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "files");
 
-  getData_Callback_0_(mthis) => mthis.callMethod("getData", []);
+  getData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getData", []);
 
-  getData_Callback_1_(mthis, __arg_0) => mthis.callMethod("getData", [__arg_0]);
+  getData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getData", [__arg_0]);
 
-  items_Getter_(mthis) => mthis["items"];
+  items_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "items");
 
-  setData_Callback_0_(mthis) => mthis.callMethod("setData", []);
+  setData_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setData", []);
 
-  setData_Callback_1_(mthis, __arg_0) => mthis.callMethod("setData", [__arg_0]);
+  setData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setData", [__arg_0]);
 
-  setData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setData", [__arg_0, __arg_1]);
+  setData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setData", [__arg_0, __arg_1]);
 
-  setDragImage_Callback_1_(mthis, __arg_0) => mthis.callMethod("setDragImage", [__arg_0]);
+  setDragImage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0]);
 
-  setDragImage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setDragImage", [__arg_0, __arg_1]);
+  setDragImage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0, __arg_1]);
 
-  setDragImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setDragImage", [__arg_0, __arg_1, __arg_2]);
+  setDragImage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setDragImage", [__arg_0, __arg_1, __arg_2]);
 
-  types_Getter_(mthis) => mthis["types"];
+  types_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "types");
 
 }
 
 class BlinkDataTransferItem {
   static final instance = new BlinkDataTransferItem();
 
-  getAsFile_Callback_0_(mthis) => mthis.callMethod("getAsFile", []);
+  getAsFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAsFile", []);
 
-  getAsString_Callback_0_(mthis) => mthis.callMethod("getAsString", []);
+  getAsString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAsString", []);
 
-  getAsString_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAsString", [__arg_0]);
+  getAsString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAsString", [__arg_0]);
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  webkitGetAsEntry_Callback_0_(mthis) => mthis.callMethod("webkitGetAsEntry", []);
+  webkitGetAsEntry_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetAsEntry", []);
 
 }
 
 class BlinkDataTransferItemList {
   static final instance = new BlinkDataTransferItemList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("add", [__arg_0, __arg_1]);
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  remove_Callback_1_(mthis, __arg_0) => mthis.callMethod("remove", [__arg_0]);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
 
 }
 
 class BlinkDatabase {
   static final instance = new BlinkDatabase();
 
-  changeVersion_Callback_0_(mthis) => mthis.callMethod("changeVersion", []);
+  changeVersion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", []);
 
-  changeVersion_Callback_1_(mthis, __arg_0) => mthis.callMethod("changeVersion", [__arg_0]);
+  changeVersion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0]);
 
-  changeVersion_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("changeVersion", [__arg_0, __arg_1]);
+  changeVersion_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1]);
 
-  changeVersion_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("changeVersion", [__arg_0, __arg_1, __arg_2]);
+  changeVersion_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "changeVersion", [__arg_0, __arg_1, __arg_2]);
 
-  changeVersion_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("changeVersion", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  readTransaction_Callback_0_(mthis) => mthis.callMethod("readTransaction", []);
+  readTransaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", []);
 
-  readTransaction_Callback_1_(mthis, __arg_0) => mthis.callMethod("readTransaction", [__arg_0]);
+  readTransaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0]);
 
-  readTransaction_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("readTransaction", [__arg_0, __arg_1]);
+  readTransaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0, __arg_1]);
 
-  readTransaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("readTransaction", [__arg_0, __arg_1, __arg_2]);
+  readTransaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "readTransaction", [__arg_0, __arg_1, __arg_2]);
 
-  transaction_Callback_0_(mthis) => mthis.callMethod("transaction", []);
+  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transaction", []);
 
-  transaction_Callback_1_(mthis, __arg_0) => mthis.callMethod("transaction", [__arg_0]);
+  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0]);
 
-  transaction_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("transaction", [__arg_0, __arg_1]);
+  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1]);
 
-  transaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("transaction", [__arg_0, __arg_1, __arg_2]);
+  transaction_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1, __arg_2]);
 
-  version_Getter_(mthis) => mthis["version"];
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
 
 }
 
 class BlinkDedicatedWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkDedicatedWorkerGlobalScope();
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDelayNode extends BlinkAudioNode {
   static final instance = new BlinkDelayNode();
 
-  delayTime_Getter_(mthis) => mthis["delayTime"];
+  delayTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "delayTime");
 
 }
 
 class BlinkDeprecatedStorageInfo {
   static final instance = new BlinkDeprecatedStorageInfo();
 
-  queryUsageAndQuota_Callback_0_(mthis) => mthis.callMethod("queryUsageAndQuota", []);
+  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", []);
 
-  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryUsageAndQuota", [__arg_0]);
+  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0]);
 
-  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("queryUsageAndQuota", [__arg_0, __arg_1]);
+  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1]);
 
-  queryUsageAndQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("queryUsageAndQuota", [__arg_0, __arg_1, __arg_2]);
+  queryUsageAndQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1, __arg_2]);
 
-  requestQuota_Callback_0_(mthis) => mthis.callMethod("requestQuota", []);
+  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", []);
 
-  requestQuota_Callback_1_(mthis, __arg_0) => mthis.callMethod("requestQuota", [__arg_0]);
+  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0]);
 
-  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("requestQuota", [__arg_0, __arg_1]);
+  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("requestQuota", [__arg_0, __arg_1, __arg_2]);
+  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1, __arg_2]);
 
-  requestQuota_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "requestQuota", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkDeprecatedStorageQuota {
   static final instance = new BlinkDeprecatedStorageQuota();
 
-  queryUsageAndQuota_Callback_0_(mthis) => mthis.callMethod("queryUsageAndQuota", []);
+  queryUsageAndQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", []);
 
-  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryUsageAndQuota", [__arg_0]);
+  queryUsageAndQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0]);
 
-  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("queryUsageAndQuota", [__arg_0, __arg_1]);
+  queryUsageAndQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "queryUsageAndQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_0_(mthis) => mthis.callMethod("requestQuota", []);
+  requestQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", []);
 
-  requestQuota_Callback_1_(mthis, __arg_0) => mthis.callMethod("requestQuota", [__arg_0]);
+  requestQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0]);
 
-  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("requestQuota", [__arg_0, __arg_1]);
+  requestQuota_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1]);
 
-  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("requestQuota", [__arg_0, __arg_1, __arg_2]);
+  requestQuota_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "requestQuota", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkDeviceAcceleration {
   static final instance = new BlinkDeviceAcceleration();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
-  z_Getter_(mthis) => mthis["z"];
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
 
 }
 
 class BlinkDeviceLightEvent extends BlinkEvent {
   static final instance = new BlinkDeviceLightEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["DeviceLightEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DeviceLightEvent"), [__arg_0, __arg_1]);
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
 }
 
 class BlinkDeviceMotionEvent extends BlinkEvent {
   static final instance = new BlinkDeviceMotionEvent();
 
-  accelerationIncludingGravity_Getter_(mthis) => mthis["accelerationIncludingGravity"];
+  accelerationIncludingGravity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accelerationIncludingGravity");
 
-  acceleration_Getter_(mthis) => mthis["acceleration"];
+  acceleration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "acceleration");
 
-  initDeviceMotionEvent_Callback_0_(mthis) => mthis.callMethod("initDeviceMotionEvent", []);
+  initDeviceMotionEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", []);
 
-  initDeviceMotionEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initDeviceMotionEvent", [__arg_0]);
+  initDeviceMotionEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0]);
 
-  initDeviceMotionEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1]);
+  initDeviceMotionEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1]);
 
-  initDeviceMotionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2]);
+  initDeviceMotionEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initDeviceMotionEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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) => mthis.callMethod("initDeviceMotionEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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) => mthis["interval"];
+  interval_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interval");
 
-  rotationRate_Getter_(mthis) => mthis["rotationRate"];
+  rotationRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rotationRate");
 
 }
 
 class BlinkDeviceOrientationEvent extends BlinkEvent {
   static final instance = new BlinkDeviceOrientationEvent();
 
-  absolute_Getter_(mthis) => mthis["absolute"];
+  absolute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "absolute");
 
-  alpha_Getter_(mthis) => mthis["alpha"];
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
 
-  beta_Getter_(mthis) => mthis["beta"];
+  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "beta");
 
-  gamma_Getter_(mthis) => mthis["gamma"];
+  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamma");
 
-  initDeviceOrientationEvent_Callback_0_(mthis) => mthis.callMethod("initDeviceOrientationEvent", []);
+  initDeviceOrientationEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", []);
 
-  initDeviceOrientationEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0]);
+  initDeviceOrientationEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initDeviceOrientationEvent", [__arg_0]);
 
-  initDeviceOrientationEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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) => mthis.callMethod("initDeviceOrientationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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) => mthis.callMethod("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, "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) => mthis["alpha"];
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
 
-  beta_Getter_(mthis) => mthis["beta"];
+  beta_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "beta");
 
-  gamma_Getter_(mthis) => mthis["gamma"];
+  gamma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamma");
 
 }
 
 class BlinkDirectoryEntry extends BlinkEntry {
   static final instance = new BlinkDirectoryEntry();
 
-  createReader_Callback_0_(mthis) => mthis.callMethod("createReader", []);
+  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createReader", []);
 
-  getDirectory_Callback_0_(mthis) => mthis.callMethod("getDirectory", []);
+  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", []);
 
-  getDirectory_Callback_1_(mthis, __arg_0) => mthis.callMethod("getDirectory", [__arg_0]);
+  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0]);
 
-  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getDirectory", [__arg_0, __arg_1]);
+  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1]);
 
-  getDirectory_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getDirectory", [__arg_0, __arg_1, __arg_2]);
+  getDirectory_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1, __arg_2]);
 
-  getDirectory_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "getDirectory", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  getFile_Callback_0_(mthis) => mthis.callMethod("getFile", []);
+  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFile", []);
 
-  getFile_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFile", [__arg_0]);
+  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0]);
 
-  getFile_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getFile", [__arg_0, __arg_1]);
+  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1]);
 
-  getFile_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getFile", [__arg_0, __arg_1, __arg_2]);
+  getFile_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1, __arg_2]);
 
-  getFile_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "getFile", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  removeRecursively_Callback_0_(mthis) => mthis.callMethod("removeRecursively", []);
+  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", []);
 
-  removeRecursively_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeRecursively", [__arg_0]);
+  removeRecursively_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", [__arg_0]);
 
-  removeRecursively_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("removeRecursively", [__arg_0, __arg_1]);
+  removeRecursively_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDirectoryEntrySync extends BlinkEntrySync {
   static final instance = new BlinkDirectoryEntrySync();
 
-  createReader_Callback_0_(mthis) => mthis.callMethod("createReader", []);
+  createReader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createReader", []);
 
-  getDirectory_Callback_0_(mthis) => mthis.callMethod("getDirectory", []);
+  getDirectory_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", []);
 
-  getDirectory_Callback_1_(mthis, __arg_0) => mthis.callMethod("getDirectory", [__arg_0]);
+  getDirectory_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0]);
 
-  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getDirectory", [__arg_0, __arg_1]);
+  getDirectory_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getDirectory", [__arg_0, __arg_1]);
 
-  getFile_Callback_0_(mthis) => mthis.callMethod("getFile", []);
+  getFile_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getFile", []);
 
-  getFile_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFile", [__arg_0]);
+  getFile_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0]);
 
-  getFile_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getFile", [__arg_0, __arg_1]);
+  getFile_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFile", [__arg_0, __arg_1]);
 
-  removeRecursively_Callback_0_(mthis) => mthis.callMethod("removeRecursively", []);
+  removeRecursively_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRecursively", []);
 
 }
 
 class BlinkDirectoryReader {
   static final instance = new BlinkDirectoryReader();
 
-  readEntries_Callback_0_(mthis) => mthis.callMethod("readEntries", []);
+  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", []);
 
-  readEntries_Callback_1_(mthis, __arg_0) => mthis.callMethod("readEntries", [__arg_0]);
+  readEntries_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", [__arg_0]);
 
-  readEntries_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("readEntries", [__arg_0, __arg_1]);
+  readEntries_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", [__arg_0, __arg_1]);
 
 }
 
 class BlinkDirectoryReaderSync {
   static final instance = new BlinkDirectoryReaderSync();
 
-  readEntries_Callback_0_(mthis) => mthis.callMethod("readEntries", []);
+  readEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readEntries", []);
 
 }
 
 class BlinkDocument extends BlinkNode {
   static final instance = new BlinkDocument();
 
-  URL_Getter_(mthis) => mthis["URL"];
+  URL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "URL");
 
-  activeElement_Getter_(mthis) => mthis["activeElement"];
+  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeElement");
 
-  adoptNode_Callback_0_(mthis) => mthis.callMethod("adoptNode", []);
+  adoptNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "adoptNode", []);
 
-  adoptNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("adoptNode", [__arg_0]);
+  adoptNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "adoptNode", [__arg_0]);
 
-  anchors_Getter_(mthis) => mthis["anchors"];
+  anchors_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchors");
 
-  body_Getter_(mthis) => mthis["body"];
+  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "body");
 
   body_Setter_(mthis, __arg_0) => mthis["body"] = __arg_0;
 
-  caretRangeFromPoint_Callback_0_(mthis) => mthis.callMethod("caretRangeFromPoint", []);
+  caretRangeFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", []);
 
-  caretRangeFromPoint_Callback_1_(mthis, __arg_0) => mthis.callMethod("caretRangeFromPoint", [__arg_0]);
+  caretRangeFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", [__arg_0]);
 
-  caretRangeFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("caretRangeFromPoint", [__arg_0, __arg_1]);
+  caretRangeFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "caretRangeFromPoint", [__arg_0, __arg_1]);
 
-  characterSet_Getter_(mthis) => mthis["characterSet"];
+  characterSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "characterSet");
 
-  charset_Getter_(mthis) => mthis["charset"];
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charset");
 
   charset_Setter_(mthis, __arg_0) => mthis["charset"] = __arg_0;
 
-  childElementCount_Getter_(mthis) => mthis["childElementCount"];
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
 
-  children_Getter_(mthis) => mthis["children"];
+  children_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "children");
 
-  compatMode_Getter_(mthis) => mthis["compatMode"];
+  compatMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compatMode");
 
-  contentType_Getter_(mthis) => mthis["contentType"];
+  contentType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentType");
 
-  cookie_Getter_(mthis) => mthis["cookie"];
+  cookie_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cookie");
 
   cookie_Setter_(mthis, __arg_0) => mthis["cookie"] = __arg_0;
 
-  createCDATASection_Callback_0_(mthis) => mthis.callMethod("createCDATASection", []);
+  createCDATASection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createCDATASection", []);
 
-  createCDATASection_Callback_1_(mthis, __arg_0) => mthis.callMethod("createCDATASection", [__arg_0]);
+  createCDATASection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createCDATASection", [__arg_0]);
 
-  createDocumentFragment_Callback_0_(mthis) => mthis.callMethod("createDocumentFragment", []);
+  createDocumentFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDocumentFragment", []);
 
-  createElementNS_Callback_0_(mthis) => mthis.callMethod("createElementNS", []);
+  createElementNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", []);
 
-  createElementNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("createElementNS", [__arg_0]);
+  createElementNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0]);
 
-  createElementNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createElementNS", [__arg_0, __arg_1]);
+  createElementNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0, __arg_1]);
 
-  createElementNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createElementNS", [__arg_0, __arg_1, __arg_2]);
+  createElementNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createElementNS", [__arg_0, __arg_1, __arg_2]);
 
-  createElement_Callback_0_(mthis) => mthis.callMethod("createElement", []);
+  createElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createElement", []);
 
-  createElement_Callback_1_(mthis, __arg_0) => mthis.callMethod("createElement", [__arg_0]);
+  createElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createElement", [__arg_0]);
 
-  createElement_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createElement", [__arg_0, __arg_1]);
+  createElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createElement", [__arg_0, __arg_1]);
 
-  createEvent_Callback_0_(mthis) => mthis.callMethod("createEvent", []);
+  createEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createEvent", []);
 
-  createEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("createEvent", [__arg_0]);
+  createEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createEvent", [__arg_0]);
 
-  createNodeIterator_Callback_0_(mthis) => mthis.callMethod("createNodeIterator", []);
+  createNodeIterator_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", []);
 
-  createNodeIterator_Callback_1_(mthis, __arg_0) => mthis.callMethod("createNodeIterator", [__arg_0]);
+  createNodeIterator_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0]);
 
-  createNodeIterator_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createNodeIterator", [__arg_0, __arg_1]);
+  createNodeIterator_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0, __arg_1]);
 
-  createNodeIterator_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createNodeIterator", [__arg_0, __arg_1, __arg_2]);
+  createNodeIterator_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createNodeIterator", [__arg_0, __arg_1, __arg_2]);
 
-  createRange_Callback_0_(mthis) => mthis.callMethod("createRange", []);
+  createRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createRange", []);
 
-  createTextNode_Callback_0_(mthis) => mthis.callMethod("createTextNode", []);
+  createTextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTextNode", []);
 
-  createTextNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("createTextNode", [__arg_0]);
+  createTextNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTextNode", [__arg_0]);
 
-  createTouchList_Callback_0_(mthis) => mthis.callMethod("createTouchList", []);
+  createTouchList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTouchList", []);
 
-  createTouchList_Callback_1_(mthis, __arg_0) => mthis.callMethod("createTouchList", [__arg_0]);
+  createTouchList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTouchList", [__arg_0]);
 
-  createTouch_Callback_0_(mthis) => mthis.callMethod("createTouch", []);
+  createTouch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", []);
 
-  createTouch_Callback_1_(mthis, __arg_0) => mthis.callMethod("createTouch", [__arg_0]);
+  createTouch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0]);
 
-  createTouch_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  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]);
 
-  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) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+  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]);
 
-  createTouch_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createTouch", [__arg_0, __arg_1]);
+  createTouch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1]);
 
-  createTouch_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2]);
+  createTouch_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createTouch", [__arg_0, __arg_1, __arg_2]);
 
-  createTouch_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createTouch_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  createTouch_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  createTouch_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  createTouch_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  createTouch_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("createTouch", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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]);
 
-  createTreeWalker_Callback_0_(mthis) => mthis.callMethod("createTreeWalker", []);
+  createTreeWalker_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", []);
 
-  createTreeWalker_Callback_1_(mthis, __arg_0) => mthis.callMethod("createTreeWalker", [__arg_0]);
+  createTreeWalker_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0]);
 
-  createTreeWalker_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createTreeWalker", [__arg_0, __arg_1]);
+  createTreeWalker_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0, __arg_1]);
 
-  createTreeWalker_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createTreeWalker", [__arg_0, __arg_1, __arg_2]);
+  createTreeWalker_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createTreeWalker", [__arg_0, __arg_1, __arg_2]);
 
-  currentScript_Getter_(mthis) => mthis["currentScript"];
+  currentScript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentScript");
 
-  defaultCharset_Getter_(mthis) => mthis["defaultCharset"];
+  defaultCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultCharset");
 
-  defaultView_Getter_(mthis) => mthis["defaultView"];
+  defaultView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultView");
 
-  doctype_Getter_(mthis) => mthis["doctype"];
+  doctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "doctype");
 
-  documentElement_Getter_(mthis) => mthis["documentElement"];
+  documentElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentElement");
 
-  documentURI_Getter_(mthis) => mthis["documentURI"];
+  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentURI");
 
-  domain_Getter_(mthis) => mthis["domain"];
+  domain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domain");
 
   domain_Setter_(mthis, __arg_0) => mthis["domain"] = __arg_0;
 
-  elementFromPoint_Callback_0_(mthis) => mthis.callMethod("elementFromPoint", []);
+  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", []);
 
-  elementFromPoint_Callback_1_(mthis, __arg_0) => mthis.callMethod("elementFromPoint", [__arg_0]);
+  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0]);
 
-  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("elementFromPoint", [__arg_0, __arg_1]);
+  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0, __arg_1]);
 
-  embeds_Getter_(mthis) => mthis["embeds"];
+  embeds_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "embeds");
 
-  execCommand_Callback_0_(mthis) => mthis.callMethod("execCommand", []);
+  execCommand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", []);
 
-  execCommand_Callback_1_(mthis, __arg_0) => mthis.callMethod("execCommand", [__arg_0]);
+  execCommand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0]);
 
-  execCommand_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("execCommand", [__arg_0, __arg_1]);
+  execCommand_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0, __arg_1]);
 
-  execCommand_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("execCommand", [__arg_0, __arg_1, __arg_2]);
+  execCommand_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "execCommand", [__arg_0, __arg_1, __arg_2]);
 
-  exitFullscreen_Callback_0_(mthis) => mthis.callMethod("exitFullscreen", []);
+  exitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exitFullscreen", []);
 
-  exitPointerLock_Callback_0_(mthis) => mthis.callMethod("exitPointerLock", []);
+  exitPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exitPointerLock", []);
 
-  firstElementChild_Getter_(mthis) => mthis["firstElementChild"];
+  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
 
-  fonts_Getter_(mthis) => mthis["fonts"];
+  fonts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fonts");
 
-  forms_Getter_(mthis) => mthis["forms"];
+  forms_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "forms");
 
-  fullscreenElement_Getter_(mthis) => mthis["fullscreenElement"];
+  fullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullscreenElement");
 
-  fullscreenEnabled_Getter_(mthis) => mthis["fullscreenEnabled"];
+  fullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullscreenEnabled");
 
-  getCSSCanvasContext_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getCSSCanvasContext", [__arg_0, __arg_1]);
+  getCSSCanvasContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getCSSCanvasContext", [__arg_0, __arg_1]);
 
-  getCSSCanvasContext_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getCSSCanvasContext", [__arg_0, __arg_1, __arg_2]);
+  getCSSCanvasContext_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getCSSCanvasContext", [__arg_0, __arg_1, __arg_2]);
 
-  getCSSCanvasContext_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("getCSSCanvasContext", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  getElementById_Callback_0_(mthis) => mthis.callMethod("getElementById", []);
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
 
-  getElementById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementById", [__arg_0]);
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
 
-  getElementsByClassName_Callback_0_(mthis) => mthis.callMethod("getElementsByClassName", []);
+  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByClassName", [__arg_0]);
+  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
 
-  getElementsByName_Callback_0_(mthis) => mthis.callMethod("getElementsByName", []);
+  getElementsByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByName", []);
 
-  getElementsByName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByName", [__arg_0]);
+  getElementsByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByName", [__arg_0]);
 
-  getElementsByTagName_Callback_0_(mthis) => mthis.callMethod("getElementsByTagName", []);
+  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByTagName", [__arg_0]);
+  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
 
-  head_Getter_(mthis) => mthis["head"];
+  head_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "head");
 
-  hidden_Getter_(mthis) => mthis["hidden"];
+  hidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hidden");
 
-  implementation_Getter_(mthis) => mthis["implementation"];
+  implementation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "implementation");
 
-  importNode_Callback_0_(mthis) => mthis.callMethod("importNode", []);
+  importNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importNode", []);
 
-  importNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("importNode", [__arg_0]);
+  importNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importNode", [__arg_0]);
 
-  importNode_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("importNode", [__arg_0, __arg_1]);
+  importNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "importNode", [__arg_0, __arg_1]);
 
-  inputEncoding_Getter_(mthis) => mthis["inputEncoding"];
+  inputEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputEncoding");
 
-  lastElementChild_Getter_(mthis) => mthis["lastElementChild"];
+  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
 
-  lastModified_Getter_(mthis) => mthis["lastModified"];
+  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModified");
 
-  links_Getter_(mthis) => mthis["links"];
+  links_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "links");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onautocomplete_Getter_(mthis) => mthis["onautocomplete"];
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
 
   onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
 
-  onautocompleteerror_Getter_(mthis) => mthis["onautocompleteerror"];
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
 
   onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
 
-  onbeforecopy_Getter_(mthis) => mthis["onbeforecopy"];
+  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecopy");
 
   onbeforecopy_Setter_(mthis, __arg_0) => mthis["onbeforecopy"] = __arg_0;
 
-  onbeforecut_Getter_(mthis) => mthis["onbeforecut"];
+  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecut");
 
   onbeforecut_Setter_(mthis, __arg_0) => mthis["onbeforecut"] = __arg_0;
 
-  onbeforepaste_Getter_(mthis) => mthis["onbeforepaste"];
+  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforepaste");
 
   onbeforepaste_Setter_(mthis, __arg_0) => mthis["onbeforepaste"] = __arg_0;
 
-  onblur_Getter_(mthis) => mthis["onblur"];
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
 
   onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
 
-  oncancel_Getter_(mthis) => mthis["oncancel"];
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
 
   oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
 
-  oncanplay_Getter_(mthis) => mthis["oncanplay"];
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
 
   oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
 
-  oncanplaythrough_Getter_(mthis) => mthis["oncanplaythrough"];
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
 
   oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onclick_Getter_(mthis) => mthis["onclick"];
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
 
   onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  oncontextmenu_Getter_(mthis) => mthis["oncontextmenu"];
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
 
   oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
 
-  oncopy_Getter_(mthis) => mthis["oncopy"];
+  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncopy");
 
   oncopy_Setter_(mthis, __arg_0) => mthis["oncopy"] = __arg_0;
 
-  oncuechange_Getter_(mthis) => mthis["oncuechange"];
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
 
   oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
 
-  oncut_Getter_(mthis) => mthis["oncut"];
+  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncut");
 
   oncut_Setter_(mthis, __arg_0) => mthis["oncut"] = __arg_0;
 
-  ondblclick_Getter_(mthis) => mthis["ondblclick"];
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
 
   ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
 
-  ondrag_Getter_(mthis) => mthis["ondrag"];
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
 
   ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
 
-  ondragend_Getter_(mthis) => mthis["ondragend"];
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
 
   ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
 
-  ondragenter_Getter_(mthis) => mthis["ondragenter"];
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
 
   ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
 
-  ondragleave_Getter_(mthis) => mthis["ondragleave"];
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
 
   ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
 
-  ondragover_Getter_(mthis) => mthis["ondragover"];
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
 
   ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
 
-  ondragstart_Getter_(mthis) => mthis["ondragstart"];
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
 
   ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
 
-  ondrop_Getter_(mthis) => mthis["ondrop"];
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
 
   ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
 
-  ondurationchange_Getter_(mthis) => mthis["ondurationchange"];
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
 
   ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
 
-  onemptied_Getter_(mthis) => mthis["onemptied"];
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
 
   onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onfocus_Getter_(mthis) => mthis["onfocus"];
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
 
   onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
 
-  onfullscreenchange_Getter_(mthis) => mthis["onfullscreenchange"];
+  onfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfullscreenchange");
 
   onfullscreenchange_Setter_(mthis, __arg_0) => mthis["onfullscreenchange"] = __arg_0;
 
-  onfullscreenerror_Getter_(mthis) => mthis["onfullscreenerror"];
+  onfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfullscreenerror");
 
   onfullscreenerror_Setter_(mthis, __arg_0) => mthis["onfullscreenerror"] = __arg_0;
 
-  oninput_Getter_(mthis) => mthis["oninput"];
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
 
   oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
 
-  oninvalid_Getter_(mthis) => mthis["oninvalid"];
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
 
   oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
 
-  onkeydown_Getter_(mthis) => mthis["onkeydown"];
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
 
   onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
 
-  onkeypress_Getter_(mthis) => mthis["onkeypress"];
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
 
   onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
 
-  onkeyup_Getter_(mthis) => mthis["onkeyup"];
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
 
   onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadeddata_Getter_(mthis) => mthis["onloadeddata"];
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
 
   onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
 
-  onloadedmetadata_Getter_(mthis) => mthis["onloadedmetadata"];
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
 
   onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onmousedown_Getter_(mthis) => mthis["onmousedown"];
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
 
   onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
 
-  onmouseenter_Getter_(mthis) => mthis["onmouseenter"];
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
 
   onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
 
-  onmouseleave_Getter_(mthis) => mthis["onmouseleave"];
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
 
   onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
 
-  onmousemove_Getter_(mthis) => mthis["onmousemove"];
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
 
   onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
 
-  onmouseout_Getter_(mthis) => mthis["onmouseout"];
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
 
   onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
 
-  onmouseover_Getter_(mthis) => mthis["onmouseover"];
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
 
   onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
 
-  onmouseup_Getter_(mthis) => mthis["onmouseup"];
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
 
   onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
 
-  onmousewheel_Getter_(mthis) => mthis["onmousewheel"];
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
 
   onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
 
-  onpaste_Getter_(mthis) => mthis["onpaste"];
+  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpaste");
 
   onpaste_Setter_(mthis, __arg_0) => mthis["onpaste"] = __arg_0;
 
-  onpause_Getter_(mthis) => mthis["onpause"];
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
 
   onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
 
-  onplay_Getter_(mthis) => mthis["onplay"];
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
 
   onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
 
-  onplaying_Getter_(mthis) => mthis["onplaying"];
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
 
   onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
 
-  onpointerlockchange_Getter_(mthis) => mthis["onpointerlockchange"];
+  onpointerlockchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpointerlockchange");
 
   onpointerlockchange_Setter_(mthis, __arg_0) => mthis["onpointerlockchange"] = __arg_0;
 
-  onpointerlockerror_Getter_(mthis) => mthis["onpointerlockerror"];
+  onpointerlockerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpointerlockerror");
 
   onpointerlockerror_Setter_(mthis, __arg_0) => mthis["onpointerlockerror"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onratechange_Getter_(mthis) => mthis["onratechange"];
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
 
   onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
 
-  onreadystatechange_Getter_(mthis) => mthis["onreadystatechange"];
+  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreadystatechange");
 
   onreadystatechange_Setter_(mthis, __arg_0) => mthis["onreadystatechange"] = __arg_0;
 
-  onreset_Getter_(mthis) => mthis["onreset"];
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
 
   onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
 
-  onresize_Getter_(mthis) => mthis["onresize"];
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
 
   onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
 
-  onscroll_Getter_(mthis) => mthis["onscroll"];
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
 
   onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
 
-  onsearch_Getter_(mthis) => mthis["onsearch"];
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
 
   onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
 
-  onsecuritypolicyviolation_Getter_(mthis) => mthis["onsecuritypolicyviolation"];
+  onsecuritypolicyviolation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsecuritypolicyviolation");
 
   onsecuritypolicyviolation_Setter_(mthis, __arg_0) => mthis["onsecuritypolicyviolation"] = __arg_0;
 
-  onseeked_Getter_(mthis) => mthis["onseeked"];
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
 
   onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
 
-  onseeking_Getter_(mthis) => mthis["onseeking"];
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
 
   onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
 
-  onselect_Getter_(mthis) => mthis["onselect"];
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
 
   onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
 
-  onselectionchange_Getter_(mthis) => mthis["onselectionchange"];
+  onselectionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectionchange");
 
   onselectionchange_Setter_(mthis, __arg_0) => mthis["onselectionchange"] = __arg_0;
 
-  onselectstart_Getter_(mthis) => mthis["onselectstart"];
+  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectstart");
 
   onselectstart_Setter_(mthis, __arg_0) => mthis["onselectstart"] = __arg_0;
 
-  onshow_Getter_(mthis) => mthis["onshow"];
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
 
   onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
 
-  onstalled_Getter_(mthis) => mthis["onstalled"];
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
 
   onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
 
-  onsubmit_Getter_(mthis) => mthis["onsubmit"];
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
 
   onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
 
-  onsuspend_Getter_(mthis) => mthis["onsuspend"];
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
 
   onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
 
-  ontimeupdate_Getter_(mthis) => mthis["ontimeupdate"];
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
 
   ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
 
-  ontoggle_Getter_(mthis) => mthis["ontoggle"];
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
 
   ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
 
-  ontouchcancel_Getter_(mthis) => mthis["ontouchcancel"];
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
 
   ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
 
-  ontouchend_Getter_(mthis) => mthis["ontouchend"];
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
 
   ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
 
-  ontouchmove_Getter_(mthis) => mthis["ontouchmove"];
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
 
   ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
 
-  ontouchstart_Getter_(mthis) => mthis["ontouchstart"];
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
 
   ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
 
-  onvolumechange_Getter_(mthis) => mthis["onvolumechange"];
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
 
   onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
 
-  onwaiting_Getter_(mthis) => mthis["onwaiting"];
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
 
   onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
 
-  onwebkitfullscreenchange_Getter_(mthis) => mthis["onwebkitfullscreenchange"];
+  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenchange");
 
   onwebkitfullscreenchange_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenchange"] = __arg_0;
 
-  onwebkitfullscreenerror_Getter_(mthis) => mthis["onwebkitfullscreenerror"];
+  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenerror");
 
   onwebkitfullscreenerror_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenerror"] = __arg_0;
 
-  onwheel_Getter_(mthis) => mthis["onwheel"];
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
 
   onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
 
-  plugins_Getter_(mthis) => mthis["plugins"];
+  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "plugins");
 
-  pointerLockElement_Getter_(mthis) => mthis["pointerLockElement"];
+  pointerLockElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointerLockElement");
 
-  preferredStylesheetSet_Getter_(mthis) => mthis["preferredStylesheetSet"];
+  preferredStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preferredStylesheetSet");
 
-  queryCommandEnabled_Callback_0_(mthis) => mthis.callMethod("queryCommandEnabled", []);
+  queryCommandEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandEnabled", []);
 
-  queryCommandEnabled_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryCommandEnabled", [__arg_0]);
+  queryCommandEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandEnabled", [__arg_0]);
 
-  queryCommandIndeterm_Callback_0_(mthis) => mthis.callMethod("queryCommandIndeterm", []);
+  queryCommandIndeterm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandIndeterm", []);
 
-  queryCommandIndeterm_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryCommandIndeterm", [__arg_0]);
+  queryCommandIndeterm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandIndeterm", [__arg_0]);
 
-  queryCommandState_Callback_0_(mthis) => mthis.callMethod("queryCommandState", []);
+  queryCommandState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandState", []);
 
-  queryCommandState_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryCommandState", [__arg_0]);
+  queryCommandState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandState", [__arg_0]);
 
-  queryCommandSupported_Callback_0_(mthis) => mthis.callMethod("queryCommandSupported", []);
+  queryCommandSupported_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandSupported", []);
 
-  queryCommandSupported_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryCommandSupported", [__arg_0]);
+  queryCommandSupported_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandSupported", [__arg_0]);
 
-  queryCommandValue_Callback_0_(mthis) => mthis.callMethod("queryCommandValue", []);
+  queryCommandValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandValue", []);
 
-  queryCommandValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryCommandValue", [__arg_0]);
+  queryCommandValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryCommandValue", [__arg_0]);
 
-  querySelectorAll_Callback_0_(mthis) => mthis.callMethod("querySelectorAll", []);
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelectorAll", [__arg_0]);
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
 
-  querySelector_Callback_0_(mthis) => mthis.callMethod("querySelector", []);
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
 
-  querySelector_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelector", [__arg_0]);
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  referrer_Getter_(mthis) => mthis["referrer"];
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
 
-  registerElement_Callback_0_(mthis) => mthis.callMethod("registerElement", []);
+  registerElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", []);
 
-  registerElement_Callback_1_(mthis, __arg_0) => mthis.callMethod("registerElement", [__arg_0]);
+  registerElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", [__arg_0]);
 
-  registerElement_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("registerElement", [__arg_0, __arg_1]);
+  registerElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "registerElement", [__arg_0, __arg_1]);
 
-  rootElement_Getter_(mthis) => mthis["rootElement"];
+  rootElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rootElement");
 
-  scripts_Getter_(mthis) => mthis["scripts"];
+  scripts_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scripts");
 
-  selectedStylesheetSet_Getter_(mthis) => mthis["selectedStylesheetSet"];
+  selectedStylesheetSet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedStylesheetSet");
 
   selectedStylesheetSet_Setter_(mthis, __arg_0) => mthis["selectedStylesheetSet"] = __arg_0;
 
-  styleSheets_Getter_(mthis) => mthis["styleSheets"];
+  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheets");
 
-  timeline_Getter_(mthis) => mthis["timeline"];
+  timeline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeline");
 
-  title_Getter_(mthis) => mthis["title"];
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
 
   title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
 
-  transformDocumentToTreeView_Callback_0_(mthis) => mthis.callMethod("transformDocumentToTreeView", []);
+  transformDocumentToTreeView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformDocumentToTreeView", []);
 
-  transformDocumentToTreeView_Callback_1_(mthis, __arg_0) => mthis.callMethod("transformDocumentToTreeView", [__arg_0]);
+  transformDocumentToTreeView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformDocumentToTreeView", [__arg_0]);
 
-  visibilityState_Getter_(mthis) => mthis["visibilityState"];
+  visibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "visibilityState");
 
-  webkitCancelFullScreen_Callback_0_(mthis) => mthis.callMethod("webkitCancelFullScreen", []);
+  webkitCancelFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelFullScreen", []);
 
-  webkitExitFullscreen_Callback_0_(mthis) => mthis.callMethod("webkitExitFullscreen", []);
+  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullscreen", []);
 
-  webkitFullscreenElement_Getter_(mthis) => mthis["webkitFullscreenElement"];
+  webkitFullscreenElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitFullscreenElement");
 
-  webkitFullscreenEnabled_Getter_(mthis) => mthis["webkitFullscreenEnabled"];
+  webkitFullscreenEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitFullscreenEnabled");
 
-  webkitHidden_Getter_(mthis) => mthis["webkitHidden"];
+  webkitHidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitHidden");
 
-  webkitIsFullScreen_Getter_(mthis) => mthis["webkitIsFullScreen"];
+  webkitIsFullScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitIsFullScreen");
 
-  webkitVisibilityState_Getter_(mthis) => mthis["webkitVisibilityState"];
+  webkitVisibilityState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitVisibilityState");
 
-  xmlEncoding_Getter_(mthis) => mthis["xmlEncoding"];
+  xmlEncoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlEncoding");
 
 }
 
 class BlinkDocumentFragment extends BlinkNode {
   static final instance = new BlinkDocumentFragment();
 
-  childElementCount_Getter_(mthis) => mthis["childElementCount"];
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
 
-  constructorCallback_0_() => new js.JsObject(js.context["DocumentFragment"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "DocumentFragment"), []);
 
-  firstElementChild_Getter_(mthis) => mthis["firstElementChild"];
+  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
 
-  getElementById_Callback_0_(mthis) => mthis.callMethod("getElementById", []);
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
 
-  getElementById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementById", [__arg_0]);
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
 
-  lastElementChild_Getter_(mthis) => mthis["lastElementChild"];
+  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
 
-  querySelectorAll_Callback_0_(mthis) => mthis.callMethod("querySelectorAll", []);
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelectorAll", [__arg_0]);
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
 
-  querySelector_Callback_0_(mthis) => mthis.callMethod("querySelector", []);
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
 
-  querySelector_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelector", [__arg_0]);
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
 
 }
 
@@ -3921,17 +3922,17 @@
 class BlinkDynamicsCompressorNode extends BlinkAudioNode {
   static final instance = new BlinkDynamicsCompressorNode();
 
-  attack_Getter_(mthis) => mthis["attack"];
+  attack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attack");
 
-  knee_Getter_(mthis) => mthis["knee"];
+  knee_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "knee");
 
-  ratio_Getter_(mthis) => mthis["ratio"];
+  ratio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ratio");
 
-  reduction_Getter_(mthis) => mthis["reduction"];
+  reduction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reduction");
 
-  release_Getter_(mthis) => mthis["release"];
+  release_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "release");
 
-  threshold_Getter_(mthis) => mthis["threshold"];
+  threshold_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "threshold");
 
 }
 
@@ -3958,785 +3959,785 @@
 class BlinkElement extends BlinkNode {
   static final instance = new BlinkElement();
 
-  animate_Callback_0_(mthis) => mthis.callMethod("animate", []);
+  animate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "animate", []);
 
-  animate_Callback_1_(mthis, __arg_0) => mthis.callMethod("animate", [__arg_0]);
+  animate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "animate", [__arg_0]);
 
-  animate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("animate", [__arg_0, __arg_1]);
+  animate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "animate", [__arg_0, __arg_1]);
 
-  attributes_Getter_(mthis) => mthis["attributes"];
+  attributes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributes");
 
-  blur_Callback_0_(mthis) => mthis.callMethod("blur", []);
+  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blur", []);
 
-  childElementCount_Getter_(mthis) => mthis["childElementCount"];
+  childElementCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childElementCount");
 
-  children_Getter_(mthis) => mthis["children"];
+  children_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "children");
 
-  classList_Getter_(mthis) => mthis["classList"];
+  classList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "classList");
 
-  className_Getter_(mthis) => mthis["className"];
+  className_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "className");
 
   className_Setter_(mthis, __arg_0) => mthis["className"] = __arg_0;
 
-  clientHeight_Getter_(mthis) => mthis["clientHeight"];
+  clientHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientHeight");
 
-  clientLeft_Getter_(mthis) => mthis["clientLeft"];
+  clientLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientLeft");
 
-  clientTop_Getter_(mthis) => mthis["clientTop"];
+  clientTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientTop");
 
-  clientWidth_Getter_(mthis) => mthis["clientWidth"];
+  clientWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientWidth");
 
-  createShadowRoot_Callback_0_(mthis) => mthis.callMethod("createShadowRoot", []);
+  createShadowRoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createShadowRoot", []);
 
-  firstElementChild_Getter_(mthis) => mthis["firstElementChild"];
+  firstElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstElementChild");
 
-  focus_Callback_0_(mthis) => mthis.callMethod("focus", []);
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "focus", []);
 
-  getAnimationPlayers_Callback_0_(mthis) => mthis.callMethod("getAnimationPlayers", []);
+  getAnimationPlayers_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAnimationPlayers", []);
 
-  getAttributeNS_Callback_0_(mthis) => mthis.callMethod("getAttributeNS", []);
+  getAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", []);
 
-  getAttributeNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAttributeNS", [__arg_0]);
+  getAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", [__arg_0]);
 
-  getAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getAttributeNS", [__arg_0, __arg_1]);
+  getAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getAttributeNS", [__arg_0, __arg_1]);
 
-  getAttribute_Callback_0_(mthis) => mthis.callMethod("getAttribute", []);
+  getAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttribute", []);
 
-  getAttribute_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAttribute", [__arg_0]);
+  getAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttribute", [__arg_0]);
 
-  getBoundingClientRect_Callback_0_(mthis) => mthis.callMethod("getBoundingClientRect", []);
+  getBoundingClientRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBoundingClientRect", []);
 
-  getClientRects_Callback_0_(mthis) => mthis.callMethod("getClientRects", []);
+  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getClientRects", []);
 
-  getDestinationInsertionPoints_Callback_0_(mthis) => mthis.callMethod("getDestinationInsertionPoints", []);
+  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDestinationInsertionPoints", []);
 
-  getElementsByClassName_Callback_0_(mthis) => mthis.callMethod("getElementsByClassName", []);
+  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByClassName", [__arg_0]);
+  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
 
-  getElementsByTagName_Callback_0_(mthis) => mthis.callMethod("getElementsByTagName", []);
+  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByTagName", [__arg_0]);
+  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
 
-  hasAttributeNS_Callback_0_(mthis) => mthis.callMethod("hasAttributeNS", []);
+  hasAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", []);
 
-  hasAttributeNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasAttributeNS", [__arg_0]);
+  hasAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", [__arg_0]);
 
-  hasAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("hasAttributeNS", [__arg_0, __arg_1]);
+  hasAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributeNS", [__arg_0, __arg_1]);
 
-  hasAttribute_Callback_0_(mthis) => mthis.callMethod("hasAttribute", []);
+  hasAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttribute", []);
 
-  hasAttribute_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasAttribute", [__arg_0]);
+  hasAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasAttribute", [__arg_0]);
 
-  hasAttributes_Callback_0_(mthis) => mthis.callMethod("hasAttributes", []);
+  hasAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasAttributes", []);
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
   id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
 
-  innerHTML_Getter_(mthis) => mthis["innerHTML"];
+  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHTML");
 
   innerHTML_Setter_(mthis, __arg_0) => mthis["innerHTML"] = __arg_0;
 
-  insertAdjacentElement_Callback_0_(mthis) => mthis.callMethod("insertAdjacentElement", []);
+  insertAdjacentElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", []);
 
-  insertAdjacentElement_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertAdjacentElement", [__arg_0]);
+  insertAdjacentElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", [__arg_0]);
 
-  insertAdjacentElement_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertAdjacentElement", [__arg_0, __arg_1]);
+  insertAdjacentElement_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentElement", [__arg_0, __arg_1]);
 
-  insertAdjacentHTML_Callback_0_(mthis) => mthis.callMethod("insertAdjacentHTML", []);
+  insertAdjacentHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", []);
 
-  insertAdjacentHTML_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertAdjacentHTML", [__arg_0]);
+  insertAdjacentHTML_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", [__arg_0]);
 
-  insertAdjacentHTML_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertAdjacentHTML", [__arg_0, __arg_1]);
+  insertAdjacentHTML_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentHTML", [__arg_0, __arg_1]);
 
-  insertAdjacentText_Callback_0_(mthis) => mthis.callMethod("insertAdjacentText", []);
+  insertAdjacentText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", []);
 
-  insertAdjacentText_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertAdjacentText", [__arg_0]);
+  insertAdjacentText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", [__arg_0]);
 
-  insertAdjacentText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertAdjacentText", [__arg_0, __arg_1]);
+  insertAdjacentText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertAdjacentText", [__arg_0, __arg_1]);
 
-  lastElementChild_Getter_(mthis) => mthis["lastElementChild"];
+  lastElementChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastElementChild");
 
-  localName_Getter_(mthis) => mthis["localName"];
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
 
-  matches_Callback_0_(mthis) => mthis.callMethod("matches", []);
+  matches_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matches", []);
 
-  matches_Callback_1_(mthis, __arg_0) => mthis.callMethod("matches", [__arg_0]);
+  matches_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matches", [__arg_0]);
 
-  namespaceURI_Getter_(mthis) => mthis["namespaceURI"];
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
 
-  nextElementSibling_Getter_(mthis) => mthis["nextElementSibling"];
+  nextElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextElementSibling");
 
-  offsetHeight_Getter_(mthis) => mthis["offsetHeight"];
+  offsetHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetHeight");
 
-  offsetLeft_Getter_(mthis) => mthis["offsetLeft"];
+  offsetLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetLeft");
 
-  offsetParent_Getter_(mthis) => mthis["offsetParent"];
+  offsetParent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetParent");
 
-  offsetTop_Getter_(mthis) => mthis["offsetTop"];
+  offsetTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetTop");
 
-  offsetWidth_Getter_(mthis) => mthis["offsetWidth"];
+  offsetWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetWidth");
 
-  onbeforecopy_Getter_(mthis) => mthis["onbeforecopy"];
+  onbeforecopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecopy");
 
   onbeforecopy_Setter_(mthis, __arg_0) => mthis["onbeforecopy"] = __arg_0;
 
-  onbeforecut_Getter_(mthis) => mthis["onbeforecut"];
+  onbeforecut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforecut");
 
   onbeforecut_Setter_(mthis, __arg_0) => mthis["onbeforecut"] = __arg_0;
 
-  onbeforepaste_Getter_(mthis) => mthis["onbeforepaste"];
+  onbeforepaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforepaste");
 
   onbeforepaste_Setter_(mthis, __arg_0) => mthis["onbeforepaste"] = __arg_0;
 
-  oncopy_Getter_(mthis) => mthis["oncopy"];
+  oncopy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncopy");
 
   oncopy_Setter_(mthis, __arg_0) => mthis["oncopy"] = __arg_0;
 
-  oncut_Getter_(mthis) => mthis["oncut"];
+  oncut_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncut");
 
   oncut_Setter_(mthis, __arg_0) => mthis["oncut"] = __arg_0;
 
-  onpaste_Getter_(mthis) => mthis["onpaste"];
+  onpaste_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpaste");
 
   onpaste_Setter_(mthis, __arg_0) => mthis["onpaste"] = __arg_0;
 
-  onsearch_Getter_(mthis) => mthis["onsearch"];
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
 
   onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
 
-  onselectstart_Getter_(mthis) => mthis["onselectstart"];
+  onselectstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselectstart");
 
   onselectstart_Setter_(mthis, __arg_0) => mthis["onselectstart"] = __arg_0;
 
-  ontouchcancel_Getter_(mthis) => mthis["ontouchcancel"];
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
 
   ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
 
-  ontouchend_Getter_(mthis) => mthis["ontouchend"];
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
 
   ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
 
-  ontouchmove_Getter_(mthis) => mthis["ontouchmove"];
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
 
   ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
 
-  ontouchstart_Getter_(mthis) => mthis["ontouchstart"];
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
 
   ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
 
-  onwebkitfullscreenchange_Getter_(mthis) => mthis["onwebkitfullscreenchange"];
+  onwebkitfullscreenchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenchange");
 
   onwebkitfullscreenchange_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenchange"] = __arg_0;
 
-  onwebkitfullscreenerror_Getter_(mthis) => mthis["onwebkitfullscreenerror"];
+  onwebkitfullscreenerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitfullscreenerror");
 
   onwebkitfullscreenerror_Setter_(mthis, __arg_0) => mthis["onwebkitfullscreenerror"] = __arg_0;
 
-  onwheel_Getter_(mthis) => mthis["onwheel"];
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
 
   onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
 
-  outerHTML_Getter_(mthis) => mthis["outerHTML"];
+  outerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerHTML");
 
   outerHTML_Setter_(mthis, __arg_0) => mthis["outerHTML"] = __arg_0;
 
-  prefix_Getter_(mthis) => mthis["prefix"];
+  prefix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prefix");
 
   prefix_Setter_(mthis, __arg_0) => mthis["prefix"] = __arg_0;
 
-  previousElementSibling_Getter_(mthis) => mthis["previousElementSibling"];
+  previousElementSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousElementSibling");
 
-  querySelectorAll_Callback_0_(mthis) => mthis.callMethod("querySelectorAll", []);
+  querySelectorAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", []);
 
-  querySelectorAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelectorAll", [__arg_0]);
+  querySelectorAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelectorAll", [__arg_0]);
 
-  querySelector_Callback_0_(mthis) => mthis.callMethod("querySelector", []);
+  querySelector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", []);
 
-  querySelector_Callback_1_(mthis, __arg_0) => mthis.callMethod("querySelector", [__arg_0]);
+  querySelector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "querySelector", [__arg_0]);
 
-  removeAttributeNS_Callback_0_(mthis) => mthis.callMethod("removeAttributeNS", []);
+  removeAttributeNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", []);
 
-  removeAttributeNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeAttributeNS", [__arg_0]);
+  removeAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", [__arg_0]);
 
-  removeAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("removeAttributeNS", [__arg_0, __arg_1]);
+  removeAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeAttributeNS", [__arg_0, __arg_1]);
 
-  removeAttribute_Callback_0_(mthis) => mthis.callMethod("removeAttribute", []);
+  removeAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAttribute", []);
 
-  removeAttribute_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeAttribute", [__arg_0]);
+  removeAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeAttribute", [__arg_0]);
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  requestFullscreen_Callback_0_(mthis) => mthis.callMethod("requestFullscreen", []);
+  requestFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestFullscreen", []);
 
-  requestPointerLock_Callback_0_(mthis) => mthis.callMethod("requestPointerLock", []);
+  requestPointerLock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestPointerLock", []);
 
-  scrollHeight_Getter_(mthis) => mthis["scrollHeight"];
+  scrollHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollHeight");
 
-  scrollIntoViewIfNeeded_Callback_0_(mthis) => mthis.callMethod("scrollIntoViewIfNeeded", []);
+  scrollIntoViewIfNeeded_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoViewIfNeeded", []);
 
-  scrollIntoViewIfNeeded_Callback_1_(mthis, __arg_0) => mthis.callMethod("scrollIntoViewIfNeeded", [__arg_0]);
+  scrollIntoViewIfNeeded_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoViewIfNeeded", [__arg_0]);
 
-  scrollIntoView_Callback_0_(mthis) => mthis.callMethod("scrollIntoView", []);
+  scrollIntoView_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoView", []);
 
-  scrollIntoView_Callback_1_(mthis, __arg_0) => mthis.callMethod("scrollIntoView", [__arg_0]);
+  scrollIntoView_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollIntoView", [__arg_0]);
 
-  scrollLeft_Getter_(mthis) => mthis["scrollLeft"];
+  scrollLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollLeft");
 
   scrollLeft_Setter_(mthis, __arg_0) => mthis["scrollLeft"] = __arg_0;
 
-  scrollTop_Getter_(mthis) => mthis["scrollTop"];
+  scrollTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollTop");
 
   scrollTop_Setter_(mthis, __arg_0) => mthis["scrollTop"] = __arg_0;
 
-  scrollWidth_Getter_(mthis) => mthis["scrollWidth"];
+  scrollWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollWidth");
 
-  setAttributeNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("setAttributeNS", [__arg_0]);
+  setAttributeNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0]);
 
-  setAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setAttributeNS", [__arg_0, __arg_1]);
+  setAttributeNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0, __arg_1]);
 
-  setAttributeNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setAttributeNS", [__arg_0, __arg_1, __arg_2]);
+  setAttributeNS_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setAttributeNS", [__arg_0, __arg_1, __arg_2]);
 
-  setAttribute_Callback_0_(mthis) => mthis.callMethod("setAttribute", []);
+  setAttribute_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", []);
 
-  setAttribute_Callback_1_(mthis, __arg_0) => mthis.callMethod("setAttribute", [__arg_0]);
+  setAttribute_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", [__arg_0]);
 
-  setAttribute_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setAttribute", [__arg_0, __arg_1]);
+  setAttribute_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setAttribute", [__arg_0, __arg_1]);
 
-  shadowRoot_Getter_(mthis) => mthis["shadowRoot"];
+  shadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shadowRoot");
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
-  tagName_Getter_(mthis) => mthis["tagName"];
+  tagName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tagName");
 
-  webkitRequestFullScreen_Callback_0_(mthis) => mthis.callMethod("webkitRequestFullScreen", []);
+  webkitRequestFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullScreen", []);
 
-  webkitRequestFullScreen_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitRequestFullScreen", [__arg_0]);
+  webkitRequestFullScreen_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullScreen", [__arg_0]);
 
-  webkitRequestFullscreen_Callback_0_(mthis) => mthis.callMethod("webkitRequestFullscreen", []);
+  webkitRequestFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFullscreen", []);
 
 }
 
 class BlinkEntry {
   static final instance = new BlinkEntry();
 
-  copyTo_Callback_0_(mthis) => mthis.callMethod("copyTo", []);
+  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", []);
 
-  copyTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("copyTo", [__arg_0]);
+  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0]);
 
-  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("copyTo", [__arg_0, __arg_1]);
+  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1]);
 
-  copyTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("copyTo", [__arg_0, __arg_1, __arg_2]);
+  copyTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1, __arg_2]);
 
-  copyTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("copyTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  filesystem_Getter_(mthis) => mthis["filesystem"];
+  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filesystem");
 
-  fullPath_Getter_(mthis) => mthis["fullPath"];
+  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullPath");
 
-  getMetadata_Callback_0_(mthis) => mthis.callMethod("getMetadata", []);
+  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", []);
 
-  getMetadata_Callback_1_(mthis, __arg_0) => mthis.callMethod("getMetadata", [__arg_0]);
+  getMetadata_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", [__arg_0]);
 
-  getMetadata_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getMetadata", [__arg_0, __arg_1]);
+  getMetadata_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", [__arg_0, __arg_1]);
 
-  getParent_Callback_0_(mthis) => mthis.callMethod("getParent", []);
+  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParent", []);
 
-  getParent_Callback_1_(mthis, __arg_0) => mthis.callMethod("getParent", [__arg_0]);
+  getParent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParent", [__arg_0]);
 
-  getParent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getParent", [__arg_0, __arg_1]);
+  getParent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getParent", [__arg_0, __arg_1]);
 
-  isDirectory_Getter_(mthis) => mthis["isDirectory"];
+  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isDirectory");
 
-  isFile_Getter_(mthis) => mthis["isFile"];
+  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFile");
 
-  moveTo_Callback_0_(mthis) => mthis.callMethod("moveTo", []);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveTo", [__arg_0]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
 
-  moveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("moveTo", [__arg_0, __arg_1, __arg_2]);
+  moveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1, __arg_2]);
 
-  moveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("moveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  remove_Callback_1_(mthis, __arg_0) => mthis.callMethod("remove", [__arg_0]);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
 
-  remove_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("remove", [__arg_0, __arg_1]);
+  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0, __arg_1]);
 
-  toURL_Callback_0_(mthis) => mthis.callMethod("toURL", []);
+  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toURL", []);
 
 }
 
 class BlinkEntrySync {
   static final instance = new BlinkEntrySync();
 
-  copyTo_Callback_0_(mthis) => mthis.callMethod("copyTo", []);
+  copyTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", []);
 
-  copyTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("copyTo", [__arg_0]);
+  copyTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0]);
 
-  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("copyTo", [__arg_0, __arg_1]);
+  copyTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "copyTo", [__arg_0, __arg_1]);
 
-  filesystem_Getter_(mthis) => mthis["filesystem"];
+  filesystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filesystem");
 
-  fullPath_Getter_(mthis) => mthis["fullPath"];
+  fullPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fullPath");
 
-  getMetadata_Callback_0_(mthis) => mthis.callMethod("getMetadata", []);
+  getMetadata_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMetadata", []);
 
-  getParent_Callback_0_(mthis) => mthis.callMethod("getParent", []);
+  getParent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParent", []);
 
-  isDirectory_Getter_(mthis) => mthis["isDirectory"];
+  isDirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isDirectory");
 
-  isFile_Getter_(mthis) => mthis["isFile"];
+  isFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFile");
 
-  moveTo_Callback_0_(mthis) => mthis.callMethod("moveTo", []);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveTo", [__arg_0]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  toURL_Callback_0_(mthis) => mthis.callMethod("toURL", []);
+  toURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toURL", []);
 
 }
 
 class BlinkErrorEvent extends BlinkEvent {
   static final instance = new BlinkErrorEvent();
 
-  colno_Getter_(mthis) => mthis["colno"];
+  colno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colno");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["ErrorEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ErrorEvent"), [__arg_0, __arg_1]);
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  filename_Getter_(mthis) => mthis["filename"];
+  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filename");
 
-  lineno_Getter_(mthis) => mthis["lineno"];
+  lineno_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineno");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
 }
 
 class BlinkEvent {
   static final instance = new BlinkEvent();
 
-  bubbles_Getter_(mthis) => mthis["bubbles"];
+  bubbles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bubbles");
 
-  cancelBubble_Getter_(mthis) => mthis["cancelBubble"];
+  cancelBubble_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cancelBubble");
 
   cancelBubble_Setter_(mthis, __arg_0) => mthis["cancelBubble"] = __arg_0;
 
-  cancelable_Getter_(mthis) => mthis["cancelable"];
+  cancelable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cancelable");
 
-  clipboardData_Getter_(mthis) => mthis["clipboardData"];
+  clipboardData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clipboardData");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Event"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Event"), [__arg_0, __arg_1]);
 
-  currentTarget_Getter_(mthis) => mthis["currentTarget"];
+  currentTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTarget");
 
-  defaultPrevented_Getter_(mthis) => mthis["defaultPrevented"];
+  defaultPrevented_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPrevented");
 
-  eventPhase_Getter_(mthis) => mthis["eventPhase"];
+  eventPhase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "eventPhase");
 
-  initEvent_Callback_0_(mthis) => mthis.callMethod("initEvent", []);
+  initEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", []);
 
-  initEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initEvent", [__arg_0]);
+  initEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0]);
 
-  initEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initEvent", [__arg_0, __arg_1]);
+  initEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0, __arg_1]);
 
-  initEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initEvent", [__arg_0, __arg_1, __arg_2]);
+  initEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initEvent", [__arg_0, __arg_1, __arg_2]);
 
-  path_Getter_(mthis) => mthis["path"];
+  path_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "path");
 
-  preventDefault_Callback_0_(mthis) => mthis.callMethod("preventDefault", []);
+  preventDefault_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "preventDefault", []);
 
-  returnValue_Getter_(mthis) => mthis["returnValue"];
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
 
   returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
 
-  stopImmediatePropagation_Callback_0_(mthis) => mthis.callMethod("stopImmediatePropagation", []);
+  stopImmediatePropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stopImmediatePropagation", []);
 
-  stopPropagation_Callback_0_(mthis) => mthis.callMethod("stopPropagation", []);
+  stopPropagation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stopPropagation", []);
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
-  timeStamp_Getter_(mthis) => mthis["timeStamp"];
+  timeStamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeStamp");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkEventSource extends BlinkEventTarget {
   static final instance = new BlinkEventSource();
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["EventSource"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "EventSource"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["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) => new js.JsObject(js.context["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) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onopen_Getter_(mthis) => mthis["onopen"];
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
 
   onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
-  withCredentials_Getter_(mthis) => mthis["withCredentials"];
+  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "withCredentials");
 
 }
 
 class BlinkEventTarget {
   static final instance = new BlinkEventTarget();
 
-  addEventListener_Callback_0_(mthis) => mthis.callMethod("addEventListener", []);
+  addEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", []);
 
-  addEventListener_Callback_1_(mthis, __arg_0) => mthis.callMethod("addEventListener", [__arg_0]);
+  addEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0]);
 
-  addEventListener_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addEventListener", [__arg_0, __arg_1]);
+  addEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0, __arg_1]);
 
-  addEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("addEventListener", [__arg_0, __arg_1, __arg_2]);
+  addEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addEventListener", [__arg_0, __arg_1, __arg_2]);
 
-  dispatchEvent_Callback_0_(mthis) => mthis.callMethod("dispatchEvent", []);
+  dispatchEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "dispatchEvent", []);
 
-  dispatchEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("dispatchEvent", [__arg_0]);
+  dispatchEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "dispatchEvent", [__arg_0]);
 
-  removeEventListener_Callback_0_(mthis) => mthis.callMethod("removeEventListener", []);
+  removeEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", []);
 
-  removeEventListener_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeEventListener", [__arg_0]);
+  removeEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0]);
 
-  removeEventListener_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("removeEventListener", [__arg_0, __arg_1]);
+  removeEventListener_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0, __arg_1]);
 
-  removeEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("removeEventListener", [__arg_0, __arg_1, __arg_2]);
+  removeEventListener_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "removeEventListener", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkExtendableEvent extends BlinkEvent {
   static final instance = new BlinkExtendableEvent();
 
-  waitUntil_Callback_0_(mthis) => mthis.callMethod("waitUntil", []);
+  waitUntil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "waitUntil", []);
 
-  waitUntil_Callback_1_(mthis, __arg_0) => mthis.callMethod("waitUntil", [__arg_0]);
+  waitUntil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "waitUntil", [__arg_0]);
 
 }
 
 class BlinkFederatedCredential extends BlinkCredential {
   static final instance = new BlinkFederatedCredential();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["FederatedCredential"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FederatedCredential"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["FederatedCredential"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["FederatedCredential"], [__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, "FederatedCredential"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  federation_Getter_(mthis) => mthis["federation"];
+  federation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "federation");
 
 }
 
 class BlinkFetchEvent extends BlinkEvent {
   static final instance = new BlinkFetchEvent();
 
-  isReload_Getter_(mthis) => mthis["isReload"];
+  isReload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isReload");
 
-  request_Getter_(mthis) => mthis["request"];
+  request_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "request");
 
-  respondWith_Callback_0_(mthis) => mthis.callMethod("respondWith", []);
+  respondWith_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "respondWith", []);
 
-  respondWith_Callback_1_(mthis, __arg_0) => mthis.callMethod("respondWith", [__arg_0]);
+  respondWith_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "respondWith", [__arg_0]);
 
 }
 
 class BlinkFile extends BlinkBlob {
   static final instance = new BlinkFile();
 
-  constructorCallback_0_() => new js.JsObject(js.context["File"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["File"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["File"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["File"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "File"), [__arg_0, __arg_1, __arg_2]);
 
-  lastModifiedDate_Getter_(mthis) => mthis["lastModifiedDate"];
+  lastModifiedDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModifiedDate");
 
-  lastModified_Getter_(mthis) => mthis["lastModified"];
+  lastModified_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastModified");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  webkitRelativePath_Getter_(mthis) => mthis["webkitRelativePath"];
+  webkitRelativePath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRelativePath");
 
 }
 
 class BlinkFileEntry extends BlinkEntry {
   static final instance = new BlinkFileEntry();
 
-  createWriter_Callback_0_(mthis) => mthis.callMethod("createWriter", []);
+  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", []);
 
-  createWriter_Callback_1_(mthis, __arg_0) => mthis.callMethod("createWriter", [__arg_0]);
+  createWriter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", [__arg_0]);
 
-  createWriter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createWriter", [__arg_0, __arg_1]);
+  createWriter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", [__arg_0, __arg_1]);
 
-  file_Callback_0_(mthis) => mthis.callMethod("file", []);
+  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "file", []);
 
-  file_Callback_1_(mthis, __arg_0) => mthis.callMethod("file", [__arg_0]);
+  file_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "file", [__arg_0]);
 
-  file_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("file", [__arg_0, __arg_1]);
+  file_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "file", [__arg_0, __arg_1]);
 
 }
 
 class BlinkFileEntrySync extends BlinkEntrySync {
   static final instance = new BlinkFileEntrySync();
 
-  createWriter_Callback_0_(mthis) => mthis.callMethod("createWriter", []);
+  createWriter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createWriter", []);
 
-  file_Callback_0_(mthis) => mthis.callMethod("file", []);
+  file_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "file", []);
 
 }
 
 class BlinkFileError extends BlinkDOMError {
   static final instance = new BlinkFileError();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
 }
 
 class BlinkFileList {
   static final instance = new BlinkFileList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkFileReader extends BlinkEventTarget {
   static final instance = new BlinkFileReader();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["FileReader"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FileReader"), []);
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadend_Getter_(mthis) => mthis["onloadend"];
+  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadend");
 
   onloadend_Setter_(mthis, __arg_0) => mthis["onloadend"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  readAsArrayBuffer_Callback_0_(mthis) => mthis.callMethod("readAsArrayBuffer", []);
+  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", []);
 
-  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsArrayBuffer", [__arg_0]);
+  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", [__arg_0]);
 
-  readAsBinaryString_Callback_0_(mthis) => mthis.callMethod("readAsBinaryString", []);
+  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", []);
 
-  readAsBinaryString_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsBinaryString", [__arg_0]);
+  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", [__arg_0]);
 
-  readAsDataURL_Callback_0_(mthis) => mthis.callMethod("readAsDataURL", []);
+  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", []);
 
-  readAsDataURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsDataURL", [__arg_0]);
+  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", [__arg_0]);
 
-  readAsText_Callback_0_(mthis) => mthis.callMethod("readAsText", []);
+  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", []);
 
-  readAsText_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsText", [__arg_0]);
+  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0]);
 
-  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("readAsText", [__arg_0, __arg_1]);
+  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0, __arg_1]);
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
 }
 
 class BlinkFileReaderSync {
   static final instance = new BlinkFileReaderSync();
 
-  constructorCallback_0_() => new js.JsObject(js.context["FileReaderSync"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FileReaderSync"), []);
 
-  readAsArrayBuffer_Callback_0_(mthis) => mthis.callMethod("readAsArrayBuffer", []);
+  readAsArrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", []);
 
-  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsArrayBuffer", [__arg_0]);
+  readAsArrayBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsArrayBuffer", [__arg_0]);
 
-  readAsBinaryString_Callback_0_(mthis) => mthis.callMethod("readAsBinaryString", []);
+  readAsBinaryString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", []);
 
-  readAsBinaryString_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsBinaryString", [__arg_0]);
+  readAsBinaryString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsBinaryString", [__arg_0]);
 
-  readAsDataURL_Callback_0_(mthis) => mthis.callMethod("readAsDataURL", []);
+  readAsDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", []);
 
-  readAsDataURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsDataURL", [__arg_0]);
+  readAsDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsDataURL", [__arg_0]);
 
-  readAsText_Callback_0_(mthis) => mthis.callMethod("readAsText", []);
+  readAsText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", []);
 
-  readAsText_Callback_1_(mthis, __arg_0) => mthis.callMethod("readAsText", [__arg_0]);
+  readAsText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0]);
 
-  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("readAsText", [__arg_0, __arg_1]);
+  readAsText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "readAsText", [__arg_0, __arg_1]);
 
 }
 
 class BlinkFileWriter extends BlinkEventTarget {
   static final instance = new BlinkFileWriter();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onwrite_Getter_(mthis) => mthis["onwrite"];
+  onwrite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwrite");
 
   onwrite_Setter_(mthis, __arg_0) => mthis["onwrite"] = __arg_0;
 
-  onwriteend_Getter_(mthis) => mthis["onwriteend"];
+  onwriteend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwriteend");
 
   onwriteend_Setter_(mthis, __arg_0) => mthis["onwriteend"] = __arg_0;
 
-  onwritestart_Getter_(mthis) => mthis["onwritestart"];
+  onwritestart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwritestart");
 
   onwritestart_Setter_(mthis, __arg_0) => mthis["onwritestart"] = __arg_0;
 
-  position_Getter_(mthis) => mthis["position"];
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  seek_Callback_0_(mthis) => mthis.callMethod("seek", []);
+  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "seek", []);
 
-  seek_Callback_1_(mthis, __arg_0) => mthis.callMethod("seek", [__arg_0]);
+  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "seek", [__arg_0]);
 
-  truncate_Callback_0_(mthis) => mthis.callMethod("truncate", []);
+  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "truncate", []);
 
-  truncate_Callback_1_(mthis, __arg_0) => mthis.callMethod("truncate", [__arg_0]);
+  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "truncate", [__arg_0]);
 
-  write_Callback_0_(mthis) => mthis.callMethod("write", []);
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
 
-  write_Callback_1_(mthis, __arg_0) => mthis.callMethod("write", [__arg_0]);
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
 
 }
 
 class BlinkFileWriterSync {
   static final instance = new BlinkFileWriterSync();
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  position_Getter_(mthis) => mthis["position"];
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
 
-  seek_Callback_0_(mthis) => mthis.callMethod("seek", []);
+  seek_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "seek", []);
 
-  seek_Callback_1_(mthis, __arg_0) => mthis.callMethod("seek", [__arg_0]);
+  seek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "seek", [__arg_0]);
 
-  truncate_Callback_0_(mthis) => mthis.callMethod("truncate", []);
+  truncate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "truncate", []);
 
-  truncate_Callback_1_(mthis, __arg_0) => mthis.callMethod("truncate", [__arg_0]);
+  truncate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "truncate", [__arg_0]);
 
-  write_Callback_0_(mthis) => mthis.callMethod("write", []);
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
 
-  write_Callback_1_(mthis, __arg_0) => mthis.callMethod("write", [__arg_0]);
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
 
 }
 
 class BlinkFocusEvent extends BlinkUIEvent {
   static final instance = new BlinkFocusEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["FocusEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FocusEvent"), [__arg_0, __arg_1]);
 
-  relatedTarget_Getter_(mthis) => mthis["relatedTarget"];
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
 
 }
 
 class BlinkFontFace {
   static final instance = new BlinkFontFace();
 
-  constructorCallback_0_() => new js.JsObject(js.context["FontFace"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["FontFace"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["FontFace"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["FontFace"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FontFace"), [__arg_0, __arg_1, __arg_2]);
 
-  family_Getter_(mthis) => mthis["family"];
+  family_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "family");
 
   family_Setter_(mthis, __arg_0) => mthis["family"] = __arg_0;
 
-  featureSettings_Getter_(mthis) => mthis["featureSettings"];
+  featureSettings_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "featureSettings");
 
   featureSettings_Setter_(mthis, __arg_0) => mthis["featureSettings"] = __arg_0;
 
-  load_Callback_0_(mthis) => mthis.callMethod("load", []);
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "load", []);
 
-  loaded_Getter_(mthis) => mthis["loaded"];
+  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loaded");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
-  stretch_Getter_(mthis) => mthis["stretch"];
+  stretch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stretch");
 
   stretch_Setter_(mthis, __arg_0) => mthis["stretch"] = __arg_0;
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
   style_Setter_(mthis, __arg_0) => mthis["style"] = __arg_0;
 
-  unicodeRange_Getter_(mthis) => mthis["unicodeRange"];
+  unicodeRange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unicodeRange");
 
   unicodeRange_Setter_(mthis, __arg_0) => mthis["unicodeRange"] = __arg_0;
 
-  variant_Getter_(mthis) => mthis["variant"];
+  variant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "variant");
 
   variant_Setter_(mthis, __arg_0) => mthis["variant"] = __arg_0;
 
-  weight_Getter_(mthis) => mthis["weight"];
+  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "weight");
 
   weight_Setter_(mthis, __arg_0) => mthis["weight"] = __arg_0;
 
@@ -4745,278 +4746,278 @@
 class BlinkFontFaceSet extends BlinkEventTarget {
   static final instance = new BlinkFontFaceSet();
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  check_Callback_0_(mthis) => mthis.callMethod("check", []);
+  check_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "check", []);
 
-  check_Callback_1_(mthis, __arg_0) => mthis.callMethod("check", [__arg_0]);
+  check_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "check", [__arg_0]);
 
-  check_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("check", [__arg_0, __arg_1]);
+  check_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "check", [__arg_0, __arg_1]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => mthis.callMethod("delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
 
-  forEach_Callback_0_(mthis) => mthis.callMethod("forEach", []);
+  forEach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forEach", []);
 
-  forEach_Callback_1_(mthis, __arg_0) => mthis.callMethod("forEach", [__arg_0]);
+  forEach_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0]);
 
-  forEach_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("forEach", [__arg_0, __arg_1]);
+  forEach_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0, __arg_1]);
 
-  has_Callback_0_(mthis) => mthis.callMethod("has", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
 
-  has_Callback_1_(mthis, __arg_0) => mthis.callMethod("has", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
 
-  onloading_Getter_(mthis) => mthis["onloading"];
+  onloading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloading");
 
   onloading_Setter_(mthis, __arg_0) => mthis["onloading"] = __arg_0;
 
-  onloadingdone_Getter_(mthis) => mthis["onloadingdone"];
+  onloadingdone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadingdone");
 
   onloadingdone_Setter_(mthis, __arg_0) => mthis["onloadingdone"] = __arg_0;
 
-  onloadingerror_Getter_(mthis) => mthis["onloadingerror"];
+  onloadingerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadingerror");
 
   onloadingerror_Setter_(mthis, __arg_0) => mthis["onloadingerror"] = __arg_0;
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
 }
 
 class BlinkFontFaceSetLoadEvent extends BlinkEvent {
   static final instance = new BlinkFontFaceSetLoadEvent();
 
-  fontfaces_Getter_(mthis) => mthis["fontfaces"];
+  fontfaces_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontfaces");
 
 }
 
 class BlinkFormData {
   static final instance = new BlinkFormData();
 
-  append_Callback_0_(mthis) => mthis.callMethod("append", []);
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "append", []);
 
-  append_Callback_1_(mthis, __arg_0) => mthis.callMethod("append", [__arg_0]);
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0]);
 
-  append_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("append", [__arg_0, __arg_1]);
+  append_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1]);
 
-  append_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("append", [__arg_0, __arg_1, __arg_2]);
+  append_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1, __arg_2]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["FormData"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FormData"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["FormData"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "FormData"), [__arg_0]);
 
 }
 
 class BlinkGainNode extends BlinkAudioNode {
   static final instance = new BlinkGainNode();
 
-  gain_Getter_(mthis) => mthis["gain"];
+  gain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gain");
 
 }
 
 class BlinkGamepad {
   static final instance = new BlinkGamepad();
 
-  axes_Getter_(mthis) => mthis["axes"];
+  axes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "axes");
 
-  connected_Getter_(mthis) => mthis["connected"];
+  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connected");
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  index_Getter_(mthis) => mthis["index"];
+  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
 
-  mapping_Getter_(mthis) => mthis["mapping"];
+  mapping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mapping");
 
-  timestamp_Getter_(mthis) => mthis["timestamp"];
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
 
 }
 
 class BlinkGamepadButton {
   static final instance = new BlinkGamepadButton();
 
-  pressed_Getter_(mthis) => mthis["pressed"];
+  pressed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pressed");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
 }
 
 class BlinkGamepadEvent extends BlinkEvent {
   static final instance = new BlinkGamepadEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["GamepadEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "GamepadEvent"), [__arg_0, __arg_1]);
 
-  gamepad_Getter_(mthis) => mthis["gamepad"];
+  gamepad_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gamepad");
 
 }
 
 class BlinkGamepadList {
   static final instance = new BlinkGamepadList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkGeofencing {
   static final instance = new BlinkGeofencing();
 
-  getRegisteredRegions_Callback_0_(mthis) => mthis.callMethod("getRegisteredRegions", []);
+  getRegisteredRegions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegisteredRegions", []);
 
-  registerRegion_Callback_0_(mthis) => mthis.callMethod("registerRegion", []);
+  registerRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "registerRegion", []);
 
-  registerRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("registerRegion", [__arg_0]);
+  registerRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerRegion", [__arg_0]);
 
-  unregisterRegion_Callback_0_(mthis) => mthis.callMethod("unregisterRegion", []);
+  unregisterRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregisterRegion", []);
 
-  unregisterRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("unregisterRegion", [__arg_0]);
+  unregisterRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unregisterRegion", [__arg_0]);
 
 }
 
 class BlinkGeofencingRegion {
   static final instance = new BlinkGeofencingRegion();
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
 }
 
 class BlinkGeolocation {
   static final instance = new BlinkGeolocation();
 
-  clearWatch_Callback_0_(mthis) => mthis.callMethod("clearWatch", []);
+  clearWatch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearWatch", []);
 
-  clearWatch_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearWatch", [__arg_0]);
+  clearWatch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearWatch", [__arg_0]);
 
-  getCurrentPosition_Callback_0_(mthis) => mthis.callMethod("getCurrentPosition", []);
+  getCurrentPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", []);
 
-  getCurrentPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("getCurrentPosition", [__arg_0]);
+  getCurrentPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0]);
 
-  getCurrentPosition_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getCurrentPosition", [__arg_0, __arg_1]);
+  getCurrentPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0, __arg_1]);
 
-  getCurrentPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getCurrentPosition", [__arg_0, __arg_1, __arg_2]);
+  getCurrentPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentPosition", [__arg_0, __arg_1, __arg_2]);
 
-  watchPosition_Callback_0_(mthis) => mthis.callMethod("watchPosition", []);
+  watchPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", []);
 
-  watchPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("watchPosition", [__arg_0]);
+  watchPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0]);
 
-  watchPosition_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("watchPosition", [__arg_0, __arg_1]);
+  watchPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0, __arg_1]);
 
-  watchPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("watchPosition", [__arg_0, __arg_1, __arg_2]);
+  watchPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "watchPosition", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkGeoposition {
   static final instance = new BlinkGeoposition();
 
-  coords_Getter_(mthis) => mthis["coords"];
+  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coords");
 
-  timestamp_Getter_(mthis) => mthis["timestamp"];
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
 
 }
 
 class BlinkHTMLAllCollection {
   static final instance = new BlinkHTMLAllCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLAnchorElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAnchorElement();
 
-  download_Getter_(mthis) => mthis["download"];
+  download_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "download");
 
   download_Setter_(mthis, __arg_0) => mthis["download"] = __arg_0;
 
-  hash_Getter_(mthis) => mthis["hash"];
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
 
   hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
   host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
 
-  hostname_Getter_(mthis) => mthis["hostname"];
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
 
   hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  hreflang_Getter_(mthis) => mthis["hreflang"];
+  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hreflang");
 
   hreflang_Setter_(mthis, __arg_0) => mthis["hreflang"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  password_Getter_(mthis) => mthis["password"];
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
 
   password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
 
-  pathname_Getter_(mthis) => mthis["pathname"];
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
 
   pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
 
-  ping_Getter_(mthis) => mthis["ping"];
+  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ping");
 
   ping_Setter_(mthis, __arg_0) => mthis["ping"] = __arg_0;
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
   port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
   protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
 
-  rel_Getter_(mthis) => mthis["rel"];
+  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rel");
 
   rel_Setter_(mthis, __arg_0) => mthis["rel"] = __arg_0;
 
-  search_Getter_(mthis) => mthis["search"];
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
 
   search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
   target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  username_Getter_(mthis) => mthis["username"];
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
 
   username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
 
@@ -5025,76 +5026,76 @@
 class BlinkHTMLAppletElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAppletElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLAreaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLAreaElement();
 
-  alt_Getter_(mthis) => mthis["alt"];
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
 
   alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
 
-  coords_Getter_(mthis) => mthis["coords"];
+  coords_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coords");
 
   coords_Setter_(mthis, __arg_0) => mthis["coords"] = __arg_0;
 
-  hash_Getter_(mthis) => mthis["hash"];
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
 
   hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
   host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
 
-  hostname_Getter_(mthis) => mthis["hostname"];
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
 
   hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  password_Getter_(mthis) => mthis["password"];
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
 
   password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
 
-  pathname_Getter_(mthis) => mthis["pathname"];
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
 
   pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
 
-  ping_Getter_(mthis) => mthis["ping"];
+  ping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ping");
 
   ping_Setter_(mthis, __arg_0) => mthis["ping"] = __arg_0;
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
   port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
   protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
 
-  search_Getter_(mthis) => mthis["search"];
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
 
   search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
 
-  shape_Getter_(mthis) => mthis["shape"];
+  shape_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shape");
 
   shape_Setter_(mthis, __arg_0) => mthis["shape"] = __arg_0;
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
   target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
-  username_Getter_(mthis) => mthis["username"];
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
 
   username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
 
@@ -5103,9 +5104,9 @@
 class BlinkHTMLAudioElement extends BlinkHTMLMediaElement {
   static final instance = new BlinkHTMLAudioElement();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Audio"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Audio"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Audio"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Audio"), [__arg_0]);
 
 }
 
@@ -5117,11 +5118,11 @@
 class BlinkHTMLBaseElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLBaseElement();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
   target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
 
@@ -5130,75 +5131,75 @@
 class BlinkHTMLBodyElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLBodyElement();
 
-  onbeforeunload_Getter_(mthis) => mthis["onbeforeunload"];
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforeunload");
 
   onbeforeunload_Setter_(mthis, __arg_0) => mthis["onbeforeunload"] = __arg_0;
 
-  onblur_Getter_(mthis) => mthis["onblur"];
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
 
   onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onfocus_Getter_(mthis) => mthis["onfocus"];
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
 
   onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
 
-  onhashchange_Getter_(mthis) => mthis["onhashchange"];
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onhashchange");
 
   onhashchange_Setter_(mthis, __arg_0) => mthis["onhashchange"] = __arg_0;
 
-  onlanguagechange_Getter_(mthis) => mthis["onlanguagechange"];
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlanguagechange");
 
   onlanguagechange_Setter_(mthis, __arg_0) => mthis["onlanguagechange"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onoffline_Getter_(mthis) => mthis["onoffline"];
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onoffline");
 
   onoffline_Setter_(mthis, __arg_0) => mthis["onoffline"] = __arg_0;
 
-  ononline_Getter_(mthis) => mthis["ononline"];
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ononline");
 
   ononline_Setter_(mthis, __arg_0) => mthis["ononline"] = __arg_0;
 
-  onorientationchange_Getter_(mthis) => mthis["onorientationchange"];
+  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onorientationchange");
 
   onorientationchange_Setter_(mthis, __arg_0) => mthis["onorientationchange"] = __arg_0;
 
-  onpagehide_Getter_(mthis) => mthis["onpagehide"];
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpagehide");
 
   onpagehide_Setter_(mthis, __arg_0) => mthis["onpagehide"] = __arg_0;
 
-  onpageshow_Getter_(mthis) => mthis["onpageshow"];
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpageshow");
 
   onpageshow_Setter_(mthis, __arg_0) => mthis["onpageshow"] = __arg_0;
 
-  onpopstate_Getter_(mthis) => mthis["onpopstate"];
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpopstate");
 
   onpopstate_Setter_(mthis, __arg_0) => mthis["onpopstate"] = __arg_0;
 
-  onresize_Getter_(mthis) => mthis["onresize"];
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
 
   onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
 
-  onscroll_Getter_(mthis) => mthis["onscroll"];
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
 
   onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
 
-  onstorage_Getter_(mthis) => mthis["onstorage"];
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstorage");
 
   onstorage_Setter_(mthis, __arg_0) => mthis["onstorage"] = __arg_0;
 
-  onunload_Getter_(mthis) => mthis["onunload"];
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunload");
 
   onunload_Setter_(mthis, __arg_0) => mthis["onunload"] = __arg_0;
 
@@ -5207,84 +5208,84 @@
 class BlinkHTMLButtonElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLButtonElement();
 
-  autofocus_Getter_(mthis) => mthis["autofocus"];
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
 
   autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  formAction_Getter_(mthis) => mthis["formAction"];
+  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formAction");
 
   formAction_Setter_(mthis, __arg_0) => mthis["formAction"] = __arg_0;
 
-  formEnctype_Getter_(mthis) => mthis["formEnctype"];
+  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formEnctype");
 
   formEnctype_Setter_(mthis, __arg_0) => mthis["formEnctype"] = __arg_0;
 
-  formMethod_Getter_(mthis) => mthis["formMethod"];
+  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formMethod");
 
   formMethod_Setter_(mthis, __arg_0) => mthis["formMethod"] = __arg_0;
 
-  formNoValidate_Getter_(mthis) => mthis["formNoValidate"];
+  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formNoValidate");
 
   formNoValidate_Setter_(mthis, __arg_0) => mthis["formNoValidate"] = __arg_0;
 
-  formTarget_Getter_(mthis) => mthis["formTarget"];
+  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formTarget");
 
   formTarget_Setter_(mthis, __arg_0) => mthis["formTarget"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
 class BlinkHTMLCanvasElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLCanvasElement();
 
-  getContext_Callback_0_(mthis) => mthis.callMethod("getContext", []);
+  getContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContext", []);
 
-  getContext_Callback_1_(mthis, __arg_0) => mthis.callMethod("getContext", [__arg_0]);
+  getContext_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getContext", [__arg_0]);
 
-  getContext_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getContext", [__arg_0, __arg_1]);
+  getContext_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getContext", [__arg_0, __arg_1]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  toDataURL_Callback_0_(mthis) => mthis.callMethod("toDataURL", []);
+  toDataURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", []);
 
-  toDataURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("toDataURL", [__arg_0]);
+  toDataURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", [__arg_0]);
 
-  toDataURL_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("toDataURL", [__arg_0, __arg_1]);
+  toDataURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "toDataURL", [__arg_0, __arg_1]);
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
@@ -5293,26 +5294,26 @@
 class BlinkHTMLCollection {
   static final instance = new BlinkHTMLCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLContentElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLContentElement();
 
-  getDistributedNodes_Callback_0_(mthis) => mthis.callMethod("getDistributedNodes", []);
+  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDistributedNodes", []);
 
-  select_Getter_(mthis) => mthis["select"];
+  select_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "select");
 
   select_Setter_(mthis, __arg_0) => mthis["select"] = __arg_0;
 
@@ -5326,14 +5327,14 @@
 class BlinkHTMLDataListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDataListElement();
 
-  options_Getter_(mthis) => mthis["options"];
+  options_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "options");
 
 }
 
 class BlinkHTMLDetailsElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDetailsElement();
 
-  open_Getter_(mthis) => mthis["open"];
+  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "open");
 
   open_Setter_(mthis, __arg_0) => mthis["open"] = __arg_0;
 
@@ -5342,21 +5343,21 @@
 class BlinkHTMLDialogElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLDialogElement();
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  close_Callback_1_(mthis, __arg_0) => mthis.callMethod("close", [__arg_0]);
+  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0]);
 
-  open_Getter_(mthis) => mthis["open"];
+  open_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "open");
 
   open_Setter_(mthis, __arg_0) => mthis["open"] = __arg_0;
 
-  returnValue_Getter_(mthis) => mthis["returnValue"];
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
 
   returnValue_Setter_(mthis, __arg_0) => mthis["returnValue"] = __arg_0;
 
-  showModal_Callback_0_(mthis) => mthis.callMethod("showModal", []);
+  showModal_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showModal", []);
 
-  show_Callback_0_(mthis) => mthis.callMethod("show", []);
+  show_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "show", []);
 
 }
 
@@ -5373,354 +5374,354 @@
 class BlinkHTMLDocument extends BlinkDocument {
   static final instance = new BlinkHTMLDocument();
 
-  alinkColor_Getter_(mthis) => mthis["alinkColor"];
+  alinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alinkColor");
 
   alinkColor_Setter_(mthis, __arg_0) => mthis["alinkColor"] = __arg_0;
 
-  bgColor_Getter_(mthis) => mthis["bgColor"];
+  bgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bgColor");
 
   bgColor_Setter_(mthis, __arg_0) => mthis["bgColor"] = __arg_0;
 
-  captureEvents_Callback_0_(mthis) => mthis.callMethod("captureEvents", []);
+  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "captureEvents", []);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  compatMode_Getter_(mthis) => mthis["compatMode"];
+  compatMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compatMode");
 
-  fgColor_Getter_(mthis) => mthis["fgColor"];
+  fgColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fgColor");
 
   fgColor_Setter_(mthis, __arg_0) => mthis["fgColor"] = __arg_0;
 
-  linkColor_Getter_(mthis) => mthis["linkColor"];
+  linkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "linkColor");
 
   linkColor_Setter_(mthis, __arg_0) => mthis["linkColor"] = __arg_0;
 
-  open_Callback_0_(mthis) => mthis.callMethod("open", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
 
-  releaseEvents_Callback_0_(mthis) => mthis.callMethod("releaseEvents", []);
+  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "releaseEvents", []);
 
-  vlinkColor_Getter_(mthis) => mthis["vlinkColor"];
+  vlinkColor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vlinkColor");
 
   vlinkColor_Setter_(mthis, __arg_0) => mthis["vlinkColor"] = __arg_0;
 
-  write_Callback_0_(mthis) => mthis.callMethod("write", []);
+  write_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "write", []);
 
-  write_Callback_1_(mthis, __arg_0) => mthis.callMethod("write", [__arg_0]);
+  write_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "write", [__arg_0]);
 
-  writeln_Callback_0_(mthis) => mthis.callMethod("writeln", []);
+  writeln_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "writeln", []);
 
-  writeln_Callback_1_(mthis, __arg_0) => mthis.callMethod("writeln", [__arg_0]);
+  writeln_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "writeln", [__arg_0]);
 
 }
 
 class BlinkHTMLElement extends BlinkElement {
   static final instance = new BlinkHTMLElement();
 
-  accessKey_Getter_(mthis) => mthis["accessKey"];
+  accessKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accessKey");
 
   accessKey_Setter_(mthis, __arg_0) => mthis["accessKey"] = __arg_0;
 
-  click_Callback_0_(mthis) => mthis.callMethod("click", []);
+  click_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "click", []);
 
-  contentEditable_Getter_(mthis) => mthis["contentEditable"];
+  contentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentEditable");
 
   contentEditable_Setter_(mthis, __arg_0) => mthis["contentEditable"] = __arg_0;
 
-  contextMenu_Getter_(mthis) => mthis["contextMenu"];
+  contextMenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contextMenu");
 
   contextMenu_Setter_(mthis, __arg_0) => mthis["contextMenu"] = __arg_0;
 
-  dir_Getter_(mthis) => mthis["dir"];
+  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dir");
 
   dir_Setter_(mthis, __arg_0) => mthis["dir"] = __arg_0;
 
-  draggable_Getter_(mthis) => mthis["draggable"];
+  draggable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "draggable");
 
   draggable_Setter_(mthis, __arg_0) => mthis["draggable"] = __arg_0;
 
-  hidden_Getter_(mthis) => mthis["hidden"];
+  hidden_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hidden");
 
   hidden_Setter_(mthis, __arg_0) => mthis["hidden"] = __arg_0;
 
-  innerText_Getter_(mthis) => mthis["innerText"];
+  innerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerText");
 
   innerText_Setter_(mthis, __arg_0) => mthis["innerText"] = __arg_0;
 
-  inputMethodContext_Getter_(mthis) => mthis["inputMethodContext"];
+  inputMethodContext_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMethodContext");
 
-  isContentEditable_Getter_(mthis) => mthis["isContentEditable"];
+  isContentEditable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isContentEditable");
 
-  lang_Getter_(mthis) => mthis["lang"];
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
 
   lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onautocomplete_Getter_(mthis) => mthis["onautocomplete"];
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
 
   onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
 
-  onautocompleteerror_Getter_(mthis) => mthis["onautocompleteerror"];
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
 
   onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
 
-  onblur_Getter_(mthis) => mthis["onblur"];
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
 
   onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
 
-  oncancel_Getter_(mthis) => mthis["oncancel"];
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
 
   oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
 
-  oncanplay_Getter_(mthis) => mthis["oncanplay"];
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
 
   oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
 
-  oncanplaythrough_Getter_(mthis) => mthis["oncanplaythrough"];
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
 
   oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onclick_Getter_(mthis) => mthis["onclick"];
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
 
   onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  oncontextmenu_Getter_(mthis) => mthis["oncontextmenu"];
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
 
   oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
 
-  oncuechange_Getter_(mthis) => mthis["oncuechange"];
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
 
   oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
 
-  ondblclick_Getter_(mthis) => mthis["ondblclick"];
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
 
   ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
 
-  ondrag_Getter_(mthis) => mthis["ondrag"];
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
 
   ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
 
-  ondragend_Getter_(mthis) => mthis["ondragend"];
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
 
   ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
 
-  ondragenter_Getter_(mthis) => mthis["ondragenter"];
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
 
   ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
 
-  ondragleave_Getter_(mthis) => mthis["ondragleave"];
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
 
   ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
 
-  ondragover_Getter_(mthis) => mthis["ondragover"];
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
 
   ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
 
-  ondragstart_Getter_(mthis) => mthis["ondragstart"];
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
 
   ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
 
-  ondrop_Getter_(mthis) => mthis["ondrop"];
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
 
   ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
 
-  ondurationchange_Getter_(mthis) => mthis["ondurationchange"];
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
 
   ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
 
-  onemptied_Getter_(mthis) => mthis["onemptied"];
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
 
   onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onfocus_Getter_(mthis) => mthis["onfocus"];
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
 
   onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
 
-  oninput_Getter_(mthis) => mthis["oninput"];
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
 
   oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
 
-  oninvalid_Getter_(mthis) => mthis["oninvalid"];
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
 
   oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
 
-  onkeydown_Getter_(mthis) => mthis["onkeydown"];
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
 
   onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
 
-  onkeypress_Getter_(mthis) => mthis["onkeypress"];
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
 
   onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
 
-  onkeyup_Getter_(mthis) => mthis["onkeyup"];
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
 
   onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadeddata_Getter_(mthis) => mthis["onloadeddata"];
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
 
   onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
 
-  onloadedmetadata_Getter_(mthis) => mthis["onloadedmetadata"];
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
 
   onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onmousedown_Getter_(mthis) => mthis["onmousedown"];
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
 
   onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
 
-  onmouseenter_Getter_(mthis) => mthis["onmouseenter"];
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
 
   onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
 
-  onmouseleave_Getter_(mthis) => mthis["onmouseleave"];
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
 
   onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
 
-  onmousemove_Getter_(mthis) => mthis["onmousemove"];
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
 
   onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
 
-  onmouseout_Getter_(mthis) => mthis["onmouseout"];
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
 
   onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
 
-  onmouseover_Getter_(mthis) => mthis["onmouseover"];
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
 
   onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
 
-  onmouseup_Getter_(mthis) => mthis["onmouseup"];
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
 
   onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
 
-  onmousewheel_Getter_(mthis) => mthis["onmousewheel"];
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
 
   onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
 
-  onpause_Getter_(mthis) => mthis["onpause"];
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
 
   onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
 
-  onplay_Getter_(mthis) => mthis["onplay"];
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
 
   onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
 
-  onplaying_Getter_(mthis) => mthis["onplaying"];
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
 
   onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onratechange_Getter_(mthis) => mthis["onratechange"];
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
 
   onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
 
-  onreset_Getter_(mthis) => mthis["onreset"];
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
 
   onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
 
-  onresize_Getter_(mthis) => mthis["onresize"];
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
 
   onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
 
-  onscroll_Getter_(mthis) => mthis["onscroll"];
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
 
   onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
 
-  onseeked_Getter_(mthis) => mthis["onseeked"];
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
 
   onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
 
-  onseeking_Getter_(mthis) => mthis["onseeking"];
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
 
   onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
 
-  onselect_Getter_(mthis) => mthis["onselect"];
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
 
   onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
 
-  onshow_Getter_(mthis) => mthis["onshow"];
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
 
   onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
 
-  onstalled_Getter_(mthis) => mthis["onstalled"];
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
 
   onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
 
-  onsubmit_Getter_(mthis) => mthis["onsubmit"];
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
 
   onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
 
-  onsuspend_Getter_(mthis) => mthis["onsuspend"];
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
 
   onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
 
-  ontimeupdate_Getter_(mthis) => mthis["ontimeupdate"];
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
 
   ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
 
-  ontoggle_Getter_(mthis) => mthis["ontoggle"];
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
 
   ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
 
-  onvolumechange_Getter_(mthis) => mthis["onvolumechange"];
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
 
   onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
 
-  onwaiting_Getter_(mthis) => mthis["onwaiting"];
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
 
   onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
 
-  outerText_Getter_(mthis) => mthis["outerText"];
+  outerText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerText");
 
   outerText_Setter_(mthis, __arg_0) => mthis["outerText"] = __arg_0;
 
-  spellcheck_Getter_(mthis) => mthis["spellcheck"];
+  spellcheck_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spellcheck");
 
   spellcheck_Setter_(mthis, __arg_0) => mthis["spellcheck"] = __arg_0;
 
-  tabIndex_Getter_(mthis) => mthis["tabIndex"];
+  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tabIndex");
 
   tabIndex_Setter_(mthis, __arg_0) => mthis["tabIndex"] = __arg_0;
 
-  title_Getter_(mthis) => mthis["title"];
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
 
   title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
 
-  translate_Getter_(mthis) => mthis["translate"];
+  translate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "translate");
 
   translate_Setter_(mthis, __arg_0) => mthis["translate"] = __arg_0;
 
-  webkitdropzone_Getter_(mthis) => mthis["webkitdropzone"];
+  webkitdropzone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitdropzone");
 
   webkitdropzone_Setter_(mthis, __arg_0) => mthis["webkitdropzone"] = __arg_0;
 
@@ -5729,37 +5730,37 @@
 class BlinkHTMLEmbedElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLEmbedElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  align_Getter_(mthis) => mthis["align"];
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
 
   align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
 
-  getSVGDocument_Callback_0_(mthis) => mthis.callMethod("getSVGDocument", []);
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
@@ -5768,31 +5769,31 @@
 class BlinkHTMLFieldSetElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFieldSetElement();
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  elements_Getter_(mthis) => mthis["elements"];
+  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elements");
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
@@ -5804,64 +5805,64 @@
 class BlinkHTMLFormControlsCollection extends BlinkHTMLCollection {
   static final instance = new BlinkHTMLFormControlsCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
 }
 
 class BlinkHTMLFormElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFormElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  acceptCharset_Getter_(mthis) => mthis["acceptCharset"];
+  acceptCharset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "acceptCharset");
 
   acceptCharset_Setter_(mthis, __arg_0) => mthis["acceptCharset"] = __arg_0;
 
-  action_Getter_(mthis) => mthis["action"];
+  action_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "action");
 
   action_Setter_(mthis, __arg_0) => mthis["action"] = __arg_0;
 
-  autocomplete_Getter_(mthis) => mthis["autocomplete"];
+  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autocomplete");
 
   autocomplete_Setter_(mthis, __arg_0) => mthis["autocomplete"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  elements_Getter_(mthis) => mthis["elements"];
+  elements_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elements");
 
-  encoding_Getter_(mthis) => mthis["encoding"];
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
 
   encoding_Setter_(mthis, __arg_0) => mthis["encoding"] = __arg_0;
 
-  enctype_Getter_(mthis) => mthis["enctype"];
+  enctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enctype");
 
   enctype_Setter_(mthis, __arg_0) => mthis["enctype"] = __arg_0;
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  method_Getter_(mthis) => mthis["method"];
+  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
 
   method_Setter_(mthis, __arg_0) => mthis["method"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  noValidate_Getter_(mthis) => mthis["noValidate"];
+  noValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "noValidate");
 
   noValidate_Setter_(mthis, __arg_0) => mthis["noValidate"] = __arg_0;
 
-  requestAutocomplete_Callback_0_(mthis) => mthis.callMethod("requestAutocomplete", []);
+  requestAutocomplete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestAutocomplete", []);
 
-  reset_Callback_0_(mthis) => mthis.callMethod("reset", []);
+  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reset", []);
 
-  submit_Callback_0_(mthis) => mthis.callMethod("submit", []);
+  submit_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "submit", []);
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
   target_Setter_(mthis, __arg_0) => mthis["target"] = __arg_0;
 
@@ -5875,14 +5876,14 @@
 class BlinkHTMLFrameSetElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLFrameSetElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
 }
 
 class BlinkHTMLHRElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLHRElement();
 
-  color_Getter_(mthis) => mthis["color"];
+  color_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "color");
 
   color_Setter_(mthis, __arg_0) => mthis["color"] = __arg_0;
 
@@ -5906,41 +5907,41 @@
 class BlinkHTMLIFrameElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLIFrameElement();
 
-  allowFullscreen_Getter_(mthis) => mthis["allowFullscreen"];
+  allowFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "allowFullscreen");
 
   allowFullscreen_Setter_(mthis, __arg_0) => mthis["allowFullscreen"] = __arg_0;
 
-  contentDocument_Getter_(mthis) => mthis["contentDocument"];
+  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentDocument");
 
-  contentWindow_Getter_(mthis) => mthis["contentWindow"];
+  contentWindow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentWindow");
 
-  getSVGDocument_Callback_0_(mthis) => mthis.callMethod("getSVGDocument", []);
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  sandbox_Getter_(mthis) => mthis["sandbox"];
+  sandbox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sandbox");
 
   sandbox_Setter_(mthis, __arg_0) => mthis["sandbox"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  srcdoc_Getter_(mthis) => mthis["srcdoc"];
+  srcdoc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcdoc");
 
   srcdoc_Setter_(mthis, __arg_0) => mthis["srcdoc"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
@@ -5949,346 +5950,346 @@
 class BlinkHTMLImageElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLImageElement();
 
-  alt_Getter_(mthis) => mthis["alt"];
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
 
   alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
 
-  border_Getter_(mthis) => mthis["border"];
+  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "border");
 
   border_Setter_(mthis, __arg_0) => mthis["border"] = __arg_0;
 
-  complete_Getter_(mthis) => mthis["complete"];
+  complete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "complete");
 
-  constructorCallback_0_() => new js.JsObject(js.context["Image"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Image"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Image"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Image"), [__arg_0, __arg_1]);
 
-  crossOrigin_Getter_(mthis) => mthis["crossOrigin"];
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
 
   crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
 
-  currentSrc_Getter_(mthis) => mthis["currentSrc"];
+  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentSrc");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  isMap_Getter_(mthis) => mthis["isMap"];
+  isMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isMap");
 
   isMap_Setter_(mthis, __arg_0) => mthis["isMap"] = __arg_0;
 
-  lowsrc_Getter_(mthis) => mthis["lowsrc"];
+  lowsrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lowsrc");
 
   lowsrc_Setter_(mthis, __arg_0) => mthis["lowsrc"] = __arg_0;
 
-  naturalHeight_Getter_(mthis) => mthis["naturalHeight"];
+  naturalHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "naturalHeight");
 
-  naturalWidth_Getter_(mthis) => mthis["naturalWidth"];
+  naturalWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "naturalWidth");
 
-  sizes_Getter_(mthis) => mthis["sizes"];
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
 
   sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  srcset_Getter_(mthis) => mthis["srcset"];
+  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcset");
 
   srcset_Setter_(mthis, __arg_0) => mthis["srcset"] = __arg_0;
 
-  useMap_Getter_(mthis) => mthis["useMap"];
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
 
   useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkHTMLInputElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLInputElement();
 
-  accept_Getter_(mthis) => mthis["accept"];
+  accept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "accept");
 
   accept_Setter_(mthis, __arg_0) => mthis["accept"] = __arg_0;
 
-  alt_Getter_(mthis) => mthis["alt"];
+  alt_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alt");
 
   alt_Setter_(mthis, __arg_0) => mthis["alt"] = __arg_0;
 
-  autocomplete_Getter_(mthis) => mthis["autocomplete"];
+  autocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autocomplete");
 
   autocomplete_Setter_(mthis, __arg_0) => mthis["autocomplete"] = __arg_0;
 
-  autofocus_Getter_(mthis) => mthis["autofocus"];
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
 
   autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
 
-  capture_Getter_(mthis) => mthis["capture"];
+  capture_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "capture");
 
   capture_Setter_(mthis, __arg_0) => mthis["capture"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  checked_Getter_(mthis) => mthis["checked"];
+  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "checked");
 
   checked_Setter_(mthis, __arg_0) => mthis["checked"] = __arg_0;
 
-  defaultChecked_Getter_(mthis) => mthis["defaultChecked"];
+  defaultChecked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultChecked");
 
   defaultChecked_Setter_(mthis, __arg_0) => mthis["defaultChecked"] = __arg_0;
 
-  defaultValue_Getter_(mthis) => mthis["defaultValue"];
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
 
   defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
 
-  dirName_Getter_(mthis) => mthis["dirName"];
+  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dirName");
 
   dirName_Setter_(mthis, __arg_0) => mthis["dirName"] = __arg_0;
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  files_Getter_(mthis) => mthis["files"];
+  files_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "files");
 
   files_Setter_(mthis, __arg_0) => mthis["files"] = __arg_0;
 
-  formAction_Getter_(mthis) => mthis["formAction"];
+  formAction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formAction");
 
   formAction_Setter_(mthis, __arg_0) => mthis["formAction"] = __arg_0;
 
-  formEnctype_Getter_(mthis) => mthis["formEnctype"];
+  formEnctype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formEnctype");
 
   formEnctype_Setter_(mthis, __arg_0) => mthis["formEnctype"] = __arg_0;
 
-  formMethod_Getter_(mthis) => mthis["formMethod"];
+  formMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formMethod");
 
   formMethod_Setter_(mthis, __arg_0) => mthis["formMethod"] = __arg_0;
 
-  formNoValidate_Getter_(mthis) => mthis["formNoValidate"];
+  formNoValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formNoValidate");
 
   formNoValidate_Setter_(mthis, __arg_0) => mthis["formNoValidate"] = __arg_0;
 
-  formTarget_Getter_(mthis) => mthis["formTarget"];
+  formTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "formTarget");
 
   formTarget_Setter_(mthis, __arg_0) => mthis["formTarget"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  incremental_Getter_(mthis) => mthis["incremental"];
+  incremental_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "incremental");
 
   incremental_Setter_(mthis, __arg_0) => mthis["incremental"] = __arg_0;
 
-  indeterminate_Getter_(mthis) => mthis["indeterminate"];
+  indeterminate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indeterminate");
 
   indeterminate_Setter_(mthis, __arg_0) => mthis["indeterminate"] = __arg_0;
 
-  inputMode_Getter_(mthis) => mthis["inputMode"];
+  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMode");
 
   inputMode_Setter_(mthis, __arg_0) => mthis["inputMode"] = __arg_0;
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  list_Getter_(mthis) => mthis["list"];
+  list_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "list");
 
-  maxLength_Getter_(mthis) => mthis["maxLength"];
+  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxLength");
 
   maxLength_Setter_(mthis, __arg_0) => mthis["maxLength"] = __arg_0;
 
-  max_Getter_(mthis) => mthis["max"];
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
 
   max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
 
-  min_Getter_(mthis) => mthis["min"];
+  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "min");
 
   min_Setter_(mthis, __arg_0) => mthis["min"] = __arg_0;
 
-  multiple_Getter_(mthis) => mthis["multiple"];
+  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiple");
 
   multiple_Setter_(mthis, __arg_0) => mthis["multiple"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  pattern_Getter_(mthis) => mthis["pattern"];
+  pattern_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pattern");
 
   pattern_Setter_(mthis, __arg_0) => mthis["pattern"] = __arg_0;
 
-  placeholder_Getter_(mthis) => mthis["placeholder"];
+  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "placeholder");
 
   placeholder_Setter_(mthis, __arg_0) => mthis["placeholder"] = __arg_0;
 
-  readOnly_Getter_(mthis) => mthis["readOnly"];
+  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readOnly");
 
   readOnly_Setter_(mthis, __arg_0) => mthis["readOnly"] = __arg_0;
 
-  required_Getter_(mthis) => mthis["required"];
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
 
   required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
 
-  select_Callback_0_(mthis) => mthis.callMethod("select", []);
+  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "select", []);
 
-  selectionDirection_Getter_(mthis) => mthis["selectionDirection"];
+  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionDirection");
 
   selectionDirection_Setter_(mthis, __arg_0) => mthis["selectionDirection"] = __arg_0;
 
-  selectionEnd_Getter_(mthis) => mthis["selectionEnd"];
+  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionEnd");
 
   selectionEnd_Setter_(mthis, __arg_0) => mthis["selectionEnd"] = __arg_0;
 
-  selectionStart_Getter_(mthis) => mthis["selectionStart"];
+  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionStart");
 
   selectionStart_Setter_(mthis, __arg_0) => mthis["selectionStart"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  setRangeText_Callback_0_(mthis) => mthis.callMethod("setRangeText", []);
+  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", []);
 
-  setRangeText_Callback_1_(mthis, __arg_0) => mthis.callMethod("setRangeText", [__arg_0]);
+  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0]);
 
-  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setRangeText", [__arg_0, __arg_1]);
+  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1]);
 
-  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setRangeText", [__arg_0, __arg_1, __arg_2]);
+  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2]);
 
-  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  setSelectionRange_Callback_0_(mthis) => mthis.callMethod("setSelectionRange", []);
+  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", []);
 
-  setSelectionRange_Callback_1_(mthis, __arg_0) => mthis.callMethod("setSelectionRange", [__arg_0]);
+  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0]);
 
-  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setSelectionRange", [__arg_0, __arg_1]);
+  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1]);
 
-  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setSelectionRange", [__arg_0, __arg_1, __arg_2]);
+  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
   size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  stepDown_Callback_0_(mthis) => mthis.callMethod("stepDown", []);
+  stepDown_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepDown", []);
 
-  stepDown_Callback_1_(mthis, __arg_0) => mthis.callMethod("stepDown", [__arg_0]);
+  stepDown_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stepDown", [__arg_0]);
 
-  stepUp_Callback_0_(mthis) => mthis.callMethod("stepUp", []);
+  stepUp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepUp", []);
 
-  stepUp_Callback_1_(mthis, __arg_0) => mthis.callMethod("stepUp", [__arg_0]);
+  stepUp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stepUp", [__arg_0]);
 
-  step_Getter_(mthis) => mthis["step"];
+  step_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "step");
 
   step_Setter_(mthis, __arg_0) => mthis["step"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  useMap_Getter_(mthis) => mthis["useMap"];
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
 
   useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  valueAsDate_Getter_(mthis) => mthis["valueAsDate"];
+  valueAsDate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsDate");
 
   valueAsDate_Setter_(mthis, __arg_0) => mthis["valueAsDate"] = __arg_0;
 
-  valueAsNumber_Getter_(mthis) => mthis["valueAsNumber"];
+  valueAsNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsNumber");
 
   valueAsNumber_Setter_(mthis, __arg_0) => mthis["valueAsNumber"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
-  webkitEntries_Getter_(mthis) => mthis["webkitEntries"];
+  webkitEntries_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitEntries");
 
-  webkitdirectory_Getter_(mthis) => mthis["webkitdirectory"];
+  webkitdirectory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitdirectory");
 
   webkitdirectory_Setter_(mthis, __arg_0) => mthis["webkitdirectory"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
 class BlinkHTMLKeygenElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLKeygenElement();
 
-  autofocus_Getter_(mthis) => mthis["autofocus"];
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
 
   autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
 
-  challenge_Getter_(mthis) => mthis["challenge"];
+  challenge_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "challenge");
 
   challenge_Setter_(mthis, __arg_0) => mthis["challenge"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  keytype_Getter_(mthis) => mthis["keytype"];
+  keytype_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keytype");
 
   keytype_Setter_(mthis, __arg_0) => mthis["keytype"] = __arg_0;
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
 class BlinkHTMLLIElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLIElement();
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -6297,11 +6298,11 @@
 class BlinkHTMLLabelElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLabelElement();
 
-  control_Getter_(mthis) => mthis["control"];
+  control_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "control");
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  htmlFor_Getter_(mthis) => mthis["htmlFor"];
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
 
   htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
 
@@ -6310,50 +6311,50 @@
 class BlinkHTMLLegendElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLegendElement();
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
 }
 
 class BlinkHTMLLinkElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLLinkElement();
 
-  crossOrigin_Getter_(mthis) => mthis["crossOrigin"];
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
 
   crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  hreflang_Getter_(mthis) => mthis["hreflang"];
+  hreflang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hreflang");
 
   hreflang_Setter_(mthis, __arg_0) => mthis["hreflang"] = __arg_0;
 
-  import_Getter_(mthis) => mthis["import"];
+  import_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "import");
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
   media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
 
-  rel_Getter_(mthis) => mthis["rel"];
+  rel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rel");
 
   rel_Setter_(mthis, __arg_0) => mthis["rel"] = __arg_0;
 
-  sheet_Getter_(mthis) => mthis["sheet"];
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
 
-  sizes_Getter_(mthis) => mthis["sizes"];
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
 
   sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -6362,9 +6363,9 @@
 class BlinkHTMLMapElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMapElement();
 
-  areas_Getter_(mthis) => mthis["areas"];
+  areas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "areas");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
@@ -6378,176 +6379,176 @@
 class BlinkHTMLMediaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMediaElement();
 
-  addTextTrack_Callback_0_(mthis) => mthis.callMethod("addTextTrack", []);
+  addTextTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", []);
 
-  addTextTrack_Callback_1_(mthis, __arg_0) => mthis.callMethod("addTextTrack", [__arg_0]);
+  addTextTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0]);
 
-  addTextTrack_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addTextTrack", [__arg_0, __arg_1]);
+  addTextTrack_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0, __arg_1]);
 
-  addTextTrack_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("addTextTrack", [__arg_0, __arg_1, __arg_2]);
+  addTextTrack_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addTextTrack", [__arg_0, __arg_1, __arg_2]);
 
-  audioTracks_Getter_(mthis) => mthis["audioTracks"];
+  audioTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "audioTracks");
 
-  autoplay_Getter_(mthis) => mthis["autoplay"];
+  autoplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autoplay");
 
   autoplay_Setter_(mthis, __arg_0) => mthis["autoplay"] = __arg_0;
 
-  buffered_Getter_(mthis) => mthis["buffered"];
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
 
-  canPlayType_Callback_0_(mthis) => mthis.callMethod("canPlayType", []);
+  canPlayType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", []);
 
-  canPlayType_Callback_1_(mthis, __arg_0) => mthis.callMethod("canPlayType", [__arg_0]);
+  canPlayType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", [__arg_0]);
 
-  canPlayType_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("canPlayType", [__arg_0, __arg_1]);
+  canPlayType_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "canPlayType", [__arg_0, __arg_1]);
 
-  controller_Getter_(mthis) => mthis["controller"];
+  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controller");
 
   controller_Setter_(mthis, __arg_0) => mthis["controller"] = __arg_0;
 
-  controls_Getter_(mthis) => mthis["controls"];
+  controls_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controls");
 
   controls_Setter_(mthis, __arg_0) => mthis["controls"] = __arg_0;
 
-  crossOrigin_Getter_(mthis) => mthis["crossOrigin"];
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
 
   crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
 
-  currentSrc_Getter_(mthis) => mthis["currentSrc"];
+  currentSrc_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentSrc");
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
   currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
 
-  defaultMuted_Getter_(mthis) => mthis["defaultMuted"];
+  defaultMuted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultMuted");
 
   defaultMuted_Setter_(mthis, __arg_0) => mthis["defaultMuted"] = __arg_0;
 
-  defaultPlaybackRate_Getter_(mthis) => mthis["defaultPlaybackRate"];
+  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPlaybackRate");
 
   defaultPlaybackRate_Setter_(mthis, __arg_0) => mthis["defaultPlaybackRate"] = __arg_0;
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  ended_Getter_(mthis) => mthis["ended"];
+  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ended");
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  load_Callback_0_(mthis) => mthis.callMethod("load", []);
+  load_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "load", []);
 
-  loop_Getter_(mthis) => mthis["loop"];
+  loop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loop");
 
   loop_Setter_(mthis, __arg_0) => mthis["loop"] = __arg_0;
 
-  mediaGroup_Getter_(mthis) => mthis["mediaGroup"];
+  mediaGroup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaGroup");
 
   mediaGroup_Setter_(mthis, __arg_0) => mthis["mediaGroup"] = __arg_0;
 
-  mediaKeys_Getter_(mthis) => mthis["mediaKeys"];
+  mediaKeys_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaKeys");
 
-  muted_Getter_(mthis) => mthis["muted"];
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
 
   muted_Setter_(mthis, __arg_0) => mthis["muted"] = __arg_0;
 
-  networkState_Getter_(mthis) => mthis["networkState"];
+  networkState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "networkState");
 
-  onneedkey_Getter_(mthis) => mthis["onneedkey"];
+  onneedkey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onneedkey");
 
   onneedkey_Setter_(mthis, __arg_0) => mthis["onneedkey"] = __arg_0;
 
-  onwebkitkeyadded_Getter_(mthis) => mthis["onwebkitkeyadded"];
+  onwebkitkeyadded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeyadded");
 
   onwebkitkeyadded_Setter_(mthis, __arg_0) => mthis["onwebkitkeyadded"] = __arg_0;
 
-  onwebkitkeyerror_Getter_(mthis) => mthis["onwebkitkeyerror"];
+  onwebkitkeyerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeyerror");
 
   onwebkitkeyerror_Setter_(mthis, __arg_0) => mthis["onwebkitkeyerror"] = __arg_0;
 
-  onwebkitkeymessage_Getter_(mthis) => mthis["onwebkitkeymessage"];
+  onwebkitkeymessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitkeymessage");
 
   onwebkitkeymessage_Setter_(mthis, __arg_0) => mthis["onwebkitkeymessage"] = __arg_0;
 
-  onwebkitneedkey_Getter_(mthis) => mthis["onwebkitneedkey"];
+  onwebkitneedkey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitneedkey");
 
   onwebkitneedkey_Setter_(mthis, __arg_0) => mthis["onwebkitneedkey"] = __arg_0;
 
-  pause_Callback_0_(mthis) => mthis.callMethod("pause", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
 
-  paused_Getter_(mthis) => mthis["paused"];
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
 
-  play_Callback_0_(mthis) => mthis.callMethod("play", []);
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
 
-  playbackRate_Getter_(mthis) => mthis["playbackRate"];
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
 
   playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
 
-  played_Getter_(mthis) => mthis["played"];
+  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "played");
 
-  preload_Getter_(mthis) => mthis["preload"];
+  preload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preload");
 
   preload_Setter_(mthis, __arg_0) => mthis["preload"] = __arg_0;
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  seekable_Getter_(mthis) => mthis["seekable"];
+  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seekable");
 
-  seeking_Getter_(mthis) => mthis["seeking"];
+  seeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seeking");
 
-  setMediaKeys_Callback_0_(mthis) => mthis.callMethod("setMediaKeys", []);
+  setMediaKeys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMediaKeys", []);
 
-  setMediaKeys_Callback_1_(mthis, __arg_0) => mthis.callMethod("setMediaKeys", [__arg_0]);
+  setMediaKeys_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMediaKeys", [__arg_0]);
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  textTracks_Getter_(mthis) => mthis["textTracks"];
+  textTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textTracks");
 
-  videoTracks_Getter_(mthis) => mthis["videoTracks"];
+  videoTracks_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoTracks");
 
-  volume_Getter_(mthis) => mthis["volume"];
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
 
   volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
 
-  webkitAddKey_Callback_0_(mthis) => mthis.callMethod("webkitAddKey", []);
+  webkitAddKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", []);
 
-  webkitAddKey_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitAddKey", [__arg_0]);
+  webkitAddKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0]);
 
-  webkitAddKey_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitAddKey", [__arg_0, __arg_1]);
+  webkitAddKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0, __arg_1]);
 
-  webkitAddKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitAddKey", [__arg_0, __arg_1, __arg_2]);
+  webkitAddKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitAddKey", [__arg_0, __arg_1, __arg_2]);
 
-  webkitAddKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("webkitAddKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  webkitAudioDecodedByteCount_Getter_(mthis) => mthis["webkitAudioDecodedByteCount"];
+  webkitAudioDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitAudioDecodedByteCount");
 
-  webkitCancelKeyRequest_Callback_0_(mthis) => mthis.callMethod("webkitCancelKeyRequest", []);
+  webkitCancelKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", []);
 
-  webkitCancelKeyRequest_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitCancelKeyRequest", [__arg_0]);
+  webkitCancelKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", [__arg_0]);
 
-  webkitCancelKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitCancelKeyRequest", [__arg_0, __arg_1]);
+  webkitCancelKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitCancelKeyRequest", [__arg_0, __arg_1]);
 
-  webkitGenerateKeyRequest_Callback_0_(mthis) => mthis.callMethod("webkitGenerateKeyRequest", []);
+  webkitGenerateKeyRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", []);
 
-  webkitGenerateKeyRequest_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitGenerateKeyRequest", [__arg_0]);
+  webkitGenerateKeyRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", [__arg_0]);
 
-  webkitGenerateKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitGenerateKeyRequest", [__arg_0, __arg_1]);
+  webkitGenerateKeyRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitGenerateKeyRequest", [__arg_0, __arg_1]);
 
-  webkitVideoDecodedByteCount_Getter_(mthis) => mthis["webkitVideoDecodedByteCount"];
+  webkitVideoDecodedByteCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitVideoDecodedByteCount");
 
 }
 
 class BlinkHTMLMenuElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMenuElement();
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
   label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -6556,23 +6557,23 @@
 class BlinkHTMLMenuItemElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMenuItemElement();
 
-  checked_Getter_(mthis) => mthis["checked"];
+  checked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "checked");
 
   checked_Setter_(mthis, __arg_0) => mthis["checked"] = __arg_0;
 
-  default_Getter_(mthis) => mthis["default"];
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
 
   default_Setter_(mthis, __arg_0) => mthis["default"] = __arg_0;
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
   label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -6581,15 +6582,15 @@
 class BlinkHTMLMetaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMetaElement();
 
-  content_Getter_(mthis) => mthis["content"];
+  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "content");
 
   content_Setter_(mthis, __arg_0) => mthis["content"] = __arg_0;
 
-  httpEquiv_Getter_(mthis) => mthis["httpEquiv"];
+  httpEquiv_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "httpEquiv");
 
   httpEquiv_Setter_(mthis, __arg_0) => mthis["httpEquiv"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
@@ -6598,29 +6599,29 @@
 class BlinkHTMLMeterElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLMeterElement();
 
-  high_Getter_(mthis) => mthis["high"];
+  high_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "high");
 
   high_Setter_(mthis, __arg_0) => mthis["high"] = __arg_0;
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  low_Getter_(mthis) => mthis["low"];
+  low_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "low");
 
   low_Setter_(mthis, __arg_0) => mthis["low"] = __arg_0;
 
-  max_Getter_(mthis) => mthis["max"];
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
 
   max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
 
-  min_Getter_(mthis) => mthis["min"];
+  min_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "min");
 
   min_Setter_(mthis, __arg_0) => mthis["min"] = __arg_0;
 
-  optimum_Getter_(mthis) => mthis["optimum"];
+  optimum_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "optimum");
 
   optimum_Setter_(mthis, __arg_0) => mthis["optimum"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -6629,11 +6630,11 @@
 class BlinkHTMLModElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLModElement();
 
-  cite_Getter_(mthis) => mthis["cite"];
+  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cite");
 
   cite_Setter_(mthis, __arg_0) => mthis["cite"] = __arg_0;
 
-  dateTime_Getter_(mthis) => mthis["dateTime"];
+  dateTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dateTime");
 
   dateTime_Setter_(mthis, __arg_0) => mthis["dateTime"] = __arg_0;
 
@@ -6642,15 +6643,15 @@
 class BlinkHTMLOListElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOListElement();
 
-  reversed_Getter_(mthis) => mthis["reversed"];
+  reversed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reversed");
 
   reversed_Setter_(mthis, __arg_0) => mthis["reversed"] = __arg_0;
 
-  start_Getter_(mthis) => mthis["start"];
+  start_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "start");
 
   start_Setter_(mthis, __arg_0) => mthis["start"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -6659,70 +6660,70 @@
 class BlinkHTMLObjectElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLObjectElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
   code_Setter_(mthis, __arg_0) => mthis["code"] = __arg_0;
 
-  contentDocument_Getter_(mthis) => mthis["contentDocument"];
+  contentDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentDocument");
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
   data_Setter_(mthis, __arg_0) => mthis["data"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  getSVGDocument_Callback_0_(mthis) => mthis.callMethod("getSVGDocument", []);
+  getSVGDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSVGDocument", []);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
-  useMap_Getter_(mthis) => mthis["useMap"];
+  useMap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useMap");
 
   useMap_Setter_(mthis, __arg_0) => mthis["useMap"] = __arg_0;
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
 class BlinkHTMLOptGroupElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOptGroupElement();
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
   label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
 
@@ -6731,37 +6732,37 @@
 class BlinkHTMLOptionElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOptionElement();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Option"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Option"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Option"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Option"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["Option"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["Option"], [__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, "Option"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  defaultSelected_Getter_(mthis) => mthis["defaultSelected"];
+  defaultSelected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultSelected");
 
   defaultSelected_Setter_(mthis, __arg_0) => mthis["defaultSelected"] = __arg_0;
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  index_Getter_(mthis) => mthis["index"];
+  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
   label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
 
-  selected_Getter_(mthis) => mthis["selected"];
+  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selected");
 
   selected_Setter_(mthis, __arg_0) => mthis["selected"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -6770,48 +6771,48 @@
 class BlinkHTMLOptionsCollection extends BlinkHTMLCollection {
   static final instance = new BlinkHTMLOptionsCollection();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
 }
 
 class BlinkHTMLOutputElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLOutputElement();
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  defaultValue_Getter_(mthis) => mthis["defaultValue"];
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
 
   defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  htmlFor_Getter_(mthis) => mthis["htmlFor"];
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
 
   htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
@@ -6823,11 +6824,11 @@
 class BlinkHTMLParamElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLParamElement();
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -6846,15 +6847,15 @@
 class BlinkHTMLProgressElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLProgressElement();
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  max_Getter_(mthis) => mthis["max"];
+  max_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "max");
 
   max_Setter_(mthis, __arg_0) => mthis["max"] = __arg_0;
 
-  position_Getter_(mthis) => mthis["position"];
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -6863,7 +6864,7 @@
 class BlinkHTMLQuoteElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLQuoteElement();
 
-  cite_Getter_(mthis) => mthis["cite"];
+  cite_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cite");
 
   cite_Setter_(mthis, __arg_0) => mthis["cite"] = __arg_0;
 
@@ -6872,43 +6873,43 @@
 class BlinkHTMLScriptElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLScriptElement();
 
-  async_Getter_(mthis) => mthis["async"];
+  async_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "async");
 
   async_Setter_(mthis, __arg_0) => mthis["async"] = __arg_0;
 
-  charset_Getter_(mthis) => mthis["charset"];
+  charset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charset");
 
   charset_Setter_(mthis, __arg_0) => mthis["charset"] = __arg_0;
 
-  crossOrigin_Getter_(mthis) => mthis["crossOrigin"];
+  crossOrigin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crossOrigin");
 
   crossOrigin_Setter_(mthis, __arg_0) => mthis["crossOrigin"] = __arg_0;
 
-  defer_Getter_(mthis) => mthis["defer"];
+  defer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defer");
 
   defer_Setter_(mthis, __arg_0) => mthis["defer"] = __arg_0;
 
-  event_Getter_(mthis) => mthis["event"];
+  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "event");
 
   event_Setter_(mthis, __arg_0) => mthis["event"] = __arg_0;
 
-  htmlFor_Getter_(mthis) => mthis["htmlFor"];
+  htmlFor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "htmlFor");
 
   htmlFor_Setter_(mthis, __arg_0) => mthis["htmlFor"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  nonce_Getter_(mthis) => mthis["nonce"];
+  nonce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nonce");
 
   nonce_Setter_(mthis, __arg_0) => mthis["nonce"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -6917,111 +6918,111 @@
 class BlinkHTMLSelectElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLSelectElement();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("add", [__arg_0, __arg_1]);
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
 
-  autofocus_Getter_(mthis) => mthis["autofocus"];
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
 
   autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
   length_Setter_(mthis, __arg_0) => mthis["length"] = __arg_0;
 
-  multiple_Getter_(mthis) => mthis["multiple"];
+  multiple_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiple");
 
   multiple_Setter_(mthis, __arg_0) => mthis["multiple"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
-  required_Getter_(mthis) => mthis["required"];
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
 
   required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
 
-  selectedIndex_Getter_(mthis) => mthis["selectedIndex"];
+  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedIndex");
 
   selectedIndex_Setter_(mthis, __arg_0) => mthis["selectedIndex"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
   size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
 }
 
 class BlinkHTMLShadowElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLShadowElement();
 
-  getDistributedNodes_Callback_0_(mthis) => mthis.callMethod("getDistributedNodes", []);
+  getDistributedNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDistributedNodes", []);
 
 }
 
 class BlinkHTMLSourceElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLSourceElement();
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
   media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
 
-  sizes_Getter_(mthis) => mthis["sizes"];
+  sizes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sizes");
 
   sizes_Setter_(mthis, __arg_0) => mthis["sizes"] = __arg_0;
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  srcset_Getter_(mthis) => mthis["srcset"];
+  srcset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srcset");
 
   srcset_Setter_(mthis, __arg_0) => mthis["srcset"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -7035,17 +7036,17 @@
 class BlinkHTMLStyleElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLStyleElement();
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
   media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
 
-  sheet_Getter_(mthis) => mthis["sheet"];
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -7059,17 +7060,17 @@
 class BlinkHTMLTableCellElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableCellElement();
 
-  cellIndex_Getter_(mthis) => mthis["cellIndex"];
+  cellIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cellIndex");
 
-  colSpan_Getter_(mthis) => mthis["colSpan"];
+  colSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colSpan");
 
   colSpan_Setter_(mthis, __arg_0) => mthis["colSpan"] = __arg_0;
 
-  headers_Getter_(mthis) => mthis["headers"];
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
 
   headers_Setter_(mthis, __arg_0) => mthis["headers"] = __arg_0;
 
-  rowSpan_Getter_(mthis) => mthis["rowSpan"];
+  rowSpan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowSpan");
 
   rowSpan_Setter_(mthis, __arg_0) => mthis["rowSpan"] = __arg_0;
 
@@ -7078,7 +7079,7 @@
 class BlinkHTMLTableColElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableColElement();
 
-  span_Getter_(mthis) => mthis["span"];
+  span_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "span");
 
   span_Setter_(mthis, __arg_0) => mthis["span"] = __arg_0;
 
@@ -7087,45 +7088,45 @@
 class BlinkHTMLTableElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableElement();
 
-  border_Getter_(mthis) => mthis["border"];
+  border_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "border");
 
   border_Setter_(mthis, __arg_0) => mthis["border"] = __arg_0;
 
-  caption_Getter_(mthis) => mthis["caption"];
+  caption_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caption");
 
   caption_Setter_(mthis, __arg_0) => mthis["caption"] = __arg_0;
 
-  createCaption_Callback_0_(mthis) => mthis.callMethod("createCaption", []);
+  createCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createCaption", []);
 
-  createTBody_Callback_0_(mthis) => mthis.callMethod("createTBody", []);
+  createTBody_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTBody", []);
 
-  createTFoot_Callback_0_(mthis) => mthis.callMethod("createTFoot", []);
+  createTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTFoot", []);
 
-  createTHead_Callback_0_(mthis) => mthis.callMethod("createTHead", []);
+  createTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTHead", []);
 
-  deleteCaption_Callback_0_(mthis) => mthis.callMethod("deleteCaption", []);
+  deleteCaption_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteCaption", []);
 
-  deleteRow_Callback_0_(mthis) => mthis.callMethod("deleteRow", []);
+  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", []);
 
-  deleteRow_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRow", [__arg_0]);
+  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", [__arg_0]);
 
-  deleteTFoot_Callback_0_(mthis) => mthis.callMethod("deleteTFoot", []);
+  deleteTFoot_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTFoot", []);
 
-  deleteTHead_Callback_0_(mthis) => mthis.callMethod("deleteTHead", []);
+  deleteTHead_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTHead", []);
 
-  insertRow_Callback_0_(mthis) => mthis.callMethod("insertRow", []);
+  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", []);
 
-  insertRow_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRow", [__arg_0]);
+  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", [__arg_0]);
 
-  rows_Getter_(mthis) => mthis["rows"];
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
 
-  tBodies_Getter_(mthis) => mthis["tBodies"];
+  tBodies_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tBodies");
 
-  tFoot_Getter_(mthis) => mthis["tFoot"];
+  tFoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tFoot");
 
   tFoot_Setter_(mthis, __arg_0) => mthis["tFoot"] = __arg_0;
 
-  tHead_Getter_(mthis) => mthis["tHead"];
+  tHead_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tHead");
 
   tHead_Setter_(mthis, __arg_0) => mthis["tHead"] = __arg_0;
 
@@ -7134,152 +7135,152 @@
 class BlinkHTMLTableRowElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableRowElement();
 
-  cells_Getter_(mthis) => mthis["cells"];
+  cells_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cells");
 
-  deleteCell_Callback_0_(mthis) => mthis.callMethod("deleteCell", []);
+  deleteCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteCell", []);
 
-  deleteCell_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteCell", [__arg_0]);
+  deleteCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteCell", [__arg_0]);
 
-  insertCell_Callback_0_(mthis) => mthis.callMethod("insertCell", []);
+  insertCell_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertCell", []);
 
-  insertCell_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertCell", [__arg_0]);
+  insertCell_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertCell", [__arg_0]);
 
-  rowIndex_Getter_(mthis) => mthis["rowIndex"];
+  rowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowIndex");
 
-  sectionRowIndex_Getter_(mthis) => mthis["sectionRowIndex"];
+  sectionRowIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sectionRowIndex");
 
 }
 
 class BlinkHTMLTableSectionElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTableSectionElement();
 
-  deleteRow_Callback_0_(mthis) => mthis.callMethod("deleteRow", []);
+  deleteRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", []);
 
-  deleteRow_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRow", [__arg_0]);
+  deleteRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRow", [__arg_0]);
 
-  insertRow_Callback_0_(mthis) => mthis.callMethod("insertRow", []);
+  insertRow_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", []);
 
-  insertRow_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertRow", [__arg_0]);
+  insertRow_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertRow", [__arg_0]);
 
-  rows_Getter_(mthis) => mthis["rows"];
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
 
 }
 
 class BlinkHTMLTemplateElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTemplateElement();
 
-  content_Getter_(mthis) => mthis["content"];
+  content_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "content");
 
 }
 
 class BlinkHTMLTextAreaElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTextAreaElement();
 
-  autofocus_Getter_(mthis) => mthis["autofocus"];
+  autofocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autofocus");
 
   autofocus_Setter_(mthis, __arg_0) => mthis["autofocus"] = __arg_0;
 
-  checkValidity_Callback_0_(mthis) => mthis.callMethod("checkValidity", []);
+  checkValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkValidity", []);
 
-  cols_Getter_(mthis) => mthis["cols"];
+  cols_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cols");
 
   cols_Setter_(mthis, __arg_0) => mthis["cols"] = __arg_0;
 
-  defaultValue_Getter_(mthis) => mthis["defaultValue"];
+  defaultValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultValue");
 
   defaultValue_Setter_(mthis, __arg_0) => mthis["defaultValue"] = __arg_0;
 
-  dirName_Getter_(mthis) => mthis["dirName"];
+  dirName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dirName");
 
   dirName_Setter_(mthis, __arg_0) => mthis["dirName"] = __arg_0;
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  form_Getter_(mthis) => mthis["form"];
+  form_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "form");
 
-  inputMode_Getter_(mthis) => mthis["inputMode"];
+  inputMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputMode");
 
   inputMode_Setter_(mthis, __arg_0) => mthis["inputMode"] = __arg_0;
 
-  labels_Getter_(mthis) => mthis["labels"];
+  labels_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "labels");
 
-  maxLength_Getter_(mthis) => mthis["maxLength"];
+  maxLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxLength");
 
   maxLength_Setter_(mthis, __arg_0) => mthis["maxLength"] = __arg_0;
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  placeholder_Getter_(mthis) => mthis["placeholder"];
+  placeholder_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "placeholder");
 
   placeholder_Setter_(mthis, __arg_0) => mthis["placeholder"] = __arg_0;
 
-  readOnly_Getter_(mthis) => mthis["readOnly"];
+  readOnly_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readOnly");
 
   readOnly_Setter_(mthis, __arg_0) => mthis["readOnly"] = __arg_0;
 
-  required_Getter_(mthis) => mthis["required"];
+  required_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "required");
 
   required_Setter_(mthis, __arg_0) => mthis["required"] = __arg_0;
 
-  rows_Getter_(mthis) => mthis["rows"];
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
 
   rows_Setter_(mthis, __arg_0) => mthis["rows"] = __arg_0;
 
-  select_Callback_0_(mthis) => mthis.callMethod("select", []);
+  select_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "select", []);
 
-  selectionDirection_Getter_(mthis) => mthis["selectionDirection"];
+  selectionDirection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionDirection");
 
   selectionDirection_Setter_(mthis, __arg_0) => mthis["selectionDirection"] = __arg_0;
 
-  selectionEnd_Getter_(mthis) => mthis["selectionEnd"];
+  selectionEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionEnd");
 
   selectionEnd_Setter_(mthis, __arg_0) => mthis["selectionEnd"] = __arg_0;
 
-  selectionStart_Getter_(mthis) => mthis["selectionStart"];
+  selectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectionStart");
 
   selectionStart_Setter_(mthis, __arg_0) => mthis["selectionStart"] = __arg_0;
 
-  setCustomValidity_Callback_0_(mthis) => mthis.callMethod("setCustomValidity", []);
+  setCustomValidity_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", []);
 
-  setCustomValidity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCustomValidity", [__arg_0]);
+  setCustomValidity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCustomValidity", [__arg_0]);
 
-  setRangeText_Callback_0_(mthis) => mthis.callMethod("setRangeText", []);
+  setRangeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", []);
 
-  setRangeText_Callback_1_(mthis, __arg_0) => mthis.callMethod("setRangeText", [__arg_0]);
+  setRangeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0]);
 
-  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setRangeText", [__arg_0, __arg_1]);
+  setRangeText_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1]);
 
-  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setRangeText", [__arg_0, __arg_1, __arg_2]);
+  setRangeText_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRangeText", [__arg_0, __arg_1, __arg_2]);
 
-  setRangeText_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("setRangeText", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  setSelectionRange_Callback_0_(mthis) => mthis.callMethod("setSelectionRange", []);
+  setSelectionRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", []);
 
-  setSelectionRange_Callback_1_(mthis, __arg_0) => mthis.callMethod("setSelectionRange", [__arg_0]);
+  setSelectionRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0]);
 
-  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setSelectionRange", [__arg_0, __arg_1]);
+  setSelectionRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1]);
 
-  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setSelectionRange", [__arg_0, __arg_1, __arg_2]);
+  setSelectionRange_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setSelectionRange", [__arg_0, __arg_1, __arg_2]);
 
-  textLength_Getter_(mthis) => mthis["textLength"];
+  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textLength");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  validationMessage_Getter_(mthis) => mthis["validationMessage"];
+  validationMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validationMessage");
 
-  validity_Getter_(mthis) => mthis["validity"];
+  validity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "validity");
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
-  willValidate_Getter_(mthis) => mthis["willValidate"];
+  willValidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "willValidate");
 
-  wrap_Getter_(mthis) => mthis["wrap"];
+  wrap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wrap");
 
   wrap_Setter_(mthis, __arg_0) => mthis["wrap"] = __arg_0;
 
@@ -7293,33 +7294,33 @@
 class BlinkHTMLTrackElement extends BlinkHTMLElement {
   static final instance = new BlinkHTMLTrackElement();
 
-  default_Getter_(mthis) => mthis["default"];
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
 
   default_Setter_(mthis, __arg_0) => mthis["default"] = __arg_0;
 
-  integrity_Getter_(mthis) => mthis["integrity"];
+  integrity_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "integrity");
 
   integrity_Setter_(mthis, __arg_0) => mthis["integrity"] = __arg_0;
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
   kind_Setter_(mthis, __arg_0) => mthis["kind"] = __arg_0;
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
   label_Setter_(mthis, __arg_0) => mthis["label"] = __arg_0;
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  srclang_Getter_(mthis) => mthis["srclang"];
+  srclang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "srclang");
 
   srclang_Setter_(mthis, __arg_0) => mthis["srclang"] = __arg_0;
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
 }
 
@@ -7336,37 +7337,37 @@
 class BlinkHTMLVideoElement extends BlinkHTMLMediaElement {
   static final instance = new BlinkHTMLVideoElement();
 
-  getVideoPlaybackQuality_Callback_0_(mthis) => mthis.callMethod("getVideoPlaybackQuality", []);
+  getVideoPlaybackQuality_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVideoPlaybackQuality", []);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  poster_Getter_(mthis) => mthis["poster"];
+  poster_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "poster");
 
   poster_Setter_(mthis, __arg_0) => mthis["poster"] = __arg_0;
 
-  videoHeight_Getter_(mthis) => mthis["videoHeight"];
+  videoHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoHeight");
 
-  videoWidth_Getter_(mthis) => mthis["videoWidth"];
+  videoWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "videoWidth");
 
-  webkitDecodedFrameCount_Getter_(mthis) => mthis["webkitDecodedFrameCount"];
+  webkitDecodedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDecodedFrameCount");
 
-  webkitDisplayingFullscreen_Getter_(mthis) => mthis["webkitDisplayingFullscreen"];
+  webkitDisplayingFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDisplayingFullscreen");
 
-  webkitDroppedFrameCount_Getter_(mthis) => mthis["webkitDroppedFrameCount"];
+  webkitDroppedFrameCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitDroppedFrameCount");
 
-  webkitEnterFullScreen_Callback_0_(mthis) => mthis.callMethod("webkitEnterFullScreen", []);
+  webkitEnterFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitEnterFullScreen", []);
 
-  webkitEnterFullscreen_Callback_0_(mthis) => mthis.callMethod("webkitEnterFullscreen", []);
+  webkitEnterFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitEnterFullscreen", []);
 
-  webkitExitFullScreen_Callback_0_(mthis) => mthis.callMethod("webkitExitFullScreen", []);
+  webkitExitFullScreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullScreen", []);
 
-  webkitExitFullscreen_Callback_0_(mthis) => mthis.callMethod("webkitExitFullscreen", []);
+  webkitExitFullscreen_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitExitFullscreen", []);
 
-  webkitSupportsFullscreen_Getter_(mthis) => mthis["webkitSupportsFullscreen"];
+  webkitSupportsFullscreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitSupportsFullscreen");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
@@ -7375,367 +7376,367 @@
 class BlinkHashChangeEvent extends BlinkEvent {
   static final instance = new BlinkHashChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["HashChangeEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "HashChangeEvent"), [__arg_0, __arg_1]);
 
-  initHashChangeEvent_Callback_0_(mthis) => mthis.callMethod("initHashChangeEvent", []);
+  initHashChangeEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", []);
 
-  initHashChangeEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initHashChangeEvent", [__arg_0]);
+  initHashChangeEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0]);
 
-  initHashChangeEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initHashChangeEvent", [__arg_0, __arg_1]);
+  initHashChangeEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1]);
 
-  initHashChangeEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initHashChangeEvent", [__arg_0, __arg_1, __arg_2]);
+  initHashChangeEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initHashChangeEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initHashChangeEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initHashChangeEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  newURL_Getter_(mthis) => mthis["newURL"];
+  newURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newURL");
 
-  oldURL_Getter_(mthis) => mthis["oldURL"];
+  oldURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldURL");
 
 }
 
 class BlinkHeaders {
   static final instance = new BlinkHeaders();
 
-  append_Callback_0_(mthis) => mthis.callMethod("append", []);
+  append_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "append", []);
 
-  append_Callback_1_(mthis, __arg_0) => mthis.callMethod("append", [__arg_0]);
+  append_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0]);
 
-  append_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("append", [__arg_0, __arg_1]);
+  append_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "append", [__arg_0, __arg_1]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Headers"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Headers"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Headers"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Headers"), [__arg_0]);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => mthis.callMethod("delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
 
-  forEach_Callback_0_(mthis) => mthis.callMethod("forEach", []);
+  forEach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forEach", []);
 
-  forEach_Callback_1_(mthis, __arg_0) => mthis.callMethod("forEach", [__arg_0]);
+  forEach_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0]);
 
-  forEach_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("forEach", [__arg_0, __arg_1]);
+  forEach_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "forEach", [__arg_0, __arg_1]);
 
-  getAll_Callback_0_(mthis) => mthis.callMethod("getAll", []);
+  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAll", []);
 
-  getAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAll", [__arg_0]);
+  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAll", [__arg_0]);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  has_Callback_0_(mthis) => mthis.callMethod("has", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
 
-  has_Callback_1_(mthis, __arg_0) => mthis.callMethod("has", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
 
-  set_Callback_0_(mthis) => mthis.callMethod("set", []);
+  set_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "set", []);
 
-  set_Callback_1_(mthis, __arg_0) => mthis.callMethod("set", [__arg_0]);
+  set_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "set", [__arg_0]);
 
-  set_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("set", [__arg_0, __arg_1]);
+  set_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "set", [__arg_0, __arg_1]);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
 }
 
 class BlinkHistory {
   static final instance = new BlinkHistory();
 
-  back_Callback_0_(mthis) => mthis.callMethod("back", []);
+  back_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "back", []);
 
-  forward_Callback_0_(mthis) => mthis.callMethod("forward", []);
+  forward_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forward", []);
 
-  go_Callback_0_(mthis) => mthis.callMethod("go", []);
+  go_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "go", []);
 
-  go_Callback_1_(mthis, __arg_0) => mthis.callMethod("go", [__arg_0]);
+  go_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "go", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  pushState_Callback_0_(mthis) => mthis.callMethod("pushState", []);
+  pushState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pushState", []);
 
-  pushState_Callback_1_(mthis, __arg_0) => mthis.callMethod("pushState", [__arg_0]);
+  pushState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0]);
 
-  pushState_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("pushState", [__arg_0, __arg_1]);
+  pushState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0, __arg_1]);
 
-  pushState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("pushState", [__arg_0, __arg_1, __arg_2]);
+  pushState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "pushState", [__arg_0, __arg_1, __arg_2]);
 
-  replaceState_Callback_0_(mthis) => mthis.callMethod("replaceState", []);
+  replaceState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", []);
 
-  replaceState_Callback_1_(mthis, __arg_0) => mthis.callMethod("replaceState", [__arg_0]);
+  replaceState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0]);
 
-  replaceState_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("replaceState", [__arg_0, __arg_1]);
+  replaceState_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0, __arg_1]);
 
-  replaceState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("replaceState", [__arg_0, __arg_1, __arg_2]);
+  replaceState_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "replaceState", [__arg_0, __arg_1, __arg_2]);
 
-  state_Getter_(mthis) => mthis["state"];
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
 
 }
 
 class BlinkIDBCursor {
   static final instance = new BlinkIDBCursor();
 
-  advance_Callback_0_(mthis) => mthis.callMethod("advance", []);
+  advance_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "advance", []);
 
-  advance_Callback_1_(mthis, __arg_0) => mthis.callMethod("advance", [__arg_0]);
+  advance_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "advance", [__arg_0]);
 
-  continuePrimaryKey_Callback_0_(mthis) => mthis.callMethod("continuePrimaryKey", []);
+  continuePrimaryKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", []);
 
-  continuePrimaryKey_Callback_1_(mthis, __arg_0) => mthis.callMethod("continuePrimaryKey", [__arg_0]);
+  continuePrimaryKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", [__arg_0]);
 
-  continuePrimaryKey_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("continuePrimaryKey", [__arg_0, __arg_1]);
+  continuePrimaryKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "continuePrimaryKey", [__arg_0, __arg_1]);
 
-  continue_Callback_0_(mthis) => mthis.callMethod("continue", []);
+  continue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "continue", []);
 
-  continue_Callback_1_(mthis, __arg_0) => mthis.callMethod("continue", [__arg_0]);
+  continue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "continue", [__arg_0]);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  direction_Getter_(mthis) => mthis["direction"];
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
 
-  key_Getter_(mthis) => mthis["key"];
+  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "key");
 
-  primaryKey_Getter_(mthis) => mthis["primaryKey"];
+  primaryKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primaryKey");
 
-  source_Getter_(mthis) => mthis["source"];
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
 
-  update_Callback_0_(mthis) => mthis.callMethod("update", []);
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
 
-  update_Callback_1_(mthis, __arg_0) => mthis.callMethod("update", [__arg_0]);
+  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "update", [__arg_0]);
 
 }
 
 class BlinkIDBCursorWithValue extends BlinkIDBCursor {
   static final instance = new BlinkIDBCursorWithValue();
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
 }
 
 class BlinkIDBDatabase extends BlinkEventTarget {
   static final instance = new BlinkIDBDatabase();
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  createObjectStore_Callback_0_(mthis) => mthis.callMethod("createObjectStore", []);
+  createObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", []);
 
-  createObjectStore_Callback_1_(mthis, __arg_0) => mthis.callMethod("createObjectStore", [__arg_0]);
+  createObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", [__arg_0]);
 
-  createObjectStore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createObjectStore", [__arg_0, __arg_1]);
+  createObjectStore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createObjectStore", [__arg_0, __arg_1]);
 
-  deleteObjectStore_Callback_0_(mthis) => mthis.callMethod("deleteObjectStore", []);
+  deleteObjectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteObjectStore", []);
 
-  deleteObjectStore_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteObjectStore", [__arg_0]);
+  deleteObjectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteObjectStore", [__arg_0]);
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  objectStoreNames_Getter_(mthis) => mthis["objectStoreNames"];
+  objectStoreNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "objectStoreNames");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onversionchange_Getter_(mthis) => mthis["onversionchange"];
+  onversionchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onversionchange");
 
   onversionchange_Setter_(mthis, __arg_0) => mthis["onversionchange"] = __arg_0;
 
-  transaction_Callback_0_(mthis) => mthis.callMethod("transaction", []);
+  transaction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transaction", []);
 
-  transaction_Callback_1_(mthis, __arg_0) => mthis.callMethod("transaction", [__arg_0]);
+  transaction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0]);
 
-  transaction_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("transaction", [__arg_0, __arg_1]);
+  transaction_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transaction", [__arg_0, __arg_1]);
 
-  version_Getter_(mthis) => mthis["version"];
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
 
 }
 
 class BlinkIDBFactory {
   static final instance = new BlinkIDBFactory();
 
-  cmp_Callback_0_(mthis) => mthis.callMethod("cmp", []);
+  cmp_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cmp", []);
 
-  cmp_Callback_1_(mthis, __arg_0) => mthis.callMethod("cmp", [__arg_0]);
+  cmp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cmp", [__arg_0]);
 
-  cmp_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("cmp", [__arg_0, __arg_1]);
+  cmp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "cmp", [__arg_0, __arg_1]);
 
-  deleteDatabase_Callback_0_(mthis) => mthis.callMethod("deleteDatabase", []);
+  deleteDatabase_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteDatabase", []);
 
-  deleteDatabase_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteDatabase", [__arg_0]);
+  deleteDatabase_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteDatabase", [__arg_0]);
 
-  open_Callback_0_(mthis) => mthis.callMethod("open", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
 
-  open_Callback_1_(mthis, __arg_0) => mthis.callMethod("open", [__arg_0]);
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("open", [__arg_0, __arg_1]);
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
 
-  webkitGetDatabaseNames_Callback_0_(mthis) => mthis.callMethod("webkitGetDatabaseNames", []);
+  webkitGetDatabaseNames_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetDatabaseNames", []);
 
 }
 
 class BlinkIDBIndex {
   static final instance = new BlinkIDBIndex();
 
-  count_Callback_0_(mthis) => mthis.callMethod("count", []);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
 
-  count_Callback_1_(mthis, __arg_0) => mthis.callMethod("count", [__arg_0]);
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
 
-  getKey_Callback_0_(mthis) => mthis.callMethod("getKey", []);
+  getKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getKey", []);
 
-  getKey_Callback_1_(mthis, __arg_0) => mthis.callMethod("getKey", [__arg_0]);
+  getKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getKey", [__arg_0]);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  keyPath_Getter_(mthis) => mthis["keyPath"];
+  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyPath");
 
-  multiEntry_Getter_(mthis) => mthis["multiEntry"];
+  multiEntry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "multiEntry");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  objectStore_Getter_(mthis) => mthis["objectStore"];
+  objectStore_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "objectStore");
 
-  openCursor_Callback_0_(mthis) => mthis.callMethod("openCursor", []);
+  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", []);
 
-  openCursor_Callback_1_(mthis, __arg_0) => mthis.callMethod("openCursor", [__arg_0]);
+  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0]);
 
-  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("openCursor", [__arg_0, __arg_1]);
+  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0, __arg_1]);
 
-  openKeyCursor_Callback_0_(mthis) => mthis.callMethod("openKeyCursor", []);
+  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", []);
 
-  openKeyCursor_Callback_1_(mthis, __arg_0) => mthis.callMethod("openKeyCursor", [__arg_0]);
+  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0]);
 
-  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("openKeyCursor", [__arg_0, __arg_1]);
+  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0, __arg_1]);
 
-  unique_Getter_(mthis) => mthis["unique"];
+  unique_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unique");
 
 }
 
 class BlinkIDBKeyRange {
   static final instance = new BlinkIDBKeyRange();
 
-  bound_Callback_0_() => js.context["IDBKeyRange"].callMethod("bound", []);
+  bound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", []);
 
-  bound_Callback_1_(__arg_0) => js.context["IDBKeyRange"].callMethod("bound", [__arg_0]);
+  bound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0]);
 
-  bound_Callback_2_(__arg_0, __arg_1) => js.context["IDBKeyRange"].callMethod("bound", [__arg_0, __arg_1]);
+  bound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "bound", [__arg_0, __arg_1]);
 
-  bound_Callback_3_(__arg_0, __arg_1, __arg_2) => js.context["IDBKeyRange"].callMethod("bound", [__arg_0, __arg_1, __arg_2]);
+  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]);
 
-  bound_Callback_4_(__arg_0, __arg_1, __arg_2, __arg_3) => js.context["IDBKeyRange"].callMethod("bound", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  lowerBound_Callback_0_() => js.context["IDBKeyRange"].callMethod("lowerBound", []);
+  lowerBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "lowerBound", []);
 
-  lowerBound_Callback_1_(__arg_0) => js.context["IDBKeyRange"].callMethod("lowerBound", [__arg_0]);
+  lowerBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "lowerBound", [__arg_0]);
 
-  lowerBound_Callback_2_(__arg_0, __arg_1) => js.context["IDBKeyRange"].callMethod("lowerBound", [__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]);
 
-  lowerOpen_Getter_(mthis) => mthis["lowerOpen"];
+  lowerOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lowerOpen");
 
-  lower_Getter_(mthis) => mthis["lower"];
+  lower_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lower");
 
-  only_Callback_0_() => js.context["IDBKeyRange"].callMethod("only", []);
+  only_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "only", []);
 
-  only_Callback_1_(__arg_0) => js.context["IDBKeyRange"].callMethod("only", [__arg_0]);
+  only_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "only", [__arg_0]);
 
-  upperBound_Callback_0_() => js.context["IDBKeyRange"].callMethod("upperBound", []);
+  upperBound_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", []);
 
-  upperBound_Callback_1_(__arg_0) => js.context["IDBKeyRange"].callMethod("upperBound", [__arg_0]);
+  upperBound_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", [__arg_0]);
 
-  upperBound_Callback_2_(__arg_0, __arg_1) => js.context["IDBKeyRange"].callMethod("upperBound", [__arg_0, __arg_1]);
+  upperBound_Callback_2_(__arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "IDBKeyRange"), "upperBound", [__arg_0, __arg_1]);
 
-  upperOpen_Getter_(mthis) => mthis["upperOpen"];
+  upperOpen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upperOpen");
 
-  upper_Getter_(mthis) => mthis["upper"];
+  upper_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upper");
 
 }
 
 class BlinkIDBObjectStore {
   static final instance = new BlinkIDBObjectStore();
 
-  add_Callback_0_(mthis) => mthis.callMethod("add", []);
+  add_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "add", []);
 
-  add_Callback_1_(mthis, __arg_0) => mthis.callMethod("add", [__arg_0]);
+  add_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0]);
 
-  add_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("add", [__arg_0, __arg_1]);
+  add_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "add", [__arg_0, __arg_1]);
 
-  autoIncrement_Getter_(mthis) => mthis["autoIncrement"];
+  autoIncrement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "autoIncrement");
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  count_Callback_0_(mthis) => mthis.callMethod("count", []);
+  count_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "count", []);
 
-  count_Callback_1_(mthis, __arg_0) => mthis.callMethod("count", [__arg_0]);
+  count_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "count", [__arg_0]);
 
-  createIndex_Callback_0_(mthis) => mthis.callMethod("createIndex", []);
+  createIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", []);
 
-  createIndex_Callback_1_(mthis, __arg_0) => mthis.callMethod("createIndex", [__arg_0]);
+  createIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0]);
 
-  createIndex_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createIndex", [__arg_0, __arg_1]);
+  createIndex_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0, __arg_1]);
 
-  createIndex_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createIndex", [__arg_0, __arg_1, __arg_2]);
+  createIndex_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createIndex", [__arg_0, __arg_1, __arg_2]);
 
-  deleteIndex_Callback_0_(mthis) => mthis.callMethod("deleteIndex", []);
+  deleteIndex_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteIndex", []);
 
-  deleteIndex_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteIndex", [__arg_0]);
+  deleteIndex_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteIndex", [__arg_0]);
 
-  delete_Callback_0_(mthis) => mthis.callMethod("delete", []);
+  delete_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "delete", []);
 
-  delete_Callback_1_(mthis, __arg_0) => mthis.callMethod("delete", [__arg_0]);
+  delete_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "delete", [__arg_0]);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  indexNames_Getter_(mthis) => mthis["indexNames"];
+  indexNames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexNames");
 
-  index_Callback_0_(mthis) => mthis.callMethod("index", []);
+  index_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "index", []);
 
-  index_Callback_1_(mthis, __arg_0) => mthis.callMethod("index", [__arg_0]);
+  index_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "index", [__arg_0]);
 
-  keyPath_Getter_(mthis) => mthis["keyPath"];
+  keyPath_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyPath");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  openCursor_Callback_0_(mthis) => mthis.callMethod("openCursor", []);
+  openCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", []);
 
-  openCursor_Callback_1_(mthis, __arg_0) => mthis.callMethod("openCursor", [__arg_0]);
+  openCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0]);
 
-  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("openCursor", [__arg_0, __arg_1]);
+  openCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openCursor", [__arg_0, __arg_1]);
 
-  openKeyCursor_Callback_0_(mthis) => mthis.callMethod("openKeyCursor", []);
+  openKeyCursor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", []);
 
-  openKeyCursor_Callback_1_(mthis, __arg_0) => mthis.callMethod("openKeyCursor", [__arg_0]);
+  openKeyCursor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0]);
 
-  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("openKeyCursor", [__arg_0, __arg_1]);
+  openKeyCursor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openKeyCursor", [__arg_0, __arg_1]);
 
-  put_Callback_0_(mthis) => mthis.callMethod("put", []);
+  put_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "put", []);
 
-  put_Callback_1_(mthis, __arg_0) => mthis.callMethod("put", [__arg_0]);
+  put_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0]);
 
-  put_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("put", [__arg_0, __arg_1]);
+  put_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "put", [__arg_0, __arg_1]);
 
-  transaction_Getter_(mthis) => mthis["transaction"];
+  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transaction");
 
 }
 
 class BlinkIDBOpenDBRequest extends BlinkIDBRequest {
   static final instance = new BlinkIDBOpenDBRequest();
 
-  onblocked_Getter_(mthis) => mthis["onblocked"];
+  onblocked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblocked");
 
   onblocked_Setter_(mthis, __arg_0) => mthis["onblocked"] = __arg_0;
 
-  onupgradeneeded_Getter_(mthis) => mthis["onupgradeneeded"];
+  onupgradeneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupgradeneeded");
 
   onupgradeneeded_Setter_(mthis, __arg_0) => mthis["onupgradeneeded"] = __arg_0;
 
@@ -7744,50 +7745,50 @@
 class BlinkIDBRequest extends BlinkEventTarget {
   static final instance = new BlinkIDBRequest();
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onsuccess_Getter_(mthis) => mthis["onsuccess"];
+  onsuccess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuccess");
 
   onsuccess_Setter_(mthis, __arg_0) => mthis["onsuccess"] = __arg_0;
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  source_Getter_(mthis) => mthis["source"];
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
 
-  transaction_Getter_(mthis) => mthis["transaction"];
+  transaction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transaction");
 
 }
 
 class BlinkIDBTransaction extends BlinkEventTarget {
   static final instance = new BlinkIDBTransaction();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  db_Getter_(mthis) => mthis["db"];
+  db_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "db");
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  mode_Getter_(mthis) => mthis["mode"];
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
 
-  objectStore_Callback_0_(mthis) => mthis.callMethod("objectStore", []);
+  objectStore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "objectStore", []);
 
-  objectStore_Callback_1_(mthis, __arg_0) => mthis.callMethod("objectStore", [__arg_0]);
+  objectStore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "objectStore", [__arg_0]);
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  oncomplete_Getter_(mthis) => mthis["oncomplete"];
+  oncomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncomplete");
 
   oncomplete_Setter_(mthis, __arg_0) => mthis["oncomplete"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
@@ -7796,460 +7797,460 @@
 class BlinkIDBVersionChangeEvent extends BlinkEvent {
   static final instance = new BlinkIDBVersionChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["IDBVersionChangeEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "IDBVersionChangeEvent"), [__arg_0, __arg_1]);
 
-  dataLossMessage_Getter_(mthis) => mthis["dataLossMessage"];
+  dataLossMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataLossMessage");
 
-  dataLoss_Getter_(mthis) => mthis["dataLoss"];
+  dataLoss_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataLoss");
 
-  newVersion_Getter_(mthis) => mthis["newVersion"];
+  newVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newVersion");
 
-  oldVersion_Getter_(mthis) => mthis["oldVersion"];
+  oldVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldVersion");
 
 }
 
 class BlinkImageBitmap {
   static final instance = new BlinkImageBitmap();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
 }
 
 class BlinkImageData {
   static final instance = new BlinkImageData();
 
-  constructorCallback_0_() => new js.JsObject(js.context["ImageData"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["ImageData"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["ImageData"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["ImageData"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ImageData"), [__arg_0, __arg_1, __arg_2]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
 }
 
 class BlinkInjectedScriptHost {
   static final instance = new BlinkInjectedScriptHost();
 
-  callFunction_Callback_0_(mthis) => mthis.callMethod("callFunction", []);
+  callFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", []);
 
-  callFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("callFunction", [__arg_0]);
+  callFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "callFunction", [__arg_0]);
 
-  callFunction_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("callFunction", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("callFunction", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("clearConsoleMessages", []);
+  clearConsoleMessages_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearConsoleMessages", []);
 
-  collectionEntries_Callback_0_(mthis) => mthis.callMethod("collectionEntries", []);
+  collectionEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collectionEntries", []);
 
-  collectionEntries_Callback_1_(mthis, __arg_0) => mthis.callMethod("collectionEntries", [__arg_0]);
+  collectionEntries_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collectionEntries", [__arg_0]);
 
-  debugFunction_Callback_0_(mthis) => mthis.callMethod("debugFunction", []);
+  debugFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "debugFunction", []);
 
-  debugFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("debugFunction", [__arg_0]);
+  debugFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "debugFunction", [__arg_0]);
 
-  eval_Callback_0_(mthis) => mthis.callMethod("eval", []);
+  eval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "eval", []);
 
-  eval_Callback_1_(mthis, __arg_0) => mthis.callMethod("eval", [__arg_0]);
+  eval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "eval", [__arg_0]);
 
-  evaluateWithExceptionDetails_Callback_0_(mthis) => mthis.callMethod("evaluateWithExceptionDetails", []);
+  evaluateWithExceptionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", []);
 
-  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => mthis.callMethod("evaluateWithExceptionDetails", [__arg_0]);
+  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", [__arg_0]);
 
-  functionDetails_Callback_0_(mthis) => mthis.callMethod("functionDetails", []);
+  functionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "functionDetails", []);
 
-  functionDetails_Callback_1_(mthis, __arg_0) => mthis.callMethod("functionDetails", [__arg_0]);
+  functionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "functionDetails", [__arg_0]);
 
-  getEventListeners_Callback_0_(mthis) => mthis.callMethod("getEventListeners", []);
+  getEventListeners_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEventListeners", []);
 
-  getEventListeners_Callback_1_(mthis, __arg_0) => mthis.callMethod("getEventListeners", [__arg_0]);
+  getEventListeners_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEventListeners", [__arg_0]);
 
-  getInternalProperties_Callback_0_(mthis) => mthis.callMethod("getInternalProperties", []);
+  getInternalProperties_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getInternalProperties", []);
 
-  getInternalProperties_Callback_1_(mthis, __arg_0) => mthis.callMethod("getInternalProperties", [__arg_0]);
+  getInternalProperties_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getInternalProperties", [__arg_0]);
 
-  inspect_Callback_0_(mthis) => mthis.callMethod("inspect", []);
+  inspect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inspect", []);
 
-  inspect_Callback_1_(mthis, __arg_0) => mthis.callMethod("inspect", [__arg_0]);
+  inspect_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "inspect", [__arg_0]);
 
-  inspect_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("inspect", [__arg_0, __arg_1]);
+  inspect_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "inspect", [__arg_0, __arg_1]);
 
-  inspectedObject_Callback_0_(mthis) => mthis.callMethod("inspectedObject", []);
+  inspectedObject_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inspectedObject", []);
 
-  inspectedObject_Callback_1_(mthis, __arg_0) => mthis.callMethod("inspectedObject", [__arg_0]);
+  inspectedObject_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "inspectedObject", [__arg_0]);
 
-  internalConstructorName_Callback_0_(mthis) => mthis.callMethod("internalConstructorName", []);
+  internalConstructorName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "internalConstructorName", []);
 
-  internalConstructorName_Callback_1_(mthis, __arg_0) => mthis.callMethod("internalConstructorName", [__arg_0]);
+  internalConstructorName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "internalConstructorName", [__arg_0]);
 
-  isHTMLAllCollection_Callback_0_(mthis) => mthis.callMethod("isHTMLAllCollection", []);
+  isHTMLAllCollection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isHTMLAllCollection", []);
 
-  isHTMLAllCollection_Callback_1_(mthis, __arg_0) => mthis.callMethod("isHTMLAllCollection", [__arg_0]);
+  isHTMLAllCollection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isHTMLAllCollection", [__arg_0]);
 
-  monitorFunction_Callback_0_(mthis) => mthis.callMethod("monitorFunction", []);
+  monitorFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "monitorFunction", []);
 
-  monitorFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("monitorFunction", [__arg_0]);
+  monitorFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "monitorFunction", [__arg_0]);
 
-  setFunctionVariableValue_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setFunctionVariableValue", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("setFunctionVariableValue", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("setFunctionVariableValue", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("setNonEnumProperty", [__arg_0]);
+  setNonEnumProperty_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNonEnumProperty", [__arg_0]);
 
-  setNonEnumProperty_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setNonEnumProperty", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("setNonEnumProperty", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("subtype", []);
+  subtype_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "subtype", []);
 
-  subtype_Callback_1_(mthis, __arg_0) => mthis.callMethod("subtype", [__arg_0]);
+  subtype_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "subtype", [__arg_0]);
 
-  suppressWarningsAndCallFunction_Callback_0_(mthis) => mthis.callMethod("suppressWarningsAndCallFunction", []);
+  suppressWarningsAndCallFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", []);
 
-  suppressWarningsAndCallFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("suppressWarningsAndCallFunction", [__arg_0]);
+  suppressWarningsAndCallFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "suppressWarningsAndCallFunction", [__arg_0]);
 
-  suppressWarningsAndCallFunction_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("suppressWarningsAndCallFunction", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("suppressWarningsAndCallFunction", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("undebugFunction", []);
+  undebugFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "undebugFunction", []);
 
-  undebugFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("undebugFunction", [__arg_0]);
+  undebugFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "undebugFunction", [__arg_0]);
 
-  unmonitorFunction_Callback_0_(mthis) => mthis.callMethod("unmonitorFunction", []);
+  unmonitorFunction_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unmonitorFunction", []);
 
-  unmonitorFunction_Callback_1_(mthis, __arg_0) => mthis.callMethod("unmonitorFunction", [__arg_0]);
+  unmonitorFunction_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unmonitorFunction", [__arg_0]);
 
 }
 
 class BlinkInputMethodContext extends BlinkEventTarget {
   static final instance = new BlinkInputMethodContext();
 
-  compositionEndOffset_Getter_(mthis) => mthis["compositionEndOffset"];
+  compositionEndOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compositionEndOffset");
 
-  compositionStartOffset_Getter_(mthis) => mthis["compositionStartOffset"];
+  compositionStartOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "compositionStartOffset");
 
-  confirmComposition_Callback_0_(mthis) => mthis.callMethod("confirmComposition", []);
+  confirmComposition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "confirmComposition", []);
 
-  locale_Getter_(mthis) => mthis["locale"];
+  locale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "locale");
 
-  oncandidatewindowhide_Getter_(mthis) => mthis["oncandidatewindowhide"];
+  oncandidatewindowhide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowhide");
 
   oncandidatewindowhide_Setter_(mthis, __arg_0) => mthis["oncandidatewindowhide"] = __arg_0;
 
-  oncandidatewindowshow_Getter_(mthis) => mthis["oncandidatewindowshow"];
+  oncandidatewindowshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowshow");
 
   oncandidatewindowshow_Setter_(mthis, __arg_0) => mthis["oncandidatewindowshow"] = __arg_0;
 
-  oncandidatewindowupdate_Getter_(mthis) => mthis["oncandidatewindowupdate"];
+  oncandidatewindowupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncandidatewindowupdate");
 
   oncandidatewindowupdate_Setter_(mthis, __arg_0) => mthis["oncandidatewindowupdate"] = __arg_0;
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
 }
 
 class BlinkInspectorFrontendHost {
   static final instance = new BlinkInspectorFrontendHost();
 
-  copyText_Callback_0_(mthis) => mthis.callMethod("copyText", []);
+  copyText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "copyText", []);
 
-  copyText_Callback_1_(mthis, __arg_0) => mthis.callMethod("copyText", [__arg_0]);
+  copyText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "copyText", [__arg_0]);
 
-  getSelectionBackgroundColor_Callback_0_(mthis) => mthis.callMethod("getSelectionBackgroundColor", []);
+  getSelectionBackgroundColor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelectionBackgroundColor", []);
 
-  getSelectionForegroundColor_Callback_0_(mthis) => mthis.callMethod("getSelectionForegroundColor", []);
+  getSelectionForegroundColor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelectionForegroundColor", []);
 
-  isHostedMode_Callback_0_(mthis) => mthis.callMethod("isHostedMode", []);
+  isHostedMode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isHostedMode", []);
 
-  isUnderTest_Callback_0_(mthis) => mthis.callMethod("isUnderTest", []);
+  isUnderTest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isUnderTest", []);
 
-  isolatedFileSystem_Callback_0_(mthis) => mthis.callMethod("isolatedFileSystem", []);
+  isolatedFileSystem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", []);
 
-  isolatedFileSystem_Callback_1_(mthis, __arg_0) => mthis.callMethod("isolatedFileSystem", [__arg_0]);
+  isolatedFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", [__arg_0]);
 
-  isolatedFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("isolatedFileSystem", [__arg_0, __arg_1]);
+  isolatedFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isolatedFileSystem", [__arg_0, __arg_1]);
 
-  platform_Callback_0_(mthis) => mthis.callMethod("platform", []);
+  platform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "platform", []);
 
-  port_Callback_0_(mthis) => mthis.callMethod("port", []);
+  port_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "port", []);
 
-  recordActionTaken_Callback_0_(mthis) => mthis.callMethod("recordActionTaken", []);
+  recordActionTaken_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "recordActionTaken", []);
 
-  recordActionTaken_Callback_1_(mthis, __arg_0) => mthis.callMethod("recordActionTaken", [__arg_0]);
+  recordActionTaken_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "recordActionTaken", [__arg_0]);
 
-  recordPanelShown_Callback_0_(mthis) => mthis.callMethod("recordPanelShown", []);
+  recordPanelShown_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "recordPanelShown", []);
 
-  recordPanelShown_Callback_1_(mthis, __arg_0) => mthis.callMethod("recordPanelShown", [__arg_0]);
+  recordPanelShown_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "recordPanelShown", [__arg_0]);
 
-  sendMessageToBackend_Callback_0_(mthis) => mthis.callMethod("sendMessageToBackend", []);
+  sendMessageToBackend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToBackend", []);
 
-  sendMessageToBackend_Callback_1_(mthis, __arg_0) => mthis.callMethod("sendMessageToBackend", [__arg_0]);
+  sendMessageToBackend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToBackend", [__arg_0]);
 
-  sendMessageToEmbedder_Callback_0_(mthis) => mthis.callMethod("sendMessageToEmbedder", []);
+  sendMessageToEmbedder_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToEmbedder", []);
 
-  sendMessageToEmbedder_Callback_1_(mthis, __arg_0) => mthis.callMethod("sendMessageToEmbedder", [__arg_0]);
+  sendMessageToEmbedder_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendMessageToEmbedder", [__arg_0]);
 
-  setInjectedScriptForOrigin_Callback_0_(mthis) => mthis.callMethod("setInjectedScriptForOrigin", []);
+  setInjectedScriptForOrigin_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", []);
 
-  setInjectedScriptForOrigin_Callback_1_(mthis, __arg_0) => mthis.callMethod("setInjectedScriptForOrigin", [__arg_0]);
+  setInjectedScriptForOrigin_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", [__arg_0]);
 
-  setInjectedScriptForOrigin_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setInjectedScriptForOrigin", [__arg_0, __arg_1]);
+  setInjectedScriptForOrigin_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInjectedScriptForOrigin", [__arg_0, __arg_1]);
 
-  setZoomFactor_Callback_0_(mthis) => mthis.callMethod("setZoomFactor", []);
+  setZoomFactor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setZoomFactor", []);
 
-  setZoomFactor_Callback_1_(mthis, __arg_0) => mthis.callMethod("setZoomFactor", [__arg_0]);
+  setZoomFactor_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setZoomFactor", [__arg_0]);
 
-  showContextMenuAtPoint_Callback_1_(mthis, __arg_0) => mthis.callMethod("showContextMenuAtPoint", [__arg_0]);
+  showContextMenuAtPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenuAtPoint", [__arg_0]);
 
-  showContextMenuAtPoint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("showContextMenuAtPoint", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("showContextMenuAtPoint", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("showContextMenu", []);
+  showContextMenu_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", []);
 
-  showContextMenu_Callback_1_(mthis, __arg_0) => mthis.callMethod("showContextMenu", [__arg_0]);
+  showContextMenu_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", [__arg_0]);
 
-  showContextMenu_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("showContextMenu", [__arg_0, __arg_1]);
+  showContextMenu_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "showContextMenu", [__arg_0, __arg_1]);
 
-  upgradeDraggedFileSystemPermissions_Callback_0_(mthis) => mthis.callMethod("upgradeDraggedFileSystemPermissions", []);
+  upgradeDraggedFileSystemPermissions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "upgradeDraggedFileSystemPermissions", []);
 
-  upgradeDraggedFileSystemPermissions_Callback_1_(mthis, __arg_0) => mthis.callMethod("upgradeDraggedFileSystemPermissions", [__arg_0]);
+  upgradeDraggedFileSystemPermissions_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "upgradeDraggedFileSystemPermissions", [__arg_0]);
 
-  zoomFactor_Callback_0_(mthis) => mthis.callMethod("zoomFactor", []);
+  zoomFactor_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "zoomFactor", []);
 
 }
 
 class BlinkInspectorOverlayHost {
   static final instance = new BlinkInspectorOverlayHost();
 
-  resume_Callback_0_(mthis) => mthis.callMethod("resume", []);
+  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resume", []);
 
-  stepOver_Callback_0_(mthis) => mthis.callMethod("stepOver", []);
+  stepOver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stepOver", []);
 
 }
 
 class BlinkInstallEvent extends BlinkExtendableEvent {
   static final instance = new BlinkInstallEvent();
 
-  reloadAll_Callback_0_(mthis) => mthis.callMethod("reloadAll", []);
+  reloadAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reloadAll", []);
 
-  replace_Callback_0_(mthis) => mthis.callMethod("replace", []);
+  replace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replace", []);
 
 }
 
 class BlinkIterator {
   static final instance = new BlinkIterator();
 
-  next_Callback_0_(mthis) => mthis.callMethod("next", []);
+  next_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "next", []);
 
-  next_Callback_1_(mthis, __arg_0) => mthis.callMethod("next", [__arg_0]);
+  next_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "next", [__arg_0]);
 
 }
 
 class BlinkJavaScriptCallFrame {
   static final instance = new BlinkJavaScriptCallFrame();
 
-  caller_Getter_(mthis) => mthis["caller"];
+  caller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caller");
 
-  column_Getter_(mthis) => mthis["column"];
+  column_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "column");
 
-  evaluateWithExceptionDetails_Callback_0_(mthis) => mthis.callMethod("evaluateWithExceptionDetails", []);
+  evaluateWithExceptionDetails_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", []);
 
-  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => mthis.callMethod("evaluateWithExceptionDetails", [__arg_0]);
+  evaluateWithExceptionDetails_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "evaluateWithExceptionDetails", [__arg_0]);
 
-  functionName_Getter_(mthis) => mthis["functionName"];
+  functionName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "functionName");
 
-  isAtReturn_Getter_(mthis) => mthis["isAtReturn"];
+  isAtReturn_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isAtReturn");
 
-  line_Getter_(mthis) => mthis["line"];
+  line_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "line");
 
-  restart_Callback_0_(mthis) => mthis.callMethod("restart", []);
+  restart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restart", []);
 
-  returnValue_Getter_(mthis) => mthis["returnValue"];
+  returnValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "returnValue");
 
-  scopeChain_Getter_(mthis) => mthis["scopeChain"];
+  scopeChain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scopeChain");
 
-  scopeType_Callback_0_(mthis) => mthis.callMethod("scopeType", []);
+  scopeType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scopeType", []);
 
-  scopeType_Callback_1_(mthis, __arg_0) => mthis.callMethod("scopeType", [__arg_0]);
+  scopeType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scopeType", [__arg_0]);
 
-  setVariableValue_Callback_0_(mthis) => mthis.callMethod("setVariableValue", []);
+  setVariableValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", []);
 
-  setVariableValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("setVariableValue", [__arg_0]);
+  setVariableValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVariableValue", [__arg_0]);
 
-  setVariableValue_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setVariableValue", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("setVariableValue", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis["sourceID"];
+  sourceID_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceID");
 
-  stepInPositions_Getter_(mthis) => mthis["stepInPositions"];
+  stepInPositions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stepInPositions");
 
-  thisObject_Getter_(mthis) => mthis["thisObject"];
+  thisObject_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "thisObject");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkKeyboardEvent extends BlinkUIEvent {
   static final instance = new BlinkKeyboardEvent();
 
-  altKey_Getter_(mthis) => mthis["altKey"];
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["KeyboardEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "KeyboardEvent"), [__arg_0, __arg_1]);
 
-  ctrlKey_Getter_(mthis) => mthis["ctrlKey"];
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
 
-  getModifierState_Callback_0_(mthis) => mthis.callMethod("getModifierState", []);
+  getModifierState_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getModifierState", []);
 
-  getModifierState_Callback_1_(mthis, __arg_0) => mthis.callMethod("getModifierState", [__arg_0]);
+  getModifierState_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getModifierState", [__arg_0]);
 
-  initKeyboardEvent_Callback_0_(mthis) => mthis.callMethod("initKeyboardEvent", []);
+  initKeyboardEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", []);
 
-  initKeyboardEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initKeyboardEvent", [__arg_0]);
+  initKeyboardEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0]);
 
-  initKeyboardEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  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]);
 
-  initKeyboardEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1]);
+  initKeyboardEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1]);
 
-  initKeyboardEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2]);
+  initKeyboardEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initKeyboardEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initKeyboardEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initKeyboardEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  initKeyboardEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  initKeyboardEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  initKeyboardEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  initKeyboardEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("initKeyboardEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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]);
 
-  keyIdentifier_Getter_(mthis) => mthis["keyIdentifier"];
+  keyIdentifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyIdentifier");
 
-  keyLocation_Getter_(mthis) => mthis["keyLocation"];
+  keyLocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyLocation");
 
-  location_Getter_(mthis) => mthis["location"];
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
 
-  metaKey_Getter_(mthis) => mthis["metaKey"];
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
 
-  repeat_Getter_(mthis) => mthis["repeat"];
+  repeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "repeat");
 
-  shiftKey_Getter_(mthis) => mthis["shiftKey"];
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
 
 }
 
 class BlinkLocalCredential extends BlinkCredential {
   static final instance = new BlinkLocalCredential();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["LocalCredential"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "LocalCredential"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["LocalCredential"], [__arg_0, __arg_1, __arg_2]);
+  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_4_(__arg_0, __arg_1, __arg_2, __arg_3) => new js.JsObject(js.context["LocalCredential"], [__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, "LocalCredential"), [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  password_Getter_(mthis) => mthis["password"];
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
 
 }
 
 class BlinkLocation {
   static final instance = new BlinkLocation();
 
-  ancestorOrigins_Getter_(mthis) => mthis["ancestorOrigins"];
+  ancestorOrigins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ancestorOrigins");
 
-  assign_Callback_0_(mthis) => mthis.callMethod("assign", []);
+  assign_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "assign", []);
 
-  assign_Callback_1_(mthis, __arg_0) => mthis.callMethod("assign", [__arg_0]);
+  assign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "assign", [__arg_0]);
 
-  hash_Getter_(mthis) => mthis["hash"];
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
 
   hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
   host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
 
-  hostname_Getter_(mthis) => mthis["hostname"];
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
 
   hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  pathname_Getter_(mthis) => mthis["pathname"];
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
 
   pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
   port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
   protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
 
-  reload_Callback_0_(mthis) => mthis.callMethod("reload", []);
+  reload_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reload", []);
 
-  replace_Callback_0_(mthis) => mthis.callMethod("replace", []);
+  replace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replace", []);
 
-  replace_Callback_1_(mthis, __arg_0) => mthis.callMethod("replace", [__arg_0]);
+  replace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replace", [__arg_0]);
 
-  search_Getter_(mthis) => mthis["search"];
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
 
   search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
 }
 
 class BlinkMIDIAccess extends BlinkEventTarget {
   static final instance = new BlinkMIDIAccess();
 
-  inputs_Getter_(mthis) => mthis["inputs"];
+  inputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "inputs");
 
-  onconnect_Getter_(mthis) => mthis["onconnect"];
+  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onconnect");
 
   onconnect_Setter_(mthis, __arg_0) => mthis["onconnect"] = __arg_0;
 
-  ondisconnect_Getter_(mthis) => mthis["ondisconnect"];
+  ondisconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondisconnect");
 
   ondisconnect_Setter_(mthis, __arg_0) => mthis["ondisconnect"] = __arg_0;
 
-  outputs_Getter_(mthis) => mthis["outputs"];
+  outputs_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outputs");
 
-  sysexEnabled_Getter_(mthis) => mthis["sysexEnabled"];
+  sysexEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sysexEnabled");
 
 }
 
 class BlinkMIDIConnectionEvent extends BlinkEvent {
   static final instance = new BlinkMIDIConnectionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MIDIConnectionEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MIDIConnectionEvent"), [__arg_0, __arg_1]);
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
 }
 
 class BlinkMIDIInput extends BlinkMIDIPort {
   static final instance = new BlinkMIDIInput();
 
-  onmidimessage_Getter_(mthis) => mthis["onmidimessage"];
+  onmidimessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmidimessage");
 
   onmidimessage_Setter_(mthis, __arg_0) => mthis["onmidimessage"] = __arg_0;
 
@@ -8258,126 +8259,126 @@
 class BlinkMIDIInputMap {
   static final instance = new BlinkMIDIInputMap();
 
-  entries_Callback_0_(mthis) => mthis.callMethod("entries", []);
+  entries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "entries", []);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  has_Callback_0_(mthis) => mthis.callMethod("has", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
 
-  has_Callback_1_(mthis, __arg_0) => mthis.callMethod("has", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
 
-  keys_Callback_0_(mthis) => mthis.callMethod("keys", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
-  values_Callback_0_(mthis) => mthis.callMethod("values", []);
+  values_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "values", []);
 
 }
 
 class BlinkMIDIMessageEvent extends BlinkEvent {
   static final instance = new BlinkMIDIMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MIDIMessageEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MIDIMessageEvent"), [__arg_0, __arg_1]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
-  receivedTime_Getter_(mthis) => mthis["receivedTime"];
+  receivedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "receivedTime");
 
 }
 
 class BlinkMIDIOutput extends BlinkMIDIPort {
   static final instance = new BlinkMIDIOutput();
 
-  send_Callback_0_(mthis) => mthis.callMethod("send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => mthis.callMethod("send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
 
-  send_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("send", [__arg_0, __arg_1]);
+  send_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0, __arg_1]);
 
 }
 
 class BlinkMIDIOutputMap {
   static final instance = new BlinkMIDIOutputMap();
 
-  entries_Callback_0_(mthis) => mthis.callMethod("entries", []);
+  entries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "entries", []);
 
-  get_Callback_0_(mthis) => mthis.callMethod("get", []);
+  get_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "get", []);
 
-  get_Callback_1_(mthis, __arg_0) => mthis.callMethod("get", [__arg_0]);
+  get_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "get", [__arg_0]);
 
-  has_Callback_0_(mthis) => mthis.callMethod("has", []);
+  has_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "has", []);
 
-  has_Callback_1_(mthis, __arg_0) => mthis.callMethod("has", [__arg_0]);
+  has_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "has", [__arg_0]);
 
-  keys_Callback_0_(mthis) => mthis.callMethod("keys", []);
+  keys_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "keys", []);
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
-  values_Callback_0_(mthis) => mthis.callMethod("values", []);
+  values_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "values", []);
 
 }
 
 class BlinkMIDIPort extends BlinkEventTarget {
   static final instance = new BlinkMIDIPort();
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  manufacturer_Getter_(mthis) => mthis["manufacturer"];
+  manufacturer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "manufacturer");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  ondisconnect_Getter_(mthis) => mthis["ondisconnect"];
+  ondisconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondisconnect");
 
   ondisconnect_Setter_(mthis, __arg_0) => mthis["ondisconnect"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  version_Getter_(mthis) => mthis["version"];
+  version_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "version");
 
 }
 
 class BlinkMediaController extends BlinkEventTarget {
   static final instance = new BlinkMediaController();
 
-  buffered_Getter_(mthis) => mthis["buffered"];
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
 
-  constructorCallback_0_() => new js.JsObject(js.context["MediaController"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaController"), []);
 
-  currentTime_Getter_(mthis) => mthis["currentTime"];
+  currentTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTime");
 
   currentTime_Setter_(mthis, __arg_0) => mthis["currentTime"] = __arg_0;
 
-  defaultPlaybackRate_Getter_(mthis) => mthis["defaultPlaybackRate"];
+  defaultPlaybackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultPlaybackRate");
 
   defaultPlaybackRate_Setter_(mthis, __arg_0) => mthis["defaultPlaybackRate"] = __arg_0;
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  muted_Getter_(mthis) => mthis["muted"];
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
 
   muted_Setter_(mthis, __arg_0) => mthis["muted"] = __arg_0;
 
-  pause_Callback_0_(mthis) => mthis.callMethod("pause", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
 
-  paused_Getter_(mthis) => mthis["paused"];
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
 
-  play_Callback_0_(mthis) => mthis.callMethod("play", []);
+  play_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "play", []);
 
-  playbackRate_Getter_(mthis) => mthis["playbackRate"];
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
 
   playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
 
-  playbackState_Getter_(mthis) => mthis["playbackState"];
+  playbackState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackState");
 
-  played_Getter_(mthis) => mthis["played"];
+  played_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "played");
 
-  seekable_Getter_(mthis) => mthis["seekable"];
+  seekable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seekable");
 
-  unpause_Callback_0_(mthis) => mthis.callMethod("unpause", []);
+  unpause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unpause", []);
 
-  volume_Getter_(mthis) => mthis["volume"];
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
 
   volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
 
@@ -8386,148 +8387,148 @@
 class BlinkMediaDeviceInfo {
   static final instance = new BlinkMediaDeviceInfo();
 
-  deviceId_Getter_(mthis) => mthis["deviceId"];
+  deviceId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deviceId");
 
-  groupId_Getter_(mthis) => mthis["groupId"];
+  groupId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "groupId");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
 }
 
 class BlinkMediaElementAudioSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkMediaElementAudioSourceNode();
 
-  mediaElement_Getter_(mthis) => mthis["mediaElement"];
+  mediaElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaElement");
 
 }
 
 class BlinkMediaError {
   static final instance = new BlinkMediaError();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
 }
 
 class BlinkMediaKeyError {
   static final instance = new BlinkMediaKeyError();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
-  systemCode_Getter_(mthis) => mthis["systemCode"];
+  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemCode");
 
 }
 
 class BlinkMediaKeyEvent extends BlinkEvent {
   static final instance = new BlinkMediaKeyEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MediaKeyEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyEvent"), [__arg_0, __arg_1]);
 
-  defaultURL_Getter_(mthis) => mthis["defaultURL"];
+  defaultURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultURL");
 
-  errorCode_Getter_(mthis) => mthis["errorCode"];
+  errorCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "errorCode");
 
-  initData_Getter_(mthis) => mthis["initData"];
+  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initData");
 
-  keySystem_Getter_(mthis) => mthis["keySystem"];
+  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
-  sessionId_Getter_(mthis) => mthis["sessionId"];
+  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionId");
 
-  systemCode_Getter_(mthis) => mthis["systemCode"];
+  systemCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemCode");
 
 }
 
 class BlinkMediaKeyMessageEvent extends BlinkEvent {
   static final instance = new BlinkMediaKeyMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MediaKeyMessageEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyMessageEvent"), [__arg_0, __arg_1]);
 
-  destinationURL_Getter_(mthis) => mthis["destinationURL"];
+  destinationURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "destinationURL");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
 }
 
 class BlinkMediaKeyNeededEvent extends BlinkEvent {
   static final instance = new BlinkMediaKeyNeededEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MediaKeyNeededEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaKeyNeededEvent"), [__arg_0, __arg_1]);
 
-  contentType_Getter_(mthis) => mthis["contentType"];
+  contentType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "contentType");
 
-  initData_Getter_(mthis) => mthis["initData"];
+  initData_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initData");
 
 }
 
 class BlinkMediaKeySession extends BlinkEventTarget {
   static final instance = new BlinkMediaKeySession();
 
-  closed_Getter_(mthis) => mthis["closed"];
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  generateRequest_Callback_0_(mthis) => mthis.callMethod("generateRequest", []);
+  generateRequest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", []);
 
-  generateRequest_Callback_1_(mthis, __arg_0) => mthis.callMethod("generateRequest", [__arg_0]);
+  generateRequest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", [__arg_0]);
 
-  generateRequest_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("generateRequest", [__arg_0, __arg_1]);
+  generateRequest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "generateRequest", [__arg_0, __arg_1]);
 
-  keySystem_Getter_(mthis) => mthis["keySystem"];
+  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
 
-  release_Callback_0_(mthis) => mthis.callMethod("release", []);
+  release_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "release", []);
 
-  sessionId_Getter_(mthis) => mthis["sessionId"];
+  sessionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionId");
 
-  update_Callback_0_(mthis) => mthis.callMethod("update", []);
+  update_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "update", []);
 
-  update_Callback_1_(mthis, __arg_0) => mthis.callMethod("update", [__arg_0]);
+  update_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "update", [__arg_0]);
 
 }
 
 class BlinkMediaKeys {
   static final instance = new BlinkMediaKeys();
 
-  createSession_Callback_0_(mthis) => mthis.callMethod("createSession", []);
+  createSession_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSession", []);
 
-  createSession_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSession", [__arg_0]);
+  createSession_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSession", [__arg_0]);
 
-  create_Callback_0_() => js.context["MediaKeys"].callMethod("create", []);
+  create_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "create", []);
 
-  create_Callback_1_(__arg_0) => js.context["MediaKeys"].callMethod("create", [__arg_0]);
+  create_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "create", [__arg_0]);
 
-  isTypeSupported_Callback_0_() => js.context["MediaKeys"].callMethod("isTypeSupported", []);
+  isTypeSupported_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaKeys"), "isTypeSupported", []);
 
-  isTypeSupported_Callback_1_(__arg_0) => js.context["MediaKeys"].callMethod("isTypeSupported", [__arg_0]);
+  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) => js.context["MediaKeys"].callMethod("isTypeSupported", [__arg_0, __arg_1]);
+  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) => mthis["keySystem"];
+  keySystem_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keySystem");
 
 }
 
 class BlinkMediaList {
   static final instance = new BlinkMediaList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  appendMedium_Callback_0_(mthis) => mthis.callMethod("appendMedium", []);
+  appendMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendMedium", []);
 
-  appendMedium_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendMedium", [__arg_0]);
+  appendMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendMedium", [__arg_0]);
 
-  deleteMedium_Callback_0_(mthis) => mthis.callMethod("deleteMedium", []);
+  deleteMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteMedium", []);
 
-  deleteMedium_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteMedium", [__arg_0]);
+  deleteMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteMedium", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  mediaText_Getter_(mthis) => mthis["mediaText"];
+  mediaText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaText");
 
   mediaText_Setter_(mthis, __arg_0) => mthis["mediaText"] = __arg_0;
 
@@ -8536,687 +8537,687 @@
 class BlinkMediaQueryList extends BlinkEventTarget {
   static final instance = new BlinkMediaQueryList();
 
-  addListener_Callback_0_(mthis) => mthis.callMethod("addListener", []);
+  addListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addListener", []);
 
-  addListener_Callback_1_(mthis, __arg_0) => mthis.callMethod("addListener", [__arg_0]);
+  addListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addListener", [__arg_0]);
 
-  matches_Getter_(mthis) => mthis["matches"];
+  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matches");
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  removeListener_Callback_0_(mthis) => mthis.callMethod("removeListener", []);
+  removeListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeListener", []);
 
-  removeListener_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeListener", [__arg_0]);
+  removeListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeListener", [__arg_0]);
 
 }
 
 class BlinkMediaQueryListEvent extends BlinkEvent {
   static final instance = new BlinkMediaQueryListEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MediaQueryListEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaQueryListEvent"), [__arg_0, __arg_1]);
 
-  matches_Getter_(mthis) => mthis["matches"];
+  matches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matches");
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
 }
 
 class BlinkMediaSource extends BlinkEventTarget {
   static final instance = new BlinkMediaSource();
 
-  activeSourceBuffers_Getter_(mthis) => mthis["activeSourceBuffers"];
+  activeSourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeSourceBuffers");
 
-  addSourceBuffer_Callback_0_(mthis) => mthis.callMethod("addSourceBuffer", []);
+  addSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addSourceBuffer", []);
 
-  addSourceBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("addSourceBuffer", [__arg_0]);
+  addSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addSourceBuffer", [__arg_0]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["MediaSource"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), []);
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
   duration_Setter_(mthis, __arg_0) => mthis["duration"] = __arg_0;
 
-  endOfStream_Callback_0_(mthis) => mthis.callMethod("endOfStream", []);
+  endOfStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endOfStream", []);
 
-  endOfStream_Callback_1_(mthis, __arg_0) => mthis.callMethod("endOfStream", [__arg_0]);
+  endOfStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "endOfStream", [__arg_0]);
 
-  isTypeSupported_Callback_0_() => js.context["MediaSource"].callMethod("isTypeSupported", []);
+  isTypeSupported_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), "isTypeSupported", []);
 
-  isTypeSupported_Callback_1_(__arg_0) => js.context["MediaSource"].callMethod("isTypeSupported", [__arg_0]);
+  isTypeSupported_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaSource"), "isTypeSupported", [__arg_0]);
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  removeSourceBuffer_Callback_0_(mthis) => mthis.callMethod("removeSourceBuffer", []);
+  removeSourceBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeSourceBuffer", []);
 
-  removeSourceBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeSourceBuffer", [__arg_0]);
+  removeSourceBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeSourceBuffer", [__arg_0]);
 
-  sourceBuffers_Getter_(mthis) => mthis["sourceBuffers"];
+  sourceBuffers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceBuffers");
 
 }
 
 class BlinkMediaStream extends BlinkEventTarget {
   static final instance = new BlinkMediaStream();
 
-  addTrack_Callback_0_(mthis) => mthis.callMethod("addTrack", []);
+  addTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addTrack", []);
 
-  addTrack_Callback_1_(mthis, __arg_0) => mthis.callMethod("addTrack", [__arg_0]);
+  addTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addTrack", [__arg_0]);
 
-  clone_Callback_0_(mthis) => mthis.callMethod("clone", []);
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["MediaStream"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStream"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["MediaStream"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStream"), [__arg_0]);
 
-  ended_Getter_(mthis) => mthis["ended"];
+  ended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ended");
 
-  getAudioTracks_Callback_0_(mthis) => mthis.callMethod("getAudioTracks", []);
+  getAudioTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAudioTracks", []);
 
-  getTrackById_Callback_0_(mthis) => mthis.callMethod("getTrackById", []);
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
 
-  getTrackById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTrackById", [__arg_0]);
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
 
-  getTracks_Callback_0_(mthis) => mthis.callMethod("getTracks", []);
+  getTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTracks", []);
 
-  getVideoTracks_Callback_0_(mthis) => mthis.callMethod("getVideoTracks", []);
+  getVideoTracks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVideoTracks", []);
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  onaddtrack_Getter_(mthis) => mthis["onaddtrack"];
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
 
   onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onremovetrack_Getter_(mthis) => mthis["onremovetrack"];
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
 
   onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
 
-  removeTrack_Callback_0_(mthis) => mthis.callMethod("removeTrack", []);
+  removeTrack_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeTrack", []);
 
-  removeTrack_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeTrack", [__arg_0]);
+  removeTrack_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeTrack", [__arg_0]);
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
 }
 
 class BlinkMediaStreamAudioDestinationNode extends BlinkAudioNode {
   static final instance = new BlinkMediaStreamAudioDestinationNode();
 
-  stream_Getter_(mthis) => mthis["stream"];
+  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stream");
 
 }
 
 class BlinkMediaStreamAudioSourceNode extends BlinkAudioSourceNode {
   static final instance = new BlinkMediaStreamAudioSourceNode();
 
-  mediaStream_Getter_(mthis) => mthis["mediaStream"];
+  mediaStream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mediaStream");
 
 }
 
 class BlinkMediaStreamEvent extends BlinkEvent {
   static final instance = new BlinkMediaStreamEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MediaStreamEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamEvent"), [__arg_0, __arg_1]);
 
-  stream_Getter_(mthis) => mthis["stream"];
+  stream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stream");
 
 }
 
 class BlinkMediaStreamTrack extends BlinkEventTarget {
   static final instance = new BlinkMediaStreamTrack();
 
-  clone_Callback_0_(mthis) => mthis.callMethod("clone", []);
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
 
-  enabled_Getter_(mthis) => mthis["enabled"];
+  enabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabled");
 
   enabled_Setter_(mthis, __arg_0) => mthis["enabled"] = __arg_0;
 
-  getSources_Callback_0_() => js.context["MediaStreamTrack"].callMethod("getSources", []);
+  getSources_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack"), "getSources", []);
 
-  getSources_Callback_1_(__arg_0) => js.context["MediaStreamTrack"].callMethod("getSources", [__arg_0]);
+  getSources_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "MediaStreamTrack"), "getSources", [__arg_0]);
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  muted_Getter_(mthis) => mthis["muted"];
+  muted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "muted");
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onmute_Getter_(mthis) => mthis["onmute"];
+  onmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmute");
 
   onmute_Setter_(mthis, __arg_0) => mthis["onmute"] = __arg_0;
 
-  onunmute_Getter_(mthis) => mthis["onunmute"];
+  onunmute_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunmute");
 
   onunmute_Setter_(mthis, __arg_0) => mthis["onunmute"] = __arg_0;
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
 }
 
 class BlinkMediaStreamTrackEvent extends BlinkEvent {
   static final instance = new BlinkMediaStreamTrackEvent();
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
 }
 
 class BlinkMemoryInfo {
   static final instance = new BlinkMemoryInfo();
 
-  jsHeapSizeLimit_Getter_(mthis) => mthis["jsHeapSizeLimit"];
+  jsHeapSizeLimit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "jsHeapSizeLimit");
 
-  totalJSHeapSize_Getter_(mthis) => mthis["totalJSHeapSize"];
+  totalJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalJSHeapSize");
 
-  usedJSHeapSize_Getter_(mthis) => mthis["usedJSHeapSize"];
+  usedJSHeapSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usedJSHeapSize");
 
 }
 
 class BlinkMessageChannel {
   static final instance = new BlinkMessageChannel();
 
-  constructorCallback_0_() => new js.JsObject(js.context["MessageChannel"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MessageChannel"), []);
 
-  port1_Getter_(mthis) => mthis["port1"];
+  port1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port1");
 
-  port2_Getter_(mthis) => mthis["port2"];
+  port2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port2");
 
 }
 
 class BlinkMessageEvent extends BlinkEvent {
   static final instance = new BlinkMessageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MessageEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MessageEvent"), [__arg_0, __arg_1]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
-  initMessageEvent_Callback_0_(mthis) => mthis.callMethod("initMessageEvent", []);
+  initMessageEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", []);
 
-  initMessageEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initMessageEvent", [__arg_0]);
+  initMessageEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0]);
 
-  initMessageEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initMessageEvent", [__arg_0, __arg_1]);
+  initMessageEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1]);
 
-  initMessageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initMessageEvent", [__arg_0, __arg_1, __arg_2]);
+  initMessageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMessageEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initMessageEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initMessageEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  initMessageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("initMessageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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) => mthis["lastEventId"];
+  lastEventId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastEventId");
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  source_Getter_(mthis) => mthis["source"];
+  source_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "source");
 
 }
 
 class BlinkMessagePort extends BlinkEventTarget {
   static final instance = new BlinkMessagePort();
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
 
-  start_Callback_0_(mthis) => mthis.callMethod("start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
 
 }
 
 class BlinkMetadata {
   static final instance = new BlinkMetadata();
 
-  modificationTime_Getter_(mthis) => mthis["modificationTime"];
+  modificationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "modificationTime");
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
 }
 
 class BlinkMimeType {
   static final instance = new BlinkMimeType();
 
-  description_Getter_(mthis) => mthis["description"];
+  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "description");
 
-  enabledPlugin_Getter_(mthis) => mthis["enabledPlugin"];
+  enabledPlugin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "enabledPlugin");
 
-  suffixes_Getter_(mthis) => mthis["suffixes"];
+  suffixes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "suffixes");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkMimeTypeArray {
   static final instance = new BlinkMimeTypeArray();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
 }
 
 class BlinkMouseEvent extends BlinkUIEvent {
   static final instance = new BlinkMouseEvent();
 
-  altKey_Getter_(mthis) => mthis["altKey"];
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
 
-  button_Getter_(mthis) => mthis["button"];
+  button_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "button");
 
-  clientX_Getter_(mthis) => mthis["clientX"];
+  clientX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientX");
 
-  clientY_Getter_(mthis) => mthis["clientY"];
+  clientY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientY");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["MouseEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MouseEvent"), [__arg_0, __arg_1]);
 
-  ctrlKey_Getter_(mthis) => mthis["ctrlKey"];
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
 
-  dataTransfer_Getter_(mthis) => mthis["dataTransfer"];
+  dataTransfer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dataTransfer");
 
-  fromElement_Getter_(mthis) => mthis["fromElement"];
+  fromElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fromElement");
 
-  initMouseEvent_Callback_0_(mthis) => mthis.callMethod("initMouseEvent", []);
+  initMouseEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", []);
 
-  initMouseEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initMouseEvent", [__arg_0]);
+  initMouseEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0]);
 
-  initMouseEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  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]);
 
-  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) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9, __arg_10]);
+  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]);
 
-  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) => mthis.callMethod("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]);
+  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]);
 
-  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) => mthis.callMethod("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]);
+  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]);
 
-  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) => mthis.callMethod("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]);
+  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]);
 
-  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) => mthis.callMethod("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]);
+  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]);
 
-  initMouseEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1]);
+  initMouseEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1]);
 
-  initMouseEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2]);
+  initMouseEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMouseEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initMouseEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initMouseEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  initMouseEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  initMouseEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  initMouseEvent_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  initMouseEvent_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("initMouseEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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]);
 
-  metaKey_Getter_(mthis) => mthis["metaKey"];
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
 
-  movementX_Getter_(mthis) => mthis["movementX"];
+  movementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "movementX");
 
-  movementY_Getter_(mthis) => mthis["movementY"];
+  movementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "movementY");
 
-  offsetX_Getter_(mthis) => mthis["offsetX"];
+  offsetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetX");
 
-  offsetY_Getter_(mthis) => mthis["offsetY"];
+  offsetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offsetY");
 
-  region_Getter_(mthis) => mthis["region"];
+  region_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "region");
 
-  relatedTarget_Getter_(mthis) => mthis["relatedTarget"];
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
 
-  screenX_Getter_(mthis) => mthis["screenX"];
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
 
-  screenY_Getter_(mthis) => mthis["screenY"];
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
 
-  shiftKey_Getter_(mthis) => mthis["shiftKey"];
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
 
-  toElement_Getter_(mthis) => mthis["toElement"];
+  toElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toElement");
 
-  webkitMovementX_Getter_(mthis) => mthis["webkitMovementX"];
+  webkitMovementX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitMovementX");
 
-  webkitMovementY_Getter_(mthis) => mthis["webkitMovementY"];
+  webkitMovementY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitMovementY");
 
 }
 
 class BlinkMutationEvent extends BlinkEvent {
   static final instance = new BlinkMutationEvent();
 
-  attrChange_Getter_(mthis) => mthis["attrChange"];
+  attrChange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attrChange");
 
-  attrName_Getter_(mthis) => mthis["attrName"];
+  attrName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attrName");
 
-  initMutationEvent_Callback_0_(mthis) => mthis.callMethod("initMutationEvent", []);
+  initMutationEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", []);
 
-  initMutationEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initMutationEvent", [__arg_0]);
+  initMutationEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0]);
 
-  initMutationEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1]);
+  initMutationEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1]);
 
-  initMutationEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2]);
+  initMutationEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initMutationEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initMutationEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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) => mthis.callMethod("initMutationEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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) => mthis["newValue"];
+  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newValue");
 
-  prevValue_Getter_(mthis) => mthis["prevValue"];
+  prevValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "prevValue");
 
-  relatedNode_Getter_(mthis) => mthis["relatedNode"];
+  relatedNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedNode");
 
 }
 
 class BlinkMutationObserver {
   static final instance = new BlinkMutationObserver();
 
-  constructorCallback_0_() => new js.JsObject(js.context["MutationObserver"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MutationObserver"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["MutationObserver"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "MutationObserver"), [__arg_0]);
 
-  disconnect_Callback_0_(mthis) => mthis.callMethod("disconnect", []);
+  disconnect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disconnect", []);
 
-  observe_Callback_0_(mthis) => mthis.callMethod("observe", []);
+  observe_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "observe", []);
 
-  observe_Callback_1_(mthis, __arg_0) => mthis.callMethod("observe", [__arg_0]);
+  observe_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "observe", [__arg_0]);
 
-  observe_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("observe", [__arg_0, __arg_1]);
+  observe_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "observe", [__arg_0, __arg_1]);
 
-  takeRecords_Callback_0_(mthis) => mthis.callMethod("takeRecords", []);
+  takeRecords_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "takeRecords", []);
 
 }
 
 class BlinkMutationRecord {
   static final instance = new BlinkMutationRecord();
 
-  addedNodes_Getter_(mthis) => mthis["addedNodes"];
+  addedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "addedNodes");
 
-  attributeName_Getter_(mthis) => mthis["attributeName"];
+  attributeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributeName");
 
-  attributeNamespace_Getter_(mthis) => mthis["attributeNamespace"];
+  attributeNamespace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "attributeNamespace");
 
-  nextSibling_Getter_(mthis) => mthis["nextSibling"];
+  nextSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextSibling");
 
-  oldValue_Getter_(mthis) => mthis["oldValue"];
+  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldValue");
 
-  previousSibling_Getter_(mthis) => mthis["previousSibling"];
+  previousSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousSibling");
 
-  removedNodes_Getter_(mthis) => mthis["removedNodes"];
+  removedNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "removedNodes");
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkNamedNodeMap {
   static final instance = new BlinkNamedNodeMap();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getNamedItemNS_Callback_0_(mthis) => mthis.callMethod("getNamedItemNS", []);
+  getNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", []);
 
-  getNamedItemNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("getNamedItemNS", [__arg_0]);
+  getNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", [__arg_0]);
 
-  getNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getNamedItemNS", [__arg_0, __arg_1]);
+  getNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItemNS", [__arg_0, __arg_1]);
 
-  getNamedItem_Callback_0_(mthis) => mthis.callMethod("getNamedItem", []);
+  getNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItem", []);
 
-  getNamedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getNamedItem", [__arg_0]);
+  getNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getNamedItem", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  removeNamedItemNS_Callback_0_(mthis) => mthis.callMethod("removeNamedItemNS", []);
+  removeNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", []);
 
-  removeNamedItemNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeNamedItemNS", [__arg_0]);
+  removeNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", [__arg_0]);
 
-  removeNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("removeNamedItemNS", [__arg_0, __arg_1]);
+  removeNamedItemNS_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItemNS", [__arg_0, __arg_1]);
 
-  removeNamedItem_Callback_0_(mthis) => mthis.callMethod("removeNamedItem", []);
+  removeNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItem", []);
 
-  removeNamedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeNamedItem", [__arg_0]);
+  removeNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeNamedItem", [__arg_0]);
 
-  setNamedItemNS_Callback_0_(mthis) => mthis.callMethod("setNamedItemNS", []);
+  setNamedItemNS_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItemNS", []);
 
-  setNamedItemNS_Callback_1_(mthis, __arg_0) => mthis.callMethod("setNamedItemNS", [__arg_0]);
+  setNamedItemNS_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItemNS", [__arg_0]);
 
-  setNamedItem_Callback_0_(mthis) => mthis.callMethod("setNamedItem", []);
+  setNamedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItem", []);
 
-  setNamedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("setNamedItem", [__arg_0]);
+  setNamedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setNamedItem", [__arg_0]);
 
 }
 
 class BlinkNavigator {
   static final instance = new BlinkNavigator();
 
-  appCodeName_Getter_(mthis) => mthis["appCodeName"];
+  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appCodeName");
 
-  appName_Getter_(mthis) => mthis["appName"];
+  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appName");
 
-  appVersion_Getter_(mthis) => mthis["appVersion"];
+  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appVersion");
 
-  connection_Getter_(mthis) => mthis["connection"];
+  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connection");
 
-  cookieEnabled_Getter_(mthis) => mthis["cookieEnabled"];
+  cookieEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cookieEnabled");
 
-  credentials_Getter_(mthis) => mthis["credentials"];
+  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "credentials");
 
-  dartEnabled_Getter_(mthis) => mthis["dartEnabled"];
+  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dartEnabled");
 
-  doNotTrack_Getter_(mthis) => mthis["doNotTrack"];
+  doNotTrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "doNotTrack");
 
-  geofencing_Getter_(mthis) => mthis["geofencing"];
+  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geofencing");
 
-  geolocation_Getter_(mthis) => mthis["geolocation"];
+  geolocation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geolocation");
 
-  getBattery_Callback_0_(mthis) => mthis.callMethod("getBattery", []);
+  getBattery_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBattery", []);
 
-  getGamepads_Callback_0_(mthis) => mthis.callMethod("getGamepads", []);
+  getGamepads_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getGamepads", []);
 
-  getStorageUpdates_Callback_0_(mthis) => mthis.callMethod("getStorageUpdates", []);
+  getStorageUpdates_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStorageUpdates", []);
 
-  hardwareConcurrency_Getter_(mthis) => mthis["hardwareConcurrency"];
+  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hardwareConcurrency");
 
-  isProtocolHandlerRegistered_Callback_0_(mthis) => mthis.callMethod("isProtocolHandlerRegistered", []);
+  isProtocolHandlerRegistered_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", []);
 
-  isProtocolHandlerRegistered_Callback_1_(mthis, __arg_0) => mthis.callMethod("isProtocolHandlerRegistered", [__arg_0]);
+  isProtocolHandlerRegistered_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", [__arg_0]);
 
-  isProtocolHandlerRegistered_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("isProtocolHandlerRegistered", [__arg_0, __arg_1]);
+  isProtocolHandlerRegistered_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isProtocolHandlerRegistered", [__arg_0, __arg_1]);
 
-  javaEnabled_Callback_0_(mthis) => mthis.callMethod("javaEnabled", []);
+  javaEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "javaEnabled", []);
 
-  language_Getter_(mthis) => mthis["language"];
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
 
-  languages_Getter_(mthis) => mthis["languages"];
+  languages_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "languages");
 
-  maxTouchPoints_Getter_(mthis) => mthis["maxTouchPoints"];
+  maxTouchPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxTouchPoints");
 
-  mimeTypes_Getter_(mthis) => mthis["mimeTypes"];
+  mimeTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mimeTypes");
 
-  onLine_Getter_(mthis) => mthis["onLine"];
+  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onLine");
 
-  platform_Getter_(mthis) => mthis["platform"];
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "platform");
 
-  plugins_Getter_(mthis) => mthis["plugins"];
+  plugins_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "plugins");
 
-  presentation_Getter_(mthis) => mthis["presentation"];
+  presentation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "presentation");
 
-  productSub_Getter_(mthis) => mthis["productSub"];
+  productSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "productSub");
 
-  product_Getter_(mthis) => mthis["product"];
+  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "product");
 
-  push_Getter_(mthis) => mthis["push"];
+  push_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "push");
 
-  registerProtocolHandler_Callback_1_(mthis, __arg_0) => mthis.callMethod("registerProtocolHandler", [__arg_0]);
+  registerProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0]);
 
-  registerProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("registerProtocolHandler", [__arg_0, __arg_1]);
+  registerProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0, __arg_1]);
 
-  registerProtocolHandler_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("registerProtocolHandler", [__arg_0, __arg_1, __arg_2]);
+  registerProtocolHandler_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "registerProtocolHandler", [__arg_0, __arg_1, __arg_2]);
 
-  sendBeacon_Callback_0_(mthis) => mthis.callMethod("sendBeacon", []);
+  sendBeacon_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", []);
 
-  sendBeacon_Callback_1_(mthis, __arg_0) => mthis.callMethod("sendBeacon", [__arg_0]);
+  sendBeacon_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", [__arg_0]);
 
-  sendBeacon_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("sendBeacon", [__arg_0, __arg_1]);
+  sendBeacon_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sendBeacon", [__arg_0, __arg_1]);
 
-  serviceWorker_Getter_(mthis) => mthis["serviceWorker"];
+  serviceWorker_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "serviceWorker");
 
-  storageQuota_Getter_(mthis) => mthis["storageQuota"];
+  storageQuota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storageQuota");
 
-  unregisterProtocolHandler_Callback_0_(mthis) => mthis.callMethod("unregisterProtocolHandler", []);
+  unregisterProtocolHandler_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", []);
 
-  unregisterProtocolHandler_Callback_1_(mthis, __arg_0) => mthis.callMethod("unregisterProtocolHandler", [__arg_0]);
+  unregisterProtocolHandler_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", [__arg_0]);
 
-  unregisterProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("unregisterProtocolHandler", [__arg_0, __arg_1]);
+  unregisterProtocolHandler_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "unregisterProtocolHandler", [__arg_0, __arg_1]);
 
-  userAgent_Getter_(mthis) => mthis["userAgent"];
+  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "userAgent");
 
-  vendorSub_Getter_(mthis) => mthis["vendorSub"];
+  vendorSub_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vendorSub");
 
-  vendor_Getter_(mthis) => mthis["vendor"];
+  vendor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vendor");
 
-  vibrate_Callback_0_(mthis) => mthis.callMethod("vibrate", []);
+  vibrate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vibrate", []);
 
-  vibrate_Callback_1_(mthis, __arg_0) => mthis.callMethod("vibrate", [__arg_0]);
+  vibrate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vibrate", [__arg_0]);
 
-  webkitGetGamepads_Callback_0_(mthis) => mthis.callMethod("webkitGetGamepads", []);
+  webkitGetGamepads_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetGamepads", []);
 
-  webkitGetUserMedia_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitGetUserMedia", [__arg_0]);
+  webkitGetUserMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0]);
 
-  webkitGetUserMedia_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitGetUserMedia", [__arg_0, __arg_1]);
+  webkitGetUserMedia_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0, __arg_1]);
 
-  webkitGetUserMedia_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitGetUserMedia", [__arg_0, __arg_1, __arg_2]);
+  webkitGetUserMedia_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitGetUserMedia", [__arg_0, __arg_1, __arg_2]);
 
-  webkitPersistentStorage_Getter_(mthis) => mthis["webkitPersistentStorage"];
+  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitPersistentStorage");
 
-  webkitTemporaryStorage_Getter_(mthis) => mthis["webkitTemporaryStorage"];
+  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitTemporaryStorage");
 
 }
 
 class BlinkNavigatorUserMediaError {
   static final instance = new BlinkNavigatorUserMediaError();
 
-  constraintName_Getter_(mthis) => mthis["constraintName"];
+  constraintName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "constraintName");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
 }
 
 class BlinkNetworkInformation extends BlinkEventTarget {
   static final instance = new BlinkNetworkInformation();
 
-  ontypechange_Getter_(mthis) => mthis["ontypechange"];
+  ontypechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontypechange");
 
   ontypechange_Setter_(mthis, __arg_0) => mthis["ontypechange"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkNode extends BlinkEventTarget {
   static final instance = new BlinkNode();
 
-  appendChild_Callback_0_(mthis) => mthis.callMethod("appendChild", []);
+  appendChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendChild", []);
 
-  appendChild_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendChild", [__arg_0]);
+  appendChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendChild", [__arg_0]);
 
-  baseURI_Getter_(mthis) => mthis["baseURI"];
+  baseURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseURI");
 
-  childNodes_Getter_(mthis) => mthis["childNodes"];
+  childNodes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "childNodes");
 
-  cloneNode_Callback_0_(mthis) => mthis.callMethod("cloneNode", []);
+  cloneNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", []);
 
-  cloneNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("cloneNode", [__arg_0]);
+  cloneNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", [__arg_0]);
 
-  contains_Callback_0_(mthis) => mthis.callMethod("contains", []);
+  contains_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "contains", []);
 
-  contains_Callback_1_(mthis, __arg_0) => mthis.callMethod("contains", [__arg_0]);
+  contains_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "contains", [__arg_0]);
 
-  firstChild_Getter_(mthis) => mthis["firstChild"];
+  firstChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "firstChild");
 
-  hasChildNodes_Callback_0_(mthis) => mthis.callMethod("hasChildNodes", []);
+  hasChildNodes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasChildNodes", []);
 
-  insertBefore_Callback_0_(mthis) => mthis.callMethod("insertBefore", []);
+  insertBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", []);
 
-  insertBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertBefore", [__arg_0]);
+  insertBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", [__arg_0]);
 
-  insertBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertBefore", [__arg_0, __arg_1]);
+  insertBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertBefore", [__arg_0, __arg_1]);
 
-  lastChild_Getter_(mthis) => mthis["lastChild"];
+  lastChild_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lastChild");
 
-  localName_Getter_(mthis) => mthis["localName"];
+  localName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localName");
 
-  namespaceURI_Getter_(mthis) => mthis["namespaceURI"];
+  namespaceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "namespaceURI");
 
-  nextSibling_Getter_(mthis) => mthis["nextSibling"];
+  nextSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nextSibling");
 
-  nodeName_Getter_(mthis) => mthis["nodeName"];
+  nodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeName");
 
-  nodeType_Getter_(mthis) => mthis["nodeType"];
+  nodeType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeType");
 
-  nodeValue_Getter_(mthis) => mthis["nodeValue"];
+  nodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nodeValue");
 
   nodeValue_Setter_(mthis, __arg_0) => mthis["nodeValue"] = __arg_0;
 
-  ownerDocument_Getter_(mthis) => mthis["ownerDocument"];
+  ownerDocument_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerDocument");
 
-  parentElement_Getter_(mthis) => mthis["parentElement"];
+  parentElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentElement");
 
-  parentNode_Getter_(mthis) => mthis["parentNode"];
+  parentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentNode");
 
-  previousSibling_Getter_(mthis) => mthis["previousSibling"];
+  previousSibling_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousSibling");
 
-  removeChild_Callback_0_(mthis) => mthis.callMethod("removeChild", []);
+  removeChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeChild", []);
 
-  removeChild_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeChild", [__arg_0]);
+  removeChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeChild", [__arg_0]);
 
-  replaceChild_Callback_0_(mthis) => mthis.callMethod("replaceChild", []);
+  replaceChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", []);
 
-  replaceChild_Callback_1_(mthis, __arg_0) => mthis.callMethod("replaceChild", [__arg_0]);
+  replaceChild_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", [__arg_0]);
 
-  replaceChild_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("replaceChild", [__arg_0, __arg_1]);
+  replaceChild_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceChild", [__arg_0, __arg_1]);
 
-  textContent_Getter_(mthis) => mthis["textContent"];
+  textContent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textContent");
 
   textContent_Setter_(mthis, __arg_0) => mthis["textContent"] = __arg_0;
 
@@ -9230,79 +9231,79 @@
 class BlinkNodeIterator {
   static final instance = new BlinkNodeIterator();
 
-  detach_Callback_0_(mthis) => mthis.callMethod("detach", []);
+  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detach", []);
 
-  nextNode_Callback_0_(mthis) => mthis.callMethod("nextNode", []);
+  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextNode", []);
 
-  pointerBeforeReferenceNode_Getter_(mthis) => mthis["pointerBeforeReferenceNode"];
+  pointerBeforeReferenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointerBeforeReferenceNode");
 
-  previousNode_Callback_0_(mthis) => mthis.callMethod("previousNode", []);
+  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousNode", []);
 
-  referenceNode_Getter_(mthis) => mthis["referenceNode"];
+  referenceNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referenceNode");
 
-  root_Getter_(mthis) => mthis["root"];
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
 
-  whatToShow_Getter_(mthis) => mthis["whatToShow"];
+  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "whatToShow");
 
 }
 
 class BlinkNodeList {
   static final instance = new BlinkNodeList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkNotification extends BlinkEventTarget {
   static final instance = new BlinkNotification();
 
-  body_Getter_(mthis) => mthis["body"];
+  body_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "body");
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Notification"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Notification"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Notification"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Notification"), [__arg_0, __arg_1]);
 
-  dir_Getter_(mthis) => mthis["dir"];
+  dir_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dir");
 
-  icon_Getter_(mthis) => mthis["icon"];
+  icon_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "icon");
 
-  lang_Getter_(mthis) => mthis["lang"];
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
 
-  onclick_Getter_(mthis) => mthis["onclick"];
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
 
   onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onshow_Getter_(mthis) => mthis["onshow"];
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
 
   onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
 
-  permission_Getter_() => js.context["Notification"]["permission"];
+  permission_Getter_() => Blink_JsNative_DomException.getProperty(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "permission");
 
-  requestPermission_Callback_0_() => js.context["Notification"].callMethod("requestPermission", []);
+  requestPermission_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "requestPermission", []);
 
-  requestPermission_Callback_1_(__arg_0) => js.context["Notification"].callMethod("requestPermission", [__arg_0]);
+  requestPermission_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "Notification"), "requestPermission", [__arg_0]);
 
-  tag_Getter_(mthis) => mthis["tag"];
+  tag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tag");
 
-  title_Getter_(mthis) => mthis["title"];
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
 
 }
 
@@ -9339,72 +9340,72 @@
 class BlinkOESVertexArrayObject {
   static final instance = new BlinkOESVertexArrayObject();
 
-  bindVertexArrayOES_Callback_0_(mthis) => mthis.callMethod("bindVertexArrayOES", []);
+  bindVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindVertexArrayOES", []);
 
-  bindVertexArrayOES_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindVertexArrayOES", [__arg_0]);
+  bindVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindVertexArrayOES", [__arg_0]);
 
-  createVertexArrayOES_Callback_0_(mthis) => mthis.callMethod("createVertexArrayOES", []);
+  createVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createVertexArrayOES", []);
 
-  deleteVertexArrayOES_Callback_0_(mthis) => mthis.callMethod("deleteVertexArrayOES", []);
+  deleteVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteVertexArrayOES", []);
 
-  deleteVertexArrayOES_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteVertexArrayOES", [__arg_0]);
+  deleteVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteVertexArrayOES", [__arg_0]);
 
-  isVertexArrayOES_Callback_0_(mthis) => mthis.callMethod("isVertexArrayOES", []);
+  isVertexArrayOES_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isVertexArrayOES", []);
 
-  isVertexArrayOES_Callback_1_(mthis, __arg_0) => mthis.callMethod("isVertexArrayOES", [__arg_0]);
+  isVertexArrayOES_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isVertexArrayOES", [__arg_0]);
 
 }
 
 class BlinkOfflineAudioCompletionEvent extends BlinkEvent {
   static final instance = new BlinkOfflineAudioCompletionEvent();
 
-  renderedBuffer_Getter_(mthis) => mthis["renderedBuffer"];
+  renderedBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "renderedBuffer");
 
 }
 
 class BlinkOfflineAudioContext extends BlinkAudioContext {
   static final instance = new BlinkOfflineAudioContext();
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["OfflineAudioContext"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["OfflineAudioContext"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["OfflineAudioContext"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OfflineAudioContext"), [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkOscillatorNode extends BlinkAudioSourceNode {
   static final instance = new BlinkOscillatorNode();
 
-  detune_Getter_(mthis) => mthis["detune"];
+  detune_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detune");
 
-  frequency_Getter_(mthis) => mthis["frequency"];
+  frequency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frequency");
 
-  noteOff_Callback_0_(mthis) => mthis.callMethod("noteOff", []);
+  noteOff_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "noteOff", []);
 
-  noteOff_Callback_1_(mthis, __arg_0) => mthis.callMethod("noteOff", [__arg_0]);
+  noteOff_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "noteOff", [__arg_0]);
 
-  noteOn_Callback_0_(mthis) => mthis.callMethod("noteOn", []);
+  noteOn_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "noteOn", []);
 
-  noteOn_Callback_1_(mthis, __arg_0) => mthis.callMethod("noteOn", [__arg_0]);
+  noteOn_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "noteOn", [__arg_0]);
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  setPeriodicWave_Callback_0_(mthis) => mthis.callMethod("setPeriodicWave", []);
+  setPeriodicWave_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setPeriodicWave", []);
 
-  setPeriodicWave_Callback_1_(mthis, __arg_0) => mthis.callMethod("setPeriodicWave", [__arg_0]);
+  setPeriodicWave_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPeriodicWave", [__arg_0]);
 
-  start_Callback_0_(mthis) => mthis.callMethod("start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
 
-  start_Callback_1_(mthis, __arg_0) => mthis.callMethod("start", [__arg_0]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
-  stop_Callback_1_(mthis, __arg_0) => mthis.callMethod("stop", [__arg_0]);
+  stop_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stop", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -9413,259 +9414,259 @@
 class BlinkOverflowEvent extends BlinkEvent {
   static final instance = new BlinkOverflowEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["OverflowEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "OverflowEvent"), [__arg_0, __arg_1]);
 
-  horizontalOverflow_Getter_(mthis) => mthis["horizontalOverflow"];
+  horizontalOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "horizontalOverflow");
 
-  orient_Getter_(mthis) => mthis["orient"];
+  orient_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orient");
 
-  verticalOverflow_Getter_(mthis) => mthis["verticalOverflow"];
+  verticalOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "verticalOverflow");
 
 }
 
 class BlinkPagePopupController {
   static final instance = new BlinkPagePopupController();
 
-  closePopup_Callback_0_(mthis) => mthis.callMethod("closePopup", []);
+  closePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePopup", []);
 
-  formatMonth_Callback_0_(mthis) => mthis.callMethod("formatMonth", []);
+  formatMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", []);
 
-  formatMonth_Callback_1_(mthis, __arg_0) => mthis.callMethod("formatMonth", [__arg_0]);
+  formatMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", [__arg_0]);
 
-  formatMonth_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("formatMonth", [__arg_0, __arg_1]);
+  formatMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatMonth", [__arg_0, __arg_1]);
 
-  formatShortMonth_Callback_0_(mthis) => mthis.callMethod("formatShortMonth", []);
+  formatShortMonth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", []);
 
-  formatShortMonth_Callback_1_(mthis, __arg_0) => mthis.callMethod("formatShortMonth", [__arg_0]);
+  formatShortMonth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", [__arg_0]);
 
-  formatShortMonth_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("formatShortMonth", [__arg_0, __arg_1]);
+  formatShortMonth_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatShortMonth", [__arg_0, __arg_1]);
 
-  formatWeek_Callback_1_(mthis, __arg_0) => mthis.callMethod("formatWeek", [__arg_0]);
+  formatWeek_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0]);
 
-  formatWeek_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("formatWeek", [__arg_0, __arg_1]);
+  formatWeek_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0, __arg_1]);
 
-  formatWeek_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("formatWeek", [__arg_0, __arg_1, __arg_2]);
+  formatWeek_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "formatWeek", [__arg_0, __arg_1, __arg_2]);
 
-  histogramEnumeration_Callback_1_(mthis, __arg_0) => mthis.callMethod("histogramEnumeration", [__arg_0]);
+  histogramEnumeration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0]);
 
-  histogramEnumeration_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("histogramEnumeration", [__arg_0, __arg_1]);
+  histogramEnumeration_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0, __arg_1]);
 
-  histogramEnumeration_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("histogramEnumeration", [__arg_0, __arg_1, __arg_2]);
+  histogramEnumeration_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "histogramEnumeration", [__arg_0, __arg_1, __arg_2]);
 
-  localizeNumberString_Callback_0_(mthis) => mthis.callMethod("localizeNumberString", []);
+  localizeNumberString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "localizeNumberString", []);
 
-  localizeNumberString_Callback_1_(mthis, __arg_0) => mthis.callMethod("localizeNumberString", [__arg_0]);
+  localizeNumberString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "localizeNumberString", [__arg_0]);
 
-  setValueAndClosePopup_Callback_0_(mthis) => mthis.callMethod("setValueAndClosePopup", []);
+  setValueAndClosePopup_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", []);
 
-  setValueAndClosePopup_Callback_1_(mthis, __arg_0) => mthis.callMethod("setValueAndClosePopup", [__arg_0]);
+  setValueAndClosePopup_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", [__arg_0]);
 
-  setValueAndClosePopup_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setValueAndClosePopup", [__arg_0, __arg_1]);
+  setValueAndClosePopup_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setValueAndClosePopup", [__arg_0, __arg_1]);
 
-  setValue_Callback_0_(mthis) => mthis.callMethod("setValue", []);
+  setValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setValue", []);
 
-  setValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("setValue", [__arg_0]);
+  setValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setValue", [__arg_0]);
 
 }
 
 class BlinkPageTransitionEvent extends BlinkEvent {
   static final instance = new BlinkPageTransitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["PageTransitionEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PageTransitionEvent"), [__arg_0, __arg_1]);
 
-  persisted_Getter_(mthis) => mthis["persisted"];
+  persisted_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "persisted");
 
 }
 
 class BlinkPannerNode extends BlinkAudioNode {
   static final instance = new BlinkPannerNode();
 
-  coneInnerAngle_Getter_(mthis) => mthis["coneInnerAngle"];
+  coneInnerAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneInnerAngle");
 
   coneInnerAngle_Setter_(mthis, __arg_0) => mthis["coneInnerAngle"] = __arg_0;
 
-  coneOuterAngle_Getter_(mthis) => mthis["coneOuterAngle"];
+  coneOuterAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneOuterAngle");
 
   coneOuterAngle_Setter_(mthis, __arg_0) => mthis["coneOuterAngle"] = __arg_0;
 
-  coneOuterGain_Getter_(mthis) => mthis["coneOuterGain"];
+  coneOuterGain_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "coneOuterGain");
 
   coneOuterGain_Setter_(mthis, __arg_0) => mthis["coneOuterGain"] = __arg_0;
 
-  distanceModel_Getter_(mthis) => mthis["distanceModel"];
+  distanceModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "distanceModel");
 
   distanceModel_Setter_(mthis, __arg_0) => mthis["distanceModel"] = __arg_0;
 
-  maxDistance_Getter_(mthis) => mthis["maxDistance"];
+  maxDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxDistance");
 
   maxDistance_Setter_(mthis, __arg_0) => mthis["maxDistance"] = __arg_0;
 
-  panningModel_Getter_(mthis) => mthis["panningModel"];
+  panningModel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "panningModel");
 
   panningModel_Setter_(mthis, __arg_0) => mthis["panningModel"] = __arg_0;
 
-  refDistance_Getter_(mthis) => mthis["refDistance"];
+  refDistance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refDistance");
 
   refDistance_Setter_(mthis, __arg_0) => mthis["refDistance"] = __arg_0;
 
-  rolloffFactor_Getter_(mthis) => mthis["rolloffFactor"];
+  rolloffFactor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rolloffFactor");
 
   rolloffFactor_Setter_(mthis, __arg_0) => mthis["rolloffFactor"] = __arg_0;
 
-  setOrientation_Callback_1_(mthis, __arg_0) => mthis.callMethod("setOrientation", [__arg_0]);
+  setOrientation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0]);
 
-  setOrientation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setOrientation", [__arg_0, __arg_1]);
+  setOrientation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1]);
 
-  setOrientation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setOrientation", [__arg_0, __arg_1, __arg_2]);
+  setOrientation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setOrientation", [__arg_0, __arg_1, __arg_2]);
 
-  setPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("setPosition", [__arg_0]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setPosition", [__arg_0, __arg_1]);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
 
-  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setPosition", [__arg_0, __arg_1, __arg_2]);
+  setPosition_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1, __arg_2]);
 
-  setVelocity_Callback_1_(mthis, __arg_0) => mthis.callMethod("setVelocity", [__arg_0]);
+  setVelocity_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0]);
 
-  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setVelocity", [__arg_0, __arg_1]);
+  setVelocity_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setVelocity", [__arg_0, __arg_1]);
 
-  setVelocity_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setVelocity", [__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]);
 
 }
 
 class BlinkPath2D {
   static final instance = new BlinkPath2D();
 
-  addPath_Callback_0_(mthis) => mthis.callMethod("addPath", []);
+  addPath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addPath", []);
 
-  addPath_Callback_1_(mthis, __arg_0) => mthis.callMethod("addPath", [__arg_0]);
+  addPath_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addPath", [__arg_0]);
 
-  addPath_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addPath", [__arg_0, __arg_1]);
+  addPath_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addPath", [__arg_0, __arg_1]);
 
-  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2]);
+  arcTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arcTo", [__arg_0, __arg_1, __arg_2]);
 
-  arcTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  arcTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("arcTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2]);
+  arc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "arc", [__arg_0, __arg_1, __arg_2]);
 
-  arc_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  arc_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("arc", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  bezierCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("bezierCurveTo", [__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]);
 
-  bezierCurveTo_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("bezierCurveTo", [__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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("bezierCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  closePath_Callback_0_(mthis) => mthis.callMethod("closePath", []);
+  closePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "closePath", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Path2D"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Path2D"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Path2D"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Path2D"), [__arg_0]);
 
-  ellipse_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  ellipse_Callback_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("ellipse", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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_0_(mthis) => mthis.callMethod("lineTo", []);
+  lineTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", []);
 
-  lineTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("lineTo", [__arg_0]);
+  lineTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0]);
 
-  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("lineTo", [__arg_0, __arg_1]);
+  lineTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "lineTo", [__arg_0, __arg_1]);
 
-  moveTo_Callback_0_(mthis) => mthis.callMethod("moveTo", []);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveTo", [__arg_0]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
 
-  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1]);
+  quadraticCurveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1]);
 
-  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
+  quadraticCurveTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "quadraticCurveTo", [__arg_0, __arg_1, __arg_2]);
 
-  quadraticCurveTo_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("quadraticCurveTo", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("rect", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("rect", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("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, "rect", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkPerformance extends BlinkEventTarget {
   static final instance = new BlinkPerformance();
 
-  clearMarks_Callback_0_(mthis) => mthis.callMethod("clearMarks", []);
+  clearMarks_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearMarks", []);
 
-  clearMarks_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearMarks", [__arg_0]);
+  clearMarks_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearMarks", [__arg_0]);
 
-  clearMeasures_Callback_0_(mthis) => mthis.callMethod("clearMeasures", []);
+  clearMeasures_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearMeasures", []);
 
-  clearMeasures_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearMeasures", [__arg_0]);
+  clearMeasures_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearMeasures", [__arg_0]);
 
-  getEntriesByName_Callback_0_(mthis) => mthis.callMethod("getEntriesByName", []);
+  getEntriesByName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", []);
 
-  getEntriesByName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getEntriesByName", [__arg_0]);
+  getEntriesByName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", [__arg_0]);
 
-  getEntriesByName_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getEntriesByName", [__arg_0, __arg_1]);
+  getEntriesByName_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByName", [__arg_0, __arg_1]);
 
-  getEntriesByType_Callback_0_(mthis) => mthis.callMethod("getEntriesByType", []);
+  getEntriesByType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByType", []);
 
-  getEntriesByType_Callback_1_(mthis, __arg_0) => mthis.callMethod("getEntriesByType", [__arg_0]);
+  getEntriesByType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEntriesByType", [__arg_0]);
 
-  getEntries_Callback_0_(mthis) => mthis.callMethod("getEntries", []);
+  getEntries_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEntries", []);
 
-  mark_Callback_0_(mthis) => mthis.callMethod("mark", []);
+  mark_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "mark", []);
 
-  mark_Callback_1_(mthis, __arg_0) => mthis.callMethod("mark", [__arg_0]);
+  mark_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "mark", [__arg_0]);
 
-  measure_Callback_0_(mthis) => mthis.callMethod("measure", []);
+  measure_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "measure", []);
 
-  measure_Callback_1_(mthis, __arg_0) => mthis.callMethod("measure", [__arg_0]);
+  measure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0]);
 
-  measure_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("measure", [__arg_0, __arg_1]);
+  measure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0, __arg_1]);
 
-  measure_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("measure", [__arg_0, __arg_1, __arg_2]);
+  measure_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "measure", [__arg_0, __arg_1, __arg_2]);
 
-  memory_Getter_(mthis) => mthis["memory"];
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
 
-  navigation_Getter_(mthis) => mthis["navigation"];
+  navigation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigation");
 
-  now_Callback_0_(mthis) => mthis.callMethod("now", []);
+  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "now", []);
 
-  onwebkitresourcetimingbufferfull_Getter_(mthis) => mthis["onwebkitresourcetimingbufferfull"];
+  onwebkitresourcetimingbufferfull_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitresourcetimingbufferfull");
 
   onwebkitresourcetimingbufferfull_Setter_(mthis, __arg_0) => mthis["onwebkitresourcetimingbufferfull"] = __arg_0;
 
-  timing_Getter_(mthis) => mthis["timing"];
+  timing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timing");
 
-  webkitClearResourceTimings_Callback_0_(mthis) => mthis.callMethod("webkitClearResourceTimings", []);
+  webkitClearResourceTimings_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitClearResourceTimings", []);
 
-  webkitSetResourceTimingBufferSize_Callback_0_(mthis) => mthis.callMethod("webkitSetResourceTimingBufferSize", []);
+  webkitSetResourceTimingBufferSize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitSetResourceTimingBufferSize", []);
 
-  webkitSetResourceTimingBufferSize_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitSetResourceTimingBufferSize", [__arg_0]);
+  webkitSetResourceTimingBufferSize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitSetResourceTimingBufferSize", [__arg_0]);
 
 }
 
 class BlinkPerformanceEntry {
   static final instance = new BlinkPerformanceEntry();
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  entryType_Getter_(mthis) => mthis["entryType"];
+  entryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "entryType");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  startTime_Getter_(mthis) => mthis["startTime"];
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
 
 }
 
@@ -9682,85 +9683,85 @@
 class BlinkPerformanceNavigation {
   static final instance = new BlinkPerformanceNavigation();
 
-  redirectCount_Getter_(mthis) => mthis["redirectCount"];
+  redirectCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectCount");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkPerformanceResourceTiming extends BlinkPerformanceEntry {
   static final instance = new BlinkPerformanceResourceTiming();
 
-  connectEnd_Getter_(mthis) => mthis["connectEnd"];
+  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectEnd");
 
-  connectStart_Getter_(mthis) => mthis["connectStart"];
+  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectStart");
 
-  domainLookupEnd_Getter_(mthis) => mthis["domainLookupEnd"];
+  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupEnd");
 
-  domainLookupStart_Getter_(mthis) => mthis["domainLookupStart"];
+  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupStart");
 
-  fetchStart_Getter_(mthis) => mthis["fetchStart"];
+  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fetchStart");
 
-  initiatorType_Getter_(mthis) => mthis["initiatorType"];
+  initiatorType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "initiatorType");
 
-  redirectEnd_Getter_(mthis) => mthis["redirectEnd"];
+  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectEnd");
 
-  redirectStart_Getter_(mthis) => mthis["redirectStart"];
+  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectStart");
 
-  requestStart_Getter_(mthis) => mthis["requestStart"];
+  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requestStart");
 
-  responseEnd_Getter_(mthis) => mthis["responseEnd"];
+  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseEnd");
 
-  responseStart_Getter_(mthis) => mthis["responseStart"];
+  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseStart");
 
-  secureConnectionStart_Getter_(mthis) => mthis["secureConnectionStart"];
+  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "secureConnectionStart");
 
 }
 
 class BlinkPerformanceTiming {
   static final instance = new BlinkPerformanceTiming();
 
-  connectEnd_Getter_(mthis) => mthis["connectEnd"];
+  connectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectEnd");
 
-  connectStart_Getter_(mthis) => mthis["connectStart"];
+  connectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connectStart");
 
-  domComplete_Getter_(mthis) => mthis["domComplete"];
+  domComplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domComplete");
 
-  domContentLoadedEventEnd_Getter_(mthis) => mthis["domContentLoadedEventEnd"];
+  domContentLoadedEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domContentLoadedEventEnd");
 
-  domContentLoadedEventStart_Getter_(mthis) => mthis["domContentLoadedEventStart"];
+  domContentLoadedEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domContentLoadedEventStart");
 
-  domInteractive_Getter_(mthis) => mthis["domInteractive"];
+  domInteractive_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domInteractive");
 
-  domLoading_Getter_(mthis) => mthis["domLoading"];
+  domLoading_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domLoading");
 
-  domainLookupEnd_Getter_(mthis) => mthis["domainLookupEnd"];
+  domainLookupEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupEnd");
 
-  domainLookupStart_Getter_(mthis) => mthis["domainLookupStart"];
+  domainLookupStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "domainLookupStart");
 
-  fetchStart_Getter_(mthis) => mthis["fetchStart"];
+  fetchStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fetchStart");
 
-  loadEventEnd_Getter_(mthis) => mthis["loadEventEnd"];
+  loadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loadEventEnd");
 
-  loadEventStart_Getter_(mthis) => mthis["loadEventStart"];
+  loadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loadEventStart");
 
-  navigationStart_Getter_(mthis) => mthis["navigationStart"];
+  navigationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigationStart");
 
-  redirectEnd_Getter_(mthis) => mthis["redirectEnd"];
+  redirectEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectEnd");
 
-  redirectStart_Getter_(mthis) => mthis["redirectStart"];
+  redirectStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "redirectStart");
 
-  requestStart_Getter_(mthis) => mthis["requestStart"];
+  requestStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requestStart");
 
-  responseEnd_Getter_(mthis) => mthis["responseEnd"];
+  responseEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseEnd");
 
-  responseStart_Getter_(mthis) => mthis["responseStart"];
+  responseStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseStart");
 
-  secureConnectionStart_Getter_(mthis) => mthis["secureConnectionStart"];
+  secureConnectionStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "secureConnectionStart");
 
-  unloadEventEnd_Getter_(mthis) => mthis["unloadEventEnd"];
+  unloadEventEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unloadEventEnd");
 
-  unloadEventStart_Getter_(mthis) => mthis["unloadEventStart"];
+  unloadEventStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unloadEventStart");
 
 }
 
@@ -9772,53 +9773,53 @@
 class BlinkPlugin {
   static final instance = new BlinkPlugin();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  description_Getter_(mthis) => mthis["description"];
+  description_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "description");
 
-  filename_Getter_(mthis) => mthis["filename"];
+  filename_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filename");
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
 }
 
 class BlinkPluginArray {
   static final instance = new BlinkPluginArray();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
-  refresh_Callback_0_(mthis) => mthis.callMethod("refresh", []);
+  refresh_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "refresh", []);
 
-  refresh_Callback_1_(mthis, __arg_0) => mthis.callMethod("refresh", [__arg_0]);
+  refresh_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "refresh", [__arg_0]);
 
 }
 
 class BlinkPluginPlaceholderElement extends BlinkHTMLDivElement {
   static final instance = new BlinkPluginPlaceholderElement();
 
-  createdCallback_Callback_0_(mthis) => mthis.callMethod("createdCallback", []);
+  createdCallback_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createdCallback", []);
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
   message_Setter_(mthis, __arg_0) => mthis["message"] = __arg_0;
 
@@ -9827,25 +9828,25 @@
 class BlinkPopStateEvent extends BlinkEvent {
   static final instance = new BlinkPopStateEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["PopStateEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PopStateEvent"), [__arg_0, __arg_1]);
 
-  state_Getter_(mthis) => mthis["state"];
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
 
 }
 
 class BlinkPositionError {
   static final instance = new BlinkPositionError();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
 }
 
 class BlinkPresentation extends BlinkEventTarget {
   static final instance = new BlinkPresentation();
 
-  onavailablechange_Getter_(mthis) => mthis["onavailablechange"];
+  onavailablechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onavailablechange");
 
   onavailablechange_Setter_(mthis, __arg_0) => mthis["onavailablechange"] = __arg_0;
 
@@ -9854,173 +9855,173 @@
 class BlinkProcessingInstruction extends BlinkCharacterData {
   static final instance = new BlinkProcessingInstruction();
 
-  sheet_Getter_(mthis) => mthis["sheet"];
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
 }
 
 class BlinkProgressEvent extends BlinkEvent {
   static final instance = new BlinkProgressEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["ProgressEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "ProgressEvent"), [__arg_0, __arg_1]);
 
-  lengthComputable_Getter_(mthis) => mthis["lengthComputable"];
+  lengthComputable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lengthComputable");
 
-  loaded_Getter_(mthis) => mthis["loaded"];
+  loaded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "loaded");
 
-  total_Getter_(mthis) => mthis["total"];
+  total_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "total");
 
 }
 
 class BlinkPushEvent extends BlinkEvent {
   static final instance = new BlinkPushEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["PushEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "PushEvent"), [__arg_0, __arg_1]);
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
 }
 
 class BlinkPushManager {
   static final instance = new BlinkPushManager();
 
-  register_Callback_0_(mthis) => mthis.callMethod("register", []);
+  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "register", []);
 
-  register_Callback_1_(mthis, __arg_0) => mthis.callMethod("register", [__arg_0]);
+  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0]);
 
 }
 
 class BlinkPushRegistration {
   static final instance = new BlinkPushRegistration();
 
-  pushEndpoint_Getter_(mthis) => mthis["pushEndpoint"];
+  pushEndpoint_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pushEndpoint");
 
-  pushRegistrationId_Getter_(mthis) => mthis["pushRegistrationId"];
+  pushRegistrationId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pushRegistrationId");
 
 }
 
 class BlinkRGBColor {
   static final instance = new BlinkRGBColor();
 
-  blue_Getter_(mthis) => mthis["blue"];
+  blue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "blue");
 
-  green_Getter_(mthis) => mthis["green"];
+  green_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "green");
 
-  red_Getter_(mthis) => mthis["red"];
+  red_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "red");
 
 }
 
 class BlinkRTCDTMFSender extends BlinkEventTarget {
   static final instance = new BlinkRTCDTMFSender();
 
-  canInsertDTMF_Getter_(mthis) => mthis["canInsertDTMF"];
+  canInsertDTMF_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canInsertDTMF");
 
-  duration_Getter_(mthis) => mthis["duration"];
+  duration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "duration");
 
-  insertDTMF_Callback_0_(mthis) => mthis.callMethod("insertDTMF", []);
+  insertDTMF_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", []);
 
-  insertDTMF_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertDTMF", [__arg_0]);
+  insertDTMF_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0]);
 
-  insertDTMF_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertDTMF", [__arg_0, __arg_1]);
+  insertDTMF_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0, __arg_1]);
 
-  insertDTMF_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("insertDTMF", [__arg_0, __arg_1, __arg_2]);
+  insertDTMF_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "insertDTMF", [__arg_0, __arg_1, __arg_2]);
 
-  interToneGap_Getter_(mthis) => mthis["interToneGap"];
+  interToneGap_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interToneGap");
 
-  ontonechange_Getter_(mthis) => mthis["ontonechange"];
+  ontonechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontonechange");
 
   ontonechange_Setter_(mthis, __arg_0) => mthis["ontonechange"] = __arg_0;
 
-  toneBuffer_Getter_(mthis) => mthis["toneBuffer"];
+  toneBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toneBuffer");
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
 }
 
 class BlinkRTCDTMFToneChangeEvent extends BlinkEvent {
   static final instance = new BlinkRTCDTMFToneChangeEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["RTCDTMFToneChangeEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCDTMFToneChangeEvent"), [__arg_0, __arg_1]);
 
-  tone_Getter_(mthis) => mthis["tone"];
+  tone_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tone");
 
 }
 
 class BlinkRTCDataChannel extends BlinkEventTarget {
   static final instance = new BlinkRTCDataChannel();
 
-  binaryType_Getter_(mthis) => mthis["binaryType"];
+  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "binaryType");
 
   binaryType_Setter_(mthis, __arg_0) => mthis["binaryType"] = __arg_0;
 
-  bufferedAmount_Getter_(mthis) => mthis["bufferedAmount"];
+  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferedAmount");
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  maxRetransmitTime_Getter_(mthis) => mthis["maxRetransmitTime"];
+  maxRetransmitTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxRetransmitTime");
 
-  maxRetransmits_Getter_(mthis) => mthis["maxRetransmits"];
+  maxRetransmits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxRetransmits");
 
-  negotiated_Getter_(mthis) => mthis["negotiated"];
+  negotiated_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "negotiated");
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onopen_Getter_(mthis) => mthis["onopen"];
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
 
   onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
 
-  ordered_Getter_(mthis) => mthis["ordered"];
+  ordered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ordered");
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  reliable_Getter_(mthis) => mthis["reliable"];
+  reliable_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "reliable");
 
-  send_Callback_0_(mthis) => mthis.callMethod("send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => mthis.callMethod("send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
 
 }
 
 class BlinkRTCDataChannelEvent extends BlinkEvent {
   static final instance = new BlinkRTCDataChannelEvent();
 
-  channel_Getter_(mthis) => mthis["channel"];
+  channel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "channel");
 
 }
 
 class BlinkRTCIceCandidate {
   static final instance = new BlinkRTCIceCandidate();
 
-  candidate_Getter_(mthis) => mthis["candidate"];
+  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "candidate");
 
   candidate_Setter_(mthis, __arg_0) => mthis["candidate"] = __arg_0;
 
-  constructorCallback_0_() => new js.JsObject(js.context["RTCIceCandidate"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCIceCandidate"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["RTCIceCandidate"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCIceCandidate"), [__arg_0]);
 
-  sdpMLineIndex_Getter_(mthis) => mthis["sdpMLineIndex"];
+  sdpMLineIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdpMLineIndex");
 
   sdpMLineIndex_Setter_(mthis, __arg_0) => mthis["sdpMLineIndex"] = __arg_0;
 
-  sdpMid_Getter_(mthis) => mthis["sdpMid"];
+  sdpMid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdpMid");
 
   sdpMid_Setter_(mthis, __arg_0) => mthis["sdpMid"] = __arg_0;
 
@@ -10029,151 +10030,151 @@
 class BlinkRTCIceCandidateEvent extends BlinkEvent {
   static final instance = new BlinkRTCIceCandidateEvent();
 
-  candidate_Getter_(mthis) => mthis["candidate"];
+  candidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "candidate");
 
 }
 
 class BlinkRTCPeerConnection extends BlinkEventTarget {
   static final instance = new BlinkRTCPeerConnection();
 
-  addIceCandidate_Callback_1_(mthis, __arg_0) => mthis.callMethod("addIceCandidate", [__arg_0]);
+  addIceCandidate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0]);
 
-  addIceCandidate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addIceCandidate", [__arg_0, __arg_1]);
+  addIceCandidate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0, __arg_1]);
 
-  addIceCandidate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("addIceCandidate", [__arg_0, __arg_1, __arg_2]);
+  addIceCandidate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "addIceCandidate", [__arg_0, __arg_1, __arg_2]);
 
-  addStream_Callback_0_(mthis) => mthis.callMethod("addStream", []);
+  addStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addStream", []);
 
-  addStream_Callback_1_(mthis, __arg_0) => mthis.callMethod("addStream", [__arg_0]);
+  addStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addStream", [__arg_0]);
 
-  addStream_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addStream", [__arg_0, __arg_1]);
+  addStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addStream", [__arg_0, __arg_1]);
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["webkitRTCPeerConnection"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["webkitRTCPeerConnection"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["webkitRTCPeerConnection"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitRTCPeerConnection"), [__arg_0, __arg_1]);
 
-  createAnswer_Callback_0_(mthis) => mthis.callMethod("createAnswer", []);
+  createAnswer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", []);
 
-  createAnswer_Callback_1_(mthis, __arg_0) => mthis.callMethod("createAnswer", [__arg_0]);
+  createAnswer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0]);
 
-  createAnswer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createAnswer", [__arg_0, __arg_1]);
+  createAnswer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0, __arg_1]);
 
-  createAnswer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createAnswer", [__arg_0, __arg_1, __arg_2]);
+  createAnswer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createAnswer", [__arg_0, __arg_1, __arg_2]);
 
-  createDTMFSender_Callback_0_(mthis) => mthis.callMethod("createDTMFSender", []);
+  createDTMFSender_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDTMFSender", []);
 
-  createDTMFSender_Callback_1_(mthis, __arg_0) => mthis.callMethod("createDTMFSender", [__arg_0]);
+  createDTMFSender_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDTMFSender", [__arg_0]);
 
-  createDataChannel_Callback_0_(mthis) => mthis.callMethod("createDataChannel", []);
+  createDataChannel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", []);
 
-  createDataChannel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createDataChannel", [__arg_0]);
+  createDataChannel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", [__arg_0]);
 
-  createDataChannel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createDataChannel", [__arg_0, __arg_1]);
+  createDataChannel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createDataChannel", [__arg_0, __arg_1]);
 
-  createOffer_Callback_0_(mthis) => mthis.callMethod("createOffer", []);
+  createOffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", []);
 
-  createOffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("createOffer", [__arg_0]);
+  createOffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0]);
 
-  createOffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createOffer", [__arg_0, __arg_1]);
+  createOffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0, __arg_1]);
 
-  createOffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createOffer", [__arg_0, __arg_1, __arg_2]);
+  createOffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createOffer", [__arg_0, __arg_1, __arg_2]);
 
-  getLocalStreams_Callback_0_(mthis) => mthis.callMethod("getLocalStreams", []);
+  getLocalStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getLocalStreams", []);
 
-  getRemoteStreams_Callback_0_(mthis) => mthis.callMethod("getRemoteStreams", []);
+  getRemoteStreams_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRemoteStreams", []);
 
-  getStats_Callback_0_(mthis) => mthis.callMethod("getStats", []);
+  getStats_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStats", []);
 
-  getStats_Callback_1_(mthis, __arg_0) => mthis.callMethod("getStats", [__arg_0]);
+  getStats_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStats", [__arg_0]);
 
-  getStats_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getStats", [__arg_0, __arg_1]);
+  getStats_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getStats", [__arg_0, __arg_1]);
 
-  getStreamById_Callback_0_(mthis) => mthis.callMethod("getStreamById", []);
+  getStreamById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStreamById", []);
 
-  getStreamById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getStreamById", [__arg_0]);
+  getStreamById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStreamById", [__arg_0]);
 
-  iceConnectionState_Getter_(mthis) => mthis["iceConnectionState"];
+  iceConnectionState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iceConnectionState");
 
-  iceGatheringState_Getter_(mthis) => mthis["iceGatheringState"];
+  iceGatheringState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iceGatheringState");
 
-  localDescription_Getter_(mthis) => mthis["localDescription"];
+  localDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localDescription");
 
-  onaddstream_Getter_(mthis) => mthis["onaddstream"];
+  onaddstream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddstream");
 
   onaddstream_Setter_(mthis, __arg_0) => mthis["onaddstream"] = __arg_0;
 
-  ondatachannel_Getter_(mthis) => mthis["ondatachannel"];
+  ondatachannel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondatachannel");
 
   ondatachannel_Setter_(mthis, __arg_0) => mthis["ondatachannel"] = __arg_0;
 
-  onicecandidate_Getter_(mthis) => mthis["onicecandidate"];
+  onicecandidate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onicecandidate");
 
   onicecandidate_Setter_(mthis, __arg_0) => mthis["onicecandidate"] = __arg_0;
 
-  oniceconnectionstatechange_Getter_(mthis) => mthis["oniceconnectionstatechange"];
+  oniceconnectionstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oniceconnectionstatechange");
 
   oniceconnectionstatechange_Setter_(mthis, __arg_0) => mthis["oniceconnectionstatechange"] = __arg_0;
 
-  onnegotiationneeded_Getter_(mthis) => mthis["onnegotiationneeded"];
+  onnegotiationneeded_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnegotiationneeded");
 
   onnegotiationneeded_Setter_(mthis, __arg_0) => mthis["onnegotiationneeded"] = __arg_0;
 
-  onremovestream_Getter_(mthis) => mthis["onremovestream"];
+  onremovestream_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovestream");
 
   onremovestream_Setter_(mthis, __arg_0) => mthis["onremovestream"] = __arg_0;
 
-  onsignalingstatechange_Getter_(mthis) => mthis["onsignalingstatechange"];
+  onsignalingstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsignalingstatechange");
 
   onsignalingstatechange_Setter_(mthis, __arg_0) => mthis["onsignalingstatechange"] = __arg_0;
 
-  remoteDescription_Getter_(mthis) => mthis["remoteDescription"];
+  remoteDescription_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "remoteDescription");
 
-  removeStream_Callback_0_(mthis) => mthis.callMethod("removeStream", []);
+  removeStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeStream", []);
 
-  removeStream_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeStream", [__arg_0]);
+  removeStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeStream", [__arg_0]);
 
-  setLocalDescription_Callback_0_(mthis) => mthis.callMethod("setLocalDescription", []);
+  setLocalDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", []);
 
-  setLocalDescription_Callback_1_(mthis, __arg_0) => mthis.callMethod("setLocalDescription", [__arg_0]);
+  setLocalDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0]);
 
-  setLocalDescription_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setLocalDescription", [__arg_0, __arg_1]);
+  setLocalDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0, __arg_1]);
 
-  setLocalDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setLocalDescription", [__arg_0, __arg_1, __arg_2]);
+  setLocalDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setLocalDescription", [__arg_0, __arg_1, __arg_2]);
 
-  setRemoteDescription_Callback_0_(mthis) => mthis.callMethod("setRemoteDescription", []);
+  setRemoteDescription_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", []);
 
-  setRemoteDescription_Callback_1_(mthis, __arg_0) => mthis.callMethod("setRemoteDescription", [__arg_0]);
+  setRemoteDescription_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0]);
 
-  setRemoteDescription_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setRemoteDescription", [__arg_0, __arg_1]);
+  setRemoteDescription_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0, __arg_1]);
 
-  setRemoteDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setRemoteDescription", [__arg_0, __arg_1, __arg_2]);
+  setRemoteDescription_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRemoteDescription", [__arg_0, __arg_1, __arg_2]);
 
-  signalingState_Getter_(mthis) => mthis["signalingState"];
+  signalingState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "signalingState");
 
-  updateIce_Callback_0_(mthis) => mthis.callMethod("updateIce", []);
+  updateIce_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", []);
 
-  updateIce_Callback_1_(mthis, __arg_0) => mthis.callMethod("updateIce", [__arg_0]);
+  updateIce_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", [__arg_0]);
 
-  updateIce_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("updateIce", [__arg_0, __arg_1]);
+  updateIce_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "updateIce", [__arg_0, __arg_1]);
 
 }
 
 class BlinkRTCSessionDescription {
   static final instance = new BlinkRTCSessionDescription();
 
-  constructorCallback_0_() => new js.JsObject(js.context["RTCSessionDescription"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCSessionDescription"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["RTCSessionDescription"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RTCSessionDescription"), [__arg_0]);
 
-  sdp_Getter_(mthis) => mthis["sdp"];
+  sdp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sdp");
 
   sdp_Setter_(mthis, __arg_0) => mthis["sdp"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -10182,43 +10183,43 @@
 class BlinkRTCStatsReport {
   static final instance = new BlinkRTCStatsReport();
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  local_Getter_(mthis) => mthis["local"];
+  local_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "local");
 
-  names_Callback_0_(mthis) => mthis.callMethod("names", []);
+  names_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "names", []);
 
-  remote_Getter_(mthis) => mthis["remote"];
+  remote_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "remote");
 
-  stat_Callback_0_(mthis) => mthis.callMethod("stat", []);
+  stat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stat", []);
 
-  stat_Callback_1_(mthis, __arg_0) => mthis.callMethod("stat", [__arg_0]);
+  stat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stat", [__arg_0]);
 
-  timestamp_Getter_(mthis) => mthis["timestamp"];
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkRTCStatsResponse {
   static final instance = new BlinkRTCStatsResponse();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  namedItem_Callback_0_(mthis) => mthis.callMethod("namedItem", []);
+  namedItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", []);
 
-  namedItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("namedItem", [__arg_0]);
+  namedItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "namedItem", [__arg_0]);
 
-  result_Callback_0_(mthis) => mthis.callMethod("result", []);
+  result_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "result", []);
 
 }
 
 class BlinkRadioNodeList extends BlinkNodeList {
   static final instance = new BlinkRadioNodeList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -10227,284 +10228,284 @@
 class BlinkRange {
   static final instance = new BlinkRange();
 
-  cloneContents_Callback_0_(mthis) => mthis.callMethod("cloneContents", []);
+  cloneContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneContents", []);
 
-  cloneRange_Callback_0_(mthis) => mthis.callMethod("cloneRange", []);
+  cloneRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneRange", []);
 
-  collapse_Callback_0_(mthis) => mthis.callMethod("collapse", []);
+  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapse", []);
 
-  collapse_Callback_1_(mthis, __arg_0) => mthis.callMethod("collapse", [__arg_0]);
+  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0]);
 
-  collapsed_Getter_(mthis) => mthis["collapsed"];
+  collapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "collapsed");
 
-  commonAncestorContainer_Getter_(mthis) => mthis["commonAncestorContainer"];
+  commonAncestorContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "commonAncestorContainer");
 
-  compareBoundaryPoints_Callback_0_(mthis) => mthis.callMethod("compareBoundaryPoints", []);
+  compareBoundaryPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", []);
 
-  compareBoundaryPoints_Callback_1_(mthis, __arg_0) => mthis.callMethod("compareBoundaryPoints", [__arg_0]);
+  compareBoundaryPoints_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", [__arg_0]);
 
-  compareBoundaryPoints_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("compareBoundaryPoints", [__arg_0, __arg_1]);
+  compareBoundaryPoints_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "compareBoundaryPoints", [__arg_0, __arg_1]);
 
-  compareNode_Callback_0_(mthis) => mthis.callMethod("compareNode", []);
+  compareNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compareNode", []);
 
-  compareNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("compareNode", [__arg_0]);
+  compareNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compareNode", [__arg_0]);
 
-  comparePoint_Callback_0_(mthis) => mthis.callMethod("comparePoint", []);
+  comparePoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", []);
 
-  comparePoint_Callback_1_(mthis, __arg_0) => mthis.callMethod("comparePoint", [__arg_0]);
+  comparePoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", [__arg_0]);
 
-  comparePoint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("comparePoint", [__arg_0, __arg_1]);
+  comparePoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "comparePoint", [__arg_0, __arg_1]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Range"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Range"), []);
 
-  createContextualFragment_Callback_0_(mthis) => mthis.callMethod("createContextualFragment", []);
+  createContextualFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createContextualFragment", []);
 
-  createContextualFragment_Callback_1_(mthis, __arg_0) => mthis.callMethod("createContextualFragment", [__arg_0]);
+  createContextualFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createContextualFragment", [__arg_0]);
 
-  deleteContents_Callback_0_(mthis) => mthis.callMethod("deleteContents", []);
+  deleteContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteContents", []);
 
-  detach_Callback_0_(mthis) => mthis.callMethod("detach", []);
+  detach_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detach", []);
 
-  endContainer_Getter_(mthis) => mthis["endContainer"];
+  endContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endContainer");
 
-  endOffset_Getter_(mthis) => mthis["endOffset"];
+  endOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endOffset");
 
-  expand_Callback_0_(mthis) => mthis.callMethod("expand", []);
+  expand_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "expand", []);
 
-  expand_Callback_1_(mthis, __arg_0) => mthis.callMethod("expand", [__arg_0]);
+  expand_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "expand", [__arg_0]);
 
-  extractContents_Callback_0_(mthis) => mthis.callMethod("extractContents", []);
+  extractContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "extractContents", []);
 
-  getBoundingClientRect_Callback_0_(mthis) => mthis.callMethod("getBoundingClientRect", []);
+  getBoundingClientRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBoundingClientRect", []);
 
-  getClientRects_Callback_0_(mthis) => mthis.callMethod("getClientRects", []);
+  getClientRects_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getClientRects", []);
 
-  insertNode_Callback_0_(mthis) => mthis.callMethod("insertNode", []);
+  insertNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertNode", []);
 
-  insertNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertNode", [__arg_0]);
+  insertNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertNode", [__arg_0]);
 
-  intersectsNode_Callback_0_(mthis) => mthis.callMethod("intersectsNode", []);
+  intersectsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "intersectsNode", []);
 
-  intersectsNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("intersectsNode", [__arg_0]);
+  intersectsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "intersectsNode", [__arg_0]);
 
-  isPointInRange_Callback_0_(mthis) => mthis.callMethod("isPointInRange", []);
+  isPointInRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", []);
 
-  isPointInRange_Callback_1_(mthis, __arg_0) => mthis.callMethod("isPointInRange", [__arg_0]);
+  isPointInRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", [__arg_0]);
 
-  isPointInRange_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("isPointInRange", [__arg_0, __arg_1]);
+  isPointInRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "isPointInRange", [__arg_0, __arg_1]);
 
-  selectNodeContents_Callback_0_(mthis) => mthis.callMethod("selectNodeContents", []);
+  selectNodeContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectNodeContents", []);
 
-  selectNodeContents_Callback_1_(mthis, __arg_0) => mthis.callMethod("selectNodeContents", [__arg_0]);
+  selectNodeContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectNodeContents", [__arg_0]);
 
-  selectNode_Callback_0_(mthis) => mthis.callMethod("selectNode", []);
+  selectNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectNode", []);
 
-  selectNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("selectNode", [__arg_0]);
+  selectNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectNode", [__arg_0]);
 
-  setEndAfter_Callback_0_(mthis) => mthis.callMethod("setEndAfter", []);
+  setEndAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEndAfter", []);
 
-  setEndAfter_Callback_1_(mthis, __arg_0) => mthis.callMethod("setEndAfter", [__arg_0]);
+  setEndAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEndAfter", [__arg_0]);
 
-  setEndBefore_Callback_0_(mthis) => mthis.callMethod("setEndBefore", []);
+  setEndBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEndBefore", []);
 
-  setEndBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("setEndBefore", [__arg_0]);
+  setEndBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEndBefore", [__arg_0]);
 
-  setEnd_Callback_0_(mthis) => mthis.callMethod("setEnd", []);
+  setEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", []);
 
-  setEnd_Callback_1_(mthis, __arg_0) => mthis.callMethod("setEnd", [__arg_0]);
+  setEnd_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", [__arg_0]);
 
-  setEnd_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setEnd", [__arg_0, __arg_1]);
+  setEnd_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setEnd", [__arg_0, __arg_1]);
 
-  setStartAfter_Callback_0_(mthis) => mthis.callMethod("setStartAfter", []);
+  setStartAfter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStartAfter", []);
 
-  setStartAfter_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStartAfter", [__arg_0]);
+  setStartAfter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStartAfter", [__arg_0]);
 
-  setStartBefore_Callback_0_(mthis) => mthis.callMethod("setStartBefore", []);
+  setStartBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStartBefore", []);
 
-  setStartBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStartBefore", [__arg_0]);
+  setStartBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStartBefore", [__arg_0]);
 
-  setStart_Callback_0_(mthis) => mthis.callMethod("setStart", []);
+  setStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStart", []);
 
-  setStart_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStart", [__arg_0]);
+  setStart_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStart", [__arg_0]);
 
-  setStart_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setStart", [__arg_0, __arg_1]);
+  setStart_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStart", [__arg_0, __arg_1]);
 
-  startContainer_Getter_(mthis) => mthis["startContainer"];
+  startContainer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startContainer");
 
-  startOffset_Getter_(mthis) => mthis["startOffset"];
+  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startOffset");
 
-  surroundContents_Callback_0_(mthis) => mthis.callMethod("surroundContents", []);
+  surroundContents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "surroundContents", []);
 
-  surroundContents_Callback_1_(mthis, __arg_0) => mthis.callMethod("surroundContents", [__arg_0]);
+  surroundContents_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "surroundContents", [__arg_0]);
 
 }
 
 class BlinkReadableStream {
   static final instance = new BlinkReadableStream();
 
-  cancel_Callback_0_(mthis) => mthis.callMethod("cancel", []);
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
 
-  cancel_Callback_1_(mthis, __arg_0) => mthis.callMethod("cancel", [__arg_0]);
+  cancel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancel", [__arg_0]);
 
-  closed_Getter_(mthis) => mthis["closed"];
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
 
-  read_Callback_0_(mthis) => mthis.callMethod("read", []);
+  read_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "read", []);
 
-  state_Getter_(mthis) => mthis["state"];
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
 
-  wait_Callback_0_(mthis) => mthis.callMethod("wait", []);
+  wait_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "wait", []);
 
 }
 
 class BlinkRect {
   static final instance = new BlinkRect();
 
-  bottom_Getter_(mthis) => mthis["bottom"];
+  bottom_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bottom");
 
-  left_Getter_(mthis) => mthis["left"];
+  left_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "left");
 
-  right_Getter_(mthis) => mthis["right"];
+  right_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "right");
 
-  top_Getter_(mthis) => mthis["top"];
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
 
 }
 
 class BlinkRelatedEvent extends BlinkEvent {
   static final instance = new BlinkRelatedEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["RelatedEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "RelatedEvent"), [__arg_0, __arg_1]);
 
-  relatedTarget_Getter_(mthis) => mthis["relatedTarget"];
+  relatedTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "relatedTarget");
 
 }
 
 class BlinkRequest {
   static final instance = new BlinkRequest();
 
-  arrayBuffer_Callback_0_(mthis) => mthis.callMethod("arrayBuffer", []);
+  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
 
-  blob_Callback_0_(mthis) => mthis.callMethod("blob", []);
+  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
 
-  bodyUsed_Getter_(mthis) => mthis["bodyUsed"];
+  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
 
-  clone_Callback_0_(mthis) => mthis.callMethod("clone", []);
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Request"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Request"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Request"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Request"), [__arg_0, __arg_1]);
 
-  credentials_Getter_(mthis) => mthis["credentials"];
+  credentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "credentials");
 
-  headers_Getter_(mthis) => mthis["headers"];
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
 
-  json_Callback_0_(mthis) => mthis.callMethod("json", []);
+  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
 
-  method_Getter_(mthis) => mthis["method"];
+  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
 
-  mode_Getter_(mthis) => mthis["mode"];
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
 
-  referrer_Getter_(mthis) => mthis["referrer"];
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
 
-  text_Callback_0_(mthis) => mthis.callMethod("text", []);
+  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkResourceProgressEvent extends BlinkProgressEvent {
   static final instance = new BlinkResourceProgressEvent();
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkResponse {
   static final instance = new BlinkResponse();
 
-  arrayBuffer_Callback_0_(mthis) => mthis.callMethod("arrayBuffer", []);
+  arrayBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "arrayBuffer", []);
 
-  blob_Callback_0_(mthis) => mthis.callMethod("blob", []);
+  blob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blob", []);
 
-  bodyUsed_Getter_(mthis) => mthis["bodyUsed"];
+  bodyUsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bodyUsed");
 
-  clone_Callback_0_(mthis) => mthis.callMethod("clone", []);
+  clone_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clone", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["Response"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Response"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["Response"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Response"), [__arg_0, __arg_1]);
 
-  headers_Getter_(mthis) => mthis["headers"];
+  headers_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "headers");
 
-  json_Callback_0_(mthis) => mthis.callMethod("json", []);
+  json_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "json", []);
 
-  statusText_Getter_(mthis) => mthis["statusText"];
+  statusText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusText");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
-  text_Callback_0_(mthis) => mthis.callMethod("text", []);
+  text_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "text", []);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkSQLError {
   static final instance = new BlinkSQLError();
 
-  code_Getter_(mthis) => mthis["code"];
+  code_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "code");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
 }
 
 class BlinkSQLResultSet {
   static final instance = new BlinkSQLResultSet();
 
-  insertId_Getter_(mthis) => mthis["insertId"];
+  insertId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "insertId");
 
-  rowsAffected_Getter_(mthis) => mthis["rowsAffected"];
+  rowsAffected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rowsAffected");
 
-  rows_Getter_(mthis) => mthis["rows"];
+  rows_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rows");
 
 }
 
 class BlinkSQLResultSetRowList {
   static final instance = new BlinkSQLResultSetRowList();
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSQLTransaction {
   static final instance = new BlinkSQLTransaction();
 
-  executeSql_Callback_0_(mthis) => mthis.callMethod("executeSql", []);
+  executeSql_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", []);
 
-  executeSql_Callback_1_(mthis, __arg_0) => mthis.callMethod("executeSql", [__arg_0]);
+  executeSql_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0]);
 
-  executeSql_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("executeSql", [__arg_0, __arg_1]);
+  executeSql_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0, __arg_1]);
 
-  executeSql_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("executeSql", [__arg_0, __arg_1, __arg_2]);
+  executeSql_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "executeSql", [__arg_0, __arg_1, __arg_2]);
 
-  executeSql_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "executeSql", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
 }
 
 class BlinkSVGAElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGAElement();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
 }
 
@@ -10516,15 +10517,15 @@
 class BlinkSVGAltGlyphElement extends BlinkSVGTextPositioningElement {
   static final instance = new BlinkSVGAltGlyphElement();
 
-  format_Getter_(mthis) => mthis["format"];
+  format_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "format");
 
   format_Setter_(mthis, __arg_0) => mthis["format"] = __arg_0;
 
-  glyphRef_Getter_(mthis) => mthis["glyphRef"];
+  glyphRef_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "glyphRef");
 
   glyphRef_Setter_(mthis, __arg_0) => mthis["glyphRef"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
 }
 
@@ -10536,27 +10537,27 @@
 class BlinkSVGAngle {
   static final instance = new BlinkSVGAngle();
 
-  convertToSpecifiedUnits_Callback_0_(mthis) => mthis.callMethod("convertToSpecifiedUnits", []);
+  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", []);
 
-  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => mthis.callMethod("convertToSpecifiedUnits", [__arg_0]);
+  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", [__arg_0]);
 
-  newValueSpecifiedUnits_Callback_0_(mthis) => mthis.callMethod("newValueSpecifiedUnits", []);
+  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", []);
 
-  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => mthis.callMethod("newValueSpecifiedUnits", [__arg_0]);
+  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0]);
 
-  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("newValueSpecifiedUnits", [__arg_0, __arg_1]);
+  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
 
-  unitType_Getter_(mthis) => mthis["unitType"];
+  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unitType");
 
-  valueAsString_Getter_(mthis) => mthis["valueAsString"];
+  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsString");
 
   valueAsString_Setter_(mthis, __arg_0) => mthis["valueAsString"] = __arg_0;
 
-  valueInSpecifiedUnits_Getter_(mthis) => mthis["valueInSpecifiedUnits"];
+  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueInSpecifiedUnits");
 
   valueInSpecifiedUnits_Setter_(mthis, __arg_0) => mthis["valueInSpecifiedUnits"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -10580,18 +10581,18 @@
 class BlinkSVGAnimatedAngle {
   static final instance = new BlinkSVGAnimatedAngle();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedBoolean {
   static final instance = new BlinkSVGAnimatedBoolean();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
   baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
 
@@ -10600,9 +10601,9 @@
 class BlinkSVGAnimatedEnumeration {
   static final instance = new BlinkSVGAnimatedEnumeration();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
   baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
 
@@ -10611,9 +10612,9 @@
 class BlinkSVGAnimatedInteger {
   static final instance = new BlinkSVGAnimatedInteger();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
   baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
 
@@ -10622,27 +10623,27 @@
 class BlinkSVGAnimatedLength {
   static final instance = new BlinkSVGAnimatedLength();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedLengthList {
   static final instance = new BlinkSVGAnimatedLengthList();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedNumber {
   static final instance = new BlinkSVGAnimatedNumber();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
   baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
 
@@ -10651,36 +10652,36 @@
 class BlinkSVGAnimatedNumberList {
   static final instance = new BlinkSVGAnimatedNumberList();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedPreserveAspectRatio {
   static final instance = new BlinkSVGAnimatedPreserveAspectRatio();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedRect {
   static final instance = new BlinkSVGAnimatedRect();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimatedString {
   static final instance = new BlinkSVGAnimatedString();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
   baseVal_Setter_(mthis, __arg_0) => mthis["baseVal"] = __arg_0;
 
@@ -10689,114 +10690,114 @@
 class BlinkSVGAnimatedTransformList {
   static final instance = new BlinkSVGAnimatedTransformList();
 
-  animVal_Getter_(mthis) => mthis["animVal"];
+  animVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animVal");
 
-  baseVal_Getter_(mthis) => mthis["baseVal"];
+  baseVal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseVal");
 
 }
 
 class BlinkSVGAnimationElement extends BlinkSVGElement {
   static final instance = new BlinkSVGAnimationElement();
 
-  beginElementAt_Callback_0_(mthis) => mthis.callMethod("beginElementAt", []);
+  beginElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginElementAt", []);
 
-  beginElementAt_Callback_1_(mthis, __arg_0) => mthis.callMethod("beginElementAt", [__arg_0]);
+  beginElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "beginElementAt", [__arg_0]);
 
-  beginElement_Callback_0_(mthis) => mthis.callMethod("beginElement", []);
+  beginElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "beginElement", []);
 
-  endElementAt_Callback_0_(mthis) => mthis.callMethod("endElementAt", []);
+  endElementAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endElementAt", []);
 
-  endElementAt_Callback_1_(mthis, __arg_0) => mthis.callMethod("endElementAt", [__arg_0]);
+  endElementAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "endElementAt", [__arg_0]);
 
-  endElement_Callback_0_(mthis) => mthis.callMethod("endElement", []);
+  endElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "endElement", []);
 
-  getCurrentTime_Callback_0_(mthis) => mthis.callMethod("getCurrentTime", []);
+  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentTime", []);
 
-  getSimpleDuration_Callback_0_(mthis) => mthis.callMethod("getSimpleDuration", []);
+  getSimpleDuration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSimpleDuration", []);
 
-  getStartTime_Callback_0_(mthis) => mthis.callMethod("getStartTime", []);
+  getStartTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStartTime", []);
 
-  hasExtension_Callback_0_(mthis) => mthis.callMethod("hasExtension", []);
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasExtension", [__arg_0]);
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
 
-  onbegin_Getter_(mthis) => mthis["onbegin"];
+  onbegin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbegin");
 
   onbegin_Setter_(mthis, __arg_0) => mthis["onbegin"] = __arg_0;
 
-  onend_Getter_(mthis) => mthis["onend"];
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
 
   onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
 
-  onrepeat_Getter_(mthis) => mthis["onrepeat"];
+  onrepeat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onrepeat");
 
   onrepeat_Setter_(mthis, __arg_0) => mthis["onrepeat"] = __arg_0;
 
-  requiredExtensions_Getter_(mthis) => mthis["requiredExtensions"];
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => mthis["requiredFeatures"];
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => mthis["systemLanguage"];
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
 
-  targetElement_Getter_(mthis) => mthis["targetElement"];
+  targetElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetElement");
 
 }
 
 class BlinkSVGCircleElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGCircleElement();
 
-  cx_Getter_(mthis) => mthis["cx"];
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
 
-  cy_Getter_(mthis) => mthis["cy"];
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
 
-  r_Getter_(mthis) => mthis["r"];
+  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r");
 
 }
 
 class BlinkSVGClipPathElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGClipPathElement();
 
-  clipPathUnits_Getter_(mthis) => mthis["clipPathUnits"];
+  clipPathUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clipPathUnits");
 
 }
 
 class BlinkSVGComponentTransferFunctionElement extends BlinkSVGElement {
   static final instance = new BlinkSVGComponentTransferFunctionElement();
 
-  amplitude_Getter_(mthis) => mthis["amplitude"];
+  amplitude_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "amplitude");
 
-  exponent_Getter_(mthis) => mthis["exponent"];
+  exponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "exponent");
 
-  intercept_Getter_(mthis) => mthis["intercept"];
+  intercept_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "intercept");
 
-  offset_Getter_(mthis) => mthis["offset"];
+  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offset");
 
-  slope_Getter_(mthis) => mthis["slope"];
+  slope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "slope");
 
-  tableValues_Getter_(mthis) => mthis["tableValues"];
+  tableValues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tableValues");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkSVGCursorElement extends BlinkSVGElement {
   static final instance = new BlinkSVGCursorElement();
 
-  hasExtension_Callback_0_(mthis) => mthis.callMethod("hasExtension", []);
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasExtension", [__arg_0]);
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  requiredExtensions_Getter_(mthis) => mthis["requiredExtensions"];
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => mthis["requiredFeatures"];
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => mthis["systemLanguage"];
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -10818,271 +10819,271 @@
 class BlinkSVGElement extends BlinkElement {
   static final instance = new BlinkSVGElement();
 
-  className_Getter_(mthis) => mthis["className"];
+  className_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "className");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onautocomplete_Getter_(mthis) => mthis["onautocomplete"];
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
 
   onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
 
-  onautocompleteerror_Getter_(mthis) => mthis["onautocompleteerror"];
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
 
   onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
 
-  onblur_Getter_(mthis) => mthis["onblur"];
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
 
   onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
 
-  oncancel_Getter_(mthis) => mthis["oncancel"];
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
 
   oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
 
-  oncanplay_Getter_(mthis) => mthis["oncanplay"];
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
 
   oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
 
-  oncanplaythrough_Getter_(mthis) => mthis["oncanplaythrough"];
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
 
   oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onclick_Getter_(mthis) => mthis["onclick"];
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
 
   onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  oncontextmenu_Getter_(mthis) => mthis["oncontextmenu"];
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
 
   oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
 
-  oncuechange_Getter_(mthis) => mthis["oncuechange"];
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
 
   oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
 
-  ondblclick_Getter_(mthis) => mthis["ondblclick"];
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
 
   ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
 
-  ondrag_Getter_(mthis) => mthis["ondrag"];
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
 
   ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
 
-  ondragend_Getter_(mthis) => mthis["ondragend"];
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
 
   ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
 
-  ondragenter_Getter_(mthis) => mthis["ondragenter"];
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
 
   ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
 
-  ondragleave_Getter_(mthis) => mthis["ondragleave"];
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
 
   ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
 
-  ondragover_Getter_(mthis) => mthis["ondragover"];
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
 
   ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
 
-  ondragstart_Getter_(mthis) => mthis["ondragstart"];
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
 
   ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
 
-  ondrop_Getter_(mthis) => mthis["ondrop"];
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
 
   ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
 
-  ondurationchange_Getter_(mthis) => mthis["ondurationchange"];
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
 
   ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
 
-  onemptied_Getter_(mthis) => mthis["onemptied"];
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
 
   onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onfocus_Getter_(mthis) => mthis["onfocus"];
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
 
   onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
 
-  oninput_Getter_(mthis) => mthis["oninput"];
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
 
   oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
 
-  oninvalid_Getter_(mthis) => mthis["oninvalid"];
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
 
   oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
 
-  onkeydown_Getter_(mthis) => mthis["onkeydown"];
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
 
   onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
 
-  onkeypress_Getter_(mthis) => mthis["onkeypress"];
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
 
   onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
 
-  onkeyup_Getter_(mthis) => mthis["onkeyup"];
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
 
   onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadeddata_Getter_(mthis) => mthis["onloadeddata"];
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
 
   onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
 
-  onloadedmetadata_Getter_(mthis) => mthis["onloadedmetadata"];
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
 
   onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onmousedown_Getter_(mthis) => mthis["onmousedown"];
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
 
   onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
 
-  onmouseenter_Getter_(mthis) => mthis["onmouseenter"];
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
 
   onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
 
-  onmouseleave_Getter_(mthis) => mthis["onmouseleave"];
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
 
   onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
 
-  onmousemove_Getter_(mthis) => mthis["onmousemove"];
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
 
   onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
 
-  onmouseout_Getter_(mthis) => mthis["onmouseout"];
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
 
   onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
 
-  onmouseover_Getter_(mthis) => mthis["onmouseover"];
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
 
   onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
 
-  onmouseup_Getter_(mthis) => mthis["onmouseup"];
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
 
   onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
 
-  onmousewheel_Getter_(mthis) => mthis["onmousewheel"];
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
 
   onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
 
-  onpause_Getter_(mthis) => mthis["onpause"];
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
 
   onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
 
-  onplay_Getter_(mthis) => mthis["onplay"];
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
 
   onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
 
-  onplaying_Getter_(mthis) => mthis["onplaying"];
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
 
   onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onratechange_Getter_(mthis) => mthis["onratechange"];
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
 
   onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
 
-  onreset_Getter_(mthis) => mthis["onreset"];
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
 
   onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
 
-  onresize_Getter_(mthis) => mthis["onresize"];
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
 
   onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
 
-  onscroll_Getter_(mthis) => mthis["onscroll"];
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
 
   onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
 
-  onseeked_Getter_(mthis) => mthis["onseeked"];
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
 
   onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
 
-  onseeking_Getter_(mthis) => mthis["onseeking"];
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
 
   onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
 
-  onselect_Getter_(mthis) => mthis["onselect"];
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
 
   onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
 
-  onshow_Getter_(mthis) => mthis["onshow"];
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
 
   onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
 
-  onstalled_Getter_(mthis) => mthis["onstalled"];
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
 
   onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
 
-  onsubmit_Getter_(mthis) => mthis["onsubmit"];
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
 
   onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
 
-  onsuspend_Getter_(mthis) => mthis["onsuspend"];
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
 
   onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
 
-  ontimeupdate_Getter_(mthis) => mthis["ontimeupdate"];
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
 
   ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
 
-  ontoggle_Getter_(mthis) => mthis["ontoggle"];
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
 
   ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
 
-  onvolumechange_Getter_(mthis) => mthis["onvolumechange"];
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
 
   onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
 
-  onwaiting_Getter_(mthis) => mthis["onwaiting"];
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
 
   onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
 
-  ownerSVGElement_Getter_(mthis) => mthis["ownerSVGElement"];
+  ownerSVGElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerSVGElement");
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
-  tabIndex_Getter_(mthis) => mthis["tabIndex"];
+  tabIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tabIndex");
 
   tabIndex_Setter_(mthis, __arg_0) => mthis["tabIndex"] = __arg_0;
 
-  viewportElement_Getter_(mthis) => mthis["viewportElement"];
+  viewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportElement");
 
-  xmlbase_Getter_(mthis) => mthis["xmlbase"];
+  xmlbase_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlbase");
 
   xmlbase_Setter_(mthis, __arg_0) => mthis["xmlbase"] = __arg_0;
 
-  xmllang_Getter_(mthis) => mthis["xmllang"];
+  xmllang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmllang");
 
   xmllang_Setter_(mthis, __arg_0) => mthis["xmllang"] = __arg_0;
 
-  xmlspace_Getter_(mthis) => mthis["xmlspace"];
+  xmlspace_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xmlspace");
 
   xmlspace_Setter_(mthis, __arg_0) => mthis["xmlspace"] = __arg_0;
 
@@ -11091,245 +11092,245 @@
 class BlinkSVGEllipseElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGEllipseElement();
 
-  cx_Getter_(mthis) => mthis["cx"];
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
 
-  cy_Getter_(mthis) => mthis["cy"];
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
 
-  rx_Getter_(mthis) => mthis["rx"];
+  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rx");
 
-  ry_Getter_(mthis) => mthis["ry"];
+  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ry");
 
 }
 
 class BlinkSVGFEBlendElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEBlendElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  in2_Getter_(mthis) => mthis["in2"];
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
 
-  mode_Getter_(mthis) => mthis["mode"];
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEColorMatrixElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEColorMatrixElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  values_Getter_(mthis) => mthis["values"];
+  values_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "values");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEComponentTransferElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEComponentTransferElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFECompositeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFECompositeElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  in2_Getter_(mthis) => mthis["in2"];
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
 
-  k1_Getter_(mthis) => mthis["k1"];
+  k1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k1");
 
-  k2_Getter_(mthis) => mthis["k2"];
+  k2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k2");
 
-  k3_Getter_(mthis) => mthis["k3"];
+  k3_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k3");
 
-  k4_Getter_(mthis) => mthis["k4"];
+  k4_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "k4");
 
-  operator_Getter_(mthis) => mthis["operator"];
+  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operator");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEConvolveMatrixElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEConvolveMatrixElement();
 
-  bias_Getter_(mthis) => mthis["bias"];
+  bias_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bias");
 
-  divisor_Getter_(mthis) => mthis["divisor"];
+  divisor_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "divisor");
 
-  edgeMode_Getter_(mthis) => mthis["edgeMode"];
+  edgeMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "edgeMode");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  kernelMatrix_Getter_(mthis) => mthis["kernelMatrix"];
+  kernelMatrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelMatrix");
 
-  kernelUnitLengthX_Getter_(mthis) => mthis["kernelUnitLengthX"];
+  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthX");
 
-  kernelUnitLengthY_Getter_(mthis) => mthis["kernelUnitLengthY"];
+  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthY");
 
-  orderX_Getter_(mthis) => mthis["orderX"];
+  orderX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orderX");
 
-  orderY_Getter_(mthis) => mthis["orderY"];
+  orderY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orderY");
 
-  preserveAlpha_Getter_(mthis) => mthis["preserveAlpha"];
+  preserveAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAlpha");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  targetX_Getter_(mthis) => mthis["targetX"];
+  targetX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetX");
 
-  targetY_Getter_(mthis) => mthis["targetY"];
+  targetY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetY");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEDiffuseLightingElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDiffuseLightingElement();
 
-  diffuseConstant_Getter_(mthis) => mthis["diffuseConstant"];
+  diffuseConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "diffuseConstant");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  kernelUnitLengthX_Getter_(mthis) => mthis["kernelUnitLengthX"];
+  kernelUnitLengthX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthX");
 
-  kernelUnitLengthY_Getter_(mthis) => mthis["kernelUnitLengthY"];
+  kernelUnitLengthY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kernelUnitLengthY");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  surfaceScale_Getter_(mthis) => mthis["surfaceScale"];
+  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "surfaceScale");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEDisplacementMapElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDisplacementMapElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  in2_Getter_(mthis) => mthis["in2"];
+  in2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in2");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  scale_Getter_(mthis) => mthis["scale"];
+  scale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scale");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  xChannelSelector_Getter_(mthis) => mthis["xChannelSelector"];
+  xChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "xChannelSelector");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  yChannelSelector_Getter_(mthis) => mthis["yChannelSelector"];
+  yChannelSelector_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "yChannelSelector");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEDistantLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDistantLightElement();
 
-  azimuth_Getter_(mthis) => mthis["azimuth"];
+  azimuth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "azimuth");
 
-  elevation_Getter_(mthis) => mthis["elevation"];
+  elevation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elevation");
 
 }
 
 class BlinkSVGFEDropShadowElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEDropShadowElement();
 
-  dx_Getter_(mthis) => mthis["dx"];
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
 
-  dy_Getter_(mthis) => mthis["dy"];
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  setStdDeviation_Callback_0_(mthis) => mthis.callMethod("setStdDeviation", []);
+  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", []);
 
-  setStdDeviation_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStdDeviation", [__arg_0]);
+  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0]);
 
-  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setStdDeviation", [__arg_0, __arg_1]);
+  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0, __arg_1]);
 
-  stdDeviationX_Getter_(mthis) => mthis["stdDeviationX"];
+  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationX");
 
-  stdDeviationY_Getter_(mthis) => mthis["stdDeviationY"];
+  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationY");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEFloodElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEFloodElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -11356,240 +11357,240 @@
 class BlinkSVGFEGaussianBlurElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEGaussianBlurElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  setStdDeviation_Callback_0_(mthis) => mthis.callMethod("setStdDeviation", []);
+  setStdDeviation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", []);
 
-  setStdDeviation_Callback_1_(mthis, __arg_0) => mthis.callMethod("setStdDeviation", [__arg_0]);
+  setStdDeviation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0]);
 
-  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setStdDeviation", [__arg_0, __arg_1]);
+  setStdDeviation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setStdDeviation", [__arg_0, __arg_1]);
 
-  stdDeviationX_Getter_(mthis) => mthis["stdDeviationX"];
+  stdDeviationX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationX");
 
-  stdDeviationY_Getter_(mthis) => mthis["stdDeviationY"];
+  stdDeviationY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stdDeviationY");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEImageElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEImageElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEMergeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMergeElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEMergeNodeElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMergeNodeElement();
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
 }
 
 class BlinkSVGFEMorphologyElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEMorphologyElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  operator_Getter_(mthis) => mthis["operator"];
+  operator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operator");
 
-  radiusX_Getter_(mthis) => mthis["radiusX"];
+  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusX");
 
-  radiusY_Getter_(mthis) => mthis["radiusY"];
+  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusY");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEOffsetElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEOffsetElement();
 
-  dx_Getter_(mthis) => mthis["dx"];
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
 
-  dy_Getter_(mthis) => mthis["dy"];
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFEPointLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFEPointLightElement();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
-  z_Getter_(mthis) => mthis["z"];
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
 
 }
 
 class BlinkSVGFESpecularLightingElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFESpecularLightingElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  specularConstant_Getter_(mthis) => mthis["specularConstant"];
+  specularConstant_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularConstant");
 
-  specularExponent_Getter_(mthis) => mthis["specularExponent"];
+  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularExponent");
 
-  surfaceScale_Getter_(mthis) => mthis["surfaceScale"];
+  surfaceScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "surfaceScale");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFESpotLightElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFESpotLightElement();
 
-  limitingConeAngle_Getter_(mthis) => mthis["limitingConeAngle"];
+  limitingConeAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "limitingConeAngle");
 
-  pointsAtX_Getter_(mthis) => mthis["pointsAtX"];
+  pointsAtX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtX");
 
-  pointsAtY_Getter_(mthis) => mthis["pointsAtY"];
+  pointsAtY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtY");
 
-  pointsAtZ_Getter_(mthis) => mthis["pointsAtZ"];
+  pointsAtZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pointsAtZ");
 
-  specularExponent_Getter_(mthis) => mthis["specularExponent"];
+  specularExponent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "specularExponent");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
-  z_Getter_(mthis) => mthis["z"];
+  z_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "z");
 
 }
 
 class BlinkSVGFETileElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFETileElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  in1_Getter_(mthis) => mthis["in1"];
+  in1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "in1");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFETurbulenceElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFETurbulenceElement();
 
-  baseFrequencyX_Getter_(mthis) => mthis["baseFrequencyX"];
+  baseFrequencyX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseFrequencyX");
 
-  baseFrequencyY_Getter_(mthis) => mthis["baseFrequencyY"];
+  baseFrequencyY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseFrequencyY");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  numOctaves_Getter_(mthis) => mthis["numOctaves"];
+  numOctaves_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numOctaves");
 
-  result_Getter_(mthis) => mthis["result"];
+  result_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "result");
 
-  seed_Getter_(mthis) => mthis["seed"];
+  seed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "seed");
 
-  stitchTiles_Getter_(mthis) => mthis["stitchTiles"];
+  stitchTiles_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stitchTiles");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGFilterElement extends BlinkSVGElement {
   static final instance = new BlinkSVGFilterElement();
 
-  filterResX_Getter_(mthis) => mthis["filterResX"];
+  filterResX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterResX");
 
-  filterResY_Getter_(mthis) => mthis["filterResY"];
+  filterResY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterResY");
 
-  filterUnits_Getter_(mthis) => mthis["filterUnits"];
+  filterUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filterUnits");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  primitiveUnits_Getter_(mthis) => mthis["primitiveUnits"];
+  primitiveUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "primitiveUnits");
 
-  setFilterRes_Callback_0_(mthis) => mthis.callMethod("setFilterRes", []);
+  setFilterRes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", []);
 
-  setFilterRes_Callback_1_(mthis, __arg_0) => mthis.callMethod("setFilterRes", [__arg_0]);
+  setFilterRes_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", [__arg_0]);
 
-  setFilterRes_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setFilterRes", [__arg_0, __arg_1]);
+  setFilterRes_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setFilterRes", [__arg_0, __arg_1]);
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -11626,13 +11627,13 @@
 class BlinkSVGForeignObjectElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGForeignObjectElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -11644,13 +11645,13 @@
 class BlinkSVGGeometryElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGGeometryElement();
 
-  isPointInFill_Callback_0_(mthis) => mthis.callMethod("isPointInFill", []);
+  isPointInFill_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInFill", []);
 
-  isPointInFill_Callback_1_(mthis, __arg_0) => mthis.callMethod("isPointInFill", [__arg_0]);
+  isPointInFill_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInFill", [__arg_0]);
 
-  isPointInStroke_Callback_0_(mthis) => mthis.callMethod("isPointInStroke", []);
+  isPointInStroke_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", []);
 
-  isPointInStroke_Callback_1_(mthis, __arg_0) => mthis.callMethod("isPointInStroke", [__arg_0]);
+  isPointInStroke_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isPointInStroke", [__arg_0]);
 
 }
 
@@ -11662,29 +11663,29 @@
 class BlinkSVGGlyphRefElement extends BlinkSVGElement {
   static final instance = new BlinkSVGGlyphRefElement();
 
-  dx_Getter_(mthis) => mthis["dx"];
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
 
   dx_Setter_(mthis, __arg_0) => mthis["dx"] = __arg_0;
 
-  dy_Getter_(mthis) => mthis["dy"];
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
 
   dy_Setter_(mthis, __arg_0) => mthis["dy"] = __arg_0;
 
-  format_Getter_(mthis) => mthis["format"];
+  format_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "format");
 
   format_Setter_(mthis, __arg_0) => mthis["format"] = __arg_0;
 
-  glyphRef_Getter_(mthis) => mthis["glyphRef"];
+  glyphRef_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "glyphRef");
 
   glyphRef_Setter_(mthis, __arg_0) => mthis["glyphRef"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -11693,44 +11694,44 @@
 class BlinkSVGGradientElement extends BlinkSVGElement {
   static final instance = new BlinkSVGGradientElement();
 
-  gradientTransform_Getter_(mthis) => mthis["gradientTransform"];
+  gradientTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gradientTransform");
 
-  gradientUnits_Getter_(mthis) => mthis["gradientUnits"];
+  gradientUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "gradientUnits");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  spreadMethod_Getter_(mthis) => mthis["spreadMethod"];
+  spreadMethod_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spreadMethod");
 
 }
 
 class BlinkSVGGraphicsElement extends BlinkSVGElement {
   static final instance = new BlinkSVGGraphicsElement();
 
-  farthestViewportElement_Getter_(mthis) => mthis["farthestViewportElement"];
+  farthestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "farthestViewportElement");
 
-  getBBox_Callback_0_(mthis) => mthis.callMethod("getBBox", []);
+  getBBox_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBBox", []);
 
-  getCTM_Callback_0_(mthis) => mthis.callMethod("getCTM", []);
+  getCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCTM", []);
 
-  getScreenCTM_Callback_0_(mthis) => mthis.callMethod("getScreenCTM", []);
+  getScreenCTM_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getScreenCTM", []);
 
-  getTransformToElement_Callback_0_(mthis) => mthis.callMethod("getTransformToElement", []);
+  getTransformToElement_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTransformToElement", []);
 
-  getTransformToElement_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTransformToElement", [__arg_0]);
+  getTransformToElement_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTransformToElement", [__arg_0]);
 
-  hasExtension_Callback_0_(mthis) => mthis.callMethod("hasExtension", []);
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasExtension", [__arg_0]);
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
 
-  nearestViewportElement_Getter_(mthis) => mthis["nearestViewportElement"];
+  nearestViewportElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "nearestViewportElement");
 
-  requiredExtensions_Getter_(mthis) => mthis["requiredExtensions"];
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => mthis["requiredFeatures"];
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => mthis["systemLanguage"];
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
 
-  transform_Getter_(mthis) => mthis["transform"];
+  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transform");
 
 }
 
@@ -11742,44 +11743,44 @@
 class BlinkSVGImageElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGImageElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGLength {
   static final instance = new BlinkSVGLength();
 
-  convertToSpecifiedUnits_Callback_0_(mthis) => mthis.callMethod("convertToSpecifiedUnits", []);
+  convertToSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", []);
 
-  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => mthis.callMethod("convertToSpecifiedUnits", [__arg_0]);
+  convertToSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "convertToSpecifiedUnits", [__arg_0]);
 
-  newValueSpecifiedUnits_Callback_0_(mthis) => mthis.callMethod("newValueSpecifiedUnits", []);
+  newValueSpecifiedUnits_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", []);
 
-  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => mthis.callMethod("newValueSpecifiedUnits", [__arg_0]);
+  newValueSpecifiedUnits_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0]);
 
-  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("newValueSpecifiedUnits", [__arg_0, __arg_1]);
+  newValueSpecifiedUnits_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "newValueSpecifiedUnits", [__arg_0, __arg_1]);
 
-  unitType_Getter_(mthis) => mthis["unitType"];
+  unitType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "unitType");
 
-  valueAsString_Getter_(mthis) => mthis["valueAsString"];
+  valueAsString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueAsString");
 
   valueAsString_Setter_(mthis, __arg_0) => mthis["valueAsString"] = __arg_0;
 
-  valueInSpecifiedUnits_Getter_(mthis) => mthis["valueInSpecifiedUnits"];
+  valueInSpecifiedUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueInSpecifiedUnits");
 
   valueInSpecifiedUnits_Setter_(mthis, __arg_0) => mthis["valueInSpecifiedUnits"] = __arg_0;
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -11788,205 +11789,205 @@
 class BlinkSVGLengthList {
   static final instance = new BlinkSVGLengthList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGLineElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGLineElement();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
 }
 
 class BlinkSVGLinearGradientElement extends BlinkSVGGradientElement {
   static final instance = new BlinkSVGLinearGradientElement();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
 }
 
 class BlinkSVGMPathElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMPathElement();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
 }
 
 class BlinkSVGMarkerElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMarkerElement();
 
-  markerHeight_Getter_(mthis) => mthis["markerHeight"];
+  markerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerHeight");
 
-  markerUnits_Getter_(mthis) => mthis["markerUnits"];
+  markerUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerUnits");
 
-  markerWidth_Getter_(mthis) => mthis["markerWidth"];
+  markerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "markerWidth");
 
-  orientAngle_Getter_(mthis) => mthis["orientAngle"];
+  orientAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientAngle");
 
-  orientType_Getter_(mthis) => mthis["orientType"];
+  orientType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientType");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  refX_Getter_(mthis) => mthis["refX"];
+  refX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refX");
 
-  refY_Getter_(mthis) => mthis["refY"];
+  refY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "refY");
 
-  setOrientToAngle_Callback_0_(mthis) => mthis.callMethod("setOrientToAngle", []);
+  setOrientToAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAngle", []);
 
-  setOrientToAngle_Callback_1_(mthis, __arg_0) => mthis.callMethod("setOrientToAngle", [__arg_0]);
+  setOrientToAngle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAngle", [__arg_0]);
 
-  setOrientToAuto_Callback_0_(mthis) => mthis.callMethod("setOrientToAuto", []);
+  setOrientToAuto_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setOrientToAuto", []);
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
 }
 
 class BlinkSVGMaskElement extends BlinkSVGElement {
   static final instance = new BlinkSVGMaskElement();
 
-  hasExtension_Callback_0_(mthis) => mthis.callMethod("hasExtension", []);
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasExtension", [__arg_0]);
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  maskContentUnits_Getter_(mthis) => mthis["maskContentUnits"];
+  maskContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maskContentUnits");
 
-  maskUnits_Getter_(mthis) => mthis["maskUnits"];
+  maskUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maskUnits");
 
-  requiredExtensions_Getter_(mthis) => mthis["requiredExtensions"];
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => mthis["requiredFeatures"];
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => mthis["systemLanguage"];
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGMatrix {
   static final instance = new BlinkSVGMatrix();
 
-  a_Getter_(mthis) => mthis["a"];
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
 
   a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
 
-  b_Getter_(mthis) => mthis["b"];
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
 
   b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
 
-  c_Getter_(mthis) => mthis["c"];
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
 
   c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
 
-  d_Getter_(mthis) => mthis["d"];
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
 
   d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
 
-  e_Getter_(mthis) => mthis["e"];
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
 
   e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
 
-  f_Getter_(mthis) => mthis["f"];
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
 
   f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
 
-  flipX_Callback_0_(mthis) => mthis.callMethod("flipX", []);
+  flipX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flipX", []);
 
-  flipY_Callback_0_(mthis) => mthis.callMethod("flipY", []);
+  flipY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flipY", []);
 
-  inverse_Callback_0_(mthis) => mthis.callMethod("inverse", []);
+  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inverse", []);
 
-  multiply_Callback_0_(mthis) => mthis.callMethod("multiply", []);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
 
-  multiply_Callback_1_(mthis, __arg_0) => mthis.callMethod("multiply", [__arg_0]);
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
 
-  rotateFromVector_Callback_0_(mthis) => mthis.callMethod("rotateFromVector", []);
+  rotateFromVector_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", []);
 
-  rotateFromVector_Callback_1_(mthis, __arg_0) => mthis.callMethod("rotateFromVector", [__arg_0]);
+  rotateFromVector_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", [__arg_0]);
 
-  rotateFromVector_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("rotateFromVector", [__arg_0, __arg_1]);
+  rotateFromVector_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "rotateFromVector", [__arg_0, __arg_1]);
 
-  rotate_Callback_0_(mthis) => mthis.callMethod("rotate", []);
+  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
 
-  rotate_Callback_1_(mthis, __arg_0) => mthis.callMethod("rotate", [__arg_0]);
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
 
-  scaleNonUniform_Callback_0_(mthis) => mthis.callMethod("scaleNonUniform", []);
+  scaleNonUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", []);
 
-  scaleNonUniform_Callback_1_(mthis, __arg_0) => mthis.callMethod("scaleNonUniform", [__arg_0]);
+  scaleNonUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0]);
 
-  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scaleNonUniform", [__arg_0, __arg_1]);
+  scaleNonUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scaleNonUniform", [__arg_0, __arg_1]);
 
-  scale_Callback_0_(mthis) => mthis.callMethod("scale", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
 
-  scale_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
 
-  skewX_Callback_0_(mthis) => mthis.callMethod("skewX", []);
+  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewX", []);
 
-  skewX_Callback_1_(mthis, __arg_0) => mthis.callMethod("skewX", [__arg_0]);
+  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewX", [__arg_0]);
 
-  skewY_Callback_0_(mthis) => mthis.callMethod("skewY", []);
+  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewY", []);
 
-  skewY_Callback_1_(mthis, __arg_0) => mthis.callMethod("skewY", [__arg_0]);
+  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewY", [__arg_0]);
 
-  translate_Callback_0_(mthis) => mthis.callMethod("translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => mthis.callMethod("translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
 
 }
 
@@ -12003,7 +12004,7 @@
 class BlinkSVGNumber {
   static final instance = new BlinkSVGNumber();
 
-  value_Getter_(mthis) => mthis["value"];
+  value_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "value");
 
   value_Setter_(mthis, __arg_0) => mthis["value"] = __arg_0;
 
@@ -12012,210 +12013,210 @@
 class BlinkSVGNumberList {
   static final instance = new BlinkSVGNumberList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPathElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPathElement();
 
-  animatedNormalizedPathSegList_Getter_(mthis) => mthis["animatedNormalizedPathSegList"];
+  animatedNormalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedNormalizedPathSegList");
 
-  animatedPathSegList_Getter_(mthis) => mthis["animatedPathSegList"];
+  animatedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPathSegList");
 
-  createSVGPathSegArcAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createSVGPathSegArcAbs", [__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, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegArcAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createSVGPathSegArcAbs", [__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, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegArcAbs_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("createSVGPathSegArcAbs", [__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, "createSVGPathSegArcAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
 
-  createSVGPathSegArcRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  createSVGPathSegArcRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  createSVGPathSegArcRel_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("createSVGPathSegArcRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  createSVGPathSegClosePath_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegClosePath", []);
+  createSVGPathSegClosePath_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegClosePath", []);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoCubicAbs", [__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, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createSVGPathSegCurvetoCubicAbs", [__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, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
-  createSVGPathSegCurvetoCubicAbs_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createSVGPathSegCurvetoCubicAbs", [__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, "createSVGPathSegCurvetoCubicAbs", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
 
-  createSVGPathSegCurvetoCubicRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createSVGPathSegCurvetoCubicRel_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  createSVGPathSegCurvetoCubicRel_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("createSVGPathSegCurvetoCubicRel", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoCubicSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoCubicSmoothAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoCubicSmoothAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothAbs", [__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, "createSVGPathSegCurvetoCubicSmoothAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoCubicSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoCubicSmoothRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoCubicSmoothRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoCubicSmoothRel", [__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, "createSVGPathSegCurvetoCubicSmoothRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoQuadraticAbs_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoQuadraticAbs_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoQuadraticAbs", [__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, "createSVGPathSegCurvetoQuadraticAbs", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2]);
+  createSVGPathSegCurvetoQuadraticRel_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2]);
 
-  createSVGPathSegCurvetoQuadraticRel_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createSVGPathSegCurvetoQuadraticRel", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothAbs", []);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", []);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0]);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0]);
 
-  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticSmoothAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothRel", []);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", []);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0]);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0]);
 
-  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0, __arg_1]);
+  createSVGPathSegCurvetoQuadraticSmoothRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegCurvetoQuadraticSmoothRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoAbs_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoAbs", []);
+  createSVGPathSegLinetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", []);
 
-  createSVGPathSegLinetoAbs_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoAbs", [__arg_0]);
+  createSVGPathSegLinetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", [__arg_0]);
 
-  createSVGPathSegLinetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegLinetoAbs", [__arg_0, __arg_1]);
+  createSVGPathSegLinetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoHorizontalAbs_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoHorizontalAbs", []);
+  createSVGPathSegLinetoHorizontalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalAbs", []);
 
-  createSVGPathSegLinetoHorizontalAbs_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoHorizontalAbs", [__arg_0]);
+  createSVGPathSegLinetoHorizontalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalAbs", [__arg_0]);
 
-  createSVGPathSegLinetoHorizontalRel_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoHorizontalRel", []);
+  createSVGPathSegLinetoHorizontalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalRel", []);
 
-  createSVGPathSegLinetoHorizontalRel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoHorizontalRel", [__arg_0]);
+  createSVGPathSegLinetoHorizontalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoHorizontalRel", [__arg_0]);
 
-  createSVGPathSegLinetoRel_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoRel", []);
+  createSVGPathSegLinetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", []);
 
-  createSVGPathSegLinetoRel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoRel", [__arg_0]);
+  createSVGPathSegLinetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", [__arg_0]);
 
-  createSVGPathSegLinetoRel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegLinetoRel", [__arg_0, __arg_1]);
+  createSVGPathSegLinetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoRel", [__arg_0, __arg_1]);
 
-  createSVGPathSegLinetoVerticalAbs_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoVerticalAbs", []);
+  createSVGPathSegLinetoVerticalAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalAbs", []);
 
-  createSVGPathSegLinetoVerticalAbs_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoVerticalAbs", [__arg_0]);
+  createSVGPathSegLinetoVerticalAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalAbs", [__arg_0]);
 
-  createSVGPathSegLinetoVerticalRel_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegLinetoVerticalRel", []);
+  createSVGPathSegLinetoVerticalRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalRel", []);
 
-  createSVGPathSegLinetoVerticalRel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegLinetoVerticalRel", [__arg_0]);
+  createSVGPathSegLinetoVerticalRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegLinetoVerticalRel", [__arg_0]);
 
-  createSVGPathSegMovetoAbs_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegMovetoAbs", []);
+  createSVGPathSegMovetoAbs_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", []);
 
-  createSVGPathSegMovetoAbs_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegMovetoAbs", [__arg_0]);
+  createSVGPathSegMovetoAbs_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", [__arg_0]);
 
-  createSVGPathSegMovetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegMovetoAbs", [__arg_0, __arg_1]);
+  createSVGPathSegMovetoAbs_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoAbs", [__arg_0, __arg_1]);
 
-  createSVGPathSegMovetoRel_Callback_0_(mthis) => mthis.callMethod("createSVGPathSegMovetoRel", []);
+  createSVGPathSegMovetoRel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", []);
 
-  createSVGPathSegMovetoRel_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGPathSegMovetoRel", [__arg_0]);
+  createSVGPathSegMovetoRel_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", [__arg_0]);
 
-  createSVGPathSegMovetoRel_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createSVGPathSegMovetoRel", [__arg_0, __arg_1]);
+  createSVGPathSegMovetoRel_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPathSegMovetoRel", [__arg_0, __arg_1]);
 
-  getPathSegAtLength_Callback_0_(mthis) => mthis.callMethod("getPathSegAtLength", []);
+  getPathSegAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPathSegAtLength", []);
 
-  getPathSegAtLength_Callback_1_(mthis, __arg_0) => mthis.callMethod("getPathSegAtLength", [__arg_0]);
+  getPathSegAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPathSegAtLength", [__arg_0]);
 
-  getPointAtLength_Callback_0_(mthis) => mthis.callMethod("getPointAtLength", []);
+  getPointAtLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getPointAtLength", []);
 
-  getPointAtLength_Callback_1_(mthis, __arg_0) => mthis.callMethod("getPointAtLength", [__arg_0]);
+  getPointAtLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getPointAtLength", [__arg_0]);
 
-  getTotalLength_Callback_0_(mthis) => mthis.callMethod("getTotalLength", []);
+  getTotalLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTotalLength", []);
 
-  normalizedPathSegList_Getter_(mthis) => mthis["normalizedPathSegList"];
+  normalizedPathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "normalizedPathSegList");
 
-  pathLength_Getter_(mthis) => mthis["pathLength"];
+  pathLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathLength");
 
-  pathSegList_Getter_(mthis) => mthis["pathSegList"];
+  pathSegList_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegList");
 
 }
 
 class BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSeg();
 
-  pathSegTypeAsLetter_Getter_(mthis) => mthis["pathSegTypeAsLetter"];
+  pathSegTypeAsLetter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegTypeAsLetter");
 
-  pathSegType_Getter_(mthis) => mthis["pathSegType"];
+  pathSegType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathSegType");
 
 }
 
 class BlinkSVGPathSegArcAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegArcAbs();
 
-  angle_Getter_(mthis) => mthis["angle"];
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
 
   angle_Setter_(mthis, __arg_0) => mthis["angle"] = __arg_0;
 
-  largeArcFlag_Getter_(mthis) => mthis["largeArcFlag"];
+  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "largeArcFlag");
 
   largeArcFlag_Setter_(mthis, __arg_0) => mthis["largeArcFlag"] = __arg_0;
 
-  r1_Getter_(mthis) => mthis["r1"];
+  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r1");
 
   r1_Setter_(mthis, __arg_0) => mthis["r1"] = __arg_0;
 
-  r2_Getter_(mthis) => mthis["r2"];
+  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r2");
 
   r2_Setter_(mthis, __arg_0) => mthis["r2"] = __arg_0;
 
-  sweepFlag_Getter_(mthis) => mthis["sweepFlag"];
+  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sweepFlag");
 
   sweepFlag_Setter_(mthis, __arg_0) => mthis["sweepFlag"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12224,31 +12225,31 @@
 class BlinkSVGPathSegArcRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegArcRel();
 
-  angle_Getter_(mthis) => mthis["angle"];
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
 
   angle_Setter_(mthis, __arg_0) => mthis["angle"] = __arg_0;
 
-  largeArcFlag_Getter_(mthis) => mthis["largeArcFlag"];
+  largeArcFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "largeArcFlag");
 
   largeArcFlag_Setter_(mthis, __arg_0) => mthis["largeArcFlag"] = __arg_0;
 
-  r1_Getter_(mthis) => mthis["r1"];
+  r1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r1");
 
   r1_Setter_(mthis, __arg_0) => mthis["r1"] = __arg_0;
 
-  r2_Getter_(mthis) => mthis["r2"];
+  r2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r2");
 
   r2_Setter_(mthis, __arg_0) => mthis["r2"] = __arg_0;
 
-  sweepFlag_Getter_(mthis) => mthis["sweepFlag"];
+  sweepFlag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sweepFlag");
 
   sweepFlag_Setter_(mthis, __arg_0) => mthis["sweepFlag"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12262,27 +12263,27 @@
 class BlinkSVGPathSegCurvetoCubicAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicAbs();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
   x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
   x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
   y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
   y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12291,27 +12292,27 @@
 class BlinkSVGPathSegCurvetoCubicRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicRel();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
   x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
   x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
   y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
   y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12320,19 +12321,19 @@
 class BlinkSVGPathSegCurvetoCubicSmoothAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicSmoothAbs();
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
   x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
   y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12341,19 +12342,19 @@
 class BlinkSVGPathSegCurvetoCubicSmoothRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoCubicSmoothRel();
 
-  x2_Getter_(mthis) => mthis["x2"];
+  x2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x2");
 
   x2_Setter_(mthis, __arg_0) => mthis["x2"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y2_Getter_(mthis) => mthis["y2"];
+  y2_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y2");
 
   y2_Setter_(mthis, __arg_0) => mthis["y2"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12362,19 +12363,19 @@
 class BlinkSVGPathSegCurvetoQuadraticAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticAbs();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
   x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
   y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12383,19 +12384,19 @@
 class BlinkSVGPathSegCurvetoQuadraticRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticRel();
 
-  x1_Getter_(mthis) => mthis["x1"];
+  x1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x1");
 
   x1_Setter_(mthis, __arg_0) => mthis["x1"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y1_Getter_(mthis) => mthis["y1"];
+  y1_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y1");
 
   y1_Setter_(mthis, __arg_0) => mthis["y1"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12404,11 +12405,11 @@
 class BlinkSVGPathSegCurvetoQuadraticSmoothAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticSmoothAbs();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12417,11 +12418,11 @@
 class BlinkSVGPathSegCurvetoQuadraticSmoothRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegCurvetoQuadraticSmoothRel();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12430,11 +12431,11 @@
 class BlinkSVGPathSegLinetoAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoAbs();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12443,7 +12444,7 @@
 class BlinkSVGPathSegLinetoHorizontalAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoHorizontalAbs();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
@@ -12452,7 +12453,7 @@
 class BlinkSVGPathSegLinetoHorizontalRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoHorizontalRel();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
@@ -12461,11 +12462,11 @@
 class BlinkSVGPathSegLinetoRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoRel();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12474,7 +12475,7 @@
 class BlinkSVGPathSegLinetoVerticalAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoVerticalAbs();
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12483,7 +12484,7 @@
 class BlinkSVGPathSegLinetoVerticalRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegLinetoVerticalRel();
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12492,54 +12493,54 @@
 class BlinkSVGPathSegList {
   static final instance = new BlinkSVGPathSegList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPathSegMovetoAbs extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegMovetoAbs();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12548,11 +12549,11 @@
 class BlinkSVGPathSegMovetoRel extends BlinkSVGPathSeg {
   static final instance = new BlinkSVGPathSegMovetoRel();
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12561,50 +12562,50 @@
 class BlinkSVGPatternElement extends BlinkSVGElement {
   static final instance = new BlinkSVGPatternElement();
 
-  hasExtension_Callback_0_(mthis) => mthis.callMethod("hasExtension", []);
+  hasExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", []);
 
-  hasExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("hasExtension", [__arg_0]);
+  hasExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hasExtension", [__arg_0]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  patternContentUnits_Getter_(mthis) => mthis["patternContentUnits"];
+  patternContentUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternContentUnits");
 
-  patternTransform_Getter_(mthis) => mthis["patternTransform"];
+  patternTransform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternTransform");
 
-  patternUnits_Getter_(mthis) => mthis["patternUnits"];
+  patternUnits_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternUnits");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  requiredExtensions_Getter_(mthis) => mthis["requiredExtensions"];
+  requiredExtensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredExtensions");
 
-  requiredFeatures_Getter_(mthis) => mthis["requiredFeatures"];
+  requiredFeatures_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "requiredFeatures");
 
-  systemLanguage_Getter_(mthis) => mthis["systemLanguage"];
+  systemLanguage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "systemLanguage");
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
 class BlinkSVGPoint {
   static final instance = new BlinkSVGPoint();
 
-  matrixTransform_Callback_0_(mthis) => mthis.callMethod("matrixTransform", []);
+  matrixTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matrixTransform", []);
 
-  matrixTransform_Callback_1_(mthis, __arg_0) => mthis.callMethod("matrixTransform", [__arg_0]);
+  matrixTransform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matrixTransform", [__arg_0]);
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12613,72 +12614,72 @@
 class BlinkSVGPointList {
   static final instance = new BlinkSVGPointList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGPolygonElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPolygonElement();
 
-  animatedPoints_Getter_(mthis) => mthis["animatedPoints"];
+  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPoints");
 
-  points_Getter_(mthis) => mthis["points"];
+  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "points");
 
 }
 
 class BlinkSVGPolylineElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGPolylineElement();
 
-  animatedPoints_Getter_(mthis) => mthis["animatedPoints"];
+  animatedPoints_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animatedPoints");
 
-  points_Getter_(mthis) => mthis["points"];
+  points_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "points");
 
 }
 
 class BlinkSVGPreserveAspectRatio {
   static final instance = new BlinkSVGPreserveAspectRatio();
 
-  align_Getter_(mthis) => mthis["align"];
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
 
   align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
 
-  meetOrSlice_Getter_(mthis) => mthis["meetOrSlice"];
+  meetOrSlice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "meetOrSlice");
 
   meetOrSlice_Setter_(mthis, __arg_0) => mthis["meetOrSlice"] = __arg_0;
 
@@ -12687,36 +12688,36 @@
 class BlinkSVGRadialGradientElement extends BlinkSVGGradientElement {
   static final instance = new BlinkSVGRadialGradientElement();
 
-  cx_Getter_(mthis) => mthis["cx"];
+  cx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cx");
 
-  cy_Getter_(mthis) => mthis["cy"];
+  cy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cy");
 
-  fr_Getter_(mthis) => mthis["fr"];
+  fr_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fr");
 
-  fx_Getter_(mthis) => mthis["fx"];
+  fx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fx");
 
-  fy_Getter_(mthis) => mthis["fy"];
+  fy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fy");
 
-  r_Getter_(mthis) => mthis["r"];
+  r_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "r");
 
 }
 
 class BlinkSVGRect {
   static final instance = new BlinkSVGRect();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
   x_Setter_(mthis, __arg_0) => mthis["x"] = __arg_0;
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
   y_Setter_(mthis, __arg_0) => mthis["y"] = __arg_0;
 
@@ -12725,17 +12726,17 @@
 class BlinkSVGRectElement extends BlinkSVGGeometryElement {
   static final instance = new BlinkSVGRectElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  rx_Getter_(mthis) => mthis["rx"];
+  rx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rx");
 
-  ry_Getter_(mthis) => mthis["ry"];
+  ry_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ry");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -12747,111 +12748,111 @@
 class BlinkSVGSVGElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGSVGElement();
 
-  animationsPaused_Callback_0_(mthis) => mthis.callMethod("animationsPaused", []);
+  animationsPaused_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "animationsPaused", []);
 
-  checkEnclosure_Callback_0_(mthis) => mthis.callMethod("checkEnclosure", []);
+  checkEnclosure_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", []);
 
-  checkEnclosure_Callback_1_(mthis, __arg_0) => mthis.callMethod("checkEnclosure", [__arg_0]);
+  checkEnclosure_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", [__arg_0]);
 
-  checkEnclosure_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("checkEnclosure", [__arg_0, __arg_1]);
+  checkEnclosure_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "checkEnclosure", [__arg_0, __arg_1]);
 
-  checkIntersection_Callback_0_(mthis) => mthis.callMethod("checkIntersection", []);
+  checkIntersection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", []);
 
-  checkIntersection_Callback_1_(mthis, __arg_0) => mthis.callMethod("checkIntersection", [__arg_0]);
+  checkIntersection_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", [__arg_0]);
 
-  checkIntersection_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("checkIntersection", [__arg_0, __arg_1]);
+  checkIntersection_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "checkIntersection", [__arg_0, __arg_1]);
 
-  createSVGAngle_Callback_0_(mthis) => mthis.callMethod("createSVGAngle", []);
+  createSVGAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGAngle", []);
 
-  createSVGLength_Callback_0_(mthis) => mthis.callMethod("createSVGLength", []);
+  createSVGLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGLength", []);
 
-  createSVGMatrix_Callback_0_(mthis) => mthis.callMethod("createSVGMatrix", []);
+  createSVGMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGMatrix", []);
 
-  createSVGNumber_Callback_0_(mthis) => mthis.callMethod("createSVGNumber", []);
+  createSVGNumber_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGNumber", []);
 
-  createSVGPoint_Callback_0_(mthis) => mthis.callMethod("createSVGPoint", []);
+  createSVGPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGPoint", []);
 
-  createSVGRect_Callback_0_(mthis) => mthis.callMethod("createSVGRect", []);
+  createSVGRect_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGRect", []);
 
-  createSVGTransformFromMatrix_Callback_0_(mthis) => mthis.callMethod("createSVGTransformFromMatrix", []);
+  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", []);
 
-  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGTransformFromMatrix", [__arg_0]);
+  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", [__arg_0]);
 
-  createSVGTransform_Callback_0_(mthis) => mthis.callMethod("createSVGTransform", []);
+  createSVGTransform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransform", []);
 
-  currentScale_Getter_(mthis) => mthis["currentScale"];
+  currentScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentScale");
 
   currentScale_Setter_(mthis, __arg_0) => mthis["currentScale"] = __arg_0;
 
-  currentTranslate_Getter_(mthis) => mthis["currentTranslate"];
+  currentTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentTranslate");
 
-  currentView_Getter_(mthis) => mthis["currentView"];
+  currentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentView");
 
-  deselectAll_Callback_0_(mthis) => mthis.callMethod("deselectAll", []);
+  deselectAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deselectAll", []);
 
-  forceRedraw_Callback_0_(mthis) => mthis.callMethod("forceRedraw", []);
+  forceRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "forceRedraw", []);
 
-  getCurrentTime_Callback_0_(mthis) => mthis.callMethod("getCurrentTime", []);
+  getCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCurrentTime", []);
 
-  getElementById_Callback_0_(mthis) => mthis.callMethod("getElementById", []);
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
 
-  getElementById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementById", [__arg_0]);
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
 
-  getEnclosureList_Callback_0_(mthis) => mthis.callMethod("getEnclosureList", []);
+  getEnclosureList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", []);
 
-  getEnclosureList_Callback_1_(mthis, __arg_0) => mthis.callMethod("getEnclosureList", [__arg_0]);
+  getEnclosureList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", [__arg_0]);
 
-  getEnclosureList_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getEnclosureList", [__arg_0, __arg_1]);
+  getEnclosureList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getEnclosureList", [__arg_0, __arg_1]);
 
-  getIntersectionList_Callback_0_(mthis) => mthis.callMethod("getIntersectionList", []);
+  getIntersectionList_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", []);
 
-  getIntersectionList_Callback_1_(mthis, __arg_0) => mthis.callMethod("getIntersectionList", [__arg_0]);
+  getIntersectionList_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", [__arg_0]);
 
-  getIntersectionList_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getIntersectionList", [__arg_0, __arg_1]);
+  getIntersectionList_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getIntersectionList", [__arg_0, __arg_1]);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  pauseAnimations_Callback_0_(mthis) => mthis.callMethod("pauseAnimations", []);
+  pauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pauseAnimations", []);
 
-  pixelUnitToMillimeterX_Getter_(mthis) => mthis["pixelUnitToMillimeterX"];
+  pixelUnitToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelUnitToMillimeterX");
 
-  pixelUnitToMillimeterY_Getter_(mthis) => mthis["pixelUnitToMillimeterY"];
+  pixelUnitToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelUnitToMillimeterY");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  screenPixelToMillimeterX_Getter_(mthis) => mthis["screenPixelToMillimeterX"];
+  screenPixelToMillimeterX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenPixelToMillimeterX");
 
-  screenPixelToMillimeterY_Getter_(mthis) => mthis["screenPixelToMillimeterY"];
+  screenPixelToMillimeterY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenPixelToMillimeterY");
 
-  setCurrentTime_Callback_0_(mthis) => mthis.callMethod("setCurrentTime", []);
+  setCurrentTime_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setCurrentTime", []);
 
-  setCurrentTime_Callback_1_(mthis, __arg_0) => mthis.callMethod("setCurrentTime", [__arg_0]);
+  setCurrentTime_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setCurrentTime", [__arg_0]);
 
-  suspendRedraw_Callback_0_(mthis) => mthis.callMethod("suspendRedraw", []);
+  suspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "suspendRedraw", []);
 
-  suspendRedraw_Callback_1_(mthis, __arg_0) => mthis.callMethod("suspendRedraw", [__arg_0]);
+  suspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "suspendRedraw", [__arg_0]);
 
-  unpauseAnimations_Callback_0_(mthis) => mthis.callMethod("unpauseAnimations", []);
+  unpauseAnimations_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unpauseAnimations", []);
 
-  unsuspendRedrawAll_Callback_0_(mthis) => mthis.callMethod("unsuspendRedrawAll", []);
+  unsuspendRedrawAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedrawAll", []);
 
-  unsuspendRedraw_Callback_0_(mthis) => mthis.callMethod("unsuspendRedraw", []);
+  unsuspendRedraw_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedraw", []);
 
-  unsuspendRedraw_Callback_1_(mthis, __arg_0) => mthis.callMethod("unsuspendRedraw", [__arg_0]);
+  unsuspendRedraw_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "unsuspendRedraw", [__arg_0]);
 
-  useCurrentView_Getter_(mthis) => mthis["useCurrentView"];
+  useCurrentView_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "useCurrentView");
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
-  viewport_Getter_(mthis) => mthis["viewport"];
+  viewport_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewport");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
-  zoomAndPan_Getter_(mthis) => mthis["zoomAndPan"];
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
 
   zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
 
@@ -12860,9 +12861,9 @@
 class BlinkSVGScriptElement extends BlinkSVGElement {
   static final instance = new BlinkSVGScriptElement();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -12876,71 +12877,71 @@
 class BlinkSVGStopElement extends BlinkSVGElement {
   static final instance = new BlinkSVGStopElement();
 
-  offset_Getter_(mthis) => mthis["offset"];
+  offset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offset");
 
 }
 
 class BlinkSVGStringList {
   static final instance = new BlinkSVGStringList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkSVGStyleElement extends BlinkSVGElement {
   static final instance = new BlinkSVGStyleElement();
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
   media_Setter_(mthis, __arg_0) => mthis["media"] = __arg_0;
 
-  sheet_Getter_(mthis) => mthis["sheet"];
+  sheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sheet");
 
-  title_Getter_(mthis) => mthis["title"];
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
 
   title_Setter_(mthis, __arg_0) => mthis["title"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
   type_Setter_(mthis, __arg_0) => mthis["type"] = __arg_0;
 
@@ -12954,9 +12955,9 @@
 class BlinkSVGSymbolElement extends BlinkSVGElement {
   static final instance = new BlinkSVGSymbolElement();
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
 }
 
@@ -12968,45 +12969,45 @@
 class BlinkSVGTextContentElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGTextContentElement();
 
-  getCharNumAtPosition_Callback_0_(mthis) => mthis.callMethod("getCharNumAtPosition", []);
+  getCharNumAtPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCharNumAtPosition", []);
 
-  getCharNumAtPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("getCharNumAtPosition", [__arg_0]);
+  getCharNumAtPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCharNumAtPosition", [__arg_0]);
 
-  getComputedTextLength_Callback_0_(mthis) => mthis.callMethod("getComputedTextLength", []);
+  getComputedTextLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getComputedTextLength", []);
 
-  getEndPositionOfChar_Callback_0_(mthis) => mthis.callMethod("getEndPositionOfChar", []);
+  getEndPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getEndPositionOfChar", []);
 
-  getEndPositionOfChar_Callback_1_(mthis, __arg_0) => mthis.callMethod("getEndPositionOfChar", [__arg_0]);
+  getEndPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getEndPositionOfChar", [__arg_0]);
 
-  getExtentOfChar_Callback_0_(mthis) => mthis.callMethod("getExtentOfChar", []);
+  getExtentOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getExtentOfChar", []);
 
-  getExtentOfChar_Callback_1_(mthis, __arg_0) => mthis.callMethod("getExtentOfChar", [__arg_0]);
+  getExtentOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getExtentOfChar", [__arg_0]);
 
-  getNumberOfChars_Callback_0_(mthis) => mthis.callMethod("getNumberOfChars", []);
+  getNumberOfChars_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getNumberOfChars", []);
 
-  getRotationOfChar_Callback_0_(mthis) => mthis.callMethod("getRotationOfChar", []);
+  getRotationOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRotationOfChar", []);
 
-  getRotationOfChar_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRotationOfChar", [__arg_0]);
+  getRotationOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRotationOfChar", [__arg_0]);
 
-  getStartPositionOfChar_Callback_0_(mthis) => mthis.callMethod("getStartPositionOfChar", []);
+  getStartPositionOfChar_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getStartPositionOfChar", []);
 
-  getStartPositionOfChar_Callback_1_(mthis, __arg_0) => mthis.callMethod("getStartPositionOfChar", [__arg_0]);
+  getStartPositionOfChar_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getStartPositionOfChar", [__arg_0]);
 
-  getSubStringLength_Callback_0_(mthis) => mthis.callMethod("getSubStringLength", []);
+  getSubStringLength_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", []);
 
-  getSubStringLength_Callback_1_(mthis, __arg_0) => mthis.callMethod("getSubStringLength", [__arg_0]);
+  getSubStringLength_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", [__arg_0]);
 
-  getSubStringLength_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getSubStringLength", [__arg_0, __arg_1]);
+  getSubStringLength_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getSubStringLength", [__arg_0, __arg_1]);
 
-  lengthAdjust_Getter_(mthis) => mthis["lengthAdjust"];
+  lengthAdjust_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lengthAdjust");
 
-  selectSubString_Callback_0_(mthis) => mthis.callMethod("selectSubString", []);
+  selectSubString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", []);
 
-  selectSubString_Callback_1_(mthis, __arg_0) => mthis.callMethod("selectSubString", [__arg_0]);
+  selectSubString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", [__arg_0]);
 
-  selectSubString_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("selectSubString", [__arg_0, __arg_1]);
+  selectSubString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "selectSubString", [__arg_0, __arg_1]);
 
-  textLength_Getter_(mthis) => mthis["textLength"];
+  textLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "textLength");
 
 }
 
@@ -13018,28 +13019,28 @@
 class BlinkSVGTextPathElement extends BlinkSVGTextContentElement {
   static final instance = new BlinkSVGTextPathElement();
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  method_Getter_(mthis) => mthis["method"];
+  method_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "method");
 
-  spacing_Getter_(mthis) => mthis["spacing"];
+  spacing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "spacing");
 
-  startOffset_Getter_(mthis) => mthis["startOffset"];
+  startOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startOffset");
 
 }
 
 class BlinkSVGTextPositioningElement extends BlinkSVGTextContentElement {
   static final instance = new BlinkSVGTextPositioningElement();
 
-  dx_Getter_(mthis) => mthis["dx"];
+  dx_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dx");
 
-  dy_Getter_(mthis) => mthis["dy"];
+  dy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dy");
 
-  rotate_Getter_(mthis) => mthis["rotate"];
+  rotate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rotate");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -13051,90 +13052,90 @@
 class BlinkSVGTransform {
   static final instance = new BlinkSVGTransform();
 
-  angle_Getter_(mthis) => mthis["angle"];
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
 
-  matrix_Getter_(mthis) => mthis["matrix"];
+  matrix_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "matrix");
 
-  setMatrix_Callback_0_(mthis) => mthis.callMethod("setMatrix", []);
+  setMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMatrix", []);
 
-  setMatrix_Callback_1_(mthis, __arg_0) => mthis.callMethod("setMatrix", [__arg_0]);
+  setMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMatrix", [__arg_0]);
 
-  setRotate_Callback_1_(mthis, __arg_0) => mthis.callMethod("setRotate", [__arg_0]);
+  setRotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0]);
 
-  setRotate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setRotate", [__arg_0, __arg_1]);
+  setRotate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0, __arg_1]);
 
-  setRotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setRotate", [__arg_0, __arg_1, __arg_2]);
+  setRotate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setRotate", [__arg_0, __arg_1, __arg_2]);
 
-  setScale_Callback_0_(mthis) => mthis.callMethod("setScale", []);
+  setScale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setScale", []);
 
-  setScale_Callback_1_(mthis, __arg_0) => mthis.callMethod("setScale", [__arg_0]);
+  setScale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setScale", [__arg_0]);
 
-  setScale_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setScale", [__arg_0, __arg_1]);
+  setScale_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setScale", [__arg_0, __arg_1]);
 
-  setSkewX_Callback_0_(mthis) => mthis.callMethod("setSkewX", []);
+  setSkewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSkewX", []);
 
-  setSkewX_Callback_1_(mthis, __arg_0) => mthis.callMethod("setSkewX", [__arg_0]);
+  setSkewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSkewX", [__arg_0]);
 
-  setSkewY_Callback_0_(mthis) => mthis.callMethod("setSkewY", []);
+  setSkewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setSkewY", []);
 
-  setSkewY_Callback_1_(mthis, __arg_0) => mthis.callMethod("setSkewY", [__arg_0]);
+  setSkewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setSkewY", [__arg_0]);
 
-  setTranslate_Callback_0_(mthis) => mthis.callMethod("setTranslate", []);
+  setTranslate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", []);
 
-  setTranslate_Callback_1_(mthis, __arg_0) => mthis.callMethod("setTranslate", [__arg_0]);
+  setTranslate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", [__arg_0]);
 
-  setTranslate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setTranslate", [__arg_0, __arg_1]);
+  setTranslate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTranslate", [__arg_0, __arg_1]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkSVGTransformList {
   static final instance = new BlinkSVGTransformList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  appendItem_Callback_0_(mthis) => mthis.callMethod("appendItem", []);
+  appendItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", []);
 
-  appendItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendItem", [__arg_0]);
+  appendItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendItem", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  consolidate_Callback_0_(mthis) => mthis.callMethod("consolidate", []);
+  consolidate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "consolidate", []);
 
-  createSVGTransformFromMatrix_Callback_0_(mthis) => mthis.callMethod("createSVGTransformFromMatrix", []);
+  createSVGTransformFromMatrix_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", []);
 
-  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => mthis.callMethod("createSVGTransformFromMatrix", [__arg_0]);
+  createSVGTransformFromMatrix_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createSVGTransformFromMatrix", [__arg_0]);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  initialize_Callback_0_(mthis) => mthis.callMethod("initialize", []);
+  initialize_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initialize", []);
 
-  initialize_Callback_1_(mthis, __arg_0) => mthis.callMethod("initialize", [__arg_0]);
+  initialize_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initialize", [__arg_0]);
 
-  insertItemBefore_Callback_0_(mthis) => mthis.callMethod("insertItemBefore", []);
+  insertItemBefore_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", []);
 
-  insertItemBefore_Callback_1_(mthis, __arg_0) => mthis.callMethod("insertItemBefore", [__arg_0]);
+  insertItemBefore_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0]);
 
-  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("insertItemBefore", [__arg_0, __arg_1]);
+  insertItemBefore_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "insertItemBefore", [__arg_0, __arg_1]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  numberOfItems_Getter_(mthis) => mthis["numberOfItems"];
+  numberOfItems_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberOfItems");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  replaceItem_Callback_0_(mthis) => mthis.callMethod("replaceItem", []);
+  replaceItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", []);
 
-  replaceItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("replaceItem", [__arg_0, __arg_1]);
+  replaceItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "replaceItem", [__arg_0, __arg_1]);
 
 }
 
@@ -13146,15 +13147,15 @@
 class BlinkSVGUseElement extends BlinkSVGGraphicsElement {
   static final instance = new BlinkSVGUseElement();
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
-  x_Getter_(mthis) => mthis["x"];
+  x_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "x");
 
-  y_Getter_(mthis) => mthis["y"];
+  y_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "y");
 
 }
 
@@ -13166,13 +13167,13 @@
 class BlinkSVGViewElement extends BlinkSVGElement {
   static final instance = new BlinkSVGViewElement();
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
-  viewTarget_Getter_(mthis) => mthis["viewTarget"];
+  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTarget");
 
-  zoomAndPan_Getter_(mthis) => mthis["zoomAndPan"];
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
 
   zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
 
@@ -13181,23 +13182,23 @@
 class BlinkSVGViewSpec {
   static final instance = new BlinkSVGViewSpec();
 
-  preserveAspectRatioString_Getter_(mthis) => mthis["preserveAspectRatioString"];
+  preserveAspectRatioString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatioString");
 
-  preserveAspectRatio_Getter_(mthis) => mthis["preserveAspectRatio"];
+  preserveAspectRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveAspectRatio");
 
-  transformString_Getter_(mthis) => mthis["transformString"];
+  transformString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transformString");
 
-  transform_Getter_(mthis) => mthis["transform"];
+  transform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transform");
 
-  viewBoxString_Getter_(mthis) => mthis["viewBoxString"];
+  viewBoxString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBoxString");
 
-  viewBox_Getter_(mthis) => mthis["viewBox"];
+  viewBox_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewBox");
 
-  viewTargetString_Getter_(mthis) => mthis["viewTargetString"];
+  viewTargetString_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTargetString");
 
-  viewTarget_Getter_(mthis) => mthis["viewTarget"];
+  viewTarget_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewTarget");
 
-  zoomAndPan_Getter_(mthis) => mthis["zoomAndPan"];
+  zoomAndPan_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomAndPan");
 
   zoomAndPan_Setter_(mthis, __arg_0) => mthis["zoomAndPan"] = __arg_0;
 
@@ -13206,387 +13207,387 @@
 class BlinkSVGZoomEvent extends BlinkUIEvent {
   static final instance = new BlinkSVGZoomEvent();
 
-  newScale_Getter_(mthis) => mthis["newScale"];
+  newScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newScale");
 
-  newTranslate_Getter_(mthis) => mthis["newTranslate"];
+  newTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newTranslate");
 
-  previousScale_Getter_(mthis) => mthis["previousScale"];
+  previousScale_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousScale");
 
-  previousTranslate_Getter_(mthis) => mthis["previousTranslate"];
+  previousTranslate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "previousTranslate");
 
-  zoomRectScreen_Getter_(mthis) => mthis["zoomRectScreen"];
+  zoomRectScreen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "zoomRectScreen");
 
 }
 
 class BlinkScreen {
   static final instance = new BlinkScreen();
 
-  availHeight_Getter_(mthis) => mthis["availHeight"];
+  availHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availHeight");
 
-  availLeft_Getter_(mthis) => mthis["availLeft"];
+  availLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availLeft");
 
-  availTop_Getter_(mthis) => mthis["availTop"];
+  availTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availTop");
 
-  availWidth_Getter_(mthis) => mthis["availWidth"];
+  availWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "availWidth");
 
-  colorDepth_Getter_(mthis) => mthis["colorDepth"];
+  colorDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "colorDepth");
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
-  orientation_Getter_(mthis) => mthis["orientation"];
+  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientation");
 
-  pixelDepth_Getter_(mthis) => mthis["pixelDepth"];
+  pixelDepth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pixelDepth");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
 }
 
 class BlinkScreenOrientation extends BlinkEventTarget {
   static final instance = new BlinkScreenOrientation();
 
-  angle_Getter_(mthis) => mthis["angle"];
+  angle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "angle");
 
-  lock_Callback_0_(mthis) => mthis.callMethod("lock", []);
+  lock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lock", []);
 
-  lock_Callback_1_(mthis, __arg_0) => mthis.callMethod("lock", [__arg_0]);
+  lock_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lock", [__arg_0]);
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
-  unlock_Callback_0_(mthis) => mthis.callMethod("unlock", []);
+  unlock_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unlock", []);
 
 }
 
 class BlinkScriptProcessorNode extends BlinkAudioNode {
   static final instance = new BlinkScriptProcessorNode();
 
-  bufferSize_Getter_(mthis) => mthis["bufferSize"];
+  bufferSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferSize");
 
-  onaudioprocess_Getter_(mthis) => mthis["onaudioprocess"];
+  onaudioprocess_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudioprocess");
 
   onaudioprocess_Setter_(mthis, __arg_0) => mthis["onaudioprocess"] = __arg_0;
 
-  setEventListener_Callback_0_(mthis) => mthis.callMethod("setEventListener", []);
+  setEventListener_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setEventListener", []);
 
-  setEventListener_Callback_1_(mthis, __arg_0) => mthis.callMethod("setEventListener", [__arg_0]);
+  setEventListener_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setEventListener", [__arg_0]);
 
 }
 
 class BlinkSecurityPolicyViolationEvent extends BlinkEvent {
   static final instance = new BlinkSecurityPolicyViolationEvent();
 
-  blockedURI_Getter_(mthis) => mthis["blockedURI"];
+  blockedURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "blockedURI");
 
-  columnNumber_Getter_(mthis) => mthis["columnNumber"];
+  columnNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "columnNumber");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["SecurityPolicyViolationEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SecurityPolicyViolationEvent"), [__arg_0, __arg_1]);
 
-  documentURI_Getter_(mthis) => mthis["documentURI"];
+  documentURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "documentURI");
 
-  effectiveDirective_Getter_(mthis) => mthis["effectiveDirective"];
+  effectiveDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "effectiveDirective");
 
-  lineNumber_Getter_(mthis) => mthis["lineNumber"];
+  lineNumber_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lineNumber");
 
-  originalPolicy_Getter_(mthis) => mthis["originalPolicy"];
+  originalPolicy_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "originalPolicy");
 
-  referrer_Getter_(mthis) => mthis["referrer"];
+  referrer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "referrer");
 
-  sourceFile_Getter_(mthis) => mthis["sourceFile"];
+  sourceFile_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sourceFile");
 
-  statusCode_Getter_(mthis) => mthis["statusCode"];
+  statusCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusCode");
 
-  violatedDirective_Getter_(mthis) => mthis["violatedDirective"];
+  violatedDirective_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "violatedDirective");
 
 }
 
 class BlinkSelection {
   static final instance = new BlinkSelection();
 
-  addRange_Callback_0_(mthis) => mthis.callMethod("addRange", []);
+  addRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRange", []);
 
-  addRange_Callback_1_(mthis, __arg_0) => mthis.callMethod("addRange", [__arg_0]);
+  addRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRange", [__arg_0]);
 
-  anchorNode_Getter_(mthis) => mthis["anchorNode"];
+  anchorNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchorNode");
 
-  anchorOffset_Getter_(mthis) => mthis["anchorOffset"];
+  anchorOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "anchorOffset");
 
-  baseNode_Getter_(mthis) => mthis["baseNode"];
+  baseNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseNode");
 
-  baseOffset_Getter_(mthis) => mthis["baseOffset"];
+  baseOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "baseOffset");
 
-  collapseToEnd_Callback_0_(mthis) => mthis.callMethod("collapseToEnd", []);
+  collapseToEnd_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapseToEnd", []);
 
-  collapseToStart_Callback_0_(mthis) => mthis.callMethod("collapseToStart", []);
+  collapseToStart_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapseToStart", []);
 
-  collapse_Callback_0_(mthis) => mthis.callMethod("collapse", []);
+  collapse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "collapse", []);
 
-  collapse_Callback_1_(mthis, __arg_0) => mthis.callMethod("collapse", [__arg_0]);
+  collapse_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0]);
 
-  collapse_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("collapse", [__arg_0, __arg_1]);
+  collapse_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "collapse", [__arg_0, __arg_1]);
 
-  containsNode_Callback_0_(mthis) => mthis.callMethod("containsNode", []);
+  containsNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", []);
 
-  containsNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("containsNode", [__arg_0]);
+  containsNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", [__arg_0]);
 
-  containsNode_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("containsNode", [__arg_0, __arg_1]);
+  containsNode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "containsNode", [__arg_0, __arg_1]);
 
-  deleteFromDocument_Callback_0_(mthis) => mthis.callMethod("deleteFromDocument", []);
+  deleteFromDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteFromDocument", []);
 
-  empty_Callback_0_(mthis) => mthis.callMethod("empty", []);
+  empty_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "empty", []);
 
-  extend_Callback_0_(mthis) => mthis.callMethod("extend", []);
+  extend_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "extend", []);
 
-  extend_Callback_1_(mthis, __arg_0) => mthis.callMethod("extend", [__arg_0]);
+  extend_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "extend", [__arg_0]);
 
-  extend_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("extend", [__arg_0, __arg_1]);
+  extend_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "extend", [__arg_0, __arg_1]);
 
-  extentNode_Getter_(mthis) => mthis["extentNode"];
+  extentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extentNode");
 
-  extentOffset_Getter_(mthis) => mthis["extentOffset"];
+  extentOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extentOffset");
 
-  focusNode_Getter_(mthis) => mthis["focusNode"];
+  focusNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "focusNode");
 
-  focusOffset_Getter_(mthis) => mthis["focusOffset"];
+  focusOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "focusOffset");
 
-  getRangeAt_Callback_0_(mthis) => mthis.callMethod("getRangeAt", []);
+  getRangeAt_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRangeAt", []);
 
-  getRangeAt_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRangeAt", [__arg_0]);
+  getRangeAt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRangeAt", [__arg_0]);
 
-  isCollapsed_Getter_(mthis) => mthis["isCollapsed"];
+  isCollapsed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isCollapsed");
 
-  modify_Callback_0_(mthis) => mthis.callMethod("modify", []);
+  modify_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "modify", []);
 
-  modify_Callback_1_(mthis, __arg_0) => mthis.callMethod("modify", [__arg_0]);
+  modify_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0]);
 
-  modify_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("modify", [__arg_0, __arg_1]);
+  modify_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0, __arg_1]);
 
-  modify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("modify", [__arg_0, __arg_1, __arg_2]);
+  modify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "modify", [__arg_0, __arg_1, __arg_2]);
 
-  rangeCount_Getter_(mthis) => mthis["rangeCount"];
+  rangeCount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeCount");
 
-  removeAllRanges_Callback_0_(mthis) => mthis.callMethod("removeAllRanges", []);
+  removeAllRanges_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeAllRanges", []);
 
-  selectAllChildren_Callback_0_(mthis) => mthis.callMethod("selectAllChildren", []);
+  selectAllChildren_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "selectAllChildren", []);
 
-  selectAllChildren_Callback_1_(mthis, __arg_0) => mthis.callMethod("selectAllChildren", [__arg_0]);
+  selectAllChildren_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "selectAllChildren", [__arg_0]);
 
-  setBaseAndExtent_Callback_0_(mthis) => mthis.callMethod("setBaseAndExtent", []);
+  setBaseAndExtent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", []);
 
-  setBaseAndExtent_Callback_1_(mthis, __arg_0) => mthis.callMethod("setBaseAndExtent", [__arg_0]);
+  setBaseAndExtent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0]);
 
-  setBaseAndExtent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setBaseAndExtent", [__arg_0, __arg_1]);
+  setBaseAndExtent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0, __arg_1]);
 
-  setBaseAndExtent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setBaseAndExtent", [__arg_0, __arg_1, __arg_2]);
+  setBaseAndExtent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setBaseAndExtent", [__arg_0, __arg_1, __arg_2]);
 
-  setBaseAndExtent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("setBaseAndExtent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("setPosition", []);
+  setPosition_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", []);
 
-  setPosition_Callback_1_(mthis, __arg_0) => mthis.callMethod("setPosition", [__arg_0]);
+  setPosition_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0]);
 
-  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setPosition", [__arg_0, __arg_1]);
+  setPosition_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setPosition", [__arg_0, __arg_1]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkServiceWorker extends BlinkEventTarget {
   static final instance = new BlinkServiceWorker();
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onstatechange_Getter_(mthis) => mthis["onstatechange"];
+  onstatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstatechange");
 
   onstatechange_Setter_(mthis, __arg_0) => mthis["onstatechange"] = __arg_0;
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
 
-  scriptURL_Getter_(mthis) => mthis["scriptURL"];
+  scriptURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scriptURL");
 
-  state_Getter_(mthis) => mthis["state"];
+  state_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "state");
 
-  terminate_Callback_0_(mthis) => mthis.callMethod("terminate", []);
+  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "terminate", []);
 
 }
 
 class BlinkServiceWorkerClient {
   static final instance = new BlinkServiceWorkerClient();
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("getAll", []);
+  getAll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAll", []);
 
-  getAll_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAll", [__arg_0]);
+  getAll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAll", [__arg_0]);
 
 }
 
 class BlinkServiceWorkerContainer {
   static final instance = new BlinkServiceWorkerContainer();
 
-  controller_Getter_(mthis) => mthis["controller"];
+  controller_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "controller");
 
-  getRegistration_Callback_0_(mthis) => mthis.callMethod("getRegistration", []);
+  getRegistration_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegistration", []);
 
-  getRegistration_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRegistration", [__arg_0]);
+  getRegistration_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRegistration", [__arg_0]);
 
-  ready_Getter_(mthis) => mthis["ready"];
+  ready_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ready");
 
-  register_Callback_0_(mthis) => mthis.callMethod("register", []);
+  register_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "register", []);
 
-  register_Callback_1_(mthis, __arg_0) => mthis.callMethod("register", [__arg_0]);
+  register_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0]);
 
-  register_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("register", [__arg_0, __arg_1]);
+  register_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "register", [__arg_0, __arg_1]);
 
 }
 
 class BlinkServiceWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkServiceWorkerGlobalScope();
 
-  caches_Getter_(mthis) => mthis["caches"];
+  caches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "caches");
 
-  clients_Getter_(mthis) => mthis["clients"];
+  clients_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clients");
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  fetch_Callback_0_(mthis) => mthis.callMethod("fetch", []);
+  fetch_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "fetch", []);
 
-  fetch_Callback_1_(mthis, __arg_0) => mthis.callMethod("fetch", [__arg_0]);
+  fetch_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "fetch", [__arg_0]);
 
-  fetch_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("fetch", [__arg_0, __arg_1]);
+  fetch_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "fetch", [__arg_0, __arg_1]);
 
-  onactivate_Getter_(mthis) => mthis["onactivate"];
+  onactivate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onactivate");
 
   onactivate_Setter_(mthis, __arg_0) => mthis["onactivate"] = __arg_0;
 
-  onfetch_Getter_(mthis) => mthis["onfetch"];
+  onfetch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfetch");
 
   onfetch_Setter_(mthis, __arg_0) => mthis["onfetch"] = __arg_0;
 
-  oninstall_Getter_(mthis) => mthis["oninstall"];
+  oninstall_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninstall");
 
   oninstall_Setter_(mthis, __arg_0) => mthis["oninstall"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onpush_Getter_(mthis) => mthis["onpush"];
+  onpush_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpush");
 
   onpush_Setter_(mthis, __arg_0) => mthis["onpush"] = __arg_0;
 
-  onsync_Getter_(mthis) => mthis["onsync"];
+  onsync_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsync");
 
   onsync_Setter_(mthis, __arg_0) => mthis["onsync"] = __arg_0;
 
-  scope_Getter_(mthis) => mthis["scope"];
+  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scope");
 
 }
 
 class BlinkServiceWorkerRegistration extends BlinkEventTarget {
   static final instance = new BlinkServiceWorkerRegistration();
 
-  active_Getter_(mthis) => mthis["active"];
+  active_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "active");
 
-  installing_Getter_(mthis) => mthis["installing"];
+  installing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "installing");
 
-  onupdatefound_Getter_(mthis) => mthis["onupdatefound"];
+  onupdatefound_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onupdatefound");
 
   onupdatefound_Setter_(mthis, __arg_0) => mthis["onupdatefound"] = __arg_0;
 
-  scope_Getter_(mthis) => mthis["scope"];
+  scope_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scope");
 
-  unregister_Callback_0_(mthis) => mthis.callMethod("unregister", []);
+  unregister_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "unregister", []);
 
-  waiting_Getter_(mthis) => mthis["waiting"];
+  waiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "waiting");
 
 }
 
 class BlinkShadowRoot extends BlinkDocumentFragment {
   static final instance = new BlinkShadowRoot();
 
-  activeElement_Getter_(mthis) => mthis["activeElement"];
+  activeElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeElement");
 
-  cloneNode_Callback_0_(mthis) => mthis.callMethod("cloneNode", []);
+  cloneNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", []);
 
-  cloneNode_Callback_1_(mthis, __arg_0) => mthis.callMethod("cloneNode", [__arg_0]);
+  cloneNode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cloneNode", [__arg_0]);
 
-  elementFromPoint_Callback_0_(mthis) => mthis.callMethod("elementFromPoint", []);
+  elementFromPoint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", []);
 
-  elementFromPoint_Callback_1_(mthis, __arg_0) => mthis.callMethod("elementFromPoint", [__arg_0]);
+  elementFromPoint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0]);
 
-  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("elementFromPoint", [__arg_0, __arg_1]);
+  elementFromPoint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "elementFromPoint", [__arg_0, __arg_1]);
 
-  getElementById_Callback_0_(mthis) => mthis.callMethod("getElementById", []);
+  getElementById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", []);
 
-  getElementById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementById", [__arg_0]);
+  getElementById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementById", [__arg_0]);
 
-  getElementsByClassName_Callback_0_(mthis) => mthis.callMethod("getElementsByClassName", []);
+  getElementsByClassName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", []);
 
-  getElementsByClassName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByClassName", [__arg_0]);
+  getElementsByClassName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByClassName", [__arg_0]);
 
-  getElementsByTagName_Callback_0_(mthis) => mthis.callMethod("getElementsByTagName", []);
+  getElementsByTagName_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", []);
 
-  getElementsByTagName_Callback_1_(mthis, __arg_0) => mthis.callMethod("getElementsByTagName", [__arg_0]);
+  getElementsByTagName_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getElementsByTagName", [__arg_0]);
 
-  getSelection_Callback_0_(mthis) => mthis.callMethod("getSelection", []);
+  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelection", []);
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
-  innerHTML_Getter_(mthis) => mthis["innerHTML"];
+  innerHTML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHTML");
 
   innerHTML_Setter_(mthis, __arg_0) => mthis["innerHTML"] = __arg_0;
 
-  olderShadowRoot_Getter_(mthis) => mthis["olderShadowRoot"];
+  olderShadowRoot_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "olderShadowRoot");
 
-  styleSheets_Getter_(mthis) => mthis["styleSheets"];
+  styleSheets_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleSheets");
 
 }
 
 class BlinkSharedWorker extends BlinkEventTarget {
   static final instance = new BlinkSharedWorker();
 
-  constructorCallback_0_() => new js.JsObject(js.context["SharedWorker"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["SharedWorker"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["SharedWorker"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SharedWorker"), [__arg_0, __arg_1]);
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
-  workerStart_Getter_(mthis) => mthis["workerStart"];
+  workerStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "workerStart");
 
 }
 
 class BlinkSharedWorkerGlobalScope extends BlinkWorkerGlobalScope {
   static final instance = new BlinkSharedWorkerGlobalScope();
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  onconnect_Getter_(mthis) => mthis["onconnect"];
+  onconnect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onconnect");
 
   onconnect_Setter_(mthis, __arg_0) => mthis["onconnect"] = __arg_0;
 
@@ -13595,82 +13596,82 @@
 class BlinkSourceBuffer extends BlinkEventTarget {
   static final instance = new BlinkSourceBuffer();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  appendBuffer_Callback_0_(mthis) => mthis.callMethod("appendBuffer", []);
+  appendBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendBuffer", []);
 
-  appendBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendBuffer", [__arg_0]);
+  appendBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendBuffer", [__arg_0]);
 
-  appendStream_Callback_0_(mthis) => mthis.callMethod("appendStream", []);
+  appendStream_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", []);
 
-  appendStream_Callback_1_(mthis, __arg_0) => mthis.callMethod("appendStream", [__arg_0]);
+  appendStream_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", [__arg_0]);
 
-  appendStream_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("appendStream", [__arg_0, __arg_1]);
+  appendStream_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "appendStream", [__arg_0, __arg_1]);
 
-  appendWindowEnd_Getter_(mthis) => mthis["appendWindowEnd"];
+  appendWindowEnd_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appendWindowEnd");
 
   appendWindowEnd_Setter_(mthis, __arg_0) => mthis["appendWindowEnd"] = __arg_0;
 
-  appendWindowStart_Getter_(mthis) => mthis["appendWindowStart"];
+  appendWindowStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appendWindowStart");
 
   appendWindowStart_Setter_(mthis, __arg_0) => mthis["appendWindowStart"] = __arg_0;
 
-  buffered_Getter_(mthis) => mthis["buffered"];
+  buffered_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buffered");
 
-  mode_Getter_(mthis) => mthis["mode"];
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
 
   mode_Setter_(mthis, __arg_0) => mthis["mode"] = __arg_0;
 
-  remove_Callback_0_(mthis) => mthis.callMethod("remove", []);
+  remove_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "remove", []);
 
-  remove_Callback_1_(mthis, __arg_0) => mthis.callMethod("remove", [__arg_0]);
+  remove_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0]);
 
-  remove_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("remove", [__arg_0, __arg_1]);
+  remove_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "remove", [__arg_0, __arg_1]);
 
-  timestampOffset_Getter_(mthis) => mthis["timestampOffset"];
+  timestampOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestampOffset");
 
   timestampOffset_Setter_(mthis, __arg_0) => mthis["timestampOffset"] = __arg_0;
 
-  updating_Getter_(mthis) => mthis["updating"];
+  updating_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "updating");
 
 }
 
 class BlinkSourceBufferList extends BlinkEventTarget {
   static final instance = new BlinkSourceBufferList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSourceInfo {
   static final instance = new BlinkSourceInfo();
 
-  facing_Getter_(mthis) => mthis["facing"];
+  facing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "facing");
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
 }
 
 class BlinkSpeechGrammar {
   static final instance = new BlinkSpeechGrammar();
 
-  constructorCallback_0_() => new js.JsObject(js.context["SpeechGrammar"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechGrammar"), []);
 
-  src_Getter_(mthis) => mthis["src"];
+  src_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "src");
 
   src_Setter_(mthis, __arg_0) => mthis["src"] = __arg_0;
 
-  weight_Getter_(mthis) => mthis["weight"];
+  weight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "weight");
 
   weight_Setter_(mthis, __arg_0) => mthis["weight"] = __arg_0;
 
@@ -13679,264 +13680,264 @@
 class BlinkSpeechGrammarList {
   static final instance = new BlinkSpeechGrammarList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  addFromString_Callback_0_(mthis) => mthis.callMethod("addFromString", []);
+  addFromString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", []);
 
-  addFromString_Callback_1_(mthis, __arg_0) => mthis.callMethod("addFromString", [__arg_0]);
+  addFromString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", [__arg_0]);
 
-  addFromString_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addFromString", [__arg_0, __arg_1]);
+  addFromString_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addFromString", [__arg_0, __arg_1]);
 
-  addFromUri_Callback_0_(mthis) => mthis.callMethod("addFromUri", []);
+  addFromUri_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", []);
 
-  addFromUri_Callback_1_(mthis, __arg_0) => mthis.callMethod("addFromUri", [__arg_0]);
+  addFromUri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", [__arg_0]);
 
-  addFromUri_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("addFromUri", [__arg_0, __arg_1]);
+  addFromUri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "addFromUri", [__arg_0, __arg_1]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["SpeechGrammarList"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechGrammarList"), []);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSpeechRecognition extends BlinkEventTarget {
   static final instance = new BlinkSpeechRecognition();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["SpeechRecognition"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "webkitSpeechRecognition"), []);
 
-  continuous_Getter_(mthis) => mthis["continuous"];
+  continuous_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "continuous");
 
   continuous_Setter_(mthis, __arg_0) => mthis["continuous"] = __arg_0;
 
-  grammars_Getter_(mthis) => mthis["grammars"];
+  grammars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "grammars");
 
   grammars_Setter_(mthis, __arg_0) => mthis["grammars"] = __arg_0;
 
-  interimResults_Getter_(mthis) => mthis["interimResults"];
+  interimResults_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interimResults");
 
   interimResults_Setter_(mthis, __arg_0) => mthis["interimResults"] = __arg_0;
 
-  lang_Getter_(mthis) => mthis["lang"];
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
 
   lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
 
-  maxAlternatives_Getter_(mthis) => mthis["maxAlternatives"];
+  maxAlternatives_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "maxAlternatives");
 
   maxAlternatives_Setter_(mthis, __arg_0) => mthis["maxAlternatives"] = __arg_0;
 
-  onaudioend_Getter_(mthis) => mthis["onaudioend"];
+  onaudioend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudioend");
 
   onaudioend_Setter_(mthis, __arg_0) => mthis["onaudioend"] = __arg_0;
 
-  onaudiostart_Getter_(mthis) => mthis["onaudiostart"];
+  onaudiostart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaudiostart");
 
   onaudiostart_Setter_(mthis, __arg_0) => mthis["onaudiostart"] = __arg_0;
 
-  onend_Getter_(mthis) => mthis["onend"];
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
 
   onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onnomatch_Getter_(mthis) => mthis["onnomatch"];
+  onnomatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onnomatch");
 
   onnomatch_Setter_(mthis, __arg_0) => mthis["onnomatch"] = __arg_0;
 
-  onresult_Getter_(mthis) => mthis["onresult"];
+  onresult_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresult");
 
   onresult_Setter_(mthis, __arg_0) => mthis["onresult"] = __arg_0;
 
-  onsoundend_Getter_(mthis) => mthis["onsoundend"];
+  onsoundend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsoundend");
 
   onsoundend_Setter_(mthis, __arg_0) => mthis["onsoundend"] = __arg_0;
 
-  onsoundstart_Getter_(mthis) => mthis["onsoundstart"];
+  onsoundstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsoundstart");
 
   onsoundstart_Setter_(mthis, __arg_0) => mthis["onsoundstart"] = __arg_0;
 
-  onspeechend_Getter_(mthis) => mthis["onspeechend"];
+  onspeechend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onspeechend");
 
   onspeechend_Setter_(mthis, __arg_0) => mthis["onspeechend"] = __arg_0;
 
-  onspeechstart_Getter_(mthis) => mthis["onspeechstart"];
+  onspeechstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onspeechstart");
 
   onspeechstart_Setter_(mthis, __arg_0) => mthis["onspeechstart"] = __arg_0;
 
-  onstart_Getter_(mthis) => mthis["onstart"];
+  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstart");
 
   onstart_Setter_(mthis, __arg_0) => mthis["onstart"] = __arg_0;
 
-  start_Callback_0_(mthis) => mthis.callMethod("start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
 }
 
 class BlinkSpeechRecognitionAlternative {
   static final instance = new BlinkSpeechRecognitionAlternative();
 
-  confidence_Getter_(mthis) => mthis["confidence"];
+  confidence_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "confidence");
 
-  transcript_Getter_(mthis) => mthis["transcript"];
+  transcript_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "transcript");
 
 }
 
 class BlinkSpeechRecognitionError extends BlinkEvent {
   static final instance = new BlinkSpeechRecognitionError();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["SpeechRecognitionError"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechRecognitionError"), [__arg_0, __arg_1]);
 
-  error_Getter_(mthis) => mthis["error"];
+  error_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "error");
 
-  message_Getter_(mthis) => mthis["message"];
+  message_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "message");
 
 }
 
 class BlinkSpeechRecognitionEvent extends BlinkEvent {
   static final instance = new BlinkSpeechRecognitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["SpeechRecognitionEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechRecognitionEvent"), [__arg_0, __arg_1]);
 
-  emma_Getter_(mthis) => mthis["emma"];
+  emma_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emma");
 
-  interpretation_Getter_(mthis) => mthis["interpretation"];
+  interpretation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "interpretation");
 
-  resultIndex_Getter_(mthis) => mthis["resultIndex"];
+  resultIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "resultIndex");
 
-  results_Getter_(mthis) => mthis["results"];
+  results_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "results");
 
 }
 
 class BlinkSpeechRecognitionResult {
   static final instance = new BlinkSpeechRecognitionResult();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  isFinal_Getter_(mthis) => mthis["isFinal"];
+  isFinal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "isFinal");
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSpeechRecognitionResultList {
   static final instance = new BlinkSpeechRecognitionResultList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSpeechSynthesis extends BlinkEventTarget {
   static final instance = new BlinkSpeechSynthesis();
 
-  cancel_Callback_0_(mthis) => mthis.callMethod("cancel", []);
+  cancel_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancel", []);
 
-  getVoices_Callback_0_(mthis) => mthis.callMethod("getVoices", []);
+  getVoices_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVoices", []);
 
-  onvoiceschanged_Getter_(mthis) => mthis["onvoiceschanged"];
+  onvoiceschanged_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvoiceschanged");
 
   onvoiceschanged_Setter_(mthis, __arg_0) => mthis["onvoiceschanged"] = __arg_0;
 
-  pause_Callback_0_(mthis) => mthis.callMethod("pause", []);
+  pause_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pause", []);
 
-  paused_Getter_(mthis) => mthis["paused"];
+  paused_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "paused");
 
-  pending_Getter_(mthis) => mthis["pending"];
+  pending_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pending");
 
-  resume_Callback_0_(mthis) => mthis.callMethod("resume", []);
+  resume_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resume", []);
 
-  speak_Callback_0_(mthis) => mthis.callMethod("speak", []);
+  speak_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "speak", []);
 
-  speak_Callback_1_(mthis, __arg_0) => mthis.callMethod("speak", [__arg_0]);
+  speak_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "speak", [__arg_0]);
 
-  speaking_Getter_(mthis) => mthis["speaking"];
+  speaking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speaking");
 
 }
 
 class BlinkSpeechSynthesisEvent extends BlinkEvent {
   static final instance = new BlinkSpeechSynthesisEvent();
 
-  charIndex_Getter_(mthis) => mthis["charIndex"];
+  charIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charIndex");
 
-  elapsedTime_Getter_(mthis) => mthis["elapsedTime"];
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
 }
 
 class BlinkSpeechSynthesisUtterance extends BlinkEventTarget {
   static final instance = new BlinkSpeechSynthesisUtterance();
 
-  constructorCallback_0_() => new js.JsObject(js.context["SpeechSynthesisUtterance"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechSynthesisUtterance"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["SpeechSynthesisUtterance"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "SpeechSynthesisUtterance"), [__arg_0]);
 
-  lang_Getter_(mthis) => mthis["lang"];
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
 
   lang_Setter_(mthis, __arg_0) => mthis["lang"] = __arg_0;
 
-  onboundary_Getter_(mthis) => mthis["onboundary"];
+  onboundary_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onboundary");
 
   onboundary_Setter_(mthis, __arg_0) => mthis["onboundary"] = __arg_0;
 
-  onend_Getter_(mthis) => mthis["onend"];
+  onend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onend");
 
   onend_Setter_(mthis, __arg_0) => mthis["onend"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onmark_Getter_(mthis) => mthis["onmark"];
+  onmark_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmark");
 
   onmark_Setter_(mthis, __arg_0) => mthis["onmark"] = __arg_0;
 
-  onpause_Getter_(mthis) => mthis["onpause"];
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
 
   onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
 
-  onresume_Getter_(mthis) => mthis["onresume"];
+  onresume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresume");
 
   onresume_Setter_(mthis, __arg_0) => mthis["onresume"] = __arg_0;
 
-  onstart_Getter_(mthis) => mthis["onstart"];
+  onstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstart");
 
   onstart_Setter_(mthis, __arg_0) => mthis["onstart"] = __arg_0;
 
-  pitch_Getter_(mthis) => mthis["pitch"];
+  pitch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pitch");
 
   pitch_Setter_(mthis, __arg_0) => mthis["pitch"] = __arg_0;
 
-  rate_Getter_(mthis) => mthis["rate"];
+  rate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rate");
 
   rate_Setter_(mthis, __arg_0) => mthis["rate"] = __arg_0;
 
-  text_Getter_(mthis) => mthis["text"];
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "text");
 
   text_Setter_(mthis, __arg_0) => mthis["text"] = __arg_0;
 
-  voice_Getter_(mthis) => mthis["voice"];
+  voice_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "voice");
 
   voice_Setter_(mthis, __arg_0) => mthis["voice"] = __arg_0;
 
-  volume_Getter_(mthis) => mthis["volume"];
+  volume_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "volume");
 
   volume_Setter_(mthis, __arg_0) => mthis["volume"] = __arg_0;
 
@@ -13945,449 +13946,449 @@
 class BlinkSpeechSynthesisVoice {
   static final instance = new BlinkSpeechSynthesisVoice();
 
-  default_Getter_(mthis) => mthis["default"];
+  default_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "default");
 
-  lang_Getter_(mthis) => mthis["lang"];
+  lang_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "lang");
 
-  localService_Getter_(mthis) => mthis["localService"];
+  localService_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localService");
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  voiceURI_Getter_(mthis) => mthis["voiceURI"];
+  voiceURI_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "voiceURI");
 
 }
 
 class BlinkStorage {
   static final instance = new BlinkStorage();
 
-  $__delete___Callback_1_(mthis, __arg_0) => mthis.callMethod("__delete__", [__arg_0]);
+  $__delete___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__delete__", [__arg_0]);
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  getItem_Callback_0_(mthis) => mthis.callMethod("getItem", []);
+  getItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getItem", []);
 
-  getItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("getItem", [__arg_0]);
+  getItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getItem", [__arg_0]);
 
-  key_Callback_0_(mthis) => mthis.callMethod("key", []);
+  key_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "key", []);
 
-  key_Callback_1_(mthis, __arg_0) => mthis.callMethod("key", [__arg_0]);
+  key_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "key", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  removeItem_Callback_0_(mthis) => mthis.callMethod("removeItem", []);
+  removeItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", []);
 
-  removeItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeItem", [__arg_0]);
+  removeItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeItem", [__arg_0]);
 
-  setItem_Callback_0_(mthis) => mthis.callMethod("setItem", []);
+  setItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setItem", []);
 
-  setItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("setItem", [__arg_0]);
+  setItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setItem", [__arg_0]);
 
-  setItem_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setItem", [__arg_0, __arg_1]);
+  setItem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setItem", [__arg_0, __arg_1]);
 
 }
 
 class BlinkStorageEvent extends BlinkEvent {
   static final instance = new BlinkStorageEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["StorageEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "StorageEvent"), [__arg_0, __arg_1]);
 
-  initStorageEvent_Callback_0_(mthis) => mthis.callMethod("initStorageEvent", []);
+  initStorageEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", []);
 
-  initStorageEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initStorageEvent", [__arg_0]);
+  initStorageEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0]);
 
-  initStorageEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1]);
+  initStorageEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1]);
 
-  initStorageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2]);
+  initStorageEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initStorageEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initStorageEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initStorageEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  initStorageEvent_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  initStorageEvent_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("initStorageEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  key_Getter_(mthis) => mthis["key"];
+  key_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "key");
 
-  newValue_Getter_(mthis) => mthis["newValue"];
+  newValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "newValue");
 
-  oldValue_Getter_(mthis) => mthis["oldValue"];
+  oldValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oldValue");
 
-  storageArea_Getter_(mthis) => mthis["storageArea"];
+  storageArea_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "storageArea");
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkStorageInfo {
   static final instance = new BlinkStorageInfo();
 
-  quota_Getter_(mthis) => mthis["quota"];
+  quota_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "quota");
 
-  usage_Getter_(mthis) => mthis["usage"];
+  usage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "usage");
 
 }
 
 class BlinkStorageQuota {
   static final instance = new BlinkStorageQuota();
 
-  queryInfo_Callback_0_(mthis) => mthis.callMethod("queryInfo", []);
+  queryInfo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "queryInfo", []);
 
-  queryInfo_Callback_1_(mthis, __arg_0) => mthis.callMethod("queryInfo", [__arg_0]);
+  queryInfo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "queryInfo", [__arg_0]);
 
-  requestPersistentQuota_Callback_0_(mthis) => mthis.callMethod("requestPersistentQuota", []);
+  requestPersistentQuota_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestPersistentQuota", []);
 
-  requestPersistentQuota_Callback_1_(mthis, __arg_0) => mthis.callMethod("requestPersistentQuota", [__arg_0]);
+  requestPersistentQuota_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestPersistentQuota", [__arg_0]);
 
-  supportedTypes_Getter_(mthis) => mthis["supportedTypes"];
+  supportedTypes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "supportedTypes");
 
 }
 
 class BlinkStream {
   static final instance = new BlinkStream();
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkStyleMedia {
   static final instance = new BlinkStyleMedia();
 
-  matchMedium_Callback_0_(mthis) => mthis.callMethod("matchMedium", []);
+  matchMedium_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchMedium", []);
 
-  matchMedium_Callback_1_(mthis, __arg_0) => mthis.callMethod("matchMedium", [__arg_0]);
+  matchMedium_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchMedium", [__arg_0]);
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkStyleSheet {
   static final instance = new BlinkStyleSheet();
 
-  disabled_Getter_(mthis) => mthis["disabled"];
+  disabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "disabled");
 
   disabled_Setter_(mthis, __arg_0) => mthis["disabled"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  media_Getter_(mthis) => mthis["media"];
+  media_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "media");
 
-  ownerNode_Getter_(mthis) => mthis["ownerNode"];
+  ownerNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ownerNode");
 
-  parentStyleSheet_Getter_(mthis) => mthis["parentStyleSheet"];
+  parentStyleSheet_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parentStyleSheet");
 
-  title_Getter_(mthis) => mthis["title"];
+  title_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "title");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
 class BlinkStyleSheetList {
   static final instance = new BlinkStyleSheetList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkSubtleCrypto {
   static final instance = new BlinkSubtleCrypto();
 
-  decrypt_Callback_1_(mthis, __arg_0) => mthis.callMethod("decrypt", [__arg_0]);
+  decrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0]);
 
-  decrypt_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("decrypt", [__arg_0, __arg_1]);
+  decrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0, __arg_1]);
 
-  decrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("decrypt", [__arg_0, __arg_1, __arg_2]);
+  decrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "decrypt", [__arg_0, __arg_1, __arg_2]);
 
-  digest_Callback_0_(mthis) => mthis.callMethod("digest", []);
+  digest_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "digest", []);
 
-  digest_Callback_1_(mthis, __arg_0) => mthis.callMethod("digest", [__arg_0]);
+  digest_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "digest", [__arg_0]);
 
-  digest_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("digest", [__arg_0, __arg_1]);
+  digest_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "digest", [__arg_0, __arg_1]);
 
-  encrypt_Callback_1_(mthis, __arg_0) => mthis.callMethod("encrypt", [__arg_0]);
+  encrypt_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0]);
 
-  encrypt_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("encrypt", [__arg_0, __arg_1]);
+  encrypt_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0, __arg_1]);
 
-  encrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("encrypt", [__arg_0, __arg_1, __arg_2]);
+  encrypt_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "encrypt", [__arg_0, __arg_1, __arg_2]);
 
-  exportKey_Callback_0_(mthis) => mthis.callMethod("exportKey", []);
+  exportKey_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", []);
 
-  exportKey_Callback_1_(mthis, __arg_0) => mthis.callMethod("exportKey", [__arg_0]);
+  exportKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", [__arg_0]);
 
-  exportKey_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("exportKey", [__arg_0, __arg_1]);
+  exportKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "exportKey", [__arg_0, __arg_1]);
 
-  generateKey_Callback_1_(mthis, __arg_0) => mthis.callMethod("generateKey", [__arg_0]);
+  generateKey_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0]);
 
-  generateKey_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("generateKey", [__arg_0, __arg_1]);
+  generateKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0, __arg_1]);
 
-  generateKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("generateKey", [__arg_0, __arg_1, __arg_2]);
+  generateKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "generateKey", [__arg_0, __arg_1, __arg_2]);
 
-  importKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("importKey", [__arg_0, __arg_1, __arg_2]);
+  importKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "importKey", [__arg_0, __arg_1, __arg_2]);
 
-  importKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("importKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  importKey_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("importKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_1_(mthis, __arg_0) => mthis.callMethod("sign", [__arg_0]);
+  sign_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sign", [__arg_0]);
 
-  sign_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("sign", [__arg_0, __arg_1]);
+  sign_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sign", [__arg_0, __arg_1]);
 
-  sign_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("sign", [__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]);
 
-  unwrapKey_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  unwrapKey_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  unwrapKey_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("unwrapKey", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  verify_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("verify", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("verify", [__arg_0, __arg_1, __arg_2]);
+  verify_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "verify", [__arg_0, __arg_1, __arg_2]);
 
-  verify_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("verify", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  wrapKey_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("wrapKey", [__arg_0, __arg_1]);
+  wrapKey_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "wrapKey", [__arg_0, __arg_1]);
 
-  wrapKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("wrapKey", [__arg_0, __arg_1, __arg_2]);
+  wrapKey_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "wrapKey", [__arg_0, __arg_1, __arg_2]);
 
-  wrapKey_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("wrapKey", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
 }
 
 class BlinkText extends BlinkCharacterData {
   static final instance = new BlinkText();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Text"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Text"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Text"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Text"), [__arg_0]);
 
-  getDestinationInsertionPoints_Callback_0_(mthis) => mthis.callMethod("getDestinationInsertionPoints", []);
+  getDestinationInsertionPoints_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getDestinationInsertionPoints", []);
 
-  replaceWholeText_Callback_0_(mthis) => mthis.callMethod("replaceWholeText", []);
+  replaceWholeText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "replaceWholeText", []);
 
-  replaceWholeText_Callback_1_(mthis, __arg_0) => mthis.callMethod("replaceWholeText", [__arg_0]);
+  replaceWholeText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "replaceWholeText", [__arg_0]);
 
-  splitText_Callback_0_(mthis) => mthis.callMethod("splitText", []);
+  splitText_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "splitText", []);
 
-  splitText_Callback_1_(mthis, __arg_0) => mthis.callMethod("splitText", [__arg_0]);
+  splitText_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "splitText", [__arg_0]);
 
-  wholeText_Getter_(mthis) => mthis["wholeText"];
+  wholeText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wholeText");
 
 }
 
 class BlinkTextDecoder {
   static final instance = new BlinkTextDecoder();
 
-  constructorCallback_0_() => new js.JsObject(js.context["TextDecoder"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextDecoder"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["TextDecoder"], [__arg_0]);
+  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(js.context["TextDecoder"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextDecoder"), [__arg_0, __arg_1]);
 
-  decode_Callback_0_(mthis) => mthis.callMethod("decode", []);
+  decode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "decode", []);
 
-  decode_Callback_1_(mthis, __arg_0) => mthis.callMethod("decode", [__arg_0]);
+  decode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "decode", [__arg_0]);
 
-  decode_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("decode", [__arg_0, __arg_1]);
+  decode_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "decode", [__arg_0, __arg_1]);
 
-  encoding_Getter_(mthis) => mthis["encoding"];
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
 
-  fatal_Getter_(mthis) => mthis["fatal"];
+  fatal_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fatal");
 
-  ignoreBOM_Getter_(mthis) => mthis["ignoreBOM"];
+  ignoreBOM_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ignoreBOM");
 
 }
 
 class BlinkTextEncoder {
   static final instance = new BlinkTextEncoder();
 
-  constructorCallback_0_() => new js.JsObject(js.context["TextEncoder"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextEncoder"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["TextEncoder"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TextEncoder"), [__arg_0]);
 
-  encode_Callback_0_(mthis) => mthis.callMethod("encode", []);
+  encode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "encode", []);
 
-  encode_Callback_1_(mthis, __arg_0) => mthis.callMethod("encode", [__arg_0]);
+  encode_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "encode", [__arg_0]);
 
-  encoding_Getter_(mthis) => mthis["encoding"];
+  encoding_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "encoding");
 
 }
 
 class BlinkTextEvent extends BlinkUIEvent {
   static final instance = new BlinkTextEvent();
 
-  data_Getter_(mthis) => mthis["data"];
+  data_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "data");
 
-  initTextEvent_Callback_0_(mthis) => mthis.callMethod("initTextEvent", []);
+  initTextEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", []);
 
-  initTextEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initTextEvent", [__arg_0]);
+  initTextEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initTextEvent", [__arg_0]);
 
-  initTextEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initTextEvent", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("initTextEvent", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("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, "initTextEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkTextMetrics {
   static final instance = new BlinkTextMetrics();
 
-  actualBoundingBoxAscent_Getter_(mthis) => mthis["actualBoundingBoxAscent"];
+  actualBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxAscent");
 
-  actualBoundingBoxDescent_Getter_(mthis) => mthis["actualBoundingBoxDescent"];
+  actualBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxDescent");
 
-  actualBoundingBoxLeft_Getter_(mthis) => mthis["actualBoundingBoxLeft"];
+  actualBoundingBoxLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxLeft");
 
-  actualBoundingBoxRight_Getter_(mthis) => mthis["actualBoundingBoxRight"];
+  actualBoundingBoxRight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "actualBoundingBoxRight");
 
-  alphabeticBaseline_Getter_(mthis) => mthis["alphabeticBaseline"];
+  alphabeticBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alphabeticBaseline");
 
-  emHeightAscent_Getter_(mthis) => mthis["emHeightAscent"];
+  emHeightAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emHeightAscent");
 
-  emHeightDescent_Getter_(mthis) => mthis["emHeightDescent"];
+  emHeightDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "emHeightDescent");
 
-  fontBoundingBoxAscent_Getter_(mthis) => mthis["fontBoundingBoxAscent"];
+  fontBoundingBoxAscent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontBoundingBoxAscent");
 
-  fontBoundingBoxDescent_Getter_(mthis) => mthis["fontBoundingBoxDescent"];
+  fontBoundingBoxDescent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fontBoundingBoxDescent");
 
-  hangingBaseline_Getter_(mthis) => mthis["hangingBaseline"];
+  hangingBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hangingBaseline");
 
-  ideographicBaseline_Getter_(mthis) => mthis["ideographicBaseline"];
+  ideographicBaseline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ideographicBaseline");
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
 }
 
 class BlinkTextTrack extends BlinkEventTarget {
   static final instance = new BlinkTextTrack();
 
-  activeCues_Getter_(mthis) => mthis["activeCues"];
+  activeCues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "activeCues");
 
-  addCue_Callback_0_(mthis) => mthis.callMethod("addCue", []);
+  addCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addCue", []);
 
-  addCue_Callback_1_(mthis, __arg_0) => mthis.callMethod("addCue", [__arg_0]);
+  addCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addCue", [__arg_0]);
 
-  addRegion_Callback_0_(mthis) => mthis.callMethod("addRegion", []);
+  addRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "addRegion", []);
 
-  addRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("addRegion", [__arg_0]);
+  addRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "addRegion", [__arg_0]);
 
-  cues_Getter_(mthis) => mthis["cues"];
+  cues_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "cues");
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  language_Getter_(mthis) => mthis["language"];
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
 
-  mode_Getter_(mthis) => mthis["mode"];
+  mode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mode");
 
   mode_Setter_(mthis, __arg_0) => mthis["mode"] = __arg_0;
 
-  oncuechange_Getter_(mthis) => mthis["oncuechange"];
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
 
   oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
 
-  regions_Getter_(mthis) => mthis["regions"];
+  regions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regions");
 
-  removeCue_Callback_0_(mthis) => mthis.callMethod("removeCue", []);
+  removeCue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeCue", []);
 
-  removeCue_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeCue", [__arg_0]);
+  removeCue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeCue", [__arg_0]);
 
-  removeRegion_Callback_0_(mthis) => mthis.callMethod("removeRegion", []);
+  removeRegion_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeRegion", []);
 
-  removeRegion_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeRegion", [__arg_0]);
+  removeRegion_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeRegion", [__arg_0]);
 
 }
 
 class BlinkTextTrackCue extends BlinkEventTarget {
   static final instance = new BlinkTextTrackCue();
 
-  endTime_Getter_(mthis) => mthis["endTime"];
+  endTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endTime");
 
   endTime_Setter_(mthis, __arg_0) => mthis["endTime"] = __arg_0;
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
   id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
 
-  onenter_Getter_(mthis) => mthis["onenter"];
+  onenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onenter");
 
   onenter_Setter_(mthis, __arg_0) => mthis["onenter"] = __arg_0;
 
-  onexit_Getter_(mthis) => mthis["onexit"];
+  onexit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onexit");
 
   onexit_Setter_(mthis, __arg_0) => mthis["onexit"] = __arg_0;
 
-  pauseOnExit_Getter_(mthis) => mthis["pauseOnExit"];
+  pauseOnExit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pauseOnExit");
 
   pauseOnExit_Setter_(mthis, __arg_0) => mthis["pauseOnExit"] = __arg_0;
 
-  startTime_Getter_(mthis) => mthis["startTime"];
+  startTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "startTime");
 
   startTime_Setter_(mthis, __arg_0) => mthis["startTime"] = __arg_0;
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
 }
 
 class BlinkTextTrackCueList {
   static final instance = new BlinkTextTrackCueList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getCueById_Callback_0_(mthis) => mthis.callMethod("getCueById", []);
+  getCueById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCueById", []);
 
-  getCueById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getCueById", [__arg_0]);
+  getCueById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getCueById", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkTextTrackList extends BlinkEventTarget {
   static final instance = new BlinkTextTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getTrackById_Callback_0_(mthis) => mthis.callMethod("getTrackById", []);
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
 
-  getTrackById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTrackById", [__arg_0]);
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  onaddtrack_Getter_(mthis) => mthis["onaddtrack"];
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
 
   onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onremovetrack_Getter_(mthis) => mthis["onremovetrack"];
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
 
   onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
 
@@ -14396,54 +14397,54 @@
 class BlinkTimeRanges {
   static final instance = new BlinkTimeRanges();
 
-  end_Callback_0_(mthis) => mthis.callMethod("end", []);
+  end_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "end", []);
 
-  end_Callback_1_(mthis, __arg_0) => mthis.callMethod("end", [__arg_0]);
+  end_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "end", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  start_Callback_0_(mthis) => mthis.callMethod("start", []);
+  start_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "start", []);
 
-  start_Callback_1_(mthis, __arg_0) => mthis.callMethod("start", [__arg_0]);
+  start_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "start", [__arg_0]);
 
 }
 
 class BlinkTiming {
   static final instance = new BlinkTiming();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("__setter__", [__arg_0, __arg_1]);
+  $__setter___Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "__setter__", [__arg_0, __arg_1]);
 
-  delay_Getter_(mthis) => mthis["delay"];
+  delay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "delay");
 
   delay_Setter_(mthis, __arg_0) => mthis["delay"] = __arg_0;
 
-  direction_Getter_(mthis) => mthis["direction"];
+  direction_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "direction");
 
   direction_Setter_(mthis, __arg_0) => mthis["direction"] = __arg_0;
 
-  easing_Getter_(mthis) => mthis["easing"];
+  easing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "easing");
 
   easing_Setter_(mthis, __arg_0) => mthis["easing"] = __arg_0;
 
-  endDelay_Getter_(mthis) => mthis["endDelay"];
+  endDelay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "endDelay");
 
   endDelay_Setter_(mthis, __arg_0) => mthis["endDelay"] = __arg_0;
 
-  fill_Getter_(mthis) => mthis["fill"];
+  fill_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "fill");
 
   fill_Setter_(mthis, __arg_0) => mthis["fill"] = __arg_0;
 
-  iterationStart_Getter_(mthis) => mthis["iterationStart"];
+  iterationStart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iterationStart");
 
   iterationStart_Setter_(mthis, __arg_0) => mthis["iterationStart"] = __arg_0;
 
-  iterations_Getter_(mthis) => mthis["iterations"];
+  iterations_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "iterations");
 
   iterations_Setter_(mthis, __arg_0) => mthis["iterations"] = __arg_0;
 
-  playbackRate_Getter_(mthis) => mthis["playbackRate"];
+  playbackRate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "playbackRate");
 
   playbackRate_Setter_(mthis, __arg_0) => mthis["playbackRate"] = __arg_0;
 
@@ -14452,246 +14453,246 @@
 class BlinkTouch {
   static final instance = new BlinkTouch();
 
-  clientX_Getter_(mthis) => mthis["clientX"];
+  clientX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientX");
 
-  clientY_Getter_(mthis) => mthis["clientY"];
+  clientY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "clientY");
 
-  force_Getter_(mthis) => mthis["force"];
+  force_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "force");
 
-  identifier_Getter_(mthis) => mthis["identifier"];
+  identifier_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "identifier");
 
-  pageX_Getter_(mthis) => mthis["pageX"];
+  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageX");
 
-  pageY_Getter_(mthis) => mthis["pageY"];
+  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageY");
 
-  radiusX_Getter_(mthis) => mthis["radiusX"];
+  radiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusX");
 
-  radiusY_Getter_(mthis) => mthis["radiusY"];
+  radiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "radiusY");
 
-  screenX_Getter_(mthis) => mthis["screenX"];
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
 
-  screenY_Getter_(mthis) => mthis["screenY"];
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
 
-  target_Getter_(mthis) => mthis["target"];
+  target_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "target");
 
-  webkitForce_Getter_(mthis) => mthis["webkitForce"];
+  webkitForce_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitForce");
 
-  webkitRadiusX_Getter_(mthis) => mthis["webkitRadiusX"];
+  webkitRadiusX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRadiusX");
 
-  webkitRadiusY_Getter_(mthis) => mthis["webkitRadiusY"];
+  webkitRadiusY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRadiusY");
 
-  webkitRotationAngle_Getter_(mthis) => mthis["webkitRotationAngle"];
+  webkitRotationAngle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitRotationAngle");
 
 }
 
 class BlinkTouchEvent extends BlinkUIEvent {
   static final instance = new BlinkTouchEvent();
 
-  altKey_Getter_(mthis) => mthis["altKey"];
+  altKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "altKey");
 
-  changedTouches_Getter_(mthis) => mthis["changedTouches"];
+  changedTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "changedTouches");
 
-  ctrlKey_Getter_(mthis) => mthis["ctrlKey"];
+  ctrlKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ctrlKey");
 
-  initTouchEvent_Callback_0_(mthis) => mthis.callMethod("initTouchEvent", []);
+  initTouchEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", []);
 
-  initTouchEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initTouchEvent", [__arg_0]);
+  initTouchEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initTouchEvent", [__arg_0]);
 
-  initTouchEvent_Callback_10_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8, __arg_9]);
+  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]);
 
-  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) => mthis.callMethod("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_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]);
 
-  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) => mthis.callMethod("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_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_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) => mthis.callMethod("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_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_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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) => mthis.callMethod("initTouchEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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) => mthis["metaKey"];
+  metaKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "metaKey");
 
-  shiftKey_Getter_(mthis) => mthis["shiftKey"];
+  shiftKey_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "shiftKey");
 
-  targetTouches_Getter_(mthis) => mthis["targetTouches"];
+  targetTouches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "targetTouches");
 
-  touches_Getter_(mthis) => mthis["touches"];
+  touches_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "touches");
 
 }
 
 class BlinkTouchList {
   static final instance = new BlinkTouchList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkTrackEvent extends BlinkEvent {
   static final instance = new BlinkTrackEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["TrackEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TrackEvent"), [__arg_0, __arg_1]);
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
 }
 
 class BlinkTransitionEvent extends BlinkEvent {
   static final instance = new BlinkTransitionEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["TransitionEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "TransitionEvent"), [__arg_0, __arg_1]);
 
-  elapsedTime_Getter_(mthis) => mthis["elapsedTime"];
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
 
-  propertyName_Getter_(mthis) => mthis["propertyName"];
+  propertyName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "propertyName");
 
-  pseudoElement_Getter_(mthis) => mthis["pseudoElement"];
+  pseudoElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pseudoElement");
 
 }
 
 class BlinkTreeWalker {
   static final instance = new BlinkTreeWalker();
 
-  currentNode_Getter_(mthis) => mthis["currentNode"];
+  currentNode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "currentNode");
 
   currentNode_Setter_(mthis, __arg_0) => mthis["currentNode"] = __arg_0;
 
-  expandEntityReferences_Getter_(mthis) => mthis["expandEntityReferences"];
+  expandEntityReferences_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "expandEntityReferences");
 
-  filter_Getter_(mthis) => mthis["filter"];
+  filter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "filter");
 
-  firstChild_Callback_0_(mthis) => mthis.callMethod("firstChild", []);
+  firstChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "firstChild", []);
 
-  lastChild_Callback_0_(mthis) => mthis.callMethod("lastChild", []);
+  lastChild_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lastChild", []);
 
-  nextNode_Callback_0_(mthis) => mthis.callMethod("nextNode", []);
+  nextNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextNode", []);
 
-  nextSibling_Callback_0_(mthis) => mthis.callMethod("nextSibling", []);
+  nextSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "nextSibling", []);
 
-  parentNode_Callback_0_(mthis) => mthis.callMethod("parentNode", []);
+  parentNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "parentNode", []);
 
-  previousNode_Callback_0_(mthis) => mthis.callMethod("previousNode", []);
+  previousNode_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousNode", []);
 
-  previousSibling_Callback_0_(mthis) => mthis.callMethod("previousSibling", []);
+  previousSibling_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "previousSibling", []);
 
-  root_Getter_(mthis) => mthis["root"];
+  root_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "root");
 
-  whatToShow_Getter_(mthis) => mthis["whatToShow"];
+  whatToShow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "whatToShow");
 
 }
 
 class BlinkUIEvent extends BlinkEvent {
   static final instance = new BlinkUIEvent();
 
-  charCode_Getter_(mthis) => mthis["charCode"];
+  charCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "charCode");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["UIEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "UIEvent"), [__arg_0, __arg_1]);
 
-  detail_Getter_(mthis) => mthis["detail"];
+  detail_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "detail");
 
-  initUIEvent_Callback_0_(mthis) => mthis.callMethod("initUIEvent", []);
+  initUIEvent_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", []);
 
-  initUIEvent_Callback_1_(mthis, __arg_0) => mthis.callMethod("initUIEvent", [__arg_0]);
+  initUIEvent_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0]);
 
-  initUIEvent_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("initUIEvent", [__arg_0, __arg_1]);
+  initUIEvent_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1]);
 
-  initUIEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("initUIEvent", [__arg_0, __arg_1, __arg_2]);
+  initUIEvent_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "initUIEvent", [__arg_0, __arg_1, __arg_2]);
 
-  initUIEvent_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  initUIEvent_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("initUIEvent", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  keyCode_Getter_(mthis) => mthis["keyCode"];
+  keyCode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "keyCode");
 
-  layerX_Getter_(mthis) => mthis["layerX"];
+  layerX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "layerX");
 
-  layerY_Getter_(mthis) => mthis["layerY"];
+  layerY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "layerY");
 
-  pageX_Getter_(mthis) => mthis["pageX"];
+  pageX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageX");
 
-  pageY_Getter_(mthis) => mthis["pageY"];
+  pageY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageY");
 
-  view_Getter_(mthis) => mthis["view"];
+  view_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "view");
 
-  which_Getter_(mthis) => mthis["which"];
+  which_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "which");
 
 }
 
 class BlinkURL {
   static final instance = new BlinkURL();
 
-  constructorCallback_0_() => new js.JsObject(js.context["URL"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["URL"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["URL"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "URL"), [__arg_0, __arg_1]);
 
-  createObjectURL_Callback_0_() => js.context["URL"].callMethod("createObjectURL", []);
+  createObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "createObjectURL", []);
 
-  createObjectURL_Callback_1_(__arg_0) => js.context["URL"].callMethod("createObjectURL", [__arg_0]);
+  createObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "createObjectURL", [__arg_0]);
 
-  hash_Getter_(mthis) => mthis["hash"];
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
 
   hash_Setter_(mthis, __arg_0) => mthis["hash"] = __arg_0;
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
   host_Setter_(mthis, __arg_0) => mthis["host"] = __arg_0;
 
-  hostname_Getter_(mthis) => mthis["hostname"];
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
 
   hostname_Setter_(mthis, __arg_0) => mthis["hostname"] = __arg_0;
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
   href_Setter_(mthis, __arg_0) => mthis["href"] = __arg_0;
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  password_Getter_(mthis) => mthis["password"];
+  password_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "password");
 
   password_Setter_(mthis, __arg_0) => mthis["password"] = __arg_0;
 
-  pathname_Getter_(mthis) => mthis["pathname"];
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
 
   pathname_Setter_(mthis, __arg_0) => mthis["pathname"] = __arg_0;
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
   port_Setter_(mthis, __arg_0) => mthis["port"] = __arg_0;
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
   protocol_Setter_(mthis, __arg_0) => mthis["protocol"] = __arg_0;
 
-  revokeObjectURL_Callback_0_() => js.context["URL"].callMethod("revokeObjectURL", []);
+  revokeObjectURL_Callback_0_() => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "revokeObjectURL", []);
 
-  revokeObjectURL_Callback_1_(__arg_0) => js.context["URL"].callMethod("revokeObjectURL", [__arg_0]);
+  revokeObjectURL_Callback_1_(__arg_0) => Blink_JsNative_DomException.callMethod(Blink_JsNative_DomException.getProperty(js.context, "URL"), "revokeObjectURL", [__arg_0]);
 
-  search_Getter_(mthis) => mthis["search"];
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
 
   search_Setter_(mthis, __arg_0) => mthis["search"] = __arg_0;
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
-  username_Getter_(mthis) => mthis["username"];
+  username_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "username");
 
   username_Setter_(mthis, __arg_0) => mthis["username"] = __arg_0;
 
@@ -14700,43 +14701,43 @@
 class BlinkVTTCue extends BlinkTextTrackCue {
   static final instance = new BlinkVTTCue();
 
-  align_Getter_(mthis) => mthis["align"];
+  align_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "align");
 
   align_Setter_(mthis, __arg_0) => mthis["align"] = __arg_0;
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["VTTCue"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["VTTCue"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0, __arg_1]);
 
-  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(js.context["VTTCue"], [__arg_0, __arg_1, __arg_2]);
+  constructorCallback_3_(__arg_0, __arg_1, __arg_2) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTCue"), [__arg_0, __arg_1, __arg_2]);
 
-  getCueAsHTML_Callback_0_(mthis) => mthis.callMethod("getCueAsHTML", []);
+  getCueAsHTML_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getCueAsHTML", []);
 
-  line_Getter_(mthis) => mthis["line"];
+  line_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "line");
 
   line_Setter_(mthis, __arg_0) => mthis["line"] = __arg_0;
 
-  position_Getter_(mthis) => mthis["position"];
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
 
   position_Setter_(mthis, __arg_0) => mthis["position"] = __arg_0;
 
-  regionId_Getter_(mthis) => mthis["regionId"];
+  regionId_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionId");
 
   regionId_Setter_(mthis, __arg_0) => mthis["regionId"] = __arg_0;
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
   size_Setter_(mthis, __arg_0) => mthis["size"] = __arg_0;
 
-  snapToLines_Getter_(mthis) => mthis["snapToLines"];
+  snapToLines_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "snapToLines");
 
   snapToLines_Setter_(mthis, __arg_0) => mthis["snapToLines"] = __arg_0;
 
-  text_Getter_(mthis) => mthis["text"];
+  text_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "text");
 
   text_Setter_(mthis, __arg_0) => mthis["text"] = __arg_0;
 
-  vertical_Getter_(mthis) => mthis["vertical"];
+  vertical_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "vertical");
 
   vertical_Setter_(mthis, __arg_0) => mthis["vertical"] = __arg_0;
 
@@ -14745,39 +14746,39 @@
 class BlinkVTTRegion {
   static final instance = new BlinkVTTRegion();
 
-  constructorCallback_0_() => new js.JsObject(js.context["VTTRegion"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "VTTRegion"), []);
 
-  height_Getter_(mthis) => mthis["height"];
+  height_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "height");
 
   height_Setter_(mthis, __arg_0) => mthis["height"] = __arg_0;
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
   id_Setter_(mthis, __arg_0) => mthis["id"] = __arg_0;
 
-  regionAnchorX_Getter_(mthis) => mthis["regionAnchorX"];
+  regionAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionAnchorX");
 
   regionAnchorX_Setter_(mthis, __arg_0) => mthis["regionAnchorX"] = __arg_0;
 
-  regionAnchorY_Getter_(mthis) => mthis["regionAnchorY"];
+  regionAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "regionAnchorY");
 
   regionAnchorY_Setter_(mthis, __arg_0) => mthis["regionAnchorY"] = __arg_0;
 
-  scroll_Getter_(mthis) => mthis["scroll"];
+  scroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scroll");
 
   scroll_Setter_(mthis, __arg_0) => mthis["scroll"] = __arg_0;
 
-  track_Getter_(mthis) => mthis["track"];
+  track_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "track");
 
-  viewportAnchorX_Getter_(mthis) => mthis["viewportAnchorX"];
+  viewportAnchorX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportAnchorX");
 
   viewportAnchorX_Setter_(mthis, __arg_0) => mthis["viewportAnchorX"] = __arg_0;
 
-  viewportAnchorY_Getter_(mthis) => mthis["viewportAnchorY"];
+  viewportAnchorY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "viewportAnchorY");
 
   viewportAnchorY_Setter_(mthis, __arg_0) => mthis["viewportAnchorY"] = __arg_0;
 
-  width_Getter_(mthis) => mthis["width"];
+  width_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "width");
 
   width_Setter_(mthis, __arg_0) => mthis["width"] = __arg_0;
 
@@ -14786,70 +14787,70 @@
 class BlinkVTTRegionList {
   static final instance = new BlinkVTTRegionList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getRegionById_Callback_0_(mthis) => mthis.callMethod("getRegionById", []);
+  getRegionById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRegionById", []);
 
-  getRegionById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRegionById", [__arg_0]);
+  getRegionById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRegionById", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkValidityState {
   static final instance = new BlinkValidityState();
 
-  badInput_Getter_(mthis) => mthis["badInput"];
+  badInput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "badInput");
 
-  customError_Getter_(mthis) => mthis["customError"];
+  customError_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "customError");
 
-  patternMismatch_Getter_(mthis) => mthis["patternMismatch"];
+  patternMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "patternMismatch");
 
-  rangeOverflow_Getter_(mthis) => mthis["rangeOverflow"];
+  rangeOverflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeOverflow");
 
-  rangeUnderflow_Getter_(mthis) => mthis["rangeUnderflow"];
+  rangeUnderflow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeUnderflow");
 
-  stepMismatch_Getter_(mthis) => mthis["stepMismatch"];
+  stepMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stepMismatch");
 
-  tooLong_Getter_(mthis) => mthis["tooLong"];
+  tooLong_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "tooLong");
 
-  typeMismatch_Getter_(mthis) => mthis["typeMismatch"];
+  typeMismatch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "typeMismatch");
 
-  valid_Getter_(mthis) => mthis["valid"];
+  valid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valid");
 
-  valueMissing_Getter_(mthis) => mthis["valueMissing"];
+  valueMissing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "valueMissing");
 
 }
 
 class BlinkVideoPlaybackQuality {
   static final instance = new BlinkVideoPlaybackQuality();
 
-  corruptedVideoFrames_Getter_(mthis) => mthis["corruptedVideoFrames"];
+  corruptedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "corruptedVideoFrames");
 
-  creationTime_Getter_(mthis) => mthis["creationTime"];
+  creationTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "creationTime");
 
-  droppedVideoFrames_Getter_(mthis) => mthis["droppedVideoFrames"];
+  droppedVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "droppedVideoFrames");
 
-  totalVideoFrames_Getter_(mthis) => mthis["totalVideoFrames"];
+  totalVideoFrames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalVideoFrames");
 
 }
 
 class BlinkVideoTrack {
   static final instance = new BlinkVideoTrack();
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  kind_Getter_(mthis) => mthis["kind"];
+  kind_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "kind");
 
-  label_Getter_(mthis) => mthis["label"];
+  label_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "label");
 
-  language_Getter_(mthis) => mthis["language"];
+  language_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "language");
 
-  selected_Getter_(mthis) => mthis["selected"];
+  selected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selected");
 
   selected_Setter_(mthis, __arg_0) => mthis["selected"] = __arg_0;
 
@@ -14858,38 +14859,38 @@
 class BlinkVideoTrackList extends BlinkEventTarget {
   static final instance = new BlinkVideoTrackList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  getTrackById_Callback_0_(mthis) => mthis.callMethod("getTrackById", []);
+  getTrackById_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", []);
 
-  getTrackById_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTrackById", [__arg_0]);
+  getTrackById_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTrackById", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  onaddtrack_Getter_(mthis) => mthis["onaddtrack"];
+  onaddtrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onaddtrack");
 
   onaddtrack_Setter_(mthis, __arg_0) => mthis["onaddtrack"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onremovetrack_Getter_(mthis) => mthis["onremovetrack"];
+  onremovetrack_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onremovetrack");
 
   onremovetrack_Setter_(mthis, __arg_0) => mthis["onremovetrack"] = __arg_0;
 
-  selectedIndex_Getter_(mthis) => mthis["selectedIndex"];
+  selectedIndex_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "selectedIndex");
 
 }
 
 class BlinkWaveShaperNode extends BlinkAudioNode {
   static final instance = new BlinkWaveShaperNode();
 
-  curve_Getter_(mthis) => mthis["curve"];
+  curve_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "curve");
 
   curve_Setter_(mthis, __arg_0) => mthis["curve"] = __arg_0;
 
-  oversample_Getter_(mthis) => mthis["oversample"];
+  oversample_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oversample");
 
   oversample_Setter_(mthis, __arg_0) => mthis["oversample"] = __arg_0;
 
@@ -14898,11 +14899,11 @@
 class BlinkWebGLActiveInfo {
   static final instance = new BlinkWebGLActiveInfo();
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
-  size_Getter_(mthis) => mthis["size"];
+  size_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "size");
 
-  type_Getter_(mthis) => mthis["type"];
+  type_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "type");
 
 }
 
@@ -14934,31 +14935,31 @@
 class BlinkWebGLContextAttributes {
   static final instance = new BlinkWebGLContextAttributes();
 
-  alpha_Getter_(mthis) => mthis["alpha"];
+  alpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "alpha");
 
   alpha_Setter_(mthis, __arg_0) => mthis["alpha"] = __arg_0;
 
-  antialias_Getter_(mthis) => mthis["antialias"];
+  antialias_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "antialias");
 
   antialias_Setter_(mthis, __arg_0) => mthis["antialias"] = __arg_0;
 
-  depth_Getter_(mthis) => mthis["depth"];
+  depth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "depth");
 
   depth_Setter_(mthis, __arg_0) => mthis["depth"] = __arg_0;
 
-  failIfMajorPerformanceCaveat_Getter_(mthis) => mthis["failIfMajorPerformanceCaveat"];
+  failIfMajorPerformanceCaveat_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "failIfMajorPerformanceCaveat");
 
   failIfMajorPerformanceCaveat_Setter_(mthis, __arg_0) => mthis["failIfMajorPerformanceCaveat"] = __arg_0;
 
-  premultipliedAlpha_Getter_(mthis) => mthis["premultipliedAlpha"];
+  premultipliedAlpha_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "premultipliedAlpha");
 
   premultipliedAlpha_Setter_(mthis, __arg_0) => mthis["premultipliedAlpha"] = __arg_0;
 
-  preserveDrawingBuffer_Getter_(mthis) => mthis["preserveDrawingBuffer"];
+  preserveDrawingBuffer_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "preserveDrawingBuffer");
 
   preserveDrawingBuffer_Setter_(mthis, __arg_0) => mthis["preserveDrawingBuffer"] = __arg_0;
 
-  stencil_Getter_(mthis) => mthis["stencil"];
+  stencil_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stencil");
 
   stencil_Setter_(mthis, __arg_0) => mthis["stencil"] = __arg_0;
 
@@ -14967,9 +14968,9 @@
 class BlinkWebGLContextEvent extends BlinkEvent {
   static final instance = new BlinkWebGLContextEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["WebGLContextEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebGLContextEvent"), [__arg_0, __arg_1]);
 
-  statusMessage_Getter_(mthis) => mthis["statusMessage"];
+  statusMessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusMessage");
 
 }
 
@@ -14981,9 +14982,9 @@
 class BlinkWebGLDebugShaders {
   static final instance = new BlinkWebGLDebugShaders();
 
-  getTranslatedShaderSource_Callback_0_(mthis) => mthis.callMethod("getTranslatedShaderSource", []);
+  getTranslatedShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTranslatedShaderSource", []);
 
-  getTranslatedShaderSource_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTranslatedShaderSource", [__arg_0]);
+  getTranslatedShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTranslatedShaderSource", [__arg_0]);
 
 }
 
@@ -14995,9 +14996,9 @@
 class BlinkWebGLDrawBuffers {
   static final instance = new BlinkWebGLDrawBuffers();
 
-  drawBuffersWEBGL_Callback_0_(mthis) => mthis.callMethod("drawBuffersWEBGL", []);
+  drawBuffersWEBGL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "drawBuffersWEBGL", []);
 
-  drawBuffersWEBGL_Callback_1_(mthis, __arg_0) => mthis.callMethod("drawBuffersWEBGL", [__arg_0]);
+  drawBuffersWEBGL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawBuffersWEBGL", [__arg_0]);
 
 }
 
@@ -15009,9 +15010,9 @@
 class BlinkWebGLLoseContext {
   static final instance = new BlinkWebGLLoseContext();
 
-  loseContext_Callback_0_(mthis) => mthis.callMethod("loseContext", []);
+  loseContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "loseContext", []);
 
-  restoreContext_Callback_0_(mthis) => mthis.callMethod("restoreContext", []);
+  restoreContext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "restoreContext", []);
 
 }
 
@@ -15028,711 +15029,711 @@
 class BlinkWebGLRenderingContext {
   static final instance = new BlinkWebGLRenderingContext();
 
-  activeTexture_Callback_0_(mthis) => mthis.callMethod("activeTexture", []);
+  activeTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "activeTexture", []);
 
-  activeTexture_Callback_1_(mthis, __arg_0) => mthis.callMethod("activeTexture", [__arg_0]);
+  activeTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "activeTexture", [__arg_0]);
 
-  attachShader_Callback_0_(mthis) => mthis.callMethod("attachShader", []);
+  attachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", []);
 
-  attachShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("attachShader", [__arg_0]);
+  attachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", [__arg_0]);
 
-  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("attachShader", [__arg_0, __arg_1]);
+  attachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "attachShader", [__arg_0, __arg_1]);
 
-  bindAttribLocation_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindAttribLocation", [__arg_0]);
+  bindAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0]);
 
-  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bindAttribLocation", [__arg_0, __arg_1]);
+  bindAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0, __arg_1]);
 
-  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
+  bindAttribLocation_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bindAttribLocation", [__arg_0, __arg_1, __arg_2]);
 
-  bindBuffer_Callback_0_(mthis) => mthis.callMethod("bindBuffer", []);
+  bindBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", []);
 
-  bindBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindBuffer", [__arg_0]);
+  bindBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", [__arg_0]);
 
-  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bindBuffer", [__arg_0, __arg_1]);
+  bindBuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindBuffer", [__arg_0, __arg_1]);
 
-  bindFramebuffer_Callback_0_(mthis) => mthis.callMethod("bindFramebuffer", []);
+  bindFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", []);
 
-  bindFramebuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindFramebuffer", [__arg_0]);
+  bindFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", [__arg_0]);
 
-  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bindFramebuffer", [__arg_0, __arg_1]);
+  bindFramebuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindFramebuffer", [__arg_0, __arg_1]);
 
-  bindRenderbuffer_Callback_0_(mthis) => mthis.callMethod("bindRenderbuffer", []);
+  bindRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", []);
 
-  bindRenderbuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindRenderbuffer", [__arg_0]);
+  bindRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", [__arg_0]);
 
-  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bindRenderbuffer", [__arg_0, __arg_1]);
+  bindRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindRenderbuffer", [__arg_0, __arg_1]);
 
-  bindTexture_Callback_0_(mthis) => mthis.callMethod("bindTexture", []);
+  bindTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", []);
 
-  bindTexture_Callback_1_(mthis, __arg_0) => mthis.callMethod("bindTexture", [__arg_0]);
+  bindTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", [__arg_0]);
 
-  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bindTexture", [__arg_0, __arg_1]);
+  bindTexture_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bindTexture", [__arg_0, __arg_1]);
 
-  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("blendColor", [__arg_0, __arg_1]);
+  blendColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendColor", [__arg_0, __arg_1]);
 
-  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("blendColor", [__arg_0, __arg_1, __arg_2]);
+  blendColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "blendColor", [__arg_0, __arg_1, __arg_2]);
 
-  blendColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("blendColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  blendEquationSeparate_Callback_0_(mthis) => mthis.callMethod("blendEquationSeparate", []);
+  blendEquationSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", []);
 
-  blendEquationSeparate_Callback_1_(mthis, __arg_0) => mthis.callMethod("blendEquationSeparate", [__arg_0]);
+  blendEquationSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", [__arg_0]);
 
-  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("blendEquationSeparate", [__arg_0, __arg_1]);
+  blendEquationSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendEquationSeparate", [__arg_0, __arg_1]);
 
-  blendEquation_Callback_0_(mthis) => mthis.callMethod("blendEquation", []);
+  blendEquation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendEquation", []);
 
-  blendEquation_Callback_1_(mthis, __arg_0) => mthis.callMethod("blendEquation", [__arg_0]);
+  blendEquation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendEquation", [__arg_0]);
 
-  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("blendFuncSeparate", [__arg_0, __arg_1]);
+  blendFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendFuncSeparate", [__arg_0, __arg_1]);
 
-  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
+  blendFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "blendFuncSeparate", [__arg_0, __arg_1, __arg_2]);
 
-  blendFuncSeparate_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("blendFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("blendFunc", []);
+  blendFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", []);
 
-  blendFunc_Callback_1_(mthis, __arg_0) => mthis.callMethod("blendFunc", [__arg_0]);
+  blendFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", [__arg_0]);
 
-  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("blendFunc", [__arg_0, __arg_1]);
+  blendFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "blendFunc", [__arg_0, __arg_1]);
 
-  bufferData_Callback_1_(mthis, __arg_0) => mthis.callMethod("bufferData", [__arg_0]);
+  bufferData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0]);
 
-  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bufferData", [__arg_0, __arg_1]);
+  bufferData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0, __arg_1]);
 
-  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("bufferData", [__arg_0, __arg_1, __arg_2]);
+  bufferData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bufferData", [__arg_0, __arg_1, __arg_2]);
 
-  bufferSubData_Callback_1_(mthis, __arg_0) => mthis.callMethod("bufferSubData", [__arg_0]);
+  bufferSubData_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0]);
 
-  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("bufferSubData", [__arg_0, __arg_1]);
+  bufferSubData_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0, __arg_1]);
 
-  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("bufferSubData", [__arg_0, __arg_1, __arg_2]);
+  bufferSubData_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "bufferSubData", [__arg_0, __arg_1, __arg_2]);
 
-  canvas_Getter_(mthis) => mthis["canvas"];
+  canvas_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "canvas");
 
-  checkFramebufferStatus_Callback_0_(mthis) => mthis.callMethod("checkFramebufferStatus", []);
+  checkFramebufferStatus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "checkFramebufferStatus", []);
 
-  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => mthis.callMethod("checkFramebufferStatus", [__arg_0]);
+  checkFramebufferStatus_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "checkFramebufferStatus", [__arg_0]);
 
-  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("clearColor", [__arg_0, __arg_1]);
+  clearColor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "clearColor", [__arg_0, __arg_1]);
 
-  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("clearColor", [__arg_0, __arg_1, __arg_2]);
+  clearColor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "clearColor", [__arg_0, __arg_1, __arg_2]);
 
-  clearColor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("clearColor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  clearDepth_Callback_0_(mthis) => mthis.callMethod("clearDepth", []);
+  clearDepth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearDepth", []);
 
-  clearDepth_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearDepth", [__arg_0]);
+  clearDepth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearDepth", [__arg_0]);
 
-  clearStencil_Callback_0_(mthis) => mthis.callMethod("clearStencil", []);
+  clearStencil_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearStencil", []);
 
-  clearStencil_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearStencil", [__arg_0]);
+  clearStencil_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearStencil", [__arg_0]);
 
-  clear_Callback_0_(mthis) => mthis.callMethod("clear", []);
+  clear_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clear", []);
 
-  clear_Callback_1_(mthis, __arg_0) => mthis.callMethod("clear", [__arg_0]);
+  clear_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clear", [__arg_0]);
 
-  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("colorMask", [__arg_0, __arg_1]);
+  colorMask_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "colorMask", [__arg_0, __arg_1]);
 
-  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("colorMask", [__arg_0, __arg_1, __arg_2]);
+  colorMask_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "colorMask", [__arg_0, __arg_1, __arg_2]);
 
-  colorMask_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "colorMask", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  compileShader_Callback_0_(mthis) => mthis.callMethod("compileShader", []);
+  compileShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "compileShader", []);
 
-  compileShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("compileShader", [__arg_0]);
+  compileShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "compileShader", [__arg_0]);
 
-  compressedTexImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "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) => mthis.callMethod("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, "copyTexSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
 
-  createBuffer_Callback_0_(mthis) => mthis.callMethod("createBuffer", []);
+  createBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createBuffer", []);
 
-  createFramebuffer_Callback_0_(mthis) => mthis.callMethod("createFramebuffer", []);
+  createFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createFramebuffer", []);
 
-  createProgram_Callback_0_(mthis) => mthis.callMethod("createProgram", []);
+  createProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createProgram", []);
 
-  createRenderbuffer_Callback_0_(mthis) => mthis.callMethod("createRenderbuffer", []);
+  createRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createRenderbuffer", []);
 
-  createShader_Callback_0_(mthis) => mthis.callMethod("createShader", []);
+  createShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createShader", []);
 
-  createShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("createShader", [__arg_0]);
+  createShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createShader", [__arg_0]);
 
-  createTexture_Callback_0_(mthis) => mthis.callMethod("createTexture", []);
+  createTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createTexture", []);
 
-  cullFace_Callback_0_(mthis) => mthis.callMethod("cullFace", []);
+  cullFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cullFace", []);
 
-  cullFace_Callback_1_(mthis, __arg_0) => mthis.callMethod("cullFace", [__arg_0]);
+  cullFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cullFace", [__arg_0]);
 
-  deleteBuffer_Callback_0_(mthis) => mthis.callMethod("deleteBuffer", []);
+  deleteBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteBuffer", []);
 
-  deleteBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteBuffer", [__arg_0]);
+  deleteBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteBuffer", [__arg_0]);
 
-  deleteFramebuffer_Callback_0_(mthis) => mthis.callMethod("deleteFramebuffer", []);
+  deleteFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteFramebuffer", []);
 
-  deleteFramebuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteFramebuffer", [__arg_0]);
+  deleteFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteFramebuffer", [__arg_0]);
 
-  deleteProgram_Callback_0_(mthis) => mthis.callMethod("deleteProgram", []);
+  deleteProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteProgram", []);
 
-  deleteProgram_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteProgram", [__arg_0]);
+  deleteProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteProgram", [__arg_0]);
 
-  deleteRenderbuffer_Callback_0_(mthis) => mthis.callMethod("deleteRenderbuffer", []);
+  deleteRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteRenderbuffer", []);
 
-  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteRenderbuffer", [__arg_0]);
+  deleteRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteRenderbuffer", [__arg_0]);
 
-  deleteShader_Callback_0_(mthis) => mthis.callMethod("deleteShader", []);
+  deleteShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteShader", []);
 
-  deleteShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteShader", [__arg_0]);
+  deleteShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteShader", [__arg_0]);
 
-  deleteTexture_Callback_0_(mthis) => mthis.callMethod("deleteTexture", []);
+  deleteTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "deleteTexture", []);
 
-  deleteTexture_Callback_1_(mthis, __arg_0) => mthis.callMethod("deleteTexture", [__arg_0]);
+  deleteTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "deleteTexture", [__arg_0]);
 
-  depthFunc_Callback_0_(mthis) => mthis.callMethod("depthFunc", []);
+  depthFunc_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthFunc", []);
 
-  depthFunc_Callback_1_(mthis, __arg_0) => mthis.callMethod("depthFunc", [__arg_0]);
+  depthFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthFunc", [__arg_0]);
 
-  depthMask_Callback_0_(mthis) => mthis.callMethod("depthMask", []);
+  depthMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthMask", []);
 
-  depthMask_Callback_1_(mthis, __arg_0) => mthis.callMethod("depthMask", [__arg_0]);
+  depthMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthMask", [__arg_0]);
 
-  depthRange_Callback_0_(mthis) => mthis.callMethod("depthRange", []);
+  depthRange_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", []);
 
-  depthRange_Callback_1_(mthis, __arg_0) => mthis.callMethod("depthRange", [__arg_0]);
+  depthRange_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", [__arg_0]);
 
-  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("depthRange", [__arg_0, __arg_1]);
+  depthRange_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "depthRange", [__arg_0, __arg_1]);
 
-  detachShader_Callback_0_(mthis) => mthis.callMethod("detachShader", []);
+  detachShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", []);
 
-  detachShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("detachShader", [__arg_0]);
+  detachShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", [__arg_0]);
 
-  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("detachShader", [__arg_0, __arg_1]);
+  detachShader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "detachShader", [__arg_0, __arg_1]);
 
-  disableVertexAttribArray_Callback_0_(mthis) => mthis.callMethod("disableVertexAttribArray", []);
+  disableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disableVertexAttribArray", []);
 
-  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => mthis.callMethod("disableVertexAttribArray", [__arg_0]);
+  disableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disableVertexAttribArray", [__arg_0]);
 
-  disable_Callback_0_(mthis) => mthis.callMethod("disable", []);
+  disable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "disable", []);
 
-  disable_Callback_1_(mthis, __arg_0) => mthis.callMethod("disable", [__arg_0]);
+  disable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "disable", [__arg_0]);
 
-  drawArrays_Callback_1_(mthis, __arg_0) => mthis.callMethod("drawArrays", [__arg_0]);
+  drawArrays_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0]);
 
-  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("drawArrays", [__arg_0, __arg_1]);
+  drawArrays_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0, __arg_1]);
 
-  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("drawArrays", [__arg_0, __arg_1, __arg_2]);
+  drawArrays_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawArrays", [__arg_0, __arg_1, __arg_2]);
 
-  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("drawElements", [__arg_0, __arg_1]);
+  drawElements_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "drawElements", [__arg_0, __arg_1]);
 
-  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("drawElements", [__arg_0, __arg_1, __arg_2]);
+  drawElements_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "drawElements", [__arg_0, __arg_1, __arg_2]);
 
-  drawElements_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("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, "drawElements", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  drawingBufferHeight_Getter_(mthis) => mthis["drawingBufferHeight"];
+  drawingBufferHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "drawingBufferHeight");
 
-  drawingBufferWidth_Getter_(mthis) => mthis["drawingBufferWidth"];
+  drawingBufferWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "drawingBufferWidth");
 
-  enableVertexAttribArray_Callback_0_(mthis) => mthis.callMethod("enableVertexAttribArray", []);
+  enableVertexAttribArray_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "enableVertexAttribArray", []);
 
-  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => mthis.callMethod("enableVertexAttribArray", [__arg_0]);
+  enableVertexAttribArray_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "enableVertexAttribArray", [__arg_0]);
 
-  enable_Callback_0_(mthis) => mthis.callMethod("enable", []);
+  enable_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "enable", []);
 
-  enable_Callback_1_(mthis, __arg_0) => mthis.callMethod("enable", [__arg_0]);
+  enable_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "enable", [__arg_0]);
 
-  finish_Callback_0_(mthis) => mthis.callMethod("finish", []);
+  finish_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "finish", []);
 
-  flush_Callback_0_(mthis) => mthis.callMethod("flush", []);
+  flush_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "flush", []);
 
-  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("framebufferRenderbuffer", [__arg_0, __arg_1]);
+  framebufferRenderbuffer_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "framebufferRenderbuffer", [__arg_0, __arg_1]);
 
-  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
+  framebufferRenderbuffer_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2]);
 
-  framebufferRenderbuffer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("framebufferRenderbuffer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
+  framebufferTexture2D_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2]);
 
-  framebufferTexture2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("framebufferTexture2D", [__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, "framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  framebufferTexture2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("framebufferTexture2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_0_(mthis) => mthis.callMethod("frontFace", []);
+  frontFace_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "frontFace", []);
 
-  frontFace_Callback_1_(mthis, __arg_0) => mthis.callMethod("frontFace", [__arg_0]);
+  frontFace_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "frontFace", [__arg_0]);
 
-  generateMipmap_Callback_0_(mthis) => mthis.callMethod("generateMipmap", []);
+  generateMipmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "generateMipmap", []);
 
-  generateMipmap_Callback_1_(mthis, __arg_0) => mthis.callMethod("generateMipmap", [__arg_0]);
+  generateMipmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "generateMipmap", [__arg_0]);
 
-  getActiveAttrib_Callback_0_(mthis) => mthis.callMethod("getActiveAttrib", []);
+  getActiveAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", []);
 
-  getActiveAttrib_Callback_1_(mthis, __arg_0) => mthis.callMethod("getActiveAttrib", [__arg_0]);
+  getActiveAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", [__arg_0]);
 
-  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getActiveAttrib", [__arg_0, __arg_1]);
+  getActiveAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getActiveAttrib", [__arg_0, __arg_1]);
 
-  getActiveUniform_Callback_0_(mthis) => mthis.callMethod("getActiveUniform", []);
+  getActiveUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", []);
 
-  getActiveUniform_Callback_1_(mthis, __arg_0) => mthis.callMethod("getActiveUniform", [__arg_0]);
+  getActiveUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", [__arg_0]);
 
-  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getActiveUniform", [__arg_0, __arg_1]);
+  getActiveUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getActiveUniform", [__arg_0, __arg_1]);
 
-  getAttachedShaders_Callback_0_(mthis) => mthis.callMethod("getAttachedShaders", []);
+  getAttachedShaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttachedShaders", []);
 
-  getAttachedShaders_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAttachedShaders", [__arg_0]);
+  getAttachedShaders_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttachedShaders", [__arg_0]);
 
-  getAttribLocation_Callback_0_(mthis) => mthis.callMethod("getAttribLocation", []);
+  getAttribLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", []);
 
-  getAttribLocation_Callback_1_(mthis, __arg_0) => mthis.callMethod("getAttribLocation", [__arg_0]);
+  getAttribLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", [__arg_0]);
 
-  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getAttribLocation", [__arg_0, __arg_1]);
+  getAttribLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getAttribLocation", [__arg_0, __arg_1]);
 
-  getBufferParameter_Callback_0_(mthis) => mthis.callMethod("getBufferParameter", []);
+  getBufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", []);
 
-  getBufferParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getBufferParameter", [__arg_0]);
+  getBufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", [__arg_0]);
 
-  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getBufferParameter", [__arg_0, __arg_1]);
+  getBufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getBufferParameter", [__arg_0, __arg_1]);
 
-  getContextAttributes_Callback_0_(mthis) => mthis.callMethod("getContextAttributes", []);
+  getContextAttributes_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getContextAttributes", []);
 
-  getError_Callback_0_(mthis) => mthis.callMethod("getError", []);
+  getError_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getError", []);
 
-  getExtension_Callback_0_(mthis) => mthis.callMethod("getExtension", []);
+  getExtension_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getExtension", []);
 
-  getExtension_Callback_1_(mthis, __arg_0) => mthis.callMethod("getExtension", [__arg_0]);
+  getExtension_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getExtension", [__arg_0]);
 
-  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getFramebufferAttachmentParameter", [__arg_0]);
+  getFramebufferAttachmentParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0]);
 
-  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
+  getFramebufferAttachmentParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0, __arg_1]);
 
-  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
+  getFramebufferAttachmentParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "getFramebufferAttachmentParameter", [__arg_0, __arg_1, __arg_2]);
 
-  getParameter_Callback_0_(mthis) => mthis.callMethod("getParameter", []);
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", []);
 
-  getParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getParameter", [__arg_0]);
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0]);
 
-  getProgramInfoLog_Callback_0_(mthis) => mthis.callMethod("getProgramInfoLog", []);
+  getProgramInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getProgramInfoLog", []);
 
-  getProgramInfoLog_Callback_1_(mthis, __arg_0) => mthis.callMethod("getProgramInfoLog", [__arg_0]);
+  getProgramInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getProgramInfoLog", [__arg_0]);
 
-  getProgramParameter_Callback_0_(mthis) => mthis.callMethod("getProgramParameter", []);
+  getProgramParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", []);
 
-  getProgramParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getProgramParameter", [__arg_0]);
+  getProgramParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", [__arg_0]);
 
-  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getProgramParameter", [__arg_0, __arg_1]);
+  getProgramParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getProgramParameter", [__arg_0, __arg_1]);
 
-  getRenderbufferParameter_Callback_0_(mthis) => mthis.callMethod("getRenderbufferParameter", []);
+  getRenderbufferParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", []);
 
-  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getRenderbufferParameter", [__arg_0]);
+  getRenderbufferParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", [__arg_0]);
 
-  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getRenderbufferParameter", [__arg_0, __arg_1]);
+  getRenderbufferParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getRenderbufferParameter", [__arg_0, __arg_1]);
 
-  getShaderInfoLog_Callback_0_(mthis) => mthis.callMethod("getShaderInfoLog", []);
+  getShaderInfoLog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderInfoLog", []);
 
-  getShaderInfoLog_Callback_1_(mthis, __arg_0) => mthis.callMethod("getShaderInfoLog", [__arg_0]);
+  getShaderInfoLog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderInfoLog", [__arg_0]);
 
-  getShaderParameter_Callback_0_(mthis) => mthis.callMethod("getShaderParameter", []);
+  getShaderParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", []);
 
-  getShaderParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getShaderParameter", [__arg_0]);
+  getShaderParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", [__arg_0]);
 
-  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getShaderParameter", [__arg_0, __arg_1]);
+  getShaderParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getShaderParameter", [__arg_0, __arg_1]);
 
-  getShaderPrecisionFormat_Callback_0_(mthis) => mthis.callMethod("getShaderPrecisionFormat", []);
+  getShaderPrecisionFormat_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", []);
 
-  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => mthis.callMethod("getShaderPrecisionFormat", [__arg_0]);
+  getShaderPrecisionFormat_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", [__arg_0]);
 
-  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getShaderPrecisionFormat", [__arg_0, __arg_1]);
+  getShaderPrecisionFormat_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getShaderPrecisionFormat", [__arg_0, __arg_1]);
 
-  getShaderSource_Callback_0_(mthis) => mthis.callMethod("getShaderSource", []);
+  getShaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getShaderSource", []);
 
-  getShaderSource_Callback_1_(mthis, __arg_0) => mthis.callMethod("getShaderSource", [__arg_0]);
+  getShaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getShaderSource", [__arg_0]);
 
-  getSupportedExtensions_Callback_0_(mthis) => mthis.callMethod("getSupportedExtensions", []);
+  getSupportedExtensions_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSupportedExtensions", []);
 
-  getTexParameter_Callback_0_(mthis) => mthis.callMethod("getTexParameter", []);
+  getTexParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", []);
 
-  getTexParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getTexParameter", [__arg_0]);
+  getTexParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", [__arg_0]);
 
-  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getTexParameter", [__arg_0, __arg_1]);
+  getTexParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getTexParameter", [__arg_0, __arg_1]);
 
-  getUniformLocation_Callback_0_(mthis) => mthis.callMethod("getUniformLocation", []);
+  getUniformLocation_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", []);
 
-  getUniformLocation_Callback_1_(mthis, __arg_0) => mthis.callMethod("getUniformLocation", [__arg_0]);
+  getUniformLocation_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", [__arg_0]);
 
-  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getUniformLocation", [__arg_0, __arg_1]);
+  getUniformLocation_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getUniformLocation", [__arg_0, __arg_1]);
 
-  getUniform_Callback_0_(mthis) => mthis.callMethod("getUniform", []);
+  getUniform_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", []);
 
-  getUniform_Callback_1_(mthis, __arg_0) => mthis.callMethod("getUniform", [__arg_0]);
+  getUniform_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", [__arg_0]);
 
-  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getUniform", [__arg_0, __arg_1]);
+  getUniform_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getUniform", [__arg_0, __arg_1]);
 
-  getVertexAttribOffset_Callback_0_(mthis) => mthis.callMethod("getVertexAttribOffset", []);
+  getVertexAttribOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", []);
 
-  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => mthis.callMethod("getVertexAttribOffset", [__arg_0]);
+  getVertexAttribOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", [__arg_0]);
 
-  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getVertexAttribOffset", [__arg_0, __arg_1]);
+  getVertexAttribOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttribOffset", [__arg_0, __arg_1]);
 
-  getVertexAttrib_Callback_0_(mthis) => mthis.callMethod("getVertexAttrib", []);
+  getVertexAttrib_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", []);
 
-  getVertexAttrib_Callback_1_(mthis, __arg_0) => mthis.callMethod("getVertexAttrib", [__arg_0]);
+  getVertexAttrib_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", [__arg_0]);
 
-  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getVertexAttrib", [__arg_0, __arg_1]);
+  getVertexAttrib_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getVertexAttrib", [__arg_0, __arg_1]);
 
-  hint_Callback_0_(mthis) => mthis.callMethod("hint", []);
+  hint_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "hint", []);
 
-  hint_Callback_1_(mthis, __arg_0) => mthis.callMethod("hint", [__arg_0]);
+  hint_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "hint", [__arg_0]);
 
-  hint_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("hint", [__arg_0, __arg_1]);
+  hint_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "hint", [__arg_0, __arg_1]);
 
-  isBuffer_Callback_0_(mthis) => mthis.callMethod("isBuffer", []);
+  isBuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isBuffer", []);
 
-  isBuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("isBuffer", [__arg_0]);
+  isBuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isBuffer", [__arg_0]);
 
-  isContextLost_Callback_0_(mthis) => mthis.callMethod("isContextLost", []);
+  isContextLost_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isContextLost", []);
 
-  isEnabled_Callback_0_(mthis) => mthis.callMethod("isEnabled", []);
+  isEnabled_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isEnabled", []);
 
-  isEnabled_Callback_1_(mthis, __arg_0) => mthis.callMethod("isEnabled", [__arg_0]);
+  isEnabled_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isEnabled", [__arg_0]);
 
-  isFramebuffer_Callback_0_(mthis) => mthis.callMethod("isFramebuffer", []);
+  isFramebuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isFramebuffer", []);
 
-  isFramebuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("isFramebuffer", [__arg_0]);
+  isFramebuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isFramebuffer", [__arg_0]);
 
-  isProgram_Callback_0_(mthis) => mthis.callMethod("isProgram", []);
+  isProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isProgram", []);
 
-  isProgram_Callback_1_(mthis, __arg_0) => mthis.callMethod("isProgram", [__arg_0]);
+  isProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isProgram", [__arg_0]);
 
-  isRenderbuffer_Callback_0_(mthis) => mthis.callMethod("isRenderbuffer", []);
+  isRenderbuffer_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isRenderbuffer", []);
 
-  isRenderbuffer_Callback_1_(mthis, __arg_0) => mthis.callMethod("isRenderbuffer", [__arg_0]);
+  isRenderbuffer_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isRenderbuffer", [__arg_0]);
 
-  isShader_Callback_0_(mthis) => mthis.callMethod("isShader", []);
+  isShader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isShader", []);
 
-  isShader_Callback_1_(mthis, __arg_0) => mthis.callMethod("isShader", [__arg_0]);
+  isShader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isShader", [__arg_0]);
 
-  isTexture_Callback_0_(mthis) => mthis.callMethod("isTexture", []);
+  isTexture_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "isTexture", []);
 
-  isTexture_Callback_1_(mthis, __arg_0) => mthis.callMethod("isTexture", [__arg_0]);
+  isTexture_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "isTexture", [__arg_0]);
 
-  lineWidth_Callback_0_(mthis) => mthis.callMethod("lineWidth", []);
+  lineWidth_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lineWidth", []);
 
-  lineWidth_Callback_1_(mthis, __arg_0) => mthis.callMethod("lineWidth", [__arg_0]);
+  lineWidth_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lineWidth", [__arg_0]);
 
-  linkProgram_Callback_0_(mthis) => mthis.callMethod("linkProgram", []);
+  linkProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "linkProgram", []);
 
-  linkProgram_Callback_1_(mthis, __arg_0) => mthis.callMethod("linkProgram", [__arg_0]);
+  linkProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "linkProgram", [__arg_0]);
 
-  pixelStorei_Callback_0_(mthis) => mthis.callMethod("pixelStorei", []);
+  pixelStorei_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", []);
 
-  pixelStorei_Callback_1_(mthis, __arg_0) => mthis.callMethod("pixelStorei", [__arg_0]);
+  pixelStorei_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", [__arg_0]);
 
-  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("pixelStorei", [__arg_0, __arg_1]);
+  pixelStorei_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "pixelStorei", [__arg_0, __arg_1]);
 
-  polygonOffset_Callback_0_(mthis) => mthis.callMethod("polygonOffset", []);
+  polygonOffset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", []);
 
-  polygonOffset_Callback_1_(mthis, __arg_0) => mthis.callMethod("polygonOffset", [__arg_0]);
+  polygonOffset_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", [__arg_0]);
 
-  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("polygonOffset", [__arg_0, __arg_1]);
+  polygonOffset_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "polygonOffset", [__arg_0, __arg_1]);
 
-  readPixels_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  readPixels_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("readPixels", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("renderbufferStorage", [__arg_0, __arg_1]);
+  renderbufferStorage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "renderbufferStorage", [__arg_0, __arg_1]);
 
-  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
+  renderbufferStorage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "renderbufferStorage", [__arg_0, __arg_1, __arg_2]);
 
-  renderbufferStorage_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("renderbufferStorage", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("sampleCoverage", []);
+  sampleCoverage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", []);
 
-  sampleCoverage_Callback_1_(mthis, __arg_0) => mthis.callMethod("sampleCoverage", [__arg_0]);
+  sampleCoverage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", [__arg_0]);
 
-  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("sampleCoverage", [__arg_0, __arg_1]);
+  sampleCoverage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "sampleCoverage", [__arg_0, __arg_1]);
 
-  scissor_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scissor", [__arg_0, __arg_1]);
+  scissor_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scissor", [__arg_0, __arg_1]);
 
-  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scissor", [__arg_0, __arg_1, __arg_2]);
+  scissor_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scissor", [__arg_0, __arg_1, __arg_2]);
 
-  scissor_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("scissor", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("shaderSource", []);
+  shaderSource_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", []);
 
-  shaderSource_Callback_1_(mthis, __arg_0) => mthis.callMethod("shaderSource", [__arg_0]);
+  shaderSource_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", [__arg_0]);
 
-  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("shaderSource", [__arg_0, __arg_1]);
+  shaderSource_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "shaderSource", [__arg_0, __arg_1]);
 
-  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("stencilFuncSeparate", [__arg_0, __arg_1]);
+  stencilFuncSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilFuncSeparate", [__arg_0, __arg_1]);
 
-  stencilFuncSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("stencilFuncSeparate", [__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_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("stencilFuncSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  stencilFunc_Callback_1_(mthis, __arg_0) => mthis.callMethod("stencilFunc", [__arg_0]);
+  stencilFunc_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0]);
 
-  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("stencilFunc", [__arg_0, __arg_1]);
+  stencilFunc_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0, __arg_1]);
 
-  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("stencilFunc", [__arg_0, __arg_1, __arg_2]);
+  stencilFunc_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilFunc", [__arg_0, __arg_1, __arg_2]);
 
-  stencilMaskSeparate_Callback_0_(mthis) => mthis.callMethod("stencilMaskSeparate", []);
+  stencilMaskSeparate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", []);
 
-  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => mthis.callMethod("stencilMaskSeparate", [__arg_0]);
+  stencilMaskSeparate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", [__arg_0]);
 
-  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("stencilMaskSeparate", [__arg_0, __arg_1]);
+  stencilMaskSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilMaskSeparate", [__arg_0, __arg_1]);
 
-  stencilMask_Callback_0_(mthis) => mthis.callMethod("stencilMask", []);
+  stencilMask_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stencilMask", []);
 
-  stencilMask_Callback_1_(mthis, __arg_0) => mthis.callMethod("stencilMask", [__arg_0]);
+  stencilMask_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilMask", [__arg_0]);
 
-  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("stencilOpSeparate", [__arg_0, __arg_1]);
+  stencilOpSeparate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilOpSeparate", [__arg_0, __arg_1]);
 
-  stencilOpSeparate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("stencilOpSeparate", [__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_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("stencilOpSeparate", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  stencilOp_Callback_1_(mthis, __arg_0) => mthis.callMethod("stencilOp", [__arg_0]);
+  stencilOp_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0]);
 
-  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("stencilOp", [__arg_0, __arg_1]);
+  stencilOp_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0, __arg_1]);
 
-  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("stencilOp", [__arg_0, __arg_1, __arg_2]);
+  stencilOp_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "stencilOp", [__arg_0, __arg_1, __arg_2]);
 
-  texImage2D_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("texImage2D", [__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, "texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3]);
 
-  texImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  texImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("texImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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_1_(mthis, __arg_0) => mthis.callMethod("texParameterf", [__arg_0]);
+  texParameterf_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0]);
 
-  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("texParameterf", [__arg_0, __arg_1]);
+  texParameterf_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0, __arg_1]);
 
-  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("texParameterf", [__arg_0, __arg_1, __arg_2]);
+  texParameterf_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "texParameterf", [__arg_0, __arg_1, __arg_2]);
 
-  texParameteri_Callback_1_(mthis, __arg_0) => mthis.callMethod("texParameteri", [__arg_0]);
+  texParameteri_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0]);
 
-  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("texParameteri", [__arg_0, __arg_1]);
+  texParameteri_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0, __arg_1]);
 
-  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("texParameteri", [__arg_0, __arg_1, __arg_2]);
+  texParameteri_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "texParameteri", [__arg_0, __arg_1, __arg_2]);
 
-  texSubImage2D_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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_8_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7) => mthis.callMethod("texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7]);
+  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]);
 
-  texSubImage2D_Callback_9_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8) => mthis.callMethod("texSubImage2D", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6, __arg_7, __arg_8]);
+  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_0_(mthis) => mthis.callMethod("uniform1f", []);
+  uniform1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", []);
 
-  uniform1f_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform1f", [__arg_0]);
+  uniform1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", [__arg_0]);
 
-  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform1f", [__arg_0, __arg_1]);
+  uniform1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1f", [__arg_0, __arg_1]);
 
-  uniform1fv_Callback_0_(mthis) => mthis.callMethod("uniform1fv", []);
+  uniform1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", []);
 
-  uniform1fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform1fv", [__arg_0]);
+  uniform1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", [__arg_0]);
 
-  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform1fv", [__arg_0, __arg_1]);
+  uniform1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1fv", [__arg_0, __arg_1]);
 
-  uniform1i_Callback_0_(mthis) => mthis.callMethod("uniform1i", []);
+  uniform1i_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", []);
 
-  uniform1i_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform1i", [__arg_0]);
+  uniform1i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", [__arg_0]);
 
-  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform1i", [__arg_0, __arg_1]);
+  uniform1i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1i", [__arg_0, __arg_1]);
 
-  uniform1iv_Callback_0_(mthis) => mthis.callMethod("uniform1iv", []);
+  uniform1iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", []);
 
-  uniform1iv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform1iv", [__arg_0]);
+  uniform1iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", [__arg_0]);
 
-  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform1iv", [__arg_0, __arg_1]);
+  uniform1iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform1iv", [__arg_0, __arg_1]);
 
-  uniform2f_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform2f", [__arg_0]);
+  uniform2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0]);
 
-  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform2f", [__arg_0, __arg_1]);
+  uniform2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0, __arg_1]);
 
-  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform2f", [__arg_0, __arg_1, __arg_2]);
+  uniform2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform2f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform2fv_Callback_0_(mthis) => mthis.callMethod("uniform2fv", []);
+  uniform2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", []);
 
-  uniform2fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform2fv", [__arg_0]);
+  uniform2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", [__arg_0]);
 
-  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform2fv", [__arg_0, __arg_1]);
+  uniform2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2fv", [__arg_0, __arg_1]);
 
-  uniform2i_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform2i", [__arg_0]);
+  uniform2i_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0]);
 
-  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform2i", [__arg_0, __arg_1]);
+  uniform2i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0, __arg_1]);
 
-  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform2i", [__arg_0, __arg_1, __arg_2]);
+  uniform2i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform2i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform2iv_Callback_0_(mthis) => mthis.callMethod("uniform2iv", []);
+  uniform2iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", []);
 
-  uniform2iv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform2iv", [__arg_0]);
+  uniform2iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", [__arg_0]);
 
-  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform2iv", [__arg_0, __arg_1]);
+  uniform2iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform2iv", [__arg_0, __arg_1]);
 
-  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform3f", [__arg_0, __arg_1]);
+  uniform3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3f", [__arg_0, __arg_1]);
 
-  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform3f", [__arg_0, __arg_1, __arg_2]);
+  uniform3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform3f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("uniform3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("uniform3fv", []);
+  uniform3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", []);
 
-  uniform3fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform3fv", [__arg_0]);
+  uniform3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", [__arg_0]);
 
-  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform3fv", [__arg_0, __arg_1]);
+  uniform3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3fv", [__arg_0, __arg_1]);
 
-  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform3i", [__arg_0, __arg_1]);
+  uniform3i_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3i", [__arg_0, __arg_1]);
 
-  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform3i", [__arg_0, __arg_1, __arg_2]);
+  uniform3i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform3i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform3i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("uniform3i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("uniform3iv", []);
+  uniform3iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", []);
 
-  uniform3iv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform3iv", [__arg_0]);
+  uniform3iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", [__arg_0]);
 
-  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform3iv", [__arg_0, __arg_1]);
+  uniform3iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform3iv", [__arg_0, __arg_1]);
 
-  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform4f", [__arg_0, __arg_1, __arg_2]);
+  uniform4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform4f", [__arg_0, __arg_1, __arg_2]);
 
-  uniform4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  uniform4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("uniform4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_0_(mthis) => mthis.callMethod("uniform4fv", []);
+  uniform4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", []);
 
-  uniform4fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform4fv", [__arg_0]);
+  uniform4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", [__arg_0]);
 
-  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform4fv", [__arg_0, __arg_1]);
+  uniform4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform4fv", [__arg_0, __arg_1]);
 
-  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniform4i", [__arg_0, __arg_1, __arg_2]);
+  uniform4i_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniform4i", [__arg_0, __arg_1, __arg_2]);
 
-  uniform4i_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  uniform4i_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("uniform4i", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_0_(mthis) => mthis.callMethod("uniform4iv", []);
+  uniform4iv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", []);
 
-  uniform4iv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniform4iv", [__arg_0]);
+  uniform4iv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", [__arg_0]);
 
-  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniform4iv", [__arg_0, __arg_1]);
+  uniform4iv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniform4iv", [__arg_0, __arg_1]);
 
-  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniformMatrix2fv", [__arg_0]);
+  uniformMatrix2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0]);
 
-  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniformMatrix2fv", [__arg_0, __arg_1]);
+  uniformMatrix2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0, __arg_1]);
 
-  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
+  uniformMatrix2fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix2fv", [__arg_0, __arg_1, __arg_2]);
 
-  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniformMatrix3fv", [__arg_0]);
+  uniformMatrix3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0]);
 
-  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniformMatrix3fv", [__arg_0, __arg_1]);
+  uniformMatrix3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0, __arg_1]);
 
-  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
+  uniformMatrix3fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix3fv", [__arg_0, __arg_1, __arg_2]);
 
-  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("uniformMatrix4fv", [__arg_0]);
+  uniformMatrix4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0]);
 
-  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("uniformMatrix4fv", [__arg_0, __arg_1]);
+  uniformMatrix4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0, __arg_1]);
 
-  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
+  uniformMatrix4fv_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "uniformMatrix4fv", [__arg_0, __arg_1, __arg_2]);
 
-  useProgram_Callback_0_(mthis) => mthis.callMethod("useProgram", []);
+  useProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "useProgram", []);
 
-  useProgram_Callback_1_(mthis, __arg_0) => mthis.callMethod("useProgram", [__arg_0]);
+  useProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "useProgram", [__arg_0]);
 
-  validateProgram_Callback_0_(mthis) => mthis.callMethod("validateProgram", []);
+  validateProgram_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "validateProgram", []);
 
-  validateProgram_Callback_1_(mthis, __arg_0) => mthis.callMethod("validateProgram", [__arg_0]);
+  validateProgram_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "validateProgram", [__arg_0]);
 
-  vertexAttrib1f_Callback_0_(mthis) => mthis.callMethod("vertexAttrib1f", []);
+  vertexAttrib1f_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", []);
 
-  vertexAttrib1f_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib1f", [__arg_0]);
+  vertexAttrib1f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", [__arg_0]);
 
-  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib1f", [__arg_0, __arg_1]);
+  vertexAttrib1f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1f", [__arg_0, __arg_1]);
 
-  vertexAttrib1fv_Callback_0_(mthis) => mthis.callMethod("vertexAttrib1fv", []);
+  vertexAttrib1fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", []);
 
-  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib1fv", [__arg_0]);
+  vertexAttrib1fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", [__arg_0]);
 
-  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib1fv", [__arg_0, __arg_1]);
+  vertexAttrib1fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib1fv", [__arg_0, __arg_1]);
 
-  vertexAttrib2f_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib2f", [__arg_0]);
+  vertexAttrib2f_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0]);
 
-  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib2f", [__arg_0, __arg_1]);
+  vertexAttrib2f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0, __arg_1]);
 
-  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib2f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib2fv_Callback_0_(mthis) => mthis.callMethod("vertexAttrib2fv", []);
+  vertexAttrib2fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", []);
 
-  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib2fv", [__arg_0]);
+  vertexAttrib2fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", [__arg_0]);
 
-  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib2fv", [__arg_0, __arg_1]);
+  vertexAttrib2fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib2fv", [__arg_0, __arg_1]);
 
-  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib3f", [__arg_0, __arg_1]);
+  vertexAttrib3f_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3f", [__arg_0, __arg_1]);
 
-  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib3f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib3f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("vertexAttrib3f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_0_(mthis) => mthis.callMethod("vertexAttrib3fv", []);
+  vertexAttrib3fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", []);
 
-  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib3fv", [__arg_0]);
+  vertexAttrib3fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", [__arg_0]);
 
-  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib3fv", [__arg_0, __arg_1]);
+  vertexAttrib3fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib3fv", [__arg_0, __arg_1]);
 
-  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
+  vertexAttrib4f_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4f", [__arg_0, __arg_1, __arg_2]);
 
-  vertexAttrib4f_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  vertexAttrib4f_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("vertexAttrib4f", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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_0_(mthis) => mthis.callMethod("vertexAttrib4fv", []);
+  vertexAttrib4fv_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", []);
 
-  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => mthis.callMethod("vertexAttrib4fv", [__arg_0]);
+  vertexAttrib4fv_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", [__arg_0]);
 
-  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("vertexAttrib4fv", [__arg_0, __arg_1]);
+  vertexAttrib4fv_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "vertexAttrib4fv", [__arg_0, __arg_1]);
 
-  vertexAttribPointer_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  vertexAttribPointer_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("vertexAttribPointer", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("viewport", [__arg_0, __arg_1]);
+  viewport_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "viewport", [__arg_0, __arg_1]);
 
-  viewport_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("viewport", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("viewport", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
 }
 
@@ -15744,11 +15745,11 @@
 class BlinkWebGLShaderPrecisionFormat {
   static final instance = new BlinkWebGLShaderPrecisionFormat();
 
-  precision_Getter_(mthis) => mthis["precision"];
+  precision_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "precision");
 
-  rangeMax_Getter_(mthis) => mthis["rangeMax"];
+  rangeMax_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeMax");
 
-  rangeMin_Getter_(mthis) => mthis["rangeMin"];
+  rangeMin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "rangeMin");
 
 }
 
@@ -15770,985 +15771,985 @@
 class BlinkWebKitAnimationEvent extends BlinkEvent {
   static final instance = new BlinkWebKitAnimationEvent();
 
-  animationName_Getter_(mthis) => mthis["animationName"];
+  animationName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "animationName");
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["WebKitAnimationEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitAnimationEvent"), [__arg_0, __arg_1]);
 
-  elapsedTime_Getter_(mthis) => mthis["elapsedTime"];
+  elapsedTime_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "elapsedTime");
 
 }
 
 class BlinkWebKitCSSFilterRule extends BlinkCSSRule {
   static final instance = new BlinkWebKitCSSFilterRule();
 
-  style_Getter_(mthis) => mthis["style"];
+  style_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "style");
 
 }
 
 class BlinkWebKitCSSFilterValue extends BlinkCSSValueList {
   static final instance = new BlinkWebKitCSSFilterValue();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  operationType_Getter_(mthis) => mthis["operationType"];
+  operationType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operationType");
 
 }
 
 class BlinkWebKitCSSMatrix {
   static final instance = new BlinkWebKitCSSMatrix();
 
-  a_Getter_(mthis) => mthis["a"];
+  a_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "a");
 
   a_Setter_(mthis, __arg_0) => mthis["a"] = __arg_0;
 
-  b_Getter_(mthis) => mthis["b"];
+  b_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "b");
 
   b_Setter_(mthis, __arg_0) => mthis["b"] = __arg_0;
 
-  c_Getter_(mthis) => mthis["c"];
+  c_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "c");
 
   c_Setter_(mthis, __arg_0) => mthis["c"] = __arg_0;
 
-  constructorCallback_0_() => new js.JsObject(js.context["WebKitCSSMatrix"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitCSSMatrix"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["WebKitCSSMatrix"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebKitCSSMatrix"), [__arg_0]);
 
-  d_Getter_(mthis) => mthis["d"];
+  d_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "d");
 
   d_Setter_(mthis, __arg_0) => mthis["d"] = __arg_0;
 
-  e_Getter_(mthis) => mthis["e"];
+  e_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "e");
 
   e_Setter_(mthis, __arg_0) => mthis["e"] = __arg_0;
 
-  f_Getter_(mthis) => mthis["f"];
+  f_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "f");
 
   f_Setter_(mthis, __arg_0) => mthis["f"] = __arg_0;
 
-  inverse_Callback_0_(mthis) => mthis.callMethod("inverse", []);
+  inverse_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "inverse", []);
 
-  m11_Getter_(mthis) => mthis["m11"];
+  m11_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m11");
 
   m11_Setter_(mthis, __arg_0) => mthis["m11"] = __arg_0;
 
-  m12_Getter_(mthis) => mthis["m12"];
+  m12_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m12");
 
   m12_Setter_(mthis, __arg_0) => mthis["m12"] = __arg_0;
 
-  m13_Getter_(mthis) => mthis["m13"];
+  m13_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m13");
 
   m13_Setter_(mthis, __arg_0) => mthis["m13"] = __arg_0;
 
-  m14_Getter_(mthis) => mthis["m14"];
+  m14_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m14");
 
   m14_Setter_(mthis, __arg_0) => mthis["m14"] = __arg_0;
 
-  m21_Getter_(mthis) => mthis["m21"];
+  m21_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m21");
 
   m21_Setter_(mthis, __arg_0) => mthis["m21"] = __arg_0;
 
-  m22_Getter_(mthis) => mthis["m22"];
+  m22_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m22");
 
   m22_Setter_(mthis, __arg_0) => mthis["m22"] = __arg_0;
 
-  m23_Getter_(mthis) => mthis["m23"];
+  m23_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m23");
 
   m23_Setter_(mthis, __arg_0) => mthis["m23"] = __arg_0;
 
-  m24_Getter_(mthis) => mthis["m24"];
+  m24_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m24");
 
   m24_Setter_(mthis, __arg_0) => mthis["m24"] = __arg_0;
 
-  m31_Getter_(mthis) => mthis["m31"];
+  m31_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m31");
 
   m31_Setter_(mthis, __arg_0) => mthis["m31"] = __arg_0;
 
-  m32_Getter_(mthis) => mthis["m32"];
+  m32_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m32");
 
   m32_Setter_(mthis, __arg_0) => mthis["m32"] = __arg_0;
 
-  m33_Getter_(mthis) => mthis["m33"];
+  m33_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m33");
 
   m33_Setter_(mthis, __arg_0) => mthis["m33"] = __arg_0;
 
-  m34_Getter_(mthis) => mthis["m34"];
+  m34_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m34");
 
   m34_Setter_(mthis, __arg_0) => mthis["m34"] = __arg_0;
 
-  m41_Getter_(mthis) => mthis["m41"];
+  m41_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m41");
 
   m41_Setter_(mthis, __arg_0) => mthis["m41"] = __arg_0;
 
-  m42_Getter_(mthis) => mthis["m42"];
+  m42_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m42");
 
   m42_Setter_(mthis, __arg_0) => mthis["m42"] = __arg_0;
 
-  m43_Getter_(mthis) => mthis["m43"];
+  m43_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m43");
 
   m43_Setter_(mthis, __arg_0) => mthis["m43"] = __arg_0;
 
-  m44_Getter_(mthis) => mthis["m44"];
+  m44_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "m44");
 
   m44_Setter_(mthis, __arg_0) => mthis["m44"] = __arg_0;
 
-  multiply_Callback_0_(mthis) => mthis.callMethod("multiply", []);
+  multiply_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "multiply", []);
 
-  multiply_Callback_1_(mthis, __arg_0) => mthis.callMethod("multiply", [__arg_0]);
+  multiply_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "multiply", [__arg_0]);
 
-  rotateAxisAngle_Callback_0_(mthis) => mthis.callMethod("rotateAxisAngle", []);
+  rotateAxisAngle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", []);
 
-  rotateAxisAngle_Callback_1_(mthis, __arg_0) => mthis.callMethod("rotateAxisAngle", [__arg_0]);
+  rotateAxisAngle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotateAxisAngle", [__arg_0]);
 
-  rotateAxisAngle_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("rotateAxisAngle", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("rotateAxisAngle", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("rotateAxisAngle", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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) => mthis.callMethod("rotate", []);
+  rotate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "rotate", []);
 
-  rotate_Callback_1_(mthis, __arg_0) => mthis.callMethod("rotate", [__arg_0]);
+  rotate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "rotate", [__arg_0]);
 
-  rotate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("rotate", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("rotate", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("scale", []);
+  scale_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scale", []);
 
-  scale_Callback_1_(mthis, __arg_0) => mthis.callMethod("scale", [__arg_0]);
+  scale_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scale", [__arg_0]);
 
-  scale_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scale", [__arg_0, __arg_1]);
+  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) => mthis.callMethod("scale", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("setMatrixValue", []);
+  setMatrixValue_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setMatrixValue", []);
 
-  setMatrixValue_Callback_1_(mthis, __arg_0) => mthis.callMethod("setMatrixValue", [__arg_0]);
+  setMatrixValue_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setMatrixValue", [__arg_0]);
 
-  skewX_Callback_0_(mthis) => mthis.callMethod("skewX", []);
+  skewX_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewX", []);
 
-  skewX_Callback_1_(mthis, __arg_0) => mthis.callMethod("skewX", [__arg_0]);
+  skewX_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewX", [__arg_0]);
 
-  skewY_Callback_0_(mthis) => mthis.callMethod("skewY", []);
+  skewY_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "skewY", []);
 
-  skewY_Callback_1_(mthis, __arg_0) => mthis.callMethod("skewY", [__arg_0]);
+  skewY_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "skewY", [__arg_0]);
 
-  translate_Callback_0_(mthis) => mthis.callMethod("translate", []);
+  translate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "translate", []);
 
-  translate_Callback_1_(mthis, __arg_0) => mthis.callMethod("translate", [__arg_0]);
+  translate_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0]);
 
-  translate_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("translate", [__arg_0, __arg_1]);
+  translate_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1]);
 
-  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("translate", [__arg_0, __arg_1, __arg_2]);
+  translate_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "translate", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkWebKitCSSTransformValue extends BlinkCSSValueList {
   static final instance = new BlinkWebKitCSSTransformValue();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  operationType_Getter_(mthis) => mthis["operationType"];
+  operationType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "operationType");
 
 }
 
 class BlinkWebKitGamepad {
   static final instance = new BlinkWebKitGamepad();
 
-  axes_Getter_(mthis) => mthis["axes"];
+  axes_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "axes");
 
-  buttons_Getter_(mthis) => mthis["buttons"];
+  buttons_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "buttons");
 
-  connected_Getter_(mthis) => mthis["connected"];
+  connected_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connected");
 
-  id_Getter_(mthis) => mthis["id"];
+  id_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "id");
 
-  index_Getter_(mthis) => mthis["index"];
+  index_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "index");
 
-  mapping_Getter_(mthis) => mthis["mapping"];
+  mapping_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "mapping");
 
-  timestamp_Getter_(mthis) => mthis["timestamp"];
+  timestamp_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timestamp");
 
 }
 
 class BlinkWebKitGamepadList {
   static final instance = new BlinkWebKitGamepadList();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  item_Callback_0_(mthis) => mthis.callMethod("item", []);
+  item_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "item", []);
 
-  item_Callback_1_(mthis, __arg_0) => mthis.callMethod("item", [__arg_0]);
+  item_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "item", [__arg_0]);
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
 }
 
 class BlinkWebSocket extends BlinkEventTarget {
   static final instance = new BlinkWebSocket();
 
-  URL_Getter_(mthis) => mthis["URL"];
+  URL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "URL");
 
-  binaryType_Getter_(mthis) => mthis["binaryType"];
+  binaryType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "binaryType");
 
   binaryType_Setter_(mthis, __arg_0) => mthis["binaryType"] = __arg_0;
 
-  bufferedAmount_Getter_(mthis) => mthis["bufferedAmount"];
+  bufferedAmount_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "bufferedAmount");
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  close_Callback_1_(mthis, __arg_0) => mthis.callMethod("close", [__arg_0]);
+  close_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0]);
 
-  close_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("close", [__arg_0, __arg_1]);
+  close_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "close", [__arg_0, __arg_1]);
 
-  constructorCallback_0_() => new js.JsObject(js.context["WebSocket"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["WebSocket"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), [__arg_0]);
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["WebSocket"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WebSocket"), [__arg_0, __arg_1]);
 
-  extensions_Getter_(mthis) => mthis["extensions"];
+  extensions_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "extensions");
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onopen_Getter_(mthis) => mthis["onopen"];
+  onopen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onopen");
 
   onopen_Setter_(mthis, __arg_0) => mthis["onopen"] = __arg_0;
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  send_Callback_0_(mthis) => mthis.callMethod("send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => mthis.callMethod("send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
 
-  url_Getter_(mthis) => mthis["url"];
+  url_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "url");
 
 }
 
 class BlinkWheelEvent extends BlinkMouseEvent {
   static final instance = new BlinkWheelEvent();
 
-  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(js.context["WheelEvent"], [__arg_0, __arg_1]);
+  constructorCallback_2_(__arg_0, __arg_1) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "WheelEvent"), [__arg_0, __arg_1]);
 
-  deltaMode_Getter_(mthis) => mthis["deltaMode"];
+  deltaMode_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaMode");
 
-  deltaX_Getter_(mthis) => mthis["deltaX"];
+  deltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaX");
 
-  deltaY_Getter_(mthis) => mthis["deltaY"];
+  deltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaY");
 
-  deltaZ_Getter_(mthis) => mthis["deltaZ"];
+  deltaZ_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "deltaZ");
 
-  wheelDeltaX_Getter_(mthis) => mthis["wheelDeltaX"];
+  wheelDeltaX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wheelDeltaX");
 
-  wheelDeltaY_Getter_(mthis) => mthis["wheelDeltaY"];
+  wheelDeltaY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "wheelDeltaY");
 
 }
 
 class BlinkWindow extends BlinkEventTarget {
   static final instance = new BlinkWindow();
 
-  $__getter___Callback_1_(mthis, __arg_0) => mthis.callMethod("__getter__", [__arg_0]);
+  $__getter___Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "__getter__", [__arg_0]);
 
-  CSS_Getter_(mthis) => mthis["CSS"];
+  CSS_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "CSS");
 
-  alert_Callback_0_(mthis) => mthis.callMethod("alert", []);
+  alert_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "alert", []);
 
-  alert_Callback_1_(mthis, __arg_0) => mthis.callMethod("alert", [__arg_0]);
+  alert_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "alert", [__arg_0]);
 
-  applicationCache_Getter_(mthis) => mthis["applicationCache"];
+  applicationCache_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "applicationCache");
 
-  atob_Callback_0_(mthis) => mthis.callMethod("atob", []);
+  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "atob", []);
 
-  atob_Callback_1_(mthis, __arg_0) => mthis.callMethod("atob", [__arg_0]);
+  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "atob", [__arg_0]);
 
-  blur_Callback_0_(mthis) => mthis.callMethod("blur", []);
+  blur_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "blur", []);
 
-  btoa_Callback_0_(mthis) => mthis.callMethod("btoa", []);
+  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "btoa", []);
 
-  btoa_Callback_1_(mthis, __arg_0) => mthis.callMethod("btoa", [__arg_0]);
+  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "btoa", [__arg_0]);
 
-  cancelAnimationFrame_Callback_0_(mthis) => mthis.callMethod("cancelAnimationFrame", []);
+  cancelAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "cancelAnimationFrame", []);
 
-  cancelAnimationFrame_Callback_1_(mthis, __arg_0) => mthis.callMethod("cancelAnimationFrame", [__arg_0]);
+  cancelAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "cancelAnimationFrame", [__arg_0]);
 
-  captureEvents_Callback_0_(mthis) => mthis.callMethod("captureEvents", []);
+  captureEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "captureEvents", []);
 
-  clearInterval_Callback_0_(mthis) => mthis.callMethod("clearInterval", []);
+  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", []);
 
-  clearInterval_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearInterval", [__arg_0]);
+  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", [__arg_0]);
 
-  clearTimeout_Callback_0_(mthis) => mthis.callMethod("clearTimeout", []);
+  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", []);
 
-  clearTimeout_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearTimeout", [__arg_0]);
+  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", [__arg_0]);
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  closed_Getter_(mthis) => mthis["closed"];
+  closed_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "closed");
 
-  confirm_Callback_0_(mthis) => mthis.callMethod("confirm", []);
+  confirm_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "confirm", []);
 
-  confirm_Callback_1_(mthis, __arg_0) => mthis.callMethod("confirm", [__arg_0]);
+  confirm_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "confirm", [__arg_0]);
 
-  console_Getter_(mthis) => mthis["console"];
+  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "console");
 
-  crypto_Getter_(mthis) => mthis["crypto"];
+  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crypto");
 
-  defaultStatus_Getter_(mthis) => mthis["defaultStatus"];
+  defaultStatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultStatus");
 
   defaultStatus_Setter_(mthis, __arg_0) => mthis["defaultStatus"] = __arg_0;
 
-  defaultstatus_Getter_(mthis) => mthis["defaultstatus"];
+  defaultstatus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "defaultstatus");
 
   defaultstatus_Setter_(mthis, __arg_0) => mthis["defaultstatus"] = __arg_0;
 
-  devicePixelRatio_Getter_(mthis) => mthis["devicePixelRatio"];
+  devicePixelRatio_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "devicePixelRatio");
 
-  document_Getter_(mthis) => mthis["document"];
+  document_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "document");
 
-  event_Getter_(mthis) => mthis["event"];
+  event_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "event");
 
   event_Setter_(mthis, __arg_0) => mthis["event"] = __arg_0;
 
-  find_Callback_0_(mthis) => mthis.callMethod("find", []);
+  find_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "find", []);
 
-  find_Callback_1_(mthis, __arg_0) => mthis.callMethod("find", [__arg_0]);
+  find_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0]);
 
-  find_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("find", [__arg_0, __arg_1]);
+  find_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1]);
 
-  find_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("find", [__arg_0, __arg_1, __arg_2]);
+  find_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "find", [__arg_0, __arg_1, __arg_2]);
 
-  find_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("find", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  find_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  find_Callback_6_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5) => mthis.callMethod("find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5]);
+  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]);
 
-  find_Callback_7_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6) => mthis.callMethod("find", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4, __arg_5, __arg_6]);
+  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]);
 
-  focus_Callback_0_(mthis) => mthis.callMethod("focus", []);
+  focus_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "focus", []);
 
-  frameElement_Getter_(mthis) => mthis["frameElement"];
+  frameElement_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frameElement");
 
-  frames_Getter_(mthis) => mthis["frames"];
+  frames_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "frames");
 
-  getComputedStyle_Callback_0_(mthis) => mthis.callMethod("getComputedStyle", []);
+  getComputedStyle_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", []);
 
-  getComputedStyle_Callback_1_(mthis, __arg_0) => mthis.callMethod("getComputedStyle", [__arg_0]);
+  getComputedStyle_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", [__arg_0]);
 
-  getComputedStyle_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getComputedStyle", [__arg_0, __arg_1]);
+  getComputedStyle_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getComputedStyle", [__arg_0, __arg_1]);
 
-  getMatchedCSSRules_Callback_0_(mthis) => mthis.callMethod("getMatchedCSSRules", []);
+  getMatchedCSSRules_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", []);
 
-  getMatchedCSSRules_Callback_1_(mthis, __arg_0) => mthis.callMethod("getMatchedCSSRules", [__arg_0]);
+  getMatchedCSSRules_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", [__arg_0]);
 
-  getMatchedCSSRules_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getMatchedCSSRules", [__arg_0, __arg_1]);
+  getMatchedCSSRules_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getMatchedCSSRules", [__arg_0, __arg_1]);
 
-  getSelection_Callback_0_(mthis) => mthis.callMethod("getSelection", []);
+  getSelection_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getSelection", []);
 
-  history_Getter_(mthis) => mthis["history"];
+  history_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "history");
 
-  indexedDB_Getter_(mthis) => mthis["indexedDB"];
+  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexedDB");
 
-  innerHeight_Getter_(mthis) => mthis["innerHeight"];
+  innerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerHeight");
 
-  innerWidth_Getter_(mthis) => mthis["innerWidth"];
+  innerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "innerWidth");
 
-  length_Getter_(mthis) => mthis["length"];
+  length_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "length");
 
-  localStorage_Getter_(mthis) => mthis["localStorage"];
+  localStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "localStorage");
 
-  location_Getter_(mthis) => mthis["location"];
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
 
   location_Setter_(mthis, __arg_0) => mthis["location"] = __arg_0;
 
-  locationbar_Getter_(mthis) => mthis["locationbar"];
+  locationbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "locationbar");
 
-  matchMedia_Callback_0_(mthis) => mthis.callMethod("matchMedia", []);
+  matchMedia_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "matchMedia", []);
 
-  matchMedia_Callback_1_(mthis, __arg_0) => mthis.callMethod("matchMedia", [__arg_0]);
+  matchMedia_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "matchMedia", [__arg_0]);
 
-  menubar_Getter_(mthis) => mthis["menubar"];
+  menubar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "menubar");
 
-  moveBy_Callback_0_(mthis) => mthis.callMethod("moveBy", []);
+  moveBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", []);
 
-  moveBy_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveBy", [__arg_0]);
+  moveBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", [__arg_0]);
 
-  moveBy_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveBy", [__arg_0, __arg_1]);
+  moveBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveBy", [__arg_0, __arg_1]);
 
-  moveTo_Callback_0_(mthis) => mthis.callMethod("moveTo", []);
+  moveTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", []);
 
-  moveTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("moveTo", [__arg_0]);
+  moveTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0]);
 
-  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("moveTo", [__arg_0, __arg_1]);
+  moveTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "moveTo", [__arg_0, __arg_1]);
 
-  name_Getter_(mthis) => mthis["name"];
+  name_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "name");
 
   name_Setter_(mthis, __arg_0) => mthis["name"] = __arg_0;
 
-  navigator_Getter_(mthis) => mthis["navigator"];
+  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigator");
 
-  offscreenBuffering_Getter_(mthis) => mthis["offscreenBuffering"];
+  offscreenBuffering_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "offscreenBuffering");
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onanimationend_Getter_(mthis) => mthis["onanimationend"];
+  onanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationend");
 
   onanimationend_Setter_(mthis, __arg_0) => mthis["onanimationend"] = __arg_0;
 
-  onanimationiteration_Getter_(mthis) => mthis["onanimationiteration"];
+  onanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationiteration");
 
   onanimationiteration_Setter_(mthis, __arg_0) => mthis["onanimationiteration"] = __arg_0;
 
-  onanimationstart_Getter_(mthis) => mthis["onanimationstart"];
+  onanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onanimationstart");
 
   onanimationstart_Setter_(mthis, __arg_0) => mthis["onanimationstart"] = __arg_0;
 
-  onautocomplete_Getter_(mthis) => mthis["onautocomplete"];
+  onautocomplete_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocomplete");
 
   onautocomplete_Setter_(mthis, __arg_0) => mthis["onautocomplete"] = __arg_0;
 
-  onautocompleteerror_Getter_(mthis) => mthis["onautocompleteerror"];
+  onautocompleteerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onautocompleteerror");
 
   onautocompleteerror_Setter_(mthis, __arg_0) => mthis["onautocompleteerror"] = __arg_0;
 
-  onbeforeunload_Getter_(mthis) => mthis["onbeforeunload"];
+  onbeforeunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onbeforeunload");
 
   onbeforeunload_Setter_(mthis, __arg_0) => mthis["onbeforeunload"] = __arg_0;
 
-  onblur_Getter_(mthis) => mthis["onblur"];
+  onblur_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onblur");
 
   onblur_Setter_(mthis, __arg_0) => mthis["onblur"] = __arg_0;
 
-  oncancel_Getter_(mthis) => mthis["oncancel"];
+  oncancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncancel");
 
   oncancel_Setter_(mthis, __arg_0) => mthis["oncancel"] = __arg_0;
 
-  oncanplay_Getter_(mthis) => mthis["oncanplay"];
+  oncanplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplay");
 
   oncanplay_Setter_(mthis, __arg_0) => mthis["oncanplay"] = __arg_0;
 
-  oncanplaythrough_Getter_(mthis) => mthis["oncanplaythrough"];
+  oncanplaythrough_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncanplaythrough");
 
   oncanplaythrough_Setter_(mthis, __arg_0) => mthis["oncanplaythrough"] = __arg_0;
 
-  onchange_Getter_(mthis) => mthis["onchange"];
+  onchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onchange");
 
   onchange_Setter_(mthis, __arg_0) => mthis["onchange"] = __arg_0;
 
-  onclick_Getter_(mthis) => mthis["onclick"];
+  onclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclick");
 
   onclick_Setter_(mthis, __arg_0) => mthis["onclick"] = __arg_0;
 
-  onclose_Getter_(mthis) => mthis["onclose"];
+  onclose_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onclose");
 
   onclose_Setter_(mthis, __arg_0) => mthis["onclose"] = __arg_0;
 
-  oncontextmenu_Getter_(mthis) => mthis["oncontextmenu"];
+  oncontextmenu_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncontextmenu");
 
   oncontextmenu_Setter_(mthis, __arg_0) => mthis["oncontextmenu"] = __arg_0;
 
-  oncuechange_Getter_(mthis) => mthis["oncuechange"];
+  oncuechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oncuechange");
 
   oncuechange_Setter_(mthis, __arg_0) => mthis["oncuechange"] = __arg_0;
 
-  ondblclick_Getter_(mthis) => mthis["ondblclick"];
+  ondblclick_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondblclick");
 
   ondblclick_Setter_(mthis, __arg_0) => mthis["ondblclick"] = __arg_0;
 
-  ondevicelight_Getter_(mthis) => mthis["ondevicelight"];
+  ondevicelight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondevicelight");
 
   ondevicelight_Setter_(mthis, __arg_0) => mthis["ondevicelight"] = __arg_0;
 
-  ondevicemotion_Getter_(mthis) => mthis["ondevicemotion"];
+  ondevicemotion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondevicemotion");
 
   ondevicemotion_Setter_(mthis, __arg_0) => mthis["ondevicemotion"] = __arg_0;
 
-  ondeviceorientation_Getter_(mthis) => mthis["ondeviceorientation"];
+  ondeviceorientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondeviceorientation");
 
   ondeviceorientation_Setter_(mthis, __arg_0) => mthis["ondeviceorientation"] = __arg_0;
 
-  ondrag_Getter_(mthis) => mthis["ondrag"];
+  ondrag_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrag");
 
   ondrag_Setter_(mthis, __arg_0) => mthis["ondrag"] = __arg_0;
 
-  ondragend_Getter_(mthis) => mthis["ondragend"];
+  ondragend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragend");
 
   ondragend_Setter_(mthis, __arg_0) => mthis["ondragend"] = __arg_0;
 
-  ondragenter_Getter_(mthis) => mthis["ondragenter"];
+  ondragenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragenter");
 
   ondragenter_Setter_(mthis, __arg_0) => mthis["ondragenter"] = __arg_0;
 
-  ondragleave_Getter_(mthis) => mthis["ondragleave"];
+  ondragleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragleave");
 
   ondragleave_Setter_(mthis, __arg_0) => mthis["ondragleave"] = __arg_0;
 
-  ondragover_Getter_(mthis) => mthis["ondragover"];
+  ondragover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragover");
 
   ondragover_Setter_(mthis, __arg_0) => mthis["ondragover"] = __arg_0;
 
-  ondragstart_Getter_(mthis) => mthis["ondragstart"];
+  ondragstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondragstart");
 
   ondragstart_Setter_(mthis, __arg_0) => mthis["ondragstart"] = __arg_0;
 
-  ondrop_Getter_(mthis) => mthis["ondrop"];
+  ondrop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondrop");
 
   ondrop_Setter_(mthis, __arg_0) => mthis["ondrop"] = __arg_0;
 
-  ondurationchange_Getter_(mthis) => mthis["ondurationchange"];
+  ondurationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ondurationchange");
 
   ondurationchange_Setter_(mthis, __arg_0) => mthis["ondurationchange"] = __arg_0;
 
-  onemptied_Getter_(mthis) => mthis["onemptied"];
+  onemptied_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onemptied");
 
   onemptied_Setter_(mthis, __arg_0) => mthis["onemptied"] = __arg_0;
 
-  onended_Getter_(mthis) => mthis["onended"];
+  onended_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onended");
 
   onended_Setter_(mthis, __arg_0) => mthis["onended"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onfocus_Getter_(mthis) => mthis["onfocus"];
+  onfocus_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onfocus");
 
   onfocus_Setter_(mthis, __arg_0) => mthis["onfocus"] = __arg_0;
 
-  onhashchange_Getter_(mthis) => mthis["onhashchange"];
+  onhashchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onhashchange");
 
   onhashchange_Setter_(mthis, __arg_0) => mthis["onhashchange"] = __arg_0;
 
-  oninput_Getter_(mthis) => mthis["oninput"];
+  oninput_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninput");
 
   oninput_Setter_(mthis, __arg_0) => mthis["oninput"] = __arg_0;
 
-  oninvalid_Getter_(mthis) => mthis["oninvalid"];
+  oninvalid_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "oninvalid");
 
   oninvalid_Setter_(mthis, __arg_0) => mthis["oninvalid"] = __arg_0;
 
-  onkeydown_Getter_(mthis) => mthis["onkeydown"];
+  onkeydown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeydown");
 
   onkeydown_Setter_(mthis, __arg_0) => mthis["onkeydown"] = __arg_0;
 
-  onkeypress_Getter_(mthis) => mthis["onkeypress"];
+  onkeypress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeypress");
 
   onkeypress_Setter_(mthis, __arg_0) => mthis["onkeypress"] = __arg_0;
 
-  onkeyup_Getter_(mthis) => mthis["onkeyup"];
+  onkeyup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onkeyup");
 
   onkeyup_Setter_(mthis, __arg_0) => mthis["onkeyup"] = __arg_0;
 
-  onlanguagechange_Getter_(mthis) => mthis["onlanguagechange"];
+  onlanguagechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onlanguagechange");
 
   onlanguagechange_Setter_(mthis, __arg_0) => mthis["onlanguagechange"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadeddata_Getter_(mthis) => mthis["onloadeddata"];
+  onloadeddata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadeddata");
 
   onloadeddata_Setter_(mthis, __arg_0) => mthis["onloadeddata"] = __arg_0;
 
-  onloadedmetadata_Getter_(mthis) => mthis["onloadedmetadata"];
+  onloadedmetadata_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadedmetadata");
 
   onloadedmetadata_Setter_(mthis, __arg_0) => mthis["onloadedmetadata"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  onmousedown_Getter_(mthis) => mthis["onmousedown"];
+  onmousedown_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousedown");
 
   onmousedown_Setter_(mthis, __arg_0) => mthis["onmousedown"] = __arg_0;
 
-  onmouseenter_Getter_(mthis) => mthis["onmouseenter"];
+  onmouseenter_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseenter");
 
   onmouseenter_Setter_(mthis, __arg_0) => mthis["onmouseenter"] = __arg_0;
 
-  onmouseleave_Getter_(mthis) => mthis["onmouseleave"];
+  onmouseleave_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseleave");
 
   onmouseleave_Setter_(mthis, __arg_0) => mthis["onmouseleave"] = __arg_0;
 
-  onmousemove_Getter_(mthis) => mthis["onmousemove"];
+  onmousemove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousemove");
 
   onmousemove_Setter_(mthis, __arg_0) => mthis["onmousemove"] = __arg_0;
 
-  onmouseout_Getter_(mthis) => mthis["onmouseout"];
+  onmouseout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseout");
 
   onmouseout_Setter_(mthis, __arg_0) => mthis["onmouseout"] = __arg_0;
 
-  onmouseover_Getter_(mthis) => mthis["onmouseover"];
+  onmouseover_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseover");
 
   onmouseover_Setter_(mthis, __arg_0) => mthis["onmouseover"] = __arg_0;
 
-  onmouseup_Getter_(mthis) => mthis["onmouseup"];
+  onmouseup_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmouseup");
 
   onmouseup_Setter_(mthis, __arg_0) => mthis["onmouseup"] = __arg_0;
 
-  onmousewheel_Getter_(mthis) => mthis["onmousewheel"];
+  onmousewheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmousewheel");
 
   onmousewheel_Setter_(mthis, __arg_0) => mthis["onmousewheel"] = __arg_0;
 
-  onoffline_Getter_(mthis) => mthis["onoffline"];
+  onoffline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onoffline");
 
   onoffline_Setter_(mthis, __arg_0) => mthis["onoffline"] = __arg_0;
 
-  ononline_Getter_(mthis) => mthis["ononline"];
+  ononline_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ononline");
 
   ononline_Setter_(mthis, __arg_0) => mthis["ononline"] = __arg_0;
 
-  onorientationchange_Getter_(mthis) => mthis["onorientationchange"];
+  onorientationchange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onorientationchange");
 
   onorientationchange_Setter_(mthis, __arg_0) => mthis["onorientationchange"] = __arg_0;
 
-  onpagehide_Getter_(mthis) => mthis["onpagehide"];
+  onpagehide_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpagehide");
 
   onpagehide_Setter_(mthis, __arg_0) => mthis["onpagehide"] = __arg_0;
 
-  onpageshow_Getter_(mthis) => mthis["onpageshow"];
+  onpageshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpageshow");
 
   onpageshow_Setter_(mthis, __arg_0) => mthis["onpageshow"] = __arg_0;
 
-  onpause_Getter_(mthis) => mthis["onpause"];
+  onpause_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpause");
 
   onpause_Setter_(mthis, __arg_0) => mthis["onpause"] = __arg_0;
 
-  onplay_Getter_(mthis) => mthis["onplay"];
+  onplay_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplay");
 
   onplay_Setter_(mthis, __arg_0) => mthis["onplay"] = __arg_0;
 
-  onplaying_Getter_(mthis) => mthis["onplaying"];
+  onplaying_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onplaying");
 
   onplaying_Setter_(mthis, __arg_0) => mthis["onplaying"] = __arg_0;
 
-  onpopstate_Getter_(mthis) => mthis["onpopstate"];
+  onpopstate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onpopstate");
 
   onpopstate_Setter_(mthis, __arg_0) => mthis["onpopstate"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  onratechange_Getter_(mthis) => mthis["onratechange"];
+  onratechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onratechange");
 
   onratechange_Setter_(mthis, __arg_0) => mthis["onratechange"] = __arg_0;
 
-  onreset_Getter_(mthis) => mthis["onreset"];
+  onreset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreset");
 
   onreset_Setter_(mthis, __arg_0) => mthis["onreset"] = __arg_0;
 
-  onresize_Getter_(mthis) => mthis["onresize"];
+  onresize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onresize");
 
   onresize_Setter_(mthis, __arg_0) => mthis["onresize"] = __arg_0;
 
-  onscroll_Getter_(mthis) => mthis["onscroll"];
+  onscroll_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onscroll");
 
   onscroll_Setter_(mthis, __arg_0) => mthis["onscroll"] = __arg_0;
 
-  onsearch_Getter_(mthis) => mthis["onsearch"];
+  onsearch_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsearch");
 
   onsearch_Setter_(mthis, __arg_0) => mthis["onsearch"] = __arg_0;
 
-  onseeked_Getter_(mthis) => mthis["onseeked"];
+  onseeked_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeked");
 
   onseeked_Setter_(mthis, __arg_0) => mthis["onseeked"] = __arg_0;
 
-  onseeking_Getter_(mthis) => mthis["onseeking"];
+  onseeking_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onseeking");
 
   onseeking_Setter_(mthis, __arg_0) => mthis["onseeking"] = __arg_0;
 
-  onselect_Getter_(mthis) => mthis["onselect"];
+  onselect_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onselect");
 
   onselect_Setter_(mthis, __arg_0) => mthis["onselect"] = __arg_0;
 
-  onshow_Getter_(mthis) => mthis["onshow"];
+  onshow_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onshow");
 
   onshow_Setter_(mthis, __arg_0) => mthis["onshow"] = __arg_0;
 
-  onstalled_Getter_(mthis) => mthis["onstalled"];
+  onstalled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstalled");
 
   onstalled_Setter_(mthis, __arg_0) => mthis["onstalled"] = __arg_0;
 
-  onstorage_Getter_(mthis) => mthis["onstorage"];
+  onstorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onstorage");
 
   onstorage_Setter_(mthis, __arg_0) => mthis["onstorage"] = __arg_0;
 
-  onsubmit_Getter_(mthis) => mthis["onsubmit"];
+  onsubmit_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsubmit");
 
   onsubmit_Setter_(mthis, __arg_0) => mthis["onsubmit"] = __arg_0;
 
-  onsuspend_Getter_(mthis) => mthis["onsuspend"];
+  onsuspend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onsuspend");
 
   onsuspend_Setter_(mthis, __arg_0) => mthis["onsuspend"] = __arg_0;
 
-  ontimeupdate_Getter_(mthis) => mthis["ontimeupdate"];
+  ontimeupdate_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeupdate");
 
   ontimeupdate_Setter_(mthis, __arg_0) => mthis["ontimeupdate"] = __arg_0;
 
-  ontoggle_Getter_(mthis) => mthis["ontoggle"];
+  ontoggle_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontoggle");
 
   ontoggle_Setter_(mthis, __arg_0) => mthis["ontoggle"] = __arg_0;
 
-  ontouchcancel_Getter_(mthis) => mthis["ontouchcancel"];
+  ontouchcancel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchcancel");
 
   ontouchcancel_Setter_(mthis, __arg_0) => mthis["ontouchcancel"] = __arg_0;
 
-  ontouchend_Getter_(mthis) => mthis["ontouchend"];
+  ontouchend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchend");
 
   ontouchend_Setter_(mthis, __arg_0) => mthis["ontouchend"] = __arg_0;
 
-  ontouchmove_Getter_(mthis) => mthis["ontouchmove"];
+  ontouchmove_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchmove");
 
   ontouchmove_Setter_(mthis, __arg_0) => mthis["ontouchmove"] = __arg_0;
 
-  ontouchstart_Getter_(mthis) => mthis["ontouchstart"];
+  ontouchstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontouchstart");
 
   ontouchstart_Setter_(mthis, __arg_0) => mthis["ontouchstart"] = __arg_0;
 
-  ontransitionend_Getter_(mthis) => mthis["ontransitionend"];
+  ontransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontransitionend");
 
   ontransitionend_Setter_(mthis, __arg_0) => mthis["ontransitionend"] = __arg_0;
 
-  onunload_Getter_(mthis) => mthis["onunload"];
+  onunload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onunload");
 
   onunload_Setter_(mthis, __arg_0) => mthis["onunload"] = __arg_0;
 
-  onvolumechange_Getter_(mthis) => mthis["onvolumechange"];
+  onvolumechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onvolumechange");
 
   onvolumechange_Setter_(mthis, __arg_0) => mthis["onvolumechange"] = __arg_0;
 
-  onwaiting_Getter_(mthis) => mthis["onwaiting"];
+  onwaiting_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwaiting");
 
   onwaiting_Setter_(mthis, __arg_0) => mthis["onwaiting"] = __arg_0;
 
-  onwebkitanimationend_Getter_(mthis) => mthis["onwebkitanimationend"];
+  onwebkitanimationend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationend");
 
   onwebkitanimationend_Setter_(mthis, __arg_0) => mthis["onwebkitanimationend"] = __arg_0;
 
-  onwebkitanimationiteration_Getter_(mthis) => mthis["onwebkitanimationiteration"];
+  onwebkitanimationiteration_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationiteration");
 
   onwebkitanimationiteration_Setter_(mthis, __arg_0) => mthis["onwebkitanimationiteration"] = __arg_0;
 
-  onwebkitanimationstart_Getter_(mthis) => mthis["onwebkitanimationstart"];
+  onwebkitanimationstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkitanimationstart");
 
   onwebkitanimationstart_Setter_(mthis, __arg_0) => mthis["onwebkitanimationstart"] = __arg_0;
 
-  onwebkittransitionend_Getter_(mthis) => mthis["onwebkittransitionend"];
+  onwebkittransitionend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwebkittransitionend");
 
   onwebkittransitionend_Setter_(mthis, __arg_0) => mthis["onwebkittransitionend"] = __arg_0;
 
-  onwheel_Getter_(mthis) => mthis["onwheel"];
+  onwheel_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onwheel");
 
   onwheel_Setter_(mthis, __arg_0) => mthis["onwheel"] = __arg_0;
 
-  openDatabase_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("openDatabase", [__arg_0, __arg_1]);
+  openDatabase_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1]);
 
-  openDatabase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("openDatabase", [__arg_0, __arg_1, __arg_2]);
+  openDatabase_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "openDatabase", [__arg_0, __arg_1, __arg_2]);
 
-  openDatabase_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  openDatabase_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("openDatabase", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  open_Callback_0_(mthis) => mthis.callMethod("open", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
 
-  open_Callback_1_(mthis, __arg_0) => mthis.callMethod("open", [__arg_0]);
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("open", [__arg_0, __arg_1]);
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
 
-  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("open", [__arg_0, __arg_1, __arg_2]);
+  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2]);
 
-  opener_Getter_(mthis) => mthis["opener"];
+  opener_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "opener");
 
   opener_Setter_(mthis, __arg_0) => mthis["opener"] = __arg_0;
 
-  orientation_Getter_(mthis) => mthis["orientation"];
+  orientation_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "orientation");
 
-  outerHeight_Getter_(mthis) => mthis["outerHeight"];
+  outerHeight_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerHeight");
 
-  outerWidth_Getter_(mthis) => mthis["outerWidth"];
+  outerWidth_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "outerWidth");
 
-  pageXOffset_Getter_(mthis) => mthis["pageXOffset"];
+  pageXOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageXOffset");
 
-  pageYOffset_Getter_(mthis) => mthis["pageYOffset"];
+  pageYOffset_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pageYOffset");
 
-  parent_Getter_(mthis) => mthis["parent"];
+  parent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "parent");
 
-  performance_Getter_(mthis) => mthis["performance"];
+  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "performance");
 
-  personalbar_Getter_(mthis) => mthis["personalbar"];
+  personalbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "personalbar");
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
 
-  postMessage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("postMessage", [__arg_0, __arg_1, __arg_2]);
+  postMessage_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1, __arg_2]);
 
-  print_Callback_0_(mthis) => mthis.callMethod("print", []);
+  print_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "print", []);
 
-  releaseEvents_Callback_0_(mthis) => mthis.callMethod("releaseEvents", []);
+  releaseEvents_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "releaseEvents", []);
 
-  requestAnimationFrame_Callback_0_(mthis) => mthis.callMethod("requestAnimationFrame", []);
+  requestAnimationFrame_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "requestAnimationFrame", []);
 
-  requestAnimationFrame_Callback_1_(mthis, __arg_0) => mthis.callMethod("requestAnimationFrame", [__arg_0]);
+  requestAnimationFrame_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "requestAnimationFrame", [__arg_0]);
 
-  resizeBy_Callback_0_(mthis) => mthis.callMethod("resizeBy", []);
+  resizeBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", []);
 
-  resizeBy_Callback_1_(mthis, __arg_0) => mthis.callMethod("resizeBy", [__arg_0]);
+  resizeBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", [__arg_0]);
 
-  resizeBy_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("resizeBy", [__arg_0, __arg_1]);
+  resizeBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "resizeBy", [__arg_0, __arg_1]);
 
-  resizeTo_Callback_0_(mthis) => mthis.callMethod("resizeTo", []);
+  resizeTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", []);
 
-  resizeTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("resizeTo", [__arg_0]);
+  resizeTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", [__arg_0]);
 
-  resizeTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("resizeTo", [__arg_0, __arg_1]);
+  resizeTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "resizeTo", [__arg_0, __arg_1]);
 
-  screenLeft_Getter_(mthis) => mthis["screenLeft"];
+  screenLeft_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenLeft");
 
-  screenTop_Getter_(mthis) => mthis["screenTop"];
+  screenTop_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenTop");
 
-  screenX_Getter_(mthis) => mthis["screenX"];
+  screenX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenX");
 
-  screenY_Getter_(mthis) => mthis["screenY"];
+  screenY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screenY");
 
-  screen_Getter_(mthis) => mthis["screen"];
+  screen_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "screen");
 
-  scrollBy_Callback_0_(mthis) => mthis.callMethod("scrollBy", []);
+  scrollBy_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", []);
 
-  scrollBy_Callback_1_(mthis, __arg_0) => mthis.callMethod("scrollBy", [__arg_0]);
+  scrollBy_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", [__arg_0]);
 
-  scrollBy_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scrollBy", [__arg_0, __arg_1]);
+  scrollBy_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scrollBy", [__arg_0, __arg_1]);
 
-  scrollBy_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scrollBy", [__arg_0, __arg_1, __arg_2]);
+  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) => mthis.callMethod("scrollTo", []);
+  scrollTo_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", []);
 
-  scrollTo_Callback_1_(mthis, __arg_0) => mthis.callMethod("scrollTo", [__arg_0]);
+  scrollTo_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0]);
 
-  scrollTo_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scrollTo", [__arg_0, __arg_1]);
+  scrollTo_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0, __arg_1]);
 
-  scrollTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scrollTo", [__arg_0, __arg_1, __arg_2]);
+  scrollTo_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scrollTo", [__arg_0, __arg_1, __arg_2]);
 
-  scrollX_Getter_(mthis) => mthis["scrollX"];
+  scrollX_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollX");
 
-  scrollY_Getter_(mthis) => mthis["scrollY"];
+  scrollY_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollY");
 
-  scroll_Callback_0_(mthis) => mthis.callMethod("scroll", []);
+  scroll_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "scroll", []);
 
-  scroll_Callback_1_(mthis, __arg_0) => mthis.callMethod("scroll", [__arg_0]);
+  scroll_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0]);
 
-  scroll_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("scroll", [__arg_0, __arg_1]);
+  scroll_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0, __arg_1]);
 
-  scroll_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("scroll", [__arg_0, __arg_1, __arg_2]);
+  scroll_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "scroll", [__arg_0, __arg_1, __arg_2]);
 
-  scrollbars_Getter_(mthis) => mthis["scrollbars"];
+  scrollbars_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "scrollbars");
 
-  self_Getter_(mthis) => mthis["self"];
+  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "self");
 
-  sessionStorage_Getter_(mthis) => mthis["sessionStorage"];
+  sessionStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "sessionStorage");
 
-  setInterval_Callback_0_(mthis) => mthis.callMethod("setInterval", []);
+  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", []);
 
-  setInterval_Callback_1_(mthis, __arg_0) => mthis.callMethod("setInterval", [__arg_0]);
+  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0]);
 
-  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setInterval", [__arg_0, __arg_1]);
+  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0, __arg_1]);
 
-  setTimeout_Callback_0_(mthis) => mthis.callMethod("setTimeout", []);
+  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", []);
 
-  setTimeout_Callback_1_(mthis, __arg_0) => mthis.callMethod("setTimeout", [__arg_0]);
+  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0]);
 
-  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setTimeout", [__arg_0, __arg_1]);
+  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0, __arg_1]);
 
-  showModalDialog_Callback_0_(mthis) => mthis.callMethod("showModalDialog", []);
+  showModalDialog_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", []);
 
-  showModalDialog_Callback_1_(mthis, __arg_0) => mthis.callMethod("showModalDialog", [__arg_0]);
+  showModalDialog_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0]);
 
-  showModalDialog_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("showModalDialog", [__arg_0, __arg_1]);
+  showModalDialog_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0, __arg_1]);
 
-  showModalDialog_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("showModalDialog", [__arg_0, __arg_1, __arg_2]);
+  showModalDialog_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "showModalDialog", [__arg_0, __arg_1, __arg_2]);
 
-  speechSynthesis_Getter_(mthis) => mthis["speechSynthesis"];
+  speechSynthesis_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "speechSynthesis");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
   status_Setter_(mthis, __arg_0) => mthis["status"] = __arg_0;
 
-  statusbar_Getter_(mthis) => mthis["statusbar"];
+  statusbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusbar");
 
-  stop_Callback_0_(mthis) => mthis.callMethod("stop", []);
+  stop_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "stop", []);
 
-  styleMedia_Getter_(mthis) => mthis["styleMedia"];
+  styleMedia_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "styleMedia");
 
-  toolbar_Getter_(mthis) => mthis["toolbar"];
+  toolbar_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "toolbar");
 
-  top_Getter_(mthis) => mthis["top"];
+  top_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "top");
 
-  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitRequestFileSystem", [__arg_0]);
+  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0]);
 
-  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1]);
+  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1]);
 
-  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
+  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
 
-  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => mthis.callMethod("webkitResolveLocalFileSystemURL", []);
+  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", []);
 
-  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0]);
+  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
+  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
 
-  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
+  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
 
-  webkitStorageInfo_Getter_(mthis) => mthis["webkitStorageInfo"];
+  webkitStorageInfo_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitStorageInfo");
 
-  window_Getter_(mthis) => mthis["window"];
+  window_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "window");
 
 }
 
 class BlinkWorker extends BlinkEventTarget {
   static final instance = new BlinkWorker();
 
-  constructorCallback_0_() => new js.JsObject(js.context["Worker"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Worker"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["Worker"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "Worker"), [__arg_0]);
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onmessage_Getter_(mthis) => mthis["onmessage"];
+  onmessage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onmessage");
 
   onmessage_Setter_(mthis, __arg_0) => mthis["onmessage"] = __arg_0;
 
-  postMessage_Callback_0_(mthis) => mthis.callMethod("postMessage", []);
+  postMessage_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", []);
 
-  postMessage_Callback_1_(mthis, __arg_0) => mthis.callMethod("postMessage", [__arg_0]);
+  postMessage_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0]);
 
-  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("postMessage", [__arg_0, __arg_1]);
+  postMessage_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "postMessage", [__arg_0, __arg_1]);
 
-  terminate_Callback_0_(mthis) => mthis.callMethod("terminate", []);
+  terminate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "terminate", []);
 
 }
 
@@ -16760,160 +16761,160 @@
 class BlinkWorkerGlobalScope extends BlinkEventTarget {
   static final instance = new BlinkWorkerGlobalScope();
 
-  atob_Callback_0_(mthis) => mthis.callMethod("atob", []);
+  atob_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "atob", []);
 
-  atob_Callback_1_(mthis, __arg_0) => mthis.callMethod("atob", [__arg_0]);
+  atob_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "atob", [__arg_0]);
 
-  btoa_Callback_0_(mthis) => mthis.callMethod("btoa", []);
+  btoa_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "btoa", []);
 
-  btoa_Callback_1_(mthis, __arg_0) => mthis.callMethod("btoa", [__arg_0]);
+  btoa_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "btoa", [__arg_0]);
 
-  clearInterval_Callback_0_(mthis) => mthis.callMethod("clearInterval", []);
+  clearInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", []);
 
-  clearInterval_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearInterval", [__arg_0]);
+  clearInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearInterval", [__arg_0]);
 
-  clearTimeout_Callback_0_(mthis) => mthis.callMethod("clearTimeout", []);
+  clearTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", []);
 
-  clearTimeout_Callback_1_(mthis, __arg_0) => mthis.callMethod("clearTimeout", [__arg_0]);
+  clearTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "clearTimeout", [__arg_0]);
 
-  close_Callback_0_(mthis) => mthis.callMethod("close", []);
+  close_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "close", []);
 
-  console_Getter_(mthis) => mthis["console"];
+  console_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "console");
 
-  createImageBitmap_Callback_0_(mthis) => mthis.callMethod("createImageBitmap", []);
+  createImageBitmap_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", []);
 
-  createImageBitmap_Callback_1_(mthis, __arg_0) => mthis.callMethod("createImageBitmap", [__arg_0]);
+  createImageBitmap_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0]);
 
-  createImageBitmap_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("createImageBitmap", [__arg_0, __arg_1, __arg_2]);
+  createImageBitmap_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "createImageBitmap", [__arg_0, __arg_1, __arg_2]);
 
-  createImageBitmap_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  createImageBitmap_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("createImageBitmap", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  crypto_Getter_(mthis) => mthis["crypto"];
+  crypto_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "crypto");
 
-  importScripts_Callback_0_(mthis) => mthis.callMethod("importScripts", []);
+  importScripts_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importScripts", []);
 
-  importScripts_Callback_1_(mthis, __arg_0) => mthis.callMethod("importScripts", [__arg_0]);
+  importScripts_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importScripts", [__arg_0]);
 
-  indexedDB_Getter_(mthis) => mthis["indexedDB"];
+  indexedDB_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "indexedDB");
 
-  location_Getter_(mthis) => mthis["location"];
+  location_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "location");
 
-  navigator_Getter_(mthis) => mthis["navigator"];
+  navigator_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "navigator");
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  performance_Getter_(mthis) => mthis["performance"];
+  performance_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "performance");
 
-  self_Getter_(mthis) => mthis["self"];
+  self_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "self");
 
-  setInterval_Callback_0_(mthis) => mthis.callMethod("setInterval", []);
+  setInterval_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", []);
 
-  setInterval_Callback_1_(mthis, __arg_0) => mthis.callMethod("setInterval", [__arg_0]);
+  setInterval_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0]);
 
-  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setInterval", [__arg_0, __arg_1]);
+  setInterval_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setInterval", [__arg_0, __arg_1]);
 
-  setTimeout_Callback_0_(mthis) => mthis.callMethod("setTimeout", []);
+  setTimeout_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", []);
 
-  setTimeout_Callback_1_(mthis, __arg_0) => mthis.callMethod("setTimeout", [__arg_0]);
+  setTimeout_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0]);
 
-  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setTimeout", [__arg_0, __arg_1]);
+  setTimeout_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setTimeout", [__arg_0, __arg_1]);
 
-  webkitRequestFileSystemSync_Callback_0_(mthis) => mthis.callMethod("webkitRequestFileSystemSync", []);
+  webkitRequestFileSystemSync_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", []);
 
-  webkitRequestFileSystemSync_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitRequestFileSystemSync", [__arg_0]);
+  webkitRequestFileSystemSync_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", [__arg_0]);
 
-  webkitRequestFileSystemSync_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitRequestFileSystemSync", [__arg_0, __arg_1]);
+  webkitRequestFileSystemSync_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystemSync", [__arg_0, __arg_1]);
 
-  webkitRequestFileSystem_Callback_0_(mthis) => mthis.callMethod("webkitRequestFileSystem", []);
+  webkitRequestFileSystem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", []);
 
-  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitRequestFileSystem", [__arg_0]);
+  webkitRequestFileSystem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0]);
 
-  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1]);
+  webkitRequestFileSystem_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1]);
 
-  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
+  webkitRequestFileSystem_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2]);
 
-  webkitRequestFileSystem_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("webkitRequestFileSystem", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  webkitResolveLocalFileSystemSyncURL_Callback_0_(mthis) => mthis.callMethod("webkitResolveLocalFileSystemSyncURL", []);
+  webkitResolveLocalFileSystemSyncURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemSyncURL", []);
 
-  webkitResolveLocalFileSystemSyncURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitResolveLocalFileSystemSyncURL", [__arg_0]);
+  webkitResolveLocalFileSystemSyncURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemSyncURL", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => mthis.callMethod("webkitResolveLocalFileSystemURL", []);
+  webkitResolveLocalFileSystemURL_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", []);
 
-  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0]);
+  webkitResolveLocalFileSystemURL_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0]);
 
-  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
+  webkitResolveLocalFileSystemURL_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1]);
 
-  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
+  webkitResolveLocalFileSystemURL_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "webkitResolveLocalFileSystemURL", [__arg_0, __arg_1, __arg_2]);
 
 }
 
 class BlinkWorkerLocation {
   static final instance = new BlinkWorkerLocation();
 
-  hash_Getter_(mthis) => mthis["hash"];
+  hash_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hash");
 
-  host_Getter_(mthis) => mthis["host"];
+  host_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "host");
 
-  hostname_Getter_(mthis) => mthis["hostname"];
+  hostname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hostname");
 
-  href_Getter_(mthis) => mthis["href"];
+  href_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "href");
 
-  origin_Getter_(mthis) => mthis["origin"];
+  origin_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "origin");
 
-  pathname_Getter_(mthis) => mthis["pathname"];
+  pathname_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "pathname");
 
-  port_Getter_(mthis) => mthis["port"];
+  port_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "port");
 
-  protocol_Getter_(mthis) => mthis["protocol"];
+  protocol_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "protocol");
 
-  search_Getter_(mthis) => mthis["search"];
+  search_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "search");
 
-  toString_Callback_0_(mthis) => mthis.callMethod("toString", []);
+  toString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "toString", []);
 
 }
 
 class BlinkWorkerNavigator {
   static final instance = new BlinkWorkerNavigator();
 
-  appCodeName_Getter_(mthis) => mthis["appCodeName"];
+  appCodeName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appCodeName");
 
-  appName_Getter_(mthis) => mthis["appName"];
+  appName_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appName");
 
-  appVersion_Getter_(mthis) => mthis["appVersion"];
+  appVersion_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "appVersion");
 
-  connection_Getter_(mthis) => mthis["connection"];
+  connection_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "connection");
 
-  dartEnabled_Getter_(mthis) => mthis["dartEnabled"];
+  dartEnabled_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "dartEnabled");
 
-  geofencing_Getter_(mthis) => mthis["geofencing"];
+  geofencing_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "geofencing");
 
-  hardwareConcurrency_Getter_(mthis) => mthis["hardwareConcurrency"];
+  hardwareConcurrency_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "hardwareConcurrency");
 
-  onLine_Getter_(mthis) => mthis["onLine"];
+  onLine_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onLine");
 
-  platform_Getter_(mthis) => mthis["platform"];
+  platform_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "platform");
 
-  product_Getter_(mthis) => mthis["product"];
+  product_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "product");
 
-  userAgent_Getter_(mthis) => mthis["userAgent"];
+  userAgent_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "userAgent");
 
-  webkitPersistentStorage_Getter_(mthis) => mthis["webkitPersistentStorage"];
+  webkitPersistentStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitPersistentStorage");
 
-  webkitTemporaryStorage_Getter_(mthis) => mthis["webkitTemporaryStorage"];
+  webkitTemporaryStorage_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "webkitTemporaryStorage");
 
 }
 
 class BlinkWorkerPerformance {
   static final instance = new BlinkWorkerPerformance();
 
-  memory_Getter_(mthis) => mthis["memory"];
+  memory_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "memory");
 
-  now_Callback_0_(mthis) => mthis.callMethod("now", []);
+  now_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "now", []);
 
 }
 
@@ -16925,73 +16926,73 @@
 class BlinkXMLHttpRequest extends BlinkXMLHttpRequestEventTarget {
   static final instance = new BlinkXMLHttpRequest();
 
-  abort_Callback_0_(mthis) => mthis.callMethod("abort", []);
+  abort_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "abort", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["XMLHttpRequest"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLHttpRequest"), []);
 
-  constructorCallback_1_(__arg_0) => new js.JsObject(js.context["XMLHttpRequest"], [__arg_0]);
+  constructorCallback_1_(__arg_0) => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLHttpRequest"), [__arg_0]);
 
-  getAllResponseHeaders_Callback_0_(mthis) => mthis.callMethod("getAllResponseHeaders", []);
+  getAllResponseHeaders_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getAllResponseHeaders", []);
 
-  getResponseHeader_Callback_0_(mthis) => mthis.callMethod("getResponseHeader", []);
+  getResponseHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getResponseHeader", []);
 
-  getResponseHeader_Callback_1_(mthis, __arg_0) => mthis.callMethod("getResponseHeader", [__arg_0]);
+  getResponseHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getResponseHeader", [__arg_0]);
 
-  onreadystatechange_Getter_(mthis) => mthis["onreadystatechange"];
+  onreadystatechange_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onreadystatechange");
 
   onreadystatechange_Setter_(mthis, __arg_0) => mthis["onreadystatechange"] = __arg_0;
 
-  open_Callback_0_(mthis) => mthis.callMethod("open", []);
+  open_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "open", []);
 
-  open_Callback_1_(mthis, __arg_0) => mthis.callMethod("open", [__arg_0]);
+  open_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0]);
 
-  open_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("open", [__arg_0, __arg_1]);
+  open_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1]);
 
-  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("open", [__arg_0, __arg_1, __arg_2]);
+  open_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "open", [__arg_0, __arg_1, __arg_2]);
 
-  open_Callback_4_(mthis, __arg_0, __arg_1, __arg_2, __arg_3) => mthis.callMethod("open", [__arg_0, __arg_1, __arg_2, __arg_3]);
+  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]);
 
-  open_Callback_5_(mthis, __arg_0, __arg_1, __arg_2, __arg_3, __arg_4) => mthis.callMethod("open", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
+  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]);
 
-  overrideMimeType_Callback_0_(mthis) => mthis.callMethod("overrideMimeType", []);
+  overrideMimeType_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "overrideMimeType", []);
 
-  overrideMimeType_Callback_1_(mthis, __arg_0) => mthis.callMethod("overrideMimeType", [__arg_0]);
+  overrideMimeType_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "overrideMimeType", [__arg_0]);
 
-  readyState_Getter_(mthis) => mthis["readyState"];
+  readyState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "readyState");
 
-  responseText_Getter_(mthis) => mthis["responseText"];
+  responseText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseText");
 
-  responseType_Getter_(mthis) => mthis["responseType"];
+  responseType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseType");
 
   responseType_Setter_(mthis, __arg_0) => mthis["responseType"] = __arg_0;
 
-  responseURL_Getter_(mthis) => mthis["responseURL"];
+  responseURL_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseURL");
 
-  responseXML_Getter_(mthis) => mthis["responseXML"];
+  responseXML_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "responseXML");
 
-  response_Getter_(mthis) => mthis["response"];
+  response_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "response");
 
-  send_Callback_0_(mthis) => mthis.callMethod("send", []);
+  send_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "send", []);
 
-  send_Callback_1_(mthis, __arg_0) => mthis.callMethod("send", [__arg_0]);
+  send_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "send", [__arg_0]);
 
-  setRequestHeader_Callback_0_(mthis) => mthis.callMethod("setRequestHeader", []);
+  setRequestHeader_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", []);
 
-  setRequestHeader_Callback_1_(mthis, __arg_0) => mthis.callMethod("setRequestHeader", [__arg_0]);
+  setRequestHeader_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", [__arg_0]);
 
-  setRequestHeader_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setRequestHeader", [__arg_0, __arg_1]);
+  setRequestHeader_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setRequestHeader", [__arg_0, __arg_1]);
 
-  statusText_Getter_(mthis) => mthis["statusText"];
+  statusText_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "statusText");
 
-  status_Getter_(mthis) => mthis["status"];
+  status_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "status");
 
-  timeout_Getter_(mthis) => mthis["timeout"];
+  timeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "timeout");
 
   timeout_Setter_(mthis, __arg_0) => mthis["timeout"] = __arg_0;
 
-  upload_Getter_(mthis) => mthis["upload"];
+  upload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "upload");
 
-  withCredentials_Getter_(mthis) => mthis["withCredentials"];
+  withCredentials_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "withCredentials");
 
   withCredentials_Setter_(mthis, __arg_0) => mthis["withCredentials"] = __arg_0;
 
@@ -17000,31 +17001,31 @@
 class BlinkXMLHttpRequestEventTarget extends BlinkEventTarget {
   static final instance = new BlinkXMLHttpRequestEventTarget();
 
-  onabort_Getter_(mthis) => mthis["onabort"];
+  onabort_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onabort");
 
   onabort_Setter_(mthis, __arg_0) => mthis["onabort"] = __arg_0;
 
-  onerror_Getter_(mthis) => mthis["onerror"];
+  onerror_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onerror");
 
   onerror_Setter_(mthis, __arg_0) => mthis["onerror"] = __arg_0;
 
-  onload_Getter_(mthis) => mthis["onload"];
+  onload_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onload");
 
   onload_Setter_(mthis, __arg_0) => mthis["onload"] = __arg_0;
 
-  onloadend_Getter_(mthis) => mthis["onloadend"];
+  onloadend_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadend");
 
   onloadend_Setter_(mthis, __arg_0) => mthis["onloadend"] = __arg_0;
 
-  onloadstart_Getter_(mthis) => mthis["onloadstart"];
+  onloadstart_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onloadstart");
 
   onloadstart_Setter_(mthis, __arg_0) => mthis["onloadstart"] = __arg_0;
 
-  onprogress_Getter_(mthis) => mthis["onprogress"];
+  onprogress_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "onprogress");
 
   onprogress_Setter_(mthis, __arg_0) => mthis["onprogress"] = __arg_0;
 
-  ontimeout_Getter_(mthis) => mthis["ontimeout"];
+  ontimeout_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "ontimeout");
 
   ontimeout_Setter_(mthis, __arg_0) => mthis["ontimeout"] = __arg_0;
 
@@ -17033,9 +17034,9 @@
 class BlinkXMLHttpRequestProgressEvent extends BlinkProgressEvent {
   static final instance = new BlinkXMLHttpRequestProgressEvent();
 
-  position_Getter_(mthis) => mthis["position"];
+  position_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "position");
 
-  totalSize_Getter_(mthis) => mthis["totalSize"];
+  totalSize_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "totalSize");
 
 }
 
@@ -17047,130 +17048,130 @@
 class BlinkXMLSerializer {
   static final instance = new BlinkXMLSerializer();
 
-  constructorCallback_0_() => new js.JsObject(js.context["XMLSerializer"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XMLSerializer"), []);
 
-  serializeToString_Callback_0_(mthis) => mthis.callMethod("serializeToString", []);
+  serializeToString_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "serializeToString", []);
 
-  serializeToString_Callback_1_(mthis, __arg_0) => mthis.callMethod("serializeToString", [__arg_0]);
+  serializeToString_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "serializeToString", [__arg_0]);
 
 }
 
 class BlinkXPathEvaluator {
   static final instance = new BlinkXPathEvaluator();
 
-  constructorCallback_0_() => new js.JsObject(js.context["XPathEvaluator"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XPathEvaluator"), []);
 
-  createExpression_Callback_0_(mthis) => mthis.callMethod("createExpression", []);
+  createExpression_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", []);
 
-  createExpression_Callback_1_(mthis, __arg_0) => mthis.callMethod("createExpression", [__arg_0]);
+  createExpression_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", [__arg_0]);
 
-  createExpression_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("createExpression", [__arg_0, __arg_1]);
+  createExpression_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "createExpression", [__arg_0, __arg_1]);
 
-  createNSResolver_Callback_0_(mthis) => mthis.callMethod("createNSResolver", []);
+  createNSResolver_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "createNSResolver", []);
 
-  createNSResolver_Callback_1_(mthis, __arg_0) => mthis.callMethod("createNSResolver", [__arg_0]);
+  createNSResolver_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "createNSResolver", [__arg_0]);
 
-  evaluate_Callback_0_(mthis) => mthis.callMethod("evaluate", []);
+  evaluate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", []);
 
-  evaluate_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("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) => mthis.callMethod("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) => mthis.callMethod("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) => mthis.callMethod("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, "evaluate", [__arg_0, __arg_1, __arg_2, __arg_3, __arg_4]);
 
 }
 
 class BlinkXPathExpression {
   static final instance = new BlinkXPathExpression();
 
-  evaluate_Callback_0_(mthis) => mthis.callMethod("evaluate", []);
+  evaluate_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "evaluate", []);
 
-  evaluate_Callback_1_(mthis, __arg_0) => mthis.callMethod("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) => mthis.callMethod("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) => mthis.callMethod("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]);
 
 }
 
 class BlinkXPathNSResolver {
   static final instance = new BlinkXPathNSResolver();
 
-  lookupNamespaceURI_Callback_0_(mthis) => mthis.callMethod("lookupNamespaceURI", []);
+  lookupNamespaceURI_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "lookupNamespaceURI", []);
 
-  lookupNamespaceURI_Callback_1_(mthis, __arg_0) => mthis.callMethod("lookupNamespaceURI", [__arg_0]);
+  lookupNamespaceURI_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "lookupNamespaceURI", [__arg_0]);
 
 }
 
 class BlinkXPathResult {
   static final instance = new BlinkXPathResult();
 
-  booleanValue_Getter_(mthis) => mthis["booleanValue"];
+  booleanValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "booleanValue");
 
-  invalidIteratorState_Getter_(mthis) => mthis["invalidIteratorState"];
+  invalidIteratorState_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "invalidIteratorState");
 
-  iterateNext_Callback_0_(mthis) => mthis.callMethod("iterateNext", []);
+  iterateNext_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "iterateNext", []);
 
-  numberValue_Getter_(mthis) => mthis["numberValue"];
+  numberValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "numberValue");
 
-  resultType_Getter_(mthis) => mthis["resultType"];
+  resultType_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "resultType");
 
-  singleNodeValue_Getter_(mthis) => mthis["singleNodeValue"];
+  singleNodeValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "singleNodeValue");
 
-  snapshotItem_Callback_0_(mthis) => mthis.callMethod("snapshotItem", []);
+  snapshotItem_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "snapshotItem", []);
 
-  snapshotItem_Callback_1_(mthis, __arg_0) => mthis.callMethod("snapshotItem", [__arg_0]);
+  snapshotItem_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "snapshotItem", [__arg_0]);
 
-  snapshotLength_Getter_(mthis) => mthis["snapshotLength"];
+  snapshotLength_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "snapshotLength");
 
-  stringValue_Getter_(mthis) => mthis["stringValue"];
+  stringValue_Getter_(mthis) => Blink_JsNative_DomException.getProperty(mthis, "stringValue");
 
 }
 
 class BlinkXSLTProcessor {
   static final instance = new BlinkXSLTProcessor();
 
-  clearParameters_Callback_0_(mthis) => mthis.callMethod("clearParameters", []);
+  clearParameters_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "clearParameters", []);
 
-  constructorCallback_0_() => new js.JsObject(js.context["XSLTProcessor"], []);
+  constructorCallback_0_() => new js.JsObject(Blink_JsNative_DomException.getProperty(js.context, "XSLTProcessor"), []);
 
-  getParameter_Callback_0_(mthis) => mthis.callMethod("getParameter", []);
+  getParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", []);
 
-  getParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("getParameter", [__arg_0]);
+  getParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0]);
 
-  getParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("getParameter", [__arg_0, __arg_1]);
+  getParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "getParameter", [__arg_0, __arg_1]);
 
-  importStylesheet_Callback_0_(mthis) => mthis.callMethod("importStylesheet", []);
+  importStylesheet_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "importStylesheet", []);
 
-  importStylesheet_Callback_1_(mthis, __arg_0) => mthis.callMethod("importStylesheet", [__arg_0]);
+  importStylesheet_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "importStylesheet", [__arg_0]);
 
-  removeParameter_Callback_0_(mthis) => mthis.callMethod("removeParameter", []);
+  removeParameter_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", []);
 
-  removeParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("removeParameter", [__arg_0]);
+  removeParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", [__arg_0]);
 
-  removeParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("removeParameter", [__arg_0, __arg_1]);
+  removeParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "removeParameter", [__arg_0, __arg_1]);
 
-  reset_Callback_0_(mthis) => mthis.callMethod("reset", []);
+  reset_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "reset", []);
 
-  setParameter_Callback_1_(mthis, __arg_0) => mthis.callMethod("setParameter", [__arg_0]);
+  setParameter_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0]);
 
-  setParameter_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("setParameter", [__arg_0, __arg_1]);
+  setParameter_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0, __arg_1]);
 
-  setParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => mthis.callMethod("setParameter", [__arg_0, __arg_1, __arg_2]);
+  setParameter_Callback_3_(mthis, __arg_0, __arg_1, __arg_2) => Blink_JsNative_DomException.callMethod(mthis, "setParameter", [__arg_0, __arg_1, __arg_2]);
 
-  transformToDocument_Callback_0_(mthis) => mthis.callMethod("transformToDocument", []);
+  transformToDocument_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformToDocument", []);
 
-  transformToDocument_Callback_1_(mthis, __arg_0) => mthis.callMethod("transformToDocument", [__arg_0]);
+  transformToDocument_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformToDocument", [__arg_0]);
 
-  transformToFragment_Callback_0_(mthis) => mthis.callMethod("transformToFragment", []);
+  transformToFragment_Callback_0_(mthis) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", []);
 
-  transformToFragment_Callback_1_(mthis, __arg_0) => mthis.callMethod("transformToFragment", [__arg_0]);
+  transformToFragment_Callback_1_(mthis, __arg_0) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", [__arg_0]);
 
-  transformToFragment_Callback_2_(mthis, __arg_0, __arg_1) => mthis.callMethod("transformToFragment", [__arg_0, __arg_1]);
+  transformToFragment_Callback_2_(mthis, __arg_0, __arg_1) => Blink_JsNative_DomException.callMethod(mthis, "transformToFragment", [__arg_0, __arg_1]);
 
 }
 
@@ -17241,3 +17242,25 @@
 
   static get_keys(_DOMStringMap) native "DOMStringMap_getKeys_Callback";
 }
+
+// Calls through JsNative but returns DomException instead of error strings.
+class Blink_JsNative_DomException {
+  static getProperty(js.JsObject o, name) {
+    try {
+      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 callMethod(js.JsObject o, String method, List args) {
+    try {
+      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);
+    }
+  }
+}
+
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index 2ff405c..e13f580 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -60,3 +60,18 @@
                           String argumentsAsJson) {
   // TODO.
 }
+
+@patch
+int _getNextAsyncId() {
+  return 0;
+}
+
+@patch
+void _reportTaskEvent(int start,
+                      int taskId,
+                      String phase,
+                      String category,
+                      String name,
+                      String argumentsAsJson) {
+ // TODO.
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/interceptors.dart b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
index b13d79a..25fbb11 100644
--- a/sdk/lib/_internal/js_runtime/lib/interceptors.dart
+++ b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
@@ -21,6 +21,7 @@
                               checkString,
                               defineProperty,
                               diagnoseIndexError,
+                              getIsolateAffinityTag,
                               getRuntimeType,
                               initNativeDispatch,
                               initNativeDispatchFlag,
@@ -39,6 +40,7 @@
                               StringMatch,
                               firstMatchAfter,
                               NoInline;
+
 import 'dart:_foreign_helper' show
     JS,
     JS_EFFECT,
@@ -51,6 +53,9 @@
 part 'js_number.dart';
 part 'js_string.dart';
 
+final String DART_CLOSURE_PROPERTY_NAME =
+    getIsolateAffinityTag(r'_$dart_dartClosure');
+
 String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
 
 _symbolMapToStringMap(Map<Symbol, dynamic> map) {
@@ -169,6 +174,9 @@
     // are 'plain' Objects.  This test could be simplified and the dispatch path
     // be faster if Object.prototype was pre-patched with a non-leaf dispatch
     // record.
+    if (JS('bool', 'typeof # == "function"', object)) {
+      return JS_INTERCEPTOR_CONSTANT(JavaScriptFunction);
+    }
     var proto = JS('', 'Object.getPrototypeOf(#)', object);
     if (JS('bool', '# == null || # === Object.prototype', proto, proto)) {
       return JS_INTERCEPTOR_CONSTANT(PlainJavaScriptObject);
@@ -393,13 +401,18 @@
  * Interceptor base class for JavaScript objects not recognized as some more
  * specific native type.
  */
-abstract class JavaScriptObject extends Interceptor implements JSObject {
+class JavaScriptObject extends Interceptor implements JSObject {
   const JavaScriptObject();
 
   // It would be impolite to stash a property on the object.
   int get hashCode => 0;
 
   Type get runtimeType => JSObject;
+
+  /**
+   * Returns the result of the JavaScript objects `toString` method.
+   */
+  String toString() => JS('String', 'String(#)', this);
 }
 
 
@@ -420,6 +433,19 @@
  */
 class UnknownJavaScriptObject extends JavaScriptObject {
   const UnknownJavaScriptObject();
+}
 
-  String toString() => JS('String', 'String(#)', this);
+/**
+ * Interceptor for JavaScript function objects and Dart functions that have
+ * been converted to JavaScript functions.
+ * These interceptor methods are not always used as the JavaScript function
+ * object has also been mangled to support Dart function calling conventions.
+ */
+class JavaScriptFunction extends JavaScriptObject implements Function {
+  const JavaScriptFunction();
+
+  String toString() {
+    var dartClosure = JS('', '#.#', this, DART_CLOSURE_PROPERTY_NAME);
+    return dartClosure == null ? super.toString() : dartClosure.toString();
+  }
 }
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 8b8d023..655a51c 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -77,10 +77,10 @@
        bool checked,
        Map<String, String> environment,
        Uri packageRoot,
-       Map<String, Uri> packages}) {
+       Map<String, Uri> packageMap}) {
     if (environment != null) throw new UnimplementedError("environment");
     if (packageRoot != null) throw new UnimplementedError("packageRoot");
-    if (packages != null) throw new UnimplementedError("packages");
+    if (packageMap != null) throw new UnimplementedError("packageMap");
     bool forcePause = (errorsAreFatal != null) ||
                       (onExit != null) ||
                       (onError != null);
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index 60af58d..65ae257 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -237,11 +237,17 @@
   assert(arguments == null || isJsArray(arguments));
   if (isJsFunction(substitution)) {
     substitution = invoke(substitution, arguments);
-    if (substitution == null || isJsArray(substitution)) {
-      arguments = substitution;
-    } else if (isJsFunction(substitution)) {
+    if (substitution == null) return substitution;
+    if (isJsArray(substitution)) {
+      // Substitutions are generated too late to mark Array as used, so use a
+      // tautological JS 'cast' to mark Array as used. This is needed only in
+      // some tiny tests where the substition is the only thing that creates an
+      // Array.
+      return JS('JSArray', '#', substitution);
+    }
+    if (isJsFunction(substitution)) {
       // TODO(johnniwinther): Check if this is still needed.
-      arguments = invoke(substitution, arguments);
+      return invoke(substitution, arguments);
     }
   }
   return arguments;
diff --git a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
index 1a2e3eb..e304873 100644
--- a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
+++ b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
@@ -14,60 +14,80 @@
  */
 const int VM_PLATFORM = 2;
 
-/**
- * Mapping of "dart:" library name (e.g. "core") to information about that library.
- * This information is structured such that Dart Editor can parse this file
- * and extract the necessary information without executing it
- * while other tools can access via execution.
- */
-const Map<String, LibraryInfo> LIBRARIES = const {
+/// The contexts that a library can be used from.
+enum Category {
+  /// Indicates that a library can be used in a browser context.
+  client,
+  /// Indicates that a library can be used in a command line context.
+  server,
+  /// Indicates that a library can be used from embedded devices.
+  embedded
+}
+
+Category parseCategory(String name) {
+  switch (name) {
+    case "Client": return Category.client;
+    case "Server": return Category.server;
+    case "Embedded": return Category.embedded;
+  }
+  return null;
+}
+
+/// Mapping of "dart:" library name (e.g. "core") to information about that
+/// library.
+const Map<String, LibraryInfo> libraries = const {
 
   "async": const LibraryInfo(
       "async/async.dart",
+      categories: "Client,Server",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/async_patch.dart"),
 
   "_blink": const LibraryInfo(
       "_blink/dartium/_blink_dartium.dart",
-      category: "Client",
+      categories: "Client",
       implementation: true,
       documented: false,
       platforms: VM_PLATFORM),
 
   "_chrome": const LibraryInfo(
       "_chrome/dart2js/chrome_dart2js.dart",
-      documented: false,
-      category: "Client"),
+      categories: "Client",
+      documented: false),
 
   "collection": const LibraryInfo(
       "collection/collection.dart",
+      categories: "Client,Server,Embedded",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/collection_patch.dart"),
 
   "convert": const LibraryInfo(
       "convert/convert.dart",
+      categories: "Client,Server",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/convert_patch.dart"),
 
   "core": const LibraryInfo(
       "core/core.dart",
+      categories: "Client,Server,Embedded",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/core_patch.dart"),
 
   "developer": const LibraryInfo(
       "developer/developer.dart",
+      categories: "Client,Server,Embedded",
       maturity: Maturity.UNSTABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"),
 
   "html": const LibraryInfo(
       "html/dartium/html_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "html/dart2js/html_dart2js.dart"),
 
   "html_common": const LibraryInfo(
       "html/html_common/html_common.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "html/html_common/html_common_dart2js.dart",
       documented: false,
@@ -75,130 +95,129 @@
 
   "indexed_db": const LibraryInfo(
       "indexed_db/dartium/indexed_db_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"),
 
   "io": const LibraryInfo(
       "io/io.dart",
-      category: "Server",
-      maturity: Maturity.STABLE,
+      categories: "Server",
       dart2jsPatchPath: "_internal/js_runtime/lib/io_patch.dart"),
 
   "isolate": const LibraryInfo(
       "isolate/isolate.dart",
+      categories: "Client,Server",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/isolate_patch.dart"),
 
   "js": const LibraryInfo(
       "js/dartium/js_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.STABLE,
       dart2jsPath: "js/dart2js/js_dart2js.dart"),
 
   "math": const LibraryInfo(
       "math/math.dart",
+      categories: "Client,Server,Embedded",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/math_patch.dart"),
 
   "mirrors": const LibraryInfo(
       "mirrors/mirrors.dart",
+      categories: "Client,Server",
       maturity: Maturity.UNSTABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/mirrors_patch.dart"),
 
-  "profiler": const LibraryInfo(
-      "profiler/profiler.dart",
-      maturity: Maturity.UNSTABLE),
-
   "nativewrappers": const LibraryInfo(
       "html/dartium/nativewrappers.dart",
-      category: "Client",
+      categories: "Client",
       implementation: true,
       documented: false,
       platforms: VM_PLATFORM),
 
   "typed_data": const LibraryInfo(
       "typed_data/typed_data.dart",
+      categories: "Client,Server,Embedded",
       maturity: Maturity.STABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/typed_data_patch.dart"),
 
   "_native_typed_data": const LibraryInfo(
       "_internal/js_runtime/lib/native_typed_data.dart",
-      category: "Internal",
+      categories: "",
       implementation: true,
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "svg": const LibraryInfo(
       "svg/dartium/svg_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "svg/dart2js/svg_dart2js.dart"),
 
   "web_audio": const LibraryInfo(
       "web_audio/dartium/web_audio_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "web_audio/dart2js/web_audio_dart2js.dart"),
 
   "web_gl": const LibraryInfo(
       "web_gl/dartium/web_gl_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "web_gl/dart2js/web_gl_dart2js.dart"),
 
   "web_sql": const LibraryInfo(
       "web_sql/dartium/web_sql_dartium.dart",
-      category: "Client",
+      categories: "Client",
       maturity: Maturity.WEB_STABLE,
       dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"),
 
   "_internal": const LibraryInfo(
       "internal/internal.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       dart2jsPatchPath:
           "_internal/js_runtime/lib/internal_patch.dart"),
 
   "_js_helper": const LibraryInfo(
       "_internal/js_runtime/lib/js_helper.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_interceptors": const LibraryInfo(
       "_internal/js_runtime/lib/interceptors.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_foreign_helper": const LibraryInfo(
       "_internal/js_runtime/lib/foreign_helper.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_isolate_helper": const LibraryInfo(
       "_internal/js_runtime/lib/isolate_helper.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_js_mirrors": const LibraryInfo(
       "_internal/js_runtime/lib/js_mirrors.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_js_names": const LibraryInfo(
       "_internal/js_runtime/lib/js_names.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_js_primitives": const LibraryInfo(
       "_internal/js_runtime/lib/js_primitives.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
@@ -206,25 +225,25 @@
   // different platform.
   "_mirror_helper": const LibraryInfo(
       "_internal/js_runtime/lib/mirror_helper.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_js_embedded_names": const LibraryInfo(
       "_internal/js_runtime/lib/shared/embedded_names.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_async_await_error_codes": const LibraryInfo(
       "_internal/js_runtime/lib/shared/async_await_error_codes.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 
   "_metadata": const LibraryInfo(
       "html/html_common/metadata.dart",
-      category: "Internal",
+      categories: "",
       documented: false,
       platforms: DART2JS_PLATFORM),
 };
@@ -240,11 +259,10 @@
   final String path;
 
   /**
-   * The category in which the library should appear in the editor
-   * (e.g. "Shared", "Client", "Server", ...).
-   * If a category is not specified it defaults to "Shared".
+   * The categories in which the library can be used encoded as a
+   * comma-separated String.
    */
-  final String category;
+  final String _categories;
 
   /**
    * Path to the dart2js library's *.dart file relative to this file
@@ -286,16 +304,38 @@
   final Maturity maturity;
 
   const LibraryInfo(this.path, {
-                    this.category: "Shared",
+                    String categories: "",
                     this.dart2jsPath,
                     this.dart2jsPatchPath,
                     this.implementation: false,
                     this.documented: true,
                     this.maturity: Maturity.UNSPECIFIED,
-                    this.platforms: DART2JS_PLATFORM | VM_PLATFORM});
+                    this.platforms: DART2JS_PLATFORM | VM_PLATFORM})
+      : _categories = categories;
 
   bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0;
   bool get isVmLibrary => (platforms & VM_PLATFORM) != 0;
+
+  /**
+   * The categories in which the library can be used.
+   *
+   * If no categories are specified, the library is internal and can not be
+   * loaded by user code.
+   */
+  List<Category> get categories {
+    // `"".split(,)` returns [""] not [], so we handle that case separately.
+    if (_categories == "") return const <Category>[];
+    return _categories.split(",").map(parseCategory).toList();
+  }
+
+  bool get isInternal => categories.isEmpty;
+
+  /// The original "categories" String that was passed to the constructor.
+  ///
+  /// Can be used to construct a slightly modified copy of this LibraryInfo.
+  String get categoriesString {
+    return _categories;
+  }
 }
 
 
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index 2f80388..bd2e736 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -68,7 +68,7 @@
   }
 
   V putIfAbsent(K key, V ifAbsent()) {
-    if (keys.contains(key)) {
+    if (containsKey(key)) {
       return this[key];
     }
     return this[key] = ifAbsent();
diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
index 08eb797..ace76c2 100644
--- a/sdk/lib/convert/json.dart
+++ b/sdk/lib/convert/json.dart
@@ -903,9 +903,9 @@
   int index = 0;
 
   _JsonUtf8Stringifier(toEncodable, int bufferSize, this.addChunk)
-      : super(toEncodable),
-        this.bufferSize = bufferSize,
-        buffer = new Uint8List(bufferSize);
+      : this.bufferSize = bufferSize,
+        buffer = new Uint8List(bufferSize),
+        super(toEncodable);
 
   /**
    * Convert [object] to UTF-8 encoded JSON.
diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart
index 54c5b80..c42e5c0 100644
--- a/sdk/lib/developer/timeline.dart
+++ b/sdk/lib/developer/timeline.dart
@@ -32,8 +32,8 @@
     }
     // Pop top item off of stack.
     var block = _stack.removeLast();
-    // Close it.
-    block.close();
+    // Finish it.
+    block.finish();
   }
 
   /// A utility method to time a synchronous [function]. Internally calls
@@ -52,6 +52,130 @@
   static final List<_SyncBlock> _stack = new List<_SyncBlock>();
 }
 
+/// An asynchronous task on the timeline. Asynchronous tasks can live
+/// longer than the current event and can even be shared between isolates.
+/// An asynchronous task can have many (nested) blocks. To share a
+/// [TimelineTask] across isolates, you must construct a [TimelineTask] in
+/// both isolates using the same [taskId] and [category].
+class TimelineTask {
+  /// Create a task. [taskId] will be set by the system.
+  /// Optionally you can specify a [category] name.
+  TimelineTask({String category: 'Dart'})
+      : _taskId = _getNextAsyncId(),
+        category = category {
+    if (category is! String) {
+      throw new ArgumentError.value(category,
+                                    'category',
+                                    'Must be a String');
+    }
+  }
+
+  /// Create a task with an explicit [taskId]. This is useful if you are
+  /// passing a task between isolates. Optionally you can specify a [category]
+  /// name.
+  TimelineTask.withTaskId(int taskId, {String category: 'Dart'})
+      : _taskId = taskId,
+        category = category {
+    if (taskId is! int) {
+      throw new ArgumentError.value(taskId,
+                                    'taskId',
+                                    'Must be an int');
+    }
+    if (category is! String) {
+      throw new ArgumentError.value(category,
+                                    'category',
+                                    'Must be a String');
+    }
+  }
+
+  /// Start a block in this task named [name]. Optionally takes
+  /// a [Map] of [arguments].
+  /// Returns an [AsyncBlock] which is used to finish this block.
+  AsyncBlock start(String name, {Map arguments}) {
+    if (name is! String) {
+      throw new ArgumentError.value(name,
+                                    'name',
+                                    'Must be a String');
+    }
+    var block = new AsyncBlock._(name, _taskId, category);
+    if (arguments is Map) {
+      block.arguments.addAll(arguments);
+    }
+    /// Emit start event.
+    block._start();
+    return block;
+  }
+
+  /// Retrieve the asynchronous task's id. Can be used to construct a
+  /// [TimelineTask] in another isolate.
+  int get taskId => _taskId;
+  final int _taskId;
+  /// Retrieve the asynchronous task's category. Can be used to construct a
+  /// [TimelineTask] in another isolate.
+  final String category;
+}
+
+/// An asynchronous block of time on the timeline. This block can be kept
+/// open across isolate messages.
+class AsyncBlock {
+  /// The category this block belongs to.
+  final String category;
+  /// The name of this block.
+  final String name;
+  /// The asynchronous task id.
+  final int _taskId;
+  /// An (optional) set of arguments which will be serialized to JSON and
+  /// associated with this block.
+  final Map arguments = {};
+  bool _finished = false;
+
+  AsyncBlock._(this.name, this._taskId, this.category);
+
+  // Emit the start event.
+  void _start() {
+    String argumentsAsJson = JSON.encode(arguments);
+    _reportTaskEvent(_getTraceClock(),
+                     _taskId,
+                     'b',
+                     category,
+                     name,
+                     argumentsAsJson);
+  }
+
+  // Emit the finish event.
+  void _finish() {
+    _reportTaskEvent(_getTraceClock(),
+                     _taskId,
+                     'e',
+                     category,
+                     name,
+                     JSON.encode({}));
+  }
+
+  /// Finish this block. Cannot be called twice.
+  void finish() {
+    if (_finished) {
+      throw new StateError(
+          'It is illegal to call finish twice on the same AsyncBlock');
+    }
+    _finished = true;
+    _finish();
+  }
+
+  /// Finishes this block when [future] completes. Returns a [Future]
+  /// chained to [future].
+  Future finishWhenComplete(Future future) {
+    if (future is! Future) {
+      throw new ArgumentError.value(future,
+                                    'future',
+                                    'Must be a Future');
+    }
+    return future.whenComplete(() {
+      finish();
+    });
+  }
+}
+
 /// A synchronous block of time on the timeline. This block should not be
 /// kept open across isolate messages.
 class _SyncBlock {
@@ -64,20 +188,13 @@
   final Map arguments = {};
   // The start time stamp.
   final int _start;
-  // Has this block been closed?
-  bool _closed = false;
 
   _SyncBlock._(this.name,
                this._start);
 
-  /// Close this block of time. At this point, this block can no longer be
+  /// Finish this block of time. At this point, this block can no longer be
   /// used.
-  void close() {
-    if (_closed) {
-      throw new StateError(
-          'It is illegal to call close twice on the same _SyncBlock');
-    }
-    _closed = true;
+  void finish() {
     var end = _getTraceClock();
 
     // Encode arguments map as JSON before reporting.
@@ -92,9 +209,20 @@
   }
 }
 
+/// Returns the next async task id.
+external int _getNextAsyncId();
+
 /// Returns the current value from the trace clock.
 external int _getTraceClock();
 
+/// Reports an event for a task.
+external void _reportTaskEvent(int start,
+                               int taskId,
+                               String phase,
+                               String category,
+                               String name,
+                               String argumentsAsJson);
+
 /// Reports a complete synchronous event.
 external void _reportCompleteEvent(int start,
                                    int end,
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 7bef67f..4983498 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -2945,12 +2945,11 @@
   @Experimental() // untriaged
   Future _request_2() native;
 }
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 
-@DocsEditable()
 @DomName('Crypto')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.SAFARI)
@@ -2958,6 +2957,11 @@
 // http://www.w3.org/TR/WebCryptoAPI/
 @Native("Crypto")
 class Crypto extends Interceptor {
+
+  TypedData getRandomValues(TypedData array) {
+    return _getRandomValues(array);
+  }
+
   // To suppress missing implicit constructor warnings.
   factory Crypto._() { throw new UnsupportedError("Not supported"); }
 
@@ -2969,11 +2973,13 @@
   @Experimental() // untriaged
   final _SubtleCrypto subtle;
 
+  @JSName('getRandomValues')
   @DomName('Crypto.getRandomValues')
   @DocsEditable()
   @Creates('TypedData')
   @Returns('TypedData|Null')
-  TypedData getRandomValues(TypedData array) native;
+  TypedData _getRandomValues(TypedData array) 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
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 14fc413..6d84226 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -51,6 +51,7 @@
 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
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
@@ -89,7 +90,7 @@
   if (_window != null) {
     return _window;
   }
-  _window = wrap_jso(js.context['window']);
+  _window = wrap_jso(js.JsNative.getProperty(js.context, 'window'));
   return _window;
 }
 
@@ -1107,15 +1108,75 @@
  ******************************************************************************/
 
 // List of known tagName to DartClass for custom elements, used for upgrade.
-var _knownCustomeElements = new Map<String, Type>();
+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 = _knownCustomElements[_getCustomElementName(object)];
+  if (entry != null) {
+    return entry['type'];
+  }
+  return null;
+}
+
+String _getCustomElementExtends(object) {
+  var entry = _knownCustomElements[_getCustomElementName(object)];
+  if (entry != null) {
+    return entry['extends'];
+  }
+  return null;
+}
+
+_getCustomElement(object) => _knownCustomElements[_getCustomElementName(object)];
+
+// Return the tag name or is attribute of the custom element or data binding.
+String _getCustomElementName(element) {
+  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.JsObjectImpl) {
+    // 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 {
+    throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObjectImpl.');
+  }
+
+  return tag;
+}
 
 Rectangle make_dart_rectangle(r) =>
-    r == null ? null : new Rectangle(r['left'], r['top'], r['width'], r['height']);
+    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'));
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
+/// An abstract class for all DOM objects we wrap in dart:html and related
+///  libraries.
+class DartHtmlDomObject {
+
+  /// The underlying JS DOM object.
+  js.JsObject blink_jsObject;
+
+}
 
 // Flag to disable JS interop asserts.  Setting to false will speed up the
 // wrap_jso calls.
@@ -1142,11 +1203,25 @@
       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 we have a wrapper return the Dart instance.
     if (wrapper != null) {
+      if (wrapper.runtimeType == HtmlElement && !wrapper._isBadUpgrade) {
+        // We're a Dart instance but we need to upgrade.
+        var customElementClass = _getCustomElementType(wrapper);
+        if (customElementClass != null) {
+          var dartClass_instance;
+          try {
+            dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
+          } finally {
+            dartClass_instance.blink_jsObject = jsObject;
+            jsObject['dart_class'] = dartClass_instance;
+            js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
+            return dartClass_instance;
+          }
+        }
+      }
+
       return wrapper;
     }
 
@@ -1164,24 +1239,36 @@
     if (!identical(converted, jsObject)) {
       return converted;
     }
-    var constructor = jsObject['constructor'];
-    if (__interop_checks) {
-      debug_or_assert("constructor != null", constructor != null);
+
+    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, jsObject);
+      return jsObject;
     }
-    var jsTypeName = constructor['name'];
-    if (__interop_checks) {
-      debug_or_assert("constructor != null && jsTypeName.length > 0", constructor != null && jsTypeName.length > 0);
+    var jsTypeName = js.JsNative.getProperty(constructor, 'name');
+    if (jsTypeName is! String || jsTypeName.length == 0) {
+      // Not an html type.
+      js.setDartHtmlWrapperFor(jsObject, jsObject);
+      return jsObject;
     }
 
     var dartClass_instance;
     if (jsObject.hasProperty('dart_class')) {
-      // Got a dart_class (it's a custom element) use it it's already set up.
-      dartClass_instance = jsObject['dart_class'];
+      // Got a dart_class (it's a custom element) use it it's already set up
+      // make sure it's upgraded.
+      dartClass_instance = _upgradeHtmlElement(jsObject['dart_class']);
     } else {
-      var localName = jsObject['localName'];
-      var customElementClass = _knownCustomeElements[localName];
+      var customElementClass = null;
+      var extendsTag = "";
+      var custom = _getCustomElement(jsObject);
+      if (custom != null) {
+        customElementClass = custom['type'];
+        extendsTag = custom['extends'];
+      }
       // Custom Element to upgrade.
-      if (jsTypeName == 'HTMLElement' && customElementClass != null) {
+      if (jsTypeName == 'HTMLElement' && customElementClass != null && extendsTag == "") {
         try {
           dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
         } finally {
@@ -1190,7 +1277,20 @@
           js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
        }
       } else {
+        // TODO(terry): Verify with jakemacd that this is right?
+        // If we every get an auto-binding we're matching previous non-JS Interop
+        // did to return a TemplateElement.
+        if (jsTypeName == 'auto-binding') {
+          jsTypeName = "HTMLTemplateElement";
+        }
+
         var func = getHtmlCreateFunction(jsTypeName);
+        if (func == null) {
+          // One last ditch effort could be a JS custom element.
+          if (jsObject.toString() == "[object HTMLElement]") {
+            func = getHtmlCreateFunction("HTMLElement");
+          }
+        }
         if (func != null) {
           dartClass_instance = func();
           dartClass_instance.blink_jsObject = jsObject;
@@ -1198,6 +1298,7 @@
         }
       }
     }
+    // TODO(jacobr): cache that this is not a dart:html JS class.
     return dartClass_instance;
   } catch(e, stacktrace){
     if (__interop_checks) {
@@ -1212,6 +1313,66 @@
 }
 
 /**
+ * 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) {
+      var wrappingList = new _DartHtmlWrappingList(jsObject);
+      js.setDartHtmlWrapperFor(jsObject, wrappingList);
+      return wrappingList;
+    }
+
+    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, jsObject);
+      return jsObject;
+    }
+    var jsTypeName = js.JsNative.getProperty(constructor, 'name');
+    if (jsTypeName is! String || jsTypeName.length == 0) {
+      // Not an html type.
+      js.setDartHtmlWrapperFor(jsObject, jsObject);
+      return jsObject;
+    }
+
+    var func = getHtmlCreateFunction(jsTypeName);
+    if (func != null) {
+      var dartClass_instance = func();
+      dartClass_instance.blink_jsObject = jsObject;
+      js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
+      return dartClass_instance;
+    }
+    return jsObject;
+  } 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.
@@ -1250,6 +1411,33 @@
   }
 }
 
+// Upgrade a Dart HtmlElement to the user's Dart custom element class.
+_upgradeHtmlElement(dartInstance) {
+  // Only try upgrading HtmlElement (Dart class) if there is a failure then
+  // don't try it again - one failure is enough.
+  if (dartInstance.runtimeType == HtmlElement && !dartInstance._isBadUpgrade) {
+    // Must be exactly HtmlElement not something derived from it.
+
+    var customElementClass = _getCustomElementType(dartInstance);
+
+    // Custom Element to upgrade.
+    if (customElementClass != null) {
+      var jsObject = dartInstance.blink_jsObject;
+      try {
+        dartInstance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
+      } catch (e) {
+        dartInstance._badUpgrade();
+      } finally {
+        dartInstance.blink_jsObject = jsObject;
+        jsObject['dart_class'] = dartInstance;
+        js.setDartHtmlWrapperFor(jsObject, dartInstance);
+     }
+   }
+  }
+
+  return dartInstance;
+}
+
 class DebugAssertException implements Exception {
   String message;
   DebugAssertException(this.message);
@@ -1280,9 +1468,9 @@
 
 Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) {
   var result = new Map();
-  var keys = js.context['Object'].callMethod('keys', [jsObject]);
+  var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]);
   for (var key in keys) {
-    result[key] = wrap_jso(jsObject[key]);
+    result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key));
   }
   return result;
 }
@@ -1293,7 +1481,7 @@
 // code in html_common and be more general.
 convertDartToNative_Dictionary(Map dict) {
   if (dict == null) return null;
-  var jsObject = new js.JsObject(js.context['Object']);
+  var jsObject = new js.JsObject(js.JsNative.getProperty(js.context, 'Object'));
   dict.forEach((String key, value) {
     if (value is List) {
       var jsArray = new js.JsArray();
@@ -1317,17 +1505,17 @@
 /**
  * Wraps a JsArray and will call wrap_jso on its entries.
  */
-class _DartHtmlWrappingList extends ListBase {
-  _DartHtmlWrappingList(this._basicList);
+class _DartHtmlWrappingList extends ListBase implements NativeFieldWrapperClass2 {
+  _DartHtmlWrappingList(this.blink_jsObject);
 
-  final js.JsArray _basicList;
+  final js.JsArray blink_jsObject;
 
-  operator [](int index) => wrap_jso(_basicList[index]);
+  operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, index));
 
-  operator []=(int index, value) => _basicList[index] = unwrap_jso(value);
+  operator []=(int index, value) => blink_jsObject[index] = value;
 
-  int get length => _basicList.length;
-  int set length(int newLength) => _basicList.length = newLength;
+  int get length => blink_jsObject.length;
+  int set length(int newLength) => blink_jsObject.length = newLength;
 }
 
 /**
@@ -1338,12 +1526,13 @@
   try {
     dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
   } catch (e) {
+    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. 
-    $this['dart_class'] = dartClass;
+    // with as we talk to blink.
+    js.setDartHtmlWrapperFor($this, dartClass);
   }
 
   return dartClass;
@@ -1356,7 +1545,7 @@
 
 @DocsEditable()
 @DomName('AbstractWorker')
-abstract class AbstractWorker extends NativeFieldWrapperClass2 implements EventTarget {
+abstract class AbstractWorker extends DartHtmlDomObject implements EventTarget {
   // To suppress missing implicit constructor warnings.
   factory AbstractWorker._() { throw new UnsupportedError("Not supported"); }
 
@@ -1612,7 +1801,7 @@
 @DocsEditable()
 @DomName('AnimationEffect')
 @Experimental() // untriaged
-class AnimationEffect extends NativeFieldWrapperClass2 {
+class AnimationEffect extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimationEffect._() { throw new UnsupportedError("Not supported"); }
 
@@ -1620,8 +1809,6 @@
     return new AnimationEffect._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimationEffect._internalWrap() {
     return new AnimationEffect.internal_();
   }
@@ -1679,7 +1866,7 @@
 @DocsEditable()
 @DomName('AnimationNode')
 @Experimental() // untriaged
-class AnimationNode extends NativeFieldWrapperClass2 {
+class AnimationNode extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimationNode._() { throw new UnsupportedError("Not supported"); }
 
@@ -1687,8 +1874,6 @@
     return new AnimationNode._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimationNode._internalWrap() {
     return new AnimationNode.internal_();
   }
@@ -1886,7 +2071,7 @@
 @DocsEditable()
 @DomName('AnimationTimeline')
 @Experimental() // untriaged
-class AnimationTimeline extends NativeFieldWrapperClass2 {
+class AnimationTimeline extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimationTimeline._() { throw new UnsupportedError("Not supported"); }
 
@@ -1894,8 +2079,6 @@
     return new AnimationTimeline._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimationTimeline._internalWrap() {
     return new AnimationTimeline.internal_();
   }
@@ -2388,7 +2571,7 @@
 @DocsEditable()
 @DomName('AudioTrack')
 @Experimental() // untriaged
-class AudioTrack extends NativeFieldWrapperClass2 {
+class AudioTrack extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AudioTrack._() { throw new UnsupportedError("Not supported"); }
 
@@ -2396,8 +2579,6 @@
     return new AudioTrack._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AudioTrack._internalWrap() {
     return new AudioTrack.internal_();
   }
@@ -2569,7 +2750,7 @@
 @DomName('BarProp')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#barprop
 @deprecated // standard
-class BarProp extends NativeFieldWrapperClass2 {
+class BarProp extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory BarProp._() { throw new UnsupportedError("Not supported"); }
 
@@ -2577,8 +2758,6 @@
     return new BarProp._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory BarProp._internalWrap() {
     return new BarProp.internal_();
   }
@@ -2729,7 +2908,7 @@
 
 
 @DomName('Blob')
-class Blob extends NativeFieldWrapperClass2 {
+class Blob extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Blob._() { throw new UnsupportedError("Not supported"); }
 
@@ -2737,8 +2916,6 @@
     return new Blob._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Blob._internalWrap() {
     return new Blob.internal_();
   }
@@ -2799,7 +2976,7 @@
 @DocsEditable()
 @DomName('Body')
 @Experimental() // untriaged
-class Body extends NativeFieldWrapperClass2 {
+class Body extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Body._() { throw new UnsupportedError("Not supported"); }
 
@@ -2807,8 +2984,6 @@
     return new Body._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Body._internalWrap() {
     return new Body.internal_();
   }
@@ -3253,7 +3428,7 @@
 @DocsEditable()
 @DomName('CacheStorage')
 @Experimental() // untriaged
-class CacheStorage extends NativeFieldWrapperClass2 {
+class CacheStorage extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CacheStorage._() { throw new UnsupportedError("Not supported"); }
 
@@ -3261,8 +3436,6 @@
     return new CacheStorage._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CacheStorage._internalWrap() {
     return new CacheStorage.internal_();
   }
@@ -3309,7 +3482,7 @@
 @DomName('Canvas2DContextAttributes')
 // http://wiki.whatwg.org/wiki/CanvasOpaque#Suggested_IDL
 @Experimental()
-class Canvas2DContextAttributes extends NativeFieldWrapperClass2 {
+class Canvas2DContextAttributes extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Canvas2DContextAttributes._() { throw new UnsupportedError("Not supported"); }
 
@@ -3317,8 +3490,6 @@
     return new Canvas2DContextAttributes._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Canvas2DContextAttributes._internalWrap() {
     return new Canvas2DContextAttributes.internal_();
   }
@@ -3558,7 +3729,7 @@
  * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.
  */
 @DomName('CanvasGradient')
-class CanvasGradient extends NativeFieldWrapperClass2 {
+class CanvasGradient extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CanvasGradient._() { throw new UnsupportedError("Not supported"); }
 
@@ -3566,8 +3737,6 @@
     return new CanvasGradient._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CanvasGradient._internalWrap() {
     return new CanvasGradient.internal_();
   }
@@ -3627,7 +3796,7 @@
  * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.
  */
 @DomName('CanvasPattern')
-class CanvasPattern extends NativeFieldWrapperClass2 {
+class CanvasPattern extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CanvasPattern._() { throw new UnsupportedError("Not supported"); }
 
@@ -3635,8 +3804,6 @@
     return new CanvasPattern._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CanvasPattern._internalWrap() {
     return new CanvasPattern.internal_();
   }
@@ -3662,7 +3829,7 @@
 }
 
 @DomName('CanvasRenderingContext2D')
-class CanvasRenderingContext2D extends NativeFieldWrapperClass2 implements CanvasRenderingContext {
+class CanvasRenderingContext2D extends DartHtmlDomObject implements CanvasRenderingContext {
   // To suppress missing implicit constructor warnings.
   factory CanvasRenderingContext2D._() { throw new UnsupportedError("Not supported"); }
 
@@ -3670,8 +3837,6 @@
     return new CanvasRenderingContext2D._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CanvasRenderingContext2D._internalWrap() {
     return new CanvasRenderingContext2D.internal_();
   }
@@ -4518,7 +4683,7 @@
 @DocsEditable()
 @DomName('ChildNode')
 @Experimental() // untriaged
-abstract class ChildNode extends NativeFieldWrapperClass2 {
+abstract class ChildNode extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ChildNode._() { throw new UnsupportedError("Not supported"); }
 
@@ -4769,7 +4934,7 @@
 @DocsEditable()
 @DomName('ConsoleBase')
 @Experimental() // untriaged
-class ConsoleBase extends NativeFieldWrapperClass2 {
+class ConsoleBase extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ConsoleBase._() { throw new UnsupportedError("Not supported"); }
 
@@ -4777,8 +4942,6 @@
     return new ConsoleBase._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ConsoleBase._internalWrap() {
     return new ConsoleBase.internal_();
   }
@@ -4967,7 +5130,7 @@
 
 @DocsEditable()
 @DomName('Coordinates')
-class Coordinates extends NativeFieldWrapperClass2 {
+class Coordinates extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Coordinates._() { throw new UnsupportedError("Not supported"); }
 
@@ -4975,8 +5138,6 @@
     return new Coordinates._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Coordinates._internalWrap() {
     return new Coordinates.internal_();
   }
@@ -5025,7 +5186,7 @@
 @DocsEditable()
 @DomName('Credential')
 @Experimental() // untriaged
-class Credential extends NativeFieldWrapperClass2 {
+class Credential extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Credential._() { throw new UnsupportedError("Not supported"); }
 
@@ -5033,8 +5194,6 @@
     return new Credential._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Credential._internalWrap() {
     return new Credential.internal_();
   }
@@ -5070,7 +5229,7 @@
 @DocsEditable()
 @DomName('CredentialsContainer')
 @Experimental() // untriaged
-class CredentialsContainer extends NativeFieldWrapperClass2 {
+class CredentialsContainer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CredentialsContainer._() { throw new UnsupportedError("Not supported"); }
 
@@ -5078,8 +5237,6 @@
     return new CredentialsContainer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CredentialsContainer._internalWrap() {
     return new CredentialsContainer.internal_();
   }
@@ -5112,20 +5269,30 @@
   }
 
 }
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// WARNING: Do not edit - generated code.
 
-
-@DocsEditable()
 @DomName('Crypto')
 @SupportedBrowser(SupportedBrowser.CHROME)
 @SupportedBrowser(SupportedBrowser.SAFARI)
 @Experimental()
 // http://www.w3.org/TR/WebCryptoAPI/
-class Crypto extends NativeFieldWrapperClass2 {
+class Crypto extends DartHtmlDomObject {
+
+  TypedData getRandomValues(TypedData array) {
+    var random = _getRandomValues(array);
+    // The semantics of the operation are that it modifies the argument, but we
+    // have no way of making a Dart typed data created initially in Dart reference
+    // externalized storage. So we copy the values back from the returned copy.
+    // TODO(alanknight): Make this less ridiculously slow.
+    for (var i = 0; i < random.length; i++) {
+      array[i] = random[i];
+    }
+    return array;
+  }
+
   // To suppress missing implicit constructor warnings.
   factory Crypto._() { throw new UnsupportedError("Not supported"); }
 
@@ -5133,8 +5300,6 @@
     return new Crypto._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Crypto._internalWrap() {
     return new Crypto.internal_();
   }
@@ -5154,7 +5319,7 @@
   
   @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) => wrap_jso(_blink.BlinkCrypto.instance.getRandomValues_Callback_1_(unwrap_jso(this), unwrap_jso(array)));
   
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -5167,7 +5332,7 @@
 @DocsEditable()
 @DomName('CryptoKey')
 @Experimental() // untriaged
-class CryptoKey extends NativeFieldWrapperClass2 {
+class CryptoKey extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CryptoKey._() { throw new UnsupportedError("Not supported"); }
 
@@ -5175,8 +5340,6 @@
     return new CryptoKey._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CryptoKey._internalWrap() {
     return new CryptoKey.internal_();
   }
@@ -5218,7 +5381,7 @@
 @DomName('CSS')
 // http://www.w3.org/TR/css3-conditional/#the-css-interface
 @Experimental() // None
-class Css extends NativeFieldWrapperClass2 {
+class Css extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Css._() { throw new UnsupportedError("Not supported"); }
 
@@ -5226,8 +5389,6 @@
     return new Css._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Css._internalWrap() {
     return new Css.internal_();
   }
@@ -5577,7 +5738,7 @@
 
 @DocsEditable()
 @DomName('CSSRule')
-class CssRule extends NativeFieldWrapperClass2 {
+class CssRule extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CssRule._() { throw new UnsupportedError("Not supported"); }
 
@@ -5585,8 +5746,6 @@
     return new CssRule._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CssRule._internalWrap() {
     return new CssRule.internal_();
   }
@@ -5691,7 +5850,7 @@
 
 
 @DomName('CSSStyleDeclaration')
-class CssStyleDeclaration  extends JsoNativeFieldWrapper with
+class CssStyleDeclaration  extends DartHtmlDomObject with
     CssStyleDeclarationBase  {
   factory CssStyleDeclaration() => new CssStyleDeclaration.css('');
 
@@ -5785,8 +5944,6 @@
     return new CssStyleDeclaration._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CssStyleDeclaration._internalWrap() {
     return new CssStyleDeclaration.internal_();
   }
@@ -9169,6 +9326,9 @@
       e._initCustomEvent(type, canBubble, cancelable, null);
     }
 
+    // Need for identity.
+    e.blink_jsObject['dart_class'] = e;
+
     return e;
   }
 
@@ -9296,7 +9456,7 @@
 @DocsEditable()
 @DomName('DataTransfer')
 @Experimental() // untriaged
-class DataTransfer extends NativeFieldWrapperClass2 {
+class DataTransfer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DataTransfer._() { throw new UnsupportedError("Not supported"); }
 
@@ -9304,8 +9464,6 @@
     return new DataTransfer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DataTransfer._internalWrap() {
     return new DataTransfer.internal_();
   }
@@ -9386,7 +9544,7 @@
 @DomName('DataTransferItem')
 // http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#the-datatransferitem-interface
 @Experimental()
-class DataTransferItem extends NativeFieldWrapperClass2 {
+class DataTransferItem extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DataTransferItem._() { throw new UnsupportedError("Not supported"); }
 
@@ -9394,8 +9552,6 @@
     return new DataTransferItem._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DataTransferItem._internalWrap() {
     return new DataTransferItem.internal_();
   }
@@ -9445,7 +9601,7 @@
 @DomName('DataTransferItemList')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-datatransferitemlist-interface
 @Experimental()
-class DataTransferItemList extends NativeFieldWrapperClass2 {
+class DataTransferItemList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DataTransferItemList._() { throw new UnsupportedError("Not supported"); }
 
@@ -9453,8 +9609,6 @@
     return new DataTransferItemList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DataTransferItemList._internalWrap() {
     return new DataTransferItemList.internal_();
   }
@@ -9576,7 +9730,7 @@
 @DocsEditable()
 @DomName('DeprecatedStorageInfo')
 @Experimental() // untriaged
-class DeprecatedStorageInfo extends NativeFieldWrapperClass2 {
+class DeprecatedStorageInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DeprecatedStorageInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -9584,8 +9738,6 @@
     return new DeprecatedStorageInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DeprecatedStorageInfo._internalWrap() {
     return new DeprecatedStorageInfo.internal_();
   }
@@ -9642,7 +9794,7 @@
 @DocsEditable()
 @DomName('DeprecatedStorageQuota')
 @Experimental() // untriaged
-class DeprecatedStorageQuota extends NativeFieldWrapperClass2 {
+class DeprecatedStorageQuota extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DeprecatedStorageQuota._() { throw new UnsupportedError("Not supported"); }
 
@@ -9650,8 +9802,6 @@
     return new DeprecatedStorageQuota._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DeprecatedStorageQuota._internalWrap() {
     return new DeprecatedStorageQuota.internal_();
   }
@@ -9745,7 +9895,7 @@
 @DomName('DeviceAcceleration')
 // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion
 @Experimental()
-class DeviceAcceleration extends NativeFieldWrapperClass2 {
+class DeviceAcceleration extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DeviceAcceleration._() { throw new UnsupportedError("Not supported"); }
 
@@ -9753,8 +9903,6 @@
     return new DeviceAcceleration._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DeviceAcceleration._internalWrap() {
     return new DeviceAcceleration.internal_();
   }
@@ -9923,7 +10071,7 @@
 @DomName('DeviceRotationRate')
 // http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion
 @Experimental()
-class DeviceRotationRate extends NativeFieldWrapperClass2 {
+class DeviceRotationRate extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DeviceRotationRate._() { throw new UnsupportedError("Not supported"); }
 
@@ -9931,8 +10079,6 @@
     return new DeviceRotationRate._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DeviceRotationRate._internalWrap() {
     return new DeviceRotationRate.internal_();
   }
@@ -10162,7 +10308,7 @@
 @DomName('DirectoryReader')
 // http://www.w3.org/TR/file-system-api/#the-directoryreader-interface
 @Experimental()
-class DirectoryReader extends NativeFieldWrapperClass2 {
+class DirectoryReader extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DirectoryReader._() { throw new UnsupportedError("Not supported"); }
 
@@ -10170,8 +10316,6 @@
     return new DirectoryReader._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DirectoryReader._internalWrap() {
     return new DirectoryReader.internal_();
   }
@@ -11100,17 +11244,15 @@
       _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
       _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
 
-    var wrapped;
-
-    if (newElement['dart_class'] != null) {
-      wrapped = newElement['dart_class'];         // Here's our Dart class.
+    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 {
-        wrapped.blink_jsObject['dart_class'] = wrapped;
+        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);
       }
     }
 
@@ -11126,15 +11268,15 @@
 
     var wrapped;
 
-    if (newElement['dart_class'] != null) {
-      wrapped = newElement['dart_class'];         // Here's our Dart class.
+    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 {
-        wrapped.blink_jsObject['dart_class'] = wrapped;
+        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);  // Here's our Dart class.
       }
     }
 
@@ -11319,7 +11461,7 @@
 
 @DocsEditable()
 @DomName('DOMError')
-class DomError extends NativeFieldWrapperClass2 {
+class DomError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomError._() { throw new UnsupportedError("Not supported"); }
 
@@ -11333,8 +11475,6 @@
     return new DomError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomError._internalWrap() {
     return new DomError.internal_();
   }
@@ -11361,7 +11501,7 @@
 
 @DomName('DOMException')
 @Unstable()
-class DomException extends NativeFieldWrapperClass2 {
+class DomException extends DartHtmlDomObject {
 
   static const String INDEX_SIZE = 'IndexSizeError';
   static const String HIERARCHY_REQUEST = 'HierarchyRequestError';
@@ -11436,7 +11576,7 @@
 
 @DocsEditable()
 @DomName('DOMImplementation')
-class DomImplementation extends NativeFieldWrapperClass2 {
+class DomImplementation extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomImplementation._() { throw new UnsupportedError("Not supported"); }
 
@@ -11444,8 +11584,6 @@
     return new DomImplementation._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomImplementation._internalWrap() {
     return new DomImplementation.internal_();
   }
@@ -11482,7 +11620,7 @@
 @DocsEditable()
 @DomName('Iterator')
 @Experimental() // untriaged
-class DomIterator extends NativeFieldWrapperClass2 {
+class DomIterator extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomIterator._() { throw new UnsupportedError("Not supported"); }
 
@@ -11490,8 +11628,6 @@
     return new DomIterator._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomIterator._internalWrap() {
     return new DomIterator.internal_();
   }
@@ -11837,7 +11973,7 @@
 @DocsEditable()
 @DomName('DOMMatrixReadOnly')
 @Experimental() // untriaged
-class DomMatrixReadOnly extends NativeFieldWrapperClass2 {
+class DomMatrixReadOnly extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomMatrixReadOnly._() { throw new UnsupportedError("Not supported"); }
 
@@ -11845,8 +11981,6 @@
     return new DomMatrixReadOnly._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomMatrixReadOnly._internalWrap() {
     return new DomMatrixReadOnly.internal_();
   }
@@ -12050,7 +12184,7 @@
 
 @DocsEditable()
 @DomName('DOMParser')
-class DomParser extends NativeFieldWrapperClass2 {
+class DomParser extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomParser._() { throw new UnsupportedError("Not supported"); }
 
@@ -12064,8 +12198,6 @@
     return new DomParser._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomParser._internalWrap() {
     return new DomParser.internal_();
   }
@@ -12182,7 +12314,7 @@
 @DocsEditable()
 @DomName('DOMPointReadOnly')
 @Experimental() // untriaged
-class DomPointReadOnly extends NativeFieldWrapperClass2 {
+class DomPointReadOnly extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomPointReadOnly._() { throw new UnsupportedError("Not supported"); }
 
@@ -12196,8 +12328,6 @@
     return new DomPointReadOnly._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomPointReadOnly._internalWrap() {
     return new DomPointReadOnly.internal_();
   }
@@ -12236,7 +12366,7 @@
 @DocsEditable()
 @DomName('DOMRectReadOnly')
 @Experimental() // untriaged
-class DomRectReadOnly extends NativeFieldWrapperClass2 implements Rectangle {
+class DomRectReadOnly extends DartHtmlDomObject implements Rectangle {
 
   // NOTE! All code below should be common with RectangleBase.
    String toString() {
@@ -12340,8 +12470,6 @@
     return new DomRectReadOnly._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomRectReadOnly._internalWrap() {
     return new DomRectReadOnly.internal_();
   }
@@ -12437,7 +12565,7 @@
 
 @DocsEditable()
 @DomName('DOMStringList')
-class DomStringList extends JsoNativeFieldWrapper with ListMixin<String>, ImmutableListMixin<String> implements List<String> {
+class DomStringList extends DartHtmlDomObject with ListMixin<String>, ImmutableListMixin<String> implements List<String> {
   // To suppress missing implicit constructor warnings.
   factory DomStringList._() { throw new UnsupportedError("Not supported"); }
 
@@ -12445,8 +12573,6 @@
     return new DomStringList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomStringList._internalWrap() {
     return new DomStringList.internal_();
   }
@@ -12524,7 +12650,7 @@
 
 @DocsEditable()
 @DomName('DOMStringMap')
-class DomStringMap extends NativeFieldWrapperClass2 {
+class DomStringMap extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomStringMap._() { throw new UnsupportedError("Not supported"); }
 
@@ -12570,7 +12696,7 @@
 
 @DocsEditable()
 @DomName('DOMTokenList')
-class DomTokenList extends NativeFieldWrapperClass2 {
+class DomTokenList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DomTokenList._() { throw new UnsupportedError("Not supported"); }
 
@@ -12578,8 +12704,6 @@
     return new DomTokenList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DomTokenList._internalWrap() {
     return new DomTokenList.internal_();
   }
@@ -16574,7 +16698,7 @@
 @DomName('Entry')
 // http://www.w3.org/TR/file-system-api/#the-entry-interface
 @Experimental()
-class Entry extends NativeFieldWrapperClass2 {
+class Entry extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Entry._() { throw new UnsupportedError("Not supported"); }
 
@@ -16582,8 +16706,6 @@
     return new Entry._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Entry._internalWrap() {
     return new Entry.internal_();
   }
@@ -16802,7 +16924,7 @@
 
 
 @DomName('Event')
-class Event extends NativeFieldWrapperClass2 {
+class Event extends DartHtmlDomObject {
   // In JS, canBubble and cancelable are technically required parameters to
   // init*Event. In practice, though, if they aren't provided they simply
   // default to false (since that's Boolean(undefined)).
@@ -16859,8 +16981,6 @@
     return new Event._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Event._internalWrap() {
     return new Event.internal_();
   }
@@ -17195,7 +17315,7 @@
  * for compile-time type checks and a more concise API.
  */
 @DomName('EventTarget')
-class EventTarget extends NativeFieldWrapperClass2 {
+class EventTarget extends DartHtmlDomObject {
 
   // Default constructor to allow other classes e.g. GlobalEventHandlers to be
   // constructed using _internalWrap when mapping Blink object to Dart class.
@@ -17235,8 +17355,6 @@
     return new EventTarget._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory EventTarget._internalWrap() {
     return new EventTarget.internal_();
   }
@@ -17691,7 +17809,7 @@
 
 @DocsEditable()
 @DomName('FileList')
-class FileList extends JsoNativeFieldWrapper with ListMixin<File>, ImmutableListMixin<File> implements List<File> {
+class FileList extends DartHtmlDomObject with ListMixin<File>, ImmutableListMixin<File> implements List<File> {
   // To suppress missing implicit constructor warnings.
   factory FileList._() { throw new UnsupportedError("Not supported"); }
 
@@ -17699,8 +17817,6 @@
     return new FileList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory FileList._internalWrap() {
     return new FileList.internal_();
   }
@@ -17951,7 +18067,7 @@
 @DocsEditable()
 @DomName('Stream')
 @Experimental() // untriaged
-class FileStream extends NativeFieldWrapperClass2 {
+class FileStream extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FileStream._() { throw new UnsupportedError("Not supported"); }
 
@@ -17959,8 +18075,6 @@
     return new FileStream._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory FileStream._internalWrap() {
     return new FileStream.internal_();
   }
@@ -17988,7 +18102,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME)
 @Experimental()
 // http://www.w3.org/TR/file-system-api/
-class FileSystem extends NativeFieldWrapperClass2 {
+class FileSystem extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FileSystem._() { throw new UnsupportedError("Not supported"); }
 
@@ -17996,8 +18110,6 @@
     return new FileSystem._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory FileSystem._internalWrap() {
     return new FileSystem.internal_();
   }
@@ -18243,7 +18355,7 @@
 @DocsEditable()
 @DomName('FontFace')
 @Experimental() // untriaged
-class FontFace extends NativeFieldWrapperClass2 {
+class FontFace extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FontFace._() { throw new UnsupportedError("Not supported"); }
 
@@ -18278,8 +18390,6 @@
     return new FontFace._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory FontFace._internalWrap() {
     return new FontFace.internal_();
   }
@@ -18503,7 +18613,7 @@
 @SupportedBrowser(SupportedBrowser.FIREFOX)
 @SupportedBrowser(SupportedBrowser.IE, '10')
 @SupportedBrowser(SupportedBrowser.SAFARI)
-class FormData extends NativeFieldWrapperClass2 {
+class FormData extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FormData._() { throw new UnsupportedError("Not supported"); }
 
@@ -18518,8 +18628,6 @@
     return new FormData._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory FormData._internalWrap() {
     return new FormData.internal_();
   }
@@ -18696,7 +18804,7 @@
 @DomName('Gamepad')
 // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#gamepad-interface
 @Experimental()
-class Gamepad extends NativeFieldWrapperClass2 {
+class Gamepad extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Gamepad._() { throw new UnsupportedError("Not supported"); }
 
@@ -18704,8 +18812,6 @@
     return new Gamepad._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Gamepad._internalWrap() {
     return new Gamepad.internal_();
   }
@@ -18752,7 +18858,7 @@
 @DocsEditable()
 @DomName('GamepadButton')
 @Experimental() // untriaged
-class GamepadButton extends NativeFieldWrapperClass2 {
+class GamepadButton extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory GamepadButton._() { throw new UnsupportedError("Not supported"); }
 
@@ -18760,8 +18866,6 @@
     return new GamepadButton._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory GamepadButton._internalWrap() {
     return new GamepadButton.internal_();
   }
@@ -18824,7 +18928,7 @@
 @DocsEditable()
 @DomName('Geofencing')
 @Experimental() // untriaged
-class Geofencing extends NativeFieldWrapperClass2 {
+class Geofencing extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Geofencing._() { throw new UnsupportedError("Not supported"); }
 
@@ -18832,8 +18936,6 @@
     return new Geofencing._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Geofencing._internalWrap() {
     return new Geofencing.internal_();
   }
@@ -18869,7 +18971,7 @@
 @DocsEditable()
 @DomName('GeofencingRegion')
 @Experimental() // untriaged
-class GeofencingRegion extends NativeFieldWrapperClass2 {
+class GeofencingRegion extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory GeofencingRegion._() { throw new UnsupportedError("Not supported"); }
 
@@ -18877,8 +18979,6 @@
     return new GeofencingRegion._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory GeofencingRegion._internalWrap() {
     return new GeofencingRegion.internal_();
   }
@@ -18902,7 +19002,7 @@
 @DocsEditable()
 @DomName('Geolocation')
 @Unstable()
-class Geolocation extends NativeFieldWrapperClass2 {
+class Geolocation extends DartHtmlDomObject {
 
   @DomName('Geolocation.getCurrentPosition')
   Future<Geoposition> getCurrentPosition({bool enableHighAccuracy,
@@ -18981,8 +19081,6 @@
     return new Geolocation._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Geolocation._internalWrap() {
     return new Geolocation.internal_();
   }
@@ -19030,7 +19128,7 @@
 @DocsEditable()
 @DomName('Geoposition')
 @Unstable()
-class Geoposition extends NativeFieldWrapperClass2 {
+class Geoposition extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Geoposition._() { throw new UnsupportedError("Not supported"); }
 
@@ -19038,8 +19136,6 @@
     return new Geoposition._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Geoposition._internalWrap() {
     return new Geoposition.internal_();
   }
@@ -19735,7 +19831,7 @@
 @DocsEditable()
 @DomName('Headers')
 @Experimental() // untriaged
-class Headers extends NativeFieldWrapperClass2 {
+class Headers extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Headers._() { throw new UnsupportedError("Not supported"); }
 
@@ -19759,8 +19855,6 @@
     return new Headers._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Headers._internalWrap() {
     return new Headers.internal_();
   }
@@ -19857,7 +19951,7 @@
 
 
 @DomName('History')
-class History extends NativeFieldWrapperClass2 implements HistoryBase {
+class History extends DartHtmlDomObject implements HistoryBase {
 
   /**
    * Checks if the State APIs are supported on the current platform.
@@ -19876,8 +19970,6 @@
     return new History._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory History._internalWrap() {
     return new History.internal_();
   }
@@ -19932,7 +20024,7 @@
 
 @DocsEditable()
 @DomName('HTMLCollection')
-class HtmlCollection extends JsoNativeFieldWrapper with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
+class HtmlCollection extends DartHtmlDomObject with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
   // To suppress missing implicit constructor warnings.
   factory HtmlCollection._() { throw new UnsupportedError("Not supported"); }
 
@@ -19940,8 +20032,6 @@
     return new HtmlCollection._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory HtmlCollection._internalWrap() {
     return new HtmlCollection.internal_();
   }
@@ -20291,10 +20381,8 @@
 
         // Get the created constructor source and look at the initializer;
         // Must call super.created() if not its as an error.
-        var createdSource = methodMirror.source?.replaceAll('\n', ' ');
-        RegExp regExp = new RegExp(r":(.*?)(;|}|\n)");
-        var match = regExp.firstMatch(createdSource);
-        superCreatedCalled = match.input.substring(match.start,match.end).contains("super.created(");
+        var createdSource = methodMirror.source;
+        superCreatedCalled = createdSource.contains("super.created(");
       }
 
       if (!superCreatedCalled) {
@@ -20357,10 +20445,18 @@
    */
   void registerElement(String tag, Type customElementClass,
       {String extendsTag}) {
-    // TODO(terry): Need to handle the extendsTag.
-
     // Figure out which DOM class is being extended from the user's Dart class.
     var classMirror = reflectClass(customElementClass);
+
+    var locationUri = classMirror.location.sourceUri.toString();
+    if (locationUri == 'dart:html' || locationUri == 'dart:svg') {
+      throw new DomException.jsInterop("HierarchyRequestError: Cannot register an existing dart:html or dart:svg type.");
+    }
+
+    if (classMirror.isAbstract) {
+      throw new DomException.jsInterop("HierarchyRequestError: Cannot register an abstract class.");
+    }
+
     var jsClassName = _getJSClassName(classMirror);
     if (jsClassName == null) {
       // Only components derived from HTML* can be extended.
@@ -20374,15 +20470,15 @@
       //
       //     var myProto = Object.create(HTMLElement.prototype);
       //     var myElement = document.registerElement('x-foo', {prototype: myProto});
-      var baseElement = js.context[jsClassName];
+      var baseElement = js.JsNative.getProperty(js.context, jsClassName);
       if (baseElement == null) {
         // Couldn't find the HTML element so use a generic one.
-        baseElement = js.context['HTMLElement'];
+        baseElement = js.JsNative.getProperty(js.context, 'HTMLElement');
       }
-      var elemProto = js.context['Object'].callMethod("create", [baseElement['prototype']]);
+      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.
-      _knownCustomeElements[tag] = customElementClass;
+      _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.,
@@ -20396,7 +20492,8 @@
       //
       //              See https://github.com/dart-lang/sdk/issues/23666
       int creating = 0;
-      elemProto['createdCallback'] = new js.JsFunction.withThis(($this) {
+      // TODO(jacobr): warning:
+      elemProto['createdCallback'] = js.JsNative.withThis(($this) {
         if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
           creating++;
 
@@ -20405,35 +20502,30 @@
             dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
           } catch (e) {
             dartClass = HtmlElement.internalCreateHtmlElement();
+            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. 
-            $this['dart_class'] = dartClass;
+            // with as we talk to blink.
+            js.setDartHtmlWrapperFor($this, dartClass);
 
             creating--;
           }
         }
       });
       elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
-        if ($this["dart_class"] != null && $this['dart_class'].attributeChanged != null) {
-          $this['dart_class'].attributeChanged(attrName, oldVal, newVal);
-        }
+        $this.attributeChanged(attrName, oldVal, newVal);
       });
       elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
-        if ($this["dart_class"] != null && $this['dart_class'].attached != null) {
-          $this['dart_class'].attached();
-        }
+        $this.attached();
       });
       elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
-        if ($this["dart_class"] != null && $this['dart_class'].detached != null) {
-          $this['dart_class'].detached();
-        }
+        $this.detached();
       });
       // document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
       var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});
-      js.context['document'].callMethod('registerElement', [tag, jsMap]);
+      js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'document'), 'registerElement', [tag, jsMap]);
     }
   }
 
@@ -20487,8 +20579,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('HTMLElement')
@@ -21149,6 +21239,11 @@
   @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;
+  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
@@ -22261,7 +22356,7 @@
 @DocsEditable()
 @DomName('ImageBitmap')
 @Experimental() // untriaged
-class ImageBitmap extends NativeFieldWrapperClass2 {
+class ImageBitmap extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ImageBitmap._() { throw new UnsupportedError("Not supported"); }
 
@@ -22269,8 +22364,6 @@
     return new ImageBitmap._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ImageBitmap._internalWrap() {
     return new ImageBitmap.internal_();
   }
@@ -22296,7 +22389,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 @DomName('ImageData')
-class ImageData extends NativeFieldWrapperClass2 {
+class ImageData extends DartHtmlDomObject {
   List<int> __data;
 
   List<int> get data {
@@ -22325,8 +22418,6 @@
     return new ImageData._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ImageData._internalWrap() {
     return new ImageData.internal_();
   }
@@ -22501,7 +22592,7 @@
 @DocsEditable()
 @DomName('InjectedScriptHost')
 @Experimental() // untriaged
-class InjectedScriptHost extends NativeFieldWrapperClass2 {
+class InjectedScriptHost extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory InjectedScriptHost._() { throw new UnsupportedError("Not supported"); }
 
@@ -22509,8 +22600,6 @@
     return new InjectedScriptHost._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory InjectedScriptHost._internalWrap() {
     return new InjectedScriptHost.internal_();
   }
@@ -24187,7 +24276,7 @@
 
 @DocsEditable()
 @DomName('Location')
-class Location extends NativeFieldWrapperClass2 implements LocationBase {
+class Location extends DartHtmlDomObject implements LocationBase {
   // To suppress missing implicit constructor warnings.
   factory Location._() { throw new UnsupportedError("Not supported"); }
 
@@ -24195,8 +24284,6 @@
     return new Location._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Location._internalWrap() {
     return new Location.internal_();
   }
@@ -24489,7 +24576,7 @@
 @DocsEditable()
 @DomName('MediaDeviceInfo')
 @Experimental() // untriaged
-class MediaDeviceInfo extends NativeFieldWrapperClass2 {
+class MediaDeviceInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaDeviceInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -24497,8 +24584,6 @@
     return new MediaDeviceInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MediaDeviceInfo._internalWrap() {
     return new MediaDeviceInfo.internal_();
   }
@@ -24968,7 +25053,7 @@
 @DocsEditable()
 @DomName('MediaError')
 @Unstable()
-class MediaError extends NativeFieldWrapperClass2 {
+class MediaError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaError._() { throw new UnsupportedError("Not supported"); }
 
@@ -24976,8 +25061,6 @@
     return new MediaError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MediaError._internalWrap() {
     return new MediaError.internal_();
   }
@@ -25025,7 +25108,7 @@
 @DomName('MediaKeyError')
 // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html#error-codes
 @Experimental()
-class MediaKeyError extends NativeFieldWrapperClass2 {
+class MediaKeyError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaKeyError._() { throw new UnsupportedError("Not supported"); }
 
@@ -25033,8 +25116,6 @@
     return new MediaKeyError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MediaKeyError._internalWrap() {
     return new MediaKeyError.internal_();
   }
@@ -25288,7 +25369,7 @@
 @DomName('MediaKeys')
 // https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1/encrypted-media/encrypted-media.html
 @Experimental()
-class MediaKeys extends NativeFieldWrapperClass2 {
+class MediaKeys extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaKeys._() { throw new UnsupportedError("Not supported"); }
 
@@ -25296,8 +25377,6 @@
     return new MediaKeys._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MediaKeys._internalWrap() {
     return new MediaKeys.internal_();
   }
@@ -25339,7 +25418,7 @@
 @DocsEditable()
 @DomName('MediaList')
 @Unstable()
-class MediaList extends NativeFieldWrapperClass2 {
+class MediaList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MediaList._() { throw new UnsupportedError("Not supported"); }
 
@@ -25347,8 +25426,6 @@
     return new MediaList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MediaList._internalWrap() {
     return new MediaList.internal_();
   }
@@ -25912,7 +25989,7 @@
 @DocsEditable()
 @DomName('MemoryInfo')
 @Experimental() // nonstandard
-class MemoryInfo extends NativeFieldWrapperClass2 {
+class MemoryInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MemoryInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -25920,8 +25997,6 @@
     return new MemoryInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MemoryInfo._internalWrap() {
     return new MemoryInfo.internal_();
   }
@@ -26103,7 +26178,7 @@
 @DocsEditable()
 @DomName('MessageChannel')
 @Unstable()
-class MessageChannel extends NativeFieldWrapperClass2 {
+class MessageChannel extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MessageChannel._() { throw new UnsupportedError("Not supported"); }
 
@@ -26111,8 +26186,6 @@
     return new MessageChannel._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MessageChannel._internalWrap() {
     return new MessageChannel.internal_();
   }
@@ -26314,7 +26387,7 @@
 @DomName('Metadata')
 // http://www.w3.org/TR/file-system-api/#the-metadata-interface
 @Experimental()
-class Metadata extends NativeFieldWrapperClass2 {
+class Metadata extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Metadata._() { throw new UnsupportedError("Not supported"); }
 
@@ -26322,8 +26395,6 @@
     return new Metadata._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Metadata._internalWrap() {
     return new Metadata.internal_();
   }
@@ -26605,7 +26676,7 @@
 @DocsEditable()
 @DomName('MIDIInputMap')
 @Experimental() // untriaged
-class MidiInputMap extends NativeFieldWrapperClass2 {
+class MidiInputMap extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MidiInputMap._() { throw new UnsupportedError("Not supported"); }
 
@@ -26613,8 +26684,6 @@
     return new MidiInputMap._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MidiInputMap._internalWrap() {
     return new MidiInputMap.internal_();
   }
@@ -26738,7 +26807,7 @@
 @DocsEditable()
 @DomName('MIDIOutputMap')
 @Experimental() // untriaged
-class MidiOutputMap extends NativeFieldWrapperClass2 {
+class MidiOutputMap extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MidiOutputMap._() { throw new UnsupportedError("Not supported"); }
 
@@ -26746,8 +26815,6 @@
     return new MidiOutputMap._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MidiOutputMap._internalWrap() {
     return new MidiOutputMap.internal_();
   }
@@ -26861,7 +26928,7 @@
 @DocsEditable()
 @DomName('MimeType')
 @Experimental() // non-standard
-class MimeType extends NativeFieldWrapperClass2 {
+class MimeType extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MimeType._() { throw new UnsupportedError("Not supported"); }
 
@@ -26869,8 +26936,6 @@
     return new MimeType._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MimeType._internalWrap() {
     return new MimeType.internal_();
   }
@@ -26907,7 +26972,7 @@
 @DocsEditable()
 @DomName('MimeTypeArray')
 @Experimental() // non-standard
-class MimeTypeArray extends JsoNativeFieldWrapper with ListMixin<MimeType>, ImmutableListMixin<MimeType> implements List<MimeType> {
+class MimeTypeArray extends DartHtmlDomObject with ListMixin<MimeType>, ImmutableListMixin<MimeType> implements List<MimeType> {
   // To suppress missing implicit constructor warnings.
   factory MimeTypeArray._() { throw new UnsupportedError("Not supported"); }
 
@@ -26915,8 +26980,6 @@
     return new MimeTypeArray._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MimeTypeArray._internalWrap() {
     return new MimeTypeArray.internal_();
   }
@@ -27250,7 +27313,7 @@
 @SupportedBrowser(SupportedBrowser.FIREFOX)
 @SupportedBrowser(SupportedBrowser.SAFARI)
 @Experimental()
-class MutationObserver extends NativeFieldWrapperClass2 {
+class MutationObserver extends DartHtmlDomObject {
 
   @DomName('MutationObserver.MutationObserver')
   @DocsEditable()
@@ -27260,8 +27323,6 @@
     return new MutationObserver._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MutationObserver._internalWrap() {
     return new MutationObserver.internal_();
   }
@@ -27364,7 +27425,7 @@
 
 @DocsEditable()
 @DomName('MutationRecord')
-class MutationRecord extends NativeFieldWrapperClass2 {
+class MutationRecord extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory MutationRecord._() { throw new UnsupportedError("Not supported"); }
 
@@ -27372,8 +27433,6 @@
     return new MutationRecord._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory MutationRecord._internalWrap() {
     return new MutationRecord.internal_();
   }
@@ -27426,7 +27485,7 @@
 
 
 @DomName('Navigator')
-class Navigator extends NativeFieldWrapperClass2 implements NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
+class Navigator extends DartHtmlDomObject implements NavigatorCpu, NavigatorLanguage, NavigatorOnLine, NavigatorID {
 
 
   /**
@@ -27491,8 +27550,6 @@
     return new Navigator._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Navigator._internalWrap() {
     return new Navigator.internal_();
   }
@@ -27698,7 +27755,7 @@
 @DocsEditable()
 @DomName('NavigatorCPU')
 @Experimental() // untriaged
-abstract class NavigatorCpu extends NativeFieldWrapperClass2 {
+abstract class NavigatorCpu extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NavigatorCpu._() { throw new UnsupportedError("Not supported"); }
 
@@ -27718,7 +27775,7 @@
 @DocsEditable()
 @DomName('NavigatorID')
 @Experimental() // untriaged
-abstract class NavigatorID extends NativeFieldWrapperClass2 {
+abstract class NavigatorID extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NavigatorID._() { throw new UnsupportedError("Not supported"); }
 
@@ -27768,7 +27825,7 @@
 @DocsEditable()
 @DomName('NavigatorLanguage')
 @Experimental() // untriaged
-abstract class NavigatorLanguage extends NativeFieldWrapperClass2 {
+abstract class NavigatorLanguage extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NavigatorLanguage._() { throw new UnsupportedError("Not supported"); }
 
@@ -27793,7 +27850,7 @@
 @DocsEditable()
 @DomName('NavigatorOnLine')
 @Experimental() // untriaged
-abstract class NavigatorOnLine extends NativeFieldWrapperClass2 {
+abstract class NavigatorOnLine extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NavigatorOnLine._() { throw new UnsupportedError("Not supported"); }
 
@@ -27814,7 +27871,7 @@
 @DomName('NavigatorUserMediaError')
 // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-NavigatorUserMediaError
 @Experimental()
-class NavigatorUserMediaError extends NativeFieldWrapperClass2 {
+class NavigatorUserMediaError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NavigatorUserMediaError._() { throw new UnsupportedError("Not supported"); }
 
@@ -27822,8 +27879,6 @@
     return new NavigatorUserMediaError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory NavigatorUserMediaError._internalWrap() {
     return new NavigatorUserMediaError.internal_();
   }
@@ -28522,7 +28577,7 @@
 @DocsEditable()
 @DomName('NodeFilter')
 @Unstable()
-class NodeFilter extends NativeFieldWrapperClass2 {
+class NodeFilter extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory NodeFilter._() { throw new UnsupportedError("Not supported"); }
 
@@ -28530,8 +28585,6 @@
     return new NodeFilter._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory NodeFilter._internalWrap() {
     return new NodeFilter.internal_();
   }
@@ -28593,7 +28646,7 @@
 
 @DomName('NodeIterator')
 @Unstable()
-class NodeIterator extends NativeFieldWrapperClass2 {
+class NodeIterator extends DartHtmlDomObject {
   factory NodeIterator(Node root, int whatToShow) {
     return document._createNodeIterator(root, whatToShow, null);
   }
@@ -28604,8 +28657,6 @@
     return new NodeIterator._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory NodeIterator._internalWrap() {
     return new NodeIterator.internal_();
   }
@@ -28653,7 +28704,7 @@
 
 @DocsEditable()
 @DomName('NodeList')
-class NodeList extends JsoNativeFieldWrapper with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
+class NodeList extends DartHtmlDomObject with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
   // To suppress missing implicit constructor warnings.
   factory NodeList._() { throw new UnsupportedError("Not supported"); }
 
@@ -28661,8 +28712,6 @@
     return new NodeList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory NodeList._internalWrap() {
     return new NodeList.internal_();
   }
@@ -29516,7 +29565,7 @@
 @DocsEditable()
 @DomName('ParentNode')
 @Experimental() // untriaged
-abstract class ParentNode extends NativeFieldWrapperClass2 {
+abstract class ParentNode extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ParentNode._() { throw new UnsupportedError("Not supported"); }
 
@@ -29561,7 +29610,7 @@
 @DocsEditable()
 @DomName('Path2D')
 @Experimental() // untriaged
-class Path2D extends NativeFieldWrapperClass2 implements _CanvasPathMethods {
+class Path2D extends DartHtmlDomObject implements _CanvasPathMethods {
   // To suppress missing implicit constructor warnings.
   factory Path2D._() { throw new UnsupportedError("Not supported"); }
 
@@ -29584,8 +29633,6 @@
     return new Path2D._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Path2D._internalWrap() {
     return new Path2D.internal_();
   }
@@ -29789,7 +29836,7 @@
 @DomName('PerformanceEntry')
 // http://www.w3.org/TR/performance-timeline/#sec-PerformanceEntry-interface
 @Experimental()
-class PerformanceEntry extends NativeFieldWrapperClass2 {
+class PerformanceEntry extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PerformanceEntry._() { throw new UnsupportedError("Not supported"); }
 
@@ -29797,8 +29844,6 @@
     return new PerformanceEntry._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PerformanceEntry._internalWrap() {
     return new PerformanceEntry.internal_();
   }
@@ -29891,7 +29936,7 @@
 @DocsEditable()
 @DomName('PerformanceNavigation')
 @Unstable()
-class PerformanceNavigation extends NativeFieldWrapperClass2 {
+class PerformanceNavigation extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PerformanceNavigation._() { throw new UnsupportedError("Not supported"); }
 
@@ -29899,8 +29944,6 @@
     return new PerformanceNavigation._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PerformanceNavigation._internalWrap() {
     return new PerformanceNavigation.internal_();
   }
@@ -30024,7 +30067,7 @@
 @DocsEditable()
 @DomName('PerformanceTiming')
 @Unstable()
-class PerformanceTiming extends NativeFieldWrapperClass2 {
+class PerformanceTiming extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PerformanceTiming._() { throw new UnsupportedError("Not supported"); }
 
@@ -30032,8 +30075,6 @@
     return new PerformanceTiming._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PerformanceTiming._internalWrap() {
     return new PerformanceTiming.internal_();
   }
@@ -30171,7 +30212,7 @@
 @DocsEditable()
 @DomName('Plugin')
 @Experimental() // non-standard
-class Plugin extends NativeFieldWrapperClass2 {
+class Plugin extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Plugin._() { throw new UnsupportedError("Not supported"); }
 
@@ -30179,8 +30220,6 @@
     return new Plugin._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Plugin._internalWrap() {
     return new Plugin.internal_();
   }
@@ -30229,7 +30268,7 @@
 @DocsEditable()
 @DomName('PluginArray')
 @Experimental() // non-standard
-class PluginArray extends JsoNativeFieldWrapper with ListMixin<Plugin>, ImmutableListMixin<Plugin> implements List<Plugin> {
+class PluginArray extends DartHtmlDomObject with ListMixin<Plugin>, ImmutableListMixin<Plugin> implements List<Plugin> {
   // To suppress missing implicit constructor warnings.
   factory PluginArray._() { throw new UnsupportedError("Not supported"); }
 
@@ -30237,8 +30276,6 @@
     return new PluginArray._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PluginArray._internalWrap() {
     return new PluginArray.internal_();
   }
@@ -30417,7 +30454,7 @@
 @DocsEditable()
 @DomName('PositionError')
 @Unstable()
-class PositionError extends NativeFieldWrapperClass2 {
+class PositionError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PositionError._() { throw new UnsupportedError("Not supported"); }
 
@@ -30425,8 +30462,6 @@
     return new PositionError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PositionError._internalWrap() {
     return new PositionError.internal_();
   }
@@ -30714,7 +30749,7 @@
 @DocsEditable()
 @DomName('PushManager')
 @Experimental() // untriaged
-class PushManager extends NativeFieldWrapperClass2 {
+class PushManager extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PushManager._() { throw new UnsupportedError("Not supported"); }
 
@@ -30722,8 +30757,6 @@
     return new PushManager._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PushManager._internalWrap() {
     return new PushManager.internal_();
   }
@@ -30749,7 +30782,7 @@
 @DocsEditable()
 @DomName('PushRegistration')
 @Experimental() // untriaged
-class PushRegistration extends NativeFieldWrapperClass2 {
+class PushRegistration extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PushRegistration._() { throw new UnsupportedError("Not supported"); }
 
@@ -30757,8 +30790,6 @@
     return new PushRegistration._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PushRegistration._internalWrap() {
     return new PushRegistration.internal_();
   }
@@ -30865,7 +30896,7 @@
 
 @DomName('Range')
 @Unstable()
-class Range extends NativeFieldWrapperClass2 {
+class Range extends DartHtmlDomObject {
   factory Range() => document.createRange();
 
   factory Range.fromPoint(Point point) =>
@@ -30877,8 +30908,6 @@
     return new Range._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Range._internalWrap() {
     return new Range.internal_();
   }
@@ -31067,7 +31096,7 @@
 @DocsEditable()
 @DomName('ReadableStream')
 @Experimental() // untriaged
-class ReadableStream extends NativeFieldWrapperClass2 {
+class ReadableStream extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ReadableStream._() { throw new UnsupportedError("Not supported"); }
 
@@ -31075,8 +31104,6 @@
     return new ReadableStream._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ReadableStream._internalWrap() {
     return new ReadableStream.internal_();
   }
@@ -31519,7 +31546,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME)
 @Experimental()
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCIceCandidate
-class RtcIceCandidate extends NativeFieldWrapperClass2 {
+class RtcIceCandidate extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory RtcIceCandidate._() { throw new UnsupportedError("Not supported"); }
 
@@ -31534,8 +31561,6 @@
     return new RtcIceCandidate._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RtcIceCandidate._internalWrap() {
     return new RtcIceCandidate.internal_();
   }
@@ -31908,7 +31933,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME)
 @Experimental()
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSessionDescription
-class RtcSessionDescription extends NativeFieldWrapperClass2 {
+class RtcSessionDescription extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory RtcSessionDescription._() { throw new UnsupportedError("Not supported"); }
 
@@ -31926,8 +31951,6 @@
     return new RtcSessionDescription._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RtcSessionDescription._internalWrap() {
     return new RtcSessionDescription.internal_();
   }
@@ -31965,7 +31988,7 @@
 @DomName('RTCStatsReport')
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCStatsReport
 @Experimental()
-class RtcStatsReport extends NativeFieldWrapperClass2 {
+class RtcStatsReport extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory RtcStatsReport._() { throw new UnsupportedError("Not supported"); }
 
@@ -31973,8 +31996,6 @@
     return new RtcStatsReport._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RtcStatsReport._internalWrap() {
     return new RtcStatsReport.internal_();
   }
@@ -32024,7 +32045,7 @@
 @DomName('RTCStatsResponse')
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCStatsReport-RTCStats-getter-DOMString-id
 @Experimental()
-class RtcStatsResponse extends NativeFieldWrapperClass2 {
+class RtcStatsResponse extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory RtcStatsResponse._() { throw new UnsupportedError("Not supported"); }
 
@@ -32032,8 +32053,6 @@
     return new RtcStatsResponse._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RtcStatsResponse._internalWrap() {
     return new RtcStatsResponse.internal_();
   }
@@ -32063,7 +32082,7 @@
 
 @DocsEditable()
 @DomName('Screen')
-class Screen extends NativeFieldWrapperClass2 {
+class Screen extends DartHtmlDomObject {
 
   @DomName('Screen.availHeight')
   @DomName('Screen.availLeft')
@@ -32078,8 +32097,6 @@
     return new Screen._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Screen._internalWrap() {
     return new Screen.internal_();
   }
@@ -32546,7 +32563,7 @@
 
 @DocsEditable()
 @DomName('Selection')
-class Selection extends NativeFieldWrapperClass2 {
+class Selection extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Selection._() { throw new UnsupportedError("Not supported"); }
 
@@ -32554,8 +32571,6 @@
     return new Selection._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Selection._internalWrap() {
     return new Selection.internal_();
   }
@@ -32700,7 +32715,7 @@
 @DocsEditable()
 @DomName('ServiceWorkerClient')
 @Experimental() // untriaged
-class ServiceWorkerClient extends NativeFieldWrapperClass2 {
+class ServiceWorkerClient extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ServiceWorkerClient._() { throw new UnsupportedError("Not supported"); }
 
@@ -32708,8 +32723,6 @@
     return new ServiceWorkerClient._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ServiceWorkerClient._internalWrap() {
     return new ServiceWorkerClient.internal_();
   }
@@ -32740,7 +32753,7 @@
 @DocsEditable()
 @DomName('ServiceWorkerClients')
 @Experimental() // untriaged
-class ServiceWorkerClients extends NativeFieldWrapperClass2 {
+class ServiceWorkerClients extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ServiceWorkerClients._() { throw new UnsupportedError("Not supported"); }
 
@@ -32748,8 +32761,6 @@
     return new ServiceWorkerClients._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ServiceWorkerClients._internalWrap() {
     return new ServiceWorkerClients.internal_();
   }
@@ -32777,7 +32788,7 @@
 @DocsEditable()
 @DomName('ServiceWorkerContainer')
 @Experimental() // untriaged
-class ServiceWorkerContainer extends NativeFieldWrapperClass2 {
+class ServiceWorkerContainer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ServiceWorkerContainer._() { throw new UnsupportedError("Not supported"); }
 
@@ -32785,8 +32796,6 @@
     return new ServiceWorkerContainer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ServiceWorkerContainer._internalWrap() {
     return new ServiceWorkerContainer.internal_();
   }
@@ -33495,7 +33504,7 @@
 @DocsEditable()
 @DomName('SourceInfo')
 @Experimental() // untriaged
-class SourceInfo extends NativeFieldWrapperClass2 {
+class SourceInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SourceInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -33503,8 +33512,6 @@
     return new SourceInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SourceInfo._internalWrap() {
     return new SourceInfo.internal_();
   }
@@ -33582,7 +33589,7 @@
 @DomName('SpeechGrammar')
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#dfn-speechgrammar
 @Experimental()
-class SpeechGrammar extends NativeFieldWrapperClass2 {
+class SpeechGrammar extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SpeechGrammar._() { throw new UnsupportedError("Not supported"); }
 
@@ -33596,8 +33603,6 @@
     return new SpeechGrammar._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SpeechGrammar._internalWrap() {
     return new SpeechGrammar.internal_();
   }
@@ -33635,7 +33640,7 @@
 @DomName('SpeechGrammarList')
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#dfn-speechgrammarlist
 @Experimental()
-class SpeechGrammarList extends JsoNativeFieldWrapper with ListMixin<SpeechGrammar>, ImmutableListMixin<SpeechGrammar> implements List<SpeechGrammar> {
+class SpeechGrammarList extends DartHtmlDomObject with ListMixin<SpeechGrammar>, ImmutableListMixin<SpeechGrammar> implements List<SpeechGrammar> {
   // To suppress missing implicit constructor warnings.
   factory SpeechGrammarList._() { throw new UnsupportedError("Not supported"); }
 
@@ -33649,8 +33654,6 @@
     return new SpeechGrammarList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SpeechGrammarList._internalWrap() {
     return new SpeechGrammarList.internal_();
   }
@@ -34000,7 +34003,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME, '25')
 @Experimental()
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechrecognitionalternative
-class SpeechRecognitionAlternative extends NativeFieldWrapperClass2 {
+class SpeechRecognitionAlternative extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionAlternative._() { throw new UnsupportedError("Not supported"); }
 
@@ -34008,8 +34011,6 @@
     return new SpeechRecognitionAlternative._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SpeechRecognitionAlternative._internalWrap() {
     return new SpeechRecognitionAlternative.internal_();
   }
@@ -34122,7 +34123,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME, '25')
 @Experimental()
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechrecognitionresult
-class SpeechRecognitionResult extends NativeFieldWrapperClass2 {
+class SpeechRecognitionResult extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SpeechRecognitionResult._() { throw new UnsupportedError("Not supported"); }
 
@@ -34130,8 +34131,6 @@
     return new SpeechRecognitionResult._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SpeechRecognitionResult._internalWrap() {
     return new SpeechRecognitionResult.internal_();
   }
@@ -34452,7 +34451,7 @@
 @DomName('SpeechSynthesisVoice')
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section
 @Experimental()
-class SpeechSynthesisVoice extends NativeFieldWrapperClass2 {
+class SpeechSynthesisVoice extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SpeechSynthesisVoice._() { throw new UnsupportedError("Not supported"); }
 
@@ -34460,8 +34459,6 @@
     return new SpeechSynthesisVoice._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SpeechSynthesisVoice._internalWrap() {
     return new SpeechSynthesisVoice.internal_();
   }
@@ -34524,7 +34521,7 @@
  */
 @DomName('Storage')
 @Unstable()
-class Storage extends NativeFieldWrapperClass2
+class Storage extends DartHtmlDomObject
     implements Map<String, String> {
 
   void addAll(Map<String, String> other) {
@@ -34586,8 +34583,6 @@
     return new Storage._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Storage._internalWrap() {
     return new Storage.internal_();
   }
@@ -34735,7 +34730,7 @@
 @DomName('StorageInfo')
 // http://www.w3.org/TR/file-system-api/
 @Experimental()
-class StorageInfo extends NativeFieldWrapperClass2 {
+class StorageInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory StorageInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -34743,8 +34738,6 @@
     return new StorageInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory StorageInfo._internalWrap() {
     return new StorageInfo.internal_();
   }
@@ -34776,7 +34769,7 @@
 @DomName('StorageQuota')
 // http://www.w3.org/TR/quota-api/#idl-def-StorageQuota
 @Experimental()
-class StorageQuota extends NativeFieldWrapperClass2 {
+class StorageQuota extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory StorageQuota._() { throw new UnsupportedError("Not supported"); }
 
@@ -34784,8 +34777,6 @@
     return new StorageQuota._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory StorageQuota._internalWrap() {
     return new StorageQuota.internal_();
   }
@@ -34919,7 +34910,7 @@
 @DomName('StyleMedia')
 // http://developer.apple.com/library/safari/#documentation/SafariDOMAdditions/Reference/StyleMedia/StyleMedia/StyleMedia.html
 @Experimental() // nonstandard
-class StyleMedia extends NativeFieldWrapperClass2 {
+class StyleMedia extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory StyleMedia._() { throw new UnsupportedError("Not supported"); }
 
@@ -34927,8 +34918,6 @@
     return new StyleMedia._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory StyleMedia._internalWrap() {
     return new StyleMedia.internal_();
   }
@@ -34956,7 +34945,7 @@
 
 @DocsEditable()
 @DomName('StyleSheet')
-class StyleSheet extends NativeFieldWrapperClass2 {
+class StyleSheet extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory StyleSheet._() { throw new UnsupportedError("Not supported"); }
 
@@ -34964,8 +34953,6 @@
     return new StyleSheet._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory StyleSheet._internalWrap() {
     return new StyleSheet.internal_();
   }
@@ -35793,7 +35780,7 @@
 
 @DocsEditable()
 @DomName('TextMetrics')
-class TextMetrics extends NativeFieldWrapperClass2 {
+class TextMetrics extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory TextMetrics._() { throw new UnsupportedError("Not supported"); }
 
@@ -35801,8 +35788,6 @@
     return new TextMetrics._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TextMetrics._internalWrap() {
     return new TextMetrics.internal_();
   }
@@ -36076,7 +36061,7 @@
 @DomName('TextTrackCueList')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcuelist
 @Experimental()
-class TextTrackCueList extends JsoNativeFieldWrapper with ListMixin<TextTrackCue>, ImmutableListMixin<TextTrackCue> implements List<TextTrackCue> {
+class TextTrackCueList extends DartHtmlDomObject with ListMixin<TextTrackCue>, ImmutableListMixin<TextTrackCue> implements List<TextTrackCue> {
   // To suppress missing implicit constructor warnings.
   factory TextTrackCueList._() { throw new UnsupportedError("Not supported"); }
 
@@ -36084,8 +36069,6 @@
     return new TextTrackCueList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TextTrackCueList._internalWrap() {
     return new TextTrackCueList.internal_();
   }
@@ -36276,7 +36259,7 @@
 @DocsEditable()
 @DomName('TimeRanges')
 @Unstable()
-class TimeRanges extends NativeFieldWrapperClass2 {
+class TimeRanges extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory TimeRanges._() { throw new UnsupportedError("Not supported"); }
 
@@ -36284,8 +36267,6 @@
     return new TimeRanges._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TimeRanges._internalWrap() {
     return new TimeRanges.internal_();
   }
@@ -36327,7 +36308,7 @@
 @DocsEditable()
 @DomName('Timing')
 @Experimental() // untriaged
-class Timing extends NativeFieldWrapperClass2 {
+class Timing extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Timing._() { throw new UnsupportedError("Not supported"); }
 
@@ -36335,8 +36316,6 @@
     return new Timing._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Timing._internalWrap() {
     return new Timing.internal_();
   }
@@ -36482,7 +36461,7 @@
 @DomName('Touch')
 // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
 @Experimental()
-class Touch extends NativeFieldWrapperClass2 {
+class Touch extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Touch._() { throw new UnsupportedError("Not supported"); }
 
@@ -36490,8 +36469,6 @@
     return new Touch._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Touch._internalWrap() {
     return new Touch.internal_();
   }
@@ -36684,7 +36661,7 @@
 @DomName('TouchList')
 // http://www.w3.org/TR/touch-events/, http://www.chromestatus.com/features
 @Experimental()
-class TouchList extends JsoNativeFieldWrapper with ListMixin<Touch>, ImmutableListMixin<Touch> implements List<Touch> {
+class TouchList extends DartHtmlDomObject with ListMixin<Touch>, ImmutableListMixin<Touch> implements List<Touch> {
   /// NB: This constructor likely does not work as you might expect it to! This
   /// constructor will simply fail (returning null) if you are not on a device
   /// with touch enabled. See dartbug.com/8314.
@@ -36697,8 +36674,6 @@
     return new TouchList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TouchList._internalWrap() {
     return new TouchList.internal_();
   }
@@ -36960,7 +36935,7 @@
 
 @DomName('TreeWalker')
 @Unstable()
-class TreeWalker extends NativeFieldWrapperClass2 {
+class TreeWalker extends DartHtmlDomObject {
   factory TreeWalker(Node root, int whatToShow) {
     return document._createTreeWalker(root, whatToShow, null);
   }
@@ -36971,8 +36946,6 @@
     return new TreeWalker._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TreeWalker._internalWrap() {
     return new TreeWalker.internal_();
   }
@@ -37208,7 +37181,7 @@
 
 @DocsEditable()
 @DomName('URL')
-class Url extends NativeFieldWrapperClass2 implements UrlUtils {
+class Url extends DartHtmlDomObject implements UrlUtils {
   // To suppress missing implicit constructor warnings.
   factory Url._() { throw new UnsupportedError("Not supported"); }
 
@@ -37216,8 +37189,6 @@
     return new Url._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Url._internalWrap() {
     return new Url.internal_();
   }
@@ -37377,7 +37348,7 @@
 @DocsEditable()
 @DomName('URLUtils')
 @Experimental() // untriaged
-abstract class UrlUtils extends NativeFieldWrapperClass2 {
+abstract class UrlUtils extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory UrlUtils._() { throw new UnsupportedError("Not supported"); }
 
@@ -37502,7 +37473,7 @@
 @DocsEditable()
 @DomName('URLUtilsReadOnly')
 @Experimental() // untriaged
-abstract class UrlUtilsReadOnly extends NativeFieldWrapperClass2 {
+abstract class UrlUtilsReadOnly extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory UrlUtilsReadOnly._() { throw new UnsupportedError("Not supported"); }
 
@@ -37566,7 +37537,7 @@
 
 @DocsEditable()
 @DomName('ValidityState')
-class ValidityState extends NativeFieldWrapperClass2 {
+class ValidityState extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ValidityState._() { throw new UnsupportedError("Not supported"); }
 
@@ -37574,8 +37545,6 @@
     return new ValidityState._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ValidityState._internalWrap() {
     return new ValidityState.internal_();
   }
@@ -37736,7 +37705,7 @@
 @DocsEditable()
 @DomName('VideoPlaybackQuality')
 @Experimental() // untriaged
-class VideoPlaybackQuality extends NativeFieldWrapperClass2 {
+class VideoPlaybackQuality extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory VideoPlaybackQuality._() { throw new UnsupportedError("Not supported"); }
 
@@ -37744,8 +37713,6 @@
     return new VideoPlaybackQuality._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory VideoPlaybackQuality._internalWrap() {
     return new VideoPlaybackQuality.internal_();
   }
@@ -37786,7 +37753,7 @@
 @DocsEditable()
 @DomName('VideoTrack')
 @Experimental() // untriaged
-class VideoTrack extends NativeFieldWrapperClass2 {
+class VideoTrack extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory VideoTrack._() { throw new UnsupportedError("Not supported"); }
 
@@ -37794,8 +37761,6 @@
     return new VideoTrack._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory VideoTrack._internalWrap() {
     return new VideoTrack.internal_();
   }
@@ -38032,7 +37997,7 @@
 @DocsEditable()
 @DomName('VTTRegion')
 @Experimental() // untriaged
-class VttRegion extends NativeFieldWrapperClass2 {
+class VttRegion extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory VttRegion._() { throw new UnsupportedError("Not supported"); }
 
@@ -38046,8 +38011,6 @@
     return new VttRegion._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory VttRegion._internalWrap() {
     return new VttRegion.internal_();
   }
@@ -38153,7 +38116,7 @@
 @DocsEditable()
 @DomName('VTTRegionList')
 @Experimental() // untriaged
-class VttRegionList extends NativeFieldWrapperClass2 {
+class VttRegionList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory VttRegionList._() { throw new UnsupportedError("Not supported"); }
 
@@ -38161,8 +38124,6 @@
     return new VttRegionList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory VttRegionList._internalWrap() {
     return new VttRegionList.internal_();
   }
@@ -40142,7 +40103,7 @@
 @DocsEditable()
 @DomName('WindowBase64')
 @Experimental() // untriaged
-abstract class WindowBase64 extends NativeFieldWrapperClass2 {
+abstract class WindowBase64 extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory WindowBase64._() { throw new UnsupportedError("Not supported"); }
 
@@ -40540,7 +40501,7 @@
 @DocsEditable()
 @DomName('WorkerPerformance')
 @Experimental() // untriaged
-class WorkerPerformance extends NativeFieldWrapperClass2 {
+class WorkerPerformance extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory WorkerPerformance._() { throw new UnsupportedError("Not supported"); }
 
@@ -40548,8 +40509,6 @@
     return new WorkerPerformance._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory WorkerPerformance._internalWrap() {
     return new WorkerPerformance.internal_();
   }
@@ -40581,7 +40540,7 @@
 @DomName('XPathEvaluator')
 // http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator
 @deprecated // experimental
-class XPathEvaluator extends NativeFieldWrapperClass2 {
+class XPathEvaluator extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XPathEvaluator._() { throw new UnsupportedError("Not supported"); }
 
@@ -40595,8 +40554,6 @@
     return new XPathEvaluator._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XPathEvaluator._internalWrap() {
     return new XPathEvaluator.internal_();
   }
@@ -40630,7 +40587,7 @@
 @DomName('XPathExpression')
 // http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
 @deprecated // experimental
-class XPathExpression extends NativeFieldWrapperClass2 {
+class XPathExpression extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XPathExpression._() { throw new UnsupportedError("Not supported"); }
 
@@ -40638,8 +40595,6 @@
     return new XPathExpression._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XPathExpression._internalWrap() {
     return new XPathExpression.internal_();
   }
@@ -40665,7 +40620,7 @@
 @DomName('XPathNSResolver')
 // http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNSResolver
 @deprecated // experimental
-class XPathNSResolver extends NativeFieldWrapperClass2 {
+class XPathNSResolver extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XPathNSResolver._() { throw new UnsupportedError("Not supported"); }
 
@@ -40673,8 +40628,6 @@
     return new XPathNSResolver._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XPathNSResolver._internalWrap() {
     return new XPathNSResolver.internal_();
   }
@@ -40700,7 +40653,7 @@
 @DomName('XPathResult')
 // http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult
 @deprecated // experimental
-class XPathResult extends NativeFieldWrapperClass2 {
+class XPathResult extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XPathResult._() { throw new UnsupportedError("Not supported"); }
 
@@ -40708,8 +40661,6 @@
     return new XPathResult._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XPathResult._internalWrap() {
     return new XPathResult.internal_();
   }
@@ -40834,7 +40785,7 @@
 @DomName('XMLSerializer')
 // http://domparsing.spec.whatwg.org/#the-xmlserializer-interface
 @deprecated // stable
-class XmlSerializer extends NativeFieldWrapperClass2 {
+class XmlSerializer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XmlSerializer._() { throw new UnsupportedError("Not supported"); }
 
@@ -40848,8 +40799,6 @@
     return new XmlSerializer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XmlSerializer._internalWrap() {
     return new XmlSerializer.internal_();
   }
@@ -40877,7 +40826,7 @@
 @SupportedBrowser(SupportedBrowser.FIREFOX)
 @SupportedBrowser(SupportedBrowser.SAFARI)
 @deprecated // nonstandard
-class XsltProcessor extends NativeFieldWrapperClass2 {
+class XsltProcessor extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory XsltProcessor._() { throw new UnsupportedError("Not supported"); }
 
@@ -40891,8 +40840,6 @@
     return new XsltProcessor._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory XsltProcessor._internalWrap() {
     return new XsltProcessor.internal_();
   }
@@ -41068,7 +41015,7 @@
 @DomName('CSSValue')
 // http://dev.w3.org/csswg/cssom/
 @deprecated // deprecated
-class _CSSValue extends NativeFieldWrapperClass2 {
+class _CSSValue extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _CSSValue._() { throw new UnsupportedError("Not supported"); }
 
@@ -41076,8 +41023,6 @@
     return new _CSSValue._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _CSSValue._internalWrap() {
     return new _CSSValue.internal_();
   }
@@ -41098,7 +41043,7 @@
 @DocsEditable()
 @DomName('Cache')
 @Experimental() // untriaged
-class _Cache extends NativeFieldWrapperClass2 {
+class _Cache extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _Cache._() { throw new UnsupportedError("Not supported"); }
 
@@ -41106,8 +41051,6 @@
     return new _Cache._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _Cache._internalWrap() {
     return new _Cache.internal_();
   }
@@ -41128,7 +41071,7 @@
 @DocsEditable()
 @DomName('CanvasPathMethods')
 @Experimental() // untriaged
-class _CanvasPathMethods extends NativeFieldWrapperClass2 {
+class _CanvasPathMethods extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _CanvasPathMethods._() { throw new UnsupportedError("Not supported"); }
 
@@ -41140,7 +41083,7 @@
 
 @DocsEditable()
 @DomName('ClientRect')
-class _ClientRect extends NativeFieldWrapperClass2 implements Rectangle {
+class _ClientRect extends DartHtmlDomObject implements Rectangle {
 
   // NOTE! All code below should be common with RectangleBase.
    String toString() {
@@ -41238,8 +41181,6 @@
     return new _ClientRect._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _ClientRect._internalWrap() {
     return new _ClientRect.internal_();
   }
@@ -41317,7 +41258,7 @@
 
 @DocsEditable()
 @DomName('ClientRectList')
-class _ClientRectList extends JsoNativeFieldWrapper with ListMixin<Rectangle>, ImmutableListMixin<Rectangle> implements List<Rectangle> {
+class _ClientRectList extends DartHtmlDomObject with ListMixin<Rectangle>, ImmutableListMixin<Rectangle> implements List<Rectangle> {
   // To suppress missing implicit constructor warnings.
   factory _ClientRectList._() { throw new UnsupportedError("Not supported"); }
 
@@ -41325,8 +41266,6 @@
     return new _ClientRectList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _ClientRectList._internalWrap() {
     return new _ClientRectList.internal_();
   }
@@ -41402,7 +41341,7 @@
 @DomName('Counter')
 // http://dev.w3.org/csswg/cssom/
 @deprecated // deprecated
-class _Counter extends NativeFieldWrapperClass2 {
+class _Counter extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _Counter._() { throw new UnsupportedError("Not supported"); }
 
@@ -41410,8 +41349,6 @@
     return new _Counter._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _Counter._internalWrap() {
     return new _Counter.internal_();
   }
@@ -41431,7 +41368,7 @@
 
 @DocsEditable()
 @DomName('CSSRuleList')
-class _CssRuleList extends JsoNativeFieldWrapper with ListMixin<CssRule>, ImmutableListMixin<CssRule> implements List<CssRule> {
+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"); }
 
@@ -41439,8 +41376,6 @@
     return new _CssRuleList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _CssRuleList._internalWrap() {
     return new _CssRuleList.internal_();
   }
@@ -41599,7 +41534,7 @@
 @SupportedBrowser(SupportedBrowser.CHROME)
 @Experimental()
 // http://www.w3.org/TR/file-system-api/#the-filesystemsync-interface
-class _DOMFileSystemSync extends NativeFieldWrapperClass2 {
+class _DOMFileSystemSync extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _DOMFileSystemSync._() { throw new UnsupportedError("Not supported"); }
 
@@ -41607,8 +41542,6 @@
     return new _DOMFileSystemSync._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _DOMFileSystemSync._internalWrap() {
     return new _DOMFileSystemSync.internal_();
   }
@@ -41658,7 +41591,7 @@
 @DomName('DirectoryReaderSync')
 // http://www.w3.org/TR/file-system-api/#idl-def-DirectoryReaderSync
 @Experimental()
-class _DirectoryReaderSync extends NativeFieldWrapperClass2 {
+class _DirectoryReaderSync extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _DirectoryReaderSync._() { throw new UnsupportedError("Not supported"); }
 
@@ -41666,8 +41599,6 @@
     return new _DirectoryReaderSync._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _DirectoryReaderSync._internalWrap() {
     return new _DirectoryReaderSync.internal_();
   }
@@ -41804,7 +41735,7 @@
 @DomName('EntrySync')
 // http://www.w3.org/TR/file-system-api/#idl-def-EntrySync
 @Experimental()
-class _EntrySync extends NativeFieldWrapperClass2 {
+class _EntrySync extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _EntrySync._() { throw new UnsupportedError("Not supported"); }
 
@@ -41812,8 +41743,6 @@
     return new _EntrySync._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _EntrySync._internalWrap() {
     return new _EntrySync.internal_();
   }
@@ -41863,7 +41792,7 @@
 @DomName('FileReaderSync')
 // http://www.w3.org/TR/FileAPI/#FileReaderSync
 @Experimental()
-class _FileReaderSync extends NativeFieldWrapperClass2 {
+class _FileReaderSync extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _FileReaderSync._() { throw new UnsupportedError("Not supported"); }
 
@@ -41877,8 +41806,6 @@
     return new _FileReaderSync._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _FileReaderSync._internalWrap() {
     return new _FileReaderSync.internal_();
   }
@@ -41900,7 +41827,7 @@
 @DomName('FileWriterSync')
 // http://www.w3.org/TR/file-writer-api/#idl-def-FileWriterSync
 @Experimental()
-class _FileWriterSync extends NativeFieldWrapperClass2 {
+class _FileWriterSync extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _FileWriterSync._() { throw new UnsupportedError("Not supported"); }
 
@@ -41908,8 +41835,6 @@
     return new _FileWriterSync._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _FileWriterSync._internalWrap() {
     return new _FileWriterSync.internal_();
   }
@@ -41931,7 +41856,7 @@
 @DomName('GamepadList')
 // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html
 @Experimental()
-class _GamepadList extends JsoNativeFieldWrapper with ListMixin<Gamepad>, ImmutableListMixin<Gamepad> implements List<Gamepad> {
+class _GamepadList extends DartHtmlDomObject with ListMixin<Gamepad>, ImmutableListMixin<Gamepad> implements List<Gamepad> {
   // To suppress missing implicit constructor warnings.
   factory _GamepadList._() { throw new UnsupportedError("Not supported"); }
 
@@ -41939,8 +41864,6 @@
     return new _GamepadList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _GamepadList._internalWrap() {
     return new _GamepadList.internal_();
   }
@@ -42016,7 +41939,7 @@
 @DomName('HTMLAllCollection')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#dom-document-all
 @deprecated // deprecated
-class _HTMLAllCollection extends NativeFieldWrapperClass2 {
+class _HTMLAllCollection extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _HTMLAllCollection._() { throw new UnsupportedError("Not supported"); }
 
@@ -42024,8 +41947,6 @@
     return new _HTMLAllCollection._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _HTMLAllCollection._internalWrap() {
     return new _HTMLAllCollection.internal_();
   }
@@ -42296,7 +42217,7 @@
 @DomName('NamedNodeMap')
 // http://dom.spec.whatwg.org/#namednodemap
 @deprecated // deprecated
-class _NamedNodeMap extends JsoNativeFieldWrapper with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
+class _NamedNodeMap extends DartHtmlDomObject with ListMixin<Node>, ImmutableListMixin<Node> implements List<Node> {
   // To suppress missing implicit constructor warnings.
   factory _NamedNodeMap._() { throw new UnsupportedError("Not supported"); }
 
@@ -42304,8 +42225,6 @@
     return new _NamedNodeMap._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _NamedNodeMap._internalWrap() {
     return new _NamedNodeMap.internal_();
   }
@@ -42408,7 +42327,7 @@
 @DocsEditable()
 @DomName('PagePopupController')
 @deprecated // nonstandard
-class _PagePopupController extends NativeFieldWrapperClass2 {
+class _PagePopupController extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _PagePopupController._() { throw new UnsupportedError("Not supported"); }
 
@@ -42416,8 +42335,6 @@
     return new _PagePopupController._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _PagePopupController._internalWrap() {
     return new _PagePopupController.internal_();
   }
@@ -42439,7 +42356,7 @@
 @DomName('RGBColor')
 // http://dev.w3.org/csswg/cssom/
 @deprecated // deprecated
-class _RGBColor extends NativeFieldWrapperClass2 {
+class _RGBColor extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _RGBColor._() { throw new UnsupportedError("Not supported"); }
 
@@ -42447,8 +42364,6 @@
     return new _RGBColor._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _RGBColor._internalWrap() {
     return new _RGBColor.internal_();
   }
@@ -42493,7 +42408,7 @@
 @DomName('Rect')
 // http://dev.w3.org/csswg/cssom/
 @deprecated // deprecated
-class _Rect extends NativeFieldWrapperClass2 {
+class _Rect extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _Rect._() { throw new UnsupportedError("Not supported"); }
 
@@ -42501,8 +42416,6 @@
     return new _Rect._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _Rect._internalWrap() {
     return new _Rect.internal_();
   }
@@ -42690,7 +42603,7 @@
 @DomName('SpeechRecognitionResultList')
 // https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechrecognitionresultlist
 @Experimental()
-class _SpeechRecognitionResultList extends JsoNativeFieldWrapper with ListMixin<SpeechRecognitionResult>, ImmutableListMixin<SpeechRecognitionResult> implements List<SpeechRecognitionResult> {
+class _SpeechRecognitionResultList extends DartHtmlDomObject with ListMixin<SpeechRecognitionResult>, ImmutableListMixin<SpeechRecognitionResult> implements List<SpeechRecognitionResult> {
   // To suppress missing implicit constructor warnings.
   factory _SpeechRecognitionResultList._() { throw new UnsupportedError("Not supported"); }
 
@@ -42698,8 +42611,6 @@
     return new _SpeechRecognitionResultList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _SpeechRecognitionResultList._internalWrap() {
     return new _SpeechRecognitionResultList.internal_();
   }
@@ -42773,7 +42684,7 @@
 
 @DocsEditable()
 @DomName('StyleSheetList')
-class _StyleSheetList extends JsoNativeFieldWrapper with ListMixin<StyleSheet>, ImmutableListMixin<StyleSheet> implements List<StyleSheet> {
+class _StyleSheetList extends DartHtmlDomObject with ListMixin<StyleSheet>, ImmutableListMixin<StyleSheet> implements List<StyleSheet> {
   // To suppress missing implicit constructor warnings.
   factory _StyleSheetList._() { throw new UnsupportedError("Not supported"); }
 
@@ -42781,8 +42692,6 @@
     return new _StyleSheetList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _StyleSheetList._internalWrap() {
     return new _StyleSheetList.internal_();
   }
@@ -42861,7 +42770,7 @@
 @DocsEditable()
 @DomName('SubtleCrypto')
 @Experimental() // untriaged
-class _SubtleCrypto extends NativeFieldWrapperClass2 {
+class _SubtleCrypto extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _SubtleCrypto._() { throw new UnsupportedError("Not supported"); }
 
@@ -42869,8 +42778,6 @@
     return new _SubtleCrypto._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _SubtleCrypto._internalWrap() {
     return new _SubtleCrypto.internal_();
   }
@@ -42923,7 +42830,7 @@
 @Experimental()
 // http://dev.w3.org/csswg/cssom/
 @deprecated // deprecated
-class _WebKitCSSMatrix extends NativeFieldWrapperClass2 {
+class _WebKitCSSMatrix extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _WebKitCSSMatrix._() { throw new UnsupportedError("Not supported"); }
 
@@ -42937,8 +42844,6 @@
     return new _WebKitCSSMatrix._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _WebKitCSSMatrix._internalWrap() {
     return new _WebKitCSSMatrix.internal_();
   }
@@ -42987,7 +42892,7 @@
 @DocsEditable()
 @DomName('WindowTimers')
 @Experimental() // untriaged
-abstract class _WindowTimers extends NativeFieldWrapperClass2 {
+abstract class _WindowTimers extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _WindowTimers._() { throw new UnsupportedError("Not supported"); }
 
@@ -43021,7 +42926,7 @@
 @DomName('WorkerLocation')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerlocation
 @Experimental()
-class _WorkerLocation extends NativeFieldWrapperClass2 implements UrlUtilsReadOnly {
+class _WorkerLocation extends DartHtmlDomObject implements UrlUtilsReadOnly {
   // To suppress missing implicit constructor warnings.
   factory _WorkerLocation._() { throw new UnsupportedError("Not supported"); }
 
@@ -43029,8 +42934,6 @@
     return new _WorkerLocation._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _WorkerLocation._internalWrap() {
     return new _WorkerLocation.internal_();
   }
@@ -43061,7 +42964,7 @@
 @DomName('WorkerNavigator')
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workernavigator
 @Experimental()
-class _WorkerNavigator extends NativeFieldWrapperClass2 implements NavigatorCpu, NavigatorOnLine, NavigatorID {
+class _WorkerNavigator extends DartHtmlDomObject implements NavigatorCpu, NavigatorOnLine, NavigatorID {
   // To suppress missing implicit constructor warnings.
   factory _WorkerNavigator._() { throw new UnsupportedError("Not supported"); }
 
@@ -43069,8 +42972,6 @@
     return new _WorkerNavigator._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory _WorkerNavigator._internalWrap() {
     return new _WorkerNavigator.internal_();
   }
@@ -47281,11 +47182,21 @@
   }
 
   Element upgrade(element) {
-    if (element.runtimeType != js.JsObjectImpl) {
-      throw new UnsupportedError('Element is incorrect type');
+    var jsObject;
+    var tag = _getCustomElementName(element);
+    if (element.runtimeType == HtmlElement || element.runtimeType == TemplateElement) {
+      jsObject = unwrap_jso(element);
+    } else if (element.runtimeType == js.JsObjectImpl) {
+      // It's a Polymer core element (written in JS).
+      jsObject = element;
+    } else {
+      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObjectImpl.');
     }
 
-    return createCustomUpgrader(_nativeType, element);
+    // Remember Dart class to tagName for any upgrading done in wrap_jso.
+    _addCustomElementType(tag, _type);
+
+    return createCustomUpgrader(_nativeType, jsObject);
   }
 }
 
@@ -47821,6 +47732,8 @@
     }
   }
 
+  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;
@@ -48466,7 +48379,7 @@
     return [
         "inspect",
         (o) {
-          host.inspect(o, null);
+          host.callMethod("inspect", [o]);
           return o;
         },
         "dir",
@@ -48505,7 +48418,7 @@
     _blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type);
 }
 
-class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements
+class _DOMWindowCrossFrame extends DartHtmlDomObject implements
     WindowBase {
   /** Needed because KeyboardEvent is implements.
    *  TODO(terry): Consider making blink_jsObject private (add underscore) for
@@ -48556,7 +48469,7 @@
     'You can only attach EventListeners to your own window.');
 }
 
-class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase {
+class _HistoryCrossFrame extends DartHtmlDomObject implements HistoryBase {
   _HistoryCrossFrame.internal();
 
   // Methods.
@@ -48568,7 +48481,7 @@
   String get typeName => "History";
 }
 
-class _LocationCrossFrame extends NativeFieldWrapperClass2 implements LocationBase {
+class _LocationCrossFrame extends DartHtmlDomObject implements LocationBase {
   _LocationCrossFrame.internal();
 
   // Fields.
@@ -48578,7 +48491,7 @@
   String get typeName => "Location";
 }
 
-class _DOMStringMap extends NativeFieldWrapperClass2 implements Map<String, String> {
+class _DOMStringMap extends DartHtmlDomObject implements Map<String, String> {
   _DOMStringMap.internal();
 
   bool containsValue(String value) => Maps.containsValue(this, value);
@@ -48809,5 +48722,5 @@
                                "are not supported in the browser"));
 
 // Class for unsupported native browser 'DOM' objects.
-class _UnsupportedBrowserObject extends NativeFieldWrapperClass2 {
+class _UnsupportedBrowserObject extends DartHtmlDomObject {
 }
diff --git a/sdk/lib/html/html_common/conversions.dart b/sdk/lib/html/html_common/conversions.dart
index 10ef5b7..0dca4d3 100644
--- a/sdk/lib/html/html_common/conversions.dart
+++ b/sdk/lib/html/html_common/conversions.dart
@@ -304,7 +304,7 @@
 // On Firefox, the returned ImageData is a plain object.
 
 class _TypedImageData implements ImageData {
-  final NativeUint8ClampedList data;
+  final Uint8ClampedList data;
   final int height;
   final int width;
 
diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart
index c66ce17..d6e6064 100644
--- a/sdk/lib/html/html_common/conversions_dartium.dart
+++ b/sdk/lib/html/html_common/conversions_dartium.dart
@@ -62,3 +62,7 @@
     .callMethod("catch", [(result) => completer.completeError(result)]);
   return completer.future;
 }
+
+convertDartToNative_DateTime(DateTime date) {
+  return new js.JsObject(js.context["Date"], [date.millisecondsSinceEpoch]);
+}
diff --git a/sdk/lib/html/html_common/html_common.dart b/sdk/lib/html/html_common/html_common.dart
index 42cf71a..dfdfa27 100644
--- a/sdk/lib/html/html_common/html_common.dart
+++ b/sdk/lib/html/html_common/html_common.dart
@@ -9,6 +9,7 @@
 import 'dart:html';
 import 'dart:js' as js;
 import 'dart:_internal' show WhereIterable;
+import 'dart:typed_data';
 import 'dart:web_gl' as gl;
 
 import 'metadata.dart';
diff --git a/sdk/lib/html/html_common/html_common_dart2js.dart b/sdk/lib/html/html_common/html_common_dart2js.dart
index 8d33d20..f162ad8 100644
--- a/sdk/lib/html/html_common/html_common_dart2js.dart
+++ b/sdk/lib/html/html_common/html_common_dart2js.dart
@@ -9,6 +9,7 @@
 import 'dart:html';
 import 'dart:_internal' show WhereIterable;
 import 'dart:web_gl' as gl;
+import 'dart:typed_data';
 import 'dart:_native_typed_data';
 import 'dart:_js_helper' show Creates, Returns, convertDartClosureToJS;
 import 'dart:_foreign_helper' show JS;
diff --git a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
index 300c5d4..cb17178 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -145,7 +145,7 @@
 
 @DomName('IDBCursor')
 @Unstable()
-class Cursor extends NativeFieldWrapperClass2 {
+class Cursor extends DartHtmlDomObject {
   @DomName('IDBCursor.delete')
   Future delete() {
    try {
@@ -171,8 +171,6 @@
     return new Cursor._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Cursor._internalWrap() {
     return new Cursor.internal_();
   }
@@ -449,7 +447,7 @@
 @SupportedBrowser(SupportedBrowser.IE, '10')
 @Experimental()
 @Unstable()
-class IdbFactory extends NativeFieldWrapperClass2 {
+class IdbFactory extends DartHtmlDomObject {
   /**
    * Checks to see if Indexed DB is supported on the current platform.
    */
@@ -532,8 +530,6 @@
     return new IdbFactory._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory IdbFactory._internalWrap() {
     return new IdbFactory.internal_();
   }
@@ -589,7 +585,7 @@
 
 @DomName('IDBIndex')
 @Unstable()
-class Index extends NativeFieldWrapperClass2 {
+class Index extends DartHtmlDomObject {
   @DomName('IDBIndex.count')
   Future<int> count([key_OR_range]) {
    try {
@@ -685,8 +681,6 @@
     return new Index._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Index._internalWrap() {
     return new Index.internal_();
   }
@@ -750,7 +744,7 @@
 
 @DomName('IDBKeyRange')
 @Unstable()
-class KeyRange extends NativeFieldWrapperClass2 {
+class KeyRange extends DartHtmlDomObject {
   @DomName('IDBKeyRange.only')
   factory KeyRange.only(/*Key*/ value) =>
       _KeyRangeFactoryProvider.createKeyRange_only(value);
@@ -776,8 +770,6 @@
     return new KeyRange._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory KeyRange._internalWrap() {
     return new KeyRange.internal_();
   }
@@ -840,7 +832,7 @@
 
 @DomName('IDBObjectStore')
 @Unstable()
-class ObjectStore extends NativeFieldWrapperClass2 {
+class ObjectStore extends DartHtmlDomObject {
 
   @DomName('IDBObjectStore.add')
   Future add(value, [key]) {
@@ -975,8 +967,6 @@
     return new ObjectStore._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ObjectStore._internalWrap() {
     return new ObjectStore.internal_();
   }
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index f9f974a..144234d 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -483,22 +483,22 @@
 
   void addSlice(List<int> data, int start, int end, bool isLast) {
     if (_closed) return;
-    if (start < 0 || start > data.length) {
-      throw new ArgumentError("Invalid start position");
-    }
-    if (end < 0 || end > data.length || end < start) {
-      throw new ArgumentError("Invalid end position");
-    }
+    if (end == null) throw new ArgumentError.notNull("end");
+    RangeError.checkValidRange(start, end, data.length);
     try {
       _empty = false;
-      _filter.process(data, start, end);
+      _BufferAndStart bufferAndStart =
+          _ensureFastAndSerializableByteData(data, start, end);
+      _filter.process(bufferAndStart.buffer,
+                      bufferAndStart.start,
+                      end - (start - bufferAndStart.start));
       var out;
       while ((out = _filter.processed(flush: false)) != null) {
         _sink.add(out);
       }
     } catch (e) {
       _closed = true;
-      throw e;
+      rethrow;
     }
 
     if (isLast) close();
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 880d771..2b2bb86 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -431,15 +431,15 @@
                        String protocolVersion,
                        _HttpOutgoing outgoing,
                        {_HttpHeaders initialHeaders})
-      : super(outgoing, null),
-        _uri = uri,
+      : _uri = uri,
         headers = new _HttpHeaders(
             protocolVersion,
             defaultPortForScheme: uri.scheme == 'https' ?
                 HttpClient.DEFAULT_HTTPS_PORT :
                 HttpClient.DEFAULT_HTTP_PORT,
             initialHeaders: initialHeaders),
-        _outgoing = outgoing {
+        _outgoing = outgoing,
+        super(outgoing, null) {
     _outgoing.outbound = this;
     _encodingMutable = false;
   }
@@ -718,8 +718,8 @@
 
   _HttpClientRequest(_HttpOutgoing outgoing, Uri uri, this.method, this._proxy,
                      this._httpClient, this._httpClientConnection)
-      : super(uri, "1.1", outgoing),
-        uri = uri {
+      : uri = uri,
+        super(uri, "1.1", outgoing) {
     // GET and HEAD have 'content-length: 0' by default.
     if (method == "GET" || method == "HEAD") {
       contentLength = 0;
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index d6b4c0b..587a88e 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -235,7 +235,7 @@
    *
    * WARNING: The [checked] parameter is not implemented on all platforms yet.
    *
-   * If either the [packageRoot] or the [packages] parameter is provided,
+   * If either the [packageRoot] or the [packageMap] parameter is provided,
    * it is used to find the location of package sources in the spawned isolate.
    *
    * The `packageRoot` URI must be a "file" or "http"/"https" URI that specifies
@@ -245,7 +245,7 @@
    * resolved against this location, as by
    * `packageRoot.resolve("foo/bar.dart")`.
    *
-   * The `packages` map maps package names to URIs with the same requirements
+   * The `packageMap` map maps package names to URIs with the same requirements
    * as `packageRoot`. Package imports (like `"package:foo/bar/baz.dart"`) in
    * the new isolate are resolved against the URI for that package (if any),
    * as by `packages["foo"].resolve("bar/baz.dart")
@@ -253,11 +253,11 @@
    * This resolution also applies to the main entry [uri]
    * if that happens to be a package-URI.
    *
-   * If both [packageRoot] and [packages] are omitted, the new isolate uses
+   * If both [packageRoot] and [packageMap] are omitted, the new isolate uses
    * the same package resolution as the current isolate.
    * It's not allowed to provide both a `packageRoot` and a `package` parameter.
    *
-   * WARNING: The [packageRoot] and [packages] parameters are not implemented
+   * WARNING: The [packageRoot] and [packageMap] parameters are not implemented
    * on all platforms yet.
    *
    * The [environment] is a mapping from strings to strings which the
@@ -283,7 +283,7 @@
        bool checked,
        Map<String, String> environment,
        Uri packageRoot,
-       Map<String, Uri> packages});
+       Map<String, Uri> packageMap});
 
   /**
    * Requests the isolate to pause.
@@ -647,33 +647,6 @@
 }
 
 /**
- * Wraps unhandled exceptions thrown during isolate execution. It is
- * used to show both the error message and the stack trace for unhandled
- * exceptions.
- */
-// TODO(floitsch): probably going to remove and replace with something else.
-class _IsolateUnhandledException implements Exception {
-  /** Message being handled when exception occurred. */
-  final message;
-
-  /** Wrapped exception. */
-  final source;
-
-  /** Trace for the wrapped exception. */
-  final StackTrace stackTrace;
-
-  const _IsolateUnhandledException(this.message, this.source, this.stackTrace);
-
-  String toString() {
-    return 'IsolateUnhandledException: exception while handling message: '
-        '${message} \n  '
-        '${source.toString().replaceAll("\n", "\n  ")}\n'
-        'original stack trace:\n  '
-        '${stackTrace.toString().replaceAll("\n","\n  ")}';
-  }
-}
-
-/**
  * Description of an error from another isolate.
  *
  * This error has the same `toString()` and `stackTrace.toString()` behavior
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 8c5eb30..417876e 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -92,21 +92,30 @@
 import 'dart:indexed_db' show KeyRange;
 import 'dart:typed_data' show TypedData;
 
-import 'dart:_foreign_helper' show JS, DART_CLOSURE_TO_JS;
-import 'dart:_interceptors' show JavaScriptObject, UnknownJavaScriptObject;
-import 'dart:_js_helper' show Primitives, convertDartClosureToJS,
-    getIsolateAffinityTag;
+import 'dart:_foreign_helper' show JS, JS_CONST, DART_CLOSURE_TO_JS;
+import 'dart:_interceptors'
+    show JavaScriptObject, UnknownJavaScriptObject, DART_CLOSURE_PROPERTY_NAME;
+import 'dart:_js_helper'
+    show Primitives, convertDartClosureToJS, getIsolateAffinityTag;
+
+export 'dart:_interceptors' show JavaScriptObject;
 
 final JsObject context = _wrapToDart(JS('', 'self'));
 
 _convertDartFunction(Function f, {bool captureThis: false}) {
-  return JS('',
-    'function(_call, f, captureThis) {'
-      'return function() {'
-        'return _call(f, captureThis, this, '
-            'Array.prototype.slice.apply(arguments));'
-      '}'
-    '}(#, #, #)', DART_CLOSURE_TO_JS(_callDartFunction), f, captureThis);
+  return JS(
+      '',
+      '''
+        function(_call, f, captureThis) {
+          return function() {
+            return _call(f, captureThis, this,
+                Array.prototype.slice.apply(arguments));
+          }
+        }(#, #, #)
+      ''',
+      DART_CLOSURE_TO_JS(_callDartFunction),
+      f,
+      captureThis);
 }
 
 _callDartFunction(callback, bool captureThis, self, List arguments) {
@@ -212,8 +221,7 @@
    */
   factory JsObject.fromBrowserObject(object) {
     if (object is num || object is String || object is bool || object == null) {
-      throw new ArgumentError(
-        "object cannot be a num, string, bool, or null");
+      throw new ArgumentError("object cannot be a num, string, bool, or null");
     }
     return _wrapToDart(_convertToJS(object));
   }
@@ -267,7 +275,7 @@
    *
    * The type of [property] must be either [String] or [num].
    */
-  dynamic operator[](property) {
+  dynamic operator [](property) {
     if (property is! String && property is! num) {
       throw new ArgumentError("property is not a String or num");
     }
@@ -280,7 +288,7 @@
    *
    * The type of [property] must be either [String] or [num].
    */
-  operator[]=(property, value) {
+  operator []=(property, value) {
     if (property is! String && property is! num) {
       throw new ArgumentError("property is not a String or num");
     }
@@ -289,8 +297,8 @@
 
   int get hashCode => 0;
 
-  bool operator==(other) => other is JsObject &&
-      JS('bool', '# === #', _jsObject, other._jsObject);
+  bool operator ==(other) =>
+      other is JsObject && JS('bool', '# === #', _jsObject, other._jsObject);
 
   /**
    * Returns `true` if the JavaScript object contains the specified property
@@ -332,7 +340,7 @@
   String toString() {
     try {
       return JS('String', 'String(#)', _jsObject);
-    } catch(e) {
+    } catch (e) {
       return super.toString();
     }
   }
@@ -347,7 +355,11 @@
     if (method is! String && method is! num) {
       throw new ArgumentError("method is not a String or num");
     }
-    return _convertToDart(JS('', '#[#].apply(#, #)', _jsObject, method,
+    return _convertToDart(JS(
+        '',
+        '#[#].apply(#, #)',
+        _jsObject,
+        method,
         _jsObject,
         args == null ? null : new List.from(args.map(_convertToJS))));
   }
@@ -357,7 +369,6 @@
  * Proxies a JavaScript Function object.
  */
 class JsFunction extends JsObject {
-
   /**
    * Returns a [JsFunction] that captures its 'this' binding and calls [f]
    * with the value of this passed as the first argument.
@@ -373,17 +384,18 @@
    * Invokes the JavaScript function with arguments [args]. If [thisArg] is
    * supplied it is the value of `this` for the invocation.
    */
-  dynamic apply(List args, { thisArg }) =>
-      _convertToDart(JS('', '#.apply(#, #)', _jsObject,
-          _convertToJS(thisArg),
-          args == null ? null : new List.from(args.map(_convertToJS))));
+  dynamic apply(List args, {thisArg}) => _convertToDart(JS(
+      '',
+      '#.apply(#, #)',
+      _jsObject,
+      _convertToJS(thisArg),
+      args == null ? null : new List.from(args.map(_convertToJS))));
 }
 
 /**
  * A [List] that proxies a JavaScript array.
  */
 class JsArray<E> extends JsObject with ListMixin<E> {
-
   /**
    * Creates a new JavaScript array.
    */
@@ -449,8 +461,9 @@
     throw new StateError('Bad JsArray length');
   }
 
-  set length(int length) { super['length'] = length; }
-
+  void set length(int length) {
+    super['length'] = length;
+  }
 
   // Methods overriden for better performance
 
@@ -503,12 +516,11 @@
 // property added to a Dart object referencing its JS-side DartObject proxy
 final String _DART_OBJECT_PROPERTY_NAME =
     getIsolateAffinityTag(r'_$dart_dartObject');
-final String _DART_CLOSURE_PROPERTY_NAME =
-    getIsolateAffinityTag(r'_$dart_dartClosure');
 
 // property added to a JS object referencing its Dart-side JsObject proxy
 const _JS_OBJECT_PROPERTY_NAME = r'_$dart_jsObject';
 const _JS_FUNCTION_PROPERTY_NAME = r'$dart_jsFunction';
+const _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS = r'_$dart_jsFunctionCaptureThis';
 
 bool _defineProperty(o, String name, value) {
   try {
@@ -520,9 +532,9 @@
       return true;
     }
   } catch (e) {
-      // object is native and lies about being extensible
-      // see https://bugzilla.mozilla.org/show_bug.cgi?id=775185
-      // Or, isExtensible throws for this object.
+    // object is native and lies about being extensible
+    // see https://bugzilla.mozilla.org/show_bug.cgi?id=775185
+    // Or, isExtensible throws for this object.
   }
   return false;
 }
@@ -555,8 +567,13 @@
   if (o is JsObject) {
     return o._jsObject;
   }
-  if (o is Blob || o is Event || o is KeyRange || o is ImageData || o is Node ||
-      o is TypedData || o is Window) {
+  if (o is Blob ||
+      o is Event ||
+      o is KeyRange ||
+      o is ImageData ||
+      o is Node ||
+      o is TypedData ||
+      o is Window) {
     return o;
   }
   if (o is DateTime) {
@@ -566,13 +583,13 @@
     return _getJsProxy(o, _JS_FUNCTION_PROPERTY_NAME, (o) {
       var jsFunction = _convertDartFunction(o);
       // set a property on the JS closure referencing the Dart closure
-      _defineProperty(jsFunction, _DART_CLOSURE_PROPERTY_NAME, o);
+      _defineProperty(jsFunction, DART_CLOSURE_PROPERTY_NAME, o);
       return jsFunction;
     });
   }
   var ctor = _dartProxyCtor;
-  return _getJsProxy(o, _JS_OBJECT_PROPERTY_NAME,
-      (o) => JS('', 'new #(#)', ctor, o));
+  return _getJsProxy(
+      o, _JS_OBJECT_PROPERTY_NAME, (o) => JS('', 'new #(#)', ctor, o));
 }
 
 Object _getJsProxy(o, String propertyName, createProxy(o)) {
@@ -592,9 +609,14 @@
       JS('bool', 'typeof # == "number"', o) ||
       JS('bool', 'typeof # == "boolean"', o)) {
     return o;
-  } else if (_isLocalObject(o)
-      && (o is Blob || o is Event || o is KeyRange || o is ImageData
-      || o is Node || o is TypedData || o is Window)) {
+  } else if (_isLocalObject(o) &&
+      (o is Blob ||
+          o is Event ||
+          o is KeyRange ||
+          o is ImageData ||
+          o is Node ||
+          o is TypedData ||
+          o is Window)) {
     // long line: dart2js doesn't allow string concatenation in the JS() form
     return JS('Blob|Event|KeyRange|ImageData|Node|TypedData|Window', '#', o);
   } else if (JS('bool', '# instanceof Date', o)) {
@@ -609,15 +631,15 @@
 
 JsObject _wrapToDart(o) {
   if (JS('bool', 'typeof # == "function"', o)) {
-    return _getDartProxy(o, _DART_CLOSURE_PROPERTY_NAME,
-        (o) => new JsFunction._fromJs(o));
+    return _getDartProxy(
+        o, DART_CLOSURE_PROPERTY_NAME, (o) => new JsFunction._fromJs(o));
   }
   if (JS('bool', '# instanceof Array', o)) {
-    return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME,
-        (o) => new JsArray._fromJs(o));
+    return _getDartProxy(
+        o, _DART_OBJECT_PROPERTY_NAME, (o) => new JsArray._fromJs(o));
   }
-  return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME,
-      (o) => new JsObject._fromJs(o));
+  return _getDartProxy(
+      o, _DART_OBJECT_PROPERTY_NAME, (o) => new JsObject._fromJs(o));
 }
 
 Object _getDartProxy(o, String propertyName, createProxy(o)) {
@@ -635,3 +657,72 @@
   }
   return dartProxy;
 }
+
+// ---------------------------------------------------------------------------
+// Start of methods for new style Dart-JS interop.
+
+_convertDartFunctionFast(Function f) {
+  var existing = JS('', '#.#', f, _JS_FUNCTION_PROPERTY_NAME);
+  if (existing != null) return existing;
+  var ret = JS(
+      '',
+      '''
+        function(_call, f) {
+          return function() {
+            return _call(f, Array.prototype.slice.apply(arguments));
+          }
+        }(#, #)
+      ''',
+      DART_CLOSURE_TO_JS(_callDartFunctionFast),
+      f);
+  JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
+  JS('', '#.# = #', f, _JS_FUNCTION_PROPERTY_NAME, ret);
+  return ret;
+}
+
+_convertDartFunctionFastCaptureThis(Function f) {
+  var existing = JS('', '#.#', f, _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS);
+  if (existing != null) return existing;
+  var ret = JS(
+      '',
+      '''
+        function(_call, f) {
+          return function() {
+            return _call(f, this,Array.prototype.slice.apply(arguments));
+          }
+        }(#, #)
+      ''',
+      DART_CLOSURE_TO_JS(_callDartFunctionFastCaptureThis),
+      f);
+  JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
+  JS('', '#.# = #', f, _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS, ret);
+  return ret;
+}
+
+_callDartFunctionFast(callback, List arguments) {
+  return Function.apply(callback, arguments);
+}
+
+_callDartFunctionFastCaptureThis(callback, self, List arguments) {
+  return _convertToJS(Function.apply(callback, [self]..addAll(arguments)));
+}
+
+Function allowInterop(Function f) {
+  if (JS('bool', 'typeof(#) == "function"', f)) {
+    // Already supports interop, just use the existing function.
+    return f;
+  } else {
+    return _convertDartFunctionFast(f);
+  }
+}
+
+Function allowInteropCaptureThis(Function f) {
+  if (JS('bool', 'typeof(#) == "function"', f)) {
+    // Behavior when the function is already a JS function is unspecified.
+    throw new ArgumentError(
+        "Function is already a JS function so cannot capture this.");
+    return f;
+  } else {
+    return _convertDartFunctionFastCaptureThis(f);
+  }
+}
diff --git a/sdk/lib/js/dartium/js_dartium.dart b/sdk/lib/js/dartium/js_dartium.dart
index 186bde7..13e7012 100644
--- a/sdk/lib/js/dartium/js_dartium.dart
+++ b/sdk/lib/js/dartium/js_dartium.dart
@@ -92,6 +92,8 @@
 import 'dart:math' as math;
 import 'dart:mirrors' as mirrors;
 import 'dart:html' as html;
+import 'dart:indexed_db' as indexed_db;
+import 'dart:typed_data';
 
 // Pretend we are always in checked mode as we aren't interested in users
 // running Dartium code outside of checked mode.
@@ -204,10 +206,12 @@
  * Temporary method that we hope to remove at some point. This method should
  * generally only be called by machine generated code.
  */
-void registerJsInterfaces(List<Type> classes) {
-  if (_finalized == true) {
-    throw 'JSInterop class registration already finalized';
-  }
+
+void registerJsInterfaces([List<Type> classes]) {
+  // This method is now obsolete in Dartium.
+}
+
+void _registerJsInterfaces(List<Type> classes) {
   for (Type type in classes) {
     if (!_jsInterfaceTypes.add(type)) continue; // Already registered.
     mirrors.ClassMirror typeMirror = mirrors.reflectType(type);
@@ -252,19 +256,226 @@
 
 _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') {
+        try {
+          var name = annotation.reflectee.name;
+          return name != null ? name : "";
+        } catch (e) {
+        }
+      }
+    }
+  }
+  return null;
+}
+
+bool _hasJsName(mirrors.DeclarationMirror mirror) =>
+  _getJsName(mirror) != null;
+
+
+_getJsMemberName(mirrors.DeclarationMirror mirror) {
+  var name = _getJsName(mirror);
+  return name == null || name.isEmpty ? _getDeclarationName(mirror) :
+      name;
+}
+
+// TODO(jacobr): handle setters correctyl.
+String _getDeclarationName(mirrors.DeclarationMirror declaration) {
+  var name = mirrors.MirrorSystem.getName(declaration.simpleName);
+  if (declaration is mirrors.MethodMirror && declaration.isSetter) {
+    assert(name.endsWith("="));
+    name = name.substring(0, name.length - 1);
+  }
+  return name;
+}
+
+final _JS_LIBRARY_PREFIX = "js_library";
+final _UNDEFINED_VAR = "_UNDEFINED_JS_CONST";
+
+String _accessJsPath(String path) =>
+    "${_JS_LIBRARY_PREFIX}.context${path.split(".").map((p) => "['$p']").join('')}";
+
+void addMemberHelper(mirrors.MethodMirror declaration, String path, StringBuffer sb, {bool isStatic: false, String memberName}) {
+  var jsName = _getJsMemberName(declaration);
+  path = (path != null && path.isNotEmpty) ? "${path}.${jsName}" : jsName;
+  var name = memberName != null ? memberName : _getDeclarationName(declaration);
+  if (declaration.isConstructor) {
+    sb.write("factory");
+  } else if (isStatic) {
+    sb.write("static");
+  } else {
+    sb.write("patch");
+  }
+  sb.write(" ");
+  if (declaration.isGetter) {
+    sb.write("get $name => ${_accessJsPath(path)};");
+  } else if (declaration.isSetter) {
+    sb.write("set $name(v) => ${_accessJsPath(path)} = v;");
+  } else {
+    sb.write("$name(");
+    bool hasOptional = false;
+    int i = 0;
+    var args = <String>[];
+    for (var p in declaration.parameters) {
+      assert(!p.isNamed); // XXX throw
+      assert(!p.hasDefaultValue);
+      if (i > 0) {
+        sb.write(", ");
+      }
+      if (p.isOptional && !hasOptional) {
+        sb.write("[");
+        hasOptional = true;
+      }
+      var arg = "p$i";
+      args.add(arg);
+      sb.write(arg);
+      if (p.isOptional) {
+        sb.write("=${_UNDEFINED_VAR}");
+      }
+      i++;
+    }
+    if (hasOptional) {
+      sb.write("]");
+    }
+    // TODO(jacobr):
+    sb.write(") => ");
+    if (declaration.isConstructor) {
+        sb.write("new ${_JS_LIBRARY_PREFIX}.JsObject(");
+    }
+    sb
+      ..write(_accessJsPath(path))
+      ..write(declaration.isConstructor ? "," : ".apply(")
+      ..write("[${args.join(",")}]");
+
+    if (hasOptional) {
+      sb.write(".takeWhile((i) => i != ${_UNDEFINED_VAR}).toList()");
+    }
+    sb.write(");");
+  }
+  sb.write("\n");
+}
+
+// TODO(jacobr): make this check more robust.
+bool _isExternal(mirrors.MethodMirror mirror) =>
+    mirror.source != null && mirror.source.startsWith("external ");
+
+List<String> _generateExternalMethods() {
+  var staticCodegen = <String>[];
+  mirrors.currentMirrorSystem().libraries.forEach((uri, library) {
+    var sb = new StringBuffer();
+    String jsLibraryName = _getJsName(library);
+    library.declarations.forEach((name, declaration) {
+      if (declaration is mirrors.MethodMirror) {
+        if (_isExternal(declaration) && (_hasJsName(declaration) || jsLibraryName != null)) {
+          addMemberHelper(declaration, jsLibraryName, sb);
+        }
+      } else if (declaration is mirrors.ClassMirror) {
+        mirrors.ClassMirror clazz = declaration;
+        if (_hasJsName(clazz)) {
+          // TODO(jacobr): verify class implements JavaScriptObject.
+          assert(clazz.hasReflectedType);
+          jsInterfaceTypes.add(clazz.reflectedType);
+          String jsClassName = _getJsMemberName(clazz);
+          var className = mirrors.MirrorSystem.getName(clazz.simpleName);
+          var sbPatch = new StringBuffer();
+          clazz.declarations.forEach((name, declaration) {
+            if (declaration is! mirrors.MethodMirror || !_isExternal(declaration)) return;
+            if (declaration.isFactoryConstructor) {
+              sbPatch.write("  factory ${className}({");
+              int i = 0;
+              var args = <String>[];
+              for (var p in declaration.parameters) {
+                assert(p.isNamed); // XXX throw
+                args.add(mirrors.MirrorSystem.getName(p.simpleName));
+                i++;
+              }
+              sbPatch
+                ..write(args.map((name) => '$name:${_UNDEFINED_VAR}').join(", "))
+                ..write("}) {\n"
+                        "    var ret = new ${_JS_LIBRARY_PREFIX}.JsObject.jsify({});\n");
+              i = 0;
+              for (var p in declaration.parameters) {
+                assert(p.isNamed); // XXX throw
+                var name = args[i];
+                var jsName = mirrors.MirrorSystem.getName(p.simpleName);
+                // XXX apply name conversion rules.
+                sbPatch.write("    if($name != ${_UNDEFINED_VAR}) ret['$jsName'] = $name;\n");
+                i++;
+              }
+
+              sbPatch.write("    return ret;\n"
+                            "  }\n");
+            } else if (declaration.isConstructor) {
+              sbPatch.write("  ");
+              addMemberHelper(declaration,
+                  (jsLibraryName != null && jsLibraryName.isNotEmpty) ? "${jsLibraryName}" : "",
+                  sbPatch,
+                  isStatic: true,
+                  memberName: className);
+            }
+          });
+
+          clazz.staticMembers.forEach((memberName, member) {
+            if (_isExternal(member)) {
+              sbPatch.write("  ");
+              addMemberHelper(member,
+                  (jsLibraryName != null && jsLibraryName.isNotEmpty) ? "${jsLibraryName}.${jsClassName}" : jsClassName,
+                  sbPatch,
+                  isStatic: true);
+            }
+          });
+          if (sbPatch.isNotEmpty) {
+            sb.write("""
+patch class $className {
+$sbPatch
+}
+""");
+          }
+        }
+      }
+    });
+    if (sb.isNotEmpty) {
+      staticCodegen
+        ..add(uri.toString())
+        ..add("${uri}_js_interop_patch.dart")
+        ..add("""
+import 'dart:js' as ${_JS_LIBRARY_PREFIX};
+
+/**
+ * Placeholder object for cases where we need to determine exactly how many
+ * args were passed to a function.
+ */
+const ${_UNDEFINED_VAR} = const Object();
+
+${sb}
+""");
+    }
+  });
+
+  return staticCodegen;
+}
+
 /**
  * Generates a part file defining source code for JsObjectImpl and related
  * classes. This calass is needed so that type checks for all registered JavaScript
  * interop classes pass.
  */
-String _generateJsObjectImplPart() {
-  Iterable<Type> types = jsInterfaceTypes;
+List<String> _generateInteropPatchFiles() {
+  var ret = _generateExternalMethods();
   var libraryPrefixes = new Map<mirrors.LibraryMirror, String>();
   var prefixNames = new Set<String>();
   var sb = new StringBuffer();
 
   var implements = <String>[];
-  for (var type in types) {
+  var implementsArray = <String>[];
+  var listMirror = mirrors.reflectType(List);
+
+  for (var type in jsInterfaceTypes) {
     mirrors.ClassMirror typeMirror = mirrors.reflectType(type);
     mirrors.LibraryMirror libraryMirror = typeMirror.owner;
     var prefixName;
@@ -284,16 +495,19 @@
       prefixNames.add(prefixName);
       libraryPrefixes[libraryMirror] = prefixName;
     }
-    implements.add(
+    var isArray = typeMirror.isSubtypeOf(listMirror);
+    (isArray ? implementsArray : implements).add(
         '${prefixName}.${mirrors.MirrorSystem.getName(typeMirror.simpleName)}');
   }
   libraryPrefixes.forEach((libraryMirror, prefix) {
     sb.writeln('import "${libraryMirror.uri}" as $prefix;');
   });
-  var implementsClause =
-      implements.isEmpty ? "" : "implements ${implements.join(', ')}";
+  buildImplementsClause(classes) =>
+      classes.isEmpty ? "" : "implements ${classes.join(', ')}"
+  var implementsClause = buildImplementsClause(implements);
   // TODO(jacobr): only certain classes need to be implemented by
-  // Function and Array.
+  // JsFunctionImpl.
+  var allTypes = []..addAll(implements)..addAll(implementsArray);
   sb.write('''
 class JsObjectImpl extends JsObject $implementsClause {
   JsObjectImpl.internal() : super.internal();
@@ -303,11 +517,17 @@
   JsFunctionImpl.internal() : super.internal();
 }
 
-class JsArrayImpl<E> extends JsArray<E> $implementsClause {
+class JsArrayImpl<E> extends JsArray<E> ${buildImplementsClause(implementsArray)} {
   JsArrayImpl.internal() : super.internal();
 }
+
+_registerAllJsInterfaces() {
+  _registerJsInterfaces([${allTypes.join(", ")}]);
+}
+
 ''');
-  return sb.toString();
+  ret..addAll(["dart:js", "JsInteropImpl.dart", sb.toString()]);
+  return ret;
 }
 
 // Start of block of helper methods facilitating emulating JavaScript Array
@@ -479,6 +699,18 @@
   return _cachedContext;
 }
 
+_maybeWrap(o) {
+  var wrapped = html.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;
+}
+
 /**
  * Get the dart wrapper object for object. Top-level so we
  * we can access it from other libraries without it being
@@ -501,17 +733,10 @@
  * wrap_jso defined in dart:html.
  */
 unwrap_jso(dartClass_instance) {
-  try {
-    if (dartClass_instance != null)
-      return dartClass_instance is NativeFieldWrapperClass2 ?
-          dartClass_instance.blink_jsObject : dartClass_instance;
-    else
-      return null;
-  } catch(NoSuchMethodException) {
-    // No blink_jsObject then return the dartClass_instance is probably an
-    // array that was already converted to a Dart class e.g., Uint8ClampedList.
+  if (dartClass_instance is html.DartHtmlDomObject)
+    return dartClass_instance.blink_jsObject;
+  else
     return dartClass_instance;
-  }
 }
 
 /**
@@ -604,7 +829,7 @@
    */
   operator [](property) {
     try {
-      return _operator_getter(property);
+      return _maybeWrap(_operator_getter(property));
     } catch (e) {
       // Re-throw any errors (returned as a string) as a DomException.
       throw new html.DomException.jsInterop(e);
@@ -685,11 +910,7 @@
    */
   callMethod(String method, [List args]) {
     try {
-      if (args != null) {
-        for (var i = 0; i < args.length; i++)
-          args[i] = unwrap_jso(args[i]);
-      }
-      return _callMethod(method, args);
+      return _maybeWrap(_callMethod(method, args));
     } catch (e) {
       if (hasProperty(method)) {
         // Return a DomException if DOM call returned an error.
@@ -753,6 +974,29 @@
   _callMethod(String name, List args) native "JsObject_callMethod";
 }
 
+// JavaScript interop methods that do not automatically wrap to dart:html types.
+// Warning: this API is not exposed to dart:js.
+class JsNative {
+  static getProperty(JsObject o, name) {
+    return o._operator_getter(name);
+  }
+
+  static callMethod(JsObject o, String method, List args) {
+    return o._callMethod(method, args);
+  }
+
+  static getArrayIndex(JsArray array, int index) {
+    array._checkIndex(index);
+    return getProperty(array, index);
+  }
+
+  /**
+   * Same behavior as new JsFunction.withThis except that JavaScript "this" is not
+   * wrapped.
+   */
+  static JsFunction withThis(Function f) native "JsFunction_withThisNoWrap";
+}
+
 /**
  * Proxies a JavaScript Function object.
  */
@@ -769,7 +1013,10 @@
    * Invokes the JavaScript function with arguments [args]. If [thisArg] is
    * supplied it is the value of `this` for the invocation.
    */
-  dynamic apply(List args, {thisArg}) native "JsFunction_apply";
+  dynamic apply(List args, {thisArg}) =>
+    _maybeWrap(_apply(args, thisArg: thisArg));
+
+  dynamic _apply(List args, {thisArg}) native "JsFunction_apply";
 
   noSuchMethod(Invocation invocation) {
     if (invocation.isMethod && invocation.memberName == #call) {
@@ -911,3 +1158,26 @@
         a5 = _UNDEFINED, a6 = _UNDEFINED, a7 = _UNDEFINED, a8 = _UNDEFINED,
         a9 = _UNDEFINED, a10 = _UNDEFINED]) => jsFunction._applyDebuggerOnly(
             _stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
+
+// This method is a no-op in Dartium.
+// TODO(jacobr): tag methods so we can throw if a Dart method is passed to
+// JavaScript using the new interop without calling allowInterop.
+Function allowInterop(Function f) => f;
+
+Expando<JsFunction> _interopCaptureThisExpando = new Expando<JsFunction>();
+
+Function allowInteropCaptureThis(Function f) {
+  if (f is JsFunction) {
+    // Behavior when the function is already a JS function is unspecified.
+    throw new ArgumentError(
+        "Function is already a JS function so cannot capture this.");
+    return f;
+  } else {
+    var ret = _interopCaptureThisExpando[f];
+    if (ret == null) {
+      ret = new JsFunction.withThis(f);
+      _interopCaptureThisExpando[f] = ret;
+    }
+    return ret;
+  }
+}
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 3480cde..3ba8dcd 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -71,10 +71,14 @@
  */
 abstract class MirrorSystem {
   /**
-   * Returns an immutable map from URIs to mirrors for all libraries known
-   * to this mirror system. For a runtime mirror system, only libraries which
-   * are currently loaded are included, and repeated calls of this method may
-   * return different maps as libraries are loaded.
+   * All libraries known to the mirror system, indexed by their URI.
+   *
+   * Returns an unmodifiable map of the libraries with [LibraryMirror.uri] as
+   * keys.
+   *
+   * For a runtime mirror system, only libraries which are currently loaded
+   * are included, and repeated calls of this method may return different maps
+   * as libraries are loaded.
    */
   Map<Uri, LibraryMirror> get libraries;
 
@@ -90,6 +94,7 @@
 
   /**
    * A mirror on the isolate associated with this [MirrorSystem].
+   *
    * This may be null if this mirror system is not running.
    */
   IsolateMirror get isolate;
@@ -115,15 +120,16 @@
   external static String getName(Symbol symbol);
 
   /**
-   * Returns a symbol for [name]. If [library] is not a [LibraryMirror] or if
-   * [name] is a private identifier and [library] is [:null:], throws an
-   * [ArgumentError]. If [name] is a private identifier, the symbol returned is
-   * with respect to [library].
+   * Returns a symbol for [name].
+   *
+   * If [library] is not a [LibraryMirror] or if [name] is a private identifier
+   * and [library] is `null`, throws an [ArgumentError]. If [name] is a private
+   * identifier, the symbol returned is with respect to [library].
    *
    * The following text is non-normative:
    *
    * Using this method may result in larger output.  If possible, use
-   * the const constructor of Symbol or symbol literals.
+   * the const constructor of [Symbol] or symbol literals.
    */
   external static Symbol getSymbol(String name, [LibraryMirror library]);
 }
@@ -135,43 +141,42 @@
 
 /**
  * Reflects an instance.
- * Returns an [InstanceMirror] reflecting [reflectee].
- * If [reflectee] is a function or an instance of a class
- * that has a [:call:] method, the returned instance mirror
- * will be a [ClosureMirror].
  *
- * Note that since one cannot obtain an object from
- * another isolate, this function can only be used to
- * obtain  mirrors on objects of the current isolate.
+ * Returns an [InstanceMirror] reflecting [reflectee]. If [reflectee] is a
+ * function or an instance of a class that has a [:call:] method, the returned
+ * instance mirror will be a [ClosureMirror].
+ *
+ * Note that since one cannot obtain an object from another isolate, this
+ * function can only be used to obtain  mirrors on objects of the current
+ * isolate.
  */
 external InstanceMirror reflect(Object reflectee);
 
 /**
  * Reflects a class declaration.
- * Let *C* be the original class declaration of the class
- * represented by [key].
+ *
+ * Let *C* be the original class declaration of the class represented by [key].
  * This function returns a [ClassMirror] reflecting *C*.
  *
- * If [key] is not an instance of [Type] then this function
- * throws an [ArgumentError]. If [key] is the Type for dynamic
- * or a function typedef, throws an [ArgumentError].
+ * If [key] is not an instance of [Type], then this function throws an
+ * [ArgumentError]. If [key] is the Type for dynamic or a function typedef,
+ * throws an [ArgumentError].
  *
- * Note that since one cannot obtain a [Type] object from
- * another isolate, this function can only be used to
- * obtain class mirrors on classes of the current isolate.
+ * Note that since one cannot obtain a [Type] object from another isolate, this
+ * function can only be used to obtain class mirrors on classes of the current
+ * isolate.
  */
 external ClassMirror reflectClass(Type key);
 
 /**
- * This function returns a [TypeMirror] reflecting the type
- * represented by [key].
+ * Reflects the type represented by [key].
  *
- * If [key] is not an instance of [Type] then this function
- * throws an [ArgumentError].
+ * If [key] is not an instance of [Type], then this function throws an
+ * [ArgumentError].
  *
- * Note that since one cannot obtain a [Type] object from
- * another isolate, this function can only be used to
- * obtain type mirrors on types of the current isolate.
+ * Note that since one cannot obtain a [Type] object from another isolate, this
+ * function can only be used to obtain type mirrors on types of the current
+ * isolate.
  */
 external TypeMirror reflectType(Type key);
 
@@ -187,32 +192,28 @@
  */
 abstract class IsolateMirror implements Mirror {
   /**
-   * Returns a unique name used to refer to an isolate
-   * in debugging messages.
+   * A unique name used to refer to the isolate in debugging messages.
    */
   String get debugName;
 
   /**
-   * Returns [:true:] if and only if this mirror reflects
-   * the currently running isolate. Otherwise returns
-   * [:false:].
+   * Whether this mirror reflects the currently running isolate.
    */
   bool get isCurrent;
 
   /**
-   * Returns a [LibraryMirror] on the root library for this
-   * isolate.
+   * The root library for the reflected isolate.
    */
   LibraryMirror get rootLibrary;
 
   /**
-   * Returns [:true:] if this mirror is equal to [other].
-   * Otherwise returns [:false:].
+   * Whether [other] is an [IsolateMirror] on the same isolate as this mirror.
+   *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2) the isolate being reflected by this mirror is the same
-   * isolate being reflected by [other].
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. the isolate being reflected by this mirror is the same isolate being
+   *    reflected by [other].
    */
   bool operator == (other);
 }
@@ -224,9 +225,9 @@
   /**
    * The simple name for this Dart language entity.
    *
-   * The simple name is in most cases the the identifier name of the
-   * entity, such as 'method' for a method [:void method() {...}:] or
-   * 'mylibrary' for a [:library 'mylibrary';:] declaration.
+   * The simple name is in most cases the the identifier name of the entity,
+   * such as 'myMethod' for a method, [:void myMethod() {...}:] or 'mylibrary'
+   * for a [:library 'mylibrary';:] declaration.
    */
   Symbol get simpleName;
 
@@ -253,39 +254,37 @@
   Symbol get qualifiedName;
 
   /**
-   * A mirror on the owner of this Dart language entity. This is the declaration
-   * immediately surrounding the reflectee.
+   * A mirror on the owner of this Dart language entity.
    *
-   * For a library, the owner is [:null:].
-   * For a class declaration, typedef or top level function
-   * or variable, the owner is the enclosing library.
-   * For a mixin application *S with M*, the owner is the owner
-   * of *M*.
-   * For a constructor, the owner is the immediately enclosing class.
-   * For a method, instance variable or
-   * a static variable, the owner is the immediately enclosing class,
-   * unless the class is a mixin application *S with M*, in which case
-   * the owner is *M*. Note that *M* may be an invocation of a generic.
-   * For a parameter, local variable or local function the owner is the
-   * immediately enclosing function.
+   * The owner is the declaration immediately surrounding the reflectee:
+   *
+   * * For a library, the owner is [:null:].
+   * * For a class declaration, typedef or top level function or variable, the
+   *   owner is the enclosing library.
+   * * For a mixin application `S with M`, the owner is the owner of `M`.
+   * * For a constructor, the owner is the immediately enclosing class.
+   * * For a method, instance variable or a static variable, the owner is the
+   *   immediately enclosing class, unless the class is a mixin application
+   *   `S with M`, in which case the owner is `M`. Note that `M` may be an
+   *   invocation of a generic.
+   * * For a parameter, local variable or local function the owner is the
+   *   immediately enclosing function.
    */
   DeclarationMirror get owner;
 
   /**
-   * Returns [:true:] if this declaration is considered private
-   * according to the Dart language specification.
-   * Always returns [: false :] if this declaration
-   * is a library.
-   * Otherwise return [:false:].
+   * Whether this declaration is library private.
    *
+   * Always returns `false` for a library declaration,
+   * otherwise returns `true` if the declaration's name starts with an
+   * underscore character (`_`), and `false` if it doesn't.
    */
   bool get isPrivate;
 
   /**
-   * Is this declaration top-level?
+   * Whether this declaration is top-level.
    *
-   * This is defined to be equivalent to:
-   *    [:mirror.owner != null && mirror.owner is LibraryMirror:]
+   * A declaration is considered top-level if its [owner] is a [LibraryMirror].
    */
   bool get isTopLevel;
 
@@ -293,20 +292,23 @@
    * The source location of this Dart language entity, or [:null:] if the
    * entity is synthetic.
    *
-   * If the reflectee is a variable, the returned location gives the position of   * the variable name at its point of declaration.
+   * If the reflectee is a variable, the returned location gives the position
+   * of the variable name at its point of declaration.
    *
    * If the reflectee is a library, class, typedef, function or type variable
    * with associated metadata, the returned location gives the position of the
    * first metadata declaration associated with the reflectee.
    *
    * Otherwise:
+   *
    * If the reflectee is a library, the returned location gives the position of
    * the keyword 'library' at the reflectee's point of declaration, if the
    * reflectee is a named library, or the first character of the first line in
    * the compilation unit defining the reflectee if the reflectee is anonymous.
    *
    * If the reflectee is an abstract class, the returned location gives the
-   * position of the keyword 'abstract' at the reflectee's point of declaration.   * Otherwise, if the reflectee is a class, the returned location gives the
+   * position of the keyword 'abstract' at the reflectee's point of declaration.
+   * Otherwise, if the reflectee is a class, the returned location gives the
    * position of the keyword 'class' at the reflectee's point of declaration.
    *
    * If the reflectee is a typedef the returned location gives the position of
@@ -359,24 +361,23 @@
   /**
    * Invokes the named function and returns a mirror on the result.
    *
-   * Let *o* be the object reflected by this mirror, let
-   * *f* be the simple name of the member denoted by [memberName],
-   * let *a1, ..., an* be the elements of [positionalArguments]
-   * let *k1, ..., km* be the identifiers denoted by the elements of
-   * [namedArguments.keys]
-   * and let *v1, ..., vm* be the elements of [namedArguments.values].
-   * Then this method will perform the method invocation
-   *  *o.f(a1, ..., an, k1: v1, ..., km: vm)*
-   * in a scope that has access to the private members
-   * of *o* (if *o* is a class or library) or the private members of the
-   * class of *o* (otherwise).
-   * If the invocation returns a result *r*, this method returns
-   * the result of calling [reflect]\(*r*\).
-   * If the invocation causes a compilation error
-   * the effect is the same as if a non-reflective compilation error
-   * had been encountered.
-   * If the invocation throws an exception *e* (that it does not catch)
-   * this method throws *e*.
+   * Let *o* be the object reflected by this mirror, let *f* be the simple name
+   * of the member denoted by [memberName], let *a1, ..., an* be the elements
+   * of [positionalArguments], let *k1, ..., km* be the identifiers denoted by
+   * the elements of [namedArguments.keys], and let *v1, ..., vm* be the
+   * elements of [namedArguments.values]. Then this method will perform the
+   * method invocation *o.f(a1, ..., an, k1: v1, ..., km: vm)* in a scope that
+   * has access to the private members of *o* (if *o* is a class or library) or
+   * the private members of the class of *o* (otherwise).
+   *
+   * If the invocation returns a result *r*, this method returns the result of
+   * calling [reflect]\(*r*\).
+   *
+   * If the invocation causes a compilation error the effect is the same as if
+   * a non-reflective compilation error had been encountered.
+   *
+   * If the invocation throws an exception *e* (that it does not catch), this
+   * method throws *e*.
    */
   /*
    * TODO(turnidge): Handle ambiguous names.
@@ -387,17 +388,17 @@
                         [Map<Symbol,dynamic> namedArguments]);
 
   /**
-   * Invokes a getter and returns a mirror on the result. The getter
-   * can be the implicit getter for a field or a user-defined getter
+   * Invokes a getter and returns a mirror on the result.
+   *
+   * The getter can be the implicit getter for a field or a user-defined getter
    * method.
    *
-   * Let *o* be the object reflected by this mirror, let
-   * *f* be the simple name of the getter denoted by [fieldName],
-   * Then this method will perform the getter invocation
-   *  *o.f*
-   * in a scope that has access to the private members
-   * of *o* (if *o* is a class or library) or the private members of the
-   * class of *o* (otherwise).
+   * Let *o* be the object reflected by this mirror,
+   * let *f* be the simple name of the getter denoted by [fieldName].
+   *
+   * Then this method will perform the getter invocation *o.f* in a scope that
+   * has access to the private members of *o* (if *o* is a class or library) or
+   * the private members of the class of *o* (otherwise).
    *
    * If this mirror is an [InstanceMirror], and [fieldName] denotes an instance
    * method on its reflectee, the result of the invocation is an instance
@@ -411,44 +412,48 @@
    * in the corresponding class, the result of the invocation is an instance
    * mirror on a closure corresponding to that method.
    *
-   * If the invocation returns a result *r*, this method returns
-   * the result of calling [reflect]\(*r*\).
-   * If the invocation causes a compilation error
-   * the effect is the same as if a non-reflective compilation error
-   * had been encountered.
-   * If the invocation throws an exception *e* (that it does not catch)
-   * this method throws *e*.
+   * If the invocation returns a result *r*, this method returns the result of
+   * calling [reflect]\(*r*\).
+   *
+   * If the invocation causes a compilation error, the effect is the same as if
+   * a non-reflective compilation error had been encountered.
+   *
+   * If the invocation throws an exception *e* (that it does not catch), this
+   * method throws *e*.
    */
   // TODO(ahe): Remove stuff about scope and private members. [fieldName] is a
   // capability giving access to private members.
   InstanceMirror getField(Symbol fieldName);
 
   /**
-   * Invokes a setter and returns a mirror on the result. The setter
-   * may be either the implicit setter for a non-final field or a
+   * Invokes a setter and returns a mirror on the result.
+   *
+   * The setter may be either the implicit setter for a non-final field or a
    * user-defined setter method.
    *
-   * Let *o* be the object reflected by this mirror, let
-   * *f* be the simple name of the getter denoted by [fieldName],
+   * Let *o* be the object reflected by this mirror,
+   * let *f* be the simple name of the getter denoted by [fieldName],
    * and let *a* be the object bound to [value].
-   * Then this method will perform the setter invocation
-   * *o.f = a*
-   * in a scope that has access to the private members
-   * of *o* (if *o* is a class or library) or the private members of the
-   * class of *o* (otherwise).
-   * If the invocation returns a result *r*, this method returns
-   * the result of calling [reflect]\([value]\).
-   * If the invocation causes a compilation error
-   * the effect is the same as if a non-reflective compilation error
-   * had been encountered.
-   * If the invocation throws an exception *e* (that it does not catch)
-   * this method throws *e*.
+   *
+   * Then this method will perform the setter invocation *o.f = a* in a scope
+   * that has access to the private members of *o* (if *o* is a class or
+   * library) or the private members of the class of *o* (otherwise).
+   *
+   * If the invocation returns a result *r*, this method returns the result of
+   * calling [reflect]\([value]\).
+   *
+   * If the invocation causes a compilation error, the effect is the same as if
+   * a non-reflective compilation error had been encountered.
+   *
+   * If the invocation throws an exception *e* (that it does not catch) this
+   * method throws *e*.
    */
   /* TODO(turnidge): Handle ambiguous names.*/
   InstanceMirror setField(Symbol fieldName, Object value);
 
   /**
-   * Perform [invocation] on [reflectee].
+   * Performs [invocation] on [reflectee].
+   *
    * Equivalent to
    *
    *     if (invocation.isGetter) {
@@ -480,16 +485,18 @@
   ClassMirror get type;
 
   /**
-   * Does [reflectee] contain the instance reflected by this mirror?
-   * This will always be true in the local case (reflecting instances
-   * in the same isolate), but only true in the remote case if this
-   * mirror reflects a simple value.
+   * Whether [reflectee] will return the instance reflected by this mirror.
+   *
+   * This will always be true in the local case (reflecting instances in the
+   * same isolate), but only true in the remote case if this mirror reflects a
+   * simple value.
    *
    * A value is simple if one of the following holds:
-   *  - the value is [:null:]
-   *  - the value is of type [num]
-   *  - the value is of type [bool]
-   *  - the value is of type [String]
+   *
+   * * the value is [:null:]
+   * * the value is of type [num]
+   * * the value is of type [bool]
+   * * the value is of type [String]
    */
   bool get hasReflectee;
 
@@ -504,16 +511,18 @@
   get reflectee;
 
   /**
-   * Returns true if this mirror is equal to [other].
+   * Whether this mirror is equal to [other].
+   *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2) either
-   * (a) [hasReflectee] is true and so is
-   * [:identical(reflectee, other.reflectee):]
-   * or
-   * (b) the remote objects reflected by this mirror and
-   * by [other] are identical.
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. either
+   *
+   *    a. [hasReflectee] is true and so is
+   *    [:identical(reflectee, other.reflectee):], or
+   *
+   *    b. the remote objects reflected by this mirror and by [other] are
+   *    identical.
    */
   bool operator == (other);
 }
@@ -548,20 +557,24 @@
 
   /**
    * Executes the closure and returns a mirror on the result.
+   *
    * Let *f* be the closure reflected by this mirror,
-   * let *a1, ..., an* be the elements of [positionalArguments]
+   * let *a1, ..., an* be the elements of [positionalArguments],
    * let *k1, ..., km* be the identifiers denoted by the elements of
-   * [namedArguments.keys]
+   * [namedArguments.keys],
    * and let *v1, ..., vm* be the elements of [namedArguments.values].
+   *
    * Then this method will perform the method invocation
-   *  *f(a1, ..., an, k1: v1, ..., km: vm)*
-   * If the invocation returns a result *r*, this method returns
-   * the result of calling [reflect]\(*r*\).
-   * If the invocation causes a compilation error
-   * the effect is the same as if a non-reflective compilation error
-   * had been encountered.
-   * If the invocation throws an exception *e* (that it does not catch)
-   * this method throws *e*.
+   * *f(a1, ..., an, k1: v1, ..., km: vm)*.
+   *
+   * If the invocation returns a result *r*, this method returns the result of
+   * calling [reflect]\(*r*\).
+   *
+   * If the invocation causes a compilation error, the effect is the same as if
+   * a non-reflective compilation error had been encountered.
+   *
+   * If the invocation throws an exception *e* (that it does not catch), this
+   * method throws *e*.
    */
   InstanceMirror apply(List positionalArguments,
                        [Map<Symbol, dynamic> namedArguments]);
@@ -588,18 +601,15 @@
   Map<Symbol, DeclarationMirror> get declarations;
 
   /**
-   * Returns [:true:] if this mirror is equal to [other].
-   * Otherwise returns [:false:].
+   * Whether this mirror is equal to [other].
    *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2)  The library being reflected by this mirror
-   * and the library being reflected by [other]
-   * are
-   * the same library in the same isolate.
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. The library being reflected by this mirror and the library being
+   *    reflected by [other] are the same library in the same isolate.
    */
-   bool operator ==(other);
+  bool operator ==(other);
 
   /**
    * Returns a list of the imports and exports in this library;
@@ -726,15 +736,18 @@
 
 
   /**
-   * Checks the subtype relationship, denoted by [:<::] in the language
-   * specification. This is the type relationship used in [:is:] test checks.
+   * Checks the subtype relationship, denoted by `<:` in the language
+   * specification.
+   *
+   * This is the type relationship used in `is` test checks.
    */
   bool isSubtypeOf(TypeMirror other);
 
   /**
-   * Checks the assignability relationship, denoted by [:<=>:] in the language
-   * specification. This is the type relationship tested on assignment in
-   * checked mode.
+   * Checks the assignability relationship, denoted by `<=>` in the language
+   * specification.
+   *
+   * This is the type relationship tested on assignment in checked mode.
    */
   bool isAssignableTo(TypeMirror other);
 }
@@ -806,9 +819,10 @@
 
   /**
    * The mixin of this class.
-   * If this class is the result of a mixin application of the
-   * form S with M, returns a class mirror on M.
-   * Otherwise returns a class mirror on [reflectee].
+   *
+   * If this class is the result of a mixin application of the form S with M,
+   * returns a class mirror on M. Otherwise returns a class mirror on
+   * [reflectee].
    */
   ClassMirror get mixin;
 
@@ -817,52 +831,50 @@
   // /// reflected class.
   // DeclarationMirror instanceLookup(Symbol name);
 
-   /**
+  /**
    * Invokes the named constructor and returns a mirror on the result.
    *
-   * Let *c* be the class reflected by this mirror
-   * let *a1, ..., an* be the elements of [positionalArguments]
+   * Let *c* be the class reflected by this mirror,
+   * let *a1, ..., an* be the elements of [positionalArguments],
    * let *k1, ..., km* be the identifiers denoted by the elements of
-   * [namedArguments.keys]
+   * [namedArguments.keys],
    * and let *v1, ..., vm* be the elements of [namedArguments.values].
-   * If [constructorName] was created from the empty string
-   * Then this method will execute the instance creation expression
-   * *new c(a1, ..., an, k1: v1, ..., km: vm)*
-   * in a scope that has access to the private members
-   * of *c*. Otherwise, let
-   * *f* be the simple name of the constructor denoted by [constructorName]
-   * Then this method will execute the instance creation expression
-   *  *new c.f(a1, ..., an, k1: v1, ..., km: vm)*
-   * in a scope that has access to the private members
-   * of *c*.
+   *
+   * If [constructorName] was created from the empty string, then this method
+   * will execute the instance creation expression
+   * *new c(a1, ..., an, k1: v1, ..., km: vm)* in a scope that has access to
+   * the private members of *c*.
+   *
+   * Otherwise, let *f* be the simple name of the constructor denoted by
+   * [constructorName]. Then this method will execute the instance creation
+   * expression *new c.f(a1, ..., an, k1: v1, ..., km: vm)* in a scope that has
+   * access to the private members of *c*.
+   *
    * In either case:
-   * If the expression evaluates to a result *r*, this method returns
-   * the result of calling [reflect]\(*r*\).
-   * If evaluating the expression causes a compilation error
-   * the effect is the same as if a non-reflective compilation error
-   * had been encountered.
-   * If evaluating the expression throws an exception *e*
-   * (that it does not catch)
-   * this method throws *e*.
+   *
+   * * If the expression evaluates to a result *r*, this method returns the
+   *   result of calling [reflect]\(*r*\).
+   * * If evaluating the expression causes a compilation error, the effect is
+   *   the same as if a non-reflective compilation error had been encountered.
+   * * If evaluating the expression throws an exception *e* (that it does not
+   *   catch), this method throws *e*.
    */
   InstanceMirror newInstance(Symbol constructorName,
                              List positionalArguments,
                              [Map<Symbol,dynamic> namedArguments]);
 
   /**
-   * Returns [:true:] if this mirror is equal to [other].
-   * Otherwise returns [:false:].
+   * Whether this mirror is equal to [other].
    *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2) This mirror and [other] reflect the same class.
    *
-   * Note that if the reflected class is an invocation of
-   * a generic class,(2) implies that the reflected class
-   * and [other] have equal type arguments.
+   * 1. [other] is a mirror of the same kind, and
+   * 2. This mirror and [other] reflect the same class.
+   *
+   * Note that if the reflected class is an invocation of a generic class, 2.
+   * implies that the reflected class and [other] have equal type arguments.
    */
-   bool operator == (other);
+  bool operator == (other);
 
   /**
    * Returns whether the class denoted by the receiver is a subclass of the
@@ -897,8 +909,7 @@
 }
 
 /**
- * A [TypeVariableMirror] represents a type parameter of a generic
- * type.
+ * A [TypeVariableMirror] represents a type parameter of a generic type.
  */
 abstract class TypeVariableMirror extends TypeMirror {
   /**
@@ -915,16 +926,15 @@
   bool get isStatic;
 
   /**
-   * Returns [:true:] if this mirror is equal to [other].
-   * Otherwise returns [:false:].
+   * Whether [other] is a [TypeVariableMirror] on the same type variable as this
+   * mirror.
    *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2)  [:simpleName == other.simpleName:] and
-   * [:owner == other.owner:].
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:].
    */
-   bool operator == (other);
+  bool operator == (other);
 }
 
 /**
@@ -933,11 +943,10 @@
 abstract class TypedefMirror implements TypeMirror {
   /**
    * The defining type for this typedef.
-   * If the the type referred to by the reflectee is a function type 
-   * *F*, the result will be [:FunctionTypeMirror:] reflecting *F*
-   * which is abstract and has an abstract method [:call:] whose 
-   * signature corresponds to *F*.
    *
+   * If the the type referred to by the reflectee is a function type *F*, the
+   * result will be [:FunctionTypeMirror:] reflecting *F* which is abstract
+   * and has an abstract method [:call:] whose signature corresponds to *F*.
    * For instance [:void f(int):] is the referent for [:typedef void f(int):].
    */
   FunctionTypeMirror get referent;
@@ -1046,15 +1055,14 @@
   bool get isFactoryConstructor;
 
   /**
-   * Returns true if this mirror is equal to [other].
+   * Whether this mirror is equal to [other].
    *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2) [:simpleName == other.simpleName:] and
-   * [:owner == other.owner:].
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:].
    */
-   bool operator == (other);
+  bool operator == (other);
 }
 
 /**
@@ -1088,15 +1096,14 @@
   bool get isConst;
 
   /**
-   * Returns true if this mirror is equal to [other].
+   * Whether this mirror is equal to [other].
    *
    * The equality holds if and only if
-   * (1) [other] is a mirror of the same kind
-   * and
-   * (2)  [:simpleName == other.simpleName:] and
-   * [:owner == other.owner:].
+   *
+   * 1. [other] is a mirror of the same kind, and
+   * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:].
    */
-   bool operator == (other);
+  bool operator == (other);
 }
 
 /**
@@ -1127,10 +1134,14 @@
   bool get hasDefaultValue;
 
   /**
-   * If this is a required parameter, returns [:null:]. Otherwise returns a
-   * mirror on the default value for this parameter. If no default is declared
-   * for an optional parameter, the default is [:null:] and a mirror on [:null:]
-   * is returned.
+   * Returns the default value of an optional parameter.
+   *
+   * Returns an [InstanceMirror] on the (compile-time constant)
+   * default value for an optional parameter.
+   * If no default value is declared, it defaults to `null`
+   * and a mirror of `null` is returned.
+   *
+   * Returns `null` for a required parameter.
    */
   InstanceMirror get defaultValue;
 }
diff --git a/sdk/lib/profiler/profiler.dart b/sdk/lib/profiler/profiler.dart
deleted file mode 100644
index 84add7b..0000000
--- a/sdk/lib/profiler/profiler.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Please see 'dart:developer'.
-@Deprecated("Dart SDK 1.12")
-library dart.profiler;
-
-export 'dart:developer' show getCurrentTag,
-                             Counter,
-                             Gauge,
-                             Metric,
-                             Metrics,
-                             UserTag;
diff --git a/sdk/lib/profiler/profiler_sources.gypi b/sdk/lib/profiler/profiler_sources.gypi
deleted file mode 100644
index 910d798..0000000
--- a/sdk/lib/profiler/profiler_sources.gypi
+++ /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.
-
-{
-  'sources': [
-    'profiler.dart',
-    # The above file needs to be first if additional parts are added to the lib.
-  ],
-}
diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart
index db45167..71ed0c6 100644
--- a/sdk/lib/svg/dartium/svg_dartium.dart
+++ b/sdk/lib/svg/dartium/svg_dartium.dart
@@ -22,11 +22,6 @@
 
 
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
-
 
 // FIXME: Can we make this private?
 final svgBlinkMap = {
@@ -446,7 +441,7 @@
 @DocsEditable()
 @DomName('SVGAngle')
 @Unstable()
-class Angle extends NativeFieldWrapperClass2 {
+class Angle extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Angle._() { throw new UnsupportedError("Not supported"); }
 
@@ -454,8 +449,6 @@
     return new Angle._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Angle._internalWrap() {
     return new Angle.internal_();
   }
@@ -661,7 +654,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedAngle')
 @Unstable()
-class AnimatedAngle extends NativeFieldWrapperClass2 {
+class AnimatedAngle extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedAngle._() { throw new UnsupportedError("Not supported"); }
 
@@ -669,8 +662,6 @@
     return new AnimatedAngle._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedAngle._internalWrap() {
     return new AnimatedAngle.internal_();
   }
@@ -699,7 +690,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedBoolean')
 @Unstable()
-class AnimatedBoolean extends NativeFieldWrapperClass2 {
+class AnimatedBoolean extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedBoolean._() { throw new UnsupportedError("Not supported"); }
 
@@ -707,8 +698,6 @@
     return new AnimatedBoolean._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedBoolean._internalWrap() {
     return new AnimatedBoolean.internal_();
   }
@@ -741,7 +730,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedEnumeration')
 @Unstable()
-class AnimatedEnumeration extends NativeFieldWrapperClass2 {
+class AnimatedEnumeration extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedEnumeration._() { throw new UnsupportedError("Not supported"); }
 
@@ -749,8 +738,6 @@
     return new AnimatedEnumeration._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedEnumeration._internalWrap() {
     return new AnimatedEnumeration.internal_();
   }
@@ -783,7 +770,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedInteger')
 @Unstable()
-class AnimatedInteger extends NativeFieldWrapperClass2 {
+class AnimatedInteger extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedInteger._() { throw new UnsupportedError("Not supported"); }
 
@@ -791,8 +778,6 @@
     return new AnimatedInteger._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedInteger._internalWrap() {
     return new AnimatedInteger.internal_();
   }
@@ -825,7 +810,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedLength')
 @Unstable()
-class AnimatedLength extends NativeFieldWrapperClass2 {
+class AnimatedLength extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedLength._() { throw new UnsupportedError("Not supported"); }
 
@@ -833,8 +818,6 @@
     return new AnimatedLength._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedLength._internalWrap() {
     return new AnimatedLength.internal_();
   }
@@ -863,7 +846,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedLengthList')
 @Unstable()
-class AnimatedLengthList extends NativeFieldWrapperClass2 {
+class AnimatedLengthList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedLengthList._() { throw new UnsupportedError("Not supported"); }
 
@@ -871,8 +854,6 @@
     return new AnimatedLengthList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedLengthList._internalWrap() {
     return new AnimatedLengthList.internal_();
   }
@@ -901,7 +882,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedNumber')
 @Unstable()
-class AnimatedNumber extends NativeFieldWrapperClass2 {
+class AnimatedNumber extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedNumber._() { throw new UnsupportedError("Not supported"); }
 
@@ -909,8 +890,6 @@
     return new AnimatedNumber._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedNumber._internalWrap() {
     return new AnimatedNumber.internal_();
   }
@@ -943,7 +922,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedNumberList')
 @Unstable()
-class AnimatedNumberList extends NativeFieldWrapperClass2 {
+class AnimatedNumberList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedNumberList._() { throw new UnsupportedError("Not supported"); }
 
@@ -951,8 +930,6 @@
     return new AnimatedNumberList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedNumberList._internalWrap() {
     return new AnimatedNumberList.internal_();
   }
@@ -981,7 +958,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedPreserveAspectRatio')
 @Unstable()
-class AnimatedPreserveAspectRatio extends NativeFieldWrapperClass2 {
+class AnimatedPreserveAspectRatio extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedPreserveAspectRatio._() { throw new UnsupportedError("Not supported"); }
 
@@ -989,8 +966,6 @@
     return new AnimatedPreserveAspectRatio._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedPreserveAspectRatio._internalWrap() {
     return new AnimatedPreserveAspectRatio.internal_();
   }
@@ -1019,7 +994,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedRect')
 @Unstable()
-class AnimatedRect extends NativeFieldWrapperClass2 {
+class AnimatedRect extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedRect._() { throw new UnsupportedError("Not supported"); }
 
@@ -1027,8 +1002,6 @@
     return new AnimatedRect._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedRect._internalWrap() {
     return new AnimatedRect.internal_();
   }
@@ -1057,7 +1030,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedString')
 @Unstable()
-class AnimatedString extends NativeFieldWrapperClass2 {
+class AnimatedString extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedString._() { throw new UnsupportedError("Not supported"); }
 
@@ -1065,8 +1038,6 @@
     return new AnimatedString._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedString._internalWrap() {
     return new AnimatedString.internal_();
   }
@@ -1099,7 +1070,7 @@
 @DocsEditable()
 @DomName('SVGAnimatedTransformList')
 @Unstable()
-class AnimatedTransformList extends NativeFieldWrapperClass2 {
+class AnimatedTransformList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AnimatedTransformList._() { throw new UnsupportedError("Not supported"); }
 
@@ -1107,8 +1078,6 @@
     return new AnimatedTransformList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AnimatedTransformList._internalWrap() {
     return new AnimatedTransformList.internal_();
   }
@@ -3354,7 +3323,7 @@
 @DocsEditable()
 @DomName('SVGFilterPrimitiveStandardAttributes')
 @Unstable()
-abstract class FilterPrimitiveStandardAttributes extends NativeFieldWrapperClass2 {
+abstract class FilterPrimitiveStandardAttributes extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FilterPrimitiveStandardAttributes._() { throw new UnsupportedError("Not supported"); }
 
@@ -3389,7 +3358,7 @@
 @DocsEditable()
 @DomName('SVGFitToViewBox')
 @Unstable()
-abstract class FitToViewBox extends NativeFieldWrapperClass2 {
+abstract class FitToViewBox extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory FitToViewBox._() { throw new UnsupportedError("Not supported"); }
 
@@ -3700,7 +3669,7 @@
 @DocsEditable()
 @DomName('SVGLength')
 @Unstable()
-class Length extends NativeFieldWrapperClass2 {
+class Length extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Length._() { throw new UnsupportedError("Not supported"); }
 
@@ -3708,8 +3677,6 @@
     return new Length._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Length._internalWrap() {
     return new Length.internal_();
   }
@@ -3810,7 +3777,7 @@
 @DocsEditable()
 @DomName('SVGLengthList')
 @Unstable()
-class LengthList extends JsoNativeFieldWrapper with ListMixin<Length>, ImmutableListMixin<Length> implements List<Length> {
+class LengthList extends DartHtmlDomObject with ListMixin<Length>, ImmutableListMixin<Length> implements List<Length> {
   // To suppress missing implicit constructor warnings.
   factory LengthList._() { throw new UnsupportedError("Not supported"); }
 
@@ -3818,8 +3785,6 @@
     return new LengthList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory LengthList._internalWrap() {
     return new LengthList.internal_();
   }
@@ -4214,7 +4179,7 @@
 @DocsEditable()
 @DomName('SVGMatrix')
 @Unstable()
-class Matrix extends NativeFieldWrapperClass2 {
+class Matrix extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Matrix._() { throw new UnsupportedError("Not supported"); }
 
@@ -4222,8 +4187,6 @@
     return new Matrix._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Matrix._internalWrap() {
     return new Matrix.internal_();
   }
@@ -4369,7 +4332,7 @@
 @DocsEditable()
 @DomName('SVGNumber')
 @Unstable()
-class Number extends NativeFieldWrapperClass2 {
+class Number extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Number._() { throw new UnsupportedError("Not supported"); }
 
@@ -4377,8 +4340,6 @@
     return new Number._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Number._internalWrap() {
     return new Number.internal_();
   }
@@ -4407,7 +4368,7 @@
 @DocsEditable()
 @DomName('SVGNumberList')
 @Unstable()
-class NumberList extends JsoNativeFieldWrapper with ListMixin<Number>, ImmutableListMixin<Number> implements List<Number> {
+class NumberList extends DartHtmlDomObject with ListMixin<Number>, ImmutableListMixin<Number> implements List<Number> {
   // To suppress missing implicit constructor warnings.
   factory NumberList._() { throw new UnsupportedError("Not supported"); }
 
@@ -4415,8 +4376,6 @@
     return new NumberList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory NumberList._internalWrap() {
     return new NumberList.internal_();
   }
@@ -4668,7 +4627,7 @@
 @DocsEditable()
 @DomName('SVGPathSeg')
 @Unstable()
-class PathSeg extends NativeFieldWrapperClass2 {
+class PathSeg extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PathSeg._() { throw new UnsupportedError("Not supported"); }
 
@@ -4676,8 +4635,6 @@
     return new PathSeg._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PathSeg._internalWrap() {
     return new PathSeg.internal_();
   }
@@ -5677,7 +5634,7 @@
 @DocsEditable()
 @DomName('SVGPathSegList')
 @Unstable()
-class PathSegList extends JsoNativeFieldWrapper with ListMixin<PathSeg>, ImmutableListMixin<PathSeg> implements List<PathSeg> {
+class PathSegList extends DartHtmlDomObject with ListMixin<PathSeg>, ImmutableListMixin<PathSeg> implements List<PathSeg> {
   // To suppress missing implicit constructor warnings.
   factory PathSegList._() { throw new UnsupportedError("Not supported"); }
 
@@ -5685,8 +5642,6 @@
     return new PathSegList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PathSegList._internalWrap() {
     return new PathSegList.internal_();
   }
@@ -5972,7 +5927,7 @@
 @DocsEditable()
 @DomName('SVGPoint')
 @Unstable()
-class Point extends NativeFieldWrapperClass2 {
+class Point extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Point._() { throw new UnsupportedError("Not supported"); }
 
@@ -5980,8 +5935,6 @@
     return new Point._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Point._internalWrap() {
     return new Point.internal_();
   }
@@ -6022,7 +5975,7 @@
 @DocsEditable()
 @DomName('SVGPointList')
 @Unstable()
-class PointList extends NativeFieldWrapperClass2 {
+class PointList extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PointList._() { throw new UnsupportedError("Not supported"); }
 
@@ -6030,8 +5983,6 @@
     return new PointList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PointList._internalWrap() {
     return new PointList.internal_();
   }
@@ -6184,7 +6135,7 @@
 @DocsEditable()
 @DomName('SVGPreserveAspectRatio')
 @Unstable()
-class PreserveAspectRatio extends NativeFieldWrapperClass2 {
+class PreserveAspectRatio extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PreserveAspectRatio._() { throw new UnsupportedError("Not supported"); }
 
@@ -6192,8 +6143,6 @@
     return new PreserveAspectRatio._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PreserveAspectRatio._internalWrap() {
     return new PreserveAspectRatio.internal_();
   }
@@ -6347,7 +6296,7 @@
 @DocsEditable()
 @DomName('SVGRect')
 @Unstable()
-class Rect extends NativeFieldWrapperClass2 {
+class Rect extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Rect._() { throw new UnsupportedError("Not supported"); }
 
@@ -6355,8 +6304,6 @@
     return new Rect._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Rect._internalWrap() {
     return new Rect.internal_();
   }
@@ -6470,7 +6417,7 @@
 @DocsEditable()
 @DomName('SVGRenderingIntent')
 @Unstable()
-class RenderingIntent extends NativeFieldWrapperClass2 {
+class RenderingIntent extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory RenderingIntent._() { throw new UnsupportedError("Not supported"); }
 
@@ -6478,8 +6425,6 @@
     return new RenderingIntent._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RenderingIntent._internalWrap() {
     return new RenderingIntent.internal_();
   }
@@ -6657,7 +6602,7 @@
 @DocsEditable()
 @DomName('SVGStringList')
 @Unstable()
-class StringList extends JsoNativeFieldWrapper with ListMixin<String>, ImmutableListMixin<String> implements List<String> {
+class StringList extends DartHtmlDomObject with ListMixin<String>, ImmutableListMixin<String> implements List<String> {
   // To suppress missing implicit constructor warnings.
   factory StringList._() { throw new UnsupportedError("Not supported"); }
 
@@ -6665,8 +6610,6 @@
     return new StringList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory StringList._internalWrap() {
     return new StringList.internal_();
   }
@@ -7926,7 +7869,7 @@
 @DocsEditable()
 @DomName('SVGTests')
 @Unstable()
-abstract class Tests extends NativeFieldWrapperClass2 {
+abstract class Tests extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Tests._() { throw new UnsupportedError("Not supported"); }
 
@@ -8246,7 +8189,7 @@
 @DocsEditable()
 @DomName('SVGTransform')
 @Unstable()
-class Transform extends NativeFieldWrapperClass2 {
+class Transform extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Transform._() { throw new UnsupportedError("Not supported"); }
 
@@ -8254,8 +8197,6 @@
     return new Transform._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Transform._internalWrap() {
     return new Transform.internal_();
   }
@@ -8340,7 +8281,7 @@
 @DocsEditable()
 @DomName('SVGTransformList')
 @Unstable()
-class TransformList extends JsoNativeFieldWrapper with ListMixin<Transform>, ImmutableListMixin<Transform> implements List<Transform> {
+class TransformList extends DartHtmlDomObject with ListMixin<Transform>, ImmutableListMixin<Transform> implements List<Transform> {
   // To suppress missing implicit constructor warnings.
   factory TransformList._() { throw new UnsupportedError("Not supported"); }
 
@@ -8348,8 +8289,6 @@
     return new TransformList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory TransformList._internalWrap() {
     return new TransformList.internal_();
   }
@@ -8464,7 +8403,7 @@
 @DocsEditable()
 @DomName('SVGUnitTypes')
 @Unstable()
-class UnitTypes extends NativeFieldWrapperClass2 {
+class UnitTypes extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory UnitTypes._() { throw new UnsupportedError("Not supported"); }
 
@@ -8472,8 +8411,6 @@
     return new UnitTypes._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory UnitTypes._internalWrap() {
     return new UnitTypes.internal_();
   }
@@ -8506,7 +8443,7 @@
 @DocsEditable()
 @DomName('SVGURIReference')
 @Unstable()
-abstract class UriReference extends NativeFieldWrapperClass2 {
+abstract class UriReference extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory UriReference._() { throw new UnsupportedError("Not supported"); }
 
@@ -8639,7 +8576,7 @@
 @DocsEditable()
 @DomName('SVGViewSpec')
 @Unstable()
-class ViewSpec extends NativeFieldWrapperClass2 implements FitToViewBox, ZoomAndPan {
+class ViewSpec extends DartHtmlDomObject implements FitToViewBox, ZoomAndPan {
   // To suppress missing implicit constructor warnings.
   factory ViewSpec._() { throw new UnsupportedError("Not supported"); }
 
@@ -8647,8 +8584,6 @@
     return new ViewSpec._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ViewSpec._internalWrap() {
     return new ViewSpec.internal_();
   }
@@ -8713,7 +8648,7 @@
 @DocsEditable()
 @DomName('SVGZoomAndPan')
 @Unstable()
-abstract class ZoomAndPan extends NativeFieldWrapperClass2 {
+abstract class ZoomAndPan extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ZoomAndPan._() { throw new UnsupportedError("Not supported"); }
 
diff --git a/runtime/lib/vmservice/client.dart b/sdk/lib/vmservice/client.dart
similarity index 97%
rename from runtime/lib/vmservice/client.dart
rename to sdk/lib/vmservice/client.dart
index 279b424..aa00d09 100644
--- a/runtime/lib/vmservice/client.dart
+++ b/sdk/lib/vmservice/client.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 vmservice;
+part of dart._vmservice;
 
 // A service client.
 abstract class Client {
diff --git a/runtime/lib/vmservice/constants.dart b/sdk/lib/vmservice/constants.dart
similarity index 94%
rename from runtime/lib/vmservice/constants.dart
rename to sdk/lib/vmservice/constants.dart
index 92390e6..e899dd1 100644
--- a/runtime/lib/vmservice/constants.dart
+++ b/sdk/lib/vmservice/constants.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 vmservice;
+part of dart._vmservice;
 
 // These must be kept in sync with runtime/vm/service.cc.
 class Constants {
diff --git a/runtime/lib/vmservice/message.dart b/sdk/lib/vmservice/message.dart
similarity index 94%
rename from runtime/lib/vmservice/message.dart
rename to sdk/lib/vmservice/message.dart
index 043c941..481206e 100644
--- a/runtime/lib/vmservice/message.dart
+++ b/sdk/lib/vmservice/message.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 vmservice;
+part of dart._vmservice;
 
 class Message {
   final Completer _completer = new Completer.sync();
@@ -145,8 +145,5 @@
   }
 }
 
-bool sendIsolateServiceMessage(SendPort sp, List m)
-    native "VMService_SendIsolateServiceMessage";
-
-void sendRootServiceMessage(List m)
-    native "VMService_SendRootServiceMessage";
+external bool sendIsolateServiceMessage(SendPort sp, List m);
+external void sendRootServiceMessage(List m);
diff --git a/runtime/lib/vmservice/message_router.dart b/sdk/lib/vmservice/message_router.dart
similarity index 91%
rename from runtime/lib/vmservice/message_router.dart
rename to sdk/lib/vmservice/message_router.dart
index 6f8a1ea..d510004 100644
--- a/runtime/lib/vmservice/message_router.dart
+++ b/sdk/lib/vmservice/message_router.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 vmservice;
+part of dart._vmservice;
 
 abstract class MessageRouter {
   Future<String> route(Message message);
diff --git a/runtime/lib/vmservice/running_isolate.dart b/sdk/lib/vmservice/running_isolate.dart
similarity index 95%
rename from runtime/lib/vmservice/running_isolate.dart
rename to sdk/lib/vmservice/running_isolate.dart
index 48eec0d..6c24341 100644
--- a/runtime/lib/vmservice/running_isolate.dart
+++ b/sdk/lib/vmservice/running_isolate.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 vmservice;
+part of dart._vmservice;
 
 class RunningIsolate implements MessageRouter {
   final int portId;
diff --git a/runtime/lib/vmservice/running_isolates.dart b/sdk/lib/vmservice/running_isolates.dart
similarity index 98%
rename from runtime/lib/vmservice/running_isolates.dart
rename to sdk/lib/vmservice/running_isolates.dart
index b10128c..1a5ed06 100644
--- a/runtime/lib/vmservice/running_isolates.dart
+++ b/sdk/lib/vmservice/running_isolates.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 vmservice;
+part of dart._vmservice;
 
 class RunningIsolates implements MessageRouter {
   final Map<int, RunningIsolate> isolates = new Map<int, RunningIsolate>();
diff --git a/runtime/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
similarity index 95%
rename from runtime/lib/vmservice/vmservice.dart
rename to sdk/lib/vmservice/vmservice.dart
index 3c66673..eda4504 100644
--- a/runtime/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library vmservice;
+library dart._vmservice;
 
 import 'dart:async';
 import 'dart:convert';
@@ -151,8 +151,7 @@
         return;
       }
     }
-    Logger.root.severe(
-        'Internal vm-service error: ignoring illegal message: $message');
+    print('Internal vm-service error: ignoring illegal message: $message');
   }
 
   void _notSupported(_) {
@@ -322,10 +321,11 @@
   service.runningIsolates.isolateStartup(port_id, sp, name);
 }
 
-void _onStart() native "VMService_OnStart";
+external void _onStart();
 
-void _onExit() native "VMService_OnExit";
+external void _onExit();
 
-bool _vmListenStream(String streamId) native "VMService_ListenStream";
+external bool _vmListenStream(String streamId);
 
-void _vmCancelStream(String streamId) native "VMService_CancelStream";
+external void _vmCancelStream(String streamId);
+
diff --git a/sdk/lib/vmservice/vmservice_sources.gypi b/sdk/lib/vmservice/vmservice_sources.gypi
new file mode 100644
index 0000000..97b2582
--- /dev/null
+++ b/sdk/lib/vmservice/vmservice_sources.gypi
@@ -0,0 +1,18 @@
+# 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.
+
+# Sources that make up the library "dart:_vmservice".
+
+{
+  'sources': [
+    'vmservice.dart',
+    # The above file needs to be first as it imports required libraries.
+    'client.dart',
+    'constants.dart',
+    'running_isolate.dart',
+    'running_isolates.dart',
+    'message.dart',
+    'message_router.dart',
+  ],
+}
diff --git a/sdk/lib/web_audio/dartium/web_audio_dartium.dart b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
index 00f927d..3f04c44 100644
--- a/sdk/lib/web_audio/dartium/web_audio_dartium.dart
+++ b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
@@ -173,7 +173,7 @@
 @DomName('AudioBuffer')
 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
 @Experimental()
-class AudioBuffer extends NativeFieldWrapperClass2 {
+class AudioBuffer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AudioBuffer._() { throw new UnsupportedError("Not supported"); }
 
@@ -181,8 +181,6 @@
     return new AudioBuffer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AudioBuffer._internalWrap() {
     return new AudioBuffer.internal_();
   }
@@ -556,7 +554,7 @@
 @DomName('AudioListener')
 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioListener-section
 @Experimental()
-class AudioListener extends NativeFieldWrapperClass2 {
+class AudioListener extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AudioListener._() { throw new UnsupportedError("Not supported"); }
 
@@ -564,8 +562,6 @@
     return new AudioListener._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AudioListener._internalWrap() {
     return new AudioListener.internal_();
   }
@@ -699,7 +695,7 @@
 @DomName('AudioParam')
 // https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioParam
 @Experimental()
-class AudioParam extends NativeFieldWrapperClass2 {
+class AudioParam extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AudioParam._() { throw new UnsupportedError("Not supported"); }
 
@@ -707,8 +703,6 @@
     return new AudioParam._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AudioParam._internalWrap() {
     return new AudioParam.internal_();
   }
@@ -1465,7 +1459,7 @@
 @DocsEditable()
 @DomName('PeriodicWave')
 @Experimental() // untriaged
-class PeriodicWave extends NativeFieldWrapperClass2 {
+class PeriodicWave extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory PeriodicWave._() { throw new UnsupportedError("Not supported"); }
 
@@ -1473,8 +1467,6 @@
     return new PeriodicWave._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory PeriodicWave._internalWrap() {
     return new PeriodicWave.internal_();
   }
diff --git a/sdk/lib/web_gl/dartium/web_gl_dartium.dart b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
index 356cca8..1805e18 100644
--- a/sdk/lib/web_gl/dartium/web_gl_dartium.dart
+++ b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
@@ -408,7 +408,7 @@
 @DocsEditable()
 @DomName('WebGLActiveInfo')
 @Unstable()
-class ActiveInfo extends NativeFieldWrapperClass2 {
+class ActiveInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ActiveInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -416,8 +416,6 @@
     return new ActiveInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ActiveInfo._internalWrap() {
     return new ActiveInfo.internal_();
   }
@@ -450,7 +448,7 @@
 @DocsEditable()
 @DomName('ANGLEInstancedArrays')
 @Experimental() // untriaged
-class AngleInstancedArrays extends NativeFieldWrapperClass2 {
+class AngleInstancedArrays extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory AngleInstancedArrays._() { throw new UnsupportedError("Not supported"); }
 
@@ -458,8 +456,6 @@
     return new AngleInstancedArrays._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory AngleInstancedArrays._internalWrap() {
     return new AngleInstancedArrays.internal_();
   }
@@ -500,7 +496,7 @@
 @DocsEditable()
 @DomName('WebGLBuffer')
 @Unstable()
-class Buffer extends NativeFieldWrapperClass2 {
+class Buffer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Buffer._() { throw new UnsupportedError("Not supported"); }
 
@@ -508,8 +504,6 @@
     return new Buffer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Buffer._internalWrap() {
     return new Buffer.internal_();
   }
@@ -531,7 +525,7 @@
 @DomName('WebGLCompressedTextureATC')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_atc/
 @Experimental()
-class CompressedTextureAtc extends NativeFieldWrapperClass2 {
+class CompressedTextureAtc extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureAtc._() { throw new UnsupportedError("Not supported"); }
 
@@ -539,8 +533,6 @@
     return new CompressedTextureAtc._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CompressedTextureAtc._internalWrap() {
     return new CompressedTextureAtc.internal_();
   }
@@ -573,7 +565,7 @@
 @DocsEditable()
 @DomName('WebGLCompressedTextureETC1')
 @Experimental() // untriaged
-class CompressedTextureETC1 extends NativeFieldWrapperClass2 {
+class CompressedTextureETC1 extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureETC1._() { throw new UnsupportedError("Not supported"); }
 
@@ -581,8 +573,6 @@
     return new CompressedTextureETC1._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CompressedTextureETC1._internalWrap() {
     return new CompressedTextureETC1.internal_();
   }
@@ -609,7 +599,7 @@
 @DomName('WebGLCompressedTexturePVRTC')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/
 @Experimental() // experimental
-class CompressedTexturePvrtc extends NativeFieldWrapperClass2 {
+class CompressedTexturePvrtc extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CompressedTexturePvrtc._() { throw new UnsupportedError("Not supported"); }
 
@@ -617,8 +607,6 @@
     return new CompressedTexturePvrtc._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CompressedTexturePvrtc._internalWrap() {
     return new CompressedTexturePvrtc.internal_();
   }
@@ -656,7 +644,7 @@
 @DomName('WebGLCompressedTextureS3TC')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/
 @Experimental() // experimental
-class CompressedTextureS3TC extends NativeFieldWrapperClass2 {
+class CompressedTextureS3TC extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory CompressedTextureS3TC._() { throw new UnsupportedError("Not supported"); }
 
@@ -664,8 +652,6 @@
     return new CompressedTextureS3TC._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory CompressedTextureS3TC._internalWrap() {
     return new CompressedTextureS3TC.internal_();
   }
@@ -724,7 +710,7 @@
  */
 @DomName('WebGLContextAttributes')
 @Unstable()
-class ContextAttributes extends NativeFieldWrapperClass2 {
+class ContextAttributes extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ContextAttributes._() { throw new UnsupportedError("Not supported"); }
 
@@ -732,8 +718,6 @@
     return new ContextAttributes._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ContextAttributes._internalWrap() {
     return new ContextAttributes.internal_();
   }
@@ -844,7 +828,7 @@
 @DomName('WebGLDebugRendererInfo')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/
 @Experimental() // experimental
-class DebugRendererInfo extends NativeFieldWrapperClass2 {
+class DebugRendererInfo extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DebugRendererInfo._() { throw new UnsupportedError("Not supported"); }
 
@@ -852,8 +836,6 @@
     return new DebugRendererInfo._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DebugRendererInfo._internalWrap() {
     return new DebugRendererInfo.internal_();
   }
@@ -883,7 +865,7 @@
 @DomName('WebGLDebugShaders')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_shaders/
 @Experimental() // experimental
-class DebugShaders extends NativeFieldWrapperClass2 {
+class DebugShaders extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DebugShaders._() { throw new UnsupportedError("Not supported"); }
 
@@ -891,8 +873,6 @@
     return new DebugShaders._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DebugShaders._internalWrap() {
     return new DebugShaders.internal_();
   }
@@ -918,7 +898,7 @@
 @DomName('WebGLDepthTexture')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/
 @Experimental() // experimental
-class DepthTexture extends NativeFieldWrapperClass2 {
+class DepthTexture extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DepthTexture._() { throw new UnsupportedError("Not supported"); }
 
@@ -926,8 +906,6 @@
     return new DepthTexture._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DepthTexture._internalWrap() {
     return new DepthTexture.internal_();
   }
@@ -953,7 +931,7 @@
 @DomName('WebGLDrawBuffers')
 // http://www.khronos.org/registry/webgl/specs/latest/
 @Experimental() // stable
-class DrawBuffers extends NativeFieldWrapperClass2 {
+class DrawBuffers extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory DrawBuffers._() { throw new UnsupportedError("Not supported"); }
 
@@ -961,8 +939,6 @@
     return new DrawBuffers._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory DrawBuffers._internalWrap() {
     return new DrawBuffers.internal_();
   }
@@ -1123,7 +1099,7 @@
 @DocsEditable()
 @DomName('EXTBlendMinMax')
 @Experimental() // untriaged
-class ExtBlendMinMax extends NativeFieldWrapperClass2 {
+class ExtBlendMinMax extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ExtBlendMinMax._() { throw new UnsupportedError("Not supported"); }
 
@@ -1131,8 +1107,6 @@
     return new ExtBlendMinMax._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ExtBlendMinMax._internalWrap() {
     return new ExtBlendMinMax.internal_();
   }
@@ -1164,7 +1138,7 @@
 @DomName('EXTFragDepth')
 // http://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
 @Experimental()
-class ExtFragDepth extends NativeFieldWrapperClass2 {
+class ExtFragDepth extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ExtFragDepth._() { throw new UnsupportedError("Not supported"); }
 
@@ -1172,8 +1146,6 @@
     return new ExtFragDepth._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ExtFragDepth._internalWrap() {
     return new ExtFragDepth.internal_();
   }
@@ -1194,7 +1166,7 @@
 @DocsEditable()
 @DomName('EXTShaderTextureLOD')
 @Experimental() // untriaged
-class ExtShaderTextureLod extends NativeFieldWrapperClass2 {
+class ExtShaderTextureLod extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ExtShaderTextureLod._() { throw new UnsupportedError("Not supported"); }
 
@@ -1202,8 +1174,6 @@
     return new ExtShaderTextureLod._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ExtShaderTextureLod._internalWrap() {
     return new ExtShaderTextureLod.internal_();
   }
@@ -1225,7 +1195,7 @@
 @DomName('EXTTextureFilterAnisotropic')
 // http://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/
 @Experimental()
-class ExtTextureFilterAnisotropic extends NativeFieldWrapperClass2 {
+class ExtTextureFilterAnisotropic extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ExtTextureFilterAnisotropic._() { throw new UnsupportedError("Not supported"); }
 
@@ -1233,8 +1203,6 @@
     return new ExtTextureFilterAnisotropic._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ExtTextureFilterAnisotropic._internalWrap() {
     return new ExtTextureFilterAnisotropic.internal_();
   }
@@ -1263,7 +1231,7 @@
 @DocsEditable()
 @DomName('WebGLFramebuffer')
 @Unstable()
-class Framebuffer extends NativeFieldWrapperClass2 {
+class Framebuffer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Framebuffer._() { throw new UnsupportedError("Not supported"); }
 
@@ -1271,8 +1239,6 @@
     return new Framebuffer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Framebuffer._internalWrap() {
     return new Framebuffer.internal_();
   }
@@ -1294,7 +1260,7 @@
 @DomName('WebGLLoseContext')
 // http://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/
 @Experimental()
-class LoseContext extends NativeFieldWrapperClass2 {
+class LoseContext extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory LoseContext._() { throw new UnsupportedError("Not supported"); }
 
@@ -1302,8 +1268,6 @@
     return new LoseContext._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory LoseContext._internalWrap() {
     return new LoseContext.internal_();
   }
@@ -1333,7 +1297,7 @@
 @DomName('OESElementIndexUint')
 // http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/
 @Experimental() // experimental
-class OesElementIndexUint extends NativeFieldWrapperClass2 {
+class OesElementIndexUint extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesElementIndexUint._() { throw new UnsupportedError("Not supported"); }
 
@@ -1341,8 +1305,6 @@
     return new OesElementIndexUint._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesElementIndexUint._internalWrap() {
     return new OesElementIndexUint.internal_();
   }
@@ -1364,7 +1326,7 @@
 @DomName('OESStandardDerivatives')
 // http://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/
 @Experimental() // experimental
-class OesStandardDerivatives extends NativeFieldWrapperClass2 {
+class OesStandardDerivatives extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesStandardDerivatives._() { throw new UnsupportedError("Not supported"); }
 
@@ -1372,8 +1334,6 @@
     return new OesStandardDerivatives._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesStandardDerivatives._internalWrap() {
     return new OesStandardDerivatives.internal_();
   }
@@ -1399,7 +1359,7 @@
 @DomName('OESTextureFloat')
 // http://www.khronos.org/registry/webgl/extensions/OES_texture_float/
 @Experimental() // experimental
-class OesTextureFloat extends NativeFieldWrapperClass2 {
+class OesTextureFloat extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesTextureFloat._() { throw new UnsupportedError("Not supported"); }
 
@@ -1407,8 +1367,6 @@
     return new OesTextureFloat._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesTextureFloat._internalWrap() {
     return new OesTextureFloat.internal_();
   }
@@ -1430,7 +1388,7 @@
 @DomName('OESTextureFloatLinear')
 // http://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/
 @Experimental()
-class OesTextureFloatLinear extends NativeFieldWrapperClass2 {
+class OesTextureFloatLinear extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesTextureFloatLinear._() { throw new UnsupportedError("Not supported"); }
 
@@ -1438,8 +1396,6 @@
     return new OesTextureFloatLinear._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesTextureFloatLinear._internalWrap() {
     return new OesTextureFloatLinear.internal_();
   }
@@ -1461,7 +1417,7 @@
 @DomName('OESTextureHalfFloat')
 // http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/
 @Experimental() // experimental
-class OesTextureHalfFloat extends NativeFieldWrapperClass2 {
+class OesTextureHalfFloat extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesTextureHalfFloat._() { throw new UnsupportedError("Not supported"); }
 
@@ -1469,8 +1425,6 @@
     return new OesTextureHalfFloat._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesTextureHalfFloat._internalWrap() {
     return new OesTextureHalfFloat.internal_();
   }
@@ -1496,7 +1450,7 @@
 @DomName('OESTextureHalfFloatLinear')
 // http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/
 @Experimental()
-class OesTextureHalfFloatLinear extends NativeFieldWrapperClass2 {
+class OesTextureHalfFloatLinear extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesTextureHalfFloatLinear._() { throw new UnsupportedError("Not supported"); }
 
@@ -1504,8 +1458,6 @@
     return new OesTextureHalfFloatLinear._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesTextureHalfFloatLinear._internalWrap() {
     return new OesTextureHalfFloatLinear.internal_();
   }
@@ -1527,7 +1479,7 @@
 @DomName('OESVertexArrayObject')
 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
 @Experimental() // experimental
-class OesVertexArrayObject extends NativeFieldWrapperClass2 {
+class OesVertexArrayObject extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory OesVertexArrayObject._() { throw new UnsupportedError("Not supported"); }
 
@@ -1535,8 +1487,6 @@
     return new OesVertexArrayObject._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory OesVertexArrayObject._internalWrap() {
     return new OesVertexArrayObject.internal_();
   }
@@ -1577,7 +1527,7 @@
 @DocsEditable()
 @DomName('WebGLProgram')
 @Unstable()
-class Program extends NativeFieldWrapperClass2 {
+class Program extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Program._() { throw new UnsupportedError("Not supported"); }
 
@@ -1585,8 +1535,6 @@
     return new Program._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Program._internalWrap() {
     return new Program.internal_();
   }
@@ -1607,7 +1555,7 @@
 @DocsEditable()
 @DomName('WebGLRenderbuffer')
 @Unstable()
-class Renderbuffer extends NativeFieldWrapperClass2 {
+class Renderbuffer extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Renderbuffer._() { throw new UnsupportedError("Not supported"); }
 
@@ -1615,8 +1563,6 @@
     return new Renderbuffer._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Renderbuffer._internalWrap() {
     return new Renderbuffer.internal_();
   }
@@ -1637,7 +1583,7 @@
 @SupportedBrowser(SupportedBrowser.FIREFOX)
 @Experimental()
 @Unstable()
-class RenderingContext extends NativeFieldWrapperClass2 implements CanvasRenderingContext {
+class RenderingContext extends DartHtmlDomObject implements CanvasRenderingContext {
   // To suppress missing implicit constructor warnings.
   factory RenderingContext._() { throw new UnsupportedError("Not supported"); }
 
@@ -1645,8 +1591,6 @@
     return new RenderingContext._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory RenderingContext._internalWrap() {
     return new RenderingContext.internal_();
   }
@@ -3584,7 +3528,7 @@
 
 @DocsEditable()
 @DomName('WebGLShader')
-class Shader extends NativeFieldWrapperClass2 {
+class Shader extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Shader._() { throw new UnsupportedError("Not supported"); }
 
@@ -3592,8 +3536,6 @@
     return new Shader._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Shader._internalWrap() {
     return new Shader.internal_();
   }
@@ -3613,7 +3555,7 @@
 
 @DocsEditable()
 @DomName('WebGLShaderPrecisionFormat')
-class ShaderPrecisionFormat extends NativeFieldWrapperClass2 {
+class ShaderPrecisionFormat extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory ShaderPrecisionFormat._() { throw new UnsupportedError("Not supported"); }
 
@@ -3621,8 +3563,6 @@
     return new ShaderPrecisionFormat._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory ShaderPrecisionFormat._internalWrap() {
     return new ShaderPrecisionFormat.internal_();
   }
@@ -3654,7 +3594,7 @@
 
 @DocsEditable()
 @DomName('WebGLTexture')
-class Texture extends NativeFieldWrapperClass2 {
+class Texture extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory Texture._() { throw new UnsupportedError("Not supported"); }
 
@@ -3662,8 +3602,6 @@
     return new Texture._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory Texture._internalWrap() {
     return new Texture.internal_();
   }
@@ -3683,7 +3621,7 @@
 
 @DocsEditable()
 @DomName('WebGLUniformLocation')
-class UniformLocation extends NativeFieldWrapperClass2 {
+class UniformLocation extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory UniformLocation._() { throw new UnsupportedError("Not supported"); }
 
@@ -3691,8 +3629,6 @@
     return new UniformLocation._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory UniformLocation._internalWrap() {
     return new UniformLocation.internal_();
   }
@@ -3714,7 +3650,7 @@
 @DomName('WebGLVertexArrayObjectOES')
 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
 @Experimental() // experimental
-class VertexArrayObject extends NativeFieldWrapperClass2 {
+class VertexArrayObject extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
 
@@ -3722,8 +3658,6 @@
     return new VertexArrayObject._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory VertexArrayObject._internalWrap() {
     return new VertexArrayObject.internal_();
   }
@@ -3744,7 +3678,7 @@
 @DocsEditable()
 @DomName('WebGLRenderingContextBase')
 @Experimental() // untriaged
-class _WebGLRenderingContextBase extends NativeFieldWrapperClass2 {
+class _WebGLRenderingContextBase extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory _WebGLRenderingContextBase._() { throw new UnsupportedError("Not supported"); }
 
diff --git a/sdk/lib/web_sql/dartium/web_sql_dartium.dart b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
index 2d8039e..13c0124 100644
--- a/sdk/lib/web_sql/dartium/web_sql_dartium.dart
+++ b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
@@ -25,11 +25,6 @@
 
 
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
-
 
 // FIXME: Can we make this private?
 final web_sqlBlinkMap = {
@@ -108,7 +103,7 @@
 @Experimental()
 // http://www.w3.org/TR/webdatabase/#asynchronous-database-api
 @Experimental() // deprecated
-class SqlDatabase extends NativeFieldWrapperClass2 {
+class SqlDatabase extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SqlDatabase._() { throw new UnsupportedError("Not supported"); }
 
@@ -116,8 +111,6 @@
     return new SqlDatabase._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SqlDatabase._internalWrap() {
     return new SqlDatabase.internal_();
   }
@@ -189,7 +182,7 @@
 @DomName('SQLError')
 // http://www.w3.org/TR/webdatabase/#sqlerror
 @Experimental() // deprecated
-class SqlError extends NativeFieldWrapperClass2 {
+class SqlError extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SqlError._() { throw new UnsupportedError("Not supported"); }
 
@@ -197,8 +190,6 @@
     return new SqlError._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SqlError._internalWrap() {
     return new SqlError.internal_();
   }
@@ -260,7 +251,7 @@
 @DomName('SQLResultSet')
 // http://www.w3.org/TR/webdatabase/#sqlresultset
 @Experimental() // deprecated
-class SqlResultSet extends NativeFieldWrapperClass2 {
+class SqlResultSet extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SqlResultSet._() { throw new UnsupportedError("Not supported"); }
 
@@ -268,8 +259,6 @@
     return new SqlResultSet._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SqlResultSet._internalWrap() {
     return new SqlResultSet.internal_();
   }
@@ -303,7 +292,7 @@
 @DomName('SQLResultSetRowList')
 // http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
 @Experimental() // deprecated
-class SqlResultSetRowList extends JsoNativeFieldWrapper with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> {
+class SqlResultSetRowList extends DartHtmlDomObject with ListMixin<Map>, ImmutableListMixin<Map> implements List<Map> {
   // To suppress missing implicit constructor warnings.
   factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
 
@@ -311,8 +300,6 @@
     return new SqlResultSetRowList._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SqlResultSetRowList._internalWrap() {
     return new SqlResultSetRowList.internal_();
   }
@@ -391,7 +378,7 @@
 @Experimental()
 // http://www.w3.org/TR/webdatabase/#sqltransaction
 @deprecated // deprecated
-class SqlTransaction extends NativeFieldWrapperClass2 {
+class SqlTransaction extends DartHtmlDomObject {
   // To suppress missing implicit constructor warnings.
   factory SqlTransaction._() { throw new UnsupportedError("Not supported"); }
 
@@ -399,8 +386,6 @@
     return new SqlTransaction._internalWrap();
   }
 
-  js.JsObject blink_jsObject;
-
   factory SqlTransaction._internalWrap() {
     return new SqlTransaction.internal_();
   }
diff --git a/tests/co19/co19-dartium.status b/tests/co19/co19-dartium.status
index 546f5fe..26d20f4 100644
--- a/tests/co19/co19-dartium.status
+++ b/tests/co19/co19-dartium.status
@@ -11,19 +11,28 @@
 LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Issue 21605
 LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: Pass, RuntimeError # Issue 21605
 
+[ $compiler == none && $runtime == dartium && $system == windows ]
+LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: Pass, RuntimeError # Issue 21605
+
 [ $compiler == none && $runtime == dartium ]
-LayoutTests/fast/canvas/canvas-lineDash-input-sequence_t01: RuntimeError # Dartium JSInterop failure
+LayoutTests/fast/dom/custom/document-register-basic_t01: RuntimeError # Bad test can't register HtmlElement.
 LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/events/remove-event-listener_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError # Dartium JSInterop failure
+LayoutTests/fast/xpath/attr-namespace_t01: RuntimeError # Dartium JsInterop failure
 LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/py-dom-xpath/axes_t01: RuntimeError # Dartium JSInterop failure
-LayoutTests/fast/dom/custom/element-type_t01: RuntimeError # Dartium JsInterop failure (element upgrade)
+WebPlatformTest/custom-elements/instantiating/isAttribute_A02_t01: RuntimeError # Dartium JSInterop failure
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Pass, RuntimeError # Flaky with Dartium JsInterop. Seems like timing issues in the test.
+LibTest/html/IFrameElement/IFrameElement.created_A01_t01: RuntimeError # Issue 24568
+LibTest/html/Window/document_A01_t01: RuntimeError # Issue 24585
 
 [ $compiler == none && $runtime == dartium && $checked ]
 LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError # Dartium JSInterop failure
+LibTest/html/Window/requestFileSystem_A02_t01: Skip # Times out. Issue 24585.  This also has an untriaged dartium failure, in the section below.
+WebPlatformTest/html/browsers/browsing-the-web/read-text/load-text-plain_t01: RuntimeError # Issue 24585
 
 [ $compiler == none && ($runtime == dartium || $runtime == ContentShellOnAndroid) ]
 LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Skip # Issue 20540
@@ -391,7 +400,6 @@
 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/custom/document-register-svg-extends_t01: RuntimeError # co19-roll r738: Please triage this failure.
-LayoutTests/fast/dom/custom/document-register-type-extensions_t01: RuntimeError # Issue 24516
 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/focus-contenteditable_t01: RuntimeError, Pass # co19-roll r738: Please triage this failure.
diff --git a/tests/compiler/dart2js/analyze_api_test.dart b/tests/compiler/dart2js/analyze_api_test.dart
index faeebaa..91b4ae2 100644
--- a/tests/compiler/dart2js/analyze_api_test.dart
+++ b/tests/compiler/dart2js/analyze_api_test.dart
@@ -24,7 +24,7 @@
 
 void main() {
   var uriList = new List<Uri>();
-  LIBRARIES.forEach((String name, LibraryInfo info) {
+  libraries.forEach((String name, LibraryInfo info) {
     if (info.documented) {
       uriList.add(new Uri(scheme: 'dart', path: name));
     }
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index a916133..7d84392 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -137,6 +137,7 @@
 Future analyze(List<Uri> uriList,
                Map<String, List<String>> whiteList,
                {bool analyzeAll: true,
+                bool analyzeMain: false,
                 CheckResults checkResults}) {
   String testFileName =
       relativize(Uri.base, Platform.script, Platform.isWindows);
@@ -159,6 +160,7 @@
   var options = <String>[Flags.analyzeOnly, '--categories=Client,Server',
       Flags.showPackageWarnings];
   if (analyzeAll) options.add(Flags.analyzeAll);
+  if (analyzeMain) options.add(Flags.analyzeMain);
   var compiler = new Compiler(
       provider,
       null,
@@ -189,7 +191,7 @@
       exit(1);
     }
   }
-  if (analyzeAll) {
+  if (analyzeAll || analyzeMain) {
     compiler.librariesToAnalyzeWhenRun = uriList;
     return compiler.run(null).then(onCompletion);
   } else {
diff --git a/tests/compiler/dart2js/categories_test.dart b/tests/compiler/dart2js/categories_test.dart
new file mode 100644
index 0000000..3b22453
--- /dev/null
+++ b/tests/compiler/dart2js/categories_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+import 'package:async_helper/async_helper.dart';
+
+import "memory_compiler.dart";
+
+runTest(String source, String categories, int expectedErrors) async {
+  var collector = new DiagnosticCollector();
+  await runCompiler(
+      memorySourceFiles: {"main.dart": source},
+      options: ["--categories=$categories"],
+      diagnosticHandler: collector);
+  Expect.equals(expectedErrors, collector.errors.length);
+  Expect.equals(0, collector.warnings.length);
+}
+
+void main() {
+  asyncTest(() async {
+    await runTest("import 'dart:async'; main() {}", "Embedded", 1);
+    await runTest("import 'dart:async'; main() {}", "Client", 0);
+    await runTest("import 'dart:async'; main() {}", "Server", 0);
+    await runTest("import 'dart:html'; main() {}", "Embedded", 1);
+    await runTest("import 'dart:html'; main() {}", "Client", 0);
+    await runTest("import 'dart:html'; main() {}", "Server", 1);
+    await runTest("import 'dart:io'; main() {}", "Embedded", 1);
+    await runTest("import 'dart:io'; main() {}", "Client", 1);
+    await runTest("import 'dart:io'; main() {}", "Server", 0);
+    await runTest("import 'dart:_internal'; main() {}", "Embedded", 2);
+    await runTest("import 'dart:_internal'; main() {}", "Client", 2);
+    await runTest("import 'dart:_internal'; main() {}", "Server", 2);
+  });
+}
diff --git a/tests/compiler/dart2js/deferred_not_in_main_test.dart b/tests/compiler/dart2js/deferred_not_in_main_test.dart
index 80f2a23..2955879 100644
--- a/tests/compiler/dart2js/deferred_not_in_main_test.dart
+++ b/tests/compiler/dart2js/deferred_not_in_main_test.dart
@@ -12,9 +12,14 @@
 import 'memory_compiler.dart';
 
 void main() {
+  deferredTest1();
+  deferredTest2();
+}
+
+void deferredTest1() {
   asyncTest(() async {
     CompilationResult result =
-        await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
+        await runCompiler(memorySourceFiles: TEST1);
     Compiler compiler = result.compiler;
 
     lookupLibrary(name) {
@@ -26,7 +31,6 @@
 
     var mainOutputUnit = compiler.deferredLoadTask.mainOutputUnit;
     var backend = compiler.backend;
-    var classes = backend.emitter.neededClasses;
     var lib1 = lookupLibrary("memory:lib1.dart");
     var lib2 = lookupLibrary("memory:lib2.dart");
     var foo1 = lib1.find("foo1");
@@ -36,9 +40,29 @@
   });
 }
 
+void deferredTest2() {
+  asyncTest(() async {
+    CompilationResult result = await runCompiler(memorySourceFiles: TEST2);
+    Compiler compiler = result.compiler;
+
+    lookupLibrary(name) {
+      return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
+    }
+
+    var main = compiler.mainFunction;
+    var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
+
+    var mainOutputUnit = compiler.deferredLoadTask.mainOutputUnit;
+    var shared = lookupLibrary("memory:shared.dart");
+    var a = shared.find("A");
+
+    Expect.equals(mainOutputUnit, outputUnitForElement(a));
+  });
+}
+
 // lib1 imports lib2 deferred. But mainlib never uses DeferredLibrary.
 // Test that this case works.
-const Map MEMORY_SOURCE_FILES = const {
+const Map TEST1 = const {
   "main.dart":"""
 library mainlib;
 
@@ -65,3 +89,31 @@
 void foo2() {}
 """,
 };
+
+// main indirectly uses class A from shared. A should still be included in the
+// main fragment.
+const Map TEST2 = const {
+  "main.dart":"""
+import 'def.dart' deferred as def;
+import 'shared.dart';
+
+typedef void F(x);
+
+main() {
+  print(foo is F);
+  def.loadLibrary().then((_) {
+    def.toto();
+  });
+}
+""",
+  "def.dart":"""
+import 'shared.dart';
+
+toto() { print(new A()); }
+""",
+  "shared.dart":"""
+class A {}
+class B extends A {}
+foo(B b) => null;
+""",
+};
diff --git a/tests/compiler/dart2js/embedded_category_api_boundary_test.dart b/tests/compiler/dart2js/embedded_category_api_boundary_test.dart
new file mode 100644
index 0000000..cbd973e
--- /dev/null
+++ b/tests/compiler/dart2js/embedded_category_api_boundary_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+/// Tests that analyzing everything from the libraries that are public from the
+/// embedded category does not cause elements from other libraries to be
+/// processed.
+library embedded_category_boundary_test;
+
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:sdk_library_metadata/libraries.dart';
+
+import 'analyze_helper.dart';
+
+main() async {
+  List<Uri> uriList = new List<Uri>();
+  libraries.forEach((String name, LibraryInfo info) {
+    if (info.categories.contains(Category.embedded)) {
+      uriList.add(new Uri(scheme: 'dart', path: name));
+    }
+  });
+  asyncTest(() async {
+    analyze(uriList, {},
+        checkResults: checkResults, analyzeMain: true, analyzeAll: false);
+  });
+}
+
+/// These elements are currently escaping from dart:async via
+/// `core._Resource#_readAsStream`.
+Set<String> whiteList = new Set.from([
+  "function(StreamController#addError)",
+  "getter(StreamController#stream)",
+  "setter(StreamController#onListen)"
+]);
+
+bool checkResults(Compiler compiler, CollectingDiagnosticHandler handler) {
+  return compiler.enqueuer.resolution.processedElements
+      .every((Element element) {
+    if (whiteList.contains("$element")) return true;
+    LibraryInfo info = libraries[element.library.canonicalUri.path];
+    bool isAllowedInEmbedded =
+        info.isInternal || info.categories.contains(Category.embedded);
+    return isAllowedInEmbedded;
+  });
+}
diff --git a/tests/compiler/dart2js/js_backend_cps_ir.dart b/tests/compiler/dart2js/js_backend_cps_ir.dart
index c2b0595..95852f1 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir.dart
@@ -7,11 +7,13 @@
 
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import 'package:compiler/src/apiimpl.dart'
-       show Compiler;
+import 'package:compiler/src/apiimpl.dart' show
+    Compiler;
 import 'memory_compiler.dart';
 import 'package:compiler/src/js/js.dart' as js;
-import 'package:compiler/src/common.dart' show Element, ClassElement;
+import 'package:compiler/src/elements/elements.dart' show
+    ClassElement,
+    Element;
 
 const String TEST_MAIN_FILE = 'test.dart';
 
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
index d3340b4..2365d4f 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
@@ -155,11 +155,7 @@
   }
 }""",r"""
 function() {
-  var xs = ["x", "y", "z"], ys = ["A", "B", "C"], $length = xs.length, length1 = ys.length, i, i1, current, current1;
-  if ($length !== xs.length)
-    H.throwConcurrentModificationError(xs);
-  i = 0;
-  i1 = 0;
+  var xs = ["x", "y", "z"], ys = ["A", "B", "C"], $length = xs.length, length1 = ys.length, i = 0, i1 = 0, current, current1;
   for (; i < xs.length; i = i + 1, i1 = i1 + 1) {
     current = xs[i];
     if (length1 !== ys.length)
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
index cafe812..947d919 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
@@ -35,11 +35,9 @@
 function() {
   var l = ["hest", ["h", "e", "s", "t"]], i = 0, x_, x, j;
   for (P.print(l.length); i < l.length; i = i + 1) {
-    if (i < 0 || i >= l.length)
-      H.ioore(l, i);
     x_ = J.getInterceptor$as(x = l[i]);
     for (j = 0; j < x_.get$length(x); j = j + 1) {
-      if (j < 0 || j >= x.length)
+      if (j >= x.length)
         H.ioore(x, j);
       P.print(x[j]);
     }
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
index 877b371..a6d7a1c 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
@@ -84,10 +84,8 @@
   print(list);
 }""", r"""
 function() {
-  var list = [1, 2, 3], v0 = 1;
-  if (v0 < 0 || v0 >= list.length)
-    H.ioore(list, v0);
-  list[v0] = 6;
+  var list = [1, 2, 3];
+  list[1] = 6;
   P.print(list);
 }"""),
 ];
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
index 5a2a9e1..bbfbdd6 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
@@ -14,7 +14,7 @@
 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart' as ir;
 import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart' as ir;
 import 'package:compiler/src/js/js.dart' as js;
-import 'package:compiler/src/common.dart' show Element, ClassElement;
+import 'package:compiler/src/elements/elements.dart';
 
 const String TEST_MAIN_FILE = 'test.dart';
 
@@ -123,7 +123,7 @@
   }
 }
 
-class IrSourceInformationVisitor extends ir.RecursiveVisitor {
+class IrSourceInformationVisitor extends ir.TrampolineRecursiveVisitor {
   List<String> sourceInformation = <String>[];
 
   @override
diff --git a/tests/compiler/dart2js/least_upper_bound_test.dart b/tests/compiler/dart2js/least_upper_bound_test.dart
index 9d7af4d..c4706bf 100644
--- a/tests/compiler/dart2js/least_upper_bound_test.dart
+++ b/tests/compiler/dart2js/least_upper_bound_test.dart
@@ -381,12 +381,12 @@
     checkLub(DartType a, DartType b, DartType expectedLub) {
       DartType lub = env.computeLeastUpperBound(a, b);
       if (a != b) {
-        expectedLub = expectedLub.unalias(env.compiler.resolution);
-        lub = lub.unalias(env.compiler.resolution);
+        expectedLub = expectedLub.unaliased;
+        lub = lub.unaliased;
       }
       Expect.equals(expectedLub, lub,
-          'Unexpected lub(${a.unalias(env.compiler.resolution)},'
-                         '${b.unalias(env.compiler.resolution)}) = '
+          'Unexpected lub(${a.unaliased},'
+                         '${b.unaliased} = '
                          '${lub}, expected ${expectedLub}');
     }
 
diff --git a/tests/compiler/dart2js/library_resolution_test.dart b/tests/compiler/dart2js/library_resolution_test.dart
index 5841727..3d6c035 100644
--- a/tests/compiler/dart2js/library_resolution_test.dart
+++ b/tests/compiler/dart2js/library_resolution_test.dart
@@ -37,13 +37,13 @@
 
 const LibraryInfo mock1LibraryInfo = const LibraryInfo(
     "mock1.dart",
-    category: "Shared",
+    categories: "Client,Embedded",
     documented: false,
     platforms: DART2JS_PLATFORM);
 
 const LibraryInfo mock2LibraryInfo = const LibraryInfo(
     "mock2.dart",
-    category: "Shared",
+    categories: "Client,Embedded",
     documented: false,
     platforms: DART2JS_PLATFORM);
 
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index 906799d..be6780f 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -210,7 +210,7 @@
   if (cachedCompiler != null) {
     compiler.coreLibrary =
         cachedCompiler.libraryLoader.lookupLibrary(Uri.parse('dart:core'));
-    compiler.types = cachedCompiler.types.copy(compiler);
+    compiler.types = cachedCompiler.types.copy(compiler.resolution);
     Map copiedLibraries = {};
     cachedCompiler.libraryLoader.libraries.forEach((library) {
       if (library.isPlatformLibrary) {
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 5c33011..7456c29 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -220,9 +220,10 @@
       if (diagnosticHandler != null) {
         SourceSpan span = message.sourceSpan;
         if (span != null) {
-          diagnosticHandler(span.uri, span.begin, span.end, '$message', kind);
+          diagnosticHandler(
+              span.uri, span.begin, span.end, '${message.message}', kind);
         } else {
-          diagnosticHandler(null, null, null, '$message', kind);
+          diagnosticHandler(null, null, null, '${message.message}', kind);
         }
       }
     }
diff --git a/tests/compiler/dart2js/mock_libraries.dart b/tests/compiler/dart2js/mock_libraries.dart
index 95bb3fb..37135b2 100644
--- a/tests/compiler/dart2js/mock_libraries.dart
+++ b/tests/compiler/dart2js/mock_libraries.dart
@@ -381,8 +381,10 @@
   'JSUInt31': 'class JSUInt31 extends JSUInt32 {}',
   'JSUInt32': 'class JSUInt32 extends JSPositiveInt {}',
   'ObjectInterceptor': 'class ObjectInterceptor {}',
+  'JavaScriptObject': 'class JavaScriptObject {}',
   'PlainJavaScriptObject': 'class PlainJavaScriptObject {}',
   'UnknownJavaScriptObject': 'class UnknownJavaScriptObject {}',
+  'JavaScriptFunction': 'class JavaScriptFunction {}',
 };
 
 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY =
diff --git a/tests/compiler/dart2js/octagon_test.dart b/tests/compiler/dart2js/octagon_test.dart
new file mode 100644
index 0000000..2644c0e
--- /dev/null
+++ b/tests/compiler/dart2js/octagon_test.dart
@@ -0,0 +1,264 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:compiler/src/cps_ir/octagon.dart';
+import 'package:expect/expect.dart';
+
+Octagon octagon;
+SignedVariable v1, v2, v3, v4;
+
+setup() {
+  octagon = new Octagon();
+  v1 = octagon.makeVariable();
+  v2 = octagon.makeVariable();
+  v3 = octagon.makeVariable();
+  v4 = octagon.makeVariable();
+}
+
+Constraint pushConstraint(SignedVariable w1, SignedVariable w2, int k) {
+  Constraint c = new Constraint(w1, w2, k);
+  octagon.pushConstraint(c);
+  return c;
+}
+
+void popConstraint(Constraint c) {
+  octagon.popConstraint(c);
+}
+
+negative_loop1() {
+  setup();
+  // Create the contradictory constraint:
+  //  v1 <= v2 <= v1 - 1 (loop weight = -1)
+  //
+  // As difference bounds:
+  //  v1 - v2 <= 0
+  //  v2 - v1 <= -1
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2: should be solvable');
+  var c = pushConstraint(v2, v1.negated, -1);
+  Expect.isTrue(octagon.isUnsolvable, 'v2 <= v1 - 1: should become unsolvable');
+
+  // Check that pop restores solvability.
+  popConstraint(c);
+  Expect.isTrue(octagon.isSolvable, 'Should be solvable without v2 <= v1 - 1');
+}
+
+negative_loop2() {
+  setup();
+  // Create a longer contradiction, and add the middle constraint last:
+  //  v1 <= v2 <= v3 <= v1 - 1
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2: should be solvable');
+  pushConstraint(v3, v1.negated, -1);
+  Expect.isTrue(octagon.isSolvable, 'v3 <= v1 - 1: should be solvable');
+  var c = pushConstraint(v2, v3.negated, 0);
+  Expect.isTrue(octagon.isUnsolvable, 'v2 <= v3: should become unsolvable');
+
+  // Check that pop restores solvability.
+  popConstraint(c);
+  Expect.isTrue(octagon.isSolvable, 'Should be solvable without v2 <= v3');
+}
+
+negative_loop3() {
+  setup();
+  // Add a circular constraint with offsets and negative weight:
+  //   v1 <= v2 - 1 <= v3 + 2 <= v1 - 1
+  // As difference bounds:
+  //   v1 - v2 <= -1
+  //   v2 - v3 <=  3
+  //   v3 - v1 <= -3
+  pushConstraint(v1, v2.negated, -1);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2 - 1: should be solvable');
+  pushConstraint(v2, v3.negated, 3);
+  Expect.isTrue(octagon.isSolvable, 'v2 - 1 <= v3 + 2: should be solvable');
+  var c = pushConstraint(v3, v1.negated, -3);
+  Expect.isTrue(octagon.isUnsolvable, 'v3 + 2 <= v1 - 1: should become unsolvable');
+
+  // Check that pop restores solvability.
+  popConstraint(c);
+  Expect.isTrue(octagon.isSolvable, 'Should be solvable without v3 + 2 <= v1 - 1');
+}
+
+zero_loop1() {
+  setup();
+  // Add the circular constraint with zero weight:
+  //   v1 <= v2 <= v3 <= v1
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2: should be solvable');
+  pushConstraint(v2, v3.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v2 <= v3: should be solvable');
+  pushConstraint(v3, v1.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v3 <= v1: should be solvable');
+}
+
+zero_loop2() {
+  setup();
+  // Add a circular constraint with offsets:
+  //   v1 <= v2 - 1 <= v3 + 2 <= v1
+  // As difference bounds:
+  //   v1 - v2 <= -1
+  //   v2 - v3 <=  3
+  //   v3 - v1 <= -2
+  pushConstraint(v1, v2.negated, -1);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2 - 1: should be solvable');
+  pushConstraint(v2, v3.negated, 3);
+  Expect.isTrue(octagon.isSolvable, 'v2 - 1 <= v3 + 2: should be solvable');
+  pushConstraint(v3, v1.negated, -2);
+  Expect.isTrue(octagon.isSolvable, 'v3 + 2 <= v1: should be solvable');
+}
+
+positive_loop1() {
+  setup();
+  // Add constraints with some slack (positive-weight loop):
+  //   v1 <= v2 <= v3 <= v1 + 1
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2: should be solvable');
+  pushConstraint(v2, v3.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'v2 <= v3: should be solvable');
+  pushConstraint(v3, v1.negated, 1);
+  Expect.isTrue(octagon.isSolvable, 'v3 <= v1 + 1: should be solvable');
+}
+
+positive_loop2() {
+  setup();
+  // Add constraints with offsets and slack at the end:
+  //   v1 <= v2 - 1 <= v3 + 2 <= v1 + 1
+  // As difference bounds:
+  //   v1 - v2 <= -1
+  //   v2 - v3 <=  3
+  //   v3 - v1 <= -1
+  pushConstraint(v1, v2.negated, -1);
+  Expect.isTrue(octagon.isSolvable, 'v1 <= v2 - 1: should be solvable');
+  pushConstraint(v2, v3.negated, 3);
+  Expect.isTrue(octagon.isSolvable, 'v2 - 1 <= v3 + 2: should be solvable');
+  pushConstraint(v3, v1.negated, -1);
+  Expect.isTrue(octagon.isSolvable, 'v3 + 2 <= v1: should be solvable');
+}
+
+positive_and_negative_loops1() {
+  setup();
+  //  v1 <= v2 <= v3 <= v1 + 1
+  //  v2 <= v3 - 2  (unsolvable: v3 - 2 <= (v1 + 1) - 2 = v1 - 1)
+  pushConstraint(v1, v2.negated, 0);
+  pushConstraint(v2, v3.negated, 0);
+  pushConstraint(v3, v1.negated, 1);
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  pushConstraint(v2, v3.negated, -2);
+  Expect.isTrue(octagon.isUnsolvable, 'v2 <= v3 - 2: should become unsolvable');
+}
+
+positive_and_negative_loops2() {
+  setup();
+  // Same as above, but constraints are added in a different order.
+  pushConstraint(v2, v3.negated, -2);
+  pushConstraint(v2, v3.negated, 0);
+  pushConstraint(v3, v1.negated, 1);
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isUnsolvable, 'v1 <= v2: should become unsolvable');
+}
+
+positive_and_negative_loops3() {
+  setup();
+  // Same as above, but constraints are added in a different order.
+  pushConstraint(v2, v3.negated, 0);
+  pushConstraint(v2, v3.negated, -2);
+  pushConstraint(v3, v1.negated, 1);
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isUnsolvable, 'v1 <= v2: should become unsolvable');
+}
+
+plus_minus1() {
+  setup();
+  // Given:
+  //   v1 = v2 + 1    (modeled as: v1 <= v2 + 1 <= v1)
+  //   v3 = v4 + 1
+  //   v1 <= v3
+  // prove:
+  //   v2 <= v4
+  pushConstraint(v1, v2.negated,  1); // v1 <= v2 + 1
+  pushConstraint(v2, v1.negated, -1); // v2 <= v1 - 1
+  pushConstraint(v3, v4.negated,  1); // v3 <= v4 + 1
+  pushConstraint(v4, v3.negated, -1); // v4 <= v3 - 1
+  pushConstraint(v1, v3.negated,  0); // v1 <= v3
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  // Push the negated constraint: v2 > v4 <=> v4 - v2 <= -1
+  pushConstraint(v4, v2.negated, -1);
+  Expect.isTrue(octagon.isUnsolvable, 'should be unsolvable');
+}
+
+constant1() {
+  setup();
+  // Given:
+  //   v1 = 10
+  //   v2 <= v3
+  //   v3 + v1 <= 3   (i.e. v2 <= v3 <= -v1 + 3 = 7)
+  // prove:
+  //   v2 <= 7  (modeled as: v2 + v2 <= 14)
+  pushConstraint(v1, v1, 20); // v1 + v1 <= 20
+  pushConstraint(v1.negated, v1.negated, -20); // -v1 - v1 <= -20
+  pushConstraint(v2, v3.negated, 0); // v2 <= v3
+  pushConstraint(v3, v1,  3); // v3 + v1 <= 3
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  // Push the negated constraint: v2 + v2 > 14 <=> -v2 - v2 <= -15
+  var c = pushConstraint(v2.negated, v2.negated, -15);
+  Expect.isTrue(octagon.isUnsolvable, 'should be unsolvable');
+  popConstraint(c);
+  // Push the thing we are trying to prove.
+  pushConstraint(v2, v2, 14);
+  Expect.isTrue(octagon.isSolvable, 'v2 + v2 <= 14: should be solvable');
+}
+
+contradict1() {
+  setup();
+  // v1 < v1  (v1 - v1 <= -1)
+  pushConstraint(v1, v1.negated, -1);
+  Expect.isTrue(octagon.isUnsolvable, 'v1 < v1: should be unsolvable');
+}
+
+contradict2() {
+  setup();
+  // v1 = 2
+  // v2 = 0
+  // v1 <= v2
+  pushConstraint(v1, v1, 2);
+  pushConstraint(v1.negated, v1.negated, -2);
+  pushConstraint(v2, v2, 0);
+  pushConstraint(v2.negated, v2.negated, 0);
+  Expect.isTrue(octagon.isSolvable, 'should be solvable');
+  pushConstraint(v1, v2.negated, 0);
+  Expect.isTrue(octagon.isUnsolvable, 'v1 <= v2: should be unsolvable');
+}
+
+lower_bounds_check() {
+  SignedVariable w = octagon.makeVariable(0, 1000);
+  pushConstraint(w, w, -1);
+  Expect.isTrue(octagon.isUnsolvable, 'Value in range 0..1000 is not <= -1');
+}
+
+upper_bounds_check() {
+  SignedVariable w = octagon.makeVariable(0, 1000);
+  pushConstraint(w.negated, w.negated, -5000);
+  Expect.isTrue(octagon.isUnsolvable, 'Value in range 0..1000 is not >= 5000');
+}
+
+void main() {
+  negative_loop1();
+  negative_loop2();
+  negative_loop3();
+  zero_loop1();
+  zero_loop2();
+  positive_loop1();
+  positive_loop2();
+  positive_and_negative_loops1();
+  positive_and_negative_loops2();
+  positive_and_negative_loops3();
+  plus_minus1();
+  constant1();
+  contradict1();
+  contradict2();
+  lower_bounds_check();
+  upper_bounds_check();
+}
diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index 1422a1a..660a803 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -953,7 +953,9 @@
     """;
   String patch = """
     @patch class B {
+      @patch
       B.patchTarget() : super();
+      @patch
       factory B.reflectBack() = B.originTarget;
     }
     """;
@@ -1025,7 +1027,7 @@
 
     await testPatchAndSelector();
 
-    await testEffectiveTarget(); /// bug: ok
+    await testEffectiveTarget();
 
     await testAnalyzeAllInjectedMembers();
     await testTypecheckPatchedMembers();
diff --git a/tests/compiler/dart2js/related_types.dart b/tests/compiler/dart2js/related_types.dart
index 6e3f8b2..d4d26d2 100644
--- a/tests/compiler/dart2js/related_types.dart
+++ b/tests/compiler/dart2js/related_types.dart
@@ -153,7 +153,7 @@
   /// Return the interface type implemented by [type] or `null` if no interface
   /// type is implied by [type].
   InterfaceType findInterfaceType(DartType type) {
-    return Types.computeInterfaceType(compiler, type);
+    return Types.computeInterfaceType(compiler.resolution, type);
   }
 
   /// Returns the supertype of [receiver] that implements [cls], if any.
diff --git a/tests/compiler/dart2js/type_order_test.dart b/tests/compiler/dart2js/type_order_test.dart
index 5cc9178..dff24fc 100644
--- a/tests/compiler/dart2js/type_order_test.dart
+++ b/tests/compiler/dart2js/type_order_test.dart
@@ -50,9 +50,9 @@
     TypeVariableType BS = add(B_this.typeArguments[1]);
     FunctionType B_this_alias = add(B.alias);
     TypedefType B_X_Y = add(instantiate(B, [X, Y]));
-    FunctionType B_X_Y_alias = add(B_X_Y.unalias(env.compiler.resolution));
+    FunctionType B_X_Y_alias = add(B_X_Y.unaliased);
     TypedefType B_Y_X = add(instantiate(B, [Y, X]));
-    FunctionType B_Y_X_alias = add(B_Y_X.unalias(env.compiler.resolution));
+    FunctionType B_Y_X_alias = add(B_Y_X.unaliased);
 
     InterfaceType C_this = add(C.thisType);
     InterfaceType C_raw = add(C.rawType);
diff --git a/tests/compiler/dart2js/type_substitution_test.dart b/tests/compiler/dart2js/type_substitution_test.dart
index 91c8718..c8040e5 100644
--- a/tests/compiler/dart2js/type_substitution_test.dart
+++ b/tests/compiler/dart2js/type_substitution_test.dart
@@ -211,7 +211,7 @@
     Expect.isNotNull(Typedef2_int_String);
     DartType Function_int_String = getType(compiler, "Function2b");
     Expect.isNotNull(Function_int_String);
-    DartType unalias1 = Typedef2_int_String.unalias(compiler.resolution);
+    DartType unalias1 = Typedef2_int_String.unaliased;
     Expect.equals(Function_int_String, unalias1,
         '$Typedef2_int_String.unalias=$unalias1 != $Function_int_String');
 
@@ -219,7 +219,7 @@
     Expect.isNotNull(Typedef1);
     DartType Function_dynamic_dynamic = getType(compiler, "Function1c");
     Expect.isNotNull(Function_dynamic_dynamic);
-    DartType unalias2 = Typedef1.unalias(compiler.resolution);
+    DartType unalias2 = Typedef1.unaliased;
     Expect.equals(Function_dynamic_dynamic, unalias2,
         '$Typedef1.unalias=$unalias2 != $Function_dynamic_dynamic');
   }));
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index a257c10..9bda275 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -231,6 +231,7 @@
 map_values3_test: RuntimeError # Please triage this failure.
 map_values4_test: RuntimeError # Please triage this failure.
 package_resource_test: Crash # (await for(var byteSlice in resource.openRead()){streamBytes.addAll(byteSlice);}): await for
+regexp/pcre_test: Crash # Stack Overflow in LoopHierarchy.
 symbol_operator_test/03: RuntimeError # Please triage this failure.
 symbol_reserved_word_test/03: Pass # Please triage this failure.
 symbol_reserved_word_test/06: RuntimeError # Please triage this failure.
diff --git a/tests/html/custom/entered_left_view_test.dart b/tests/html/custom/entered_left_view_test.dart
index a2804bc..d04c74f 100644
--- a/tests/html/custom/entered_left_view_test.dart
+++ b/tests/html/custom/entered_left_view_test.dart
@@ -126,7 +126,7 @@
 
 
   // TODO(jmesserly): remove after deprecation period.
-  group('standard_events -- old callback names', () {
+  group('standard_events_old_callback_names', () {
     var a;
     setUp(() {
       invocations = [];
diff --git a/tests/html/html.status b/tests/html/html.status
index 557a657..0741675 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -6,36 +6,27 @@
 dromaeo_smoke_test: Skip # Issue 14521, 8257
 cross_frame_test: Skip # Test reloads itself. Issue 18558
 
-js_array_test: Skip # Issue 23676, 23677
-js_typed_interop_test: Skip # Issue 23676, 23677
-
 [ $compiler == none && ($runtime == dartium || $runtime == drt) ]
+
+js_array_test: Skip # Dartium JSInterop failure
+js_typed_interop_test: Skip # Dartium JSInterop failure
+mirrors_js_typed_interop_test: Skip # Dartium JSInterop failure
+
 cross_domain_iframe_test: RuntimeError # Dartium JSInterop failure
-crypto_test/functional: RuntimeError # Dartium JSInterop failure
-custom/document_register_basic_test: RuntimeError # Dartium JSInterop failure
-custom/document_register_type_extensions_test/construction: RuntimeError # Issue 24516
-custom/document_register_type_extensions_test/parsing: RuntimeError # Issue 24516
 custom/document_register_type_extensions_test/registration: RuntimeError # Dartium JSInterop failure
 custom/element_upgrade_test: RuntimeError # Dartium JSInterop failure
-custom/js_custom_test: RuntimeError # Dartium JSInterop failure
-custom_elements_test/register: RuntimeError # Dartium JSInterop failure
-indexeddb_2_test: Skip # 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
-speechrecognition_test/types: RuntimeError # Dartium JSInterop failure
-storage_quota_test/missingenumcheck: RuntimeError # Dartium JSInterop failure
-storage_quota_test/none: RuntimeError # Dartium JSInterop failure
 transferables_test: RuntimeError # Dartium JSInterop failure
 
-[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
-form_data_test/functional: Skip # Issue 19726
-indexeddb_1_test/functional: Skip # Issue 19512 (timing out)
-indexeddb_4_test: Skip # Issue 19726
+[ $compiler == none && ($runtime == drt || $runtime == dartium ) ]
 worker_api_test: Fail # Issue 10223
 resource_http_test: Fail # Issue 24203
+js_dart_to_string_test: RuntimeError # 24584
 
-[ $compiler == none && $mode == debug && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
+[ $compiler == none && $mode == debug && ($runtime == drt || $runtime == dartium ) ]
 datalistelement_test: Skip # Issue 20540
 
 [ $compiler == dart2js ]
@@ -49,7 +40,6 @@
 [ $compiler == dart2js && $browser ]
 custom/created_callback_test: Fail # Support for created constructor. Issue 14835
 fontface_loaded_test: Fail # Support for promises.
-storage_quota_test: Fail # Support for promises. API also not yet available anywhere.
 
 [ $compiler == dart2js && ($runtime == safari || $runtime == safarimobilesim || $runtime == ff  || $ie) ]
 custom/entered_left_view_test/viewless_document: Fail # Polyfill does not handle this
@@ -60,24 +50,22 @@
 [ $compiler == none && $runtime == dartium && $system == macos]
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Pass,Fail # Issue 11834
 
-[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
+[ $compiler == none && ($runtime == drt || $runtime == dartium ) ]
 # postMessage in dartium always transfers the typed array buffer, never a view
 postmessage_structured_test/typed_arrays: Fail
 # Dartium seems to lose the data from the dispatchEvent.
 async_test: Fail # Uses spawn, not implemented from a DOM isolate in Dartium
 keyboard_event_test: Fail # Issue 13902
 isolates_test: Fail # Issue 13921
-indexeddb_3_test: Skip # Issue 19578.  Timeouts and RuntimeError
 fileapi_test/getFile: Pass, Fail # Issue 20488
 
-[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) && $mode == debug ]
+[ $compiler == none && ($runtime == drt || $runtime == dartium ) && $mode == debug ]
 websocket_test/websocket: Skip # Issue 17666
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Skip # Issue 17666
 
 element_offset_test/offset: RuntimeError # Issue 17550
 request_animation_frame_test: Skip # Times out, and also passes while taking 4.00 minutes. Issue 19127.
 fileapi_test/fileEntry: Pass, RuntimeError # Issue 20488
-indexeddb_5_test: Pass, RuntimeError # Issue 21262
 native_gc_test: Pass, Slow
 
 [ $compiler == none && $runtime == drt && $system == windows ]
@@ -128,7 +116,7 @@
 [$runtime == drt || $runtime == dartium || $runtime == chrome || $runtime == chromeOnAndroid || $runtime == ContentShellOnAndroid ]
 webgl_1_test: Pass, Fail # Issue 8219
 
-[ $compiler == none && ($runtime == drt || $runtime == dartium) && $system == windows]
+[ $compiler == none && ($runtime == drt || $runtime == dartium) && $system == windows ]
 websql_test: Skip # Issue 4941: stderr contains a backtrace.
 
 [ $compiler == none && ($runtime == drt || $runtime == dartium) && $mode == debug]
@@ -392,10 +380,14 @@
 
 [ $compiler == dart2js && $csp && ($runtime == drt || $runtime == safari || $runtime == ff || $runtime == chrome || $runtime == chromeOnAndroid) ]
 # Note: these tests are all injecting scripts by design.  This is not allowed under CSP.
-event_customevent_test: Fail       # Test cannot run under CSP restrictions.
-js_interop_1_test: Skip            # Test cannot run under CSP restrictions (times out).
-js_test: Skip                      # Test cannot run under CSP restrictions (times out).
-postmessage_structured_test: Skip  # Test cannot run under CSP restrictions (times out).
+event_customevent_test: Fail        # Test cannot run under CSP restrictions.
+js_interop_1_test: Skip             # Test cannot run under CSP restrictions (times out).
+js_test: Skip                       # Test cannot run under CSP restrictions (times out).
+js_array_test: Skip                 # Test cannot run under CSP restrictions.
+js_typed_interop_test: Skip         # Test cannot run under CSP restrictions.
+js_dart_to_string_test: Skip        # Test cannot run under CSP restrictions.
+mirrors_js_typed_interop_test: Skip # Test cannot run under CSP restrictions.
+postmessage_structured_test: Skip   # Test cannot run under CSP restrictions (times out).
 
 [ $compiler == dart2js &&  $runtime == chrome]
 svgelement_test/supported_altGlyph: RuntimeError # Issue 23144
diff --git a/tests/html/js_array_test.dart b/tests/html/js_array_test.dart
index 4ede8ed..58d42db 100644
--- a/tests/html/js_array_test.dart
+++ b/tests/html/js_array_test.dart
@@ -2,165 +2,180 @@
 // for 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 jsArrayTest;
+@Js("ArrayTest.Util")
+library js_array_test;
 
 import 'dart:html';
-import 'dart:js';
 
+import 'dart:js' as js;
+import 'package:js/js.dart';
 import 'package:unittest/unittest.dart';
 import 'package:unittest/html_config.dart';
+import 'json_helper.dart' as json_helper;
 
 _injectJs() {
   document.body.append(new ScriptElement()
     ..type = 'text/javascript'
     ..innerHtml = r"""
-function callJsMethod(jsObj, jsMethodName, args) {
-  return jsObj[jsMethodName].apply(jsObj, args);
-}
+ArrayTest = {};
+ArrayTest.Util = {
+  callJsMethod: function(jsObj, jsMethodName, args) {
+    return jsObj[jsMethodName].apply(jsObj, args);
+  },
 
-function jsEnumerateIndices(obj) {
-  var ret = [];
-  for(var i in obj) {
-    ret.push(i);
-  }
-  return ret;
-}
-
-function setValue(obj, index, value) {
-  return obj[index] = value;
-}
-
-function getValue(obj, index) {
-  return obj[index];
-}
-
-function checkIsArray(obj) {
-  return Array.isArray(obj);
-}
-
-function concatValues(obj) {
-  return obj.concat("a", "b", ["c", "d"], 42, {foo: 10});
-}
-
-function concatOntoArray(obj) {
-  return [1,2,3].concat(obj, "foo");
-}
-
-function repeatedConcatOntoArray(obj) {
-  return [1,2,3].concat(obj, obj);
-}
-
-function everyGreaterThanZero(obj) {
-  return obj.every(function(currentValue, index, array) {
-    return currentValue > 0;
-  });
-}
-
-function everyGreaterThanZeroCheckThisArg(obj) {
-  var j = 0;
-  return obj.every(function(currentValue, index, array) {
-    if (j != index) {
-      throw "Unxpected index";
+  jsEnumerateIndices: function(obj) {
+    var ret = [];
+    for(var i in obj) {
+      ret.push(i);
     }
-    j++;
-    if (array !== obj) {
-      throw "Array argument doesn't match obj";
-    }
-    return currentValue > 0;
-  });
-}
+    return ret;
+  },
 
-function filterGreater42(obj) {
-  return obj.filter(function(currentValue, index, array) {
-    return currentValue > 42;
-  });
-}
+  checkIsArray: function(obj) {
+    return Array.isArray(obj);
+  },
 
-function forEachCollectResult(array, callback) {
-  var result = [];
-  array.forEach(function(currentValue) {
-    result.push(currentValue * 2);
-  });
-  return result;
-}
+  concatValues: function(obj) {
+    return obj.concat("a", "b", ["c", "d"], 42, {foo: 10});
+  },
 
-function someEqual42(array, callback) {
-  return array.some(function(currentValue) {
-    return currentValue == 42;
-  });
-}
+  concatOntoArray: function(obj) {
+    return [1,2,3].concat(obj, "foo");
+  },
 
-function sortNumbersBackwards(array) {
-  return array.sort(function(a, b) {
-    return b - a;
-  });
-}
+  repeatedConcatOntoArray: function(obj) {
+    return [1,2,3].concat(obj, obj);
+  },
 
-function spliceDummyItems(array) {
-  return array.splice(1, 2, "quick" ,"brown", "fox");
-}
+  everyGreaterThanZero: function(obj) {
+    return obj.every(function(currentValue, index, array) {
+      return currentValue > 0;
+    });
+  },
 
-function spliceTestStringArgs(array) {
-  return array.splice("1.2", "2.01", "quick" ,"brown", "fox");
-}
+  everyGreaterThanZeroCheckThisArg: function(obj) {
+    var j = 0;
+    return obj.every(function(currentValue, index, array) {
+      if (j != index) {
+        throw "Unxpected index";
+      }
+      j++;
+      if (array !== obj) {
+        throw "Array argument doesn't match obj";
+      }
+      return currentValue > 0;
+    });
+  },
 
-function splicePastEnd(array) {
-  return array.splice(1, 5332, "quick" ,"brown", "fox");
-}
+  filterGreater42: function(obj) {
+    return obj.filter(function(currentValue, index, array) {
+      return currentValue > 42;
+    });
+  },
 
-function callJsToString(array) {
-  return array.toString();
-}
+  forEachCollectResult: function(array) {
+    var result = [];
+    array.forEach(function(currentValue) {
+      result.push(currentValue * 2);
+    });
+    return result;
+  },
 
-function mapAddIndexToEachElement(array) {
-  return array.map(function(currentValue, index) {
-    return currentValue + index;
-  });
-}
+  someEqual42: function(array) {
+    return array.some(function(currentValue) {
+      return currentValue == 42;
+    });
+  },
 
-function reduceSumDoubledElements(array) {
-  return array.reduce(function(previousValue, currentValue) {
-        return previousValue + currentValue*2;
-      },
-      0);
-}
+  sortNumbersBackwards: function(array) {
+    return array.sort(function(a, b) {
+      return b - a;
+    });
+  },
 
-// TODO(jacobr): add a test that distinguishes reduce from reduceRight.
-function reduceRightSumDoubledElements(array) {
-  return array.reduceRight(function(previousValue, currentValue) {
-        return previousValue + currentValue*2;
-      },
-      0);
-}
+  spliceDummyItems: function(array) {
+    return array.splice(1, 2, "quick" ,"brown", "fox");
+  },
 
-function identical(o1, o2) {
-  return o1 === o2;
-}
+  spliceTestStringArgs: function(array) {
+    return array.splice("1.2", "2.01", "quick" ,"brown", "fox");
+  },
 
-function getOwnPropertyDescriptorJson(array, property) {
-  return JSON.stringify(Object.getOwnPropertyDescriptor(array, property));
-}
+  splicePastEnd: function(array) {
+    return array.splice(1, 5332, "quick" ,"brown", "fox");
+  },
 
-function setLength(array, len) {
-  return array.length = len;
-}
+  callJsToString: function(array) {
+    return array.toString();
+  },
 
-function jsonStringify(o) {
-  return JSON.stringify(o);
-}
+  mapAddIndexToEachElement: function(array) {
+    return array.map(function(currentValue, index) {
+      return currentValue + index;
+    });
+  },
 
-// Calling a method from Dart List on an arbitrary target object.
-function callListMethodOnTarget(dartArray, target, methodName, args) {
-  return dartArray[methodName].apply(target, args);
-}
+  reduceSumDoubledElements: function(array) {
+    return array.reduce(function(previousValue, currentValue) {
+          return previousValue + currentValue*2;
+        },
+        0);
+  },
 
+  // TODO(jacobr): add a test that distinguishes reduce from reduceRight.
+  reduceRightSumDoubledElements: function(array) {
+    return array.reduceRight(function(previousValue, currentValue) {
+          return previousValue + currentValue*2;
+        },
+        0);
+  },
+
+  getOwnPropertyDescriptor: function(array, property) {
+    return Object.getOwnPropertyDescriptor(array, property);
+  },
+
+  setLength: function(array, len) {
+    return array.length = len;
+  },
+
+  getValue: function(obj, index) {
+    return obj[index];
+  },
+
+  setValue: function(obj, index, value) {
+    return obj[index] = value;
+  },
+
+  // Calling a method from Dart List on an arbitrary target object.
+  callListMethodOnTarget: function(dartArray, target, methodName, args) {
+    return dartArray[methodName].apply(target, args);
+  },
+
+  newArray: function() { return []; },
+
+  newLiteral: function() { return {}; },
+
+};
 """);
 }
 
+@Js()
+class PropertyDescriptor {
+  external get value;
+  external bool get writable;
+  external bool get enumerable;
+  external bool get configurable;
+}
+
+@Js()
+class SimpleJsLiteralClass {
+  external get foo;
+}
+
 class Foo {}
 
-callJsMethod(List array, String methodName, List args) =>
-    context.callMethod("callJsMethod", [array, methodName, args]);
+@Js()
+external callJsMethod(List array, String methodName, List args);
 
 callIndexOf(List array, value) => callJsMethod(array, "indexOf", [value]);
 callLastIndexOf(List array, value) =>
@@ -170,13 +185,78 @@
 callPush(List array, element) => callJsMethod(array, "push", [element]);
 callShift(List array) => callJsMethod(array, "shift", []);
 callReverse(List array) => callJsMethod(array, "reverse", []);
-callSetLength(List array, length) =>
-    context.callMethod("setLength", [array, length]);
 
-callListMethodOnObject(JsObject object, String methodName, List args) => context
-    .callMethod("callListMethodOnTarget", [[], object, methodName, args]);
+callListMethodOnObject(object, String methodName, List args) =>
+    callListMethodOnTarget([], object, methodName, args);
 
-jsonStringify(JsObject object) => context.callMethod("jsonStringify", [object]);
+@Js()
+external jsEnumerateIndices(obj);
+@Js()
+external bool checkIsArray(obj);
+@Js()
+external concatValues(obj);
+
+@Js()
+external concatOntoArray(obj);
+
+@Js()
+external repeatedConcatOntoArray(obj);
+@Js()
+external bool everyGreaterThanZero(obj);
+@Js()
+external bool everyGreaterThanZeroCheckThisArg(obj);
+
+@Js()
+external filterGreater42(obj);
+
+@Js()
+external forEachCollectResult(List array);
+@Js()
+external someEqual42(List array);
+@Js()
+external sortNumbersBackwards(List array);
+
+@Js()
+external List spliceDummyItems(List array);
+
+@Js()
+external List spliceTestStringArgs(List array);
+
+@Js()
+external List splicePastEnd(List array);
+
+@Js()
+external String callJsToString(List array);
+
+@Js()
+external mapAddIndexToEachElement(List array);
+@Js()
+external reduceSumDoubledElements(List array);
+
+// TODO(jacobr): add a test that distinguishes reduce from reduceRight.
+@Js()
+external reduceRightSumDoubledElements(List array);
+
+@Js()
+external PropertyDescriptor getOwnPropertyDescriptor(obj, property);
+
+@Js("setLength")
+external callSetLength(List array, length);
+
+@Js()
+external getValue(obj, index);
+
+@Js()
+external setValue(obj, index, value);
+
+@Js()
+external callListMethodOnTarget(List target, object, String methodName, List args);
+
+@Js()
+external newArray();
+
+@Js()
+external newLiteral();
 
 main() {
   _injectJs();
@@ -238,7 +318,7 @@
     test('default', () {
       expect(callJsMethod(list, "join", []), equals("3,42,foo"));
       expect(callJsMethod(listWithDartClasses, "join", []),
-          equals("3,Instance of 'Foo',42,foo,Instance of 'Object'"));
+          equals("3,${new Foo()},42,foo,${new Object()}"));
     });
 
     test('custom separator', () {
@@ -375,7 +455,8 @@
   group("js snippet tests", () {
     test("enumerate indices", () {
       var list = ["a", "b", "c", "d"];
-      var indices = context.callMethod('jsEnumerateIndices', [list]);
+      var indices =
+          jsEnumerateIndices(list);
       expect(indices.length, equals(4));
       for (int i = 0; i < 4; i++) {
         expect(indices[i], equals('$i'));
@@ -384,55 +465,60 @@
 
     test("set element", () {
       var list = ["a", "b", "c", "d"];
-      context.callMethod('setValue', [list, 0, 42]);
+      setValue(list, 0, 42);
       expect(list[0], equals(42));
-      context.callMethod('setValue', [list, 1, 84]);
+      setValue(list, 1, 84);
       expect(list[1], equals(84));
-      context.callMethod(
-          'setValue', [list, 6, 100]); // Off the end of the list.
+      setValue(list, 6, 100); // Off the end of the list.
       expect(list.length, equals(7));
       expect(list[4], equals(null));
       expect(list[6], equals(100));
 
       // These tests have to be commented out because we don't persist
       // JS proxies for Dart objects like we could/should.
-      // context.callMethod('setValue', [list, -1, "foo"]); // Not a valid array index
-      // expect(context.callMethod('getValue', [list, -1]), equals("foo"));
-      // expect(context.callMethod('getValue', [list, "-1"]), equals("foo"));
+      // setValue(list, -1, "foo"); // Not a valid array index
+      // expect(getValue(list, -1), equals("foo"));
+      // expect(getValue(list, "-1"), equals("foo"));
     });
 
     test("get element", () {
       var list = ["a", "b", "c", "d"];
-      expect(context.callMethod('getValue', [list, 0]), equals("a"));
-      expect(context.callMethod('getValue', [list, 1]), equals("b"));
-      expect(context.callMethod('getValue', [list, 6]), equals(null));
-      expect(context.callMethod('getValue', [list, -1]), equals(null));
+      expect(getValue(list, 0),
+          equals("a"));
+      expect(getValue(list, 1),
+          equals("b"));
+      expect(getValue(list, 6),
+          equals(null));
+      expect(getValue(list, -1),
+          equals(null));
 
-      expect(context.callMethod('getValue', [list, "0"]), equals("a"));
-      expect(context.callMethod('getValue', [list, "1"]), equals("b"));
+      expect(getValue(list, "0"),
+          equals("a"));
+      expect(getValue(list, "1"),
+          equals("b"));
     });
 
     test("is array", () {
       var list = ["a", "b"];
-      expect(context.callMethod("checkIsArray", [list]), isTrue);
+      expect(checkIsArray(list), isTrue);
     });
 
     test("property descriptors", () {
       // This test matters to make behavior consistent with JS native arrays
       // and to make devtools integration work well.
       var list = ["a", "b"];
-      expect(context.callMethod("getOwnPropertyDescriptorJson", [list, 0]),
-          equals('{"value":"a",'
-              '"writable":true,'
-              '"enumerable":true,'
-              '"configurable":true}'));
+      var descriptor = getOwnPropertyDescriptor(list, 0);
 
-      expect(
-          context.callMethod("getOwnPropertyDescriptorJson", [list, "length"]),
-          equals('{"value":2,'
-              '"writable":true,'
-              '"enumerable":false,'
-              '"configurable":false}'));
+      expect(descriptor.value, equals("a"));
+      expect(descriptor.writable, isTrue);
+      expect(descriptor.enumerable, isTrue);
+      expect(descriptor.configurable, isTrue);
+
+      descriptor = getOwnPropertyDescriptor(list, "length");
+      expect(descriptor.value, equals(2));
+      expect(descriptor.writable, isTrue);
+      expect(descriptor.enumerable, isFalse);
+      expect(descriptor.configurable, isFalse);
     });
 
     test("concat js arrays", () {
@@ -440,21 +526,22 @@
       // Tests that calling the concat method from JS will flatten out JS arrays
       // We concat the array with "a", "b", ["c", "d"], 42, {foo: 10}
       // which should generate ["1", "2", "a", "b", ["c", "d"], 42, {foo: 10}]
-      var ret = context.callMethod("concatValues", [list]);
+      var ret = concatValues(list);
       expect(list.length, equals(2));
       expect(ret.length, equals(8));
       expect(ret[0], equals("1"));
       expect(ret[3], equals("b"));
       expect(ret[5], equals("d"));
       expect(ret[6], equals(42));
-      expect(ret[7]['foo'], equals(10));
+      SimpleJsLiteralClass item = ret[7];
+      expect(item.foo, equals(10));
     });
 
     test("concat onto arrays", () {
       // This test only passes if we have monkey patched the core Array object
       // prototype to handle Dart Lists.
       var list = ["a", "b"];
-      var ret = context.callMethod("concatOntoArray", [list]);
+      var ret = concatOntoArray(list);
       expect(list.length, equals(2));
       expect(ret, equals([1, 2, 3, "a", "b", "foo"]));
     });
@@ -463,47 +550,62 @@
       // This test only passes if we have monkey patched the core Array object
       // prototype to handle Dart Lists.
       var list = ["a", "b"];
-      var ret = callJsMethod(list, "concat", [["c", "d"], "e", ["f", "g"]]);
+      var ret = callJsMethod(list, "concat", [
+        ["c", "d"],
+        "e",
+        ["f", "g"]
+      ]);
       expect(list.length, equals(2));
       expect(ret, equals(["a", "b", "c", "d", "e", "f", "g"]));
     });
 
     test("every greater than zero", () {
-      expect(context.callMethod("everyGreaterThanZero", [[1, 5]]), isTrue);
-      expect(context.callMethod("everyGreaterThanZeroCheckThisArg", [[1, 5]]),
+      expect(
+          everyGreaterThanZero([1, 5]),
           isTrue);
-      expect(context.callMethod("everyGreaterThanZero", [[1, 0]]), isFalse);
-      expect(context.callMethod("everyGreaterThanZero", [[]]), isTrue);
+      expect(
+          everyGreaterThanZeroCheckThisArg([1, 5]),
+          isTrue);
+      expect(
+          everyGreaterThanZero([1, 0]),
+          isFalse);
+      expect(everyGreaterThanZero([]),
+          isTrue);
     });
 
     test("filter greater than 42", () {
-      expect(context.callMethod("filterGreater42", [[1, 5]]), equals([]));
-      expect(context.callMethod("filterGreater42", [[43, 5, 49]]),
+      expect(filterGreater42([1, 5]), equals([]));
+      expect(
+          filterGreater42([43, 5, 49]),
           equals([43, 49]));
-      expect(context.callMethod("filterGreater42", [["43", "5", "49"]]),
+      expect(
+          filterGreater42(["43", "5", "49"]),
           equals(["43", "49"]));
     });
 
     test("for each collect result", () {
-      expect(context.callMethod("forEachCollectResult", [[1, 5, 7]]),
+      expect(
+          forEachCollectResult([1, 5, 7]),
           equals([2, 10, 14]));
     });
 
     test("some", () {
-      expect(context.callMethod("someEqual42", [[1, 5, 9]]), isFalse);
-      expect(context.callMethod("someEqual42", [[1, 42, 9]]), isTrue);
+      expect(someEqual42([1, 5, 9]),
+          isFalse);
+      expect(someEqual42([1, 42, 9]),
+          isTrue);
     });
 
     test("sort backwards", () {
       var arr = [1, 5, 9];
-      var ret = context.callMethod("sortNumbersBackwards", [arr]);
+      var ret = sortNumbersBackwards(arr);
       expect(identical(arr, ret), isTrue);
       expect(ret, equals([9, 5, 1]));
     });
 
     test("splice dummy items", () {
       var list = [1, 2, 3, 4];
-      var removed = context.callMethod("spliceDummyItems", [list]);
+      var removed = spliceDummyItems(list);
       expect(removed.length, equals(2));
       expect(removed[0], equals(2));
       expect(removed[1], equals(3));
@@ -516,7 +618,7 @@
 
     test("splice string args", () {
       var list = [1, 2, 3, 4];
-      var removed = context.callMethod("spliceTestStringArgs", [list]);
+      var removed = spliceTestStringArgs(list);
       expect(removed.length, equals(2));
       expect(removed[0], equals(2));
       expect(removed[1], equals(3));
@@ -529,7 +631,7 @@
 
     test("splice pastEndOfArray", () {
       var list = [1, 2, 3, 4];
-      var removed = context.callMethod("splicePastEnd", [list]);
+      var removed = splicePastEnd(list);
       expect(removed.length, equals(3));
       expect(list.first, equals(1));
       expect(list.length, equals(4));
@@ -540,7 +642,7 @@
 
     test("splice both bounds past end of array", () {
       var list = [1];
-      var removed = context.callMethod("splicePastEnd", [list]);
+      var removed = splicePastEnd(list);
       expect(removed.length, equals(0));
       expect(list.first, equals(1));
       expect(list.length, equals(4));
@@ -550,25 +652,25 @@
     });
 
     test("call List method on JavaScript object", () {
-      var jsObject = new JsObject.jsify({});
+      var jsObject = newLiteral();
       callListMethodOnObject(jsObject, 'push', ["a"]);
       callListMethodOnObject(jsObject, 'push', ["b"]);
       callListMethodOnObject(jsObject, 'push', ["c", "d"]);
       callListMethodOnObject(jsObject, 'push', []);
 
-      expect(jsonStringify(jsObject),
+      expect(json_helper.stringify(jsObject),
           equals('{"0":"a","1":"b","2":"c","3":"d","length":4}'));
 
       expect(callListMethodOnObject(jsObject, 'pop', []), equals("d"));
       expect(callListMethodOnObject(jsObject, 'join', ["#"]), equals("a#b#c"));
 
-      var jsArray = new JsObject.jsify([]);
+      var jsArray = newArray();
       callListMethodOnObject(jsArray, 'push', ["a"]);
       callListMethodOnObject(jsArray, 'push', ["b"]);
       callListMethodOnObject(jsArray, 'push', ["c", "d"]);
       callListMethodOnObject(jsArray, 'push', []);
 
-      expect(jsonStringify(jsArray), equals('["a","b","c","d"]'));
+      expect(json_helper.stringify(jsArray), equals('["a","b","c","d"]'));
     });
   });
 
@@ -584,10 +686,10 @@
       var listView = new UnmodifiableListView(list.getRange(1,3));
       expect(listView is List, isTrue);
       expect(listView.length, equals(2));
-      expect(context.callMethod("checkIsArray", [listView]), isFalse);
-      expect(context.callMethod("checkIsArray", [listView.toList()]), isTrue);
-      expect(context.callMethod("getOwnPropertyDescriptorJson",
-          [listView, "length"]), equals("null"));
+      expect(checkIsArray(listView), isFalse);
+      expect(checkIsArray(listView.toList()), isTrue);
+      expect(getOwnPropertyDescriptor(
+          listView, "length"), equals(null));
     });
   });
   */
diff --git a/tests/html/js_dart_to_string_test.dart b/tests/html/js_dart_to_string_test.dart
new file mode 100644
index 0000000..f702d6b
--- /dev/null
+++ b/tests/html/js_dart_to_string_test.dart
@@ -0,0 +1,46 @@
+// 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.
+
+@Js()
+library js_typed_interop_test;
+
+import 'dart:html';
+
+import 'package:js/js.dart';
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+
+_injectJs() {
+  document.body.append(new ScriptElement()
+    ..type = 'text/javascript'
+    ..innerHtml = r"""
+
+  function jsToStringViaCoercion(a) {
+    return a + '';
+  };
+""");
+}
+
+@Js()
+external String jsToStringViaCoercion(obj);
+
+class ExampleClassWithCustomToString {
+  var x;
+  ExampleClassWithCustomToString(this.x);
+  String toString() => "#$x#";
+}
+
+main() {
+  _injectJs();
+
+  useHtmlConfiguration();
+
+  group('toString', () {
+    test('custom dart', () {
+      var x = new ExampleClassWithCustomToString("fooBar");
+      expect(jsToStringViaCoercion(x), equals("#fooBar#"));
+      expect(jsToStringViaCoercion({'a' : 1, 'b': 2}), equals("{a: 1, b: 2}"));
+    });
+  });
+}
diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
index ab83a5c..37c73ab 100644
--- a/tests/html/js_test.dart
+++ b/tests/html/js_test.dart
@@ -852,6 +852,8 @@
         expect(context['window'] is Window, isTrue);
       });
 
+      // Bug: dartbug.com/24520
+      /*
       test('foreign browser objects should be proxied', () {
         var iframe = new IFrameElement();
         document.body.children.add(iframe);
@@ -878,6 +880,7 @@
         context.callMethod('fireClickEvent', [contentWindow]);
         expect(clicked, isTrue);
       });
+      */
 
       test('document', () {
         expect(context['document'] is Document, isTrue);
diff --git a/tests/html/js_typed_interop_test.dart b/tests/html/js_typed_interop_test.dart
index c8c0260..fb69069 100644
--- a/tests/html/js_typed_interop_test.dart
+++ b/tests/html/js_typed_interop_test.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.
 
-library jsArrayTest;
+@Js()
+library js_typed_interop_test;
 
 import 'dart:html';
-import 'dart:js';
 
+import 'package:js/js.dart';
 import 'package:unittest/unittest.dart';
 import 'package:unittest/html_config.dart';
+import 'package:unittest/html_individual_config.dart';
 
 _injectJs() {
   document.body.append(new ScriptElement()
     ..type = 'text/javascript'
     ..innerHtml = r"""
+  var Foo = {
+    multiplyDefault2: function(a, b) {
+      if (arguments.length >= 2) return a *b;
+      return a * 2;
+    }
+  };
+
   var foo = {
     x: 3,
     z: 40, // Not specified in typed Dart API so should fail in checked mode.
     multiplyByX: function(arg) { return arg * this.x; },
     // This function can be torn off without having to bind this.
-    multiplyBy2: function(arg) { return arg * 2; }
+    multiplyBy2: function(arg) { return arg * 2; },
+    callClosureWithArg1: function(closure, arg) {
+      return closure(arg);
+    },
+    callClosureWithArg2: function(closure, arg1, arg2) {
+      return closure(arg1, arg2);
+    },
+    callClosureWithArgAndThis: function(closure, arg) {
+      return closure.apply(this, [arg]);
+    },
+    getBar: function() {
+      return bar;
+    }
   };
 
   var foob = {
@@ -30,51 +51,145 @@
 
   var bar = {
     x: "foo",
-    multiplyByX: true
+    multiplyByX: true,
+    getFoo: function() {
+      return foo;
+    }
+  };
+
+  function ClassWithConstructor(a, b) {
+    this.a = a;
+    this.b = b;
+  };
+
+  ClassWithConstructor.prototype = {
+    getA: function() { return this.a;}
   };
 
   var selection = ["a", "b", "c", foo, bar];  
-  selection.doubleLength = function() { return this.length * 2; };
+
+  function returnNumArgs() { return arguments.length; };
+  function returnLastArg() { return arguments[arguments.length-1]; };
+
+  function confuse(obj) { return obj; }
+
+  function StringWrapper(str) {
+    this.str = str;
+  }
+  StringWrapper.prototype = {
+    charCodeAt: function(index) {
+      return this.str.charCodeAt(index);
+    }
+  };
 """);
 }
 
-abstract class Foo {
-  int get x;
-  set x(int v);
-  num multiplyByX(num y);
-  num multiplyBy2(num y);
+class RegularClass {
+  factory RegularClass(a) {
+    return new RegularClass.fooConstructor(a);
+  }
+  RegularClass.fooConstructor(this.a);
+  var a;
 }
 
-abstract class Foob extends Foo {
-  final String y;
+@Js()
+class ClassWithConstructor {
+  external ClassWithConstructor(aParam, bParam);
+  external getA();
+  external get a;
+  external get b;
 }
 
-abstract class Bar {
-  String get x;
-  bool get multiplyByX;
+@Js()
+class Foo {
+  external int get x;
+  external set x(int v);
+  external num multiplyByX(num y);
+  external num multiplyBy2(num y);
+  external callClosureWithArgAndThis(Function closure, arg);
+  external callClosureWithArg1(Function closure, arg1);
+  external callClosureWithArg2(Function closure, arg1, arg2);
+  external Bar getBar();
+  external static int multiplyDefault2(int a, [int b]);
+
 }
 
-class Baz {}
+@Js()
+class ExampleLiteral {
+  external factory ExampleLiteral({int x, String y, num z});
 
-// This class shows the pattern used by APIs such as jQuery that add methods
-// to Arrays.
-abstract class Selection implements List {
-  num doubleLength();
+  external int get x;
+  external String get y;
+  external num get z;
 }
 
-Foo get foo => context['foo'];
-Foob get foob => context['foob'];
-Bar get bar => context['bar'];
-Selection get selection => context['selection'];
+@Js('Foob')
+class Foob extends Foo {
+  external String get y;
+}
+
+@Js('Bar')
+class Bar
+ {
+  external String get x;
+  external bool get multiplyByX;
+  external Foo getFoo();
+}
+
+// No @Js is required for these external methods as the library is
+// annotated with Js.
+external Foo get foo;
+external Foob get foob;
+external Bar get bar;
+external Selection get selection;
+
+addWithDefault(a, [b = 100]) => a + b;
+
+external Function get returnNumArgs;
+external Function get returnLastArg;
+
+const STRINGIFY_LOCATION = "JSON.stringify";
+@Js(STRINGIFY_LOCATION)
+external String stringify(obj);
+
+@Js()
+class StringWrapper {
+  external StringWrapper(String str);
+  external int charCodeAt(int i);
+}
+
+// Defeat JS type inference by calling through JavaScript interop.
+@Js()
+external confuse(obj);
 
 main() {
-  // Call experimental API to register Dart interfaces implemented by
-  // JavaScript classes.
-  registerJsInterfaces([Foo, Foob, Bar, Selection]);
-
   _injectJs();
 
-  useHtmlConfiguration();
+  useHtmlIndividualConfiguration();
+
+  group('object literal', () {
+    test('simple', () {
+      var l = new ExampleLiteral(x: 3, y: "foo");
+      expect(l.x, equals(3));
+      expect(l.y, equals("foo"));
+      expect(l.z, isNull);
+      expect(stringify(l), equals('{"x":3,"y":"foo"}'));
+      l = new ExampleLiteral(z: 100);
+      expect(l.x, isNull);
+      expect(l.y, isNull);
+      expect(l.z, equals(100));
+      expect(stringify(l), equals('{"z":100}'));
+    });
+  });
+
+  group('constructor', () {
+    test('simple', () {
+      var o = new ClassWithConstructor("foo", "bar");
+      expect(o.a, equals("foo"));
+      expect(o.b, equals("bar"));
+      expect(o.getA(), equals("foo"));
+    });
+  });
 
   group('property', () {
     test('get', () {
@@ -83,15 +198,15 @@
       expect(foob.y, equals("why"));
 
       // Exists in JS but not in API.
-      expect(() => foo.z, throws);
+      expect(() => (foo as dynamic).zSomeInvalidName, throws);
       expect(bar.multiplyByX, isTrue);
     });
     test('set', () {
       foo.x = 42;
       expect(foo.x, equals(42));
       // Property tagged as read only in typed API.
-      expect(() => foob.y = "bla", throws);
-      expect(() => foo.unknownName = 42, throws);
+      expect(() => (foob as dynamic).y = "bla", throws);
+      expect(() => (foo as dynamic).unknownName = 42, throws);
     });
   });
 
@@ -105,22 +220,96 @@
 
     test('tearoff', () {
       foo.x = 10;
-      // TODO(jacobr): should we automatically bind "this" for tearoffs of JS
-      // objects?
-      JsFunction multiplyBy2 = foo.multiplyBy2;
+      Function multiplyBy2 = foo.multiplyBy2;
       expect(multiplyBy2(5), equals(10));
+      Function multiplyByX = foo.multiplyByX;
+      // Tearing off a JS closure doesn't bind this.
+      // You will need to use the new method tearoff syntax to bind this.
+      expect(multiplyByX(4), isNaN);
+    });
+  });
+
+  group('static method', () {
+    test('call from dart', () {
+      expect(Foo.multiplyDefault2(6, 7), equals(42));
+      expect(Foo.multiplyDefault2(6), equals(12));
+      Function tearOffMethod = Foo.multiplyDefault2;
+      expect(tearOffMethod(6, 6), equals(36));
+      expect(tearOffMethod(6), equals(12));
+    });
+  });
+
+  group('closure', () {
+    test('call from js', () {
+      localClosure(x) => x * 10;
+      var wrappedLocalClosure = allowInterop(localClosure);
+      expect(
+          identical(allowInterop(localClosure), wrappedLocalClosure), isTrue);
+      expect(foo.callClosureWithArg1(wrappedLocalClosure, 10), equals(100));
+      expect(foo.callClosureWithArg1(wrappedLocalClosure, "a"),
+          equals("aaaaaaaaaa"));
+      expect(foo.callClosureWithArg1(allowInterop(addWithDefault), 10),
+          equals(110));
+      expect(foo.callClosureWithArg2(allowInterop(addWithDefault), 10, 20),
+          equals(30));
+      addThisXAndArg(Foo that, int arg) {
+        return foo.x + arg;
+      }
+      var wrappedCaptureThisClosure = allowInteropCaptureThis(addThisXAndArg);
+      foo.x = 20;
+      expect(foo.callClosureWithArgAndThis(wrappedCaptureThisClosure, 10),
+          equals(30));
+      foo.x = 50;
+      expect(foo.callClosureWithArgAndThis(wrappedCaptureThisClosure, 10),
+          equals(60));
+      expect(
+          identical(allowInteropCaptureThis(addThisXAndArg),
+              wrappedCaptureThisClosure),
+          isTrue);
+    });
+
+    test('call from dart', () {
+      var returnNumArgsFn = returnNumArgs;
+      var returnLastArgFn = returnLastArg;
+      expect(returnNumArgsFn(), equals(0));
+      expect(returnNumArgsFn("a", "b", "c"), equals(3));
+      expect(returnNumArgsFn("a", "b", "c", null, null), equals(5));
+      expect(returnNumArgsFn(1,2,3,4,5,6, null), equals(7));
+      expect(returnNumArgsFn(1,2,3,4,5,6,7,8), equals(8));
+      expect(returnLastArgFn(1,2,"foo"), equals("foo"));
+      expect(returnLastArgFn(1,2,3,4,5,6,"foo"), equals("foo"));
+    });
+  });
+
+  group('chain calls', () {
+    test("method calls", () {
+      // In dart2js make sure we still use interceptors when making nested
+      // calls to objects.
+      var bar = foo.getBar().getFoo().getBar().getFoo().getBar();
+      expect(bar.x, equals("foo"));
+    });
+  });
+
+  group('avoid leaks on dart:core', () {
+    test('String', () {
+      var s = confuse('Hello');
+      var stringWrapper = confuse(new StringWrapper('Hello'));
+      // Make sure we don't allow calling JavaScript methods on String.
+      expect(() => s.charCodeAt(0), throws);
+      expect(stringWrapper.charCodeAt(0), equals(72));
     });
   });
 
   group('type check', () {
     test('js interfaces', () {
-      expect(foo is JsObject, isTrue);
-      // Cross-casts are allowed.
+      // Is checks return true for all  JavaScript interfaces.
       expect(foo is Bar, isTrue);
-      expect(selection is JsArray, isTrue);
+      expect(foo is Foob, isTrue);
+
+      expect(selection is List, isTrue);
 
       // We do know at runtime whether something is a JsArray or not.
-      expect(foo is JsArray, isFalse);
+      expect(foo is List, isFalse);
     });
 
     test('dart interfaces', () {
@@ -128,12 +317,4 @@
       expect(selection is List, isTrue);
     });
   });
-
-  group("registration", () {
-    test('repeated fails', () {
-      // The experimental registerJsInterfaces API has already been called so
-      // it cannot be called a second time.
-      expect(() => registerJsInterfaces([Baz]), throws);
-    });
-  });
 }
diff --git a/tests/html/json_helper.dart b/tests/html/json_helper.dart
new file mode 100644
index 0000000..15f92c0
--- /dev/null
+++ b/tests/html/json_helper.dart
@@ -0,0 +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.
+
+@Js("JSON")
+library json_helper;
+
+import 'package:js/js.dart';
+
+external String stringify(object);
diff --git a/tests/html/mirrors_js_typed_interop_test.dart b/tests/html/mirrors_js_typed_interop_test.dart
new file mode 100644
index 0000000..1989ba9
--- /dev/null
+++ b/tests/html/mirrors_js_typed_interop_test.dart
@@ -0,0 +1,48 @@
+// 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 tests.html.mirrors_js_typed_interop_test;
+
+import 'dart:mirrors';
+import 'dart:html';
+
+import 'package:js/js.dart';
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+
+_injectJs() {
+  document.body.append(new ScriptElement()
+    ..type = 'text/javascript'
+    ..innerHtml = r"""
+  window.foo = {
+    x: 3,
+    z: 100,
+    multiplyBy2: function(arg) { return arg * 2; },
+  };
+""");
+}
+
+@Js()
+external Foo get foo;
+
+@Js()
+class Foo {
+  external int get x;
+  external set x(v);
+  external num multiplyBy2(num y);
+}
+
+main() {
+  _injectJs();
+
+  useHtmlConfiguration();
+
+  test('dynamic dispatch', () {
+    var f = foo;
+    expect(f.x, 3);
+    // JsInterop methods are not accessible using reflection.
+    expect(() => reflect(f).setField(#x, 123), throws);
+    expect(f.x, 3);
+  });
+}
diff --git a/tests/html/storage_quota_test.dart b/tests/html/storage_quota_test.dart
deleted file mode 100644
index 54e5346..0000000
--- a/tests/html/storage_quota_test.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-library storage_quota_test;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-import 'dart:async';
-import 'dart:isolate';
-import 'dart:html';
-
-main() {
-  useHtmlConfiguration();
-
-  expectSaneStorageInfo(StorageInfo storageInfo) {
-     expect(storageInfo.usage, isNotNull);
-     expect(storageInfo.quota, isNotNull);
-     expect(storageInfo.usage >= 0, isTrue);
-     expect(storageInfo.quota >= storageInfo.usage, isNotNull);
-  };
-
-  test('storage quota - temporary', () {
-    Future f = window.navigator.storageQuota.queryInfo('temporary');
-    expect(f.then(expectSaneStorageInfo), completes);
-  });
-
-  test('storage quota - persistent', () {
-    Future f = window.navigator.storageQuota.queryInfo('persistent');
-    expect(f.then(expectSaneStorageInfo), completes);
-  });
-
-  test('storage quota - unknown', () {
-    // Throwing synchronously is bogus upstream behavior; should result in a
-    // smashed promise.
-    expect(() => window.navigator.storageQuota.queryInfo("foo"), throws);  /// missingenumcheck: ok
-    var wrongType = 3;
-    expect(() => window.navigator.storageQuota.queryInfo(wrongType), throws);
-    expect(() => window.navigator.storageQuota.queryInfo(null), throws);
-  });
-}
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index 84e4e3a..95b36d0 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -18,7 +18,6 @@
 ping_pause_test: Skip     # Resolve test issues
 kill3_test: Pass, Fail    # Bad test: expects total message order
 
-message3_test/byteBuffer: Crash # Issue 21818
 message3_test/int32x4: Crash # Issue 21818
 
 [ $compiler == none && $runtime == ContentShellOnAndroid ]
@@ -136,12 +135,9 @@
 mint_maker_test: StaticWarning
 
 [ $compiler != none || $runtime != vm ]
-package_root_test: SkipByDesign # Uses dart:io.
+package_root_test: SkipByDesign  # Uses Isolate.packageRoot
+package_map_test: SkipByDesign  # Uses Isolate.packageMap
 
 [ $compiler == dart2js && $cps_ir ]
 deferred_in_isolate2_test: RuntimeError # A.loadLibrary is not a function
 isolate_current_test: RuntimeError # Please triage this failure.
-message3_test/byteBuffer: RuntimeError # Please triage this failure.
-message3_test/fun: RuntimeError # Please triage this failure.
-message3_test/int32x4: RuntimeError # Please triage this failure.
-message3_test/none: RuntimeError # Please triage this failure.
diff --git a/tests/isolate/package_map_test.dart b/tests/isolate/package_map_test.dart
new file mode 100644
index 0000000..3e34dc0
--- /dev/null
+++ b/tests/isolate/package_map_test.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:isolate';
+
+final NOT_HERE = "notHere";
+final NOT_HERE_URI = "file:///no/such/file/";
+
+class Foo {}
+
+void main([args, port]) {
+  if (port != null) {
+    testPackageRoot(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  p.handler = (msg) {
+    p.close();
+    // Cannot use the expect package here because the spawned isolate
+    // would not be able to handle it.
+    if (msg is! List) {
+      throw "Bad response from child isolate: $msg";
+    }
+    if (msg.length != 2) {
+      throw "Length should be 2: ${msg.length}\nmsg: $msg";
+    }
+    if (msg[0] != NOT_HERE) {
+      throw "Key should be $NOT_HERE: ${msg[0]}";
+    }
+    if (msg[1] != NOT_HERE_URI) {
+      throw "Value should be $NOT_HERE_URI: ${msg[1]}";
+    }
+  };
+  Isolate.spawnUri(Platform.script,
+                   [],
+                   p.sendPort,
+                   packageMap: {
+                     NOT_HERE: Uri.parse(NOT_HERE_URI)
+                   });
+}
+
+testPackageRoot(port) async {
+  var packageMap = await Isolate.packageMap;
+  var packageMapEntries = [];
+  if (packageMap is! Map) {
+    port.send("packageMap is not a Map: ${packageMap.runtimeType}");
+    return;
+  }
+  var ok = true;
+  packageMap.forEach((k, v) {
+    if (ok && (k is! String)) {
+      port.send("Key $k is not a String: ${k.runtimeType}");
+      ok = false;
+    }
+    packageMapEntries.add(k);
+    if (ok && (v is! Uri)) {
+      port.send("Value $v is not a Uri: ${v.runtimeType}");
+      ok = false;
+    }
+    packageMapEntries.add(v.toString());
+  });
+  if (ok) {
+    port.send(packageMapEntries);
+  }
+}
diff --git a/tests/isolate/raw_port_test.dart b/tests/isolate/raw_port_test.dart
index 1da1484..1b88949 100644
--- a/tests/isolate/raw_port_test.dart
+++ b/tests/isolate/raw_port_test.dart
@@ -31,6 +31,12 @@
     });
   });
 
+  test("raw receive hashCode", () {
+    RawReceivePort port = new RawReceivePort();
+    expect(port.hashCode is int, true);
+    port.close();
+  });
+
   test("raw receive twice - change handler", () {
     RawReceivePort port = new RawReceivePort();
     Isolate.spawn(remote2, port.sendPort);
diff --git a/tests/language/bit_shift_test.dart b/tests/language/bit_shift_test.dart
index e939e5a..8493936 100644
--- a/tests/language/bit_shift_test.dart
+++ b/tests/language/bit_shift_test.dart
@@ -1,6 +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
 
 import "package:expect/expect.dart";
 
@@ -49,7 +50,9 @@
 // JavaScript shifts by the amount modulo 32. That is x << y is equivalent to
 // x << (y & 0x1F). Dart does not.
 main() {
-  constants();
-  interceptors();
-  speculative();
+  for (var i = 0; i < 10; ++i) {
+    constants();
+    interceptors();
+    speculative();
+  }
 }
diff --git a/tests/language/language.status b/tests/language/language.status
index e164c45..28dedba 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -98,3 +98,6 @@
 
 [ $compiler == none && ( $runtime == dartium || $runtime == drt ) ]
 issue23244_test: Fail # Can't run spawnFunction on dartium.
+
+[ $compiler == none && ($runtime == vm || $runtime == drt || $runtime == dartium) && $arch == ia32 ]
+vm/regress_24517_test: Pass, Fail # Issue 24517.
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 06637d1..a0c0638 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -175,6 +175,8 @@
 const_dynamic_type_literal_test/02: CompileTimeError # Issue 23009
 const_dynamic_type_literal_test/03: CompileTimeError # Issue 23009
 
+generic_field_mixin4_test: Crash # Issue 18651
+
 # Compilation errors.
 method_override5_test: RuntimeError # Issue 12809
 external_test/10: CompileTimeError # Issue 12887
@@ -225,7 +227,6 @@
 regress_22443_test: Pass,RuntimeError # Issue 17458
 
 [ $compiler == dart2js && $cps_ir == false ]
-generic_field_mixin4_test: Crash # Issue 18651
 generic_field_mixin5_test: Crash # Issue 18651
 many_method_calls_test: Crash # Stack overflow in HGraphVisitor.visitPostDominatorTree.visitBasicBlockAndSuccessors
 
@@ -233,6 +234,7 @@
 issue23244_test: RuntimeError # 23244
 
 [ $compiler == dart2js && $cps_ir ]
+assert_assignable_type_test: Crash # Internal Error: Pending statics.
 async_await_syntax_test/a03a: Crash # (a03a()async*{}): cannot handle sync*/async* functions
 async_await_syntax_test/a03b: Crash # (a03b()async*{}): cannot handle sync*/async* functions
 async_await_syntax_test/a06a: Crash # (await for(var o in st){}): await for
diff --git a/tests/language/super_mixin_test.dart b/tests/language/super_mixin_test.dart
new file mode 100644
index 0000000..8263a1b
--- /dev/null
+++ b/tests/language/super_mixin_test.dart
@@ -0,0 +1,25 @@
+// 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.
+
+// Dart2js regression test: Test that the type mask for non-null exact Mixin is
+// created for Mixin.getter.
+
+import 'package:expect/expect.dart';
+
+class Mixin {
+  @NoInline()
+  get getter => 42;
+}
+
+class Superclass {
+
+}
+
+class Subclass extends Superclass with Mixin {
+  method() => super.getter;
+}
+
+void main() {
+  Expect.equals(42, new Subclass().method());
+}
\ No newline at end of file
diff --git a/tests/language/vm/regress_24517_test.dart b/tests/language/vm/regress_24517_test.dart
new file mode 100644
index 0000000..654caf9
--- /dev/null
+++ b/tests/language/vm/regress_24517_test.dart
@@ -0,0 +1,16 @@
+// 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=--no-intrinsify
+
+// Test that math runtime function (non-intrinsified) produce the expected
+// result and don't deviate due to double-rounding when using 80-bit FP ops.
+
+import "dart:math";
+import "package:expect/expect.dart";
+
+main() {
+  var x = 2.028240960366921e+31;
+  Expect.equals(4503599627372443.0, sqrt(x));
+}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 473f375..00412af 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -353,3 +353,6 @@
 
 [ $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.
diff --git a/tests/standalone/io/certificates/README b/tests/standalone/io/certificates/README
index b02f4b5..1268432 100644
--- a/tests/standalone/io/certificates/README
+++ b/tests/standalone/io/certificates/README
@@ -4,6 +4,10 @@
 are tested by making TLS (formerly called SSL) connections, secured
 by certificates from a self-signed test root authority.
 
+The certificates are created by running ../create_sample_certificates.sh
+in a bash or sh shell, with the openssl tools installed.  Run the script
+twice to create the untrusted_* files.
+
 server_chain.pem:
   Contains the chain of certificates, from the self-signed
 test certificate authority, through the intermediate CA, to the server
diff --git a/tests/standalone/io/certificates/server_chain.pem b/tests/standalone/io/certificates/server_chain.pem
index 4163fe7..c653fca 100644
--- a/tests/standalone/io/certificates/server_chain.pem
+++ b/tests/standalone/io/certificates/server_chain.pem
@@ -1,57 +1,57 @@
 -----BEGIN CERTIFICATE-----
-MIIDKTCCAhGgAwIBAgIJAOWmjTS+OnTEMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
-BAMMDGludGVybWVkaWF0ZTAeFw0xNTA1MTgwOTAwNDBaFw0yMzA4MDQwOTAwNDBa
-MBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBALlcwQJuzd+xH8QFgfJSn5tRlvhkldSX98cE7NiA602NBbnAVyUrkRXq
-Ni75lgt0kwjYfA9z674m8WSVbgpLPintPCla9CYky1TH0keIs8Rz6cGWHryWEHiu
-EDuljQynu2b3sAFuHu9nfWurbJwZnFakBKpdQ9m4EyOZCHC/jHYY7HacKSXg1Cki
-we2ca0BWDrcqy8kLy0dZ5oC6IZG8O8drAK8f3f44CRYw59D3sOKBrKXaabpvyEcb
-N7Wk2HDBVwHpUJo1reVwtbM8dhqQayYSD8oXnGpP3RQNu/e2rzlXRyq/BfcDY1JI
-7TbC4t/7/N4EcPSpGsTcSOC9A7FpzvECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg
-hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
-BBYEFCnwiEMMFZh7NhCr+qA8K0w4Q+AOMB8GA1UdIwQYMBaAFB0h1Evsaw2vfrmS
-YuoCTmC4EE6ZMA0GCSqGSIb3DQEBCwUAA4IBAQAcFmHMaXRxyoNaeOowQ6iQWoZd
-AUbvG7SHr7I6Pi2aqdqofsKWts7Ytm5WsS0M2nN+sW504houu0iCPeJJX8RQw2q4
-CCcNOs9IXk+2uMzlpocHpv+yYoUiD5DxgWh7eghQMLyMpf8FX3Gy4VazeuXznHOM
-4gE4L417xkDzYOzqVTp0FTyAPUv6G2euhNCD6TMru9REcRhYul+K9kocjA5tt2KG
-MH6y28LXbLyq4YJUxSUU9gY/xlnbbZS48KDqEcdYC9zjW9nQ0qS+XQuQuFIcwjJ5
-V4kAUYxDu6FoTpyQjgsrmBbZlKNxH7Nj4NDlcdJhp/zeSKHqWa5hSWjjKIxp
+MIIDPDCCAiSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVpbnRl
+cm1lZGlhdGVhdXRob3JpdHkwHhcNMTUxMDEzMTQzNDQ0WhcNMjUxMDEwMTQzNDQ0
+WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDgGEoJKUJIo0nICRkMHWmXyZcQa4j4TIRndtH7HS6Z/GDQpo849zKU
+l8lAql+BuOv0ridXz5qnaspNFyw2QgxH6Yc69V1CM5pBfF0QwJccG/Z4WbVZTSK7
++ED7t4qm3VPTvjHFjKaPXhwQFItPwkUq5vPomNeCYEKaDWHHuffwFLwN0kjv+6YI
+3vyZmcij7Rhf76K3EV4kJowKcIfSQ8qs9Ts8PkRmJRtYXp0sHuRhgl+cmn6i6yNp
+ebVZN2oD4EYQzijPCF9amUwjkOKqyHqXdf8tq+h0sVVQJddUf/abLa3UB4km6pvF
+QLm3jbhq0isP6zVjMVO47vnX5AjrJM9LAgMBAAGjgYwwgYkwPAYDVR0RBDUwM4IJ
+bG9jYWxob3N0ggkxMjcuMC4wLjGCAzo6MYcEfwAAAYcQAAAAAAAAAAAAAAAAAAAA
+ATAJBgNVHRMEAjAAMB0GA1UdDgQWBBRZ8+LQg9nfOOv1RaqPI9nrvbBufjAfBgNV
+HSMEGDAWgBRqwKMjCmov/0owT8uQJYA+aHX5QTANBgkqhkiG9w0BAQsFAAOCAQEA
+TJA1aeexRpyq2G81igrhtVysyCA2xBq3GEPHZNf6+YM65rJs8ngyLQ533JURy9QY
+hRHYYh4O387d6QUBpCH7QMCoO/IyhFnYaUsFuDi4Xfg0BY05uRj9oJlyhtOoPR73
+yFu3bK6CKyRjQ69HX+QpaJUADgRjuyDV6BAhq3oCfDghql1HBplCEJelcoZUs2xj
+Ao5Hw90mm03JgmPMkftEFIlsbBejPTIN7IhdNRJy3mJfY5r0g1MLAR8UHtCRTsxy
+AQkZjpVKPe8kKR1wCY9xsOYpIvruLUcbVayzM6iXVDwWApgT2x1qgIlRb9ZzTjdj
+WJVFf3HhnyLstIpI4Vw+UQ==
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIDAjCCAeqgAwIBAgIJAOWmjTS+OnTDMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
-BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
-WjAXMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
-DwAwggEKAoIBAQDSrAO1CoPvUllgLOzDm5nG0skDF7vh1DUgAIDVGz0ecD0JFbQx
-EF79pju/6MbtpTW2FYvRp11t/G7rGtX923ybOHY/1MNFQrdIvPlO1VV7IGKjoMwP
-DNeb0fIGjHoE9QxaDxR8NX8xQbItpsw+TUtRfc9SLkR+jaYJfVRoM21BOncZbSHE
-YKiZlEbpecB/+EtwVpgvl+8mPD5U07Fi4fp/lza3WXInXQPyiTVllIEJCt4PKmlu
-MocNaJOW38bysL7i0PzDpVZtOxLHOTaW68yF3FckIHNCaA7k1ABEEEegjFMmIao7
-B9w7A0jvr4jZVvNmui5Djjn+oJxwEVVgyf8LAgMBAAGjUDBOMB0GA1UdDgQWBBQd
-IdRL7GsNr365kmLqAk5guBBOmTAfBgNVHSMEGDAWgBRk81s9d0ZbiZhh44KckwPb
-oTc0XzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBZQTK0plfdB5PC
-cC5icut4EmrByJa1RbU7ayuEE70e7hla6KVmVjVdCBGltI4jBYwfhKbRItHiAJ/8
-x+XZKBG8DLPFuDb7lAa1ObhAYF7YThUFPQYaBhfzKcWrdmWDBFpvNv6E0Mm364dZ
-e7Yxmbe5S4agkYPoxEzgEYmcUk9jbjdR6eTbs8laG169ljrECXfEU9RiAcqz5iSX
-NLSewqB47hn3B9qgKcQn+PsgO2j7M+rfklhNgeGJeWmy7j6clSOuCsIjWHU0RLQ4
-0W3SB/rpEAJ7fgQbYUPTIUNALSOWi/o1tDX2mXPRjBoxqAv7I+vYk1lZPmSzkyRh
-FKvRDxsW
+MIIDAzCCAeugAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
+YXV0aG9yaXR5MB4XDTE1MTAxMzE0MzQ0NFoXDTI1MTAxMDE0MzQ0NFowIDEeMBwG
+A1UEAwwVaW50ZXJtZWRpYXRlYXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAuas8jPtdCT4lahfVYHBrmUlFAvfKa5odZ7XqJ6TRMfzuoV6a
+51H6L90GToMFBOvcf7qzsdw9y07rS61mGfK4c7BifsiMbm+2DNvnKwVqH7d6FVYN
+oHYgn3FqBzCebsE8f8LD+YE+XC3JPp84QnE5jhv422rPp4FnugjK5xIpQuhRa0GH
+CVBpEe9Sq/KQXHW0lKcVLAL4eHrupdRdNJjDaVT3ZzCwUVHeBdQtkc8ZH/64H0KA
++G+W+Bl4NPCqdLUCUwSn8RGxYj2Su7RZNvD2leyW1GtIbztztaSLbKZ48ZnjNnzg
+C5J3T6kqNXsJExDm6gh5GxIndUjaQ20SB+XfWwIDAQABo1AwTjAMBgNVHRMEBTAD
+AQH/MB0GA1UdDgQWBBRqwKMjCmov/0owT8uQJYA+aHX5QTAfBgNVHSMEGDAWgBQf
+nG+qRtaEj/s3oh1Yrf94203UFzANBgkqhkiG9w0BAQsFAAOCAQEAYr/qbcG6WybE
+TB+8UU1eN06tXvSGL1mtNlMcjyFc2PZDsdo+XjehXBqyF3k6raCJAdttiyjHlalj
+58D6F1IK1x/c8CNS5WxOEBjkTwy8KMK1vpggYO+lvkjJQL9RGns0fKrsdYexCPtn
+iKmcRWgfJWs/mT5LmxBsufYxIvAAuzjJNMrmrxAbComJvcjbJPf8rPqMLmnYoV20
+ufSK5euF3CCbtKUXQuqR2XY4kX+hmzuu7UGyOvlUXSa2J6aGTsutU0KRWlsisiTh
+ts7qtG/pzVEEYs71dTL6OmXGjxQFmtsVHZog/ybNVYP4Mvz5eA+SkaiUPrM/x46F
+YzNX6fPCwA==
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIDAzCCAeugAwIBAgIJAJ0MomS4Ck+8MA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
-BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
-WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAts1ijtBV92S2cOvpUMOSTp9c6A34nIGr0T5Nhz6XiqRVT+gv
-dQgmkdKJQjbvR60y6jzltYFsI2MpGVXY8h/oAL81D/k7PDB2aREgyBfTPAhBHyGw
-siR+2xYt5b/Zs99q5RdRqQNzNpLPJriIKvUsRyQWy1UiG2s7pRXQeA8qB0XtJdCj
-kFIi+G2bDsaffspGeDOCqt7t+yqvRXfSES0c/l7DIHaiMbbp4//ZNML3RNgAjPz2
-hCezZ+wOYajOIyoSPK8IgICrhYFYxvgWxwbLDBEfC5B3jOQsySe10GoRAKZz1gBV
-DmgReu81tYJmdgkc9zknnQtIFdA0ex+GvZlfWQIDAQABo1AwTjAdBgNVHQ4EFgQU
-ZPNbPXdGW4mYYeOCnJMD26E3NF8wHwYDVR0jBBgwFoAUZPNbPXdGW4mYYeOCnJMD
-26E3NF8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEATzkZ97K777uZ
-lQcduNX3ey4IbCiEzFA2zO5Blj+ilfIwNbZXNOgm/lqNvVGDYs6J1apJJe30vL3X
-J+t2zsZWzzQzb9uIU37zYemt6m0fHrSrx/iy5lGNqt3HMfqEcOqSCOIK3PCTMz2/
-uyGe1iw33PVeWsm1JUybQ9IrU/huJjbgOHU4wab+8SJCM49ipArp68Fr6j4lcEaE
-4rfRg1ZsvxiOyUB3qPn6wyL/JB8kOJ+QCBe498376eaem8AEFk0kQRh6hDaWtq/k
-t6IIXQLjx+EBDVP/veK0UnVhKRP8YTOoV8ZiG1NcdlJmX/Uk7iAfevP7CkBfSN8W
-r6AL284qtw==
+MIIC+zCCAeOgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
+YXV0aG9yaXR5MB4XDTE1MTAxMzE0MzQ0NFoXDTI1MTAxMDE0MzQ0NFowGDEWMBQG
+A1UEAwwNcm9vdGF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALLIFA1JvTuzPd0uD8uOxdGZmwlaRXyytqkQF66UGM+HLCmH6Vro5TpRL7Ka
+4fgEpbhS5purJqjpUiZkavxxBKQkdpxM0nH1lLX6NnR6UVh/Z3Tv6s8cR3o9L60J
+iH4N7hGdQH9Anz/PBXbshoMJqU+lZkOoqcmk4Tk27uxNlbpTLFoarm67hzqe4v/e
+xAfh4HoBZRVdnpWezM/7aX1hw2B2iFiU8pgyrVKZnXRhh4I6Ba1XTd37lc2d1fuf
+LaUICoAruR/ZhvRQaOtAN05dAHSOB9612WBBaEEiWzz/piEDEownZQ7NBWC5ANj4
+xRp7JPNtQtxYoju6j9MIJ4JoOQUCAwEAAaNQME4wHQYDVR0OBBYEFB+cb6pG1oSP
++zeiHVit/3jbTdQXMB8GA1UdIwQYMBaAFB+cb6pG1oSP+zeiHVit/3jbTdQXMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAC8PKipPvbQ0TXBKCMnCZiPI
+Vs7IfZuEzOgV6VByqveXuN8WJA2+ax9+2t1xuyIgftjj/uNJgm82AceVZqAtkGF0
+n29mPyoPC2tcrPHV2QUXy26+Rfb2JTQkkHXUnRtgU+gqnqugh+r9CCjoM0XkvR26
+/OrOmy7JIHtGPq5JEH9L73UryKKdQ3HS0ZkOMfxRyMNBa0y2/hYW8QDz/m0a1U9z
+q1rLvtYXZKWhz6dJJrphF6iBDzm+r6zo+uyCU7mps5wlGB9h4Ez8nx/Af1iT0HPE
+cl5zOR0RA5qefGx0hIuaxq0mHEYDY/coJ2rptvHwcnwgtSXBaQLe6MMNP+ElYDE=
 -----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/server_key.pem b/tests/standalone/io/certificates/server_key.pem
index 1fd2324..4486e44 100644
--- a/tests/standalone/io/certificates/server_key.pem
+++ b/tests/standalone/io/certificates/server_key.pem
@@ -1,29 +1,29 @@
 -----BEGIN ENCRYPTED PRIVATE KEY-----
-MIIE5DAcBgoqhkiG9w0BDAEBMA4ECL7L6rj6uEHGAgIIAASCBMLbucyfqAkgCbhP
-xNSHYllPMAv/dsIjtnsBwepCXPGkCBCuOAw/2FaCHjN9hBqL5V7fkrKeaemhm2YE
-ycPtlHJYPDf3kEkyMjdZ9rIY6kePGfQizs2uJPcXj4YPyQ4HsfVXpOicKfQrouf5
-Mze9bGzeMN065q3iP4dYUMwHAyZYteXCsanQNHlqvsWli0W+H8St8fdsXefZhnv1
-qVatKWdNdWQ9t5MuljgNU2Vv56sHKEYXI0yLxk2QUMk8KlJfnmt8foYUsnPUXHmc
-gIjLKwwVkpdololnEHSNu0cEOUPowjgJru+uMpn7vdNl7TPEQ9jbEgdNg4JwoYzU
-0nao8WzjaSp7kzvZz0VFwKnk5AjstGvvuAWckADdq23QElbn/mF7AG1m/TBpYxzF
-gTt37UdndS/AcvVznWVVrRP5iTSIawdIwvqI4s7rqsoE0GCcak+RhchgAz2gWKkS
-oODUo0JL6pPVbJ3l4ebbaO6c99nDVc8dViPtc1EkStJEJ2O4kI4xgLSCr4Y9ahKn
-oAaoSkX7Xxq3aQm+BzqSpLjdGL8atsqR/YVOIHYIl3gThvP0NfZGx1xHyvO5mCdZ
-kHxSA7tKWxauZ3eQ2clbnzeRsl4El0WMHy/5K1ovene4v7sunmoXVtghBC8hK6eh
-zMO9orex2PNQ/VQC7HCvtytunOVx1lkSBoNo7hR70igg6rW9H7UyoAoBOwMpT1xa
-J6V62nqruTKOqFNfur7aHJGpHGtDb5/ickHeYCyPTvmGp67u4wChzKReeg02oECe
-d1E5FKAcIa8s9TVOB6Z+HvTRNQZu2PsI6TJnjQRowvY9DAHiWTlJZBBY/pko3hxX
-TsIeybpvRdEHpDWv86/iqtw1hv9CUxS/8ZTWUgBo+osShHW79FeDASr9FC4/Zn76
-ZDERTgV4YWlW/klVWcG2lFo7jix+OPXAB+ZQavLhlN1xdWBcIz1AUWjAM4hdPylW
-HCX4PB9CQIPl2E7F+Y2p6nMcMWSJVBi5UIH7E9LfaBguXSzMmTk2Fw5p1aOQ6wfN
-goVAMVwi8ppAVs741PfHdZ295xMmK/1LCxz5DeAdD/tsA/SYfT753GotioDuC7im
-EyJ5JyvTr5I6RFFBuqt3NlUb3Hp16wP3B2x9DZiB6jxr0l341/NHgsyeBXkuIy9j
-ON2mvpBPCJhS8kgWo3G0UyyKnx64tcgpGuSvZhGwPz843B6AbYyE6pMRfSWRMkMS
-YZYa+VNKhR4ixdj07ocFZEWLVjCH7kxkE8JZXKt8jKYmkWd0lS1QVjgaKlO6lRa3
-q6SPJkhW6pvqobvcqVNXwi1XuzpZeEbuh0B7OTekFTTxx5g9XeDl56M8SVQ1KEhT
-Q1t7H2Nba18WCB7cf+6PN0F0K0Jz1Kq7ZWaqEI/grX1m4RQuvNF5807sB/QKMO/Z
-Gz3NXvHg5xTJRd/567lxPGkor0cE7qD1EZfmJ2HrBYXQ91bhgA7LToBuMZo6ZRXH
-QfsanjbP4FPLMiGdQigLjj3A35L/f4sQOOVac/sRaFnm7pzcxsMvyVU/YtvGcjYE
-xaOOVnamg661Wo0wksXoDjeSz/JIyyKO3Gwp1FSm2wGLjjy/Ehmqcqy8rvHuf07w
-AUukhVtTNn4=
+MIIE5TAcBgoqhkiG9w0BDAEBMA4ECHTqlBo01lkOAgIIAASCBMM6W9ZnVX28yt1o
+m1qzZCpCpn7B116hWgk/qWnSBEeT2i+wUeG22fDn17/XrcWIJT58k0/FGWiQn4yT
+Cya55z9J3JKwC22+BVlUErBmlanfwEXbJOjivEvMqSLd98smmA+nw8fUZnFBqH+O
+3sokCiRxK5t/PrC8ahWk+H800e9cvAViewxBwZkUGClVivs/oPAmAhgd4aqWS8Aw
+G4Bi58mUK8dL51cxapWXBR0oxBnedyhElNwgiSoBxUqgEB4yjS8SMAAEy+UReRnf
+kkkc0jyQi7aDhyRvRIm6OX7x/KPys1n4ZdckgaThh+VHitj2rb5xu/g0fxCRL+8W
+o4hcgDgsbYhs61ATO/7xqEFGTUqiRGQa3IgCey2gRHFRKh24OvUBJJK30jGDpT8X
+M0jcIeQGbclzqODPoSfxL51F8wVpbwv5VnsvnsPunNCYCpB3rXNSHQBFs9aiEdfF
+YNGH8wk9AYuya8Ji92XZ6pMheAfhbR5E5JeEZfo1gv1ZDEYLKhrFX30YjekU8L2h
+lyJpr0+nGhIAeKuw1FxQnTiIdv5Hs8wmBsGuMDK/gYPklLONHRw/G99sqqd1wB0l
+CLEZ8PVO/63dpXqoTrDJIRCsVa9/wanoX8XD5zDGFA2OLGuz24u9xJbcERegM5us
+DEKTZz/4XE2t3dFUzsf9EtBl4CkxKT4o7R+Q2akADGWp6x72XW/1LiGhRtFOjhsl
+enS5DONUCXndG2Sc3GemO63hWjlBsUAcz1mvJhd8zVK5Wg/FM0j8lhf9yFnPKd/f
++6gGnnhASjeoX/FlQl0Jm5J8++hmH0bXqfcQXIE+klUcSJOs0aP8byXndvfWmtKZ
+VoUFZL55MW2TeO1MC1jkVWu6QfTHWSC0g6Lz48MN3ASejsDa0/Wu+Z/Wowexd/ky
+Z+CHG5LMMULSl9LAAZzFLld0tt1Z/fPRsyWCl2km9+NIRHlKC3d8btkip6+3X8Io
+AVvLugD2HIM5Mkad7+CwQuS014aA69fCGl11Ei8slSvP7YlN4f9qX8ledWUFTSAb
+qTvHT3AkdDI9iuLXgjTE4/uxJy2vIe/OioxzdgrRMyJm+nP/yeYoudyAtFYwHTii
+omh4zoWeAWDFmI7MCwAGYI526QjFTcf3fg0Dg+dx1lqcjw5aTzqCnJ6TEQTXE/UH
+xpOtRuJUnA2dYNgtanoInu18HPxpKpJimpf2N64ZmAYuAdpaYuj7uV/7coYTINCP
+LbL0FTq5J2hRXBtCiTViTwPKHXvomiHuD38jRYJK87vWfcHrfus6AnFJ2w+S6DUw
+cHziCh0MvQG774nDAcpZAfumx7tA4qX92EwtETifRf5vA/AWzkkeu+su8Gyze3al
+3J9plGmZ+4V81rh188mWHFTBBThiIi6Tqm7iLO/YGDyI+9PWQT9nLSb/pCKk//ZV
+v0VXUEpLwW0Os7cMAkfgaddrjakuON4rQ9b1ixb8es7bJiYhyhUuPoopJ0nHNtNa
++Wtt5LRe1M8lqt++Xy+pmL95woCdGhvATYI0W6JJWJVIluequkhI/iQp0TdG7LlX
+A67qzWPCUIjYl8w/ydPLXo0803UKUZWYJ01eWdDKB16BYFBkT7uJlek/DZAOOb7q
+6Wo1KF3SnMiD
 -----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/standalone/io/certificates/trusted_certs.pem b/tests/standalone/io/certificates/trusted_certs.pem
index a474755..b037014 100644
--- a/tests/standalone/io/certificates/trusted_certs.pem
+++ b/tests/standalone/io/certificates/trusted_certs.pem
@@ -1,19 +1,18 @@
 -----BEGIN CERTIFICATE-----
-MIIDAzCCAeugAwIBAgIJAJ0MomS4Ck+8MA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
-BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
-WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAts1ijtBV92S2cOvpUMOSTp9c6A34nIGr0T5Nhz6XiqRVT+gv
-dQgmkdKJQjbvR60y6jzltYFsI2MpGVXY8h/oAL81D/k7PDB2aREgyBfTPAhBHyGw
-siR+2xYt5b/Zs99q5RdRqQNzNpLPJriIKvUsRyQWy1UiG2s7pRXQeA8qB0XtJdCj
-kFIi+G2bDsaffspGeDOCqt7t+yqvRXfSES0c/l7DIHaiMbbp4//ZNML3RNgAjPz2
-hCezZ+wOYajOIyoSPK8IgICrhYFYxvgWxwbLDBEfC5B3jOQsySe10GoRAKZz1gBV
-DmgReu81tYJmdgkc9zknnQtIFdA0ex+GvZlfWQIDAQABo1AwTjAdBgNVHQ4EFgQU
-ZPNbPXdGW4mYYeOCnJMD26E3NF8wHwYDVR0jBBgwFoAUZPNbPXdGW4mYYeOCnJMD
-26E3NF8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEATzkZ97K777uZ
-lQcduNX3ey4IbCiEzFA2zO5Blj+ilfIwNbZXNOgm/lqNvVGDYs6J1apJJe30vL3X
-J+t2zsZWzzQzb9uIU37zYemt6m0fHrSrx/iy5lGNqt3HMfqEcOqSCOIK3PCTMz2/
-uyGe1iw33PVeWsm1JUybQ9IrU/huJjbgOHU4wab+8SJCM49ipArp68Fr6j4lcEaE
-4rfRg1ZsvxiOyUB3qPn6wyL/JB8kOJ+QCBe498376eaem8AEFk0kQRh6hDaWtq/k
-t6IIXQLjx+EBDVP/veK0UnVhKRP8YTOoV8ZiG1NcdlJmX/Uk7iAfevP7CkBfSN8W
-r6AL284qtw==
+MIIC+zCCAeOgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
+YXV0aG9yaXR5MB4XDTE1MTAxMzE0MzQ0NFoXDTI1MTAxMDE0MzQ0NFowGDEWMBQG
+A1UEAwwNcm9vdGF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALLIFA1JvTuzPd0uD8uOxdGZmwlaRXyytqkQF66UGM+HLCmH6Vro5TpRL7Ka
+4fgEpbhS5purJqjpUiZkavxxBKQkdpxM0nH1lLX6NnR6UVh/Z3Tv6s8cR3o9L60J
+iH4N7hGdQH9Anz/PBXbshoMJqU+lZkOoqcmk4Tk27uxNlbpTLFoarm67hzqe4v/e
+xAfh4HoBZRVdnpWezM/7aX1hw2B2iFiU8pgyrVKZnXRhh4I6Ba1XTd37lc2d1fuf
+LaUICoAruR/ZhvRQaOtAN05dAHSOB9612WBBaEEiWzz/piEDEownZQ7NBWC5ANj4
+xRp7JPNtQtxYoju6j9MIJ4JoOQUCAwEAAaNQME4wHQYDVR0OBBYEFB+cb6pG1oSP
++zeiHVit/3jbTdQXMB8GA1UdIwQYMBaAFB+cb6pG1oSP+zeiHVit/3jbTdQXMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAC8PKipPvbQ0TXBKCMnCZiPI
+Vs7IfZuEzOgV6VByqveXuN8WJA2+ax9+2t1xuyIgftjj/uNJgm82AceVZqAtkGF0
+n29mPyoPC2tcrPHV2QUXy26+Rfb2JTQkkHXUnRtgU+gqnqugh+r9CCjoM0XkvR26
+/OrOmy7JIHtGPq5JEH9L73UryKKdQ3HS0ZkOMfxRyMNBa0y2/hYW8QDz/m0a1U9z
+q1rLvtYXZKWhz6dJJrphF6iBDzm+r6zo+uyCU7mps5wlGB9h4Ez8nx/Af1iT0HPE
+cl5zOR0RA5qefGx0hIuaxq0mHEYDY/coJ2rptvHwcnwgtSXBaQLe6MMNP+ElYDE=
 -----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/untrusted_server_chain.pem b/tests/standalone/io/certificates/untrusted_server_chain.pem
index 7d30df0..132c1f4 100644
--- a/tests/standalone/io/certificates/untrusted_server_chain.pem
+++ b/tests/standalone/io/certificates/untrusted_server_chain.pem
@@ -1,57 +1,57 @@
 -----BEGIN CERTIFICATE-----
-MIIDKTCCAhGgAwIBAgIJAOLkVK1iIzcgMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
-BAMMDGludGVybWVkaWF0ZTAeFw0xNTA1MjgxNTAyMTlaFw0yMzA4MTQxNTAyMTla
-MBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBAJTI9uVvjQ5jsHB+UcqhXOKXmt8QlK3gOZKYs9lCFoQYWVug3daDCYp6
-p1N7/lM+V0sDhYfALBjT9aetviTck8ZJ5rCJ1xzyY16/LnvTI9wjBeizyar5K57A
-vRwX+PB4OQi4nKszWXB++jYu7AYJsIwQwkNAk5kkpaVRlWqYkDm6JqtD6hAPxQV4
-0rrqQAXBY+SP0C8buhVNDmnkshmJnHnb/yodNmwdK0CkSN9TbVZi3UpsDRL1Tbo/
-i7fRrfVK5aTjdjT7yx/5Wh2jQ4nBdm7l5BFc2owHk0FGB9h5GMgs19RzHf+O+JCc
-SabuVSehtagIouiwHOJ5iFtiq6enF58CAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg
-hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
-BBYEFKpMad7rFfjy9iTqyCBJSWORnxqoMB8GA1UdIwQYMBaAFDqe3VrQlMZ2ABqb
-w16kdoDbumRuMA0GCSqGSIb3DQEBCwUAA4IBAQC9rRoBEcCZBVCBVZdckq0cWVYB
-IoMnpGk1ODv5Yp2b36LR3wwr2g+2u61s767L0+2ZGbGACkzWi3rJFSWIiH2j5zmi
-e+TvuOXFbw0r2PtiYDaoWIExzkC3rxnCSlUdbRPw1LI8bEd3+PYeZcEW0zs+xaId
-lctsWe8QC7EW3trLUFc8ASjED4uO83+2toqljkrD4SDnVz8t7O6bNrKrEDkNrxDW
-NHrbSP8m666U/A4MpH55BArfHNlUbzOZ6/jOkvcqhbL1pccJ2U1Ov3GnQGk7Vg+D
-JD1ptD6AHnjA8PCSkDOPibG4w9lRFWaUeAjtuCq1xJ3RFe5aUcUqgcxyF38B
+MIIDPDCCAiSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVpbnRl
+cm1lZGlhdGVhdXRob3JpdHkwHhcNMTUxMDEzMTQzNDMzWhcNMjUxMDEwMTQzNDMz
+WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDHQhbVk4kfjfIBK19ALltfqiF5Swiq3qx0FRnwOKyKsDsxk1PCYcON
+rFO74V62AwVSfbxBPAKOTVTDcCVlxMDq8rbFb5KAcqer+ayAl6545Bk0h2E9QPFD
+DuuGX0sHBuME54HjUC7KclyGU9MNxLe7hR8EkSbdSJD/UktWjLA/BkBpjCbKpy2D
+qgCmUEM6ViL/QjNNgNnTzkllhgK6UuwUTmqmS+7mImFA1Xd+5TU64Mlw/K4rRdXK
+36kCwpqR3+uz+QcXkto81JRTuzeviZiJe5P3ea+hYvAra3h0gRF0sX+Ypwj3svvr
+K3aoxLMy63s2e4m+qSP61jJKmUPfMfBvAgMBAAGjgYwwgYkwPAYDVR0RBDUwM4IJ
+bG9jYWxob3N0ggkxMjcuMC4wLjGCAzo6MYcEfwAAAYcQAAAAAAAAAAAAAAAAAAAA
+ATAJBgNVHRMEAjAAMB0GA1UdDgQWBBSimSv95R8Wzx8/eAb1V4+4G5QZhjAfBgNV
+HSMEGDAWgBRLBvtUNk6xwJifFnkGMNsp1ereMjANBgkqhkiG9w0BAQsFAAOCAQEA
+HrxC2/kUj5GGnWcihZZgmbuo9DS1qpu6K6w+Bed0PYN0A++ov4PXWj7FGDwA4Xz4
+WKlx75eX7H5SCpwmWVX+W+uZ7h3Zmvv/e7oQBcvciMSlHayfqaa266WAF4XYpDrg
+Vaf6KRZko6ovtBUQdcjEJisvk/SO0I1PqQvTrWEkF4LJmiiAzhpr7eobpxkuEe2G
+ggFELDM6HviEsJMDIkmvCIJWwJVccSQYz+TLxIYNQIwKS2yCvNg7Vf7EtffXi51Y
+0medhTHokJDzhifAL6z30L0kQu9KjPCpxgQ3V/v3rIoyvpyfW42jT4TnzWDZqjEL
+Tl4nFwH5ckHcm2RMaPTTcQ==
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIDAjCCAeqgAwIBAgIJAOLkVK1iIzcfMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
-BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTI4MTUwMjE5WhcNMjMwODE0MTUwMjE5
-WjAXMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
-DwAwggEKAoIBAQDS0BrhfsYaZcm68pdZ2j+TWXa/Ba5s3sKq9+EFcI5ZSq8/Atn+
-V17OgyjUYQDS//8lk0UydvHQmI6lTSAlLbIDfHMQZ1qxKGV75IgLmHO2RCoJ0W2p
-V74m6EZ3cMMOAFJ1WO292ee1H3ZynZSJcj5jxzLzJwOzaz9IjVVLpRdvm2xkhuIa
-M10aYn3gohGLaq8fe8sQx4ezx6nlqAFK1rZrMKgmPoDaV/Vsin71QywAjOApMp/c
-GkQjRzmUQf12NfXuvQU6ZP0M16e6Od0oAUFM+t0OjFUCcfhwRfGsoSesLof3Gc8+
-eJ7LbOFxWMvsFwsXkmeDvE6yuihBlPm38Va3AgMBAAGjUDBOMB0GA1UdDgQWBBQ6
-nt1a0JTGdgAam8NepHaA27pkbjAfBgNVHSMEGDAWgBSjeMkHbMP4BXJRnx4iJOhN
-ir7L+DAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAyQYc8ZrQZAlGw
-I0AFYaG/T3waQFr48j3evBEO9RT/3E8+rNbW4QKyzovJhBiNwkqJhn+WNW7B43zT
-jG3MqH3FTcQfjcXGxFUPh1HntMz7RbXs3Pv5G1f5knk6Hy63vG432kAEUZbrAdKV
-yBnR3/VqZd8cX1nzZkhEh9ePz6XTsKctXaHfnenQZJ3YwwNAwlNiNeXB/ykJliyh
-8AJxBQdx76TudXB0pl92bK0nsNVczGXg4UZ80GbCHGoYV9ZjQCX/G5ocquMB11Ou
-2n9iHTPHMdkahDvWwHggLXrCZK2to4N5zYz33dMhnRiR5hVZKaxuql1j9O2kwLCD
-Yb7VgstA
+MIIDAzCCAeugAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
+YXV0aG9yaXR5MB4XDTE1MTAxMzE0MzQzMloXDTI1MTAxMDE0MzQzMlowIDEeMBwG
+A1UEAwwVaW50ZXJtZWRpYXRlYXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAsOz8JUXytrHdpO4xZ1Rn2ON7JF5JeA6U8GddgV8Y4KPm9SAh
+6aHVI556z/oqCWlVnI/1aJRvPrI2rTBwcT49dkOlBcj3tzAcmSHepA5R37P1S5/p
+Wg+dPYmItmMxxW25YS4iPk1A/WQN83riRTwZhit4Asa8Gk5l3Rs5L4dleXk4vxN6
+FVL/uWMSVA3H3ELk66ieOrQLGgjIb/yPuOlzKDwzTRJ6nkG5X5lsQYPmN7t85oy6
+vuqBBdZ/s0S8qUbAIDa81pAyiBBN9gvfWQ8BJ9rJc4Tf4r3TupucJLCswLg9yT7y
+RE2FiyLsUSEg+YqhhfiCZDXO94Y4ek0fIbkajwIDAQABo1AwTjAMBgNVHRMEBTAD
+AQH/MB0GA1UdDgQWBBRLBvtUNk6xwJifFnkGMNsp1ereMjAfBgNVHSMEGDAWgBQv
+7fUg7ltvey4S1EAIQ5vX/kgEFTANBgkqhkiG9w0BAQsFAAOCAQEAIWN2IrusjYc7
+OBm2dM38h0v8QtTzQIergzeZPNIXbvNicJ+QTvRWNFxUY9B1dR4n1E8WOaUjuAuE
+BaoijJwGzZrVUlvNyGaO8v9ODe2i5hYcy2U2mMGCfdElmU9F5xw9g1iZE+7TorF8
+KkGIolhQ6r2VMDI8AU/YUAoTkPni6IL9qZZV2C/uQ5emW8rySv7VKlb+ze/JNsyo
+U4ubR6IVzza5ky/o/EhxqzbpnF8J+m5lYUqlYIs4M7KZOH0fGPebST+mYR+vV0CZ
+q93BD4B+N73Id1VQEFPofQtAw8Kh8C/MzDGZpuMs97phtN7cYhrQcqvnRaCyPT/q
+Jt202WYG+w==
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
-MIIDAzCCAeugAwIBAgIJALj/jZ2qE13WMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
-BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTI4MTUwMjE5WhcNMjMwODE0MTUwMjE5
-WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAp3u9wYL5IexhJAzuCDI1nL/JFT5itluFcGA2UjKF12hDUG5b
-ipvG8Oxi7oOo9Nk32sw5hqNVyCXp35znOZBnnQn6kkLNENRZ0JlprBYZVG+2jTZI
-jxSq8kYWMkeP21BmwfgPuorpfM8ClDCHbrOJuHFeP1U/rqj7A2Hw1VjuPD+5VmWK
-N8EeZsis1vOKWtrQfwEukCUfu6gScsIFa9Pie7r5YufYYWMUGPktI0r1r0S9iTY2
-femCqWIL4jfYKQ8d0ibYE7obM/fhIYUyhSZyCes3ffDpP22/puwkwZMopqIXaB17
-At6q4YXv9RjJQm/CXGoMBzddAiQbpStKA3nAxwIDAQABo1AwTjAdBgNVHQ4EFgQU
-o3jJB2zD+AVyUZ8eIiToTYq+y/gwHwYDVR0jBBgwFoAUo3jJB2zD+AVyUZ8eIiTo
-TYq+y/gwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAjOWWBiCBmzfu
-pvct3CMMDAgLB+N51SrDeowG++Zyv8mtEzaC2nSD2rwztrHKbRInflH5FclFFFKr
-EY7wfL86MZUECpA7QjRpwhaqe7d2uUmi+kOSg3I9AL0KVdM4jOIcNTrzrDjaUpsF
-v9U4ounXQyRI9x8H/v8rzMMQmEeq3DyKqOr6y46U6SspDDlLcGGxQz1olmNYsxw5
-ftY1/Q58HGDsUEMUC2hOCsKw8XxSguLln0inMXpws+rWOZLETN4+WMxZojYmLqz+
-DksVeUKBx1IJx3WLNkj/qk55w/4dJPBfddNJ76KFKxxYwzZ851Y9f6+OndRTGW1n
-XJOiJnRvlQ==
+MIIC+zCCAeOgAwIBAgIBATANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1yb290
+YXV0aG9yaXR5MB4XDTE1MTAxMzE0MzQzMloXDTI1MTAxMDE0MzQzMlowGDEWMBQG
+A1UEAwwNcm9vdGF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAM4Wx84AS3CwNP+Lm8YeQT3zg679qGfjrtE87qyvBipV4nPRz4ggls4nY99s
+VkoGcoZedL3E42/zR1RFQ5DZzzpf5NVYwwYtlDrhVQGb6k8zH6PK4KEou2JkV6oq
+GFy101vNAoxSeSlPetAU5MmHz/EO0alpvJZ5NKnUVTUD19U/CmTFMHL1RSsgWsPf
+UrFH58lt4v311i8vxvM3qFA7wO0Q2tptP6sf1PGSaS00W5HBFwNa8J3ewCN7opFt
+JxCbqrsG6ExG9o7gCDpY+tW2/ML24xrJfilGdhyM3H7qA6Y7ubTD/BbY+MoJxo4W
+XEEgNhMcw7uKaZngTS+DPaAP5NMCAwEAAaNQME4wHQYDVR0OBBYEFC/t9SDuW297
+LhLUQAhDm9f+SAQVMB8GA1UdIwQYMBaAFC/t9SDuW297LhLUQAhDm9f+SAQVMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAMpYu2n0fFULWM0dU06AH1yL
+anz1CywTTjFk0lwAmer+fexNrcc4VkWGp+XyOEZFMGRWfdixJ+F8SiOGrz83gKh+
+Z9FYJY6Ooj1y7KK8UQ78fOVUgVdPIdc3NjZFXnMz46oNXyYuOGnAyLSr8CeOQQNn
+h5TnNR82b6gun/Zu1qDPgTBfyMifdYp20GJpJMnAjx5NG/iJ/OMQCOfWfydOfLHH
+O1yxFOFfnzmeFAb9kz19bYp7UOK2C8XNyYoEuIgJo6tvlR5jIg6dT422jRSMOBtt
+55VZiS33SkH/hu1c3PoBF8QK9BPdv1QStz8k86nHMmbGk3tLmxQrYQ7SGQ6DDGo=
 -----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/untrusted_server_key.pem b/tests/standalone/io/certificates/untrusted_server_key.pem
index ecae29bdb..a72f6c9 100644
--- a/tests/standalone/io/certificates/untrusted_server_key.pem
+++ b/tests/standalone/io/certificates/untrusted_server_key.pem
@@ -1,29 +1,29 @@
 -----BEGIN ENCRYPTED PRIVATE KEY-----
-MIIE5DAcBgoqhkiG9w0BDAEBMA4ECPM4xVvIwo+2AgIIAASCBMJ/88x+fp/JrzbU
-TCCt4ic7v+w7nVPOpxtvbQAQ6/kWQcKyjNdeqqktlW/5NvhPOXYWzRZIFkts9BSh
-kyTHqxRa8QFn/PcoqKF6rRUCfoKfROQNnoNP/E//Z7dxg9sUPpHxs7tlwuoBr2dv
-Cnmh/WiJaeOvIEnFOa/ZwTljWjIEfmUHhVK351c6JyRVPDAPKsg2+hWNfQpdqPIz
-ptoDT+gGDY6rMp/eMbpu0g7Dal+q1sC/FQe5hGXWtIz27hHuJxY9V0yOwpW9Q5k9
-dg4KOqrJLW8O3ZF0l/oXOG+V5i9rMJWJyq9GR2LdxmdgL3nKibE6DCZXG/cMcY2O
-ApdCaUzyREM2Qidcp45rWNkVO+5enVh0tiYQY12vvUnDCq5ysKW3FmEXH+uBgy0l
-jh2Wkwlag3wwKis6YeSTQBYO5i+M5vqXXi/yZ5b45Jnjs6rhX5d7scmzaFeLitBz
-GQsNTvrQCNDmbcNVex5k10cxv9eAlsepTIlknwnFItqAmo2idf5Mh51hEvwb9jEQ
-BRLiQIEgmkba2YSU5Vg1SkAEzAm1FCcbc0U8UF90A/Uv/un0VNDii+PxCp8xskvr
-5PmKssF1q1GmuzyWpQ97HKKTP87r/a2OZhxDr876UQnBM6R6mrFF9efyARmc2a7l
-fkuBgpP0ExP69Br8KdWctuyCtIJtY/4CnCJZvEa0FTyurxqh+nrce/YBXZxK7f+2
-NWqEAIwTdmsIRvm6jAr7m/ySsXFP+wjcFVgJ3JwSHc+NO1/NhSSJFXD4dUH7+Xxw
-kUeH7jxrbcFDLA0zXLtVAMuyoX2HTp/AA+COsAXLLtSzifY8RPDloioeqFW2FZ3d
-mvsmjoCVyQK7sJ5+ZwlGqnwOtp2iK2VHjk/Y+J4HUBpcYkUjFFlqa8Bkc7w8BCkI
-nV+hWEQn3nAJiEXtK+PlJfWz4YKUTyOwCp1xvNOrBByXgG5w5bv9RtqpolyN6rh2
-WUcNtt36eMnzj6bBXib9VoOWD2ls0AIIl8EON4KIizI+inY21Lb9f15066UvRm6s
-5Rudi9v7iS+FcOG9bP2pg0sCoooLHqSVE2me1tcI3vDjZH8O3sjo4/YO7W0Vbc2+
-atxzq9cWGWZvpa7grafdqDhcRNqbpBGsUdq0Tps6pMnymjWWHK7x+m61R6wXafBm
-lyT9lyh7y3A9oTtO91QO1VhNY8E0bpF9EkGBIO+VCK7XNvRO7ITZdfsmCgjNQ14u
-iimruX0scOggq3xZ2VjPCrZXbWGO6GD1bJVFqBZmXLDq/YHHC0UbM2eQFcTWXKV3
-S2+pGmrBHlwPPQmvrLBQr8TMzRX/HOLCpUyuNU6bXrkyXIrBKBCj1XOmNtNUBe6O
-PcMQ7BoUf/zsR8XPFbQV+4pidsMNmm9j4g40CBFwAQv2INC385wJIIsjKxewPy+6
-cYmyTtQX+1XPACpQA8BLq9qNkvbJTeXAeAcoA21WtlJjREzpqRA6j0j7Em7oHJNe
-tH7EsBz+KdiYWk/xFRxHICn7TvLTpf5+Xw1pfZfV7Lxpk6ae2fcOr9MjkGqm5YqZ
-VQFdnJ8U+RNC7/yPxDoFqndSI3RsAIXFMvMDOMmToCGwDCt2fFWPgwZeGYj0Qh1c
-7shiDBng3TE=
+MIIE5TAcBgoqhkiG9w0BDAEBMA4ECMRqdkj+7kZPAgIIAASCBMOpU0aPEIY0+mrz
+ZjdJkd+yrsehwoRBsnevLvs07xY1yJzyQbOpJCSN/dCkTLaee+ob8dtgs9ZJNZJ+
+e05o86J7B+zPncKNS3A97QcKy9XlTRTU0IPynxka6U65gDT4w2qDRnRohsYNgf8s
+iLD+duupiN8fimd0TnL48Qimk6VJfcZ62wPQGL2IZmcuNKG0o2wOpbg4NGviTGSl
+9Cm2mOYO3dU2MVBXZa4KUMG7ZXdG0eCzC+Vs6blYnc4TiYskQ3fILr1kKAWvzhZX
+qbaApIIVzMOosH/UUNxMh8ReJJN0CGNIlzPFtNlwKPzv0gUuwt8IpcayNPgDfycr
+Uj+hvURrRZ5Ah/WpY6dW4WnSYXH5uieufvH/G3/f96deuXsCsS4nLnDRTH2Z3GJe
+OjkzmUesFDYtOhz5KyMGb0SDsqSlVoGt3vd3bR2MjYCBl3EugzfbBTLV7rBF7Pe5
+l3rALKCAhJsf/RWXvkObgH+zfLGzW0vPpLQOR7errXYgumXABK8hKJrs1fwV4KJt
+DKgOkCqVun3diXt6CSwotJCn1RCbc4qk4rNaXbF5uRNiiAvCdashSCEPhT6JGGy8
+o4/qoTc8mYIgsT1nbH9cFb8x2e+a0W/NaaO9VSWEj1v8h9pyVqBk1q5PKl1vhCnE
+5HkkpxEs2NYtuv6c+wsf1IZiGBKdkVJArl351WKkiUFhg5asEYN9y28/UL2AmXhC
+QwPeNu/I/GGf2bFLsVSi7PvvtRT8//CfVmoKxf+SjSU6jQfB4r+1gMEJlY0XIbw8
+Mie+QR7L+NXEEqrZs+w/eEUN6sTPwkUdvULyJm8Y21Qc9hyDl7KECKSfJ/qaj7aE
+41JCHBLfv4TpCOpmG/5RxCqLcIAdX7q8li9OcaHwCGuWt1ANYaRp1t3d69t10Vtq
+uu41Bo7ZgKZC7yTbhEEEywXBRzi6OZoOxEDpMmKiVakaDRV5aim0PWo4srdyMwpm
+n75+X6mNrsRiDKHzH3/SRA8u6LHVPKSisA0fIW9qOvZSV9T93+hsYwQsH/JQX7FS
+6dBQeMn/LHMDyi8FEAeSYvsNpZ3HFH0yCMxdmlV+WNJRGNuYe/DXqYtHnW8hmrXQ
+73jsfh1M72rNY4kLpuskuxzQ0fN0x8No6IYHReY7bA/YuTlwkPQZso0zqfSwCvaQ
+Vx0bf7ZKEAOAEJQwQDzCPK27CNHt5DqTXD2P1LZmA3S+XunrtgkPCcpeUwng0xXV
+cujmb5ND+kkA94F+jAXNOtMBCSDcYNOCXwNJ2vr4cOWsC31c/LgoUl+8oDbwIi5e
+s8HKhmUKNbo6wE9oN07zqPqP68Afy2LmwjxUt7ODF8gAAo+RbudrVrUm7IgiE2uo
+Cy3u9rbx9kJlTKvrMEgc+51+Oz9ZeUUG6I8mMltX6CpWqdpz2w8hrf9w8nIIK6ba
+iUJnrlaIJdqjAue0X9YFr+QDpF5Pua65vromGwleHmSHU4YhR780JlYxMpikg+i+
+uaPDuZOEwNlb+vlwk2m4pARYDlx7TQRZGdFcWevaco3dWQ2Uo1UPT5Wh4ZDXHNDs
+lUn/aqNAIuOgeT9hJZcPgj+K0cAH8g42VW1Ewl87HPyM+MfB/RGkRUOncVvc9Gms
+ipieyen0TlrX
 -----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/standalone/io/create_sample_certificates.sh b/tests/standalone/io/create_sample_certificates.sh
new file mode 100755
index 0000000..c9baee7
--- /dev/null
+++ b/tests/standalone/io/create_sample_certificates.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# 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.
+
+# Script to create sample certificates for the dart:io SecureSocket tests.
+# Creates a root certificate authority, an intermediate authority,
+# and a server certificate,
+
+password=pass:dartdart
+
+# We need a server certificate chain where we don't trust the root.  Take the
+# server certificate from the previous run of this script, for that purpose.
+if [ -d "certificates" ]; then
+  mv certificates/server_key.pem certificates/untrusted_server_key.pem
+  mv certificates/server_chain.pem certificates/untrusted_server_chain.pem
+else
+  mkdir certificates
+fi
+
+mkdir -p certificate_authority
+cd certificate_authority
+
+# Create a self-signed certificate authority.
+openssl req -subj /CN=rootauthority -set_serial 1 -batch -verbose \
+    -passout $password -new -x509 -keyout root_authority_key.pem \
+    -out root_authority.pem -days 3650
+
+# Create a certificate request for the intermediate authority.
+openssl req -subj /CN=intermediateauthority -batch -verbose \
+    -passout $password -new -keyout intermediate_authority_key.pem \
+    -out intermediate_authority_request.pem
+
+# Sign the certificate of the intermediate authority with the root authority.
+# Add the certificate extensions marking it as a certificate authority.
+openssl x509 -req -in intermediate_authority_request.pem \
+    -out intermediate_authority.pem -set_serial 1 \
+    -CA root_authority.pem -CAkey root_authority_key.pem \
+    -passin $password -extfile ../intermediate_authority_v3_extensions \
+    -days 3650
+
+# Create a certificate request for the server certificate
+openssl req -subj /CN=localhost -batch -verbose -passout $password -new \
+    -keyout localhost_key.pem -out localhost_request.pem
+
+# Sign the server certificate  with the intermediate authority.  Add the
+# certificate extensions for SubjectAltName and that it is not a CA itself.
+openssl x509 -req -in localhost_request.pem -out localhost.pem -set_serial 1 \
+    -CA intermediate_authority.pem -CAkey intermediate_authority_key.pem \
+    -passin $password -extfile ../localhost_v3_extensions -days 3650
+
+cat localhost.pem intermediate_authority.pem root_authority.pem \
+    > ../certificates/server_chain.pem
+
+# BoringSSL only accepts private keys signed with the PBE-SHA1-RC4-128 cipher.
+openssl pkcs8 -in localhost_key.pem -out ../certificates/server_key.pem \
+    -topk8 -v1 PBE-SHA1-RC4-128 -passin $password -passout $password
+
+cp root_authority.pem ../certificates/trusted_certs.pem
+
+cd ..
diff --git a/tests/standalone/io/intermediate_authority_v3_extensions b/tests/standalone/io/intermediate_authority_v3_extensions
new file mode 100644
index 0000000..8d0f70c
--- /dev/null
+++ b/tests/standalone/io/intermediate_authority_v3_extensions
@@ -0,0 +1,11 @@
+# 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.
+
+# OpenSSL configuration file giving the v3 extensions for an intermediate
+# certificate authority.
+
+basicConstraints = CA:true
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid:always,issuer
+
diff --git a/tests/standalone/io/localhost_v3_extensions b/tests/standalone/io/localhost_v3_extensions
new file mode 100644
index 0000000..99cc4d1
--- /dev/null
+++ b/tests/standalone/io/localhost_v3_extensions
@@ -0,0 +1,18 @@
+# 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.
+
+# OpenSSL configuration file giving the v3 extensions for the localhost
+# server certificate
+subjectAltName = @alt_names
+basicConstraints = CA:false
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer
+
+[alt_names]
+DNS.1 = localhost
+DNS.2 = 127.0.0.1
+DNS.3 = ::1
+IP.1 = 127.0.0.1
+IP.2 = ::1
+
diff --git a/tests/standalone/io/zlib_test.dart b/tests/standalone/io/zlib_test.dart
index 3392ffd..acb6e86 100644
--- a/tests/standalone/io/zlib_test.dart
+++ b/tests/standalone/io/zlib_test.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 import 'dart:io';
+import 'dart:typed_data';
 
 import "package:async_helper/async_helper.dart";
 import "package:expect/expect.dart";
@@ -39,9 +40,8 @@
   controller.close();
 }
 
-void testZLibDeflate() {
+void testZLibDeflate(List<int> data) {
   asyncStart();
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
   var controller = new StreamController(sync: true);
   controller.stream.transform(new ZLibEncoder(gzip: false, level: 6))
       .fold([], (buffer, data) {
@@ -59,9 +59,8 @@
   controller.close();
 }
 
-void testZLibDeflateGZip() {
+void testZLibDeflateGZip(List<int> data) {
   asyncStart();
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
   var controller = new StreamController(sync: true);
   controller.stream.transform(new ZLibEncoder(gzip: true))
       .fold([], (buffer, data) {
@@ -80,9 +79,8 @@
   controller.close();
 }
 
-void testZLibDeflateRaw() {
+void testZLibDeflateRaw(List<int> data) {
   asyncStart();
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
   var controller = new StreamController(sync: true);
   controller.stream.transform(new ZLibEncoder(raw: true, level: 6))
       .fold([], (buffer, data) {
@@ -112,9 +110,7 @@
   };
 }
 
-void testZLibInflate() {
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-
+void testZLibInflate(List<int> data) {
   [true, false].forEach((gzip) {
     [ZLibOption.STRATEGY_FILTERED, ZLibOption.STRATEGY_HUFFMAN_ONLY,
         ZLibOption.STRATEGY_RLE, ZLibOption.STRATEGY_FIXED,
@@ -141,9 +137,7 @@
   });
 }
 
-void testZLibInflateRaw() {
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-
+void testZLibInflateRaw(List<int> data) {
   [3, 6, 9].forEach((level) {
     asyncStart();
     var controller = new StreamController(sync: true);
@@ -163,9 +157,7 @@
   });
 }
 
-void testZLibInflateSync() {
-  var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-
+void testZLibInflateSync(List<int> data) {
   [true, false].forEach((gzip) {
     [3, 6, 9].forEach((level) {
       var encoded = new ZLibEncoder(gzip: gzip, level: level).convert(data);
@@ -219,19 +211,48 @@
   });
 }
 
+var generateListTypes = [
+  (list) => list,
+  (list) => new Uint8List.fromList(list),
+  (list) => new Int8List.fromList(list),
+  (list) => new Uint16List.fromList(list),
+  (list) => new Int16List.fromList(list),
+  (list) => new Uint32List.fromList(list),
+  (list) => new Int32List.fromList(list),
+];
+
+var generateViewTypes = [
+  (list) => new Uint8List.view((new Uint8List.fromList(list)).buffer, 1, 8),
+  (list) => new Int8List.view((new Int8List.fromList(list)).buffer, 1, 8),
+  (list) => new Uint16List.view((new Uint16List.fromList(list)).buffer, 2, 6),
+  (list) => new Int16List.view((new Int16List.fromList(list)).buffer, 2, 6),
+  (list) => new Uint32List.view((new Uint32List.fromList(list)).buffer, 4, 4),
+  (list) => new Int32List.view((new Int32List.fromList(list)).buffer, 4, 4),
+];
+
+
 void main() {
   asyncStart();
-  testZLibDeflate();
   testZLibDeflateEmpty();
   testZLibDeflateEmptyGzip();
-  testZLibDeflateGZip();
   testZLibDeflateInvalidLevel();
-  testZLibInflate();
-  testZLibInflateSync();
+  generateListTypes.forEach((f) {
+    var data = f([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+    testZLibDeflate(data);
+    testZLibDeflateGZip(data);
+    testZLibDeflateRaw(data);
+    testZLibInflate(data);
+    testZLibInflateSync(data);
+    testZLibInflateRaw(data);
+  });
+  generateViewTypes.forEach((f) {
+    var data = f([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+    testZLibInflate(data);
+    testZLibInflateSync(data);
+    testZLibInflateRaw(data);
+  });
   testZlibInflateThrowsWithSmallerWindow();
   testZlibInflateWithLargerWindow();
-  testZLibDeflateRaw();
-  testZLibInflateRaw();
   testZlibWithDictionary();
   asyncEnd();
 }
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index a1b6c50..125523a 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -157,6 +157,9 @@
 javascript_int_overflow_literal_test/01: Fail # Issue 14651.
 javascript_int_overflow_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
diff --git a/tests/try/try.status b/tests/try/try.status
index 722e5b9..d6d7ca7 100644
--- a/tests/try/try.status
+++ b/tests/try/try.status
@@ -10,6 +10,9 @@
 [ $compiler == dart2js && $runtime == drt ]
 web/end_to_end_test: Fail, Pass # https://code.google.com/p/v8/issues/detail?id=3347
 
+[ $compiler == none && $runtime == drt ]
+web/end_to_end_test: Fail # Issue 24568
+
 [ $csp ]
 web/end_to_end_test: Fail, OK # Issue 17935
 web/incremental_compilation_update_test: SkipByDesign # Test uses eval, not supported in CSP mode.
diff --git a/tools/VERSION b/tools/VERSION
index 6143c4e..2e0ad90 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 1
 MINOR 13
 PATCH 0
-PRERELEASE 6
+PRERELEASE 7
 PRERELEASE_PATCH 0
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index 431b2a8..bdb69f2 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -145,7 +145,7 @@
   PACKAGES_FILE = join(DARTDOC, '.packages')
   packages_file = open(PACKAGES_FILE, 'w')
   packages_file.write('dartdoc:.')
-  packages_file.close() 
+  packages_file.close()
 
 
 def Main():
@@ -232,7 +232,7 @@
                   join('html', 'dart2js'), join('html', 'dartium'),
                   join('html', 'html_common'),
                   join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'),
-                  'js', 'math', 'mirrors', 'profiler', 'typed_data',
+                  'js', 'math', 'mirrors', 'typed_data',
                   join('svg', 'dart2js'), join('svg', 'dartium'),
                   join('web_audio', 'dart2js'), join('web_audio', 'dartium'),
                   join('web_gl', 'dart2js'), join('web_gl', 'dartium'),
@@ -289,6 +289,7 @@
       f.close()
 
   Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
+  Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE'))
   Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md'))
 
   move(SDK_tmp, SDK)
diff --git a/tools/dartium/update_deps.py b/tools/dartium/update_deps.py
index 128a82e..a8b1b4b 100755
--- a/tools/dartium/update_deps.py
+++ b/tools/dartium/update_deps.py
@@ -46,31 +46,24 @@
 
 TARGETS = {
   'dartium': (
-    'https://dart.googlecode.com/svn/branches/bleeding_edge/deps/dartium.deps',
+    'git@github.com:dart-lang/sdk.git',
+    'tools/deps/dartium.deps',
+    'origin/master',
     'dartium',
     # TODO(vsm): Reenable 'chromium'
     ['webkit'],
     BRANCH_CURRENT,
     ),
   'integration': (
+    # TODO(jacobr): what is the git repo for integration if any?
     'https://dart.googlecode.com/svn/branches/dartium_integration/deps/dartium.deps',
+    'tools/deps/dartium.deps',
+    'origin/master',
     'dartium',
     # TODO(vsm): Reenable 'chromium'
     ['webkit'],
     BRANCH_NEXT,
     ),
-  'clank': (
-    'https://dart.googlecode.com/svn/branches/bleeding_edge/deps/clank.deps',
-    'dartium',
-    ['webkit', 'chromium'],
-    BRANCH_CURRENT,
-    ),
-  'multivm': (
-    'https://dart.googlecode.com/svn/branches/bleeding_edge/deps/multivm.deps',
-    'multivm',
-    ['blink'],
-    BRANCH_MULTIVM,
-    ),
 }
 
 # Each element in this map represents a repository to update.  Entries
@@ -187,7 +180,7 @@
 
 def main():
   option_parser = optparse.OptionParser()
-  option_parser.add_option('', '--target', help="Update one of [dartium|integration|multivm|clank]", action="store", dest="target", default="dartium")
+  option_parser.add_option('', '--target', help="Update one of [dartium|integration]", action="store", dest="target", default="dartium")
   option_parser.add_option('', '--force', help="Push DEPS update to server without prompting", action="store_true", dest="force")
   options, args = option_parser.parse_args()
 
@@ -195,19 +188,23 @@
   if not target in TARGETS.keys():
     print "Error: invalid target"
     print "Choose one of " + str(TARGETS)
-  (deps_dir, prefix, repos, branch) = TARGETS[target]
+  (repo_name, deps_dir, repo_branch, prefix, repos, branch) = TARGETS[target]
   deps_file = deps_dir + '/DEPS'
+  repo_branch_parts = repo_branch.split('/')
 
   src_dir = "/usr/local/google/home/%s/dartium_deps_updater/deps/%s" % (os.environ["USER"], target)
   os.putenv("GIT_PAGER", "")
 
   if not os.path.exists(src_dir):
-    print run_cmd(['svn', 'co', deps_dir, src_dir])
+    print run_cmd(['git', 'clone', repo_name, src_dir])
 
   os.chdir(src_dir)
+  deps = run_cmd(['git', 'fetch'])
+  deps = run_cmd(['git', 'stash'])
+  deps = run_cmd(['git', 'checkout', '-B', repo_branch_parts[1], repo_branch])
 
   # parse DEPS
-  deps = run_cmd(['svn', 'cat', deps_file])
+  deps = run_cmd(['cat', deps_file])
   rev_num = {}
   for repo in repos:
     revision = '%s_%s_revision":\s*"(.+)"' % (prefix, repo)
@@ -241,19 +238,20 @@
 
   # make the next DEPS update
   os.chdir(src_dir)
-  run_cmd(['rm', 'DEPS'])
-  print run_cmd(['svn', 'update'])
+  run_cmd(['rm', deps_file])
   s = pending_updates[0]
 
   pattern = re.compile(prefix + '_' + s['repo'] + '_revision":\s*"(.+)"')
   new_deps = pattern.sub(prefix + '_' + s['repo'] + '_revision": "' + s['rev'] + '"', deps)
-  write_file('DEPS', new_deps)
+  write_file(deps_file, new_deps)
 
   commit_log = 'DEPS AutoUpdate: %s to %s (%s) %s\n' % (s['repo'], s['rev'], s['isotime'], s['author'])
   commit_log += s['info'] + '\n' + commit_url(s['repo'], s['rev'])
 
   write_file('commit_log.txt', commit_log)
-  print run_cmd(['svn', 'diff'])
+  run_cmd(['git', 'add', deps_file])
+
+  print run_cmd(['git', 'diff', 'HEAD'])
   print
   print "Commit log:"
   print "---------------------------------------------"
@@ -263,7 +261,8 @@
   if not options.force:
     print "Ready to push; press Enter to continue or Control-C to abort..."
     sys.stdin.readline()
-  print run_cmd(['svn', 'commit', '--file', 'commit_log.txt'])
+  print run_cmd(['git', 'commit', '-F', 'commit_log.txt'])
+  print run_cmd(['git', 'push', repo_branch_parts[0], repo_branch_parts[1]])
   print "Done."
 
 
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index 0662675..13f641e 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -14,7 +14,7 @@
   "dartium_chromium_commit": "62a7524d4f71c9e0858d24b0aa1bbff3a2d09bff",
   "chromium_base_revision": "297060",
   "dartium_webkit_branch": "/blink/branches/dart/dartium",
-  "dartium_webkit_revision": "202673",
+  "dartium_webkit_revision": "202688",
 
   # We use mirrors of all github repos to guarantee reproducibility and
   # consistency between what users see and what the bots see.
@@ -36,7 +36,7 @@
   "collection_rev": "@1da9a07f32efa2ba0c391b289e2037391e31da0e",
   "crypto_rev" : "@2df57a1e26dd88e8d0614207d4b062c73209917d",
   "csslib_tag" : "@0.12.0",
-  "dart2js_info_rev" : "@ffd03ee45f7459efd3039ff565b4d0aa2e7cd9e7",
+  "dart2js_info_rev" : "@c4ad464717e3a304fb0d44a6937c25ff2049b863",
   "glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
   "html_tag" : "@0.12.1+1",
   "http_rev" : "@9b93e1542c753090c50b46ef1592d44bc858bfe7",
@@ -49,7 +49,7 @@
   "mime_rev": "@75890811d4af5af080351ba8a2853ad4c8df98dd",
   "metatest_rev": "@e5aa8e4e19fc4188ac2f6d38368a47d8f07c3df1",
   "oauth2_rev": "@1bff41f4d54505c36f2d1a001b83b8b745c452f5",
-  "observatory_pub_packages_rev": "@a731d3b1caf27b45aecdce9378b87a510240264d",
+  "observatory_pub_packages_rev": "@5c199c5954146747f75ed127871207718dc87786",
   "package_config_rev": "@0.1.3",
   "path_rev": "@b657c0854d1cf41c014986fa9d2321f1173df805",
   "plugin_tag": "@0.1.0",
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 2dd6db6..e207e79 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -197,6 +197,7 @@
   'CanvasRenderingContext2D.arc',
   'CanvasRenderingContext2D.drawImage',
   'CanvasRenderingContext2D.getLineDash',
+  'Crypto.getRandomValues',
   'CSSStyleDeclaration.getPropertyValue',
   'CSSStyleDeclaration.setProperty',
   'CSSStyleDeclaration.var',
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 222d8b1..226eed1 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -568,7 +568,7 @@
       elif (base_class == 'NativeFieldWrapperClass2' and
             self._options.dart_js_interop and
             not(isinstance(self._backend, Dart2JSBackend))):
-        base_class = 'JsoNativeFieldWrapper'
+        base_class = 'DartHtmlDomObject'
 
     annotations = self._metadata.GetFormattedMetadata(
         self._library_name, self._interface, None, '')
@@ -620,14 +620,12 @@
   {0}.internal_() : super.internal_();
 
 '''.format(class_name)
-    if base_class == 'NativeFieldWrapperClass2' or base_class == 'JsoNativeFieldWrapper':
+    if base_class == 'NativeFieldWrapperClass2' or base_class == 'DartHtmlDomObject':
         js_interop_wrapper = '''
   static {0} internalCreate{0}() {{
     return new {0}._internalWrap();
   }}
 
-  js.JsObject blink_jsObject;
-
   factory {0}._internalWrap() {{
     return new {0}.internal_();
   }}
@@ -642,7 +640,7 @@
             self._options.dart_js_interop and
             (self._interface.id == 'NamedNodeMap' or
              self._interface.id == 'CSSStyleDeclaration')):
-            base_class = 'JsoNativeFieldWrapper'
+            base_class = 'DartHtmlDomObject'
 
     implementation_members_emitter = implementation_emitter.Emit(
         self._backend.ImplementationTemplate(),
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 7177bc5..0e16172 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -516,7 +516,7 @@
     return template
 
   def RootClassName(self):
-    return 'NativeFieldWrapperClass2'
+    return 'DartHtmlDomObject'
 
   # This code matches up with the _generate_native_entry code in
   # dart_utilities.py in the dartium repository.  Any changes to this
diff --git a/tools/dom/src/dartium_CustomElementSupport.dart b/tools/dom/src/dartium_CustomElementSupport.dart
index d80f2c4..85ff4d6 100644
--- a/tools/dom/src/dartium_CustomElementSupport.dart
+++ b/tools/dom/src/dartium_CustomElementSupport.dart
@@ -27,11 +27,21 @@
   }
 
   Element upgrade(element) {
-    if (element.runtimeType != js.JsObjectImpl) {
-      throw new UnsupportedError('Element is incorrect type');
+    var jsObject;
+    var tag = _getCustomElementName(element);
+    if (element.runtimeType == HtmlElement || element.runtimeType == TemplateElement) {
+      jsObject = unwrap_jso(element);
+    } else if (element.runtimeType == js.JsObjectImpl) {
+      // It's a Polymer core element (written in JS).
+      jsObject = element;
+    } else {
+      throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObjectImpl.');
     }
 
-    return createCustomUpgrader(_nativeType, element);
+    // Remember Dart class to tagName for any upgrading done in wrap_jso.
+    _addCustomElementType(tag, _type);
+
+    return createCustomUpgrader(_nativeType, jsObject);
   }
 }
 
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index 9f74d3e..b18a026 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -124,6 +124,8 @@
     }
   }
 
+  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;
@@ -769,7 +771,7 @@
     return [
         "inspect",
         (o) {
-          host.inspect(o, null);
+          host.callMethod("inspect", [o]);
           return o;
         },
         "dir",
@@ -808,7 +810,7 @@
     _blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type);
 }
 
-class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements
+class _DOMWindowCrossFrame extends DartHtmlDomObject implements
     WindowBase {
   /** Needed because KeyboardEvent is implements.
    *  TODO(terry): Consider making blink_jsObject private (add underscore) for
@@ -859,7 +861,7 @@
     'You can only attach EventListeners to your own window.');
 }
 
-class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase {
+class _HistoryCrossFrame extends DartHtmlDomObject implements HistoryBase {
   _HistoryCrossFrame.internal();
 
   // Methods.
@@ -871,7 +873,7 @@
   String get typeName => "History";
 }
 
-class _LocationCrossFrame extends NativeFieldWrapperClass2 implements LocationBase {
+class _LocationCrossFrame extends DartHtmlDomObject implements LocationBase {
   _LocationCrossFrame.internal();
 
   // Fields.
@@ -881,7 +883,7 @@
   String get typeName => "Location";
 }
 
-class _DOMStringMap extends NativeFieldWrapperClass2 implements Map<String, String> {
+class _DOMStringMap extends DartHtmlDomObject implements Map<String, String> {
   _DOMStringMap.internal();
 
   bool containsValue(String value) => Maps.containsValue(this, value);
@@ -1112,5 +1114,5 @@
                                "are not supported in the browser"));
 
 // Class for unsupported native browser 'DOM' objects.
-class _UnsupportedBrowserObject extends NativeFieldWrapperClass2 {
+class _UnsupportedBrowserObject extends DartHtmlDomObject {
 }
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 25336a7..22158c9 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -61,6 +61,7 @@
 import 'dart:web_audio' show web_audioBlinkMap;
 import 'dart:web_audio' show web_audioBlinkFunctionMap;
 import 'dart:_blink' as _blink;
+import 'dart:developer';
 
 export 'dart:math' show Rectangle, Point;
 
@@ -117,7 +118,7 @@
   }
 $if DARTIUM
 $if JSINTEROP
-  _window = wrap_jso(js.context['window']);
+  _window = wrap_jso(js.JsNative.getProperty(js.context, 'window'));
 $else
   _window = _Utils.window();
 $endif
@@ -352,15 +353,75 @@
  ******************************************************************************/
 
 // List of known tagName to DartClass for custom elements, used for upgrade.
-var _knownCustomeElements = new Map<String, Type>();
+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 = _knownCustomElements[_getCustomElementName(object)];
+  if (entry != null) {
+    return entry['type'];
+  }
+  return null;
+}
+
+String _getCustomElementExtends(object) {
+  var entry = _knownCustomElements[_getCustomElementName(object)];
+  if (entry != null) {
+    return entry['extends'];
+  }
+  return null;
+}
+
+_getCustomElement(object) => _knownCustomElements[_getCustomElementName(object)];
+
+// Return the tag name or is attribute of the custom element or data binding.
+String _getCustomElementName(element) {
+  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.JsObjectImpl) {
+    // 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 {
+    throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObjectImpl.');
+  }
+
+  return tag;
+}
 
 Rectangle make_dart_rectangle(r) =>
-    r == null ? null : new Rectangle(r['left'], r['top'], r['width'], r['height']);
+    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'));
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
+/// An abstract class for all DOM objects we wrap in dart:html and related
+///  libraries.
+class DartHtmlDomObject {
+
+  /// The underlying JS DOM object.
+  js.JsObject blink_jsObject;
+
+}
 
 // Flag to disable JS interop asserts.  Setting to false will speed up the
 // wrap_jso calls.
@@ -387,11 +448,25 @@
       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 we have a wrapper return the Dart instance.
     if (wrapper != null) {
+      if (wrapper.runtimeType == HtmlElement && !wrapper._isBadUpgrade) {
+        // We're a Dart instance but we need to upgrade.
+        var customElementClass = _getCustomElementType(wrapper);
+        if (customElementClass != null) {
+          var dartClass_instance;
+          try {
+            dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
+          } finally {
+            dartClass_instance.blink_jsObject = jsObject;
+            jsObject['dart_class'] = dartClass_instance;
+            js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
+            return dartClass_instance;
+          }
+        }
+      }
+
       return wrapper;
     }
 
@@ -409,24 +484,36 @@
     if (!identical(converted, jsObject)) {
       return converted;
     }
-    var constructor = jsObject['constructor'];
-    if (__interop_checks) {
-      debug_or_assert("constructor != null", constructor != null);
+
+    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, jsObject);
+      return jsObject;
     }
-    var jsTypeName = constructor['name'];
-    if (__interop_checks) {
-      debug_or_assert("constructor != null && jsTypeName.length > 0", constructor != null && jsTypeName.length > 0);
+    var jsTypeName = js.JsNative.getProperty(constructor, 'name');
+    if (jsTypeName is! String || jsTypeName.length == 0) {
+      // Not an html type.
+      js.setDartHtmlWrapperFor(jsObject, jsObject);
+      return jsObject;
     }
 
     var dartClass_instance;
     if (jsObject.hasProperty('dart_class')) {
-      // Got a dart_class (it's a custom element) use it it's already set up.
-      dartClass_instance = jsObject['dart_class'];
+      // Got a dart_class (it's a custom element) use it it's already set up
+      // make sure it's upgraded.
+      dartClass_instance = _upgradeHtmlElement(jsObject['dart_class']);
     } else {
-      var localName = jsObject['localName'];
-      var customElementClass = _knownCustomeElements[localName];
+      var customElementClass = null;
+      var extendsTag = "";
+      var custom = _getCustomElement(jsObject);
+      if (custom != null) {
+        customElementClass = custom['type'];
+        extendsTag = custom['extends'];
+      }
       // Custom Element to upgrade.
-      if (jsTypeName == 'HTMLElement' && customElementClass != null) {
+      if (jsTypeName == 'HTMLElement' && customElementClass != null && extendsTag == "") {
         try {
           dartClass_instance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
         } finally {
@@ -435,7 +522,20 @@
           js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
        }
       } else {
+        // TODO(terry): Verify with jakemacd that this is right?
+        // If we every get an auto-binding we're matching previous non-JS Interop
+        // did to return a TemplateElement.
+        if (jsTypeName == 'auto-binding') {
+          jsTypeName = "HTMLTemplateElement";
+        }
+
         var func = getHtmlCreateFunction(jsTypeName);
+        if (func == null) {
+          // One last ditch effort could be a JS custom element.
+          if (jsObject.toString() == "[object HTMLElement]") {
+            func = getHtmlCreateFunction("HTMLElement");
+          }
+        }
         if (func != null) {
           dartClass_instance = func();
           dartClass_instance.blink_jsObject = jsObject;
@@ -443,6 +543,7 @@
         }
       }
     }
+    // TODO(jacobr): cache that this is not a dart:html JS class.
     return dartClass_instance;
   } catch(e, stacktrace){
     if (__interop_checks) {
@@ -457,6 +558,66 @@
 }
 
 /**
+ * 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) {
+      var wrappingList = new _DartHtmlWrappingList(jsObject);
+      js.setDartHtmlWrapperFor(jsObject, wrappingList);
+      return wrappingList;
+    }
+
+    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, jsObject);
+      return jsObject;
+    }
+    var jsTypeName = js.JsNative.getProperty(constructor, 'name');
+    if (jsTypeName is! String || jsTypeName.length == 0) {
+      // Not an html type.
+      js.setDartHtmlWrapperFor(jsObject, jsObject);
+      return jsObject;
+    }
+
+    var func = getHtmlCreateFunction(jsTypeName);
+    if (func != null) {
+      var dartClass_instance = func();
+      dartClass_instance.blink_jsObject = jsObject;
+      js.setDartHtmlWrapperFor(jsObject, dartClass_instance);
+      return dartClass_instance;
+    }
+    return jsObject;
+  } 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.
@@ -495,6 +656,33 @@
   }
 }
 
+// Upgrade a Dart HtmlElement to the user's Dart custom element class.
+_upgradeHtmlElement(dartInstance) {
+  // Only try upgrading HtmlElement (Dart class) if there is a failure then
+  // don't try it again - one failure is enough.
+  if (dartInstance.runtimeType == HtmlElement && !dartInstance._isBadUpgrade) {
+    // Must be exactly HtmlElement not something derived from it.
+
+    var customElementClass = _getCustomElementType(dartInstance);
+
+    // Custom Element to upgrade.
+    if (customElementClass != null) {
+      var jsObject = dartInstance.blink_jsObject;
+      try {
+        dartInstance = _blink.Blink_Utils.constructElement(customElementClass, jsObject);
+      } catch (e) {
+        dartInstance._badUpgrade();
+      } finally {
+        dartInstance.blink_jsObject = jsObject;
+        jsObject['dart_class'] = dartInstance;
+        js.setDartHtmlWrapperFor(jsObject, dartInstance);
+     }
+   }
+  }
+
+  return dartInstance;
+}
+
 class DebugAssertException implements Exception {
   String message;
   DebugAssertException(this.message);
@@ -525,9 +713,9 @@
 
 Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) {
   var result = new Map();
-  var keys = js.context['Object'].callMethod('keys', [jsObject]);
+  var keys = js.JsNative.callMethod(js.JsNative.getProperty(js.context, 'Object'), 'keys', [jsObject]);
   for (var key in keys) {
-    result[key] = wrap_jso(jsObject[key]);
+    result[key] = wrap_jso(js.JsNative.getProperty(jsObject, key));
   }
   return result;
 }
@@ -538,7 +726,7 @@
 // code in html_common and be more general.
 convertDartToNative_Dictionary(Map dict) {
   if (dict == null) return null;
-  var jsObject = new js.JsObject(js.context['Object']);
+  var jsObject = new js.JsObject(js.JsNative.getProperty(js.context, 'Object'));
   dict.forEach((String key, value) {
     if (value is List) {
       var jsArray = new js.JsArray();
@@ -562,17 +750,17 @@
 /**
  * Wraps a JsArray and will call wrap_jso on its entries.
  */
-class _DartHtmlWrappingList extends ListBase {
-  _DartHtmlWrappingList(this._basicList);
+class _DartHtmlWrappingList extends ListBase implements NativeFieldWrapperClass2 {
+  _DartHtmlWrappingList(this.blink_jsObject);
 
-  final js.JsArray _basicList;
+  final js.JsArray blink_jsObject;
 
-  operator [](int index) => wrap_jso(_basicList[index]);
+  operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, index));
 
-  operator []=(int index, value) => _basicList[index] = unwrap_jso(value);
+  operator []=(int index, value) => blink_jsObject[index] = value;
 
-  int get length => _basicList.length;
-  int set length(int newLength) => _basicList.length = newLength;
+  int get length => blink_jsObject.length;
+  int set length(int newLength) => blink_jsObject.length = newLength;
 }
 
 /**
@@ -583,19 +771,20 @@
   try {
     dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
   } catch (e) {
+    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. 
-    $this['dart_class'] = dartClass;
+    // with as we talk to blink.
+    js.setDartHtmlWrapperFor($this, dartClass);
   }
 
   return dartClass;
 }
 
 $else
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
+class DartHtmlDomObject extends NativeFieldWrapperClass2 {}
 
 unwrap_jso(dartClass_instance) => dartClass_instance;
 wrap_jso(jsObject) => jsObject;
diff --git a/tools/dom/templates/html/dartium/svg_dartium.darttemplate b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
index 07de26b..0a34b64 100644
--- a/tools/dom/templates/html/dartium/svg_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
@@ -22,11 +22,6 @@
 
 part '$AUXILIARY_DIR/shared_SVGFactoryProviders.dart';
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
-
 $!GENERATED_DART_FILES
 // FIXME: Can we make this private?
 final svgBlinkMap = {
diff --git a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
index 7c2ffbd..2a5d04a 100644
--- a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
@@ -24,11 +24,6 @@
 import 'dart:_blink' as _blink;
 import 'dart:js' as js;
 
-// Need a default constructor for constructing classes with mixins that are
-// also extending NativeFieldWrapperClass2.  Defining JsoNativeFieldWrapper
-// extending NativeFieldWrapperClass2 creates a default constructor.
-class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
-
 $!GENERATED_DART_FILES
 // FIXME: Can we make this private?
 final web_sqlBlinkMap = {
diff --git a/tools/dom/templates/html/impl/impl_Crypto.darttemplate b/tools/dom/templates/html/impl/impl_Crypto.darttemplate
new file mode 100644
index 0000000..1da09bb
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_Crypto.darttemplate
@@ -0,0 +1,26 @@
+// 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.
+
+part of $LIBRARYNAME;
+
+$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
+
+  TypedData getRandomValues(TypedData array) {
+$if DART2JS
+    return _getRandomValues(array);
+$else
+    var random = _getRandomValues(array);
+    // The semantics of the operation are that it modifies the argument, but we
+    // have no way of making a Dart typed data created initially in Dart reference
+    // externalized storage. So we copy the values back from the returned copy.
+    // TODO(alanknight): Make this less ridiculously slow.
+    for (var i = 0; i < random.length; i++) {
+      array[i] = random[i];
+    }
+    return array;
+$endif
+  }
+
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
index 29feca9..c4de5c6 100644
--- a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
@@ -34,6 +34,11 @@
       e._initCustomEvent(type, canBubble, cancelable, null);
     }
 
+$if DARTIUM
+    // Need for identity.
+    e.blink_jsObject['dart_class'] = e;
+
+$endif
     return e;
   }
 
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index 99b2dc0..2060813 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -74,17 +74,15 @@
       _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
       _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
 
-    var wrapped;
-
-    if (newElement['dart_class'] != null) {
-      wrapped = newElement['dart_class'];         // Here's our Dart class.
+    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 {
-        wrapped.blink_jsObject['dart_class'] = wrapped;
+        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);
       }
     }
 
@@ -121,15 +119,15 @@
 
     var wrapped;
 
-    if (newElement['dart_class'] != null) {
-      wrapped = newElement['dart_class'];         // Here's our Dart class.
+    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 {
-        wrapped.blink_jsObject['dart_class'] = wrapped;
+        js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);  // Here's our Dart class.
       }
     }
 
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 6bc60a1..3c6e3a4 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -282,10 +282,8 @@
 
         // Get the created constructor source and look at the initializer;
         // Must call super.created() if not its as an error.
-        var createdSource = methodMirror.source?.replaceAll('\n', ' ');
-        RegExp regExp = new RegExp(r":(.*?)(;|}|\n)");
-        var match = regExp.firstMatch(createdSource);
-        superCreatedCalled = match.input.substring(match.start,match.end).contains("super.created(");
+        var createdSource = methodMirror.source;
+        superCreatedCalled = createdSource.contains("super.created(");
       }
 
       if (!superCreatedCalled) {
@@ -353,10 +351,18 @@
     _registerCustomElement(JS('', 'window'), this, tag, customElementClass,
         extendsTag);
 $else
-    // TODO(terry): Need to handle the extendsTag.
-
     // Figure out which DOM class is being extended from the user's Dart class.
     var classMirror = reflectClass(customElementClass);
+
+    var locationUri = classMirror.location.sourceUri.toString();
+    if (locationUri == 'dart:html' || locationUri == 'dart:svg') {
+      throw new DomException.jsInterop("HierarchyRequestError: Cannot register an existing dart:html or dart:svg type.");
+    }
+
+    if (classMirror.isAbstract) {
+      throw new DomException.jsInterop("HierarchyRequestError: Cannot register an abstract class.");
+    }
+
     var jsClassName = _getJSClassName(classMirror);
     if (jsClassName == null) {
       // Only components derived from HTML* can be extended.
@@ -370,15 +376,15 @@
       //
       //     var myProto = Object.create(HTMLElement.prototype);
       //     var myElement = document.registerElement('x-foo', {prototype: myProto});
-      var baseElement = js.context[jsClassName];
+      var baseElement = js.JsNative.getProperty(js.context, jsClassName);
       if (baseElement == null) {
         // Couldn't find the HTML element so use a generic one.
-        baseElement = js.context['HTMLElement'];
+        baseElement = js.JsNative.getProperty(js.context, 'HTMLElement');
       }
-      var elemProto = js.context['Object'].callMethod("create", [baseElement['prototype']]);
+      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.
-      _knownCustomeElements[tag] = customElementClass;
+      _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.,
@@ -392,7 +398,8 @@
       //
       //              See https://github.com/dart-lang/sdk/issues/23666
       int creating = 0;
-      elemProto['createdCallback'] = new js.JsFunction.withThis(($this) {
+      // TODO(jacobr): warning:
+      elemProto['createdCallback'] = js.JsNative.withThis(($this) {
         if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
           creating++;
 
@@ -401,35 +408,30 @@
             dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
           } catch (e) {
             dartClass = HtmlElement.internalCreateHtmlElement();
+            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. 
-            $this['dart_class'] = dartClass;
+            // with as we talk to blink.
+            js.setDartHtmlWrapperFor($this, dartClass);
 
             creating--;
           }
         }
       });
       elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
-        if ($this["dart_class"] != null && $this['dart_class'].attributeChanged != null) {
-          $this['dart_class'].attributeChanged(attrName, oldVal, newVal);
-        }
+        $this.attributeChanged(attrName, oldVal, newVal);
       });
       elemProto['attachedCallback'] = new js.JsFunction.withThis(($this) {
-        if ($this["dart_class"] != null && $this['dart_class'].attached != null) {
-          $this['dart_class'].attached();
-        }
+        $this.attached();
       });
       elemProto['detachedCallback'] = new js.JsFunction.withThis(($this) {
-        if ($this["dart_class"] != null && $this['dart_class'].detached != null) {
-          $this['dart_class'].detached();
-        }
+        $this.detached();
       });
       // document.registerElement('x-foo', {prototype: elemProto, extends: extendsTag});
       var jsMap = new js.JsObject.jsify({'prototype': elemProto, 'extends': extendsTag});
-      js.context['document'].callMethod('registerElement', [tag, jsMap]);
+      js.JsNative.callMethod(js.JsNative.getProperty(js.context, '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
new file mode 100644
index 0000000..fdc305f
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_HTMLElement.darttemplate
@@ -0,0 +1,17 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 $LIBRARYNAME;
+
+@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;
+  bool get _isBadUpgrade => _badUpgradeOccurred;
+  void _badUpgrade() { _badUpgradeOccurred = true; }
+$endif
+}
diff --git a/tools/gyp/configurations_make.gypi b/tools/gyp/configurations_make.gypi
index 9f8b0e2..683ca51 100644
--- a/tools/gyp/configurations_make.gypi
+++ b/tools/gyp/configurations_make.gypi
@@ -71,19 +71,19 @@
 
       'Dart_Linux_simarm_Base': {
         'abstract': 1,
-        'cflags': [ '-O3', '-m32', '-msse2' ],
+        'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
         'ldflags': [ '-m32', ],
       },
 
       'Dart_Linux_simarmv5te_Base': {
         'abstract': 1,
-        'cflags': [ '-O3', '-m32', '-msse2' ],
+        'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
         'ldflags': [ '-m32', ],
       },
 
       'Dart_Linux_simarm64_Base': {
         'abstract': 1,
-        'cflags': [ '-O3', '-m64', '-msse2' ],
+        'cflags': [ '-O3', '-m64', '-msse2', '-mfpmath=sse' ],
         'ldflags': [ '-m64', ],
       },
 
@@ -100,7 +100,7 @@
           ],
         }],
         ['_toolset=="host"', {
-          'cflags': ['-m32', '-msse2'],
+          'cflags': ['-m32', '-msse2', '-mfpmath=sse' ],
           'ldflags': ['-m32'],
         }]]
       },
@@ -131,7 +131,7 @@
           ],
         }],
         ['_toolset=="host"', {
-          'cflags': ['-m32', '-msse2'],
+          'cflags': ['-m32', '-msse2', '-mfpmath=sse' ],
           'ldflags': ['-m32'],
         }]]
       },
@@ -170,7 +170,7 @@
 
       'Dart_Linux_simmips_Base': {
         'abstract': 1,
-        'cflags': [ '-O3', '-m32', '-msse2' ],
+        'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
         'ldflags': [ '-m32', ],
       },
 
@@ -190,7 +190,7 @@
             ],
           }],
           ['_toolset=="host"',{
-            'cflags': [ '-O3', '-m32', '-msse2' ],
+            'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
             'ldflags': [ '-m32' ],
         }]]
       },