Version 0.6.5.0 .

svn merge -r 24916:25013  https://dart.googlecode.com/svn/branches/bleeding_edge trunk

git-svn-id: http://dart.googlecode.com/svn/trunk@25017 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkg/analyzer_experimental/lib/analyzer.dart b/pkg/analyzer_experimental/lib/analyzer.dart
index 47ca97c..2a9d9ac 100644
--- a/pkg/analyzer_experimental/lib/analyzer.dart
+++ b/pkg/analyzer_experimental/lib/analyzer.dart
@@ -6,7 +6,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 import 'src/error.dart';
 import 'src/generated/ast.dart';
diff --git a/pkg/analyzer_experimental/lib/src/services/runtime/coverage/coverage_impl.dart b/pkg/analyzer_experimental/lib/src/services/runtime/coverage/coverage_impl.dart
index f747ce6..109ca39 100644
--- a/pkg/analyzer_experimental/lib/src/services/runtime/coverage/coverage_impl.dart
+++ b/pkg/analyzer_experimental/lib/src/services/runtime/coverage/coverage_impl.dart
@@ -10,7 +10,7 @@
 import 'dart:io';
 import 'dart:json' as json;
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 import 'package:analyzer_experimental/src/generated/source.dart' show Source, SourceRange;
 import 'package:analyzer_experimental/src/generated/scanner.dart' show StringScanner;
diff --git a/pkg/analyzer_experimental/pubspec.yaml b/pkg/analyzer_experimental/pubspec.yaml
index 13b0f89..6e556fc 100644
--- a/pkg/analyzer_experimental/pubspec.yaml
+++ b/pkg/analyzer_experimental/pubspec.yaml
@@ -5,6 +5,6 @@
 dependencies:
   args: any
   logging: any
-  pathos: any
+  path: any
 dev_dependencies:
   unittest: any
diff --git a/pkg/analyzer_experimental/test/utils.dart b/pkg/analyzer_experimental/test/utils.dart
index 92bf53e..637fe0c 100644
--- a/pkg/analyzer_experimental/test/utils.dart
+++ b/pkg/analyzer_experimental/test/utils.dart
@@ -7,7 +7,7 @@
 import 'dart:io';
 
 import 'package:analyzer_experimental/analyzer.dart';
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 /// Returns the string representation of the [AnalyzerErrorGroup] thrown when
 /// parsing [contents] as a Dart file. If [contents] doesn't throw any errors,
diff --git a/pkg/barback/lib/src/asset_id.dart b/pkg/barback/lib/src/asset_id.dart
index f9e325c..d514a76 100644
--- a/pkg/barback/lib/src/asset_id.dart
+++ b/pkg/barback/lib/src/asset_id.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 /// AssetIDs always use POSIX style paths regardless of the host platform.
 final _posix = new pathos.Builder(style: pathos.Style.posix);
diff --git a/pkg/barback/pubspec.yaml b/pkg/barback/pubspec.yaml
index 903fa41..dcb2061 100644
--- a/pkg/barback/pubspec.yaml
+++ b/pkg/barback/pubspec.yaml
@@ -12,6 +12,7 @@
   Runs transforms asynchronously and in parallel when possible to maximize
   responsiveness.
 dependencies:
-  pathos: any
+  path: any
 dev_dependencies:
   scheduled_test: any
+  unittest: any
diff --git a/pkg/barback/test/asset_test.dart b/pkg/barback/test/asset_test.dart
index c2ecefc..395dbfd 100644
--- a/pkg/barback/test/asset_test.dart
+++ b/pkg/barback/test/asset_test.dart
@@ -9,7 +9,7 @@
 import 'dart:utf';
 
 import 'package:barback/barback.dart';
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 import 'package:unittest/unittest.dart';
 
 import 'utils.dart';
diff --git a/pkg/barback/test/utils.dart b/pkg/barback/test/utils.dart
index f14ff3d..0641a57 100644
--- a/pkg/barback/test/utils.dart
+++ b/pkg/barback/test/utils.dart
@@ -10,11 +10,9 @@
 
 import 'package:barback/barback.dart';
 import 'package:barback/src/asset_graph.dart';
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 import 'package:scheduled_test/scheduled_test.dart';
-
-// TODO(rnystrom): Get rid of this or find a better path for it.
-import '../../../sdk/lib/_internal/pub/test/command_line_config.dart';
+import 'package:unittest/compact_vm_config.dart';
 
 var _configured = false;
 
@@ -29,7 +27,7 @@
 void initConfig() {
   if (_configured) return;
   _configured = true;
-  unittestConfiguration = new CommandLineConfiguration();
+  useCompactVMConfiguration();
 }
 
 /// Creates a new [AssetProvider] and [AssetGraph] with the given [assets] and
diff --git a/pkg/docgen/bin/upload_docgen.py b/pkg/docgen/bin/upload_docgen.py
new file mode 100644
index 0000000..b7cdb92
--- /dev/null
+++ b/pkg/docgen/bin/upload_docgen.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+""" This file will run docgen.dart on the SDK libraries, and upload them to 
+  Google Cloud Storage for the documentation viewer. 
+"""
+
+import os
+from os.path import join, dirname, abspath, exists 
+import platform
+import subprocess
+import sys
+sys.path.append(abspath(join(dirname(__file__), '../../../tools')))
+import utils
+from upload_sdk import ExecuteCommand
+
+
+DART = abspath(join(dirname(__file__), '../../../%s/%s/dart-sdk/bin/dart' 
+    % (utils.BUILD_ROOT[utils.GuessOS()], utils.GetBuildConf('release', 
+    utils.GuessArchitecture()))))
+GSUTIL = utils.GetBuildbotGSUtilPath()
+GS_SITE = 'gs://dartlang-docgen'
+
+
+def SetGsutil():
+  """ If not on buildbots, find gsutil relative to docgen. """
+  global GSUTIL
+  if not exists(GSUTIL):
+    GSUTIL = abspath(join(dirname(__file__), 
+        '../../../third_party/gsutil/gsutil'))
+
+
+def Upload(source, target):
+  """ Upload files to Google Storage. """
+  cmd = [GSUTIL, '-m', 'cp', '-q', '-a', 'public-read', '-r', source, target]
+  (status, output) = ExecuteCommand(cmd)
+  return status
+
+
+def main():
+  SetGsutil()
+
+  # Execute Docgen.dart on the SDK.
+  ExecuteCommand([DART, abspath(join(dirname(__file__), 'docgen.dart')), 
+      '--parse-sdk'])
+  
+  # Use SVN Revision to get the revision number.
+  revision = utils.GetSVNRevision()
+  if revision is None:
+    # Try to find the version from the dart-sdk folder. 
+    revision_file_location = abspath(join(dirname(__file__), 
+        '../../../%s/%s/dart-sdk/revision' % (utils.BUILD_ROOT[utils.GuessOS()],
+        utils.GetBuildConf('release', utils.GuessArchitecture()))))
+    with open(revision_file_location, 'r') as revision_file:
+      revision = revision_file.readline(5)
+      revision_file.close()
+    
+    if revision is None:
+      raise Exception("Unable to find revision. ")
+
+  # Upload the all files in Docs into a folder based off Revision number on 
+  # Cloud Storage.
+  Upload('./docs/*', GS_SITE + '/' + revision + '/')
+
+  # Update VERSION file in Cloud Storage. 
+  with open('VERSION', 'w') as version_file:
+    version_file.write(revision)
+    version_file.close()
+  Upload('./VERSION', GS_SITE + '/VERSION')
+
+  # Clean up the files it creates. 
+  ExecuteCommand(['rm', '-rf', './docs'])
+  ExecuteCommand(['rm', '-f', './VERSION'])
+
+
+if __name__ == '__main__':
+  main()
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index 3431fe8..357fe96 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -3,14 +3,14 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /**
- * **docgen** is a tool for creating machine readable representations of Dart 
+ * **docgen** is a tool for creating machine readable representations of Dart
  * code metadata, including: classes, members, comments and annotations.
- * 
- * docgen is run on a `.dart` file or a directory containing `.dart` files. 
- * 
+ *
+ * docgen is run on a `.dart` file or a directory containing `.dart` files.
+ *
  *      $ dart docgen.dart [OPTIONS] [FILE/DIR]
  *
- * This creates files called `docs/<library_name>.yaml` in your current 
+ * This creates files called `docs/<library_name>.yaml` in your current
  * working directory.
  */
 library docgen;
@@ -21,7 +21,7 @@
 
 import 'package:logging/logging.dart';
 import 'package:markdown/markdown.dart' as markdown;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'dart2yaml.dart';
 import 'src/io.dart';
@@ -47,48 +47,48 @@
 /// Current member being documented to be used for comment links.
 MemberMirror _currentMember;
 
-/// Resolves reference links in doc comments. 
+/// Resolves reference links in doc comments.
 markdown.Resolver linkResolver;
 
 /**
  * Docgen constructor initializes the link resolver for markdown parsing.
- * Also initializes the command line arguments. 
- * 
- * [packageRoot] is the packages directory of the directory being analyzed. 
- * If [includeSdk] is `true`, then any SDK libraries explicitly imported will 
- * also be documented. 
- * If [parseSdk] is `true`, then all Dart SDK libraries will be documented. 
- * This option is useful when only the SDK libraries are needed. 
- * 
- * Returns `true` if docgen sucessfuly completes. 
+ * Also initializes the command line arguments.
+ *
+ * [packageRoot] is the packages directory of the directory being analyzed.
+ * If [includeSdk] is `true`, then any SDK libraries explicitly imported will
+ * also be documented.
+ * If [parseSdk] is `true`, then all Dart SDK libraries will be documented.
+ * This option is useful when only the SDK libraries are needed.
+ *
+ * Returns `true` if docgen sucessfuly completes.
  */
-Future<bool> docgen(List<String> files, {String packageRoot, 
+Future<bool> docgen(List<String> files, {String packageRoot,
     bool outputToYaml: true, bool includePrivate: false, bool includeSdk: false,
-    bool parseSdk: false}) {    
+    bool parseSdk: false}) {
   if (packageRoot == null && !parseSdk) {
-    // TODO(janicejl): At the moment, if a single file is passed it, it is 
-    // assumed that it does not have a package root unless it is passed in by 
-    // the user. In future, find a better way to find the packageRoot and also 
-    // fully test finding the packageRoot. 
-    if (FileSystemEntity.typeSync(files.first) 
+    // TODO(janicejl): At the moment, if a single file is passed it, it is
+    // assumed that it does not have a package root unless it is passed in by
+    // the user. In future, find a better way to find the packageRoot and also
+    // fully test finding the packageRoot.
+    if (FileSystemEntity.typeSync(files.first)
         == FileSystemEntityType.DIRECTORY) {
       packageRoot = _findPackageRoot(files.first);
     }
   }
   logger.info('Package Root: ${packageRoot}');
-  
-  linkResolver = (name) => 
+
+  linkResolver = (name) =>
       fixReference(name, _currentLibrary, _currentClass, _currentMember);
-  
+
   return getMirrorSystem(files, packageRoot, parseSdk: parseSdk)
     .then((MirrorSystem mirrorSystem) {
       if (mirrorSystem.libraries.isEmpty) {
         throw new StateError('No library mirrors were created.');
       }
-      _documentLibraries(mirrorSystem.libraries.values, 
-          includeSdk: includeSdk, includePrivate: includePrivate, 
+      _documentLibraries(mirrorSystem.libraries.values,
+          includeSdk: includeSdk, includePrivate: includePrivate,
           outputToYaml: outputToYaml);
-      
+
       return true;
     });
 }
@@ -96,34 +96,34 @@
 List<String> _listLibraries(List<String> args) {
   // TODO(janicejl): At the moment, only have support to have either one file,
   // or one directory. This is because there can only be one package directory
-  // since only one docgen is created per run. 
+  // since only one docgen is created per run.
   if (args.length != 1) throw new UnsupportedError(USAGE);
   var libraries = new List<String>();
   var type = FileSystemEntity.typeSync(args[0]);
-  
+
   if (type == FileSystemEntityType.FILE) {
     libraries.add(path.absolute(args[0]));
     logger.info('Added to libraries: ${libraries.last}');
   } else {
     libraries.addAll(_listDartFromDir(args[0]));
-  } 
+  }
   return libraries;
 }
 
 List<String> _listDartFromDir(String args) {
   var files = listDir(args, recursive: true);
-  // To avoid anaylzing package files twice, only files with paths not 
+  // To avoid anaylzing package files twice, only files with paths not
   // containing '/packages' will be added. The only exception is if the file to
-  // analyze already has a '/package' in its path. 
-  return files.where((f) => f.endsWith('.dart') && 
+  // analyze already has a '/package' in its path.
+  return files.where((f) => f.endsWith('.dart') &&
       (!f.contains('/packages') || args.contains('/packages'))).toList()
       ..forEach((lib) => logger.info('Added to libraries: $lib'));
 }
 
 String _findPackageRoot(String directory) {
   var files = listDir(directory, recursive: true);
-  // Return '' means that there was no pubspec.yaml and therefor no packageRoot. 
-  String packageRoot = files.firstWhere((f) => 
+  // Return '' means that there was no pubspec.yaml and therefor no packageRoot.
+  String packageRoot = files.firstWhere((f) =>
       f.endsWith('/pubspec.yaml'), orElse: () => '');
   if (packageRoot != '') {
     packageRoot = path.dirname(packageRoot) + '/packages';
@@ -134,7 +134,7 @@
 List<String> _listSdk() {
   var sdk = new List<String>();
   LIBRARIES.forEach((String name, LibraryInfo info) {
-    if (info.documented) { 
+    if (info.documented) {
       sdk.add('dart:$name');
       logger.info('Add to SDK: ${sdk.last}');
     }
@@ -143,33 +143,33 @@
 }
 
 /**
- * Analyzes set of libraries by getting a mirror system and triggers the 
- * documentation of the libraries. 
+ * Analyzes set of libraries by getting a mirror system and triggers the
+ * documentation of the libraries.
  */
-Future<MirrorSystem> getMirrorSystem(List<String> args, String packageRoot, 
+Future<MirrorSystem> getMirrorSystem(List<String> args, String packageRoot,
     {bool parseSdk:false}) {
   var libraries = !parseSdk ? _listLibraries(args) : _listSdk();
   if (libraries.isEmpty) throw new StateError('No Libraries.');
-  // DART_SDK should be set to the root of the SDK library. 
+  // DART_SDK should be set to the root of the SDK library.
   var sdkRoot = Platform.environment['DART_SDK'];
   if (sdkRoot != null) {
     logger.info('Using DART_SDK to find SDK at $sdkRoot');
   } else {
-    // If DART_SDK is not defined in the environment, 
-    // assuming the dart executable is from the Dart SDK folder inside bin. 
+    // If DART_SDK is not defined in the environment,
+    // assuming the dart executable is from the Dart SDK folder inside bin.
     sdkRoot = path.dirname(path.dirname(new Options().executable));
     logger.info('SDK Root: ${sdkRoot}');
   }
-  
+
   return _analyzeLibraries(libraries, sdkRoot, packageRoot: packageRoot);
 }
 
 // TODO(janicejl): Should make docgen fail gracefully, or output a friendly
 // error message letting them know why it is failing to create a mirror system.
-// If there is conflicting library names, should modify it with a hash at the 
-// end of it's library name. 
+// If there is conflicting library names, should modify it with a hash at the
+// end of it's library name.
 /**
- * Analyzes set of libraries and provides a mirror system which can be used 
+ * Analyzes set of libraries and provides a mirror system which can be used
  * for static inspection of the source code.
  */
 Future<MirrorSystem> _analyzeLibraries(List<String> libraries,
@@ -191,10 +191,10 @@
       ['--preserve-comments', '--categories=Client,Server'])
       ..catchError((error) {
         logger.severe('Error: Failed to create mirror system. ');
-        // TODO(janicejl): Use the stack trace package when bug is resolved. 
-        // Currently, a string is thrown when it fails to create a mirror 
+        // TODO(janicejl): Use the stack trace package when bug is resolved.
+        // Currently, a string is thrown when it fails to create a mirror
         // system, and it is not possible to use the stack trace. BUG(#11622)
-        // To avoid printing the stack trace. 
+        // To avoid printing the stack trace.
         exit(1);
       });
 }
@@ -202,8 +202,8 @@
 /**
  * Creates documentation for filtered libraries.
  */
-void _documentLibraries(List<LibraryMirror> libraries, 
-    {bool includeSdk:false, bool includePrivate:false, bool 
+void _documentLibraries(List<LibraryMirror> libraries,
+    {bool includeSdk:false, bool includePrivate:false, bool
      outputToYaml:true}) {
   libraries.forEach((lib) {
     // Files belonging to the SDK have a uri that begins with 'dart:'.
@@ -212,17 +212,18 @@
       _writeLibraryToFile(library, outputToYaml);
     }
   });
-  // Outputs a text file with a list of files available after creating all 
-  // the libraries. This will help the viewer know what files are available 
-  // to read in. 
-  _writeToFile(listDir("docs").join('\n'), 'library_list.txt');
+  // Outputs a text file with a list of files available after creating all
+  // the libraries. This will help the viewer know what files are available
+  // to read in.
+  _writeToFile(listDir('docs').join('\n').replaceAll('docs/', ''),
+      'library_list.txt');
 }
 
-Library generateLibrary(dart2js.Dart2JsLibraryMirror library, 
+Library generateLibrary(dart2js.Dart2JsLibraryMirror library,
   {bool includePrivate:false}) {
   _currentLibrary = library;
   var result = new Library(library.qualifiedName, _getComment(library),
-      _getVariables(library.variables, includePrivate), 
+      _getVariables(library.variables, includePrivate),
       _getMethods(library.functions, includePrivate),
       _getClasses(library.classes, includePrivate));
   logger.fine('Generated library for ${result.name}');
@@ -234,15 +235,15 @@
     _writeToFile(getYamlString(result.toMap()), '${result.name}.yaml');
   } else {
     _writeToFile(stringify(result.toMap()), '${result.name}.json');
-  } 
-  
+  }
+
 }
 
 /**
- * Returns a list of meta annotations assocated with a mirror. 
+ * Returns a list of meta annotations assocated with a mirror.
  */
 List<String> _getAnnotations(DeclarationMirror mirror) {
-  var annotations = mirror.metadata.where((e) => 
+  var annotations = mirror.metadata.where((e) =>
       e is dart2js.Dart2JsConstructedConstantMirror);
   return annotations.map((e) => e.type.qualifiedName).toList();
 }
@@ -262,10 +263,10 @@
         } else {
           commentText = '$commentText ${comment.trimmedText}';
         }
-      } 
+      }
     }
   });
-  commentText = commentText == null ? '' : 
+  commentText = commentText == null ? '' :
       markdown.markdownToHtml(commentText.trim(), linkResolver: linkResolver)
       .replaceAll('\n', ' ');
   return commentText;
@@ -274,10 +275,10 @@
 /**
  * Converts all [foo] references in comments to <a>libraryName.foo</a>.
  */
-markdown.Node fixReference(String name, LibraryMirror currentLibrary, 
+markdown.Node fixReference(String name, LibraryMirror currentLibrary,
     ClassMirror currentClass, MemberMirror currentMember) {
   var reference;
-  var memberScope = currentMember == null ? 
+  var memberScope = currentMember == null ?
       null : currentMember.lookupInScope(name);
   if (memberScope != null) reference = memberScope.qualifiedName;
   else {
@@ -291,16 +292,16 @@
 /**
  * Returns a map of [Variable] objects constructed from inputted mirrors.
  */
-Map<String, Variable> _getVariables(Map<String, VariableMirror> mirrorMap, 
+Map<String, Variable> _getVariables(Map<String, VariableMirror> mirrorMap,
     bool includePrivate) {
   var data = {};
-  // TODO(janicejl): When map to map feature is created, replace the below with 
+  // TODO(janicejl): When map to map feature is created, replace the below with
   // a filter. Issue(#9590).
   mirrorMap.forEach((String mirrorName, VariableMirror mirror) {
     if (includePrivate || !mirror.isPrivate) {
       _currentMember = mirror;
-      data[mirrorName] = new Variable(mirrorName, mirror.qualifiedName, 
-          mirror.isFinal, mirror.isStatic, mirror.type.qualifiedName, 
+      data[mirrorName] = new Variable(mirrorName, mirror.qualifiedName,
+          mirror.isFinal, mirror.isStatic, mirror.type.qualifiedName,
           _getComment(mirror), _getAnnotations(mirror));
     }
   });
@@ -310,21 +311,21 @@
 /**
  * Returns a map of [Method] objects constructed from inputted mirrors.
  */
-Map<String, Method> _getMethods(Map<String, MethodMirror> mirrorMap, 
+Map<String, Method> _getMethods(Map<String, MethodMirror> mirrorMap,
     bool includePrivate) {
   var data = {};
   mirrorMap.forEach((String mirrorName, MethodMirror mirror) {
     if (includePrivate || !mirror.isPrivate) {
       _currentMember = mirror;
-      data[mirrorName] = new Method(mirrorName, mirror.qualifiedName, 
-          mirror.isSetter, mirror.isGetter, mirror.isConstructor, 
-          mirror.isOperator, mirror.isStatic, mirror.returnType.qualifiedName, 
-          _getComment(mirror), _getParameters(mirror.parameters), 
+      data[mirrorName] = new Method(mirrorName, mirror.qualifiedName,
+          mirror.isSetter, mirror.isGetter, mirror.isConstructor,
+          mirror.isOperator, mirror.isStatic, mirror.returnType.qualifiedName,
+          _getComment(mirror), _getParameters(mirror.parameters),
           _getAnnotations(mirror));
     }
   });
   return data;
-} 
+}
 
 /**
  * Returns a map of [Class] objects constructed from inputted mirrors.
@@ -335,15 +336,15 @@
   mirrorMap.forEach((String mirrorName, ClassMirror mirror) {
     if (includePrivate || !mirror.isPrivate) {
       _currentClass = mirror;
-      var superclass = (mirror.superclass != null) ? 
+      var superclass = (mirror.superclass != null) ?
           mirror.superclass.qualifiedName : '';
-      var interfaces = 
+      var interfaces =
           mirror.superinterfaces.map((interface) => interface.qualifiedName);
-      data[mirrorName] = new Class(mirrorName, mirror.qualifiedName, 
-          superclass, mirror.isAbstract, mirror.isTypedef, 
+      data[mirrorName] = new Class(mirrorName, mirror.qualifiedName,
+          superclass, mirror.isAbstract, mirror.isTypedef,
           _getComment(mirror), interfaces.toList(),
           _getVariables(mirror.variables, includePrivate),
-          _getMethods(mirror.methods, includePrivate), 
+          _getMethods(mirror.methods, includePrivate),
           _getAnnotations(mirror));
     }
   });
@@ -357,9 +358,9 @@
   var data = {};
   mirrorList.forEach((ParameterMirror mirror) {
     _currentMember = mirror;
-    data[mirror.simpleName] = new Parameter(mirror.simpleName, 
-        mirror.qualifiedName, mirror.isOptional, mirror.isNamed, 
-        mirror.hasDefaultValue, mirror.type.qualifiedName, 
+    data[mirror.simpleName] = new Parameter(mirror.simpleName,
+        mirror.qualifiedName, mirror.isOptional, mirror.isNamed,
+        mirror.hasDefaultValue, mirror.type.qualifiedName,
         mirror.defaultValue, _getAnnotations(mirror));
   });
   return data;
@@ -396,24 +397,24 @@
  * A class containing contents of a Dart library.
  */
 class Library {
-  
+
   /// Documentation comment with converted markdown.
   String comment;
-  
+
   /// Top-level variables in the library.
   Map<String, Variable> variables;
-  
+
   /// Top-level functions in the library.
   Map<String, Method> functions;
-  
+
   /// Classes defined within the library
   Map<String, Class> classes;
-  
+
   String name;
-  
-  Library(this.name, this.comment, this.variables, 
+
+  Library(this.name, this.comment, this.variables,
       this.functions, this.classes);
-  
+
   /// Generates a map describing the [Library] object.
   Map toMap() {
     var libraryMap = {};
@@ -431,32 +432,32 @@
  */
 // TODO(tmandel): Figure out how to do typedefs (what is needed)
 class Class {
-  
+
   /// Documentation comment with converted markdown.
   String comment;
-  
+
   /// List of the names of interfaces that this class implements.
   List<String> interfaces;
-  
+
   /// Top-level variables in the class.
   Map<String, Variable> variables;
-  
+
   /// Methods in the class.
   Map<String, Method> methods;
-  
+
   String name;
   String qualifiedName;
   String superclass;
   bool isAbstract;
   bool isTypedef;
-  
-  /// List of the meta annotations on the class. 
+
+  /// List of the meta annotations on the class.
   List<String> annotations;
- 
-  Class(this.name, this.qualifiedName, this.superclass, this.isAbstract, 
-      this.isTypedef, this.comment, this.interfaces, this.variables, 
+
+  Class(this.name, this.qualifiedName, this.superclass, this.isAbstract,
+      this.isTypedef, this.comment, this.interfaces, this.variables,
       this.methods, this.annotations);
-  
+
   /// Generates a map describing the [Class] object.
   Map toMap() {
     var classMap = {};
@@ -478,22 +479,22 @@
  * A class containing properties of a Dart variable.
  */
 class Variable {
-  
+
   /// Documentation comment with converted markdown.
   String comment;
-  
+
   String name;
   String qualifiedName;
   bool isFinal;
   bool isStatic;
   String type;
 
-  /// List of the meta annotations on the variable. 
+  /// List of the meta annotations on the variable.
   List<String> annotations;
-  
-  Variable(this.name, this.qualifiedName, this.isFinal, this.isStatic, 
+
+  Variable(this.name, this.qualifiedName, this.isFinal, this.isStatic,
       this.type, this.comment, this.annotations);
-  
+
   /// Generates a map describing the [Variable] object.
   Map toMap() {
     var variableMap = {};
@@ -512,13 +513,13 @@
  * A class containing properties of a Dart method.
  */
 class Method {
-  
+
   /// Documentation comment with converted markdown.
   String comment;
-  
+
   /// Parameters for this method.
   Map<String, Parameter> parameters;
-  
+
   String name;
   String qualifiedName;
   bool isSetter;
@@ -527,14 +528,14 @@
   bool isOperator;
   bool isStatic;
   String returnType;
-  
-  /// List of the meta annotations on the method.  
+
+  /// List of the meta annotations on the method.
   List<String> annotations;
-  
-  Method(this.name, this.qualifiedName, this.isSetter, this.isGetter, 
-      this.isConstructor, this.isOperator, this.isStatic, this.returnType, 
+
+  Method(this.name, this.qualifiedName, this.isSetter, this.isGetter,
+      this.isConstructor, this.isOperator, this.isStatic, this.returnType,
       this.comment, this.parameters, this.annotations);
-  
+
   /// Generates a map describing the [Method] object.
   Map toMap() {
     var methodMap = {};
@@ -548,14 +549,14 @@
     methodMap['parameters'] = recurseMap(parameters);
     methodMap['annotations'] = new List.from(annotations);
     return methodMap;
-  }  
+  }
 }
 
 /**
  * A class containing properties of a Dart method/function parameter.
  */
 class Parameter {
-  
+
   String name;
   String qualifiedName;
   bool isOptional;
@@ -563,13 +564,13 @@
   bool hasDefaultValue;
   String type;
   String defaultValue;
-  
-  /// List of the meta annotations on the parameter. 
+
+  /// List of the meta annotations on the parameter.
   List<String> annotations;
-  
-  Parameter(this.name, this.qualifiedName, this.isOptional, this.isNamed, 
+
+  Parameter(this.name, this.qualifiedName, this.isOptional, this.isNamed,
       this.hasDefaultValue, this.type, this.defaultValue, this.annotations);
-  
+
   /// Generates a map describing the [Parameter] object.
   Map toMap() {
     var parameterMap = {};
@@ -582,5 +583,5 @@
     parameterMap['value'] = defaultValue;
     parameterMap['annotations'] = new List.from(annotations);
     return parameterMap;
-  } 
+  }
 }
diff --git a/pkg/docgen/lib/src/io.dart b/pkg/docgen/lib/src/io.dart
index 8d1a423..9998687 100644
--- a/pkg/docgen/lib/src/io.dart
+++ b/pkg/docgen/lib/src/io.dart
@@ -1,12 +1,12 @@
 library io;
-/// This is a helper library to make working with io easier. 
-// TODO(janicejl): listDir, canonicalize, resolveLink, and linkExists are from  
-// pub/lib/src/io.dart. If the io.dart file becomes a package, should remove 
-// copy of the functions. 
+/// This is a helper library to make working with io easier.
+// TODO(janicejl): listDir, canonicalize, resolveLink, and linkExists are from
+// pub/lib/src/io.dart. If the io.dart file becomes a package, should remove
+// copy of the functions.
 
 import 'dart:collection';
 import 'dart:io';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 /// Lists the contents of [dir]. If [recursive] is `true`, lists subdirectory
 /// contents (defaults to `false`). If [includeHidden] is `true`, includes files
@@ -24,7 +24,7 @@
 
     listedDirectories = new Set<String>.from(listedDirectories);
     listedDirectories.add(resolvedPath);
-    
+
     var children = <String>[];
     for (var entity in new Directory(dir).listSync()) {
       if (!includeHidden && path.basename(entity.path).startsWith('.')) {
diff --git a/pkg/docgen/pubspec.yaml b/pkg/docgen/pubspec.yaml
index 8545c8e..79220e4 100644
--- a/pkg/docgen/pubspec.yaml
+++ b/pkg/docgen/pubspec.yaml
@@ -4,6 +4,6 @@
   args: any
   logging: any
   markdown: any
-  pathos: any
+  path: any
   scheduled_test: any
   unittest: any
diff --git a/pkg/http/lib/src/multipart_file.dart b/pkg/http/lib/src/multipart_file.dart
index 5e5bbb3..29ef589 100644
--- a/pkg/http/lib/src/multipart_file.dart
+++ b/pkg/http/lib/src/multipart_file.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'byte_stream.dart';
 import 'utils.dart';
diff --git a/pkg/http/pubspec.yaml b/pkg/http/pubspec.yaml
index e275dd6..515206d 100644
--- a/pkg/http/pubspec.yaml
+++ b/pkg/http/pubspec.yaml
@@ -3,6 +3,6 @@
 homepage: http://www.dartlang.org
 description: A composable, Future-based API for making HTTP requests.
 dependencies:
-  pathos: any
+  path: any
 dev_dependencies:
   unittest: any
diff --git a/pkg/http/test/multipart_test.dart b/pkg/http/test/multipart_test.dart
index 6153541..5a3636e 100644
--- a/pkg/http/test/multipart_test.dart
+++ b/pkg/http/test/multipart_test.dart
@@ -10,7 +10,7 @@
 
 import 'package:http/http.dart' as http;
 import 'package:http/src/utils.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:unittest/unittest.dart';
 
 import 'utils.dart';
diff --git a/pkg/http_server/lib/http_server.dart b/pkg/http_server/lib/http_server.dart
index 1dd07fc..1f10eb8 100644
--- a/pkg/http_server/lib/http_server.dart
+++ b/pkg/http_server/lib/http_server.dart
@@ -6,9 +6,14 @@
 
 import 'dart:async';
 import 'dart:io';
+import 'dart:json' as JSON;
 
 import 'package:mime/mime.dart';
 
+part 'src/http_body.dart';
+part 'src/http_body_impl.dart';
+part 'src/http_multipart_form_data.dart';
+part 'src/http_multipart_form_data_impl.dart';
 part 'src/virtual_directory.dart';
 part 'src/virtual_host.dart';
 
diff --git a/sdk/lib/io/http_body.dart b/pkg/http_server/lib/src/http_body.dart
similarity index 98%
rename from sdk/lib/io/http_body.dart
rename to pkg/http_server/lib/src/http_body.dart
index 47a28f0..422f9dc 100644
--- a/sdk/lib/io/http_body.dart
+++ b/pkg/http_server/lib/src/http_body.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 dart.io;
+part of http_server;
 
 
 /**
@@ -223,16 +223,16 @@
   /**
    * The filename of the uploaded file.
    */
-  String filename;
+  String get filename;
 
   /**
    * The [ContentType] of the uploaded file. For 'text/\*' and
    * 'application/json' the [data] field will a String.
    */
-  ContentType contentType;
+  ContentType get contentType;
 
   /**
    * The content of the file. Either a [String] or a [List<int>].
    */
-  dynamic content;
+  dynamic get content;
 }
diff --git a/sdk/lib/io/http_body_impl.dart b/pkg/http_server/lib/src/http_body_impl.dart
similarity index 86%
rename from sdk/lib/io/http_body_impl.dart
rename to pkg/http_server/lib/src/http_body_impl.dart
index f81198d..5d52874 100644
--- a/sdk/lib/io/http_body_impl.dart
+++ b/pkg/http_server/lib/src/http_body_impl.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 dart.io;
+part of http_server;
 
 class _HttpBodyHandlerTransformer
     extends StreamEventTransformer<HttpRequest, HttpRequestBody> {
@@ -44,10 +44,10 @@
 
     Future<HttpBody> asBinary() {
       return stream
-          .fold(new _BufferList(), (buffer, data) => buffer..add(data))
-          .then((buffer) => new _HttpBody(contentType,
-                                          "binary",
-                                          buffer.readBytes()));
+          .fold(new BytesBuilder(), (builder, data) => builder..add(data))
+          .then((builder) => new _HttpBody(contentType,
+                                           "binary",
+                                           builder.takeBytes()));
     }
 
     Future<HttpBody> asText(Encoding defaultEncoding) {
@@ -76,8 +76,8 @@
                   .then((b) => b.toString());
             } else {
               future = multipart
-                  .fold(new _BufferList(), (b, d) => b..add(d))
-                  .then((b) => b.readBytes());
+                  .fold(new BytesBuilder(), (b, d) => b..add(d))
+                  .then((b) => b.takeBytes());
             }
             return future.then((data) {
               var filename =
@@ -150,6 +150,24 @@
 
     return asBinary();
   }
+
+  // Utility function to synchronously decode a list of bytes.
+  static String _decodeString(List<int> bytes,
+                              [Encoding encoding = Encoding.UTF_8]) {
+    if (bytes.length == 0) return "";
+    var string;
+    var error;
+    var controller = new StreamController(sync: true);
+    controller.stream
+      .transform(new StringDecoder(encoding))
+      .listen((data) => string = data,
+              onError: (e) => error = e);
+    controller.add(bytes);
+    controller.close();
+    if (error != null) throw error;
+    assert(string != null);
+    return string;
+  }
 }
 
 class _HttpBodyFileUpload implements HttpBodyFileUpload {
diff --git a/sdk/lib/io/http_multipart_form_data.dart b/pkg/http_server/lib/src/http_multipart_form_data.dart
similarity index 98%
rename from sdk/lib/io/http_multipart_form_data.dart
rename to pkg/http_server/lib/src/http_multipart_form_data.dart
index 3c9bca4..86b4604 100644
--- a/sdk/lib/io/http_multipart_form_data.dart
+++ b/pkg/http_server/lib/src/http_multipart_form_data.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 dart.io;
+part of http_server;
 
 
 /**
diff --git a/sdk/lib/io/http_multipart_form_data_impl.dart b/pkg/http_server/lib/src/http_multipart_form_data_impl.dart
similarity index 98%
rename from sdk/lib/io/http_multipart_form_data_impl.dart
rename to pkg/http_server/lib/src/http_multipart_form_data_impl.dart
index 8531a95..8b313aa 100644
--- a/sdk/lib/io/http_multipart_form_data_impl.dart
+++ b/pkg/http_server/lib/src/http_multipart_form_data_impl.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 dart.io;
+part of http_server;
 
 
 class _HttpMultipartFormData extends Stream implements HttpMultipartFormData {
@@ -61,7 +61,7 @@
     var remaining = new Map<String, String>();
     for (String key in multipart.headers.keys) {
       switch (key) {
-        case HttpHeaders.CONTENT_TYPE:
+        case 'content-type':
           type = ContentType.parse(multipart.headers[key]);
           break;
 
@@ -136,4 +136,3 @@
     return buffer.toString();
   }
 }
-
diff --git a/tests/standalone/io/http_body_test.dart b/pkg/http_server/test/http_body_test.dart
similarity index 80%
rename from tests/standalone/io/http_body_test.dart
rename to pkg/http_server/test/http_body_test.dart
index 2f5231b..725480b 100644
--- a/tests/standalone/io/http_body_test.dart
+++ b/pkg/http_server/test/http_body_test.dart
@@ -5,7 +5,8 @@
 import 'dart:io';
 import 'dart:utf';
 
-import 'package:expect/expect.dart';
+import 'package:http_server/http_server.dart';
+import 'package:unittest/unittest.dart';
 
 void testHttpClientResponseBody() {
   void test(String mimeType,
@@ -30,20 +31,17 @@
           .then((request) => request.close())
           .then(HttpBodyHandler.processResponse)
           .then((body) {
-            if (shouldFail) Expect.fail("Error expected");
-            Expect.equals(type, body.type);
-            Expect.isNotNull(body.response);
+            expect(shouldFail, isFalse);
+            expect(body.type, equals(type));
+            expect(body.response, isNotNull);
             switch (type) {
               case "text":
-                Expect.equals(expectedBody, body.body);
-                break;
-
               case "json":
-                Expect.mapEquals(expectedBody, body.body);
+                expect(body.body, equals(expectedBody));
                 break;
 
               default:
-                Expect.fail("bad body type");
+                fail("bad body type");
             }
           }, onError: (error) {
             if (!shouldFail) throw error;
@@ -95,52 +93,49 @@
     HttpServer.bind("127.0.0.1", 0).then((server) {
       server.transform(new HttpBodyHandler(defaultEncoding: defaultEncoding))
           .listen((body) {
-            if (shouldFail) Expect.fail("Error expected");
-            Expect.equals(type, body.type);
+            expect(shouldFail, isFalse);
+            expect(body.type, equals(type));
             switch (type) {
               case "text":
-                Expect.equals(body.contentType.mimeType, "text/plain");
-                Expect.equals(expectedBody, body.body);
+                expect(body.contentType.mimeType, equals("text/plain"));
+                expect(body.body, equals(expectedBody));
                 break;
 
               case "json":
-                Expect.equals(body.contentType.mimeType, "application/json");
-                Expect.mapEquals(expectedBody, body.body);
+                expect(body.contentType.mimeType, equals("application/json"));
+                expect(body.body, equals(expectedBody));
                 break;
 
               case "binary":
-                Expect.equals(body.contentType, null);
-                Expect.listEquals(expectedBody, body.body);
+                expect(body.contentType, isNull);
+                expect(body.body, equals(expectedBody));
                 break;
 
               case "form":
                 var mimeType = body.contentType.mimeType;
-                Expect.isTrue(
-                    mimeType == 'multipart/form-data' ||
-                    mimeType == 'application/x-www-form-urlencoded');
-                Expect.setEquals(expectedBody.keys.toSet(),
-                                 body.body.keys.toSet());
+                expect(mimeType,
+                       anyOf(equals('multipart/form-data'),
+                             equals('application/x-www-form-urlencoded')));
+                expect(body.body.keys.toSet(),
+                       equals(expectedBody.keys.toSet()));
                 for (var key in expectedBody.keys) {
-                  if (body.body[key] is HttpBodyFileUpload) {
-                    Expect.equals(expectedBody[key]['contentType'],
-                                  body.body[key].contentType.toString());
-                    Expect.equals(expectedBody[key]['filename'],
-                                  body.body[key].filename);
-                    if (body.body[key].content is String) {
-                      Expect.equals(expectedBody[key]['content'],
-                                    body.body[key].content);
-                    } else {
-                      Expect.listEquals(expectedBody[key]['content'],
-                                        body.body[key].content);
-                    }
+                  var found = body.body[key];
+                  var expected = expectedBody[key];
+                  if (found is HttpBodyFileUpload) {
+                    expect(found.contentType.toString(),
+                           equals(expected['contentType']));
+                    expect(found.filename,
+                           equals(expected['filename']));
+                    expect(found.content,
+                           equals(expected['content']));
                   } else {
-                    Expect.equals(expectedBody[key], body.body[key]);
+                    expect(found, equals(expected));
                   }
                 }
                 break;
 
               default:
-                Expect.fail("bad body type");
+                throw "bad body type";
             }
             body.response.close();
           }, onError: (error) {
@@ -159,7 +154,7 @@
           })
           .then((response) {
             if (shouldFail) {
-              Expect.equals(HttpStatus.BAD_REQUEST, response.statusCode);
+              expect(response.statusCode, equals(HttpStatus.BAD_REQUEST));
             }
             response.fold(null, (x, y) {});
             client.close();
diff --git a/tests/standalone/io/http_multipart_test.dart b/pkg/http_server/test/http_multipart_test.dart
similarity index 95%
rename from tests/standalone/io/http_multipart_test.dart
rename to pkg/http_server/test/http_multipart_test.dart
index 45cdec9..ae9b3b8 100644
--- a/tests/standalone/io/http_multipart_test.dart
+++ b/pkg/http_server/test/http_multipart_test.dart
@@ -1,13 +1,10 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-//
-// VMOptions=
-// VMOptions=--short_socket_read
-// VMOptions=--short_socket_write
-// VMOptions=--short_socket_read --short_socket_write
 
-import "package:expect/expect.dart";
+import "package:http_server/http_server.dart";
+import "package:mime/mime.dart";
+import "package:unittest/unittest.dart";
 import 'dart:async';
 import 'dart:io';
 
@@ -76,7 +73,7 @@
           .fold([], (l, f) => l..add(f))
           .then(Future.wait)
           .then((fields) {
-            Expect.listEquals(expectedFields, fields);
+            expect(fields, equals(expectedFields));
             request.response.close().then((_) => server.close());
           });
     });
diff --git a/pkg/intl/lib/date_symbol_data_file.dart b/pkg/intl/lib/date_symbol_data_file.dart
index 5c599f4..a418a9c 100644
--- a/pkg/intl/lib/date_symbol_data_file.dart
+++ b/pkg/intl/lib/date_symbol_data_file.dart
@@ -14,7 +14,7 @@
 import "src/lazy_locale_data.dart";
 import 'src/date_format_internal.dart';
 import 'src/file_data_reader.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 part "src/data/dates/localeList.dart";
 
diff --git a/pkg/intl/lib/generate_localized.dart b/pkg/intl/lib/generate_localized.dart
index d99faa1..f5e3921 100644
--- a/pkg/intl/lib/generate_localized.dart
+++ b/pkg/intl/lib/generate_localized.dart
@@ -16,7 +16,7 @@
 import 'extract_messages.dart';
 import 'src/intl_message.dart';
 import 'dart:io';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 /**
  * If the import path following package: is something else, modify the
diff --git a/pkg/intl/lib/src/file_data_reader.dart b/pkg/intl/lib/src/file_data_reader.dart
index 4e6c2ae..61c42e2 100644
--- a/pkg/intl/lib/src/file_data_reader.dart
+++ b/pkg/intl/lib/src/file_data_reader.dart
@@ -10,7 +10,7 @@
 library file_data_reader;
 
 import 'dart:async';
-import 'package:pathos/path.dart';
+import 'package:path/path.dart';
 import 'dart:io';
 import 'intl_helpers.dart';
 
diff --git a/pkg/intl/pubspec.yaml b/pkg/intl/pubspec.yaml
index ef21d56..8c4bc92 100644
--- a/pkg/intl/pubspec.yaml
+++ b/pkg/intl/pubspec.yaml
@@ -5,7 +5,7 @@
 documentation: http://api.dartlang.org/docs/pkg/intl
 dependencies:
   analyzer_experimental: any
-  pathos: any
+  path: any
 dev_dependencies:
   serialization: any
   unittest: any
diff --git a/pkg/intl/test/data_directory.dart b/pkg/intl/test/data_directory.dart
index 4a003bf..df76575 100644
--- a/pkg/intl/test/data_directory.dart
+++ b/pkg/intl/test/data_directory.dart
@@ -14,7 +14,7 @@
 library data_directory;
 
 import "dart:io";
-import "package:pathos/path.dart" as path;
+import "package:path/path.dart" as path;
 
 String get dataDirectory {
   return path.join(intlDirectory, datesRelativeToIntl);
diff --git a/pkg/intl/test/message_extraction/extract_to_json.dart b/pkg/intl/test/message_extraction/extract_to_json.dart
index fd60180..4c1d718 100644
--- a/pkg/intl/test/message_extraction/extract_to_json.dart
+++ b/pkg/intl/test/message_extraction/extract_to_json.dart
@@ -23,7 +23,7 @@
 import 'dart:io';
 import 'package:intl/extract_messages.dart';
 import 'dart:json' as json;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:intl/src/intl_message.dart';
 import 'package:args/args.dart';
 
diff --git a/pkg/intl/test/message_extraction/generate_from_json.dart b/pkg/intl/test/message_extraction/generate_from_json.dart
index a3478da0..70cc5bd 100644
--- a/pkg/intl/test/message_extraction/generate_from_json.dart
+++ b/pkg/intl/test/message_extraction/generate_from_json.dart
@@ -21,7 +21,7 @@
 import 'extract_to_json.dart';
 import 'package:intl/generate_localized.dart';
 import 'dart:json' as json;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:args/args.dart';
 import 'package:serialization/serialization.dart';
 
diff --git a/pkg/intl/test/message_extraction/make_hardcoded_translation.dart b/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
index 697c9ac..3e17654 100644
--- a/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
+++ b/pkg/intl/test/message_extraction/make_hardcoded_translation.dart
@@ -12,7 +12,7 @@
 
 import 'dart:io';
 import 'dart:json' as json;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:args/args.dart';
 import 'package:intl/src/intl_message.dart';
 import 'package:serialization/serialization.dart';
diff --git a/pkg/intl/test/message_extraction/message_extraction_test.dart b/pkg/intl/test/message_extraction/message_extraction_test.dart
index 69be0cc..7bed3aa 100644
--- a/pkg/intl/test/message_extraction/message_extraction_test.dart
+++ b/pkg/intl/test/message_extraction/message_extraction_test.dart
@@ -7,7 +7,7 @@
 import 'package:unittest/unittest.dart';
 import 'dart:io';
 import 'dart:async';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import '../data_directory.dart';
 
 final dart = Platform.executable;
diff --git a/pkg/intl/tool/generate_locale_data_files.dart b/pkg/intl/tool/generate_locale_data_files.dart
index 76ff2bd..6c77a87 100644
--- a/pkg/intl/tool/generate_locale_data_files.dart
+++ b/pkg/intl/tool/generate_locale_data_files.dart
@@ -19,7 +19,7 @@
 import 'dart:io';
 import 'dart:json' as json;
 import '../test/data_directory.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   initializeDateFormatting("en_IGNORED", null);
diff --git a/pkg/mime/lib/mime.dart b/pkg/mime/lib/mime.dart
index 0943de8..44c6cad 100644
--- a/pkg/mime/lib/mime.dart
+++ b/pkg/mime/lib/mime.dart
@@ -4,6 +4,10 @@
 
 library mime;
 
+import 'dart:async';
+import 'dart:typed_data';
+
 part 'src/mime_type.dart';
 part 'src/extension_map.dart';
 part 'src/magic_number.dart';
+part 'src/mime_multipart_transformer.dart';
diff --git a/pkg/mime/lib/src/extension_map.dart b/pkg/mime/lib/src/extension_map.dart
index 19286bb..ac534ae 100644
--- a/pkg/mime/lib/src/extension_map.dart
+++ b/pkg/mime/lib/src/extension_map.dart
@@ -759,7 +759,6 @@
 'stl':'application/vnd.ms-pki.stl',
 'str':'application/vnd.pg.format',
 'stw':'application/vnd.sun.xml.writer.template',
-'sub':'image/vnd.dvb.subtitle',
 'sub':'text/vnd.dvb.subtitle',
 'sus':'application/vnd.sus-calendar',
 'susp':'application/vnd.sus-calendar',
@@ -903,7 +902,6 @@
 'wmv':'video/x-ms-wmv',
 'wmx':'video/x-ms-wmx',
 'wmz':'application/x-ms-wmz',
-'wmz':'application/x-msmetafile',
 'woff':'application/x-font-woff',
 'wpd':'application/vnd.wordperfect',
 'wpl':'application/vnd.ms-wpl',
diff --git a/sdk/lib/io/mime_multipart_parser.dart b/pkg/mime/lib/src/mime_multipart_transformer.dart
similarity index 95%
rename from sdk/lib/io/mime_multipart_parser.dart
rename to pkg/mime/lib/src/mime_multipart_transformer.dart
index e4d8f8a..5813087 100644
--- a/sdk/lib/io/mime_multipart_parser.dart
+++ b/pkg/mime/lib/src/mime_multipart_transformer.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 dart.io;
+part of mime;
 
 
 /**
@@ -30,6 +30,21 @@
   }
 }
 
+class _Const {
+  // Bytes for '()<>@,;:\\"/[]?={} \t'.
+  static const SEPARATORS = const [40, 41, 60, 62, 64, 44, 59, 58, 92, 34, 47,
+                                   91, 93, 63, 61, 123, 125, 32, 9];
+}
+
+class _CharCode {
+  static const int HT = 9;
+  static const int LF = 10;
+  static const int CR = 13;
+  static const int SP = 32;
+  static const int DASH = 45;
+  static const int COLON = 58;
+}
+
 /**
  * Parser for MIME multipart types of data as described in RFC 2046
  * section 5.1.1. The data is transformed into [MimeMultipart] objects, each
@@ -398,7 +413,7 @@
 }
 
 
-class MimeMultipartException implements IOException {
+class MimeMultipartException implements Exception {
   const MimeMultipartException([String this.message = ""]);
   String toString() => "MimeMultipartException: $message";
   final String message;
diff --git a/tests/standalone/io/mime_multipart_parser_test.dart b/pkg/mime/test/mime_multipart_transformer_test.dart
similarity index 89%
rename from tests/standalone/io/mime_multipart_parser_test.dart
rename to pkg/mime/test/mime_multipart_transformer_test.dart
index 49e5b6a..43b542f 100644
--- a/tests/standalone/io/mime_multipart_parser_test.dart
+++ b/pkg/mime/test/mime_multipart_transformer_test.dart
@@ -2,44 +2,43 @@
 // for details. All 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:unittest/unittest.dart";
+import "package:mime/mime.dart";
 import 'dart:async';
 import 'dart:math';
-import 'dart:io';
 import 'dart:isolate';
 
 void testParse(String message,
                String boundary,
                [List<Map> expectedHeaders,
-               List expectedParts,
-               bool expectError = false]) {
-  void testWrite(List<int> data, [int chunkSize = -1]) {
+                List expectedParts,
+                bool expectError = false]) {
+  Future testWrite(List<int> data, [int chunkSize = -1]) {
     StreamController controller = new StreamController(sync: true);
 
     var stream = controller.stream.transform(
         new MimeMultipartTransformer(boundary));
     int i = 0;
-    var port = new ReceivePort();
+    var completer = new Completer();
+    var futures = [];
     stream.listen((multipart) {
       int part = i++;
       if (expectedHeaders != null) {
-        Expect.mapEquals(expectedHeaders[part], multipart.headers);
+        expect(multipart.headers, equals(expectedHeaders[part]));
       }
-      var partPort = new ReceivePort();
-      multipart.fold([], (buffer, data) => buffer..addAll(data))
+      futures.add(multipart.fold([], (buffer, data) => buffer..addAll(data))
           .then((data) {
             if (expectedParts[part] != null) {
-              Expect.listEquals(expectedParts[part].codeUnits, data);
+              expect(data, equals(expectedParts[part].codeUnits));
             }
-            partPort.close();
-          });
+          }));
     }, onError: (error) {
       if (!expectError) throw error;
     }, onDone: () {
       if (expectedParts != null) {
-        Expect.equals(expectedParts.length, i);
+        expect(i, equals(expectedParts.length));
       }
-      port.close();
+      Future.wait(futures).then(completer.complete);
     });
 
     if (chunkSize == -1) chunkSize = data.length;
@@ -52,15 +51,21 @@
       written += writeLength;
     }
     controller.close();
+
+    return completer.future;
   }
 
   // Test parsing the data three times delivering the data in
   // different chunks.
   List<int> data = message.codeUnits;
-  testWrite(data);
-  testWrite(data, 10);
-  testWrite(data, 2);
-  testWrite(data, 1);
+  test('test', () {
+    expect(Future.wait([
+        testWrite(data),
+        testWrite(data, 10),
+        testWrite(data, 2),
+        testWrite(data, 1)]),
+        completes);
+  });
 }
 
 void testParseValid() {
diff --git a/pkg/pathos/README.md b/pkg/path/README.md
similarity index 98%
rename from pkg/pathos/README.md
rename to pkg/path/README.md
index 1e50b23..dacacaa 100644
--- a/pkg/pathos/README.md
+++ b/pkg/path/README.md
@@ -1,6 +1,6 @@
 A comprehensive, cross-platform path manipulation library for Dart.
 
-The pathos library provides common operations for manipulating file paths:
+The path package provides common operations for manipulating file paths:
 joining, splitting, normalizing, etc.
 
 We've tried very hard to make this library do the "right" thing on whatever
@@ -14,7 +14,7 @@
 The path library was designed to be imported with a prefix, though you don't
 have to if you don't want to:
 
-    import 'package:pathos/path.dart' as path;
+    import 'package:path/path.dart' as path; // TODO(bob): ???
 
 ## Top-level functions
 
diff --git a/pkg/pathos/lib/path.dart b/pkg/path/lib/path.dart
similarity index 99%
rename from pkg/pathos/lib/path.dart
rename to pkg/path/lib/path.dart
index c33bd87..b425124 100644
--- a/pkg/pathos/lib/path.dart
+++ b/pkg/path/lib/path.dart
@@ -10,15 +10,14 @@
 /// `pubspec.yaml` file.
 ///
 ///     dependencies:
-///       pathos: any
+///       path: any
 ///
 /// Then run `pub install`.
 ///
-/// For more information, see the
-/// [pathos package on pub.dartlang.org][pkg].
+/// For more information, see the [path package on pub.dartlang.org][pkg].
 ///
 /// [pub]: http://pub.dartlang.org
-/// [pkg]: http://pub.dartlang.org/packages/pathos
+/// [pkg]: http://pub.dartlang.org/packages/path
 library path;
 
 import 'dart:mirrors';
diff --git a/pkg/pathos/pubspec.yaml b/pkg/path/pubspec.yaml
similarity index 63%
rename from pkg/pathos/pubspec.yaml
rename to pkg/path/pubspec.yaml
index 3372302..60fcec2 100644
--- a/pkg/pathos/pubspec.yaml
+++ b/pkg/path/pubspec.yaml
@@ -1,10 +1,7 @@
-name: pathos
+name: path
 author: "Dart Team <misc@dartlang.org>"
 homepage: http://www.dartlang.org
 description: >
  A string-based path manipulation library. All of the path operations you know
  and love, with solid support on both Windows and POSIX (Linux and Mac OS X)
  machines.
-
- Currently only runs on the standalone VM, but will run in a browser as soon as
- configuration-specific code is supported by Dart.
diff --git a/pkg/pathos/test/pathos_dart2js_test.dart b/pkg/path/test/dart2js_test.dart
similarity index 94%
rename from pkg/pathos/test/pathos_dart2js_test.dart
rename to pkg/path/test/dart2js_test.dart
index e49659d..997513d 100644
--- a/pkg/pathos/test/pathos_dart2js_test.dart
+++ b/pkg/path/test/dart2js_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 // In the future, the default root will be window.location.href, but right now
 // that's not possible.
diff --git a/pkg/pathos/test/pathos_dartium_test.dart b/pkg/path/test/dartium_test.dart
similarity index 94%
rename from pkg/pathos/test/pathos_dartium_test.dart
rename to pkg/path/test/dartium_test.dart
index f03abc6..2a830c7 100644
--- a/pkg/pathos/test/pathos_dartium_test.dart
+++ b/pkg/path/test/dartium_test.dart
@@ -6,7 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 import 'package:unittest/html_config.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   useHtmlConfiguration();
diff --git a/pkg/pathos/test/pathos_io_test.dart b/pkg/path/test/io_test.dart
similarity index 94%
rename from pkg/pathos/test/pathos_io_test.dart
rename to pkg/path/test/io_test.dart
index bb14bd7..fc29ced 100644
--- a/pkg/pathos/test/pathos_io_test.dart
+++ b/pkg/path/test/io_test.dart
@@ -5,7 +5,7 @@
 import 'dart:io' as io;
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   group('new Builder()', () {
diff --git a/pkg/pathos/test/pathos_test.dart b/pkg/path/test/path_test.dart
similarity index 95%
rename from pkg/pathos/test/pathos_test.dart
rename to pkg/path/test/path_test.dart
index b002999..ef3cf21e 100644
--- a/pkg/pathos/test/pathos_test.dart
+++ b/pkg/path/test/path_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   group('path.Style', () {
diff --git a/pkg/pathos/test/pathos_posix_test.dart b/pkg/path/test/posix_test.dart
similarity index 99%
rename from pkg/pathos/test/pathos_posix_test.dart
rename to pkg/path/test/posix_test.dart
index a446f76..f3232bc 100644
--- a/pkg/pathos/test/pathos_posix_test.dart
+++ b/pkg/path/test/posix_test.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 pathos_posix_test;
+library path.test.posix_test;
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   var builder = new path.Builder(style: path.Style.posix, root: '/root/path');
diff --git a/pkg/pathos/test/pathos_url_test.dart b/pkg/path/test/url_test.dart
similarity index 99%
rename from pkg/pathos/test/pathos_url_test.dart
rename to pkg/path/test/url_test.dart
index ff1af86..3e03d50 100644
--- a/pkg/pathos/test/pathos_url_test.dart
+++ b/pkg/path/test/url_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   var builder = new path.Builder(style: path.Style.url,
diff --git a/pkg/pathos/test/pathos_windows_test.dart b/pkg/path/test/windows_test.dart
similarity index 99%
rename from pkg/pathos/test/pathos_windows_test.dart
rename to pkg/path/test/windows_test.dart
index a7c8182..7b3cf60 100644
--- a/pkg/pathos/test/pathos_windows_test.dart
+++ b/pkg/path/test/windows_test.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 pathos_windows_test;
+library path.test.windows_test;
 
 import 'package:unittest/unittest.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 main() {
   var builder = new path.Builder(style: path.Style.windows,
diff --git a/pkg/pkg.status b/pkg/pkg.status
index cb9ad10..2b17cfc 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -52,6 +52,7 @@
 
 [ $runtime == ie9 ]
 intl/test/date_time_format_http_request_test: Fail # Issue 8983
+mime/test/mime_multipart_transformer_test: Skip # No typed_data on IE9.
 
 [ $runtime == safari ]
 fixnum/test/int_64_test: Pass, Fail # Bug in JSC.
@@ -61,8 +62,8 @@
 # Skip browser-specific tests on VM
 [ $runtime == vm ]
 docgen/test/single_library_test: Skip # Uses js_helper
-pathos/test/pathos_dartium_test: Fail, OK # Uses dart:html
-pathos/test/pathos_dart2js_test: Fail, OK # Uses dart:html
+path/test/dartium_test: Fail, OK # Uses dart:html
+path/test/dart2js_test: Fail, OK # Uses dart:html
 intl/test/find_default_locale_browser_test: Skip
 intl/test/date_time_format_http_request_test: Skip
 
@@ -103,7 +104,7 @@
 crypto/test/sha1_test: Fail # V8 bug: https://code.google.com/p/v8/issues/detail?id=2692
 
 [ $compiler == dart2js && $browser ]
-pathos/test/pathos_dartium_test: Fail # Issue 6490
+path/test/dartium_test: Fail # Issue 6490
 stack_trace/test/vm_test: Fail, OK # VM-specific traces
 crypto/test/sha256_test: Slow, Pass
 crypto/test/sha1_test: Slow, Pass
@@ -131,7 +132,8 @@
 oauth2/test/client_test: Fail, OK # Uses dart:io.
 oauth2/test/credentials_test: Fail, OK # Uses dart:io.
 oauth2/test/handle_access_token_response_test: Fail, OK # Uses dart:io.
-pathos/test/pathos_io_test: Fail, OK # Uses dart:io.
+path/test/io_test: Fail, OK # Uses dart:io.
+watcher/test/*: Fail, OK # Uses dart:io.
 
 scheduled_test/test/descriptor/async_test: Fail # http://dartbug.com/8440
 scheduled_test/test/descriptor/directory_test: Fail # http://dartbug.com/8440
@@ -188,7 +190,7 @@
 serialization/test/no_library_test: Skip # Expected Failure
 
 [ ($runtime == dartium || $runtime == drt) && $compiler == none ]
-pathos/test/pathos_dart2js_test: Fail, OK # Issue 6490
+path/test/dart2js_test: Fail, OK # Issue 6490
 
 # Skip mdv tests on command line VM, they only run in the browser.
 [ $runtime == vm ]
diff --git a/pkg/scheduled_test/lib/descriptor.dart b/pkg/scheduled_test/lib/descriptor.dart
index 1819247..6692591 100644
--- a/pkg/scheduled_test/lib/descriptor.dart
+++ b/pkg/scheduled_test/lib/descriptor.dart
@@ -64,7 +64,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'scheduled_test.dart';
 import 'src/descriptor/async_descriptor.dart';
diff --git a/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
index f5a2f4f..a1d6358 100644
--- a/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart';
 import '../../scheduled_test.dart';
diff --git a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
index a215a4b..ad304ed 100644
--- a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
@@ -9,7 +9,7 @@
 import 'dart:math' as math;
 import 'dart:utf';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart';
 import '../../scheduled_test.dart';
@@ -64,7 +64,7 @@
 
     return new File(fullPath).readAsBytes().then(_validateNow);
   }
-  
+
   // TODO(nweiz): rather than setting up an inheritance chain, just store a
   // Matcher for validation. This would require better error messages from the
   // matcher library, though.
diff --git a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
index 471508b..483a9cf 100644
--- a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart';
 import '../../scheduled_test.dart';
diff --git a/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart
index 60364f5..32af689 100644
--- a/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/pattern_descriptor.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart';
 import '../../scheduled_test.dart';
diff --git a/pkg/scheduled_test/pubspec.yaml b/pkg/scheduled_test/pubspec.yaml
index eb1291c..4f4f60b 100644
--- a/pkg/scheduled_test/pubspec.yaml
+++ b/pkg/scheduled_test/pubspec.yaml
@@ -10,6 +10,6 @@
 
 dependencies:
   http: ">=0.4.1 <1.0.0"
-  pathos: ">=0.3.2 <1.0.0"
+  path: ">=0.3.2 <1.0.0"
   stack_trace: ">=0.4.3 <1.0.0"
   unittest: ">=0.4.3 <1.0.0"
diff --git a/pkg/scheduled_test/test/descriptor/async_test.dart b/pkg/scheduled_test/test/descriptor/async_test.dart
index 961f528..46f5ef3 100644
--- a/pkg/scheduled_test/test/descriptor/async_test.dart
+++ b/pkg/scheduled_test/test/descriptor/async_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/descriptor.dart' as d;
 import 'package:scheduled_test/scheduled_test.dart';
 
diff --git a/pkg/scheduled_test/test/descriptor/directory_test.dart b/pkg/scheduled_test/test/descriptor/directory_test.dart
index 16536b6..a8051cc 100644
--- a/pkg/scheduled_test/test/descriptor/directory_test.dart
+++ b/pkg/scheduled_test/test/descriptor/directory_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/descriptor.dart' as d;
 import 'package:scheduled_test/scheduled_test.dart';
 
diff --git a/pkg/scheduled_test/test/descriptor/file_test.dart b/pkg/scheduled_test/test/descriptor/file_test.dart
index 5c64586..a2dc6b4 100644
--- a/pkg/scheduled_test/test/descriptor/file_test.dart
+++ b/pkg/scheduled_test/test/descriptor/file_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/descriptor.dart' as d;
 import 'package:scheduled_test/scheduled_test.dart';
 
diff --git a/pkg/scheduled_test/test/descriptor/nothing_test.dart b/pkg/scheduled_test/test/descriptor/nothing_test.dart
index 0e62334..f925dcb 100644
--- a/pkg/scheduled_test/test/descriptor/nothing_test.dart
+++ b/pkg/scheduled_test/test/descriptor/nothing_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/descriptor.dart' as d;
 import 'package:scheduled_test/scheduled_test.dart';
 
diff --git a/pkg/scheduled_test/test/descriptor/pattern_test.dart b/pkg/scheduled_test/test/descriptor/pattern_test.dart
index a9f734e..04dd3e5 100644
--- a/pkg/scheduled_test/test/descriptor/pattern_test.dart
+++ b/pkg/scheduled_test/test/descriptor/pattern_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/descriptor.dart' as d;
 import 'package:scheduled_test/scheduled_test.dart';
 
diff --git a/pkg/scheduled_test/test/metatest.dart b/pkg/scheduled_test/test/metatest.dart
index 9bbd2e4..cc77069 100644
--- a/pkg/scheduled_test/test/metatest.dart
+++ b/pkg/scheduled_test/test/metatest.dart
@@ -13,7 +13,7 @@
 import 'dart:async';
 import 'dart:isolate';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:unittest/unittest.dart';
 import 'package:scheduled_test/scheduled_test.dart' as scheduled_test;
 
diff --git a/pkg/scheduled_test/test/scheduled_process_test.dart b/pkg/scheduled_test/test/scheduled_process_test.dart
index 3f07c66..85f6eae 100644
--- a/pkg/scheduled_test/test/scheduled_process_test.dart
+++ b/pkg/scheduled_test/test/scheduled_process_test.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock;
@@ -127,13 +127,13 @@
       currentSchedule.onException.schedule(() {
         errors = currentSchedule.errors;
       });
-  
+
       var process = startDartProcess('');
       expect(process.nextLine(), completion(equals('hello')));
       expect(process.nextLine(), completion(equals('world')));
       process.shouldExit(0);
     });
-  
+
     test('test 2', () {
       expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
       expect(errors.length, anyOf(1, 2));
@@ -180,13 +180,13 @@
       currentSchedule.onException.schedule(() {
         errors = currentSchedule.errors;
       });
-  
+
       var process = startDartProcess('print("hello");');
       expect(process.nextLine(), completion(equals('hello')));
       expect(process.nextLine(), completion(equals('world')));
       process.shouldExit(0);
     });
-  
+
     test('test 2', () {
       expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
       expect(errors.length, anyOf(1, 2));
@@ -224,13 +224,13 @@
       currentSchedule.onException.schedule(() {
         errors = currentSchedule.errors;
       });
-  
+
       var process = startDartProcess(r'stderr.write("hello\n");');
       expect(process.nextErrLine(), completion(equals('hello')));
       expect(process.nextErrLine(), completion(equals('world')));
       process.shouldExit(0);
     });
-  
+
     test('test 2', () {
       expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
       expect(errors.length, anyOf(1, 2));
diff --git a/pkg/source_maps/lib/builder.dart b/pkg/source_maps/lib/builder.dart
index ad80fa0..be00c9e 100644
--- a/pkg/source_maps/lib/builder.dart
+++ b/pkg/source_maps/lib/builder.dart
@@ -74,12 +74,20 @@
       first = false;
       column = _append(buff, column, entry.target.column);
 
-      if (entry.source == null) continue;
+      // Encoding can be just the column offset if there is no source
+      // information, or if two consecutive mappings share exactly the same
+      // source information.
+      var source = entry.source;
+      if (source == null) continue;
+      var newUrlId = _indexOf(_urls, source.sourceUrl);
+      if (newUrlId == srcUrlId && source.line == srcLine
+          && source.column == srcColumn && entry.identifierName == null) {
+        continue;
+      }
 
-      srcUrlId = _append(buff, srcUrlId,
-          _indexOf(_urls, entry.source.sourceUrl));
-      srcLine = _append(buff, srcLine, entry.source.line);
-      srcColumn = _append(buff, srcColumn, entry.source.column);
+      srcUrlId = _append(buff, srcUrlId, newUrlId);
+      srcLine = _append(buff, srcLine, source.line);
+      srcColumn = _append(buff, srcColumn, source.column);
 
       if (entry.identifierName == null) continue;
       srcNameId = _append(buff, srcNameId,
diff --git a/pkg/source_maps/lib/parser.dart b/pkg/source_maps/lib/parser.dart
index 3849913..e293263 100644
--- a/pkg/source_maps/lib/parser.dart
+++ b/pkg/source_maps/lib/parser.dart
@@ -25,9 +25,8 @@
         'Only version 3 is supported.');
   }
 
-  // TODO(sigmund): relax this? dart2js doesn't generate the file entry.
   if (!map.containsKey('file')) {
-    throw new ArgumentError('missing "file" in source map');
+    print('warning: missing "file" entry in source map');
   }
 
   if (map.containsKey('sections')) {
@@ -186,7 +185,7 @@
       if (tokenizer.nextKind.isNewSegment) throw _segmentError(0, line);
       column += tokenizer._consumeValue();
       if (!tokenizer.nextKind.isValue) {
-        entries.add(new TargetEntry(column));
+        entries.add(new TargetEntry(column, srcUrlId, srcLine, srcColumn));
       } else {
         srcUrlId += tokenizer._consumeValue();
         if (srcUrlId >= urls.length) {
@@ -242,7 +241,6 @@
   }
 
   Span spanFor(int line, int column, {Map<String, SourceFile> files}) {
-    var lineEntry = _findLine(line);
     var entry = _findColumn(line, column, _findLine(line));
     if (entry == null) return null;
     var url = urls[entry.sourceUrlId];
@@ -323,8 +321,9 @@
   final int sourceLine;
   final int sourceColumn;
   final int sourceNameId;
-  TargetEntry(this.column, [this.sourceUrlId, this.sourceLine,
-      this.sourceColumn, this.sourceNameId]);
+
+  TargetEntry(this.column, this.sourceUrlId, this.sourceLine,
+      this.sourceColumn, [this.sourceNameId]);
 
   String toString() => '$runtimeType: '
       '($column, $sourceUrlId, $sourceLine, $sourceColumn, $sourceNameId)';
diff --git a/pkg/source_maps/lib/source_maps.dart b/pkg/source_maps/lib/source_maps.dart
index 1594827..8fc48c9 100644
--- a/pkg/source_maps/lib/source_maps.dart
+++ b/pkg/source_maps/lib/source_maps.dart
@@ -2,22 +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.
 
-/// Source maps library.
-///
-/// ## Installing ##
-///
-/// Use [pub][] to install this package. Add the following to your
-/// `pubspec.yaml` file.
-///
-///     dependencies:
-///       source_maps: any
-///
-/// Then run `pub install`.
-///
-/// For more information, see the
-/// [source_maps package on pub.dartlang.org][pkg].
-///
-/// ## Using ##
+/// Library to create and parse source maps.
 ///
 /// Create a source map using [SourceMapBuilder]. For example:
 ///     var json = (new SourceMapBuilder()
@@ -33,6 +18,20 @@
 ///     var mapping = parse(json);
 ///     mapping.spanFor(outputSpan1.line, outputSpan1.column)
 ///
+/// ## Getting the code ##
+///
+/// This library is distributed as a [pub][] package. To install this package,
+/// add the following to your `pubspec.yaml` file:
+///
+///     dependencies:
+///       source_maps: any
+///
+/// After you run `pub install`, you should be able to access this library by
+/// importing `package:source_maps/source_maps.dart`.
+///
+/// For more information, see the
+/// [source_maps package on pub.dartlang.org][pkg].
+///
 /// [pub]: http://pub.dartlang.org
 /// [pkg]: http://pub.dartlang.org/packages/source_maps
 library source_maps;
diff --git a/pkg/source_maps/pubspec.yaml b/pkg/source_maps/pubspec.yaml
index a559b58..4ae1802 100644
--- a/pkg/source_maps/pubspec.yaml
+++ b/pkg/source_maps/pubspec.yaml
@@ -1,6 +1,6 @@
 name: source_maps
 author: "Dart Team <misc@dartlang.org>"
-homepage: https://github.com/dart-lang/source-maps
+homepage: http://www.dartlang.org
 description: Library to programmatically manipulate source map files.
 dev_dependencies:
   unittest: any
diff --git a/pkg/source_maps/test/common.dart b/pkg/source_maps/test/common.dart
index 661979b..0c1f28a 100644
--- a/pkg/source_maps/test/common.dart
+++ b/pkg/source_maps/test/common.dart
@@ -27,6 +27,11 @@
 Span inputVar1 = ispan(30, 38, true);
 Span inputFunction = ispan(74, 82, true);
 Span inputVar2 = ispan(87, 95, true);
+
+Span inputVar1NoSymbol = ispan(30, 38);
+Span inputFunctionNoSymbol = ispan(74, 82);
+Span inputVar2NoSymbol = ispan(87, 95);
+
 Span inputExpr = ispan(108, 127);
 
 /// Content of the target file
@@ -43,6 +48,9 @@
 Span outputVar1 = ospan(4, 5, true);
 Span outputFunction = ospan(11, 12, true);
 Span outputVar2 = ospan(13, 14, true);
+Span outputVar1NoSymbol = ospan(4, 5);
+Span outputFunctionNoSymbol = ospan(11, 12);
+Span outputVar2NoSymbol = ospan(13, 14);
 Span outputExpr = ospan(19, 24);
 
 /// Expected output mapping when recording the following four mappings:
diff --git a/pkg/source_maps/test/end2end_test.dart b/pkg/source_maps/test/end2end_test.dart
index 5ea958a..99fe40d 100644
--- a/pkg/source_maps/test/end2end_test.dart
+++ b/pkg/source_maps/test/end2end_test.dart
@@ -13,11 +13,17 @@
     expect(inputVar1.text, 'longVar1');
     expect(inputFunction.text, 'longName');
     expect(inputVar2.text, 'longVar2');
+    expect(inputVar1NoSymbol.text, 'longVar1');
+    expect(inputFunctionNoSymbol.text, 'longName');
+    expect(inputVar2NoSymbol.text, 'longVar2');
     expect(inputExpr.text, 'longVar1 + longVar2');
 
     expect(outputVar1.text, 'x');
     expect(outputFunction.text, 'f');
     expect(outputVar2.text, 'y');
+    expect(outputVar1NoSymbol.text, 'x');
+    expect(outputFunctionNoSymbol.text, 'f');
+    expect(outputVar2NoSymbol.text, 'y');
     expect(outputExpr.text, 'x + y');
   });
 
@@ -35,6 +41,55 @@
     check(outputExpr, mapping, inputExpr, false);
   });
 
+  test('build + parse - no symbols', () {
+    var map = (new SourceMapBuilder()
+        ..addSpan(inputVar1NoSymbol, outputVar1NoSymbol)
+        ..addSpan(inputFunctionNoSymbol, outputFunctionNoSymbol)
+        ..addSpan(inputVar2NoSymbol, outputVar2NoSymbol)
+        ..addSpan(inputExpr, outputExpr))
+        .build(output.url);
+    var mapping = parseJson(map);
+    check(outputVar1NoSymbol, mapping, inputVar1NoSymbol, false);
+    check(outputVar2NoSymbol, mapping, inputVar2NoSymbol, false);
+    check(outputFunctionNoSymbol, mapping, inputFunctionNoSymbol, false);
+    check(outputExpr, mapping, inputExpr, false);
+  });
+
+  test('build + parse, repeated entries', () {
+    var map = (new SourceMapBuilder()
+        ..addSpan(inputVar1, outputVar1)
+        ..addSpan(inputVar1, outputVar1)
+        ..addSpan(inputFunction, outputFunction)
+        ..addSpan(inputFunction, outputFunction)
+        ..addSpan(inputVar2, outputVar2)
+        ..addSpan(inputVar2, outputVar2)
+        ..addSpan(inputExpr, outputExpr)
+        ..addSpan(inputExpr, outputExpr))
+        .build(output.url);
+    var mapping = parseJson(map);
+    check(outputVar1, mapping, inputVar1, false);
+    check(outputVar2, mapping, inputVar2, false);
+    check(outputFunction, mapping, inputFunction, false);
+    check(outputExpr, mapping, inputExpr, false);
+  });
+
+  test('build + parse - no symbols, repeated entries', () {
+    var map = (new SourceMapBuilder()
+        ..addSpan(inputVar1NoSymbol, outputVar1NoSymbol)
+        ..addSpan(inputVar1NoSymbol, outputVar1NoSymbol)
+        ..addSpan(inputFunctionNoSymbol, outputFunctionNoSymbol)
+        ..addSpan(inputFunctionNoSymbol, outputFunctionNoSymbol)
+        ..addSpan(inputVar2NoSymbol, outputVar2NoSymbol)
+        ..addSpan(inputVar2NoSymbol, outputVar2NoSymbol)
+        ..addSpan(inputExpr, outputExpr))
+        .build(output.url);
+    var mapping = parseJson(map);
+    check(outputVar1NoSymbol, mapping, inputVar1NoSymbol, false);
+    check(outputVar2NoSymbol, mapping, inputVar2NoSymbol, false);
+    check(outputFunctionNoSymbol, mapping, inputFunctionNoSymbol, false);
+    check(outputExpr, mapping, inputExpr, false);
+  });
+
   test('build + parse with file', () {
     var json = (new SourceMapBuilder()
         ..addSpan(inputVar1, outputVar1)
diff --git a/pkg/stack_trace/lib/src/frame.dart b/pkg/stack_trace/lib/src/frame.dart
index 6ba3079..5a0582c 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -5,7 +5,7 @@
 library frame;
 
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'trace.dart';
 
diff --git a/pkg/stack_trace/pubspec.yaml b/pkg/stack_trace/pubspec.yaml
index 3a679a8..b672df7 100644
--- a/pkg/stack_trace/pubspec.yaml
+++ b/pkg/stack_trace/pubspec.yaml
@@ -5,7 +5,7 @@
   A package for manipulating stack traces and printing them readably.
 
 dependencies:
-  pathos: any
+  path: any
 
 dev_dependencies:
   unittest: any
diff --git a/pkg/stack_trace/test/frame_test.dart b/pkg/stack_trace/test/frame_test.dart
index f38278d..75302a7 100644
--- a/pkg/stack_trace/test/frame_test.dart
+++ b/pkg/stack_trace/test/frame_test.dart
@@ -4,7 +4,7 @@
 
 library frame_test;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:stack_trace/stack_trace.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/stack_trace/test/trace_test.dart b/pkg/stack_trace/test/trace_test.dart
index fbe11a3..92b2b20 100644
--- a/pkg/stack_trace/test/trace_test.dart
+++ b/pkg/stack_trace/test/trace_test.dart
@@ -4,7 +4,7 @@
 
 library trace_test;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:stack_trace/stack_trace.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/stack_trace/test/vm_test.dart b/pkg/stack_trace/test/vm_test.dart
index 38b2b80..6570c24 100644
--- a/pkg/stack_trace/test/vm_test.dart
+++ b/pkg/stack_trace/test/vm_test.dart
@@ -7,7 +7,7 @@
 /// platform to platform. No similar file exists for dart2js since the specific
 /// method names there are implementation details.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:stack_trace/stack_trace.dart';
 import 'package:unittest/unittest.dart';
 
diff --git a/pkg/unittest/lib/compact_vm_config.dart b/pkg/unittest/lib/compact_vm_config.dart
index 7c4b0d6..b2bbc59 100644
--- a/pkg/unittest/lib/compact_vm_config.dart
+++ b/pkg/unittest/lib/compact_vm_config.dart
@@ -10,13 +10,16 @@
  */
 library compact_vm_config;
 
+import 'dart:async';
 import 'dart:io';
+
 import 'unittest.dart';
 import 'vm_config.dart';
 
 const String _GREEN = '\u001b[32m';
 const String _RED = '\u001b[31m';
 const String _NONE = '\u001b[0m';
+
 const int MAX_LINE = 80;
 
 class CompactVMConfiguration extends VMConfiguration {
@@ -25,11 +28,11 @@
   int _fail = 0;
 
   void onInit() {
-    super.onInit();
+    // Override and don't call the superclass onInit() to avoid printing the
+    // "unittest-suite-..." boilerplate.
   }
 
   void onStart() {
-    super.onStart();
     _start = new DateTime.now();
   }
 
@@ -57,6 +60,14 @@
     }
   }
 
+  void onDone(bool success) {
+    // Override and don't call the superclass onDone() to avoid printing the
+    // "unittest-suite-..." boilerplate.
+    Future.wait([stdout.close(), stderr.close()]).then((_) {
+      exit(success ? 0 : 1);
+    });
+  }
+
   String _indent(String str) {
     return str.split("\n").map((line) => "  $line").join("\n");
   }
@@ -67,11 +78,11 @@
     if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) {
       print('\nNo tests ran.');
     } else if (failed == 0 && errors == 0 && uncaughtError == null) {
-      _progressLine(_start, _pass, _fail, 'All tests pass', _GREEN);
-      print('\nAll $passed tests passed.');
+      _progressLine(_start, _pass, _fail, 'All tests passed!', _NONE);
+      print('');
       success = true;
     } else {
-      _progressLine(_start, _pass, _fail, 'Some tests fail', _RED);
+      _progressLine(_start, _pass, _fail, 'Some tests failed.', _RED);
       print('');
       if (uncaughtError != null) {
         print('Top-level uncaught error: $uncaughtError');
@@ -94,10 +105,12 @@
     buffer.write('+');
     buffer.write(passed);
     buffer.write(_NONE);
-    if (failed != 0) buffer.write(_RED);
-    buffer.write(' -');
-    buffer.write(failed);
-    if (failed != 0) buffer.write(_NONE);
+    if (failed != 0) {
+      buffer.write(_RED);
+      buffer.write(' -');
+      buffer.write(failed);
+      buffer.write(_NONE);
+    }
     buffer.write(': ');
     buffer.write(color);
 
@@ -171,6 +184,12 @@
 }
 
 void useCompactVMConfiguration() {
+  // If the test is running on the Dart buildbots, we don't want to use this
+  // config since it's output may not be what the bots expect.
+  if (Platform.environment.containsKey('BUILDBOT_BUILDERNAME')) {
+    return;
+  }
+
   unittestConfiguration = _singleton;
 }
 
diff --git a/pkg/watcher/README.md b/pkg/watcher/README.md
new file mode 100644
index 0000000..75b0470
--- /dev/null
+++ b/pkg/watcher/README.md
@@ -0,0 +1,2 @@
+A file watcher. It monitors (currently by polling) for changes to contents of
+directories and notifies you when files have been added, removed, or modified.
\ No newline at end of file
diff --git a/pkg/watcher/example/watch.dart b/pkg/watcher/example/watch.dart
new file mode 100644
index 0000000..235578d
--- /dev/null
+++ b/pkg/watcher/example/watch.dart
@@ -0,0 +1,24 @@
+// 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.
+
+/// Watches the given directory and prints each modification to it.
+library watch;
+
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:watcher/watcher.dart';
+
+main() {
+  var args = new Options().arguments;
+  if (args.length != 1) {
+    print("Usage: watch <directory path>");
+    return;
+  }
+
+  var watcher = new DirectoryWatcher(p.absolute(args[0]));
+  watcher.events.listen((event) {
+    print(event);
+  });
+}
\ No newline at end of file
diff --git a/pkg/watcher/lib/src/directory_watcher.dart b/pkg/watcher/lib/src/directory_watcher.dart
new file mode 100644
index 0000000..61bf6c5
--- /dev/null
+++ b/pkg/watcher/lib/src/directory_watcher.dart
@@ -0,0 +1,237 @@
+// 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.
+
+library watcher.directory_watcher;
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:crypto/crypto.dart';
+
+import 'stat.dart';
+import 'watch_event.dart';
+
+/// Watches the contents of a directory and emits [WatchEvent]s when something
+/// in the directory has changed.
+class DirectoryWatcher {
+  /// The directory whose contents are being monitored.
+  final String directory;
+
+  /// The broadcast [Stream] of events that have occurred to files in
+  /// [directory].
+  ///
+  /// Changes will only be monitored while this stream has subscribers. Any
+  /// file changes that occur during periods when there are no subscribers
+  /// will not be reported the next time a subscriber is added.
+  Stream<WatchEvent> get events => _events.stream;
+  StreamController<WatchEvent> _events;
+
+  _WatchState _state = _WatchState.notWatching;
+
+  /// A [Future] that completes when the watcher is initialized and watching
+  /// for file changes.
+  ///
+  /// If the watcher is not currently monitoring the directory (because there
+  /// are no subscribers to [events]), this returns a future that isn't
+  /// complete yet. It will complete when a subscriber starts listening and
+  /// the watcher finishes any initialization work it needs to do.
+  ///
+  /// If the watcher is already monitoring, this returns an already complete
+  /// future.
+  Future get ready => _ready.future;
+  Completer _ready = new Completer();
+
+  /// The amount of time the watcher pauses between successive polls of the
+  /// directory contents.
+  final Duration pollingDelay;
+
+  /// The previous status of the files in the directory.
+  ///
+  /// Used to tell which files have been modified.
+  final _statuses = new Map<String, _FileStatus>();
+
+  /// Creates a new [DirectoryWatcher] monitoring [directory].
+  ///
+  /// If [pollingDelay] is passed, it specifies the amount of time the watcher
+  /// will pause between successive polls of the directory contents. Making
+  /// this shorter will give more immediate feedback at the expense of doing
+  /// more IO and higher CPU usage. Defaults to one second.
+  DirectoryWatcher(this.directory, {Duration pollingDelay})
+      : pollingDelay = pollingDelay != null ? pollingDelay :
+                                              new Duration(seconds: 1) {
+    _events = new StreamController<WatchEvent>.broadcast(onListen: () {
+      _state = _state.listen(this);
+    }, onCancel: () {
+      _state = _state.cancel(this);
+    });
+  }
+
+  /// Starts the asynchronous polling process.
+  ///
+  /// Scans the contents of the directory and compares the results to the
+  /// previous scan. Loops to continue monitoring as long as there are
+  /// subscribers to the [events] stream.
+  Future _watch() {
+    var files = new Set<String>();
+
+    var stream = new Directory(directory).list(recursive: true);
+
+    return stream.map((entity) {
+      if (entity is! File) return new Future.value();
+      files.add(entity.path);
+      // TODO(rnystrom): These all run as fast as possible and read the
+      // contents of the files. That means there's a pretty big IO hit all at
+      // once. Maybe these should be queued up and rate limited?
+      return _refreshFile(entity.path);
+    }).toList().then((futures) {
+      // Once the listing is done, make sure to wait until each file is also
+      // done.
+      return Future.wait(futures);
+    }).then((_) {
+      var removedFiles = _statuses.keys.toSet().difference(files);
+      for (var removed in removedFiles) {
+        if (_state.shouldNotify) {
+          _events.add(new WatchEvent(ChangeType.REMOVE, removed));
+        }
+        _statuses.remove(removed);
+      }
+
+      var previousState = _state;
+      _state = _state.finish(this);
+
+      // If we were already sending notifications, add a bit of delay before
+      // restarting just so that we don't whale on the file system.
+      // TODO(rnystrom): Tune this and/or make it tunable?
+      if (_state.shouldNotify) {
+        return new Future.delayed(pollingDelay);
+      }
+    }).then((_) {
+      // Make sure we haven't transitioned to a non-watching state during the
+      // delay.
+      if (_state.shouldWatch) _watch();
+    });
+  }
+
+  /// Compares the current state of the file at [path] to the state it was in
+  /// the last time it was scanned.
+  Future _refreshFile(String path) {
+    return getModificationTime(path).then((modified) {
+      var lastStatus = _statuses[path];
+
+      // If it's modification time hasn't changed, assume the file is unchanged.
+      if (lastStatus != null && lastStatus.modified == modified) return;
+
+      return _hashFile(path).then((hash) {
+        var status = new _FileStatus(modified, hash);
+        _statuses[path] = status;
+
+        // Only notify if the file contents changed.
+        if (_state.shouldNotify &&
+            (lastStatus == null || !_sameHash(lastStatus.hash, hash))) {
+          var change = lastStatus == null ? ChangeType.ADD : ChangeType.MODIFY;
+          _events.add(new WatchEvent(change, path));
+        }
+      });
+    });
+  }
+
+  /// Calculates the SHA-1 hash of the file at [path].
+  Future<List<int>> _hashFile(String path) {
+    return new File(path).readAsBytes().then((bytes) {
+      var sha1 = new SHA1();
+      sha1.add(bytes);
+      return sha1.close();
+    });
+  }
+
+  /// Returns `true` if [a] and [b] are the same hash value, i.e. the same
+  /// series of byte values.
+  bool _sameHash(List<int> a, List<int> b) {
+    // Hashes should always be the same size.
+    assert(a.length == b.length);
+
+    for (var i = 0; i < a.length; i++) {
+      if (a[i] != b[i]) return false;
+    }
+
+    return true;
+  }
+}
+
+/// An "event" that is sent to the [_WatchState] FSM to trigger state
+/// transitions.
+typedef _WatchState _WatchStateEvent(DirectoryWatcher watcher);
+
+/// The different states that the watcher can be in and the transitions between
+/// them.
+///
+/// This class defines a finite state machine for keeping track of what the
+/// asynchronous file polling is doing. Each instance of this is a state in the
+/// machine and its [listen], [cancel], and [finish] fields define the state
+/// transitions when those events occur.
+class _WatchState {
+  /// The watcher has no subscribers.
+  static final notWatching = new _WatchState(
+      listen: (watcher) {
+    watcher._watch();
+    return _WatchState.scanning;
+  });
+
+  /// The watcher has subscribers and is scanning for pre-existing files.
+  static final scanning = new _WatchState(
+      cancel: (watcher) {
+    // No longer watching, so create a new incomplete ready future.
+    watcher._ready = new Completer();
+    return _WatchState.cancelling;
+  }, finish: (watcher) {
+    watcher._ready.complete();
+    return _WatchState.watching;
+  }, shouldWatch: true);
+
+  /// The watcher was unsubscribed while polling and we're waiting for the poll
+  /// to finish.
+  static final cancelling = new _WatchState(
+      listen: (_) => _WatchState.scanning,
+      finish: (_) => _WatchState.notWatching);
+
+  /// The watcher has subscribers, we have scanned for pre-existing files and
+  /// now we're polling for changes.
+  static final watching = new _WatchState(
+      cancel: (watcher) {
+    // No longer watching, so create a new incomplete ready future.
+    watcher._ready = new Completer();
+    return _WatchState.cancelling;
+  }, finish: (_) => _WatchState.watching,
+      shouldWatch: true, shouldNotify: true);
+
+  /// Called when the first subscriber to the watcher has been added.
+  final _WatchStateEvent listen;
+
+  /// Called when all subscriptions on the watcher have been cancelled.
+  final _WatchStateEvent cancel;
+
+  /// Called when a poll loop has finished.
+  final _WatchStateEvent finish;
+
+  /// If the directory watcher should be watching the file system while in
+  /// this state.
+  final bool shouldWatch;
+
+  /// If a change event should be sent for a file modification while in this
+  /// state.
+  final bool shouldNotify;
+
+  _WatchState({this.listen, this.cancel, this.finish,
+      this.shouldWatch: false, this.shouldNotify: false});
+}
+
+class _FileStatus {
+  /// The last time the file was modified.
+  DateTime modified;
+
+  /// The SHA-1 hash of the contents of the file.
+  List<int> hash;
+
+  _FileStatus(this.modified, this.hash);
+}
\ No newline at end of file
diff --git a/pkg/watcher/lib/src/stat.dart b/pkg/watcher/lib/src/stat.dart
new file mode 100644
index 0000000..d36eff3
--- /dev/null
+++ b/pkg/watcher/lib/src/stat.dart
@@ -0,0 +1,33 @@
+// 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.
+
+library watcher.stat;
+
+import 'dart:async';
+import 'dart:io';
+
+/// A function that takes a file path and returns the last modified time for
+/// the file at that path.
+typedef DateTime MockTimeCallback(String path);
+
+MockTimeCallback _mockTimeCallback;
+
+/// Overrides the default behavior for accessing a file's modification time
+/// with [callback].
+///
+/// The OS file modification time has pretty rough granularity (like a few
+/// seconds) which can make for slow tests that rely on modtime. This lets you
+/// replace it with something you control.
+void mockGetModificationTime(MockTimeCallback callback) {
+  _mockTimeCallback = callback;
+}
+
+/// Gets the modification time for the file at [path].
+Future<DateTime> getModificationTime(String path) {
+  if (_mockTimeCallback != null) {
+    return new Future.value(_mockTimeCallback(path));
+  }
+
+  return FileStat.stat(path).then((stat) => stat.modified);
+}
diff --git a/pkg/watcher/lib/src/watch_event.dart b/pkg/watcher/lib/src/watch_event.dart
new file mode 100644
index 0000000..d998a25
--- /dev/null
+++ b/pkg/watcher/lib/src/watch_event.dart
@@ -0,0 +1,35 @@
+// 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.
+
+library watcher.watch_event;
+
+/// An event describing a single change to the file system.
+class WatchEvent {
+  /// The manner in which the file at [path] has changed.
+  final ChangeType type;
+
+  /// The path of the file that changed.
+  final String path;
+
+  WatchEvent(this.type, this.path);
+
+  String toString() => "$type $path";
+}
+
+/// Enum for what kind of change has happened to a file.
+class ChangeType {
+  /// A new file has been added.
+  static const ADD = const ChangeType("add");
+
+  /// A file has been removed.
+  static const REMOVE = const ChangeType("remove");
+
+  /// The contents of a file have changed.
+  static const MODIFY = const ChangeType("modify");
+
+  final String _name;
+  const ChangeType(this._name);
+
+  String toString() => _name;
+}
\ No newline at end of file
diff --git a/pkg/watcher/lib/watcher.dart b/pkg/watcher/lib/watcher.dart
new file mode 100644
index 0000000..c4824b8
--- /dev/null
+++ b/pkg/watcher/lib/watcher.dart
@@ -0,0 +1,8 @@
+// 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.
+
+library watcher;
+
+export 'src/watch_event.dart';
+export 'src/directory_watcher.dart';
diff --git a/pkg/watcher/pubspec.yaml b/pkg/watcher/pubspec.yaml
new file mode 100644
index 0000000..263832e
--- /dev/null
+++ b/pkg/watcher/pubspec.yaml
@@ -0,0 +1,13 @@
+name: watcher
+author: "Dart Team <misc@dartlang.org>"
+homepage: http://www.dartlang.org
+description: >
+  A file watcher. It monitors (currently by polling) for changes to contents
+  of directories and notifies you when files have been added, removed, or
+  modified.
+dependencies:
+  crypto: any
+  path: any
+dev_dependencies:
+  scheduled_test: any
+  unittest: any
diff --git a/pkg/watcher/test/directory_watcher_test.dart b/pkg/watcher/test/directory_watcher_test.dart
new file mode 100644
index 0000000..800d54d
--- /dev/null
+++ b/pkg/watcher/test/directory_watcher_test.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:watcher/watcher.dart';
+
+import 'utils.dart';
+
+main() {
+  initConfig();
+
+  setUp(createSandbox);
+
+  test('does not notify for files that already exist when started', () {
+    // Make some pre-existing files.
+    writeFile("a.txt");
+    writeFile("b.txt");
+
+    createWatcher();
+
+    // Change one after the watcher is running.
+    writeFile("b.txt", contents: "modified");
+
+    // We should get a modify event for the changed file, but no add events
+    // for them before this.
+    expectModifyEvent("b.txt");
+  });
+
+  test('notifies when a file is added', () {
+    createWatcher();
+    writeFile("file.txt");
+    expectAddEvent("file.txt");
+  });
+
+  test('notifies when a file is modified', () {
+    writeFile("file.txt");
+    createWatcher();
+    writeFile("file.txt", contents: "modified");
+    expectModifyEvent("file.txt");
+  });
+
+  test('notifies when a file is removed', () {
+    writeFile("file.txt");
+    createWatcher();
+    deleteFile("file.txt");
+    expectRemoveEvent("file.txt");
+  });
+
+  test('notifies when a file is moved', () {
+    writeFile("old.txt");
+    createWatcher();
+    renameFile("old.txt", "new.txt");
+    expectAddEvent("new.txt");
+    expectRemoveEvent("old.txt");
+  });
+
+  test('notifies when a file is modified multiple times', () {
+    writeFile("file.txt");
+    createWatcher();
+    writeFile("file.txt", contents: "modified");
+    expectModifyEvent("file.txt");
+    writeFile("file.txt", contents: "modified again");
+    expectModifyEvent("file.txt");
+  });
+
+  test('does not notify if the file contents are unchanged', () {
+    writeFile("a.txt", contents: "same");
+    writeFile("b.txt", contents: "before");
+    createWatcher();
+    writeFile("a.txt", contents: "same");
+    writeFile("b.txt", contents: "after");
+    expectModifyEvent("b.txt");
+  });
+
+  test('does not notify if the modification time did not change', () {
+    writeFile("a.txt", contents: "before");
+    writeFile("b.txt", contents: "before");
+    createWatcher();
+    writeFile("a.txt", contents: "after", updateModified: false);
+    writeFile("b.txt", contents: "after");
+    expectModifyEvent("b.txt");
+  });
+
+  test('watches files in subdirectories', () {
+    createWatcher();
+    writeFile("a/b/c/d/file.txt");
+    expectAddEvent("a/b/c/d/file.txt");
+  });
+}
diff --git a/pkg/watcher/test/no_subscription_test.dart b/pkg/watcher/test/no_subscription_test.dart
new file mode 100644
index 0000000..e9cb4e3
--- /dev/null
+++ b/pkg/watcher/test/no_subscription_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:watcher/watcher.dart';
+
+import 'utils.dart';
+
+main() {
+  initConfig();
+
+  setUp(createSandbox);
+
+  test('does not notify for changes when there were no subscribers', () {
+    // Note that this test doesn't rely as heavily on the test functions in
+    // utils.dart because it needs to be very explicit about when the event
+    // stream is and is not subscribed.
+    var watcher = createWatcher();
+
+    // Subscribe to the events.
+    var completer = new Completer();
+    var subscription = watcher.events.listen((event) {
+      expect(event.type, equals(ChangeType.ADD));
+      expect(event.path, endsWith("file.txt"));
+      completer.complete();
+    });
+
+    writeFile("file.txt");
+
+    // Then wait until we get an event for it.
+    schedule(() => completer.future);
+
+    // Unsubscribe.
+    schedule(() {
+      subscription.cancel();
+    });
+
+    // Now write a file while we aren't listening.
+    writeFile("unwatched.txt");
+
+    // Then start listening again.
+    schedule(() {
+      completer = new Completer();
+      subscription = watcher.events.listen((event) {
+        // We should get an event for the third file, not the one added while
+        // we weren't subscribed.
+        expect(event.type, equals(ChangeType.ADD));
+        expect(event.path, endsWith("added.txt"));
+        completer.complete();
+      });
+    });
+
+    // The watcher will have been cancelled and then resumed in the middle of
+    // its pause between polling loops. That means the second scan to skip
+    // what changed while we were unsubscribed won't happen until after that
+    // delay is done. Wait long enough for that to happen.
+    schedule(() => new Future.delayed(new Duration(seconds: 1)));
+
+    // And add a third file.
+    writeFile("added.txt");
+
+    // Wait until we get an event for the third file.
+    schedule(() => completer.future);
+
+    schedule(() {
+      subscription.cancel();
+    });
+  });
+}
diff --git a/pkg/watcher/test/ready_test.dart b/pkg/watcher/test/ready_test.dart
new file mode 100644
index 0000000..dd799ce
--- /dev/null
+++ b/pkg/watcher/test/ready_test.dart
@@ -0,0 +1,106 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:watcher/watcher.dart';
+
+import 'utils.dart';
+
+main() {
+  initConfig();
+
+  setUp(createSandbox);
+
+  test('ready does not complete until after subscription', () {
+    var watcher = createWatcher(waitForReady: false);
+
+    var ready = false;
+    watcher.ready.then((_) {
+      ready = true;
+    });
+
+    // Should not be ready yet.
+    schedule(() {
+      expect(ready, isFalse);
+    });
+
+    // Subscribe to the events.
+    schedule(() {
+      var subscription = watcher.events.listen((event) {});
+
+      currentSchedule.onComplete.schedule(() {
+        subscription.cancel();
+      });
+    });
+
+    // Should eventually be ready.
+    schedule(() => watcher.ready);
+
+    schedule(() {
+      expect(ready, isTrue);
+    });
+  });
+
+  test('ready completes immediately when already ready', () {
+    var watcher = createWatcher(waitForReady: false);
+
+    // Subscribe to the events.
+    schedule(() {
+      var subscription = watcher.events.listen((event) {});
+
+      currentSchedule.onComplete.schedule(() {
+        subscription.cancel();
+      });
+    });
+
+    // Should eventually be ready.
+    schedule(() => watcher.ready);
+
+    // Now ready should be a future that immediately completes.
+    var ready = false;
+    schedule(() {
+      watcher.ready.then((_) {
+        ready = true;
+      });
+    });
+
+    schedule(() {
+      expect(ready, isTrue);
+    });
+  });
+
+  test('ready returns a future that does not complete after unsubscribing', () {
+    var watcher = createWatcher(waitForReady: false);
+
+    // Subscribe to the events.
+    var subscription;
+    schedule(() {
+      subscription = watcher.events.listen((event) {});
+    });
+
+    var ready = false;
+
+    // Wait until ready.
+    schedule(() => watcher.ready);
+
+    // Now unsubscribe.
+    schedule(() {
+      subscription.cancel();
+
+      // Track when it's ready again.
+      ready = false;
+      watcher.ready.then((_) {
+        ready = true;
+      });
+    });
+
+    // Should be back to not ready.
+    schedule(() {
+      expect(ready, isFalse);
+    });
+  });
+}
diff --git a/pkg/watcher/test/utils.dart b/pkg/watcher/test/utils.dart
new file mode 100644
index 0000000..3f5844b
--- /dev/null
+++ b/pkg/watcher/test/utils.dart
@@ -0,0 +1,196 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 watcher.test.utils;
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:unittest/compact_vm_config.dart';
+import 'package:watcher/watcher.dart';
+import 'package:watcher/src/stat.dart';
+
+/// The path to the temporary sandbox created for each test. All file
+/// operations are implicitly relative to this directory.
+String _sandboxDir;
+
+/// The [DirectoryWatcher] being used for the current scheduled test.
+DirectoryWatcher _watcher;
+
+/// The index in [_watcher]'s event stream for the next event. When event
+/// expectations are set using [expectEvent] (et. al.), they use this to
+/// expect a series of events in order.
+var _nextEvent = 0;
+
+/// The mock modification times (in milliseconds since epoch) for each file.
+///
+/// The actual file system has pretty coarse granularity for file modification
+/// times. This means using the real file system requires us to put delays in
+/// the tests to ensure we wait long enough between operations for the mod time
+/// to be different.
+///
+/// Instead, we'll just mock that out. Each time a file is written, we manually
+/// increment the mod time for that file instantly.
+Map<String, int> _mockFileModificationTimes;
+
+void initConfig() {
+  useCompactVMConfiguration();
+}
+
+/// Creates the sandbox directory the other functions in this library use and
+/// ensures it's deleted when the test ends.
+///
+/// This should usually be called by [setUp].
+void createSandbox() {
+  var dir = new Directory("").createTempSync();
+  _sandboxDir = dir.path;
+
+  _mockFileModificationTimes = new Map<String, int>();
+  mockGetModificationTime((path) {
+    path = p.normalize(p.relative(path, from: _sandboxDir));
+
+    // Make sure we got a path in the sandbox.
+    assert(p.isRelative(path)  && !path.startsWith(".."));
+
+    return new DateTime.fromMillisecondsSinceEpoch(
+        _mockFileModificationTimes[path]);
+  });
+
+  // Delete the sandbox when done.
+  currentSchedule.onComplete.schedule(() {
+    if (_sandboxDir != null) {
+      new Directory(_sandboxDir).deleteSync(recursive: true);
+      _sandboxDir = null;
+    }
+
+    _mockFileModificationTimes = null;
+    mockGetModificationTime(null);
+  }, "delete sandbox");
+}
+
+/// Creates a new [DirectoryWatcher] that watches a temporary directory.
+///
+/// Normally, this will pause the schedule until the watcher is done scanning
+/// and is polling for changes. If you pass `false` for [waitForReady], it will
+/// not schedule this delay.
+DirectoryWatcher createWatcher({bool waitForReady}) {
+  // Use a short delay to make the tests run quickly.
+  _watcher = new DirectoryWatcher(_sandboxDir,
+      pollingDelay: new Duration(milliseconds: 100));
+
+  // Wait until the scan is finished so that we don't miss changes to files
+  // that could occur before the scan completes.
+  if (waitForReady != false) {
+    schedule(() => _watcher.ready);
+  }
+
+  currentSchedule.onComplete.schedule(() {
+    _nextEvent = 0;
+    _watcher = null;
+  }, "reset watcher");
+
+  return _watcher;
+}
+
+void expectEvent(ChangeType type, String path) {
+  // Immediately create the future. This ensures we don't register too late and
+  // drop the event before we receive it.
+  var future = _watcher.events.elementAt(_nextEvent++).then((event) {
+    expect(event, new _ChangeMatcher(type, path));
+  });
+
+  // Make sure the schedule is watching it in case it fails.
+  currentSchedule.wrapFuture(future);
+
+  // Schedule it so that later file modifications don't occur until after this
+  // event is received.
+  schedule(() => future);
+}
+
+void expectAddEvent(String path) {
+  expectEvent(ChangeType.ADD, p.join(_sandboxDir, path));
+}
+
+void expectModifyEvent(String path) {
+  expectEvent(ChangeType.MODIFY, p.join(_sandboxDir, path));
+}
+
+void expectRemoveEvent(String path) {
+  expectEvent(ChangeType.REMOVE, p.join(_sandboxDir, path));
+}
+
+/// Schedules writing a file in the sandbox at [path] with [contents].
+///
+/// If [contents] is omitted, creates an empty file. If [updatedModified] is
+/// `false`, the mock file modification time is not changed.
+void writeFile(String path, {String contents, bool updateModified}) {
+  if (contents == null) contents = "";
+  if (updateModified == null) updateModified = true;
+
+  schedule(() {
+    var fullPath = p.join(_sandboxDir, path);
+
+    // Create any needed subdirectories.
+    var dir = new Directory(p.dirname(fullPath));
+    if (!dir.existsSync()) {
+      dir.createSync(recursive: true);
+    }
+
+    new File(fullPath).writeAsStringSync(contents);
+
+    // Manually update the mock modification time for the file.
+    if (updateModified) {
+      // Make sure we always use the same separator on Windows.
+      path = p.normalize(path);
+
+      var milliseconds = _mockFileModificationTimes.putIfAbsent(path, () => 0);
+      _mockFileModificationTimes[path]++;
+    }
+  });
+}
+
+/// Schedules deleting a file in the sandbox at [path].
+void deleteFile(String path) {
+  schedule(() {
+    new File(p.join(_sandboxDir, path)).deleteSync();
+  });
+}
+
+/// Schedules renaming a file in the sandbox from [from] to [to].
+///
+/// If [contents] is omitted, creates an empty file.
+void renameFile(String from, String to) {
+  schedule(() {
+    new File(p.join(_sandboxDir, from)).renameSync(p.join(_sandboxDir, to));
+
+    // Make sure we always use the same separator on Windows.
+    to = p.normalize(to);
+
+    // Manually update the mock modification time for the file.
+    var milliseconds = _mockFileModificationTimes.putIfAbsent(to, () => 0);
+    _mockFileModificationTimes[to]++;
+  });
+}
+
+/// A [Matcher] for [WatchEvent]s.
+class _ChangeMatcher extends BaseMatcher {
+  /// The expected change.
+  final ChangeType type;
+
+  /// The expected path.
+  final String path;
+
+  _ChangeMatcher(this.type, this.path);
+
+  Description describe(Description description) {
+    description.add("$type $path");
+  }
+
+  bool matches(item, Map matchState) =>
+      item is WatchEvent &&
+      item.type == type &&
+      p.normalize(item.path) == p.normalize(path);
+}
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 099f6a0..731342a 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -337,7 +337,7 @@
       'type': 'none',
       'toolsets':['host'],
       'includes': [
-        'vmstats_sources.gypi',
+        'resources_sources.gypi'
       ],
       'actions': [
         {
@@ -353,7 +353,7 @@
             'python',
             'tools/create_resources.py',
             '--output', '<(resources_cc_file)',
-            '--root_prefix', 'bin/vmstats/',
+            '--root_prefix', 'bin/',
             '<@(_sources)',
           ],
           'message': 'Generating ''<(resources_cc_file)'' file.'
@@ -381,13 +381,6 @@
         'builtin.h',
         'io_natives.h',
         'resources.h',
-        'vmstats.h',
-        'vmstats_impl.cc',
-        'vmstats_impl.h',
-        'vmstats_impl_android.cc',
-        'vmstats_impl_linux.cc',
-        'vmstats_impl_macos.cc',
-        'vmstats_impl_win.cc',
         '<(snapshot_cc_file)',
         '<(resources_cc_file)',
       ],
@@ -449,13 +442,6 @@
         'builtin.h',
         'io_natives.h',
         'resources.h',
-        'vmstats.h',
-        'vmstats_impl.cc',
-        'vmstats_impl.h',
-        'vmstats_impl_android.cc',
-        'vmstats_impl_linux.cc',
-        'vmstats_impl_macos.cc',
-        'vmstats_impl_win.cc',
         # Include generated source files.
         '<(builtin_cc_file)',
         '<(io_cc_file)',
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 818acaf..700eed7 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -35,14 +35,16 @@
 _getHttpRequestStatusString() => _httpRequestStatusString;
 _getHttpRequestResponse() => _httpRequestResponse;
 
-void _requestCompleted(HttpClientResponseBody body) {
-  _httpRequestResponseCode = body.statusCode;
-  _httpRequestStatusString = '${body.statusCode} ${body.reasonPhrase}';
+void _requestCompleted(List<int> data, HttpClientResponse response) {
+  _httpRequestResponseCode = response.statusCode;
+  _httpRequestStatusString = '${response.statusCode} ${response.reasonPhrase}';
   _httpRequestResponse = null;
-  if (body.statusCode != 200 || body.type == 'json') {
+  if (response.statusCode != 200 ||
+      (response.headers.contentType != null &&
+       response.headers.contentType.mimeType == 'application/json')) {
     return;
   }
-  _httpRequestResponse = body.body;
+  _httpRequestResponse = data;
 }
 
 
@@ -61,9 +63,12 @@
   Uri requestUri = Uri.parse(uri);
   _client.getUrl(requestUri)
       .then((HttpClientRequest request) => request.close())
-      .then(HttpBodyHandler.processResponse)
-      .then((HttpClientResponseBody body) {
-        _requestCompleted(body);
+      .then((HttpClientResponse response) {
+        return response
+            .fold(new BytesBuilder(), (b, d) => b..add(d))
+            .then((builder) {
+              _requestCompleted(builder.takeBytes(), response);
+            });
       }).catchError((error) {
         _requestFailed(error);
       });
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 3e107f8..5de42ac 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -778,6 +778,7 @@
 Dart_Handle DartUtils::NewDartOSError(OSError* os_error) {
   // Create a dart:io OSError object with the information retrieved from the OS.
   Dart_Handle type = GetDartType(kIOLibURL, "OSError");
+  ASSERT(!Dart_IsError(type));
   Dart_Handle args[2];
   args[0] = NewString(os_error->message());
   args[1] = Dart_NewInteger(os_error->code());
@@ -791,6 +792,7 @@
                                                    Dart_Handle os_error) {
   // Create a Dart Exception object with a message and an OSError.
   Dart_Handle type = GetDartType(library_url, exception_name);
+  ASSERT(!Dart_IsError(type));
   Dart_Handle args[2];
   args[0] = NewString(message);
   args[1] = os_error;
@@ -803,6 +805,7 @@
                                                    const char* message) {
   // Create a Dart Exception object with a message.
   Dart_Handle type = GetDartType(library_url, exception_name);
+  ASSERT(!Dart_IsError(type));
   if (message != NULL) {
     Dart_Handle args[1];
     args[0] = NewString(message);
@@ -832,7 +835,7 @@
 
 
 Dart_Handle DartUtils::NewInternalError(const char* message) {
-  return NewDartExceptionWithMessage(kCoreLibURL, "InternalError", message);
+  return NewDartExceptionWithMessage(kCoreLibURL, "_InternalError", message);
 }
 
 
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 18f7667..af29300 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -20,7 +20,6 @@
 #include "bin/log.h"
 #include "bin/platform.h"
 #include "bin/process.h"
-#include "bin/vmstats_impl.h"
 #include "platform/globals.h"
 
 namespace dart {
@@ -49,10 +48,6 @@
 static const char* debug_ip = DEFAULT_DEBUG_IP;
 static int debug_port = -1;
 
-// Global state that defines the VmStats web server port and root directory.
-static int vmstats_port = -1;
-static const char* vmstats_root = "";
-
 // Value of the --package-root flag.
 // (This pointer points into an argv buffer and does not need to be
 // free'd.)
@@ -173,24 +168,6 @@
 }
 
 
-static bool ProcessVmStatsOption(const char* port) {
-  ASSERT(port != NULL);
-  if (*port == '\0') {
-    vmstats_port = 0;  // Dynamically assigned port number.
-  } else {
-    if ((*port == '=') || (*port == ':')) {
-      vmstats_port = atoi(port + 1);
-    }
-  }
-  if (vmstats_port < 0) {
-    Log::PrintErr("unrecognized --stats option syntax. "
-                    "Use --stats[:<port number>]\n");
-    return false;
-  }
-  return true;
-}
-
-
 static bool ProcessPrintScriptOption(const char* arg) {
   ASSERT(arg != NULL);
   if (*arg != '\0') {
@@ -201,16 +178,6 @@
 }
 
 
-static bool ProcessVmStatsRootOption(const char* arg) {
-  ASSERT(arg != NULL);
-  if (*arg == '\0') {
-    return false;
-  }
-  vmstats_root = arg;
-  return true;
-}
-
-
 static bool ProcessGenScriptSnapshotOption(const char* filename) {
   if (filename != NULL && strlen(filename) != 0) {
     // Ensure that are already running using a full snapshot.
@@ -248,8 +215,6 @@
   { "--compile_all", ProcessCompileAllOption },
   { "--debug", ProcessDebugOption },
   { "--snapshot=", ProcessGenScriptSnapshotOption },
-  { "--stats-root=", ProcessVmStatsRootOption },
-  { "--stats", ProcessVmStatsOption },
   { "--print-script", ProcessPrintScriptOption },
   { "--check-function-fingerprints", ProcessFingerprintedFunctions },
   { NULL, NULL }
@@ -519,7 +484,6 @@
     return NULL;
   }
 
-  VmStats::AddIsolate(reinterpret_cast<IsolateData*>(data), isolate);
   return isolate;
 }
 
@@ -585,14 +549,6 @@
 "--print-script\n"
 "  generates Dart source code back and prints it after parsing a Dart script\n"
 "\n"
-"--stats[:<port number>]\n"
-"  enables VM stats service and listens on specified port for HTTP requests\n"
-"  (default port number is dynamically assigned)\n"
-"\n"
-"--stats-root=<path>\n"
-"  where to find static files used by the vmstats application\n"
-"  (used during vmstats plug-in development)\n"
-"\n"
 "The following options are only used for VM development and may\n"
 "be changed in any future version:\n");
     const char* print_flags = "--print_flags";
@@ -656,7 +612,6 @@
 
 static void ShutdownIsolate(void* callback_data) {
   IsolateData* isolate_data = reinterpret_cast<IsolateData*>(callback_data);
-  VmStats::RemoveIsolate(isolate_data);
   EventHandler* handler = isolate_data->event_handler;
   if (handler != NULL) handler->Shutdown();
   delete isolate_data;
@@ -764,7 +719,6 @@
       Log::Print("Debugger listening on port %d\n", debug_port);
     }
   }
-  VmStats::Start(vmstats_port, vmstats_root, verbose_debug_seen);
 
   // Call CreateIsolateAndSetup which creates an isolate and loads up
   // the specified application script.
@@ -866,9 +820,6 @@
   }
 
   Dart_ExitScope();
-  if (vmstats_port >= 0) {
-    VmStats::Stop();
-  }
   // Shutdown the isolate.
   Dart_ShutdownIsolate();
   // Terminate process exit-code handler.
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 65d271f..6d69139 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -359,13 +359,8 @@
     Future foldStream(Stream<List<int>> stream, Encoding encoding) {
       if (encoding == null) {
         return stream
-            .fold(
-                new _BufferList(),
-                (buf, data) {
-                  buf.add(data);
-                  return buf;
-                })
-            .then((buf) => buf.readBytes());
+            .fold(new BytesBuilder(), (builder, data) => builder..add(data))
+            .then((builder) => builder.takeBytes());
       } else {
         return stream
             .transform(new StringDecoder(encoding))
diff --git a/runtime/bin/resources_sources.gypi b/runtime/bin/resources_sources.gypi
new file mode 100644
index 0000000..e48b460
--- /dev/null
+++ b/runtime/bin/resources_sources.gypi
@@ -0,0 +1,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.
+
+# This file contains all sources for the Resources table.
+# Currently this is unused but at least one source file is needed to build.
+{
+  'sources': [
+    'common_patch.dart'
+  ],
+}
diff --git a/runtime/bin/vmstats.h b/runtime/bin/vmstats.h
deleted file mode 100644
index 6143b95..0000000
--- a/runtime/bin/vmstats.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef BIN_VMSTATS_H_
-#define BIN_VMSTATS_H_
-
-#include "include/dart_api.h"
-
-
-namespace dart {
-namespace bin {
-
-/**
- * A VM status callback. Status plug-ins implement and register this
- * function using Dart_RegisterStatusPlugin. When Dart_GetVMStatus is
- * called, each callback is invoked to provide the requested information,
- * and the first one to do so "wins".
- *
- * Note: status requests execute outside of an isolate (which is why
- * handles aren't used).
- *
- * \param request an optional string that defines REST-like parameters
- *     to define what information is requested.
- *
- * \return Returns a valid JSON string, allocated from C heap. The caller
- *     is responsible for releasing this string. NULL is returned if the
- *     callback didn't handle that request.
- */
-typedef char* (*Dart_VmStatusCallback)(const char* request);
-
-
-/**
- * Register a VM status plug-in. The specified status type must not already
- * have a registered plug-in.
- *
- * \return 0 if the plug-in was registered, or -1 if there is an error.
- */
-DART_EXPORT int Dart_RegisterVmStatusPlugin(Dart_VmStatusCallback callback);
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // BIN_VMSTATS_H_
diff --git a/runtime/bin/vmstats/README b/runtime/bin/vmstats/README
deleted file mode 100644
index 17909d4..0000000
--- a/runtime/bin/vmstats/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This is the VM Stats program built into the Dart executable.
-
-These files are converted into binary resources during the build, and
-linked into the Dart executable so it is self-contained. These resources
-are available via a built-in HTTP server, enabled with the --stats flag.
-
-Since dart2js requires the dart executable, the vm_stats.dart.js file is
-not re-created with the build. Instead, it should be regenerated whenever
-any of the dart files change, and committed with those changes.  To
-regenerate, from this directory run:
-
-  $ ../../../out/ReleaseIA32/dart-sdk/bin/dart2js -ovmstats.dart.js \
-      vmstats.dart
diff --git a/runtime/bin/vmstats/bargraph.dart b/runtime/bin/vmstats/bargraph.dart
deleted file mode 100644
index b9deb1e..0000000
--- a/runtime/bin/vmstats/bargraph.dart
+++ /dev/null
@@ -1,225 +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.
-
-part of dart.vmstats;
-
-class BarGraph {
-  CanvasElement _canvas;
-  GraphModel _model;
-  List<Element> _elements;
-  double scaleHeight = 0;
-
-  static const int SAMPLE_WIDTH = 5;
-  static const int LEFT_MARGIN = 50;
-  static const int RIGHT_MARGIN = 150;
-  static const int LEGEND_WIDTH = 130;
-  static const int LEGEND_Y = 20;
-  static const int INSIDE_MARGIN = 2;
-  static const int LINE_WIDTH = 2;
-
-  static const int NUM_DIVIDERS = 5;
-  static const String FONT = "14px sans-serif";
-
-  BarGraph(this._canvas, this._elements) {
-    var maxElements =
-        (_canvas.width - LEFT_MARGIN - RIGHT_MARGIN) ~/ SAMPLE_WIDTH;
-    _model = new GraphModel(maxElements);
-    _model.addListener(drawGraph, null);
-    drawBarGraph();
- }
-
-  void addSample(List<int> segments) {
-    if (segments.length != _elements.length) {
-      throw new ArgumentError('invalid sample size for graph');
-    }
-    _model.addSample(segments);
-  }
-
-  void drawBarGraph() {
-    // Draw chart's outer box.
-    var context = _canvas.context2D;
-    context.beginPath();
-    context.strokeStyle = 'black';
-    // The '2's are the width of the line, even though 1 is specified.
-    context.strokeRect(
-        LEFT_MARGIN - 2, 1, _canvas.width - LEFT_MARGIN - RIGHT_MARGIN + 2,
-        _canvas.height - 2, 1);
-
-    // Draw legend.
-    var x = _canvas.width - LEGEND_WIDTH;
-    var y = LEGEND_Y;
-    context.font = FONT;
-    for (var i = _elements.length - 1; i >= 0; i--) {
-      context.fillStyle = _elements[i].color;
-      context.fillRect(x, y, 20, 20);
-      context.fillStyle = 'black';
-      context.fillText(_elements[i].name, x + 30, y + 15);
-      y += 30;
-    }
-  }
-
-  void drawGraph(GraphModel model) {
-    var graphHeight = model.maxTotal;
-    var width = _canvas.clientWidth;
-    var height = _canvas.clientHeight;
-    if (graphHeight >= scaleHeight) {
-      // Make scale height a bit higher to allow for growth, and
-      // round to nearest 100.
-      scaleHeight = graphHeight * 1.2;
-      scaleHeight = ((scaleHeight / 100).ceil() * 100);
-    }
-    var scale = height / scaleHeight;
-    drawValues(scaleHeight, scale);
-    drawChart(scaleHeight, scale);
-  }
-
-  void drawChart(int maxHeight, double scale) {
-    var dividerHeight = maxHeight ~/ NUM_DIVIDERS;
-    var context = _canvas.context2D;
-    context.beginPath();
-    var height = maxHeight.toInt();
-    var scaledY = dividerHeight * scale;
-
-    // Draw the vertical axis values and lines.
-    context.clearRect(0, 0, LEFT_MARGIN - INSIDE_MARGIN, maxHeight);
-    for (var i = 1; i < NUM_DIVIDERS; i++) {
-      height -= (dividerHeight ~/ 100) * 100;
-      context.font = FONT;
-      context.fillStyle = 'black';
-      context.textAlign = 'right';
-      context.textBaseline = 'middle';
-      context.fillText(height.toString(), LEFT_MARGIN - 10, scaledY);
-      context.moveTo(LEFT_MARGIN - INSIDE_MARGIN, scaledY);
-      context.strokeStyle = 'grey';
-      context.lineWidth = 0.5;
-      context.lineTo(_canvas.width - RIGHT_MARGIN, scaledY);
-      context.stroke();
-      scaledY += dividerHeight * scale;
-    }
-  }
-
-  void drawValues(int maxHeight, num scale) {
-    Iterator<Sample> iterator = _model.iterator;
-    var x = LEFT_MARGIN + INSIDE_MARGIN;
-    var y = INSIDE_MARGIN;
-    var w = _canvas.width - LEFT_MARGIN - RIGHT_MARGIN - INSIDE_MARGIN;
-    var h = (maxHeight * scale).ceil() - (2 * INSIDE_MARGIN);
-    _canvas.context2D.clearRect(x, y, w, h);
-
-    while (iterator.moveNext()) {
-      Sample s = iterator.current;
-      var y = INSIDE_MARGIN;
-      if (s != null) {
-        var blankHeight = scaleHeight - s.total();
-        drawVerticalSegment(x, y, SAMPLE_WIDTH, blankHeight, 'white', scale);
-        y += blankHeight;
-        for (int i = s.length - 1; i >= 0; i--) {
-          var h = s[i];
-          drawVerticalSegment(x, y, SAMPLE_WIDTH, h, _elements[i].color, scale);
-          y += s[i];
-        }
-      } else {
-        drawVerticalSegment(x, INSIDE_MARGIN, SAMPLE_WIDTH,
-            maxHeight, 'white', scale);
-      }
-      x += SAMPLE_WIDTH ;
-    }
-  }
-
-  void drawVerticalSegment(int x, int y, int w, int h, String color,
-                           num scale) {
-    var context = _canvas.context2D;
-    y = (y * scale).floor();
-    h = (h * scale).ceil();
-    context.beginPath();
-    context.lineWidth = w;
-    context.fillStyle = color;
-    context.strokeStyle = color;
-    if (x < INSIDE_MARGIN) {
-      x = INSIDE_MARGIN;
-    }
-    if (y < INSIDE_MARGIN) {
-      y = INSIDE_MARGIN;
-    }
-    var max = _canvas.height - INSIDE_MARGIN;
-    if ((y + h) > max) {
-      h = max - y;
-    }
-    context.moveTo(x, y);
-    context.lineTo(x, y + h);
-    context.stroke();
-  }
-}
-
-class GraphModel extends ObservableModel {
-  List<Sample> _samples = new List<Sample>();
-  int _maxSize;
-
-  static const int _LARGE_LENGTH = 999999999;
-
-  GraphModel(this._maxSize) {}
-
-  void addSample(List<int> segments) {
-    var len = _samples.length;
-    if (_samples.length >= _maxSize) {
-      _samples.remove(_samples.first);
-    }
-    _samples.add(new Sample(segments));
-    notifySuccess();
-  }
-
-  int get maxSize => _maxSize;
-
-  Iterator<Sample> get iterator => _samples.iterator;
-
-  Sample operator[](int i) => _samples[i];
-
-  /**
-   * Returns the minimum total from all the samples.
-   */
-  int get minTotal {
-    var min = _LARGE_LENGTH;
-    _samples.forEach((Sample s) => min = (s.total() < min ? s.total() : min));
-    return min;
-  }
-
-  /**
-   * Returns the maximum total from all the samples.
-   */
-  int get maxTotal {
-    var max = 1;  // Must be non-zero.
-    _samples.forEach((Sample s) => max = (s.total() > max ? s.total() : max));
-    return max;
-  }
-}
-
-/**
- * An element is a data type that gets charted. Each element has a name for
- * the legend, and a color for the bar graph. The number of elements in a
- * graph should match the number of segments in each sample.
- */
-class Element {
-  final String name;
-  final String color;  // Any description the DOM will accept, like "red".
-
-  Element(this.name, this.color) {}
-}
-
-/**
- * A sample is a list of segment lengths.
- */
-class Sample {
-  List<int> _segments;
-
-  Sample(this._segments) {}
-
-  int get length => _segments.length;
-  int operator[](int i) => _segments[i];
-
-  Iterator<int> get iterator => _segments.iterator;
-
-  int total() {
-    return _segments.fold(0, (int prev, int element) => prev + element);
-  }
-}
diff --git a/runtime/bin/vmstats/favicon.ico b/runtime/bin/vmstats/favicon.ico
deleted file mode 100644
index 50ea5b0..0000000
--- a/runtime/bin/vmstats/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/runtime/bin/vmstats/isolate_list.dart b/runtime/bin/vmstats/isolate_list.dart
deleted file mode 100644
index 3a63b86..0000000
--- a/runtime/bin/vmstats/isolate_list.dart
+++ /dev/null
@@ -1,135 +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.
-
-part of dart.vmstats;
-
-class IsolateList {
-  TableElement _isolateTable;
-
-  static const String DETAILS = 'isolate_details';
-  static const String VISIBLE = 'visible';
-  static const String HIDDEN  = 'hidden';
-  static const String ISOLATE_LIST_ITEM = 'isolate_list_item';
-  static const String ISOLATE_DETAILS_COLUMN = 'isolate_details_column';
-  static const String ISOLATE_ROW = 'isolate_row';
-  static const String ISOLATE_STACKTRACE_COLUMN = 'isolate_stacktrace_column';
-  static const String NEW_SPACE = 'new_space';
-  static const String OLD_SPACE = 'old_space';
-  static const String STACK_FRAME = 'stack_frame';
-  static const String EMPTY_STACK_FRAME = 'empty_stack_frame';
-  static const String STACK_LIMIT = 'stack_limit';
-  static const String STACK_TRACE = 'stack_trace';
-  static const String STACK_TRACE_TITLE = 'stack_trace_title';
-
-  IsolateList(this._isolateTable) {}
-
-  void updateList(IsolateListModel model) {
-    var iterator = model.iterator;
-    while (iterator.moveNext()) {
-      var isolate = iterator.current;
-      var isolateId = 'isolate-${isolate.port}';
-      var isolateRow = _isolateTable.query('#$isolateId');
-      if (isolateRow != null) {
-        updateIsolateDetails(isolate, isolateRow);
-      } else {
-        isolateRow = new TableRowElement();
-        isolateRow.$dom_className = ISOLATE_ROW;
-        isolateRow.id = isolateId;
-        _isolateTable.children.add(isolateRow);
-        var detailsCell = new TableCellElement();
-        detailsCell.$dom_className = ISOLATE_DETAILS_COLUMN;
-        isolateRow.children.add(detailsCell);
-        var basicData = new DivElement();
-        basicData.text = isolate.name
-          .replaceAll('\$', ': ')  // Split script from isolate, and ...
-          .replaceAll('-', ' ');   // ... split name from port number.
-        detailsCell.children.add(basicData);
-
-        // Add isolate details as hidden children.
-        var details = new DivElement();
-        details.classes.addAll([DETAILS, HIDDEN]);
-        detailsCell.children.add(details);
-
-        // Add stacktrace column.
-        var stacktraceCell = new TableCellElement();
-        stacktraceCell.classes.addAll([ISOLATE_STACKTRACE_COLUMN, HIDDEN]);
-        isolateRow.children.add(stacktraceCell);
-        var stacktrace = new DivElement();
-        stacktrace.classes.addAll([STACK_TRACE, HIDDEN]);
-        stacktraceCell.children.add(stacktrace);
-
-        isolateRow.onClick.listen((e) => toggleRow(isolateRow));
-        updateIsolateDetails(isolate, isolateRow);
-      }
-    }
-  }
-
-  void setStacktrace(DivElement element, String json) {
-    element.children.clear();
-    var response = JSON.parse(json);
-    element.id = response['handle'];
-    var title = new DivElement();
-    title.$dom_className = STACK_TRACE_TITLE;
-    title.text = "Stack Trace";
-    element.children.add(title);
-
-    var stackTrace = response['stacktrace'];
-    if (stackTrace.length > 0) {
-      var stackIterator = response['stacktrace'].iterator;
-      var i = 0;
-      while (stackIterator.moveNext()) {
-        i++;
-        var frame = stackIterator.current;
-        var frameElement = new DivElement();
-        var text = '$i: ${frame["url"]}:${frame["line"]}: ${frame["function"]}';
-        var code = frame["code"];
-        if (code['optimized']) {
-          text = '$text (optimized)';
-        }
-        frameElement.text = text;
-        frameElement.$dom_className = STACK_FRAME;
-        element.children.add(frameElement);
-      }
-    } else {
-      DivElement noStack = new DivElement();
-      noStack.$dom_className = EMPTY_STACK_FRAME;
-      noStack.text = "<no stack>";
-      element.children.add(noStack);
-    }
-  }
-
-  Element findOrAddChild(DivElement parent, String className) {
-    var child = parent.query('.$className');
-    if (child == null) {
-      child = new DivElement();
-      child.$dom_className = className;
-      parent.children.add(child);
-    }
-    return child;
-  }
-
-  void updateIsolateDetails(Isolate isolate, TableRowElement row) {
-    var details = row.query('.$DETAILS');
-    var newSpace = findOrAddChild(details, NEW_SPACE);
-    newSpace.text = 'New space: ${isolate.newSpace.used}K';
-    var oldSpace = findOrAddChild(details, OLD_SPACE);
-    oldSpace.text = 'Old space: ${isolate.oldSpace.used}K';
-    var stackLimit = findOrAddChild(details, STACK_LIMIT);
-    stackLimit.text =
-        'Stack limit: ${(isolate.stackLimit.abs() / 1000000).round()}M';
-    var stackTrace = findOrAddChild(row, ISOLATE_STACKTRACE_COLUMN);
-    HttpRequest.getString('/isolate/${isolate.handle}/stacktrace').then(
-        (String response) => setStacktrace(stackTrace, response));
-  }
-
-  void toggleRow(TableRowElement row) {
-    toggleElement(row.query('.$DETAILS'));
-    toggleElement(row.query('.$ISOLATE_STACKTRACE_COLUMN'));
-  }
-
-  void toggleElement(Element e) {
-    e.classes.toggle(VISIBLE);
-    e.classes.toggle(HIDDEN);
-  }
-}
diff --git a/runtime/bin/vmstats/models.dart b/runtime/bin/vmstats/models.dart
deleted file mode 100644
index 965f4cd..0000000
--- a/runtime/bin/vmstats/models.dart
+++ /dev/null
@@ -1,119 +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.
-
-part of dart.vmstats;
-
-// Base class of model that reports changes to registered listeners.
-abstract class ObservableModel {
-  List<ModelListener> _listeners = [];
-
-  void addListener(Function onUpdate, Function onFailure) {
-    _listeners.add(new ModelListener(onUpdate, onFailure));
-  }
-
-  void removeListener(Function onUpdate) {
-    Iterator<ModelListener> iterator = _listeners.iterator;
-    while (iterator.moveNext()) {
-      if (iterator.current._onUpdate == onUpdate) {
-        _listeners.remove(iterator.current);
-        return;
-      }
-    }
-  }
-
-  void notifySuccess() {
-   _listeners.forEach((listener) => listener.changed(this));
-  }
-
-  void notifyFailure() {
-    _listeners.forEach((listener) => listener.failed());
-  }
-}
-
-// Model of a set of listener functions to call when a model changes.
-class ModelListener {
-  Function _onUpdate;
-  Function _onFailure;
-
-  ModelListener(this._onUpdate, this._onFailure) {}
-
-  void changed(IsolateListModel model) => Function.apply(_onUpdate, [model]);
-  void failed() => Function.apply(_onFailure, []);
-}
-
-
-// Model of the current running isolates.
-class IsolateListModel extends ObservableModel {
-  List<Isolate> _isolates = [];
-
-  void update() {
-    HttpRequest.getString('/isolates').then(
-        (Map response) => _onUpdate(JSON.parse(response)),
-        onError: (e) => notifyFailure());
-  }
-
-  void _onUpdate(Map isolateMap) {
-    _isolates = [];
-    List list = isolateMap['isolates'];
-    for (int i = 0; i < list.length; i++) {
-      _isolates.add(new Isolate(list[i]));
-    }
-    notifySuccess();
-  }
-
-  String toString() {
-    return _isolates.join(', ');
-  }
-
-  // List delegate method subset.
-  Isolate elementAt(int index) => _isolates[index];
-
-  void forEach(void f(Isolate element)) => _isolates.forEach(f);
-
-  bool isEmpty() => _isolates.isEmpty;
-
-  Iterator<Isolate> get iterator => _isolates.iterator;
-
-  int get length => _isolates.length;
-
-  Isolate operator[](int index) => _isolates[index];
-}
-
-
-// Model of a single isolate.
-class Isolate {
-  final String handle;
-  final String name;
-  final int port;
-  final int startTime;
-  final int stackLimit;
-  final Space newSpace;
-  final Space oldSpace;
-
-  // Create an isolate from a map describing an isolate in the observed VM.
-  Isolate(Map raw):
-      handle = raw['handle'],
-      name = raw['name'],
-      port = raw['port'],
-      startTime = raw['starttime'],
-      stackLimit = raw['stacklimit'],
-      newSpace = new Space(raw['newspace']),
-      oldSpace = new Space(raw['oldspace']) {}
-
-  String toString() {
-    return '$name: ${newSpace.used + oldSpace.used}K';
-  }
-}
-
-// Model of a memory space.
-class Space {
-  final int used;
-  final int capacity;
-
-  Space(Map raw): used = raw['used'], capacity = raw['capacity'] {}
-
-  String toString() {
-    return 'used: $used capacity: $capacity';
-  }
-}
diff --git a/runtime/bin/vmstats/packages/browser/dart.js b/runtime/bin/vmstats/packages/browser/dart.js
deleted file mode 100644
index bf60f52..0000000
--- a/runtime/bin/vmstats/packages/browser/dart.js
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Bootstrap support for Dart scripts on the page as this script.
-if (navigator.webkitStartDart) {
-  if (!navigator.webkitStartDart()) {
-    document.body.innerHTML = 'This build has expired.  Please download a new Dartium at http://www.dartlang.org/dartium/index.html';
-  }
-} else {
-  // TODO:
-  // - Support in-browser compilation.
-  // - Handle inline Dart scripts.
-  window.addEventListener("DOMContentLoaded", function (e) {
-    // Fall back to compiled JS. Run through all the scripts and
-    // replace them if they have a type that indicate that they source
-    // in Dart code.
-    //
-    //   <script type="application/dart" src="..."></script>
-    //
-    var scripts = document.getElementsByTagName("script");
-    var length = scripts.length;
-    for (var i = 0; i < length; ++i) {
-      if (scripts[i].type == "application/dart") {
-        // Remap foo.dart to foo.dart.js.
-        if (scripts[i].src && scripts[i].src != '') {
-          var script = document.createElement('script');
-          script.src = scripts[i].src + '.js';
-          var parent = scripts[i].parentNode;
-          parent.replaceChild(script, scripts[i]);
-        }
-      }
-    }
-  }, false);
-}
-
-// ---------------------------------------------------------------------------
-// Experimental support for JS interoperability
-// ---------------------------------------------------------------------------
-function SendPortSync() {
-}
-
-function ReceivePortSync() {
-  this.id = ReceivePortSync.id++;
-  ReceivePortSync.map[this.id] = this;
-}
-
-(function() {
-  // Serialize the following types as follows:
-  //  - primitives / null: unchanged
-  //  - lists: [ 'list', internal id, list of recursively serialized elements ]
-  //  - maps: [ 'map', internal id, map of keys and recursively serialized values ]
-  //  - send ports: [ 'sendport', type, isolate id, port id ]
-  //
-  // Note, internal id's are for cycle detection.
-  function serialize(message) {
-    var visited = [];
-    function checkedSerialization(obj, serializer) {
-      // Implementation detail: for now use linear search.
-      // Another option is expando, but it may prohibit
-      // VM optimizations (like putting object into slow mode
-      // on property deletion.)
-      var id = visited.indexOf(obj);
-      if (id != -1) return [ 'ref', id ];
-      var id = visited.length;
-      visited.push(obj);
-      return serializer(id);
-    }
-
-    function doSerialize(message) {
-      if (message == null) {
-        return null;  // Convert undefined to null.
-      } else if (typeof(message) == 'string' ||
-                 typeof(message) == 'number' ||
-                 typeof(message) == 'boolean') {
-        return message;
-      } else if (message instanceof Array) {
-        return checkedSerialization(message, function(id) {
-          var values = new Array(message.length);
-          for (var i = 0; i < message.length; i++) {
-            values[i] = doSerialize(message[i]);
-          }
-          return [ 'list', id, values ];
-        });
-      } else if (message instanceof LocalSendPortSync) {
-        return [ 'sendport', 'nativejs', message.receivePort.id ];
-      } else if (message instanceof DartSendPortSync) {
-        return [ 'sendport', 'dart', message.isolateId, message.portId ];
-      } else {
-        return checkedSerialization(message, function(id) {
-          var keys = Object.getOwnPropertyNames(message);
-          var values = new Array(keys.length);
-          for (var i = 0; i < keys.length; i++) {
-            values[i] = doSerialize(message[keys[i]]);
-          }
-          return [ 'map', id, keys, values ];
-        });
-      }
-    }
-    return doSerialize(message);
-  }
-
-  function deserialize(message) {
-    return deserializeHelper(message);
-  }
-
-  function deserializeHelper(message) {
-    if (message == null ||
-        typeof(message) == 'string' ||
-        typeof(message) == 'number' ||
-        typeof(message) == 'boolean') {
-      return message;
-    }
-    switch (message[0]) {
-      case 'map': return deserializeMap(message);
-      case 'sendport': return deserializeSendPort(message);
-      case 'list': return deserializeList(message);
-      default: throw 'unimplemented';
-    }
-  }
-
-  function deserializeMap(message) {
-    var result = { };
-    var id = message[1];
-    var keys = message[2];
-    var values = message[3];
-    for (var i = 0, length = keys.length; i < length; i++) {
-      var key = deserializeHelper(keys[i]);
-      var value = deserializeHelper(values[i]);
-      result[key] = value;
-    }
-    return result;
-  }
-
-  function deserializeSendPort(message) {
-    var tag = message[1];
-    switch (tag) {
-      case 'nativejs':
-        var id = message[2];
-        return new LocalSendPortSync(ReceivePortSync.map[id]);
-      case 'dart':
-        var isolateId = message[2];
-        var portId = message[3];
-        return new DartSendPortSync(isolateId, portId);
-      default:
-        throw 'Illegal SendPortSync type: $tag';
-    }
-  }
-
-  function deserializeList(message) {
-    var values = message[2];
-    var length = values.length;
-    var result = new Array(length);
-    for (var i = 0; i < length; i++) {
-      result[i] = deserializeHelper(values[i]);
-    }
-    return result;
-  }
-
-  window.registerPort = function(name, port) {
-    var stringified = JSON.stringify(serialize(port));
-    var attrName = 'dart-port:' + name;
-    document.documentElement.setAttribute(attrName, stringified);
-  };
-
-  window.lookupPort = function(name) {
-    var attrName = 'dart-port:' + name;
-    var stringified = document.documentElement.getAttribute(attrName);
-    return deserialize(JSON.parse(stringified));
-  };
-
-  ReceivePortSync.id = 0;
-  ReceivePortSync.map = {};
-
-  ReceivePortSync.dispatchCall = function(id, message) {
-    // TODO(vsm): Handle and propagate exceptions.
-    var deserialized = deserialize(message);
-    var result = ReceivePortSync.map[id].callback(deserialized);
-    return serialize(result);
-  };
-
-  ReceivePortSync.prototype.receive = function(callback) {
-    this.callback = callback;
-  };
-
-  ReceivePortSync.prototype.toSendPort = function() {
-    return new LocalSendPortSync(this);
-  };
-
-  ReceivePortSync.prototype.close = function() {
-    delete ReceivePortSync.map[this.id];
-  };
-
-  if (navigator.webkitStartDart) {
-    window.addEventListener('js-sync-message', function(event) {
-      var data = JSON.parse(getPortSyncEventData(event));
-      var deserialized = deserialize(data.message);
-      var result = ReceivePortSync.map[data.id].callback(deserialized);
-      // TODO(vsm): Handle and propagate exceptions.
-      dispatchEvent('js-result', serialize(result));
-    }, false);
-  }
-
-  function LocalSendPortSync(receivePort) {
-    this.receivePort = receivePort;
-  }
-
-  LocalSendPortSync.prototype = new SendPortSync();
-
-  LocalSendPortSync.prototype.callSync = function(message) {
-    // TODO(vsm): Do a direct deepcopy.
-    message = deserialize(serialize(message));
-    return this.receivePort.callback(message);
-  }
-
-  function DartSendPortSync(isolateId, portId) {
-    this.isolateId = isolateId;
-    this.portId = portId;
-  }
-
-  DartSendPortSync.prototype = new SendPortSync();
-
-  function dispatchEvent(receiver, message) {
-    var string = JSON.stringify(message);
-    var event = document.createEvent('CustomEvent');
-    event.initCustomEvent(receiver, false, false, string);
-    window.dispatchEvent(event);
-  }
-
-  function getPortSyncEventData(event) {
-    return event.detail;
-  }
-
-  DartSendPortSync.prototype.callSync = function(message) {
-    var serialized = serialize(message);
-    var target = 'dart-port-' + this.isolateId + '-' + this.portId;
-    // TODO(vsm): Make this re-entrant.
-    // TODO(vsm): Set this up set once, on the first call.
-    var source = target + '-result';
-    var result = null;
-    var listener = function (e) {
-      result = JSON.parse(getPortSyncEventData(e));
-    };
-    window.addEventListener(source, listener, false);
-    dispatchEvent(target, [source, serialized]);
-    window.removeEventListener(source, listener, false);
-    return deserialize(result);
-  }
-})();
diff --git a/runtime/bin/vmstats/vmstats.css b/runtime/bin/vmstats/vmstats.css
deleted file mode 100644
index 65f7d38..0000000
--- a/runtime/bin/vmstats/vmstats.css
+++ /dev/null
@@ -1,66 +0,0 @@
-
-body {
-  background-color: #F8F8F8;
-  font-family: 'Open Sans', sans-serif;
-  font-size: 14px;
-  font-weight: normal;
-  line-height: 1.2em;
-  margin: 15px;
-}
-
-h1, p {
-  color: #333;
-}
-
-#vmstats {
-  width: 100%;
-  height: 500px;
-  position: relative;
-  border: 1px solid #ccc;
-  background-color: #fff;
-  padding: 10px;
-}
-
-#dashboard {
-  font-size: 12pt;
-  text-align: left;
-  margin: 20px;
-}
-
-#graph {
-  font-size: 12pt;
-  text-align: left;
-}
-
-.isolate_list {
-  font-family: 'Open Sans', sans-serif;
-  font-size: 14px;
-  vertical-align: top;
-}
-
-.isolate_details {
-  visibility:visible;
-}
-
-.hidden {
-  visibility:hidden;
-  height: 0px;
-}
-
-.stack_trace_title {
-  font-weight: bold;
-}
-
-.stack_frame {
-  font-family: "monospace";
-}
-
-.empty_stack_frame {
-  font-style: italic;
-}
-
-td {
-  padding-left: 10px;
-  padding-right: 10px;
-  vertical-align: top;
-}
diff --git a/runtime/bin/vmstats/vmstats.dart b/runtime/bin/vmstats/vmstats.dart
deleted file mode 100644
index 9cc43c5..0000000
--- a/runtime/bin/vmstats/vmstats.dart
+++ /dev/null
@@ -1,60 +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.
-
-library dart.vmstats;
-
-import 'dart:async';
-import 'dart:html';
-import 'dart:json' as JSON;
-
-part 'bargraph.dart';
-part 'isolate_list.dart';
-part 'models.dart';
-
-BarGraph _graph;
-IsolateList _isolateList;
-DivElement _statusText;
-IsolateListModel _isolates;
-Timer _updater;
-
-final int _POLL_INTERVAL = const Duration(seconds: 3);
-final String CYAN = '#00EE76';
-final String GREEN = '#97FFFF';
-
-void main() {
-  DivElement dashBoard = query('#dashboard');
-  CanvasElement canvas = query('#graph');
-  var elements = [ new Element("Old Space", GREEN),
-                   new Element("New Space", CYAN)];
-  _graph = new BarGraph(canvas, elements);
-  _isolateList = new IsolateList(query('#isolateList'));
-  _statusText = query('#statusText');
-
-  _isolates = new IsolateListModel();
-  _isolates.addListener(onUpdateStatus, onRequestFailed);
-  _isolates.update();
-  _updater = new Timer.periodic(_POLL_INTERVAL, (timer) => _isolates.update());
-}
-
-void onUpdateStatus(IsolateListModel model) {
-  int oldSpace = 0;
-  int newSpace = 0;
-  model.forEach((Isolate element) {
-    oldSpace += element.oldSpace.used;
-    newSpace += element.newSpace.used;
-  });
-  _graph.addSample([oldSpace, newSpace]);
-  _isolateList.updateList(model);
-  showStatus('Running ...');
-}
-
-void onRequestFailed() {
-  _updater.cancel();
-  _isolates.removeListener(onUpdateStatus);
-  showStatus('Server closed');
-}
-
-void showStatus(status) {
-  _statusText.text = status;
-}
diff --git a/runtime/bin/vmstats/vmstats.dart.js b/runtime/bin/vmstats/vmstats.dart.js
deleted file mode 100644
index 95ac221..0000000
--- a/runtime/bin/vmstats/vmstats.dart.js
+++ /dev/null
@@ -1,8848 +0,0 @@
-// Generated by dart2js, the Dart to JavaScript compiler.
-// The code supports the following hooks:
-// dartPrint(message)   - if this function is defined it is called
-//                        instead of the Dart [print] method.
-// dartMainRunner(main) - if this function is defined, the Dart [main]
-//                        method will not be invoked directly.
-//                        Instead, a closure that will invoke [main] is
-//                        passed to [dartMainRunner].
-function Isolate() {}
-init();
-
-var $ = Isolate.$isolateProperties;
-var $$ = {};
-
-// Classes
-$$.ListIterable = {"": "IterableBase;",
-  get$iterator: function(_) {
-    return $.ListIterator$(this);
-  },
-  forEach$1: function(_, action) {
-    var $length, i;
-    $length = this.get$length(this);
-    if (typeof $length !== "number")
-      return this.forEach$1$bailout1(1, action, $length);
-    for (i = 0; i < $length; ++i) {
-      action.call$1(this.elementAt$1(this, i));
-      if ($length !== this.get$length(this))
-        throw $.wrapException($.ConcurrentModificationError$(this));
-    }
-  },
-  forEach$1$bailout1: function(state0, action, $length) {
-    var t1, i;
-    for (t1 = $.getInterceptor($length), i = 0; $.JSNumber_methods.$lt(i, $length); ++i) {
-      action.call$1(this.elementAt$1(this, i));
-      if (t1.$eq($length, this.get$length(this)) !== true)
-        throw $.wrapException($.ConcurrentModificationError$(this));
-    }
-  },
-  get$isEmpty: function(_) {
-    return $.$eq(this.get$length(this), 0);
-  },
-  skip$1: function(_, count) {
-    return $.SubListIterable$(this, count, null);
-  },
-  toList$1$growable: function(_, growable) {
-    var result, i, t1;
-    if (growable === true) {
-      result = $.List_List($);
-      $.JSArray_methods.set$length(result, this.get$length(this));
-    } else
-      result = $.List_List(this.get$length(this));
-    for (i = 0; $.JSNumber_methods.$lt(i, this.get$length(this)); ++i) {
-      t1 = this.elementAt$1(this, i);
-      if (i >= result.length)
-        throw $.ioore(i);
-      result[i] = t1;
-    }
-    return result;
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.SubListIterable = {"": "ListIterable;_iterable,_start,_endOrLength",
-  get$_endIndex: function() {
-    var $length, t1;
-    $length = $.get$length$asx(this._iterable);
-    t1 = this._endOrLength;
-    if (t1 == null || $.JSNull_methods.$gt(t1, $length))
-      return $length;
-    return t1;
-  },
-  get$_startIndex: function() {
-    var $length, t1;
-    $length = $.get$length$asx(this._iterable);
-    t1 = this._start;
-    if ($.JSNumber_methods.$gt(t1, $length))
-      return $length;
-    return t1;
-  },
-  get$length: function(_) {
-    var $length, t1, t2;
-    $length = $.get$length$asx(this._iterable);
-    if (typeof $length !== "number")
-      return this.get$length$bailout2(1, $length);
-    t1 = this._start;
-    if (t1 >= $length)
-      return 0;
-    t2 = this._endOrLength;
-    if (t2 == null || $.JSNull_methods.$ge(t2, $length))
-      return $length - t1;
-    return $.JSNull_methods.$sub(t2, t1);
-  },
-  get$length$bailout2: function(state0, $length) {
-    var t1, t2;
-    t1 = this._start;
-    if ($.JSNumber_methods.$ge(t1, $length))
-      return 0;
-    t2 = this._endOrLength;
-    if (t2 == null || $.JSNull_methods.$ge(t2, $length))
-      return $.$sub$n($length, t1);
-    return $.JSNull_methods.$sub(t2, t1);
-  },
-  elementAt$1: function(_, index) {
-    var t1, realIndex;
-    if (typeof index !== "number")
-      return this.elementAt$1$bailout2(1, index);
-    t1 = this.get$_startIndex();
-    if (typeof t1 !== "number")
-      return this.elementAt$1$bailout2(2, index, t1);
-    realIndex = t1 + index;
-    if (!(index < 0)) {
-      t1 = this.get$_endIndex();
-      if (typeof t1 !== "number")
-        return this.elementAt$1$bailout2(3, index, t1, realIndex);
-      t1 = realIndex >= t1;
-    } else
-      t1 = true;
-    if (t1)
-      throw $.wrapException($.RangeError$range(index, 0, this.get$length(this)));
-    return $.elementAt$1$ax(this._iterable, realIndex);
-  },
-  elementAt$1$bailout2: function(state0, index, t1, realIndex) {
-    switch (state0) {
-      case 0:
-      case 1:
-        state0 = 0;
-        t1 = this.get$_startIndex();
-      case 2:
-        state0 = 0;
-        realIndex = $.$add$ns(t1, index);
-      case 3:
-        if (state0 === 3 || state0 === 0 && !$.$lt$n(index, 0))
-          switch (state0) {
-            case 0:
-              t1 = this.get$_endIndex();
-            case 3:
-              state0 = 0;
-              t1 = $.$ge$n(realIndex, t1);
-          }
-        else
-          t1 = true;
-        if (t1)
-          throw $.wrapException($.RangeError$range(index, 0, this.get$length(this)));
-        return $.elementAt$1$ax(this._iterable, realIndex);
-    }
-  },
-  skip$1: function(_, count) {
-    if (count < 0)
-      throw $.wrapException($.ArgumentError$(count));
-    return $.SubListIterable$(this._iterable, this._start + count, this._endOrLength);
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.ListIterator = {"": "Object;_iterable,_liblib$_length,_index,_liblib$_current",
-  get$current: function() {
-    return this._liblib$_current;
-  },
-  moveNext$0: function() {
-    var t1, t2, t3;
-    t1 = this._liblib$_length;
-    t2 = this._iterable;
-    if ($.$eq(t1, $.get$length$asx(t2)) !== true)
-      throw $.wrapException($.ConcurrentModificationError$(t2));
-    t3 = this._index;
-    if (t3 === t1) {
-      this._liblib$_current = null;
-      return false;
-    }
-    this._liblib$_current = $.elementAt$1$ax(t2, t3);
-    this._index = this._index + 1;
-    return true;
-  }
-};
-
-$$.MappedIterable = {"": "IterableBase;_iterable,_f",
-  _f$1: function(arg0) {
-    return this._f.call$1(arg0);
-  },
-  get$iterator: function(_) {
-    var t1 = this._iterable;
-    return $.MappedIterator$(t1.get$iterator(t1), this._f);
-  },
-  get$length: function(_) {
-    var t1 = this._iterable;
-    return t1.get$length(t1);
-  },
-  get$isEmpty: function(_) {
-    var t1 = this._iterable;
-    return t1.get$isEmpty(t1);
-  },
-  elementAt$1: function(_, index) {
-    var t1 = this._iterable;
-    return this._f$1(t1.elementAt$1(t1, index));
-  },
-  $asIterable: function() {
-    return function (S, T) { return [T]; };
-  }
-};
-
-$$.MappedIterator = {"": "Iterator;_liblib$_current,_iterator,_f",
-  _f$1: function(arg0) {
-    return this._f.call$1(arg0);
-  },
-  moveNext$0: function() {
-    var t1 = this._iterator;
-    if (t1.moveNext$0() === true) {
-      this._liblib$_current = this._f$1(t1.get$current());
-      return true;
-    }
-    this._liblib$_current = null;
-    return false;
-  },
-  get$current: function() {
-    return this._liblib$_current;
-  }
-};
-
-$$.WhereIterable = {"": "IterableBase;_iterable,_f",
-  get$iterator: function(_) {
-    var t1 = this._iterable;
-    return $.WhereIterator$(t1.get$iterator(t1), this._f);
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.WhereIterator = {"": "Iterator;_iterator,_f",
-  _f$1: function(arg0) {
-    return this._f.call$1(arg0);
-  },
-  moveNext$0: function() {
-    for (var t1 = this._iterator; t1.moveNext$0() === true;)
-      if (this._f$1(t1.get$current()) === true)
-        return true;
-    return false;
-  },
-  get$current: function() {
-    return this._iterator.get$current();
-  }
-};
-
-$$.SkipIterable = {"": "IterableBase;_iterable,_skipCount",
-  skip$1: function(_, n) {
-    if (typeof n !== "number" || Math.floor(n) !== n || n < 0)
-      throw $.wrapException($.ArgumentError$(n));
-    return $.SkipIterable$(this._iterable, $.$add$ns(this._skipCount, n));
-  },
-  get$iterator: function(_) {
-    return $.SkipIterator$($.get$iterator$ax(this._iterable), this._skipCount);
-  },
-  SkipIterable$2: function(_iterable, _skipCount) {
-    var t1 = this._skipCount;
-    if (typeof t1 !== "number" || Math.floor(t1) !== t1 || $.$lt$n(t1, 0))
-      throw $.wrapException($.ArgumentError$(t1));
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.SkipIterator = {"": "Iterator;_iterator,_skipCount",
-  moveNext$0: function() {
-    var t1, i, t2;
-    t1 = this._iterator;
-    i = 0;
-    while (true) {
-      t2 = this._skipCount;
-      if (typeof t2 !== "number")
-        return this.moveNext$0$bailout1(1, t1, i, t2);
-      if (!(i < t2))
-        break;
-      t1.moveNext$0();
-      ++i;
-    }
-    this._skipCount = 0;
-    return t1.moveNext$0();
-  },
-  moveNext$0$bailout1: function(state0, t1, i, t2) {
-    switch (state0) {
-      case 0:
-        t1 = this._iterator;
-        i = 0;
-      case 1:
-        L0:
-          while (true)
-            switch (state0) {
-              case 0:
-                t2 = this._skipCount;
-              case 1:
-                state0 = 0;
-                if (!$.JSNumber_methods.$lt(i, t2))
-                  break L0;
-                t1.moveNext$0();
-                ++i;
-            }
-        this._skipCount = 0;
-        return t1.moveNext$0();
-    }
-  },
-  get$current: function() {
-    return this._iterator.get$current();
-  },
-  SkipIterator$2: function(_iterator, _skipCount) {
-  }
-};
-
-$$.ToString__emitPair_anon = {"": "Closure;box_0,result_1,visiting_2",
-  call$2: function(k, v) {
-    var t1, t2;
-    t1 = this.box_0;
-    if (!t1.first_0)
-      this.result_1.write$1(", ");
-    t1.first_0 = false;
-    t1 = this.result_1;
-    t2 = this.visiting_2;
-    $.ToString__emitObject(k, t1, t2);
-    t1.write$1(": ");
-    $.ToString__emitObject(v, t1, t2);
-  }
-};
-
-$$.HashMap_values_anon = {"": "Closure;this_0",
-  call$1: function(each) {
-    return $.$index$asx(this.this_0, each);
-  }
-};
-
-$$.HashMap_addAll_anon = {"": "Closure;this_0",
-  call$2: function(key, value) {
-    $.$indexSet$ax(this.this_0, key, value);
-  }
-};
-
-$$.HashMapKeyIterable = {"": "IterableBase;_map",
-  get$length: function(_) {
-    return this._map._liblib0$_length;
-  },
-  get$isEmpty: function(_) {
-    return this._map._liblib0$_length === 0;
-  },
-  get$iterator: function(_) {
-    var t1 = this._map;
-    return $.HashMapKeyIterator$(t1, t1._computeKeys$0());
-  },
-  forEach$1: function(_, f) {
-    var t1, keys, $length, i;
-    t1 = this._map;
-    keys = t1._computeKeys$0();
-    for ($length = keys.length, i = 0; i < $length; ++i) {
-      f.call$1(keys[i]);
-      if (keys !== t1._keys)
-        throw $.wrapException($.ConcurrentModificationError$(t1));
-    }
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.HashMapKeyIterator = {"": "Object;_map,_keys,_offset,_liblib0$_current",
-  get$current: function() {
-    return this._liblib0$_current;
-  },
-  moveNext$0: function() {
-    var keys, offset, t1;
-    keys = this._keys;
-    offset = this._offset;
-    t1 = this._map;
-    if (keys !== t1._keys)
-      throw $.wrapException($.ConcurrentModificationError$(t1));
-    else if (offset >= keys.length) {
-      this._liblib0$_current = null;
-      return false;
-    } else {
-      this._liblib0$_current = keys[offset];
-      this._offset = offset + 1;
-      return true;
-    }
-  }
-};
-
-$$.LinkedHashMap_values_anon = {"": "Closure;this_0",
-  call$1: function(each) {
-    return $.$index$asx(this.this_0, each);
-  }
-};
-
-$$.LinkedHashMap_addAll_anon = {"": "Closure;this_0",
-  call$2: function(key, value) {
-    $.$indexSet$ax(this.this_0, key, value);
-  }
-};
-
-$$.LinkedHashMapCell = {"": "Object;_key<,_value@,_next@,_previous@"};
-
-$$.LinkedHashMapKeyIterable = {"": "IterableBase;_map",
-  get$length: function(_) {
-    return this._map._liblib0$_length;
-  },
-  get$isEmpty: function(_) {
-    return this._map._liblib0$_length === 0;
-  },
-  get$iterator: function(_) {
-    var t1 = this._map;
-    return $.LinkedHashMapKeyIterator$(t1, t1._modifications);
-  },
-  forEach$1: function(_, f) {
-    var t1, cell, modifications;
-    t1 = this._map;
-    cell = t1._first;
-    modifications = t1._modifications;
-    for (; cell != null;) {
-      f.call$1(cell.get$_key());
-      if (modifications !== t1._modifications)
-        throw $.wrapException($.ConcurrentModificationError$(t1));
-      cell = cell.get$_next();
-    }
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.LinkedHashMapKeyIterator = {"": "Object;_map,_modifications,_cell,_liblib0$_current",
-  get$current: function() {
-    return this._liblib0$_current;
-  },
-  moveNext$0: function() {
-    var t1 = this._map;
-    if (this._modifications !== t1._modifications)
-      throw $.wrapException($.ConcurrentModificationError$(t1));
-    else {
-      t1 = this._cell;
-      if (t1 == null) {
-        this._liblib0$_current = null;
-        return false;
-      } else {
-        this._liblib0$_current = t1.get$_key();
-        this._cell = this._cell.get$_next();
-        return true;
-      }
-    }
-  },
-  LinkedHashMapKeyIterator$2: function(_map, _modifications) {
-    this._cell = this._map._first;
-  }
-};
-
-$$.LinkedHashSetCell = {"": "Object;_element<,_next@,_previous@"};
-
-$$.LinkedHashSetIterator = {"": "Object;_set,_modifications,_cell,_liblib0$_current",
-  get$current: function() {
-    return this._liblib0$_current;
-  },
-  moveNext$0: function() {
-    var t1 = this._set;
-    if (this._modifications !== t1._modifications)
-      throw $.wrapException($.ConcurrentModificationError$(t1));
-    else {
-      t1 = this._cell;
-      if (t1 == null) {
-        this._liblib0$_current = null;
-        return false;
-      } else {
-        this._liblib0$_current = t1.get$_element();
-        this._cell = this._cell.get$_next();
-        return true;
-      }
-    }
-  },
-  LinkedHashSetIterator$2: function(_set, _modifications) {
-    this._cell = this._set._first;
-  }
-};
-
-$$.Function__toMangledNames_anon = {"": "Closure;result_0",
-  call$2: function(symbol, value) {
-    var t1 = this.result_0;
-    t1.$indexSet(t1, symbol.get$_name(), value);
-  }
-};
-
-$$.NoSuchMethodError_toString_anon = {"": "Closure;box_0",
-  call$2: function(key, value) {
-    var t1 = this.box_0;
-    if ($.$gt$n(t1.i_1, 0))
-      t1.sb_0.write$1(", ");
-    t1.sb_0.write$1(key);
-    t1.sb_0.write$1(": ");
-    t1.sb_0.write$1($.Error_safeToString(value));
-    t1.i_1 = $.$add$ns(t1.i_1, 1);
-  }
-};
-
-$$.Interceptor = {"": "Object;",
-  $eq: function(receiver, other) {
-    return receiver === other;
-  },
-  get$hashCode: function(receiver) {
-    return $.Primitives_objectHashCode(receiver);
-  },
-  toString$0: function(receiver) {
-    return "Instance of '" + $.S($.Primitives_objectTypeName(receiver)) + "'";
-  }
-};
-
-$$.JSFunction = {"": "Interceptor;",
-  toString$0: function(receiver) {
-    return "Closure";
-  }
-};
-
-$$.JSBool = {"": "Interceptor;",
-  toString$0: function(receiver) {
-    return String(receiver);
-  },
-  get$hashCode: function(receiver) {
-    return receiver ? 519018 : 218159;
-  },
-  $isbool: true
-};
-
-$$.JSNull = {"": "Interceptor;",
-  $eq: function(receiver, other) {
-    return null == other;
-  },
-  toString$0: function(receiver) {
-    return "null";
-  },
-  get$hashCode: function(receiver) {
-    return 0;
-  }
-};
-
-$$.CloseToken = {"": "Object;", $isCloseToken: true};
-
-$$.JsIsolateSink = {"": "EventSink;_isClosed,_port<",
-  add$1: function(_, message) {
-    $.send$1$x(this._port, message);
-  },
-  $eq: function(_, other) {
-    if (other == null)
-      return false;
-    return typeof other === "object" && other !== null && !!$.getInterceptor(other).$isIsolateSink && $.$eq(this._port, other.get$_port()) === true;
-  },
-  get$hashCode: function(_) {
-    return $.$add$ns($.get$hashCode$(this._port), 499);
-  },
-  $isJsIsolateSink: true,
-  $asIsolateSink: null,
-  $isIsolateSink: true
-};
-
-$$._Manager = {"": "Object;nextIsolateId@,currentManagerId,nextManagerId,currentContext<,rootContext,topEventLoop<,fromCommandLine,isWorker<,supportsWorkers,isolates,mainManager,managers",
-  get$useWorkers: function() {
-    return this.supportsWorkers;
-  },
-  get$needSerialization: function() {
-    return this.get$useWorkers();
-  },
-  _nativeDetectEnvironment$0: function() {
-    var t1, t2;
-    t1 = $.get$globalWindow() == null;
-    this.isWorker = t1 && $.get$globalPostMessageDefined() === true;
-    if (this.isWorker !== true)
-      t2 = $.get$globalWorker() != null && $.get$IsolateNatives_thisScript() != null;
-    else
-      t2 = true;
-    this.supportsWorkers = t2;
-    this.fromCommandLine = t1 && this.isWorker !== true;
-  },
-  _nativeInitWorkerMessageHandler$0: function() {
-    var $function = function (e) { $.IsolateNatives__processWorkerMessage.call$2(this.mainManager, e); };
-    $.get$globalThis().onmessage = $function;
-    $.get$globalThis().dartPrint = function (object) {};
-  },
-  maybeCloseWorker$0: function() {
-    if (this.isWorker === true) {
-      var t1 = this.isolates;
-      t1 = t1.get$isEmpty(t1) && this.topEventLoop.activeTimerCount === 0;
-    } else
-      t1 = false;
-    if (t1) {
-      t1 = this.mainManager;
-      t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "close"])));
-    }
-  },
-  _Manager$0: function() {
-    this._nativeDetectEnvironment$0();
-    this.topEventLoop = $._EventLoop$();
-    this.isolates = $.Map_Map();
-    this.managers = $.Map_Map();
-    if (this.isWorker === true) {
-      this.mainManager = $._MainManagerStub$();
-      this._nativeInitWorkerMessageHandler$0();
-    }
-  }
-};
-
-$$._IsolateContext = {"": "Object;id*,ports,isolateStatics",
-  eval$1: function(code) {
-    var old, result;
-    old = $globalState.currentContext;
-    $globalState.currentContext = this;
-    $ = this.isolateStatics;
-    result = null;
-    try {
-      result = code.call$0();
-    } finally {
-      $globalState.currentContext = old;
-      if (old != null)
-        old._setGlobals$0();
-    }
-    return result;
-  },
-  _setGlobals$0: function() {
-    $ = this.isolateStatics;
-  },
-  lookup$1: function(portId) {
-    var t1 = this.ports;
-    return t1.$index(t1, portId);
-  },
-  register$2: function(_, portId, port) {
-    var t1;
-    if (this.ports.containsKey$1(portId) === true)
-      throw $.wrapException($._ExceptionImplementation$("Registry: ports must be registered only once."));
-    t1 = this.ports;
-    t1.$indexSet(t1, portId, port);
-    t1 = $globalState.isolates;
-    t1.$indexSet(t1, this.id, this);
-  },
-  unregister$1: function(portId) {
-    var t1 = this.ports;
-    t1.remove$1(t1, portId);
-    t1 = this.ports;
-    if (t1.get$isEmpty(t1)) {
-      t1 = $globalState.isolates;
-      t1.remove$1(t1, this.id);
-    }
-  },
-  _IsolateContext$0: function() {
-    var t1, t2;
-    t1 = $._globalState();
-    t2 = t1.get$nextIsolateId();
-    t1.set$nextIsolateId(t2 + 1);
-    this.id = t2;
-    this.ports = $.Map_Map();
-    this.isolateStatics = new Isolate();
-  }
-};
-
-$$._EventLoop = {"": "Object;events,activeTimerCount",
-  enqueue$3: function(isolate, fn, msg) {
-    this.events.addLast$1($._IsolateEvent$(isolate, fn, msg));
-  },
-  dequeue$0: function() {
-    var t1 = this.events;
-    if (t1.get$isEmpty(t1))
-      return;
-    return t1.removeFirst$0();
-  },
-  checkOpenReceivePortsFromCommandLine$0: function() {
-    if ($globalState.rootContext != null)
-      if ($globalState.isolates.containsKey$1($globalState.rootContext.id) === true)
-        if ($globalState.fromCommandLine === true) {
-          var t1 = $globalState.rootContext.ports;
-          t1 = t1.get$isEmpty(t1);
-        } else
-          t1 = false;
-      else
-        t1 = false;
-    else
-      t1 = false;
-    if (t1)
-      throw $.wrapException($._ExceptionImplementation$("Program exited with open ReceivePorts."));
-  },
-  runIteration$0: function() {
-    var $event = this.dequeue$0();
-    if ($event == null) {
-      this.checkOpenReceivePortsFromCommandLine$0();
-      $globalState.maybeCloseWorker$0();
-      return false;
-    }
-    $event.process$0();
-    return true;
-  },
-  _runHelper$0: function() {
-    if ($.get$globalWindow() != null)
-      new $._EventLoop__runHelper_next(this).call$0();
-    else
-      for (; this.runIteration$0();)
-        ;
-  },
-  run$0: function() {
-    var e, trace, exception, t1;
-    if ($globalState.isWorker !== true)
-      this._runHelper$0();
-    else
-      try {
-        this._runHelper$0();
-      } catch (exception) {
-        t1 = $.unwrapException(exception);
-        e = t1;
-        trace = $.getTraceFromException(exception);
-        t1 = $globalState.mainManager;
-        t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "error", "msg", $.S(e) + "\n" + $.S(trace)])));
-      }
-
-  }
-};
-
-$$._EventLoop__runHelper_next = {"": "Closure;this_0",
-  call$0: function() {
-    if (!this.this_0.runIteration$0())
-      return;
-    $.Timer_run(this);
-  }
-};
-
-$$._IsolateEvent = {"": "Object;isolate,fn,message",
-  process$0: function() {
-    this.isolate.eval$1(this.fn);
-  }
-};
-
-$$._MainManagerStub = {"": "Object;",
-  get$id: function(_) {
-    return 0;
-  },
-  set$id: function(_, i) {
-    throw $.wrapException($.UnimplementedError$(null));
-  },
-  postMessage$1: function(_, msg) {
-    $.get$globalThis().postMessage(msg);
-  },
-  terminate$0: function(_) {
-  }
-};
-
-$$.IsolateNatives__processWorkerMessage_anon = {"": "Closure;entryPoint_0,replyTo_1",
-  call$0: function() {
-    var t1, t2;
-    t1 = this.entryPoint_0;
-    t2 = this.replyTo_1;
-    $.lazyPort = $.ReceivePortImpl$();
-    $.send$2$x(t2, "spawned", $._Isolate_port().toSendPort$0());
-    t1.call$0();
-  }
-};
-
-$$._BaseSendPort = {"": "Object;_isolateId<",
-  _checkReplyTo$1: function(replyTo) {
-    if (replyTo != null && (typeof replyTo !== "object" || replyTo === null || !$.getInterceptor(replyTo).$is_NativeJsSendPort) && (typeof replyTo !== "object" || replyTo === null || !$.getInterceptor(replyTo).$is_WorkerSendPort) && true)
-      throw $.wrapException($._ExceptionImplementation$("SendPort.send: Illegal replyTo port type"));
-  },
-  call$1: function(message) {
-    var completer, port;
-    completer = $._CompleterImpl$();
-    port = $.ReceivePortImpl$();
-    this.send$2(this, message, port.toSendPort$0());
-    port.receive$1(new $._BaseSendPort_call_anon(completer, port));
-    return completer.future;
-  },
-  $isSendPort: true
-};
-
-$$._BaseSendPort_call_anon = {"": "Closure;completer_0,port_1",
-  call$2: function(value, ignoreReplyTo) {
-    var t1 = this.port_1;
-    t1.close$0(t1);
-    t1 = this.completer_0;
-    if (typeof value === "object" && value !== null && !!$.getInterceptor(value).$isException)
-      t1.completeError$1(value);
-    else
-      t1.complete$1(t1, value);
-  }
-};
-
-$$._NativeJsSendPort = {"": "_BaseSendPort;_receivePort<,_isolateId",
-  send$2: function(_, message, replyTo) {
-    $._waitForPendingPorts([message, replyTo], new $._NativeJsSendPort_send_anon(this, message, replyTo));
-  },
-  send$1: function($receiver, message) {
-    return this.send$2($receiver, message, null);
-  },
-  $eq: function(_, other) {
-    if (other == null)
-      return false;
-    return typeof other === "object" && other !== null && !!$.getInterceptor(other).$is_NativeJsSendPort && $.$eq(this._receivePort, other._receivePort) === true;
-  },
-  get$hashCode: function(_) {
-    return this._receivePort.get$_id();
-  },
-  $is_NativeJsSendPort: true,
-  $isSendPort: true
-};
-
-$$._NativeJsSendPort_send_anon = {"": "Closure;this_1,message_2,replyTo_3",
-  call$0: function() {
-    var t1, t2, t3, t4, isolate, shouldSerialize, msg;
-    t1 = {};
-    t2 = this.this_1;
-    t3 = this.replyTo_3;
-    t2._checkReplyTo$1(t3);
-    t4 = $globalState.isolates;
-    isolate = t4.$index(t4, t2.get$_isolateId());
-    if (isolate == null)
-      return;
-    if (t2.get$_receivePort().get$_callback() == null)
-      return;
-    shouldSerialize = $globalState.currentContext != null && $.$eq($.get$id$x($globalState.currentContext), t2.get$_isolateId()) !== true;
-    msg = this.message_2;
-    t1.msg_0 = msg;
-    t1.reply_1 = t3;
-    if (shouldSerialize) {
-      t1.msg_0 = $._serializeMessage(t1.msg_0);
-      t1.reply_1 = $._serializeMessage(t1.reply_1);
-    }
-    $globalState.topEventLoop.enqueue$3(isolate, new $._NativeJsSendPort_send__anon(t1, t2, shouldSerialize), "receive " + $.S(msg));
-  }
-};
-
-$$._NativeJsSendPort_send__anon = {"": "Closure;box_0,this_4,shouldSerialize_5",
-  call$0: function() {
-    var t1, t2;
-    t1 = this.this_4;
-    if (t1.get$_receivePort().get$_callback() != null) {
-      if (this.shouldSerialize_5) {
-        t2 = this.box_0;
-        t2.msg_0 = $._deserializeMessage(t2.msg_0);
-        t2.reply_1 = $._deserializeMessage(t2.reply_1);
-      }
-      t1 = t1.get$_receivePort();
-      t2 = this.box_0;
-      t1._callback$2(t2.msg_0, t2.reply_1);
-    }
-  }
-};
-
-$$._WorkerSendPort = {"": "_BaseSendPort;_workerId<,_receivePortId,_isolateId",
-  send$2: function(_, message, replyTo) {
-    $._waitForPendingPorts([message, replyTo], new $._WorkerSendPort_send_anon(this, message, replyTo));
-  },
-  send$1: function($receiver, message) {
-    return this.send$2($receiver, message, null);
-  },
-  $eq: function(_, other) {
-    var t1;
-    if (other == null)
-      return false;
-    if (typeof other === "object" && other !== null && !!$.getInterceptor(other).$is_WorkerSendPort)
-      t1 = $.$eq(this._workerId, other._workerId) === true && $.$eq(this._isolateId, other._isolateId) === true && $.$eq(this._receivePortId, other._receivePortId) === true;
-    else
-      t1 = false;
-    return t1;
-  },
-  get$hashCode: function(_) {
-    var t1, t2, t3;
-    t1 = $.$shl$n(this._workerId, 16);
-    t2 = $.$shl$n(this._isolateId, 8);
-    t3 = this._receivePortId;
-    if (typeof t3 !== "number")
-      throw $.iae(t3);
-    return (t1 ^ t2 ^ t3) >>> 0;
-  },
-  $is_WorkerSendPort: true,
-  $isSendPort: true
-};
-
-$$._WorkerSendPort_send_anon = {"": "Closure;this_0,message_1,replyTo_2",
-  call$0: function() {
-    var t1, t2, workerMessage, manager;
-    t1 = this.this_0;
-    t2 = this.replyTo_2;
-    t1._checkReplyTo$1(t2);
-    workerMessage = $._serializeMessage($.makeLiteralMap(["command", "message", "port", t1, "msg", this.message_1, "replyTo", t2]));
-    if ($globalState.isWorker === true) {
-      t1 = $globalState.mainManager;
-      t1.postMessage$1(t1, workerMessage);
-    } else {
-      t2 = $globalState.managers;
-      manager = t2.$index(t2, t1.get$_workerId());
-      if (manager != null)
-        $.postMessage$1$x(manager, workerMessage);
-    }
-  }
-};
-
-$$.ReceivePortImpl = {"": "Object;_id<,_callback<",
-  _callback$2: function(arg0, arg1) {
-    return this._callback.call$2(arg0, arg1);
-  },
-  receive$1: function(onMessage) {
-    this._callback = onMessage;
-  },
-  close$0: function(_) {
-    this._callback = null;
-    $globalState.currentContext.unregister$1(this._id);
-  },
-  toSendPort$0: function() {
-    return $._NativeJsSendPort$(this, $.get$id$x($globalState.currentContext));
-  },
-  ReceivePortImpl$0: function() {
-    $.register$2$x($._globalState().get$currentContext(), this._id, this);
-  }
-};
-
-$$._waitForPendingPorts_anon = {"": "Closure;callback_0",
-  call$1: function(_) {
-    return this.callback_0.call$0();
-  }
-};
-
-$$._PendingSendPortFinder = {"": "_MessageTraverser;ports,_visited",
-  visitPrimitive$1: function(x) {
-  },
-  visitList$1: function(list) {
-    var t1 = this._visited;
-    if (t1.$index(t1, list) != null)
-      return;
-    t1 = this._visited;
-    t1.$indexSet(t1, list, true);
-    $.forEach$1$ax(list, new $._PendingSendPortFinder_visitList_anon(this));
-  },
-  visitMap$1: function(map) {
-    var t1 = this._visited;
-    if (t1.$index(t1, map) != null)
-      return;
-    t1 = this._visited;
-    t1.$indexSet(t1, map, true);
-    $.forEach$1$ax(map.get$values(map), new $._PendingSendPortFinder_visitMap_anon(this));
-  },
-  visitSendPort$1: function(port) {
-    if (false)
-      this.ports.push(port.get$_futurePort());
-  },
-  visitIsolateSink$1: function(sink) {
-    var t1 = sink._port;
-    if (false)
-      this.ports.push(t1.get$_futurePort());
-  },
-  visitCloseToken$1: function(token) {
-  },
-  _PendingSendPortFinder$0: function() {
-    this._visited = $._JsVisitedMap$();
-  }
-};
-
-$$._PendingSendPortFinder_visitList_anon = {"": "Closure;this_0",
-  call$1: function(e) {
-    return this.this_0._dispatch$1(e);
-  }
-};
-
-$$._PendingSendPortFinder_visitMap_anon = {"": "Closure;this_0",
-  call$1: function(e) {
-    return this.this_0._dispatch$1(e);
-  }
-};
-
-$$._JsSerializer = {"": "_Serializer;_nextFreeRefId,_visited",
-  visitSendPort$1: function(x) {
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_NativeJsSendPort)
-      return ["sendport", $globalState.currentManagerId, x._isolateId, x._receivePort.get$_id()];
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_WorkerSendPort)
-      return ["sendport", x._workerId, x._isolateId, x._receivePortId];
-    throw $.wrapException("Illegal underlying port " + $.S(x));
-  },
-  visitIsolateSink$1: function(sink) {
-    var isClosed = sink._isClosed;
-    return ["isolateSink", this.visitSendPort$1(sink._port), isClosed];
-  },
-  visitCloseToken$1: function(token) {
-    return ["closeToken"];
-  },
-  _JsSerializer$0: function() {
-    this._visited = $._JsVisitedMap$();
-  }
-};
-
-$$._JsCopier = {"": "_Copier;_visited",
-  visitSendPort$1: function(x) {
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_NativeJsSendPort)
-      return $._NativeJsSendPort$(x._receivePort, x._isolateId);
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$is_WorkerSendPort)
-      return $._WorkerSendPort$(x._workerId, x._isolateId, x._receivePortId);
-    throw $.wrapException("Illegal underlying port " + $.S(this.get$p()));
-  },
-  visitIsolateSink$1: function(sink) {
-    var isClosed, result;
-    isClosed = sink._isClosed;
-    result = $.JsIsolateSink$fromPort(this.visitSendPort$1(sink._port));
-    result._isClosed = isClosed;
-    return result;
-  },
-  visitCloseToken$1: function(token) {
-    return token;
-  },
-  _JsCopier$0: function() {
-    this._visited = $._JsVisitedMap$();
-  }
-};
-
-$$._JsDeserializer = {"": "_Deserializer;_deserialized",
-  deserializeSendPort$1: function(list) {
-    var t1, managerId, isolateId, receivePortId, isolate, receivePort;
-    t1 = $.getInterceptor$asx(list);
-    managerId = t1.$index(list, 1);
-    isolateId = t1.$index(list, 2);
-    receivePortId = t1.$index(list, 3);
-    if ($.$eq(managerId, $globalState.currentManagerId) === true) {
-      t1 = $globalState.isolates;
-      isolate = t1.$index(t1, isolateId);
-      if (isolate == null)
-        return;
-      receivePort = isolate.lookup$1(receivePortId);
-      if (receivePort == null)
-        return;
-      return $._NativeJsSendPort$(receivePort, isolateId);
-    } else
-      return $._WorkerSendPort$(managerId, isolateId, receivePortId);
-  },
-  deserializeIsolateSink$1: function(list) {
-    var t1, port, isClosed, result;
-    t1 = $.getInterceptor$asx(list);
-    port = this.deserializeSendPort$1(t1.$index(list, 1));
-    isClosed = t1.$index(list, 2);
-    result = $.JsIsolateSink$fromPort(port);
-    result._isClosed = isClosed;
-    return result;
-  },
-  deserializeCloseToken$1: function(list) {
-    return $.C_CloseToken;
-  }
-};
-
-$$._JsVisitedMap = {"": "Object;tagged",
-  $index: function(_, object) {
-    return object.__MessageTraverser__attached_info__;
-  },
-  $indexSet: function(_, object, info) {
-    $.add$1$ax(this.tagged, object);
-    object.__MessageTraverser__attached_info__ = info;
-  },
-  reset$0: function(_) {
-    this.tagged = $.List_List($);
-  },
-  cleanup$0: function() {
-    var $length, i;
-    for ($length = $.get$length$asx(this.tagged), i = 0; i < $length; ++i)
-      $.$index$asx(this.tagged, i).__MessageTraverser__attached_info__ = null;
-    this.tagged = null;
-  }
-};
-
-$$._MessageTraverserVisitedMap = {"": "Object;",
-  $index: function(_, object) {
-    return;
-  },
-  $indexSet: function(_, object, info) {
-  },
-  reset$0: function(_) {
-  },
-  cleanup$0: function() {
-  }
-};
-
-$$._MessageTraverser = {"": "Object;",
-  traverse$1: function(x) {
-    var result, t1;
-    t1 = x;
-    if (t1 == null || typeof t1 === "string" || typeof t1 === "number" || typeof t1 === "boolean")
-      return this.visitPrimitive$1(x);
-    t1 = this._visited;
-    t1.reset$0(t1);
-    result = null;
-    try {
-      result = this._dispatch$1(x);
-    } finally {
-      this._visited.cleanup$0();
-    }
-    return result;
-  },
-  _dispatch$1: function(x) {
-    if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean")
-      return this.visitPrimitive$1(x);
-    if (typeof x === "object" && x !== null && (x.constructor === Array || $.getInterceptor(x).$isList()))
-      return this.visitList$1(x);
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isMap)
-      return this.visitMap$1(x);
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isSendPort)
-      return this.visitSendPort$1(x);
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isJsIsolateSink)
-      return this.visitIsolateSink$1(x);
-    if (typeof x === "object" && x !== null && !!$.getInterceptor(x).$isCloseToken)
-      return this.visitCloseToken$1(x);
-    $.throwExpression("Message serialization: Illegal value " + $.S(x) + " passed");
-    return;
-  }
-};
-
-$$._Copier = {"": "_MessageTraverser;",
-  visitPrimitive$1: function(x) {
-    return x;
-  },
-  visitList$1: function(list) {
-    var t1, copy, len, i;
-    if (typeof list !== "string" && (typeof list !== "object" || list === null || list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBehavior()))
-      return this.visitList$1$bailout1(1, list);
-    t1 = this._visited;
-    copy = t1.$index(t1, list);
-    if (copy != null)
-      return copy;
-    len = list.length;
-    copy = $.List_List(len);
-    t1 = this._visited;
-    t1.$indexSet(t1, list, copy);
-    for (i = 0; i < len; ++i) {
-      if (i >= list.length)
-        throw $.ioore(i);
-      copy[i] = this._dispatch$1(list[i]);
-    }
-    return copy;
-  },
-  visitList$1$bailout1: function(state0, list) {
-    var t1, copy, len, t2, i, t3;
-    t1 = this._visited;
-    copy = t1.$index(t1, list);
-    if (copy != null)
-      return copy;
-    t1 = $.getInterceptor$asx(list);
-    len = t1.get$length(list);
-    copy = $.List_List(len);
-    t2 = this._visited;
-    t2.$indexSet(t2, list, copy);
-    for (t2 = copy.length, i = 0; $.JSNumber_methods.$lt(i, len); ++i) {
-      t3 = this._dispatch$1(t1.$index(list, i));
-      if (i >= t2)
-        throw $.ioore(i);
-      copy[i] = t3;
-    }
-    return copy;
-  },
-  visitMap$1: function(map) {
-    var t1, t2;
-    t1 = {};
-    t2 = this._visited;
-    t1.copy_0 = t2.$index(t2, map);
-    t2 = t1.copy_0;
-    if (t2 != null)
-      return t2;
-    t1.copy_0 = $.HashMap$();
-    t2 = this._visited;
-    t2.$indexSet(t2, map, t1.copy_0);
-    map.forEach$1(map, new $._Copier_visitMap_anon(t1, this));
-    return t1.copy_0;
-  }
-};
-
-$$._Copier_visitMap_anon = {"": "Closure;box_0,this_1",
-  call$2: function(key, val) {
-    var t1, t2;
-    t1 = this.box_0.copy_0;
-    t2 = this.this_1;
-    $.$indexSet$ax(t1, t2._dispatch$1(key), t2._dispatch$1(val));
-  }
-};
-
-$$._Serializer = {"": "_MessageTraverser;",
-  visitPrimitive$1: function(x) {
-    return x;
-  },
-  visitList$1: function(list) {
-    var t1, copyId, id;
-    t1 = this._visited;
-    copyId = t1.$index(t1, list);
-    if (copyId != null)
-      return ["ref", copyId];
-    id = this._nextFreeRefId;
-    this._nextFreeRefId = id + 1;
-    t1 = this._visited;
-    t1.$indexSet(t1, list, id);
-    return ["list", id, this._serializeList$1(list)];
-  },
-  visitMap$1: function(map) {
-    var t1, copyId, id;
-    t1 = this._visited;
-    copyId = t1.$index(t1, map);
-    if (copyId != null)
-      return ["ref", copyId];
-    id = this._nextFreeRefId;
-    this._nextFreeRefId = id + 1;
-    t1 = this._visited;
-    t1.$indexSet(t1, map, id);
-    return ["map", id, this._serializeList$1($.toList$0$ax(map.get$keys())), this._serializeList$1($.toList$0$ax(map.get$values(map)))];
-  },
-  _serializeList$1: function(list) {
-    var len, result, i;
-    if (typeof list !== "string" && (typeof list !== "object" || list === null || list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBehavior()))
-      return this._serializeList$1$bailout(1, list);
-    len = list.length;
-    result = $.List_List(len);
-    for (i = 0; i < len; ++i) {
-      if (i >= list.length)
-        throw $.ioore(i);
-      result[i] = this._dispatch$1(list[i]);
-    }
-    return result;
-  },
-  _serializeList$1$bailout: function(state0, list) {
-    var t1, len, result, t2, i, t3;
-    t1 = $.getInterceptor$asx(list);
-    len = t1.get$length(list);
-    result = $.List_List(len);
-    for (t2 = result.length, i = 0; $.JSNumber_methods.$lt(i, len); ++i) {
-      t3 = this._dispatch$1(t1.$index(list, i));
-      if (i >= t2)
-        throw $.ioore(i);
-      result[i] = t3;
-    }
-    return result;
-  }
-};
-
-$$._Deserializer = {"": "Object;",
-  deserialize$1: function(x) {
-    if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean")
-      return x;
-    this._deserialized = $.HashMap$();
-    return this._deserializeHelper$1(x);
-  },
-  _deserializeHelper$1: function(x) {
-    var t1, id;
-    t1 = $.getInterceptor(x);
-    if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean")
-      return x;
-    switch (t1.$index(x, 0)) {
-      case "ref":
-        id = t1.$index(x, 1);
-        t1 = this._deserialized;
-        return t1.$index(t1, id);
-      case "list":
-        return this._deserializeList$1(x);
-      case "map":
-        return this._deserializeMap$1(x);
-      case "sendport":
-        return this.deserializeSendPort$1(x);
-      case "isolateSink":
-        return this.deserializeIsolateSink$1(x);
-      case "closeToken":
-        return this.deserializeCloseToken$1(x);
-      default:
-        $.throwExpression("Unexpected serialized object");
-        return;
-    }
-  },
-  _deserializeList$1: function(x) {
-    var t1, id, dartList, t2, len, i;
-    t1 = $.getInterceptor$asx(x);
-    id = t1.$index(x, 1);
-    dartList = t1.$index(x, 2);
-    if (typeof dartList !== "object" || dartList === null || (dartList.constructor !== Array || !!dartList.immutable$list) && !$.getInterceptor(dartList).$isJavaScriptIndexingBehavior())
-      return this._deserializeList$1$bailout(1, dartList, id);
-    t2 = this._deserialized;
-    t2.$indexSet(t2, id, dartList);
-    len = dartList.length;
-    for (i = 0; i < len; ++i) {
-      if (i >= dartList.length)
-        throw $.ioore(i);
-      t1 = this._deserializeHelper$1(dartList[i]);
-      if (i >= dartList.length)
-        throw $.ioore(i);
-      dartList[i] = t1;
-    }
-    return dartList;
-  },
-  _deserializeList$1$bailout: function(state0, dartList, id) {
-    var t2, len, i;
-    t2 = this._deserialized;
-    t2.$indexSet(t2, id, dartList);
-    t2 = $.getInterceptor$asx(dartList);
-    len = t2.get$length(dartList);
-    for (i = 0; $.JSNumber_methods.$lt(i, len); ++i)
-      t2.$indexSet(dartList, i, this._deserializeHelper$1(t2.$index(dartList, i)));
-    return dartList;
-  },
-  _deserializeMap$1: function(x) {
-    var result, t1, id, t2, keys, values, len, i, key;
-    result = $.HashMap$();
-    t1 = $.getInterceptor$asx(x);
-    id = t1.$index(x, 1);
-    t2 = this._deserialized;
-    t2.$indexSet(t2, id, result);
-    keys = t1.$index(x, 2);
-    if (typeof keys !== "string" && (typeof keys !== "object" || keys === null || keys.constructor !== Array && !$.getInterceptor(keys).$isJavaScriptIndexingBehavior()))
-      return this._deserializeMap$1$bailout(1, x, result, keys, t1);
-    values = t1.$index(x, 3);
-    if (typeof values !== "string" && (typeof values !== "object" || values === null || values.constructor !== Array && !$.getInterceptor(values).$isJavaScriptIndexingBehavior()))
-      return this._deserializeMap$1$bailout(2, 0, result, keys, 0, values);
-    len = keys.length;
-    for (i = 0; i < len; ++i) {
-      if (i >= keys.length)
-        throw $.ioore(i);
-      key = this._deserializeHelper$1(keys[i]);
-      if (i >= values.length)
-        throw $.ioore(i);
-      result.$indexSet(result, key, this._deserializeHelper$1(values[i]));
-    }
-    return result;
-  },
-  _deserializeMap$1$bailout: function(state0, x, result, keys, t1, values) {
-    switch (state0) {
-      case 0:
-        result = $.HashMap$();
-        t1 = $.getInterceptor$asx(x);
-        id = t1.$index(x, 1);
-        t2 = this._deserialized;
-        t2.$indexSet(t2, id, result);
-        keys = t1.$index(x, 2);
-      case 1:
-        state0 = 0;
-        values = t1.$index(x, 3);
-      case 2:
-        var id, t2, t3, len, i;
-        state0 = 0;
-        t3 = $.getInterceptor$asx(keys);
-        len = t3.get$length(keys);
-        for (t1 = $.getInterceptor$asx(values), i = 0; $.JSNumber_methods.$lt(i, len); ++i)
-          result.$indexSet(result, this._deserializeHelper$1(t3.$index(keys, i)), this._deserializeHelper$1(t1.$index(values, i)));
-        return result;
-    }
-  }
-};
-
-$$.TimerImpl = {"": "Object;_once,_inEventLoop,_handle?",
-  cancel$0: function() {
-    if ($.get$globalThis().setTimeout != null) {
-      if (this._inEventLoop)
-        throw $.wrapException($.UnsupportedError$("Timer in event loop cannot be canceled."));
-      if (this._handle == null)
-        return;
-      var t1 = $globalState.topEventLoop;
-      t1.activeTimerCount = t1.activeTimerCount - 1;
-      if (this._once)
-        $.get$globalThis().clearTimeout(this._handle);
-      else
-        $.get$globalThis().clearInterval(this._handle);
-      this._handle = null;
-    } else
-      throw $.wrapException($.UnsupportedError$("Canceling a timer."));
-  },
-  TimerImpl$2: function(milliseconds, callback) {
-    var t1;
-    if (milliseconds === 0)
-      t1 = $.hasTimer() !== true || $._globalState().get$isWorker() === true;
-    else
-      t1 = false;
-    if (t1) {
-      $._globalState().get$topEventLoop().enqueue$3($._globalState().get$currentContext(), callback, "timer");
-      this._inEventLoop = true;
-    } else if ($.hasTimer() === true) {
-      t1 = $._globalState().get$topEventLoop();
-      t1.activeTimerCount = t1.activeTimerCount + 1;
-      t1 = new $.internalCallback(this, callback);
-      this._handle = $.get$globalThis().setTimeout($.convertDartClosureToJS(t1, 0), milliseconds);
-    } else
-      throw $.wrapException($.UnsupportedError$("Timer greater than 0."));
-  },
-  TimerImpl$periodic$2: function(milliseconds, callback) {
-    var t1;
-    if ($.hasTimer() === true) {
-      t1 = $._globalState().get$topEventLoop();
-      t1.activeTimerCount = t1.activeTimerCount + 1;
-      this._handle = $.get$globalThis().setInterval($.convertDartClosureToJS(new $.anon(this, callback), 0), milliseconds);
-    } else
-      throw $.wrapException($.UnsupportedError$("Periodic timer."));
-  }
-};
-
-$$.internalCallback = {"": "Closure;this_0,callback_1",
-  call$0: function() {
-    this.callback_1.call$0();
-    this.this_0.set$_handle(null);
-    var t1 = $globalState.topEventLoop;
-    t1.activeTimerCount = t1.activeTimerCount - 1;
-  }
-};
-
-$$.anon = {"": "Closure;this_0,callback_1",
-  call$0: function() {
-    this.callback_1.call$1(this.this_0);
-  }
-};
-
-$$.JSArray = {"": "Interceptor;",
-  add$1: function(receiver, value) {
-    if (!!receiver.fixed$length)
-      $.throwExpression($.UnsupportedError$("add"));
-    receiver.push(value);
-  },
-  removeLast$0: function(receiver) {
-    if (!!receiver.fixed$length)
-      $.throwExpression($.UnsupportedError$("removeLast"));
-    if (receiver.length === 0)
-      throw $.wrapException($.RangeError$value(-1));
-    return receiver.pop();
-  },
-  remove$1: function(receiver, element) {
-    var i;
-    if (!!receiver.fixed$length)
-      $.throwExpression($.UnsupportedError$("remove"));
-    for (i = 0; i < receiver.length; ++i) {
-      if (i >= receiver.length || false)
-        $.throwExpression($.RangeError$value(i));
-      if ($.$eq(receiver[i], element) === true) {
-        receiver.splice(i, 1);
-        return;
-      }
-    }
-  },
-  addAll$1: function(receiver, collection) {
-    var t1, t2;
-    for (t1 = $.get$iterator$ax(collection); t1.moveNext$0() === true;) {
-      t2 = t1.get$current();
-      if (!!receiver.fixed$length)
-        $.throwExpression($.UnsupportedError$("add"));
-      receiver.push(t2);
-    }
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  join$1: function(receiver, separator) {
-    var t1, list, i, t2;
-    t1 = receiver.length;
-    list = $.List_List(t1);
-    for (i = 0; i < receiver.length; ++i) {
-      if (i >= receiver.length || false)
-        $.throwExpression($.RangeError$value(i));
-      t2 = $.S(receiver[i]);
-      if (i >= t1)
-        throw $.ioore(i);
-      list[i] = t2;
-    }
-    return list.join(separator);
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  fold$2: function(receiver, initialValue, combine) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      initialValue = combine.call$2(initialValue, t1.get$current());
-    return initialValue;
-  },
-  elementAt$1: function(receiver, index) {
-    var t1;
-    if (typeof index !== "number" || Math.floor(index) !== index)
-      $.throwExpression($.ArgumentError$(index));
-    t1 = $.getInterceptor$n(index);
-    if (t1.$ge(index, receiver.length) || t1.$lt(index, 0))
-      $.throwExpression($.RangeError$value(index));
-    return receiver[index];
-  },
-  sublist$2: function(receiver, start, end) {
-    if (typeof end !== "number")
-      return this.sublist$2$bailout(1, start, end, receiver);
-    if (start == null)
-      $.throwExpression($.ArgumentError$(null));
-    if (typeof start !== "number" || Math.floor(start) !== start)
-      throw $.wrapException($.ArgumentError$(start));
-    if (start < 0 || start > receiver.length)
-      throw $.wrapException($.RangeError$range(start, 0, receiver.length));
-    if (typeof end !== "number" || Math.floor(end) !== end)
-      throw $.wrapException($.ArgumentError$(end));
-    if (end < start || end > receiver.length)
-      throw $.wrapException($.RangeError$range(end, start, receiver.length));
-    if (start === end)
-      return [];
-    return receiver.slice(start, end);
-  },
-  sublist$2$bailout: function(state0, start, end, receiver) {
-    if (start == null)
-      $.throwExpression($.ArgumentError$(null));
-    if (typeof start !== "number" || Math.floor(start) !== start)
-      throw $.wrapException($.ArgumentError$(start));
-    if (start < 0 || start > receiver.length)
-      throw $.wrapException($.RangeError$range(start, 0, receiver.length));
-    if (end == null)
-      end = receiver.length;
-    else {
-      if (typeof end !== "number" || Math.floor(end) !== end)
-        throw $.wrapException($.ArgumentError$(end));
-      if (end < start || end > receiver.length)
-        throw $.wrapException($.RangeError$range(end, start, receiver.length));
-    }
-    if (start === end)
-      return [];
-    return receiver.slice(start, end);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  get$first: function(receiver) {
-    if (receiver.length > 0)
-      return receiver[0];
-    throw $.wrapException($.StateError$("No elements"));
-  },
-  get$last: function(receiver) {
-    var t1 = receiver.length;
-    if (t1 > 0)
-      return receiver[t1 - 1];
-    throw $.wrapException($.StateError$("No elements"));
-  },
-  setRange$4: function(receiver, start, end, iterable, skipCount) {
-    if (!!receiver.immutable$list)
-      $.throwExpression($.UnsupportedError$("set range"));
-    $.IterableMixinWorkaround_setRangeList(receiver, start, end, iterable, skipCount);
-  },
-  get$isEmpty: function(receiver) {
-    return receiver.length === 0;
-  },
-  toString$0: function(receiver) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitValue(receiver, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$iterator: function(receiver) {
-    return $.ListIterator$(receiver);
-  },
-  get$hashCode: function(receiver) {
-    return $.Primitives_objectHashCode(receiver);
-  },
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  set$length: function(receiver, newLength) {
-    if (typeof newLength !== "number" || Math.floor(newLength) !== newLength)
-      throw $.wrapException($.ArgumentError$(newLength));
-    if (newLength < 0)
-      throw $.wrapException($.RangeError$value(newLength));
-    $.checkGrowable(receiver, "set length");
-    receiver.length = newLength;
-  },
-  $index: function(receiver, index) {
-    if (typeof index !== "number" || Math.floor(index) !== index)
-      throw $.wrapException($.ArgumentError$(index));
-    if (index >= receiver.length || index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    if (!!receiver.immutable$list)
-      $.throwExpression($.UnsupportedError$("indexed set"));
-    if (typeof index !== "number" || Math.floor(index) !== index)
-      throw $.wrapException($.ArgumentError$(index));
-    if (index >= receiver.length || index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    receiver[index] = value;
-  },
-  $asList: function() {
-    return null;
-  },
-  $asIterable: function() {
-    return null;
-  },
-  $isList: function() {
-    return true;
-  },
-  $isIterable: function() {
-    return true;
-  }
-};
-
-$$.JSMutableArray = {"": "JSArray;",
-  $asList: function() {
-    return function () { return [null]; };
-  },
-  $asIterable: function() {
-    return function () { return [null]; };
-  }
-};
-
-$$.JSFixedArray = {"": "JSMutableArray;"};
-
-$$.JSExtendableArray = {"": "JSMutableArray;"};
-
-$$.Primitives_applyFunction_anon = {"": "Closure;namedArguments_0,buffer_1,arguments_2",
-  call$1: function($name) {
-    var t1, t2;
-    this.buffer_1.write$1("$" + $.S($name));
-    t1 = this.arguments_2;
-    t2 = this.namedArguments_0;
-    t1.push(t2.$index(t2, $name));
-  }
-};
-
-$$.DartError = {"": "Object;",
-  get$stack: function() {
-    return this.stack;
-  },
-  toString$0: function(_) {
-    var dartException = this.dartException;
-    if (!!Error.captureStackTrace || this.get$stack() == null)
-      return $.toString$0(dartException);
-    else
-      return $.S(dartException) + "\n" + $.S(this.get$stack());
-  },
-  DartError$1: function(dartException) {
-    this.dartException = dartException;
-    this.toString = $.DartError_toStringWrapper.call$0;
-  }
-};
-
-$$._StackTrace = {"": "Object;_stack",
-  toString$0: function(_) {
-    var t1 = this._stack;
-    return t1 != null ? t1 : "";
-  }
-};
-
-$$.invokeClosure_anon = {"": "Closure;closure_0",
-  call$0: function() {
-    return this.closure_0.call$0();
-  }
-};
-
-$$.invokeClosure_anon0 = {"": "Closure;closure_1,arg1_2",
-  call$0: function() {
-    return this.closure_1.call$1(this.arg1_2);
-  }
-};
-
-$$.invokeClosure_anon1 = {"": "Closure;closure_3,arg1_4,arg2_5",
-  call$0: function() {
-    return this.closure_3.call$2(this.arg1_4, this.arg2_5);
-  }
-};
-
-$$.Closure = {"": "Object;",
-  toString$0: function(_) {
-    return "Closure";
-  }
-};
-
-$$.Null = {"": "Object;"};
-
-$$.JSNumber = {"": "Interceptor;",
-  get$isNaN: function(receiver) {
-    return isNaN(receiver);
-  },
-  get$isInfinite: function(receiver) {
-    return receiver == Infinity || receiver == -Infinity;
-  },
-  remainder$1: function(receiver, b) {
-    return receiver % b;
-  },
-  abs$0: function(receiver) {
-    return Math.abs(receiver);
-  },
-  toInt$0: function(receiver) {
-    var truncated;
-    if (this.get$isNaN(receiver))
-      throw $.wrapException($.UnsupportedError$("NaN"));
-    if (this.get$isInfinite(receiver))
-      throw $.wrapException($.UnsupportedError$("Infinity"));
-    truncated = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
-    return truncated == -0.0 ? 0 : truncated;
-  },
-  truncate$0: function(receiver) {
-    var truncated;
-    if (this.get$isNaN(receiver))
-      $.throwExpression($.UnsupportedError$("NaN"));
-    if (this.get$isInfinite(receiver))
-      $.throwExpression($.UnsupportedError$("Infinity"));
-    truncated = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
-    return truncated == -0.0 ? 0 : truncated;
-  },
-  ceil$0: function(receiver) {
-    return this.toInt$0(Math.ceil(receiver));
-  },
-  floor$0: function(receiver) {
-    return this.toInt$0(Math.floor(receiver));
-  },
-  round$0: function(receiver) {
-    return this.toInt$0(this.roundToDouble$0(receiver));
-  },
-  roundToDouble$0: function(receiver) {
-    if (receiver < 0)
-      return -Math.round(-receiver);
-    else
-      return Math.round(receiver);
-  },
-  toString$0: function(receiver) {
-    if (receiver === 0 && 1 / receiver < 0)
-      return "-0.0";
-    else
-      return "" + receiver;
-  },
-  get$hashCode: function(receiver) {
-    return receiver & 0x1FFFFFFF;
-  },
-  $add: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver + other;
-  },
-  $sub: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver - other;
-  },
-  $div: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver / other;
-  },
-  $mul: function(receiver, other) {
-    return receiver * other;
-  },
-  $tdiv: function(receiver, other) {
-    return this.truncate$0(receiver / other);
-  },
-  $shl: function(receiver, other) {
-    if (other < 0)
-      throw $.wrapException($.ArgumentError$(other));
-    if (other > 31)
-      return 0;
-    return receiver << other >>> 0;
-  },
-  $and: function(receiver, other) {
-    return (receiver & other) >>> 0;
-  },
-  $lt: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver < other;
-  },
-  $gt: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver > other;
-  },
-  $le: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver <= other;
-  },
-  $ge: function(receiver, other) {
-    if (typeof other !== "number")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver >= other;
-  },
-  $isnum: true
-};
-
-$$.JSInt = {"": "JSNumber;", $isint: true, $isnum: true};
-
-$$.JSDouble = {"": "JSNumber;", $isdouble: true, $isnum: true};
-
-$$.JSString = {"": "Interceptor;",
-  codeUnitAt$1: function(receiver, index) {
-    if (index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    if (index >= receiver.length)
-      throw $.wrapException($.RangeError$value(index));
-    return receiver.charCodeAt(index);
-  },
-  allMatches$1: function(receiver, str) {
-    return $.allMatchesInStringUnchecked(receiver, str);
-  },
-  $add: function(receiver, other) {
-    if (typeof other !== "string")
-      throw $.wrapException($.ArgumentError$(other));
-    return receiver + other;
-  },
-  endsWith$1: function(receiver, other) {
-    var otherLength, t1;
-    otherLength = other.length;
-    t1 = receiver.length;
-    if (otherLength > t1)
-      return false;
-    return other === this.substring$1(receiver, t1 - otherLength);
-  },
-  replaceAll$2: function(receiver, from, to) {
-    return $.stringReplaceAllUnchecked(receiver, from, to);
-  },
-  split$1: function(receiver, pattern) {
-    return receiver.split(pattern);
-  },
-  substring$2: function(receiver, startIndex, endIndex) {
-    if (endIndex == null)
-      endIndex = receiver.length;
-    if (typeof endIndex !== "number")
-      $.throwExpression($.ArgumentError$(endIndex));
-    if (startIndex < 0)
-      throw $.wrapException($.RangeError$value(startIndex));
-    if ($.JSNumber_methods.$gt(startIndex, endIndex))
-      throw $.wrapException($.RangeError$value(startIndex));
-    if ($.$gt$n(endIndex, receiver.length))
-      throw $.wrapException($.RangeError$value(endIndex));
-    return receiver.substring(startIndex, endIndex);
-  },
-  substring$1: function($receiver, startIndex) {
-    return this.substring$2($receiver, startIndex, null);
-  },
-  trim$0: function(receiver) {
-    return receiver.trim();
-  },
-  indexOf$2: function(receiver, other, start) {
-    if (other == null)
-      $.throwExpression($.ArgumentError$(null));
-    if (typeof start !== "number" || Math.floor(start) !== start)
-      throw $.wrapException($.ArgumentError$(start));
-    if (typeof other !== "string")
-      throw $.wrapException($.ArgumentError$(other));
-    if (start < 0)
-      return -1;
-    return receiver.indexOf(other, start);
-  },
-  contains$2: function(receiver, other, startIndex) {
-    if (other == null)
-      $.throwExpression($.ArgumentError$(null));
-    return $.stringContainsUnchecked(receiver, other, startIndex);
-  },
-  get$isEmpty: function(receiver) {
-    return receiver.length === 0;
-  },
-  toString$0: function(receiver) {
-    return receiver;
-  },
-  get$hashCode: function(receiver) {
-    var hash, i;
-    for (hash = 0, i = 0; i < receiver.length; ++i) {
-      hash = 536870911 & hash + receiver.charCodeAt(i);
-      hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0);
-      hash ^= hash >> 6;
-    }
-    hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0);
-    hash ^= hash >> 11;
-    return 536870911 & hash + ((16383 & hash) << 15 >>> 0);
-  },
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  $index: function(receiver, index) {
-    if (typeof index !== "number" || Math.floor(index) !== index)
-      throw $.wrapException($.ArgumentError$(index));
-    if (index >= receiver.length || index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    return receiver[index];
-  },
-  $isString: true
-};
-
-$$._convertJsonToDart_anon = {"": "Closure;",
-  call$2: function(key, value) {
-    return value;
-  }
-};
-
-$$._convertJsonToDart_walk = {"": "Closure;revive_0",
-  call$1: function(e) {
-    var list, t1, i, keys, map, key, proto;
-    if (e == null || typeof e != "object")
-      return e;
-    if (Object.getPrototypeOf(e) === Array.prototype) {
-      list = e;
-      for (t1 = this.revive_0, i = 0; i < list.length; ++i)
-        list[i] = t1.call$2(i, this.call$1(list[i]));
-      return list;
-    }
-    keys = Object.keys(e);
-    map = $.makeLiteralMap([]);
-    for (t1 = this.revive_0, i = 0; i < keys.length; ++i) {
-      key = keys[i];
-      map.$indexSet(map, key, t1.call$2(key, this.call$1(e[key])));
-    }
-    proto = e.__proto__;
-    if (typeof proto !== "undefined" && proto !== Object.prototype)
-      map.$indexSet(map, "__proto__", t1.call$2("__proto__", this.call$1(proto)));
-    return map;
-  }
-};
-
-$$.StringMatch = {"": "Object;start,str,pattern",
-  $index: function(_, g) {
-    if ($.$eq(g, 0) !== true)
-      $.throwExpression($.RangeError$value(g));
-    return this.pattern;
-  }
-};
-
-$$._CompleterImpl = {"": "Object;future,_isComplete",
-  complete$1: function(_, value) {
-    if (this._isComplete)
-      throw $.wrapException($.StateError$("Future already completed"));
-    this._isComplete = true;
-    this.future._setValue$1(value);
-  },
-  completeError$2: function(error, stackTrace) {
-    if (this._isComplete)
-      throw $.wrapException($.StateError$("Future already completed"));
-    this._isComplete = true;
-    if (stackTrace != null)
-      $._attachStackTrace(error, stackTrace);
-    this.future._setError$1(error);
-  },
-  completeError$1: function(error) {
-    return this.completeError$2(error, null);
-  }
-};
-
-$$._FutureListenerWrapper = {"": "Object;future,_nextListener@",
-  _sendValue$1: function(value) {
-    this.future._setValue$1(value);
-  },
-  _sendError$1: function(error) {
-    this.future._setError$1(error);
-  }
-};
-
-$$._FutureImpl = {"": "Object;_state@,_resultOrListeners<",
-  get$_isComplete: function() {
-    return this._state !== 0;
-  },
-  get$_hasValue: function() {
-    return this._state === 1;
-  },
-  get$_hasError: function() {
-    return (this._state & 2) !== 0;
-  },
-  get$_hasUnhandledError: function() {
-    return (this._state & 4) !== 0;
-  },
-  then$2$onError: function(f, onError) {
-    var t1;
-    if (!this.get$_isComplete()) {
-      if (onError == null) {
-        t1 = $._ThenFuture$(f);
-        t1._subscribeTo$1(this);
-        return t1;
-      }
-      t1 = $._SubscribeFuture$(f, onError);
-      t1._subscribeTo$1(this);
-      return t1;
-    }
-    if (this.get$_hasError()) {
-      if (onError != null)
-        return this._handleError$2(onError, null);
-      return $._FutureWrapper$(this);
-    } else
-      return this._handleValue$1(f);
-  },
-  then$1: function(f) {
-    return this.then$2$onError(f, null);
-  },
-  catchError$2$test: function(f, test) {
-    var t1;
-    if (this.get$_hasValue())
-      return $._FutureWrapper$(this);
-    if (!this.get$_isComplete()) {
-      t1 = $._CatchErrorFuture$(f, test);
-      t1._subscribeTo$1(this);
-      return t1;
-    } else
-      return this._handleError$2(f, test);
-  },
-  catchError$1: function(f) {
-    return this.catchError$2$test(f, null);
-  },
-  _handleValue$1: function(onValue) {
-    var thenFuture = $._ThenFuture$(onValue);
-    $.Timer_run(new $._FutureImpl__handleValue_anon(thenFuture, this._resultOrListeners));
-    return thenFuture;
-  },
-  _handleError$2: function(onError, test) {
-    var error, errorFuture;
-    this._state = (this._state & 4294967291) >>> 0;
-    error = this._resultOrListeners;
-    errorFuture = $._CatchErrorFuture$(onError, test);
-    $.Timer_run(new $._FutureImpl__handleError_anon(error, errorFuture));
-    return errorFuture;
-  },
-  _setValue$1: function(value) {
-    var listeners, listeners0;
-    if (this.get$_isComplete())
-      throw $.wrapException($.StateError$("Future already completed"));
-    listeners = this._removeListeners$0();
-    this._state = 1;
-    this._resultOrListeners = value;
-    for (; listeners != null; listeners = listeners0) {
-      listeners0 = listeners.get$_nextListener();
-      listeners.set$_nextListener(null);
-      listeners._sendValue$1(value);
-    }
-  },
-  get$_setValue: function() {
-    return new $.BoundClosure$1(this, "_setValue$1");
-  },
-  _setError$1: function(error) {
-    var listeners, listeners0;
-    if (this.get$_isComplete())
-      throw $.wrapException($.StateError$("Future already completed"));
-    listeners = this._removeListeners$0();
-    this._state = 2;
-    this._resultOrListeners = error;
-    if (listeners == null) {
-      this._scheduleUnhandledError$0();
-      return;
-    }
-    do {
-      listeners0 = listeners.get$_nextListener();
-      listeners.set$_nextListener(null);
-      listeners._sendError$1(error);
-      if (listeners0 != null) {
-        listeners = listeners0;
-        continue;
-      } else
-        break;
-    } while (true);
-  },
-  get$_setError: function() {
-    return new $.BoundClosure$1(this, "_setError$1");
-  },
-  _scheduleUnhandledError$0: function() {
-    this._state = (this._state | 4) >>> 0;
-    $.Timer_run(new $._FutureImpl__scheduleUnhandledError_anon(this));
-  },
-  _addListener$1: function(listener) {
-    listener._nextListener = this._resultOrListeners;
-    this._resultOrListeners = listener;
-  },
-  _removeListeners$0: function() {
-    var current, prev, next;
-    current = this._resultOrListeners;
-    this._resultOrListeners = null;
-    for (prev = null; current != null; prev = current, current = next) {
-      next = current.get$_nextListener();
-      current.set$_nextListener(prev);
-    }
-    return prev;
-  },
-  _chain$1: function(future) {
-    var t1;
-    if (!this.get$_isComplete()) {
-      t1 = future._asListener$0();
-      t1._nextListener = this._resultOrListeners;
-      this._resultOrListeners = t1;
-    } else if (this.get$_hasValue())
-      future._setValue$1(this._resultOrListeners);
-    else {
-      this._state = (this._state & 4294967291) >>> 0;
-      future._setError$1(this._resultOrListeners);
-    }
-  },
-  _setOrChainValue$1: function(result) {
-    if (typeof result === "object" && result !== null && !!$.getInterceptor(result).$isFuture)
-      if (!!$.getInterceptor(result).$is_FutureImpl) {
-        result._chain$1(this);
-        return;
-      } else {
-        result.then$2$onError(this.get$_setValue(), this.get$_setError());
-        return;
-      }
-    else
-      this._setValue$1(result);
-  },
-  _asListener$0: function() {
-    return $._FutureListenerWrapper$(this);
-  },
-  _FutureImpl$immediate$1: function(value) {
-    this._state = 1;
-    this._resultOrListeners = value;
-  },
-  $is_FutureImpl: true,
-  $isFuture: true
-};
-
-$$._FutureImpl__FutureImpl$wait_handleError = {"": "Closure;box_0",
-  call$1: function(error) {
-    var t1 = this.box_0;
-    if (t1.values_1 != null) {
-      t1.values_1 = null;
-      t1.completer_0.completeError$1(error);
-    }
-  }
-};
-
-$$._FutureImpl__FutureImpl$wait_anon = {"": "Closure;box_0,pos_1",
-  call$1: function(value) {
-    var t1, t2;
-    t1 = this.box_0;
-    t2 = t1.values_1;
-    if (t2 == null)
-      return;
-    $.$indexSet$ax(t2, this.pos_1, value);
-    t1.remaining_2 = $.$sub$n(t1.remaining_2, 1);
-    if ($.$eq(t1.remaining_2, 0)) {
-      t2 = t1.completer_0;
-      t2.complete$1(t2, t1.values_1);
-    }
-  }
-};
-
-$$._FutureImpl__handleValue_anon = {"": "Closure;thenFuture_0,value_1",
-  call$0: function() {
-    this.thenFuture_0._sendValue$1(this.value_1);
-  }
-};
-
-$$._FutureImpl__handleError_anon = {"": "Closure;error_0,errorFuture_1",
-  call$0: function() {
-    this.errorFuture_1._sendError$1(this.error_0);
-  }
-};
-
-$$._FutureImpl__scheduleUnhandledError_anon = {"": "Closure;this_0",
-  call$0: function() {
-    var t1, error, trace;
-    t1 = this.this_0;
-    if (t1.get$_hasUnhandledError()) {
-      t1.set$_state((t1.get$_state() & 4294967291) >>> 0);
-      error = t1.get$_resultOrListeners();
-      $.Primitives_printString("Uncaught Error: " + $.S(error));
-      trace = $.getAttachedStackTrace(error);
-      if (trace != null)
-        $.Primitives_printString("Stack Trace:\n" + $.S(trace) + "\n");
-      throw $.wrapException(error);
-    }
-  }
-};
-
-$$._TransformFuture = {"": "_FutureImpl;_nextListener@",
-  _subscribeTo$1: function(future) {
-    future._addListener$1(this);
-  },
-  $as_FutureImpl: function (S, T) { return [T]; },
-  $asFuture: function (S, T) { return [T]; }
-};
-
-$$._ThenFuture = {"": "_TransformFuture;_onValue,_nextListener,_state,_resultOrListeners",
-  _onValue$1: function(arg0) {
-    return this._onValue.call$1(arg0);
-  },
-  _sendValue$1: function(value) {
-    var result, e, s, exception, t1;
-    result = null;
-    try {
-      result = this._onValue$1(value);
-    } catch (exception) {
-      t1 = $.unwrapException(exception);
-      e = t1;
-      s = $.getTraceFromException(exception);
-      this._setError$1($._asyncError(e, s));
-      return;
-    }
-
-    this._setOrChainValue$1(result);
-  },
-  _sendError$1: function(error) {
-    this._setError$1(error);
-  },
-  $as_FutureImpl: function (S, T) { return [T]; },
-  $asFuture: function (S, T) { return [T]; }
-};
-
-$$._CatchErrorFuture = {"": "_TransformFuture;_test,_onError,_nextListener,_state,_resultOrListeners",
-  _test$1: function(arg0) {
-    return this._test.call$1(arg0);
-  },
-  _onError$1: function(arg0) {
-    return this._onError.call$1(arg0);
-  },
-  _sendValue$1: function(value) {
-    this._setValue$1(value);
-  },
-  _sendError$1: function(error) {
-    var matchesTest, e, s, result, e0, s0, exception, t1;
-    if (this._test != null) {
-      matchesTest = null;
-      try {
-        matchesTest = this._test$1(error);
-      } catch (exception) {
-        t1 = $.unwrapException(exception);
-        e = t1;
-        s = $.getTraceFromException(exception);
-        this._setError$1($._asyncError(e, s));
-        return;
-      }
-
-      if (matchesTest !== true) {
-        this._setError$1(error);
-        return;
-      }
-    }
-    result = null;
-    try {
-      result = this._onError$1(error);
-    } catch (exception) {
-      t1 = $.unwrapException(exception);
-      e0 = t1;
-      s0 = $.getTraceFromException(exception);
-      this._setError$1($._asyncError(e0, s0));
-      return;
-    }
-
-    this._setOrChainValue$1(result);
-  },
-  $as_FutureImpl: null,
-  $asFuture: null
-};
-
-$$._SubscribeFuture = {"": "_ThenFuture;_onError,_onValue,_nextListener,_state,_resultOrListeners",
-  _onError$1: function(arg0) {
-    return this._onError.call$1(arg0);
-  },
-  _sendError$1: function(error) {
-    var result, e, s, exception, t1;
-    result = null;
-    try {
-      result = this._onError$1(error);
-    } catch (exception) {
-      t1 = $.unwrapException(exception);
-      e = t1;
-      s = $.getTraceFromException(exception);
-      this._setError$1($._asyncError(e, s));
-      return;
-    }
-
-    this._setOrChainValue$1(result);
-  },
-  $as_FutureImpl: function (S, T) { return [T]; },
-  $asFuture: function (S, T) { return [T]; }
-};
-
-$$._FutureWrapper = {"": "Object;_future",
-  then$2$onError: function($function, onError) {
-    return this._future.then$2$onError($function, onError);
-  },
-  then$1: function($function) {
-    return this.then$2$onError($function, null);
-  },
-  catchError$2$test: function($function, test) {
-    return this._future.catchError$2$test($function, test);
-  },
-  catchError$1: function($function) {
-    return this.catchError$2$test($function, null);
-  },
-  $isFuture: true
-};
-
-$$.Stream = {"": "Object;",
-  get$length: function(_) {
-    var t1, future, t2, t3;
-    t1 = {};
-    future = $._FutureImpl$();
-    t1.count_0 = 0;
-    t2 = new $.Stream_length_anon(t1);
-    t3 = future.get$_setError();
-    this.listen$4$cancelOnError$onDone$onError(t2, true, new $.Stream_length_anon0(t1, future), t3);
-    return future;
-  },
-  get$isEmpty: function(_) {
-    var t1, future, t2, t3;
-    t1 = {};
-    future = $._FutureImpl$();
-    t1.subscription_0 = null;
-    t2 = new $.Stream_isEmpty_anon(t1, future);
-    t3 = future.get$_setError();
-    t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(t2, true, new $.Stream_isEmpty_anon0(future), t3);
-    return future;
-  },
-  skip$1: function(_, count) {
-    return $._SkipStream$(this, count);
-  }
-};
-
-$$.Stream_length_anon = {"": "Closure;box_0",
-  call$1: function(_) {
-    var t1 = this.box_0;
-    t1.count_0 = $.$add$ns(t1.count_0, 1);
-  }
-};
-
-$$.Stream_length_anon0 = {"": "Closure;box_0,future_1",
-  call$0: function() {
-    this.future_1._setValue$1(this.box_0.count_0);
-  }
-};
-
-$$.Stream_isEmpty_anon = {"": "Closure;box_0,future_1",
-  call$1: function(_) {
-    this.box_0.subscription_0.cancel$0();
-    this.future_1._setValue$1(false);
-  }
-};
-
-$$.Stream_isEmpty_anon0 = {"": "Closure;future_2",
-  call$0: function() {
-    this.future_2._setValue$1(true);
-  }
-};
-
-$$.StreamSubscription = {"": "Object;"};
-
-$$.EventSink = {"": "Object;"};
-
-$$._throwDelayed_anon = {"": "Closure;error_0,stackTrace_1",
-  call$0: function() {
-    var t1, t2, trace, t3;
-    t1 = this.stackTrace_1;
-    if (t1 != null)
-      $.Primitives_printString($.JSNull_methods.toString$0(t1));
-    t2 = this.error_0;
-    trace = $.getAttachedStackTrace(t2);
-    t3 = $.getInterceptor(trace);
-    if (trace != null && t3.$eq(trace, t1) !== true)
-      $.Primitives_printString(t3.toString$0(trace));
-    throw $.wrapException(t2);
-  }
-};
-
-$$._ForwardingStream = {"": "Stream;",
-  listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
-    if (onData == null)
-      onData = $._nullDataHandler;
-    if (onError == null)
-      onError = $._nullErrorHandler;
-    if (onDone == null)
-      onDone = $._nullDoneHandler;
-    return $._ForwardingStreamSubscription$(this, onData, onError, onDone, true === cancelOnError);
-  },
-  listen$3$onDone$onError: function(onData, onDone, onError) {
-    return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
-  },
-  _handleData$2: function(data, sink) {
-    sink._sendData$1(data);
-  },
-  _handleError$2: function(error, sink) {
-    sink._sendError$1(error);
-  },
-  _handleDone$1: function(sink) {
-    sink._sendDone$0();
-  }
-};
-
-$$._BaseStreamSubscription = {"": "Object;",
-  _onData$1: function(arg0) {
-    return this._onData.call$1(arg0);
-  },
-  _onError$1: function(arg0) {
-    return this._onError.call$1(arg0);
-  },
-  _onDone$0: function() {
-    return this._onDone.call$0();
-  },
-  _BaseStreamSubscription$3: function(_onData, _onError, _onDone) {
-    if (this._onData == null)
-      this._onData = $._nullDataHandler;
-    if (this._onError == null)
-      this._onError = $._nullErrorHandler;
-    if (this._onDone == null)
-      this._onDone = $._nullDoneHandler;
-  }
-};
-
-$$._ForwardingStreamSubscription = {"": "_BaseStreamSubscription;_stream,_cancelOnError,_subscription,_onData,_onError,_onDone",
-  cancel$0: function() {
-    var t1 = this._subscription;
-    if (t1 != null) {
-      t1.cancel$0();
-      this._subscription = null;
-    }
-  },
-  _sendData$1: function(data) {
-    this._onData$1(data);
-  },
-  _sendError$1: function(error) {
-    this._onError$1(error);
-    if (this._cancelOnError) {
-      this._subscription.cancel$0();
-      this._subscription = null;
-    }
-  },
-  _sendDone$0: function() {
-    var t1 = this._subscription;
-    if (t1 != null) {
-      t1.cancel$0();
-      this._subscription = null;
-    }
-    this._onDone$0();
-  },
-  _handleData$1: function(data) {
-    this._stream._handleData$2(data, this);
-  },
-  get$_handleData: function() {
-    return new $.BoundClosure$1(this, "_handleData$1");
-  },
-  _handleError$1: function(error) {
-    this._stream._handleError$2(error, this);
-  },
-  get$_handleError: function() {
-    return new $.BoundClosure$1(this, "_handleError$1");
-  },
-  _handleDone$0: function() {
-    this._subscription = null;
-    this._stream._handleDone$1(this);
-  },
-  get$_handleDone: function() {
-    return new $.BoundClosure$0(this, "_handleDone$0");
-  },
-  _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone, _cancelOnError) {
-    var t1, t2;
-    t1 = this.get$_handleData();
-    t2 = this.get$_handleError();
-    this._subscription = this._stream._source.listen$3$onDone$onError(t1, this.get$_handleDone(), t2);
-  }
-};
-
-$$._SkipStream = {"": "_ForwardingStream;_remaining,_source",
-  _handleData$2: function(inputEvent, sink) {
-    var t1 = this._remaining;
-    if (t1 > 0) {
-      this._remaining = t1 - 1;
-      return;
-    }
-    return sink._sendData$1(inputEvent);
-  },
-  _SkipStream$2: function(source, count) {
-    if (typeof count !== "number" || Math.floor(count) !== count || count < 0)
-      throw $.wrapException($.ArgumentError$(count));
-  }
-};
-
-$$.Timer_run_anon = {"": "Closure;",
-  call$0: function() {
-    var runCallbacks, i, callback, newCallbacks, exception;
-    runCallbacks = $.get$Timer__runCallbacks();
-    $.Timer__runCallbacks = [];
-    for (i = 0; $.$lt$n(i, $.get$length$asx(runCallbacks)); i = $.$add$ns(i, 1)) {
-      callback = $.$index$asx(runCallbacks, i);
-      try {
-        callback.call$0();
-      } catch (exception) {
-        $.unwrapException(exception);
-        newCallbacks = $.get$Timer__runCallbacks();
-        $.Timer__runCallbacks = [];
-        i = $.$add$ns(i, 1);
-        $.addAll$1$ax($.get$Timer__runCallbacks(), $.sublist$1$ax(runCallbacks, i));
-        $.addAll$1$ax($.get$Timer__runCallbacks(), newCallbacks);
-        throw exception;
-      }
-
-    }
-  }
-};
-
-$$.HashMap = {"": "Object;_liblib0$_length,_strings,_nums,_rest,_keys",
-  get$length: function(_) {
-    return this._liblib0$_length;
-  },
-  get$isEmpty: function(_) {
-    return this._liblib0$_length === 0;
-  },
-  get$keys: function() {
-    return $.HashMapKeyIterable$(this);
-  },
-  get$values: function(_) {
-    var t1 = this.get$keys();
-    return t1.map$1(t1, new $.HashMap_values_anon(this));
-  },
-  containsKey$1: function(key) {
-    var strings, nums, rest;
-    if (typeof key === "string" && key !== "__proto__") {
-      strings = this._strings;
-      return strings == null ? false : strings[key] != null;
-    } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
-      nums = this._nums;
-      return nums == null ? false : nums[key] != null;
-    } else {
-      rest = this._rest;
-      if (rest == null)
-        return false;
-      return $.HashMap__findBucketIndex(rest[$.get$hashCode$(key) & 0x3ffffff], key) >= 0;
-    }
-  },
-  addAll$1: function(_, other) {
-    $.forEach$1$ax(other, new $.HashMap_addAll_anon(this));
-  },
-  $index: function(_, key) {
-    var strings, t1, entry, nums, rest, bucket, index;
-    if (typeof key === "string" && key !== "__proto__") {
-      strings = this._strings;
-      if (strings == null)
-        t1 = null;
-      else {
-        entry = strings[key];
-        t1 = entry === strings ? null : entry;
-      }
-      return t1;
-    } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
-      nums = this._nums;
-      if (nums == null)
-        t1 = null;
-      else {
-        entry = nums[key];
-        t1 = entry === nums ? null : entry;
-      }
-      return t1;
-    } else {
-      rest = this._rest;
-      if (rest == null)
-        return;
-      bucket = rest[$.get$hashCode$(key) & 0x3ffffff];
-      index = $.HashMap__findBucketIndex(bucket, key);
-      return index < 0 ? null : bucket[index + 1];
-    }
-  },
-  $indexSet: function(_, key, value) {
-    var strings, table, nums, rest, hash, bucket, index;
-    if (typeof key === "string" && key !== "__proto__") {
-      strings = this._strings;
-      if (strings == null) {
-        table = Object.create(null);
-        if (table == null)
-          ;
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._strings = table;
-        strings = table;
-      }
-      if (strings[key] == null) {
-        this._liblib0$_length = this._liblib0$_length + 1;
-        this._keys = null;
-      }
-      if (value == null)
-        value = strings;
-      strings[key] = value;
-    } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
-      nums = this._nums;
-      if (nums == null) {
-        table = Object.create(null);
-        if (table == null)
-          ;
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._nums = table;
-        nums = table;
-      }
-      if (nums[key] == null) {
-        this._liblib0$_length = this._liblib0$_length + 1;
-        this._keys = null;
-      }
-      if (value == null)
-        value = nums;
-      nums[key] = value;
-    } else {
-      rest = this._rest;
-      if (rest == null) {
-        table = Object.create(null);
-        if (table == null)
-          ;
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._rest = table;
-        rest = table;
-      }
-      hash = $.get$hashCode$(key) & 0x3ffffff;
-      bucket = rest[hash];
-      if (bucket == null) {
-        value = [key, value];
-        if (value == null)
-          value = rest;
-        rest[hash] = value;
-        this._liblib0$_length = this._liblib0$_length + 1;
-        this._keys = null;
-      } else {
-        index = $.HashMap__findBucketIndex(bucket, key);
-        if (index >= 0)
-          bucket[index + 1] = value;
-        else {
-          bucket.push(key, value);
-          this._liblib0$_length = this._liblib0$_length + 1;
-          this._keys = null;
-        }
-      }
-    }
-  },
-  remove$1: function(_, key) {
-    var rest, bucket, index;
-    if (typeof key === "string" && key !== "__proto__")
-      return this._removeHashTableEntry$2(this._strings, key);
-    else if (typeof key === "number" && (key & 0x3ffffff) === key)
-      return this._removeHashTableEntry$2(this._nums, key);
-    else {
-      rest = this._rest;
-      if (rest == null)
-        return;
-      bucket = rest[$.get$hashCode$(key) & 0x3ffffff];
-      index = $.HashMap__findBucketIndex(bucket, key);
-      if (index < 0)
-        return;
-      this._liblib0$_length = this._liblib0$_length - 1;
-      this._keys = null;
-      return bucket.splice(index, 2)[1];
-    }
-  },
-  forEach$1: function(_, action) {
-    var keys, $length, i, key;
-    keys = this._computeKeys$0();
-    for ($length = $.get$length$asx(keys), i = 0; i < $length; ++i) {
-      key = keys[i];
-      action.call$2(key, this.$index(this, key));
-      if (keys !== this._keys)
-        throw $.wrapException($.ConcurrentModificationError$(this));
-    }
-  },
-  toString$0: function(_) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitPair(this, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  _computeKeys$0: function() {
-    var t1, result, strings, names, entries, index, i, nums, rest, bucket, $length, i0;
-    t1 = this._keys;
-    if (t1 != null)
-      return t1;
-    result = $.List_List(this._liblib0$_length);
-    strings = this._strings;
-    if (strings != null) {
-      names = Object.getOwnPropertyNames(strings);
-      entries = names.length;
-      for (index = 0, i = 0; i < entries; ++i) {
-        result[index] = names[i];
-        ++index;
-      }
-    } else
-      index = 0;
-    nums = this._nums;
-    if (nums != null) {
-      names = Object.getOwnPropertyNames(nums);
-      entries = names.length;
-      for (i = 0; i < entries; ++i) {
-        result[index] = +names[i];
-        ++index;
-      }
-    }
-    rest = this._rest;
-    if (rest != null) {
-      names = Object.getOwnPropertyNames(rest);
-      entries = names.length;
-      for (i = 0; i < entries; ++i) {
-        bucket = rest[names[i]];
-        $length = bucket.length;
-        for (i0 = 0; i0 < $length; i0 += 2) {
-          result[index] = bucket[i0];
-          ++index;
-        }
-      }
-    }
-    this._keys = result;
-    return result;
-  },
-  _removeHashTableEntry$2: function(table, key) {
-    var entry, value;
-    if (table != null && table[key] != null) {
-      entry = table[key];
-      value = entry === table ? null : entry;
-      delete table[key];
-      this._liblib0$_length = this._liblib0$_length - 1;
-      this._keys = null;
-      return value;
-    } else
-      return;
-  },
-  $isMap: true
-};
-
-$$._HashSetBase = {"": "IterableBase;",
-  toString$0: function(_) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitValue(this, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  $asIterable: function() {
-    return null;
-  },
-  $isIterable: function() {
-    return true;
-  }
-};
-
-$$.IterableBase = {"": "Object;",
-  map$1: function(_, f) {
-    return $.MappedIterable$(this, f);
-  },
-  forEach$1: function(_, f) {
-    var t1;
-    for (t1 = this.get$iterator(this); t1.moveNext$0() === true;)
-      f.call$1(t1.get$current());
-  },
-  join$1: function(_, separator) {
-    var iterator, buffer;
-    if (typeof separator !== "string")
-      return this.join$1$bailout(1, separator);
-    iterator = this.get$iterator(this);
-    if (iterator.moveNext$0() !== true)
-      return "";
-    buffer = $.StringBuffer$("");
-    if (separator === "")
-      do
-        buffer.write$1($.S(iterator.get$current()));
-      while (iterator.moveNext$0() === true);
-    else {
-      buffer.write$1($.S(iterator.get$current()));
-      for (; iterator.moveNext$0() === true;) {
-        buffer.write$1(separator);
-        buffer.write$1($.S(iterator.get$current()));
-      }
-    }
-    return buffer.toString$0(buffer);
-  },
-  join$1$bailout: function(state0, separator) {
-    var iterator, buffer;
-    iterator = this.get$iterator(this);
-    if (iterator.moveNext$0() !== true)
-      return "";
-    buffer = $.StringBuffer$("");
-    if (separator == null || $.$eq(separator, "") === true)
-      do
-        buffer.write$1($.S(iterator.get$current()));
-      while (iterator.moveNext$0() === true);
-    else {
-      buffer.write$1($.S(iterator.get$current()));
-      for (; iterator.moveNext$0() === true;) {
-        buffer.write$1(separator);
-        buffer.write$1($.S(iterator.get$current()));
-      }
-    }
-    return buffer.toString$0(buffer);
-  },
-  toList$1$growable: function(_, growable) {
-    return $.List_List$from(this, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$length: function(_) {
-    var it, count;
-    it = this.get$iterator(this);
-    for (count = 0; it.moveNext$0() === true;)
-      ++count;
-    return count;
-  },
-  get$isEmpty: function(_) {
-    return this.get$iterator(this).moveNext$0() !== true;
-  },
-  skip$1: function(_, n) {
-    return $.SkipIterable$(this, n);
-  },
-  elementAt$1: function(_, index) {
-    var t1, remaining, t2;
-    if (typeof index !== "number")
-      return this.elementAt$1$bailout(1, index);
-    if (typeof index !== "number" || Math.floor(index) !== index || index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0() === true;) {
-      t2 = t1.get$current();
-      if (remaining === 0)
-        return t2;
-      --remaining;
-    }
-    throw $.wrapException($.RangeError$value(index));
-  },
-  elementAt$1$bailout: function(state0, index) {
-    var t1, remaining, t2, t3;
-    if (typeof index !== "number" || Math.floor(index) !== index || index < 0)
-      throw $.wrapException($.RangeError$value(index));
-    for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0() === true;) {
-      t2 = t1.get$current();
-      t3 = $.getInterceptor(remaining);
-      if (t3.$eq(remaining, 0))
-        return t2;
-      remaining = t3.$sub(remaining, 1);
-    }
-    throw $.wrapException($.RangeError$value(index));
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.LinkedHashMap = {"": "Object;_liblib0$_length,_strings,_nums,_rest,_first,_last,_modifications",
-  addAll$1: function(_, other) {
-    $.forEach$1$ax(other, new $.LinkedHashMap_addAll_anon(this));
-  },
-  $index: function(_, key) {
-    var strings, cell, nums, rest, bucket, index;
-    if (typeof key === "string" && key !== "__proto__") {
-      strings = this._strings;
-      if (strings == null)
-        return;
-      cell = strings[key];
-      return cell == null ? null : cell.get$_value();
-    } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
-      nums = this._nums;
-      if (nums == null)
-        return;
-      cell = nums[key];
-      return cell == null ? null : cell.get$_value();
-    } else {
-      rest = this._rest;
-      if (rest == null)
-        return;
-      bucket = rest[$.get$hashCode$(key) & 0x3ffffff];
-      index = $.LinkedHashMap__findBucketIndex(bucket, key);
-      if (index < 0)
-        return;
-      return bucket[index].get$_value();
-    }
-  },
-  $indexSet: function(_, key, value) {
-    var strings, table, nums, rest, hash, bucket, index;
-    if (typeof key === "string" && key !== "__proto__") {
-      strings = this._strings;
-      if (strings == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._strings = table;
-        strings = table;
-      }
-      this._addHashTableEntry$3(strings, key, value);
-    } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
-      nums = this._nums;
-      if (nums == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._nums = table;
-        nums = table;
-      }
-      this._addHashTableEntry$3(nums, key, value);
-    } else {
-      rest = this._rest;
-      if (rest == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._rest = table;
-        rest = table;
-      }
-      hash = $.get$hashCode$(key) & 0x3ffffff;
-      bucket = rest[hash];
-      if (bucket == null)
-        rest[hash] = [this._newLinkedCell$2(key, value)];
-      else {
-        index = $.LinkedHashMap__findBucketIndex(bucket, key);
-        if (index >= 0)
-          bucket[index].set$_value(value);
-        else
-          bucket.push(this._newLinkedCell$2(key, value));
-      }
-    }
-  },
-  forEach$1: function(_, action) {
-    var cell, modifications;
-    cell = this._first;
-    modifications = this._modifications;
-    for (; cell != null;) {
-      action.call$2(cell.get$_key(), cell.get$_value());
-      if (modifications !== this._modifications)
-        throw $.wrapException($.ConcurrentModificationError$(this));
-      cell = cell.get$_next();
-    }
-  },
-  get$keys: function() {
-    return $.LinkedHashMapKeyIterable$(this);
-  },
-  get$values: function(_) {
-    var t1 = this.get$keys();
-    return t1.map$1(t1, new $.LinkedHashMap_values_anon(this));
-  },
-  get$length: function(_) {
-    return this._liblib0$_length;
-  },
-  get$isEmpty: function(_) {
-    return this._liblib0$_length === 0;
-  },
-  toString$0: function(_) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitPair(this, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  _addHashTableEntry$3: function(table, key, value) {
-    var cell = table[key];
-    if (cell == null)
-      table[key] = this._newLinkedCell$2(key, value);
-    else
-      cell.set$_value(value);
-  },
-  _newLinkedCell$2: function(key, value) {
-    var cell, last;
-    cell = $.LinkedHashMapCell$(key, value);
-    if (this._first == null) {
-      this._last = cell;
-      this._first = cell;
-    } else {
-      last = this._last;
-      cell._previous = last;
-      last._next = cell;
-      this._last = cell;
-    }
-    this._liblib0$_length = this._liblib0$_length + 1;
-    this._modifications = this._modifications + 1 & 67108863;
-    return cell;
-  },
-  $isMap: true
-};
-
-$$.LinkedHashSet = {"": "_HashSetBase;_liblib0$_length,_strings,_nums,_rest,_first,_last,_modifications",
-  get$iterator: function(_) {
-    return $.LinkedHashSetIterator$(this, this._modifications);
-  },
-  get$length: function(_) {
-    return this._liblib0$_length;
-  },
-  get$isEmpty: function(_) {
-    return this._liblib0$_length === 0;
-  },
-  contains$1: function(_, object) {
-    var strings, nums, rest;
-    if (object !== "__proto__") {
-      strings = this._strings;
-      if (strings == null)
-        return false;
-      return strings[object] != null;
-    } else if (false) {
-      nums = this._nums;
-      if (nums == null)
-        return false;
-      return nums[object] != null;
-    } else {
-      rest = this._rest;
-      if (rest == null)
-        return false;
-      return $.LinkedHashSet__findBucketIndex(rest[$.JSString_methods.get$hashCode(object) & 0x3ffffff], object) >= 0;
-    }
-  },
-  forEach$1: function(_, action) {
-    var cell, modifications;
-    cell = this._first;
-    modifications = this._modifications;
-    for (; cell != null;) {
-      action.call$1(cell.get$_element());
-      if (modifications !== this._modifications)
-        throw $.wrapException($.ConcurrentModificationError$(this));
-      cell = cell.get$_next();
-    }
-  },
-  add$1: function(_, element) {
-    var strings, table, nums, rest, hash, bucket;
-    if (typeof element === "string" && element !== "__proto__") {
-      strings = this._strings;
-      if (strings == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._strings = table;
-        strings = table;
-      }
-      this._addHashTableEntry$2(strings, element);
-    } else if (typeof element === "number" && (element & 0x3ffffff) === element) {
-      nums = this._nums;
-      if (nums == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._nums = table;
-        nums = table;
-      }
-      this._addHashTableEntry$2(nums, element);
-    } else {
-      rest = this._rest;
-      if (rest == null) {
-        table = Object.create(null);
-        table["<non-identifier-key>"] = table;
-        delete table["<non-identifier-key>"];
-        this._rest = table;
-        rest = table;
-      }
-      hash = $.get$hashCode$(element) & 0x3ffffff;
-      bucket = rest[hash];
-      if (bucket == null)
-        rest[hash] = [this._newLinkedCell$1(element)];
-      else {
-        if ($.LinkedHashSet__findBucketIndex(bucket, element) >= 0)
-          return;
-        bucket.push(this._newLinkedCell$1(element));
-      }
-    }
-  },
-  addAll$1: function(_, objects) {
-    var t1;
-    for (t1 = $.get$iterator$ax(objects); t1.moveNext$0() === true;)
-      this.add$1(this, t1.get$current());
-  },
-  remove$1: function(_, object) {
-    var rest, bucket, index;
-    if (object !== "__proto__")
-      return this._removeHashTableEntry$2(this._strings, object);
-    else if (false)
-      return this._removeHashTableEntry$2(this._nums, object);
-    else {
-      rest = this._rest;
-      if (rest == null)
-        return false;
-      bucket = rest[$.JSString_methods.get$hashCode(object) & 0x3ffffff];
-      index = $.LinkedHashSet__findBucketIndex(bucket, object);
-      if (index < 0)
-        return false;
-      this._unlinkCell$1(bucket.splice(index, 1)[0]);
-      return true;
-    }
-  },
-  _addHashTableEntry$2: function(table, element) {
-    if (table[element] != null)
-      return;
-    table[element] = this._newLinkedCell$1(element);
-  },
-  _removeHashTableEntry$2: function(table, element) {
-    var cell;
-    if (table == null)
-      return false;
-    cell = table[element];
-    if (cell == null)
-      return false;
-    this._unlinkCell$1(cell);
-    delete table[element];
-    return true;
-  },
-  _newLinkedCell$1: function(element) {
-    var cell, last;
-    cell = $.LinkedHashSetCell$(element);
-    if (this._first == null) {
-      this._last = cell;
-      this._first = cell;
-    } else {
-      last = this._last;
-      cell._previous = last;
-      last.set$_next(cell);
-      this._last = cell;
-    }
-    this._liblib0$_length = this._liblib0$_length + 1;
-    this._modifications = this._modifications + 1 & 67108863;
-    return cell;
-  },
-  _unlinkCell$1: function(cell) {
-    var previous, next;
-    previous = cell.get$_previous();
-    next = cell.get$_next();
-    if (previous == null)
-      this._first = next;
-    else
-      previous.set$_next(next);
-    if (next == null)
-      this._last = previous;
-    else
-      next.set$_previous(previous);
-    this._liblib0$_length = this._liblib0$_length - 1;
-    this._modifications = this._modifications + 1 & 67108863;
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.ListBase = {"": "Object;",
-  get$iterator: function(_) {
-    return $.ListIterator$(this);
-  },
-  elementAt$1: function(_, index) {
-    return this.$index(this, index);
-  },
-  forEach$1: function(_, action) {
-    var $length, i;
-    $length = this.get$length(this);
-    if (typeof $length !== "number")
-      return this.forEach$1$bailout(1, action, $length);
-    for (i = 0; i < $length; ++i) {
-      action.call$1(this.$index(this, i));
-      if ($length !== this.get$length(this))
-        throw $.wrapException($.ConcurrentModificationError$(this));
-    }
-  },
-  forEach$1$bailout: function(state0, action, $length) {
-    var t1, i;
-    for (t1 = $.getInterceptor($length), i = 0; $.JSNumber_methods.$lt(i, $length); ++i) {
-      action.call$1(this.$index(this, i));
-      if (t1.$eq($length, this.get$length(this)) !== true)
-        throw $.wrapException($.ConcurrentModificationError$(this));
-    }
-  },
-  get$isEmpty: function(_) {
-    return $.$eq(this.get$length(this), 0);
-  },
-  where$1: function(_, test) {
-    return $.WhereIterable$(this, test);
-  },
-  skip$1: function(_, count) {
-    return $.SubListIterable$(this, count, null);
-  },
-  toList$1$growable: function(_, growable) {
-    var result, i, t1;
-    if (growable === true) {
-      result = $.List_List($);
-      $.JSArray_methods.set$length(result, this.get$length(this));
-    } else
-      result = $.List_List(this.get$length(this));
-    for (i = 0; $.JSNumber_methods.$lt(i, this.get$length(this)); ++i) {
-      t1 = this.$index(this, i);
-      if (i >= result.length)
-        throw $.ioore(i);
-      result[i] = t1;
-    }
-    return result;
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  add$1: function(_, element) {
-    var t1 = this.get$length(this);
-    if (typeof t1 !== "number")
-      return this.add$1$bailout(1, element, t1);
-    this.set$length(this, t1 + 1);
-    this.$indexSet(this, t1, element);
-  },
-  add$1$bailout: function(state0, element, t1) {
-    this.set$length(this, $.$add$ns(t1, 1));
-    this.$indexSet(this, t1, element);
-  },
-  addAll$1: function(_, iterable) {
-    var t1, t2, t3;
-    for (t1 = $.get$iterator$ax(iterable); t1.moveNext$0() === true;) {
-      t2 = t1.get$current();
-      t3 = this.get$length(this);
-      this.set$length(this, $.$add$ns(t3, 1));
-      this.$indexSet(this, t3, t2);
-    }
-  },
-  clear$0: function(_) {
-    this.set$length(this, 0);
-  },
-  removeLast$0: function(_) {
-    var result;
-    if ($.$eq(this.get$length(this), 0) === true)
-      throw $.wrapException($.StateError$("No elements"));
-    result = this.$index(this, $.$sub$n(this.get$length(this), 1));
-    this.set$length(this, $.$sub$n(this.get$length(this), 1));
-    return result;
-  },
-  sublist$2: function(_, start, end) {
-    var t1, $length, result, i;
-    if (typeof start !== "number")
-      return this.sublist$2$bailout(1, start, end);
-    if (end == null)
-      end = this.get$length(this);
-    if (start < 0 || $.JSNumber_methods.$gt(start, this.get$length(this)))
-      $.throwExpression($.RangeError$range(start, 0, this.get$length(this)));
-    t1 = $.getInterceptor$n(end);
-    if (t1.$lt(end, start) || t1.$gt(end, this.get$length(this)))
-      $.throwExpression($.RangeError$range(end, start, this.get$length(this)));
-    $length = t1.$sub(end, start);
-    if (typeof $length !== "number")
-      return this.sublist$2$bailout(2, start, 0, $.JSNumber_methods, $length);
-    result = $.List_List($);
-    $.JSArray_methods.set$length(result, $length);
-    for (i = 0; i < $length; ++i) {
-      t1 = this.$index(this, start + i);
-      if (i >= result.length)
-        throw $.ioore(i);
-      result[i] = t1;
-    }
-    return result;
-  },
-  sublist$2$bailout: function(state0, start, end, t1, $length) {
-    switch (state0) {
-      case 0:
-      case 1:
-        state0 = 0;
-        if (end == null)
-          end = this.get$length(this);
-        t1 = $.getInterceptor$n(start);
-        if (t1.$lt(start, 0) || t1.$gt(start, this.get$length(this)))
-          $.throwExpression($.RangeError$range(start, 0, this.get$length(this)));
-        t2 = $.getInterceptor$n(end);
-        if (t2.$lt(end, start) || t2.$gt(end, this.get$length(this)))
-          $.throwExpression($.RangeError$range(end, start, this.get$length(this)));
-        $length = t2.$sub(end, start);
-      case 2:
-        var t2, result, i;
-        state0 = 0;
-        result = $.List_List($);
-        $.JSArray_methods.set$length(result, $length);
-        for (i = 0; $.JSNumber_methods.$lt(i, $length); ++i) {
-          t2 = this.$index(this, t1.$add(start, i));
-          if (i >= result.length)
-            throw $.ioore(i);
-          result[i] = t2;
-        }
-        return result;
-    }
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(_) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitValue(this, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return null;
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return null;
-  }
-};
-
-$$.ListQueue = {"": "IterableBase;_table,_head,_tail,_modificationCount",
-  get$iterator: function(_) {
-    return $._ListQueueIterator$(this);
-  },
-  forEach$1: function(_, action) {
-    var modificationCount, i, t1;
-    modificationCount = this._modificationCount;
-    for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1) >>> 0) {
-      t1 = this._table;
-      if (i < 0 || i >= t1.length)
-        throw $.ioore(i);
-      action.call$1(t1[i]);
-      if (modificationCount !== this._modificationCount)
-        $.throwExpression($.ConcurrentModificationError$(this));
-    }
-  },
-  get$isEmpty: function(_) {
-    return this._head === this._tail;
-  },
-  get$length: function(_) {
-    return $.$and$n($.$sub$n(this._tail, this._head), this._table.length - 1);
-  },
-  elementAt$1: function(_, index) {
-    var t1, t2, t3;
-    t1 = $.getInterceptor$n(index);
-    if (t1.$lt(index, 0) || t1.$gt(index, this.get$length(this)))
-      throw $.wrapException($.RangeError$range(index, 0, this.get$length(this)));
-    t1 = this._table;
-    t2 = this._head;
-    if (typeof index !== "number")
-      throw $.iae(index);
-    t3 = t1.length;
-    t2 = (t2 + index & t3 - 1) >>> 0;
-    if (t2 < 0 || t2 >= t3)
-      throw $.ioore(t2);
-    return t1[t2];
-  },
-  toList$1$growable: function(_, growable) {
-    var list;
-    if (growable === true) {
-      list = $.List_List($);
-      $.JSArray_methods.set$length(list, this.get$length(this));
-    } else
-      list = $.List_List(this.get$length(this));
-    this._writeToList$1(list);
-    return list;
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  add$1: function(_, element) {
-    this._add$1(element);
-  },
-  addAll$1: function(_, elements) {
-    var addCount, $length, t1, t2, t3, endSpace, preSpace;
-    if (typeof elements === "object" && elements !== null && (elements.constructor === Array || $.getInterceptor(elements).$isList())) {
-      addCount = $.get$length$asx(elements);
-      $length = this.get$length(this);
-      if (typeof addCount !== "number")
-        throw $.iae(addCount);
-      t1 = $length + addCount;
-      t2 = this._table;
-      t3 = t2.length;
-      if (t1 >= t3) {
-        this._preGrow$1(t1);
-        $.JSArray_methods.setRange$4(this._table, $length, t1, elements, 0);
-        this._tail = $.$add$ns(this._tail, addCount);
-      } else {
-        t1 = this._tail;
-        if (typeof t1 !== "number")
-          throw $.iae(t1);
-        endSpace = t3 - t1;
-        if (addCount < endSpace) {
-          $.JSArray_methods.setRange$4(t2, t1, t1 + addCount, elements, 0);
-          this._tail = $.$add$ns(this._tail, addCount);
-        } else {
-          preSpace = addCount - endSpace;
-          $.JSArray_methods.setRange$4(t2, t1, t1 + endSpace, elements, 0);
-          $.JSArray_methods.setRange$4(this._table, 0, preSpace, elements, endSpace);
-          this._tail = preSpace;
-        }
-      }
-      this._modificationCount = this._modificationCount + 1;
-    } else
-      for (t1 = $.get$iterator$ax(elements); t1.moveNext$0() === true;)
-        this._add$1(t1.get$current());
-  },
-  toString$0: function(_) {
-    var result = $.StringBuffer$("");
-    $.ToString__emitValue(this, result, $.List_List($));
-    return result.toString$0(result);
-  },
-  addLast$1: function(element) {
-    this._add$1(element);
-  },
-  removeFirst$0: function() {
-    var t1, t2, t3, result;
-    if (this._head === this._tail)
-      throw $.wrapException($.StateError$("No elements"));
-    this._modificationCount = this._modificationCount + 1;
-    t1 = this._table;
-    t2 = this._head;
-    t3 = t1.length;
-    if (t2 < 0 || t2 >= t3)
-      throw $.ioore(t2);
-    result = t1[t2];
-    this._head = (t2 + 1 & t3 - 1) >>> 0;
-    return result;
-  },
-  removeLast$0: function(_) {
-    var t1, t2;
-    if (this._head === this._tail)
-      throw $.wrapException($.StateError$("No elements"));
-    this._modificationCount = this._modificationCount + 1;
-    this._tail = $.$and$n($.$sub$n(this._tail, 1), this._table.length - 1);
-    t1 = this._table;
-    t2 = this._tail;
-    if (t2 !== (t2 | 0))
-      throw $.iae(t2);
-    if (t2 < 0 || t2 >= t1.length)
-      throw $.ioore(t2);
-    return t1[t2];
-  },
-  _checkModification$1: function(expectedModificationCount) {
-    if (typeof expectedModificationCount !== "number")
-      return this._checkModification$1$bailout(1, expectedModificationCount);
-    if (expectedModificationCount !== this._modificationCount)
-      throw $.wrapException($.ConcurrentModificationError$(this));
-  },
-  _checkModification$1$bailout: function(state0, expectedModificationCount) {
-    if ($.$eq(expectedModificationCount, this._modificationCount) !== true)
-      throw $.wrapException($.ConcurrentModificationError$(this));
-  },
-  _add$1: function(element) {
-    var t1, t2;
-    t1 = this._table;
-    t2 = this._tail;
-    if (t2 !== (t2 | 0))
-      throw $.iae(t2);
-    if (t2 < 0 || t2 >= t1.length)
-      throw $.ioore(t2);
-    t1[t2] = element;
-    this._tail = $.$and$n(t2 + 1, this._table.length - 1);
-    if (this._head === this._tail)
-      this._grow$0();
-    this._modificationCount = this._modificationCount + 1;
-  },
-  _grow$0: function() {
-    var newTable, t1, t2, split;
-    newTable = $.List_List(this._table.length * 2);
-    t1 = this._table;
-    t2 = this._head;
-    split = t1.length - t2;
-    $.JSArray_methods.setRange$4(newTable, 0, split, t1, t2);
-    $.JSArray_methods.setRange$4(newTable, split, split + this._head, this._table, 0);
-    this._head = 0;
-    this._tail = this._table.length;
-    this._table = newTable;
-  },
-  _writeToList$1: function(target) {
-    var t1, t2, $length, firstPartSize;
-    t1 = $.JSInt_methods.$le(this._head, this._tail);
-    t2 = this._head;
-    if (t1) {
-      $length = $.$sub$n(this._tail, t2);
-      $.JSArray_methods.setRange$4(target, 0, $length, this._table, this._head);
-      return $length;
-    } else {
-      t1 = this._table;
-      firstPartSize = t1.length - t2;
-      $.JSArray_methods.setRange$4(target, 0, firstPartSize, t1, t2);
-      t2 = this._tail;
-      if (typeof t2 !== "number")
-        throw $.iae(t2);
-      $.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + t2, this._table, 0);
-      return $.$add$ns(this._tail, firstPartSize);
-    }
-  },
-  _preGrow$1: function(newElementCount) {
-    var newTable = $.List_List($.ListQueue__nextPowerOf2(newElementCount));
-    this._tail = this._writeToList$1(newTable);
-    this._table = newTable;
-    this._head = 0;
-  },
-  ListQueue$1: function(initialCapacity) {
-    if (initialCapacity == null || $.JSNull_methods.$lt(initialCapacity, 8))
-      initialCapacity = 8;
-    else if (!$.ListQueue__isPowerOf2(initialCapacity))
-      initialCapacity = $.ListQueue__nextPowerOf2(initialCapacity);
-    this._table = $.List_List(initialCapacity);
-  },
-  $asIterable: function() {
-    return null;
-  },
-  $isIterable: function() {
-    return true;
-  }
-};
-
-$$._ListQueueIterator = {"": "Object;_queue,_end,_modificationCount,_liblib0$_position,_liblib0$_current",
-  get$current: function() {
-    return this._liblib0$_current;
-  },
-  moveNext$0: function() {
-    var t1, t2, t3;
-    t1 = this._queue;
-    t1._checkModification$1(this._modificationCount);
-    t2 = this._liblib0$_position;
-    if (t2 === this._end) {
-      this._liblib0$_current = null;
-      return false;
-    }
-    t3 = t1._table;
-    if (t2 < 0 || t2 >= t3.length)
-      throw $.ioore(t2);
-    this._liblib0$_current = t3[t2];
-    this._liblib0$_position = (this._liblib0$_position + 1 & t1._table.length - 1) >>> 0;
-    return true;
-  }
-};
-
-$$.Duration = {"": "Object;_duration<",
-  $add: function(_, other) {
-    return $.Duration$(0, 0, this._duration + other.get$_duration(), 0, 0, 0);
-  },
-  $sub: function(_, other) {
-    return $.Duration$(0, 0, this._duration - other.get$_duration(), 0, 0, 0);
-  },
-  $mul: function(_, factor) {
-    return $.Duration$(0, 0, this._duration * factor, 0, 0, 0);
-  },
-  $tdiv: function(_, quotient) {
-    if (quotient === 0)
-      throw $.wrapException($.IntegerDivisionByZeroException$());
-    return $.Duration$(0, 0, $.JSNumber_methods.$tdiv(this._duration, quotient), 0, 0, 0);
-  },
-  $lt: function(_, other) {
-    return this._duration < other.get$_duration();
-  },
-  $gt: function(_, other) {
-    return this._duration > other.get$_duration();
-  },
-  $ge: function(_, other) {
-    return this._duration >= other.get$_duration();
-  },
-  get$inHours: function() {
-    return $.JSNumber_methods.$tdiv(this._duration, 3600000000);
-  },
-  get$inMinutes: function() {
-    return $.JSNumber_methods.$tdiv(this._duration, 60000000);
-  },
-  get$inSeconds: function() {
-    return $.JSNumber_methods.$tdiv(this._duration, 1000000);
-  },
-  get$inMilliseconds: function() {
-    return $.JSNumber_methods.$tdiv(this._duration, 1000);
-  },
-  get$inMicroseconds: function() {
-    return this._duration;
-  },
-  $eq: function(_, other) {
-    if (other == null)
-      return false;
-    if (typeof other !== "object" || other === null || !$.getInterceptor(other).$isDuration)
-      return false;
-    return this._duration === other._duration;
-  },
-  get$hashCode: function(_) {
-    return $.JSNumber_methods.get$hashCode(this._duration);
-  },
-  toString$0: function(_) {
-    var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs;
-    t1 = new $.Duration_toString_sixDigits();
-    t2 = new $.Duration_toString_twoDigits();
-    if (this.get$inMicroseconds() < 0)
-      return "-" + $.S($.Duration$(0, 0, -this.get$inMicroseconds(), 0, 0, 0));
-    twoDigitMinutes = t2.call$1($.JSNumber_methods.remainder$1(this.get$inMinutes(), 60));
-    twoDigitSeconds = t2.call$1($.JSNumber_methods.remainder$1(this.get$inSeconds(), 60));
-    sixDigitUs = t1.call$1($.JSNumber_methods.remainder$1(this.get$inMicroseconds(), 1000000));
-    return $.S(this.get$inHours()) + ":" + $.S(twoDigitMinutes) + ":" + $.S(twoDigitSeconds) + "." + $.S(sixDigitUs);
-  },
-  $isDuration: true
-};
-
-$$.Duration_toString_sixDigits = {"": "Closure;",
-  call$1: function(n) {
-    var t1 = $.getInterceptor$n(n);
-    if (t1.$ge(n, 100000))
-      return $.S(n);
-    if (t1.$ge(n, 10000))
-      return "0" + $.S(n);
-    if (t1.$ge(n, 1000))
-      return "00" + $.S(n);
-    if (t1.$ge(n, 100))
-      return "000" + $.S(n);
-    if (t1.$gt(n, 10))
-      return "0000" + $.S(n);
-    return "00000" + $.S(n);
-  }
-};
-
-$$.Duration_toString_twoDigits = {"": "Closure;",
-  call$1: function(n) {
-    if ($.$ge$n(n, 10))
-      return $.S(n);
-    return "0" + $.S(n);
-  }
-};
-
-$$.NullThrownError = {"": "Object;",
-  toString$0: function(_) {
-    return "Throw of null.";
-  }
-};
-
-$$.ArgumentError = {"": "Object;message",
-  toString$0: function(_) {
-    var t1 = this.message;
-    if (t1 != null)
-      return "Illegal argument(s): " + $.S(t1);
-    return "Illegal argument(s)";
-  }
-};
-
-$$.RangeError = {"": "ArgumentError;message",
-  toString$0: function(_) {
-    return "RangeError: " + $.S(this.message);
-  }
-};
-
-$$.NoSuchMethodError = {"": "Object;_receiver,_memberName,_arguments,_namedArguments,_existingArgumentNames",
-  toString$0: function(_) {
-    var t1, t2, t3, t4, actualParameters, i, formalParameters;
-    t1 = {};
-    t1.sb_0 = $.StringBuffer$("");
-    t1.i_1 = 0;
-    t2 = this._arguments;
-    for (; $.$lt$n(t1.i_1, t2.length); t1.i_1 = $.$add$ns(t1.i_1, 1)) {
-      if ($.$gt$n(t1.i_1, 0))
-        t1.sb_0.write$1(", ");
-      t3 = t1.sb_0;
-      t4 = t1.i_1;
-      if (t4 !== (t4 | 0))
-        throw $.iae(t4);
-      if (t4 < 0 || t4 >= t2.length)
-        throw $.ioore(t4);
-      t3.write$1($.Error_safeToString(t2[t4]));
-    }
-    t2 = this._namedArguments;
-    t2.forEach$1(t2, new $.NoSuchMethodError_toString_anon(t1));
-    t2 = this._existingArgumentNames;
-    if (t2 == null)
-      return "NoSuchMethodError : method not found: '" + $.S(this._memberName) + "'\nReceiver: " + $.S($.Error_safeToString(this._receiver)) + "\nArguments: [" + $.S(t1.sb_0) + "]";
-    else {
-      t3 = t1.sb_0;
-      actualParameters = t3.toString$0(t3);
-      t1.sb_0 = $.StringBuffer$("");
-      for (i = 0; $.JSNumber_methods.$lt(i, $.JSNull_methods.get$length(t2)); ++i) {
-        if (i > 0)
-          t1.sb_0.write$1(", ");
-        t1.sb_0.write$1($.JSNull_methods.$index(t2, i));
-      }
-      t1 = t1.sb_0;
-      formalParameters = t1.toString$0(t1);
-      t1 = this._memberName;
-      return "NoSuchMethodError: incorrect number of arguments passed to method named '" + $.S(t1) + "'\nReceiver: " + $.S($.Error_safeToString(this._receiver)) + "\nTried calling: " + $.S(t1) + "(" + actualParameters + ")\nFound: " + $.S(t1) + "(" + formalParameters + ")";
-    }
-  }
-};
-
-$$.UnsupportedError = {"": "Object;message",
-  toString$0: function(_) {
-    return "Unsupported operation: " + this.message;
-  }
-};
-
-$$.UnimplementedError = {"": "Object;message",
-  toString$0: function(_) {
-    var t1 = this.message;
-    return t1 != null ? "UnimplementedError: " + $.S(t1) : "UnimplementedError";
-  }
-};
-
-$$.StateError = {"": "Object;message",
-  toString$0: function(_) {
-    return "Bad state: " + this.message;
-  }
-};
-
-$$.ConcurrentModificationError = {"": "Object;modifiedObject",
-  toString$0: function(_) {
-    var t1 = this.modifiedObject;
-    if (t1 == null)
-      return "Concurrent modification during iteration.";
-    return "Concurrent modification during iteration: " + $.S($.Error_safeToString(t1)) + ".";
-  }
-};
-
-$$.StackOverflowError = {"": "Object;",
-  toString$0: function(_) {
-    return "Stack Overflow";
-  }
-};
-
-$$.RuntimeError = {"": "Object;message",
-  toString$0: function(_) {
-    return "RuntimeError: " + this.message;
-  }
-};
-
-$$._ExceptionImplementation = {"": "Object;message",
-  toString$0: function(_) {
-    var t1 = this.message;
-    if (t1 == null)
-      return "Exception";
-    return "Exception: " + $.S(t1);
-  },
-  $isException: true
-};
-
-$$.FormatException = {"": "Object;message",
-  toString$0: function(_) {
-    return "FormatException: " + this.message;
-  },
-  $isException: true
-};
-
-$$.IntegerDivisionByZeroException = {"": "Object;",
-  toString$0: function(_) {
-    return "IntegerDivisionByZeroException";
-  },
-  $isException: true
-};
-
-$$.Expando = {"": "Object;name>",
-  toString$0: function(_) {
-    return "Expando:" + this.name;
-  },
-  $index: function(_, object) {
-    var values = $.Primitives_getProperty(object, "expando$values");
-    return values == null ? null : $.Primitives_getProperty(values, this._getKey$0());
-  },
-  $indexSet: function(_, object, value) {
-    var values = $.Primitives_getProperty(object, "expando$values");
-    if (values == null) {
-      values = $.Object$();
-      $.Primitives_setProperty(object, "expando$values", values);
-    }
-    $.Primitives_setProperty(values, this._getKey$0(), value);
-  },
-  _getKey$0: function() {
-    var key, t1;
-    key = $.Primitives_getProperty(this, "expando$key");
-    if (key == null) {
-      t1 = $.Expando__keyCount;
-      $.Expando__keyCount = $.$add$ns(t1, 1);
-      key = "expando$key$" + $.S(t1);
-      $.Primitives_setProperty(this, "expando$key", key);
-    }
-    return key;
-  }
-};
-
-$$.Iterator = {"": "Object;"};
-
-$$.Object = {"": ";",
-  $eq: function(_, other) {
-    return this === other;
-  },
-  get$hashCode: function(_) {
-    return $.Primitives_objectHashCode(this);
-  },
-  toString$0: function(_) {
-    return "Instance of '" + $.S($.Primitives_objectTypeName(this)) + "'";
-  }
-};
-
-$$.StringBuffer = {"": "Object;_contents",
-  get$length: function(_) {
-    return this._contents.length;
-  },
-  get$isEmpty: function(_) {
-    return this.get$length(this) === 0;
-  },
-  write$1: function(obj) {
-    if (typeof obj !== "string")
-      return this.write$1$bailout(1, obj);
-    this._contents = this._contents + obj;
-  },
-  write$1$bailout: function(state0, obj) {
-    var str = typeof obj === "string" ? obj : $.S(obj);
-    this._contents = this._contents + str;
-  },
-  writeAll$2: function(objects, separator) {
-    var iterator, str;
-    if (typeof separator !== "string")
-      return this.writeAll$2$bailout(1, objects, separator);
-    iterator = $.get$iterator$ax(objects);
-    if (iterator.moveNext$0() !== true)
-      return;
-    if ($.JSString_methods.get$isEmpty(separator))
-      do {
-        str = iterator.get$current();
-        str = typeof str === "string" ? str : $.S(str);
-        this._contents = this._contents + str;
-      } while (iterator.moveNext$0() === true);
-    else {
-      str = iterator.get$current();
-      str = typeof str === "string" ? str : $.S(str);
-      this._contents = this._contents + str;
-      for (; iterator.moveNext$0() === true;) {
-        this._contents = this._contents + separator;
-        str = iterator.get$current();
-        str = typeof str === "string" ? str : $.S(str);
-        this._contents = this._contents + str;
-      }
-    }
-  },
-  writeAll$2$bailout: function(state0, objects, separator) {
-    var iterator, str, t1;
-    iterator = $.get$iterator$ax(objects);
-    if (iterator.moveNext$0() !== true)
-      return;
-    if ($.get$isEmpty$asx(separator) === true)
-      do {
-        str = iterator.get$current();
-        str = typeof str === "string" ? str : $.S(str);
-        this._contents = this._contents + str;
-      } while (iterator.moveNext$0() === true);
-    else {
-      str = iterator.get$current();
-      str = typeof str === "string" ? str : $.S(str);
-      this._contents = this._contents + str;
-      for (t1 = typeof separator === "string"; iterator.moveNext$0() === true;) {
-        str = t1 ? separator : $.S(separator);
-        this._contents = this._contents + str;
-        str = iterator.get$current();
-        str = typeof str === "string" ? str : $.S(str);
-        this._contents = this._contents + str;
-      }
-    }
-  },
-  toString$0: function(_) {
-    return this._contents;
-  },
-  StringBuffer$1: function($content) {
-    this._contents = $content;
-  }
-};
-
-$$._ChildrenElementList = {"": "ListBase;_liblib1$_element,_childElements",
-  toList$1$growable: function(_, growable) {
-    var t1, output, len, t2, i, t3;
-    t1 = this._childElements;
-    if (growable === true) {
-      output = [];
-      $.JSArray_methods.set$length(output, $.get$length$asx(t1));
-    } else
-      output = $.List_List($.get$length$asx(t1));
-    for (t1 = this._childElements, len = $.get$length$asx(t1), t2 = $.getInterceptor$asx(t1), i = 0; i < len; ++i) {
-      t3 = t2.$index(t1, i);
-      if (i >= output.length)
-        throw $.ioore(i);
-      output[i] = t3;
-    }
-    return output;
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  forEach$1: function(_, f) {
-    var t1;
-    for (t1 = $.get$iterator$ax(this._childElements); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-  },
-  get$isEmpty: function(_) {
-    return this._liblib1$_element.firstElementChild == null;
-  },
-  skip$1: function(_, n) {
-    return $.skip$1$ax(this._childElements, n);
-  },
-  elementAt$1: function(_, index) {
-    return $.$index$asx(this._childElements, index);
-  },
-  get$length: function(_) {
-    return $.get$length$asx(this._childElements);
-  },
-  $index: function(_, index) {
-    return $.$index$asx(this._childElements, index);
-  },
-  $indexSet: function(_, index, value) {
-    this._liblib1$_element.replaceChild(value, $.$index$asx(this._childElements, index));
-  },
-  set$length: function(_, newLength) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  add$1: function(_, value) {
-    this._liblib1$_element.appendChild(value);
-    return value;
-  },
-  get$iterator: function(_) {
-    return $.JSArray_methods.get$iterator(this.toList$0(this));
-  },
-  addAll$1: function(_, iterable) {
-    var t1, t2;
-    if (typeof iterable === "object" && iterable !== null && !!$.getInterceptor(iterable).$is_ChildNodeListLazy)
-      iterable = $.List_List$from(iterable, true);
-    for (t1 = $.get$iterator$ax(iterable), t2 = this._liblib1$_element; t1.moveNext$0() === true;)
-      t2.appendChild(t1.get$current());
-  },
-  sublist$2: function(_, start, end) {
-    if (end == null)
-      end = this.get$length(this);
-    return $._FrozenElementList$_wrap($.Lists_getRange(this, start, end, []));
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  clear$0: function(_) {
-    this._liblib1$_element.textContent = "";
-  },
-  removeLast$0: function(_) {
-    var result = this.get$last(this);
-    if (result != null)
-      this._liblib1$_element.removeChild(result);
-    return result;
-  },
-  get$last: function(_) {
-    var result = this._liblib1$_element.lastElementChild;
-    if (result == null)
-      throw $.wrapException($.StateError$("No elements"));
-    return result;
-  },
-  toString$0: function(_) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(this, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $asList: function() {
-    return function () { return [$.Element]; };
-  },
-  $asIterable: function() {
-    return function () { return [$.Element]; };
-  }
-};
-
-$$._FrozenElementList = {"": "ListBase;_nodeList",
-  get$length: function(_) {
-    return $.get$length$asx(this._nodeList);
-  },
-  $index: function(_, index) {
-    var t1 = this._nodeList;
-    if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.constructor !== Array && !$.getInterceptor(t1).$isJavaScriptIndexingBehavior()))
-      return this.$$index$bailout(1, index, t1);
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    return t1[index];
-  },
-  $$index$bailout: function(state0, index, t1) {
-    return $.$index$asx(t1, index);
-  },
-  $indexSet: function(_, index, value) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  set$length: function(_, newLength) {
-    $.set$length$asx(this._nodeList, newLength);
-  },
-  add$1: function(_, value) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  addAll$1: function(_, iterable) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  sublist$2: function(_, start, end) {
-    return $._FrozenElementList$_wrap($.sublist$2$ax(this._nodeList, start, end));
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  clear$0: function(_) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  removeLast$0: function(_) {
-    throw $.wrapException($.UnsupportedError$(""));
-  },
-  toString$0: function(_) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(this, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $asList: function() {
-    return function () { return [null]; };
-  },
-  $asIterable: function() {
-    return function () { return [null]; };
-  }
-};
-
-$$._ElementCssClassSet = {"": "CssClassSet;_liblib1$_element",
-  readClasses$0: function() {
-    var s, t1, trimmed;
-    s = $.LinkedHashSet$();
-    for (t1 = $.JSArray_methods.get$iterator($.split$1$s(this._liblib1$_element.className, " ")); t1.moveNext$0();) {
-      trimmed = $.trim$0$s(t1.get$current());
-      if (!$.JSString_methods.get$isEmpty(trimmed))
-        s.add$1(s, trimmed);
-    }
-    return s;
-  },
-  writeClasses$1: function(s) {
-    $.List_List$from(s, true);
-    this._liblib1$_element.className = s.join$1(s, " ");
-  }
-};
-
-$$.HttpRequest_getString_anon = {"": "Closure;",
-  call$1: function(xhr) {
-    return $.get$responseText$x(xhr);
-  }
-};
-
-$$.HttpRequest_request_anon = {"": "Closure;completer_0,xhr_1",
-  call$1: function(e) {
-    var t1, t2, t3;
-    t1 = this.xhr_1;
-    if (!($.$ge$n(t1.status, 200) && $.$lt$n(t1.status, 300))) {
-      t2 = t1.status;
-      t2 = t2 === 0 || t2 === 304;
-    } else
-      t2 = true;
-    t3 = this.completer_0;
-    if (t2)
-      t3.complete$1(t3, t1);
-    else
-      t3.completeError$1(e);
-  }
-};
-
-$$.HttpRequest_request_anon0 = {"": "Closure;completer_2",
-  call$1: function(e) {
-    this.completer_2.completeError$1(e);
-  }
-};
-
-$$._ChildNodeListLazy = {"": "ListBase;_this",
-  get$last: function(_) {
-    var result = this._this.lastChild;
-    if (result == null)
-      throw $.wrapException($.StateError$("No elements"));
-    return result;
-  },
-  add$1: function(_, value) {
-    this._this.appendChild(value);
-  },
-  addAll$1: function(_, iterable) {
-    var t1, len, i, t2;
-    if (typeof iterable === "object" && iterable !== null && !!$.getInterceptor(iterable).$is_ChildNodeListLazy) {
-      t1 = this._this;
-      if (iterable._this !== t1) {
-        len = iterable.get$length(iterable);
-        if (typeof len !== "number")
-          return this.addAll$1$bailout1(1, iterable, len, t1);
-        i = 0;
-        for (; i < len; ++i)
-          t1.appendChild(iterable.$index(iterable, 0));
-      }
-      return;
-    }
-    for (t1 = $.get$iterator$ax(iterable), t2 = this._this; t1.moveNext$0() === true;)
-      t2.appendChild(t1.get$current());
-  },
-  addAll$1$bailout1: function(state0, iterable, len, t1) {
-    switch (state0) {
-      case 0:
-      case 1:
-        var i, t2;
-        if (state0 === 1 || state0 === 0 && typeof iterable === "object" && iterable !== null && !!$.getInterceptor(iterable).$is_ChildNodeListLazy)
-          switch (state0) {
-            case 0:
-              t1 = this._this;
-            case 1:
-              if (state0 === 1 || state0 === 0 && iterable._this !== t1)
-                switch (state0) {
-                  case 0:
-                    len = iterable.get$length(iterable);
-                  case 1:
-                    state0 = 0;
-                    i = 0;
-                    for (; $.JSNumber_methods.$lt(i, len); ++i)
-                      t1.appendChild(iterable.$index(iterable, 0));
-                }
-              return;
-          }
-        for (t1 = $.get$iterator$ax(iterable), t2 = this._this; t1.moveNext$0() === true;)
-          t2.appendChild(t1.get$current());
-    }
-  },
-  removeLast$0: function(_) {
-    var result = this.get$last(this);
-    if (result != null)
-      this._this.removeChild(result);
-    return result;
-  },
-  clear$0: function(_) {
-    this._this.textContent = "";
-  },
-  $indexSet: function(_, index, value) {
-    var t1, t2;
-    t1 = this._this;
-    t2 = t1.childNodes;
-    if (typeof t2 !== "string" && (typeof t2 !== "object" || t2 === null || t2.constructor !== Array && !$.getInterceptor(t2).$isJavaScriptIndexingBehavior()))
-      return this.$$indexSet$bailout(1, t1, value, t2, index);
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t2.length)
-      throw $.ioore(index);
-    t1.replaceChild(value, t2[index]);
-  },
-  $$indexSet$bailout: function(state0, t1, value, t2, index) {
-    t1.replaceChild(value, $.$index$asx(t2, index));
-  },
-  get$iterator: function(_) {
-    return $.get$iterator$ax(this._this.childNodes);
-  },
-  toList$1$growable: function(_, growable) {
-    return $.List_List$from(this, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(_) {
-    return $.$eq(this.get$length(this), 0);
-  },
-  sublist$2: function(_, start, end) {
-    if (end == null)
-      $.$eq(end, this.get$length(this));
-    return $.Lists_getRange(this, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(_) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(this, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  get$length: function(_) {
-    return $.get$length$asx(this._this.childNodes);
-  },
-  set$length: function(_, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot set length on immutable List."));
-  },
-  $index: function(_, index) {
-    var t1 = this._this.childNodes;
-    if (typeof t1 !== "string" && (typeof t1 !== "object" || t1 === null || t1.constructor !== Array && !$.getInterceptor(t1).$isJavaScriptIndexingBehavior()))
-      return this.$$index$bailout(1, index, t1);
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    return t1[index];
-  },
-  $$index$bailout: function(state0, index, t1) {
-    return $.$index$asx(t1, index);
-  },
-  $is_ChildNodeListLazy: true,
-  $asList: function() {
-    return function () { return [$.Node]; };
-  },
-  $asIterable: function() {
-    return function () { return [$.Node]; };
-  }
-};
-
-$$._AttributeMap = {"": "Object;",
-  forEach$1: function(_, f) {
-    var t1, t2;
-    for (t1 = $.JSArray_methods.get$iterator(this.get$keys()); t1.moveNext$0();) {
-      t2 = t1.get$current();
-      f.call$2(t2, this.$index(this, t2));
-    }
-  },
-  get$keys: function() {
-    var attributes, keys, t1, len, i;
-    attributes = this._liblib1$_element.attributes;
-    keys = $.List_List($);
-    for (t1 = $.getInterceptor$asx(attributes), len = t1.get$length(attributes), i = 0; i < len; ++i)
-      if (this._matches$1(t1.$index(attributes, i)))
-        keys.push(t1.$index(attributes, i).localName);
-    return keys;
-  },
-  get$values: function(_) {
-    var attributes, values, t1, len, i;
-    attributes = this._liblib1$_element.attributes;
-    values = $.List_List($);
-    for (t1 = $.getInterceptor$asx(attributes), len = t1.get$length(attributes), i = 0; i < len; ++i)
-      if (this._matches$1(t1.$index(attributes, i)))
-        values.push($.get$value$x(t1.$index(attributes, i)));
-    return values;
-  },
-  get$isEmpty: function(_) {
-    return this.get$length(this) === 0;
-  },
-  $isMap: true,
-  $asMap: function () { return [$.String, $.String]; }
-};
-
-$$._ElementAttributeMap = {"": "_AttributeMap;_liblib1$_element",
-  $index: function(_, key) {
-    return this._liblib1$_element.getAttribute(key);
-  },
-  $indexSet: function(_, key, value) {
-    this._liblib1$_element.setAttribute(key, value);
-  },
-  get$length: function(_) {
-    return this.get$keys().length;
-  },
-  _matches$1: function(node) {
-    return node.namespaceURI == null;
-  }
-};
-
-$$.CssClassSet = {"": "Object;",
-  toString$0: function(_) {
-    var t1 = this.readClasses$0();
-    return t1.join$1(t1, " ");
-  },
-  toggle$1: function(value) {
-    var s, result;
-    s = this.readClasses$0();
-    if (s.contains$1(s, value) === true) {
-      s.remove$1(s, value);
-      result = false;
-    } else {
-      s.add$1(s, value);
-      result = true;
-    }
-    this.writeClasses$1(s);
-    return result;
-  },
-  get$iterator: function(_) {
-    var t1 = this.readClasses$0();
-    return t1.get$iterator(t1);
-  },
-  forEach$1: function(_, f) {
-    var t1 = this.readClasses$0();
-    t1.forEach$1(t1, f);
-  },
-  get$isEmpty: function(_) {
-    var t1 = this.readClasses$0();
-    return t1.get$isEmpty(t1);
-  },
-  get$length: function(_) {
-    var t1 = this.readClasses$0();
-    return t1.get$length(t1);
-  },
-  add$1: function(_, value) {
-    var t1, s;
-    t1 = new $.CssClassSet_add_anon(value);
-    s = this.readClasses$0();
-    t1.call$1(s);
-    this.writeClasses$1(s);
-  },
-  addAll$1: function(_, iterable) {
-    var t1, s;
-    t1 = new $.CssClassSet_addAll_anon(iterable);
-    s = this.readClasses$0();
-    t1.call$1(s);
-    this.writeClasses$1(s);
-  },
-  toList$1$growable: function(_, growable) {
-    var t1 = this.readClasses$0();
-    return t1.toList$1$growable(t1, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  skip$1: function(_, n) {
-    var t1 = this.readClasses$0();
-    return t1.skip$1(t1, n);
-  },
-  elementAt$1: function(_, index) {
-    var t1 = this.readClasses$0();
-    return t1.elementAt$1(t1, index);
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.String]; };
-  }
-};
-
-$$.CssClassSet_add_anon = {"": "Closure;value_0",
-  call$1: function(s) {
-    return $.add$1$ax(s, this.value_0);
-  }
-};
-
-$$.CssClassSet_addAll_anon = {"": "Closure;iterable_0",
-  call$1: function(s) {
-    return $.addAll$1$ax(s, this.iterable_0);
-  }
-};
-
-$$._EventStream = {"": "Stream;_target,_eventType,_useCapture",
-  listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
-    return $._EventStreamSubscription$(this._target, this._eventType, onData, this._useCapture);
-  },
-  listen$1: function(onData) {
-    return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null);
-  },
-  listen$3$onDone$onError: function(onData, onDone, onError) {
-    return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
-  }
-};
-
-$$._EventStreamSubscription = {"": "StreamSubscription;_pauseCount,_target,_eventType,_liblib1$_onData,_useCapture",
-  cancel$0: function() {
-    if (this.get$_canceled())
-      return;
-    var t1 = this._liblib1$_onData;
-    if (t1 != null)
-      $.$$dom_removeEventListener$3$x(this._target, this._eventType, t1, this._useCapture);
-    this._target = null;
-    this._liblib1$_onData = null;
-  },
-  get$_canceled: function() {
-    return this._target == null;
-  },
-  get$_paused: function() {
-    return this._pauseCount > 0;
-  },
-  _tryResume$0: function() {
-    if (this._liblib1$_onData != null && !this.get$_paused())
-      $.$$dom_addEventListener$3$x(this._target, this._eventType, this._liblib1$_onData, this._useCapture);
-  },
-  _EventStreamSubscription$4: function(_target, _eventType, _onData, _useCapture) {
-    this._tryResume$0();
-  }
-};
-
-$$.EventStreamProvider = {"": "Object;_eventType",
-  forTarget$2$useCapture: function(e, useCapture) {
-    return $._EventStream$(e, this._eventType, useCapture);
-  },
-  forTarget$1: function(e) {
-    return this.forTarget$2$useCapture(e, false);
-  }
-};
-
-$$.FixedSizeListIterator = {"": "Object;_array,_length,_position,_current",
-  moveNext$0: function() {
-    var t1, nextPosition;
-    t1 = this._position;
-    if (typeof t1 !== "number")
-      return this.moveNext$0$bailout(1, t1);
-    nextPosition = t1 + 1;
-    t1 = this._length;
-    if (nextPosition < t1) {
-      this._current = $.$index$asx(this._array, nextPosition);
-      this._position = nextPosition;
-      return true;
-    }
-    this._current = null;
-    this._position = t1;
-    return false;
-  },
-  moveNext$0$bailout: function(state0, t1) {
-    var nextPosition = $.$add$ns(t1, 1);
-    t1 = this._length;
-    if ($.$lt$n(nextPosition, t1)) {
-      this._current = $.$index$asx(this._array, nextPosition);
-      this._position = nextPosition;
-      return true;
-    }
-    this._current = null;
-    this._position = t1;
-    return false;
-  },
-  get$current: function() {
-    return this._current;
-  }
-};
-
-$$.convertDartToNative_Dictionary_anon = {"": "Closure;object_0",
-  call$2: function(key, value) {
-    this.object_0[key] = value;
-  }
-};
-
-$$.FilteredElementList = {"": "ListBase;_node,_childNodes",
-  get$_filtered: function() {
-    var t1 = this._childNodes;
-    return $.List_List$from(t1.where$1(t1, new $.FilteredElementList__filtered_anon()), true);
-  },
-  forEach$1: function(_, f) {
-    $.JSArray_methods.forEach$1(this.get$_filtered(), f);
-  },
-  $indexSet: function(_, index, value) {
-    var t1 = this.get$_filtered();
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    $.replaceWith$1$x(t1[index], value);
-  },
-  set$length: function(_, newLength) {
-    var len;
-    if (typeof newLength !== "number")
-      return this.set$length$bailout(1, newLength);
-    len = this.get$length(this);
-    if (newLength >= len)
-      return;
-    else if (newLength < 0)
-      throw $.wrapException($.ArgumentError$("Invalid list length"));
-    this.removeRange$2(this, newLength, len);
-  },
-  set$length$bailout: function(state0, newLength) {
-    var len, t1;
-    len = this.get$length(this);
-    t1 = $.getInterceptor$n(newLength);
-    if (t1.$ge(newLength, len))
-      return;
-    else if (t1.$lt(newLength, 0))
-      throw $.wrapException($.ArgumentError$("Invalid list length"));
-    this.removeRange$2(this, newLength, len);
-  },
-  add$1: function(_, value) {
-    var t1 = this._childNodes;
-    t1.add$1(t1, value);
-  },
-  addAll$1: function(_, iterable) {
-    var t1, t2;
-    for (t1 = $.get$iterator$ax(iterable), t2 = this._childNodes; t1.moveNext$0() === true;)
-      t2.add$1(t2, t1.get$current());
-  },
-  removeRange$2: function(_, start, end) {
-    $.JSArray_methods.forEach$1($.JSArray_methods.sublist$2(this.get$_filtered(), start, end), new $.FilteredElementList_removeRange_anon());
-  },
-  clear$0: function(_) {
-    var t1 = this._childNodes;
-    t1.clear$0(t1);
-  },
-  removeLast$0: function(_) {
-    var result = this.get$last(this);
-    if (result != null)
-      $.remove$0$ax(result);
-    return result;
-  },
-  toList$1$growable: function(_, growable) {
-    return $.List_List$from(this, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  elementAt$1: function(_, index) {
-    var t1 = this.get$_filtered();
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    return t1[index];
-  },
-  get$isEmpty: function(_) {
-    return $.JSArray_methods.get$isEmpty(this.get$_filtered());
-  },
-  get$length: function(_) {
-    return this.get$_filtered().length;
-  },
-  $index: function(_, index) {
-    var t1 = this.get$_filtered();
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    return t1[index];
-  },
-  get$iterator: function(_) {
-    return $.JSArray_methods.get$iterator(this.get$_filtered());
-  },
-  sublist$2: function(_, start, end) {
-    return $.JSArray_methods.sublist$2(this.get$_filtered(), start, end);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  skip$1: function(_, n) {
-    return this.get$IterableMixinWorkaround().skipList$2(this, n);
-  },
-  get$last: function(_) {
-    return $.JSArray_methods.get$last(this.get$_filtered());
-  },
-  $asList: function() {
-    return function () { return [$.Element]; };
-  },
-  $asIterable: function() {
-    return function () { return [$.Element]; };
-  }
-};
-
-$$.FilteredElementList__filtered_anon = {"": "Closure;",
-  call$1: function(n) {
-    return typeof n === "object" && n !== null && $.getInterceptor(n).$isElement();
-  }
-};
-
-$$.FilteredElementList_removeRange_anon = {"": "Closure;",
-  call$1: function(el) {
-    return $.remove$0$ax(el);
-  }
-};
-
-$$._AttributeClassSet = {"": "CssClassSet;_liblib2$_element",
-  readClasses$0: function() {
-    var t1, classname, s, trimmed;
-    t1 = $.get$attributes$x(this._liblib2$_element);
-    classname = t1.$index(t1, "class");
-    s = $.LinkedHashSet$();
-    if (classname == null)
-      return s;
-    for (t1 = $.JSArray_methods.get$iterator($.split$1$s(classname, " ")); t1.moveNext$0();) {
-      trimmed = $.trim$0$s(t1.get$current());
-      if (!$.JSString_methods.get$isEmpty(trimmed))
-        s.add$1(s, trimmed);
-    }
-    return s;
-  },
-  writeClasses$1: function(s) {
-    var t1 = $.get$attributes$x(this._liblib2$_element);
-    t1.$indexSet(t1, "class", s.join$1(s, " "));
-  }
-};
-
-$$.BarGraph = {"": "Object;_canvas,_model,_elements,scaleHeight",
-  addSample$1: function(segments) {
-    if (segments.length !== this._elements.length)
-      throw $.wrapException($.RuntimeError$("invalid sample size for graph"));
-    this._model.addSample$1(segments);
-  },
-  drawBarGraph$0: function() {
-    var t1, context, t2, x, i, y;
-    t1 = this._canvas;
-    $.Primitives_printString("drawBarGraph: _canvas=" + $.S(t1));
-    context = $.get$context2D$x(t1);
-    context.beginPath();
-    context.strokeStyle = "black";
-    t2 = $.getInterceptor$x(t1);
-    context.strokeRect(48, 1, $.$add$ns($.$sub$n($.$sub$n(t2.get$width(t1), 50), 150), 2), $.$sub$n(t2.get$height(t1), 2), 1);
-    x = $.$sub$n(t2.get$width(t1), 130);
-    if (typeof x !== "number")
-      return this.drawBarGraph$0$bailout(1, context, x);
-    context.font = "14px sans-serif";
-    for (t1 = this._elements, i = t1.length - 1, t2 = x + 30, y = 20; i >= 0; --i) {
-      if (i >= t1.length)
-        throw $.ioore(i);
-      context.fillStyle = $.get$color$x(t1[i]);
-      context.fillRect(x, y, 20, 20);
-      context.fillStyle = "black";
-      if (i >= t1.length)
-        throw $.ioore(i);
-      context.fillText($.get$name$x(t1[i]), t2, y + 15);
-      y += 30;
-    }
-  },
-  drawBarGraph$0$bailout: function(state0, context, x) {
-    var t1, i, t2, y;
-    context.font = "14px sans-serif";
-    for (t1 = this._elements, i = t1.length - 1, t2 = $.getInterceptor$ns(x), y = 20; i >= 0; --i) {
-      if (i >= t1.length)
-        throw $.ioore(i);
-      context.fillStyle = $.get$color$x(t1[i]);
-      context.fillRect(x, y, 20, 20);
-      context.fillStyle = "black";
-      if (i >= t1.length)
-        throw $.ioore(i);
-      context.fillText($.get$name$x(t1[i]), t2.$add(x, 30), y + 15);
-      y += 30;
-    }
-  },
-  drawGraph$1: function(model) {
-    var graphHeight, t1, height, scale;
-    graphHeight = model.get$maxTotal();
-    t1 = this._canvas;
-    t1.clientWidth;
-    height = t1.clientHeight;
-    t1 = $.getInterceptor$n(graphHeight);
-    if (t1.$ge(graphHeight, this.scaleHeight)) {
-      this.scaleHeight = t1.$mul(graphHeight, 1.2);
-      this.scaleHeight = $.JSNumber_methods.ceil$0($.$div$n(this.scaleHeight, 100)) * 100;
-    }
-    scale = $.$div$n(height, this.scaleHeight);
-    this.drawValues$2(this.scaleHeight, scale);
-    this.drawChart$2(this.scaleHeight, scale);
-  },
-  get$drawGraph: function() {
-    return new $.BoundClosure$1(this, "drawGraph$1");
-  },
-  drawChart$2: function(maxHeight, scale) {
-    var t1, dividerHeight, t3, context, height, scaledY, t2, scaledY0, i;
-    t1 = $.getInterceptor$n(maxHeight);
-    dividerHeight = t1.$tdiv(maxHeight, 5);
-    if (typeof dividerHeight !== "number")
-      return this.drawChart$2$bailout(1, maxHeight, scale, t1, dividerHeight);
-    t3 = this._canvas;
-    context = $.get$context2D$x(t3);
-    context.beginPath();
-    height = t1.toInt$0(maxHeight);
-    scaledY = dividerHeight * scale;
-    context.clearRect(0, 0, 48, maxHeight);
-    for (t1 = $.getInterceptor$x(t3), t2 = $.JSNumber_methods.$tdiv(dividerHeight, 100) * 100, scaledY0 = scaledY, i = 1; i < 5; ++i) {
-      height -= t2;
-      context.font = "14px sans-serif";
-      context.fillStyle = "black";
-      context.textAlign = "right";
-      context.textBaseline = "middle";
-      context.fillText($.JSNumber_methods.toString$0(height), 40, scaledY0);
-      context.moveTo(48, scaledY0);
-      context.strokeStyle = "grey";
-      context.lineWidth = 0.5;
-      context.lineTo($.$sub$n(t1.get$width(t3), 150), scaledY0);
-      context.stroke();
-      scaledY0 += scaledY;
-    }
-  },
-  drawChart$2$bailout: function(state0, maxHeight, scale, t1, dividerHeight) {
-    var t3, context, height, scaledY, t2, i, t4;
-    t3 = this._canvas;
-    context = $.get$context2D$x(t3);
-    context.beginPath();
-    height = t1.toInt$0(maxHeight);
-    t1 = $.getInterceptor$n(dividerHeight);
-    scaledY = t1.$mul(dividerHeight, scale);
-    context.clearRect(0, 0, 48, maxHeight);
-    for (t2 = $.getInterceptor$x(t3), i = 1; i < 5; ++i) {
-      t4 = $.$mul$n(t1.$tdiv(dividerHeight, 100), 100);
-      if (typeof t4 !== "number")
-        throw $.iae(t4);
-      height -= t4;
-      context.font = "14px sans-serif";
-      context.fillStyle = "black";
-      context.textAlign = "right";
-      context.textBaseline = "middle";
-      context.fillText($.JSNumber_methods.toString$0(height), 40, scaledY);
-      context.moveTo(48, scaledY);
-      context.strokeStyle = "grey";
-      context.lineWidth = 0.5;
-      context.lineTo($.$sub$n(t2.get$width(t3), 150), scaledY);
-      context.stroke();
-      scaledY = $.$add$ns(scaledY, t1.$mul(dividerHeight, scale));
-    }
-  },
-  drawValues$2: function(maxHeight, scale) {
-    var t1, iterator, w, t2, x, s, blankHeight, y, i, h, t3;
-    if (typeof maxHeight !== "number")
-      return this.drawValues$2$bailout(1, maxHeight, scale);
-    t1 = this._model;
-    iterator = t1.get$iterator(t1);
-    t1 = this._canvas;
-    w = $.$sub$n($.$sub$n($.$sub$n($.get$width$x(t1), 50), 150), 2);
-    t2 = $.JSNumber_methods.ceil$0(maxHeight * scale);
-    $.get$context2D$x(t1).clearRect(52, 2, w, t2 - 4);
-    for (t1 = this._elements, x = 52; iterator.moveNext$0();) {
-      s = iterator.get$current();
-      t2 = $.getInterceptor(s);
-      if (s != null) {
-        blankHeight = $.$sub$n(this.scaleHeight, t2.total$0(s));
-        this.drawVerticalSegment$6(x, 2, 5, blankHeight, "white", scale);
-        if (typeof blankHeight !== "number")
-          throw $.iae(blankHeight);
-        y = 2 + blankHeight;
-        i = $.$sub$n(t2.get$length(s), 1);
-        if (i !== (i | 0))
-          return this.drawValues$2$bailout(2, maxHeight, scale, t2, t1, iterator, x, y, i, s);
-        for (; i >= 0; --i) {
-          h = t2.$index(s, i);
-          if (i >= t1.length)
-            throw $.ioore(i);
-          this.drawVerticalSegment$6(x, y, 5, h, $.get$color$x(t1[i]), scale);
-          t3 = t2.$index(s, i);
-          if (typeof t3 !== "number")
-            throw $.iae(t3);
-          y += t3;
-        }
-      } else
-        this.drawVerticalSegment$6(x, 2, 5, maxHeight, "white", scale);
-      x += 5;
-    }
-  },
-  drawValues$2$bailout: function(state0, maxHeight, scale, t2, t1, iterator, x, y, i, s) {
-    switch (state0) {
-      case 0:
-      case 1:
-        state0 = 0;
-        t1 = this._model;
-        iterator = t1.get$iterator(t1);
-        t1 = this._canvas;
-        w = $.$sub$n($.$sub$n($.$sub$n($.get$width$x(t1), 50), 150), 2);
-        t2 = $.ceil$0$n($.$mul$n(maxHeight, scale));
-        $.get$context2D$x(t1).clearRect(52, 2, w, t2 - 4);
-        t1 = this._elements;
-        x = 52;
-      case 2:
-        var w, blankHeight, h, t3;
-        L0:
-          while (true)
-            switch (state0) {
-              case 0:
-                if (!iterator.moveNext$0())
-                  break L0;
-                s = iterator.get$current();
-                t2 = $.getInterceptor(s);
-              case 2:
-                if (state0 === 2 || state0 === 0 && s != null)
-                  switch (state0) {
-                    case 0:
-                      blankHeight = $.$sub$n(this.scaleHeight, t2.total$0(s));
-                      this.drawVerticalSegment$6(x, 2, 5, blankHeight, "white", scale);
-                      if (typeof blankHeight !== "number")
-                        throw $.iae(blankHeight);
-                      y = 2 + blankHeight;
-                      i = $.$sub$n(t2.get$length(s), 1);
-                    case 2:
-                      state0 = 0;
-                      for (; $.$ge$n(i, 0); --i) {
-                        h = t2.$index(s, i);
-                        if (i !== (i | 0))
-                          throw $.iae(i);
-                        if (i < 0 || i >= t1.length)
-                          throw $.ioore(i);
-                        this.drawVerticalSegment$6(x, y, 5, h, $.get$color$x(t1[i]), scale);
-                        t3 = t2.$index(s, i);
-                        if (typeof t3 !== "number")
-                          throw $.iae(t3);
-                        y += t3;
-                      }
-                  }
-                else
-                  this.drawVerticalSegment$6(x, 2, 5, maxHeight, "white", scale);
-                x += 5;
-            }
-    }
-  },
-  drawVerticalSegment$6: function(x, y, w, h, color, scale) {
-    var t1, context, max;
-    if (typeof h !== "number")
-      return this.drawVerticalSegment$6$bailout(1, x, y, w, h, color, scale);
-    t1 = this._canvas;
-    context = $.get$context2D$x(t1);
-    y = $.JSNumber_methods.floor$0(y * scale);
-    h = $.JSNumber_methods.ceil$0(h * scale);
-    context.beginPath();
-    context.lineWidth = w;
-    context.fillStyle = color;
-    context.strokeStyle = color;
-    if (x < 2)
-      x = 2;
-    if (y < 2)
-      y = 2;
-    t1 = $.get$height$x(t1);
-    if (typeof t1 !== "number")
-      return this.drawVerticalSegment$6$bailout(2, x, y, 0, h, 0, 0, context, t1);
-    max = t1 - 2;
-    if (y + h > max)
-      h = max - y;
-    context.moveTo(x, y);
-    context.lineTo(x, y + h);
-    context.stroke();
-  },
-  drawVerticalSegment$6$bailout: function(state0, x, y, w, h, color, scale, context, t1) {
-    switch (state0) {
-      case 0:
-      case 1:
-        state0 = 0;
-        t1 = this._canvas;
-        context = $.get$context2D$x(t1);
-        y = $.JSNumber_methods.floor$0(y * scale);
-        h = $.ceil$0$n($.$mul$n(h, scale));
-        context.beginPath();
-        context.lineWidth = w;
-        context.fillStyle = color;
-        context.strokeStyle = color;
-        if (x < 2)
-          x = 2;
-        if (y < 2)
-          y = 2;
-        t1 = $.get$height$x(t1);
-      case 2:
-        var max;
-        state0 = 0;
-        max = $.$sub$n(t1, 2);
-        if ($.JSNumber_methods.$gt(y + h, max))
-          h = $.$sub$n(max, y);
-        context.moveTo(x, y);
-        if (typeof h !== "number")
-          throw $.iae(h);
-        context.lineTo(x, y + h);
-        context.stroke();
-    }
-  },
-  BarGraph$2: function(_canvas, _elements) {
-    this._model = $.GraphModel$($.$tdiv$n($.$sub$n($.$sub$n($.get$width$x(this._canvas), 50), 150), 5));
-    this._model.addListener$2(this.get$drawGraph(), null);
-    this.drawBarGraph$0();
-  }
-};
-
-$$.GraphModel = {"": "ObservableModel;_samples,_maxSize,_listeners",
-  addSample$1: function(segments) {
-    var t1 = this._samples;
-    if ($.JSInt_methods.$ge(t1.length, this._maxSize))
-      $.JSArray_methods.remove$1(t1, $.JSArray_methods.get$first(t1));
-    t1.push($.Sample$(segments));
-    this.notifySuccess$0();
-  },
-  get$iterator: function(_) {
-    return $.JSArray_methods.get$iterator(this._samples);
-  },
-  $index: function(_, i) {
-    var t1 = this._samples;
-    if (i !== (i | 0))
-      throw $.iae(i);
-    if (i < 0 || i >= t1.length)
-      throw $.ioore(i);
-    return t1[i];
-  },
-  get$maxTotal: function() {
-    var t1 = {};
-    t1.max_0 = 1;
-    $.JSArray_methods.forEach$1(this._samples, new $.GraphModel_maxTotal_anon(t1));
-    return t1.max_0;
-  }
-};
-
-$$.GraphModel_maxTotal_anon = {"": "Closure;box_0",
-  call$1: function(s) {
-    var t1, t2, t3, max;
-    t1 = $.getInterceptor$x(s);
-    t2 = t1.total$0(s);
-    t3 = this.box_0;
-    max = $.$gt$n(t2, t3.max_0) ? t1.total$0(s) : t3.max_0;
-    t3.max_0 = max;
-    return max;
-  }
-};
-
-$$.Element0 = {"": "Object;name>,color>"};
-
-$$.Sample = {"": "Object;_segments",
-  get$length: function(_) {
-    return this._segments.length;
-  },
-  $index: function(_, i) {
-    var t1 = this._segments;
-    if (i !== (i | 0))
-      throw $.iae(i);
-    if (i < 0 || i >= t1.length)
-      throw $.ioore(i);
-    return t1[i];
-  },
-  get$iterator: function(_) {
-    return $.JSArray_methods.get$iterator(this._segments);
-  },
-  total$0: function(_) {
-    return $.JSArray_methods.fold$2(this._segments, 0, new $.Sample_total_anon());
-  }
-};
-
-$$.Sample_total_anon = {"": "Closure;",
-  call$2: function(prev, element) {
-    return $.$add$ns(prev, element);
-  }
-};
-
-$$.IsolateList = {"": "Object;_isolateTable",
-  updateList$1: function(model) {
-    var iterator, t1, t2, t3, isolate, t4, isolateId, t5, detailsCell, basicData, details, stacktraceCell, stacktrace;
-    iterator = $.get$iterator$ax(model);
-    for (t1 = this._isolateTable, t2 = $.getInterceptor$x(t1); iterator.moveNext$0() === true;) {
-      t3 = {};
-      isolate = iterator.get$current();
-      t4 = $.getInterceptor$x(isolate);
-      isolateId = "isolate-" + $.S(t4.get$port(isolate));
-      t3.isolateRow_0 = t1.querySelector("#" + isolateId);
-      t5 = t3.isolateRow_0;
-      if (t5 != null)
-        this.updateIsolateDetails$2(isolate, t5);
-      else {
-        t3.isolateRow_0 = document.createElement("tr");
-        $.set$$$dom_className$x(t3.isolateRow_0, "isolate_row");
-        $.set$id$x(t3.isolateRow_0, isolateId);
-        t5 = t2.get$children(t1);
-        t5.add$1(t5, t3.isolateRow_0);
-        detailsCell = document.createElement("td");
-        t5 = $.getInterceptor$x(detailsCell);
-        detailsCell.className = "isolate_details_column";
-        $.add$1$ax($.get$children$x(t3.isolateRow_0), detailsCell);
-        basicData = document.createElement("div");
-        basicData.textContent = $.JSString_methods.replaceAll$2($.replaceAll$2$s(t4.get$name(isolate), "$", ": "), "-", " ");
-        t4 = t5.get$children(detailsCell);
-        t4.add$1(t4, basicData);
-        details = document.createElement("div");
-        t4 = $.get$classes$x(details);
-        t4.addAll$1(t4, ["isolate_details", "hidden"]);
-        t5 = t5.get$children(detailsCell);
-        t5.add$1(t5, details);
-        stacktraceCell = document.createElement("td");
-        t5 = $.getInterceptor$x(stacktraceCell);
-        t4 = t5.get$classes(stacktraceCell);
-        t4.addAll$1(t4, ["isolate_stacktrace_column", "hidden"]);
-        $.add$1$ax($.get$children$x(t3.isolateRow_0), stacktraceCell);
-        stacktrace = document.createElement("div");
-        t4 = $.get$classes$x(stacktrace);
-        t4.addAll$1(t4, ["stack_trace", "hidden"]);
-        t5 = t5.get$children(stacktraceCell);
-        t5.add$1(t5, stacktrace);
-        $.get$onClick$x(t3.isolateRow_0).listen$1(new $.IsolateList_updateList_anon(t3, this));
-        this.updateIsolateDetails$2(isolate, t3.isolateRow_0);
-      }
-    }
-  },
-  setStacktrace$2: function(element, json) {
-    var t1, t2, response, title, t3, stackIterator, i, frame, $frameElement, text, noStack;
-    t1 = $.getInterceptor$x(element);
-    t2 = t1.get$children(element);
-    t2.clear$0(t2);
-    response = $.parse(json, null);
-    t2 = $.getInterceptor$asx(response);
-    t1.set$id(element, t2.$index(response, "handle"));
-    title = document.createElement("div");
-    title.className = "stack_trace_title";
-    title.textContent = "Stack Trace";
-    t3 = t1.get$children(element);
-    t3.add$1(t3, title);
-    if ($.$gt$n($.get$length$asx(t2.$index(response, "stacktrace")), 0)) {
-      stackIterator = $.get$iterator$ax(t2.$index(response, "stacktrace"));
-      for (i = 0; stackIterator.moveNext$0() === true;) {
-        ++i;
-        frame = stackIterator.get$current();
-        $frameElement = document.createElement("div");
-        t2 = $.getInterceptor$asx(frame);
-        text = "" + i + ": " + $.S(t2.$index(frame, "url")) + ":" + $.S(t2.$index(frame, "line")) + ": " + $.S(t2.$index(frame, "function"));
-        $frameElement.textContent = $.$index$asx(t2.$index(frame, "code"), "optimized") === true ? text + " (optimized)" : text;
-        $frameElement.className = "stack_frame";
-        t2 = t1.get$children(element);
-        t2.add$1(t2, $frameElement);
-      }
-    } else {
-      noStack = document.createElement("div");
-      noStack.className = "empty_stack_frame";
-      noStack.textContent = "<no stack>";
-      t1 = t1.get$children(element);
-      t1.add$1(t1, noStack);
-    }
-  },
-  findOrAddChild$2: function($parent, className) {
-    var child, t1;
-    child = $parent.querySelector("." + className);
-    if (child == null) {
-      child = document.createElement("div");
-      child.className = className;
-      t1 = $.get$children$x($parent);
-      t1.add$1(t1, child);
-    }
-    return child;
-  },
-  updateIsolateDetails$2: function(isolate, row) {
-    var details, stackTrace;
-    details = row.querySelector(".isolate_details");
-    this.findOrAddChild$2(details, "new_space").textContent = "New space: " + $.S(isolate.get$newSpace().used) + "K";
-    this.findOrAddChild$2(details, "old_space").textContent = "Old space: " + $.S(isolate.get$oldSpace().used) + "K";
-    this.findOrAddChild$2(details, "stack_limit").textContent = "Stack limit: " + $.S($.JSDouble_methods.round$0($.abs$0$n(isolate.get$stackLimit()) / 1000000)) + "M";
-    stackTrace = this.findOrAddChild$2(row, "isolate_stacktrace_column");
-    $.HttpRequest_getString("/isolate/" + $.S(isolate.get$handle()) + "/stacktrace", null, null).then$1(new $.IsolateList_updateIsolateDetails_anon(this, stackTrace));
-  }
-};
-
-$$.IsolateList_updateList_anon = {"": "Closure;box_0,this_1",
-  call$1: function(e) {
-    var t1, t2, t3, t4;
-    t1 = this.box_0.isolateRow_0;
-    t2 = $.getInterceptor$x(t1);
-    t3 = t2.query$1(t1, ".isolate_details");
-    t4 = $.getInterceptor$x(t3);
-    t4.get$classes(t3).toggle$1("visible");
-    t4.get$classes(t3).toggle$1("hidden");
-    t1 = t2.query$1(t1, ".isolate_stacktrace_column");
-    t2 = $.getInterceptor$x(t1);
-    t2.get$classes(t1).toggle$1("visible");
-    t2.get$classes(t1).toggle$1("hidden");
-    return;
-  }
-};
-
-$$.IsolateList_updateIsolateDetails_anon = {"": "Closure;this_0,stackTrace_1",
-  call$1: function(response) {
-    return this.this_0.setStacktrace$2(this.stackTrace_1, response);
-  }
-};
-
-$$.ObservableModel = {"": "Object;",
-  addListener$2: function(onUpdate, onFailure) {
-    this._listeners.push($.ModelListener$(onUpdate, onFailure));
-  },
-  removeListener$1: function(onUpdate) {
-    var t1, iterator;
-    t1 = this._listeners;
-    iterator = $.JSArray_methods.get$iterator(t1);
-    for (; iterator.moveNext$0();)
-      if (iterator.get$current().get$_onUpdate() === onUpdate) {
-        $.JSArray_methods.remove$1(t1, iterator.get$current());
-        return;
-      }
-  },
-  notifySuccess$0: function() {
-    $.JSArray_methods.forEach$1(this._listeners, new $.ObservableModel_notifySuccess_anon(this));
-  },
-  notifyFailure$0: function() {
-    $.JSArray_methods.forEach$1(this._listeners, new $.ObservableModel_notifyFailure_anon());
-  }
-};
-
-$$.ObservableModel_notifySuccess_anon = {"": "Closure;this_0",
-  call$1: function(listener) {
-    return listener.changed$1(this.this_0);
-  }
-};
-
-$$.ObservableModel_notifyFailure_anon = {"": "Closure;",
-  call$1: function(listener) {
-    return listener.failed$0();
-  }
-};
-
-$$.ModelListener = {"": "Object;_onUpdate<,_onFailure",
-  _onUpdate$1: function(arg0) {
-    return this._onUpdate.call$1(arg0);
-  },
-  changed$1: function(model) {
-    return $.Primitives_applyFunction(this._onUpdate, [model], $.Function__toMangledNames(null));
-  },
-  failed$0: function() {
-    return $.Primitives_applyFunction(this._onFailure, [], $.Function__toMangledNames(null));
-  }
-};
-
-$$.IsolateListModel = {"": "ObservableModel;_isolates,_listeners",
-  update$0: function() {
-    $.HttpRequest_getString("/isolates", null, null).then$2$onError(new $.IsolateListModel_update_anon(this), new $.IsolateListModel_update_anon0(this));
-  },
-  _onUpdate$1: function(isolateMap) {
-    var list, i;
-    this._isolates = [];
-    list = $.$index$asx(isolateMap, "isolates");
-    if (typeof list !== "string" && (typeof list !== "object" || list === null || list.constructor !== Array && !$.getInterceptor(list).$isJavaScriptIndexingBehavior()))
-      return this._onUpdate$1$bailout(1, list);
-    for (i = 0; i < list.length; ++i)
-      this._isolates.push($.Isolate$(list[i]));
-    this.notifySuccess$0();
-  },
-  _onUpdate$1$bailout: function(state0, list) {
-    var t1, i;
-    for (t1 = $.getInterceptor$asx(list), i = 0; $.JSNumber_methods.$lt(i, t1.get$length(list)); ++i)
-      this._isolates.push($.Isolate$(t1.$index(list, i)));
-    this.notifySuccess$0();
-  },
-  get$_onUpdate: function() {
-    return new $.BoundClosure$1(this, "_onUpdate$1");
-  },
-  toString$0: function(_) {
-    return $.JSArray_methods.join$1(this._isolates, ", ");
-  },
-  forEach$1: function(_, f) {
-    return $.JSArray_methods.forEach$1(this._isolates, f);
-  },
-  isEmpty$0: function(_) {
-    return $.JSArray_methods.get$isEmpty(this._isolates);
-  },
-  get$isEmpty: function(receiver) {
-    return new $.BoundClosure$i0(this, "isEmpty$0", receiver);
-  },
-  get$iterator: function(_) {
-    return $.JSArray_methods.get$iterator(this._isolates);
-  },
-  get$length: function(_) {
-    return this._isolates.length;
-  },
-  $index: function(_, index) {
-    var t1 = this._isolates;
-    if (index !== (index | 0))
-      throw $.iae(index);
-    if (index < 0 || index >= t1.length)
-      throw $.ioore(index);
-    return t1[index];
-  }
-};
-
-$$.IsolateListModel_update_anon = {"": "Closure;this_0",
-  call$1: function(response) {
-    return this.this_0._onUpdate$1($.parse(response, null));
-  }
-};
-
-$$.IsolateListModel_update_anon0 = {"": "Closure;this_1",
-  call$1: function(e) {
-    return this.this_1.notifyFailure$0();
-  }
-};
-
-$$.Isolate = {"": "Object;handle<,name>,port>,startTime,stackLimit<,newSpace<,oldSpace<",
-  toString$0: function(_) {
-    return $.S(this.name) + ": " + $.S($.$add$ns(this.newSpace.used, this.oldSpace.used)) + "K";
-  }
-};
-
-$$.Space = {"": "Object;used,capacity",
-  toString$0: function(_) {
-    return "used: " + $.S(this.used) + " capacity: " + $.S(this.capacity);
-  }
-};
-
-$$.main_anon = {"": "Closure;",
-  call$1: function(timer) {
-    return $._isolates.update$0();
-  }
-};
-
-$$.onUpdateStatus_anon = {"": "Closure;box_0",
-  call$1: function(element) {
-    var t1 = this.box_0;
-    t1.oldSpace_0 = $.$add$ns(t1.oldSpace_0, element.get$oldSpace().used);
-    t1.newSpace_1 = $.$add$ns(t1.newSpace_1, element.get$newSpace().used);
-  }
-};
-
-// Native classes
-$$._WorkerStub = {"": "Interceptor;",
-  get$id: function(receiver) {
-    return receiver.id;
-  },
-  set$id: function(receiver, i) {
-    receiver.id = i;
-  },
-  set$onmessage: function(receiver, f) {
-    receiver.onmessage = f;
-  },
-  postMessage$1: function(receiver, msg) {
-    receiver.postMessage(msg);
-  },
-  terminate$0: function(receiver) {
-    receiver.terminate();
-  }
-};
-
-$$._HTMLElement = {"": "Element;"};
-
-$$.AnchorElement = {"": "Element;name=,port=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.AnimationEvent = {"": "Event;"};
-
-$$.AreaElement = {"": "Element;port="};
-
-$$.ArrayBuffer = {"": "Interceptor;"};
-
-$$.ArrayBufferView = {"": "Interceptor;"};
-
-$$.Attr = {"": "Node;"};
-
-$$.AudioElement = {"": "MediaElement;"};
-
-$$.AutocompleteErrorEvent = {"": "Event;"};
-
-$$.BRElement = {"": "Element;"};
-
-$$.BaseElement = {"": "Element;"};
-
-$$.BeforeLoadEvent = {"": "Event;"};
-
-$$.Blob = {"": "Interceptor;"};
-
-$$.BodyElement = {"": "Element;"};
-
-$$.ButtonElement = {"": "Element;name=,value="};
-
-$$.CDataSection = {"": "Text;"};
-
-$$.CanvasElement = {"": "Element;height=,width=",
-  get$context2D: function(receiver) {
-    return receiver.getContext("2d");
-  }
-};
-
-$$.CanvasGradient = {"": "Interceptor;"};
-
-$$.CanvasPattern = {"": "Interceptor;"};
-
-$$.CanvasRenderingContext = {"": "Interceptor;"};
-
-$$.CanvasRenderingContext2D = {"": "CanvasRenderingContext;"};
-
-$$.CharacterData = {"": "Node;length="};
-
-$$.CloseEvent = {"": "Event;"};
-
-$$.Comment = {"": "CharacterData;"};
-
-$$.CompositionEvent = {"": "UIEvent;"};
-
-$$.ContentElement = {"": "Element;"};
-
-$$.CssFontFaceLoadEvent = {"": "Event;"};
-
-$$.CssStyleDeclaration = {"": "Interceptor;length=",
-  getPropertyValue$1: function(receiver, propertyName) {
-    var propValue = receiver.getPropertyValue(propertyName);
-    return propValue != null ? propValue : "";
-  },
-  get$color: function(receiver) {
-    return this.getPropertyValue$1(receiver, "color");
-  }
-};
-
-$$.CustomElementConstructor = {"": "Interceptor;"};
-
-$$.CustomEvent = {"": "Event;"};
-
-$$.DListElement = {"": "Element;"};
-
-$$.DataListElement = {"": "Element;"};
-
-$$.DetailsElement = {"": "Element;"};
-
-$$.DeviceMotionEvent = {"": "Event;"};
-
-$$.DeviceOrientationEvent = {"": "Event;"};
-
-$$.DialogElement = {"": "Element;"};
-
-$$.DivElement = {"": "Element;"};
-
-$$.Document = {"": "Node;",
-  query$1: function(receiver, selectors) {
-    return receiver.querySelector(selectors);
-  },
-  register$2: function(receiver, $name, options) {
-    var t1 = $ === options;
-    if (t1)
-      options = null;
-    if (!t1)
-      return receiver.webkitRegister($name, $.convertDartToNative_Dictionary(options));
-    return receiver.webkitRegister($name);
-  },
-  get$onClick: function(receiver) {
-    return $.EventStreamProvider_click.forTarget$1(receiver);
-  }
-};
-
-$$.DocumentFragment = {"": "Node;",
-  get$children: function(receiver) {
-    if (receiver._children == null)
-      receiver._children = $.FilteredElementList$(receiver);
-    return receiver._children;
-  },
-  query$1: function(receiver, selectors) {
-    return receiver.querySelector(selectors);
-  }
-};
-
-$$.DocumentType = {"": "Node;"};
-
-$$.DomError = {"": "Interceptor;name="};
-
-$$.DomException = {"": "Interceptor;",
-  get$name: function(receiver) {
-    var errorName = receiver.name;
-    if ($.Device_isWebKit() === true && errorName === "SECURITY_ERR")
-      return "SecurityError";
-    if ($.Device_isWebKit() === true && errorName === "SYNTAX_ERR")
-      return "SyntaxError";
-    return errorName;
-  },
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.Element = {"": "Node;$$dom_children:children=,id%,$$dom_className:className}",
-  get$attributes: function(receiver) {
-    return $._ElementAttributeMap$(receiver);
-  },
-  get$children: function(receiver) {
-    return $._ChildrenElementList$_wrap(receiver);
-  },
-  get$classes: function(receiver) {
-    return $._ElementCssClassSet$(receiver);
-  },
-  query$1: function(receiver, selectors) {
-    return receiver.querySelector(selectors);
-  },
-  get$onClick: function(receiver) {
-    return $.EventStreamProvider_click.forTarget$1(receiver);
-  },
-  $isElement: function() {
-    return true;
-  },
-  $asElement: function() {
-    return null;
-  }
-};
-
-$$.EmbedElement = {"": "Element;height=,name=,width="};
-
-$$.EntityReference = {"": "Node;"};
-
-$$.ErrorEvent = {"": "Event;"};
-
-$$.Event = {"": "Interceptor;"};
-
-$$.EventException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.EventTarget = {"": "Interceptor;",
-  $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.removeEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  }
-};
-
-$$.FieldSetElement = {"": "Element;name="};
-
-$$.File = {"": "Blob;name="};
-
-$$.FileError = {"": "Interceptor;"};
-
-$$.FileException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.FocusEvent = {"": "UIEvent;"};
-
-$$.FormElement = {"": "Element;length=,name="};
-
-$$.HRElement = {"": "Element;"};
-
-$$.HashChangeEvent = {"": "Event;"};
-
-$$.HeadElement = {"": "Element;"};
-
-$$.HeadingElement = {"": "Element;"};
-
-$$.HtmlCollection = {"": "Interceptor;",
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  $index: function(receiver, index) {
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot assign element of immutable List."));
-  },
-  get$iterator: function(receiver) {
-    return $.FixedSizeListIterator$(receiver);
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(receiver) {
-    return this.get$length(receiver) === 0;
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  elementAt$1: function(receiver, index) {
-    return receiver[index];
-  },
-  add$1: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  addAll$1: function(receiver, iterable) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  set$length: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot resize immutable List."));
-  },
-  removeLast$0: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List."));
-  },
-  sublist$2: function(receiver, start, end) {
-    if (end == null)
-      end = this.get$length(receiver);
-    return $.Lists_getRange(receiver, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(receiver) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(receiver, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return function () { return [$.Node]; };
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.Node]; };
-  },
-  $isJavaScriptIndexingBehavior: function() {
-    return true;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  }
-};
-
-$$.HtmlDocument = {"": "Document;"};
-
-$$.HtmlElement = {"": "Element;"};
-
-$$.HtmlFormControlsCollection = {"": "HtmlCollection;"};
-
-$$.HtmlOptionsCollection = {"": "HtmlCollection;"};
-
-$$.HttpRequest = {"": "EventTarget;responseText=",
-  $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  open$5$async$password$user: function(receiver, method, url, async, password, user) {
-    return receiver.open(method, url, async, user, password);
-  },
-  open$3$async: function($receiver, method, url, async) {
-    return $receiver.open(method, url, async);
-  },
-  $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.removeEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  send$1: function(receiver, data) {
-    return receiver.send(data);
-  },
-  get$onError: function(receiver) {
-    return $.EventStreamProvider_error.forTarget$1(receiver);
-  },
-  get$onLoad: function(receiver) {
-    return $.EventStreamProvider_load.forTarget$1(receiver);
-  },
-  get$onProgress: function(receiver) {
-    return $.EventStreamProvider_progress.forTarget$1(receiver);
-  }
-};
-
-$$.HttpRequestException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.HttpRequestProgressEvent = {"": "ProgressEvent;"};
-
-$$.HttpRequestUpload = {"": "EventTarget;",
-  $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.removeEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  }
-};
-
-$$.IFrameElement = {"": "Element;height=,name=,width="};
-
-$$.ImageElement = {"": "Element;height=,width="};
-
-$$.InputElement = {"": "Element;height=,name=,value=,width=",
-  $isElement: function() {
-    return true;
-  },
-  $asElement: function() {
-    return null;
-  }
-};
-
-$$.KeyboardEvent = {"": "UIEvent;"};
-
-$$.KeygenElement = {"": "Element;name="};
-
-$$.LIElement = {"": "Element;value="};
-
-$$.LabelElement = {"": "Element;"};
-
-$$.LegendElement = {"": "Element;"};
-
-$$.LinkElement = {"": "Element;"};
-
-$$.MapElement = {"": "Element;name="};
-
-$$.MediaElement = {"": "Element;"};
-
-$$.MediaError = {"": "Interceptor;"};
-
-$$.MediaKeyError = {"": "Interceptor;"};
-
-$$.MediaKeyEvent = {"": "Event;"};
-
-$$.MediaStreamEvent = {"": "Event;"};
-
-$$.MediaStreamTrackEvent = {"": "Event;"};
-
-$$.MenuElement = {"": "Element;"};
-
-$$.MessageEvent = {"": "Event;"};
-
-$$.MetaElement = {"": "Element;name="};
-
-$$.MeterElement = {"": "Element;value="};
-
-$$.ModElement = {"": "Element;"};
-
-$$.MouseEvent = {"": "UIEvent;"};
-
-$$.MutationEvent = {"": "Event;"};
-
-$$.Navigator = {"": "Interceptor;"};
-
-$$.NavigatorUserMediaError = {"": "Interceptor;"};
-
-$$.Node = {"": "EventTarget;text:textContent}",
-  get$nodes: function(receiver) {
-    return $._ChildNodeListLazy$(receiver);
-  },
-  remove$0: function(receiver) {
-    var t1 = receiver.parentNode;
-    if (t1 != null)
-      t1.removeChild(receiver);
-  },
-  replaceWith$1: function(receiver, otherNode) {
-    var $parent, exception;
-    try {
-      $parent = receiver.parentNode;
-      $.$$dom_replaceChild$2$x($parent, otherNode, receiver);
-    } catch (exception) {
-      $.unwrapException(exception);
-    }
-
-    return receiver;
-  },
-  toString$0: function(receiver) {
-    var t1 = receiver.localName;
-    if (t1 == null) {
-      t1 = receiver.nodeValue;
-      if (t1 == null)
-        t1 = $.Object.prototype.toString$0.call(receiver, receiver);
-    }
-    return t1;
-  },
-  $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.removeEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  $$dom_replaceChild$2: function(receiver, newChild, oldChild) {
-    return receiver.replaceChild(newChild, oldChild);
-  }
-};
-
-$$.NodeList = {"": "Interceptor;",
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  $index: function(receiver, index) {
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot assign element of immutable List."));
-  },
-  get$iterator: function(receiver) {
-    return $.FixedSizeListIterator$(receiver);
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(receiver) {
-    return this.get$length(receiver) === 0;
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  elementAt$1: function(receiver, index) {
-    return receiver[index];
-  },
-  add$1: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  addAll$1: function(receiver, iterable) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  set$length: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot resize immutable List."));
-  },
-  removeLast$0: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List."));
-  },
-  sublist$2: function(receiver, start, end) {
-    if (end == null)
-      end = this.get$length(receiver);
-    return $.Lists_getRange(receiver, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(receiver) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(receiver, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return function () { return [$.Node]; };
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.Node]; };
-  },
-  $isJavaScriptIndexingBehavior: function() {
-    return true;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  }
-};
-
-$$.Notation = {"": "Node;"};
-
-$$.OListElement = {"": "Element;"};
-
-$$.ObjectElement = {"": "Element;height=,name=,width="};
-
-$$.OptGroupElement = {"": "Element;"};
-
-$$.OptionElement = {"": "Element;value="};
-
-$$.OutputElement = {"": "Element;name=,value="};
-
-$$.OverflowEvent = {"": "Event;"};
-
-$$.PageTransitionEvent = {"": "Event;"};
-
-$$.ParagraphElement = {"": "Element;"};
-
-$$.ParamElement = {"": "Element;name=,value="};
-
-$$.PopStateEvent = {"": "Event;"};
-
-$$.PositionError = {"": "Interceptor;"};
-
-$$.PreElement = {"": "Element;"};
-
-$$.ProcessingInstruction = {"": "Node;"};
-
-$$.ProgressElement = {"": "Element;value="};
-
-$$.ProgressEvent = {"": "Event;",
-  total$0: function($receiver) {
-    return this.total.call$0();
-  }
-};
-
-$$.QuoteElement = {"": "Element;"};
-
-$$.RadioNodeList = {"": "NodeList;"};
-
-$$.RangeException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.RtcDataChannelEvent = {"": "Event;"};
-
-$$.RtcDtmfToneChangeEvent = {"": "Event;"};
-
-$$.RtcIceCandidateEvent = {"": "Event;"};
-
-$$.ScriptElement = {"": "Element;"};
-
-$$.SecurityPolicyViolationEvent = {"": "Event;"};
-
-$$.SelectElement = {"": "Element;length%,name=,value="};
-
-$$.ShadowElement = {"": "Element;"};
-
-$$.ShadowRoot = {"": "DocumentFragment;"};
-
-$$.SourceElement = {"": "Element;"};
-
-$$.SpanElement = {"": "Element;"};
-
-$$.SpeechInputEvent = {"": "Event;"};
-
-$$.SpeechRecognitionError = {"": "Event;"};
-
-$$.SpeechRecognitionEvent = {"": "Event;"};
-
-$$.StorageEvent = {"": "Event;"};
-
-$$.StyleElement = {"": "Element;"};
-
-$$.TableCaptionElement = {"": "Element;"};
-
-$$.TableCellElement = {"": "Element;"};
-
-$$.TableColElement = {"": "Element;"};
-
-$$.TableElement = {"": "Element;"};
-
-$$.TableRowElement = {"": "Element;"};
-
-$$.TableSectionElement = {"": "Element;"};
-
-$$.TemplateElement = {"": "Element;"};
-
-$$.Text = {"": "CharacterData;"};
-
-$$.TextAreaElement = {"": "Element;name=,value="};
-
-$$.TextEvent = {"": "UIEvent;"};
-
-$$.TitleElement = {"": "Element;"};
-
-$$.TouchEvent = {"": "UIEvent;"};
-
-$$.TrackElement = {"": "Element;"};
-
-$$.TrackEvent = {"": "Event;"};
-
-$$.TransitionEvent = {"": "Event;"};
-
-$$.UIEvent = {"": "Event;"};
-
-$$.UListElement = {"": "Element;"};
-
-$$.Uint8Array = {"": "ArrayBufferView;",
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  $index: function(receiver, index) {
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    receiver[index] = value;
-  },
-  get$iterator: function(receiver) {
-    return $.FixedSizeListIterator$(receiver);
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(receiver) {
-    return this.get$length(receiver) === 0;
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  elementAt$1: function(receiver, index) {
-    return this.$index(receiver, index);
-  },
-  add$1: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  addAll$1: function(receiver, iterable) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  set$length: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot resize immutable List."));
-  },
-  removeLast$0: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List."));
-  },
-  sublist$2: function(receiver, start, end) {
-    if (end == null)
-      end = this.get$length(receiver);
-    return $.Lists_getRange(receiver, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(receiver) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(receiver, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return function () { return [$.$int]; };
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.$int]; };
-  },
-  $isJavaScriptIndexingBehavior: function() {
-    return true;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  }
-};
-
-$$.Uint8ClampedArray = {"": "Uint8Array;",
-  $index: function(receiver, index) {
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    receiver[index] = value;
-  },
-  get$iterator: function(receiver) {
-    return $.FixedSizeListIterator$(receiver);
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(receiver) {
-    return this.get$length(receiver) === 0;
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  elementAt$1: function(receiver, index) {
-    return receiver[index];
-  },
-  add$1: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  addAll$1: function(receiver, iterable) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  set$length: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot resize immutable List."));
-  },
-  removeLast$0: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List."));
-  },
-  sublist$2: function(receiver, start, end) {
-    if (end == null)
-      end = this.get$length(receiver);
-    return $.Lists_getRange(receiver, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(receiver) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(receiver, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return function () { return [$.$int]; };
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.$int]; };
-  },
-  $isJavaScriptIndexingBehavior: function() {
-    return true;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  }
-};
-
-$$.UnknownElement = {"": "Element;"};
-
-$$.VideoElement = {"": "MediaElement;height=,width="};
-
-$$.WheelEvent = {"": "MouseEvent;"};
-
-$$.Window = {"": "EventTarget;name=,navigator=",
-  $$dom_addEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.addEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  $$dom_removeEventListener$3: function(receiver, type, listener, useCapture) {
-    return receiver.removeEventListener(type, $.convertDartClosureToJS(listener, 1), useCapture);
-  },
-  get$onClick: function(receiver) {
-    return $.EventStreamProvider_click.forTarget$1(receiver);
-  }
-};
-
-$$.XPathException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$._NamedNodeMap = {"": "Interceptor;",
-  get$length: function(receiver) {
-    return receiver.length;
-  },
-  $index: function(receiver, index) {
-    return receiver[index];
-  },
-  $indexSet: function(receiver, index, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot assign element of immutable List."));
-  },
-  get$iterator: function(receiver) {
-    return $.FixedSizeListIterator$(receiver);
-  },
-  forEach$1: function(receiver, f) {
-    var t1;
-    for (t1 = this.get$iterator(receiver); t1.moveNext$0();)
-      f.call$1(t1.get$current());
-    return;
-  },
-  toList$1$growable: function(receiver, growable) {
-    return $.List_List$from(receiver, growable);
-  },
-  toList$0: function($receiver) {
-    return this.toList$1$growable($receiver, true);
-  },
-  get$isEmpty: function(receiver) {
-    return this.get$length(receiver) === 0;
-  },
-  skip$1: function(receiver, n) {
-    return $.SubListIterable$(receiver, n, null);
-  },
-  elementAt$1: function(receiver, index) {
-    return receiver[index];
-  },
-  add$1: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  addAll$1: function(receiver, iterable) {
-    throw $.wrapException($.UnsupportedError$("Cannot add to immutable List."));
-  },
-  set$length: function(receiver, value) {
-    throw $.wrapException($.UnsupportedError$("Cannot resize immutable List."));
-  },
-  removeLast$0: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot remove from immutable List."));
-  },
-  sublist$2: function(receiver, start, end) {
-    if (end == null)
-      end = this.get$length(receiver);
-    return $.Lists_getRange(receiver, start, end, []);
-  },
-  sublist$1: function($receiver, start) {
-    return this.sublist$2($receiver, start, null);
-  },
-  toString$0: function(receiver) {
-    var buffer = $.StringBuffer$("[");
-    buffer.writeAll$2(receiver, ", ");
-    buffer.write$1("]");
-    return buffer.toString$0(buffer);
-  },
-  $isList: function() {
-    return true;
-  },
-  $asList: function() {
-    return function () { return [$.Node]; };
-  },
-  $isIterable: function() {
-    return true;
-  },
-  $asIterable: function() {
-    return function () { return [$.Node]; };
-  },
-  $isJavaScriptIndexingBehavior: function() {
-    return true;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  }
-};
-
-$$._WebKitTransitionEvent = {"": "Event;"};
-
-$$.VersionChangeEvent = {"": "Event;"};
-
-$$.AElement = {"": "StyledElement;"};
-
-$$.AltGlyphElement = {"": "TextPositioningElement;"};
-
-$$.AnimateElement = {"": "AnimationElement;"};
-
-$$.AnimateMotionElement = {"": "AnimationElement;"};
-
-$$.AnimateTransformElement = {"": "AnimationElement;"};
-
-$$.AnimatedLength = {"": "Interceptor;"};
-
-$$.AnimatedNumberList = {"": "Interceptor;"};
-
-$$.AnimationElement = {"": "SvgElement;"};
-
-$$.CircleElement = {"": "StyledElement;"};
-
-$$.ClipPathElement = {"": "StyledElement;"};
-
-$$.DefsElement = {"": "StyledElement;"};
-
-$$.DescElement = {"": "StyledElement;"};
-
-$$.EllipseElement = {"": "StyledElement;"};
-
-$$.FEBlendElement = {"": "StyledElement;height=,width="};
-
-$$.FEColorMatrixElement = {"": "StyledElement;height=,width="};
-
-$$.FEComponentTransferElement = {"": "StyledElement;height=,width="};
-
-$$.FECompositeElement = {"": "StyledElement;height=,width="};
-
-$$.FEConvolveMatrixElement = {"": "StyledElement;height=,width="};
-
-$$.FEDiffuseLightingElement = {"": "StyledElement;height=,width="};
-
-$$.FEDisplacementMapElement = {"": "StyledElement;height=,width="};
-
-$$.FEDistantLightElement = {"": "SvgElement;"};
-
-$$.FEFloodElement = {"": "StyledElement;height=,width="};
-
-$$.FEFuncAElement = {"": "_SVGComponentTransferFunctionElement;"};
-
-$$.FEFuncBElement = {"": "_SVGComponentTransferFunctionElement;"};
-
-$$.FEFuncGElement = {"": "_SVGComponentTransferFunctionElement;"};
-
-$$.FEFuncRElement = {"": "_SVGComponentTransferFunctionElement;"};
-
-$$.FEGaussianBlurElement = {"": "StyledElement;height=,width="};
-
-$$.FEImageElement = {"": "StyledElement;height=,width="};
-
-$$.FEMergeElement = {"": "StyledElement;height=,width="};
-
-$$.FEMergeNodeElement = {"": "SvgElement;"};
-
-$$.FEMorphologyElement = {"": "StyledElement;height=,width="};
-
-$$.FEOffsetElement = {"": "StyledElement;height=,width="};
-
-$$.FEPointLightElement = {"": "SvgElement;"};
-
-$$.FESpecularLightingElement = {"": "StyledElement;height=,width="};
-
-$$.FESpotLightElement = {"": "SvgElement;"};
-
-$$.FETileElement = {"": "StyledElement;height=,width="};
-
-$$.FETurbulenceElement = {"": "StyledElement;height=,width="};
-
-$$.FilterElement = {"": "StyledElement;height=,width="};
-
-$$.ForeignObjectElement = {"": "StyledElement;height=,width="};
-
-$$.GElement = {"": "StyledElement;"};
-
-$$.ImageElement0 = {"": "StyledElement;height=,width="};
-
-$$.LineElement = {"": "StyledElement;"};
-
-$$.LinearGradientElement = {"": "_GradientElement;"};
-
-$$.MarkerElement = {"": "StyledElement;"};
-
-$$.MaskElement = {"": "StyledElement;height=,width="};
-
-$$.MetadataElement = {"": "SvgElement;"};
-
-$$.PathElement = {"": "StyledElement;"};
-
-$$.PatternElement = {"": "StyledElement;height=,width="};
-
-$$.PolygonElement = {"": "StyledElement;"};
-
-$$.PolylineElement = {"": "StyledElement;"};
-
-$$.RadialGradientElement = {"": "_GradientElement;"};
-
-$$.RectElement = {"": "StyledElement;height=,width="};
-
-$$.ScriptElement0 = {"": "SvgElement;"};
-
-$$.SetElement = {"": "AnimationElement;"};
-
-$$.StopElement = {"": "StyledElement;"};
-
-$$.StyleElement0 = {"": "SvgElement;"};
-
-$$.StyledElement = {"": "SvgElement;"};
-
-$$.SvgDocument = {"": "Document;"};
-
-$$.SvgElement = {"": "Element;",
-  get$classes: function(receiver) {
-    if (receiver._cssClassSet == null)
-      receiver._cssClassSet = $._AttributeClassSet$(receiver);
-    return receiver._cssClassSet;
-  },
-  get$children: function(receiver) {
-    return $.FilteredElementList$(receiver);
-  },
-  get$$$dom_children: function(receiver) {
-    throw $.wrapException($.UnsupportedError$("Cannot get dom_children on SVG."));
-  },
-  get$id: function(receiver) {
-    return receiver.id;
-  },
-  set$id: function(receiver, value) {
-    receiver.id = value;
-  }
-};
-
-$$.SvgException = {"": "Interceptor;name=",
-  toString$0: function(receiver) {
-    return receiver.toString();
-  }
-};
-
-$$.SvgSvgElement = {"": "StyledElement;height=,width="};
-
-$$.SwitchElement = {"": "StyledElement;"};
-
-$$.SymbolElement = {"": "StyledElement;"};
-
-$$.TSpanElement = {"": "TextPositioningElement;"};
-
-$$.TextContentElement = {"": "StyledElement;"};
-
-$$.TextElement = {"": "TextPositioningElement;"};
-
-$$.TextPathElement = {"": "TextContentElement;"};
-
-$$.TextPositioningElement = {"": "TextContentElement;"};
-
-$$.TitleElement0 = {"": "StyledElement;"};
-
-$$.UseElement = {"": "StyledElement;height=,width="};
-
-$$.ViewElement = {"": "SvgElement;"};
-
-$$.ZoomEvent = {"": "UIEvent;"};
-
-$$._GradientElement = {"": "StyledElement;"};
-
-$$._SVGComponentTransferFunctionElement = {"": "SvgElement;"};
-
-$$.AudioProcessingEvent = {"": "Event;"};
-
-$$.OfflineAudioCompletionEvent = {"": "Event;"};
-
-$$.ContextEvent = {"": "Event;"};
-
-$$.SqlError = {"": "Interceptor;"};
-
-$$.SqlException = {"": "Interceptor;"};
-
-$$.Closure = {"": "Object;",
-  toString$0: function(_) {
-    return "Closure";
-  }
-};
-
-// Bound closures
-$$.BoundClosure$1 = {"": "Closure;self,target",
-  call$1: function(p0) {
-    return this.self[this.target](p0);
-  }
-};
-
-$$.BoundClosure$0 = {"": "Closure;self,target",
-  call$0: function() {
-    return this.self[this.target]();
-  }
-};
-
-$$.BoundClosure$i0 = {"": "Closure;self,target,receiver",
-  call$0: function() {
-    return this.self[this.target](this.receiver);
-  }
-};
-
-Isolate.$finishClasses($$, $, null);
-$$ = null;
-
-$.Arrays_copy = function(src, srcStart, dst, dstStart, count) {
-  var i, j, t1, t2, t3;
-  if (typeof src !== "string" && (typeof src !== "object" || src === null || src.constructor !== Array && !$.getInterceptor(src).$isJavaScriptIndexingBehavior()))
-    return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count);
-  if (typeof dst !== "object" || dst === null || (dst.constructor !== Array || !!dst.immutable$list) && !$.getInterceptor(dst).$isJavaScriptIndexingBehavior())
-    return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count);
-  if (typeof dstStart !== "number")
-    return $.Arrays_copy$bailout(1, src, srcStart, dst, dstStart, count);
-  if (srcStart < dstStart)
-    for (i = srcStart + count - 1, j = dstStart + count - 1, t1 = src.length, t2 = dst.length; i >= srcStart; --i, --j) {
-      if (i !== (i | 0))
-        throw $.iae(i);
-      if (i < 0 || i >= t1)
-        throw $.ioore(i);
-      t3 = src[i];
-      if (j !== (j | 0))
-        throw $.iae(j);
-      if (j < 0 || j >= t2)
-        throw $.ioore(j);
-      dst[j] = t3;
-    }
-  else
-    for (t1 = src.length, t2 = dst.length, j = dstStart, i = srcStart; i < srcStart + count; ++i, ++j) {
-      if (i !== (i | 0))
-        throw $.iae(i);
-      if (i < 0 || i >= t1)
-        throw $.ioore(i);
-      t3 = src[i];
-      if (j !== (j | 0))
-        throw $.iae(j);
-      if (j < 0 || j >= t2)
-        throw $.ioore(j);
-      dst[j] = t3;
-    }
-};
-
-$.Arrays_copy$bailout = function(state0, src, srcStart, dst, dstStart, count) {
-  var i, j, t1;
-  if ($.JSNumber_methods.$lt(srcStart, dstStart))
-    for (i = srcStart + count - 1, j = $.$sub$n($.$add$ns(dstStart, count), 1), t1 = $.getInterceptor$asx(src); i >= srcStart; --i, j = $.$sub$n(j, 1))
-      $.JSArray_methods.$indexSet(dst, j, t1.$index(src, i));
-  else
-    for (t1 = $.getInterceptor$asx(src), j = dstStart, i = srcStart; i < srcStart + count; ++i, j = $.$add$ns(j, 1))
-      $.JSArray_methods.$indexSet(dst, j, t1.$index(src, i));
-};
-
-$.SubListIterable$ = function(_iterable, _start, _endOrLength) {
-  return new $.SubListIterable(_iterable, _start, _endOrLength);
-};
-
-$.ListIterator$ = function(iterable) {
-  return new $.ListIterator(iterable, $.get$length$asx(iterable), 0, null);
-};
-
-$.MappedIterable$ = function(_iterable, _f) {
-  return new $.MappedIterable(_iterable, _f);
-};
-
-$.MappedIterator$ = function(_iterator, _f) {
-  return new $.MappedIterator(null, _iterator, _f);
-};
-
-$.WhereIterable$ = function(_iterable, _f) {
-  return new $.WhereIterable(_iterable, _f);
-};
-
-$.WhereIterator$ = function(_iterator, _f) {
-  return new $.WhereIterator(_iterator, _f);
-};
-
-$.SkipIterable$ = function(_iterable, _skipCount) {
-  var t1 = new $.SkipIterable(_iterable, _skipCount);
-  t1.SkipIterable$2(_iterable, _skipCount);
-  return t1;
-};
-
-$.SkipIterator$ = function(_iterator, _skipCount) {
-  var t1 = new $.SkipIterator(_iterator, _skipCount);
-  t1.SkipIterator$2(_iterator, _skipCount);
-  return t1;
-};
-
-$.IterableMixinWorkaround__rangeCheck = function(list, start, end) {
-  var t1 = $.getInterceptor$n(start);
-  if (t1.$lt(start, 0) || t1.$gt(start, list.length))
-    throw $.wrapException($.RangeError$range(start, 0, list.length));
-  t1 = $.getInterceptor$n(end);
-  if (t1.$lt(end, start) || t1.$gt(end, list.length))
-    throw $.wrapException($.RangeError$range(end, start, list.length));
-};
-
-$.IterableMixinWorkaround_setRangeList = function(list, start, end, from, skipCount) {
-  var $length, otherStart, otherList;
-  $.IterableMixinWorkaround__rangeCheck(list, start, end);
-  $length = $.$sub$n(end, start);
-  if ($.$eq($length, 0))
-    return;
-  if (skipCount < 0)
-    throw $.wrapException($.ArgumentError$(skipCount));
-  if (typeof from === "object" && from !== null && (from.constructor === Array || $.getInterceptor(from).$isList())) {
-    otherStart = skipCount;
-    otherList = from;
-  } else {
-    otherList = $.toList$1$growable$ax($.skip$1$ax(from, skipCount), false);
-    otherStart = 0;
-  }
-  if (typeof $length !== "number")
-    throw $.iae($length);
-  if ($.JSNumber_methods.$gt(otherStart + $length, $.get$length$asx(otherList)))
-    throw $.wrapException($.StateError$("Not enough elements"));
-  $.Arrays_copy(otherList, otherStart, list, start, $length);
-};
-
-$.ToString__emitValue = function(i, result, visiting) {
-  var t1, isList, t2, first, t3;
-  t1 = $.getInterceptor$ax(visiting);
-  t1.add$1(visiting, i);
-  isList = typeof i === "object" && i !== null && (i.constructor === Array || $.getInterceptor(i).$isList());
-  result.write$1(isList ? "[" : "{");
-  for (t2 = $.get$iterator$ax(i), first = true; t2.moveNext$0() === true; first = false) {
-    t3 = t2.get$current();
-    if (!first)
-      result.write$1(", ");
-    $.ToString__emitObject(t3, result, visiting);
-  }
-  result.write$1(isList ? "]" : "}");
-  t1.removeLast$0(visiting);
-};
-
-$.ToString__emitObject = function(o, result, visiting) {
-  if (typeof o === "object" && o !== null && (o.constructor === Array || $.getInterceptor(o).$isIterable()))
-    if ($.ToString__containsRef(visiting, o))
-      result.write$1(typeof o === "object" && o !== null && (o.constructor === Array || $.getInterceptor(o).$isList()) ? "[...]" : "{...}");
-    else
-      $.ToString__emitValue(o, result, visiting);
-  else if (typeof o === "object" && o !== null && !!$.getInterceptor(o).$isMap)
-    if ($.ToString__containsRef(visiting, o))
-      result.write$1("{...}");
-    else
-      $.ToString__emitPair(o, result, visiting);
-  else
-    result.write$1(o);
-};
-
-$.ToString__containsRef = function(i, ref) {
-  var t1;
-  for (t1 = $.get$iterator$ax(i); t1.moveNext$0() === true;)
-    if (t1.get$current() === ref)
-      return true;
-  return false;
-};
-
-$.ToString__emitPair = function(m, result, visiting) {
-  var t1, t2;
-  t1 = {};
-  t2 = $.getInterceptor$ax(visiting);
-  t2.add$1(visiting, m);
-  result.write$1("{");
-  t1.first_0 = true;
-  m.forEach$1(m, new $.ToString__emitPair_anon(t1, result, visiting));
-  result.write$1("}");
-  t2.removeLast$0(visiting);
-};
-
-$.HashMap__findBucketIndex = function(bucket, key) {
-  var $length, i;
-  if (bucket == null)
-    return -1;
-  $length = bucket.length;
-  for (i = 0; i < $length; i += 2)
-    if ($.$eq(bucket[i], key) === true)
-      return i;
-  return -1;
-};
-
-$.HashMapKeyIterable$ = function(_map) {
-  return new $.HashMapKeyIterable(_map);
-};
-
-$.HashMapKeyIterator$ = function(_map, _keys) {
-  return new $.HashMapKeyIterator(_map, _keys, 0, null);
-};
-
-$.LinkedHashMap__findBucketIndex = function(bucket, key) {
-  var $length, i;
-  if (bucket == null)
-    return -1;
-  $length = bucket.length;
-  for (i = 0; i < $length; ++i)
-    if ($.$eq(bucket[i].get$_key(), key) === true)
-      return i;
-  return -1;
-};
-
-$.LinkedHashMapCell$ = function(_key, _value) {
-  return new $.LinkedHashMapCell(_key, _value, null, null);
-};
-
-$.LinkedHashMapKeyIterable$ = function(_map) {
-  return new $.LinkedHashMapKeyIterable(_map);
-};
-
-$.LinkedHashMapKeyIterator$ = function(_map, _modifications) {
-  var t1 = new $.LinkedHashMapKeyIterator(_map, _modifications, null, null);
-  t1.LinkedHashMapKeyIterator$2(_map, _modifications);
-  return t1;
-};
-
-$.LinkedHashSet__findBucketIndex = function(bucket, element) {
-  var $length, i;
-  if (bucket == null)
-    return -1;
-  $length = bucket.length;
-  for (i = 0; i < $length; ++i)
-    if ($.$eq(bucket[i].get$_element(), element) === true)
-      return i;
-  return -1;
-};
-
-$.LinkedHashSetCell$ = function(_element) {
-  return new $.LinkedHashSetCell(_element, null, null);
-};
-
-$.LinkedHashSetIterator$ = function(_set, _modifications) {
-  var t1 = new $.LinkedHashSetIterator(_set, _modifications, null, null);
-  t1.LinkedHashSetIterator$2(_set, _modifications);
-  return t1;
-};
-
-$.Function__toMangledNames = function(namedArguments) {
-  var result;
-  if (namedArguments == null)
-    return;
-  result = $.makeLiteralMap([]);
-  $.JSNull_methods.forEach$1(namedArguments, new $.Function__toMangledNames_anon(result));
-  return result;
-};
-
-$.getDispatchProperty = function(object) {
-  return object[$.dispatchPropertyName];
-};
-
-$.setDispatchProperty = function(object, value) {
-  object[$.dispatchPropertyName] = value;
-};
-
-$.getNativeInterceptor = function(object) {
-  var record, proto, objectProto;
-  record = $.getDispatchProperty(object);
-  if (record != null) {
-    proto = record.p;
-    if (false === proto)
-      return record.i;
-    if (true === proto)
-      return object;
-    objectProto = Object.getPrototypeOf(object);
-    if (proto === objectProto)
-      return record.i;
-    if (record.e === objectProto)
-      return proto(object, record);
-  }
-  record = $.lookupDispatchRecord(object);
-  $.setDispatchProperty(Object.getPrototypeOf(object), record);
-  return $.getNativeInterceptor(object);
-};
-
-$.JsIsolateSink$fromPort = function(_port) {
-  return new $.JsIsolateSink(false, _port);
-};
-
-$._callInIsolate = function(isolate, $function) {
-  var result = isolate.eval$1($function);
-  $globalState.topEventLoop.run$0();
-  return result;
-};
-
-$._currentIsolate = function() {
-  return $globalState.currentContext;
-};
-
-$.startRootIsolate = function(entry) {
-  var t1, rootContext;
-  t1 = $._Manager$();
-  $._globalState0(t1);
-  if ($globalState.isWorker === true)
-    return;
-  rootContext = $._IsolateContext$();
-  $globalState.rootContext = rootContext;
-  $globalState.currentContext = rootContext;
-  rootContext.eval$1(entry);
-  $globalState.topEventLoop.run$0();
-};
-
-$._globalState = function() {
-  return $globalState;
-};
-
-$._globalState0 = function(val) {
-  $globalState = val;
-};
-
-$._Manager$ = function() {
-  var t1 = new $._Manager(0, 0, 1, null, null, null, null, null, null, null, null, null);
-  t1._Manager$0();
-  return t1;
-};
-
-$._IsolateContext$ = function() {
-  var t1 = new $._IsolateContext(null, null, null);
-  t1._IsolateContext$0();
-  return t1;
-};
-
-$._EventLoop$ = function() {
-  return new $._EventLoop($.Queue_Queue(), 0);
-};
-
-$._IsolateEvent$ = function(isolate, fn, message) {
-  return new $._IsolateEvent(isolate, fn, message);
-};
-
-$._MainManagerStub$ = function() {
-  return new $._MainManagerStub();
-};
-
-$.IsolateNatives_computeThisScript = function() {
-  var currentScript, stack, matches;
-  currentScript = $.$currentScript;
-  if (currentScript != null)
-    return String(currentScript.src);
-  stack = new Error().stack;
-  if (stack == null)
-    stack = (function() {try { throw new Error() } catch(e) { return e.stack }})();
-  matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"));
-  if (matches != null)
-    return matches[1];
-  matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m"));
-  if (matches != null)
-    return matches[1];
-  throw $.wrapException($.UnsupportedError$("Cannot extract URI from \"" + $.S(stack) + "\""));
-};
-
-$.IsolateNatives_computeGlobalThis = function() {
-  return function() { return this; }();
-};
-
-$.IsolateNatives__processWorkerMessage = function(sender, e) {
-  var msg, t1, entryPoint, replyTo, context, t2;
-  msg = $._deserializeMessage(e.data);
-  t1 = $.getInterceptor$asx(msg);
-  switch (t1.$index(msg, "command")) {
-    case "start":
-      $globalState.currentManagerId = t1.$index(msg, "id");
-      entryPoint = $[t1.$index(msg, "functionName")];
-      replyTo = $._deserializeMessage(t1.$index(msg, "replyTo"));
-      context = $._IsolateContext$();
-      $globalState.topEventLoop.enqueue$3(context, new $.IsolateNatives__processWorkerMessage_anon(entryPoint, replyTo), "worker-start");
-      $globalState.currentContext = context;
-      $globalState.topEventLoop.run$0();
-      break;
-    case "spawn-worker":
-      $.IsolateNatives__spawnWorker(t1.$index(msg, "functionName"), t1.$index(msg, "uri"), t1.$index(msg, "replyPort"));
-      break;
-    case "message":
-      if (t1.$index(msg, "port") != null)
-        $.send$2$x(t1.$index(msg, "port"), t1.$index(msg, "msg"), t1.$index(msg, "replyTo"));
-      $globalState.topEventLoop.run$0();
-      break;
-    case "close":
-      $.IsolateNatives__log("Closing Worker");
-      t1 = $globalState.managers;
-      t2 = $.getInterceptor$x(sender);
-      t1.remove$1(t1, t2.get$id(sender));
-      t2.terminate$0(sender);
-      $globalState.topEventLoop.run$0();
-      break;
-    case "log":
-      $.IsolateNatives__log(t1.$index(msg, "msg"));
-      break;
-    case "print":
-      if ($globalState.isWorker === true) {
-        t1 = $globalState.mainManager;
-        t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "print", "msg", msg])));
-      } else
-        $.Primitives_printString($.toString$0(t1.$index(msg, "msg")));
-      break;
-    case "error":
-      throw $.wrapException(t1.$index(msg, "msg"));
-  }
-};
-
-$.IsolateNatives__log = function(msg) {
-  var trace, t1, exception;
-  if ($globalState.isWorker === true) {
-    t1 = $globalState.mainManager;
-    t1.postMessage$1(t1, $._serializeMessage($.makeLiteralMap(["command", "log", "msg", msg])));
-  } else
-    try {
-      $.get$globalThis().console.log(msg);
-    } catch (exception) {
-      $.unwrapException(exception);
-      trace = $.getTraceFromException(exception);
-      throw $.wrapException($._ExceptionImplementation$(trace));
-    }
-
-};
-
-$.IsolateNatives__spawnWorker = function(functionName, uri, replyPort) {
-  var worker, t1, t2, workerId;
-  if (functionName == null)
-    functionName = "main";
-  if (uri == null)
-    uri = $.get$IsolateNatives_thisScript();
-  worker = new Worker(uri);
-  t1 = $.getInterceptor$x(worker);
-  t1.set$onmessage(worker, function(e) { $.IsolateNatives__processWorkerMessage.call$2(worker, e); });
-  t2 = $globalState;
-  workerId = t2.nextManagerId;
-  t2.nextManagerId = workerId + 1;
-  t1.set$id(worker, workerId);
-  t2 = $globalState.managers;
-  t2.$indexSet(t2, workerId, worker);
-  t1.postMessage$1(worker, $._serializeMessage($.makeLiteralMap(["command", "start", "id", workerId, "replyTo", $._serializeMessage(replyPort), "functionName", functionName])));
-};
-
-$._NativeJsSendPort$ = function(_receivePort, isolateId) {
-  return new $._NativeJsSendPort(_receivePort, isolateId);
-};
-
-$._WorkerSendPort$ = function(_workerId, isolateId, _receivePortId) {
-  return new $._WorkerSendPort(_workerId, _receivePortId, isolateId);
-};
-
-$.ReceivePortImpl$ = function() {
-  var t1 = $.ReceivePortImpl__nextFreeId;
-  $.ReceivePortImpl__nextFreeId = $.$add$ns(t1, 1);
-  t1 = new $.ReceivePortImpl(t1, null);
-  t1.ReceivePortImpl$0();
-  return t1;
-};
-
-$._waitForPendingPorts = function(message, callback) {
-  var finder = $._PendingSendPortFinder$();
-  finder.traverse$1(message);
-  $._FutureImpl__FutureImpl$wait(finder.ports).then$1(new $._waitForPendingPorts_anon(callback));
-};
-
-$._PendingSendPortFinder$ = function() {
-  var t1 = new $._PendingSendPortFinder([], $._MessageTraverserVisitedMap$());
-  t1._PendingSendPortFinder$0();
-  return t1;
-};
-
-$._serializeMessage = function(message) {
-  if ($globalState.get$needSerialization() === true)
-    return $._JsSerializer$().traverse$1(message);
-  else
-    return $._JsCopier$().traverse$1(message);
-};
-
-$._deserializeMessage = function(message) {
-  if ($globalState.get$needSerialization() === true)
-    return $._JsDeserializer$().deserialize$1(message);
-  else
-    return message;
-};
-
-$._JsSerializer$ = function() {
-  var t1 = new $._JsSerializer(0, $._MessageTraverserVisitedMap$());
-  t1._JsSerializer$0();
-  return t1;
-};
-
-$._JsCopier$ = function() {
-  var t1 = new $._JsCopier($._MessageTraverserVisitedMap$());
-  t1._JsCopier$0();
-  return t1;
-};
-
-$._JsDeserializer$ = function() {
-  return new $._JsDeserializer(null);
-};
-
-$._JsVisitedMap$ = function() {
-  return new $._JsVisitedMap(null);
-};
-
-$._MessageTraverserVisitedMap$ = function() {
-  return new $._MessageTraverserVisitedMap();
-};
-
-$.TimerImpl$ = function(milliseconds, callback) {
-  var t1 = new $.TimerImpl(true, false, null);
-  t1.TimerImpl$2(milliseconds, callback);
-  return t1;
-};
-
-$.TimerImpl$periodic = function(milliseconds, callback) {
-  var t1 = new $.TimerImpl(false, false, null);
-  t1.TimerImpl$periodic$2(milliseconds, callback);
-  return t1;
-};
-
-$.hasTimer = function() {
-  return $.get$globalThis().setTimeout != null;
-};
-
-$.checkGrowable = function(list, reason) {
-  if (!!list.fixed$length)
-    throw $.wrapException($.UnsupportedError$(reason));
-};
-
-$.S = function(value) {
-  var res;
-  if (typeof value === "string")
-    return value;
-  if (typeof value === "number") {
-    if (value !== 0)
-      return "" + value;
-  } else if (true === value)
-    return "true";
-  else if (false === value)
-    return "false";
-  else if (value == null)
-    return "null";
-  res = $.toString$0(value);
-  if (typeof res !== "string")
-    throw $.wrapException($.ArgumentError$(value));
-  return res;
-};
-
-$.Primitives_objectHashCode = function(object) {
-  var hash = object.$identityHash;
-  if (hash == null) {
-    hash = $.$add$ns($.Primitives_hashCodeSeed, 1);
-    $.Primitives_hashCodeSeed = hash;
-    object.$identityHash = hash;
-  }
-  return hash;
-};
-
-$.Primitives_printString = function(string) {
-  if (typeof dartPrint == "function") {
-    dartPrint(string);
-    return;
-  }
-  if (typeof window == "object") {
-    if (typeof console == "object")
-      console.log(string);
-    return;
-  }
-  if (typeof print == "function") {
-    print(string);
-    return;
-  }
-  throw "Unable to print message: " + String(string);
-};
-
-$.Primitives_objectTypeName = function(object) {
-  var $name, decompiled, t1;
-  $name = $.constructorNameFallback(object);
-  if ($.$eq($name, "Object") === true) {
-    decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\(/)[1];
-    if (typeof decompiled === "string")
-      $name = decompiled;
-  }
-  t1 = $.getInterceptor$s($name);
-  return t1.codeUnitAt$1($name, 0) === 36 ? t1.substring$1($name, 1) : $name;
-};
-
-$.Primitives_getProperty = function(object, key) {
-  if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string")
-    throw $.wrapException($.ArgumentError$(object));
-  return object[key];
-};
-
-$.Primitives_setProperty = function(object, key, value) {
-  if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string")
-    throw $.wrapException($.ArgumentError$(object));
-  object[key] = value;
-};
-
-$.Primitives_applyFunction = function($function, positionalArguments, namedArguments) {
-  var buffer, $arguments, argumentCount, listOfNamedArguments, selectorName, jsFunction;
-  buffer = $.StringBuffer$("");
-  $arguments = [];
-  argumentCount = 0 + positionalArguments.length;
-  $.JSArray_methods.addAll$1($arguments, positionalArguments);
-  if (namedArguments != null && !namedArguments.get$isEmpty(namedArguments)) {
-    listOfNamedArguments = $.List_List$from(namedArguments.get$keys(), true);
-    argumentCount += namedArguments.get$length(namedArguments);
-    listOfNamedArguments.sort();
-    $.forEach$1$ax(listOfNamedArguments, new $.Primitives_applyFunction_anon(namedArguments, buffer, $arguments));
-  }
-  selectorName = "call$" + $.S(argumentCount) + $.S(buffer);
-  jsFunction = $function[selectorName];
-  if (jsFunction == null)
-    throw $.wrapException($.NoSuchMethodError$($function, selectorName, $arguments, $.makeLiteralMap([]), null));
-  return jsFunction.apply($function, $arguments);
-};
-
-$.iae = function(argument) {
-  throw $.wrapException($.ArgumentError$(argument));
-};
-
-$.ioore = function(index) {
-  throw $.wrapException($.RangeError$value(index));
-};
-
-$.wrapException = function(ex) {
-  var wrapper;
-  if (ex == null)
-    ex = $.C_NullThrownError;
-  wrapper = $.DartError$(ex);
-  if (!!Error.captureStackTrace)
-    Error.captureStackTrace(wrapper, $.wrapException);
-  else
-    wrapper.stack = new Error().stack;
-  return wrapper;
-};
-
-$.throwExpression = function(ex) {
-  throw $.wrapException(ex);
-};
-
-$.DartError$ = function(dartException) {
-  var t1 = new $.DartError();
-  t1.DartError$1(dartException);
-  return t1;
-};
-
-$.DartError_toStringWrapper = function() {
-  return $.toString$0(this);
-};
-
-$.unwrapException = function(ex) {
-  var message, type, $name, t1, ieErrorCode, ieFacilityNumber, t2;
-  if ("dartException" in ex)
-    return ex.dartException;
-  message = ex.message;
-  if (ex instanceof TypeError) {
-    type = ex.type;
-    $name = ex.arguments ? ex.arguments[0] : "";
-    if (message.indexOf("JSNull") === -1) {
-      t1 = $.getInterceptor(type);
-      t1 = t1.$eq(type, "property_not_function") === true || t1.$eq(type, "called_non_callable") === true || t1.$eq(type, "non_object_property_call") === true || t1.$eq(type, "non_object_property_load") === true;
-    } else
-      t1 = true;
-    if (t1)
-      return $.NoSuchMethodError$(null, $name, [], $.makeLiteralMap([]), null);
-    else if ($.$eq(type, "undefined_method") === true)
-      return $.NoSuchMethodError$("", $name, [], $.makeLiteralMap([]), null);
-    ieErrorCode = ex.number & 0xffff;
-    ieFacilityNumber = ex.number >> 16 & 0x1FFF;
-    t1 = typeof message === "string";
-    if (t1)
-      if (message === "null has no properties" || message === "'null' is not an object" || message === "'undefined' is not an object" || $.JSString_methods.endsWith$1(message, "is null") || $.JSString_methods.endsWith$1(message, "is undefined") || $.JSString_methods.endsWith$1(message, "is null or undefined") || $.JSString_methods.endsWith$1(message, "of undefined") || $.JSString_methods.endsWith$1(message, "of null"))
-        return $.NoSuchMethodError$(null, "<unknown>", [], $.makeLiteralMap([]), null);
-      else {
-        if (message.indexOf(" has no method ") === -1)
-          if (message.indexOf(" is not a function") === -1)
-            t2 = ieErrorCode === 438 && ieFacilityNumber === 10;
-          else
-            t2 = true;
-        else
-          t2 = true;
-        if (t2)
-          return $.NoSuchMethodError$("", "<unknown>", [], $.makeLiteralMap([]), null);
-      }
-    t1 = t1 ? message : "";
-    return $._ExceptionImplementation$(t1);
-  }
-  if (ex instanceof RangeError) {
-    if (typeof message === "string" && message.indexOf("call stack") !== -1)
-      return $.StackOverflowError$();
-    return $.ArgumentError$(null);
-  }
-  if (typeof InternalError == "function" && ex instanceof InternalError)
-    if (typeof message === "string" && message === "too much recursion")
-      return $.StackOverflowError$();
-  return ex;
-};
-
-$.getTraceFromException = function(exception) {
-  return $._StackTrace$(exception.stack);
-};
-
-$._StackTrace$ = function(_stack) {
-  return new $._StackTrace(_stack);
-};
-
-$.makeLiteralMap = function(keyValuePairs) {
-  var iterator, result, key;
-  iterator = $.JSArray_methods.get$iterator(keyValuePairs);
-  result = $.LinkedHashMap$();
-  for (; iterator.moveNext$0();) {
-    key = iterator.get$current();
-    iterator.moveNext$0();
-    result.$indexSet(result, key, iterator.get$current());
-  }
-  return result;
-};
-
-$.invokeClosure = function(closure, isolate, numberOfArguments, arg1, arg2) {
-  var t1 = $.getInterceptor(numberOfArguments);
-  if (t1.$eq(numberOfArguments, 0) === true)
-    return $._callInIsolate(isolate, new $.invokeClosure_anon(closure));
-  else if (t1.$eq(numberOfArguments, 1) === true)
-    return $._callInIsolate(isolate, new $.invokeClosure_anon0(closure, arg1));
-  else if (t1.$eq(numberOfArguments, 2) === true)
-    return $._callInIsolate(isolate, new $.invokeClosure_anon1(closure, arg1, arg2));
-  else
-    throw $.wrapException($._ExceptionImplementation$("Unsupported number of arguments for wrapped closure"));
-};
-
-$.convertDartClosureToJS = function(closure, arity) {
-  var $function;
-  if (closure == null)
-    return;
-  $function = closure.$identity;
-  if (!!$function)
-    return $function;
-  $function = (function ($2, $3) { return function($0, $1) { return $3(closure, $2, arity, $0, $1) }})($._currentIsolate(), $.invokeClosure.call$5);
-  closure.$identity = $function;
-  return $function;
-};
-
-$.throwCyclicInit = function(staticName) {
-  throw $.wrapException($.RuntimeError$("Cyclic initialization for static " + $.S(staticName)));
-};
-
-$._convertJsonToDart = function(json, reviver) {
-  var revive = reviver == null ? new $._convertJsonToDart_anon() : reviver;
-  return revive.call$2("", new $._convertJsonToDart_walk(revive).call$1(json));
-};
-
-$.typeNameInChrome = function(obj) {
-  return $.typeNameInWebKitCommon(obj.constructor.name);
-};
-
-$.typeNameInSafari = function(obj) {
-  return $.typeNameInWebKitCommon($.constructorNameFallback(obj));
-};
-
-$.typeNameInWebKitCommon = function(tag) {
-  var $name = tag;
-  if ($name === "Window")
-    return "DOMWindow";
-  if ($name === "CanvasPixelArray")
-    return "Uint8ClampedArray";
-  if ($name === "WebKitMutationObserver")
-    return "MutationObserver";
-  if ($name === "AudioChannelMerger")
-    return "ChannelMergerNode";
-  if ($name === "AudioChannelSplitter")
-    return "ChannelSplitterNode";
-  if ($name === "AudioGainNode")
-    return "GainNode";
-  if ($name === "AudioPannerNode")
-    return "PannerNode";
-  if ($name === "JavaScriptAudioNode")
-    return "ScriptProcessorNode";
-  if ($name === "Oscillator")
-    return "OscillatorNode";
-  if ($name === "RealtimeAnalyserNode")
-    return "AnalyserNode";
-  if ($name === "IDBVersionChangeRequest")
-    return "IDBOpenDBRequest";
-  return $name;
-};
-
-$.typeNameInOpera = function(obj) {
-  var $name = $.constructorNameFallback(obj);
-  if ($name === "Window")
-    return "DOMWindow";
-  if ($name === "ApplicationCache")
-    return "DOMApplicationCache";
-  return $name;
-};
-
-$.typeNameInFirefox = function(obj) {
-  var $name = $.constructorNameFallback(obj);
-  if ($name === "Window")
-    return "DOMWindow";
-  if ($name === "BeforeUnloadEvent")
-    return "Event";
-  if ($name === "CSS2Properties")
-    return "CSSStyleDeclaration";
-  if ($name === "DataTransfer")
-    return "Clipboard";
-  if ($name === "DragEvent")
-    return "MouseEvent";
-  if ($name === "GeoGeolocation")
-    return "Geolocation";
-  if ($name === "MouseScrollEvent")
-    return "WheelEvent";
-  if ($name === "OfflineResourceList")
-    return "DOMApplicationCache";
-  if ($name === "WorkerMessageEvent")
-    return "MessageEvent";
-  if ($name === "XMLDocument")
-    return "Document";
-  return $name;
-};
-
-$.typeNameInIE = function(obj) {
-  var $name = $.constructorNameFallback(obj);
-  if ($name === "Window")
-    return "DOMWindow";
-  if ($name === "Document") {
-    if (!!obj.xmlVersion)
-      return "Document";
-    return "HTMLDocument";
-  }
-  if ($name === "ApplicationCache")
-    return "DOMApplicationCache";
-  if ($name === "BeforeUnloadEvent")
-    return "Event";
-  if ($name === "CanvasPixelArray")
-    return "Uint8ClampedArray";
-  if ($name === "DataTransfer")
-    return "Clipboard";
-  if ($name === "DragEvent")
-    return "MouseEvent";
-  if ($name === "HTMLDDElement")
-    return "HTMLElement";
-  if ($name === "HTMLDTElement")
-    return "HTMLElement";
-  if ($name === "HTMLTableDataCellElement")
-    return "HTMLTableCellElement";
-  if ($name === "HTMLTableHeaderCellElement")
-    return "HTMLTableCellElement";
-  if ($name === "HTMLPhraseElement")
-    return "HTMLElement";
-  if ($name === "MSStyleCSSProperties")
-    return "CSSStyleDeclaration";
-  if ($name === "MouseWheelEvent")
-    return "WheelEvent";
-  if ($name === "Position")
-    return "Geoposition";
-  if ($name === "Object")
-    if (window.DataView && obj instanceof window.DataView)
-      return "DataView";
-  return $name;
-};
-
-$.constructorNameFallback = function(object) {
-  var $constructor, $name, t1, string;
-  if (object == null)
-    return "Null";
-  $constructor = object.constructor;
-  if (typeof $constructor === "function") {
-    $name = $constructor.name;
-    if (typeof $name === "string")
-      t1 = $name !== "" && $name !== "Object" && $name !== "Function.prototype";
-    else
-      t1 = false;
-    if (t1)
-      return $name;
-  }
-  string = Object.prototype.toString.call(object);
-  return string.substring(8, string.length - 1);
-};
-
-$.alternateTag = function(object, tag) {
-  if (!!/^HTML[A-Z].*Element$/.test(tag)) {
-    if (Object.prototype.toString.call(object) === "[object Object]")
-      return;
-    return "HTMLElement";
-  }
-  return;
-};
-
-$.getFunctionForTypeNameOf = function() {
-  if (typeof navigator !== "object")
-    return $.typeNameInChrome;
-  var userAgent = navigator.userAgent;
-  if (userAgent.indexOf("Chrome") !== -1 || userAgent.indexOf("DumpRenderTree") !== -1)
-    return $.typeNameInChrome;
-  else if (userAgent.indexOf("Firefox") !== -1)
-    return $.typeNameInFirefox;
-  else if (userAgent.indexOf("MSIE") !== -1)
-    return $.typeNameInIE;
-  else if (userAgent.indexOf("Opera") !== -1)
-    return $.typeNameInOpera;
-  else if (userAgent.indexOf("AppleWebKit") !== -1)
-    return $.typeNameInSafari;
-  else
-    return $.constructorNameFallback;
-};
-
-$.toStringForNativeObject = function(obj) {
-  if ($._getTypeNameOf == null)
-    $._getTypeNameOf = $.getFunctionForTypeNameOf();
-  return "Instance of " + $._getTypeNameOf.call$1(obj);
-};
-
-$.hashCodeForNativeObject = function(object) {
-  return $.Primitives_objectHashCode(object);
-};
-
-$.defineProperty = function(obj, property, value) {
-  Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true});
-};
-
-$.defineNativeMethods = function(tags, interceptorClass) {
-  $.defineNativeMethodsCommon(tags, interceptorClass, true);
-};
-
-$.defineNativeMethodsNonleaf = function(tags, interceptorClass) {
-  $.defineNativeMethodsCommon(tags, interceptorClass, false);
-};
-
-$.defineNativeMethodsCommon = function(tags, interceptorClass, isLeaf) {
-  var methods, tagsList, i, tag;
-  methods = interceptorClass.prototype;
-  if ($.interceptorsByTag == null)
-    $.interceptorsByTag = {};
-  if ($.leafTags == null)
-    $.leafTags = {};
-  tagsList = tags.split("|");
-  for (i = 0; i < tagsList.length; ++i) {
-    tag = tagsList[i];
-    $.interceptorsByTag[tag] = methods;
-    $.leafTags[tag] = isLeaf;
-  }
-};
-
-$.defineNativeMethodsFinish = function() {
-};
-
-$.lookupDispatchRecord = function(obj) {
-  var hasOwnPropertyFunction, tag, map, interceptor, secondTag;
-  hasOwnPropertyFunction = Object.prototype.hasOwnProperty;
-  if ($._getTypeNameOf == null)
-    $._getTypeNameOf = $.getFunctionForTypeNameOf();
-  tag = $._getTypeNameOf.call$1(obj);
-  map = $.interceptorsByTag;
-  interceptor = hasOwnPropertyFunction.call(map, tag) ? map[tag] : null;
-  if (interceptor == null) {
-    secondTag = $.alternateTag(obj, tag);
-    if (secondTag != null) {
-      map = $.interceptorsByTag;
-      interceptor = hasOwnPropertyFunction.call(map, secondTag) ? map[secondTag] : null;
-    }
-  }
-  if (interceptor == null)
-    interceptor = {__what: "interceptor not found", __tag: tag};
-  if (true === $.leafTags[tag])
-    return {i: interceptor, p: false, e: null};
-  else
-    return {i: interceptor, p: Object.getPrototypeOf(obj), e: null};
-};
-
-$.StringMatch$ = function(start, str, pattern) {
-  return new $.StringMatch(start, str, pattern);
-};
-
-$.allMatchesInStringUnchecked = function(needle, haystack) {
-  var result, $length, patternLength, startIndex, position, endIndex;
-  result = $.List_List($);
-  $length = haystack.length;
-  patternLength = needle.length;
-  for (startIndex = 0; true;) {
-    position = $.JSString_methods.indexOf$2(haystack, needle, startIndex);
-    if (position === -1)
-      break;
-    result.push($.StringMatch$(position, haystack, needle));
-    endIndex = position + patternLength;
-    if (endIndex === $length)
-      break;
-    else
-      startIndex = position === endIndex ? startIndex + 1 : endIndex;
-  }
-  return result;
-};
-
-$.stringContainsUnchecked = function(receiver, other, startIndex) {
-  if (typeof other === "string")
-    return $.JSString_methods.indexOf$2(receiver, other, startIndex) !== -1;
-  else if (typeof other === "object" && other !== null && !!$.getInterceptor(other).$isJSSyntaxRegExp)
-    return other.hasMatch$1($.JSString_methods.substring$1(receiver, startIndex));
-  else
-    return $.get$iterator$ax($.allMatches$1$s(other, $.JSString_methods.substring$1(receiver, startIndex))).moveNext$0();
-};
-
-$.stringReplaceAllUnchecked = function(receiver, from, to) {
-  var result, $length, i;
-  if (from === "")
-    if (receiver === "")
-      return to;
-    else {
-      result = $.StringBuffer$("");
-      $length = receiver.length;
-      result.write$1(to);
-      for (i = 0; i < $length; ++i) {
-        result.write$1(receiver[i]);
-        result.write$1(to);
-      }
-      return result.toString$0(result);
-    }
-  else
-    return receiver.replace(new RegExp(from.replace(new RegExp("[-[\\]{}()*+?.,\\\\^$|#\\s]", 'g'), "\\$&"), 'g'), to.replace("$", "$$$$"));
-};
-
-$._attachStackTrace = function(o, st) {
-  if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o === "string")
-    return;
-  $.$indexSet$ax($.get$_stackTraceExpando(), o, st);
-};
-
-$.getAttachedStackTrace = function(o) {
-  if (o == null || typeof o === "boolean" || typeof o === "number" || typeof o === "string")
-    return;
-  return $.$index$asx($.get$_stackTraceExpando(), o);
-};
-
-$._asyncRunCallback = function() {
-  var callbacks, i, callback, remainingCallbacks, newCallbacks, exception;
-  for (; $.get$isEmpty$asx($.get$_asyncCallbacks()) !== true;) {
-    callbacks = $.get$_asyncCallbacks();
-    $._asyncCallbacks = [];
-    for (i = 0; $.$lt$n(i, $.get$length$asx(callbacks)); i = $.$add$ns(i, 1)) {
-      callback = $.$index$asx(callbacks, i);
-      $.$indexSet$ax(callbacks, i, null);
-      try {
-        callback.call$0();
-      } catch (exception) {
-        $.unwrapException(exception);
-        i = $.$add$ns(i, 1);
-        remainingCallbacks = $.sublist$1$ax(callbacks, i);
-        newCallbacks = $.get$_asyncCallbacks();
-        $._asyncCallbacks = [];
-        $.addAll$1$ax($.get$_asyncCallbacks(), remainingCallbacks);
-        $.addAll$1$ax($.get$_asyncCallbacks(), newCallbacks);
-        $.Timer_run($._asyncRunCallback);
-        throw exception;
-      }
-
-    }
-  }
-  $._callbacksAreEnqueued = false;
-};
-
-$._CompleterImpl$ = function() {
-  return new $._CompleterImpl($._FutureImpl$(), false);
-};
-
-$._FutureListenerWrapper$ = function(future) {
-  return new $._FutureListenerWrapper(future, null);
-};
-
-$._FutureImpl$ = function() {
-  return new $._FutureImpl(0, null);
-};
-
-$._FutureImpl$immediate = function(value) {
-  var t1 = new $._FutureImpl(0, null);
-  t1._FutureImpl$immediate$1(value);
-  return t1;
-};
-
-$._FutureImpl__FutureImpl$wait = function(futures) {
-  var t1, t2, t3, t4, pos;
-  t1 = {};
-  t1.completer_0 = null;
-  t1.values_1 = null;
-  t2 = new $._FutureImpl__FutureImpl$wait_handleError(t1);
-  t1.remaining_2 = 0;
-  for (t3 = $.JSArray_methods.get$iterator(futures); t3.moveNext$0();) {
-    t4 = t3.get$current();
-    pos = t1.remaining_2;
-    t1.remaining_2 = $.$add$ns(pos, 1);
-    t4.catchError$1(t2).then$1(new $._FutureImpl__FutureImpl$wait_anon(t1, pos));
-  }
-  if ($.$eq(t1.remaining_2, 0))
-    return $._FutureImpl$immediate($.List_empty);
-  t1.values_1 = $.List_List(t1.remaining_2);
-  t1.completer_0 = $._CompleterImpl$();
-  return t1.completer_0.future;
-};
-
-$._ThenFuture$ = function(_onValue) {
-  return new $._ThenFuture(_onValue, null, 0, null);
-};
-
-$._CatchErrorFuture$ = function(_onError, _test) {
-  return new $._CatchErrorFuture(_test, _onError, null, 0, null);
-};
-
-$._SubscribeFuture$ = function(onValue, _onError) {
-  return new $._SubscribeFuture(_onError, onValue, null, 0, null);
-};
-
-$._FutureWrapper$ = function(_future) {
-  return new $._FutureWrapper(_future);
-};
-
-$._throwDelayed = function(error, stackTrace) {
-  var t1 = new $._throwDelayed_anon(error, stackTrace);
-  $.add$1$ax($.get$_asyncCallbacks(), t1);
-  if ($._callbacksAreEnqueued !== true) {
-    $.Timer_run($._asyncRunCallback);
-    $._callbacksAreEnqueued = true;
-  }
-};
-
-$._nullDataHandler = function(value) {
-};
-
-$._nullErrorHandler = function(error) {
-  $._throwDelayed(error, null);
-};
-
-$._nullDoneHandler = function() {
-};
-
-$._asyncError = function(error, stackTrace) {
-  if (stackTrace == null)
-    return error;
-  if ($.getAttachedStackTrace(error) != null)
-    return error;
-  $._attachStackTrace(error, stackTrace);
-  return error;
-};
-
-$._ForwardingStreamSubscription$ = function(_stream, onData, onError, onDone, _cancelOnError) {
-  var t1 = new $._ForwardingStreamSubscription(_stream, _cancelOnError, null, onData, onError, onDone);
-  t1._BaseStreamSubscription$3(onData, onError, onDone);
-  t1._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, _cancelOnError);
-  return t1;
-};
-
-$._SkipStream$ = function(source, count) {
-  var t1 = new $._SkipStream(count, source);
-  t1._SkipStream$2(source, count);
-  return t1;
-};
-
-$.Timer_run = function(callback) {
-  var t1, milliseconds;
-  $.add$1$ax($.get$Timer__runCallbacks(), callback);
-  if ($.$eq($.get$length$asx($.get$Timer__runCallbacks()), 1) === true) {
-    t1 = new $.Timer_run_anon();
-    milliseconds = $.Duration_0.get$inMilliseconds();
-    if (milliseconds < 0)
-      milliseconds = 0;
-    $.TimerImpl$(milliseconds, t1);
-  }
-};
-
-$.HashMap$ = function() {
-  return new $.HashMap(0, null, null, null, null);
-};
-
-$.LinkedHashMap$ = function() {
-  return new $.LinkedHashMap(0, null, null, null, null, null, 0);
-};
-
-$.LinkedHashSet$ = function() {
-  return new $.LinkedHashSet(0, null, null, null, null, null, 0);
-};
-
-$.Queue_Queue = function() {
-  return $.ListQueue$(null);
-};
-
-$.ListQueue$ = function(initialCapacity) {
-  var t1 = new $.ListQueue(null, 0, 0, 0);
-  t1.ListQueue$1(initialCapacity);
-  return t1;
-};
-
-$.ListQueue__isPowerOf2 = function(number) {
-  return $.JSNull_methods.$and(number, $.JSNull_methods.$sub(number, 1)) === 0;
-};
-
-$.ListQueue__nextPowerOf2 = function(number) {
-  var nextNumber;
-  number = $.$shl$n(number, 2) - 1;
-  for (; true; number = nextNumber) {
-    nextNumber = (number & number - 1) >>> 0;
-    if (nextNumber === 0)
-      return number;
-  }
-};
-
-$._ListQueueIterator$ = function(queue) {
-  return new $._ListQueueIterator(queue, queue._tail, queue._modificationCount, queue._head, null);
-};
-
-$.Duration$ = function(days, hours, microseconds, milliseconds, minutes, seconds) {
-  if (typeof microseconds !== "number")
-    throw $.iae(microseconds);
-  return new $.Duration(days * 86400000000 + hours * 3600000000 + minutes * 60000000 + seconds * 1000000 + milliseconds * 1000 + microseconds);
-};
-
-$.Error_safeToString = function(object) {
-  if (typeof object === "number" && Math.floor(object) === object || typeof object === "number" || typeof object === "boolean" || null == object)
-    return $.toString$0(object);
-  if (typeof object === "string")
-    return "\"" + $.JSString_methods.replaceAll$2($.JSString_methods.replaceAll$2($.JSString_methods.replaceAll$2($.JSString_methods.replaceAll$2(object, "\\", "\\\\"), "\n", "\\n"), "\r", "\\r"), "\"", "\\\"") + "\"";
-  return "Instance of '" + $.S($.Primitives_objectTypeName(object)) + "'";
-};
-
-$.ArgumentError$ = function(message) {
-  return new $.ArgumentError(message);
-};
-
-$.RangeError$value = function(value) {
-  return new $.RangeError("value " + $.S(value));
-};
-
-$.RangeError$range = function(value, start, end) {
-  return new $.RangeError("value " + $.S(value) + " not in range " + $.S(start) + ".." + $.S(end));
-};
-
-$.NoSuchMethodError$ = function(_receiver, _memberName, _arguments, _namedArguments, existingArgumentNames) {
-  return new $.NoSuchMethodError(_receiver, _memberName, _arguments, _namedArguments, existingArgumentNames);
-};
-
-$.UnsupportedError$ = function(message) {
-  return new $.UnsupportedError(message);
-};
-
-$.UnimplementedError$ = function(message) {
-  return new $.UnimplementedError(message);
-};
-
-$.StateError$ = function(message) {
-  return new $.StateError(message);
-};
-
-$.ConcurrentModificationError$ = function(modifiedObject) {
-  return new $.ConcurrentModificationError(modifiedObject);
-};
-
-$.StackOverflowError$ = function() {
-  return new $.StackOverflowError();
-};
-
-$.RuntimeError$ = function(message) {
-  return new $.RuntimeError(message);
-};
-
-$._ExceptionImplementation$ = function(message) {
-  return new $._ExceptionImplementation(message);
-};
-
-$.FormatException$ = function(message) {
-  return new $.FormatException(message);
-};
-
-$.IntegerDivisionByZeroException$ = function() {
-  return new $.IntegerDivisionByZeroException();
-};
-
-$.Expando$ = function($name) {
-  return new $.Expando($name);
-};
-
-$.List_List = function($length) {
-  var t1, result;
-  t1 = $ === $length;
-  if (t1)
-    $length = null;
-  if (t1)
-    return new Array(0);
-  if (typeof $length !== "number" || Math.floor($length) !== $length || $length < 0)
-    throw $.wrapException($.ArgumentError$("Length must be a positive integer: " + $.S($length) + "."));
-  result = new Array($length);
-  result.fixed$length = true;
-  return result;
-};
-
-$.List_List$from = function(other, growable) {
-  var list, t1, $length, fixedList, i;
-  list = $.List_List($);
-  for (t1 = $.get$iterator$ax(other); t1.moveNext$0() === true;)
-    list.push(t1.get$current());
-  if (growable === true)
-    return list;
-  $length = list.length;
-  fixedList = $.List_List($length);
-  for (t1 = list.length, i = 0; i < $length; ++i) {
-    if (i >= t1)
-      throw $.ioore(i);
-    fixedList[i] = list[i];
-  }
-  return fixedList;
-};
-
-$.Map_Map = function() {
-  return $.HashMap$();
-};
-
-$.Object$ = function() {
-  return new $.Object();
-};
-
-$.StringBuffer$ = function($content) {
-  var t1 = new $.StringBuffer("");
-  t1.StringBuffer$1($content);
-  return t1;
-};
-
-$.window = function() {
-  return window;
-};
-
-$._ChildrenElementList$_wrap = function(element) {
-  return new $._ChildrenElementList(element, $.get$$$dom_children$x(element));
-};
-
-$._FrozenElementList$_wrap = function(_nodeList) {
-  return new $._FrozenElementList(_nodeList);
-};
-
-$._ElementCssClassSet$ = function(_element) {
-  return new $._ElementCssClassSet(_element);
-};
-
-$.HttpRequest_getString = function(url, onProgress, withCredentials) {
-  return $.HttpRequest_request(url, null, onProgress, null, null, withCredentials).then$1(new $.HttpRequest_getString_anon());
-};
-
-$.HttpRequest_request = function(url, method, onProgress, responseType, sendData, withCredentials) {
-  var completer, xhr, t1;
-  completer = $._CompleterImpl$();
-  xhr = new XMLHttpRequest();
-  if (method == null)
-    method = "GET";
-  t1 = $.getInterceptor$x(xhr);
-  t1.open$3$async(xhr, method, url, true);
-  if (withCredentials != null)
-    xhr.withCredentials = withCredentials;
-  if (responseType != null)
-    xhr.responseType = responseType;
-  if (onProgress != null)
-    t1.get$onProgress(xhr).listen$1(onProgress);
-  t1.get$onLoad(xhr).listen$1(new $.HttpRequest_request_anon(completer, xhr));
-  t1.get$onError(xhr).listen$1(new $.HttpRequest_request_anon0(completer));
-  if (sendData != null)
-    xhr.send(sendData);
-  else
-    xhr.send();
-  return completer.future;
-};
-
-$._ChildNodeListLazy$ = function(_this) {
-  return new $._ChildNodeListLazy(_this);
-};
-
-$._ElementAttributeMap$ = function(element) {
-  return new $._ElementAttributeMap(element);
-};
-
-$._EventStream$ = function(_target, _eventType, _useCapture) {
-  return new $._EventStream(_target, _eventType, _useCapture);
-};
-
-$._EventStreamSubscription$ = function(_target, _eventType, _onData, _useCapture) {
-  var t1 = new $._EventStreamSubscription(0, _target, _eventType, _onData, _useCapture);
-  t1._EventStreamSubscription$4(_target, _eventType, _onData, _useCapture);
-  return t1;
-};
-
-$.FixedSizeListIterator$ = function(array) {
-  return new $.FixedSizeListIterator(array, $.get$length$asx(array), -1, null);
-};
-
-$.convertDartToNative_Dictionary = function(dict) {
-  var object;
-  if (dict == null)
-    return;
-  object = {};
-  dict.forEach$1(dict, new $.convertDartToNative_Dictionary_anon(object));
-  return object;
-};
-
-$.Device_userAgent = function() {
-  return $.get$navigator$x($.window()).userAgent;
-};
-
-$.Device_isOpera = function() {
-  if ($.Device__isOpera == null)
-    $.Device__isOpera = $.contains$2$asx($.Device_userAgent(), "Opera", 0);
-  return $.Device__isOpera;
-};
-
-$.Device_isWebKit = function() {
-  if ($.Device__isWebKit == null)
-    $.Device__isWebKit = $.Device_isOpera() !== true && $.contains$2$asx($.Device_userAgent(), "WebKit", 0) === true;
-  return $.Device__isWebKit;
-};
-
-$.FilteredElementList$ = function(node) {
-  return new $.FilteredElementList(node, $.get$nodes$x(node));
-};
-
-$.Lists_getRange = function(a, start, end, accumulator) {
-  var i;
-  if (typeof a !== "string" && (typeof a !== "object" || a === null || a.constructor !== Array && !$.getInterceptor(a).$isJavaScriptIndexingBehavior()))
-    return $.Lists_getRange$bailout(1, a, start, end, accumulator);
-  if (typeof start !== "number")
-    return $.Lists_getRange$bailout(1, a, start, end, accumulator);
-  if (typeof end !== "number")
-    return $.Lists_getRange$bailout(1, a, start, end, accumulator);
-  if (start < 0)
-    throw $.wrapException($.RangeError$value(start));
-  if (end < start)
-    throw $.wrapException($.RangeError$value(end));
-  if (end > a.length)
-    throw $.wrapException($.RangeError$value(end));
-  for (i = start; i < end; ++i) {
-    if (i !== (i | 0))
-      throw $.iae(i);
-    if (i < 0 || i >= a.length)
-      throw $.ioore(i);
-    accumulator.push(a[i]);
-  }
-  return accumulator;
-};
-
-$.Lists_getRange$bailout = function(state0, a, start, end, accumulator) {
-  var t1, t2, i;
-  if ($.$lt$n(start, 0))
-    throw $.wrapException($.RangeError$value(start));
-  t1 = $.getInterceptor$n(end);
-  if (t1.$lt(end, start))
-    throw $.wrapException($.RangeError$value(end));
-  t2 = $.getInterceptor$asx(a);
-  if (t1.$gt(end, t2.get$length(a)))
-    throw $.wrapException($.RangeError$value(end));
-  for (i = start; t1 = $.getInterceptor$n(i), t1.$lt(i, end); i = t1.$add(i, 1))
-    accumulator.push(t2.$index(a, i));
-  return accumulator;
-};
-
-$.ReceivePort_ReceivePort = function() {
-  return $.ReceivePortImpl$();
-};
-
-$._Isolate_port = function() {
-  if ($.lazyPort == null)
-    $.lazyPort = $.ReceivePort_ReceivePort();
-  return $.lazyPort;
-};
-
-$.parse = function(json, reviver) {
-  var parsed, e, t1, exception;
-  t1 = json;
-  if (typeof t1 !== "string")
-    throw $.wrapException($.ArgumentError$(json));
-  parsed = null;
-  try {
-    parsed = JSON.parse(json);
-  } catch (exception) {
-    t1 = $.unwrapException(exception);
-    e = t1;
-    throw $.wrapException($.FormatException$(String(e)));
-  }
-
-  return $._convertJsonToDart(parsed, reviver);
-};
-
-$._AttributeClassSet$ = function(_element) {
-  return new $._AttributeClassSet(_element);
-};
-
-$.BarGraph$ = function(_canvas, _elements) {
-  var t1 = new $.BarGraph(_canvas, null, _elements, 0);
-  t1.BarGraph$2(_canvas, _elements);
-  return t1;
-};
-
-$.GraphModel$ = function(_maxSize) {
-  return new $.GraphModel($.List_List($), _maxSize, []);
-};
-
-$.Element$ = function($name, color) {
-  return new $.Element0($name, color);
-};
-
-$.Sample$ = function(_segments) {
-  return new $.Sample(_segments);
-};
-
-$.IsolateList$ = function(_isolateTable) {
-  return new $.IsolateList(_isolateTable);
-};
-
-$.ModelListener$ = function(_onUpdate, _onFailure) {
-  return new $.ModelListener(_onUpdate, _onFailure);
-};
-
-$.IsolateListModel$ = function() {
-  return new $.IsolateListModel([], []);
-};
-
-$.Isolate$ = function(raw) {
-  var t1 = $.getInterceptor$asx(raw);
-  return new $.Isolate(t1.$index(raw, "handle"), t1.$index(raw, "name"), t1.$index(raw, "port"), t1.$index(raw, "starttime"), t1.$index(raw, "stacklimit"), $.Space$(t1.$index(raw, "newspace")), $.Space$(t1.$index(raw, "oldspace")));
-};
-
-$.Space$ = function(raw) {
-  var t1 = $.getInterceptor$asx(raw);
-  return new $.Space(t1.$index(raw, "used"), t1.$index(raw, "capacity"));
-};
-
-$.main = function() {
-  var t1, milliseconds;
-  document.querySelector("#dashboard");
-  $._graph = $.BarGraph$(document.querySelector("#graph"), [$.Element$("Old Space", "#97FFFF"), $.Element$("New Space", "#00EE76")]);
-  $._isolateList = $.IsolateList$(document.querySelector("#isolateList"));
-  $._statusText = document.querySelector("#statusText");
-  $._isolates = $.IsolateListModel$();
-  $._isolates.addListener$2($.onUpdateStatus, $.onRequestFailed);
-  $._isolates.update$0();
-  t1 = new $.main_anon();
-  milliseconds = $.Duration_3000000.get$inMilliseconds();
-  if (milliseconds < 0)
-    milliseconds = 0;
-  $._updater = $.TimerImpl$periodic(milliseconds, t1);
-};
-
-$.onUpdateStatus = function(model) {
-  var t1 = {};
-  t1.oldSpace_0 = 0;
-  t1.newSpace_1 = 0;
-  $.forEach$1$ax(model, new $.onUpdateStatus_anon(t1));
-  $._graph.addSample$1([t1.oldSpace_0, t1.newSpace_1]);
-  $._isolateList.updateList$1(model);
-  $.set$text$x($._statusText, "Running ...");
-};
-
-$.onRequestFailed = function() {
-  $._updater.cancel$0();
-  $._isolates.removeListener$1($.onUpdateStatus);
-  $.set$text$x($._statusText, "Server closed");
-};
-
-$.IsolateNatives__processWorkerMessage.call$2 = $.IsolateNatives__processWorkerMessage;
-$.IsolateNatives__processWorkerMessage.$name = "IsolateNatives__processWorkerMessage";
-$.wrapException.call$1 = $.wrapException;
-$.wrapException.$name = "wrapException";
-$.DartError_toStringWrapper.call$0 = $.DartError_toStringWrapper;
-$.DartError_toStringWrapper.$name = "DartError_toStringWrapper";
-$.invokeClosure.call$5 = $.invokeClosure;
-$.invokeClosure.$name = "invokeClosure";
-$.typeNameInChrome.call$1 = $.typeNameInChrome;
-$.typeNameInChrome.$name = "typeNameInChrome";
-$.typeNameInSafari.call$1 = $.typeNameInSafari;
-$.typeNameInSafari.$name = "typeNameInSafari";
-$.typeNameInOpera.call$1 = $.typeNameInOpera;
-$.typeNameInOpera.$name = "typeNameInOpera";
-$.typeNameInFirefox.call$1 = $.typeNameInFirefox;
-$.typeNameInFirefox.$name = "typeNameInFirefox";
-$.typeNameInIE.call$1 = $.typeNameInIE;
-$.typeNameInIE.$name = "typeNameInIE";
-$.constructorNameFallback.call$1 = $.constructorNameFallback;
-$.constructorNameFallback.$name = "constructorNameFallback";
-$._asyncRunCallback.call$0 = $._asyncRunCallback;
-$._asyncRunCallback.$name = "_asyncRunCallback";
-$._nullDataHandler.call$1 = $._nullDataHandler;
-$._nullDataHandler.$name = "_nullDataHandler";
-$._nullErrorHandler.call$1 = $._nullErrorHandler;
-$._nullErrorHandler.$name = "_nullErrorHandler";
-$._nullDoneHandler.call$0 = $._nullDoneHandler;
-$._nullDoneHandler.$name = "_nullDoneHandler";
-$.onUpdateStatus.call$1 = $.onUpdateStatus;
-$.onUpdateStatus.$name = "onUpdateStatus";
-$.onRequestFailed.call$0 = $.onRequestFailed;
-$.onRequestFailed.$name = "onRequestFailed";
-$.String = {builtin$cls: "String"};
-$.ReceivePort = {builtin$cls: "ReceivePort"};
-$.$int = {builtin$cls: "int"};
-$.bool = {builtin$cls: "bool"};
-$._ManagerStub = {builtin$cls: "_ManagerStub"};
-$.List = {builtin$cls: "List"};
-$.num = {builtin$cls: "num"};
-$.Match = {builtin$cls: "Match"};
-$.C_NullThrownError = new $.NullThrownError();
-Isolate.makeConstantList = function(list) {
-  list.immutable$list = true;
-  list.fixed$length = true;
-  return list;
-};
-$.List_empty = Isolate.makeConstantList([]);
-$.JSDouble_methods = $.JSDouble.prototype;
-$.EventStreamProvider_click = new $.EventStreamProvider("click");
-$.JSNull_methods = $.JSNull.prototype;
-$.JSNumber_methods = $.JSNumber.prototype;
-$.JSString_methods = $.JSString.prototype;
-$.EventStreamProvider_progress = new $.EventStreamProvider("progress");
-$.JSArray_methods = $.JSArray.prototype;
-$.EventStreamProvider_error = new $.EventStreamProvider("error");
-$.C_CloseToken = new $.CloseToken();
-$.EventStreamProvider_load = new $.EventStreamProvider("load");
-$.JSInt_methods = $.JSInt.prototype;
-$.Duration_0 = new $.Duration(0);
-$.Duration_3000000 = new $.Duration(3000000);
-$.Expando__keyCount = 0;
-$.dispatchPropertyName = "_zzyzx";
-$.lazyPort = null;
-$.ReceivePortImpl__nextFreeId = 1;
-$.Primitives_hashCodeSeed = 0;
-$._getTypeNameOf = null;
-$.interceptorsByTag = null;
-$.leafTags = null;
-$._callbacksAreEnqueued = false;
-$.Device__isOpera = null;
-$.Device__isWebKit = null;
-$._graph = null;
-$._isolateList = null;
-$._statusText = null;
-$._isolates = null;
-$._updater = null;
-$.$$dom_addEventListener$3$x = function(receiver, a0, a1, a2) {
-  return $.getInterceptor$x(receiver).$$dom_addEventListener$3(receiver, a0, a1, a2);
-};
-$.$$dom_removeEventListener$3$x = function(receiver, a0, a1, a2) {
-  return $.getInterceptor$x(receiver).$$dom_removeEventListener$3(receiver, a0, a1, a2);
-};
-$.$$dom_replaceChild$2$x = function(receiver, a0, a1) {
-  return $.getInterceptor$x(receiver).$$dom_replaceChild$2(receiver, a0, a1);
-};
-$.$add$ns = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver + a0;
-  return $.getInterceptor$ns(receiver).$add(receiver, a0);
-};
-$.$and$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return (receiver & a0) >>> 0;
-  return $.getInterceptor$n(receiver).$and(receiver, a0);
-};
-$.$div$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver / a0;
-  return $.getInterceptor$n(receiver).$div(receiver, a0);
-};
-$.$eq = function(receiver, a0) {
-  if (receiver == null)
-    return a0 == null;
-  if (typeof receiver != "object")
-    return a0 != null && receiver === a0;
-  return $.getInterceptor(receiver).$eq(receiver, a0);
-};
-$.$ge$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver >= a0;
-  return $.getInterceptor$n(receiver).$ge(receiver, a0);
-};
-$.$gt$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver > a0;
-  return $.getInterceptor$n(receiver).$gt(receiver, a0);
-};
-$.$index$asx = function(receiver, a0) {
-  if (receiver.constructor == Array || typeof receiver == "string")
-    if (a0 >>> 0 === a0 && a0 < receiver.length)
-      return receiver[a0];
-  return $.getInterceptor$asx(receiver).$index(receiver, a0);
-};
-$.$indexSet$ax = function(receiver, a0, a1) {
-  if (receiver.constructor == Array && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < receiver.length)
-    return receiver[a0] = a1;
-  return $.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1);
-};
-$.$lt$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver < a0;
-  return $.getInterceptor$n(receiver).$lt(receiver, a0);
-};
-$.$mul$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver * a0;
-  return $.getInterceptor$n(receiver).$mul(receiver, a0);
-};
-$.$shl$n = function(receiver, a0) {
-  return $.getInterceptor$n(receiver).$shl(receiver, a0);
-};
-$.$sub$n = function(receiver, a0) {
-  if (typeof receiver == "number" && typeof a0 == "number")
-    return receiver - a0;
-  return $.getInterceptor$n(receiver).$sub(receiver, a0);
-};
-$.$tdiv$n = function(receiver, a0) {
-  return $.getInterceptor$n(receiver).$tdiv(receiver, a0);
-};
-$.abs$0$n = function(receiver) {
-  return $.getInterceptor$n(receiver).abs$0(receiver);
-};
-$.add$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).add$1(receiver, a0);
-};
-$.addAll$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).addAll$1(receiver, a0);
-};
-$.allMatches$1$s = function(receiver, a0) {
-  return $.getInterceptor$s(receiver).allMatches$1(receiver, a0);
-};
-$.ceil$0$n = function(receiver) {
-  return $.getInterceptor$n(receiver).ceil$0(receiver);
-};
-$.contains$2$asx = function(receiver, a0, a1) {
-  return $.getInterceptor$asx(receiver).contains$2(receiver, a0, a1);
-};
-$.elementAt$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).elementAt$1(receiver, a0);
-};
-$.forEach$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).forEach$1(receiver, a0);
-};
-$.get$$$dom_children$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$$$dom_children(receiver);
-};
-$.get$attributes$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$attributes(receiver);
-};
-$.get$children$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$children(receiver);
-};
-$.get$classes$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$classes(receiver);
-};
-$.get$color$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$color(receiver);
-};
-$.get$context2D$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$context2D(receiver);
-};
-$.get$hashCode$ = function(receiver) {
-  return $.getInterceptor(receiver).get$hashCode(receiver);
-};
-$.get$height$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$height(receiver);
-};
-$.get$id$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$id(receiver);
-};
-$.get$isEmpty$asx = function(receiver) {
-  return $.getInterceptor$asx(receiver).get$isEmpty(receiver);
-};
-$.get$iterator$ax = function(receiver) {
-  return $.getInterceptor$ax(receiver).get$iterator(receiver);
-};
-$.get$length$asx = function(receiver) {
-  return $.getInterceptor$asx(receiver).get$length(receiver);
-};
-$.get$name$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$name(receiver);
-};
-$.get$navigator$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$navigator(receiver);
-};
-$.get$nodes$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$nodes(receiver);
-};
-$.get$onClick$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$onClick(receiver);
-};
-$.get$responseText$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$responseText(receiver);
-};
-$.get$value$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$value(receiver);
-};
-$.get$width$x = function(receiver) {
-  return $.getInterceptor$x(receiver).get$width(receiver);
-};
-$.postMessage$1$x = function(receiver, a0) {
-  return $.getInterceptor$x(receiver).postMessage$1(receiver, a0);
-};
-$.register$2$x = function(receiver, a0, a1) {
-  return $.getInterceptor$x(receiver).register$2(receiver, a0, a1);
-};
-$.remove$0$ax = function(receiver) {
-  return $.getInterceptor$ax(receiver).remove$0(receiver);
-};
-$.replaceAll$2$s = function(receiver, a0, a1) {
-  return $.getInterceptor$s(receiver).replaceAll$2(receiver, a0, a1);
-};
-$.replaceWith$1$x = function(receiver, a0) {
-  return $.getInterceptor$x(receiver).replaceWith$1(receiver, a0);
-};
-$.send$1$x = function(receiver, a0) {
-  return $.getInterceptor$x(receiver).send$1(receiver, a0);
-};
-$.send$2$x = function(receiver, a0, a1) {
-  return $.getInterceptor$x(receiver).send$2(receiver, a0, a1);
-};
-$.set$$$dom_className$x = function(receiver, value) {
-  return $.getInterceptor$x(receiver).set$$$dom_className(receiver, value);
-};
-$.set$id$x = function(receiver, value) {
-  return $.getInterceptor$x(receiver).set$id(receiver, value);
-};
-$.set$length$asx = function(receiver, value) {
-  return $.getInterceptor$asx(receiver).set$length(receiver, value);
-};
-$.set$text$x = function(receiver, value) {
-  return $.getInterceptor$x(receiver).set$text(receiver, value);
-};
-$.skip$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).skip$1(receiver, a0);
-};
-$.split$1$s = function(receiver, a0) {
-  return $.getInterceptor$s(receiver).split$1(receiver, a0);
-};
-$.sublist$1$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).sublist$1(receiver, a0);
-};
-$.sublist$2$ax = function(receiver, a0, a1) {
-  return $.getInterceptor$ax(receiver).sublist$2(receiver, a0, a1);
-};
-$.toList$0$ax = function(receiver) {
-  return $.getInterceptor$ax(receiver).toList$0(receiver);
-};
-$.toList$1$growable$ax = function(receiver, a0) {
-  return $.getInterceptor$ax(receiver).toList$1$growable(receiver, a0);
-};
-$.toString$0 = function(receiver) {
-  return $.getInterceptor(receiver).toString$0(receiver);
-};
-$.trim$0$s = function(receiver) {
-  return $.getInterceptor$s(receiver).trim$0(receiver);
-};
-$.getInterceptor = function(receiver) {
-  if (typeof receiver == "number") {
-    if (Math.floor(receiver) == receiver)
-      return $.JSInt.prototype;
-    return $.JSDouble.prototype;
-  }
-  if (typeof receiver == "string")
-    return $.JSString.prototype;
-  if (receiver == null)
-    return $.JSNull.prototype;
-  if (typeof receiver == "function")
-    return $.JSFunction.prototype;
-  if (typeof receiver == "boolean")
-    return $.JSBool.prototype;
-  if (receiver.constructor == Array)
-    return $.JSArray.prototype;
-  if (typeof receiver != "object")
-    return receiver;
-  if (receiver instanceof $.Object)
-    return receiver;
-  if (Object.getPrototypeOf(receiver) === Object.prototype)
-    return $.Interceptor.prototype;
-  return $.getNativeInterceptor(receiver);
-};
-$.getInterceptor$asx = function(receiver) {
-  if (typeof receiver == "string")
-    return $.JSString.prototype;
-  if (receiver == null)
-    return receiver;
-  if (receiver.constructor == Array)
-    return $.JSArray.prototype;
-  if (typeof receiver != "object")
-    return receiver;
-  if (receiver instanceof $.Object)
-    return receiver;
-  if (Object.getPrototypeOf(receiver) === Object.prototype)
-    return $.Interceptor.prototype;
-  return $.getNativeInterceptor(receiver);
-};
-$.getInterceptor$ax = function(receiver) {
-  if (receiver == null)
-    return receiver;
-  if (receiver.constructor == Array)
-    return $.JSArray.prototype;
-  if (typeof receiver != "object")
-    return receiver;
-  if (receiver instanceof $.Object)
-    return receiver;
-  if (Object.getPrototypeOf(receiver) === Object.prototype)
-    return $.Interceptor.prototype;
-  return $.getNativeInterceptor(receiver);
-};
-$.getInterceptor$n = function(receiver) {
-  if (typeof receiver == "number")
-    return $.JSNumber.prototype;
-  if (receiver == null)
-    return receiver;
-  return receiver;
-};
-$.getInterceptor$ns = function(receiver) {
-  if (typeof receiver == "number")
-    return $.JSNumber.prototype;
-  if (typeof receiver == "string")
-    return $.JSString.prototype;
-  if (receiver == null)
-    return receiver;
-  return receiver;
-};
-$.getInterceptor$s = function(receiver) {
-  if (typeof receiver == "string")
-    return $.JSString.prototype;
-  if (receiver == null)
-    return receiver;
-  return receiver;
-};
-$.getInterceptor$x = function(receiver) {
-  if (receiver == null)
-    return receiver;
-  if (typeof receiver != "object")
-    return receiver;
-  if (receiver instanceof $.Object)
-    return receiver;
-  if (Object.getPrototypeOf(receiver) === Object.prototype)
-    return $.Interceptor.prototype;
-  return $.getNativeInterceptor(receiver);
-};
-Isolate.$lazy($, "globalThis", "globalThis", "get$globalThis", function() {
-  return $.IsolateNatives_computeGlobalThis();
-});
-Isolate.$lazy($, "globalWindow", "globalWindow", "get$globalWindow", function() {
-  return $.get$globalThis().window;
-});
-Isolate.$lazy($, "globalWorker", "globalWorker", "get$globalWorker", function() {
-  return $.get$globalThis().Worker;
-});
-Isolate.$lazy($, "globalPostMessageDefined", "globalPostMessageDefined", "get$globalPostMessageDefined", function() {
-  return $.get$globalThis().postMessage !== void 0;
-});
-Isolate.$lazy($, "thisScript", "IsolateNatives_thisScript", "get$IsolateNatives_thisScript", function() {
-  return $.IsolateNatives_computeThisScript();
-});
-Isolate.$lazy($, "_stackTraceExpando", "_stackTraceExpando", "get$_stackTraceExpando", function() {
-  return $.Expando$("asynchronous error");
-});
-Isolate.$lazy($, "_asyncCallbacks", "_asyncCallbacks", "get$_asyncCallbacks", function() {
-  return [];
-});
-Isolate.$lazy($, "_runCallbacks", "Timer__runCallbacks", "get$Timer__runCallbacks", function() {
-  return [];
-});
-// Native classes
-(function(table) {
-  for (var key in table)
-    $.defineProperty(Object.prototype, key, table[key]);
-})({
-  $isJavaScriptIndexingBehavior: function() {
-    return false;
-  },
-  $asJavaScriptIndexingBehavior: function() {
-    return null;
-  },
-  $isIterable: function() {
-    return false;
-  },
-  $asIterable: function() {
-    return null;
-  },
-  $isList: function() {
-    return false;
-  },
-  $asList: function() {
-    return null;
-  },
-  $isElement: function() {
-    return false;
-  },
-  $asElement: function() {
-    return null;
-  }
-});
-
-$.defineNativeMethods("Worker", $._WorkerStub);
-
-$.defineNativeMethodsNonleaf("HTMLElement", $._HTMLElement);
-
-$.defineNativeMethods("HTMLAnchorElement", $.AnchorElement);
-
-$.defineNativeMethods("WebKitAnimationEvent", $.AnimationEvent);
-
-$.defineNativeMethods("HTMLAreaElement", $.AreaElement);
-
-$.defineNativeMethods("ArrayBuffer", $.ArrayBuffer);
-
-$.defineNativeMethodsNonleaf("ArrayBufferView", $.ArrayBufferView);
-
-$.defineNativeMethods("Attr", $.Attr);
-
-$.defineNativeMethods("HTMLAudioElement", $.AudioElement);
-
-$.defineNativeMethods("AutocompleteErrorEvent", $.AutocompleteErrorEvent);
-
-$.defineNativeMethods("HTMLBRElement", $.BRElement);
-
-$.defineNativeMethods("HTMLBaseElement", $.BaseElement);
-
-$.defineNativeMethods("BeforeLoadEvent", $.BeforeLoadEvent);
-
-$.defineNativeMethodsNonleaf("Blob", $.Blob);
-
-$.defineNativeMethods("HTMLBodyElement", $.BodyElement);
-
-$.defineNativeMethods("HTMLButtonElement", $.ButtonElement);
-
-$.defineNativeMethods("CDATASection", $.CDataSection);
-
-$.defineNativeMethods("HTMLCanvasElement", $.CanvasElement);
-
-$.defineNativeMethods("CanvasGradient", $.CanvasGradient);
-
-$.defineNativeMethods("CanvasPattern", $.CanvasPattern);
-
-$.defineNativeMethodsNonleaf("CanvasRenderingContext", $.CanvasRenderingContext);
-
-$.defineNativeMethods("CanvasRenderingContext2D", $.CanvasRenderingContext2D);
-
-$.defineNativeMethodsNonleaf("CharacterData", $.CharacterData);
-
-$.defineNativeMethods("CloseEvent", $.CloseEvent);
-
-$.defineNativeMethods("Comment", $.Comment);
-
-$.defineNativeMethods("CompositionEvent", $.CompositionEvent);
-
-$.defineNativeMethods("HTMLContentElement", $.ContentElement);
-
-$.defineNativeMethods("CSSFontFaceLoadEvent", $.CssFontFaceLoadEvent);
-
-$.defineNativeMethods("CSSStyleDeclaration", $.CssStyleDeclaration);
-
-$.defineNativeMethods("CustomElementConstructor", $.CustomElementConstructor);
-
-$.defineNativeMethods("CustomEvent", $.CustomEvent);
-
-$.defineNativeMethods("HTMLDListElement", $.DListElement);
-
-$.defineNativeMethods("HTMLDataListElement", $.DataListElement);
-
-$.defineNativeMethods("HTMLDetailsElement", $.DetailsElement);
-
-$.defineNativeMethods("DeviceMotionEvent", $.DeviceMotionEvent);
-
-$.defineNativeMethods("DeviceOrientationEvent", $.DeviceOrientationEvent);
-
-$.defineNativeMethods("HTMLDialogElement", $.DialogElement);
-
-$.defineNativeMethods("HTMLDivElement", $.DivElement);
-
-$.defineNativeMethodsNonleaf("Document", $.Document);
-
-$.defineNativeMethodsNonleaf("DocumentFragment", $.DocumentFragment);
-
-$.defineNativeMethods("DocumentType", $.DocumentType);
-
-$.defineNativeMethods("DOMError", $.DomError);
-
-$.defineNativeMethods("DOMException", $.DomException);
-
-$.defineNativeMethodsNonleaf("Element", $.Element);
-
-$.defineNativeMethods("HTMLEmbedElement", $.EmbedElement);
-
-$.defineNativeMethods("EntityReference", $.EntityReference);
-
-$.defineNativeMethods("ErrorEvent", $.ErrorEvent);
-
-$.defineNativeMethodsNonleaf("Event", $.Event);
-
-$.defineNativeMethods("EventException", $.EventException);
-
-$.defineNativeMethodsNonleaf("EventTarget", $.EventTarget);
-
-$.defineNativeMethods("HTMLFieldSetElement", $.FieldSetElement);
-
-$.defineNativeMethods("File", $.File);
-
-$.defineNativeMethods("FileError", $.FileError);
-
-$.defineNativeMethods("FileException", $.FileException);
-
-$.defineNativeMethods("FocusEvent", $.FocusEvent);
-
-$.defineNativeMethods("HTMLFormElement", $.FormElement);
-
-$.defineNativeMethods("HTMLHRElement", $.HRElement);
-
-$.defineNativeMethods("HashChangeEvent", $.HashChangeEvent);
-
-$.defineNativeMethods("HTMLHeadElement", $.HeadElement);
-
-$.defineNativeMethods("HTMLHeadingElement", $.HeadingElement);
-
-$.defineNativeMethodsNonleaf("HTMLCollection", $.HtmlCollection);
-
-$.defineNativeMethods("HTMLDocument", $.HtmlDocument);
-
-$.defineNativeMethods("HTMLHtmlElement", $.HtmlElement);
-
-$.defineNativeMethods("HTMLFormControlsCollection", $.HtmlFormControlsCollection);
-
-$.defineNativeMethods("HTMLOptionsCollection", $.HtmlOptionsCollection);
-
-$.defineNativeMethods("XMLHttpRequest", $.HttpRequest);
-
-$.defineNativeMethods("XMLHttpRequestException", $.HttpRequestException);
-
-$.defineNativeMethods("XMLHttpRequestProgressEvent", $.HttpRequestProgressEvent);
-
-$.defineNativeMethods("XMLHttpRequestUpload", $.HttpRequestUpload);
-
-$.defineNativeMethods("HTMLIFrameElement", $.IFrameElement);
-
-$.defineNativeMethods("HTMLImageElement", $.ImageElement);
-
-$.defineNativeMethods("HTMLInputElement", $.InputElement);
-
-$.defineNativeMethods("KeyboardEvent", $.KeyboardEvent);
-
-$.defineNativeMethods("HTMLKeygenElement", $.KeygenElement);
-
-$.defineNativeMethods("HTMLLIElement", $.LIElement);
-
-$.defineNativeMethods("HTMLLabelElement", $.LabelElement);
-
-$.defineNativeMethods("HTMLLegendElement", $.LegendElement);
-
-$.defineNativeMethods("HTMLLinkElement", $.LinkElement);
-
-$.defineNativeMethods("HTMLMapElement", $.MapElement);
-
-$.defineNativeMethodsNonleaf("HTMLMediaElement", $.MediaElement);
-
-$.defineNativeMethods("MediaError", $.MediaError);
-
-$.defineNativeMethods("MediaKeyError", $.MediaKeyError);
-
-$.defineNativeMethods("MediaKeyEvent", $.MediaKeyEvent);
-
-$.defineNativeMethods("MediaStreamEvent", $.MediaStreamEvent);
-
-$.defineNativeMethods("MediaStreamTrackEvent", $.MediaStreamTrackEvent);
-
-$.defineNativeMethods("HTMLMenuElement", $.MenuElement);
-
-$.defineNativeMethods("MessageEvent", $.MessageEvent);
-
-$.defineNativeMethods("HTMLMetaElement", $.MetaElement);
-
-$.defineNativeMethods("HTMLMeterElement", $.MeterElement);
-
-$.defineNativeMethods("HTMLModElement", $.ModElement);
-
-$.defineNativeMethodsNonleaf("MouseEvent", $.MouseEvent);
-
-$.defineNativeMethods("MutationEvent", $.MutationEvent);
-
-$.defineNativeMethods("Navigator", $.Navigator);
-
-$.defineNativeMethods("NavigatorUserMediaError", $.NavigatorUserMediaError);
-
-$.defineNativeMethodsNonleaf("Node", $.Node);
-
-$.defineNativeMethodsNonleaf("NodeList", $.NodeList);
-
-$.defineNativeMethods("Notation", $.Notation);
-
-$.defineNativeMethods("HTMLOListElement", $.OListElement);
-
-$.defineNativeMethods("HTMLObjectElement", $.ObjectElement);
-
-$.defineNativeMethods("HTMLOptGroupElement", $.OptGroupElement);
-
-$.defineNativeMethods("HTMLOptionElement", $.OptionElement);
-
-$.defineNativeMethods("HTMLOutputElement", $.OutputElement);
-
-$.defineNativeMethods("OverflowEvent", $.OverflowEvent);
-
-$.defineNativeMethods("PageTransitionEvent", $.PageTransitionEvent);
-
-$.defineNativeMethods("HTMLParagraphElement", $.ParagraphElement);
-
-$.defineNativeMethods("HTMLParamElement", $.ParamElement);
-
-$.defineNativeMethods("PopStateEvent", $.PopStateEvent);
-
-$.defineNativeMethods("PositionError", $.PositionError);
-
-$.defineNativeMethods("HTMLPreElement", $.PreElement);
-
-$.defineNativeMethods("ProcessingInstruction", $.ProcessingInstruction);
-
-$.defineNativeMethods("HTMLProgressElement", $.ProgressElement);
-
-$.defineNativeMethodsNonleaf("ProgressEvent", $.ProgressEvent);
-
-$.defineNativeMethods("HTMLQuoteElement", $.QuoteElement);
-
-$.defineNativeMethods("RadioNodeList", $.RadioNodeList);
-
-$.defineNativeMethods("RangeException", $.RangeException);
-
-$.defineNativeMethods("RTCDataChannelEvent", $.RtcDataChannelEvent);
-
-$.defineNativeMethods("RTCDTMFToneChangeEvent", $.RtcDtmfToneChangeEvent);
-
-$.defineNativeMethods("RTCIceCandidateEvent", $.RtcIceCandidateEvent);
-
-$.defineNativeMethods("HTMLScriptElement", $.ScriptElement);
-
-$.defineNativeMethods("SecurityPolicyViolationEvent", $.SecurityPolicyViolationEvent);
-
-$.defineNativeMethods("HTMLSelectElement", $.SelectElement);
-
-$.defineNativeMethods("HTMLShadowElement", $.ShadowElement);
-
-$.defineNativeMethods("ShadowRoot", $.ShadowRoot);
-
-$.defineNativeMethods("HTMLSourceElement", $.SourceElement);
-
-$.defineNativeMethods("HTMLSpanElement", $.SpanElement);
-
-$.defineNativeMethods("SpeechInputEvent", $.SpeechInputEvent);
-
-$.defineNativeMethods("SpeechRecognitionError", $.SpeechRecognitionError);
-
-$.defineNativeMethods("SpeechRecognitionEvent", $.SpeechRecognitionEvent);
-
-$.defineNativeMethods("StorageEvent", $.StorageEvent);
-
-$.defineNativeMethods("HTMLStyleElement", $.StyleElement);
-
-$.defineNativeMethods("HTMLTableCaptionElement", $.TableCaptionElement);
-
-$.defineNativeMethods("HTMLTableCellElement", $.TableCellElement);
-
-$.defineNativeMethods("HTMLTableColElement", $.TableColElement);
-
-$.defineNativeMethods("HTMLTableElement", $.TableElement);
-
-$.defineNativeMethods("HTMLTableRowElement", $.TableRowElement);
-
-$.defineNativeMethods("HTMLTableSectionElement", $.TableSectionElement);
-
-$.defineNativeMethods("HTMLTemplateElement", $.TemplateElement);
-
-$.defineNativeMethodsNonleaf("Text", $.Text);
-
-$.defineNativeMethods("HTMLTextAreaElement", $.TextAreaElement);
-
-$.defineNativeMethods("TextEvent", $.TextEvent);
-
-$.defineNativeMethods("HTMLTitleElement", $.TitleElement);
-
-$.defineNativeMethods("TouchEvent", $.TouchEvent);
-
-$.defineNativeMethods("HTMLTrackElement", $.TrackElement);
-
-$.defineNativeMethods("TrackEvent", $.TrackEvent);
-
-$.defineNativeMethods("TransitionEvent", $.TransitionEvent);
-
-$.defineNativeMethodsNonleaf("UIEvent", $.UIEvent);
-
-$.defineNativeMethods("HTMLUListElement", $.UListElement);
-
-$.defineNativeMethodsNonleaf("Uint8Array", $.Uint8Array);
-
-$.defineNativeMethods("Uint8ClampedArray", $.Uint8ClampedArray);
-
-$.defineNativeMethods("HTMLUnknownElement", $.UnknownElement);
-
-$.defineNativeMethods("HTMLVideoElement", $.VideoElement);
-
-$.defineNativeMethods("WheelEvent", $.WheelEvent);
-
-$.defineNativeMethods("DOMWindow", $.Window);
-
-$.defineNativeMethods("XPathException", $.XPathException);
-
-$.defineNativeMethods("NamedNodeMap", $._NamedNodeMap);
-
-$.defineNativeMethods("WebKitTransitionEvent", $._WebKitTransitionEvent);
-
-$.defineNativeMethods("IDBVersionChangeEvent", $.VersionChangeEvent);
-
-$.defineNativeMethods("SVGAElement", $.AElement);
-
-$.defineNativeMethods("SVGAltGlyphElement", $.AltGlyphElement);
-
-$.defineNativeMethods("SVGAnimateElement", $.AnimateElement);
-
-$.defineNativeMethods("SVGAnimateMotionElement", $.AnimateMotionElement);
-
-$.defineNativeMethods("SVGAnimateTransformElement", $.AnimateTransformElement);
-
-$.defineNativeMethods("SVGAnimatedLength", $.AnimatedLength);
-
-$.defineNativeMethods("SVGAnimatedNumberList", $.AnimatedNumberList);
-
-$.defineNativeMethodsNonleaf("SVGAnimationElement", $.AnimationElement);
-
-$.defineNativeMethods("SVGCircleElement", $.CircleElement);
-
-$.defineNativeMethods("SVGClipPathElement", $.ClipPathElement);
-
-$.defineNativeMethods("SVGDefsElement", $.DefsElement);
-
-$.defineNativeMethods("SVGDescElement", $.DescElement);
-
-$.defineNativeMethods("SVGEllipseElement", $.EllipseElement);
-
-$.defineNativeMethods("SVGFEBlendElement", $.FEBlendElement);
-
-$.defineNativeMethods("SVGFEColorMatrixElement", $.FEColorMatrixElement);
-
-$.defineNativeMethods("SVGFEComponentTransferElement", $.FEComponentTransferElement);
-
-$.defineNativeMethods("SVGFECompositeElement", $.FECompositeElement);
-
-$.defineNativeMethods("SVGFEConvolveMatrixElement", $.FEConvolveMatrixElement);
-
-$.defineNativeMethods("SVGFEDiffuseLightingElement", $.FEDiffuseLightingElement);
-
-$.defineNativeMethods("SVGFEDisplacementMapElement", $.FEDisplacementMapElement);
-
-$.defineNativeMethods("SVGFEDistantLightElement", $.FEDistantLightElement);
-
-$.defineNativeMethods("SVGFEFloodElement", $.FEFloodElement);
-
-$.defineNativeMethods("SVGFEFuncAElement", $.FEFuncAElement);
-
-$.defineNativeMethods("SVGFEFuncBElement", $.FEFuncBElement);
-
-$.defineNativeMethods("SVGFEFuncGElement", $.FEFuncGElement);
-
-$.defineNativeMethods("SVGFEFuncRElement", $.FEFuncRElement);
-
-$.defineNativeMethods("SVGFEGaussianBlurElement", $.FEGaussianBlurElement);
-
-$.defineNativeMethods("SVGFEImageElement", $.FEImageElement);
-
-$.defineNativeMethods("SVGFEMergeElement", $.FEMergeElement);
-
-$.defineNativeMethods("SVGFEMergeNodeElement", $.FEMergeNodeElement);
-
-$.defineNativeMethods("SVGFEMorphologyElement", $.FEMorphologyElement);
-
-$.defineNativeMethods("SVGFEOffsetElement", $.FEOffsetElement);
-
-$.defineNativeMethods("SVGFEPointLightElement", $.FEPointLightElement);
-
-$.defineNativeMethods("SVGFESpecularLightingElement", $.FESpecularLightingElement);
-
-$.defineNativeMethods("SVGFESpotLightElement", $.FESpotLightElement);
-
-$.defineNativeMethods("SVGFETileElement", $.FETileElement);
-
-$.defineNativeMethods("SVGFETurbulenceElement", $.FETurbulenceElement);
-
-$.defineNativeMethods("SVGFilterElement", $.FilterElement);
-
-$.defineNativeMethods("SVGForeignObjectElement", $.ForeignObjectElement);
-
-$.defineNativeMethods("SVGGElement", $.GElement);
-
-$.defineNativeMethods("SVGImageElement", $.ImageElement0);
-
-$.defineNativeMethods("SVGLineElement", $.LineElement);
-
-$.defineNativeMethods("SVGLinearGradientElement", $.LinearGradientElement);
-
-$.defineNativeMethods("SVGMarkerElement", $.MarkerElement);
-
-$.defineNativeMethods("SVGMaskElement", $.MaskElement);
-
-$.defineNativeMethods("SVGMetadataElement", $.MetadataElement);
-
-$.defineNativeMethods("SVGPathElement", $.PathElement);
-
-$.defineNativeMethods("SVGPatternElement", $.PatternElement);
-
-$.defineNativeMethods("SVGPolygonElement", $.PolygonElement);
-
-$.defineNativeMethods("SVGPolylineElement", $.PolylineElement);
-
-$.defineNativeMethods("SVGRadialGradientElement", $.RadialGradientElement);
-
-$.defineNativeMethods("SVGRectElement", $.RectElement);
-
-$.defineNativeMethods("SVGScriptElement", $.ScriptElement0);
-
-$.defineNativeMethods("SVGSetElement", $.SetElement);
-
-$.defineNativeMethods("SVGStopElement", $.StopElement);
-
-$.defineNativeMethods("SVGStyleElement", $.StyleElement0);
-
-$.defineNativeMethodsNonleaf("SVGStyledElement", $.StyledElement);
-
-$.defineNativeMethods("SVGDocument", $.SvgDocument);
-
-$.defineNativeMethodsNonleaf("SVGElement", $.SvgElement);
-
-$.defineNativeMethods("SVGException", $.SvgException);
-
-$.defineNativeMethods("SVGSVGElement", $.SvgSvgElement);
-
-$.defineNativeMethods("SVGSwitchElement", $.SwitchElement);
-
-$.defineNativeMethods("SVGSymbolElement", $.SymbolElement);
-
-$.defineNativeMethods("SVGTSpanElement", $.TSpanElement);
-
-$.defineNativeMethodsNonleaf("SVGTextContentElement", $.TextContentElement);
-
-$.defineNativeMethods("SVGTextElement", $.TextElement);
-
-$.defineNativeMethods("SVGTextPathElement", $.TextPathElement);
-
-$.defineNativeMethodsNonleaf("SVGTextPositioningElement", $.TextPositioningElement);
-
-$.defineNativeMethods("SVGTitleElement", $.TitleElement0);
-
-$.defineNativeMethods("SVGUseElement", $.UseElement);
-
-$.defineNativeMethods("SVGViewElement", $.ViewElement);
-
-$.defineNativeMethods("SVGZoomEvent", $.ZoomEvent);
-
-$.defineNativeMethodsNonleaf("SVGGradientElement", $._GradientElement);
-
-$.defineNativeMethodsNonleaf("SVGComponentTransferFunctionElement", $._SVGComponentTransferFunctionElement);
-
-$.defineNativeMethods("AudioProcessingEvent", $.AudioProcessingEvent);
-
-$.defineNativeMethods("OfflineAudioCompletionEvent", $.OfflineAudioCompletionEvent);
-
-$.defineNativeMethods("WebGLContextEvent", $.ContextEvent);
-
-$.defineNativeMethods("SQLError", $.SqlError);
-
-$.defineNativeMethods("SQLException", $.SqlException);
-
-
-var $ = null;
-Isolate = Isolate.$finishIsolateConstructor(Isolate);
-var $ = new Isolate();
-$.main.call$0 = $.main;
-// BEGIN invoke [main].
-if (typeof document !== "undefined" && document.readyState !== "complete") {
-  document.addEventListener("readystatechange", function () {
-    if (document.readyState == "complete") {
-      if (typeof dartMainRunner === "function") {
-        dartMainRunner(function() { $.startRootIsolate($.main); });
-      } else {
-        $.startRootIsolate($.main);
-      }
-    }
-  }, false);
-} else {
-  if (typeof dartMainRunner === "function") {
-    dartMainRunner(function() { $.startRootIsolate($.main); });
-  } else {
-    $.startRootIsolate($.main);
-  }
-}
-// END invoke [main].
-function init() {
-  Isolate.$isolateProperties = {};
-  function generateAccessor(field, prototype) {
-    var len = field.length;
-    var code = field.charCodeAt(len - 1);
-    code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? code - 117 : code >= 37 && code <= 43 ? code - 27 : 0;
-    if (code) {
-      var getterCode = code & 3;
-      var setterCode = code >> 2;
-      var accessorName = field = field.substring(0, len - 1);
-      var divider = field.indexOf(":");
-      if (divider > 0) {
-        accessorName = field.substring(0, divider);
-        field = field.substring(divider + 1);
-      }
-      if (getterCode) {
-        var args = getterCode & 2 ? "receiver" : "";
-        var receiver = getterCode & 1 ? "this" : "receiver";
-        var body = "return " + receiver + "." + field;
-        prototype["get$" + accessorName] = new Function(args, body);
-      }
-      if (setterCode) {
-        var args = setterCode & 2 ? "receiver, value" : "value";
-        var receiver = setterCode & 1 ? "this" : "receiver";
-        var body = receiver + "." + field + " = value";
-        prototype["set$" + accessorName] = new Function(args, body);
-      }
-    }
-    return field;
-  }
-  Isolate.$isolateProperties.$generateAccessor = generateAccessor;
-  function defineClass(cls, fields, prototype) {
-    var constructor;
-    if (typeof fields == "function") {
-      constructor = fields;
-    } else {
-      var str = "function " + cls + "(";
-      var body = "";
-      for (var i = 0; i < fields.length; i++) {
-        if (i != 0)
-          str += ", ";
-        var field = fields[i];
-        field = generateAccessor(field, prototype);
-        str += field;
-        body += "this." + field + " = " + field + ";\n";
-      }
-      str += ") {" + body + "}\nreturn " + cls;
-      constructor = new Function(str)();
-    }
-    constructor.prototype = prototype;
-    constructor.builtin$cls = cls;
-    return constructor;
-  }
-  var supportsProto = false;
-  var tmp = defineClass("c", ["f?"], {}).prototype;
-  if (tmp.__proto__) {
-    tmp.__proto__ = {};
-    if (typeof tmp.get$f != "undefined")
-      supportsProto = true;
-  }
-  Isolate.$finishClasses = function(collectedClasses, isolateProperties, existingIsolateProperties) {
-    var pendingClasses = {};
-    var hasOwnProperty = Object.prototype.hasOwnProperty;
-    for (var cls in collectedClasses) {
-      if (hasOwnProperty.call(collectedClasses, cls)) {
-        var desc = collectedClasses[cls];
-        var fields = desc[""], supr;
-        if (typeof fields == "string") {
-          var s = fields.split(";");
-          supr = s[0];
-          fields = s[1] == "" ? [] : s[1].split(",");
-        } else {
-          supr = desc.super;
-        }
-        isolateProperties[cls] = defineClass(cls, fields, desc);
-        if (supr)
-          pendingClasses[cls] = supr;
-      }
-    }
-    var finishedClasses = {};
-    function finishClass(cls) {
-      var hasOwnProperty = Object.prototype.hasOwnProperty;
-      if (hasOwnProperty.call(finishedClasses, cls))
-        return;
-      finishedClasses[cls] = true;
-      var superclass = pendingClasses[cls];
-      if (!superclass || typeof superclass != "string")
-        return;
-      finishClass(superclass);
-      var constructor = isolateProperties[cls];
-      var superConstructor = isolateProperties[superclass];
-      if (!superConstructor)
-        superConstructor = existingIsolateProperties[superclass];
-      var prototype = constructor.prototype;
-      if (supportsProto) {
-        prototype.__proto__ = superConstructor.prototype;
-        prototype.constructor = constructor;
-      } else {
-        function tmp() {
-        }
-        tmp.prototype = superConstructor.prototype;
-        var newPrototype = new tmp();
-        constructor.prototype = newPrototype;
-        newPrototype.constructor = constructor;
-        for (var member in prototype) {
-          if (!member)
-            continue;
-          if (hasOwnProperty.call(prototype, member)) {
-            newPrototype[member] = prototype[member];
-          }
-        }
-      }
-    }
-    for (var cls in pendingClasses)
-      finishClass(cls);
-  };
-  Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyValue) {
-    var getter = new Function("{ return $." + fieldName + ";}");
-    var sentinelUndefined = {};
-    var sentinelInProgress = {};
-    prototype[fieldName] = sentinelUndefined;
-    prototype[getterName] = function() {
-      var result = $[fieldName];
-      try {
-        if (result === sentinelUndefined) {
-          $[fieldName] = sentinelInProgress;
-          try {
-            result = $[fieldName] = lazyValue();
-          } finally {
-            if (result === sentinelUndefined) {
-              if ($[fieldName] === sentinelInProgress) {
-                $[fieldName] = null;
-              }
-            }
-          }
-        } else {
-          if (result === sentinelInProgress)
-            $.throwCyclicInit(staticName);
-        }
-        return result;
-      } finally {
-        $[getterName] = getter;
-      }
-    };
-  };
-  Isolate.$finishIsolateConstructor = function(oldIsolate) {
-    var isolateProperties = oldIsolate.$isolateProperties;
-    isolateProperties.$currentScript = typeof document == "object" ? document.currentScript || document.scripts[document.scripts.length - 1] : null;
-    var isolatePrototype = oldIsolate.prototype;
-    var str = "{\n";
-    str += "var properties = Isolate.$isolateProperties;\n";
-    var hasOwnProperty = Object.prototype.hasOwnProperty;
-    for (var staticName in isolateProperties) {
-      if (hasOwnProperty.call(isolateProperties, staticName)) {
-        str += "this." + staticName + "= properties." + staticName + ";\n";
-      }
-    }
-    str += "}\n";
-    var newIsolate = new Function(str);
-    newIsolate.prototype = isolatePrototype;
-    isolatePrototype.constructor = newIsolate;
-    newIsolate.$isolateProperties = isolateProperties;
-    newIsolate.$finishClasses = oldIsolate.$finishClasses;
-    return newIsolate;
-  };
-}
-//@ sourceMappingURL=vmstats.dart.js.map
diff --git a/runtime/bin/vmstats/vmstats.html b/runtime/bin/vmstats/vmstats.html
deleted file mode 100644
index c64b629..0000000
--- a/runtime/bin/vmstats/vmstats.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!-- 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.
--->
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>VM Stats</title>
-    <link rel="stylesheet" href="vmstats.css">
-    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-  </head>
-  <body>
-    <h1>VM Stats</h1>
-    <div id="vmstats">
-      <p id="dashboard">
-        <h3>Allocated Memory</h3>
-        <canvas id="graph" width="480px" height="240px"></canvas>
-        <h3>Isolates</h3>
-        <table id="isolateList"></table>
-      </p>
-    </div>
-    <div id="statusSection">
-      <p id="statusText"></p>
-    </div>
-
-    <script type="application/dart" src="vmstats.dart"></script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/runtime/bin/vmstats_impl.cc b/runtime/bin/vmstats_impl.cc
deleted file mode 100644
index b3eebff..0000000
--- a/runtime/bin/vmstats_impl.cc
+++ /dev/null
@@ -1,483 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "bin/vmstats_impl.h"
-
-#include "bin/file.h"
-#include "bin/log.h"
-#include "bin/platform.h"
-#include "bin/resources.h"
-#include "bin/socket.h"
-#include "bin/thread.h"
-#include "bin/utils.h"
-#include "include/dart_debugger_api.h"
-#include "platform/json.h"
-
-
-namespace dart {
-namespace bin {
-
-#define BUFSIZE 8192
-#define RETRY_PAUSE 100  // milliseconds
-
-static const char* INDEX_HTML = "index.html";
-static const char* VMSTATS_HTML = "vmstats.html";
-static const char* DEFAULT_HOST = "localhost";
-
-// Global static pointer used to ensure a single instance of the class.
-VmStats* VmStats::instance_ = NULL;
-dart::Monitor* VmStats::instance_monitor_;
-dart::Mutex* VmStatusService::mutex_;
-
-
-void VmStats::Start(int port, const char* root_dir, bool verbose) {
-  if (instance_ != NULL) {
-    FATAL("VmStats already started.");
-  }
-  instance_ = new VmStats(verbose);
-  instance_monitor_ = new dart::Monitor();
-  Initialize();
-  VmStatusService::InitOnce();
-
-  if (port >= 0) {
-    StartServer(port, root_dir);
-  }
-}
-
-
-void VmStats::StartServer(int port, const char* root_dir) {
-  ASSERT(port >= 0);
-  ASSERT(instance_ != NULL);
-  ASSERT(instance_monitor_ != NULL);
-  Socket::Initialize();
-
-  if (root_dir != NULL) {
-    instance_->root_directory_ = root_dir;
-  }
-
-  // TODO(tball): allow host to be specified.
-  char* host = const_cast<char*>(DEFAULT_HOST);
-  OSError* os_error;
-  AddressList<SocketAddress>* addresses =
-      Socket::LookupAddress(host, -1, &os_error);
-  if (addresses == NULL) {
-    Log::PrintErr("Failed IP lookup of VmStats host %s: %s\n",
-                  host, os_error->message());
-    return;
-  }
-  const intptr_t BACKLOG = 128;  // Default value from HttpServer.dart
-  int64_t address = ServerSocket::CreateBindListen(
-      addresses->GetAt(0)->addr(), port, BACKLOG);
-  delete addresses;
-  if (address < 0) {
-    Log::PrintErr("Failed binding VmStats socket: %s:%d\n", host, port);
-    return;
-  }
-  instance_->bind_address_ = address;
-  Log::Print("VmStats URL: http://%s:%"Pd"/\n", host, Socket::GetPort(address));
-
-  MonitorLocker ml(instance_monitor_);
-  instance_->running_ = true;
-  int err = dart::Thread::Start(WebServer, address);
-  if (err != 0) {
-    Log::PrintErr("Failed starting VmStats thread: %d\n", err);
-    Shutdown();
-  }
-}
-
-void VmStats::Stop() {
-  ASSERT(instance_ != NULL);
-  MonitorLocker ml(instance_monitor_);
-  instance_->running_ = false;
-}
-
-
-void VmStats::Shutdown() {
-  ASSERT(instance_ != NULL);
-  MonitorLocker ml(instance_monitor_);
-  Socket::Close(instance_->bind_address_);
-  delete instance_;
-  instance_ = NULL;
-}
-
-
-void VmStats::AddIsolate(IsolateData* isolate_data,
-                         Dart_Isolate isolate) {
-  MonitorLocker ml(instance_monitor_);
-  instance_->isolate_table_[isolate_data] = isolate;
-}
-
-
-void VmStats::RemoveIsolate(IsolateData* isolate_data) {
-  MonitorLocker ml(instance_monitor_);
-  instance_->isolate_table_.erase(isolate_data);
-}
-
-
-static const char* ContentType(const char* url) {
-  const char* suffix = strrchr(url, '.');
-  if (suffix != NULL) {
-    if (!strcmp(suffix, ".html")) {
-      return "text/html; charset=UTF-8";
-    }
-    if (!strcmp(suffix, ".dart")) {
-      return "application/dart; charset=UTF-8";
-    }
-    if (!strcmp(suffix, ".js")) {
-      return "application/javascript; charset=UTF-8";
-    }
-    if (!strcmp(suffix, ".css")) {
-      return "text/css; charset=UTF-8";
-    }
-    if (!strcmp(suffix, ".gif")) {
-      return "image/gif";
-    }
-    if (!strcmp(suffix, ".png")) {
-      return "image/png";
-    }
-    if (!strcmp(suffix, ".jpg") || !strcmp(suffix, ".jpeg")) {
-      return "image/jpeg";
-    }
-  }
-  return "text/plain";
-}
-
-
-// Return a malloc'd string from a format string and arguments.
-intptr_t alloc_printf(char** result, const char* format, ...) {
-  va_list args;
-  va_start(args, format);
-  intptr_t len = vsnprintf(NULL, 0, format, args) + 1;
-  *result = reinterpret_cast<char*>(malloc(len));
-  return vsnprintf(*result, len, format, args);
-}
-
-
-void writeResponse(intptr_t socket, const char* content_type,
-                   const char* data, size_t length) {
-  char* header;
-  intptr_t len = alloc_printf(&header,
-      "HTTP/1.1 200 OK\nContent-Type: %s\nContent-Length: %"Pu"\n\n",
-      content_type, length);
-  Socket::Write(socket, header, len);
-  Socket::Write(socket, data, length);
-  Socket::Write(socket, "\n", 1);
-  free(header);
-}
-
-
-void writeErrorResponse(intptr_t socket, intptr_t error_num, const char* error,
-                        const char* description) {
-  if (description != NULL) {
-    // Create body first, so its length is known when creating the header.
-    char* body;
-    intptr_t body_len = alloc_printf(&body,
-        "<html><head><title>%d %s</title></head>\n"
-        "<body>\n<h1>%s</h1>\n%s\n</body></html>\n",
-        error_num, error, error, description);
-    char* header;
-    intptr_t header_len = alloc_printf(&header,
-        "HTTP/1.1 %d %s\n"
-        "Content-Length: %d\n"
-        "Connection: close\n"
-        "Content-Type: text/html\n\n",
-        error_num, error, body_len);
-    Socket::Write(socket, header, header_len);
-    Socket::Write(socket, body, body_len);
-    free(header);
-    free(body);
-  } else {
-    char* response;
-    intptr_t len =
-        alloc_printf(&response, "HTTP/1.1 %d %s\n\n", error_num, error);
-    Socket::Write(socket, response, len);
-    free(response);
-  }
-}
-
-
-void VmStats::WebServer(uword bind_address) {
-  while (true) {
-    intptr_t socket = ServerSocket::Accept(bind_address);
-    if (socket == ServerSocket::kTemporaryFailure) {
-      // Not a real failure, woke up but no connection available.
-
-      // Use MonitorLocker.Wait(), since it has finer granularity than sleep().
-      dart::Monitor m;
-      MonitorLocker ml(&m);
-      ml.Wait(RETRY_PAUSE);
-
-      continue;
-    }
-    if (socket < 0) {
-      // Stop() closed the socket.
-      return;
-    }
-    Socket::SetBlocking(socket);
-
-    // TODO(tball): rewrite this to use STL, so as to eliminate the static
-    // buffer and support resource URLs that are longer than BUFSIZE.
-
-    // Read request.
-    char buffer[BUFSIZE + 1];
-    intptr_t len = Socket::Read(socket, buffer, BUFSIZE);
-    if (len <= 0) {
-      // Invalid HTTP request, ignore.
-      continue;
-    }
-    buffer[len] = '\0';
-
-    // Verify it's a GET request.
-    // TODO(tball): support POST requests.
-    if (strncmp("GET ", buffer, 4) != 0 && strncmp("get ", buffer, 4) != 0) {
-      Log::PrintErr("Unsupported HTTP request type");
-      writeErrorResponse(socket, 403, "Forbidden",
-                         "Unsupported HTTP request type");
-      Socket::Close(socket);
-      continue;
-    }
-
-    // Extract GET URL, and null-terminate URL in case request line has
-    // HTTP version.
-    for (int i = 4; i < len; i++) {
-      if (buffer[i] == ' ') {
-        buffer[i] = '\0';
-      }
-    }
-    char* url = strdup(&buffer[4]);
-
-    if (instance_->verbose_) {
-      Log::Print("vmstats: %s requested\n", url);
-    }
-    char* content = NULL;
-
-    // Check for VmStats-specific URLs.
-    if (strcmp(url, "/isolates") == 0) {
-      content = instance_->IsolatesStatus();
-    } else {
-      // Check plug-ins.
-      content = VmStatusService::GetVmStatus(url);
-    }
-
-    if (content != NULL) {
-      writeResponse(socket, "application/json", content, strlen(content));
-      free(content);
-    } else {
-      // No status content with this URL, return file or resource content.
-      dart::TextBuffer path(strlen(instance_->root_directory_) + strlen(url));
-      path.AddString(instance_->root_directory_);
-      path.AddString(url);
-
-      // Expand directory URLs.
-      if (strcmp(url, "/") == 0) {
-        path.AddString(VMSTATS_HTML);
-      } else if (url[strlen(url) - 1] == '/') {
-        path.AddString(INDEX_HTML);
-      }
-
-      bool success = false;
-      char* text_buffer = NULL;
-      const char* content_type = ContentType(path.buf());
-      if (File::Exists(path.buf())) {
-        File* f = File::Open(path.buf(), File::kRead);
-        if (f != NULL) {
-          intptr_t len = f->Length();
-          text_buffer = reinterpret_cast<char*>(malloc(len));
-          if (f->ReadFully(text_buffer, len)) {
-            writeResponse(socket, content_type, text_buffer, len);
-            success = true;
-          }
-          free(text_buffer);
-          delete f;
-        }
-      } else {
-        const char* resource;
-        intptr_t len = Resources::ResourceLookup(path.buf(), &resource);
-        if (len != Resources::kNoSuchInstance) {
-          ASSERT(len >= 0);
-          writeResponse(socket, content_type, resource, len);
-          success = true;
-        }
-      }
-      if (!success) {
-        char* description;
-        alloc_printf(
-            &description, "URL <a href=\"%s\">%s</a> not found.", url, url);
-        writeErrorResponse(socket, 404, "Not Found", description);
-        free(description);
-      }
-    }
-    Socket::Close(socket);
-    free(url);
-  }
-
-  Shutdown();
-}
-
-
-char* VmStats::IsolatesStatus() {
-  dart::TextBuffer text(64);
-  text.Printf("{\n\"isolates\": [\n");
-  IsolateTable::iterator itr;
-  bool first = true;
-  for (itr = isolate_table_.begin(); itr != isolate_table_.end(); ++itr) {
-    Dart_Isolate isolate = itr->second;
-    static char request[512];
-    snprintf(request, sizeof(request),
-             "/isolate/0x%"Px,
-             reinterpret_cast<intptr_t>(isolate));
-    char* status = VmStatusService::GetVmStatus(request);
-    if (status != NULL) {
-      if (!first) {
-        text.AddString(",\n");
-      }
-      text.AddString(status);
-      first = false;
-      free(status);
-    }
-  }
-  text.AddString("\n]\n}\n");
-  return strdup(text.buf());
-}
-
-
-// Advance the scanner to the value token of a specified name-value pair.
-void SeekNamedValue(const char* name, dart::JSONScanner* scanner) {
-  while (!scanner->EOM()) {
-    scanner->Scan();
-    if (scanner->IsStringLiteral(name)) {
-      scanner->Scan();
-      ASSERT(scanner->CurrentToken() == dart::JSONScanner::TokenColon);
-      scanner->Scan();
-     return;
-    }
-  }
-}
-
-
-// Windows doesn't have strndup(), so this is a simple, private version.
-static char* StrNDup(const char* s, uword len) {
-  if (strlen(s) < len) {
-    len = strlen(s);
-  }
-  char* result = reinterpret_cast<char*>(malloc(len + 1));
-  memmove(result, s, len);
-  result[len + 1] = '\0';
-  return result;
-}
-
-
-void VmStats::DumpStackThread(uword unused) {
-  Log::Print("Isolate dump:\n");
-  IsolateTable::iterator itr;
-  MonitorLocker ml(instance_monitor_);
-  for (itr = instance_->isolate_table_.begin();
-       itr != instance_->isolate_table_.end(); ++itr) {
-    Dart_Isolate isolate = itr->second;
-
-    // Print isolate name and details.
-    static char buffer[512];
-    snprintf(buffer, sizeof(buffer),
-             "/isolate/0x%"Px, reinterpret_cast<intptr_t>(isolate));
-    char* isolate_details = VmStatusService::GetVmStatus(buffer);
-    if (isolate_details != NULL) {
-      dart::JSONScanner scanner(isolate_details);
-      SeekNamedValue("name", &scanner);
-      char* name = StrNDup(scanner.TokenChars(), scanner.TokenLen());
-      SeekNamedValue("port", &scanner);
-      char* port = StrNDup(scanner.TokenChars(), scanner.TokenLen());
-      Log::Print("\"%s\" port=%s\n", name, port);
-      free(isolate_details);
-      free(port);
-      free(name);
-    }
-
-    // Print stack trace.
-    snprintf(buffer, sizeof(buffer),
-             "/isolate/0x%"Px"/stacktrace",
-             reinterpret_cast<intptr_t>(isolate));
-    char* trace = VmStatusService::GetVmStatus(buffer);
-    if (trace != NULL) {
-      dart::JSONScanner scanner(trace);
-      while (true) {
-        SeekNamedValue("url", &scanner);
-        if (scanner.CurrentToken() == dart::JSONScanner::TokenEOM) {
-          break;
-        }
-        char* url = StrNDup(scanner.TokenChars(), scanner.TokenLen());
-        SeekNamedValue("line", &scanner);
-        char* line = StrNDup(scanner.TokenChars(), scanner.TokenLen());
-        SeekNamedValue("function", &scanner);
-        char* function = StrNDup(scanner.TokenChars(), scanner.TokenLen());
-        Log::Print("  at %s(%s:%s)\n", function, url, line);
-        free(url);
-        free(line);
-        free(function);
-      }
-      free(trace);
-    }
-  }
-}
-
-
-void VmStats::DumpStack() {
-  int err = dart::Thread::Start(DumpStackThread, 0);
-  if (err != 0) {
-    Log::PrintErr("Failed starting VmStats stackdump thread: %d\n", err);
-    Shutdown();
-  }
-}
-
-
-// Global static pointer used to ensure a single instance of the class.
-VmStatusService* VmStatusService::instance_ = NULL;
-
-
-void VmStatusService::InitOnce() {
-  ASSERT(VmStatusService::instance_ == NULL);
-  VmStatusService::instance_ = new VmStatusService();
-  VmStatusService::mutex_ = new dart::Mutex();
-
-  // Register built-in status plug-ins. RegisterPlugin is not used because
-  // this isn't called within an isolate, and because parameter checking
-  // isn't necessary.
-  instance_->RegisterPlugin(&Dart_GetVmStatus);
-
-  // TODO(tball): dynamically load any additional plug-ins.
-}
-
-
-int VmStatusService::RegisterPlugin(Dart_VmStatusCallback callback) {
-  ASSERT(VmStatusService::instance_ != NULL);
-  ASSERT(VmStatusService::mutex_ != NULL);
-  MutexLocker ml(mutex_);
-  if (callback == NULL) {
-    return -1;
-  }
-  VmStatusPlugin* plugin = new VmStatusPlugin(callback);
-  VmStatusPlugin* list = instance_->registered_plugin_list_;
-  if (list == NULL) {
-    instance_->registered_plugin_list_ = plugin;
-  } else {
-    list->Append(plugin);
-  }
-  return 0;
-}
-
-
-char* VmStatusService::GetVmStatus(const char* request) {
-  ASSERT(VmStatusService::instance_ != NULL);
-  VmStatusPlugin* plugin = instance_->registered_plugin_list_;
-  while (plugin != NULL) {
-    char* result = (plugin->callback())(request);
-    if (result != NULL) {
-      return result;
-    }
-    plugin = plugin->next();
-  }
-  return NULL;
-}
-
-}  // namespace bin
-}  // namespace dart
diff --git a/runtime/bin/vmstats_impl.h b/runtime/bin/vmstats_impl.h
deleted file mode 100644
index ed92e87..0000000
--- a/runtime/bin/vmstats_impl.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef BIN_VMSTATS_IMPL_H_
-#define BIN_VMSTATS_IMPL_H_
-
-#include "bin/vmstats.h"
-
-#include <map>
-
-#include "bin/isolate_data.h"
-#include "platform/thread.h"
-
-
-namespace dart {
-namespace bin {
-
-// VmStats is a HTTP singleton service that reports status information
-// of the running VM.
-
-class VmStats {
- public:
-  static void Initialize();
-
-  static void Start(int port, const char* root_dir, bool verbose);
-  static void Stop();
-
-  // Add and remove functions for the isolate_table, called by main.cc.
-  static void AddIsolate(IsolateData* isolate_data, Dart_Isolate isolate);
-  static void RemoveIsolate(IsolateData* isolate_data);
-
-  // Print stack traces of current isolates to stdout.
-  static void DumpStack();
-
- private:
-  explicit VmStats(bool verbose) :
-      root_directory_(NULL), running_(false), bind_address_(0) {
-    verbose_ = verbose;
-  }
-
-  static void StartServer(int port, const char* root_dir);
-  static void WebServer(uword bind_address);
-  static void Shutdown();
-  static void DumpStackThread(uword unused);
-
-  // Status text generators.
-  char* IsolatesStatus();
-
-  typedef std::map<IsolateData*, Dart_Isolate> IsolateTable;
-
-  const char* root_directory_;
-  IsolateTable isolate_table_;
-  bool running_;
-  int64_t bind_address_;
-  bool verbose_;
-
-  static VmStats* instance_;
-  static dart::Monitor* instance_monitor_;
-
-  // Disallow copy constructor.
-  DISALLOW_COPY_AND_ASSIGN(VmStats);
-};
-
-
-// Status plug-in and linked-list node.
-class VmStatusPlugin {
- public:
-  explicit VmStatusPlugin(Dart_VmStatusCallback callback)
-      : callback_(callback), next_(NULL) {}
-
-  void Append(VmStatusPlugin* plugin) {
-    VmStatusPlugin* list = this;
-    while (list->next_ != NULL) {
-      list = list->next_;
-    }
-    list->next_ = plugin;
-  }
-
-  Dart_VmStatusCallback callback() { return callback_; }
-  VmStatusPlugin* next() { return next_; }
-
- private:
-  Dart_VmStatusCallback callback_;
-  VmStatusPlugin* next_;
-};
-
-
-// Singleton service managing VM status gathering and status plug-in
-// registration.
-class VmStatusService {
- public:
-  static int RegisterPlugin(Dart_VmStatusCallback callback);
-
-  // Returns VM status for a specified request. The caller is responsible
-  // for releasing the heap memory after use.
-  static char* GetVmStatus(const char* request);
-
-  static void InitOnce();
-
- private:
-  VmStatusService() : registered_plugin_list_(NULL) {}
-
-  static VmStatusService* instance_;
-  static dart::Mutex* mutex_;
-
-  VmStatusPlugin* registered_plugin_list_;
-
-  DISALLOW_COPY_AND_ASSIGN(VmStatusService);
-};
-
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // BIN_VMSTATS_IMPL_H_
diff --git a/runtime/bin/vmstats_impl_android.cc b/runtime/bin/vmstats_impl_android.cc
deleted file mode 100644
index 5baa0d4..0000000
--- a/runtime/bin/vmstats_impl_android.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "platform/globals.h"
-#if defined(TARGET_OS_ANDROID)
-
-#include "bin/vmstats_impl.h"
-
-#include <signal.h>  // NOLINT
-
-
-namespace dart {
-namespace bin {
-
-static void sig_handler(int sig, siginfo_t* siginfo, void*) {
-  if (sig == SIGQUIT) {
-    VmStats::DumpStack();
-  } else {
-    FATAL1("unrequested signal %d received\n", sig);
-  }
-}
-
-void VmStats::Initialize() {
-  // Enable SIGQUIT (ctrl-\) stack dumps.
-  struct sigaction sigact;
-  memset(&sigact, '\0', sizeof(sigact));
-  sigact.sa_sigaction = sig_handler;
-  sigact.sa_flags = SA_SIGINFO;
-  if (sigaction(SIGQUIT, &sigact, NULL) < 0) {
-    perror("sigaction");
-  }
-}
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // defined(TARGET_OS_ANDROID)
-
diff --git a/runtime/bin/vmstats_impl_linux.cc b/runtime/bin/vmstats_impl_linux.cc
deleted file mode 100644
index 93efbf2..0000000
--- a/runtime/bin/vmstats_impl_linux.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "platform/globals.h"
-#if defined(TARGET_OS_LINUX)
-
-#include "bin/vmstats_impl.h"
-
-#include <signal.h>  // NOLINT
-
-
-namespace dart {
-namespace bin {
-
-static void sig_handler(int sig, siginfo_t* siginfo, void*) {
-  if (sig == SIGQUIT) {
-    VmStats::DumpStack();
-  } else {
-    FATAL1("unrequested signal %d received\n", sig);
-  }
-}
-
-void VmStats::Initialize() {
-  // Enable SIGQUIT (ctrl-\) stack dumps.
-  struct sigaction sigact;
-  memset(&sigact, '\0', sizeof(sigact));
-  sigact.sa_sigaction = sig_handler;
-  sigact.sa_flags = SA_SIGINFO;
-  if (sigaction(SIGQUIT, &sigact, NULL) < 0) {
-    perror("sigaction");
-  }
-}
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // defined(TARGET_OS_LINUX)
diff --git a/runtime/bin/vmstats_impl_macos.cc b/runtime/bin/vmstats_impl_macos.cc
deleted file mode 100644
index 23cf179..0000000
--- a/runtime/bin/vmstats_impl_macos.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "platform/globals.h"
-#if defined(TARGET_OS_MACOS)
-
-#include "bin/vmstats_impl.h"
-
-#include <signal.h>  // NOLINT
-
-
-namespace dart {
-namespace bin {
-
-static void sig_handler(int sig, siginfo_t* siginfo, void*) {
-  if (sig == SIGQUIT) {
-    VmStats::DumpStack();
-  } else {
-    FATAL1("unrequested signal %d received\n", sig);
-  }
-}
-
-void VmStats::Initialize() {
-  // Enable SIGQUIT (ctrl-\) stack dumps.
-  struct sigaction sigact;
-  memset(&sigact, '\0', sizeof(sigact));
-  sigact.sa_sigaction = sig_handler;
-  sigact.sa_flags = SA_SIGINFO;
-  if (sigaction(SIGQUIT, &sigact, NULL) < 0) {
-    perror("sigaction");
-  }
-}
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // defined(TARGET_OS_MACOS)
diff --git a/runtime/bin/vmstats_impl_win.cc b/runtime/bin/vmstats_impl_win.cc
deleted file mode 100644
index 3157801..0000000
--- a/runtime/bin/vmstats_impl_win.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "platform/globals.h"
-#if defined(TARGET_OS_WINDOWS)
-
-#include "bin/vmstats_impl.h"
-
-#include <signal.h>  // NOLINT
-
-
-namespace dart {
-namespace bin {
-
-static void sig_handler(int sig) {
-  if (sig == SIGBREAK) {
-    VmStats::DumpStack();
-  }
-}
-
-void VmStats::Initialize() {
-  // Enable SIGBREAK (ctrl-break) stack dumps.
-  if (signal(SIGBREAK, sig_handler) == SIG_ERR) {
-    perror("Adding SIGBREAK signal handler failed");
-  }
-}
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // defined(TARGET_OS_WINDOWS)
diff --git a/runtime/bin/vmstats_sources.gypi b/runtime/bin/vmstats_sources.gypi
deleted file mode 100644
index 2c64dd3..0000000
--- a/runtime/bin/vmstats_sources.gypi
+++ /dev/null
@@ -1,18 +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.
-
-# This file contains all sources for the vmstats application.
-{
-  'sources': [
-    'vmstats/bargraph.dart',
-    'vmstats/favicon.ico',
-    'vmstats/isolate_list.dart',
-    'vmstats/models.dart',
-    'vmstats/packages/browser/dart.js',
-    'vmstats/vmstats.css',
-    'vmstats/vmstats.dart',
-    'vmstats/vmstats.dart.js',
-    'vmstats/vmstats.html',
-  ],
-}
diff --git a/runtime/lib/error.cc b/runtime/lib/error.cc
index f9794a0..95bead2 100644
--- a/runtime/lib/error.cc
+++ b/runtime/lib/error.cc
@@ -26,27 +26,26 @@
   intptr_t assertion_end =
       Smi::CheckedHandle(arguments->NativeArgAt(1)).Value();
 
-  // Allocate a new instance of type AssertionError.
-  const Instance& assertion_error = Instance::Handle(
-      Exceptions::NewInstance("AssertionErrorImplementation"));
+  const Array& args = Array::Handle(Array::New(4));
 
-  // Initialize 'url', 'line', and 'column' fields.
   DartFrameIterator iterator;
   iterator.NextFrame();  // Skip native call.
   const Script& script = Script::Handle(Exceptions::GetCallerScript(&iterator));
-  const Class& cls = Class::Handle(assertion_error.clazz());
-  Exceptions::SetLocationFields(assertion_error, cls, script, assertion_start);
 
-  // Initialize field 'failed_assertion' with source snippet.
+  // Initialize argument 'failed_assertion' with source snippet.
   intptr_t from_line, from_column;
   script.GetTokenLocation(assertion_start, &from_line, &from_column);
   intptr_t to_line, to_column;
   script.GetTokenLocation(assertion_end, &to_line, &to_column);
-  Exceptions::SetField(assertion_error, cls, "failedAssertion", String::Handle(
+  args.SetAt(0, String::Handle(
       script.GetSnippet(from_line, from_column, to_line, to_column)));
 
-  // Throw AssertionError instance.
-  Exceptions::Throw(assertion_error);
+  // Initialize location arguments starting at position 1.
+  args.SetAt(1, String::Handle(script.url()));
+  args.SetAt(2, Smi::Handle(Smi::New(from_line)));
+  args.SetAt(3, Smi::Handle(Smi::New(from_column)));
+
+  Exceptions::ThrowByType(Exceptions::kAssertion, args);
   UNREACHABLE();
   return Object::null();
 }
@@ -85,25 +84,18 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
   intptr_t fallthrough_pos = smi_pos.Value();
 
-  // Allocate a new instance of type FallThroughError.
-  const Instance& fallthrough_error = Instance::Handle(Exceptions::NewInstance(
-      "FallThroughErrorImplementation"));
-  ASSERT(!fallthrough_error.IsNull());
+  const Array& args = Array::Handle(Array::New(2));
 
-  // Initialize 'url' and 'line' fields.
+  // Initialize 'url' and 'line' arguments.
   DartFrameIterator iterator;
   iterator.NextFrame();  // Skip native call.
   const Script& script = Script::Handle(Exceptions::GetCallerScript(&iterator));
-  const Class& cls = Class::Handle(fallthrough_error.clazz());
-  Exceptions::SetField(fallthrough_error, cls, "url",
-                       String::Handle(script.url()));
+  args.SetAt(0, String::Handle(script.url()));
   intptr_t line, column;
   script.GetTokenLocation(fallthrough_pos, &line, &column);
-  Exceptions::SetField(fallthrough_error, cls, "line",
-                       Smi::Handle(Smi::New(line)));
+  args.SetAt(1, Smi::Handle(Smi::New(line)));
 
-  // Throw FallThroughError instance.
-  Exceptions::Throw(fallthrough_error);
+  Exceptions::ThrowByType(Exceptions::kFallThrough, args);
   UNREACHABLE();
   return Object::null();
 }
@@ -118,24 +110,19 @@
   GET_NON_NULL_NATIVE_ARGUMENT(String, class_name, arguments->NativeArgAt(1));
   intptr_t error_pos = smi_pos.Value();
 
-  // Allocate a new instance of type AbstractClassInstantiationError.
-  const Instance& error = Instance::Handle(Exceptions::NewInstance(
-      "AbstractClassInstantiationErrorImplementation"));
-  ASSERT(!error.IsNull());
+  const Array& args = Array::Handle(Array::New(3));
 
-  // Initialize 'url', 'line' and 'className' fields.
+  // Initialize 'className', 'url' and 'line' arguments.
   DartFrameIterator iterator;
   iterator.NextFrame();  // Skip native call.
   const Script& script = Script::Handle(Exceptions::GetCallerScript(&iterator));
-  const Class& cls = Class::Handle(error.clazz());
-  Exceptions::SetField(error, cls, "url", String::Handle(script.url()));
+  args.SetAt(0, class_name);
+  args.SetAt(1, String::Handle(script.url()));
   intptr_t line, column;
   script.GetTokenLocation(error_pos, &line, &column);
-  Exceptions::SetField(error, cls, "line", Smi::Handle(Smi::New(line)));
-  Exceptions::SetField(error, cls, "className", class_name);
+  args.SetAt(2, Smi::Handle(Smi::New(line)));
 
-  // Throw AbstractClassInstantiationError instance.
-  Exceptions::Throw(error);
+  Exceptions::ThrowByType(Exceptions::kAbstractClassInstantiation, args);
   UNREACHABLE();
   return Object::null();
 }
diff --git a/runtime/lib/error.dart b/runtime/lib/error.dart
index acac035..dc50c4c 100644
--- a/runtime/lib/error.dart
+++ b/runtime/lib/error.dart
@@ -4,13 +4,13 @@
 // Errors are created and thrown by DartVM only.
 // Changes here should also be reflected in corelib/error.dart as well
 
-class AssertionErrorImplementation extends AssertionError {
-  factory AssertionErrorImplementation._uninstantiable() {
-    throw new UnsupportedError(
-        "AssertionError can only be allocated by the VM");
-  }
+class _AssertionErrorImplementation extends AssertionError {
+  _AssertionErrorImplementation(
+    this.failedAssertion, this.url, this.line, this.column);
+
   static _throwNew(int assertionStart, int assertionEnd)
       native "AssertionError_throwNew";
+
   String toString() {
     return "'$url': Failed assertion: line $line pos $column: "
         "'$failedAssertion' is not true.";
@@ -21,21 +21,24 @@
   final int column;
 }
 
-class TypeErrorImplementation
-    extends AssertionErrorImplementation
+class _TypeErrorImplementation
+    extends _AssertionErrorImplementation
     implements TypeError {
-  factory TypeErrorImplementation._uninstantiable() {
-    throw new UnsupportedError(
-        "TypeError can only be allocated by the VM");
-  }
+
+  _TypeErrorImplementation(
+    String failedAssertion, String url, int line, int column,
+    this.srcType, this.dstType, this.dstName, this._malformedError)
+      : super(failedAssertion, url, line, column);
+
   static _throwNew(int location,
                    Object src_value,
                    String dst_type_name,
                    String dst_name,
                    String malformed_error)
       native "TypeError_throwNew";
+
   String toString() {
-    String str = (malformedError != null) ? malformedError : "";
+    String str = (_malformedError != null) ? _malformedError : "";
     if ((dstName != null) && (dstName.length > 0)) {
       str = "${str}type '$srcType' is not a subtype of "
             "type '$dstType' of '$dstName'.";
@@ -44,23 +47,27 @@
     }
     return str;
   }
+
   final String srcType;
   final String dstType;
   final String dstName;
-  final String malformedError;
+  final String _malformedError;
 }
 
-class CastErrorImplementation
-    extends TypeErrorImplementation
+class _CastErrorImplementation
+    extends _TypeErrorImplementation
     implements CastError {
-  factory CastErrorImplementation._uninstantiable() {
-    throw new UnsupportedError(
-        "CastError can only be allocated by the VM");
-  }
+
+  _CastErrorImplementation(
+    String failedAssertion, String url, int line, int column,
+    String srcType, String dstType, String dstName, String malformedError)
+      : super(failedAssertion, url, line, column,
+              srcType, dstType, dstName, malformedError);
+
   // A CastError is allocated by TypeError._throwNew() when dst_name equals
   // Exceptions::kCastErrorDstName.
   String toString() {
-    String str = (malformedError != null) ? malformedError : "";
+    String str = (_malformedError != null) ? _malformedError : "";
     if ((dstName != null) && (dstName.length > 0)) {
       str = "${str}type '$srcType' is not a subtype of "
             "type '$dstType' in type cast.";
@@ -71,43 +78,42 @@
   }
 }
 
-class FallThroughErrorImplementation extends FallThroughError {
-  factory FallThroughErrorImplementation._uninstantiable() {
-    throw new UnsupportedError(
-        "FallThroughError can only be allocated by the VM");
-  }
+class _FallThroughErrorImplementation extends FallThroughError {
+
+  _FallThroughErrorImplementation(this._url, this._line);
+
   static _throwNew(int case_clause_pos) native "FallThroughError_throwNew";
+
   String toString() {
-    return "'$url': Switch case fall-through at line $line.";
+    return "'$_url': Switch case fall-through at line $_line.";
   }
-  final String url;
-  final int line;
+
+  final String _url;
+  final int _line;
 }
 
-class InternalError {
-  const InternalError(this._msg);
+class _InternalError {
+  const _InternalError(this._msg);
   String toString() => "InternalError: '${_msg}'";
   final String _msg;
 }
 
 
-class AbstractClassInstantiationErrorImplementation
+class _AbstractClassInstantiationErrorImplementation
     extends AbstractClassInstantiationError {
 
-  factory AbstractClassInstantiationErrorImplementation._uninstantiable() {
-    throw new UnsupportedError(
-        "AbstractClassInstantiationError can only be allocated by the VM");
-  }
+  _AbstractClassInstantiationErrorImplementation(
+      String className, this._url, this._line)
+      : super(className);
 
   static _throwNew(int case_clause_pos, String className)
       native "AbstractClassInstantiationError_throwNew";
 
   String toString() {
-    return "Cannot instantiate abstract class $className: "
-           "url '$url' line $line";
+    return "Cannot instantiate abstract class $_className: "
+           "_url '$_url' line $_line";
   }
 
-  final String className;
-  final String url;
-  final int line;
+  final String _url;
+  final int _line;
 }
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index f14a504..7016190 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -6,7 +6,9 @@
   /* patch */ static String _objectToString(Object object) {
     return Object._toString(object);
   }
+}
 
+patch class StackTraceOnThrow {
   // TODO(11680): implement stackTrace on Error.
   /* patch */ StackTrace get stackTrace => null;
 }
@@ -173,7 +175,7 @@
   }
 }
 
-class _FiftyThreeBitOverflowError extends Error {
+class _FiftyThreeBitOverflowError extends Error with StackTraceOnThrow {
   final Object _value;
 
   _FiftyThreeBitOverflowError(this._value);
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 219b45b..16e9286 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -83,18 +83,11 @@
   final Map<Uri, LibraryMirror> libraries;
   final IsolateMirror isolate;
 
-  // TODO(11743): dynamicType and voidType should not respond to the 
-  // ClassMirror protocol, so they should not inherit from the ClassMirror
-  // implementation.
-
   TypeMirror _dynamicType = null;
 
   TypeMirror get dynamicType {
     if (_dynamicType == null) {
-      _dynamicType =
-          new _LocalClassMirrorImpl(
-              null, null, 'dynamic', false, null, null, [], null,
-              const {}, const {}, const {});
+      _dynamicType = new _SpecialTypeMirrorImpl(_s('dynamic'));
     }
     return _dynamicType;
   }
@@ -103,10 +96,7 @@
 
   TypeMirror get voidType {
     if (_voidType == null) {
-      _voidType =
-          new _LocalClassMirrorImpl(
-              null, null, 'void', false, null, null, [], null,
-              const {}, const {}, const {});
+      _voidType = new _SpecialTypeMirrorImpl(_s('void'));
     }
     return _voidType;
   }
@@ -1023,6 +1013,31 @@
   }
 }
 
+class _SpecialTypeMirrorImpl extends _LocalMirrorImpl
+    implements TypeMirror, DeclarationMirror {
+  _SpecialTypeMirrorImpl(this.simpleName);
+
+  final bool isPrivate = false;
+  final bool isTopLevel = true;
+
+  // Fixed length 0, therefore immutable.
+  final List<InstanceMirror> metadata = new List(0);
+
+  final DeclarationMirror owner = null;
+  final Symbol simpleName;
+
+  SourceLocation get location {
+    throw new UnimplementedError(
+        'TypeMirror.location is not implemented');
+  }
+
+  Symbol get qualifiedName {
+    return simpleName;
+  }
+
+  String toString() => "TypeMirror on '${_n(simpleName)}'";
+}
+
 class _Mirrors {
   // Does a port refer to our local isolate?
   static bool isLocalPort(SendPort port) native 'Mirrors_isLocalPort';
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index d9b0c65..8410af4 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -14,6 +14,7 @@
 namespace dart {
 
 DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(bool, trace_type_checks);
 
 
 DEFINE_NATIVE_ENTRY(Object_cid, 1) {
@@ -127,6 +128,17 @@
         Symbols::Empty(), malformed_error_message);
     UNREACHABLE();
   }
+
+  if (FLAG_trace_type_checks) {
+    const char* result_str = is_instance_of ? "true" : "false";
+    OS::Print("Object.instanceOf: result %s\n", result_str);
+    const Class& instance_class = Class::Handle(instance.clazz());
+    OS::Print("  instance  [class: %s]\n",
+        String::Handle(instance_class.Name()).ToCString());
+    OS::Print("  test-type [class: %s]\n",
+        String::Handle(Class::Handle(type.type_class()).Name()).ToCString());
+    OS::Print("  type-args %s\n", instantiator_type_arguments.ToCString());
+  }
   return Bool::Get(negate.value() ? !is_instance_of : is_instance_of);
 }
 
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index f99e065..3d3780b 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -123,7 +123,7 @@
 #elif defined(_M_IX86) || defined(__i386__)
 #define HOST_ARCH_IA32 1
 #define ARCH_IS_32_BIT 1
-#if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
+#if defined(TARGET_ARCH_MIPS)
 #define kFpuRegisterSize 8
 typedef double fpu_register_t;
 #else
@@ -133,14 +133,14 @@
 #elif defined(__ARMEL__)
 #define HOST_ARCH_ARM 1
 #define ARCH_IS_32_BIT 1
-#define kFpuRegisterSize 8
-typedef double fpu_register_t;
+#define kFpuRegisterSize 16
 typedef struct {
   union {
     uint32_t u;
     float    f;
   } data_[4];
 } simd_value_t;
+typedef simd_value_t fpu_register_t;
 #define simd_value_safe_load(addr)                                             \
   (*reinterpret_cast<simd_value_t *>(addr))
 #define simd_value_safe_store(addr, value)                                     \
diff --git a/runtime/tests/vm/dart/isolate_mirror_local_test.dart b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
index 1ec7093..f76089e 100644
--- a/runtime/tests/vm/dart/isolate_mirror_local_test.dart
+++ b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
@@ -327,11 +327,11 @@
   Expect.equals(const Symbol('dart.core.OutOfMemoryError'),
                 oom_cls.qualifiedName);
   Expect.isFalse(oom_cls.isPrivate);
-  Expect.equals(const Symbol('Object'), oom_cls.superclass.simpleName);
+  Expect.equals(const Symbol('Error'), oom_cls.superclass.simpleName);
   Expect.isTrue(oom_cls.defaultFactory == null);
   Expect.equals(const Symbol('dart.core'), oom_cls.owner.simpleName);
   Expect.isTrue(oom_cls.isClass);
-  Expect.equals(const Symbol('Error'), oom_cls.superinterfaces[0].simpleName);
+  Expect.isTrue(oom_cls.superinterfaces.isEmpty);
   // TODO(ahe): toString() test disabled for now as Symbols are 100% opaque.
   // Expect.equals("ClassMirror on 'OutOfMemoryError'",
   //               oom_cls.toString());
@@ -344,6 +344,10 @@
   testLibrariesMap(mirrors.libraries);
   Expect.equals(const Symbol('void'), mirrors.voidType.simpleName);
   Expect.equals(const Symbol('dynamic'), mirrors.dynamicType.simpleName);
+  Expect.isTrue(mirrors.voidType is TypeMirror);
+  Expect.isTrue(mirrors.dynamicType is TypeMirror);
+  Expect.isFalse(mirrors.voidType is ClassMirror);
+  Expect.isFalse(mirrors.dynamicType is ClassMirror);
   testDone('testMirrorSystem');
 }
 
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index d944996..aa3a33d 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -22,6 +22,7 @@
 DECLARE_FLAG(bool, inline_alloc);
 
 bool CPUFeatures::integer_division_supported_ = false;
+bool CPUFeatures::neon_supported_ = false;
 #if defined(DEBUG)
 bool CPUFeatures::initialized_ = false;
 #endif
@@ -33,12 +34,23 @@
 }
 
 
+bool CPUFeatures::neon_supported() {
+  DEBUG_ASSERT(initialized_);
+  return neon_supported_;
+}
+
+
 // If we are using the simulator, allow tests to enable/disable support for
 // integer division.
 #if defined(USING_SIMULATOR)
 void CPUFeatures::set_integer_division_supported(bool supported) {
   integer_division_supported_ = supported;
 }
+
+
+void CPUFeatures::set_neon_supported(bool supported) {
+  neon_supported_ = supported;
+}
 #endif
 
 
@@ -81,11 +93,13 @@
 void CPUFeatures::InitOnce() {
 #if defined(USING_SIMULATOR)
   integer_division_supported_ = true;
+  neon_supported_ = true;
 #else
   ASSERT(CPUInfoContainsString("ARMv7"));  // Implements ARMv7.
   ASSERT(CPUInfoContainsString("vfp"));  // Has floating point unit.
   // Has integer division.
   integer_division_supported_ = CPUInfoContainsString("idiva");
+  neon_supported_ = CPUInfoContainsString("neon");
 #endif  // defined(USING_SIMULATOR)
 #if defined(DEBUG)
   initialized_ = true;
@@ -1205,6 +1219,33 @@
 }
 
 
+void Assembler::EmitSIMDqqq(int32_t opcode, int sz,
+                            QRegister qd, QRegister qn, QRegister qm) {
+  int32_t encoding =
+      (static_cast<int32_t>(kSpecialCondition) << kConditionShift) |
+      B25 | B6 |
+      opcode | ((sz & 0x3) * B20) |
+      ((static_cast<int32_t>(qd * 2) >> 4)*B22) |
+      ((static_cast<int32_t>(qn * 2) & 0xf)*B16) |
+      ((static_cast<int32_t>(qd * 2) & 0xf)*B12) |
+      ((static_cast<int32_t>(qn * 2) >> 4)*B7) |
+      ((static_cast<int32_t>(qm * 2) >> 4)*B5) |
+      (static_cast<int32_t>(qm * 2) & 0xf);
+  Emit(encoding);
+}
+
+
+void Assembler::vaddqi(int sz, QRegister qd, QRegister qn, QRegister qm) {
+  ASSERT((sz >= 0) && (sz <= 3));
+  EmitSIMDqqq(B11, sz, qd, qn, qm);
+}
+
+
+void Assembler::vaddqs(QRegister qd, QRegister qn, QRegister qm) {
+  EmitSIMDqqq(B11 | B10 | B8, 0, qd, qn, qm);
+}
+
+
 void Assembler::svc(uint32_t imm24, Condition cond) {
   ASSERT(cond != kNoCondition);
   ASSERT(imm24 < (1 << 24));
@@ -2017,7 +2058,9 @@
   EnterFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR), 0);
 
   // Preserve all volatile FPU registers.
-  vstmd(DB_W, SP, kDartFirstVolatileFpuReg, kDartLastVolatileFpuReg);
+  DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
+  DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
+  vstmd(DB_W, SP, firstv, lastv);
 
   ReserveAlignedFrameSpace(frame_space);
 }
@@ -2033,7 +2076,9 @@
   AddImmediate(SP, FP, -kPushedRegistersSize);
 
   // Restore all volatile FPU registers.
-  vldmd(IA_W, SP, kDartFirstVolatileFpuReg, kDartLastVolatileFpuReg);
+  DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
+  DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
+  vldmd(IA_W, SP, firstv, lastv);
 
   // Restore volatile CPU registers.
   LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR));
@@ -2247,11 +2292,9 @@
 
 
 static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
-  "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
-  "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15",
+  "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7",
 #ifdef VFPv3_D32
-  "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23",
-  "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31",
+  "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15",
 #endif
 };
 
diff --git a/runtime/vm/assembler_arm.h b/runtime/vm/assembler_arm.h
index 3117d48..55168ff 100644
--- a/runtime/vm/assembler_arm.h
+++ b/runtime/vm/assembler_arm.h
@@ -68,11 +68,14 @@
   static void InitOnce();
   static bool double_truncate_round_supported() { return false; }
   static bool integer_division_supported();
+  static bool neon_supported();
 #if defined(USING_SIMULATOR)
   static void set_integer_division_supported(bool supported);
+  static void set_neon_supported(bool supported);
 #endif
  private:
   static bool integer_division_supported_;
+  static bool neon_supported_;
 #if defined(DEBUG)
   static bool initialized_;
 #endif
@@ -476,6 +479,8 @@
 
   void vadds(SRegister sd, SRegister sn, SRegister sm, Condition cond = AL);
   void vaddd(DRegister dd, DRegister dn, DRegister dm, Condition cond = AL);
+  void vaddqi(int sz, QRegister qd, QRegister qn, QRegister qm);
+  void vaddqs(QRegister qd, QRegister qn, QRegister qm);
   void vsubs(SRegister sd, SRegister sn, SRegister sm, Condition cond = AL);
   void vsubd(DRegister dd, DRegister dn, DRegister dm, Condition cond = AL);
   void vmuls(SRegister sd, SRegister sn, SRegister sm, Condition cond = AL);
@@ -804,6 +809,9 @@
                  DRegister dd,
                  SRegister sm);
 
+  void EmitSIMDqqq(int32_t opcode, int sz,
+                   QRegister qd, QRegister qn, QRegister qm);
+
   void EmitBranch(Condition cond, Label* label, bool link);
   static int32_t EncodeBranchOffset(int32_t offset, int32_t inst);
   static int DecodeBranchOffset(int32_t inst);
diff --git a/runtime/vm/assembler_arm_test.cc b/runtime/vm/assembler_arm_test.cc
index 2fcf41c..ff50865 100644
--- a/runtime/vm/assembler_arm_test.cc
+++ b/runtime/vm/assembler_arm_test.cc
@@ -1596,6 +1596,181 @@
 }
 
 
+ASSEMBLER_TEST_GENERATE(Vaddqi8, assembler) {
+  if (CPUFeatures::neon_supported()) {
+    __ mov(R0, ShifterOperand(1));
+    __ vmovsr(S0, R0);
+    __ vmovsr(S1, R0);
+    __ vmovsr(S2, R0);
+    __ vmovsr(S3, R0);
+    __ vmovsr(S4, R0);
+    __ vmovsr(S5, R0);
+    __ vmovsr(S6, R0);
+    __ vmovsr(S7, R0);
+
+    __ vaddqi(0, Q2, Q0, Q1);
+
+    __ vmovrs(R0, S8);
+    __ vmovrs(R1, S9);
+    __ vmovrs(R2, S10);
+    __ vmovrs(R3, S11);
+
+    __ add(R0, R0, ShifterOperand(R1));
+    __ add(R0, R0, ShifterOperand(R2));
+    __ add(R0, R0, ShifterOperand(R3));
+    __ bx(LR);
+  } else {
+    __ LoadImmediate(R0, 8);
+    __ bx(LR);
+  }
+}
+
+
+ASSEMBLER_TEST_RUN(Vaddqi8, test) {
+  EXPECT(test != NULL);
+  typedef int (*Tst)();
+  EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Vaddqi16, assembler) {
+  if (CPUFeatures::neon_supported()) {
+    __ mov(R0, ShifterOperand(1));
+    __ vmovsr(S0, R0);
+    __ vmovsr(S1, R0);
+    __ vmovsr(S2, R0);
+    __ vmovsr(S3, R0);
+    __ vmovsr(S4, R0);
+    __ vmovsr(S5, R0);
+    __ vmovsr(S6, R0);
+    __ vmovsr(S7, R0);
+
+    __ vaddqi(1, Q2, Q0, Q1);
+
+    __ vmovrs(R0, S8);
+    __ vmovrs(R1, S9);
+    __ vmovrs(R2, S10);
+    __ vmovrs(R3, S11);
+
+    __ add(R0, R0, ShifterOperand(R1));
+    __ add(R0, R0, ShifterOperand(R2));
+    __ add(R0, R0, ShifterOperand(R3));
+    __ bx(LR);
+  } else {
+    __ LoadImmediate(R0, 8);
+    __ bx(LR);
+  }
+}
+
+
+ASSEMBLER_TEST_RUN(Vaddqi16, test) {
+  EXPECT(test != NULL);
+  typedef int (*Tst)();
+  EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Vaddqi32, assembler) {
+  if (CPUFeatures::neon_supported()) {
+    __ mov(R0, ShifterOperand(1));
+    __ vmovsr(S0, R0);
+    __ vmovsr(S1, R0);
+    __ vmovsr(S2, R0);
+    __ vmovsr(S3, R0);
+    __ vmovsr(S4, R0);
+    __ vmovsr(S5, R0);
+    __ vmovsr(S6, R0);
+    __ vmovsr(S7, R0);
+
+    __ vaddqi(2, Q2, Q0, Q1);
+
+    __ vmovrs(R0, S8);
+    __ vmovrs(R1, S9);
+    __ vmovrs(R2, S10);
+    __ vmovrs(R3, S11);
+
+    __ add(R0, R0, ShifterOperand(R1));
+    __ add(R0, R0, ShifterOperand(R2));
+    __ add(R0, R0, ShifterOperand(R3));
+    __ bx(LR);
+  } else {
+    __ LoadImmediate(R0, 8);
+    __ bx(LR);
+  }
+}
+
+
+ASSEMBLER_TEST_RUN(Vaddqi32, test) {
+  EXPECT(test != NULL);
+  typedef int (*Tst)();
+  EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Vaddqi64, assembler) {
+  if (CPUFeatures::neon_supported()) {
+    __ mov(R0, ShifterOperand(1));
+    __ vmovsr(S0, R0);
+    __ vmovsr(S2, R0);
+    __ vmovsr(S4, R0);
+    __ vmovsr(S6, R0);
+
+    __ vaddqi(3, Q2, Q0, Q1);
+
+    __ vmovrs(R0, S8);
+    __ vmovrs(R2, S10);
+
+    __ add(R0, R0, ShifterOperand(R2));
+    __ bx(LR);
+  } else {
+    __ LoadImmediate(R0, 4);
+    __ bx(LR);
+  }
+}
+
+
+ASSEMBLER_TEST_RUN(Vaddqi64, test) {
+  EXPECT(test != NULL);
+  typedef int (*Tst)();
+  EXPECT_EQ(4, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Vaddqs, assembler) {
+  if (CPUFeatures::neon_supported()) {
+    __ LoadSImmediate(S0, 1.0);
+    __ vmovs(S1, S0);
+    __ vmovs(S2, S0);
+    __ vmovs(S3, S0);
+    __ vmovs(S4, S0);
+    __ vmovs(S5, S0);
+    __ vmovs(S6, S0);
+    __ vmovs(S7, S0);
+
+    __ vaddqs(Q2, Q0, Q1);
+
+    __ vadds(S8, S8, S9);
+    __ vadds(S8, S8, S10);
+    __ vadds(S8, S8, S11);
+
+    __ vcvtis(S0, S8);
+    __ vmovrs(R0, S0);
+
+    __ bx(LR);
+  } else {
+    __ LoadImmediate(R0, 8);
+    __ bx(LR);
+  }
+}
+
+
+ASSEMBLER_TEST_RUN(Vaddqs, test) {
+  EXPECT(test != NULL);
+  typedef int (*Tst)();
+  EXPECT_EQ(8, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
+}
+
+
 // Called from assembler_test.cc.
 // LR: return address.
 // R0: context.
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 0277d61..3d43e46 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -38,6 +38,14 @@
                async,
                Bootstrap::async_source_paths_,
                Bootstrap::async_patch_paths_),
+  INIT_LIBRARY(ObjectStore::kCodec,
+               codec,
+               Bootstrap::codec_source_paths_,
+               NULL),
+  INIT_LIBRARY(ObjectStore::kConvert,
+               convert,
+               Bootstrap::convert_source_paths_,
+               NULL),
   INIT_LIBRARY(ObjectStore::kCollection,
                collection,
                Bootstrap::collection_source_paths_,
diff --git a/runtime/vm/bootstrap.h b/runtime/vm/bootstrap.h
index 843cf72..c3f1beb 100644
--- a/runtime/vm/bootstrap.h
+++ b/runtime/vm/bootstrap.h
@@ -19,9 +19,11 @@
 
   // Source path mapping for library URI and 'parts'.
   static const char* async_source_paths_[];
+  static const char* codec_source_paths_[];
   static const char* corelib_source_paths_[];
   static const char* collection_source_paths_[];
   static const char* collection_dev_source_paths_[];
+  static const char* convert_source_paths_[];
   static const char* isolate_source_paths_[];
   static const char* json_source_paths_[];
   static const char* math_source_paths_[];
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index bd9f25c..a996ff6 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -255,15 +255,59 @@
 
 
 // Resolve unresolved_class in the library of cls, or return null.
-RawClass* ClassFinalizer::ResolveClass(
-    const Class& cls, const UnresolvedClass& unresolved_class) {
+RawClass* ClassFinalizer::ResolveClass(const Class& cls,
+                                       const UnresolvedClass& unresolved_class,
+                                       Error* ambiguity_error) {
   const String& class_name = String::Handle(unresolved_class.ident());
   Library& lib = Library::Handle();
   Class& resolved_class = Class::Handle();
   if (unresolved_class.library_prefix() == LibraryPrefix::null()) {
     lib = cls.library();
     ASSERT(!lib.IsNull());
-    resolved_class = lib.LookupClass(class_name);
+    // TODO(regis): Call lib.LookupClass(class_name, ambiguity_error) instead
+    // once it takes the ambiguity_error parameter.
+
+    // First check if name is found in the local scope of the library.
+    Object& obj = Object::Handle(lib.LookupLocalObject(class_name));
+    if (!obj.IsNull() && obj.IsClass()) {
+      return Class::Cast(obj).raw();
+    }
+    // Now check if class_name is found in any imported libs.
+    String& first_lib_url = String::Handle();
+    Namespace& import = Namespace::Handle();
+    Library& import_lib = Library::Handle();
+    for (intptr_t i = 0; i < lib.num_imports(); i++) {
+      import ^= lib.ImportAt(i);
+      obj = import.Lookup(class_name);
+      if (!obj.IsNull()) {
+        import_lib = import.library();
+        if (!first_lib_url.IsNull()) {
+          // Found duplicate definition.
+          const Script& script = Script::Handle(cls.script());
+          if (first_lib_url.raw() == lib.url()) {
+            *ambiguity_error = Parser::FormatErrorMsg(
+                script, unresolved_class.token_pos(), "Error",
+                "ambiguous reference to '%s', "
+                "as library '%s' is imported multiple times",
+                class_name.ToCString(),
+                first_lib_url.ToCString());
+          } else {
+            *ambiguity_error = Parser::FormatErrorMsg(
+                script, unresolved_class.token_pos(), "Error",
+                "ambiguous reference: "
+                "'%s' is defined in library '%s' and also in '%s'",
+                class_name.ToCString(),
+                first_lib_url.ToCString(),
+                String::Handle(lib.url()).ToCString());
+          }
+          return Class::null();
+        }
+        first_lib_url = lib.url();
+        if (obj.IsClass()) {
+          resolved_class = Class::Cast(obj).raw();
+        }
+      }
+    }
   } else {
     LibraryPrefix& lib_prefix = LibraryPrefix::Handle();
     lib_prefix = unresolved_class.library_prefix();
@@ -317,6 +361,19 @@
     ASSERT(factory.RedirectionTarget() == Function::null());
     return;
   }
+  ASSERT(!type.IsTypeParameter());  // Resolved in parser.
+  if (type.IsDynamicType()) {
+    // Replace the type with a malformed type and compile a throw when called.
+    type = NewFinalizedMalformedType(
+        Error::Handle(),  // No previous error.
+        cls,
+        factory.token_pos(),
+        kResolveTypeParameters,  // No compile-time error.
+        "factory may not redirect to 'dynamic'");
+    factory.SetRedirectionType(type);
+    ASSERT(factory.RedirectionTarget() == Function::null());
+    return;
+  }
   const Class& target_class = Class::Handle(type.type_class());
   String& target_class_name = String::Handle(target_class.Name());
   String& target_name = String::Handle(
@@ -339,7 +396,7 @@
         Error::Handle(),  // No previous error.
         cls,
         factory.token_pos(),
-        kTryResolve,  // No compile-time error.
+        kResolveTypeParameters,  // No compile-time error.
         "class '%s' has no constructor or factory named '%s'",
         target_class_name.ToCString(),
         user_visible_target_name.ToCString());
@@ -354,7 +411,7 @@
         Error::Handle(),  // No previous error.
         cls,
         factory.token_pos(),
-        kTryResolve,  // No compile-time error.
+        kResolveTypeParameters,  // No compile-time error.
         "constructor '%s' has incompatible parameters with "
         "redirecting factory '%s'",
         String::Handle(target.name()).ToCString(),
@@ -437,8 +494,9 @@
     // Lookup the type class.
     const UnresolvedClass& unresolved_class =
         UnresolvedClass::Handle(type.unresolved_class());
+    Error& ambiguous_error = Error::Handle();
     const Class& type_class =
-        Class::Handle(ResolveClass(cls, unresolved_class));
+        Class::Handle(ResolveClass(cls, unresolved_class, &ambiguous_error));
 
     // Replace unresolved class with resolved type class.
     const Type& parameterized_type = Type::Cast(type);
@@ -446,7 +504,7 @@
       parameterized_type.set_type_class(type_class);
     } else {
       // The type class could not be resolved. The type is malformed.
-      FinalizeMalformedType(Error::Handle(),  // No previous error.
+      FinalizeMalformedType(ambiguous_error,  // May be null.
                             cls, parameterized_type, finalization,
                             "cannot resolve class name '%s' from '%s'",
                             String::Handle(unresolved_class.Name()).ToCString(),
@@ -870,7 +928,8 @@
   // If a bound error occurred, return a BoundedType with a malformed bound.
   // The malformed bound will be ignored in production mode.
   if (!bound_error.IsNull()) {
-    FinalizationKind bound_finalization = kTryResolve;  // No compile error.
+    // No compile-time error during finalization.
+    FinalizationKind bound_finalization = kResolveTypeParameters;
     if (FLAG_enable_type_checks || FLAG_error_on_malformed_type) {
       bound_finalization = finalization;
     }
@@ -1062,6 +1121,43 @@
                     super_class_name.ToCString());
       }
     }
+    if ((FLAG_enable_type_checks || FLAG_error_on_malformed_type) &&
+        field.is_static() && field.is_const() &&
+        (field.value() != Object::null()) &&
+        (field.value() != Object::sentinel().raw())) {
+      // The parser does not preset the value if the type is a type parameter or
+      // is parameterized unless the value is null.
+      Error& malformed_error = Error::Handle();
+      if (type.IsMalformed()) {
+        malformed_error = type.malformed_error();
+      } else {
+        ASSERT(type.IsInstantiated());
+      }
+      const Instance& const_value = Instance::Handle(field.value());
+      if (!malformed_error.IsNull() ||
+          (!type.IsDynamicType() &&
+           !const_value.IsInstanceOf(type,
+                                     AbstractTypeArguments::Handle(),
+                                     &malformed_error))) {
+        // If the failure is due to a malformed type error, display it instead.
+        if (!malformed_error.IsNull()) {
+          ReportError(malformed_error);
+        } else {
+          const AbstractType& const_value_type = AbstractType::Handle(
+              const_value.GetType());
+          const String& const_value_type_name = String::Handle(
+              const_value_type.UserVisibleName());
+          const String& type_name = String::Handle(type.UserVisibleName());
+          const Script& script = Script::Handle(cls.script());
+          ReportError(script, field.token_pos(),
+                      "error initializing const field '%s': type '%s' is not a "
+                      "subtype of type '%s'",
+                      name.ToCString(),
+                      const_value_type_name.ToCString(),
+                      type_name.ToCString());
+        }
+      }
+    }
   }
   // Collect interfaces, super interfaces, and super classes of this class.
   const GrowableObjectArray& interfaces =
@@ -1295,6 +1391,59 @@
 }
 
 
+void ClassFinalizer::CreateForwardingConstructors(
+    const Class& mixin_app,
+    const GrowableObjectArray& cloned_funcs) {
+  const String& mixin_name = String::Handle(mixin_app.Name());
+  const Class& super_class = Class::Handle(mixin_app.SuperClass());
+  const String& super_name = String::Handle(super_class.Name());
+  const Type& dynamic_type = Type::Handle(Type::DynamicType());
+  const Array& functions = Array::Handle(super_class.functions());
+  intptr_t num_functions = functions.Length();
+  Function& func = Function::Handle();
+  for (intptr_t i = 0; i < num_functions; i++) {
+    func ^= functions.At(i);
+    if (func.IsConstructor()) {
+      // Build constructor name from mixin application class name
+      // and name of cloned super class constructor.
+      String& ctor_name = String::Handle(func.name());
+      ctor_name = String::SubString(ctor_name, super_name.Length());
+      String& clone_name =
+          String::Handle(String::Concat(mixin_name, ctor_name));
+      clone_name = Symbols::New(clone_name);
+
+      const Function& clone = Function::Handle(
+          Function::New(clone_name,
+                        func.kind(),
+                        func.is_static(),
+                        func.is_const(),
+                        func.is_abstract(),
+                        func.is_external(),
+                        mixin_app,
+                        mixin_app.token_pos()));
+
+      clone.set_num_fixed_parameters(func.num_fixed_parameters());
+      clone.SetNumOptionalParameters(func.NumOptionalParameters(),
+                                     func.HasOptionalPositionalParameters());
+      clone.set_result_type(dynamic_type);
+
+      const int num_parameters = func.NumParameters();
+      // The cloned ctor shares the parameter names array with the
+      // original.
+      const Array& parameter_names = Array::Handle(func.parameter_names());
+      ASSERT(parameter_names.Length() == num_parameters);
+      clone.set_parameter_names(parameter_names);
+      // The parameter types of the cloned constructor are 'dynamic'.
+      clone.set_parameter_types(Array::Handle(Array::New(num_parameters)));
+      for (intptr_t n = 0; n < num_parameters; n++) {
+        clone.SetParameterTypeAt(n, dynamic_type);
+      }
+      cloned_funcs.Add(clone);
+    }
+  }
+}
+
+
 void ClassFinalizer::ApplyMixin(const Class& cls) {
   Isolate* isolate = Isolate::Current();
   const Type& mixin_type = Type::Handle(isolate, cls.mixin());
@@ -1312,15 +1461,13 @@
 
   const GrowableObjectArray& cloned_funcs =
       GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+
+  CreateForwardingConstructors(cls, cloned_funcs);
+
   Array& functions = Array::Handle(isolate);
   Function& func = Function::Handle(isolate);
-  // The parser creates the mixin application class and adds just
-  // one function, the implicit constructor.
-  functions = cls.functions();
-  ASSERT(functions.Length() == 1);
-  func ^= functions.At(0);
-  ASSERT(func.IsImplicitConstructor());
-  cloned_funcs.Add(func);
+  // The parser creates the mixin application class with no functions.
+  ASSERT((functions = cls.functions(), functions.Length() == 0));
   // Now clone the functions from the mixin class.
   functions = mixin_cls.functions();
   const intptr_t num_functions = functions.Length();
@@ -1709,6 +1856,12 @@
 
   // Resolve super type. Failures lead to a longjmp.
   ResolveType(cls, super_type, kCanonicalizeWellFormed);
+  if (super_type.IsDynamicType()) {
+    const Script& script = Script::Handle(cls.script());
+    ReportError(script, cls.token_pos(),
+                "class '%s' may not extend 'dynamic'",
+                String::Handle(cls.Name()).ToCString());
+  }
 
   interface_class = super_type.type_class();
   // If cls belongs to core lib or to core lib's implementation, restrictions
@@ -1767,11 +1920,11 @@
   for (intptr_t i = 0; i < super_interfaces.Length(); i++) {
     interface ^= super_interfaces.At(i);
     ResolveType(cls, interface, kCanonicalizeWellFormed);
-    if (interface.IsTypeParameter()) {
+    ASSERT(!interface.IsTypeParameter());  // Should be detected by parser.
+    if (interface.IsDynamicType()) {
       const Script& script = Script::Handle(cls.script());
       ReportError(script, cls.token_pos(),
-                  "type parameter '%s' cannot be used as interface",
-                  String::Handle(interface.Name()).ToCString());
+                  "'dynamic' may not be used as interface");
     }
     interface_class = interface.type_class();
     if (interface_class.IsSignatureClass()) {
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index c0db01e..3287b16 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -32,7 +32,7 @@
   enum FinalizationKind {
     kIgnore,                   // Type is ignored and replaced by dynamic.
     kDoNotResolve,             // Type resolution is postponed.
-    kTryResolve,               // Type resolution is attempted.
+    kResolveTypeParameters,    // Resolve type parameters only.
     kFinalize,                 // Type resolution and type finalization are
                                // required; a malformed type is tolerated, since
                                // the type may be used as a type annotation.
@@ -97,7 +97,8 @@
                                GrowableArray<intptr_t>* visited);
   static void CheckForLegalConstClass(const Class& cls);
   static RawClass* ResolveClass(const Class& cls,
-                                const UnresolvedClass& unresolved_class);
+                                const UnresolvedClass& unresolved_class,
+                                Error* ambiguity_error);
   static void ResolveRedirectingFactoryTarget(
       const Class& cls,
       const Function& factory,
@@ -105,6 +106,9 @@
   static void CloneTypeParameters(const Class& mixapp_class);
   static void ApplyMixinTypes(const Class& cls);
   static void ApplyMixin(const Class& cls);
+  static void CreateForwardingConstructors(
+      const Class& mixin_app,
+      const GrowableObjectArray& cloned_funcs);
   static void CollectTypeArguments(const Class& cls,
                                    const Type& type,
                                    const GrowableObjectArray& collected_args);
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index f778d61..afa0fcc 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -533,29 +533,30 @@
                                        &malformed_error);
       ASSERT(malformed_error.IsNull());  // Malformed types are not optimized.
     }
-    OS::PrintErr("  Updated test cache %p ix: %"Pd" with (%"Pd", %p, %p, %s)\n"
-        "    [%p %s %"Pd", %p %s]\n"
-        "    [%p %s %"Pd", %p %s] %s\n",
+    OS::PrintErr("  Updated test cache %p ix: %"Pd" with "
+        "(cid: %"Pd", type-args: %p, instantiator: %p, result: %s)\n"
+        "    instance  [class: (%p '%s' cid: %"Pd"),    type-args: %p %s]\n"
+        "    test-type [class: (%p '%s' cid: %"Pd"), in-type-args: %p %s]\n",
         new_cache.raw(),
         len,
-        instance_class.id(),
 
+        instance_class.id(),
         instance_type_arguments.raw(),
         instantiator_type_arguments.raw(),
         result.ToCString(),
 
         instance_class.raw(),
-        instance_class.ToCString(),
+        String::Handle(instance_class.Name()).ToCString(),
         instance_class.id(),
         instance_type_arguments.raw(),
         instance_type_arguments.ToCString(),
 
         test_type.type_class(),
-        Class::Handle(test_type.type_class()).ToCString(),
+        String::Handle(Class::Handle(test_type.type_class()).Name()).
+            ToCString(),
         Class::Handle(test_type.type_class()).id(),
         instantiator_type_arguments.raw(),
-        instantiator_type_arguments.ToCString(),
-        result.ToCString());
+        instantiator_type_arguments.ToCString());
   }
 }
 
@@ -1183,6 +1184,7 @@
                                      const String& target_name,
                                      const Array& arguments_descriptor,
                                      const Array& arguments,
+                                     const ICData& ic_data,
                                      Object* result) {
   // 1. Check if there is a getter with the same name.
   const String& getter_name = String::Handle(Field::GetterName(target_name));
@@ -1197,19 +1199,23 @@
     return false;
   }
 
-  // 2. Invoke the getter.
-  const Array& args = Array::Handle(Array::New(kNumArguments));
-  args.SetAt(0, receiver);
-  const Object& value = Object::Handle(DartEntry::InvokeFunction(getter, args));
-
-  // 3. If there was some error, propagate it.
-  CheckResultError(value);
-
-  // 4. Invoke the value as a closure.
-  Instance& instance = Instance::Handle();
-  instance ^= value.raw();
-  arguments.SetAt(0, instance);
-  *result = DartEntry::InvokeClosure(arguments, arguments_descriptor);
+  const Function& target_function =
+      Function::Handle(receiver_class.GetInvocationDispatcher(
+          target_name,
+          arguments_descriptor,
+          RawFunction::kInvokeFieldDispatcher));
+  // Update IC data.
+  ASSERT(!target_function.IsNull());
+  ic_data.AddReceiverCheck(receiver.GetClassId(), target_function);
+  if (FLAG_trace_ic) {
+    OS::PrintErr("InvokeField IC miss: adding <%s> id:%"Pd" -> <%s>\n",
+        Class::Handle(receiver.clazz()).ToCString(),
+        receiver.GetClassId(),
+        target_function.ToCString());
+  }
+  *result = DartEntry::InvokeFunction(target_function,
+                                      arguments,
+                                      arguments_descriptor);
   CheckResultError(*result);
   return true;
 }
@@ -1248,19 +1254,35 @@
                                 target_name,
                                 args_descriptor,
                                 args,
+                                ic_data,
                                 &result)) {
     ArgumentsDescriptor desc(args_descriptor);
-    const Function& target_function = Function::Handle(
-        receiver_class.GetNoSuchMethodDispatcher(target_name, args_descriptor));
+    const Function& target_function =
+        Function::Handle(receiver_class.GetInvocationDispatcher(
+            target_name,
+            args_descriptor,
+            RawFunction::kNoSuchMethodDispatcher));
     // Update IC data.
     ASSERT(!target_function.IsNull());
+    intptr_t receiver_cid = receiver.GetClassId();
     if (ic_data.num_args_tested() == 1) {
-      ic_data.AddReceiverCheck(receiver.GetClassId(), target_function);
+      // In optimized code we may enter into here via the
+      // MegamorphicCacheMissHandler since noSuchMethod dispatchers are not
+      // inserted into the megamorphic cache. Therefore, we need to guard
+      // against entering the same check twice into the ICData.
+      // Note that num_args_tested == 1 in optimized code.
+      // TODO(fschneider): Handle extraordinary cases like noSuchMethod and
+      // implicit closure invocation properly in the megamorphic cache.
+      const Function& target =
+          Function::Handle(ic_data.GetTargetForReceiverClassId(receiver_cid));
+      if (target.IsNull()) {
+        ic_data.AddReceiverCheck(receiver_cid, target_function);
+      }
     } else {
       // Operators calls have two or three arguments tested ([], []=, etc.)
       ASSERT(ic_data.num_args_tested() > 1);
       GrowableArray<intptr_t> class_ids(ic_data.num_args_tested());
-      class_ids.Add(receiver.GetClassId());
+      class_ids.Add(receiver_cid);
       for (intptr_t i = 1; i < ic_data.num_args_tested(); ++i) {
         class_ids.Add(Object::Handle(args.At(i)).GetClassId());
       }
@@ -1269,7 +1291,7 @@
     if (FLAG_trace_ic) {
       OS::PrintErr("NoSuchMethod IC miss: adding <%s> id:%"Pd" -> <%s>\n",
           Class::Handle(receiver.clazz()).ToCString(),
-          receiver.GetClassId(),
+          receiver_cid,
           target_function.ToCString());
     }
     result = DartEntry::InvokeFunction(target_function, args, args_descriptor);
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index a68144f..7006fe7 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -129,15 +129,51 @@
 };
 
 
+enum QRegister {
+  Q0  =  0,
+  Q1  =  1,
+  Q2  =  2,
+  Q3  =  3,
+  Q4  =  4,
+  Q5  =  5,
+  Q6  =  6,
+  Q7  =  7,
+#ifdef VFPv3_D16
+  kNumberOfQRegisters = 8,
+#else
+  Q8  =  8,
+  Q9  =  9,
+  Q10 = 10,
+  Q11 = 11,
+  Q12 = 12,
+  Q13 = 13,
+  Q14 = 14,
+  Q15 = 15,
+  kNumberOfQRegisters = 16,
+#endif
+  kNoQRegister = -1,
+};
+
+
+static inline DRegister EvenDRegisterOf(QRegister q) {
+  return static_cast<DRegister>(q * 2);
+}
+
+static inline DRegister OddDRegisterOf(QRegister q) {
+  return static_cast<DRegister>((q * 2) + 1);
+}
+
+
 // Register aliases for floating point scratch registers.
-const DRegister DTMP = D15;  // Overlaps with STMP.
-const SRegister STMP = S30;
+const QRegister QTMP = Q7;  // Overlaps with DTMP, STMP.
+const DRegister DTMP = D14;  // Overlaps with STMP.
+const SRegister STMP = S28;
 
 // Architecture independent aliases.
-typedef DRegister FpuRegister;
-const FpuRegister FpuTMP = DTMP;
-const int kNumberOfFpuRegisters = kNumberOfDRegisters;
-const FpuRegister kNoFpuRegister = kNoDRegister;
+typedef QRegister FpuRegister;
+const FpuRegister FpuTMP = QTMP;
+const int kNumberOfFpuRegisters = kNumberOfQRegisters;
+const FpuRegister kNoFpuRegister = kNoQRegister;
 
 // Register aliases.
 const Register TMP = IP;  // Used as scratch register by assembler.
@@ -167,9 +203,9 @@
     (1 << R4) | (1 << R5) | (1 << R6) | (1 << R7) |
     (1 << R8) | (1 << R9) | (1 << R10);
 const int kAbiPreservedCpuRegCount = 7;
-const DRegister kAbiFirstPreservedFpuReg = D8;
-const DRegister kAbiLastPreservedFpuReg =
-    static_cast<DRegister>(kNumberOfDRegisters - 1);
+const QRegister kAbiFirstPreservedFpuReg = Q4;
+const QRegister kAbiLastPreservedFpuReg =
+    static_cast<QRegister>(kNumberOfQRegisters - 1);
 
 // CPU registers available to Dart allocator.
 const RegList kDartAvailableCpuRegs =
@@ -180,9 +216,9 @@
 const RegList kDartVolatileCpuRegs =
     kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
 const int kDartVolatileCpuRegCount = 4;
-const DRegister kDartFirstVolatileFpuReg = D0;
-const DRegister kDartLastVolatileFpuReg = D7;
-const int kDartVolatileFpuRegCount = 8;
+const QRegister kDartFirstVolatileFpuReg = Q0;
+const QRegister kDartLastVolatileFpuReg = Q3;
+const int kDartVolatileFpuRegCount = 4;
 
 
 // Values for the condition field as defined in section A3.2.
@@ -525,6 +561,18 @@
   inline DRegister DmField() const {
     return static_cast<DRegister>(Bits(kRmShift, kRmBits) + (Bit(5) << 4));
   }
+  inline QRegister QnField() const {
+    const intptr_t bits = Bits(kRnShift, kRnBits) + (Bit(7) << 4);
+    return static_cast<QRegister>(bits >> 1);
+  }
+  inline QRegister QdField() const {
+    const intptr_t bits = Bits(kRdShift, kRdBits) + (Bit(22) << 4);
+    return static_cast<QRegister>(bits >> 1);
+  }
+  inline QRegister QmField() const {
+    const intptr_t bits = Bits(kRmShift, kRmBits) + (Bit(5) << 4);
+    return static_cast<QRegister>(bits >> 1);
+  }
 
   inline bool IsDivision() const {
     ASSERT(ConditionField() != kSpecialCondition);
@@ -565,6 +613,16 @@
     return (Bits(9, 3) == 5) && ((puw == 2) || (puw == 3) || (puw == 5));
   }
 
+  inline bool IsSIMDDataProcessing() const {
+    ASSERT(ConditionField() == kSpecialCondition);
+    return (Bits(25, 3) == 1);
+  }
+
+  inline bool IsSIMDLoadStore() const {
+    ASSERT(ConditionField() == kSpecialCondition);
+    return (Bits(24, 4) == 4) && (Bit(20) == 0);
+  }
+
   // Special accessors that test for existence of a value.
   inline bool HasS()    const { return SField() == 1; }
   inline bool HasB()    const { return BField() == 1; }
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3cb5b75..ccda777 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -55,10 +55,12 @@
 
 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) {
   if (obj.IsInstance()) {
+    const Library& core_lib = Library::Handle(Library::CoreLibrary());
+    const Class& list_class =
+        Class::Handle(core_lib.LookupClass(Symbols::List()));
+    ASSERT(!list_class.IsNull());
     const Instance& instance = Instance::Cast(obj);
     const Class& obj_class = Class::Handle(isolate, obj.clazz());
-    const Class& list_class =
-        Class::Handle(isolate, isolate->object_store()->list_class());
     Error& malformed_type_error = Error::Handle(isolate);
     if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate),
                               list_class,
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index be69f4b..d26ae75 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -935,15 +935,20 @@
   Context& ctx = Context::Handle(isolate->top_context());
   Code& code = Code::Handle(isolate);
   StackFrameIterator iterator(false);
-  StackFrame* frame = iterator.NextFrame();
   ActivationFrame* callee_activation = NULL;
   bool optimized_frame_found = false;
-  while (frame != NULL) {
+  for (StackFrame* frame = iterator.NextFrame();
+       frame != NULL;
+       frame = iterator.NextFrame()) {
     ASSERT(frame->IsValid());
     if (frame->IsDartFrame()) {
       code = frame->LookupDartCode();
       ActivationFrame* activation =
           new ActivationFrame(frame->pc(), frame->fp(), frame->sp(), code);
+      // Check if frame is a debuggable function.
+      if (!IsDebuggable(activation->function())) {
+        continue;
+      }
       // If this activation frame called a closure, the function has
       // saved its context before the call.
       if ((callee_activation != NULL) &&
@@ -980,7 +985,6 @@
       ctx = reinterpret_cast<EntryFrame*>(frame)->SavedContext();
       callee_activation = NULL;
     }
-    frame = iterator.NextFrame();
   }
   return stack_trace;
 }
@@ -1534,7 +1538,8 @@
       (fkind == RawFunction::kImplicitSetter) ||
       (fkind == RawFunction::kConstImplicitGetter) ||
       (fkind == RawFunction::kMethodExtractor) ||
-      (fkind == RawFunction::kNoSuchMethodDispatcher)) {
+      (fkind == RawFunction::kNoSuchMethodDispatcher) ||
+      (fkind == RawFunction::kInvokeFieldDispatcher)) {
     return false;
   }
   const Class& cls = Class::Handle(func.Owner());
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 236e496..90ec050 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -350,7 +350,7 @@
   void SignalBpResolved(SourceBreakpoint *bpt);
   void SignalPausedEvent(ActivationFrame* top_frame);
 
-  bool IsDebuggable(const Function& func);
+  static bool IsDebuggable(const Function& func);
 
   intptr_t nextId() { return next_id_++; }
 
diff --git a/runtime/vm/disassembler_arm.cc b/runtime/vm/disassembler_arm.cc
index 339f51d..52e3a52 100644
--- a/runtime/vm/disassembler_arm.cc
+++ b/runtime/vm/disassembler_arm.cc
@@ -33,6 +33,7 @@
   void PrintRegister(int reg);
   void PrintSRegister(int reg);
   void PrintDRegister(int reg);
+  void PrintQRegister(int reg);
   void PrintCondition(Instr* instr);
   void PrintShiftRm(Instr* instr);
   void PrintShiftImm(Instr* instr);
@@ -42,6 +43,7 @@
   int FormatRegister(Instr* instr, const char* option);
   int FormatSRegister(Instr* instr, const char* option);
   int FormatDRegister(Instr* instr, const char* option);
+  int FormatQRegister(Instr* instr, const char* option);
   int FormatOption(Instr* instr, const char* option);
   void Format(Instr* instr, const char* format);
   void Unknown(Instr* instr);
@@ -57,6 +59,7 @@
   void DecodeType5(Instr* instr);
   void DecodeType6(Instr* instr);
   void DecodeType7(Instr* instr);
+  void DecodeSIMDDataProcessing(Instr* instr);
 
   // Convenience functions.
   char* get_buffer() const { return buffer_; }
@@ -137,6 +140,15 @@
 }
 
 
+void ARMDecoder::PrintQRegister(int reg) {
+  ASSERT(0 <= reg);
+  ASSERT(reg < kNumberOfQRegisters);
+  buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
+                             remaining_size_in_buffer(),
+                             "q%d", reg);
+}
+
+
 // These shift names are defined in a way to match the native disassembler
 // formatting. See for example the command "objdump -d <binary file>".
 static const char* shift_names[kMaxShift] = {
@@ -351,6 +363,26 @@
 }
 
 
+int ARMDecoder::FormatQRegister(Instr* instr, const char* format) {
+  ASSERT(format[0] == 'q');
+  if (format[1] == 'n') {  // 'qn: Qn register
+    int reg = instr->QnField();
+    PrintQRegister(reg);
+    return 2;
+  } else if (format[1] == 'd') {  // 'qd: Qd register
+    int reg = instr->QdField();
+    PrintQRegister(reg);
+    return 2;
+  } else if (format[1] == 'm') {  // 'qm: Qm register
+    int reg = instr->QmField();
+    PrintQRegister(reg);
+    return 2;
+  }
+  UNREACHABLE();
+  return -1;
+}
+
+
 // FormatOption takes a formatting string and interprets it based on
 // the current instructions. The format string points to the first
 // character of the option string (the option escape has already been
@@ -391,6 +423,9 @@
         return FormatDRegister(instr, format);
       }
     }
+    case 'q': {
+      return FormatQRegister(instr, format);
+    }
     case 'i': {  // 'imm12_4, imm4_12, immf, or immd
       uint16_t immed16;
       if (format[3] == 'f') {
@@ -446,7 +481,7 @@
                                      "%d",
                                      instr->Bits(0, 8) << 2);
         } else {
-          // 'off12: 12-bit offset for load and store instructions
+          // 'off12: 12-bit offset for load and store instructions.
           ASSERT(STRING_STARTS_WITH(format, "off12"));
           buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
                                      remaining_size_in_buffer(),
@@ -455,7 +490,7 @@
         }
         return 5;
       }
-      // 'off8: 8-bit offset for extra load and store instructions
+      // 'off8: 8-bit offset for extra load and store instructions.
       ASSERT(STRING_STARTS_WITH(format, "off8"));
       int offs8 = (instr->ImmedHField() << 4) | instr->ImmedLField();
       buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
@@ -464,7 +499,7 @@
                                  offs8);
       return 4;
     }
-    case 'p': {  // 'pu: P and U bits for load and store instructions
+    case 'p': {  // 'pu: P and U bits for load and store instructions.
       ASSERT(STRING_STARTS_WITH(format, "pu"));
       PrintPU(instr);
       return 2;
@@ -495,8 +530,16 @@
                                    "0x%x",
                                    instr->SvcField());
         return 3;
+      } else if (format[1] == 'z') {
+        // 'sz: Size field of SIMD instruction.
+        int sz = 8 << (instr->Bits(20, 2));
+        buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
+                                   remaining_size_in_buffer(),
+                                   "I%d",
+                                   sz);
+        return 2;
       } else if (format[1] == ' ') {
-        // 's: S field of data processing instructions
+        // 's: S field of data processing instructions.
         if (instr->HasS()) {
           Print("s");
         }
@@ -505,7 +548,7 @@
         return FormatSRegister(instr, format);
       }
     }
-    case 't': {  // 'target: target of branch instructions
+    case 't': {  // 'target: target of branch instructions.
       ASSERT(STRING_STARTS_WITH(format, "target"));
       int off = (instr->SImmed24Field() << 2) + 8;
       buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
@@ -514,7 +557,7 @@
                                  off);
       return 6;
     }
-    case 'u': {  // 'u: signed or unsigned multiplies
+    case 'u': {  // 'u: signed or unsigned multiplies.
       if (instr->Bit(22) == 0) {
         Print("u");
       } else {
@@ -522,13 +565,13 @@
       }
       return 1;
     }
-    case 'w': {  // 'w: W field of load and store instructions
+    case 'w': {  // 'w: W field of load and store instructions.
       if (instr->HasW()) {
         Print("!");
       }
       return 1;
     }
-    case 'x': {  // 'x: type of extra load/store instructions
+    case 'x': {  // 'x: type of extra load/store instructions.
       if (!instr->HasSign()) {
         Print("h");
       } else if (instr->HasL()) {
@@ -1223,6 +1266,24 @@
 }
 
 
+void ARMDecoder::DecodeSIMDDataProcessing(Instr* instr) {
+  ASSERT(instr->ConditionField() == kSpecialCondition);
+  if (instr->Bit(6) == 1) {
+    if ((instr->Bits(8, 4) == 8) && (instr->Bit(4) == 0) &&
+        (instr->Bit(24) == 0)) {
+      Format(instr, "vadd.'sz 'qd, 'qn, 'qm");
+    } else if ((instr->Bits(8, 4) == 13) && (instr->Bit(4) == 0) &&
+        (instr->Bit(24) == 0)) {
+      Format(instr, "vadd.F32 'qd, 'qn, 'qm");
+    } else {
+      Unknown(instr);
+    }
+  } else {
+    Unknown(instr);
+  }
+}
+
+
 void ARMDecoder::InstructionDecode(uword pc) {
   Instr* instr = Instr::At(pc);
 
@@ -1230,7 +1291,11 @@
     if (instr->InstructionBits() == static_cast<int32_t>(0xf57ff01f)) {
       Format(instr, "clrex");
     } else {
-      Unknown(instr);
+      if (instr->IsSIMDDataProcessing()) {
+        DecodeSIMDDataProcessing(instr);
+      } else {
+        Unknown(instr);
+      }
     }
   } else {
     switch (instr->TypeField()) {
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index b155564..f994178 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -413,68 +413,40 @@
 }
 
 
-// Initialize the fields 'url', 'line', and 'column' in the given instance
-// according to the given token location in the given script.
-void Exceptions::SetLocationFields(const Instance& instance,
-                                   const Class& cls,
-                                   const Script& script,
-                                   intptr_t location) {
-  SetField(instance, cls, "url", String::Handle(script.url()));
-  intptr_t line, column;
-  script.GetTokenLocation(location, &line, &column);
-  SetField(instance, cls, "line", Smi::Handle(Smi::New(line)));
-  SetField(instance, cls, "column", Smi::Handle(Smi::New(column)));
-}
-
-
 // Allocate, initialize, and throw a TypeError.
 void Exceptions::CreateAndThrowTypeError(intptr_t location,
                                          const String& src_type_name,
                                          const String& dst_type_name,
                                          const String& dst_name,
                                          const String& malformed_error) {
-  // Allocate a new instance of TypeError or CastError.
-  Instance& type_error = Instance::Handle();
-  Class& cls = Class::Handle();
-  if (dst_name.Equals(kCastErrorDstName)) {
-    type_error = NewInstance("CastErrorImplementation");
-    cls = type_error.clazz();
-    cls = cls.SuperClass();
-  } else {
-    type_error = NewInstance("TypeErrorImplementation");
-    cls = type_error.clazz();
-  }
+  const Array& args = Array::Handle(Array::New(8));
 
-  // Initialize 'url', 'line', and 'column' fields.
-  DartFrameIterator iterator;
-  const Script& script = Script::Handle(GetCallerScript(&iterator));
-  // Location fields are defined in AssertionError, the superclass of TypeError.
-  const Class& assertion_error_class = Class::Handle(cls.SuperClass());
-  SetLocationFields(type_error, assertion_error_class, script, location);
+  ExceptionType exception_type =
+      dst_name.Equals(kCastErrorDstName) ? kCast : kType;
 
-  // Initialize field 'failedAssertion' in AssertionError superclass.
+  // Initialize argument 'failedAssertion'.
   // Printing the src_obj value would be possible, but ToString() is expensive
   // and not meaningful for all classes, so we just print '$expr instanceof...'.
   // Users should look at TypeError.ToString(), which contains more useful
   // information than AssertionError.failedAssertion.
   String& failed_assertion = String::Handle(String::New("$expr instanceof "));
   failed_assertion = String::Concat(failed_assertion, dst_type_name);
-  SetField(type_error,
-           assertion_error_class,
-           "failedAssertion",
-           failed_assertion);
+  args.SetAt(0, failed_assertion);
 
-  // Initialize field 'srcType'.
-  SetField(type_error, cls, "srcType", src_type_name);
+  // Initialize 'url', 'line', and 'column' arguments.
+  DartFrameIterator iterator;
+  const Script& script = Script::Handle(GetCallerScript(&iterator));
+  intptr_t line, column;
+  script.GetTokenLocation(location, &line, &column);
+  args.SetAt(1, String::Handle(script.url()));
+  args.SetAt(2, Smi::Handle(Smi::New(line)));
+  args.SetAt(3, Smi::Handle(Smi::New(column)));
 
-  // Initialize field 'dstType'.
-  SetField(type_error, cls, "dstType", dst_type_name);
-
-  // Initialize field 'dstName'.
-  SetField(type_error, cls, "dstName", dst_name);
-
-  // Initialize field 'malformedError'.
-  SetField(type_error, cls, "malformedError", malformed_error);
+  // Initialize argument 'srcType'.
+  args.SetAt(4, src_type_name);
+  args.SetAt(5, dst_type_name);
+  args.SetAt(6, dst_name);
+  args.SetAt(7, malformed_error);
 
   // Type errors in the core library may be difficult to diagnose.
   // Print type error information before throwing the error when debugging.
@@ -496,7 +468,7 @@
     }
   }
   // Throw TypeError instance.
-  Exceptions::Throw(type_error);
+  Exceptions::ThrowByType(exception_type, args);
   UNREACHABLE();
 }
 
@@ -626,6 +598,26 @@
       library = Library::CoreLibrary();
       class_name = &Symbols::FiftyThreeBitOverflowError();
       break;
+    case kAssertion:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::AssertionError();
+      break;
+    case kCast:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::CastError();
+      break;
+    case kType:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::TypeError();
+      break;
+    case kFallThrough:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::FallThroughError();
+      break;
+    case kAbstractClassInstantiation:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::AbstractClassInstantiationError();
+      break;
   }
 
   return DartLibraryCalls::ExceptionCreate(library,
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index b762627..9d4a18e 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -37,10 +37,6 @@
                        const Class& cls,
                        const char* field_name,
                        const Object& value);
-  static void SetLocationFields(const Instance& instance,
-                                const Class& cls,
-                                const Script& script,
-                                intptr_t location);
   static void CreateAndThrowTypeError(intptr_t location,
                                       const String& src_type_name,
                                       const String& dst_type_name,
@@ -61,6 +57,11 @@
     kIsolateSpawn,
     kIsolateUnhandledException,
     kFiftyThreeBitOverflowError,
+    kAssertion,
+    kCast,
+    kType,
+    kFallThrough,
+    kAbstractClassInstantiation,
   };
 
   static void ThrowByType(ExceptionType type, const Array& arguments);
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 6f63b69..0a86e09 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -750,6 +750,15 @@
     }
   }
 
+  // Prune non-live variables at block entry by replacing their environment
+  // slots with null.
+  BitVector* live_in = variable_liveness->GetLiveInSet(block_entry);
+  for (intptr_t i = 0; i < variable_count(); i++) {
+    if (!live_in->Contains(i)) {
+      (*env)[i] = constant_null();
+    }
+  }
+
   // Attach environment to the block entry.
   AttachEnvironment(block_entry, env);
 
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 41c24f2..771b6d3 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -20,8 +20,8 @@
 // (factory-name-symbol, result-cid, fingerprint).
 // TODO(srdjan): Store the values in the snapshot instead.
 #define RECOGNIZED_LIST_FACTORY_LIST(V)                                        \
-  V(ObjectArrayFactory, kArrayCid, 97987288)                                   \
-  V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033)           \
+  V(ObjectArrayFactory, kArrayCid, 1149848530)                                 \
+  V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 569069682)           \
   V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 1821003625)           \
   V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 1139775342)                     \
   V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 2065936658)                   \
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index e7f063c..554ae8a 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -87,9 +87,13 @@
           Isolate::Current()->object_store()->float32x4_class())),
       uint32x4_class_(Class::ZoneHandle(
           Isolate::Current()->object_store()->uint32x4_class())),
+      list_class_(Class::ZoneHandle(
+          Library::Handle(Library::CoreLibrary()).
+              LookupClass(Symbols::List()))),
       parallel_move_resolver_(this),
       pending_deoptimization_env_(NULL) {
   ASSERT(assembler != NULL);
+  ASSERT(!list_class_.IsNull());
 }
 
 
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index 4759b25..55fc965 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -563,6 +563,10 @@
   void CompactBlock(BlockEntryInstr* block);
   void CompactBlocks();
 
+  bool IsListClass(const Class& cls) const {
+    return cls.raw() == list_class_.raw();
+  }
+
   class Assembler* assembler_;
   const ParsedFunction& parsed_function_;
   const FlowGraph& flow_graph_;
@@ -587,6 +591,7 @@
   const Class& double_class_;
   const Class& float32x4_class_;
   const Class& uint32x4_class_;
+  const Class& list_class_;
 
   ParallelMoveResolver parallel_move_resolver_;
 
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index 29bfc8f..31acb69 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -224,12 +224,12 @@
   __ Comment("InstantiatedTypeWithArgumentsTest");
   ASSERT(type.IsInstantiated());
   const Class& type_class = Class::ZoneHandle(type.type_class());
-  ASSERT(type_class.HasTypeArguments());
+  ASSERT(type_class.HasTypeArguments() || type_class.IsSignatureClass());
   const Register kInstanceReg = R0;
   Error& malformed_error = Error::Handle();
   const Type& int_type = Type::Handle(Type::IntType());
   const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error);
-  // Malforrmed type should have been handled at graph construction time.
+  // Malformed type should have been handled at graph construction time.
   ASSERT(smi_is_ok || malformed_error.IsNull());
   __ tst(kInstanceReg, ShifterOperand(kSmiTagMask));
   if (smi_is_ok) {
@@ -241,32 +241,35 @@
       AbstractTypeArguments::ZoneHandle(type.arguments());
   const bool is_raw_type = type_arguments.IsNull() ||
       type_arguments.IsRaw(type_arguments.Length());
-  if (is_raw_type) {
-    const Register kClassIdReg = R2;
-    // dynamic type argument, check only classes.
-    __ LoadClassId(kClassIdReg, kInstanceReg);
-    __ CompareImmediate(kClassIdReg, type_class.id());
-    __ b(is_instance_lbl, EQ);
-    // List is a very common case.
-    if (type_class.IsListClass()) {
-      GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+  // Signature class is an instantiated parameterized type.
+  if (!type_class.IsSignatureClass()) {
+    if (is_raw_type) {
+      const Register kClassIdReg = R2;
+      // dynamic type argument, check only classes.
+      __ LoadClassId(kClassIdReg, kInstanceReg);
+      __ CompareImmediate(kClassIdReg, type_class.id());
+      __ b(is_instance_lbl, EQ);
+      // List is a very common case.
+      if (IsListClass(type_class)) {
+        GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+      }
+      return GenerateSubtype1TestCacheLookup(
+          token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
     }
-    return GenerateSubtype1TestCacheLookup(
-        token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
-  }
-  // If one type argument only, check if type argument is Object or dynamic.
-  if (type_arguments.Length() == 1) {
-    const AbstractType& tp_argument = AbstractType::ZoneHandle(
-        type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
-    if (tp_argument.IsType()) {
-      ASSERT(tp_argument.HasResolvedTypeClass());
-      // Check if type argument is dynamic or Object.
-      const Type& object_type = Type::Handle(Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL)) {
-        // Instance class test only necessary.
-        return GenerateSubtype1TestCacheLookup(
-            token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+    // If one type argument only, check if type argument is Object or dynamic.
+    if (type_arguments.Length() == 1) {
+      const AbstractType& tp_argument = AbstractType::ZoneHandle(
+          type_arguments.TypeAt(0));
+      ASSERT(!tp_argument.IsMalformed());
+      if (tp_argument.IsType()) {
+        ASSERT(tp_argument.HasResolvedTypeClass());
+        // Check if type argument is dynamic or Object.
+        const Type& object_type = Type::Handle(Type::ObjectType());
+        if (object_type.IsSubtypeOf(tp_argument, NULL)) {
+          // Instance class test only necessary.
+          return GenerateSubtype1TestCacheLookup(
+              token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+        }
       }
     }
   }
@@ -512,8 +515,9 @@
   if (type.IsInstantiated()) {
     const Class& type_class = Class::ZoneHandle(type.type_class());
     // A class equality check is only applicable with a dst type of a
-    // non-parameterized class or with a raw dst type of a parameterized class.
-    if (type_class.HasTypeArguments()) {
+    // non-parameterized class, non-signature class, or with a raw dst type of
+    // a parameterized class.
+    if (type_class.IsSignatureClass() || type_class.HasTypeArguments()) {
       return GenerateInstantiatedTypeWithArgumentsTest(token_pos,
                                                        type,
                                                        is_instance_lbl,
@@ -652,7 +656,7 @@
   __ CompareImmediate(R0, reinterpret_cast<int32_t>(Object::null()));
   __ b(&is_assignable, EQ);
 
-  if (!FLAG_eliminate_type_checks) {
+  if (!FLAG_eliminate_type_checks || dst_type.IsMalformed()) {
     // If type checks are not eliminated during the graph building then
     // a transition sentinel can be seen here.
     __ CompareObject(R0, Object::transition_sentinel());
@@ -1503,9 +1507,12 @@
     // address.
     intptr_t offset = 0;
     for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
-      DRegister fpu_reg = static_cast<DRegister>(reg_idx);
+      QRegister fpu_reg = static_cast<QRegister>(reg_idx);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
-        __ vstrd(fpu_reg, Address(SP, offset));
+        DRegister d1 = EvenDRegisterOf(fpu_reg);
+        DRegister d2 = OddDRegisterOf(fpu_reg);
+        __ vstrd(d1, Address(SP, offset));
+        __ vstrd(d2, Address(SP, offset + 2 * kWordSize));
         offset += kFpuRegisterSize;
       }
     }
@@ -1536,9 +1543,12 @@
     // 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);
+      QRegister fpu_reg = static_cast<QRegister>(reg_idx);
       if (locs->live_registers()->ContainsFpuRegister(fpu_reg)) {
-        __ vldrd(fpu_reg, Address(SP, offset));
+        DRegister d1 = EvenDRegisterOf(fpu_reg);
+        DRegister d2 = OddDRegisterOf(fpu_reg);
+        __ vldrd(d1, Address(SP, offset));
+        __ vldrd(d2, Address(SP, offset + 2 * kWordSize));
         offset += kFpuRegisterSize;
       }
     }
@@ -1601,7 +1611,9 @@
                                                 FpuRegister right,
                                                 BranchInstr* branch) {
   ASSERT(branch != NULL);
-  assembler()->vcmpd(left, right);
+  DRegister dleft = EvenDRegisterOf(left);
+  DRegister dright = EvenDRegisterOf(right);
+  assembler()->vcmpd(dleft, dright);
   assembler()->vmstat();
   BlockEntryInstr* nan_result = (true_condition == NE) ?
       branch->true_successor() : branch->false_successor();
@@ -1614,7 +1626,9 @@
                                               FpuRegister left,
                                               FpuRegister right,
                                               Register result) {
-  assembler()->vcmpd(left, right);
+  DRegister dleft = EvenDRegisterOf(left);
+  DRegister dright = EvenDRegisterOf(right);
+  assembler()->vcmpd(dleft, dright);
   assembler()->vmstat();
   assembler()->LoadObject(result, Bool::False());
   Label done;
@@ -1624,7 +1638,7 @@
 }
 
 
-// Do not impelement or use this function.
+// Do not implement or use this function.
 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
                                                           intptr_t index_scale,
                                                           Register array,
@@ -1688,10 +1702,13 @@
     }
   } else if (source.IsFpuRegister()) {
     if (destination.IsFpuRegister()) {
-      __ vmovd(destination.fpu_reg(), source.fpu_reg());
+      DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+      DRegister src = EvenDRegisterOf(source.fpu_reg());
+      __ vmovd(dst, src);
     } else {
       if (destination.IsDoubleStackSlot()) {
-        __ vstrd(source.fpu_reg(), destination.ToStackSlotAddress());
+        DRegister src = EvenDRegisterOf(source.fpu_reg());
+        __ vstrd(src, destination.ToStackSlotAddress());
       } else {
         ASSERT(destination.IsQuadStackSlot());
         UNIMPLEMENTED();
@@ -1699,7 +1716,8 @@
     }
   } else if (source.IsDoubleStackSlot()) {
     if (destination.IsFpuRegister()) {
-      __ vldrd(destination.fpu_reg(), source.ToStackSlotAddress());
+      DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+      __ vldrd(dst, source.ToStackSlotAddress());
     } else {
       ASSERT(destination.IsDoubleStackSlot());
       __ vldrd(DTMP, source.ToStackSlotAddress());
@@ -1740,9 +1758,11 @@
   } else if (source.IsStackSlot() && destination.IsStackSlot()) {
     Exchange(destination.ToStackSlotAddress(), source.ToStackSlotAddress());
   } else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
-    __ vmovd(DTMP, source.fpu_reg());
-    __ vmovd(source.fpu_reg(), destination.fpu_reg());
-    __ vmovd(destination.fpu_reg(), DTMP);
+    DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+    DRegister src = EvenDRegisterOf(source.fpu_reg());
+    __ vmovd(DTMP, src);
+    __ vmovd(src, dst);
+    __ vmovd(dst, DTMP);
   } else if (source.IsFpuRegister() || destination.IsFpuRegister()) {
     ASSERT(destination.IsDoubleStackSlot() ||
            destination.IsQuadStackSlot() ||
@@ -1750,8 +1770,9 @@
            source.IsQuadStackSlot());
     bool double_width = destination.IsDoubleStackSlot() ||
                         source.IsDoubleStackSlot();
-    DRegister reg = source.IsFpuRegister() ? source.fpu_reg()
-                                           : destination.fpu_reg();
+    QRegister qreg = source.IsFpuRegister() ? source.fpu_reg()
+                                            : destination.fpu_reg();
+    DRegister reg = EvenDRegisterOf(qreg);
     const Address& slot_address = source.IsFpuRegister()
         ? destination.ToStackSlotAddress()
         : source.ToStackSlotAddress();
@@ -1767,11 +1788,12 @@
     const Address& source_slot_address = source.ToStackSlotAddress();
     const Address& destination_slot_address = destination.ToStackSlotAddress();
 
-    ScratchFpuRegisterScope ensure_scratch(this, DTMP);
+    ScratchFpuRegisterScope ensure_scratch(this, QTMP);
+    DRegister scratch = EvenDRegisterOf(ensure_scratch.reg());
     __ vldrd(DTMP, source_slot_address);
-    __ vldrd(ensure_scratch.reg(), destination_slot_address);
+    __ vldrd(scratch, destination_slot_address);
     __ vstrd(DTMP, destination_slot_address);
-    __ vstrd(ensure_scratch.reg(), source_slot_address);
+    __ vstrd(scratch, source_slot_address);
   } else if (source.IsQuadStackSlot() && destination.IsQuadStackSlot()) {
     UNIMPLEMENTED();
   } else {
@@ -1837,12 +1859,14 @@
 
 
 void ParallelMoveResolver::SpillFpuScratch(FpuRegister reg) {
-  __ vstrd(reg, Address(SP, -kDoubleSize, Address::PreIndex));
+  DRegister dreg = EvenDRegisterOf(reg);
+  __ vstrd(dreg, Address(SP, -kDoubleSize, Address::PreIndex));
 }
 
 
 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
-  __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex));
+  DRegister dreg = EvenDRegisterOf(reg);
+  __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
 }
 
 
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 0aa8da9..3ecdfc3 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -231,12 +231,12 @@
   __ Comment("InstantiatedTypeWithArgumentsTest");
   ASSERT(type.IsInstantiated());
   const Class& type_class = Class::ZoneHandle(type.type_class());
-  ASSERT(type_class.HasTypeArguments());
+  ASSERT(type_class.HasTypeArguments() || type_class.IsSignatureClass());
   const Register kInstanceReg = EAX;
   Error& malformed_error = Error::Handle();
   const Type& int_type = Type::Handle(Type::IntType());
   const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error);
-  // Malforrmed type should have been handled at graph construction time.
+  // Malformed type should have been handled at graph construction time.
   ASSERT(smi_is_ok || malformed_error.IsNull());
   __ testl(kInstanceReg, Immediate(kSmiTagMask));
   if (smi_is_ok) {
@@ -248,32 +248,35 @@
       AbstractTypeArguments::ZoneHandle(type.arguments());
   const bool is_raw_type = type_arguments.IsNull() ||
       type_arguments.IsRaw(type_arguments.Length());
-  if (is_raw_type) {
-    const Register kClassIdReg = ECX;
-    // dynamic type argument, check only classes.
-    __ LoadClassId(kClassIdReg, kInstanceReg);
-    __ cmpl(kClassIdReg, Immediate(type_class.id()));
-    __ j(EQUAL, is_instance_lbl);
-    // List is a very common case.
-    if (type_class.IsListClass()) {
-      GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+  // Signature class is an instantiated parameterized type.
+  if (!type_class.IsSignatureClass()) {
+    if (is_raw_type) {
+      const Register kClassIdReg = ECX;
+      // dynamic type argument, check only classes.
+      __ LoadClassId(kClassIdReg, kInstanceReg);
+      __ cmpl(kClassIdReg, Immediate(type_class.id()));
+      __ j(EQUAL, is_instance_lbl);
+      // List is a very common case.
+      if (IsListClass(type_class)) {
+        GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+      }
+      return GenerateSubtype1TestCacheLookup(
+          token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
     }
-    return GenerateSubtype1TestCacheLookup(
-        token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
-  }
-  // If one type argument only, check if type argument is Object or dynamic.
-  if (type_arguments.Length() == 1) {
-    const AbstractType& tp_argument = AbstractType::ZoneHandle(
-        type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
-    if (tp_argument.IsType()) {
-      ASSERT(tp_argument.HasResolvedTypeClass());
-      // Check if type argument is dynamic or Object.
-      const Type& object_type = Type::Handle(Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL)) {
-        // Instance class test only necessary.
-        return GenerateSubtype1TestCacheLookup(
-            token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+    // If one type argument only, check if type argument is Object or dynamic.
+    if (type_arguments.Length() == 1) {
+      const AbstractType& tp_argument = AbstractType::ZoneHandle(
+          type_arguments.TypeAt(0));
+      ASSERT(!tp_argument.IsMalformed());
+      if (tp_argument.IsType()) {
+        ASSERT(tp_argument.HasResolvedTypeClass());
+        // Check if type argument is dynamic or Object.
+        const Type& object_type = Type::Handle(Type::ObjectType());
+        if (object_type.IsSubtypeOf(tp_argument, NULL)) {
+          // Instance class test only necessary.
+          return GenerateSubtype1TestCacheLookup(
+              token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+        }
       }
     }
   }
@@ -523,8 +526,9 @@
   if (type.IsInstantiated()) {
     const Class& type_class = Class::ZoneHandle(type.type_class());
     // A class equality check is only applicable with a dst type of a
-    // non-parameterized class or with a raw dst type of a parameterized class.
-    if (type_class.HasTypeArguments()) {
+    // non-parameterized class, non-signature class, or with a raw dst type of
+    // a parameterized class.
+    if (type_class.IsSignatureClass() || type_class.HasTypeArguments()) {
       return GenerateInstantiatedTypeWithArgumentsTest(token_pos,
                                                        type,
                                                        is_instance_lbl,
@@ -670,7 +674,7 @@
   __ cmpl(EAX, raw_null);
   __ j(EQUAL, &is_assignable);
 
-  if (!FLAG_eliminate_type_checks) {
+  if (!FLAG_eliminate_type_checks || dst_type.IsMalformed()) {
     // If type checks are not eliminated during the graph building then
     // a transition sentinel can be seen here.
     const Immediate& raw_transition_sentinel =
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 7edcc80..a98f0a5 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -224,12 +224,12 @@
   __ Comment("InstantiatedTypeWithArgumentsTest");
   ASSERT(type.IsInstantiated());
   const Class& type_class = Class::ZoneHandle(type.type_class());
-  ASSERT(type_class.HasTypeArguments());
+  ASSERT(type_class.HasTypeArguments() || type_class.IsSignatureClass());
   const Register kInstanceReg = A0;
   Error& malformed_error = Error::Handle();
   const Type& int_type = Type::Handle(Type::IntType());
   const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error);
-  // Malforrmed type should have been handled at graph construction time.
+  // Malformed type should have been handled at graph construction time.
   ASSERT(smi_is_ok || malformed_error.IsNull());
   __ andi(CMPRES, kInstanceReg, Immediate(kSmiTagMask));
   if (smi_is_ok) {
@@ -241,31 +241,34 @@
       AbstractTypeArguments::ZoneHandle(type.arguments());
   const bool is_raw_type = type_arguments.IsNull() ||
       type_arguments.IsRaw(type_arguments.Length());
-  if (is_raw_type) {
-    const Register kClassIdReg = T0;
-    // dynamic type argument, check only classes.
-    __ LoadClassId(kClassIdReg, kInstanceReg);
-    __ BranchEqual(kClassIdReg, type_class.id(), is_instance_lbl);
-    // List is a very common case.
-    if (type_class.IsListClass()) {
-      GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+  // Signature class is an instantiated parameterized type.
+  if (!type_class.IsSignatureClass()) {
+    if (is_raw_type) {
+      const Register kClassIdReg = T0;
+      // dynamic type argument, check only classes.
+      __ LoadClassId(kClassIdReg, kInstanceReg);
+      __ BranchEqual(kClassIdReg, type_class.id(), is_instance_lbl);
+      // List is a very common case.
+      if (IsListClass(type_class)) {
+        GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+      }
+      return GenerateSubtype1TestCacheLookup(
+          token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
     }
-    return GenerateSubtype1TestCacheLookup(
-        token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
-  }
-  // If one type argument only, check if type argument is Object or dynamic.
-  if (type_arguments.Length() == 1) {
-    const AbstractType& tp_argument = AbstractType::ZoneHandle(
-        type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
-    if (tp_argument.IsType()) {
-      ASSERT(tp_argument.HasResolvedTypeClass());
-      // Check if type argument is dynamic or Object.
-      const Type& object_type = Type::Handle(Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL)) {
-        // Instance class test only necessary.
-        return GenerateSubtype1TestCacheLookup(
-            token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+    // If one type argument only, check if type argument is Object or dynamic.
+    if (type_arguments.Length() == 1) {
+      const AbstractType& tp_argument = AbstractType::ZoneHandle(
+          type_arguments.TypeAt(0));
+      ASSERT(!tp_argument.IsMalformed());
+      if (tp_argument.IsType()) {
+        ASSERT(tp_argument.HasResolvedTypeClass());
+        // Check if type argument is dynamic or Object.
+        const Type& object_type = Type::Handle(Type::ObjectType());
+        if (object_type.IsSubtypeOf(tp_argument, NULL)) {
+          // Instance class test only necessary.
+          return GenerateSubtype1TestCacheLookup(
+              token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+        }
       }
     }
   }
@@ -509,8 +512,9 @@
   if (type.IsInstantiated()) {
     const Class& type_class = Class::ZoneHandle(type.type_class());
     // A class equality check is only applicable with a dst type of a
-    // non-parameterized class or with a raw dst type of a parameterized class.
-    if (type_class.HasTypeArguments()) {
+    // non-parameterized class, non-signature class, or with a raw dst type of
+    // a parameterized class.
+    if (type_class.IsSignatureClass() || type_class.HasTypeArguments()) {
       return GenerateInstantiatedTypeWithArgumentsTest(token_pos,
                                                        type,
                                                        is_instance_lbl,
@@ -660,7 +664,7 @@
   __ BranchEqual(A0, reinterpret_cast<int32_t>(Object::null()), &is_assignable);
   __ delay_slot()->sw(A1, Address(SP, 0 * kWordSize));
 
-  if (!FLAG_eliminate_type_checks) {
+  if (!FLAG_eliminate_type_checks || dst_type.IsMalformed()) {
     // If type checks are not eliminated during the graph building then
     // a transition sentinel can be seen here.
     __ BranchEqual(A0, Object::transition_sentinel(), &is_assignable);
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 14fcc5b..4375d7f 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -227,12 +227,12 @@
   __ Comment("InstantiatedTypeWithArgumentsTest");
   ASSERT(type.IsInstantiated());
   const Class& type_class = Class::ZoneHandle(type.type_class());
-  ASSERT(type_class.HasTypeArguments());
+  ASSERT(type_class.HasTypeArguments() || type_class.IsSignatureClass());
   const Register kInstanceReg = RAX;
   Error& malformed_error = Error::Handle();
   const Type& int_type = Type::Handle(Type::IntType());
   const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error);
-  // Malforrmed type should have been handled at graph construction time.
+  // Malformed type should have been handled at graph construction time.
   ASSERT(smi_is_ok || malformed_error.IsNull());
   __ testq(kInstanceReg, Immediate(kSmiTagMask));
   if (smi_is_ok) {
@@ -244,32 +244,35 @@
       AbstractTypeArguments::ZoneHandle(type.arguments());
   const bool is_raw_type = type_arguments.IsNull() ||
       type_arguments.IsRaw(type_arguments.Length());
-  if (is_raw_type) {
-    const Register kClassIdReg = R10;
-    // dynamic type argument, check only classes.
-    __ LoadClassId(kClassIdReg, kInstanceReg);
-    __ cmpl(kClassIdReg, Immediate(type_class.id()));
-    __ j(EQUAL, is_instance_lbl);
-    // List is a very common case.
-    if (type_class.IsListClass()) {
-      GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+  // Signature class is an instantiated parameterized type.
+  if (!type_class.IsSignatureClass()) {
+    if (is_raw_type) {
+      const Register kClassIdReg = R10;
+      // dynamic type argument, check only classes.
+      __ LoadClassId(kClassIdReg, kInstanceReg);
+      __ cmpl(kClassIdReg, Immediate(type_class.id()));
+      __ j(EQUAL, is_instance_lbl);
+      // List is a very common case.
+      if (IsListClass(type_class)) {
+        GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
+      }
+      return GenerateSubtype1TestCacheLookup(
+          token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
     }
-    return GenerateSubtype1TestCacheLookup(
-        token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
-  }
-  // If one type argument only, check if type argument is Object or dynamic.
-  if (type_arguments.Length() == 1) {
-    const AbstractType& tp_argument = AbstractType::ZoneHandle(
-        type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
-    if (tp_argument.IsType()) {
-      ASSERT(tp_argument.HasResolvedTypeClass());
-      // Check if type argument is dynamic or Object.
-      const Type& object_type = Type::Handle(Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL)) {
-        // Instance class test only necessary.
-        return GenerateSubtype1TestCacheLookup(
-            token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+    // If one type argument only, check if type argument is Object or dynamic.
+    if (type_arguments.Length() == 1) {
+      const AbstractType& tp_argument = AbstractType::ZoneHandle(
+          type_arguments.TypeAt(0));
+      ASSERT(!tp_argument.IsMalformed());
+      if (tp_argument.IsType()) {
+        ASSERT(tp_argument.HasResolvedTypeClass());
+        // Check if type argument is dynamic or Object.
+        const Type& object_type = Type::Handle(Type::ObjectType());
+        if (object_type.IsSubtypeOf(tp_argument, NULL)) {
+          // Instance class test only necessary.
+          return GenerateSubtype1TestCacheLookup(
+              token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
+        }
       }
     }
   }
@@ -519,8 +522,9 @@
   if (type.IsInstantiated()) {
     const Class& type_class = Class::ZoneHandle(type.type_class());
     // A class equality check is only applicable with a dst type of a
-    // non-parameterized class or with a raw dst type of a parameterized class.
-    if (type_class.HasTypeArguments()) {
+    // non-parameterized class, non-signature class, or with a raw dst type of
+    // a parameterized class.
+    if (type_class.IsSignatureClass() || type_class.HasTypeArguments()) {
       return GenerateInstantiatedTypeWithArgumentsTest(token_pos,
                                                        type,
                                                        is_instance_lbl,
@@ -666,7 +670,7 @@
   __ cmpq(RAX, raw_null);
   __ j(EQUAL, &is_assignable);
 
-  if (!FLAG_eliminate_type_checks) {
+  if (!FLAG_eliminate_type_checks || dst_type.IsMalformed()) {
     // If type checks are not eliminated during the graph building then
     // a transition sentinel can be seen here.
     __ CompareObject(RAX, Object::transition_sentinel());
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 7bb096a..4c51acf 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -550,11 +550,15 @@
       // parameters.
       if (function.HasOptionalParameters()) {
         TRACE_INLINING(OS::Print("     adjusting for optional parameters\n"));
-        AdjustForOptionalParameters(*parsed_function,
-                                    argument_names,
-                                    arguments,
-                                    param_stubs,
-                                    callee_graph);
+        if (!AdjustForOptionalParameters(*parsed_function,
+                                         argument_names,
+                                         arguments,
+                                         param_stubs,
+                                         callee_graph)) {
+          function.set_is_inlinable(false);
+          TRACE_INLINING(OS::Print("     Bailout: optional arg mismatch\n"));
+          return false;
+        }
       }
 
       // After treating optional parameters the actual/formal count must match.
@@ -829,7 +833,7 @@
     }
   }
 
-  void AdjustForOptionalParameters(const ParsedFunction& parsed_function,
+  bool AdjustForOptionalParameters(const ParsedFunction& parsed_function,
                                    const Array& argument_names,
                                    GrowableArray<Value*>* arguments,
                                    ZoneGrowableArray<Definition*>* param_stubs,
@@ -864,7 +868,7 @@
         arguments->Add(NULL);
         param_stubs->Add(constant);
       }
-      return;
+      return true;
     }
 
     ASSERT(function.HasOptionalNamedParameters());
@@ -880,7 +884,7 @@
         arguments->Add(NULL);
         param_stubs->Add(GetDefaultValue(i, parsed_function));
       }
-      return;
+      return true;
     }
 
     // Otherwise, build a collection of name/argument pairs.
@@ -897,6 +901,7 @@
 
     // For each optional named parameter, add the actual argument or its
     // default if no argument is passed.
+    intptr_t match_count = 0;
     for (intptr_t i = fixed_param_count; i < param_count; ++i) {
       String& param_name = String::Handle(function.ParameterNameAt(i));
       // Search for and add the named argument.
@@ -904,6 +909,7 @@
       for (intptr_t j = 0; j < named_args.length(); ++j) {
         if (param_name.Equals(*named_args[j].name)) {
           arg = named_args[j].value;
+          match_count++;
           break;
         }
       }
@@ -916,6 +922,7 @@
             GetDefaultValue(i - fixed_param_count, parsed_function));
       }
     }
+    return argument_names_count == match_count;
   }
 
 
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index e29dbea..df01ffb 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -36,46 +36,46 @@
 // (class-name, function-name, recognized enum, fingerprint).
 // See intrinsifier for fingerprint computation.
 #define RECOGNIZED_LIST(V)                                                     \
-  V(Object, Object., ObjectConstructor, 464682336)                             \
+  V(Object, Object., ObjectConstructor, 2030609793)                            \
   V(Object, get:_cid, ObjectCid, 732498573)                                    \
   V(_ObjectArray, get:length, ObjectArrayLength, 405297088)                    \
   V(_ImmutableArray, get:length, ImmutableArrayLength, 433698233)              \
   V(_TypedList, get:length, TypedDataLength, 1004567191)                       \
-  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 728842615)                     \
-  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 728842615)                   \
-  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 728842615)                   \
-  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 728842615)                 \
-  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 728842615)                   \
-  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 728842615)                 \
-  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 1067360925)              \
-  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1067360925)              \
-  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 279982060)           \
-  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 427754869)                     \
-  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 427754869)                   \
-  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 427754869)                   \
-  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 427754869)                 \
-  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 427754869)                   \
-  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 427754869)                 \
-  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 637235443)               \
-  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 637235443)               \
-  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 780994886)           \
+  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1219036864)                    \
+  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 1219036864)                  \
+  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1219036864)                  \
+  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1219036864)                \
+  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 1219036864)                  \
+  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1219036864)                \
+  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 1465214182)              \
+  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1465214182)              \
+  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 2133963445)          \
+  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1865947547)                    \
+  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1865947547)                  \
+  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1865947547)                  \
+  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1865947547)                \
+  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1865947547)                  \
+  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1865947547)                \
+  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 2034634179)              \
+  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 2034634179)              \
+  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 773019010)           \
   V(_GrowableObjectArray, get:length, GrowableArrayLength, 725548050)          \
   V(_GrowableObjectArray, get:_capacity, GrowableArrayCapacity, 725548050)     \
-  V(_GrowableObjectArray, _setData, GrowableArraySetData, 629110947)           \
-  V(_GrowableObjectArray, _setLength, GrowableArraySetLength, 796709584)       \
+  V(_GrowableObjectArray, _setData, GrowableArraySetData, 588108129)           \
+  V(_GrowableObjectArray, _setLength, GrowableArraySetLength, 279007375)       \
   V(_StringBase, get:length, StringBaseLength, 320803993)                      \
   V(_StringBase, get:isEmpty, StringBaseIsEmpty, 110631520)                    \
-  V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 984449525)                  \
-  V(_StringBase, [], StringBaseCharAt, 1062366987)                             \
-  V(_OneByteString, _setAt, OneByteStringSetAt, 342452817)                     \
+  V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1574843871)                 \
+  V(_StringBase, [], StringBaseCharAt, 2105190389)                             \
+  V(_OneByteString, _setAt, OneByteStringSetAt, 1038132016)                    \
   V(_IntegerImplementation, toDouble, IntegerToDouble, 1331752138)             \
-  V(_Double, toInt, DoubleToInteger, 362666636)                                \
-  V(_Double, truncateToDouble, DoubleTruncate, 620870996)                      \
-  V(_Double, roundToDouble, DoubleRound, 620870996)                            \
-  V(_Double, floorToDouble, DoubleFloor, 620870996)                            \
-  V(_Double, ceilToDouble, DoubleCeil, 620870996)                              \
+  V(_Double, toInt, DoubleToInteger, 630286253)                                \
+  V(_Double, truncateToDouble, DoubleTruncate, 1804056693)                     \
+  V(_Double, roundToDouble, DoubleRound, 1804056693)                           \
+  V(_Double, floorToDouble, DoubleFloor, 1804056693)                           \
+  V(_Double, ceilToDouble, DoubleCeil, 1804056693)                             \
   V(_Double, pow, DoublePow, 102305574)                                        \
-  V(_Double, _modulo, DoubleMod, 437099337)                                    \
+  V(_Double, _modulo, DoubleMod, 663439671)                                    \
   V(::, sqrt, MathSqrt, 1662640002)                                            \
   V(Float32x4, Float32x4., Float32x4Constructor, 1492157358)                   \
   V(Float32x4, Float32x4.zero, Float32x4Zero, 444339161)                       \
@@ -88,37 +88,37 @@
   V(_Float32x4, get:y, Float32x4ShuffleY, 211144022)                           \
   V(_Float32x4, get:z, Float32x4ShuffleZ, 211144022)                           \
   V(_Float32x4, get:w, Float32x4ShuffleW, 211144022)                           \
-  V(_Float32x4, _cmpequal, Float32x4Equal, 548944488)                          \
-  V(_Float32x4, _cmpgt, Float32x4GreaterThan, 548944488)                       \
-  V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 548944488)               \
-  V(_Float32x4, _cmplt, Float32x4LessThan, 548944488)                          \
-  V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 548944488)                  \
-  V(_Float32x4, _cmpnequal, Float32x4NotEqual, 548944488)                      \
-  V(_Float32x4, _min, Float32x4Min, 342800599)                                 \
-  V(_Float32x4, _max, Float32x4Max, 342800599)                                 \
-  V(_Float32x4, _scale, Float32x4Scale, 219466242)                             \
-  V(_Float32x4, _sqrt, Float32x4Sqrt, 42621627)                                \
-  V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 42621627)            \
-  V(_Float32x4, _reciprocal, Float32x4Reciprocal, 42621627)                    \
-  V(_Float32x4, _negate, Float32x4Negate, 42621627)                            \
-  V(_Float32x4, _abs, Float32x4Absolute, 42621627)                             \
-  V(_Float32x4, _clamp, Float32x4Clamp, 615895313)                             \
-  V(_Float32x4, withX, Float32x4WithX, 219466242)                              \
-  V(_Float32x4, withY, Float32x4WithY, 219466242)                              \
-  V(_Float32x4, withZ, Float32x4WithZ, 219466242)                              \
-  V(_Float32x4, withW, Float32x4WithW, 219466242)                              \
-  V(_Float32x4, _toUint32x4, Float32x4ToUint32x4, 1044409108)                  \
+  V(_Float32x4, _cmpequal, Float32x4Equal, 2103153736)                         \
+  V(_Float32x4, _cmpgt, Float32x4GreaterThan, 2103153736)                      \
+  V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 2103153736)              \
+  V(_Float32x4, _cmplt, Float32x4LessThan, 2103153736)                         \
+  V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 2103153736)                 \
+  V(_Float32x4, _cmpnequal, Float32x4NotEqual, 2103153736)                     \
+  V(_Float32x4, _min, Float32x4Min, 465519415)                                 \
+  V(_Float32x4, _max, Float32x4Max, 465519415)                                 \
+  V(_Float32x4, _scale, Float32x4Scale, 42272341)                              \
+  V(_Float32x4, _sqrt, Float32x4Sqrt, 157194268)                               \
+  V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 157194268)           \
+  V(_Float32x4, _reciprocal, Float32x4Reciprocal, 157194268)                   \
+  V(_Float32x4, _negate, Float32x4Negate, 157194268)                           \
+  V(_Float32x4, _abs, Float32x4Absolute, 157194268)                            \
+  V(_Float32x4, _clamp, Float32x4Clamp, 1553901850)                            \
+  V(_Float32x4, withX, Float32x4WithX, 1816943014)                             \
+  V(_Float32x4, withY, Float32x4WithY, 820404963)                              \
+  V(_Float32x4, withZ, Float32x4WithZ, 881355277)                              \
+  V(_Float32x4, withW, Float32x4WithW, 441497035)                              \
+  V(_Float32x4, _toUint32x4, Float32x4ToUint32x4, 802289205)                   \
   V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 487876159)               \
   V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 782547529)                         \
   V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 782547529)                         \
   V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 782547529)                         \
   V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 782547529)                         \
   V(_Uint32x4, select, Uint32x4Select, 810336099)                              \
-  V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 980864994)                        \
-  V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 980864994)                        \
-  V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 980864994)                        \
-  V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 980864994)                        \
-  V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 311564070)                    \
+  V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 25547408)                         \
+  V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 1176493005)                       \
+  V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1237443319)                       \
+  V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 797585077)                        \
+  V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 912844231)                    \
 
 
 // Class that recognizes the name and owner of a function and returns the
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 200e725..d6f1736 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -728,8 +728,8 @@
                                    const LocationSummary& locs,
                                    Token::Kind kind,
                                    BranchInstr* branch) {
-  DRegister left = locs.in(0).fpu_reg();
-  DRegister right = locs.in(1).fpu_reg();
+  QRegister left = locs.in(0).fpu_reg();
+  QRegister right = locs.in(1).fpu_reg();
 
   Condition true_condition = TokenKindToDoubleCondition(kind);
   if (branch != NULL) {
@@ -1203,7 +1203,7 @@
   if ((representation() == kUnboxedDouble) ||
       (representation() == kUnboxedMint) ||
       (representation() == kUnboxedFloat32x4)) {
-    DRegister result = locs()->out().fpu_reg();
+    DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
     switch (class_id()) {
       case kTypedDataInt32ArrayCid:
         UNIMPLEMENTED();
@@ -1470,17 +1470,21 @@
       }
       break;
     }
-    case kTypedDataFloat32ArrayCid:
+    case kTypedDataFloat32ArrayCid: {
+      DRegister in2 = EvenDRegisterOf(locs()->in(2).fpu_reg());
       // Convert to single precision.
-      __ vcvtsd(STMP, locs()->in(2).fpu_reg());
+      __ vcvtsd(STMP, in2);
       // Store.
       __ add(index.reg(), index.reg(), ShifterOperand(array));
       __ StoreSToOffset(STMP, index.reg(), 0);
       break;
-    case kTypedDataFloat64ArrayCid:
+    }
+    case kTypedDataFloat64ArrayCid: {
+      DRegister in2 = EvenDRegisterOf(locs()->in(2).fpu_reg());
       __ add(index.reg(), index.reg(), ShifterOperand(array));
-      __ StoreDToOffset(locs()->in(2).fpu_reg(), index.reg(), 0);
+      __ StoreDToOffset(in2, index.reg(), 0);
       break;
+    }
     case kTypedDataFloat32x4ArrayCid:
       UNIMPLEMENTED();
       break;
@@ -2465,7 +2469,7 @@
       __ cmp(right, ShifterOperand(0));
       __ b(deopt, EQ);
       Register temp = locs()->temp(0).reg();
-      DRegister dtemp = locs()->temp(1).fpu_reg();
+      DRegister dtemp = EvenDRegisterOf(locs()->temp(1).fpu_reg());
       __ Asr(temp, left, kSmiTagSize);  // SmiUntag left into temp.
       __ Asr(IP, right, kSmiTagSize);  // SmiUntag right into IP.
 
@@ -2604,8 +2608,8 @@
   BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this);
   compiler->AddSlowPathCode(slow_path);
 
-  Register out_reg = locs()->out().reg();
-  DRegister value = locs()->in(0).fpu_reg();
+  const Register out_reg = locs()->out().reg();
+  const DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg());
 
   __ TryAllocate(compiler->double_class(),
                  slow_path->entry_label(),
@@ -2635,7 +2639,7 @@
 void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const intptr_t value_cid = value()->Type()->ToCid();
   const Register value = locs()->in(0).reg();
-  const DRegister result = locs()->out().fpu_reg();
+  const DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
 
   if (value_cid == kDoubleCid) {
     __ LoadDFromOffset(result, value, Double::value_offset() - kHeapObjectTag);
@@ -2720,9 +2724,9 @@
 
 
 void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  DRegister left = locs()->in(0).fpu_reg();
-  DRegister right = locs()->in(1).fpu_reg();
-  DRegister result = locs()->out().fpu_reg();
+  DRegister left = EvenDRegisterOf(locs()->in(0).fpu_reg());
+  DRegister right = EvenDRegisterOf(locs()->in(1).fpu_reg());
+  DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
   switch (op_kind()) {
     case Token::kADD: __ vaddd(result, left, right); break;
     case Token::kSUB: __ vsubd(result, left, right); break;
@@ -2953,7 +2957,9 @@
 
 
 void MathSqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  __ vsqrtd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg());
+  DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg());
+  DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
+  __ vsqrtd(result, val);
 }
 
 
@@ -3005,7 +3011,7 @@
 
 void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   Register value = locs()->in(0).reg();
-  FpuRegister result = locs()->out().fpu_reg();
+  DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
   __ SmiUntag(value);
   __ vmovsr(STMP, value);
   __ vcvtdi(result, STMP);
@@ -3029,10 +3035,18 @@
   ASSERT(result == R0);
   ASSERT(result != value_obj);
   __ LoadDFromOffset(DTMP, value_obj, Double::value_offset() - kHeapObjectTag);
+
+  Label do_call, done;
+  // First check for NaN. Checking for minint after the conversion doesn't work
+  // on ARM because vcvtid gives 0 for NaN.
+  __ vcmpd(DTMP, DTMP);
+  __ vmstat();
+  __ b(&do_call, VS);
+
   __ vcvtid(STMP, DTMP);
   __ vmovrs(result, STMP);
   // Overflow is signaled with minint.
-  Label do_call, done;
+
   // Check for overflow and that it fits into Smi.
   __ CompareImmediate(result, 0xC0000000);
   __ b(&do_call, MI);
@@ -3070,7 +3084,13 @@
 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptDoubleToSmi);
   Register result = locs()->out().reg();
-  DRegister value = locs()->in(0).fpu_reg();
+  DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg());
+  // First check for NaN. Checking for minint after the conversion doesn't work
+  // on ARM because vcvtid gives 0 for NaN.
+  __ vcmpd(value, value);
+  __ vmstat();
+  __ b(deopt, VS);
+
   __ vcvtid(STMP, value);
   __ vmovrs(result, STMP);
   // Check for overflow and that it fits into Smi.
@@ -3092,8 +3112,8 @@
 
 
 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  // DRegister value = locs()->in(0).fpu_reg();
-  // DRegister result = locs()->out().fpu_reg();
+  // QRegister value = locs()->in(0).fpu_reg();
+  // QRegister result = locs()->out().fpu_reg();
   switch (recognized_kind()) {
     case MethodRecognizer::kDoubleTruncate:
       UNIMPLEMENTED();
@@ -3118,11 +3138,11 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* result =
       new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall);
-  result->set_in(0, Location::FpuRegisterLocation(D0));
+  result->set_in(0, Location::FpuRegisterLocation(Q0));
   if (InputCount() == 2) {
-    result->set_in(1, Location::FpuRegisterLocation(D1));
+    result->set_in(1, Location::FpuRegisterLocation(Q1));
   }
-  result->set_out(Location::FpuRegisterLocation(D0));
+  result->set_out(Location::FpuRegisterLocation(Q0));
   return result;
 }
 
@@ -3131,12 +3151,13 @@
   // For pow-function return NAN if exponent is NAN.
   Label do_call, skip_call;
   if (recognized_kind() == MethodRecognizer::kDoublePow) {
-    DRegister exp = locs()->in(1).fpu_reg();
+    DRegister exp = EvenDRegisterOf(locs()->in(1).fpu_reg());
+    DRegister result = EvenDRegisterOf(locs()->out().fpu_reg());
     __ vcmpd(exp, exp);
     __ vmstat();
     __ b(&do_call, VC);  // NaN -> false;
     // Exponent is NaN, return NaN.
-    __ vmovd(locs()->out().fpu_reg(), exp);
+    __ vmovd(result, exp);
     __ b(&skip_call);
   }
   __ Bind(&do_call);
@@ -3144,6 +3165,10 @@
   // ('gnueabi') float ABI for leaf runtime calls, i.e. double values
   // are passed and returned in vfp registers rather than in integer
   // register pairs.
+  if (InputCount() == 2) {
+    // Args must be in D0 and D1, so move arg from Q1(== D3:D2) to D1.
+    __ vmovd(D1, D2);
+  }
   __ CallRuntime(TargetFunction());
   __ Bind(&skip_call);
 }
diff --git a/runtime/vm/intrinsifier.h b/runtime/vm/intrinsifier.h
index f61d667..9682004 100644
--- a/runtime/vm/intrinsifier.h
+++ b/runtime/vm/intrinsifier.h
@@ -16,7 +16,7 @@
 // When adding a new function for intrinsification add a 0 as fingerprint,
 // build and run to get the correct fingerprint from the mismatch error.
 #define CORE_LIB_INTRINSIC_LIST(V)                                             \
-  V(_Smi, ~, Smi_bitNegate, 882629793)                                         \
+  V(_Smi, ~, Smi_bitNegate, 2098673794)                                        \
   V(_Double, >, Double_greaterThan, 498448864)                                 \
   V(_Double, >=, Double_greaterEqualThan, 1322959863)                          \
   V(_Double, <, Double_lessThan, 1595326820)                                   \
@@ -29,64 +29,69 @@
   V(_Double, get:isNaN, Double_getIsNaN, 54462366)                             \
   V(_Double, get:isNegative, Double_getIsNegative, 54462366)                   \
   V(_Double, _mulFromInteger, Double_mulFromInteger, 550294258)                \
-  V(_Double, .fromInteger, Double_fromInteger, 842078193)                      \
-  V(_ObjectArray, ., ObjectArray_Allocate, 97987288)                           \
+  V(_Double, .fromInteger, Double_fromInteger, 881555713)                      \
+  V(_ObjectArray, ., ObjectArray_Allocate, 1149848530)                         \
   V(_ObjectArray, get:length, Array_getLength, 405297088)                      \
-  V(_ObjectArray, [], Array_getIndexed, 71937385)                              \
-  V(_ObjectArray, []=, Array_setIndexed, 255863719)                            \
-  V(_GrowableObjectArray, .withData, GrowableArray_Allocate, 816132033)        \
+  V(_ObjectArray, [], Array_getIndexed, 1573881683)                            \
+  V(_ObjectArray, []=, Array_setIndexed, 1644545484)                           \
+  V(_GrowableObjectArray, .withData, GrowableArray_Allocate, 569069682)        \
   V(_GrowableObjectArray, get:length, GrowableArray_getLength, 725548050)      \
   V(_GrowableObjectArray, get:_capacity, GrowableArray_getCapacity, 725548050) \
-  V(_GrowableObjectArray, [], GrowableArray_getIndexed, 581838973)             \
-  V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 1048007636)           \
-  V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 796709584)      \
-  V(_GrowableObjectArray, _setData, GrowableArray_setData, 629110947)          \
+  V(_GrowableObjectArray, [], GrowableArray_getIndexed, 1889032295)            \
+  V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 934874427)            \
+  V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 279007375)      \
+  V(_GrowableObjectArray, _setData, GrowableArray_setData, 588108129)          \
   V(_GrowableObjectArray, add, GrowableArray_add, 112207566)                   \
-  V(_ImmutableArray, [], ImmutableArray_getIndexed, 486821199)                 \
+  V(_ImmutableArray, [], ImmutableArray_getIndexed, 1456194617)                \
   V(_ImmutableArray, get:length, ImmutableArray_getLength, 433698233)          \
   V(Object, ==, Object_equal, 2126867222)                                      \
   V(_StringBase, get:hashCode, String_getHashCode, 320803993)                  \
   V(_StringBase, get:isEmpty, String_getIsEmpty, 110631520)                    \
   V(_StringBase, get:length, String_getLength, 320803993)                      \
-  V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525)                     \
+  V(_StringBase, codeUnitAt, String_codeUnitAt, 1574843871)                    \
   V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413)        \
   V(_OneByteString, _substringUncheckedNative,                                 \
-      OneByteString_substringUnchecked, 713121438)                             \
-  V(_OneByteString, _setAt, OneByteString_setAt, 342452817)                    \
-  V(_OneByteString, _allocate, OneByteString_allocate, 510754908)              \
+      OneByteString_substringUnchecked, 756784624)                             \
+  V(_OneByteString, _setAt, OneByteString_setAt, 1038132016)                   \
+  V(_OneByteString, _allocate, OneByteString_allocate, 716379334)              \
+
 
 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V)                                     \
-  V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, 726019207)\
+  V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger,           \
+    1074291215)                                                                \
   V(_IntegerImplementation, +, Integer_add, 25837296)                          \
-  V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, 726019207)\
+  V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger,           \
+    1074291215)                                                                \
   V(_IntegerImplementation, -, Integer_sub, 1697139934)                        \
-  V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, 726019207)\
+  V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger,           \
+    1074291215)                                                                \
   V(_IntegerImplementation, *, Integer_mul, 110370751)                         \
   V(_IntegerImplementation, %, Integer_modulo, 980686435)                      \
   V(_IntegerImplementation, remainder, Integer_remainder, 1536426035)          \
   V(_IntegerImplementation, ~/, Integer_truncDivide, 2059401166)               \
   V(_IntegerImplementation, unary-, Integer_negate, 675709702)                 \
   V(_IntegerImplementation, _bitAndFromInteger,                                \
-    Integer_bitAndFromInteger, 726019207)                                      \
+    Integer_bitAndFromInteger, 1074291215)                                     \
   V(_IntegerImplementation, &, Integer_bitAnd, 759019505)                      \
   V(_IntegerImplementation, _bitOrFromInteger,                                 \
-    Integer_bitOrFromInteger, 726019207)                                       \
+    Integer_bitOrFromInteger, 1074291215)                                      \
   V(_IntegerImplementation, |, Integer_bitOr, 1280367298)                      \
   V(_IntegerImplementation, _bitXorFromInteger,                                \
-    Integer_bitXorFromInteger, 726019207)                                      \
+    Integer_bitXorFromInteger, 1074291215)                                     \
   V(_IntegerImplementation, ^, Integer_bitXor, 686827811)                      \
   V(_IntegerImplementation,                                                    \
     _greaterThanFromInteger,                                                   \
-    Integer_greaterThanFromInt, 79222670)                                      \
+    Integer_greaterThanFromInt, 2056270230)                                    \
   V(_IntegerImplementation, >, Integer_greaterThan, 866987265)                 \
   V(_IntegerImplementation, ==, Integer_equal, 1763184121)                     \
-  V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, 79222670) \
+  V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger,           \
+    2056270230)                                                                \
   V(_IntegerImplementation, <, Integer_lessThan, 1423913958)                   \
   V(_IntegerImplementation, <=, Integer_lessEqualThan, 1087447066)             \
   V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1087476857)          \
   V(_IntegerImplementation, <<, Integer_shl, 1600590181)                       \
   V(_IntegerImplementation, >>, Integer_sar, 237416447)                        \
-  V(_Double, toInt, Double_toInt, 362666636)
+  V(_Double, toInt, Double_toInt, 630286253)
 
 
 #define MATH_LIB_INTRINSIC_LIST(V)                                             \
@@ -98,18 +103,18 @@
 
 #define TYPED_DATA_LIB_INTRINSIC_LIST(V)                                       \
   V(_TypedList, get:length, TypedData_getLength, 1004567191)                   \
-  V(_Int8Array, _new, TypedData_Int8Array_new, 48970297)                       \
-  V(_Uint8Array, _new, TypedData_Uint8Array_new, 389788863)                    \
-  V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 59021935)       \
-  V(_Int16Array, _new, TypedData_Int16Array_new, 465688649)                    \
-  V(_Uint16Array, _new, TypedData_Uint16Array_new, 169304657)                  \
-  V(_Int32Array, _new, TypedData_Int32Array_new, 947562951)                    \
-  V(_Uint32Array, _new, TypedData_Uint32Array_new, 85066537)                   \
-  V(_Int64Array, _new, TypedData_Int64Array_new, 775415132)                    \
-  V(_Uint64Array, _new, TypedData_Uint64Array_new, 536384146)                  \
-  V(_Float32Array, _new, TypedData_Float32Array_new, 723829075)                \
-  V(_Float64Array, _new, TypedData_Float64Array_new, 111654177)                \
-  V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 984763738)            \
+  V(_Int8Array, _new, TypedData_Int8Array_new, 1708300323)                     \
+  V(_Uint8Array, _new, TypedData_Uint8Array_new, 280387497)                    \
+  V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 1035267417)     \
+  V(_Int16Array, _new, TypedData_Int16Array_new, 1460383283)                   \
+  V(_Uint16Array, _new, TypedData_Uint16Array_new, 737997883)                  \
+  V(_Int32Array, _new, TypedData_Int32Array_new, 1608749233)                   \
+  V(_Uint32Array, _new, TypedData_Uint32Array_new, 1955293459)                 \
+  V(_Int64Array, _new, TypedData_Int64Array_new, 1992227270)                   \
+  V(_Uint64Array, _new, TypedData_Uint64Array_new, 291118076)                  \
+  V(_Float32Array, _new, TypedData_Float32Array_new, 962527805)                \
+  V(_Float64Array, _new, TypedData_Float64Array_new, 1871142667)               \
+  V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 1873359556)           \
   V(_Int8Array, ., TypedData_Int8Array_factory, 1139775342)                    \
   V(_Uint8Array, ., TypedData_Uint8Array_factory, 2065936658)                  \
   V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 1420655937)    \
diff --git a/runtime/vm/mirrors_api_impl.cc b/runtime/vm/mirrors_api_impl.cc
index 82132be..917d54d 100644
--- a/runtime/vm/mirrors_api_impl.cc
+++ b/runtime/vm/mirrors_api_impl.cc
@@ -182,6 +182,11 @@
   if (!obj.IsType() && !obj.IsClass()) {
     RETURN_TYPE_ERROR(isolate, object, Class/Type);
   }
+  // Ensure all classes are finalized.
+  Dart_Handle state = Api::CheckIsolateState(isolate);
+  if (::Dart_IsError(state)) {
+    return state;
+  }
   const Class& cls = (obj.IsType()) ?
       Class::Handle(Type::Cast(obj).type_class()) : Class::Cast(obj);
   // A class represents a function type when it is a canonical
@@ -500,7 +505,11 @@
   if (func.IsNull()) {
     RETURN_TYPE_ERROR(isolate, function, Function);
   }
-
+  // Ensure all classes are finalized.
+  Dart_Handle state = Api::CheckIsolateState(isolate);
+  if (::Dart_IsError(state)) {
+    return state;
+  }
   if (func.kind() == RawFunction::kConstructor) {
     // Special case the return type for constructors.  Inside the vm
     // we mark them as returning dynamic, but for the purposes of
@@ -555,7 +564,11 @@
   if (func.IsNull()) {
     RETURN_TYPE_ERROR(isolate, function, Function);
   }
-
+  // Ensure all classes are finalized.
+  Dart_Handle state = Api::CheckIsolateState(isolate);
+  if (::Dart_IsError(state)) {
+    return state;
+  }
   const intptr_t num_implicit_params = func.NumImplicitParameters();
   const intptr_t num_params = func.NumParameters() - num_implicit_params;
   if (parameter_index < 0 || parameter_index >= num_params) {
@@ -709,7 +722,11 @@
   if (var.IsNull()) {
     RETURN_TYPE_ERROR(isolate, variable, Field);
   }
-
+  // Ensure all classes are finalized.
+  Dart_Handle state = Api::CheckIsolateState(isolate);
+  if (::Dart_IsError(state)) {
+    return state;
+  }
   const AbstractType& type = AbstractType::Handle(isolate, var.type());
   return TypeToHandle(isolate, "Dart_VariableType", type);
 }
@@ -722,6 +739,11 @@
   if (!obj.IsType() && !obj.IsClass()) {
     RETURN_TYPE_ERROR(isolate, object, Class/Type);
   }
+  // Ensure all classes are finalized.
+  Dart_Handle state = Api::CheckIsolateState(isolate);
+  if (::Dart_IsError(state)) {
+    return state;
+  }
   const Class& cls = (obj.IsType()) ?
       Class::Handle(Type::Cast(obj).type_class()) : Class::Cast(obj);
   const intptr_t num_type_params = cls.NumTypeParameters();
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f9f8d40..6e89a43 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -144,10 +144,10 @@
   V(CoreLibrary, Object, _as)                                                  \
   V(CoreLibrary, Object, _instanceOf)                                          \
   V(CoreLibrary, _ObjectArray, _ObjectArray.)                                  \
-  V(CoreLibrary, AssertionErrorImplementation, _throwNew)                      \
-  V(CoreLibrary, TypeErrorImplementation, _throwNew)                           \
-  V(CoreLibrary, FallThroughErrorImplementation, _throwNew)                    \
-  V(CoreLibrary, AbstractClassInstantiationErrorImplementation, _throwNew)     \
+  V(CoreLibrary, _AssertionErrorImplementation, _throwNew)                     \
+  V(CoreLibrary, _TypeErrorImplementation, _throwNew)                          \
+  V(CoreLibrary, _FallThroughErrorImplementation, _throwNew)                   \
+  V(CoreLibrary, _AbstractClassInstantiationErrorImplementation, _throwNew)    \
   V(CoreLibrary, NoSuchMethodError, _throwNew)                                 \
   V(CoreLibrary, int, _throwFormatException)                                   \
   V(CoreLibrary, int, _parse)                                                  \
@@ -1076,12 +1076,6 @@
   type = Type::NewNonParameterizedType(cls);
   object_store->set_string_type(type);
 
-  cls = Class::New<Instance>(kIllegalCid);
-  RegisterClass(cls, Symbols::List(), core_lib);
-  cls.set_is_prefinalized();
-  pending_classes.Add(cls, Heap::kOld);
-  object_store->set_list_class(cls);
-
   cls = object_store->bool_class();
   type = Type::NewNonParameterizedType(cls);
   object_store->set_bool_type(type);
@@ -1524,7 +1518,8 @@
   StorePointer(&raw_ptr()->canonical_types_, Object::empty_array().raw());
   StorePointer(&raw_ptr()->functions_, Object::empty_array().raw());
   StorePointer(&raw_ptr()->fields_, Object::empty_array().raw());
-  StorePointer(&raw_ptr()->no_such_method_cache_, Object::empty_array().raw());
+  StorePointer(&raw_ptr()->invocation_dispatcher_cache_,
+               Object::empty_array().raw());
 }
 
 
@@ -1780,8 +1775,9 @@
 }
 
 
-RawFunction* Class::GetNoSuchMethodDispatcher(const String& target_name,
-                                              const Array& args_desc) const {
+RawFunction* Class::GetInvocationDispatcher(const String& target_name,
+                                            const Array& args_desc,
+                                            RawFunction::Kind kind) const {
   enum {
     kNameIndex = 0,
     kArgsDescIndex,
@@ -1789,8 +1785,10 @@
     kEntrySize
   };
 
+  ASSERT(kind == RawFunction::kNoSuchMethodDispatcher ||
+         kind == RawFunction::kInvokeFieldDispatcher);
   Function& dispatcher = Function::Handle();
-  Array& cache = Array::Handle(no_such_method_cache());
+  Array& cache = Array::Handle(invocation_dispatcher_cache());
   ASSERT(!cache.IsNull());
   String& name = String::Handle();
   Array& desc = Array::Handle();
@@ -1800,9 +1798,10 @@
     if (name.IsNull()) break;  // Reached last entry.
     if (!name.Equals(target_name)) continue;
     desc ^= cache.At(i + kArgsDescIndex);
-    if (desc.raw() == args_desc.raw()) {
+    if (desc.raw() != args_desc.raw()) continue;
+    dispatcher ^= cache.At(i + kFunctionIndex);
+    if (dispatcher.kind() == kind) {
       // Found match.
-      dispatcher ^= cache.At(i + kFunctionIndex);
       ASSERT(dispatcher.IsFunction());
       break;
     }
@@ -1815,9 +1814,9 @@
           ? static_cast<intptr_t>(kEntrySize)
           : cache.Length() * 2;
       cache ^= Array::Grow(cache, new_len);
-      set_no_such_method_cache(cache);
+      set_invocation_dispatcher_cache(cache);
     }
-    dispatcher ^= CreateNoSuchMethodDispatcher(target_name, args_desc);
+    dispatcher ^= CreateInvocationDispatcher(target_name, args_desc, kind);
     cache.SetAt(i + kNameIndex, target_name);
     cache.SetAt(i + kArgsDescIndex, args_desc);
     cache.SetAt(i + kFunctionIndex, dispatcher);
@@ -1826,11 +1825,12 @@
 }
 
 
-RawFunction* Class::CreateNoSuchMethodDispatcher(const String& target_name,
-                                                 const Array& args_desc) const {
+RawFunction* Class::CreateInvocationDispatcher(const String& target_name,
+                                               const Array& args_desc,
+                                               RawFunction::Kind kind) const {
   Function& invocation = Function::Handle(
       Function::New(String::Handle(Symbols::New(target_name)),
-                    RawFunction::kNoSuchMethodDispatcher,
+                    kind,
                     false,  // Not static.
                     false,  // Not const.
                     false,  // Not abstract.
@@ -1871,13 +1871,13 @@
 }
 
 
-RawArray* Class::no_such_method_cache() const {
-  return raw_ptr()->no_such_method_cache_;
+RawArray* Class::invocation_dispatcher_cache() const {
+  return raw_ptr()->invocation_dispatcher_cache_;
 }
 
 
-void Class::set_no_such_method_cache(const Array& cache) const {
-  StorePointer(&raw_ptr()->no_such_method_cache_, cache.raw());
+void Class::set_invocation_dispatcher_cache(const Array& cache) const {
+  StorePointer(&raw_ptr()->invocation_dispatcher_cache_, cache.raw());
 }
 
 
@@ -2327,11 +2327,6 @@
 }
 
 
-bool Class::IsListClass() const {
-  return raw() == Isolate::Current()->object_store()->list_class();
-}
-
-
 bool Class::IsCanonicalSignatureClass() const {
   const Function& function = Function::Handle(signature_function());
   return (!function.IsNull() && (function.signature_class() == raw()));
@@ -3727,7 +3722,8 @@
 
 
 RawArray* Function::saved_args_desc() const {
-  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher);
+  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher ||
+         kind() == RawFunction::kInvokeFieldDispatcher);
   const Object& obj = Object::Handle(raw_ptr()->data_);
   ASSERT(obj.IsArray());
   return Array::Cast(obj).raw();
@@ -3735,7 +3731,8 @@
 
 
 void Function::set_saved_args_desc(const Array& value) const {
-  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher);
+  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher ||
+         kind() == RawFunction::kInvokeFieldDispatcher);
   ASSERT(raw_ptr()->data_ == Object::null());
   set_data(value);
 }
@@ -4426,8 +4423,7 @@
 // does not contain an explicit constructor or factory. The implicit
 // constructor has the same token position as the owner class.
 bool Function::IsImplicitConstructor() const {
-  return IsConstructor() &&
-         (token_pos() == Class::Handle(Owner()).token_pos());
+  return IsConstructor() && (token_pos() == end_token_pos());
 }
 
 
@@ -4886,6 +4882,9 @@
     case RawFunction::kNoSuchMethodDispatcher:
       kind_str = " no-such-method-dispatcher";
       break;
+    case RawFunction::kInvokeFieldDispatcher:
+      kind_str = "invoke-field-dispatcher";
+      break;
     default:
       UNREACHABLE();
   }
@@ -6673,6 +6672,7 @@
 }
 
 
+// TODO(regis): This should take an Error* ambiguity_error parameter.
 RawObject* Library::LookupObject(const String& name) const {
   // First check if name is found in the local scope of the library.
   Object& obj = Object::Handle(LookupLocalObject(name));
@@ -6680,6 +6680,8 @@
     return obj.raw();
   }
   // Now check if name is found in any imported libs.
+  // TODO(regis): This does not seem correct. It should be an error if the name
+  // is found in more than one import and actually used.
   const Array& imports = Array::Handle(this->imports());
   Namespace& import = Namespace::Handle();
   for (intptr_t j = 0; j < this->num_imports(); j++) {
@@ -6693,6 +6695,7 @@
 }
 
 
+// TODO(regis): This should take an Error* ambiguity_error parameter.
 RawClass* Library::LookupClass(const String& name) const {
   Object& obj = Object::Handle(LookupObject(name));
   if (!obj.IsNull() && obj.IsClass()) {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 4691908..e298739 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -788,9 +788,6 @@
   // Check if this class represents the 'Function' class.
   bool IsFunctionClass() const;
 
-  // Check if this class represents the 'List' class.
-  bool IsListClass() const;
-
   // Check if this class represents a signature class.
   bool IsSignatureClass() const {
     return signature_function() != Object::null();
@@ -929,8 +926,9 @@
 
   RawArray* constants() const;
 
-  RawFunction* GetNoSuchMethodDispatcher(const String& target_name,
-                                         const Array& args_desc) const;
+  RawFunction* GetInvocationDispatcher(const String& target_name,
+                                       const Array& args_desc,
+                                       RawFunction::Kind kind) const;
 
   void Finalize() const;
 
@@ -1021,10 +1019,11 @@
   void set_canonical_types(const Array& value) const;
   RawArray* canonical_types() const;
 
-  RawArray* no_such_method_cache() const;
-  void set_no_such_method_cache(const Array& cache) const;
-  RawFunction* CreateNoSuchMethodDispatcher(const String& target_name,
-                                            const Array& args_desc) const;
+  RawArray* invocation_dispatcher_cache() const;
+  void set_invocation_dispatcher_cache(const Array& cache) const;
+  RawFunction* CreateInvocationDispatcher(const String& target_name,
+                                          const Array& args_desc,
+                                          RawFunction::Kind kind) const;
   void CalculateFieldOffsets() const;
 
   // Assigns empty array to all raw class array fields.
@@ -1442,6 +1441,10 @@
     return kind() == RawFunction::kNoSuchMethodDispatcher;
   }
 
+  bool IsInvokeFieldDispatcher() const {
+    return kind() == RawFunction::kInvokeFieldDispatcher;
+  }
+
   // Returns true iff an implicit closure function has been created
   // for this function.
   bool HasImplicitClosureFunction() const {
@@ -1487,6 +1490,7 @@
       case RawFunction::kImplicitSetter:
       case RawFunction::kMethodExtractor:
       case RawFunction::kNoSuchMethodDispatcher:
+      case RawFunction::kInvokeFieldDispatcher:
         return true;
       case RawFunction::kClosureFunction:
       case RawFunction::kConstructor:
@@ -1520,6 +1524,7 @@
   bool IsInFactoryScope() const;
 
   intptr_t token_pos() const { return raw_ptr()->token_pos_; }
+  void set_token_pos(intptr_t value) const;
 
   intptr_t end_token_pos() const { return raw_ptr()->end_token_pos_; }
   void set_end_token_pos(intptr_t value) const {
@@ -1800,7 +1805,6 @@
   void set_is_external(bool value) const;
   void set_parent_function(const Function& value) const;
   void set_owner(const Object& value) const;
-  void set_token_pos(intptr_t value) const;
   RawFunction* implicit_closure_function() const;
   void set_implicit_closure_function(const Function& value) const;
   void set_num_optional_parameters(intptr_t value) const;  // Encoded value.
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index cc000f4..27fea12 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -34,7 +34,6 @@
     external_two_byte_string_class_(Class::null()),
     bool_type_(Type::null()),
     bool_class_(Class::null()),
-    list_class_(Class::null()),
     array_class_(Class::null()),
     array_type_(Type::null()),
     immutable_array_class_(Class::null()),
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index dc9b5dc..ecf9ff4 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -22,9 +22,11 @@
   enum {
     kNone = 0,
     kAsync,
+    kCodec,
     kCore,
     kCollection,
     kCollectionDev,
+    kConvert,
     kIsolate,
     kJson,
     kMath,
@@ -161,9 +163,6 @@
   RawClass* bool_class() const { return bool_class_; }
   void set_bool_class(const Class& value) { bool_class_ = value.raw(); }
 
-  RawClass* list_class() const { return list_class_; }
-  void set_list_class(const Class& value) { list_class_ = value.raw(); }
-
   RawClass* array_class() const { return array_class_; }
   void set_array_class(const Class& value) { array_class_ = value.raw(); }
   static intptr_t array_class_offset() {
@@ -261,11 +260,13 @@
 
   RawLibrary* async_library() const { return async_library_; }
   RawLibrary* builtin_library() const { return builtin_library_; }
+  RawLibrary* codec_library() const { return codec_library_; }
   RawLibrary* core_library() const { return core_library_; }
   RawLibrary* collection_library() const { return collection_library_; }
   RawLibrary* collection_dev_library() const {
     return collection_dev_library_;
   }
+  RawLibrary* convert_library() const { return convert_library_; }
   RawLibrary* isolate_library() const { return isolate_library_; }
   RawLibrary* json_library() const { return json_library_; }
   RawLibrary* math_library() const { return math_library_; }
@@ -277,6 +278,9 @@
       case kAsync:
         async_library_ = value.raw();
         break;
+      case kCodec:
+        codec_library_ = value.raw();
+        break;
       case kCore:
         core_library_ = value.raw();
         break;
@@ -286,6 +290,9 @@
       case kCollectionDev:
         collection_dev_library_ = value.raw();
         break;
+      case kConvert:
+        convert_library_ = value.raw();
+        break;
       case kIsolate:
         isolate_library_ = value.raw();
         break;
@@ -442,7 +449,6 @@
   RawClass* external_two_byte_string_class_;
   RawType* bool_type_;
   RawClass* bool_class_;
-  RawClass* list_class_;
   RawClass* array_class_;
   RawType* array_type_;
   RawClass* immutable_array_class_;
@@ -458,9 +464,11 @@
   RawArray* canonical_type_arguments_;
   RawLibrary* async_library_;
   RawLibrary* builtin_library_;
+  RawLibrary* codec_library_;
   RawLibrary* core_library_;
   RawLibrary* collection_library_;
   RawLibrary* collection_dev_library_;
+  RawLibrary* convert_library_;
   RawLibrary* isolate_library_;
   RawLibrary* json_library_;
   RawLibrary* math_library_;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 38cc62e..fb1bed9 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -776,6 +776,10 @@
       node_sequence =
           parser.ParseNoSuchMethodDispatcher(func, default_parameter_values);
       break;
+    case RawFunction::kInvokeFieldDispatcher:
+      node_sequence =
+          parser.ParseInvokeFieldDispatcher(func, default_parameter_values);
+      break;
     default:
       UNREACHABLE();
   }
@@ -1108,6 +1112,46 @@
 }
 
 
+void Parser::BuildDispatcherScope(const Function& func,
+                                  const ArgumentsDescriptor& desc,
+                                  Array& default_values) {
+  ParamList params;
+  // Receiver first.
+  intptr_t token_pos = func.token_pos();
+  params.AddReceiver(ReceiverType(), token_pos);
+  // Remaining positional parameters.
+  intptr_t i = 1;
+  for (; i < desc.PositionalCount(); ++i) {
+    ParamDesc p;
+    char name[64];
+    OS::SNPrint(name, 64, ":p%"Pd, i);
+    p.name = &String::ZoneHandle(Symbols::New(name));
+    p.type = &Type::ZoneHandle(Type::DynamicType());
+    params.parameters->Add(p);
+    params.num_fixed_parameters++;
+  }
+  ASSERT(desc.PositionalCount() == params.num_fixed_parameters);
+
+  // Named parameters.
+  for (; i < desc.Count(); ++i) {
+    ParamDesc p;
+    intptr_t index = i - desc.PositionalCount();
+    p.name = &String::ZoneHandle(desc.NameAt(index));
+    p.type = &Type::ZoneHandle(Type::DynamicType());
+    p.default_value = &Object::ZoneHandle();
+    params.parameters->Add(p);
+    params.num_optional_parameters++;
+    params.has_optional_named_parameters = true;
+  }
+  ASSERT(desc.NamedCount() == params.num_optional_parameters);
+
+  SetupDefaultsForOptionalParams(&params, default_values);
+
+  // Build local scope for function and populate with the formal parameters.
+  OpenFunctionBlock(func);
+  AddFormalParamsToScope(&params, current_block_->scope);
+}
+
 SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func,
                                                   Array& default_values) {
   TRACE_PARSER("ParseNoSuchMethodDispatcher");
@@ -1120,49 +1164,19 @@
   ArgumentsDescriptor desc(Array::Handle(func.saved_args_desc()));
   ASSERT(desc.Count() > 0);
 
-  // Create parameter list. Receiver first.
-  ParamList params;
-  params.AddReceiver(ReceiverType(), token_pos);
-
-  // Remaining positional parameters.
-  intptr_t i = 1;
-  for (; i < desc.PositionalCount(); ++i) {
-    ParamDesc p;
-    char name[64];
-    OS::SNPrint(name, 64, ":p%"Pd, i);
-    p.name = &String::ZoneHandle(Symbols::New(name));
-    p.type = &Type::ZoneHandle(Type::DynamicType());
-    params.parameters->Add(p);
-    params.num_fixed_parameters++;
-  }
-  // Named parameters.
-  for (; i < desc.Count(); ++i) {
-    ParamDesc p;
-    intptr_t index = i - desc.PositionalCount();
-    p.name = &String::ZoneHandle(desc.NameAt(index));
-    p.type = &Type::ZoneHandle(Type::DynamicType());
-    p.default_value = &Object::ZoneHandle();
-    params.parameters->Add(p);
-    params.num_optional_parameters++;
-    params.has_optional_named_parameters = true;
-  }
-
-  SetupDefaultsForOptionalParams(&params, default_values);
-
-  // Build local scope for function and populate with the formal parameters.
-  OpenFunctionBlock(func);
-  LocalScope* scope = current_block_->scope;
-  AddFormalParamsToScope(&params, scope);
+  // Set up scope for this function.
+  BuildDispatcherScope(func, desc, default_values);
 
   // Receiver is local 0.
+  LocalScope* scope = current_block_->scope;
   ArgumentListNode* func_args = new ArgumentListNode(token_pos);
   for (intptr_t i = 0; i < desc.Count(); ++i) {
     func_args->Add(new LoadLocalNode(token_pos, scope->VariableAt(i)));
   }
 
-  if (params.num_optional_parameters > 0) {
+  if (desc.NamedCount() > 0) {
     const Array& arg_names =
-        Array::ZoneHandle(Array::New(params.num_optional_parameters));
+        Array::ZoneHandle(Array::New(desc.NamedCount()));
     for (intptr_t i = 0; i < arg_names.Length(); ++i) {
       arg_names.SetAt(i, String::Handle(desc.NameAt(i)));
     }
@@ -1186,6 +1200,62 @@
 }
 
 
+SequenceNode* Parser::ParseInvokeFieldDispatcher(const Function& func,
+                                                 Array& default_values) {
+  TRACE_PARSER("ParseInvokeFieldDispatcher");
+
+  ASSERT(func.IsInvokeFieldDispatcher());
+  intptr_t token_pos = func.token_pos();
+  ASSERT(func.token_pos() == 0);
+  ASSERT(current_class().raw() == func.Owner());
+
+  const Array& args_desc = Array::Handle(func.saved_args_desc());
+  ArgumentsDescriptor desc(args_desc);
+  ASSERT(desc.Count() > 0);
+
+  // Set up scope for this function.
+  BuildDispatcherScope(func, desc, default_values);
+
+  // Receiver is local 0.
+  LocalScope* scope = current_block_->scope;
+  ArgumentListNode* no_args = new ArgumentListNode(token_pos);
+  LoadLocalNode* receiver = new LoadLocalNode(token_pos, scope->VariableAt(0));
+
+  const String& name = String::Handle(func.name());
+  const String& getter_name =
+      String::ZoneHandle(Symbols::New(String::Handle(Field::GetterName(name))));
+  InstanceCallNode* getter_call = new InstanceCallNode(token_pos,
+                                                       receiver,
+                                                       getter_name,
+                                                       no_args);
+
+  // Pass arguments 1..n to the closure call.
+  ArgumentListNode* closure_args = new ArgumentListNode(token_pos);
+  const Array& names = Array::Handle(Array::New(desc.NamedCount(), Heap::kOld));
+  // Positional parameters.
+  intptr_t i = 1;
+  for (; i < desc.PositionalCount(); ++i) {
+    closure_args->Add(new LoadLocalNode(token_pos, scope->VariableAt(i)));
+  }
+  // Named parameters.
+  for (; i < desc.Count(); i++) {
+    closure_args->Add(new LoadLocalNode(token_pos, scope->VariableAt(i)));
+    intptr_t index = i - desc.PositionalCount();
+    names.SetAt(index, String::Handle(desc.NameAt(index)));
+  }
+  closure_args->set_names(names);
+
+  EnsureSavedCurrentContext();
+  ClosureCallNode* closure_call = new ClosureCallNode(token_pos,
+                                                      getter_call,
+                                                      closure_args);
+
+  ReturnNode* return_node = new ReturnNode(token_pos, closure_call);
+  current_block_->statements->Add(return_node);
+  return CloseBlock();
+}
+
+
 void Parser::SkipBlock() {
   ASSERT(CurrentToken() == Token::kLBRACE);
   GrowableArray<Token::Kind> token_stack(8);
@@ -1281,7 +1351,7 @@
       // mode, because they are part of the function type of closurized
       // functions appearing in type tests with typedefs.
       parameter.type = &AbstractType::ZoneHandle(
-          ParseType(is_top_level_ ? ClassFinalizer::kTryResolve :
+          ParseType(is_top_level_ ? ClassFinalizer::kResolveTypeParameters :
                                     ClassFinalizer::kCanonicalize));
     } else {
       parameter.type = &Type::ZoneHandle(Type::DynamicType());
@@ -1813,7 +1883,8 @@
 
 
 void Parser::GenerateSuperConstructorCall(const Class& cls,
-                                          LocalVariable* receiver) {
+                                          LocalVariable* receiver,
+                                          ArgumentListNode* forwarding_args) {
   const intptr_t supercall_pos = TokenPos();
   const Class& super_class = Class::Handle(cls.SuperClass());
   // Omit the implicit super() if there is no super class (i.e.
@@ -1824,8 +1895,9 @@
        Class::Handle(super_class.SuperClass()).IsObjectClass())) {
     return;
   }
-  String& ctor_name = String::Handle(super_class.Name());
-  ctor_name = String::Concat(ctor_name, Symbols::Dot());
+  String& super_ctor_name = String::Handle(super_class.Name());
+  super_ctor_name = String::Concat(super_ctor_name, Symbols::Dot());
+
   ArgumentListNode* arguments = new ArgumentListNode(supercall_pos);
   // Implicit 'this' parameter is the first argument.
   AstNode* implicit_argument = new LoadLocalNode(supercall_pos, receiver);
@@ -1835,8 +1907,27 @@
       new LiteralNode(supercall_pos,
                       Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)));
   arguments->Add(phase_parameter);
+
+  // If this is a super call in a forwarding constructor, add the user-
+  // defined arguments to the super call and adjust the the super
+  // constructor name to the respective named constructor if necessary.
+  if (forwarding_args != NULL) {
+    for (int i = 0; i < forwarding_args->length(); i++) {
+      arguments->Add(forwarding_args->NodeAt(i));
+    }
+    String& ctor_name = String::Handle(current_function().name());
+    String& class_name = String::Handle(cls.Name());
+    if (ctor_name.Length() > class_name.Length() + 1) {
+      // Generating a forwarding call to a named constructor 'C.n'.
+      // Add the constructor name 'n' to the super constructor.
+      ctor_name = String::SubString(ctor_name, class_name.Length() + 1);
+      super_ctor_name = String::Concat(super_ctor_name, ctor_name);
+    }
+  }
+
+  // Resolve super constructor function and check arguments.
   const Function& super_ctor = Function::ZoneHandle(
-      super_class.LookupConstructor(ctor_name));
+      super_class.LookupConstructor(super_ctor_name));
   if (super_ctor.IsNull()) {
       ErrorMsg(supercall_pos,
                "unresolved implicit call to super constructor '%s()'",
@@ -2129,7 +2220,7 @@
   if (!super_init_seen) {
     // Generate implicit super() if we haven't seen an explicit super call
     // or constructor redirection.
-    GenerateSuperConstructorCall(cls, receiver);
+    GenerateSuperConstructorCall(cls, receiver, NULL);
   }
   CheckConstFieldsInitialized(cls);
 }
@@ -2190,6 +2281,7 @@
   const intptr_t ctor_pos = TokenPos();
   OpenFunctionBlock(func);
   const Class& cls = Class::Handle(func.Owner());
+
   LocalVariable* receiver = new LocalVariable(
       ctor_pos,
       Symbols::This(),
@@ -2210,7 +2302,39 @@
   ParseInitializedInstanceFields(cls, receiver, &initialized_fields);
   receiver->set_invisible(false);
 
-  GenerateSuperConstructorCall(cls, receiver);
+  // If the class of this implicit constructor is a mixin application class,
+  // it is a forwarding constructor of the mixin. The forwarding
+  // constructor initializes the instance fields that have initializer
+  // expressions and then calls the respective super constructor with
+  // the same name and number of parameters.
+  ArgumentListNode* forwarding_args = NULL;
+  if (cls.mixin() != Type::null()) {
+    // At this point we don't support forwarding constructors
+    // that have optional parameters because we don't know the default
+    // values of the optional parameters. We would have to compile the super
+    // constructor to get the default values. Also, the spec is not clear
+    // whether optional parameters are even allowed in this situation.
+    // TODO(hausner): Remove this limitation if the language spec indeed
+    // allows optional parameters.
+    if (func.HasOptionalParameters()) {
+      ErrorMsg(ctor_pos,
+               "forwarding constructors must not have optional parameters");
+    }
+
+    // Prepare user-defined arguments to be forwarded to super call.
+    // The first user-defined argument is at position 2.
+    forwarding_args = new ArgumentListNode(ctor_pos);
+    for (int i = 2; i < func.NumParameters(); i++) {
+      LocalVariable* param = new LocalVariable(
+          ctor_pos,
+          String::ZoneHandle(func.ParameterNameAt(i)),
+          Type::ZoneHandle(Type::DynamicType()));
+      current_block_->scope->AddVariable(param);
+      forwarding_args->Add(new LoadLocalNode(ctor_pos, param));
+    }
+  }
+
+  GenerateSuperConstructorCall(cls, receiver, forwarding_args);
   CheckConstFieldsInitialized(cls);
 
   // Empty constructor body.
@@ -2800,20 +2924,17 @@
     ConsumeToken();
     const intptr_t type_pos = TokenPos();
     const AbstractType& type = AbstractType::Handle(
-        ParseType(ClassFinalizer::kTryResolve));
-    if (!type.IsMalformed() &&
-        (type.IsTypeParameter() || type.IsDynamicType())) {
+        ParseType(ClassFinalizer::kResolveTypeParameters));
+    if (!type.IsMalformed() && type.IsTypeParameter()) {
       // Replace the type with a malformed type and compile a throw when called.
       redirection_type = ClassFinalizer::NewFinalizedMalformedType(
           Error::Handle(),  // No previous error.
           current_class(),
           type_pos,
-          ClassFinalizer::kTryResolve,  // No compile-time error.
-          "factory '%s' may not redirect to %s'%s'",
+          ClassFinalizer::kResolveTypeParameters,  // No compile-time error.
+          "factory '%s' may not redirect to type parameter '%s'",
           method->name->ToCString(),
-          type.IsTypeParameter() ? "type parameter " : "",
-          type.IsTypeParameter() ?
-              String::Handle(type.UserVisibleName()).ToCString() : "dynamic");
+          String::Handle(type.UserVisibleName()).ToCString());
     } else {
       redirection_type ^= type.raw();
     }
@@ -2859,7 +2980,7 @@
   // Only constructors can redirect to another method.
   ASSERT((method->redirect_name == NULL) || method->IsConstructor());
 
-  intptr_t method_end_pos = method_pos;
+  intptr_t method_end_pos = TokenPos();
   if ((CurrentToken() == Token::kLBRACE) ||
       (CurrentToken() == Token::kARROW)) {
     if (method->has_abstract) {
@@ -3022,11 +3143,15 @@
       // invocation/compilation.
       // For instance fields, the expression is parsed when a constructor
       // is compiled.
-      // For static fields with very simple initializer expressions
+      // For static const fields with very simple initializer expressions
       // (e.g. a literal number or string) we optimize away the
       // kConstImplicitGetter and initialize the field here.
+      // We also do it for static final non-const fields, but only in production
+      // mode.
 
-      if (field->has_static && (field->has_final || field->has_const) &&
+      if (field->has_static &&
+          (field->has_const ||
+           (!FLAG_enable_type_checks && field->has_final)) &&
           (LookaheadToken(1) == Token::kSEMICOLON)) {
         has_simple_literal = IsSimpleLiteral(*field->type, &init_value);
       }
@@ -3215,7 +3340,7 @@
         // because getters and setters could be closurized at some time (not
         // supported yet).
         member.type = &AbstractType::ZoneHandle(
-            ParseType(ClassFinalizer::kTryResolve));
+            ParseType(ClassFinalizer::kResolveTypeParameters));
       }
     }
   }
@@ -3464,18 +3589,13 @@
   if (CurrentToken() == Token::kEXTENDS) {
     ConsumeToken();
     const intptr_t type_pos = TokenPos();
-    super_type = ParseType(ClassFinalizer::kTryResolve);
+    super_type = ParseType(ClassFinalizer::kResolveTypeParameters);
     if (super_type.IsTypeParameter()) {
       ErrorMsg(type_pos,
                "class '%s' may not extend type parameter '%s'",
                class_name.ToCString(),
                String::Handle(super_type.UserVisibleName()).ToCString());
     }
-    if (super_type.IsDynamicType()) {
-      ErrorMsg(type_pos,
-               "class '%s' may not extend 'dynamic'",
-               class_name.ToCString());
-    }
     if (CurrentToken() == Token::kWITH) {
       super_type = ParseMixins(super_type);
     }
@@ -3575,7 +3695,8 @@
   ctor_name = String::Concat(ctor_name, Symbols::Dot());
   ctor_name = Symbols::New(ctor_name);
   // To indicate that this is an implicit constructor, we set the
-  // token position is the same as the token position of the class.
+  // token position and end token position of the function
+  // to the token position of the class.
   Function& ctor = Function::Handle(
       Function::New(ctor_name,
                     RawFunction::kConstructor,
@@ -3585,6 +3706,8 @@
                     /* is_external = */ false,
                     cls,
                     cls.token_pos()));
+  ctor.set_end_token_pos(ctor.token_pos());
+
   ParamList params;
   // Add implicit 'this' parameter. We don't care about the specific type
   // and just specify dynamic.
@@ -3671,7 +3794,7 @@
 
   const intptr_t type_pos = TokenPos();
   AbstractType& type =
-      AbstractType::Handle(ParseType(ClassFinalizer::kTryResolve));
+      AbstractType::Handle(ParseType(ClassFinalizer::kResolveTypeParameters));
   if (type.IsTypeParameter()) {
     ErrorMsg(type_pos,
              "class '%s' may not extend type parameter '%s'",
@@ -3787,7 +3910,7 @@
   // result type.
   if (!result_type.IsNull()) {
     ResolveTypeFromClass(function_type_alias,
-                         ClassFinalizer::kTryResolve,
+                         ClassFinalizer::kResolveTypeParameters,
                          &result_type);
   }
   // Parse the formal parameters of the function type.
@@ -3984,7 +4107,7 @@
       type_parameter ^= type_parameters.TypeAt(i);
       type_parameter_bound = type_parameter.bound();
       ResolveTypeFromClass(cls,
-                           ClassFinalizer::kTryResolve,
+                           ClassFinalizer::kResolveTypeParameters,
                            &type_parameter_bound);
       type_parameter.set_bound(type_parameter_bound);
     }
@@ -4046,15 +4169,12 @@
   do {
     ConsumeToken();
     intptr_t interface_pos = TokenPos();
-    interface = ParseType(ClassFinalizer::kTryResolve);
+    interface = ParseType(ClassFinalizer::kResolveTypeParameters);
     if (interface.IsTypeParameter()) {
       ErrorMsg(interface_pos,
                "type parameter '%s' may not be used in interface list",
                String::Handle(interface.UserVisibleName()).ToCString());
     }
-    if (interface.IsDynamicType()) {
-      ErrorMsg(interface_pos, "'dynamic' may not be used in interface list");
-    }
     all_interfaces.Add(interface);
   } while (CurrentToken() == Token::kCOMMA);
   cls_interfaces = Array::MakeArray(all_interfaces);
@@ -4080,7 +4200,7 @@
   do {
     ConsumeToken();
     const intptr_t mixin_pos = TokenPos();
-    mixin_type = ParseType(ClassFinalizer::kTryResolve);
+    mixin_type = ParseType(ClassFinalizer::kResolveTypeParameters);
     if (mixin_type.IsTypeParameter()) {
       ErrorMsg(mixin_pos,
                "mixin type '%s' may not be a type parameter",
@@ -4101,7 +4221,7 @@
     mixin_application.set_mixin(Type::Cast(mixin_type));
     mixin_application.set_library(library_);
     mixin_application.set_is_synthesized_class();
-    AddImplicitConstructor(mixin_application);
+
     // Add the mixin type to the interfaces that the mixin application
     // class implements. This is necessary so that type tests work.
     mixin_application_interfaces = Array::New(1);
@@ -4113,7 +4233,7 @@
     // to get the copy is to rewind the parser, parse the mixin type
     // again and steal its type arguments.
     SetPosition(mixin_pos);
-    mixin_type = ParseType(ClassFinalizer::kTryResolve);
+    mixin_type = ParseType(ClassFinalizer::kResolveTypeParameters);
     mixin_type_arguments = mixin_type.arguments();
 
     mixin_application_type = Type::New(mixin_application,
@@ -4136,7 +4256,7 @@
   const bool is_static = true;
   const AbstractType& type =
       AbstractType::ZoneHandle(ParseConstFinalVarOrType(
-          FLAG_enable_type_checks ? ClassFinalizer::kTryResolve :
+          FLAG_enable_type_checks ? ClassFinalizer::kResolveTypeParameters :
                                     ClassFinalizer::kIgnore));
   Field& field = Field::Handle();
   Function& getter = Function::Handle();
@@ -4175,7 +4295,8 @@
       ConsumeToken();
       Instance& field_value = Instance::Handle(Object::sentinel().raw());
       bool has_simple_literal = false;
-      if (is_final && (LookaheadToken(1) == Token::kSEMICOLON)) {
+      if ((is_const || (!FLAG_enable_type_checks && is_final)) &&
+          (LookaheadToken(1) == Token::kSEMICOLON)) {
         has_simple_literal = IsSimpleLiteral(type, &field_value);
       }
       SkipExpr();
@@ -4234,7 +4355,7 @@
     // Parse optional type.
     if ((CurrentToken() == Token::kIDENT) &&
         (LookaheadToken(1) != Token::kLPAREN)) {
-      result_type = ParseType(ClassFinalizer::kTryResolve);
+      result_type = ParseType(ClassFinalizer::kResolveTypeParameters);
     }
   }
   const intptr_t name_pos = TokenPos();
@@ -4328,7 +4449,7 @@
       ConsumeToken();
       result_type = Type::VoidType();
     } else {
-      result_type = ParseType(ClassFinalizer::kTryResolve);
+      result_type = ParseType(ClassFinalizer::kResolveTypeParameters);
     }
     is_getter = (CurrentToken() == Token::kGET);
     if (CurrentToken() == Token::kGET || CurrentToken() == Token::kSET) {
@@ -4832,7 +4953,7 @@
           params->has_optional_named_parameters));
   if (!Utils::IsInt(16, params->num_fixed_parameters) ||
       !Utils::IsInt(16, params->num_optional_parameters)) {
-    ErrorMsg("too many formal parameters");
+    ErrorMsg(func.token_pos(), "too many formal parameters");
   }
   func.set_num_fixed_parameters(params->num_fixed_parameters);
   func.SetNumOptionalParameters(params->num_optional_parameters,
@@ -5324,30 +5445,41 @@
 
 
 bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) {
-  bool no_check = type.IsDynamicType();
-  if ((CurrentToken() == Token::kINTEGER) &&
-      (no_check || type.IsIntType() || type.IsNumberType())) {
+  // Assigning null never causes a type error.
+  if (CurrentToken() == Token::kNULL) {
+    *value = Instance::null();
+    return true;
+  }
+  // If the type of the const field is guaranteed to be instantiated once
+  // resolved at class finalization time, and if the type of the literal is one
+  // of int, double, String, or bool, then preset the field with the value and
+  // perform the type check (in checked mode only) at finalization time.
+  if (type.IsTypeParameter() ||
+      (type.arguments() != AbstractTypeArguments::null())) {
+    // Type parameters are always resolved eagerly by the parser and never
+    // resolved later by the class finalizer. Therefore, we know here that if
+    // 'type' is not a type parameter (an unresolved type will not get resolved
+    // to a type parameter later) and if 'type' has no type arguments, then it
+    // will be instantiated at class finalization time. Otherwise, we return
+    // false, since the type test would not be possible at finalization time for
+    // an uninstantiated type.
+    return false;
+  }
+  if (CurrentToken() == Token::kINTEGER) {
     *value = CurrentIntegerLiteral();
     return true;
-  } else if ((CurrentToken() == Token::kDOUBLE) &&
-      (no_check || type.IsDoubleType() || type.IsNumberType())) {
+  } else if (CurrentToken() == Token::kDOUBLE) {
     *value = CurrentDoubleLiteral();
     return true;
-  } else if ((CurrentToken() == Token::kSTRING) &&
-      (no_check || type.IsStringType())) {
+  } else if (CurrentToken() == Token::kSTRING) {
     *value = CurrentLiteral()->raw();
     return true;
-  } else if ((CurrentToken() == Token::kTRUE) &&
-      (no_check || type.IsBoolType())) {
+  } else if (CurrentToken() == Token::kTRUE) {
     *value = Bool::True().raw();
     return true;
-  } else if ((CurrentToken() == Token::kFALSE) &&
-      (no_check || type.IsBoolType())) {
+  } else if (CurrentToken() == Token::kFALSE) {
     *value = Bool::False().raw();
     return true;
-  } else if (CurrentToken() == Token::kNULL) {
-    *value = Instance::null();
-    return true;
   }
   return false;
 }
@@ -8002,7 +8134,7 @@
 void Parser::ResolveTypeFromClass(const Class& scope_class,
                                   ClassFinalizer::FinalizationKind finalization,
                                   AbstractType* type) {
-  ASSERT(finalization >= ClassFinalizer::kTryResolve);
+  ASSERT(finalization >= ClassFinalizer::kResolveTypeParameters);
   ASSERT(type != NULL);
   if (type->IsResolved()) {
     return;
@@ -8050,25 +8182,29 @@
           return;
         }
       }
-      // Resolve classname in the scope of the current library.
-      Error& error = Error::Handle();
-      // If we finalize a type expression, as opposed to a type annotation, we
-      // tell the resolver (by passing NULL) to immediately report an ambiguous
-      // type as a compile time error.
-      resolved_type_class = ResolveClassInCurrentLibraryScope(
-          unresolved_class.token_pos(),
-          unresolved_class_name,
-          finalization >= ClassFinalizer::kCanonicalizeExpression ?
-              NULL : &error);
-      if (!error.IsNull()) {
-        *type = ClassFinalizer::NewFinalizedMalformedType(
-            error,
-            scope_class,
+      // The referenced class may not have been parsed yet. It would be wrong
+      // to resolve it too early to an imported class of the same name.
+      if (finalization > ClassFinalizer::kResolveTypeParameters) {
+        // Resolve classname in the scope of the current library.
+        Error& error = Error::Handle();
+        // If we finalize a type expression, as opposed to a type annotation,
+        // we tell the resolver (by passing NULL) to immediately report an
+        // ambiguous type as a compile time error.
+        resolved_type_class = ResolveClassInCurrentLibraryScope(
             unresolved_class.token_pos(),
-            finalization,
-            "cannot resolve class '%s'",
-            unresolved_class_name.ToCString());
-        return;
+            unresolved_class_name,
+            finalization >= ClassFinalizer::kCanonicalizeExpression ?
+                NULL : &error);
+        if (!error.IsNull()) {
+          *type = ClassFinalizer::NewFinalizedMalformedType(
+              error,
+              scope_class,
+              unresolved_class.token_pos(),
+              finalization,
+              "cannot resolve class '%s'",
+              unresolved_class_name.ToCString());
+          return;
+        }
       }
     } else {
       LibraryPrefix& lib_prefix =
@@ -8530,8 +8666,8 @@
           if (first_lib_url.raw() == lib.url()) {
             ambiguous_ref_error = FormatErrorMsg(
                 script_, ident_pos, "Error",
-                "ambiguous reference: "
-                "'%s' as library '%s' is imported multiple times",
+                "ambiguous reference to '%s', "
+                "as library '%s' is imported multiple times",
                 name.ToCString(),
                 first_lib_url.ToCString());
           } else {
@@ -8850,7 +8986,7 @@
     parameterized_type.set_arguments(Object::null_abstract_type_arguments());
     parameterized_type.set_malformed_error(malformed_error);
   }
-  if (finalization >= ClassFinalizer::kTryResolve) {
+  if (finalization >= ClassFinalizer::kResolveTypeParameters) {
     ResolveTypeFromClass(current_class(), finalization, &type);
     if (finalization >= ClassFinalizer::kCanonicalize) {
       type ^= ClassFinalizer::FinalizeType(current_class(), type, finalization);
@@ -8953,6 +9089,7 @@
       AstNode* elem = element_list[i];
       // Arguments have been evaluated to a literal value already.
       ASSERT(elem->IsLiteralNode());
+      ASSERT(!is_top_level_);  // We cannot check unresolved types.
       if (FLAG_enable_type_checks &&
           !element_type.IsDynamicType() &&
           (!elem->AsLiteralNode()->literal().IsNull() &&
@@ -9149,6 +9286,7 @@
       AstNode* arg = kv_pairs_list[i];
       // Arguments have been evaluated to a literal value already.
       ASSERT(arg->IsLiteralNode());
+      ASSERT(!is_top_level_);  // We cannot check unresolved types.
       if (FLAG_enable_type_checks &&
           ((i % 2) == 1) &&  // Check values only, not keys.
           !value_type.IsDynamicType() &&
@@ -9305,7 +9443,7 @@
         Error::Handle(),  // No previous error.
         current_class(),
         type_pos,
-        ClassFinalizer::kTryResolve,  // No compile-time error.
+        ClassFinalizer::kResolveTypeParameters,  // No compile-time error.
         "%s'%s' cannot be instantiated",
         type.IsTypeParameter() ? "type parameter " : "",
         type.IsTypeParameter() ?
@@ -9371,7 +9509,7 @@
             Error::Handle(),  // No previous error.
             current_class(),
             call_pos,
-            ClassFinalizer::kTryResolve,  // No compile-time error.
+            ClassFinalizer::kResolveTypeParameters,  // No compile-time error.
             "class '%s' has no constructor or factory named '%s'",
             String::Handle(type_class.Name()).ToCString(),
             external_constructor_name.ToCString());
@@ -9482,6 +9620,7 @@
       if (!type_bound.IsNull()) {
         ASSERT(!type_bound.IsMalformed());
         Error& malformed_error = Error::Handle();
+        ASSERT(!is_top_level_);  // We cannot check unresolved types.
         if (!const_instance.IsInstanceOf(type_bound,
                                          TypeArguments::Handle(),
                                          &malformed_error)) {
@@ -9489,7 +9628,7 @@
               malformed_error,
               current_class(),
               new_pos,
-              ClassFinalizer::kTryResolve,  // No compile-time error.
+              ClassFinalizer::kResolveTypeParameters,  // No compile-time error.
               "const factory result is not an instance of '%s'",
               String::Handle(type_bound.UserVisibleName()).ToCString());
           new_object = ThrowTypeError(new_pos, type_bound);
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 81341d5..baac074 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -16,6 +16,7 @@
 namespace dart {
 
 // Forward declarations.
+class ArgumentsDescriptor;
 class Function;
 class Isolate;
 class LiteralToken;
@@ -382,7 +383,8 @@
                                GrowableArray<Field*>* initialized_fields,
                                Field* field);
   void GenerateSuperConstructorCall(const Class& cls,
-                                    LocalVariable* receiver);
+                                    LocalVariable* receiver,
+                                    ArgumentListNode* forwarding_args);
   AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver);
   AstNode* ParseInitializer(const Class& cls,
                             LocalVariable* receiver,
@@ -437,6 +439,11 @@
   SequenceNode* ParseMethodExtractor(const Function& func);
   SequenceNode* ParseNoSuchMethodDispatcher(const Function& func,
                                             Array& default_values);
+  SequenceNode* ParseInvokeFieldDispatcher(const Function& func,
+                                           Array& default_values);
+  void BuildDispatcherScope(const Function& func,
+                            const ArgumentsDescriptor& desc,
+                            Array& default_values);
 
   void ChainNewBlock(LocalScope* outer_scope);
   void OpenBlock();
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 04c2951..2c8c137 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -488,7 +488,7 @@
   RawFunction* signature_function_;  // Associated function for signature class.
   RawArray* constants_;  // Canonicalized values of this class.
   RawArray* canonical_types_;  // Canonicalized types of this class.
-  RawArray* no_such_method_cache_;   // Dispatcher functions for noSuchMethod.
+  RawArray* invocation_dispatcher_cache_;   // Cache for dispatcher functions.
   RawCode* allocation_stub_;  // Stub code for allocation of instances.
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_);
@@ -600,6 +600,7 @@
     kConstImplicitGetter,  // represents an implicit const getter for fields.
     kMethodExtractor,  // converts method into implicit closure on the receiver.
     kNoSuchMethodDispatcher,  // invokes noSuchMethod.
+    kInvokeFieldDispatcher,  // invokes a field as a closure.
   };
 
  private:
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 07b8383..726a25c2 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -923,6 +923,21 @@
 }
 
 
+void Simulator::set_qregister(QRegister reg, simd_value_t value) {
+  ASSERT((reg >= 0) && (reg < kNumberOfQRegisters));
+  qregisters_[reg].data_[0] = value.data_[0];
+  qregisters_[reg].data_[1] = value.data_[1];
+  qregisters_[reg].data_[2] = value.data_[2];
+  qregisters_[reg].data_[3] = value.data_[3];
+}
+
+
+simd_value_t Simulator::get_qregister(QRegister reg) const {
+  ASSERT((reg >= 0) && (reg < kNumberOfQRegisters));
+  return qregisters_[reg];
+}
+
+
 void Simulator::set_sregister_bits(SRegister reg, int32_t value) {
   ASSERT((reg >= 0) && (reg < kNumberOfSRegisters));
   sregisters_[reg] = value;
@@ -1487,10 +1502,6 @@
 
         if ((redirection->call_kind() == kRuntimeCall) ||
             (redirection->call_kind() == kNativeCall)) {
-          // The top_exit_frame_info of the current isolate points to the top of
-          // the simulator stack.
-          ASSERT((StackTop() - Isolate::Current()->top_exit_frame_info()) <
-                 Isolate::GetSpecifiedStackSize());
           // Set the top_exit_frame_info of this simulator to the native stack.
           set_top_exit_frame_info(reinterpret_cast<uword>(&buffer));
         }
@@ -2827,6 +2838,8 @@
                     id_val = INT_MIN;
                   } else if (dm_val >= INT_MAX) {
                     id_val = INT_MAX;
+                  } else if (isnan(dm_val)) {
+                    id_val = 0;
                   } else {
                     id_val = static_cast<int32_t>(dm_val);
                   }
@@ -2886,6 +2899,69 @@
 }
 
 
+void Simulator::DecodeSIMDDataProcessing(Instr* instr) {
+  ASSERT(instr->ConditionField() == kSpecialCondition);
+
+  if (instr->Bit(6) == 1) {
+    // Q = 1, Using 128-bit Q registers.
+    const QRegister qd = instr->QdField();
+    const QRegister qn = instr->QnField();
+    const QRegister qm = instr->QmField();
+    simd_value_t s8d;
+    simd_value_t s8n = get_qregister(qn);
+    simd_value_t s8m = get_qregister(qm);
+    int8_t* s8d_8 = reinterpret_cast<int8_t*>(&s8d);
+    int8_t* s8n_8 = reinterpret_cast<int8_t*>(&s8n);
+    int8_t* s8m_8 = reinterpret_cast<int8_t*>(&s8m);
+    int16_t* s8d_16 = reinterpret_cast<int16_t*>(&s8d);
+    int16_t* s8n_16 = reinterpret_cast<int16_t*>(&s8n);
+    int16_t* s8m_16 = reinterpret_cast<int16_t*>(&s8m);
+    int64_t* s8d_64 = reinterpret_cast<int64_t*>(&s8d);
+    int64_t* s8n_64 = reinterpret_cast<int64_t*>(&s8n);
+    int64_t* s8m_64 = reinterpret_cast<int64_t*>(&s8m);
+
+    if ((instr->Bits(8, 4) == 8) && (instr->Bit(4) == 0) &&
+        (instr->Bit(24) == 0)) {
+      // Uses q registers.
+      // Format(instr, "vadd.'sz 'qd, 'qn, 'qm");
+      const int size = instr->Bits(20, 2);
+      if (size == 0) {
+        for (int i = 0; i < 16; i++) {
+          s8d_8[i] = s8n_8[i] + s8m_8[i];
+        }
+      } else if (size == 1) {
+        for (int i = 0; i < 8; i++) {
+          s8d_16[i] = s8n_16[i] + s8m_16[i];
+        }
+      } else if (size == 2) {
+        for (int i = 0; i < 4; i++) {
+          s8d.data_[i].u = s8n.data_[i].u + s8m.data_[i].u;
+        }
+      } else if (size == 3) {
+        for (int i = 0; i < 2; i++) {
+          s8d_64[i] = s8n_64[i] + s8m_64[i];
+        }
+      } else {
+        UNREACHABLE();
+      }
+    } else if ((instr->Bits(8, 4) == 13) && (instr->Bit(4) == 0) &&
+               (instr->Bit(24) == 0)) {
+      // Format(instr, "vadd.F32 'qd, 'qn, 'qm");
+      for (int i = 0; i < 4; i++) {
+        s8d.data_[i].f = s8n.data_[i].f + s8m.data_[i].f;
+      }
+    } else {
+      UnimplementedInstruction(instr);
+    }
+
+    set_qregister(qd, s8d);
+  } else {
+    // Q == 0, Uses 64-bit D registers.
+    UnimplementedInstruction(instr);
+  }
+}
+
+
 // Executes the current instruction.
 void Simulator::InstructionDecode(Instr* instr) {
   pc_modified_ = false;
@@ -2899,7 +2975,11 @@
       // Format(instr, "clrex");
       ClearExclusive();
     } else {
-      UnimplementedInstruction(instr);
+      if (instr->IsSIMDDataProcessing()) {
+        DecodeSIMDDataProcessing(instr);
+      } else {
+        UnimplementedInstruction(instr);
+      }
     }
   } else if (ConditionallyExecute(instr)) {
     switch (instr->TypeField()) {
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
index 3b4a5ca..3d31cd8 100644
--- a/runtime/vm/simulator_arm.h
+++ b/runtime/vm/simulator_arm.h
@@ -24,6 +24,13 @@
 class Isolate;
 class SimulatorSetjmpBuffer;
 
+typedef struct {
+  union {
+    uint32_t u;
+    float f;
+  } data_[4];
+} simd_value_t;
+
 class Simulator {
  public:
   static const uword kSimulatorStackUnderflowSize = 64;
@@ -50,6 +57,8 @@
   float get_sregister(SRegister reg) const;
   void set_dregister(DRegister reg, double value);
   double get_dregister(DRegister reg) const;
+  void set_qregister(QRegister reg, simd_value_t value);
+  simd_value_t get_qregister(QRegister reg) const;
 
   // When moving integer (rather than floating point) values to/from
   // the FPU registers, use the _bits calls to avoid gcc taking liberties with
@@ -126,9 +135,10 @@
   bool v_flag_;
 
   // VFP state.
-  union {  // S and D register banks are overlapping.
+  union {  // S, D, and Q register banks are overlapping.
     int32_t sregisters_[kNumberOfSRegisters];
     int64_t dregisters_[kNumberOfDRegisters];
+    simd_value_t qregisters_[kNumberOfQRegisters];
   };
   bool fp_n_flag_;
   bool fp_z_flag_;
@@ -238,6 +248,7 @@
   void DecodeType5(Instr* instr);
   void DecodeType6(Instr* instr);
   void DecodeType7(Instr* instr);
+  void DecodeSIMDDataProcessing(Instr* instr);
 
   // Executes one instruction.
   void InstructionDecode(Instr* instr);
diff --git a/runtime/vm/simulator_mips.cc b/runtime/vm/simulator_mips.cc
index fd858ec..d93753a 100644
--- a/runtime/vm/simulator_mips.cc
+++ b/runtime/vm/simulator_mips.cc
@@ -1007,12 +1007,8 @@
         OS::Print("Call to host function at 0x%"Pd"\n", external);
       }
 
-        if ((redirection->call_kind() == kRuntimeCall) ||
-            (redirection->call_kind() == kNativeCall)) {
-        // The top_exit_frame_info of the current isolate points to the top of
-        // the simulator stack.
-        ASSERT((StackTop() - Isolate::Current()->top_exit_frame_info()) <
-               Isolate::GetSpecifiedStackSize());
+      if ((redirection->call_kind() == kRuntimeCall) ||
+          (redirection->call_kind() == kNativeCall)) {
         // Set the top_exit_frame_info of this simulator to the native stack.
         set_top_exit_frame_info(reinterpret_cast<uword>(&buffer));
       }
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 8170d9d..040655e 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -351,7 +351,7 @@
   // Push registers in their enumeration order: lowest register number at
   // lowest address.
   __ PushList(kAllCpuRegistersList);
-  ASSERT(kFpuRegisterSize == 2 * kWordSize);
+  ASSERT(kFpuRegisterSize == 4 * kWordSize);
   __ vstmd(DB_W, SP, D0, static_cast<DRegister>(kNumberOfDRegisters - 1));
 
   __ mov(R0, ShifterOperand(SP));  // Pass address of saved registers block.
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index eed2fcb..6ac9824 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -34,11 +34,12 @@
   V(ClosureParameter, ":closure")                                              \
   V(PhaseParameter, ":phase")                                                  \
   V(TypeArgumentsParameter, ":type_arguments")                                 \
-  V(AssertionError, "AssertionErrorImplementation")                            \
-  V(TypeError, "TypeErrorImplementation")                                      \
-  V(FallThroughError, "FallThroughErrorImplementation")                        \
+  V(AssertionError, "_AssertionErrorImplementation")                           \
+  V(CastError, "_CastErrorImplementation")                                     \
+  V(TypeError, "_TypeErrorImplementation")                                     \
+  V(FallThroughError, "_FallThroughErrorImplementation")                       \
   V(AbstractClassInstantiationError,                                           \
-    "AbstractClassInstantiationErrorImplementation")                           \
+    "_AbstractClassInstantiationErrorImplementation")                          \
   V(NoSuchMethodError, "NoSuchMethodError")                                    \
   V(ThrowNew, "_throwNew")                                                     \
   V(List, "List")                                                              \
@@ -250,9 +251,11 @@
   V(DartSchemePrivate, "dart:_")                                               \
   V(DartNativeWrappers, "dart:nativewrappers")                                 \
   V(DartAsync, "dart:async")                                                   \
+  V(DartCodec, "dart:codec")                                                   \
   V(DartCore, "dart:core")                                                     \
   V(DartCollection, "dart:collection")                                         \
   V(DartCollectionDev, "dart:_collection-dev")                                 \
+  V(DartConvert, "dart:convert")                                               \
   V(DartIsolate, "dart:isolate")                                               \
   V(DartJson, "dart:json")                                                     \
   V(DartMath, "dart:math")                                                     \
diff --git a/runtime/vm/vm.gypi b/runtime/vm/vm.gypi
index 3e0311a..a1f5555 100644
--- a/runtime/vm/vm.gypi
+++ b/runtime/vm/vm.gypi
@@ -11,10 +11,12 @@
     'async_patch_cc_file': '<(gen_source_dir)/async_patch_gen.cc',
     'corelib_cc_file': '<(gen_source_dir)/corelib_gen.cc',
     'corelib_patch_cc_file': '<(gen_source_dir)/corelib_patch_gen.cc',
+    'codec_cc_file': '<(gen_source_dir)/codec_gen.cc',
     'collection_cc_file': '<(gen_source_dir)/collection_gen.cc',
     'collection_patch_cc_file': '<(gen_source_dir)/collection_patch_gen.cc',
     'collection_dev_cc_file': '<(gen_source_dir)/collection_dev_gen.cc',
     'collection_dev_patch_cc_file': '<(gen_source_dir)/collection_dev_patch_gen.cc',
+    'convert_cc_file': '<(gen_source_dir)/convert_gen.cc',
     'math_cc_file': '<(gen_source_dir)/math_gen.cc',
     'math_patch_cc_file': '<(gen_source_dir)/math_patch_gen.cc',
     'mirrors_cc_file': '<(gen_source_dir)/mirrors_gen.cc',
@@ -95,12 +97,14 @@
       'dependencies': [
         'generate_async_cc_file#host',
         'generate_async_patch_cc_file#host',
+        'generate_codec_cc_file#host',
         'generate_corelib_cc_file#host',
         'generate_corelib_patch_cc_file#host',
         'generate_collection_cc_file#host',
         'generate_collection_patch_cc_file#host',
         'generate_collection_dev_cc_file#host',
         'generate_collection_dev_patch_cc_file#host',
+        'generate_convert_cc_file#host',
         'generate_math_cc_file#host',
         'generate_math_patch_cc_file#host',
         'generate_isolate_cc_file#host',
@@ -127,12 +131,14 @@
         # Include generated source files.
         '<(async_cc_file)',
         '<(async_patch_cc_file)',
+        '<(codec_cc_file)',
         '<(corelib_cc_file)',
         '<(corelib_patch_cc_file)',
         '<(collection_cc_file)',
         '<(collection_patch_cc_file)',
         '<(collection_dev_cc_file)',
         '<(collection_dev_patch_cc_file)',
+        '<(convert_cc_file)',
         '<(math_cc_file)',
         '<(math_patch_cc_file)',
         '<(isolate_cc_file)',
@@ -329,6 +335,46 @@
       ]
     },
     {
+      'target_name': 'generate_codec_cc_file',
+      'type': 'none',
+      'toolsets':['host'],
+      'includes': [
+        # Load the shared codec library sources.
+        '../../sdk/lib/codec/codec_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_codec_cc',
+          'inputs': [
+            '../tools/gen_library_src_paths.py',
+            '<(libgen_in_cc_file)',
+            '<@(_sources)',
+          ],
+          'outputs': [
+            '<(codec_cc_file)',
+          ],
+          'action': [
+            'python',
+            'tools/gen_library_src_paths.py',
+            '--output', '<(codec_cc_file)',
+            '--input_cc', '<(libgen_in_cc_file)',
+            '--include', 'vm/bootstrap.h',
+            '--var_name', 'dart::Bootstrap::codec_source_paths_',
+            '--library_name', 'dart:codec',
+            '<@(_sources)',
+          ],
+          'message': 'Generating ''<(codec_cc_file)'' file.'
+        },
+      ]
+    },
+    {
       'target_name': 'generate_collection_dev_patch_cc_file',
       'type': 'none',
       'toolsets':['host'],
@@ -409,6 +455,46 @@
       ]
     },
     {
+      'target_name': 'generate_convert_cc_file',
+      'type': 'none',
+      'toolsets':['host'],
+      'includes': [
+        # Load the shared convert library sources.
+        '../../sdk/lib/convert/convert_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_convert_cc',
+          'inputs': [
+            '../tools/gen_library_src_paths.py',
+            '<(libgen_in_cc_file)',
+            '<@(_sources)',
+          ],
+          'outputs': [
+            '<(convert_cc_file)',
+          ],
+          'action': [
+            'python',
+            'tools/gen_library_src_paths.py',
+            '--output', '<(convert_cc_file)',
+            '--input_cc', '<(libgen_in_cc_file)',
+            '--include', 'vm/bootstrap.h',
+            '--var_name', 'dart::Bootstrap::convert_source_paths_',
+            '--library_name', 'dart:convert',
+            '<@(_sources)',
+          ],
+          'message': 'Generating ''<(convert_cc_file)'' file.'
+        },
+      ]
+    },
+    {
       'target_name': 'generate_math_cc_file',
       'type': 'none',
       'toolsets':['host'],
diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
index d51b1b2..79c9a27 100644
--- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
+++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
@@ -282,7 +282,14 @@
     return new List<VariableElement>.from(lazyStatics);
   }
 
-  List<Constant> getConstantsForEmission() {
+  /**
+   * Returns a list of constants topologically sorted so that dependencies
+   * appear before the dependent constant.  [preSortCompare] is a comparator
+   * function that gives the constants a consistent order prior to the
+   * topological sort which gives the constants an ordering that is less
+   * sensitive to perturbations in the source code.
+   */
+  List<Constant> getConstantsForEmission([preSortCompare]) {
     // We must emit dependencies before their uses.
     Set<Constant> seenConstants = new Set<Constant>();
     List<Constant> result = new List<Constant>();
@@ -296,7 +303,11 @@
       }
     }
 
-    compiledConstants.forEach(addConstant);
+    List<Constant> sorted = compiledConstants.toList();
+    if (preSortCompare != null) {
+      sorted.sort(preSortCompare);
+    }
+    sorted.forEach(addConstant);
     return result;
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 47cb937..5ceb7d3 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -848,6 +848,11 @@
   Uri resolvePatchUri(String dartLibraryPath);
 
   void runCompiler(Uri uri) {
+    // TODO(ahe): This prevents memory leaks when invoking the compiler
+    // multiple times.  Implement a better mechanism where StringWrapper
+    // instances are shared on a per library basis.
+    SourceString.canonicalizedValues.clear();
+
     assert(uri != null || analyzeOnly);
     scanBuiltinLibraries();
     if (librariesToAnalyzeWhenRun != null) {
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 55494ac..ac465fc 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -574,7 +574,7 @@
   ResolutionEnqueuer(Compiler compiler,
                      ItemCompilationContext itemCompilationContextCreator())
       : super('resolution enqueuer', compiler, itemCompilationContextCreator),
-        resolvedElements = new Map<Element, TreeElements>(),
+        resolvedElements = new LinkedHashMap<Element, TreeElements>(),
         queue = new Queue<ResolutionWorkItem>(),
         postQueue = new Queue<PostProcessTask>();
 
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart
index 6437764..84d65cd 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart
@@ -177,30 +177,34 @@
   const JavaScriptConstantSystem();
 
   /**
-   * Returns true if the given [value] fits into a double without losing
-   * precision.
+   * Returns true if [value] will turn into NaN or infinity
+   * at runtime.
    */
-  bool integerFitsIntoDouble(int value) {
-    int absValue = value.abs();
-    double doubleValue = absValue.toDouble();
-    if (doubleValue.isNaN || doubleValue.isInfinite) return false;
-    return value.toDouble().floor().toInt() == value;
+  bool integerBecomesNanOrInfinity(int value) {
+    double doubleValue = value.toDouble();
+    return doubleValue.isNaN || doubleValue.isInfinite;
   }
 
   NumConstant convertToJavaScriptConstant(NumConstant constant) {
     if (constant.isInt()) {
       IntConstant intConstant = constant;
       int intValue = intConstant.value;
-      if (!integerFitsIntoDouble(intValue)) {
+      if (integerBecomesNanOrInfinity(intValue)) {
         return new DoubleConstant(intValue.toDouble());
       }
+      // If the integer loses precision with JavaScript numbers, use
+      // the floored version JavaScript will use.
+      int floorValue = intValue.toDouble().floor().toInt();
+      if (floorValue != intValue) {
+        return new IntConstant(floorValue);
+      }
     } else if (constant.isDouble()) {
       DoubleConstant doubleResult = constant;
       double doubleValue = doubleResult.value;
       if (!doubleValue.isInfinite && !doubleValue.isNaN &&
           !constant.isMinusZero()) {
         int intValue = doubleValue.truncate();
-        if (intValue == doubleValue && integerFitsIntoDouble(intValue)) {
+        if (intValue == doubleValue) {
           return new IntConstant(intValue);
         }
       }
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 0b6150b..7b04eb2 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -2474,19 +2474,12 @@
 
   void emitCompileTimeConstants(CodeBuffer eagerBuffer) {
     ConstantHandler handler = compiler.constantHandler;
-    List<Constant> constants = handler.getConstantsForEmission();
+    List<Constant> constants = handler.getConstantsForEmission(
+        compareConstants);
     bool addedMakeConstantList = false;
     for (Constant constant in constants) {
-      // No need to emit functions. We already did that.
-      if (constant.isFunction()) continue;
-      // Numbers, strings and booleans are currently always inlined.
-      if (constant.isPrimitive()) continue;
-
+      if (isConstantInlinedOrAlreadyEmitted(constant)) continue;
       String name = namer.constantName(constant);
-      // The name is null when the constant is already a JS constant.
-      // TODO(floitsch): every constant should be registered, so that we can
-      // share the ones that take up too much space (like some strings).
-      if (name == null) continue;
       if (!addedMakeConstantList && constant.isList()) {
         addedMakeConstantList = true;
         emitMakeConstantList(eagerBuffer);
@@ -2499,6 +2492,31 @@
     }
   }
 
+  bool isConstantInlinedOrAlreadyEmitted(Constant constant) {
+    if (constant.isFunction()) return true;   // Already emitted.
+    if (constant.isPrimitive()) return true;  // Inlined.
+    // The name is null when the constant is already a JS constant.
+    // TODO(floitsch): every constant should be registered, so that we can
+    // share the ones that take up too much space (like some strings).
+    if (namer.constantName(constant) == null) return true;
+    return false;
+  }
+
+  int compareConstants(Constant a, Constant b) {
+    // Inlined constants don't affect the order and sometimes don't even have
+    // names.
+    int cmp1 = isConstantInlinedOrAlreadyEmitted(a) ? 0 : 1;
+    int cmp2 = isConstantInlinedOrAlreadyEmitted(b) ? 0 : 1;
+    if (cmp1 + cmp2 < 2) return cmp1 - cmp2;
+    // Sorting by the long name clusters constants with the same constructor
+    // which compresses a tiny bit better.
+    int r = namer.constantLongName(a).compareTo(namer.constantLongName(b));
+    if (r != 0) return r;
+    // Resolve collisions in the long name by using the constant name (i.e. JS
+    // name) which is unique.
+    return namer.constantName(a).compareTo(namer.constantName(b));
+  }
+
   void emitMakeConstantList(CodeBuffer buffer) {
     buffer.write(namer.isolateName);
     buffer.write(r'''.makeConstantList = function(list) {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 571fd6d..a58c9db 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -202,6 +202,7 @@
   final Map<Element, String> bailoutNames;
 
   final Map<Constant, String> constantNames;
+  final Map<Constant, String> constantLongNames;
   ConstantCanonicalHasher constantHasher;
 
   Namer(Compiler compiler)
@@ -217,8 +218,9 @@
         globalNameMap = new Map<String, String>(),
         suggestedGlobalNames = new Map<String, String>(),
         suggestedInstanceNames = new Map<String, String>(),
-        constantNames = new Map<Constant, String>(),
         popularNameCounters = new Map<String, int>(),
+        constantNames = new Map<Constant, String>(),
+        constantLongNames = new Map<Constant, String>(),
         constantHasher = new ConstantCanonicalHasher(compiler);
 
   String get isolateName => 'Isolate';
@@ -240,21 +242,7 @@
     assert(!constant.isFunction());
     String result = constantNames[constant];
     if (result == null) {
-      String longName;
-      if (shouldMinify) {
-        if (constant.isString()) {
-          StringConstant stringConstant = constant;
-          // The minifier always constructs a new name, using the argument as
-          // input to its hashing algorithm.  The given name does not need to be
-          // valid.
-          longName = stringConstant.value.slowToString();
-        } else {
-          longName = "C";
-        }
-      } else {
-        longName = new ConstantNamingVisitor(compiler, constantHasher)
-            .getName(constant);
-      }
+      String longName = constantLongName(constant);
       result = getFreshName(longName, usedGlobalNames, suggestedGlobalNames,
                             ensureSafe: true);
       constantNames[constant] = result;
@@ -262,6 +250,17 @@
     return result;
   }
 
+  // The long name is unminified and may have collisions.
+  String constantLongName(Constant constant) {
+    String longName = constantLongNames[constant];
+    if (longName == null) {
+      longName = new ConstantNamingVisitor(compiler, constantHasher)
+          .getName(constant);
+      constantLongNames[constant] = longName;
+    }
+    return longName;
+  }
+
   String breakLabelName(LabelElement label) {
     return '\$${label.labelName}\$${label.target.nestingLevel}';
   }
diff --git a/sdk/lib/_internal/compiler/implementation/patch_parser.dart b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
index 02c4ecc..b356d78 100644
--- a/sdk/lib/_internal/compiler/implementation/patch_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
@@ -222,10 +222,7 @@
 
   PatchListener get patchListener => listener;
 
-  bool isPatch(Token token) {
-    return token.stringValue == null &&
-           token.slowToString() == "patch";
-  }
+  bool isPatch(Token token) => token.value == const SourceString('patch');
 
   /**
    * Parse top-level declarations, and allow "patch" in front of functions
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart b/sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart
index e898f41..6238388 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart
@@ -22,11 +22,12 @@
       => (string.length > index) ? string.codeUnitAt(index) : $EOF;
 
   SourceString asciiString(int start, int offset) {
-    return new SubstringWrapper(string, start, byteOffset + offset);
+    return new SourceString.fromSubstring(string, start, byteOffset + offset);
   }
 
   SourceString utf8String(int start, int offset) {
-    return new SubstringWrapper(string, start, byteOffset + offset + 1);
+    return new SourceString.fromSubstring(
+        string, start, byteOffset + offset + 1);
   }
 
   void appendByteStringToken(PrecedenceInfo info, SourceString value) {
@@ -52,55 +53,3 @@
     next.next = begin.next;
   }
 }
-
-class SubstringWrapper extends IterableBase<int> implements SourceString {
-  final String internalString;
-  final int begin;
-  final int end;
-  int cashedHash = 0;
-  String cachedSubString;
-
-  SubstringWrapper(String this.internalString,
-                   int this.begin, int this.end);
-
-  int get hashCode {
-    if (0 == cashedHash) {
-      cashedHash = slowToString().hashCode;
-    }
-    return cashedHash;
-  }
-
-  bool operator ==(other) {
-    return other is SourceString && slowToString() == other.slowToString();
-  }
-
-  void printOn(StringBuffer sb) {
-    sb.write(internalString.substring(begin, end));
-  }
-
-  String slowToString() {
-    if (cachedSubString == null) {
-      cachedSubString = internalString.substring(begin, end);
-    }
-    return cachedSubString;
-  }
-
-  String toString() => "SubstringWrapper(${slowToString()})";
-
-  String get stringValue => null;
-
-  Iterator<int> get iterator =>
-      new StringCodeIterator.substring(internalString, begin, end);
-
-  SourceString copyWithoutQuotes(int initial, int terminal) {
-    assert(0 <= initial);
-    assert(0 <= terminal);
-    assert(initial + terminal <= internalString.length);
-    return new SubstringWrapper(internalString,
-                                begin + initial, end - terminal);
-  }
-
-  bool get isEmpty => begin == end;
-
-  bool isPrivate() => !isEmpty && internalString.codeUnitAt(begin) == $_;
-}
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/token.dart b/sdk/lib/_internal/compiler/implementation/scanner/token.dart
index fb4a1e0..e74c702 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/token.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/token.dart
@@ -174,7 +174,6 @@
  */
 class StringToken extends Token {
   final SourceString value;
-  String get stringValue => value.stringValue;
 
   StringToken(PrecedenceInfo info, String value, int charOffset)
     : this.fromSource(info, new SourceString(value), charOffset);
@@ -190,6 +189,15 @@
 abstract class SourceString extends IterableBase<int> {
   const factory SourceString(String string) = StringWrapper;
 
+  static final Map<String, StringWrapper> canonicalizedValues =
+      new Map<String, StringWrapper>();
+
+  factory SourceString.fromSubstring(String string, int begin, int end) {
+    var substring = string.substring(begin, end);
+    return canonicalizedValues.putIfAbsent(
+        substring, () => new StringWrapper(substring));
+  }
+
   void printOn(StringBuffer sb);
 
   /** Gives a [SourceString] that is not including the [initial] first and
@@ -210,7 +218,7 @@
 class StringWrapper extends IterableBase<int> implements SourceString {
   final String stringValue;
 
-  const StringWrapper(String this.stringValue);
+  const StringWrapper(this.stringValue);
 
   int get hashCode => stringValue.hashCode;
 
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 5b7d542..6ba92ac 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -1220,84 +1220,106 @@
                        List<HInstruction> providedArguments,
                        Node currentNode) {
     backend.registerStaticUse(element, compiler.enqueuer.codegen);
-    // We cannot inline a method from a deferred library into a method
-    // which isn't deferred.
-    // TODO(ahe): But we should still inline into the same
-    // connected-component of the deferred library.
-    if (compiler.deferredLoadTask.isDeferred(element)) return false;
-    if (compiler.disableInlining) return false;
-
-    if (loopNesting == 0 && !graph.calledInLoop) return false;
-    int maxDepth = (loopNesting > 0) ? MAX_INLINING_DEPTH : 1;
-    if (inliningStack.length >= maxDepth) return false;
 
     // Ensure that [element] is an implementation element.
     element = element.implementation;
     FunctionElement function = element;
-    bool canBeInlined = backend.canBeInlined[function];
-    if (canBeInlined == false) return false;
-    assert(selector != null
-           || Elements.isStaticOrTopLevel(element)
-           || element.isGenerativeConstructorBody());
-    if (selector != null && !selector.applies(function, compiler)) return false;
 
-    // Don't inline operator== methods if the parameter can be null.
-    if (element.name == const SourceString('==')) {
-      if (element.getEnclosingClass() != compiler.objectClass
-          && providedArguments[1].canBeNull()) {
+    bool cachedCanBeInlined = backend.canBeInlined[function];
+    if (cachedCanBeInlined == false) return false;
+
+    bool meetsHardConstraints() {
+      // We cannot inline a method from a deferred library into a method
+      // which isn't deferred.
+      // TODO(ahe): But we should still inline into the same
+      // connected-component of the deferred library.
+      if (compiler.deferredLoadTask.isDeferred(element)) return false;
+      if (compiler.disableInlining) return false;
+
+      assert(selector != null
+             || Elements.isStaticOrTopLevel(element)
+             || element.isGenerativeConstructorBody());
+      if (selector != null && !selector.applies(function, compiler))
         return false;
+
+      // Don't inline operator== methods if the parameter can be null.
+      if (element.name == const SourceString('==')) {
+        if (element.getEnclosingClass() != compiler.objectClass
+            && providedArguments[1].canBeNull()) {
+          return false;
+        }
+      }
+
+      // Don't inline if the return type was inferred to be non-null empty. This
+      // means that the function always throws an exception.
+      TypeMask returnType =
+          compiler.typesTask.getGuaranteedReturnTypeOfElement(element);
+      if (returnType != null && returnType.isEmpty && !returnType.isNullable) {
+        isReachable = false;
+        return false;
+      }
+
+      return true;
+    }
+
+    bool heuristicsSayGoodToGo(FunctionExpression functionExpression,
+                                TreeElements newElements) {
+      if (loopNesting == 0 && !graph.calledInLoop) return false;
+
+      int maxDepth = (loopNesting > 0) ? MAX_INLINING_DEPTH : 1;
+      if (inliningStack.length >= maxDepth) return false;
+
+      if (cachedCanBeInlined == null) {
+        var canBeInlined =
+            InlineWeeder.canBeInlined(functionExpression, newElements);
+        backend.canBeInlined[function] = canBeInlined;
+        return canBeInlined;
+      }
+      return cachedCanBeInlined;
+    }
+
+    void doInlining(FunctionExpression functionExpression) {
+      // Add an explicit null check on the receiver before doing the
+      // inlining. We use [element] to get the same name in the
+      // NoSuchMethodError message as if we had called it.
+      if (element.isInstanceMember()
+          && !element.isGenerativeConstructorBody()
+          && (selector.mask == null || selector.mask.isNullable)) {
+        addWithPosition(
+            new HFieldGet(element, providedArguments[0]), currentNode);
+      }
+      InliningState state = enterInlinedMethod(
+          function, selector, providedArguments, currentNode);
+
+      inlinedFrom(element, () {
+        FunctionElement function = element;
+        FunctionSignature signature = function.computeSignature(compiler);
+        signature.orderedForEachParameter((Element parameter) {
+          HInstruction argument = localsHandler.readLocal(parameter);
+          potentiallyCheckType(argument, parameter.computeType(compiler));
+        });
+        element.isGenerativeConstructor()
+            ? buildFactory(element)
+            : functionExpression.body.accept(this);
+      });
+      leaveInlinedMethod(state);
+    }
+
+    if (meetsHardConstraints()) {
+      FunctionExpression functionExpression = function.parseNode(compiler);
+      TreeElements newElements =
+          compiler.enqueuer.resolution.getCachedElements(function);
+      if (newElements == null) {
+        compiler.internalError("Element not resolved: $function");
+      }
+
+      if (heuristicsSayGoodToGo(functionExpression, newElements)) {
+        doInlining(functionExpression);
+        return true;
       }
     }
 
-    // Don't inline if the return type was inferred to be non-null empty. This
-    // means that the function always throws an exception.
-    TypeMask returnType =
-        compiler.typesTask.getGuaranteedReturnTypeOfElement(element);
-    if (returnType != null && returnType.isEmpty && !returnType.isNullable) {
-      isReachable = false;
-      return false;
-    }
-
-    FunctionExpression functionExpression = function.parseNode(compiler);
-    TreeElements newElements =
-        compiler.enqueuer.resolution.getCachedElements(function);
-    if (newElements == null) {
-      compiler.internalError("Element not resolved: $function");
-    }
-
-    if (canBeInlined == null) {
-      canBeInlined = InlineWeeder.canBeInlined(functionExpression, newElements);
-      backend.canBeInlined[function] = canBeInlined;
-      if (!canBeInlined) return false;
-    }
-
-    assert(canBeInlined);
-    // Add an explicit null check on the receiver before doing the
-    // inlining. We use [element] to get the same name in the NoSuchMethodError
-    // message as if we had called it.
-    if (element.isInstanceMember()
-        && !element.isGenerativeConstructorBody()
-        && (selector.mask == null || selector.mask.isNullable)) {
-      addWithPosition(
-          new HFieldGet(element, providedArguments[0]), currentNode);
-    }
-    InliningState state = enterInlinedMethod(
-        function, selector, providedArguments, currentNode);
-
-    inlinedFrom(element, () {
-      FunctionElement function = element;
-      FunctionSignature signature = function.computeSignature(compiler);
-      signature.orderedForEachParameter((Element parameter) {
-        HInstruction argument = localsHandler.readLocal(parameter);
-        potentiallyCheckType(argument, parameter.computeType(compiler));
-      });
-      element.isGenerativeConstructor()
-          ? buildFactory(element)
-          : functionExpression.body.accept(this);
-    });
-
-    leaveInlinedMethod(state);
-    return true;
+    return false;
   }
 
   inlinedFrom(Element element, f()) {
@@ -1341,19 +1363,18 @@
             element: constructor);
       }
 
-      ClassElement superclass = constructor.getEnclosingClass();
-      if (backend.classNeedsRti(superclass)) {
-        // If [superclass] needs RTI, we have to give a value to its
-        // type parameters. Those values are in the [supertype]
-        // declaration of [subclass].
-        ClassElement subclass = inlinedFromElement.getEnclosingClass();
-        // If [inlinedFromElement] is a generative constructor then [superclass] 
-        // is a superclass of [subclass]. If [inlinedFromElement] is a 
-        // redirecting constructor then [superclass] is the same as [subclass]. 
-        // Using [DartType.asInstanceOf] handles both these cases.
-        InterfaceType supertype = subclass.thisType.asInstanceOf(superclass);
-        Link<DartType> typeVariables = superclass.typeVariables;
-        supertype.typeArguments.forEach((DartType argument) {
+      ClassElement enclosingClass = constructor.getEnclosingClass();
+      if (backend.classNeedsRti(enclosingClass)) {
+        // If [enclosingClass] needs RTI, we have to give a value to its
+        // type parameters.
+        ClassElement currentClass = inlinedFromElement.getEnclosingClass();
+        // For a super constructor call, the type is the supertype of
+        // [currentClass]. For a redirecting constructor, the type is
+        // the current type. [InterfaceType.asInstanceOf] takes care
+        // of both.
+        InterfaceType type = currentClass.thisType.asInstanceOf(enclosingClass);
+        Link<DartType> typeVariables = enclosingClass.typeVariables;
+        type.typeArguments.forEach((DartType argument) {
           localsHandler.updateLocal(typeVariables.head.element,
               analyzeTypeArgument(argument, callNode));
           typeVariables = typeVariables.tail;
@@ -1361,7 +1382,7 @@
         // If the supertype is a raw type, we need to set to null the
         // type variables.
         assert(typeVariables.isEmpty
-               || superclass.typeVariables == typeVariables);
+               || enclosingClass.typeVariables == typeVariables);
         while (!typeVariables.isEmpty) {
           localsHandler.updateLocal(typeVariables.head.element,
               graph.addConstantNull(compiler));
@@ -1523,14 +1544,13 @@
         });
   }
 
-
   /**
    * Build the factory function corresponding to the constructor
    * [functionElement]:
    *  - Initialize fields with the values of the field initializers of the
    *    current constructor and super constructors or constructors redirected
    *    to, starting from the current constructor.
-   *  - Call the the constructor bodies, starting from the constructor(s) in the
+   *  - Call the constructor bodies, starting from the constructor(s) in the
    *    super class(es).
    */
   HGraph buildFactory(FunctionElement functionElement) {
@@ -2541,7 +2561,10 @@
         value = compileVariable(element);
       }
       if (value != null) {
-        stack.add(graph.addConstant(value, compiler));
+        HInstruction instruction = graph.addConstant(value, compiler);
+        stack.add(instruction);
+        HType type = new HType.inferredTypeForElement(element, compiler);
+        if (!type.isUnknown()) instruction.instructionType = type;
       } else if (element.isField() && isLazilyInitialized(element)) {
         HInstruction instruction = new HLazyStatic(element);
         instruction.instructionType =
@@ -4150,24 +4173,27 @@
   }
 
   visitLiteralList(LiteralList node) {
+    HInstruction instruction;
+
     if (node.isConst()) {
       ConstantHandler handler = compiler.constantHandler;
       Constant constant = handler.compileNodeWithDefinitions(node, elements);
-      stack.add(graph.addConstant(constant, compiler));
-      return;
+      instruction = graph.addConstant(constant, compiler);
+    } else {
+      List<HInstruction> inputs = <HInstruction>[];
+      for (Link<Node> link = node.elements.nodes;
+           !link.isEmpty;
+           link = link.tail) {
+        visit(link.head);
+        inputs.add(pop());
+      }
+      instruction = buildLiteralList(inputs);
+      add(instruction);
     }
 
-    List<HInstruction> inputs = <HInstruction>[];
-    for (Link<Node> link = node.elements.nodes;
-         !link.isEmpty;
-         link = link.tail) {
-      visit(link.head);
-      inputs.add(pop());
-    }
-    HInstruction instruction = buildLiteralList(inputs);
     HType type = new HType.inferredForNode(currentElement, node, compiler);
     if (!type.isUnknown()) instruction.instructionType = type;
-    push(instruction);
+    stack.add(instruction);
   }
 
   visitConditional(Conditional node) {
diff --git a/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart b/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart
index 865c198..9878bf2 100644
--- a/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart
@@ -292,7 +292,13 @@
   }
 
   TypeMask visitLiteralInt(LiteralInt node) {
-    return inferrer.intType;
+    ConstantSystem constantSystem = compiler.backend.constantSystem;
+    Constant constant = constantSystem.createInt(node.value);
+    // The JavaScript backend may turn this literal into a double at
+    // runtime.
+    return constantSystem.isDouble(constant)
+        ? inferrer.doubleType
+        : inferrer.intType;
   }
 
   TypeMask visitLiteralList(LiteralList node) {
diff --git a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
index 317e0b6..5f25672 100644
--- a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
@@ -65,7 +65,7 @@
   /**
    * Callers of an element.
    */
-  Set<Element> get callers => null;
+  Map<Element, int> get callers => null;
 
   /**
    * Number of times the element has been processed.
@@ -79,10 +79,23 @@
   TypeMask get returnType => null;
   void set returnType(value) {}
 
-  void addCaller(Element element) {
-    callers.add(element);
+  void addCaller(Element caller) {
+    if (callers.containsKey(caller)) {
+      callers[caller]++;
+    } else {
+      callers[caller] = 1;
+    }
   }
 
+  void removeCall(Element caller) {
+    if (!callers.containsKey(caller)) return;
+    if (callers[caller] == 1) {
+      callers.remove(caller);
+    } else {
+      callers[caller]--;
+    }
+  }
+  
   void addAssignment(Node node, TypeMask mask) {
     assignments[node] = mask;
   }
@@ -91,7 +104,7 @@
 }
 
 class FunctionTypeInformation extends TypeInformation {
-  Set<Element> callers = new Set<Element>();
+  Map<Element, int> callers = new Map<Element, int>();
   TypeMask returnType;
   int analyzeCount = 0;
   bool canBeClosurized = false;
@@ -113,7 +126,7 @@
 
 class FieldTypeInformation extends TypeInformation {
   TypeMask type;
-  Set<Element> callers = new Set<Element>();
+  Map<Element, int> callers = new Map<Element, int>();
   Map<Node, TypeMask> assignments = new Map<Node, TypeMask>();
   int analyzeCount = 0;
 
@@ -413,7 +426,7 @@
   }
 
   Iterable<Element> getCallersOf(Element element) {
-    return typeInformationOf(element).callers;
+    return typeInformationOf(element).callers.keys;
   }
 
   /**
@@ -458,7 +471,7 @@
 
   void enqueueCallersOf(Element element) {
     assert(isNotClosure(element));
-    typeInformationOf(element).callers.forEach(enqueueAgain);
+    typeInformationOf(element).callers.keys.forEach(enqueueAgain);
   }
 
   /**
@@ -818,6 +831,7 @@
     // Bailout for closure calls. We're not tracking types of
     // closures.
     if (selector.isClosureCall()) return dynamicType;
+    if (selector.isSetter() || selector.isIndexSet()) return dynamicType;
 
     TypeMask result;
     iterateOverElements(selector, (Element element) {
@@ -875,8 +889,7 @@
     assert(caller.isImplementation);
     assert(callee.isImplementation);
     assert(isNotClosure(caller));
-    Set<Element> callers = typeInformationOf(callee).callers;
-    callers.add(caller);
+    typeInformationOf(callee).addCaller(caller);
   }
 
   bool addArguments(Node node,
@@ -1011,8 +1024,7 @@
 
     assert(isNotClosure(caller));
     callee = callee.implementation;
-    TypeInformation info = typeInformationOf(callee);
-    info.addCaller(caller);
+    addCaller(caller, callee);
 
     if (selector.isSetter() && callee.isField()) {
       recordNonFinalFieldElementType(
@@ -1024,7 +1036,7 @@
     } else if (selector.isGetter()) {
       assert(arguments == null);
       if (callee.isFunction()) {
-        FunctionTypeInformation functionInfo = info;
+        FunctionTypeInformation functionInfo = typeInformationOf(callee);
         functionInfo.canBeClosurized = true;
       }
       return;
@@ -1049,6 +1061,7 @@
                                Selector selector,
                                Element caller,
                                Element callee) {
+    typeInformationOf(callee).removeCall(caller);
     if (callee.isField()) {
       if (selector.isSetter()) {
         Map<Node, TypeMask> assignments = typeInformationOf(callee).assignments;
diff --git a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
index 2e42264..88f38b2 100644
--- a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
@@ -19,11 +19,10 @@
 import 'dart:async';
 import 'dart:io';
 
-// TODO(rnystrom): Use "package:" URL (#4968).
 import '../lib/dartdoc.dart';
 import '../lib/src/dartdoc/utils.dart';
 import 'package:args/args.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 /**
  * Run this from the `lib/_internal/dartdoc` directory.
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index 21f5d5e..677cfb1 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -22,7 +22,7 @@
 import 'dart:json' as json;
 import 'dart:math';
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 import 'classify.dart';
 import 'markdown.dart' as md;
diff --git a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
index 425deaf..fe73e1b 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart
@@ -8,7 +8,7 @@
 import 'dart:io';
 import 'dart:math' as math;
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 import '../../../../compiler/implementation/mirrors/mirrors.dart';
 
diff --git a/sdk/lib/_internal/dartdoc/lib/src/export_map.dart b/sdk/lib/_internal/dartdoc/lib/src/export_map.dart
index 28d8503..169b0e9 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/export_map.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/export_map.dart
@@ -11,7 +11,7 @@
 import 'dart:io';
 
 import 'package:analyzer_experimental/analyzer.dart';
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 import 'dartdoc/utils.dart';
 
diff --git a/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart b/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
index 0e2e164..ba57411 100755
--- a/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
+++ b/sdk/lib/_internal/dartdoc/lib/universe_serializer.dart
@@ -11,7 +11,7 @@
 import 'dartdoc.dart';
 
 // TODO(rnystrom): Use "package:" URL (#4968).
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import '../../compiler/implementation/mirrors/dart2js_mirror.dart' as dart2js;
 import '../../compiler/implementation/mirrors/mirrors.dart';
 import '../../compiler/implementation/mirrors/mirrors_util.dart';
diff --git a/sdk/lib/_internal/dartdoc/pubspec.yaml b/sdk/lib/_internal/dartdoc/pubspec.yaml
index 6614786..cd4e771 100644
--- a/sdk/lib/_internal/dartdoc/pubspec.yaml
+++ b/sdk/lib/_internal/dartdoc/pubspec.yaml
@@ -5,7 +5,7 @@
 dependencies:
   analyzer_experimental: ">=0.4.5 <1.0.0"
   args: ">=0.4.2 <1.0.0"
-  pathos: ">=0.4.2 <1.0.0"
+  path: ">=0.4.2 <1.0.0"
 
 dev_dependencies:
   unittest: ">=0.4.2 <1.0.0"
diff --git a/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart b/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
index d3936c5..3d714b3 100644
--- a/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
+++ b/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
@@ -8,7 +8,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:unittest/unittest.dart';
 
 // TODO(rnystrom): Use "package:" URL (#4968).
diff --git a/sdk/lib/_internal/dartdoc/test/export_map_test.dart b/sdk/lib/_internal/dartdoc/test/export_map_test.dart
index badb755..ed5e392 100644
--- a/sdk/lib/_internal/dartdoc/test/export_map_test.dart
+++ b/sdk/lib/_internal/dartdoc/test/export_map_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 import 'package:unittest/unittest.dart';
 
 import '../lib/src/export_map.dart';
diff --git a/sdk/lib/_internal/lib/core_patch.dart b/sdk/lib/_internal/lib/core_patch.dart
index 9d44abf..7306375 100644
--- a/sdk/lib/_internal/lib/core_patch.dart
+++ b/sdk/lib/_internal/lib/core_patch.dart
@@ -114,11 +114,12 @@
   patch static String _objectToString(Object object) {
     return Primitives.objectToString(object);
   }
-
-  // TODO(11681): implement stackTrace in error object.
-  patch StackTrace get stackTrace => null;
 }
 
+patch class StackTraceOnThrow {
+  // TODO(11681): implement stackTrace on thrown Error.
+  patch StackTrace get stackTrace => null;
+}
 
 // Patch for DateTime implementation.
 patch class DateTime {
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 52d798b..52324fb 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -63,20 +63,20 @@
   return res;
 }
 
-createInvocationMirror(String name, internalName, type, arguments,
+createInvocationMirror(String name, internalName, kind, arguments,
                        argumentNames) {
   return new JSInvocationMirror(name,
                                 internalName,
-                                type,
+                                kind,
                                 arguments,
                                 argumentNames);
 }
 
-createUnmangledInvocationMirror(Symbol symbol, internalName, type, arguments,
+createUnmangledInvocationMirror(Symbol symbol, internalName, kind, arguments,
                                 argumentNames) {
   return new JSInvocationMirror(symbol,
                                 internalName,
-                                type,
+                                kind,
                                 arguments,
                                 argumentNames);
 }
@@ -591,7 +591,12 @@
     String selectorName = 'call\$$argumentCount$buffer';
     var jsFunction = JS('var', '#[#]', function, selectorName);
     if (jsFunction == null) {
-      throw new NoSuchMethodError(function, selectorName, arguments, {});
+      return function.noSuchMethod(createUnmangledInvocationMirror(
+          const Symbol('call'),
+          selectorName,
+          JSInvocationMirror.METHOD,
+          arguments,
+          namedArguments == null ? null : namedArguments.keys.toList()));
     }
     // We bound 'this' to [function] because of how we compile
     // closures: escaped local variables are stored and accessed through
@@ -1481,7 +1486,7 @@
 /**
  * Error thrown when a runtime error occurs.
  */
-class RuntimeError extends Error {
+class RuntimeError extends Error with StackTraceOnThrow {
   final message;
   RuntimeError(this.message);
   String toString() => "RuntimeError: $message";
diff --git a/sdk/lib/_internal/libraries.dart b/sdk/lib/_internal/libraries.dart
index 6c6a3a0..044fbf2 100644
--- a/sdk/lib/_internal/libraries.dart
+++ b/sdk/lib/_internal/libraries.dart
@@ -30,10 +30,16 @@
       "chrome/dart2js/chrome_dart2js.dart",
       category: "Client"),
 
+  "codec": const LibraryInfo(
+      "codec/codec.dart"),
+
   "collection": const LibraryInfo(
       "collection/collection.dart",
       dart2jsPatchPath: "_internal/lib/collection_patch.dart"),
 
+  "convert": const LibraryInfo(
+      "convert/convert.dart"),
+
   "core": const LibraryInfo(
       "core/core.dart",
       dart2jsPatchPath: "_internal/lib/core_patch.dart"),
diff --git a/sdk/lib/_internal/pub/bin/pub.dart b/sdk/lib/_internal/pub/bin/pub.dart
index 5c893e1..9927806 100644
--- a/sdk/lib/_internal/pub/bin/pub.dart
+++ b/sdk/lib/_internal/pub/bin/pub.dart
@@ -7,7 +7,7 @@
 import 'dart:math' as math;
 
 import 'package:args/args.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../lib/src/command.dart';
 import '../lib/src/exit_codes.dart' as exit_codes;
diff --git a/sdk/lib/_internal/pub/lib/src/command.dart b/sdk/lib/_internal/pub/lib/src/command.dart
index 6b5f63d..8e3f9b5 100644
--- a/sdk/lib/_internal/pub/lib/src/command.dart
+++ b/sdk/lib/_internal/pub/lib/src/command.dart
@@ -8,7 +8,7 @@
 import 'dart:async';
 
 import 'package:args/args.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'command/cache.dart';
 import 'command/deploy.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/command/deploy.dart b/sdk/lib/_internal/pub/lib/src/command/deploy.dart
index da4dfb9..6f578ee 100644
--- a/sdk/lib/_internal/pub/lib/src/command/deploy.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/deploy.dart
@@ -8,7 +8,7 @@
 import 'dart:math' as math;
 
 import 'package:analyzer_experimental/analyzer.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../command.dart';
 import '../dart.dart' as dart;
diff --git a/sdk/lib/_internal/pub/lib/src/command/lish.dart b/sdk/lib/_internal/pub/lib/src/command/lish.dart
index 3721522..c44eeeb 100644
--- a/sdk/lib/_internal/pub/lib/src/command/lish.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/lish.dart
@@ -10,7 +10,7 @@
 
 import 'package:args/args.dart';
 import 'package:http/http.dart' as http;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../command.dart';
 import '../directory_tree.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/command/uploader.dart b/sdk/lib/_internal/pub/lib/src/command/uploader.dart
index 0bae108..8ecdd38 100644
--- a/sdk/lib/_internal/pub/lib/src/command/uploader.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/uploader.dart
@@ -8,7 +8,7 @@
 import 'dart:io';
 
 import 'package:args/args.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../command.dart';
 import '../entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
index 5c27f09..c912fab 100644
--- a/sdk/lib/_internal/pub/lib/src/dart.dart
+++ b/sdk/lib/_internal/pub/lib/src/dart.dart
@@ -10,7 +10,7 @@
 import 'dart:math' as math;
 
 import 'package:analyzer_experimental/analyzer.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import '../../../compiler/compiler.dart' as compiler;
 import '../../../compiler/implementation/mirrors/dart2js_mirror.dart' as dart2js
     show analyze, Dart2JsMirrorSystem;
diff --git a/sdk/lib/_internal/pub/lib/src/directory_tree.dart b/sdk/lib/_internal/pub/lib/src/directory_tree.dart
index 7a5f953..1f07bc7 100644
--- a/sdk/lib/_internal/pub/lib/src/directory_tree.dart
+++ b/sdk/lib/_internal/pub/lib/src/directory_tree.dart
@@ -5,7 +5,7 @@
 /// A simple library for rendering a list of files as a directory tree.
 library pub.directory_tree;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'log.dart' as log;
 
diff --git a/sdk/lib/_internal/pub/lib/src/entrypoint.dart b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
index b2c47c2..1f09a3a 100644
--- a/sdk/lib/_internal/pub/lib/src/entrypoint.dart
+++ b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'git.dart' as git;
 import 'io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart
index 66477f5..4e6b695 100644
--- a/sdk/lib/_internal/pub/lib/src/io.dart
+++ b/sdk/lib/_internal/pub/lib/src/io.dart
@@ -11,7 +11,7 @@
 import 'dart:isolate';
 import 'dart:json';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:http/http.dart' show ByteStream;
 import 'error_group.dart';
 import 'exit_codes.dart' as exit_codes;
diff --git a/sdk/lib/_internal/pub/lib/src/oauth2.dart b/sdk/lib/_internal/pub/lib/src/oauth2.dart
index 66e5f88..f88c3d6 100644
--- a/sdk/lib/_internal/pub/lib/src/oauth2.dart
+++ b/sdk/lib/_internal/pub/lib/src/oauth2.dart
@@ -8,7 +8,7 @@
 import 'dart:io';
 
 import 'package:oauth2/oauth2.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'http.dart';
 import 'io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/package.dart b/sdk/lib/_internal/pub/lib/src/package.dart
index 2979849..6f1be0b 100644
--- a/sdk/lib/_internal/pub/lib/src/package.dart
+++ b/sdk/lib/_internal/pub/lib/src/package.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'io.dart';
 import 'pubspec.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/pubspec.dart b/sdk/lib/_internal/pub/lib/src/pubspec.dart
index 3a7738e..6da96ba 100644
--- a/sdk/lib/_internal/pub/lib/src/pubspec.dart
+++ b/sdk/lib/_internal/pub/lib/src/pubspec.dart
@@ -5,7 +5,7 @@
 library pub.pubspec;
 
 import 'package:yaml/yaml.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'io.dart';
 import 'package.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/sdk.dart b/sdk/lib/_internal/pub/lib/src/sdk.dart
index 8f86ab4..65aaef6 100644
--- a/sdk/lib/_internal/pub/lib/src/sdk.dart
+++ b/sdk/lib/_internal/pub/lib/src/sdk.dart
@@ -7,7 +7,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'io.dart';
 import 'log.dart' as log;
diff --git a/sdk/lib/_internal/pub/lib/src/source.dart b/sdk/lib/_internal/pub/lib/src/source.dart
index 4557fa1..66428f5 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'io.dart';
 import 'package.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/source/git.dart b/sdk/lib/_internal/pub/lib/src/source/git.dart
index c623cdb..262efc2 100644
--- a/sdk/lib/_internal/pub/lib/src/source/git.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/git.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../git.dart' as git;
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/source/hosted.dart b/sdk/lib/_internal/pub/lib/src/source/hosted.dart
index f69924f..097ec68 100644
--- a/sdk/lib/_internal/pub/lib/src/source/hosted.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/hosted.dart
@@ -9,7 +9,7 @@
 import 'dart:json' as json;
 
 import 'package:http/http.dart' as http;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../http.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/source/path.dart b/sdk/lib/_internal/pub/lib/src/source/path.dart
index a8a5306..809481e 100644
--- a/sdk/lib/_internal/pub/lib/src/source/path.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/path.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../log.dart' as log;
 
diff --git a/sdk/lib/_internal/pub/lib/src/system_cache.dart b/sdk/lib/_internal/pub/lib/src/system_cache.dart
index 08f031d..b1cd1ac 100644
--- a/sdk/lib/_internal/pub/lib/src/system_cache.dart
+++ b/sdk/lib/_internal/pub/lib/src/system_cache.dart
@@ -7,7 +7,7 @@
 import 'dart:io';
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'io.dart';
 import 'io.dart' as io show createTempDir;
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index e9eb563..d3ea1b6 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -12,7 +12,7 @@
 import 'dart:mirrors';
 
 import "package:crypto/crypto.dart";
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 /// A pair of values.
 class Pair<E, F> {
@@ -503,7 +503,6 @@
     error is HttpException ||
     error is HttpException ||
     error is LinkException ||
-    error is MimeMultipartException ||
     error is OSError ||
     error is ProcessException ||
     error is SocketException ||
diff --git a/sdk/lib/_internal/pub/lib/src/validator/compiled_dartdoc.dart b/sdk/lib/_internal/pub/lib/src/validator/compiled_dartdoc.dart
index 94f7031..3eaeec3 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/compiled_dartdoc.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/compiled_dartdoc.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/validator/directory.dart b/sdk/lib/_internal/pub/lib/src/validator/directory.dart
index 30f4ddd..65ad909 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/directory.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/directory.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/validator/lib.dart b/sdk/lib/_internal/pub/lib/src/validator/lib.dart
index 42d6366..5a89359 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/lib.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/lib.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/validator/license.dart b/sdk/lib/_internal/pub/lib/src/validator/license.dart
index 844c223..e606752 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/license.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/license.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/validator/name.dart b/sdk/lib/_internal/pub/lib/src/validator/name.dart
index 8df191a..8e79ac1 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/name.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/name.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/lib/src/validator/utf8_readme.dart b/sdk/lib/_internal/pub/lib/src/validator/utf8_readme.dart
index 2ae7ad3..1984ec8 100644
--- a/sdk/lib/_internal/pub/lib/src/validator/utf8_readme.dart
+++ b/sdk/lib/_internal/pub/lib/src/validator/utf8_readme.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:utf';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../entrypoint.dart';
 import '../io.dart';
diff --git a/sdk/lib/_internal/pub/test/command_line_config.dart b/sdk/lib/_internal/pub/test/command_line_config.dart
deleted file mode 100644
index bdceafb..0000000
--- a/sdk/lib/_internal/pub/test/command_line_config.dart
+++ /dev/null
@@ -1,160 +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.
-
-library command_line_config;
-
-import 'dart:io';
-import 'dart:math' as math;
-
-import 'package:pathos/path.dart' as path;
-import 'package:unittest/unittest.dart';
-import '../lib/src/utils.dart';
-
-/// Pretty Unicode characters!
-final _checkbox = getSpecial('\u2713', 'PASS');
-final _ballotX  = getSpecial('\u2717', 'FAIL');
-final _lambda   = getSpecial('\u03bb', '<fn>');
-
-final _green = getSpecial('\u001b[32m');
-final _red = getSpecial('\u001b[31m');
-final _magenta = getSpecial('\u001b[35m');
-final _none = getSpecial('\u001b[0m');
-
-/// A custom unittest configuration for running the pub tests from the
-/// command-line and generating human-friendly output.
-class CommandLineConfiguration extends Configuration {
-  void onInit() {
-    // Do nothing. Overridden to prevent the base class from printing.
-  }
-
-  void onTestResult(TestCase testCase) {
-    var result;
-    switch (testCase.result) {
-      case PASS: result = '$_green$_checkbox$_none'; break;
-      case FAIL: result = '$_red$_ballotX$_none'; break;
-      case ERROR: result = '$_magenta?$_none'; break;
-    }
-    print('$result ${testCase.description}');
-
-    if (testCase.message != '') {
-      print(_indent(testCase.message));
-    }
-
-    _printStackTrace(testCase.stackTrace);
-
-    super.onTestResult(testCase);
-  }
-
-  void onSummary(int passed, int failed, int errors, List<TestCase> results,
-      String uncaughtError) {
-    var success = false;
-    if (uncaughtError != null) {
-      print('Top-level uncaught error: $uncaughtError');
-    } else if (errors != 0) {
-      print('${_green}$passed${_none} passed, ${_red}$failed${_none} failed, '
-            '${_magenta}$errors${_none} errors.');
-    } else if (failed != 0) {
-      print('${_green}$passed${_none} passed, ${_red}$failed${_none} '
-            'failed.');
-    } else if (passed == 0) {
-      print('No tests found.');
-    } else {
-      print('All ${_green}$passed${_none} tests passed!');
-      success = true;
-    }
-  }
-
-  void onDone(bool success) {
-    if (!success) exit(1);
-  }
-
-  void _printStackTrace(String stackTrace) {
-    if (stackTrace == null || stackTrace == '') return;
-
-    print('');
-
-    // Parse out each stack entry.
-    var stack = [];
-    for (var line in stackTrace.split('\n')) {
-      if (line.trim() == '') continue;
-      stack.add(new _StackFrame(line));
-    }
-
-    if (stack.length == 0) return;
-
-    // Figure out the longest path so we know how much to pad.
-    int longest = stack.map((frame) => frame.location.length).reduce(math.max);
-
-    // Print out the stack trace nicely formatted.
-    for (var frame in stack) {
-      print('  ${_padLeft(frame.location, longest)}  ${frame.member}');
-    }
-
-    print('');
-  }
-
-  String _padLeft(String string, int length) {
-    if (string.length >= length) return string;
-
-    var result = new StringBuffer();
-    result.write(string);
-    for (var i = 0; i < length - string.length; i++) {
-      result.write(' ');
-    }
-
-    return result.toString();
-  }
-
-  String _indent(String str) =>
-    str.replaceAll(new RegExp("^", multiLine: true), "  ");
-}
-
-class _StackFrame {
-  static final fileRegExp = new RegExp(
-      r'#\d+\s+(.*) \(file://(/.+):(\d+):(\d+)\)');
-  static final coreRegExp = new RegExp(r'#\d+\s+(.*) \((.+):(\d+):(\d+)\)');
-
-  /// If `true`, then this stack frame is for a library built into Dart and
-  /// not a regular file path.
-  final bool isCore;
-
-  /// The path to the library or the library name if a core library.
-  String library;
-
-  /// The line number.
-  final String line;
-
-  /// The column number.
-  final String column;
-
-  /// The member where the error occurred.
-  final String member;
-
-  /// A formatted description of the code location.
-  String get location => '$library $line:$column';
-
-  _StackFrame._(this.isCore, this.library, this.line, this.column, this.member);
-
-  factory _StackFrame(String text) {
-    var match = fileRegExp.firstMatch(text);
-    var isCore = false;
-
-    if (match == null) {
-      match = coreRegExp.firstMatch(text);
-      if (match == null) {
-        throw new FormatException("Couldn't parse stack trace line '$text'.");
-      }
-      isCore = true;
-    }
-
-    var library = match[2];
-    if (!isCore) {
-      // Make the library path relative to the entrypoint.
-      library = path.relative(library);
-    }
-
-    var member = match[1].replaceAll("<anonymous closure>", _lambda);
-    return new _StackFrame._(isCore, library, match[3], match[4], member);
-  }
-}
diff --git a/sdk/lib/_internal/pub/test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart b/sdk/lib/_internal/pub/test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart
index 0f8bfeb..0f626b1 100644
--- a/sdk/lib/_internal/pub/test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/compiles_dart_entrypoints_to_dart_and_js_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart b/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
index e6f007c..9ab8751 100644
--- a/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:json' as json;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/deploy/copies_non_dart_files_to_deploy_test.dart b/sdk/lib/_internal/pub/test/deploy/copies_non_dart_files_to_deploy_test.dart
index e252f94..0288b6f 100644
--- a/sdk/lib/_internal/pub/test/deploy/copies_non_dart_files_to_deploy_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/copies_non_dart_files_to_deploy_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/deploy/ignores_non_entrypoint_dart_files_test.dart b/sdk/lib/_internal/pub/test/deploy/ignores_non_entrypoint_dart_files_test.dart
index f435377..e687508 100644
--- a/sdk/lib/_internal/pub/test/deploy/ignores_non_entrypoint_dart_files_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/ignores_non_entrypoint_dart_files_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/deploy/reports_dart_parse_errors_test.dart b/sdk/lib/_internal/pub/test/deploy/reports_dart_parse_errors_test.dart
index 95ff7d88..4f7f7d6 100644
--- a/sdk/lib/_internal/pub/test/deploy/reports_dart_parse_errors_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/reports_dart_parse_errors_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/descriptor/git.dart b/sdk/lib/_internal/pub/test/descriptor/git.dart
index f2f7557..0ccf2e3 100644
--- a/sdk/lib/_internal/pub/test/descriptor/git.dart
+++ b/sdk/lib/_internal/pub/test/descriptor/git.dart
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/descriptor.dart';
 
diff --git a/sdk/lib/_internal/pub/test/descriptor/tar.dart b/sdk/lib/_internal/pub/test/descriptor/tar.dart
index 0dd8b82..658bb4d 100644
--- a/sdk/lib/_internal/pub/test/descriptor/tar.dart
+++ b/sdk/lib/_internal/pub/test/descriptor/tar.dart
@@ -7,7 +7,7 @@
 import 'dart:io';
 import 'dart:async';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/descriptor.dart';
 
diff --git a/sdk/lib/_internal/pub/test/dev_dependency_test.dart b/sdk/lib/_internal/pub/test/dev_dependency_test.dart
index 88df801..b47baa0 100644
--- a/sdk/lib/_internal/pub/test/dev_dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/dev_dependency_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/install/broken_symlink_test.dart b/sdk/lib/_internal/pub/test/install/broken_symlink_test.dart
index 2d9e551..0da8466 100644
--- a/sdk/lib/_internal/pub/test/install/broken_symlink_test.dart
+++ b/sdk/lib/_internal/pub/test/install/broken_symlink_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/install/git/lock_version_test.dart b/sdk/lib/_internal/pub/test/install/git/lock_version_test.dart
index 8eb7087..693999f 100644
--- a/sdk/lib/_internal/pub/test/install/git/lock_version_test.dart
+++ b/sdk/lib/_internal/pub/test/install/git/lock_version_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../../lib/src/io.dart';
diff --git a/sdk/lib/_internal/pub/test/install/hosted/cached_pubspec_test.dart b/sdk/lib/_internal/pub/test/install/hosted/cached_pubspec_test.dart
index 5949d4b..b9e1d2a 100644
--- a/sdk/lib/_internal/pub/test/install/hosted/cached_pubspec_test.dart
+++ b/sdk/lib/_internal/pub/test/install/hosted/cached_pubspec_test.dart
@@ -4,7 +4,7 @@
 
 library pub_tests;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../../lib/src/io.dart';
diff --git a/sdk/lib/_internal/pub/test/install/hosted/repair_cache_test.dart b/sdk/lib/_internal/pub/test/install/hosted/repair_cache_test.dart
index 94874ad..749373d 100644
--- a/sdk/lib/_internal/pub/test/install/hosted/repair_cache_test.dart
+++ b/sdk/lib/_internal/pub/test/install/hosted/repair_cache_test.dart
@@ -4,7 +4,7 @@
 
 library pub_tests;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/hosted/stay_locked_test.dart b/sdk/lib/_internal/pub/test/install/hosted/stay_locked_test.dart
index 4cbafe3..6b59fe4 100644
--- a/sdk/lib/_internal/pub/test/install/hosted/stay_locked_test.dart
+++ b/sdk/lib/_internal/pub/test/install/hosted/stay_locked_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../../lib/src/io.dart';
diff --git a/sdk/lib/_internal/pub/test/install/path/absolute_path_test.dart b/sdk/lib/_internal/pub/test/install/path/absolute_path_test.dart
index 42b2636..8aaf04c 100644
--- a/sdk/lib/_internal/pub/test/install/path/absolute_path_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/absolute_path_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../../lib/src/io.dart';
diff --git a/sdk/lib/_internal/pub/test/install/path/absolute_symlink_test.dart b/sdk/lib/_internal/pub/test/install/path/absolute_symlink_test.dart
index 83724c3..b852f4f 100644
--- a/sdk/lib/_internal/pub/test/install/path/absolute_symlink_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/absolute_symlink_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/no_pubspec_test.dart b/sdk/lib/_internal/pub/test/install/path/no_pubspec_test.dart
index 61789ad..763ab96 100644
--- a/sdk/lib/_internal/pub/test/install/path/no_pubspec_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/no_pubspec_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart b/sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart
index 3564817..c341459 100644
--- a/sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/nonexistent_dir_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart b/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
index dbbc0df..05c7861 100644
--- a/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/relative_path_test.dart b/sdk/lib/_internal/pub/test/install/path/relative_path_test.dart
index 5abaf09..ec6992a 100644
--- a/sdk/lib/_internal/pub/test/install/path/relative_path_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/relative_path_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/relative_symlink_test.dart b/sdk/lib/_internal/pub/test/install/path/relative_symlink_test.dart
index 97bd902..62b7aab 100644
--- a/sdk/lib/_internal/pub/test/install/path/relative_symlink_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/relative_symlink_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
diff --git a/sdk/lib/_internal/pub/test/install/path/shared_dependency_symlink_test.dart b/sdk/lib/_internal/pub/test/install/path/shared_dependency_symlink_test.dart
index bfb26dc..94b8453 100644
--- a/sdk/lib/_internal/pub/test/install/path/shared_dependency_symlink_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/shared_dependency_symlink_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/install/path/shared_dependency_test.dart b/sdk/lib/_internal/pub/test/install/path/shared_dependency_test.dart
index ee8a7c3..40e74fa 100644
--- a/sdk/lib/_internal/pub/test/install/path/shared_dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/shared_dependency_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/io_test.dart b/sdk/lib/_internal/pub/test/io_test.dart
index 6aa82bc..55e3a27 100644
--- a/sdk/lib/_internal/pub/test/io_test.dart
+++ b/sdk/lib/_internal/pub/test/io_test.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:unittest/unittest.dart';
 
 import '../lib/src/io.dart';
diff --git a/sdk/lib/_internal/pub/test/package_files_test.dart b/sdk/lib/_internal/pub/test/package_files_test.dart
index 36e6832..58fd181 100644
--- a/sdk/lib/_internal/pub/test/package_files_test.dart
+++ b/sdk/lib/_internal/pub/test/package_files_test.dart
@@ -6,7 +6,7 @@
 
 import 'dart:io';
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../lib/src/entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/test/real_version_test.dart b/sdk/lib/_internal/pub/test/real_version_test.dart
index 50857a4..c1bea3c 100644
--- a/sdk/lib/_internal/pub/test/real_version_test.dart
+++ b/sdk/lib/_internal/pub/test/real_version_test.dart
@@ -8,7 +8,7 @@
 
 import '../lib/src/sdk.dart' as sdk;
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'test_pub.dart';
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index b3bbc82..f1b66b7 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -17,10 +17,11 @@
 
 import 'package:http/testing.dart';
 import 'package:oauth2/oauth2.dart' as oauth2;
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_test.dart';
+import 'package:unittest/compact_vm_config.dart';
 import 'package:yaml/yaml.dart';
 
 import '../lib/src/entrypoint.dart';
@@ -38,16 +39,12 @@
 import '../lib/src/system_cache.dart';
 import '../lib/src/utils.dart';
 import '../lib/src/validator.dart';
-import 'command_line_config.dart';
 import 'descriptor.dart' as d;
 
 /// This should be called at the top of a test file to set up an appropriate
 /// test configuration for the machine running the tests.
 initConfig() {
-  // If we aren't running on the bots, use the human-friendly config.
-  if (!runningOnBuildbot) {
-    unittestConfiguration = new CommandLineConfiguration();
-  }
+  useCompactVMConfiguration();
 }
 
 /// Returns whether we're running on a Dart build bot.
@@ -640,7 +637,7 @@
   case "git":
     var url = description is String ? description : description['url'];
     // TODO(rnystrom): Using path.basename on a URL is hacky. If we add URL
-    // support to pkg/pathos, should use an explicit builder for that.
+    // support to pkg/path, should use an explicit builder for that.
     return path.basename(url.replaceFirst(new RegExp(r"(\.git)?/?$"), ""));
   case "hosted":
     if (description is String) return description;
diff --git a/sdk/lib/_internal/pub/test/validator/dependency_test.dart b/sdk/lib/_internal/pub/test/validator/dependency_test.dart
index 89f1bf7..87d926a 100644
--- a/sdk/lib/_internal/pub/test/validator/dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/dependency_test.dart
@@ -7,7 +7,7 @@
 
 import 'package:http/http.dart' as http;
 import 'package:http/testing.dart';
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../lib/src/entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/test/validator/directory_test.dart b/sdk/lib/_internal/pub/test/validator/directory_test.dart
index 1b58b69..dc6df99 100644
--- a/sdk/lib/_internal/pub/test/validator/directory_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/directory_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../lib/src/entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/test/validator/lib_test.dart b/sdk/lib/_internal/pub/test/validator/lib_test.dart
index 4b038a9..c717e1f 100644
--- a/sdk/lib/_internal/pub/test/validator/lib_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/lib_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../lib/src/entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/test/validator/license_test.dart b/sdk/lib/_internal/pub/test/validator/license_test.dart
index c009c1c..5c3a06b 100644
--- a/sdk/lib/_internal/pub/test/validator/license_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/license_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../lib/src/entrypoint.dart';
diff --git a/sdk/lib/_internal/pub/test/validator/name_test.dart b/sdk/lib/_internal/pub/test/validator/name_test.dart
index eeeb738..6a70d11 100644
--- a/sdk/lib/_internal/pub/test/validator/name_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/name_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:pathos/path.dart' as path;
+import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
 import '../../lib/src/entrypoint.dart';
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 73dc35f..4a3f064 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -23,7 +23,6 @@
     if (_isComplete) throw new StateError("Future already completed");
     _isComplete = true;
     _FutureImpl futureImpl = future;
-    futureImpl._zone.cancelCallbackExpectation();
     _setFutureValue(value);
   }
 
@@ -35,12 +34,7 @@
       _attachStackTrace(error, stackTrace);
     }
     _FutureImpl futureImpl = future;
-    if (futureImpl._inSameErrorZone(_Zone.current)) {
-      futureImpl._zone.cancelCallbackExpectation();
-      _setFutureError(error);
-    } else {
-      _Zone.current.handleUncaughtError(error);
-    }
+    _setFutureError(error);
   }
 
   bool get isCompleted => _isComplete;
@@ -50,11 +44,17 @@
   void _setFutureValue(T value) {
     _FutureImpl future = this.future;
     future._asyncSetValue(value);
+    // The async-error will schedule another callback, so we can cancel
+    // the expectation without shutting down the zone.
+    future._zone.cancelCallbackExpectation();
   }
 
   void _setFutureError(error) {
     _FutureImpl future = this.future;
     future._asyncSetError(error);
+    // The async-error will schedule another callback, so we can cancel
+    // the expectation without shutting down the zone.
+    future._zone.cancelCallbackExpectation();
   }
 }
 
@@ -62,11 +62,13 @@
   void _setFutureValue(T value) {
     _FutureImpl future = this.future;
     future._setValue(value);
+    future._zone.cancelCallbackExpectation();
   }
 
   void _setFutureError(error) {
     _FutureImpl future = this.future;
     future._setError(error);
+    future._zone.cancelCallbackExpectation();
   }
 }
 
diff --git a/sdk/lib/codec/codec.dart b/sdk/lib/codec/codec.dart
new file mode 100644
index 0000000..faf7361
--- /dev/null
+++ b/sdk/lib/codec/codec.dart
@@ -0,0 +1,107 @@
+// 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.
+
+library dart.codec;
+
+import 'dart:convert';
+
+part 'encoding.dart';
+part 'json.dart';
+
+/**
+ * A [Codec] encodes and (if supported) decodes data.
+ *
+ * Codecs can be fused. For example fusing [JSON] and [UTF8] produces
+ * an encoder that can convert Json objects directly to bytes, or can decode
+ * bytes directly to json objects.
+ *
+ * Fused codecs generally attempt to optimize the operations and can be faster
+ * than executing each step of an encoding separately.
+ *
+ * *Codecs are still experimental and are subject to change without notice.*
+ */
+abstract class Codec<S, T> {
+  const Codec();
+
+  T encode(S input) => encoder.convert(input);
+  S decode(T encoded) => decoder.convert(encoded);
+
+  /**
+   * Returns the encoder from [S] to [T].
+   *
+   * It may be stateful and should not be reused.
+   */
+  Converter<S, T> get encoder;
+  /**
+   * Returns the decoder of `this`, converting from [T] to [S].
+   *
+   * It may be stateful an should not be reused.
+   */
+  Converter<T, S> get decoder;
+
+  /**
+   * Fuses `this` with `other`.
+   *
+   * When encoding, the resulting codec encodes with `this` before
+   * encoding with [other].
+   *
+   * When decoding, the resulting codec decodes with [other] before decoding
+   * with `this`.
+   *
+   * In some cases one needs to use the [inverted] codecs to be able to fuse
+   * them correctly. That is, the output type of `this` ([T]) must match the
+   * input type of the second codec [other].
+   *
+   * Examples:
+   *
+   *     final JSON_TO_BYTES = JSON.fuse(UTF8);
+   *     List<int> bytes = JSON_TO_BYTES.encode(["json-object"]);
+   *     var decoded = JSON_TO_BYTES.decode(bytes);
+   *     assert(decoded is List && decoded[0] == "json-object");
+   *
+   *     var inverted = JSON.inverted;
+   *     var jsonIdentity = JSON.fuse(inverted);
+   *     var jsonObject = jsonIdentity.encode(["1", 2]);
+   *     assert(jsonObject is List && jsonObject[0] == "1" && jsonObject[1] == 2);
+   */
+  // TODO(floitsch): use better example with line-splitter once that one is
+  // in this library.
+  Codec<S, dynamic> fuse(Codec<T, dynamic> other) {
+    return new _FusedCodec<S, T, dynamic>(this, other);
+  }
+
+  /**
+   * Inverts `this`.
+   *
+   * The [encoder] and [decoder] of the resulting codec are swapped.
+   */
+  Codec<T, S> get inverted => new _InvertedCodec<T, S>(this);
+}
+
+/**
+ * Fuses the given codecs.
+ *
+ * In the non-chunked conversion simply invokes the non-chunked conversions in
+ * sequence.
+ */
+class _FusedCodec<S, M, T> extends Codec<S, T> {
+  final Codec<S, M> _first;
+  final Codec<M, T> _second;
+
+  Converter<S, T> get encoder => _first.encoder.fuse(_second.encoder);
+  Converter<T, S> get decoder => _second.decoder.fuse(_first.decoder);
+
+  _FusedCodec(this._first, this._second);
+}
+
+class _InvertedCodec<T, S> extends Codec<T, S> {
+  final Codec<S, T> _codec;
+
+  _InvertedCodec(Codec<S, T> codec) : _codec = codec;
+
+  Converter<T, S> get encoder => _codec.decoder;
+  Converter<S, T> get decoder => _codec.encoder;
+
+  Codec<S, T> get inverted => _codec;
+}
\ No newline at end of file
diff --git a/sdk/lib/codec/codec_sources.gypi b/sdk/lib/codec/codec_sources.gypi
new file mode 100644
index 0000000..703ccb9
--- /dev/null
+++ b/sdk/lib/codec/codec_sources.gypi
@@ -0,0 +1,13 @@
+# 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.
+
+# This file contains all sources for the dart:convert library.
+{
+  'sources': [
+    'codec.dart',
+    # The above file needs to be first as it lists the parts below.
+    'json.dart',
+    'encoding.dart',
+  ],
+}
diff --git a/sdk/lib/codec/encoding.dart b/sdk/lib/codec/encoding.dart
new file mode 100644
index 0000000..50b724b
--- /dev/null
+++ b/sdk/lib/codec/encoding.dart
@@ -0,0 +1,30 @@
+// 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.
+
+part of dart.codec;
+
+/**
+ * Open-ended Encoding enum.
+ */
+// TODO(floitsch): dart:io already has an Encoding class. If we can't
+// consolitate them, we need to remove `Encoding` here.
+abstract class Encoding extends Codec<String, List<int>> {
+  const Encoding();
+}
+
+// TODO(floitsch): add other encodings, like ASCII and ISO_8859_1.
+const UTF8 = const Utf8Codec();
+
+/**
+ * A [Utf8Codec] encodes strings to utf-8 code units (bytes) and decodes
+ * UTF-8 code units to strings.
+ */
+// TODO(floitsch): Needs a way to specify if decoding should throw or use
+// the replacement character.
+class Utf8Codec extends Encoding {
+  const Utf8Codec();
+
+  Converter<String, List<int>> get encoder => new Utf8Encoder();
+  Converter<List<int>, String> get decoder => new Utf8Decoder();
+}
diff --git a/sdk/lib/codec/json.dart b/sdk/lib/codec/json.dart
new file mode 100644
index 0000000..78a0753
--- /dev/null
+++ b/sdk/lib/codec/json.dart
@@ -0,0 +1,51 @@
+// 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.
+
+part of dart.codec;
+
+final JSON = new JsonCodec();
+
+/**
+ * A [JsonCodec] encodes JSON objects to strings and decodes strings to
+ * JSON objects.
+ */
+class JsonCodec extends Codec<Object, String> {
+  const JsonCodec();
+
+  /**
+   * Creates a `JsonCodec` with the given reviver.
+   *
+   * The [reviver] function is called once for each object or list property
+   * that has been parsed during decoding. The `key` argument is either the
+   * integer list index for a list property, the map string for object
+   * properties, or `null` for the final result.
+   */
+  factory JsonCodec.withReviver(reviver(var key, var value)) =
+      _ReviverJsonCodec;
+
+  /**
+   * Parses the string and returns the resulting Json object.
+   *
+   * The optional [reviver] function, if provided, is called once for each
+   * object or list property parsed.
+   */
+  Object decode(String str, {reviver(var key, var value)}) {
+    return new JsonDecoder(reviver).convert(str);
+  }
+
+  JsonEncoder get encoder => new JsonEncoder();
+  JsonDecoder get decoder => new JsonDecoder(null);
+}
+
+class _ReviverJsonCodec extends JsonCodec {
+  final Function _reviver;
+  _ReviverJsonCodec(this._reviver);
+
+  Object decode(String str, {reviver(var key, var value)}) {
+    if (reviver == null) reviver = _reviver;
+    return new JsonDecoder(reviver).convert(str);
+  }
+
+  JsonDecoder get decoder => new JsonDecoder(_reviver);
+}
diff --git a/sdk/lib/convert/convert.dart b/sdk/lib/convert/convert.dart
new file mode 100644
index 0000000..c0eab66
--- /dev/null
+++ b/sdk/lib/convert/convert.dart
@@ -0,0 +1,12 @@
+// 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.
+
+library dart.convert;
+
+import 'dart:json' as OLD_JSON_LIB;
+import 'dart:utf' as OLD_UTF_LIB;
+
+part 'converter.dart';
+part 'json.dart';
+part 'utf.dart';
diff --git a/sdk/lib/convert/convert_sources.gypi b/sdk/lib/convert/convert_sources.gypi
new file mode 100644
index 0000000..dd9a1d5
--- /dev/null
+++ b/sdk/lib/convert/convert_sources.gypi
@@ -0,0 +1,14 @@
+# 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.
+
+# This file contains all sources for the dart:convert library.
+{
+  'sources': [
+    'convert.dart',
+    # The above file needs to be first as it lists the parts below.
+    'converter.dart',
+    'json.dart',
+    'utf.dart',
+  ],
+}
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
new file mode 100644
index 0000000..8e7a6f1
--- /dev/null
+++ b/sdk/lib/convert/converter.dart
@@ -0,0 +1,42 @@
+// 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.
+
+part of dart.convert;
+
+/**
+ * A [Converter] converts data from one representation into another.
+ *
+ * *Converters are still experimental and are subject to change without notice.*
+ *
+ */
+abstract class Converter<S, T> {
+  /**
+   * Converts [input] and returns the result of the conversion.
+   */
+  T convert(S input);
+
+  /**
+   * Fuses `this` with [other].
+   *
+   * Encoding with the resulting converter is equivalent to converting with
+   * `this` before converting with `other`.
+   */
+  Converter<S, dynamic> fuse(Converter<T, dynamic> other) {
+    return new _FusedConverter<S, T, dynamic>(this, other);
+  }
+}
+
+/**
+ * Fuses two converters.
+ *
+ * For a non-chunked conversion converts the input in sequence.
+ */
+class _FusedConverter<S, M, T> extends Converter<S, T> {
+  final Converter _first;
+  final Converter _second;
+
+  _FusedConverter(this._first, this._second);
+
+  T convert(S input) => _second.convert(_first.convert(input));
+}
diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
new file mode 100644
index 0000000..8baf997
--- /dev/null
+++ b/sdk/lib/convert/json.dart
@@ -0,0 +1,74 @@
+// 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.
+
+part of dart.convert;
+
+/**
+ * A [JsonEncoder] converts JSON objects to strings.
+ */
+class JsonEncoder extends Converter<Object, String> {
+  JsonEncoder();
+
+  /**
+   * Converts the given object [o] to its JSON representation.
+   *
+   * Directly serializable values are [num], [String], [bool], and [Null], as
+   * well as some [List] and [Map] values.
+   * For [List], the elements must all be serializable.
+   * For [Map], the keys must be [String] and the values must be serializable.
+   *
+   * If a value is any other type is attempted serialized, a "toJson()" method
+   * is invoked on the object and the result, which must be a directly
+   * serializable value, is serialized instead of the original value.
+   *
+   * If the object does not support this method, throws, or returns a
+   * value that is not directly serializable, a [JsonUnsupportedObjectError]
+   * exception is thrown. If the call throws (including the case where there
+   * is no nullary "toJson" method, the error is caught and stored in the
+   * [JsonUnsupportedObjectError]'s [:cause:] field.
+   *
+   * If a [List] or [Map] contains a reference to itself, directly or through
+   * other lists or maps, it cannot be serialized and a [JsonCyclicError] is
+   * thrown.
+   *
+   * Json Objects should not change during serialization.
+   * If an object is serialized more than once, [stringify] is allowed to cache
+   * the JSON text for it. I.e., if an object changes after it is first
+   * serialized, the new values may or may not be reflected in the result.
+   */
+  String convert(Object o) => OLD_JSON_LIB.stringify(o);
+}
+
+typedef _Reviver(var key, var value);
+
+
+/**
+ * A [JsonDecoder] parses JSON strings and builds the corresponding objects.
+ */
+class JsonDecoder extends Converter<String, Object> {
+  final _Reviver _reviver;
+  /**
+   * Constructs a new JsonDecoder.
+   *
+   * The [reviver] may be `null`.
+   */
+  JsonDecoder(reviver(var key, var value)) : this._reviver = reviver;
+
+  /**
+   * Converts the given Json-string [input] to its corresponding object.
+   *
+   * Parsed JSON values are of the types [num], [String], [bool], [Null],
+   * [List]s of parsed JSON values or [Map]s from [String] to parsed
+   * JSON values.
+   *
+   * If `this` was initialized with a reviver, then the parsing operation
+   * invokes the reviver on every object or list property that has been parsed.
+   * The arguments are the property name ([String]) or list index ([int]), and
+   * the value is the parsed value. The return value of the reviver is used as
+   * the value of that property instead the parsed value.
+   *
+   * Throws [FormatException] if the input is not valid JSON text.
+   */
+  Object convert(String input) => OLD_JSON_LIB.parse(input, _reviver);
+}
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
new file mode 100644
index 0000000..09692f0
--- /dev/null
+++ b/sdk/lib/convert/utf.dart
@@ -0,0 +1,31 @@
+// 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.
+
+part of dart.convert;
+
+/**
+ * A [Utf8Encoder] converts strings to their UTF-8 code units (a list of
+ * unsigned 8-bit integers).
+ */
+class Utf8Encoder extends Converter<String, List<int>> {
+  /**
+   * Converts [string] to its UTF-8 code units (a list of
+   * unsigned 8-bit integers).
+   */
+  List<int> convert(String string) => OLD_UTF_LIB.encodeUtf8(string);
+}
+
+/**
+ * A [Utf8Decoder] converts UTF-8 code units (lists of unsigned 8-bit integers)
+ * to a string.
+ */
+class Utf8Decoder extends Converter<List<int>, String> {
+  /**
+   * Converts the UTF-8 [codeUnits] (a list of unsigned 8-bit integers) to the
+   * corresponding string.
+   */
+  // TODO(floitsch): allow to configure the decoder (for example the replacement
+  // character).
+  String convert(List<int> codeUnits) => OLD_UTF_LIB.decodeUtf8(codeUnits);
+}
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index f61cdfe..6f01ce0 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -5,6 +5,8 @@
 part of dart.core;
 
 class Error {
+  const Error();
+
   /**
    * Safely convert a value to a [String] description.
    *
@@ -31,13 +33,33 @@
 
   external static String _objectToString(Object object);
 
+  /**
+   * The stack trace of `this` error. May be null.
+   */
+  StackTrace get stackTrace => null;
+}
+
+/**
+ * Captures the stack trace when thrown.
+ */
+class StackTraceOnThrow {
+  /**
+   * Captures the current stack-trace when thrown.
+   *
+   * Classes extending or mixing-in this class will automatically have a stack
+   * trace captured the first time they are thrown. This stack trace is returned
+   * by the [stackTrace] getter.
+   *
+   * Throwing the object again will not cause overwrite the first stack trace,
+   * so bjects that are `StackTraceOnThrow` instances should not be reused.
+   */
   external StackTrace get stackTrace;
 }
 
 /**
  * Error thrown by the runtime system when an assert statement fails.
  */
-class AssertionError extends Error {
+class AssertionError extends Error with StackTraceOnThrow {
 }
 
 /**
@@ -49,13 +71,13 @@
 /**
  * Error thrown by the runtime system when a cast operation fails.
  */
-class CastError extends Error {
+class CastError extends Error with StackTraceOnThrow {
 }
 
 /**
  * Error thrown when attempting to throw [:null:].
  */
-class NullThrownError extends Error {
+class NullThrownError extends Error with StackTraceOnThrow {
   NullThrownError();
   String toString() => "Throw of null.";
 }
@@ -63,7 +85,7 @@
 /**
  * Error thrown when a function is passed an unacceptable argument.
  */
-class ArgumentError extends Error {
+class ArgumentError extends Error with StackTraceOnThrow {
   final message;
 
   /** The [message] describes the erroneous argument. */
@@ -110,12 +132,12 @@
  * of a switch) without meeting a break or similar end of the control
  * flow.
  */
-class FallThroughError extends Error {
-  FallThroughError();
+class FallThroughError extends Error with StackTraceOnThrow {
 }
 
 
-class AbstractClassInstantiationError extends Error {
+class AbstractClassInstantiationError
+    extends Error with StackTraceOnThrow {
   final String _className;
   AbstractClassInstantiationError(String this._className);
   String toString() => "Cannot instantiate abstract class: '$_className'";
@@ -124,7 +146,7 @@
 /**
  * Error thrown by the default implementation of [:noSuchMethod:] on [Object].
  */
-class NoSuchMethodError extends Error {
+class NoSuchMethodError extends Error with StackTraceOnThrow {
   final Object _receiver;
   final String _memberName;
   final List _arguments;
@@ -162,7 +184,7 @@
  * This [Error] is thrown when an instance cannot implement one of the methods
  * in its signature.
  */
-class UnsupportedError extends Error {
+class UnsupportedError extends Error with StackTraceOnThrow {
   final String message;
   UnsupportedError(this.message);
   String toString() => "Unsupported operation: $message";
@@ -179,7 +201,8 @@
  * an [UnsupportedError] instead. This error is only intended for
  * use during development.
  */
-class UnimplementedError extends Error implements UnsupportedError {
+class UnimplementedError
+    extends Error with StackTraceOnThrow implements UnsupportedError {
   final String message;
   UnimplementedError([String this.message]);
   String toString() => (this.message != null
@@ -194,7 +217,7 @@
  * This is a generic error used for a variety of different erroneous
  * actions. The message should be descriptive.
  */
-class StateError extends Error {
+class StateError extends Error with StackTraceOnThrow {
   final String message;
   StateError(this.message);
   String toString() => "Bad state: $message";
@@ -208,7 +231,7 @@
  * ([Iterable] or similar collection of values) should declare which operations
  * are allowed during an iteration.
  */
-class ConcurrentModificationError extends Error {
+class ConcurrentModificationError extends Error with StackTraceOnThrow {
   /** The object that was modified in an incompatible way. */
   final Object modifiedObject;
 
@@ -224,19 +247,15 @@
 }
 
 
-class OutOfMemoryError implements Error {
+class OutOfMemoryError extends Error {
   const OutOfMemoryError();
   String toString() => "Out of Memory";
-
-  StackTrace get stackTrace => null;
 }
 
 
-class StackOverflowError implements Error {
+class StackOverflowError extends Error {
   const StackOverflowError();
   String toString() => "Stack Overflow";
-
-  StackTrace get stackTrace => null;
 }
 
 /**
@@ -246,7 +265,7 @@
  * the first time it is read. If evaluating the initializer expression causes
  * another read of the variable, this error is thrown.
  */
-class CyclicInitializationError extends Error {
+class CyclicInitializationError extends Error with StackTraceOnThrow {
   final String variableName;
   CyclicInitializationError([this.variableName]);
   String toString() => variableName == null
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index b218ef9..47f469b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -38,12 +38,22 @@
 
 
 /**
- * The top-level Window object.
+ * Top-level container for a web page, which is usually a browser tab or window.
+ *
+ * Each web page loaded in the browser has its own [Window], which is a
+ * container for the web page.
+ *
+ * If the web page has any `<iframe>` elements, then each `<iframe>` has its own
+ * [Window] object, which is accessible only to that `<iframe>`.
+ *
+ * See also:
+ *
+ *   * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MDN.
  */
 Window get window => JS('Window', 'window');
 
 /**
- * The top-level Document object.
+ * Root node for all content in a web page.
  */
 HtmlDocument get document => JS('HtmlDocument', 'document');
 
@@ -24155,9 +24165,10 @@
   @DocsEditable()
   void moveBy(num x, num y) native;
 
+  @JSName('moveTo')
   @DomName('Window.moveTo')
   @DocsEditable()
-  void moveTo(num x, num y) native;
+  void $dom_moveTo(num x, num y) native;
 
   @DomName('Window.openDatabase')
   @DocsEditable()
@@ -24542,6 +24553,10 @@
   @DomName('DOMWindow.onbeforeunload')
   @DocsEditable()
   Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+
+  void moveTo(Point p) {
+    $dom_moveTo(p.x, p.y);
+  }
 }
 
 /**
@@ -26535,8 +26550,11 @@
   /**
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
+   *
+   * If [shouldAdd] is true, then we always add that [value] to the element. If
+   * [shouldAdd] is false then we always remove [value] from the element.
    */
-  bool toggle(String value);
+  bool toggle(String value, [bool shouldAdd]);
 
   /**
    * Returns [:true:] if classes cannot be added or removed from this
@@ -26591,8 +26609,11 @@
    * Iterate through [iterable]'s items, and add it if it is not on it, or
    * remove it if it is. This is the Dart equivalent of jQuery's
    * [toggleClass](http://api.jquery.com/toggleClass/).
+   * If [shouldAdd] is true, then we always add all the classes in [iterable]
+   * element. If [shouldAdd] is false then we always remove all the classes in
+   * [iterable] from the element.
    */
-  void toggleAll(Iterable<String> iterable);
+  void toggleAll(Iterable<String> iterable, [bool shouldAdd]);
 }
 
 /**
@@ -26638,8 +26659,8 @@
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
    */
-  bool toggle(String value) =>
-      _modifyWithReturnValue((e) => e.toggle(value));
+  bool toggle(String value, [bool shouldAdd]) =>
+      _modifyWithReturnValue((e) => e.toggle(value, shouldAdd));
 
   /**
    * Remove the class [value] from element, and return true on successful
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 26dcd4a..d308ceb 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -35,6 +35,19 @@
 
 Window _window;
 
+/**
+ * Top-level container for a web page, which is usually a browser tab or window.
+ *
+ * Each web page loaded in the browser has its own [Window], which is a
+ * container for the web page.
+ *
+ * If the web page has any `<iframe>` elements, then each `<iframe>` has its own
+ * [Window] object, which is accessible only to that `<iframe>`.
+ *
+ * See also:
+ *
+ *   * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MDN.
+ */
 Window get window {
   if (_window != null) {
     return _window;
@@ -45,6 +58,9 @@
 
 HtmlDocument _document;
 
+/**
+ * Root node for all content in a web page.
+ */
 HtmlDocument get document {
   if (_document != null) {
     return _document;
@@ -25468,7 +25484,7 @@
 
   @DomName('Window.moveTo')
   @DocsEditable()
-  void moveTo(num x, num y) native "DOMWindow_moveTo_Callback";
+  void $dom_moveTo(num x, num y) native "DOMWindow_moveTo_Callback";
 
   @DomName('Window.open')
   @DocsEditable()
@@ -25823,6 +25839,10 @@
   @DomName('DOMWindow.onbeforeunload')
   @DocsEditable()
   Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+
+  void moveTo(Point p) {
+    $dom_moveTo(p.x, p.y);
+  }
 }
 
 /**
@@ -28140,8 +28160,11 @@
   /**
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
+   *
+   * If [shouldAdd] is true, then we always add that [value] to the element. If
+   * [shouldAdd] is false then we always remove [value] from the element.
    */
-  bool toggle(String value);
+  bool toggle(String value, [bool shouldAdd]);
 
   /**
    * Returns [:true:] if classes cannot be added or removed from this
@@ -28196,8 +28219,11 @@
    * Iterate through [iterable]'s items, and add it if it is not on it, or
    * remove it if it is. This is the Dart equivalent of jQuery's
    * [toggleClass](http://api.jquery.com/toggleClass/).
+   * If [shouldAdd] is true, then we always add all the classes in [iterable]
+   * element. If [shouldAdd] is false then we always remove all the classes in
+   * [iterable] from the element.
    */
-  void toggleAll(Iterable<String> iterable);
+  void toggleAll(Iterable<String> iterable, [bool shouldAdd]);
 }
 
 /**
@@ -28243,8 +28269,8 @@
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
    */
-  bool toggle(String value) =>
-      _modifyWithReturnValue((e) => e.toggle(value));
+  bool toggle(String value, [bool shouldAdd]) =>
+      _modifyWithReturnValue((e) => e.toggle(value, shouldAdd));
 
   /**
    * Remove the class [value] from element, and return true on successful
diff --git a/sdk/lib/html/html_common/css_class_set.dart b/sdk/lib/html/html_common/css_class_set.dart
index 18a80e71..dddf69f 100644
--- a/sdk/lib/html/html_common/css_class_set.dart
+++ b/sdk/lib/html/html_common/css_class_set.dart
@@ -13,15 +13,19 @@
   /**
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
+   *
+   * If [shouldAdd] is true, then we always add that [value] to the element. If
+   * [shouldAdd] is false then we always remove [value] from the element.
    */
-  bool toggle(String value) {
+  bool toggle(String value, [bool shouldAdd]) {
     Set<String> s = readClasses();
     bool result = false;
-    if (s.contains(value)) {
-      s.remove(value);
-    } else {
+    if (shouldAdd == null) shouldAdd = !s.contains(value);
+    if (shouldAdd) {
       s.add(value);
       result = true;
+    } else {
+      s.remove(value);
     }
     writeClasses(s);
     return result;
@@ -133,9 +137,12 @@
    * Iterate through [iterable]'s items, and add it if it is not on it, or
    * remove it if it is. This is the Dart equivalent of jQuery's
    * [toggleClass](http://api.jquery.com/toggleClass/).
+   * If [shouldAdd] is true, then we always add all the classes in [iterable]
+   * element. If [shouldAdd] is false then we always remove all the classes in
+   * [iterable] from the element.
    */
-  void toggleAll(Iterable<String> iterable) {
-    iterable.forEach(toggle);
+  void toggleAll(Iterable<String> iterable, [bool shouldAdd]) {
+    iterable.forEach((e) => toggle(e, shouldAdd));
   }
 
   void retainAll(Iterable<String> iterable) {
diff --git a/sdk/lib/io/buffer_list.dart b/sdk/lib/io/buffer_list.dart
deleted file mode 100644
index f263e04..0000000
--- a/sdk/lib/io/buffer_list.dart
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.io;
-
-/**
- * Utility class that can fast concatenate [List<int>]s of bytes. Use
- * [readBytes] to get the final buffer.
- */
-class _BufferList {
-  static const int _INIT_SIZE = 1 * 1024;
-
-  _BufferList() {
-    clear();
-  }
-
-  int pow2roundup(int x) {
-    --x;
-    x |= x >> 1;
-    x |= x >> 2;
-    x |= x >> 4;
-    x |= x >> 8;
-    x |= x >> 16;
-    return x + 1;
-  }
-
-  /**
-   * Adds a new buffer to the list.
-   */
-  void add(List<int> buffer) {
-    int bufferLength = buffer.length;
-    int required = _length + bufferLength;
-    if (_buffer == null) {
-      int size = pow2roundup(required);
-      if (size < _INIT_SIZE) size = _INIT_SIZE;
-      _buffer = new Uint8List(size);
-    } else if (_buffer.length < required) {
-      // This will give is a list in the range of 2-4 times larger than
-      // required.
-      int size = pow2roundup(required) * 2;
-      Uint8List newBuffer = new Uint8List(size);
-      newBuffer.setRange(0, _buffer.length, _buffer);
-      _buffer = newBuffer;
-    }
-    assert(_buffer.length >= required);
-    if (buffer is Uint8List) {
-      _buffer.setRange(_length, required, buffer);
-    } else {
-      for (int i = 0; i < bufferLength; i++) {
-        _buffer[_length + i] = buffer[i];
-      }
-    }
-    _length = required;
-  }
-
-  /**
-   * Same as [add].
-   */
-  void write(List<int> buffer) {
-    add(buffer);
-  }
-
-  /**
-   * Read all the bytes from the buffer list. If it's empty, an empty list
-   * is returned. A call to [readBytes] will clear the buffer.
-   */
-  List<int> readBytes() {
-    if (_buffer == null) return new Uint8List(0);
-    var buffer = new Uint8List.view(_buffer.buffer, 0, _length);
-    clear();
-    return buffer;
-  }
-
-  /**
-   * Returns the total number of bytes in the buffer.
-   */
-  int get length => _length;
-
-  /**
-   * Returns whether the buffer list is empty.
-   */
-  bool get isEmpty => _length == 0;
-
-  /**
-   * Returns whether the buffer list is not empty.
-   */
-  bool get isNotEmpty => !isEmpty;
-
-  /**
-   * Clears the content of the buffer list.
-   */
-  void clear() {
-    _length = 0;
-    _buffer = null;
-  }
-
-  int _length;  // Total number of bytes in the buffer.
-  Uint8List _buffer;  // Internal buffer.
-}
diff --git a/sdk/lib/io/bytes_builder.dart b/sdk/lib/io/bytes_builder.dart
new file mode 100644
index 0000000..7e64f33
--- /dev/null
+++ b/sdk/lib/io/bytes_builder.dart
@@ -0,0 +1,122 @@
+// 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.
+
+part of dart.io;
+
+/**
+ * Builds a list of bytes, allowing bytes and lists of bytes to be added at the
+ * end.
+ *
+ * Used to efficiently collect bytes and lists of bytes, using an internal
+ * buffer. Note that it's optimized for IO, using an initial buffer of 1K bytes.
+ */
+class BytesBuilder {
+  // Start with 1024 bytes.
+  static const int _INIT_SIZE = 1024;
+
+  int _length = 0;
+  Uint8List _buffer;
+
+  /**
+   * Construct a new empty [BytesBuilder].
+   */
+  BytesBuilder();
+
+  /**
+   * Appends [bytes] to the current contents of the builder.
+   *
+   * Each value of [bytes] will be bit-representation truncated to the range
+   * 0 .. 255.
+   */
+  void add(List<int> bytes) {
+    int bytesLength = bytes.length;
+    if (bytesLength == 0) return;
+    int required = _length + bytesLength;
+    if (_buffer == null) {
+      int size = _pow2roundup(required);
+      size = max(size, _INIT_SIZE);
+      _buffer = new Uint8List(size);
+    } else if (_buffer.length < required) {
+      // We will create a list in the range of 2-4 times larger than
+      // required.
+      int size = _pow2roundup(required) * 2;
+      var newBuffer = new Uint8List(size);
+      newBuffer.setRange(0, _buffer.length, _buffer);
+      _buffer = newBuffer;
+    }
+    assert(_buffer.length >= required);
+    if (bytes is Uint8List) {
+      _buffer.setRange(_length, required, bytes);
+    } else {
+      for (int i = 0; i < bytesLength; i++) {
+        _buffer[_length + i] = bytes[i];
+      }
+    }
+    _length = required;
+  }
+
+  /**
+   * Append [byte] to the current contents of the builder.
+   *
+   * The [byte] will be bit-representation truncated to the range 0 .. 255.
+   */
+  void addByte(int byte) => add([byte]);
+
+  /**
+   * Returns the contents of `this` and clears `this`.
+   *
+   * The list returned is a view of the the internal buffer, limited to the
+   * [length].
+   */
+  List<int> takeBytes() {
+    if (_buffer == null) return new Uint8List(0);
+    var buffer = new Uint8List.view(_buffer.buffer, 0, _length);
+    clear();
+    return buffer;
+  }
+
+  /**
+   * Returns a copy of the current contents of the builder.
+   *
+   * Leaves the contents of the builder intact.
+   */
+  List<int> toBytes() {
+    if (_buffer == null) return new Uint8List(0);
+    return new Uint8List.fromList(
+        new Uint8List.view(_buffer.buffer, 0, _length));
+  }
+
+  /**
+   * The number of bytes in the builder.
+   */
+  int get length => _length;
+
+  /**
+   * Returns `true` if the buffer is empty.
+   */
+  bool get isEmpty => _length == 0;
+
+  /**
+   * Returns `true` if the buffer is empty.
+   */
+  bool get isNotEmpty => _length != 0;
+
+  /**
+   * Clear the contents of the builder.
+   */
+  void clear() {
+    _length = 0;
+    _buffer = null;
+  }
+
+  int _pow2roundup(int x) {
+    --x;
+    x |= x >> 1;
+    x |= x >> 2;
+    x |= x >> 4;
+    x |= x >> 8;
+    x |= x >> 16;
+    return x + 1;
+  }
+}
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index e9403c2..0789990 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -479,12 +479,11 @@
   Future<List<int>> readAsBytes() {
     _ensureFileService();
     Completer<List<int>> completer = new Completer<List<int>>();
-    var chunks = new _BufferList();
+    var builder = new BytesBuilder();
     openRead().listen(
-      (d) => chunks.add(d),
+      (d) => builder.add(d),
       onDone: () {
-        var result = chunks.readBytes();
-        completer.complete(result);
+        completer.complete(builder.takeBytes());
       },
       onError: (e) {
         completer.completeError(e);
@@ -495,13 +494,13 @@
 
   List<int> readAsBytesSync() {
     var opened = openSync();
-    var chunks = new _BufferList();
+    var builder = new BytesBuilder();
     var data;
     while ((data = opened.readSync(_BLOCK_SIZE)).length > 0) {
-      chunks.add(data);
+      builder.add(data);
     }
     opened.closeSync();
-    return chunks.readBytes();
+    return builder.takeBytes();
   }
 
   Future<String> readAsString({Encoding encoding: Encoding.UTF_8}) {
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
index 342755b..eec66c6 100644
--- a/sdk/lib/io/http_headers.dart
+++ b/sdk/lib/io/http_headers.dart
@@ -344,7 +344,7 @@
     _mutable = false;
   }
 
-  _write(_BufferList buffer) {
+  _write(BytesBuilder builder) {
     final COLONSP = const [_CharCode.COLON, _CharCode.SP];
     final COMMASP = const [_CharCode.COMMA, _CharCode.SP];
     final CRLF = const [_CharCode.CR, _CharCode.LF];
@@ -353,21 +353,21 @@
     _headers.forEach((String name, List<String> values) {
       bool fold = _foldHeader(name);
       var nameData = name.codeUnits;
-      buffer.add(nameData);
-      buffer.add(const [_CharCode.COLON, _CharCode.SP]);
+      builder.add(nameData);
+      builder.add(const [_CharCode.COLON, _CharCode.SP]);
       for (int i = 0; i < values.length; i++) {
         if (i > 0) {
           if (fold) {
-            buffer.add(const [_CharCode.COMMA, _CharCode.SP]);
+            builder.add(const [_CharCode.COMMA, _CharCode.SP]);
           } else {
-            buffer.add(const [_CharCode.CR, _CharCode.LF]);
-            buffer.add(nameData);
-            buffer.add(const [_CharCode.COLON, _CharCode.SP]);
+            builder.add(const [_CharCode.CR, _CharCode.LF]);
+            builder.add(nameData);
+            builder.add(const [_CharCode.COLON, _CharCode.SP]);
           }
         }
-        buffer.add(values[i].codeUnits);
+        builder.add(values[i].codeUnits);
       }
-      buffer.add(const [_CharCode.CR, _CharCode.LF]);
+      builder.add(const [_CharCode.CR, _CharCode.LF]);
     });
   }
 
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 0be4891..4931831 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -650,7 +650,7 @@
   static const int MIN_CHUNK_SIZE = 4 * 1024;
   static const int MAX_BUFFER_SIZE = 16 * 1024;
 
-  final _BufferList _buffer = new _BufferList();
+  final BytesBuilder _builder = new BytesBuilder();
 
   void handleData(List<int> data, EventSink<List<int>> sink) {
     // TODO(ajohnsen): Use timeout?
@@ -659,8 +659,8 @@
       flush(sink);
       sink.add(data);
     } else {
-      _buffer.add(data);
-      if (_buffer.length >= MAX_BUFFER_SIZE) {
+      _builder.add(data);
+      if (_builder.length >= MAX_BUFFER_SIZE) {
         flush(sink);
       }
     }
@@ -672,9 +672,9 @@
   }
 
   void flush(EventSink<List<int>> sink) {
-    if (_buffer.length > 0) {
-      sink.add(_buffer.readBytes());
-      _buffer.clear();
+    if (_builder.length > 0) {
+      // takeBytes will clear the BytesBuilder.
+      sink.add(_builder.takeBytes());
     }
   }
 }
@@ -722,20 +722,20 @@
   HttpConnectionInfo get connectionInfo => _httpRequest.connectionInfo;
 
   void _writeHeader() {
-    var buffer = new _BufferList();
-    writeSP() => buffer.add(const [_CharCode.SP]);
-    writeCRLF() => buffer.add(const [_CharCode.CR, _CharCode.LF]);
+    var builder = new BytesBuilder();
+    writeSP() => builder.add(const [_CharCode.SP]);
+    writeCRLF() => builder.add(const [_CharCode.CR, _CharCode.LF]);
 
     // Write status line.
     if (headers.protocolVersion == "1.1") {
-      buffer.add(_Const.HTTP11);
+      builder.add(_Const.HTTP11);
     } else {
-      buffer.add(_Const.HTTP10);
+      builder.add(_Const.HTTP10);
     }
     writeSP();
-    buffer.add(statusCode.toString().codeUnits);
+    builder.add(statusCode.toString().codeUnits);
     writeSP();
-    buffer.add(reasonPhrase.codeUnits);
+    builder.add(reasonPhrase.codeUnits);
     writeCRLF();
 
     var session = _httpRequest._session;
@@ -769,9 +769,9 @@
     headers._finalize();
 
     // Write headers.
-    headers._write(buffer);
+    headers._write(builder);
     writeCRLF();
-    _headersSink.add(buffer.readBytes());
+    _headersSink.add(builder.takeBytes());
   }
 
   String _findReasonPhrase(int statusCode) {
@@ -967,20 +967,20 @@
   }
 
   void _writeHeader() {
-    var buffer = new _BufferList();
+    var builder = new BytesBuilder();
 
-    writeSP() => buffer.add(const [_CharCode.SP]);
+    writeSP() => builder.add(const [_CharCode.SP]);
 
-    writeCRLF() => buffer.add(const [_CharCode.CR, _CharCode.LF]);
+    writeCRLF() => builder.add(const [_CharCode.CR, _CharCode.LF]);
 
     // Write the request method.
-    buffer.add(method.codeUnits);
+    builder.add(method.codeUnits);
     writeSP();
     // Write the request URI.
-    buffer.add(_requestUri().codeUnits);
+    builder.add(_requestUri().codeUnits);
     writeSP();
     // Write HTTP/1.1.
-    buffer.add(_Const.HTTP11);
+    builder.add(_Const.HTTP11);
     writeCRLF();
 
     // Add the cookies to the headers.
@@ -998,9 +998,9 @@
     headers._finalize();
 
     // Write headers.
-    headers._write(buffer);
+    headers._write(builder);
     writeCRLF();
-    _headersSink.add(buffer.readBytes());
+    _headersSink.add(builder.takeBytes());
   }
 }
 
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index e5914a9..0b41e3b 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -23,7 +23,7 @@
 import 'dart:utf';
 import 'dart:typed_data';
 
-part 'buffer_list.dart';
+part 'bytes_builder.dart';
 part 'common.dart';
 part 'crypto.dart';
 part 'data_transformer.dart';
@@ -34,18 +34,13 @@
 part 'file_impl.dart';
 part 'file_system_entity.dart';
 part 'http.dart';
-part 'http_body.dart';
-part 'http_body_impl.dart';
 part 'http_date.dart';
 part 'http_headers.dart';
 part 'http_impl.dart';
-part 'http_multipart_form_data.dart';
-part 'http_multipart_form_data_impl.dart';
 part 'http_parser.dart';
 part 'http_session.dart';
 part 'io_sink.dart';
 part 'link.dart';
-part 'mime_multipart_parser.dart';
 part 'options.dart';
 part 'path.dart';
 part 'path_impl.dart';
diff --git a/sdk/lib/io/iolib_sources.gypi b/sdk/lib/io/iolib_sources.gypi
index cec612f..9f15096 100644
--- a/sdk/lib/io/iolib_sources.gypi
+++ b/sdk/lib/io/iolib_sources.gypi
@@ -4,7 +4,7 @@
 
 {
   'sources': [
-    'buffer_list.dart',
+    'bytes_builder.dart',
     'common.dart',
     'crypto.dart',
     'data_transformer.dart',
@@ -15,18 +15,13 @@
     'file_impl.dart',
     'file_system_entity.dart',
     'http.dart',
-    'http_body.dart',
-    'http_body_impl.dart',
     'http_date.dart',
     'http_headers.dart',
     'http_impl.dart',
-    'http_multipart_form_data.dart',
-    'http_multipart_form_data_impl.dart',
     'http_parser.dart',
     'http_session.dart',
     'io_sink.dart',
     'link.dart',
-    'mime_multipart_parser.dart',
     'options.dart',
     'path.dart',
     'path_impl.dart',
diff --git a/sdk/lib/io/path.dart b/sdk/lib/io/path.dart
index 5f20e8a..702e42e 100644
--- a/sdk/lib/io/path.dart
+++ b/sdk/lib/io/path.dart
@@ -12,7 +12,7 @@
  *
  * Joining of paths and path normalization handle '.' and '..' in the usual way.
  *
- * *Path is deprecated. Use package pathos. Path will be removed the 11th of
+ * *Path is deprecated. Use package path. Path will be removed the 11th of
  * August 2013.*
  */
 @deprecated
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index d903061..33aec3f 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -111,9 +111,9 @@
               _currentMessageType = _WebSocketMessageType.BINARY;
               _controller = new StreamController(sync: true);
               _controller.stream
-                  .fold(new _BufferList(), (buffer, data) => buffer..add(data))
+                  .fold(new BytesBuilder(), (buffer, data) => buffer..add(data))
                   .then((buffer) {
-                    sink.add(buffer.readBytes());
+                    sink.add(buffer.takeBytes());
                   }, onError: (error) {
                     sink.addError(error);
                   });
diff --git a/sdk/lib/json/json.dart b/sdk/lib/json/json.dart
index 31d14ee..79e5aba 100644
--- a/sdk/lib/json/json.dart
+++ b/sdk/lib/json/json.dart
@@ -16,7 +16,7 @@
  * [cause] field. If the call returns an object that isn't directly
  * serializable, the [cause] will be null.
  */
-class JsonUnsupportedObjectError extends Error {
+class JsonUnsupportedObjectError extends Error with StackTraceOnThrow {
   /** The object that could not be serialized. */
   final unsupportedObject;
   /** The exception thrown by object's [:toJson:] method, if any. */
@@ -54,7 +54,7 @@
  * [List]s of parsed JSON values or [Map]s from [String] to parsed
  * JSON values.
  *
- * The optional [revivier] function, if provided, is called once for each
+ * The optional [reviver] function, if provided, is called once for each
  * object or list property parsed. The arguments are the property name
  * ([String]) or list index ([int]), and the value is the parsed value.
  * The return value of the revivier will be used as the value of that property
@@ -110,12 +110,12 @@
  * Serializes [object] into [output] stream.
  *
  * Performs the same operations as [stringify] but outputs the resulting
- * string to an existing [StringBuffer] instead of creating a new [String].
+ * string to an existing [StringSink] instead of creating a new [String].
  *
  * If serialization fails by throwing, some data might have been added to
  * [output], but it won't contain valid JSON text.
  */
-void printOn(Object object, StringBuffer output) {
+void printOn(Object object, StringSink output) {
   return _JsonStringifier.printOn(object, output);
 }
 
@@ -663,10 +663,10 @@
 
 
 class _JsonStringifier {
-  StringBuffer sb;
+  StringSink sink;
   List<Object> seen;  // TODO: that should be identity set.
 
-  _JsonStringifier(this.sb) : seen = [];
+  _JsonStringifier(this.sink) : seen = [];
 
   static String stringify(final object) {
     StringBuffer output = new StringBuffer();
@@ -675,7 +675,7 @@
     return output.toString();
   }
 
-  static void printOn(final object, StringBuffer output) {
+  static void printOn(final object, StringSink output) {
     _JsonStringifier stringifier = new _JsonStringifier(output);
     stringifier.stringifyValue(object);
   }
@@ -687,7 +687,7 @@
   // ('0' + x) or ('a' + x - 10)
   static int hexDigit(int x) => x < 10 ? 48 + x : 87 + x;
 
-  static void escape(StringBuffer sb, String s) {
+  static void escape(StringSink sb, String s) {
     final int length = s.length;
     bool needsEscape = false;
     final charCodes = new List<int>();
@@ -769,54 +769,54 @@
   bool stringifyJsonValue(final object) {
     if (object is num) {
       // TODO: use writeOn.
-      sb.write(numberToString(object));
+      sink.write(numberToString(object));
       return true;
     } else if (identical(object, true)) {
-      sb.write('true');
+      sink.write('true');
       return true;
     } else if (identical(object, false)) {
-      sb.write('false');
+      sink.write('false');
        return true;
     } else if (object == null) {
-      sb.write('null');
+      sink.write('null');
       return true;
     } else if (object is String) {
-      sb.write('"');
-      escape(sb, object);
-      sb.write('"');
+      sink.write('"');
+      escape(sink, object);
+      sink.write('"');
       return true;
     } else if (object is List) {
       checkCycle(object);
       List a = object;
-      sb.write('[');
+      sink.write('[');
       if (a.length > 0) {
         stringifyValue(a[0]);
         // TODO: switch to Iterables.
         for (int i = 1; i < a.length; i++) {
-          sb.write(',');
+          sink.write(',');
           stringifyValue(a[i]);
         }
       }
-      sb.write(']');
+      sink.write(']');
       seen.removeLast();
       return true;
     } else if (object is Map) {
       checkCycle(object);
       Map<String, Object> m = object;
-      sb.write('{');
+      sink.write('{');
       bool first = true;
       m.forEach((String key, Object value) {
         if (!first) {
-          sb.write(',"');
+          sink.write(',"');
         } else {
-          sb.write('"');
+          sink.write('"');
         }
-        escape(sb, key);
-        sb.write('":');
+        escape(sink, key);
+        sink.write('":');
         stringifyValue(value);
         first = false;
       });
-      sb.write('}');
+      sink.write('}');
       seen.removeLast();
       return true;
     } else {
diff --git a/tests/compiler/dart2js/list_tracer_node_type_test.dart b/tests/compiler/dart2js/list_tracer_node_type_test.dart
index ad06034..93e636e 100644
--- a/tests/compiler/dart2js/list_tracer_node_type_test.dart
+++ b/tests/compiler/dart2js/list_tracer_node_type_test.dart
@@ -33,7 +33,25 @@
 main() {
   var a = new List.filled(42, null);
   a[0] = 42;
-  return a[0] + 42;
+  return 42 + a[0];
+}
+""";
+
+// Test that the backend knows the element type of a const list.
+const String TEST5 = r"""
+var b = 4;
+main() {
+  var a = const [1, 2, 3];
+  return 42 + a[b];
+}
+""";
+
+// Test that the backend knows the element type of a const static.
+const String TEST6 = r"""
+const a = const [1, 2, 3];
+var b = 4;
+main() {
+  return 42 + a[b];
 }
 """;
 
@@ -57,4 +75,10 @@
   generated = compileAll(TEST4);
   Expect.isFalse(generated.contains('if (typeof t1'));
   Expect.isTrue(generated.contains('if (t1 == null)'));
+
+  generated = compileAll(TEST5);
+  Expect.isFalse(generated.contains('iae'));
+
+  generated = compileAll(TEST6);
+  Expect.isFalse(generated.contains('iae'));
 }
diff --git a/tests/compiler/dart2js_extra/constant_javascript_semantics4_test.dart b/tests/compiler/dart2js_extra/constant_javascript_semantics4_test.dart
new file mode 100644
index 0000000..9d19957
--- /dev/null
+++ b/tests/compiler/dart2js_extra/constant_javascript_semantics4_test.dart
@@ -0,0 +1,16 @@
+// 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.
+
+// Make sure we use JavaScript semantics when compiling compile-time constants.
+
+// In checked mode, this return will not fail. If the compiler thinks
+// it will, then dead code will remove the throw in the main method.
+int getInt() {
+  return -0.0;
+}
+
+main() {
+  getInt();
+  throw 'Should fail';
+}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 44252e2..dc665bb 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -9,6 +9,7 @@
 no_such_method_test: Fail # Wrong Invocation.memberName.
 
 deferred_semantics_test/none: Fail # TODO(ahe): Multitest cannot use import.
+constant_javascript_semantics4_test: Fail, OK
 
 [ $runtime == ff || $jscl ]
 deferred/deferred_constant_test: Pass, Crash, Fail # Issue 9158
diff --git a/tests/corelib/apply3_test.dart b/tests/corelib/apply3_test.dart
new file mode 100644
index 0000000..ed0e6de
--- /dev/null
+++ b/tests/corelib/apply3_test.dart
@@ -0,0 +1,69 @@
+// 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.
+
+// Test [Function.apply] on user-defined classes that implement [noSuchMethod].
+
+import "package:expect/expect.dart";
+import 'dart:mirrors';
+
+class F {
+  call([p1]) => "call";
+  noSuchMethod(Invocation invocation) => "NSM";
+}
+
+class G {
+  call() => '42';
+  noSuchMethod(Invocation invocation) => invocation;
+}
+
+class H {
+  call(required, {a}) => required + a;
+}
+
+main() {
+  Expect.equals('call', Function.apply(new F(), []));
+  Expect.equals('call', Function.apply(new F(), [1]));
+  Expect.equals('NSM', Function.apply(new F(), [1, 2]));
+  Expect.equals('NSM', Function.apply(new F(), [1, 2, 3]));
+
+  var symbol = const Symbol('a');
+  var requiredParameters = [1];
+  var optionalParameters = new Map()..[symbol] = 42;
+  Invocation i = Function.apply(
+      new G(), requiredParameters, optionalParameters);
+
+  Expect.equals(const Symbol('call'), i.memberName);
+  Expect.listEquals(requiredParameters, i.positionalArguments);
+  Expect.mapEquals(optionalParameters, i.namedArguments);
+  Expect.isTrue(i.isMethod);
+  Expect.isFalse(i.isGetter);
+  Expect.isFalse(i.isSetter);
+  Expect.isFalse(i.isAccessor);
+
+  // Check that changing the passed list and map for parameters does
+  // not affect [i].
+  requiredParameters[0] = 42;
+  optionalParameters[symbol] = 12;
+  Expect.listEquals([1], i.positionalArguments);
+  Expect.mapEquals(new Map()..[symbol] = 42, i.namedArguments);
+
+  // Check that using [i] for invocation yields the same [Invocation]
+  // object.
+  var mirror = reflect(new G());
+  Invocation other = mirror.delegate(i);
+  Expect.equals(i.memberName, other.memberName);
+  Expect.listEquals(i.positionalArguments, other.positionalArguments);
+  Expect.mapEquals(i.namedArguments, other.namedArguments);
+  Expect.equals(i.isMethod, other.isMethod);
+  Expect.equals(i.isGetter, other.isGetter);
+  Expect.equals(i.isSetter, other.isSetter);
+  Expect.equals(i.isAccessor, other.isAccessor);
+
+  // Test that [i] can be used to hit an existing method.
+  Expect.equals(43, new H().call(1, a: 42));
+  Expect.equals(43, Function.apply(new H(), [1], new Map()..[symbol] = 42));
+  mirror = reflect(new H());
+  Expect.equals(43, mirror.delegate(i));
+  Expect.equals(43, mirror.delegate(other));
+}
diff --git a/tests/html/element_classes_test.dart b/tests/html/element_classes_test.dart
index 3c628b9..f4ed7a4 100644
--- a/tests/html/element_classes_test.dart
+++ b/tests/html/element_classes_test.dart
@@ -131,6 +131,15 @@
     expect(classes, orderedEquals(['foo', 'baz']));
     classes.toggle('qux');
     expect(classes, orderedEquals(['foo', 'baz', 'qux']));
+
+    classes.toggle('qux', true);
+    expect(classes, orderedEquals(['foo', 'baz', 'qux']));
+    classes.toggle('qux', false);
+    expect(classes, orderedEquals(['foo', 'baz']));
+    classes.toggle('qux', false);
+    expect(classes, orderedEquals(['foo', 'baz']));
+    classes.toggle('qux', true);
+    expect(classes, orderedEquals(['foo', 'baz', 'qux']));
   });
 
   test('addAll', () {
@@ -151,6 +160,10 @@
     expect(classes, orderedEquals(['baz']));
     classes.toggleAll(['qux', 'quux']);
     expect(classes, orderedEquals(['baz', 'qux', 'quux']));
+    classes.toggleAll(['bar', 'foo'], true);
+    expect(classes, orderedEquals(['baz', 'qux', 'quux', 'bar', 'foo']));
+    classes.toggleAll(['baz', 'quux'], false);
+    expect(classes, orderedEquals(['qux','bar', 'foo']));
   });
 
   test('containsAll', () {
diff --git a/tests/html/html.status b/tests/html/html.status
index 6977ddf..71d10c1 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -2,7 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-window_open_test: Skip # http://dartbug.com/5151
 async_window_test: Skip #TODO(gram): investigating
 
 event_test: Skip  # Issue 1996
@@ -78,7 +77,6 @@
 storage_test: Fail, Pass
 transferables_test: Fail # Issue 9846
 websocket_test/websocket: Fail # TODO(efortuna): Issue 7875.
-window_open_test: Skip
 canvasrenderingcontext2d_test/drawImage_video_element: Fail # IE does not support drawImage w/ video element
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Fail # IE does not support drawImage w/ video element
 worker_test/functional: Fail # IE uses incorrect security context for Blob URIs.
@@ -140,7 +138,6 @@
 postmessage_structured_test: Skip   # BUG(5685): times out.
 serialized_script_value_test: Fail
 url_test: Fail              # IE9 does not support createObjectURL (it is supported in IE10)
-window_open_test: Skip      # BUG(4016)
 canvasrenderingcontext2d_test/drawImage_video_element: Fail # IE does not support drawImage w/ video element
 canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Fail # IE does not support drawImage w/ video element
 canvasrenderingcontext2d_test/drawImage_image_element: Pass, Fail # Issue: 11416
diff --git a/tests/html/speechrecognition_test.dart b/tests/html/speechrecognition_test.dart
index b44e6f5..cf3a4fa 100644
--- a/tests/html/speechrecognition_test.dart
+++ b/tests/html/speechrecognition_test.dart
@@ -24,14 +24,15 @@
         new SpeechRecognition();
       }, expectation);
     });
-
+/*
+    https://code.google.com/p/dart/issues/detail?id=11825
     test('SpeechRecognitionEvent', () {
       expect(() {
         var e = new Event.eventType('SpeechRecognitionEvent', 'speech');
         expect(e is SpeechRecognitionEvent, true);
       }, expectation);
     });
-
+*/
     test('SpeechRecognitionError', () {
       expect(() {
         var e = new Event.eventType('SpeechRecognitionError', 'speech');
diff --git a/tests/html/window_open_test.dart b/tests/html/window_open_test.dart
deleted file mode 100644
index 0f65ec9..0000000
--- a/tests/html/window_open_test.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-library WindowOpenTest;
-import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
-import 'dart:html';
-import 'dart:async';
-
-main() {
-  useHtmlConfiguration();
-  evaluateJavaScript(code) {
-    final scriptTag = new Element.tag('script');
-    scriptTag.innerHtml = code;
-    document.body.append(scriptTag);
-  }
-  evaluateJavaScript('(testRunner || layoutTestController).setCanOpenWindows()');
-
-  test('TwoArgumentVersion', () {
-    Window win = window.open('../resources/pong.html', 'testWindow');
-    closeWindow(win);
-  });
-  test('ThreeArgumentVersion', () {
-    Window win = window.open("resources/pong.html", "testWindow", "scrollbars=yes,width=75,height=100");
-    closeWindow(win);
-  });
-}
-
-closeWindow(win) {
-  win.close();
-  doneHandler() {
-    if (!win.closed) {
-      new Timer(const Duration(milliseconds: 1), expectAsync0(doneHandler));
-    }
-  }
-  new Timer(const Duration(milliseconds: 1), expectAsync0(doneHandler));
-}
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index f386b98..3f441b4 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -2,10 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-[ $runtime == drt && $compiler == none && $mode == debug ]
-spawn_uri_vm_test: Fail # Issue 11656
-spawn_uri_nested_vm_test: Fail # Issue 11656
-
 [ $runtime == vm ]
 isolate2_negative_test: Skip  # Need to resolve correct behaviour.
 isolate3_negative_test: Skip  # test depends on isolate error exiting process.
diff --git a/tests/language/allocation_sinking_vm_test.dart b/tests/language/allocation_sinking_vm_test.dart
index 89ad287..24d5895 100644
--- a/tests/language/allocation_sinking_vm_test.dart
+++ b/tests/language/allocation_sinking_vm_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test allocation sinking optimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import 'package:expect/expect.dart';
 
@@ -113,7 +114,7 @@
 }
 
 testFinalField() {
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 100; i++) {
    testInitialValueForFinalField(1);
   }
 }
@@ -134,7 +135,7 @@
 
 testVMField() {
   Expect.equals(84, test_vm_field());
-  for (var i=0; i<15000; i++) test_vm_field();
+  for (var i = 0; i < 100; i++) test_vm_field();
   Expect.equals(84, test_vm_field());
 }
 
@@ -147,7 +148,7 @@
   final z0 = testIdentity(c.p);
 
   // Force optimization.
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 100; i++) {
     test1(c, i.toDouble(), i.toDouble());
     testForwardingThroughEffects(c, i.toDouble(), i.toDouble());
     testIdentity(c.p);
diff --git a/tests/language/arithmetic_canonicalization_test.dart b/tests/language/arithmetic_canonicalization_test.dart
index cc0f795..04a9a12 100644
--- a/tests/language/arithmetic_canonicalization_test.dart
+++ b/tests/language/arithmetic_canonicalization_test.dart
@@ -2,11 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test canonicalization of simple arithmetic equivalences.
+// VMOptions=--optimization-counter-threshold=20 --no-use-osr
 
 import "package:expect/expect.dart";
 
 main() {
-  for (var i = 0; i < 5000; i++) {
+  for (var i = 0; i < 50; i++) {
     Expect.isTrue(mul1double(i) is double);
     Expect.equals(i.toDouble(), mul1double(i));
     Expect.equals(0.0, mul0double(i));
diff --git a/tests/language/arithmetic_test.dart b/tests/language/arithmetic_test.dart
index bde573d..effcee9 100644
--- a/tests/language/arithmetic_test.dart
+++ b/tests/language/arithmetic_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program to test arithmetic operations.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 library arithmetic_test;
 import "package:expect/expect.dart";
@@ -441,14 +442,14 @@
 
   static testDoubleEquality() {
     Expect.isFalse(self_equality(double.NAN));
-    for (int i = 0; i < 2000; i++) {
+    for (int i = 0; i < 20; i++) {
       self_equality(3.0);
     }
     Expect.isFalse(self_equality(double.NAN));
   }
 
   static testMain() {
-    for (int i = 0; i < 1500; i++) {
+    for (int i = 0; i < 20; i++) {
       runOne();
       testSmiDivDeopt();
       testSqrtDeopt();
diff --git a/tests/language/assign_op_test.dart b/tests/language/assign_op_test.dart
index 00378c7..9a9ebe7 100644
--- a/tests/language/assign_op_test.dart
+++ b/tests/language/assign_op_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing assign operators.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -89,7 +90,7 @@
   var instf;
 }
 main() {
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     AssignOpTest.testMain();
   }
 }
diff --git a/tests/language/bit_operations_test.dart b/tests/language/bit_operations_test.dart
index f4d58dd..dc548d1 100644
--- a/tests/language/bit_operations_test.dart
+++ b/tests/language/bit_operations_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test for testing bitwise operations.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -56,7 +57,7 @@
     TestPositiveValueShifts();
     TestNoMaskingOfShiftCount();
     TestNegativeCountShifts();
-    for (int i = 0; i < 10000; i++) {
+    for (int i = 0; i < 20; i++) {
       TestCornerCasesRightShifts();
       TestRightShift64Bit();
       TestLeftShift64Bit();
@@ -128,7 +129,7 @@
 
     Expect.isTrue(throwOnLeft(12, -3));
     Expect.isTrue(throwOnRight(12, -3));
-    for (int i = 0; i < 4000; i++) {
+    for (int i = 0; i < 20; i++) {
       Expect.isFalse(throwOnLeft(12, 3));
       Expect.isFalse(throwOnRight(12, 3));
     }
diff --git a/tests/language/branch_canonicalization_test.dart b/tests/language/branch_canonicalization_test.dart
index a317d42..bb49d6e 100644
--- a/tests/language/branch_canonicalization_test.dart
+++ b/tests/language/branch_canonicalization_test.dart
@@ -4,6 +4,7 @@
 
 // Test that branch fusion correctly sets branch environment for comparisons
 // that require unboxing and does not fuse branches that can deoptimize.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -48,7 +49,7 @@
   final a = 1.0;
   final b = 1 << 62;
   final x = new A(), y = new B(), z = new C();
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals(1, fooDouble(a, a));
     Expect.isTrue(sideEffect);
     Expect.equals(0, fooMint(b, 0));
diff --git a/tests/language/closures_initializer2_test.dart b/tests/language/closures_initializer2_test.dart
new file mode 100644
index 0000000..41e034a
--- /dev/null
+++ b/tests/language/closures_initializer2_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+class A<T> {
+  var t;
+  A() : t = (() => T);
+}
+
+expect(result, expected) {
+  if (result != expected) {
+    throw 'Expected $expected, got $result';
+  }
+}
+
+main() {
+  for (var i = 0; i < int.parse("1"); i++) {
+    expect(new A<int>().t() is Type, true);
+  }
+}
+
diff --git a/tests/language/compound_assignment_operator_test.dart b/tests/language/compound_assignment_operator_test.dart
index c8a54ab..e04da40 100644
--- a/tests/language/compound_assignment_operator_test.dart
+++ b/tests/language/compound_assignment_operator_test.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.
 // Tests that lhs of a compound assignement is executed only once.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
-
 class Indexed {
   Indexed() : _f = new List(10), count = 0 {
     _f[0] = 100;
@@ -77,7 +77,7 @@
   }
 
   static void testMain() {
-    for (int i = 0; i < 1000; i++) {
+    for (int i = 0; i < 20; i++) {
       testIndexed();
       testIndexedMore();
       testIndexedMoreMore();
diff --git a/tests/language/const_test.dart b/tests/language/const_test.dart
index e34eb0d..65dc19d 100644
--- a/tests/language/const_test.dart
+++ b/tests/language/const_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Check const classes.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -17,7 +18,7 @@
   get foo { return 5; }
 
   operator [](ix) { return ix; }
-  operator []=(ix, value) {}  
+  operator []=(ix, value) {}
 }
 
 
@@ -34,7 +35,7 @@
 
 
 main() {
-  for (int i = 0; i < 1000; i++) {
+  for (int i = 0; i < 20; i++) {
     testMain();
   }
 }
diff --git a/tests/language/constant_propagation_phis_test.dart b/tests/language/constant_propagation_phis_test.dart
index 80359f5..e7e2d80 100644
--- a/tests/language/constant_propagation_phis_test.dart
+++ b/tests/language/constant_propagation_phis_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -11,7 +12,7 @@
 final values = const ["a"];
 
 main() {
-  for (var i = 0; i < 10000; i++) test(keys[0]);
+  for (var i = 0; i < 20; i++) test(keys[0]);
 }
 
 test(key) {
@@ -30,4 +31,4 @@
     if (equals) return i;
   }
   return -1;
-}
\ No newline at end of file
+}
diff --git a/tests/language/deopt_hoisted_smi_check_vm_test.dart b/tests/language/deopt_hoisted_smi_check_vm_test.dart
index 0eef995..6f6381d 100644
--- a/tests/language/deopt_hoisted_smi_check_vm_test.dart
+++ b/tests/language/deopt_hoisted_smi_check_vm_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test deoptimization on an optimistically hoisted smi check.
+// VMOptions=--optimization-counter-threshold=10
 
 import 'package:expect/expect.dart';
 
@@ -25,10 +26,10 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals(9, sum(1, 2));
     Expect.equals(0xAB, mask(0xAB));
   }
   Expect.equals(9, sum(1.0, 2.0));  // Passing double causes deoptimization.
   Expect.equals(0xAB, mask(0x1000000AB));
-}
\ No newline at end of file
+}
diff --git a/tests/language/deopt_inlined_function_lazy_test.dart b/tests/language/deopt_inlined_function_lazy_test.dart
index 59e8930..8de6b8e 100644
--- a/tests/language/deopt_inlined_function_lazy_test.dart
+++ b/tests/language/deopt_inlined_function_lazy_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test lazy deoptimization from within an inlined function.
-// VMOptions=--deoptimize_alot
+// VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -25,7 +25,7 @@
 
 main() {
   Expect.equals(42, foo(1));
-  for (var i = 0; i < 2000; i++) foo(7);
+  for (var i = 0; i < 20; i++) foo(7);
   Expect.equals(42, foo(2));
   // Call the runtime to trigger lazy deopt with foo/bar on the stack.
   Expect.equals(42, foo(-1));
diff --git a/tests/language/deopt_no_feedback_test.dart b/tests/language/deopt_no_feedback_test.dart
index a10e406..4ee16d0 100644
--- a/tests/language/deopt_no_feedback_test.dart
+++ b/tests/language/deopt_no_feedback_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test deoptimization caused by running code that did not collect type
 // feedback before.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -17,7 +18,7 @@
   }
 
   var a = new List(10);
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     var r = test(a, 3, 888, false);
     Expect.equals(3, r);
     Expect.equals(3, a[3]);
@@ -38,7 +39,7 @@
     }
   }
 
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     var r = test(10, false);
     Expect.equals(-1, r);
   }
@@ -49,7 +50,7 @@
 
 
 main() {
-  for (var i = 0; i < 2000; i++) {}
+  for (var i = 0; i < 20; i++) {}
   testStoreIndexed();
   testIncrLocal();
 }
diff --git a/tests/language/deopt_smi_op_test.dart b/tests/language/deopt_smi_op_test.dart
index 90e918b..b990b49 100644
--- a/tests/language/deopt_smi_op_test.dart
+++ b/tests/language/deopt_smi_op_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -23,12 +24,12 @@
 }
 
 main() {
-  for (var i=0; i<10000; i++) test_mul(10);
+  for (var i=0; i<20; i++) test_mul(10);
   Expect.equals(1000000, test_mul(10));
   Expect.equals(100000000000, test_mul(1000000));
   Expect.equals(100000 * 0x3fffffffffffffff, test_mul(0x3fffffffffffffff));
 
-  for (var i=0; i<10000; i++) test_neg(10);
+  for (var i=0; i<20; i++) test_neg(10);
   Expect.equals(-10, test_neg(10));
   Expect.equals(0x40000000, test_neg(-0x40000000));
   Expect.equals(0x4000000000000000, test_neg(-0x4000000000000000));
diff --git a/tests/language/deoptimized_function_on_stack_test.dart b/tests/language/deoptimized_function_on_stack_test.dart
index f03b916..3ef5cb4 100644
--- a/tests/language/deoptimized_function_on_stack_test.dart
+++ b/tests/language/deoptimized_function_on_stack_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -13,11 +14,11 @@
 }
 
 // Create a situation where method 'call' is optimized for using class A
-// when calling foo. 
+// when calling foo.
 warmup() {
   List a = [ new A(), new A(), new A(), new A()];
   var res = 0;
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     res = call(a, 0);
   }
   Expect.equals(10, res);
diff --git a/tests/language/div_with_power_of_two_test.dart b/tests/language/div_with_power_of_two_test.dart
index 6b50749..2ee10d7 100644
--- a/tests/language/div_with_power_of_two_test.dart
+++ b/tests/language/div_with_power_of_two_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test division by power of two.
 // Test that results before and after optimization are the same.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -87,7 +88,7 @@
 divByNeg549755813888(a) => a ~/ -549755813888;
 
 main() {
-  for (int i = 0; i < 8000; i++) {
+  for (int i = 0; i < 20; i++) {
     for (var e in expectedResults) {
       Function f = e[0];
       List values = e[1];
diff --git a/tests/language/double_int_addition_test.dart b/tests/language/double_int_addition_test.dart
index 9f748e2..d2f22e6 100644
--- a/tests/language/double_int_addition_test.dart
+++ b/tests/language/double_int_addition_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -9,12 +10,12 @@
 
 main() {
   // Optimize add-op
-  for (int i = 0; i < 10000; i++) {
+  for (int i = 0; i < 20; i++) {
     addOp(1.1, 2.1);
   }
-  
+
   Expect.isTrue(addOp(1.1, 2.1) is double);
   Expect.isTrue(addOp(1, 2) is int);
 }
 
-addOp(a, b) => a + b;
\ No newline at end of file
+addOp(a, b) => a + b;
diff --git a/tests/language/double_modulo_test.dart b/tests/language/double_modulo_test.dart
index d2b90ca..d17bcc5 100644
--- a/tests/language/double_modulo_test.dart
+++ b/tests/language/double_modulo_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test optimization of modulo operator on Double.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -9,7 +10,7 @@
   double k = -0.33333;
   double firstResPos = doMod(k, 1.0);
   double firstResNeg = doMod(k, -1.0);
-  for (int i = 0; i < 5000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(firstResPos, doMod(k, 1.0));
     Expect.equals(firstResNeg, doMod(k, -1.0));
   }
diff --git a/tests/language/equality_test.dart b/tests/language/equality_test.dart
index 4e47521..a0faac4 100644
--- a/tests/language/equality_test.dart
+++ b/tests/language/equality_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";
 
@@ -34,7 +35,7 @@
   Expect.isTrue(null != alwaysTrue);
   Expect.isTrue(null == null);
   Expect.isFalse(null != null);
-  
+
   Expect.throws(() => death() == 5);
   Expect.isFalse(death() == nullFn());
   Expect.isFalse(nullFn() == death());
@@ -53,5 +54,5 @@
 }
 
 main() {
-  for (int i = 0; i < 1000; i++) tests();
+  for (int i = 0; i < 20; i++) tests();
 }
diff --git a/tests/language/exception_in_increment_test.dart b/tests/language/exception_in_increment_test.dart
index 49499af..a053708 100644
--- a/tests/language/exception_in_increment_test.dart
+++ b/tests/language/exception_in_increment_test.dart
@@ -3,11 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test throws exception in the middle of the increment operation, the setter
 // part of the instance field increment never completes.
+// VMOptions=--optimization-counter-threshold=10
 
 main() {
   var a = new A();
   a.field = new A();
-  for (int i = 0; i < 4000; i++) {
+  for (int i = 0; i < 20; i++) {
     try {
       a.foo(i);
     } catch (e) {
diff --git a/tests/language/fast_method_extraction_test.dart b/tests/language/fast_method_extraction_test.dart
index e562b60..b4dd4c9 100644
--- a/tests/language/fast_method_extraction_test.dart
+++ b/tests/language/fast_method_extraction_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test that fast method extraction returns correct closure.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -74,32 +75,32 @@
 main() {
   var a = new A(2);
   var b = new B(2);
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals(42, mono(a));
   }
 
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals(42, poly(a));
     Expect.equals(-42, poly(b));
   }
 
   var c = new C<X>();
   var x = new X();
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     types(c, x);
   }
 
   var chaA = new ChaA("magicA");
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals("A", cha(chaA));
   }
 
   var chaB = new ChaB("magicB");
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals("B", cha(chaB));
   }
 
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     extractFromNull();
   }
 }
diff --git a/tests/language/identical_test.dart b/tests/language/identical_test.dart
index 8a3887e..23be3ad 100644
--- a/tests/language/identical_test.dart
+++ b/tests/language/identical_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test efficient and correct implementation of !identical(a, b).
+// VMOptions=--optimization-counter-threshold=10
 
 import 'package:expect/expect.dart';
 
@@ -30,7 +31,7 @@
 }
 
 main() {
-  for (int i = 0; i < 10000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(1, notIdenticalTest1("ho"));
     Expect.equals(1, notIdenticalTest2("ho"));
     Expect.equals(false, notIdenticalTest3("ho"));
diff --git a/tests/language/if_conversion_vm_test.dart b/tests/language/if_conversion_vm_test.dart
index 3ed12a1..1c76181 100644
--- a/tests/language/if_conversion_vm_test.dart
+++ b/tests/language/if_conversion_vm_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Test if-convertion pass in the optimizing compiler.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -40,7 +41,7 @@
 f18(b) => b ? 2 : 0;
 
 main() {
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     f1(i);
     f2(i);
     f3(i);
@@ -110,4 +111,4 @@
 
   Expect.equals(0, f18(false));
   Expect.equals(2, f18(true));
-}
\ No newline at end of file
+}
diff --git a/tests/language/inline_add_constants_to_initial_env_test.dart b/tests/language/inline_add_constants_to_initial_env_test.dart
index 7d17507..4417834 100644
--- a/tests/language/inline_add_constants_to_initial_env_test.dart
+++ b/tests/language/inline_add_constants_to_initial_env_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that SSA values are correctly numbered after inlining that adds
 // constants to original environment.
+// VMOptions=--optimization-counter-threshold=10
 
 h(x, y) => x == y;
 
@@ -11,5 +12,5 @@
 f(y) => h(y, g(y));
 
 main() {
-  for (var i = 0; i < 1000; i++) f(i);
+  for (var i = 0; i < 20; i++) f(i);
 }
diff --git a/tests/language/inline_closure_with_constant_arguments_test.dart b/tests/language/inline_closure_with_constant_arguments_test.dart
index b5e8eba..94bf524 100644
--- a/tests/language/inline_closure_with_constant_arguments_test.dart
+++ b/tests/language/inline_closure_with_constant_arguments_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";
 
@@ -16,7 +17,7 @@
 
 
 main() {
-  for (var i=0; i<2000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.equals(3, primeForSmis(true));
   }
 }
diff --git a/tests/language/inline_effect_context_test.dart b/tests/language/inline_effect_context_test.dart
index fcb5dbd..e10e493 100644
--- a/tests/language/inline_effect_context_test.dart
+++ b/tests/language/inline_effect_context_test.dart
@@ -4,6 +4,7 @@
 // Test inlining of simple function with control flow in an effect context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -31,8 +32,8 @@
 main() {
   var o = new A();
   int sum = 0;
-  for (int i = 0; i < 5000; i++) sum += foo(o);
+  for (int i = 0; i < 20; i++) sum += foo(o);
   o = new B();
   sum += foo(o);  // <-- Cause deoptimization of bar within foo.
-  Expect.equals(5001, sum);
+  Expect.equals(21, sum);
 }
diff --git a/tests/language/inline_getter_test.dart b/tests/language/inline_getter_test.dart
index 27322c8..ba83a23 100644
--- a/tests/language/inline_getter_test.dart
+++ b/tests/language/inline_getter_test.dart
@@ -4,6 +4,7 @@
 // Test inlining of instance getters.
 // Three classes access always the same field. Optimize method foo and inline
 // getter for classes 'A' and 'B'. Call later via 'C' and cause deoptimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -28,13 +29,13 @@
     var a = new A(1);
     var b = new B();
     int sum = 0;
-    for (int i = 0; i < 5000; i++) {
+    for (int i = 0; i < 20; i++) {
       sum += a.foo();
       sum += b.foo();
     }
     var c = new C();
     sum += c.foo();  // <-- Deoptimizing.
-    Expect.equals(15010, sum);
+    Expect.equals(70, sum);
   }
 }
 
diff --git a/tests/language/inline_test_context_test.dart b/tests/language/inline_test_context_test.dart
index 5ec00d6..89a3e74 100644
--- a/tests/language/inline_test_context_test.dart
+++ b/tests/language/inline_test_context_test.dart
@@ -4,6 +4,7 @@
 // Test inlining of simple function with control flow in a test context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -34,8 +35,8 @@
 main() {
   var o = new A();
   int sum = 0;
-  for (int i = 0; i < 5000; i++) sum += foo(o);
+  for (int i = 0; i < 20; i++) sum += foo(o);
   o = new B();
   sum += foo(o);  // <-- Cause deoptimization of bar within foo.
-  Expect.equals(5000, sum);
+  Expect.equals(20, sum);
 }
diff --git a/tests/language/inline_value_context_test.dart b/tests/language/inline_value_context_test.dart
index 46cde91..5ffb694 100644
--- a/tests/language/inline_value_context_test.dart
+++ b/tests/language/inline_value_context_test.dart
@@ -4,6 +4,7 @@
 // Test inlining of simple function with control flow in a value context.
 // Optimize function foo with instance of A and inlined function bar. Call later
 // with instance of B and cause deoptimization.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -34,8 +35,8 @@
 main() {
   var o = new A();
   int sum = 0;
-  for (int i = 0; i < 5000; i++) sum += foo(o);
+  for (int i = 0; i < 20; i++) sum += foo(o);
   o = new B();
   sum += foo(o);  // <-- Cause deoptimization of bar within foo.
-  Expect.equals(5000, sum);
+  Expect.equals(20, sum);
 }
diff --git a/tests/language/instance_incr_deopt_test.dart b/tests/language/instance_incr_deopt_test.dart
index b7152e3..04a02a1 100644
--- a/tests/language/instance_incr_deopt_test.dart
+++ b/tests/language/instance_incr_deopt_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -10,13 +11,13 @@
 main() {
   var a = new A();
   var aa = new A();
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     a.Incr();
     myIncr(aa);
     conditionalIncr(false, a);
   }
-  Expect.equals(2000, a.f);
-  Expect.equals(2000, aa.f);
+  Expect.equals(20, a.f);
+  Expect.equals(20, aa.f);
   a.f = 1.0;
   // Deoptimize ++ part of instance increment.
   a.Incr();
diff --git a/tests/language/instanceof4_test.dart b/tests/language/instanceof4_test.dart
index 489ad2d..1a3d1ca 100644
--- a/tests/language/instanceof4_test.dart
+++ b/tests/language/instanceof4_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing the instanceof operation.
 // Regression test for issue 5216.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -23,7 +24,7 @@
   Expect.isTrue(!o.isNotListT());
   Expect.isTrue(!o.isAlsoListT());
   Expect.isTrue(o.isNeitherListT());
-  for (var i = 0; i < 4000; i++) {
+  for (var i = 0; i < 20; i++) {
     // Make sure methods are optimized.
     o.isT();
     o.isNotT();
@@ -48,7 +49,7 @@
   Expect.isTrue(!o.isNotListT());
   Expect.isTrue(o.isAlsoListT());
   Expect.isTrue(!o.isNeitherListT());
-  for (var i = 0; i < 4000; i++) {
+  for (var i = 0; i < 20; i++) {
     // Make sure methods are optimized.
     o.isT();
     o.isNotT();
diff --git a/tests/language/issue11087_vm_test.dart b/tests/language/issue11087_vm_test.dart
index 3dd71e1..f2a8fba 100644
--- a/tests/language/issue11087_vm_test.dart
+++ b/tests/language/issue11087_vm_test.dart
@@ -5,6 +5,8 @@
 // Regression test for VM's IfConverted pass not keeping graph structure and
 // use lists in sync.
 
+// VMOptions=--optimization-counter-threshold=10
+
 class A {
   int x;
 }
@@ -16,6 +18,6 @@
 }
 
 main() {
-  for (var i = 0; i < 10000; i++) f();
+  for (var i = 0; i < 20; i++) f();
 }
 
diff --git a/tests/language/issue7513_test.dart b/tests/language/issue7513_test.dart
index 02efb67..b7c0b31 100644
--- a/tests/language/issue7513_test.dart
+++ b/tests/language/issue7513_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -14,7 +15,7 @@
 main() {
   var a = 0.1;
   var b = [0.1];
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     foo(a, b);
   }
   Expect.approxEquals(0.01, foo(a, b));
diff --git a/tests/language/issue7525_test.dart b/tests/language/issue7525_test.dart
index 0ba650b..eab03a2 100644
--- a/tests/language/issue7525_test.dart
+++ b/tests/language/issue7525_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -14,7 +15,7 @@
 }
 
 main() {
-  for (int i = 0; i < 5000; i++) {
+  for (int i = 0; i < 20; i++) {
     foo();
   }
   Expect.equals(2, foo());
diff --git a/tests/language/language.status b/tests/language/language.status
index b29b872..1f8c433 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -16,22 +16,13 @@
 # 3) Update the language/src directory with the updated test.
 
 [ $compiler == dart2dart ]
-mixin_super_constructor_test: Fail
-mixin_super_constructor2_test: Fail
-mixin_super_constructor_default_test: Fail
 mixin_super_constructor_named_test: Fail
 mixin_super_constructor_positionals_test: Fail
-mixin_super_constructor_multiple_test: Fail
 const_constructor_super_test/01: fail
 
 [ $compiler == none ]
-extends_test: Fail # issue 11023
-mixin_super_constructor_test: Fail
-mixin_super_constructor2_test: Fail
-mixin_super_constructor_default_test: Fail
 mixin_super_constructor_named_test: Fail
 mixin_super_constructor_positionals_test: Fail
-mixin_super_constructor_multiple_test: Fail
 built_in_identifier_prefix_test: Fail # http://dartbug.com/6970
 library_juxtaposition_test: Fail # Issue 6877
 pseudo_kw_illegal_test/14: Fail  # Issue 356
@@ -78,6 +69,7 @@
 
 type_variable_field_initializer_closure_test: Crash # issue 8847
 closures_initializer_test: Crash # issue 8847
+closures_initializer2_test: Crash # issue 8847
 
 
 [ $compiler == none && $unchecked ]
@@ -98,15 +90,17 @@
 compile_time_constant_checked3_test/05: Fail, OK
 compile_time_constant_checked3_test/06: Fail, OK
 
+type_parameter_test/05: Fail, OK # No way of specifying a compile-time type error in checked mode only.
+
 
 [ $compiler == none && $runtime == drt ]
 type_variable_field_initializer_closure_test: Fail # issue 8847
 closures_initializer_test: Fail # VM bug: issue 8847
+closures_initializer2_test: Fail # VM bug: issue 8847
 final_variable_assignment_test/01: Fail
 final_variable_assignment_test/02: Fail
 final_variable_assignment_test/03: Fail
 final_variable_assignment_test/04: Fail
-extends_test: Pass, Fail # issue 11023, may pass or fail depending on loading order
 
 
 [ $runtime == dartium ]
@@ -114,7 +108,7 @@
 
 
 [ $runtime == vm || ($runtime == drt && $compiler == none) ]
-first_class_types_literals_test: Fail # issue 6282
+first_class_types_literals_test: Fail # issue 11761
 call_test: Fail # Issue 1604
 
 [ $runtime == chrome ]
@@ -297,6 +291,7 @@
 
 type_variable_field_initializer_closure_test: Crash # VM bug: issue 8847
 closures_initializer_test: Crash # VM bug: issue 8847
+closures_initializer2_test: Crash # VM bug: issue 8847
 
 bound_closure_equality_test: Fail # Issue 10849
 
@@ -313,18 +308,13 @@
 
 
 [ $arch == simarm || $arch == arm ]
-# TODO(zra): Check to see if the ASSERT that fails in debug mode is correct
-stack_overflow_test: Crash, Pass # Passes in release mode.
-stack_overflow_stacktrace_test: Crash, Pass # Passes in release mode.
+try_catch4_test: Crash, Fail
 
 
 [ $arch == mips ]
 *: Skip
 
-
 [ $arch == simmips ]
 arithmetic_test: Crash  # Too far relative branch.
 large_implicit_getter_test: Crash  # Too far relative branch.
-# TODO(zra): Check to see if the ASSERT that fails in debug mode is correct
-stack_overflow_test: Crash, Pass # Passes in release mode.
-stack_overflow_stacktrace_test: Crash, Pass # Passes in release mode.
\ No newline at end of file
+try_catch4_test: Fail
diff --git a/tests/language/language_analyzer.status b/tests/language/language_analyzer.status
index 3ba09e1..bf69624 100644
--- a/tests/language/language_analyzer.status
+++ b/tests/language/language_analyzer.status
@@ -141,6 +141,8 @@
 type_parameter_test/02: fail
 type_parameter_test/03: fail
 type_parameter_test/04: fail
+type_parameter_test/05: fail
+type_parameter_test/06: fail
 type_variable_bounds2_test/00: fail
 type_variable_bounds2_test/01: fail
 type_variable_bounds2_test/02: fail
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index c4d4dd1..d4d1733 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -40,6 +40,9 @@
 *vm_test: Skip
 *vm_negative_test: Skip
 
+[ ($compiler == dart2js || $compiler == dart2dart) && $unchecked ]
+type_parameter_test/05: Fail, OK # No way of specifying a compile-time type error in checked mode only.
+
 [ $compiler == dart2js && $checked ]
 checked_setter2_test: Fail # dartbug.com/11273
 default_factory2_test/01: Fail
diff --git a/tests/language/large_implicit_getter_test.dart b/tests/language/large_implicit_getter_test.dart
index 2eefe28..8dac849 100644
--- a/tests/language/large_implicit_getter_test.dart
+++ b/tests/language/large_implicit_getter_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing compilation of large implicit getters.
+// VMOptions=--optimization-counter-threshold=10
 
 List<List> panels = [
 [6853.940039224797,6050.837897021371]
@@ -1369,7 +1370,7 @@
 
 
 main() {
-  for (int i = 0; i < 6000; i++) {
+  for (int i = 0; i < 20; i++) {
     var y = panels.length;
   }
 }
diff --git a/tests/language/load_to_load_forwarding_vm_test.dart b/tests/language/load_to_load_forwarding_vm_test.dart
index c62b66a..fa1d2e4 100644
--- a/tests/language/load_to_load_forwarding_vm_test.dart
+++ b/tests/language/load_to_load_forwarding_vm_test.dart
@@ -231,13 +231,13 @@
   u32List[1] = 0x3FFFFFFF;
   u32List[2] = 0x7FFFFFFF;
 
-  for (var i = 0; i < 4000; i++) {
+  for (var i = 0; i < 20; i++) {
     testPhiConvertions(true, u32List);
     testPhiConvertions(false, u32List);
   }
 
   final escape = new List(1);
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     fakeAliasing(escape);
   }
 }
diff --git a/tests/language/malformed_type_test.dart b/tests/language/malformed_type_test.dart
new file mode 100644
index 0000000..5b60ca1
--- /dev/null
+++ b/tests/language/malformed_type_test.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 11792.
+
+null_() => null;
+final Undeclared x = null_();  // null is assignable to x of malformed type.
+
+main() {
+  print(x);
+}
+
diff --git a/tests/language/many_generic_instanceof_test.dart b/tests/language/many_generic_instanceof_test.dart
index 6f1d9c2..a37e84e 100644
--- a/tests/language/many_generic_instanceof_test.dart
+++ b/tests/language/many_generic_instanceof_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 library GenericInstanceofTest.dart;
 import "package:expect/expect.dart";
@@ -8,7 +9,7 @@
 
 class ManyGenericInstanceofTest {
   static testMain() {
-    for (int i = 0; i < 5000; i++) {
+    for (int i = 0; i < 20; i++) {
       GenericInstanceof.testMain();
     }
   }
diff --git a/tests/language/many_overridden_no_such_method_test.dart b/tests/language/many_overridden_no_such_method_test.dart
index 7c90383..a9eb62e 100644
--- a/tests/language/many_overridden_no_such_method_test.dart
+++ b/tests/language/many_overridden_no_such_method_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 library OverriddenNoSuchMethodTest.dart;
 
@@ -11,7 +12,7 @@
 
 class ManyOverriddenNoSuchMethodTest {
   static testMain() {
-    for (int i = 0; i < 5000; i++) {
+    for (int i = 0; i < 20; i++) {
       OverriddenNoSuchMethod.testMain();
     }
   }
diff --git a/tests/language/megamorphic_no_such_method_test.dart b/tests/language/megamorphic_no_such_method_test.dart
index 8d7976a..92e0826 100644
--- a/tests/language/megamorphic_no_such_method_test.dart
+++ b/tests/language/megamorphic_no_such_method_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test program for correct optimizations related to types fo allocated lists.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -50,14 +51,14 @@
 class B { }
 
 test(obj) {
-  return obj.test(); 
+  return obj.test();
 }
 
 main() {
   // Trigger optimization of 'test' function.
   List list = [new A0(), new A1(), new A2(), new A3(), new A4(),
                new A5(), new A6(), new A7(), new A8(), new A9()];
-  for (int i = 0; i < 1000; i++) {
+  for (int i = 0; i < 20; i++) {
     for (var obj in list) {
       test(obj);
     }
diff --git a/tests/language/mint_arithmetic_test.dart b/tests/language/mint_arithmetic_test.dart
index 18b532a..f8bf705 100644
--- a/tests/language/mint_arithmetic_test.dart
+++ b/tests/language/mint_arithmetic_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -14,7 +15,7 @@
       return t == b;
     }
     var x = 0xffffffff;
-    for (var i = 0; i < 10000; i++) f(x, 0);
+    for (var i = 0; i < 20; i++) f(x, 0);
     Expect.equals(true, f(x, 0));
     Expect.equals(false, f(x, -1));  // Triggers deoptimization.
   } finally { }
@@ -26,7 +27,7 @@
       return a & b;
     }
     var x = 0xffffffff;
-    for (var i = 0; i < 10000; i++) f(x, x);
+    for (var i = 0; i < 20; i++) f(x, x);
     Expect.equals(x, f(x, x));
     Expect.equals(1234, f(0xffffffff, 1234));
     Expect.equals(0x100000001, f(0x100000001,-1));
@@ -44,7 +45,7 @@
       return t;
     }
     var x = 0xffffffff;
-    for (var i = 0; i < 10000; i++) f(x, x);
+    for (var i = 0; i < 20; i++) f(x, x);
     Expect.equals(0, f(x, x));
     Expect.equals(-x - 1, f(x, -1));
     var y  = 0xffffffffffffffff;
@@ -60,7 +61,7 @@
       return t;
     }
     var x = 0xffffffff;
-    for (var i = 0; i < 10000; i++) f(x, x);
+    for (var i = 0; i < 20; i++) f(x, x);
     Expect.equals(x, f(x, x));
     Expect.equals(-1, f(x, -1));
     var y  = 0xffffffffffffffff;
@@ -71,7 +72,7 @@
 test_func(x, y) => (x & y) + 1.0;
 
 test_mint_double_op() {
-  for (var i=0; i<10000; i++) test_func(4294967295, 1);
+  for (var i = 0; i < 20; i++) test_func(4294967295, 1);
   Expect.equals(2.0, test_func(4294967295, 1));
 }
 
diff --git a/tests/language/mint_compares_test.dart b/tests/language/mint_compares_test.dart
index acbacab..c2afbaf 100644
--- a/tests/language/mint_compares_test.dart
+++ b/tests/language/mint_compares_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";
 
@@ -90,7 +91,7 @@
 bool gte2(a, b) => a >= b ? true : false;
 
 main() {
-  for (var i = 0; i < 1000; i++) {
+  for (var i = 0; i < 20; i++) {
     compareTest();
     compareTest2(lt1, lte1, gt1, gte1);
     compareTest2(lt2, lte2, gt2, gte2);
diff --git a/tests/language/modulo_test.dart b/tests/language/modulo_test.dart
index 8ac27c0..28444c6 100644
--- a/tests/language/modulo_test.dart
+++ b/tests/language/modulo_test.dart
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test optimization of modulo operator on Smi.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
 
 main() {
-  for (int i = -3000; i < 3000; i++) {
+  for (int i = -30; i < 30; i++) {
     Expect.equals(i % 256, foo(i));
     Expect.equals(i % -256, boo(i));
     try {
diff --git a/tests/language/named_parameters_with_conversions_test.dart b/tests/language/named_parameters_with_conversions_test.dart
index cbf3888..a20b60d 100644
--- a/tests/language/named_parameters_with_conversions_test.dart
+++ b/tests/language/named_parameters_with_conversions_test.dart
@@ -4,6 +4,7 @@
 //
 // Test named arguments work as expected regardless of whether the function or
 // method is called via function call syntax or method call syntax.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -99,7 +100,8 @@
 
     checkException(() => a.foo());                 // Too few arguments.
     checkException(() => a.foo('abc', 1, 2, 3));   // Too many arguments.
-    checkException(() => a.foo2('c', c: 1));        // Bad name.
+    checkException(() => a.foo2('c', c: 1));       // Bad name.
+    checkException(() => a.foo2('c', a:111, c: 1));  // Bad name.
 
     Expect.equals(7, a.calls);
   }
@@ -119,7 +121,8 @@
 
     checkException(() => f());                 // Too few arguments.
     checkException(() => f('abc', 1, 2, 3));   // Too many arguments.
-    checkException(() => f2('c', c: 1));        // Bad name.
+    checkException(() => f2('c', c: 1));       // Bad name.
+    checkException(() => f2('c', a: 111, c: 1));  // Bad name.
 
     Expect.equals(7, a.calls);
   }
@@ -137,5 +140,7 @@
 }
 
 main() {
-  NamedParametersWithConversionsTest.testMain();
+  for (var i = 0; i < 20; i++) {
+    NamedParametersWithConversionsTest.testMain();
+  }
 }
diff --git a/tests/language/no_such_method3_test.dart b/tests/language/no_such_method3_test.dart
index dfc7206..1a69e42 100644
--- a/tests/language/no_such_method3_test.dart
+++ b/tests/language/no_such_method3_test.dart
@@ -4,6 +4,8 @@
 
 // Test that a static type inferrer takes [noSuchMethod] into account.
 
+// VMOptions=--optimization-counter-threshold=10
+
 import "package:expect/expect.dart";
 
 class A {
@@ -20,7 +22,7 @@
 
 bar() {
   var b;
-  for (int i = 0; i < 500; ++i)
+  for (int i = 0; i < 20; ++i)
     if (i % 2 == 0)
       b = new A();
     else
diff --git a/tests/language/no_such_method_dispatcher_test.dart b/tests/language/no_such_method_dispatcher_test.dart
index b4e3744..fa4e10d 100644
--- a/tests/language/no_such_method_dispatcher_test.dart
+++ b/tests/language/no_such_method_dispatcher_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=100
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -47,31 +47,31 @@
 
 main() {
   var a = new A();
-  for (var i = 0; i < 100; ++i) Expect.equals(123, a.foo());
+  for (var i = 0; i < 20; ++i) Expect.equals(123, a.foo());
   Expect.throws(() => (a.foo)());
   Expect.equals("123", (a.foo).toString());
 
   var b = new B();
-  for (var i = 0; i < 100; ++i) {
+  for (var i = 0; i < 20; ++i) {
     Expect.equals(2, b.bar(1));
     Expect.equals(123, b.bar());
     Expect.equals(2, b.bar(1));
   }
 
-  for (var i = 0; i < 100; ++i) {
+  for (var i = 0; i < 20; ++i) {
     Expect.equals(123, b.bar(1,2,3));
     Expect.equals(123, b.bar(1,2,foo:3));
   }
 
   // Test named and positional arguments.
   var c = new C(1, 2, [100], {"n1":101, "n2":102});
-  for (var i = 0; i < 100; ++i) {
+  for (var i = 0; i < 20; ++i) {
     Expect.equals(123, c.bar(100, n1:101, n2:102));
     Expect.equals(123, c.bar(100, n2:102, n1:101));
   }
 
   // Test NoSuchMethodError message.
-  for (var i = 0; i < 100; i++) testMessage();
+  for (var i = 0; i < 20; i++) testMessage();
 
 }
 
diff --git a/tests/language/null_hashcode_optimized_vm_test.dart b/tests/language/null_hashcode_optimized_vm_test.dart
index 27906ca..a214c29 100644
--- a/tests/language/null_hashcode_optimized_vm_test.dart
+++ b/tests/language/null_hashcode_optimized_vm_test.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.
 // Test that optimized Object.hashCode works for the null receiver.
-// VMOptions=--optimization_counter_threshold=100
+// VMOptions=--optimization_counter_threshold=10
 
 main() {
-  for (int i = 0; i < 200; i++) {
+  for (int i = 0; i < 20; i++) {
     foo(null);
   }
 }
diff --git a/tests/language/number_identity2_test.dart b/tests/language/number_identity2_test.dart
index c10ce04..1a4c90d 100644
--- a/tests/language/number_identity2_test.dart
+++ b/tests/language/number_identity2_test.dart
@@ -5,11 +5,12 @@
 //
 // Contains test that is failing on dart2js. Merge this test with
 // 'number_identity_test.dart' once fixed.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
 main() {
-  for (int i = 0; i < 1000; i++) testNumberIdentity();
+  for (int i = 0; i < 20; i++) testNumberIdentity();
 }
 
 
diff --git a/tests/language/number_identity_test.dart b/tests/language/number_identity_test.dart
index 2173342..fa072ea 100644
--- a/tests/language/number_identity_test.dart
+++ b/tests/language/number_identity_test.dart
@@ -2,11 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing params.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
 main() {
-  for (int i = 0; i < 1000; i++) testNumberIdentity();
+  for (int i = 0; i < 20; i++) testNumberIdentity();
 }
 
 
diff --git a/tests/language/optimization_test.dart b/tests/language/optimization_test.dart
index 0dbbcf5..0b54b5e 100644
--- a/tests/language/optimization_test.dart
+++ b/tests/language/optimization_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test various optimizations and deoptimizations of optimizing compiler..
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -46,16 +47,16 @@
 }
 
 main() {
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.stringEquals("HI 5", addThem(const StringPlus("HI "), 5).toString());
     Expect.equals(true, isItInt(5));
   }
   Expect.equals(8, addThem(3, 5));
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.stringEquals("HI 5", addThem(const StringPlus("HI "), 5).toString());
     Expect.equals(8, addThem(3, 5));
   }
-  for (int i = -500; i < 500; i++) {
+  for (int i = -10; i < 10; i++) {
     var r = doNeg(i);
     var p = doNeg(r);
     Expect.equals(i, p);
@@ -66,16 +67,16 @@
   var minInt = -(1 << 30);
   Expect.equals(minInt, doNeg(doNeg(minInt)));
 
-  for (int i = 0; i < 1000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(false, doNot(true));
     Expect.equals(true, doNot(doNot(true)));
   }
-  for (int i = 0; i < 1000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(-57, doBitNot(56));
     Expect.equals(55, doBitNot(-56));
   }
 
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(-2.2, doNeg2(2.2));
   }
   // Deoptimize.
@@ -84,7 +85,7 @@
   var fixed = new List(10);
   var growable = [1, 2, 3, 4, 5];
 
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     doStore1(fixed, 7);
     Expect.equals(7, fixed[1]);
     doStore2(growable, 12);
diff --git a/tests/language/optimize_redundant_array_load_test.dart b/tests/language/optimize_redundant_array_load_test.dart
index d490f31..14549d2 100644
--- a/tests/language/optimize_redundant_array_load_test.dart
+++ b/tests/language/optimize_redundant_array_load_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -22,10 +23,10 @@
 
 
 main() {
-  for (int i = 0; i < 10000; i++) {
+  for (int i = 0; i < 20; i++) {
     test1(A);
     test2(A);
   }
-  Expect.equals(10006, test1(A));
+  Expect.equals(26, test1(A));
   Expect.equals(6, test2(A));
 }
diff --git a/tests/language/optimized_constant_array_string_access_test.dart b/tests/language/optimized_constant_array_string_access_test.dart
index 8b63df3..22f3771 100644
--- a/tests/language/optimized_constant_array_string_access_test.dart
+++ b/tests/language/optimized_constant_array_string_access_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -13,7 +14,7 @@
   }
 
   Expect.throws(() => test(true));
-  for (int i = 0; i < 10000; i++) test(false);
+  for (int i = 0; i < 20; i++) test(false);
   Expect.throws(() => test(true));
 }
 
@@ -32,11 +33,11 @@
   }
 
   Expect.throws(() => testPositive(true));
-  for (int i = 0; i < 10000; i++) testPositive(false);
+  for (int i = 0; i < 20; i++) testPositive(false);
   Expect.throws(() => testPositive(true));
 
   Expect.throws(() => testNegative(true));
-  for (int i = 0; i < 10000; i++) testNegative(false);
+  for (int i = 0; i < 20; i++) testNegative(false);
   Expect.throws(() => testNegative(true));
 }
 
@@ -49,7 +50,7 @@
 
 
 int testNonSmiIndex() {
-  for (int i = 0; i < 10000; i++) { foo(1); }
+  for (int i = 0; i < 20; i++) { foo(1); }
   Expect.throws(() => foo(2));
 }
 
diff --git a/tests/language/optimized_hoisting_checked_mode_assert_test.dart b/tests/language/optimized_hoisting_checked_mode_assert_test.dart
index 23e2654..81ff2e2 100644
--- a/tests/language/optimized_hoisting_checked_mode_assert_test.dart
+++ b/tests/language/optimized_hoisting_checked_mode_assert_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -15,7 +16,7 @@
 }
 
 main() {
-  for (var i=0; i<10000; i++) foo(1.0, 10);
+  for (var i = 0; i < 20; i++) foo(1.0, 10);
   Expect.equals(0, foo(1.0, 10));
   Expect.equals(0, foo(2, 0));  // Must not throw in checked mode.
 }
diff --git a/tests/language/optimized_lists_test.dart b/tests/language/optimized_lists_test.dart
index a2406ae..d92fe3d 100644
--- a/tests/language/optimized_lists_test.dart
+++ b/tests/language/optimized_lists_test.dart
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test program for correct optimizations related to types fo allocated lists.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
 main() {
   // Trigger optimization of 'test' method.
-  for (int i = 0; i < 1000; i++) {
+  for (int i = 0; i < 20; i++) {
     test(2);
   }
 }
diff --git a/tests/language/optimized_setter_test.dart b/tests/language/optimized_setter_test.dart
index 099be16..e1c4f3d 100644
--- a/tests/language/optimized_setter_test.dart
+++ b/tests/language/optimized_setter_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Test various setter situations, testing special cases in optimizing compiler.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -21,7 +22,7 @@
   A a = new A();
   B b = new B();
   // Optimize 'oneTarget' for one class, one target.
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     oneTarget(a, 5);
     Expect.equals(5, a.field);
   }
@@ -29,7 +30,7 @@
   oneTarget(b, 6);
   Expect.equals(6, b.field);
   // Optimize 'oneTarget' for A and B classes, one target.
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     oneTarget(a, 7);
     Expect.equals(7, a.field);
   }
@@ -48,7 +49,7 @@
   }
 
   A a = new A();
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     var r = maybeSet(a, 5, false);
     Expect.equals(0, a.field);
     Expect.equals(-1, r);
@@ -56,7 +57,7 @@
   var r = maybeSet(a, 5, true);
   Expect.equals(5, a.field);
   Expect.equals(5, r);
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     var r = maybeSet(a, 6, true);
     Expect.equals(6, a.field);
     Expect.equals(6, r);
@@ -80,13 +81,13 @@
   }
 
   X x = new X();
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     var r = oneTarget(x, 3);
     Expect.equals(3, x.pField);
     Expect.equals(3, r);
   }
   oneTarget(x, 0);
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     incField(x);
   }
   Expect.equals(11, x.pField);
@@ -105,14 +106,14 @@
   // Both classes 'Y' and 'A' have a distinct field getter.
   A a = new A();
   Y y = new Y();
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     var r = oneTarget(a, 5);
     Expect.equals(5, a.field);
     Expect.equals(5, r);
     r = oneTarget(y, 6);
     Expect.equals(6, y.field);
     Expect.equals(6, r);
-  } 
+  }
 }
 
 class Z {
@@ -128,7 +129,7 @@
 
   Y y = new Y();
   Z z = new Z();
-  for (int i = 0; i < 2000; i++) {
+  for (int i = 0; i < 20; i++) {
     var r = oneTarget(y, 8);
     Expect.equals(8, y.field);
     Expect.equals(8, r);
@@ -143,7 +144,6 @@
 }
 
 void main() {
-  for (int i = 0; i< 2000; i++) {}
   sameImplicitSetter();
   setterNoFeedback();
   sameNotImplicitSetter();
diff --git a/tests/language/optimized_string_charat_test.dart b/tests/language/optimized_string_charat_test.dart
index 5f2e6e4..b7ca22f 100644
--- a/tests/language/optimized_string_charat_test.dart
+++ b/tests/language/optimized_string_charat_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 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -29,35 +30,35 @@
 
 main() {
   Expect.equals("a", test_charat(a, 0));
-  for (var i=0; i<10000; i++) test_charat(a, 0);
+  for (var i = 0; i < 20; i++) test_charat(a, 0);
   Expect.equals("a", test_charat(a, 0));
   Expect.equals("b", test_charat(a, 1));
   Expect.equals("c", test_charat(a, 2));
   Expect.throws(() => test_charat(a, 3));
 
   Expect.equals("a", test_const_str(0));
-  for (var i=0; i<10000; i++) test_const_str(0);
+  for (var i = 0; i < 20; i++) test_const_str(0);
   Expect.equals("a", test_const_str(0));
   Expect.equals("b", test_const_str(1));
   Expect.equals("c", test_const_str(2));
   Expect.throws(() => test_const_str(3));
 
   Expect.equals("a", test_const_index(a));
-  for (var i=0; i<10000; i++) test_const_index(a);
+  for (var i = 0; i < 20; i++) test_const_index(a);
   Expect.equals("a", test_const_index(a));
   Expect.equals("ø", test_const_index(b));
   Expect.equals(new String.fromCharCodes([123]), test_const_index(c));
   Expect.throws(() => test_const_index2(a));
 
   Expect.equals("ø", test_charat(b, 0));
-  for (var i=0; i<10000; i++) test_charat(b, 0);
+  for (var i = 0; i < 20; i++) test_charat(b, 0);
   Expect.equals("ø", test_charat(b, 0));
   Expect.equals("b", test_charat(b, 1));
   Expect.equals("c", test_charat(b, 2));
   Expect.throws(() => test_charat(b, 3));
 
   Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
-  for (var i=0; i<10000; i++) test_charat(c, 0);
+  for (var i = 0; i < 20; i++) test_charat(c, 0);
   Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
   Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1));
   Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2));
diff --git a/tests/language/optimized_string_charcodeat_test.dart b/tests/language/optimized_string_charcodeat_test.dart
index 88a08de..26978e4 100644
--- a/tests/language/optimized_string_charcodeat_test.dart
+++ b/tests/language/optimized_string_charcodeat_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 --no-use-osr
 
 // Test optimized CodeUnitAt and array access.
 
@@ -14,7 +15,7 @@
   int test() {
     return x.codeUnitAt(j);
   }
-  for (int i = 0; i < 10000; i++) test();
+  for (int i = 0; i < 20; i++) test();
   return test();
 }
 
@@ -23,7 +24,7 @@
   int test() {
     return x.codeUnitAt(j);
   }
-  for (int i = 0; i < 10000; i++) test();
+  for (int i = 0; i < 20; i++) test();
   return test();
 }
 
@@ -32,7 +33,7 @@
   int test() {
     return "høns".codeUnitAt(j);
   }
-  for (int i = 0; i < 10000; i++) test();
+  for (int i = 0; i < 20; i++) test();
   return test();
 }
 
@@ -41,7 +42,7 @@
   int test() {
     return x.codeUnitAt(1);
   }
-  for (int i = 0; i < 10000; i++) test();
+  for (int i = 0; i < 20; i++) test();
   return test();
 }
 
@@ -71,7 +72,7 @@
     Expect.equals(248, testConstantStringCodeUnitAt(1));
     Expect.equals(101, testConstantIndexCodeUnitAt(one_byte));
   }
-  for (int j = 0; j < 2000; j++) {
+  for (int j = 0; j < 20; j++) {
     Expect.equals(436, testOneByteCodeUnitAtInLoop(one_byte));
     Expect.equals(577, testTwoByteCodeUnitAtInLoop(two_byte));
   }
diff --git a/tests/language/range_analysis_test.dart b/tests/language/range_analysis_test.dart
index 4be7414..8226a68 100644
--- a/tests/language/range_analysis_test.dart
+++ b/tests/language/range_analysis_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for constructors and initializers.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -20,7 +21,7 @@
 }
 
 test1() {
-  for (var i = 0; i < 1000; i++) bar();
+  for (var i = 0; i < 20; i++) bar();
 }
 
 // Check that range analysis does not erroneously remove overflow check.
@@ -84,7 +85,7 @@
   for (i = 0; i < n; i++) {
     if (i < 0) throw "unreachable";
     var j = i - 1;
-    if (j >= n - 1) throw "unreachable"; 
+    if (j >= n - 1) throw "unreachable";
   }
   return i;
 }
@@ -94,22 +95,22 @@
   test_fun(fun) {
     Expect.equals(2, fun(0, 1));
     Expect.equals(3, fun(0, 0));
-    for (var i = 0; i < 2000; i++) fun(0, 1);
+    for (var i = 0; i < 20; i++) fun(0, 1);
     Expect.equals(2, fun(0, 1));
     Expect.equals(3, fun(0, 0));
   }
-  
+
   test_fun(f);
   test_fun(f1);
   test_fun(f2);
 
   Expect.equals(10, g());
-  for (var i = 0; i < 2000; i++) g();
+  for (var i = 0; i < 20; i++) g();
   Expect.equals(10, g());
 
 
   Expect.equals(10, h(10));
-  for (var i = 0; i < 2000; i++) h(10);
+  for (var i = 0; i < 20; i++) h(10);
   Expect.equals(10, h(10));
 }
 
diff --git a/tests/language/strict_equal_test.dart b/tests/language/strict_equal_test.dart
index 7a31d93..be7ab0f 100644
--- a/tests/language/strict_equal_test.dart
+++ b/tests/language/strict_equal_test.dart
@@ -1,12 +1,12 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
-
 main() {
-  for (int i = 0; i < 6000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.isFalse(test1(5));
     Expect.isTrue(test1(3));
 
diff --git a/tests/language/string_intrinsics_test.dart b/tests/language/string_intrinsics_test.dart
index d90ff7a..8daf75c 100644
--- a/tests/language/string_intrinsics_test.dart
+++ b/tests/language/string_intrinsics_test.dart
@@ -3,13 +3,14 @@
 // BSD-style license that can be found in the LICENSE file.
 // Replace with shared test once interface issues clarified.
 // Test various String intrinsics
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
 main() {
   var oneByte = "Hello world";
   var empty = "";
-  for (int i = 0; i < 6000; i++) {
+  for (int i = 0; i < 20; i++) {
     Expect.equals(11, testLength(oneByte));
     Expect.equals(0, testLength(empty));
     Expect.isFalse(testIsEmpty(oneByte));
diff --git a/tests/language/try_catch2_test.dart b/tests/language/try_catch2_test.dart
index 9de57c0..003255d 100644
--- a/tests/language/try_catch2_test.dart
+++ b/tests/language/try_catch2_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing try/catch statement without any exceptions
 // being thrown. (Nested try/catch blocks).
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -61,7 +62,7 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     TryCatch2Test.testMain();
   }
 }
diff --git a/tests/language/try_catch3_test.dart b/tests/language/try_catch3_test.dart
index feba2b3..b6b6e60 100644
--- a/tests/language/try_catch3_test.dart
+++ b/tests/language/try_catch3_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing try/catch statement without any exceptions
 // being thrown.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -113,7 +114,7 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     TryCatchTest.testMain();
   }
 }
diff --git a/tests/language/try_catch4_test.dart b/tests/language/try_catch4_test.dart
index d5e9809..9d39f11 100644
--- a/tests/language/try_catch4_test.dart
+++ b/tests/language/try_catch4_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Check that our SSA graph does have the try body a predecessor of a
 // try/finally.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -197,7 +198,7 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     main_test();
   }
 }
diff --git a/tests/language/try_catch5_test.dart b/tests/language/try_catch5_test.dart
index 2d9b557..5aa16e9 100644
--- a/tests/language/try_catch5_test.dart
+++ b/tests/language/try_catch5_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Check that our SSA graph does have the try body a predecessor of a
 // try/finally.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -30,7 +31,7 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     a = 0;
     Expect.isTrue(foo1());
   }
diff --git a/tests/language/try_catch_optimized1_test.dart b/tests/language/try_catch_optimized1_test.dart
index cffcbc2..380e451 100644
--- a/tests/language/try_catch_optimized1_test.dart
+++ b/tests/language/try_catch_optimized1_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -234,66 +235,66 @@
 
 
 main() {
-  for (var i=0; i<10000; i++) f1("abc");
+  for (var i = 0; i < 20; i++) f1("abc");
   Expect.equals(99, f1("abc"));
   Expect.equals(0, f1(null));
 
-  for (var i=0; i<10000; i++) f2("abc");
+  for (var i = 0; i < 20; i++) f2("abc");
   Expect.equals(99, f2("abc"));
   Expect.equals(null, f2(null));
 
   f3("123", 0);
-  for (var i=0; i<10000; i++) f3(null, 0);
+  for (var i = 0; i < 20; i++) f3(null, 0);
   Expect.equals(99, f3("123", 0));
   Expect.equals(0x40000000, f3(null, 0x3fffffff));
 
   f4(null);
-  for (var i=0; i<10000; i++) f4(123);
+  for (var i = 0; i < 20; i++) f4(123);
   f4(null);
 
   f5(null);
-  for (var i=0; i<10000; i++) f5(123);
+  for (var i = 0; i < 20; i++) f5(123);
   f5(null);
 
   f6(null, 1);
-  for (var i=0; i<10000; i++) f6(123, 1);
+  for (var i = 0; i < 20; i++) f6(123, 1);
   f6(null, 1);
 
   f7("1.2");
   f7("Infinity");
   f7("-Infinity");
-  for (var i=0; i<10000; i++) f7("1.2");
+  for (var i = 0; i < 20; i++) f7("1.2");
   Expect.equals(false, f7("1.2"));
   Expect.equals(true, f7("Infinity"));
   Expect.equals(true, f7("-Infinity"));
   Expect.equals(false, f7("123456789012345"));  // Deopt.
-  for (var i=0; i<10000; i++) f7("123456789012345");  
+  for (var i = 0; i < 20; i++) f7("123456789012345");
   Expect.equals(true, f7("Infinity"));
   Expect.equals(true, f7("-Infinity"));
 
-  for (var i=0; i<10000; i++) f8(null);
+  for (var i = 0; i < 20; i++) f8(null);
   f8(null);
 
   f9(5);
   f9(5.0);
-  for (var i=0; i<10000; i++) f9(3);
+  for (var i = 0; i < 20; i++) f9(3);
   f9(3);
 
   var y = 1.0;
   Expect.equals(0, f10(null, y));
-  for (var i = 0; i < 10000; i++) f10("abc", y);
+  for (var i = 0; i < 20; i++) f10("abc", y);
   Expect.equals(99, f10("abc", y));
   Expect.equals(0, f10(null, y));
 
-  for (var i=0; i<10000; i++) f11("abc");
+  for (var i = 0; i < 20; i++) f11("abc");
   Expect.equals(99, f11("abc"));
   Expect.equals(0, f11(null));
 
-  for (var i=0; i<10000; i++) f12(null);
+  for (var i = 0; i < 20; i++) f12(null);
   f12(null);
 
   f13(null);
-  for (var i=0; i<10000; i++) f13("abc");
+  for (var i = 0; i < 20; i++) f13("abc");
   Expect.equals(99, f13("abc"));
   Expect.equals(1, f13(null));
 }
diff --git a/tests/language/try_catch_test.dart b/tests/language/try_catch_test.dart
index 73c7282..347d706 100644
--- a/tests/language/try_catch_test.dart
+++ b/tests/language/try_catch_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
 
 import "package:expect/expect.dart";
 
@@ -151,7 +152,7 @@
 }
 
 main() {
-  for (var i = 0; i < 2000; i++) {
+  for (var i = 0; i < 20; i++) {
     TryCatchTest.testMain();
   }
 }
diff --git a/tests/language/type_parameter_test.dart b/tests/language/type_parameter_test.dart
index e1a03d3..7b0a996 100644
--- a/tests/language/type_parameter_test.dart
+++ b/tests/language/type_parameter_test.dart
@@ -30,7 +30,18 @@
 
   static final
   T /// 04: static type warning, dynamic type error
-  staticField = "not_null";
+  staticFinalField = "not_null";
+
+  static const
+  // TODO(regis): Support 'compile-time type error' in test.dart and use below.
+  T /// 05: static type warning, compile-time error
+  staticConstField = "not_null";
+
+  static not_null() => "not_null";
+  static final
+  T /// 06: static type warning, dynamic type error
+  staticFinalField2 = not_null();
+
 
   // Assigning null to a malformed type is not a dynamic error.
   static
@@ -40,7 +51,10 @@
     return a;
   }
 
-  static final T staticField2 = null;
+  static final T staticFinalField3 = null;
+
+  static null_() => null;
+  static final T staticFinalField4 = null_();
 }
 
 main() {
@@ -59,8 +73,11 @@
   Expect.isFalse(s is Set<double>);
 
   A.staticMethod("not_null");
-  print(A.staticField);
+  print(A.staticFinalField);
+  print(A.staticConstField);
+  print(A.staticFinalField2);
 
   A.staticMethod2(null);
-  print(A.staticField2);
+  print(A.staticFinalField3);
+  print(A.staticFinalField4);
 }
diff --git a/tests/language/type_propagation_assert_assignable_test.dart b/tests/language/type_propagation_assert_assignable_test.dart
index 56089e6..352a5842 100644
--- a/tests/language/type_propagation_assert_assignable_test.dart
+++ b/tests/language/type_propagation_assert_assignable_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // Check that type of the AssertAssignable is recomputed correctly.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
 
 import "package:expect/expect.dart";
 
@@ -37,7 +38,7 @@
 main() {
   final a = new A(new B(new A("haha", true), false), false);
 
-  for (var i = 0; i < 10000; i++) {
+  for (var i = 0; i < 20; i++) {
     Expect.isTrue(foo(a));
   }
   Expect.isTrue(foo(a));
diff --git a/tests/lib/codec/codec1_test.dart b/tests/lib/codec/codec1_test.dart
new file mode 100644
index 0000000..c4b756c
--- /dev/null
+++ b/tests/lib/codec/codec1_test.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:codec';
+import 'dart:convert';
+
+import 'package:expect/expect.dart';
+
+class MyCodec extends Codec<int, String> {
+  const MyCodec();
+
+  Converter<int, String> get encoder => new IntStringConverter();
+  Converter<String, int> get decoder => new StringIntConverter();
+}
+
+class IntStringConverter extends Converter<int, String> {
+  String convert(int i) => i.toString();
+}
+
+class StringIntConverter extends Converter<String, int> {
+  int convert(String str) => int.parse(str);
+}
+
+class MyCodec2 extends Codec<int, String> {
+  const MyCodec2();
+
+  Converter<int, String> get encoder => new IntStringConverter2();
+  Converter<String, int> get decoder => new StringIntConverter2();
+}
+
+class IntStringConverter2 extends Converter<int, String> {
+  String convert(int i) => (i + 99).toString();
+}
+
+class StringIntConverter2 extends Converter<String, int> {
+  int convert(String str) => int.parse(str) + 400;
+}
+
+const TEST_CODEC = const MyCodec();
+const TEST_CODEC2 = const MyCodec2();
+
+main() {
+  Expect.equals("0", TEST_CODEC.encode(0));
+  Expect.equals(5, TEST_CODEC.decode("5"));
+  Expect.equals(3, TEST_CODEC.decode(TEST_CODEC.encode(3)));
+
+  Expect.equals("99", TEST_CODEC2.encode(0));
+  Expect.equals(405, TEST_CODEC2.decode("5"));
+  Expect.equals(499, TEST_CODEC2.decode(TEST_CODEC2.encode(0)));
+
+  var inverted, fused;
+  inverted = TEST_CODEC.inverted;
+  fused = TEST_CODEC.fuse(inverted);
+  Expect.equals(499, fused.encode(499));
+  Expect.equals(499, fused.decode(499));
+
+  fused = inverted.fuse(TEST_CODEC);
+  Expect.equals("499", fused.encode("499"));
+  Expect.equals("499", fused.decode("499"));
+
+  inverted = TEST_CODEC2.inverted;
+  fused = TEST_CODEC2.fuse(inverted);
+  Expect.equals(499, fused.encode(0));
+  Expect.equals(499, fused.decode(0));
+
+  fused = TEST_CODEC.fuse(inverted);
+  Expect.equals(405, fused.encode(5));
+  Expect.equals(101, fused.decode(2));
+}
diff --git a/tests/lib/codec/codec2_test.dart b/tests/lib/codec/codec2_test.dart
new file mode 100644
index 0000000..606d454
--- /dev/null
+++ b/tests/lib/codec/codec2_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:codec';
+
+import 'package:expect/expect.dart';
+
+main() {
+  final RAW = '["122ç",50,50,231]';
+  final ENCODED = const [91, 34, 49, 50, 50, 195, 167, 34, 44,
+                         53, 48, 44, 53, 48, 44, 50, 51, 49, 93];
+  Expect.listEquals(ENCODED, UTF8.encode(RAW));
+  Expect.equals(RAW, UTF8.decode(ENCODED));
+
+  Expect.listEquals([], UTF8.encode(""));
+  Expect.equals("", UTF8.decode([]));
+
+  final JSON_ENCODED = RAW;
+  Expect.equals(JSON_ENCODED, JSON.encode(["122ç", 50, 50, 231]));
+  Expect.listEquals(["122ç", 50, 50, 231], JSON.decode(JSON_ENCODED));
+
+  // Test that the reviver is passed to the decoder.
+  var decoded = JSON.decode('{"p": 5}', reviver: (k, v) {
+    if (k == "") return v;
+    return v * 2;
+  });
+  Expect.equals(10, decoded["p"]);
+  var jsonWithReviver = new JsonCodec.withReviver((k, v) {
+    if (k == "") return v;
+    return v * 2;
+  });
+  decoded = jsonWithReviver.decode('{"p": 5}');
+  Expect.equals(10, decoded["p"]);
+
+  // Test example from comments.
+  final JSON_TO_BYTES = JSON.fuse(UTF8);
+  List<int> bytes = JSON_TO_BYTES.encode(["json-object"]);
+  decoded = JSON_TO_BYTES.decode(bytes);
+  Expect.isTrue(decoded is List);
+  Expect.equals("json-object", decoded[0]);
+}
diff --git a/tests/standalone/debugger/closure_debugger_test.dart b/tests/standalone/debugger/closure_debugger_test.dart
index 07eb5ad..df91b8f 100644
--- a/tests/standalone/debugger/closure_debugger_test.dart
+++ b/tests/standalone/debugger/closure_debugger_test.dart
@@ -21,8 +21,19 @@
   var f = bar;
   f("closure call");
   bar(12);
+  var a = new A();
+  for (var i = 0; i < 2; ++i) {
+    a.foo(i);
+  }
 }
 
+class A {
+  A() {
+    foo =
+      (x) => print(x);
+  }
+  var foo;
+}
 
 // Expected debugger events and commands.
 var testScript = [
@@ -37,5 +48,18 @@
   SetBreakpoint(15),      // Breakpoint in bar();
   Resume(),
   MatchFrames(["bar", "main"]),
+  SetBreakpoint(26),      // Breakpoint in main() at a.field(i).
+  SetBreakpoint(33),      // Breakpoint in closure.
   Resume(),
-];
\ No newline at end of file
+  MatchFrame(0, "main"),  // Should be in main().
+  MatchLocals({"i": "0"}),
+  StepInto(),
+  StepInto(),
+  MatchFrames(["A.<anonymous closure>", "main"]),  // In closure function.
+  Resume(),
+  MatchFrame(0, "main"),  // Back in main().
+  MatchLocals({"i": "1"}),
+  Resume(),
+  MatchFrames(["A.<anonymous closure>", "main"]),  // In closure function.
+  Resume()
+];
diff --git a/tests/standalone/debugger/nosuchmethod_debugger_test.dart b/tests/standalone/debugger/nosuchmethod_debugger_test.dart
new file mode 100644
index 0000000..b52cfc1
--- /dev/null
+++ b/tests/standalone/debugger/nosuchmethod_debugger_test.dart
@@ -0,0 +1,48 @@
+// 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.
+
+// This test forks a second vm process that runs this dart script as
+// a debug target.
+// Run this test with option --wire to see the json messages sent
+// between the processes.
+// Run this test with option --verbose to see the stdout and stderr output
+// of the debug target process.
+
+import "debug_lib.dart";
+
+main() {
+  if (RunScript(testScript)) return;
+  print("Hello from debuggee");
+  var a = new A();
+  for (var i = 0; i < 2; ++i) {
+    a.foo(i);
+  }
+}
+
+class A {
+  noSuchMethod(m) {
+    print(m.positionalArguments[0]);
+  }
+}
+
+// Expected debugger events and commands.
+var testScript = [
+  MatchFrame(0, "main"),  // Top frame in trace is function "main".
+  SetBreakpoint(19),      // Set breakpoint at a.foo(i).
+  Resume(),
+  MatchFrame(0, "main"),  // Should be at closure call.
+  MatchLocals({"i": "0"}),
+  StepInto(),
+  StepInto(),
+  MatchFrames(["A.noSuchMethod", "main"]),
+  StepOut(),
+  MatchFrame(0, "main"),  // Back in main.
+  Resume(),
+  MatchFrame(0, "main"),  // Still in main back at a.foo(i).
+  MatchLocals({"i": "1"}),
+  StepInto(),
+  StepInto(),
+  MatchFrames(["A.noSuchMethod", "main"]),  // Second invocation.
+  Resume()
+];
diff --git a/tests/standalone/io/async_catch_errors_test.dart b/tests/standalone/io/async_catch_errors_test.dart
new file mode 100644
index 0000000..7107bf2
--- /dev/null
+++ b/tests/standalone/io/async_catch_errors_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+import 'dart:async';
+import 'dart:isolate';
+import 'dart:io';
+
+var events = [];
+
+Future testSocketException() {
+  var completer = new Completer();
+  runZonedExperimental(() {
+    Socket.connect("4", 1).then((Socket s) {
+      Expect.fail("Socket should not be able to connect");
+    });
+  }, onError: (err) {
+    if (err is! SocketException) Expect.fail("Not expected error: $err");
+    completer.complete("socket test, ok.");
+    events.add("SocketException");
+  });
+  return completer.future;
+}
+
+Future testFileException() {
+  var completer = new Completer();
+  runZonedExperimental(() {
+    new File("lol it's not a file\n").openRead().listen(null);
+  }, onError: (err) {
+    if (err is! FileException) Expect.fail("Not expected error: $err");
+    completer.complete("file test, ok.");
+    events.add("FileException");
+  });
+  return completer.future;
+}
+
+main() {
+  // We keep a ReceivePort open until all tests are done. This way the VM will
+  // hang if the callbacks are not invoked and the test will time out.
+  var timeOutPort = new ReceivePort();
+  testSocketException()
+    .then((_) => testFileException())
+    .then((_) {
+      timeOutPort.close();
+      Expect.listEquals(["SocketException", "FileException"],
+                        events);
+    });
+}
diff --git a/tests/standalone/io/secure_socket_renegotiate_test.dart b/tests/standalone/io/secure_socket_renegotiate_test.dart
index 49c1644..8e772e5 100644
--- a/tests/standalone/io/secure_socket_renegotiate_test.dart
+++ b/tests/standalone/io/secure_socket_renegotiate_test.dart
@@ -7,7 +7,7 @@
 // can request a client certificate to be sent.
 
 import "package:expect/expect.dart";
-import "package:pathos/path.dart" as path;
+import "package:path/path.dart" as path;
 import "dart:async";
 import "dart:io";
 
diff --git a/tests/standalone/io/web_socket_protocol_processor_test.dart b/tests/standalone/io/web_socket_protocol_processor_test.dart
index f5c362f..4d90d73 100644
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart
@@ -12,7 +12,7 @@
 
 part '../../../sdk/lib/io/common.dart';
 part "../../../sdk/lib/io/http.dart";
-part "../../../sdk/lib/io/buffer_list.dart";
+part "../../../sdk/lib/io/bytes_builder.dart";
 part "../../../sdk/lib/io/io_sink.dart";
 part "../../../sdk/lib/io/string_transformer.dart";
 part "../../../sdk/lib/io/websocket.dart";
diff --git a/tools/VERSION b/tools/VERSION
index a97e77c..54ef79b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 6
-BUILD 4
+BUILD 5
 PATCH 0
diff --git a/tools/bots/editor.py b/tools/bots/editor.py
index bb31143..f9db5ef 100755
--- a/tools/bots/editor.py
+++ b/tools/bots/editor.py
@@ -64,6 +64,8 @@
   return os.path.join(editor_dir, executable)
 
 def RunProcess(args):
+  if sys.platform == 'linux2':
+    args = ['xvfb-run', '-a'] + args
   print 'Running: %s' % (' '.join(args))
   sys.stdout.flush()
   bot.RunProcess(args)
@@ -134,7 +136,8 @@
     editor_executable = GetEditorExecutable('Release', arch)
     with bot.BuildStep('Test Editor %s' % arch):
       with TempDir() as temp_dir:
-        args = [editor_executable, '--test', '--auto-exit', '-data', temp_dir]
+        args = [editor_executable, '-noSplash', '--test', '--auto-exit',
+                '-data', temp_dir]
         RunProcess(args)
 
   # TODO: Permissions need to be clarified
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index ab5b51b..6791159 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -197,8 +197,8 @@
                   join('_internal', 'dartdoc'),
                   join('_internal', 'pub', 'resource'),
                   join('_internal', 'lib'),
-                  'async', 'collection', '_collection_dev', 'core',
-                  'crypto', 'io', 'isolate',
+                  'async', 'collection', '_collection_dev', 'codec', 'convert',
+                  'core', 'crypto', 'io', 'isolate',
                   join('chrome', 'dart2js'), join('chrome', 'dartium'),
                   join('html', 'dart2js'), join('html', 'dartium'),
                   join('html', 'html_common'),
diff --git a/tools/dom/scripts/chromegenerator.py b/tools/dom/scripts/chromegenerator.py
index 1d7e359..2093d15 100755
--- a/tools/dom/scripts/chromegenerator.py
+++ b/tools/dom/scripts/chromegenerator.py
@@ -67,6 +67,7 @@
 API_FILES = [
     "app_window.idl",
     "app_runtime.idl",
+    "file_system.idl",
 ]
 
 if __name__ == "__main__":
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index ff438d4..aff410d 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -300,6 +300,7 @@
   'UIEvent.pageY',
   'WheelEvent.initWebKitWheelEvent',
   'DOMWindow.getComputedStyle',
+  'DOMWindow.moveTo',
 ])
 
 # Members from the standard dom that exist in the dart:html library with
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart
index 4ee943d..5355446 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/CssClassSet.dart
@@ -10,8 +10,11 @@
   /**
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
+   *
+   * If [shouldAdd] is true, then we always add that [value] to the element. If
+   * [shouldAdd] is false then we always remove [value] from the element.
    */
-  bool toggle(String value);
+  bool toggle(String value, [bool shouldAdd]);
 
   /**
    * Returns [:true:] if classes cannot be added or removed from this
@@ -66,8 +69,11 @@
    * Iterate through [iterable]'s items, and add it if it is not on it, or
    * remove it if it is. This is the Dart equivalent of jQuery's
    * [toggleClass](http://api.jquery.com/toggleClass/).
+   * If [shouldAdd] is true, then we always add all the classes in [iterable]
+   * element. If [shouldAdd] is false then we always remove all the classes in
+   * [iterable] from the element.
    */
-  void toggleAll(Iterable<String> iterable);
+  void toggleAll(Iterable<String> iterable, [bool shouldAdd]);
 }
 
 /**
@@ -113,8 +119,8 @@
    * Adds the class [value] to the element if it is not on it, removes it if it
    * is.
    */
-  bool toggle(String value) =>
-      _modifyWithReturnValue((e) => e.toggle(value));
+  bool toggle(String value, [bool shouldAdd]) =>
+      _modifyWithReturnValue((e) => e.toggle(value, shouldAdd));
 
   /**
    * Remove the class [value] from element, and return true on successful
diff --git a/tools/dom/src/chrome/app_runtime.dart b/tools/dom/src/chrome/app_runtime.dart
index 33925ef..31aa9cd 100644
--- a/tools/dom/src/chrome/app_runtime.dart
+++ b/tools/dom/src/chrome/app_runtime.dart
@@ -10,48 +10,6 @@
  * Types
  */
 
-class AppRuntimeIntent extends ChromeObject {
-  /*
-   * Private constructor
-   */
-  AppRuntimeIntent._proxy(_jsObject) : super._proxy(_jsObject);
-
-  /*
-   * Public accessors
-   */
-  /// The WebIntent being invoked.
-  String get action => JS('String', '#.action', this._jsObject);
-
-  void set action(String action) {
-    JS('void', '#.action = #', this._jsObject, action);
-  }
-
-  /// The MIME type of the data.
-  String get type => JS('String', '#.type', this._jsObject);
-
-  void set type(String type) {
-    JS('void', '#.type = #', this._jsObject, type);
-  }
-
-  /// Data associated with the intent.
-  Object get data => JS('Object', '#.data', this._jsObject);
-
-  void set data(Object data) {
-    JS('void', '#.data = #', this._jsObject, convertArgument(data));
-  }
-
-
-  /*
-   * Methods
-   */
-  /// Callback to be compatible with WebIntents.
-  void postResult() => JS('void', '#.postResult()', this._jsObject);
-
-  /// Callback to be compatible with WebIntents.
-  void postFailure() => JS('void', '#.postFailure()', this._jsObject);
-
-}
-
 class AppRuntimeLaunchItem extends ChromeObject {
   /*
    * Public constructor
@@ -91,9 +49,7 @@
   /*
    * Public constructor
    */
-  AppRuntimeLaunchData({AppRuntimeIntent intent, String id, List<AppRuntimeLaunchItem> items}) {
-    if (intent != null)
-      this.intent = intent;
+  AppRuntimeLaunchData({String id, List<AppRuntimeLaunchItem> items}) {
     if (id != null)
       this.id = id;
     if (items != null)
@@ -108,12 +64,6 @@
   /*
    * Public accessors
    */
-  AppRuntimeIntent get intent => new AppRuntimeIntent._proxy(JS('', '#.intent', this._jsObject));
-
-  void set intent(AppRuntimeIntent intent) {
-    JS('void', '#.intent = #', this._jsObject, convertArgument(intent));
-  }
-
   /// The id of the file handler that the app is being invoked with.
   String get id => JS('String', '#.id', this._jsObject);
 
@@ -123,8 +73,10 @@
 
   List<AppRuntimeLaunchItem> get items {
     List<AppRuntimeLaunchItem> __proxy_items = new List<AppRuntimeLaunchItem>();
-    for (var o in JS('List', '#.items', this._jsObject)) {
-      __proxy_items.add(new AppRuntimeLaunchItem._proxy(o));
+    int count = JS('int', '#.items.length', this._jsObject);
+    for (int i = 0; i < count; i++) {
+      var item = JS('', '#.items[#]', this._jsObject, i);
+      __proxy_items.add(new AppRuntimeLaunchItem._proxy(item));
     }
     return __proxy_items;
   }
@@ -135,56 +87,11 @@
 
 }
 
-class AppRuntimeIntentResponse extends ChromeObject {
-  /*
-   * Public constructor
-   */
-  AppRuntimeIntentResponse({int intentId, bool success, Object data}) {
-    if (intentId != null)
-      this.intentId = intentId;
-    if (success != null)
-      this.success = success;
-    if (data != null)
-      this.data = data;
-  }
-
-  /*
-   * Private constructor
-   */
-  AppRuntimeIntentResponse._proxy(_jsObject) : super._proxy(_jsObject);
-
-  /*
-   * Public accessors
-   */
-  /// Identifies the intent.
-  int get intentId => JS('int', '#.intentId', this._jsObject);
-
-  void set intentId(int intentId) {
-    JS('void', '#.intentId = #', this._jsObject, intentId);
-  }
-
-  /// Was this intent successful? (i.e., postSuccess vs postFailure).
-  bool get success => JS('bool', '#.success', this._jsObject);
-
-  void set success(bool success) {
-    JS('void', '#.success = #', this._jsObject, success);
-  }
-
-  /// Data associated with the intent response.
-  Object get data => JS('Object', '#.data', this._jsObject);
-
-  void set data(Object data) {
-    JS('void', '#.data = #', this._jsObject, convertArgument(data));
-  }
-
-}
-
 /**
  * Events
  */
 
-/// Fired when an app is launched from the launcher or in response to a web
-/// intent.
+/// Fired when an app is launched from the launcher.
 class Event_app_runtime_onLaunched extends Event {
   void addListener(void callback(AppRuntimeLaunchData launchData)) {
     void __proxy_callback(launchData) {
@@ -192,7 +99,7 @@
         callback(new AppRuntimeLaunchData._proxy(launchData));
       }
     }
-    super.addListener(callback);
+    super.addListener(__proxy_callback);
   }
 
   void removeListener(void callback(AppRuntimeLaunchData launchData)) {
@@ -201,7 +108,7 @@
         callback(new AppRuntimeLaunchData._proxy(launchData));
       }
     }
-    super.removeListener(callback);
+    super.removeListener(__proxy_callback);
   }
 
   bool hasListener(void callback(AppRuntimeLaunchData launchData)) {
@@ -210,7 +117,7 @@
         callback(new AppRuntimeLaunchData._proxy(launchData));
       }
     }
-    super.hasListener(callback);
+    super.hasListener(__proxy_callback);
   }
 
   Event_app_runtime_onLaunched(jsObject) : super._(jsObject, 1);
@@ -243,15 +150,6 @@
    */
   Event_app_runtime_onLaunched onLaunched;
   Event_app_runtime_onRestarted onRestarted;
-
-  /*
-   * Functions
-   */
-  /// postIntentResponse is an internal method to responds to an intent
-  /// previously sent to a packaged app. This is identified by intentId, and
-  /// should only be invoked at most once per intentId.
-  void postIntentResponse(AppRuntimeIntentResponse intentResponse) => JS('void', '#.postIntentResponse(#)', this._jsObject, convertArgument(intentResponse));
-
   API_app_runtime(this._jsObject) {
     onLaunched = new Event_app_runtime_onLaunched(JS('', '#.onLaunched', this._jsObject));
     onRestarted = new Event_app_runtime_onRestarted(JS('', '#.onRestarted', this._jsObject));
diff --git a/tools/dom/src/chrome/app_window.dart b/tools/dom/src/chrome/app_window.dart
index 6fb67b6..6c62ab0 100644
--- a/tools/dom/src/chrome/app_window.dart
+++ b/tools/dom/src/chrome/app_window.dart
@@ -10,11 +10,60 @@
  * Types
  */
 
+class AppWindowBounds extends ChromeObject {
+  /*
+   * Public constructor
+   */
+  AppWindowBounds({int left, int top, int width, int height}) {
+    if (left != null)
+      this.left = left;
+    if (top != null)
+      this.top = top;
+    if (width != null)
+      this.width = width;
+    if (height != null)
+      this.height = height;
+  }
+
+  /*
+   * Private constructor
+   */
+  AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject);
+
+  /*
+   * Public accessors
+   */
+  int get left => JS('int', '#.left', this._jsObject);
+
+  void set left(int left) {
+    JS('void', '#.left = #', this._jsObject, left);
+  }
+
+  int get top => JS('int', '#.top', this._jsObject);
+
+  void set top(int top) {
+    JS('void', '#.top = #', this._jsObject, top);
+  }
+
+  int get width => JS('int', '#.width', this._jsObject);
+
+  void set width(int width) {
+    JS('void', '#.width = #', this._jsObject, width);
+  }
+
+  int get height => JS('int', '#.height', this._jsObject);
+
+  void set height(int height) {
+    JS('void', '#.height = #', this._jsObject, height);
+  }
+
+}
+
 class AppWindowCreateWindowOptions extends ChromeObject {
   /*
    * Public constructor
    */
-  AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight, int defaultLeft, int defaultTop, int width, int height, int left, int top, int minWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame, AppWindowBounds bounds, bool transparentBackground, bool hidden, bool singleton}) {
+  AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight, int defaultLeft, int defaultTop, int width, int height, int left, int top, int minWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame, AppWindowBounds bounds, bool transparentBackground, String state, bool hidden, bool resizable, bool singleton}) {
     if (id != null)
       this.id = id;
     if (defaultWidth != null)
@@ -49,8 +98,12 @@
       this.bounds = bounds;
     if (transparentBackground != null)
       this.transparentBackground = transparentBackground;
+    if (state != null)
+      this.state = state;
     if (hidden != null)
       this.hidden = hidden;
+    if (resizable != null)
+      this.resizable = resizable;
     if (singleton != null)
       this.singleton = singleton;
   }
@@ -65,7 +118,7 @@
    */
   /// Id to identify the window. This will be used to remember the size and
   /// position of the window and restore that geometry when a window with the
-  /// same id (and no explicit size or position) is later opened.
+  /// same id is later opened.
   String get id => JS('String', '#.id', this._jsObject);
 
   void set id(String id) {
@@ -132,36 +185,35 @@
     JS('void', '#.top = #', this._jsObject, top);
   }
 
-  /// Minimum width of the window.
+  /// Minimum width for the lifetime of the window.
   int get minWidth => JS('int', '#.minWidth', this._jsObject);
 
   void set minWidth(int minWidth) {
     JS('void', '#.minWidth = #', this._jsObject, minWidth);
   }
 
-  /// Minimum height of the window.
+  /// Minimum height for the lifetime of the window.
   int get minHeight => JS('int', '#.minHeight', this._jsObject);
 
   void set minHeight(int minHeight) {
     JS('void', '#.minHeight = #', this._jsObject, minHeight);
   }
 
-  /// Maximum width of the window.
+  /// Maximum width for the lifetime of the window.
   int get maxWidth => JS('int', '#.maxWidth', this._jsObject);
 
   void set maxWidth(int maxWidth) {
     JS('void', '#.maxWidth = #', this._jsObject, maxWidth);
   }
 
-  /// Maximum height of the window.
+  /// Maximum height for the lifetime of the window.
   int get maxHeight => JS('int', '#.maxHeight', this._jsObject);
 
   void set maxHeight(int maxHeight) {
     JS('void', '#.maxHeight = #', this._jsObject, maxHeight);
   }
 
-  /// Window type:  'shell' - the default window type  'panel' - a panel, managed
-  /// by the OS (Currently experimental, Ash only)
+  /// Type of window to create.
   String get type => JS('String', '#.type', this._jsObject);
 
   void set type(String type) {
@@ -175,9 +227,9 @@
     JS('void', '#.frame = #', this._jsObject, frame);
   }
 
-  /// Size of the content in the window (excluding the titlebar). If specified in
-  /// addition to any of the left/top/width/height parameters, this field takes
-  /// precedence. If a frameBounds is specified, the frameBounds take precedence.
+  /// Size and position of the content in the window (excluding the titlebar). If
+  /// an id is also specified and a window with a matching id has been shown
+  /// before, the remembered bounds of the window will be used instead.
   AppWindowBounds get bounds => new AppWindowBounds._proxy(JS('', '#.bounds', this._jsObject));
 
   void set bounds(AppWindowBounds bounds) {
@@ -192,6 +244,14 @@
     JS('void', '#.transparentBackground = #', this._jsObject, transparentBackground);
   }
 
+  /// The initial state of the window, allowing it to be created already
+  /// fullscreen, maximized, or minimized. Defaults to 'normal'.
+  String get state => JS('String', '#.state', this._jsObject);
+
+  void set state(String state) {
+    JS('void', '#.state = #', this._jsObject, state);
+  }
+
   /// If true, the window will be created in a hidden state. Call show() on the
   /// window to show it once it has been created. Defaults to false.
   bool get hidden => JS('bool', '#.hidden', this._jsObject);
@@ -200,6 +260,13 @@
     JS('void', '#.hidden = #', this._jsObject, hidden);
   }
 
+  /// If true, the window will be resizable by the user. Defaults to true.
+  bool get resizable => JS('bool', '#.resizable', this._jsObject);
+
+  void set resizable(bool resizable) {
+    JS('void', '#.resizable = #', this._jsObject, resizable);
+  }
+
   /// By default if you specify an id for the window, the window will only be
   /// created if another window with the same id doesn't already exist. If a
   /// window with the same id already exists that window is activated instead. If
@@ -213,55 +280,6 @@
 
 }
 
-class AppWindowBounds extends ChromeObject {
-  /*
-   * Public constructor
-   */
-  AppWindowBounds({int left, int top, int width, int height}) {
-    if (left != null)
-      this.left = left;
-    if (top != null)
-      this.top = top;
-    if (width != null)
-      this.width = width;
-    if (height != null)
-      this.height = height;
-  }
-
-  /*
-   * Private constructor
-   */
-  AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject);
-
-  /*
-   * Public accessors
-   */
-  int get left => JS('int', '#.left', this._jsObject);
-
-  void set left(int left) {
-    JS('void', '#.left = #', this._jsObject, left);
-  }
-
-  int get top => JS('int', '#.top', this._jsObject);
-
-  void set top(int top) {
-    JS('void', '#.top = #', this._jsObject, top);
-  }
-
-  int get width => JS('int', '#.width', this._jsObject);
-
-  void set width(int width) {
-    JS('void', '#.width = #', this._jsObject, width);
-  }
-
-  int get height => JS('int', '#.height', this._jsObject);
-
-  void set height(int height) {
-    JS('void', '#.height = #', this._jsObject, height);
-  }
-
-}
-
 class AppWindowAppWindow extends ChromeObject {
   /*
    * Private constructor
@@ -287,19 +305,25 @@
   /// Focus the window.
   void focus() => JS('void', '#.focus()', this._jsObject);
 
+  /// Fullscreens the window.
+  void fullscreen() => JS('void', '#.fullscreen()', this._jsObject);
+
+  /// Is the window fullscreen?
+  bool isFullscreen() => JS('bool', '#.isFullscreen()', this._jsObject);
+
   /// Minimize the window.
   void minimize() => JS('void', '#.minimize()', this._jsObject);
 
   /// Is the window minimized?
-  void isMinimized() => JS('void', '#.isMinimized()', this._jsObject);
+  bool isMinimized() => JS('bool', '#.isMinimized()', this._jsObject);
 
   /// Maximize the window.
   void maximize() => JS('void', '#.maximize()', this._jsObject);
 
   /// Is the window maximized?
-  void isMaximized() => JS('void', '#.isMaximized()', this._jsObject);
+  bool isMaximized() => JS('bool', '#.isMaximized()', this._jsObject);
 
-  /// Restore the window.
+  /// Restore the window, exiting a maximized, minimized, or fullscreen state.
   void restore() => JS('void', '#.restore()', this._jsObject);
 
   /// Move the window to the position (|left|, |top|).
@@ -369,6 +393,17 @@
   Event_app_window_onClosed(jsObject) : super._(jsObject, 0);
 }
 
+/// Fired when the window is fullscreened.
+class Event_app_window_onFullscreened extends Event {
+  void addListener(void callback()) => super.addListener(callback);
+
+  void removeListener(void callback()) => super.removeListener(callback);
+
+  bool hasListener(void callback()) => super.hasListener(callback);
+
+  Event_app_window_onFullscreened(jsObject) : super._(jsObject, 0);
+}
+
 /// Fired when the window is maximized.
 class Event_app_window_onMaximized extends Event {
   void addListener(void callback()) => super.addListener(callback);
@@ -417,6 +452,7 @@
    */
   Event_app_window_onBoundsChanged onBoundsChanged;
   Event_app_window_onClosed onClosed;
+  Event_app_window_onFullscreened onFullscreened;
   Event_app_window_onMaximized onMaximized;
   Event_app_window_onMinimized onMinimized;
   Event_app_window_onRestored onRestored;
@@ -427,22 +463,17 @@
   /// The size and position of a window can be specified in a number of different
   /// ways. The most simple option is not specifying anything at all, in which
   /// case a default size and platform dependent position will be used.<br/><br/>
-  /// Another option is to use the top/left and width/height properties, which
-  /// will always put the window at the specified coordinates with the specified
-  /// size.<br/><br/> Yet another option is to give the window a (unique) id.
-  /// This id is then used to remember the size and position of the window
-  /// whenever it is moved or resized. This size and position is then used
-  /// instead of the specified bounds on subsequent opening of a window with the
-  /// same id. If you need to open a window with an id at a location other than
-  /// the remembered default, you can create it hidden, move it to the desired
-  /// location, then show it.<br/><br/> You can also combine these various
-  /// options, explicitly specifying for example the size while having the
-  /// position be remembered or other combinations like that. Size and position
-  /// are dealt with seperately, but individual coordinates are not. So if you
-  /// specify a top (or left) coordinate, you should also specify a left (or top)
-  /// coordinate, and similar for size.<br/><br/> If you specify both a regular
-  /// and a default value for the same option the regular value is the only one
-  /// that takes effect.
+  /// Another option is to use the bounds property, which will put the window at
+  /// the specified coordinates with the specified size. If the window has a
+  /// frame, it's total size will be the size given plus the size of the frame;
+  /// that is, the size in bounds is the content size, not the window
+  /// size.<br/><br/> To automatically remember the positions of windows you can
+  /// give them ids. If a window has an id, This id is used to remember the size
+  /// and position of the window whenever it is moved or resized. This size and
+  /// position is then used instead of the specified bounds on subsequent opening
+  /// of a window with the same id. If you need to open a window with an id at a
+  /// location other than the remembered default, you can create it hidden, move
+  /// it to the desired location, then show it.
   // 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.
@@ -477,6 +508,7 @@
   API_app_window(this._jsObject) {
     onBoundsChanged = new Event_app_window_onBoundsChanged(JS('', '#.onBoundsChanged', this._jsObject));
     onClosed = new Event_app_window_onClosed(JS('', '#.onClosed', this._jsObject));
+    onFullscreened = new Event_app_window_onFullscreened(JS('', '#.onFullscreened', this._jsObject));
     onMaximized = new Event_app_window_onMaximized(JS('', '#.onMaximized', this._jsObject));
     onMinimized = new Event_app_window_onMinimized(JS('', '#.onMinimized', this._jsObject));
     onRestored = new Event_app_window_onRestored(JS('', '#.onRestored', this._jsObject));
diff --git a/tools/dom/src/chrome/file_system.dart b/tools/dom/src/chrome/file_system.dart
new file mode 100644
index 0000000..b3d532a
--- /dev/null
+++ b/tools/dom/src/chrome/file_system.dart
@@ -0,0 +1,193 @@
+// 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.
+
+// Generated from namespace: fileSystem
+
+part of chrome;
+
+/**
+ * Types
+ */
+
+class FilesystemAcceptOption extends ChromeObject {
+  /*
+   * Public constructor
+   */
+  FilesystemAcceptOption({String description, List<String> mimeTypes, List<String> extensions}) {
+    if (description != null)
+      this.description = description;
+    if (mimeTypes != null)
+      this.mimeTypes = mimeTypes;
+    if (extensions != null)
+      this.extensions = extensions;
+  }
+
+  /*
+   * Private constructor
+   */
+  FilesystemAcceptOption._proxy(_jsObject) : super._proxy(_jsObject);
+
+  /*
+   * Public accessors
+   */
+  /// This is the optional text description for this option. If not present, a
+  /// description will be automatically generated; typically containing an
+  /// expanded list of valid extensions (e.g. "text/html" may expand to "*.html,
+  /// *.htm").
+  String get description => JS('String', '#.description', this._jsObject);
+
+  void set description(String description) {
+    JS('void', '#.description = #', this._jsObject, description);
+  }
+
+  /// Mime-types to accept, e.g. "image/jpeg" or "audio/*". One of mimeTypes or
+  /// extensions must contain at least one valid element.
+  List<String> get mimeTypes => JS('List<String>', '#.mimeTypes', this._jsObject);
+
+  void set mimeTypes(List<String> mimeTypes) {
+    JS('void', '#.mimeTypes = #', this._jsObject, mimeTypes);
+  }
+
+  /// Extensions to accept, e.g. "jpg", "gif", "crx".
+  List<String> get extensions => JS('List<String>', '#.extensions', this._jsObject);
+
+  void set extensions(List<String> extensions) {
+    JS('void', '#.extensions = #', this._jsObject, extensions);
+  }
+
+}
+
+class FilesystemChooseEntryOptions extends ChromeObject {
+  /*
+   * Public constructor
+   */
+  FilesystemChooseEntryOptions({String type, String suggestedName, List<FilesystemAcceptOption> accepts, bool acceptsAllTypes}) {
+    if (type != null)
+      this.type = type;
+    if (suggestedName != null)
+      this.suggestedName = suggestedName;
+    if (accepts != null)
+      this.accepts = accepts;
+    if (acceptsAllTypes != null)
+      this.acceptsAllTypes = acceptsAllTypes;
+  }
+
+  /*
+   * Private constructor
+   */
+  FilesystemChooseEntryOptions._proxy(_jsObject) : super._proxy(_jsObject);
+
+  /*
+   * Public accessors
+   */
+  /// Type of the prompt to show. The default is 'openFile'.
+  String get type => JS('String', '#.type', this._jsObject);
+
+  void set type(String type) {
+    JS('void', '#.type = #', this._jsObject, type);
+  }
+
+  /// The suggested file name that will be presented to the user as the default
+  /// name to read or write. This is optional.
+  String get suggestedName => JS('String', '#.suggestedName', this._jsObject);
+
+  void set suggestedName(String suggestedName) {
+    JS('void', '#.suggestedName = #', this._jsObject, suggestedName);
+  }
+
+  /// The optional list of accept options for this file opener. Each option will
+  /// be presented as a unique group to the end-user.
+  List<FilesystemAcceptOption> get accepts {
+    List<FilesystemAcceptOption> __proxy_accepts = new List<FilesystemAcceptOption>();
+    int count = JS('int', '#.accepts.length', this._jsObject);
+    for (int i = 0; i < count; i++) {
+      var item = JS('', '#.accepts[#]', this._jsObject, i);
+      __proxy_accepts.add(new FilesystemAcceptOption._proxy(item));
+    }
+    return __proxy_accepts;
+  }
+
+  void set accepts(List<FilesystemAcceptOption> accepts) {
+    JS('void', '#.accepts = #', this._jsObject, convertArgument(accepts));
+  }
+
+  /// Whether to accept all file types, in addition to the options specified in
+  /// the accepts argument. The default is true. If the accepts field is unset or
+  /// contains no valid entries, this will always be reset to true.
+  bool get acceptsAllTypes => JS('bool', '#.acceptsAllTypes', this._jsObject);
+
+  void set acceptsAllTypes(bool acceptsAllTypes) {
+    JS('void', '#.acceptsAllTypes = #', this._jsObject, acceptsAllTypes);
+  }
+
+}
+
+/**
+ * Functions
+ */
+
+class API_file_system {
+  /*
+   * API connection
+   */
+  Object _jsObject;
+
+  /*
+   * Functions
+   */
+  /// Get the display path of a FileEntry object. The display path is based on
+  /// the full path of the file on the local file system, but may be made more
+  /// readable for display purposes.
+  void getDisplayPath(FileEntry fileEntry, void callback(String displayPath)) => JS('void', '#.getDisplayPath(#, #)', this._jsObject, convertArgument(fileEntry), convertDartClosureToJS(callback, 1));
+
+  /// Get a writable FileEntry from another FileEntry. This call will fail if the
+  /// application does not have the 'write' permission under 'fileSystem'.
+  void getWritableEntry(FileEntry fileEntry, void callback(FileEntry fileEntry)) {
+    void __proxy_callback(fileEntry) {
+      if (callback != null) {
+        callback(fileEntry);
+      }
+    }
+    JS('void', '#.getWritableEntry(#, #)', this._jsObject, convertArgument(fileEntry), convertDartClosureToJS(__proxy_callback, 1));
+  }
+
+  /// Gets whether this FileEntry is writable or not.
+  void isWritableEntry(FileEntry fileEntry, void callback(bool isWritable)) => JS('void', '#.isWritableEntry(#, #)', this._jsObject, convertArgument(fileEntry), convertDartClosureToJS(callback, 1));
+
+  /// Ask the user to choose a file.
+  void chooseEntry(void callback(FileEntry fileEntry), [FilesystemChooseEntryOptions options]) {
+    void __proxy_callback(fileEntry) {
+      if (callback != null) {
+        callback(fileEntry);
+      }
+    }
+    JS('void', '#.chooseEntry(#, #)', this._jsObject, convertArgument(options), convertDartClosureToJS(__proxy_callback, 1));
+  }
+
+  /// Returns the file entry with the given id if it can be restored. This call
+  /// will fail otherwise.
+  void restoreEntry(String id, void callback(FileEntry fileEntry)) {
+    void __proxy_callback(fileEntry) {
+      if (callback != null) {
+        callback(fileEntry);
+      }
+    }
+    JS('void', '#.restoreEntry(#, #)', this._jsObject, id, convertDartClosureToJS(__proxy_callback, 1));
+  }
+
+  /// Returns whether a file entry for the given id can be restored, i.e. whether
+  /// restoreEntry would succeed with this id now.
+  void isRestorable(String id, void callback(bool isRestorable)) => JS('void', '#.isRestorable(#, #)', this._jsObject, id, convertDartClosureToJS(callback, 1));
+
+  /// Returns an id that can be passed to restoreEntry to regain access to a
+  /// given file entry. Only the 500 most recently used entries are retained,
+  /// where calls to retainEntry and restoreEntry count as use. If the app has
+  /// the 'retainEntries' permission under 'fileSystem', entries are retained
+  /// indefinitely. Otherwise, entries are retained only while the app is running
+  /// and across restarts.
+  String retainEntry(FileEntry fileEntry) => JS('String', '#.retainEntry(#)', this._jsObject, convertArgument(fileEntry));
+
+  API_file_system(this._jsObject) {
+  }
+}
diff --git a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
index 5b2ec9b..3798c9c 100644
--- a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
@@ -3,8 +3,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// DO NOT EDIT - unless you are editing documentation as per:
-// https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
+// DO NOT EDIT
 // Auto-generated dart:chrome library.
 
 /// Native wrappers for the Chrome Packaged App APIs.
@@ -12,8 +11,8 @@
 /// These functions allow direct access to the Packaged App APIs, allowing
 /// Chrome Packaged Apps to be written using Dart.
 ///
-/// For more information on these APIs, see the
-/// [Chrome APIs Documentation](http://developer.chrome.com/extensions/api_index.html)
+/// For more information on these APIs, see the Chrome.* APIs Documentation:
+///   http://developer.chrome.com/extensions/api_index.html
 library chrome;
 
 import 'dart:_foreign_helper' show JS;
@@ -28,3 +27,4 @@
 // Generated files below this line.
 part "$AUXILIARY_DIR/chrome/app_window.dart";
 part "$AUXILIARY_DIR/chrome/app_runtime.dart";
+part "$AUXILIARY_DIR/chrome/file_system.dart";
\ No newline at end of file
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index 89cc40e..a3c0333 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -63,12 +63,22 @@
 
 
 /**
- * The top-level Window object.
+ * Top-level container for a web page, which is usually a browser tab or window.
+ *
+ * Each web page loaded in the browser has its own [Window], which is a
+ * container for the web page.
+ *
+ * If the web page has any `<iframe>` elements, then each `<iframe>` has its own
+ * [Window] object, which is accessible only to that `<iframe>`.
+ *
+ * See also:
+ *
+ *   * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MDN.
  */
 Window get window => JS('Window', 'window');
 
 /**
- * The top-level Document object.
+ * Root node for all content in a web page.
  */
 HtmlDocument get document => JS('HtmlDocument', 'document');
 
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 4116036..f8973eb 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -59,6 +59,19 @@
 
 Window _window;
 
+/**
+ * Top-level container for a web page, which is usually a browser tab or window.
+ *
+ * Each web page loaded in the browser has its own [Window], which is a
+ * container for the web page.
+ *
+ * If the web page has any `<iframe>` elements, then each `<iframe>` has its own
+ * [Window] object, which is accessible only to that `<iframe>`.
+ *
+ * See also:
+ *
+ *   * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MDN.
+ */
 Window get window {
   if (_window != null) {
     return _window;
@@ -69,6 +82,9 @@
 
 HtmlDocument _document;
 
+/**
+ * Root node for all content in a web page.
+ */
 HtmlDocument get document {
   if (_document != null) {
     return _document;
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate
index 1748306..f977e81 100644
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate
@@ -277,6 +277,10 @@
   @DomName('DOMWindow.onbeforeunload')
   @DocsEditable()
   Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+
+  void moveTo(Point p) {
+    $dom_moveTo(p.x, p.y);
+  }
 }
 
 /**
diff --git a/tools/line_doc_comments.dart b/tools/line_doc_comments.dart
index 942881f..0f0fe51f 100755
--- a/tools/line_doc_comments.dart
+++ b/tools/line_doc_comments.dart
@@ -4,7 +4,7 @@
 library line_doc_comments;
 import 'dart:io';
 
-import '../pkg/pathos/lib/path.dart' as path;
+import '../pkg/path/lib/path.dart' as path;
 
 final oneLineBlock = new RegExp(r'^(\s*)/\*\*\s?(.*)\*/\s*$');
 final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$');
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index 3a4d605..34dcfb2 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -26,7 +26,7 @@
 import '../../sdk/lib/_internal/compiler/implementation/filenames.dart';
 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
 import '../../sdk/lib/_internal/libraries.dart';
-import 'package:pathos/path.dart' as pathos;
+import 'package:path/path.dart' as pathos;
 
 HtmlDiff _diff;
 
@@ -47,7 +47,7 @@
   List<String> includedLibraries = <String>[];
 
   // For libraries that lie within packages but have a different name,
-  // such as the matcher library in package unittest, we can use 
+  // such as the matcher library in package unittest, we can use
   // --extra-lib with a full relative path under pkg, such as
   // --extra-lib=unittest/lib/matcher.dart. These arguments are
   // collected in extraLibraries.
diff --git a/utils/apidoc/apidoc.gyp b/utils/apidoc/apidoc.gyp
index f5ddde0..d6cbe44 100644
--- a/utils/apidoc/apidoc.gyp
+++ b/utils/apidoc/apidoc.gyp
@@ -93,9 +93,10 @@
             '--exclude-lib=http',
             '--exclude-lib=http_server',
             '--exclude-lib=oauth2',
-            '--exclude-lib=pathos',
+            '--exclude-lib=path',
             '--exclude-lib=scheduled_test',
             '--exclude-lib=stack_trace',
+            '--exclude-lib=watcher',
             '--exclude-lib=webdriver',
             '--exclude-lib=yaml',
             '--include-lib=matcher',