Version 0.2.4.0

svn merge -r 14662:15013 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
+ cherry picks: 15023, 15026

git-svn-id: http://dart.googlecode.com/svn/trunk@15029 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/.gitignore b/.gitignore
index 628df58..5c2afd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
 # These ignores are auto-generated from the canonical svn ignore metadata
 # using:
-# 
+#
 #  $ git svn create-ignore
 #
 # Whenever possible, prefer creating ignores in svn and then generating them
@@ -12,9 +12,11 @@
 /dart.Makefile
 /dart.xcodeproj
 /dart2js.target.mk
+/dart2js_bot.target.mk
 /Makefile
 /out
 /runtime.target.mk
+/samples.target.mk
 /upload_sdk.target.mk
 /xcodebuild
 /upload_sdk.vcxproj
@@ -69,3 +71,6 @@
 
 # From the Mac OS X Finder
 .DS_Store
+
+# Pub generated "packages" directories
+packages
diff --git a/client/tools/buildbot_annotated_steps.py b/client/tools/buildbot_annotated_steps.py
index a07d666..6c30144 100755
--- a/client/tools/buildbot_annotated_steps.py
+++ b/client/tools/buildbot_annotated_steps.py
@@ -143,11 +143,10 @@
     os.environ['JAVA_HOME'] = java_home
     print 'Setting java home to'
     print java_home
+    sys.stdout.flush()
 
 def ClobberBuilder():
   """ Clobber the builder before we do the build.
-  Args:
-     - mode: either 'debug' or 'release'
   """
   cmd = [sys.executable,
          './tools/clean_output_directory.py']
diff --git a/compiler/.gitignore b/compiler/.gitignore
index 71d6cd2..36e20ef 100644
--- a/compiler/.gitignore
+++ b/compiler/.gitignore
@@ -3,6 +3,7 @@
 /compiler_corelib_sources.gypi
 /dummy.target.mk
 /dartc.target.mk
+/dart_analyzer.target.mk
 /test_sources.gypi
 /sources.gypi
 /jsonlib_sources.xml
diff --git a/compiler/api.dart b/compiler/api.dart
index 6008863..95102e7 100644
--- a/compiler/api.dart
+++ b/compiler/api.dart
@@ -1,5 +1,5 @@
 #library("api");
-// dart:core and dart:coreimpl are implicit
+// dart:core is implicit
 #import("dart:html");
 #import("dart:json");
 #import("dart:isolate");
diff --git a/compiler/java/com/google/dart/compiler/CommandLineOptions.java b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
index 568c8af..93220fb 100644
--- a/compiler/java/com/google/dart/compiler/CommandLineOptions.java
+++ b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
@@ -30,9 +30,6 @@
         usage = "Batch mode (for unit testing)")
     private boolean batch = false;
 
-    @Option(name = "--expose_core_impl", usage = "Automatic import of dart:coreimpl library")
-    private boolean exposeCoreImpl = false;
-
     @Option(name = "--error_format",
         usage = "Format errors as normal or machine")
     private String errorFormat = "";
@@ -125,13 +122,6 @@
     @Argument
     private final List<String> sourceFiles = new ArrayList<String>();
 
-    /**
-     * @return <code>true</code> to automatically import dart:coreimpl
-     */
-    public boolean shouldExposeCoreImpl() {
-      return exposeCoreImpl;
-    }
-
     public String getJvmMetricOptions() {
       if (!showJvmMetrics) {
         return null;
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index 1d0eb285..5cb4e52 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -5,7 +5,6 @@
 package com.google.dart.compiler;
 
 import com.google.common.base.Objects;
-import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.google.common.collect.Sets.SetView;
@@ -82,54 +81,6 @@
   public static final String CORELIB_URL_SPEC = "dart:core";
   public static final String MAIN_ENTRY_POINT_NAME = "main";
 
-  private static class NamedPlaceHolderLibrarySource implements LibrarySource {
-    private final String name;
-
-    public NamedPlaceHolderLibrarySource(String name) {
-      this.name = name;
-    }
-
-    @Override
-    public boolean exists() {
-      throw new AssertionError();
-    }
-
-    @Override
-    public long getLastModified() {
-      throw new AssertionError();
-    }
-
-    @Override
-    public String getName() {
-      return name;
-    }
-    
-    @Override
-    public Reader getSourceReader() {
-      throw new AssertionError();
-    }
-
-    @Override
-    public String getUniqueIdentifier() {
-      throw new AssertionError();
-    }
-
-    @Override
-    public URI getUri() {
-      throw new AssertionError();
-    }
-
-    @Override
-    public LibrarySource getImportFor(String relPath) {
-      return null;
-    }
-
-    @Override
-    public DartSource getSourceFor(String relPath) {
-      return null;
-    }
-  }
-
   private static class Compiler {
     private final LibrarySource app;
     private final List<LibrarySource> embeddedLibraries = new ArrayList<LibrarySource>();
@@ -1008,7 +959,7 @@
         if (topArgs.length > 1) {
           System.err.println("(Extra arguments specified with -batch ignored.)");
         }
-        UnitTestBatchRunner.runAsBatch(topArgs, new Invocation() {
+        result = UnitTestBatchRunner.runAsBatch(topArgs, new Invocation() {
           @Override
           public boolean invoke(String[] lineArgs) throws Throwable {
             List<String> allArgs = new ArrayList<String>();
@@ -1180,15 +1131,6 @@
                                   DartCompilerListener listener) throws IOException {
     DartCompilerMainContext context = new DartCompilerMainContext(lib, provider, listener,
                                                                   config);
-    if (config.getCompilerOptions().shouldExposeCoreImpl()) {
-      if (embeddedLibraries == null) {
-        embeddedLibraries = Lists.newArrayList();
-      }
-      // use a place-holder LibrarySource instance, to be replaced when embedded
-      // in the compiler, where the dart uri can be resolved.
-      embeddedLibraries.add(new NamedPlaceHolderLibrarySource("dart:core"));
-    }
-
     new Compiler(lib, embeddedLibraries, config, context).compile();
     int errorCount = context.getErrorCount();
     if (config.typeErrorsAreFatal()) {
diff --git a/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java b/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
index 19ca277..ce63509 100644
--- a/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
+++ b/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
@@ -25,7 +25,7 @@
    *
    * @param batchArgs command line arguments forwarded from main().
    */
-  public static void runAsBatch(String[] batchArgs, Invocation toolInvocation) throws Throwable {
+  public static boolean runAsBatch(String[] batchArgs, Invocation toolInvocation) throws Throwable {
     System.out.println(">>> BATCH START");
 
     // Read command lines in from stdin and create a new compiler for each one.
@@ -34,6 +34,7 @@
     long startTime = System.currentTimeMillis();
     int testsFailed = 0;
     int totalTests = 0;
+    boolean batchResult = true;
     try {
       String line;
       for (; (line = cmdlineReader.readLine()) != null; totalTests++) {
@@ -45,6 +46,7 @@
         if (!result) {
           testsFailed++;
         }
+        batchResult &= result;
         // Write stderr end token and flush.
         System.err.println(">>> EOF STDERR");
         System.err.flush();
@@ -63,5 +65,6 @@
     System.out.println(">>> BATCH END (" + (totalTests - testsFailed) + "/"
         + totalTests + ") " + elapsed + "ms");
     System.out.flush();
+    return batchResult;
   }
 }
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index 055b5b0..7537e43 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -2036,7 +2036,6 @@
     List<DartAnnotation> metadata = parseMetadata();
     do {
       beginVariableDeclaration();
-      List<DartAnnotation> fieldMetadata = parseMetadata();
       DartIdentifier name = parseIdentifier();
       DartExpression value = null;
       if (optional(Token.ASSIGN)) {
@@ -2049,7 +2048,7 @@
         reportError(name, ParserErrorCode.EXTERNAL_ONLY_METHOD);
       }
       DartField field = done(new DartField(name, modifiers, null, value));
-      setMetadata(field, fieldMetadata);
+      setMetadata(field, metadata);
       fields.add(field);
     } while (optional(Token.COMMA));
     DartFieldDefinition definition = new DartFieldDefinition(type, fields);
@@ -4931,7 +4930,7 @@
     while (!done) {
       List<DartLabel> labels = new ArrayList<DartLabel>();
       beginSwitchMember(); // switch member
-      while (peek(0) == Token.IDENTIFIER) {
+      while (peek(0) == Token.IDENTIFIER && peek(1) == Token.COLON) {
         beginLabel();
         DartIdentifier identifier = parseIdentifier();
         expect(Token.COLON);
@@ -4951,7 +4950,7 @@
         done = true;
         done(null);
       } else {
-        if (peek(0) != Token.EOS) {
+        if (peek(0) == Token.DEFAULT) {
           members.add(parseDefaultMember(labels));
         }
         expectCloseBrace(foundOpenBrace);
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParserCommentsHelper.java b/compiler/java/com/google/dart/compiler/parser/DartParserCommentsHelper.java
index e21d2b8..46654c3 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParserCommentsHelper.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParserCommentsHelper.java
@@ -153,13 +153,6 @@
           String commentStr = sourceCode.substring(comment.getSourceInfo().getOffset(),
               comment.getSourceInfo().getEnd());
           tokenizeComment(comment, commentStr);
-          // may be @Metadata
-          if (commentStr.contains("@deprecated")) {
-            decl.setObsoleteMetadata(decl.getObsoleteMetadata().makeDeprecated());
-          }
-          if (commentStr.contains("@override")) {
-            decl.setObsoleteMetadata(decl.getObsoleteMetadata().makeOverride());
-          }
           // DartDoc
           if (comment.isDartDoc()) {
             decl.setDartDoc(comment);
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index cea87a6..5fadc57 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -92,13 +92,26 @@
   }
 
   public static LibraryElement getLibraryElement(Element element) {
-    do {
-      if (ElementKind.of(element).equals(ElementKind.LIBRARY)) {
-        break;
+    while (element != null) {
+      if (ElementKind.of(element) == ElementKind.LIBRARY) {
+        return (LibraryElement) element;
       }
-      element = element.getEnclosingElement();
-    } while (element != null && element.getEnclosingElement() != element);
-    return (LibraryElement) element;
+      EnclosingElement enclosingElement = element.getEnclosingElement();
+      if (enclosingElement == element) {
+        return null;
+      }
+      element = enclosingElement;
+    };
+    return null;
+  }
+  
+  /**
+   * @return <code>true</code> if "a" and "b" are declared in the same {@link LibraryElement}.
+   */
+  public static boolean areSameLibrary(Element a, Element b) {
+    LibraryElement aLibrary = getLibraryElement(a);
+    LibraryElement bLibrary = getLibraryElement(b);
+    return Objects.equal(aLibrary, bLibrary);
   }
 
   @VisibleForTesting
@@ -761,9 +774,7 @@
     return Elements.isLibrarySource(source, "/core/corelib.dart")
         || Elements.isLibrarySource(source, "/core/corelib_impl.dart")
         // New core library file names
-        || Elements.isLibrarySource(source, "/core/core.dart")
-        || Elements.isLibrarySource(source, "/core/coreimpl.dart")
-        || Elements.isLibrarySource(source, "/coreimpl/coreimpl.dart");
+        || Elements.isLibrarySource(source, "/core/core.dart");
   }
   
   public static boolean isHtmlLibrarySource(Source source) {
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index 91a5f7c..71d67b2 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -617,6 +617,10 @@
                 ResolverErrorCode.CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR,
                 cls.getSuperclass());
           }
+          if (superCtor != null && superCtor.getModifiers().isFactory()) {
+            onError(cls.getName(), ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, "<default>",
+                supertype);
+          }
         }
       }
     }
@@ -715,7 +719,7 @@
           && !(body instanceof DartNativeBlock)) {
         resolveInitializers(node, initializedFields);
       }
-
+      
       // resolve redirecting factory constructor
       {
         DartTypeNode rcTypeName = node.getRedirectedTypeName();
@@ -1177,6 +1181,9 @@
       } else {
         ClassElement classElement = supertype.getElement();
         element = Elements.lookupConstructor(classElement, name);
+        if (element != null && element.getModifiers().isFactory()) {
+          onError(x, ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, name, supertype);
+        }
         if (element == null && "".equals(name) && x.getArguments().isEmpty()
             && Elements.needsImplicitDefaultConstructor(classElement)) {
           element = new SyntheticDefaultConstructorElement(null, classElement, typeProvider);
@@ -1500,13 +1507,9 @@
         if (element == null) {
           element = getContext().getScope().findElement(null, name);
         }
-        if (element != null) {
-          Element enclosingLibrary = Elements.getLibraryElement(enclosingElement);
-          Element identifierEnclosingLibrary = Elements.getLibraryElement(element);
-          if (!enclosingLibrary.equals(identifierEnclosingLibrary)) {
-            onError(diagnosticNode, ResolverErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, name);
-            return true;
-          }
+        if (!Elements.areSameLibrary(enclosingElement, element)) {
+          onError(diagnosticNode, ResolverErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, name);
+          return true;
         }
       }
       return false;
@@ -1674,10 +1677,8 @@
         break;
         case CONSTRUCTOR:
           if (enclosingElement != null) {
-            Element enclosingLibrary = Elements.getLibraryElement(enclosingElement);
-            Element constructorEnclosingLibrary = Elements.getLibraryElement(element);
             if (element != null && DartIdentifier.isPrivateName(element.getName())
-                && !enclosingLibrary.equals(constructorEnclosingLibrary)) {
+                && !Elements.areSameLibrary(enclosingElement, element)) {
               onError(x.getConstructor(), ResolverErrorCode.ILLEGAL_ACCESS_TO_PRIVATE,
                   element.getName());
               return null;
@@ -2218,10 +2219,12 @@
     }
 
     private void resolveInitializers(DartMethodDefinition node, Set<FieldElement> initializedFields) {
-      Iterator<DartInitializer> initializers = node.getInitializers().iterator();
+      ClassElement classElement = (ClassElement) enclosingElement.getEnclosingElement();
+
       ConstructorElement constructorElement = null;
-      while (initializers.hasNext()) {
-        DartInitializer initializer = initializers.next();
+      boolean hasSuperInvocation = false;
+      for (DartInitializer initializer : node.getInitializers()) {
+        hasSuperInvocation |= initializer.getValue() instanceof DartSuperConstructorInvocation;
         Element element = resolve(initializer);
         if ((ElementKind.of(element) == ElementKind.CONSTRUCTOR) && initializer.isInvocation()) {
           constructorElement = (ConstructorElement) element;
@@ -2232,8 +2235,21 @@
         }
       }
 
+      // If no explicit super() invocation, then implicit call of default super-type constructor.
+      // Check that it is not factory, i.e. generative.
+      if (!hasSuperInvocation && currentHolder instanceof ClassElement) {
+        InterfaceType superType = classElement.getSupertype();
+        if (superType != null) {
+          ClassElement superElement = superType.getElement();
+          ConstructorElement superConstructor = Elements.lookupConstructor(superElement, "");
+          if (superConstructor != null && superConstructor.getModifiers().isFactory()) {
+            onError(node.getName(), ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR,
+                "<default>", superType);
+          }
+        }
+      }
+
       // Look for final fields that are not initialized
-      ClassElement classElement = (ClassElement)enclosingElement.getEnclosingElement();
       Element methodElement = node.getElement();
       if (classElement != null && methodElement != null
           && !classElement.isInterface()
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
index b081100..550ea7e 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
@@ -118,7 +118,7 @@
   FACTORY_CANNOT_BE_CONST("A factory cannot be const"),
   FIELD_DOES_NOT_HAVE_A_GETTER(ErrorSeverity.WARNING, "Field does not have a getter"),
   FIELD_DOES_NOT_HAVE_A_SETTER(ErrorSeverity.WARNING, "Field does not have a setter"),
-  FIELD_GETTER_SETTER_SAME_STATIC("Field's getter and setter should be both static or not static"),
+  FIELD_GETTER_SETTER_SAME_STATIC(ErrorSeverity.WARNING, "Field's getter and setter should be both static or not static"),
   FINAL_FIELD_MUST_BE_INITIALIZED("The final field %s must be initialized"),
   FORMAL_PARAMETER_NAME_EXPECTED("Formal parameter name expected"),
   // TODO(zundel): error message needs JUnit test - how to test #imports in junit?
@@ -170,6 +170,7 @@
   NOT_A_TYPE("type \"%s\" expected, but \"%s\" found"),
   // TODO(zundel): error message needs JUnit test (reachable code?)
   NOT_AN_INSTANCE_FIELD("%s is not an instance field"),
+  NOT_GENERATIVE_SUPER_CONSTRUCTOR("Constructor '%s' in class '%s' is not generative."),
   OPTIONAL_PARAMETERS_CANNOT_START_WITH_UNDER("Optional parameters cannot start with an '_' character"),
   PARAMETER_INIT_OUTSIDE_CONSTRUCTOR("Parameter initializers can only be used in constructors"),
   SUPER_METHOD_INVOCATION_IN_CONSTRUCTOR_INITIALIZER(
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index aea700e..1ca3593 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1398,7 +1398,8 @@
         }
       }
       // print( t[k] )
-      return analyzeBinaryOperator(node, target, Token.INDEX, node, argKey);
+      Type result = analyzeBinaryOperator(node, target, Token.INDEX, node, argKey);
+      return Types.makeInferred(result, target.getQuality());
     }
     
     /**
@@ -1568,12 +1569,8 @@
 
     private void checkIllegalPrivateAccess(DartNode diagnosticNode, Element element, String name) {
       if (DartIdentifier.isPrivateName(name)) {
-        if (element != null) {
-          Element enclosingLibrary = Elements.getLibraryElement(currentMethod);
-          Element identifierEnclosingLibrary = Elements.getLibraryElement(element);
-          if (!enclosingLibrary.equals(identifierEnclosingLibrary)) {
-            onError(diagnosticNode, TypeErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, name);
-          }
+        if (!Elements.areSameLibrary(currentMethod, element)) {
+          onError(diagnosticNode, TypeErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, name);
         }
       }
     }
@@ -3571,11 +3568,18 @@
    */
   public static TypeQuality getTypeQuality(DartExpression expr) {
     if (expr != null) {
-      if (expr instanceof DartMethodInvocation) {
-        return TypeQuality.INFERRED;
+      if (expr instanceof DartIdentifier) {
+        Type varType = expr.getType();
+        if (varType != null) {
+          TypeQuality varTypeQuality = varType.getQuality();
+          if (varTypeQuality == TypeQuality.EXACT) {
+            varTypeQuality = TypeQuality.INFERRED_EXACT;
+          }
+          return varTypeQuality;
+        }
       }
-      if (expr instanceof DartUnqualifiedInvocation) {
-        return TypeQuality.INFERRED;
+      if (expr instanceof DartLiteral) {
+        return TypeQuality.INFERRED_EXACT;
       }
       if (expr instanceof DartUnaryExpression) {
         DartUnaryExpression unary = (DartUnaryExpression) expr;
@@ -3592,10 +3596,15 @@
         return TypeQuality.INFERRED;
       }
       if (expr instanceof DartNewExpression) {
+        DartNewExpression newExpression = (DartNewExpression) expr;
+        ConstructorElement constructorElement = newExpression.getElement();
+        if (constructorElement != null && !constructorElement.getModifiers().isFactory()) {
+          return TypeQuality.INFERRED_EXACT;
+        }
         return TypeQuality.INFERRED;
       }
     }
-    return TypeQuality.INFERRED_EXACT;
+    return TypeQuality.INFERRED;
   }
 
   private static boolean hasTypeBoolIntDouble(DartExpression expr) {
diff --git a/compiler/java/com/google/dart/compiler/type/Types.java b/compiler/java/com/google/dart/compiler/type/Types.java
index d825e85..8ec7a88 100644
--- a/compiler/java/com/google/dart/compiler/type/Types.java
+++ b/compiler/java/com/google/dart/compiler/type/Types.java
@@ -714,6 +714,9 @@
     if (type.getQuality().ordinal() > quality.ordinal()) {
       return type;
     }
+    if (quality == TypeQuality.EXACT) {
+      return type;
+    }
     Set<Class<?>> interfaceSet = getAllImplementedInterfaces(type.getClass());
     if (!interfaceSet.isEmpty()) {
       Class<?>[] interfaces = (Class[]) interfaceSet.toArray(new Class[interfaceSet.size()]);
diff --git a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
index a3cbffa..92247b1 100644
--- a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
@@ -459,16 +459,27 @@
   /**
    * Asserts that {@link Element} with given name has expected type.
    */
-  protected static void assertInferredElementTypeString(DartUnit unit, String variableName,
-      String expectedType, TypeQuality exact) {
+  protected static void assertInferredElementTypeString(
+      DartUnit unit,
+      String variableName,
+      String expectedType,
+      TypeQuality quality) {
     // find element
     Element element = getNamedElement(unit, variableName);
     assertNotNull(element);
     // check type
     Type actualType = element.getType();
-    assertEquals(element.getName(), expectedType, getTypeSource(actualType));
-    if (exact != null) {
-      assertSame(exact, actualType.getQuality());
+    assertInferredElementTypeString(actualType, element.getName(), expectedType, quality);
+  }
+
+  protected static void assertInferredElementTypeString(
+      Type actualType,
+      String testName,
+      String expectedType,
+      TypeQuality quality) {
+    assertEquals(testName, expectedType, getTypeSource(actualType));
+    if (quality != null) {
+      assertSame(quality, actualType.getQuality());
     }
   }
 
diff --git a/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java b/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
index bbd43c1..f455ee5 100644
--- a/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/PackageLibraryManagerTest.java
@@ -34,25 +34,6 @@
   }
 
   public void testExpand2() throws Exception {
-    URI shortUri = new URI("dart:coreimpl");
-    URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
-    assertNotNull(fullUri);
-    assertEquals("dart", fullUri.getScheme());
-    assertEquals("coreimpl", fullUri.getHost());
-    assertTrue(getPath(fullUri).endsWith("/coreimpl.dart"));
-  }
-
-  public void testExpand3() throws Exception {
-    URI shortUri = new URI("dart:coreimpl");
-    URI fullUri1 = packageLibraryManager.expandRelativeDartUri(shortUri);
-    URI fullUri2 = packageLibraryManager.expandRelativeDartUri(fullUri1);
-    assertNotNull(fullUri2);
-    assertEquals("dart", fullUri2.getScheme());
-    assertEquals("coreimpl", fullUri2.getHost());
-    assertTrue(getPath(fullUri2).endsWith("/coreimpl.dart"));
-  }
-
-  public void testExpand4() throws Exception {
     URI shortUri = new URI("dart:doesnotexist");
     URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
     assertNull(fullUri);
@@ -69,16 +50,6 @@
   }
 
   public void testTranslate2() throws Exception {
-    URI shortUri = new URI("dart:coreimpl");
-    URI fullUri = packageLibraryManager.expandRelativeDartUri(shortUri);
-    URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
-    assertNotNull(translatedURI);
-    String scheme = translatedURI.getScheme();
-    assertTrue(scheme.equals("file"));
-    assertTrue(getPath(translatedURI).endsWith("/coreimpl.dart"));
-  }
-
-  public void testTranslate3() throws Exception {
     URI fullUri = new URI("dart://doesnotexist/some/file.dart");
     URI translatedURI = packageLibraryManager.resolveDartUri(fullUri);
     assertNotNull(translatedURI);
diff --git a/compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java b/compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java
index 50b18c1..4e205e4 100644
--- a/compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java
+++ b/compiler/javatests/com/google/dart/compiler/SystemLibrariesReaderTest.java
@@ -43,19 +43,6 @@
             + "\n  could not find " + file);
       }
     }
-
-    // check content
-    //   "coreimpl": const LibraryInfo(
-    //       "coreimpl/coreimpl_runtime.dart",
-    //       implementation: true,
-    //       dart2jsPath: "compiler/implementation/lib/coreimpl.dart",
-    //       dart2jsPatchPath: "compiler/implementation/lib/coreimpl_patch.dart")
-    DartLibrary library = librariesMap.get("dart:coreimpl");
-    assertTrue(library != null);
-    assertEquals("dart:coreimpl",library.getShortName());
-    assertTrue(library.isImplementation());
-    assertEquals("Shared", library.getCategory());   
-    
   }
   
 }
diff --git a/compiler/javatests/com/google/dart/compiler/parser/StringBuffer.dart b/compiler/javatests/com/google/dart/compiler/parser/StringBuffer.dart
index 8d247eb..618b469 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/StringBuffer.dart
+++ b/compiler/javatests/com/google/dart/compiler/parser/StringBuffer.dart
@@ -49,7 +49,7 @@
    * Appends [str] to the buffer.
    */
   void append(String str) {
-    if (str === null || str.isEmpty) return;
+    if (str == null || str.isEmpty) return;
     buffer_.add(str);
     length_ += str.length;
   }
diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
index f977713..5b4ab91 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -1199,34 +1199,6 @@
     }
   }
 
-  public void test_metadata_deprecated_obsolete() {
-    String code = makeCode(
-        "// filler filler filler filler filler filler filler filler filler filler",
-        "class A {",
-        "  m0() {}",
-        "  // @deprecated",
-        "  m1() {}",
-        "}",
-        "");
-    DartUnit unit = parseUnit(getName() + ".dart", code);
-    // A
-    {
-      DartClass classA = (DartClass) unit.getTopLevelNodes().get(0);
-      // m0()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(0);
-        assertEquals("m0", method.getName().toSource());
-        assertEquals(false, method.getObsoleteMetadata().isDeprecated());
-      }
-      // m1()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(1);
-        assertEquals("m1", method.getName().toSource());
-        assertEquals(true, method.getObsoleteMetadata().isDeprecated());
-      }
-    }
-  }
-
   public void test_metadata_override() {
     String code = makeCode(
         "class A {",
@@ -1284,68 +1256,6 @@
     }
   }
 
-  public void test_metadata_override_obsolete() {
-    String code = makeCode(
-        "// filler filler filler filler filler filler filler filler filler filler",
-        "class A {",
-        "  m0() {}",
-        "  // @override",
-        "  m1() {}",
-        "  /** Leading DartDoc comment */",
-        "  // @override",
-        "  m2() {}",
-        "  /**",
-        "   * DartDoc comment",
-        "   * @override",
-        "   */",
-        "  m3() {}",
-        "}",
-        "");
-    DartUnit unit = parseUnit(getName() + ".dart", code);
-    // A
-    {
-      DartClass classA = (DartClass) unit.getTopLevelNodes().get(0);
-      // m0()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(0);
-        assertEquals("m0", method.getName().toSource());
-        assertEquals(false, method.getObsoleteMetadata().isOverride());
-        assertNull(method.getDartDoc());
-      }
-      // m1()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(1);
-        assertEquals("m1", method.getName().toSource());
-        assertEquals(true, method.getObsoleteMetadata().isOverride());
-        assertNull(method.getDartDoc());
-      }
-      // m2()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(2);
-        assertEquals("m2", method.getName().toSource());
-        assertEquals(true, method.getObsoleteMetadata().isOverride());
-        {
-          DartComment dartDoc = method.getDartDoc();
-          assertNotNull(dartDoc);
-          assertEquals("/** Leading DartDoc comment */", getNodeSource(code, dartDoc));
-        }
-      }
-      // m3()
-      {
-        DartMethodDefinition method = (DartMethodDefinition) classA.getMembers().get(3);
-        assertEquals("m3", method.getName().toSource());
-        assertEquals(true, method.getObsoleteMetadata().isOverride());
-        {
-          DartComment dartDoc = method.getDartDoc();
-          assertNotNull(dartDoc);
-          String commentCode = getNodeSource(code, dartDoc);
-          assertTrue(commentCode.contains("DartDoc comment"));
-          assertTrue(commentCode.contains("@override"));
-        }
-      }
-    }
-  }
-
   public void test_operators_valid() throws Exception {
     parseUnit("operators.dart",
         Joiner.on("\n").join(
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 8e46da1..f1a8dcb 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -1635,16 +1635,17 @@
   public void test_metadataCommentOverride_Bad_method() throws Exception {
     AnalyzeLibraryResult result = analyzeLibrary(
         "// filler filler filler filler filler filler filler filler filler filler",
+        "const override = 0;",
         "class A {",
         "}",
         "class B extends A {",
-        "  // @override",
+        "  @override",
         "  foo() {}",
         "}",
         "");
     assertErrors(
         result.getErrors(),
-        errEx(ResolverErrorCode.INVALID_OVERRIDE_METADATA, 6, 3, 3));
+        errEx(ResolverErrorCode.INVALID_OVERRIDE_METADATA, 7, 3, 3));
   }
 
   public void testImplementsAndOverrides5() throws Exception {
@@ -1888,17 +1889,13 @@
             "");
     assertErrors(result.getErrors());
   }
-
+  
   public void test_inferredTypes_noMemberWarnings() throws Exception {
     // disabled by default
     {
       AnalyzeLibraryResult result = analyzeLibrary(
           "// filler filler filler filler filler filler filler filler filler filler",
           "class A {}",
-          "class B extends A {",
-          "  var f;",
-          "  m() {}",
-          "}",
           "foo(A a) {",
           "  var v = a;",
           "  v.f = 0;",
@@ -1918,10 +1915,6 @@
       AnalyzeLibraryResult result = analyzeLibrary(
           "// filler filler filler filler filler filler filler filler filler filler",
           "class A {}",
-          "class B extends A {",
-          "  var f;",
-          "  m() {}",
-          "}",
           "foo(A a) {",
           "  var v = a;",
           "  v.f = 0;",
@@ -1930,8 +1923,8 @@
           "");
       assertErrors(
           result.getErrors(),
-          errEx(TypeErrorCode.NOT_A_MEMBER_OF_INFERRED, 9, 5, 1),
-          errEx(TypeErrorCode.INTERFACE_HAS_NO_METHOD_NAMED_INFERRED, 10, 5, 1));
+          errEx(TypeErrorCode.NOT_A_MEMBER_OF_INFERRED, 5, 5, 1),
+          errEx(TypeErrorCode.INTERFACE_HAS_NO_METHOD_NAMED_INFERRED, 6, 5, 1));
     }
   }
 
@@ -2041,7 +2034,29 @@
     assertInferredElementTypeString(testUnit, "v4", "double", INFERRED_EXACT);
     assertInferredElementTypeString(testUnit, "v5", "double", INFERRED_EXACT);
     assertInferredElementTypeString(testUnit, "v6", "Map<String, int>", INFERRED);
-    assertInferredElementTypeString(testUnit, "v7", "int", INFERRED_EXACT);
+    assertInferredElementTypeString(testUnit, "v7", "int", INFERRED);
+  }
+  
+  public void test_typesPropagation_arrayAccess() throws Exception {
+    analyzeLibrary(
+        "class A {}",
+        "class B extends A {}",
+        "List<A> list() => [new B()];",
+        "main() {",
+        "  var v0 = list();",
+        "  var v1 = list();",
+        "  var v2 = v1[0];",
+        "}",
+        "");
+    {
+      DartExpression expr = findNode(DartUnqualifiedInvocation.class, "list();");
+      assertInferredElementTypeString(expr.getType(), "v0", "List<A>", EXACT);
+    }
+    assertInferredElementTypeString(testUnit, "v1", "List<A>", INFERRED);
+    {
+      DartExpression expr = findNode(DartArrayAccess.class, "v1[0]");
+      assertInferredElementTypeString(expr.getType(), "v2", "A", INFERRED);
+    }
   }
 
   /**
@@ -3200,8 +3215,8 @@
         "}",
         "");
     assertErrors(libraryResult.getErrors());
-    assertInferredElementTypeString(testUnit, "v1", "int", INFERRED_EXACT);
-    assertInferredElementTypeString(testUnit, "v2", "bool", INFERRED_EXACT);
+    assertInferredElementTypeString(testUnit, "v1", "int", INFERRED);
+    assertInferredElementTypeString(testUnit, "v2", "bool", INFERRED);
   }
 
   public void test_getType_getterInNegation_generic() throws Exception {
@@ -3225,8 +3240,8 @@
         "}",
         "");
     assertErrors(libraryResult.getErrors());
-    assertInferredElementTypeString(testUnit, "v1", "bool", INFERRED_EXACT);
-    assertInferredElementTypeString(testUnit, "v2", "bool", INFERRED_EXACT);
+    assertInferredElementTypeString(testUnit, "v1", "bool", INFERRED);
+    assertInferredElementTypeString(testUnit, "v2", "bool", INFERRED);
   }
 
   public void test_getType_getterInSwitch_default() throws Exception {
@@ -3689,14 +3704,14 @@
   public void test_metadataComment_deprecated_1() throws Exception {
     AnalyzeLibraryResult libraryResult = analyzeLibrary(
         "// filler filler filler filler filler filler filler filler filler filler",
-        "// @deprecated",
+        "const deprecated = 0;",
+        "@deprecated",
         "ttt() {}",
         "class A {",
-        "  // @deprecated",
-        "  var fff;",
-        "  // @deprecated",
+        "  var @deprecated fff;",
+        "  @deprecated",
         "  mmmm() {}",
-        "  // @deprecated",
+        "  @deprecated",
         "  operator + (other) {}",
         "}",
         "method() {",
@@ -3718,10 +3733,11 @@
   public void test_metadataComment_deprecated_2() throws Exception {
     AnalyzeLibraryResult libraryResult = analyzeLibrary(
         "// filler filler filler filler filler filler filler filler filler filler",
-        "// @deprecated",
+        "const deprecated = 0;",
+        "@deprecated",
         "class A {",
         "  A.named() {}",
-        "  // @deprecated",
+        "  @deprecated",
         "  A.depreca() {}",
         "}",
         "method() {",
@@ -3731,9 +3747,9 @@
         "");
     assertErrors(
         libraryResult.getErrors(),
-        errEx(TypeErrorCode.DEPRECATED_ELEMENT, 9, 7, 1),
         errEx(TypeErrorCode.DEPRECATED_ELEMENT, 10, 7, 1),
-        errEx(TypeErrorCode.DEPRECATED_ELEMENT, 10, 9, 7));
+        errEx(TypeErrorCode.DEPRECATED_ELEMENT, 11, 7, 1),
+        errEx(TypeErrorCode.DEPRECATED_ELEMENT, 11, 9, 7));
   }
   
   public void test_metadata_resolving() throws Exception {
@@ -4349,7 +4365,7 @@
         "  var v = s..length;",
         "}",
         "");
-    assertInferredElementTypeString(testUnit, "v", "String", INFERRED_EXACT);
+    assertInferredElementTypeString(testUnit, "v", "String", INFERRED);
   }
 
   /**
@@ -5570,4 +5586,43 @@
       assertEquals("A", node.getClassElement().getName());
     }
   }
+
+  public void test_notGenerativeConstructor_default() throws Exception {
+    AnalyzeLibraryResult result = analyzeLibrary(
+        "// filler filler filler filler filler filler filler filler filler filler",
+        "class A {",
+        "  factory A() {",
+        "    return null;",
+        "  }",
+        "}",
+        "class B extends A {",
+        "  B() : super() {}", // explicit call of super constructor
+        "}",
+        "class C extends A {",
+        "  C() {}", // implicit call of super constructor
+        "}",
+        "class D extends A {", // implicit call of super constructor
+        "}",
+        "");
+    assertErrors(result.getErrors(),
+        errEx(ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, 8, 9, 7),
+        errEx(ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, 11, 3, 1),
+        errEx(ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, 13, 7, 1));
+  }
+  
+  public void test_notGenerativeConstructor_explicitNamed() throws Exception {
+    AnalyzeLibraryResult result = analyzeLibrary(
+        "// filler filler filler filler filler filler filler filler filler filler",
+        "class A {",
+        "  factory A.named() {",
+        "    return null;",
+        "  }",
+        "}",
+        "class B extends A {",
+        "  B() : super.named() {}", // explicit call of super constructor
+        "}",
+        "");
+    assertErrors(result.getErrors(),
+        errEx(ResolverErrorCode.NOT_GENERATIVE_SUPER_CONSTRUCTOR, 8, 9, 13));
+  }
 }
diff --git a/pkg/args/lib/args.dart b/pkg/args/lib/args.dart
index ad0d907..12ea745 100644
--- a/pkg/args/lib/args.dart
+++ b/pkg/args/lib/args.dart
@@ -200,9 +200,9 @@
  * options and flags from them.
  */
 class ArgParser {
-  static const _SOLO_OPT = const RegExp(r'^-([a-zA-Z0-9])$');
-  static const _ABBR_OPT = const RegExp(r'^-([a-zA-Z0-9]+)(.*)$');
-  static const _LONG_OPT = const RegExp(r'^--([a-zA-Z\-_0-9]+)(=(.*))?$');
+  static final _SOLO_OPT = new RegExp(r'^-([a-zA-Z0-9])$');
+  static final _ABBR_OPT = new RegExp(r'^-([a-zA-Z0-9]+)(.*)$');
+  static final _LONG_OPT = new RegExp(r'^--([a-zA-Z\-_0-9]+)(=(.*))?$');
 
   final Map<String, _Option> _options;
 
diff --git a/pkg/args/test/args_test.dart b/pkg/args/test/args_test.dart
index 6111296..10c68fe 100644
--- a/pkg/args/test/args_test.dart
+++ b/pkg/args/test/args_test.dart
@@ -681,7 +681,7 @@
   var lines = text.split('\n');
 
   // Count the indentation of the last line.
-  var whitespace = const RegExp('^ *');
+  var whitespace = new RegExp('^ *');
   var indent = whitespace.firstMatch(lines[lines.length - 1])[0].length;
 
   // Drop the last line. It only exists for specifying indentation.
diff --git a/pkg/fixnum/fixnum.dart b/pkg/fixnum/lib/fixnum.dart
similarity index 73%
rename from pkg/fixnum/fixnum.dart
rename to pkg/fixnum/lib/fixnum.dart
index 837564c..4ac6f2a 100644
--- a/pkg/fixnum/fixnum.dart
+++ b/pkg/fixnum/lib/fixnum.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library fixnum;
-import 'dart:math' as Math;
-part 'intx.dart';
-part 'int32.dart';
-part 'int64.dart';
+
+part 'src/intx.dart';
+part 'src/int32.dart';
+part 'src/int64.dart';
diff --git a/pkg/fixnum/int32.dart b/pkg/fixnum/lib/src/int32.dart
similarity index 100%
rename from pkg/fixnum/int32.dart
rename to pkg/fixnum/lib/src/int32.dart
diff --git a/pkg/fixnum/int64.dart b/pkg/fixnum/lib/src/int64.dart
similarity index 99%
rename from pkg/fixnum/int64.dart
rename to pkg/fixnum/lib/src/int64.dart
index 47ade36..cefb2c0 100644
--- a/pkg/fixnum/int64.dart
+++ b/pkg/fixnum/lib/src/int64.dart
@@ -189,7 +189,7 @@
   }
 
   factory int64.fromBytes(List<int> bytes) {
-    int top = bytes[7] & 0xff; 
+    int top = bytes[7] & 0xff;
     top <<= 8;
     top |= bytes[6] & 0xff;
     top <<= 8;
@@ -197,7 +197,7 @@
     top <<= 8;
     top |= bytes[4] & 0xff;
 
-    int bottom = bytes[3] & 0xff; 
+    int bottom = bytes[3] & 0xff;
     bottom <<= 8;
     bottom |= bytes[2] & 0xff;
     bottom <<= 8;
@@ -209,7 +209,7 @@
   }
 
   factory int64.fromBytesBigEndian(List<int> bytes) {
-    int top = bytes[0] & 0xff; 
+    int top = bytes[0] & 0xff;
     top <<= 8;
     top |= bytes[1] & 0xff;
     top <<= 8;
@@ -217,7 +217,7 @@
     top <<= 8;
     top |= bytes[3] & 0xff;
 
-    int bottom = bytes[4] & 0xff; 
+    int bottom = bytes[4] & 0xff;
     bottom <<= 8;
     bottom |= bytes[5] & 0xff;
     bottom <<= 8;
@@ -458,7 +458,7 @@
     if (negative) {
       a2 += 0x3 << _BITS2; // add extra one bits on the left
     }
-    
+
     if (n < _BITS) {
       res2 = _shiftRight(a2, n);
       if (negative) {
diff --git a/pkg/fixnum/intx.dart b/pkg/fixnum/lib/src/intx.dart
similarity index 100%
rename from pkg/fixnum/intx.dart
rename to pkg/fixnum/lib/src/intx.dart
diff --git a/pkg/fixnum/test/int_32_test.dart b/pkg/fixnum/test/int_32_test.dart
index 9d5cafee..7ea6591 100644
--- a/pkg/fixnum/test/int_32_test.dart
+++ b/pkg/fixnum/test/int_32_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library int32test;
-import '../fixnum.dart';
+import '../lib/fixnum.dart';
 
 void main() {
   Expect.equals("0", new int32.fromInt(0).toString());
diff --git a/pkg/fixnum/test/int_64_test.dart b/pkg/fixnum/test/int_64_test.dart
index cd79122..65d47b3 100644
--- a/pkg/fixnum/test/int_64_test.dart
+++ b/pkg/fixnum/test/int_64_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library int64test;
-import '../fixnum.dart';
+import '../lib/fixnum.dart';
 
 void main() {
   testAdditive();
@@ -102,7 +102,7 @@
   Expect.isTrue(!(new int64.fromInt(12) == new int64.fromInt(11)));
   Expect.isTrue(new int64.fromInt(12) >= new int64.fromInt(11));
   Expect.isTrue(new int64.fromInt(12) > new int64.fromInt(11));
-  
+
   Expect.isTrue(new int64.fromInt(-10) > new int64.fromInt(-11));
   Expect.isTrue(new int64.fromInt(10) > new int64.fromInt(-11));
   Expect.isTrue(!(new int64.fromInt(-10) > new int64.fromInt(11)));
@@ -214,7 +214,7 @@
   Expect.equals(int64.ZERO, int64.ONE ~/ int64.TWO);
   Expect.equals(new int64.fromInts(0x3fffffff, 0xffffffff),
     int64.MAX_VALUE ~/ int64.TWO);
-  
+
   Expect.equals(int64.ZERO, int64.ZERO ~/ new int64.fromInt(1000));
   Expect.equals(int64.ONE, int64.MIN_VALUE ~/ int64.MIN_VALUE);
   Expect.equals(int64.ZERO, new int64.fromInt(1000) ~/ int64.MIN_VALUE);
@@ -235,7 +235,7 @@
     new int64.fromInt(1000000000) ~/ new int64.fromInt(8192));
   Expect.equals(new int64.fromInt(122055),
     new int64.fromInt(1000000000) ~/ new int64.fromInt(8193));
-  
+
   Expect.equals(new int64.fromInts(0x1fffff, 0xffffffff),
     int64.MAX_VALUE ~/ new int64.fromInts(0x00000000, 0x00000400));
   Expect.equals(new int64.fromInts(0x1fff, 0xffffffff),
@@ -250,7 +250,7 @@
     int64.MAX_VALUE ~/ new int64.fromInts(0x00040000, 0x00000000));
   Expect.equals(new int64.fromInt(31),
     int64.MAX_VALUE ~/ new int64.fromInts(0x04000000, 0x00000000));
-  
+
   Expect.equals(new int64.fromInts(0x2AAAAA, 0xAAAAAAAA),
       int64.MAX_VALUE ~/ new int64.fromInts(0x00000000, 0x00000300));
   Expect.equals(new int64.fromInts(0x2, 0xAAAAAAAA),
@@ -347,13 +347,13 @@
   Expect.equals(new int64.fromInt(0),
     new int64.fromInt(100) * new int64.fromInt(0));
 
-  Expect.equals(new int64.fromInts(0x7ff63f7c, 0x1df4d840), 
+  Expect.equals(new int64.fromInts(0x7ff63f7c, 0x1df4d840),
       new int64.fromInts(0x12345678, 0x12345678) *
       new int64.fromInts(0x1234, 0x12345678));
-  Expect.equals(new int64.fromInts(0x7ff63f7c, 0x1df4d840), 
+  Expect.equals(new int64.fromInts(0x7ff63f7c, 0x1df4d840),
       new int64.fromInts(0xf2345678, 0x12345678) *
       new int64.fromInts(0x1234, 0x12345678));
-  Expect.equals(new int64.fromInts(0x297e3f7c, 0x1df4d840), 
+  Expect.equals(new int64.fromInts(0x297e3f7c, 0x1df4d840),
       new int64.fromInts(0xf2345678, 0x12345678) *
       new int64.fromInts(0xffff1234, 0x12345678));
 
@@ -435,7 +435,7 @@
     (-new int64.fromInts(8, 0)) >> 1);
   Expect.equals(new int64.fromInts(0x7ffffffc, 0x0),
     (-new int64.fromInts(8, 0)).shiftRightUnsigned(1));
-  
+
   Expect.equals(new int64.fromInts(0x00723456, 0x789abcde),
       new int64.fromInts(0x72345678, 0x9abcdef0) >> 8);
   Expect.equals(new int64.fromInts(0x00007234, 0x56789abc),
@@ -473,7 +473,7 @@
       new int64.fromInts(0x72345678, 0x9abcde00).shiftRightUnsigned(44));
   Expect.equals(new int64.fromInts(0x00000000, 0x00007234),
       new int64.fromInts(0x72345678, 0x9abcdef0).shiftRightUnsigned(48));
-  
+
   Expect.equals(new int64.fromInts(0xff923456, 0x789abcde),
       new int64.fromInts(0x92345678, 0x9abcdef0) >> 8);
   Expect.equals(new int64.fromInts(0xffff9234, 0x56789abc),
diff --git a/pkg/fixnum/test/int_64_vm_test.dart b/pkg/fixnum/test/int_64_vm_test.dart
index 97e985c..ee1fd74 100644
--- a/pkg/fixnum/test/int_64_vm_test.dart
+++ b/pkg/fixnum/test/int_64_vm_test.dart
@@ -5,10 +5,13 @@
 // A test to compare the results of the fixnum library with the Dart VM
 
 library int64vmtest;
-import 'dart:math', prefix: 'Math';
-part '../intx.dart';
-part '../int32.dart';
-part '../int64.dart';
+import 'dart:math' as math;
+
+part '../lib/src/int32.dart';
+part '../lib/src/int64.dart';
+part '../lib/src/intx.dart';
+
+final random = new math.Random();
 
 void main() {
   int64VMTest test = new int64VMTest();
@@ -39,9 +42,9 @@
 int64 _randomInt64() {
   int i = 0;
   for (int b = 0; b < 64; b++) {
-      double rand = Math.random();
+      double rand = random.nextDouble();
       for (int j = 0; j < DISCARD; j++) {
-        rand = Math.random();
+        rand = random.nextDouble();
       }
       i = (i << 1) | ((rand > 0.5) ? 1 : 0);
   }
@@ -49,9 +52,9 @@
 }
 
 int _randomInt(int n) {
-  double rand = Math.random();
+  double rand = random.nextDouble();
   for (int i = 0; i < DISCARD; i++) {
-    rand = Math.random();
+    rand = random.nextDouble();
   }
   return (rand * n).floor().toInt();
 }
@@ -100,7 +103,7 @@
   static const int BASE_VALUES = 32;
   static const int RANDOM_TESTS = 32;
   List<int64> TEST_VALUES;
-  
+
   int64VMTest() {
     Set<int64> testSet = new Set<int64>();
     for (int i = 0; i < BASE_VALUES; i++) {
@@ -275,7 +278,7 @@
       Expect.fail("${op.name}: val0 = $val0, val1 = $val1");
     }
   }
-  
+
   void doTestBoolean(BooleanOp op) {
     print("Testing operator ${op.name}");
     for (int i = 0; i < TEST_VALUES.length; i++) {
@@ -308,7 +311,7 @@
       Expect.fail("${op.name}: val = $val, shift = $shift");
     }
   }
- 
+
   void doTestShift(ShiftOp op) {
     print("Testing operator ${op.name}");
     for (int i = 0; i < TEST_VALUES.length; i++) {
diff --git a/pkg/http/lib/http.dart b/pkg/http/lib/http.dart
index d13b2fb..4ee2c61 100644
--- a/pkg/http/lib/http.dart
+++ b/pkg/http/lib/http.dart
@@ -65,6 +65,7 @@
 export 'src/base_client.dart';
 export 'src/base_request.dart';
 export 'src/base_response.dart';
+export 'src/curl_client.dart';
 export 'src/client.dart';
 export 'src/multipart_file.dart';
 export 'src/multipart_request.dart';
diff --git a/pkg/http/lib/src/curl_client.dart b/pkg/http/lib/src/curl_client.dart
new file mode 100644
index 0000000..079d1c3
--- /dev/null
+++ b/pkg/http/lib/src/curl_client.dart
@@ -0,0 +1,187 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 curl_client;
+
+import 'dart:io';
+
+import 'base_client.dart';
+import 'base_request.dart';
+import 'streamed_response.dart';
+import 'utils.dart';
+
+/// A drop-in replacement for [Client] that uses the `curl` command-line utility
+/// rather than [dart:io] to make requests. This class will only exist
+/// temporarily until [dart:io] natively supports requests over HTTPS.
+class CurlClient extends BaseClient {
+  /// The path to the `curl` executable to run. By default, this will look up
+  /// `curl` on the system path.
+  final String executable;
+
+  /// Creates a new [CurlClient] with [executable] as the path to the `curl`
+  /// executable. By default, this will look up `curl` on the system path.
+  CurlClient([String executable])
+    : executable = executable == null ? "curl" : executable;
+
+  /// Sends a request via `curl` and returns the response.
+  Future<StreamedResponse> send(BaseRequest request) {
+    var requestStream = request.finalize();
+    return withTempDir((tempDir) {
+      var headerFile = new Path(tempDir).append("curl-headers").toNativePath();
+      var arguments = _argumentsForRequest(request, headerFile);
+      var process;
+      return Process.start("curl", arguments).chain((process_) {
+        process = process_;
+        if (requestStream.closed) {
+          process.stdin.close();
+        } else {
+          requestStream.pipe(process.stdin);
+        }
+
+        return _waitForHeaders(process, expectBody: request.method != "HEAD");
+      }).chain((_) => new File(headerFile).readAsLines())
+        .transform((lines) => _buildResponse(process, lines));
+    });
+  }
+
+  /// Returns the list of arguments to `curl` necessary for performing
+  /// [request]. [headerFile] is the path to the file where the response headers
+  /// should be stored.
+  List<String> _argumentsForRequest(BaseRequest request, String headerFile) {
+    var arguments = ["--dump-header", headerFile];
+    if (request.method == 'HEAD') {
+      arguments.add("--head");
+    } else {
+      arguments.add("--request");
+      arguments.add(request.method);
+    }
+    if (request.followRedirects) {
+      arguments.add("--location");
+      arguments.add("--max-redirs");
+      arguments.add(request.maxRedirects.toString());
+    }
+    if (request.contentLength != 0)  {
+      arguments.add("--data-binary");
+      arguments.add("@-");
+    }
+
+    // Override the headers automatically added by curl. We want to make it
+    // behave as much like the dart:io client as possible.
+    var headers = {
+      'accept': '',
+      'user-agent': ''
+    };
+    mapAddAll(headers, request.headers);
+    if (request.contentLength < 0) {
+      headers['content-length'] = '';
+      headers['transfer-encoding'] = 'chunked';
+    } else if (request.contentLength > 0) {
+      headers['content-length'] = request.contentLength.toString();
+    }
+
+    headers.forEach((name, value) {
+      arguments.add("--header");
+      arguments.add("$name: $value");
+    });
+    arguments.add(request.url.toString());
+
+    return arguments;
+  }
+
+  /// Returns a [Future] that completes once the `curl` [process] has finished
+  /// receiving the response headers. [expectBody] indicates that the server is
+  /// expected to send a response body (which is not the case for HEAD
+  /// requests).
+  Future _waitForHeaders(Process process, {bool expectBody}) {
+    var exitCompleter = new Completer<int>();
+    var exitFuture = exitCompleter.future;
+    process.onExit = (exitCode) {
+      if (exitCode == 0) {
+        exitCompleter.complete(0);
+        return;
+      }
+
+      chainToCompleter(consumeInputStream(process.stderr)
+            .transform((stderrBytes) {
+        var message = new String.fromCharCodes(stderrBytes);
+        if (exitCode == 47) {
+          throw new RedirectLimitExceededException(message);
+        } else {
+          throw new HttpException(message);
+        }
+      }), exitCompleter);
+    };
+
+    // If there's not going to be a response body (e.g. for HEAD requests), curl
+    // prints the headers to stdout instead of the body. We want to wait until
+    // all the headers are received to read them from the header file.
+    if (!expectBody) {
+      return Futures.wait([
+        consumeInputStream(process.stdout),
+        exitFuture
+      ]);
+    }
+
+    var completer = new Completer();
+    resetCallbacks() {
+      process.stdout.onData = null;
+      process.stdout.onError = null;
+      process.stdout.onClosed = null;
+    }
+    process.stdout.onData = () {
+      // TODO(nweiz): If an error happens after the body data starts being
+      // received, it should be piped through Response.stream once issue
+      // 3657 is fixed.
+      exitFuture.handleException((e) => true);
+      resetCallbacks();
+      completer.complete(null);
+    };
+    process.stdout.onError = (e) {
+      resetCallbacks();
+      completer.completeException(e);
+    };
+    process.stdout.onClosed = () {
+      resetCallbacks();
+      chainToCompleter(exitFuture, completer);
+    };
+    return completer.future;
+  }
+
+  /// Returns a [StreamedResponse] from the response data printed by the `curl`
+  /// [process]. [lines] are the headers that `curl` wrote to a file.
+  StreamedResponse _buildResponse(Process process, List<String> lines) {
+    // When curl follows redirects, it prints the redirect headers as well as
+    // the headers of the final request. Each block is separated by a blank
+    // line. We just care about the last block. There is one trailing empty
+    // line, though, which we don't want to consider a separator.
+    var lastBlank = lines.lastIndexOf("", lines.length - 2);
+    if (lastBlank != -1) lines.removeRange(0, lastBlank + 1);
+
+    var statusParts = lines.removeAt(0).split(" ");
+    var status = int.parse(statusParts[1]);
+    var isRedirect = status >= 300 && status < 400;
+    var reasonPhrase =
+        Strings.join(" ", statusParts.getRange(2, statusParts.length - 2));
+    var headers = <String>{};
+    for (var line in lines) {
+      if (line.isEmpty) continue;
+      var split = split1(line, ":");
+      headers[split[0].toLowerCase()] = split[1].trim();
+    }
+    var responseStream = process.stdout;
+    if (responseStream.closed) {
+      responseStream = new ListInputStream();
+      responseStream.markEndOfStream();
+    }
+    var contentLength = -1;
+    if (headers.containsKey('content-length')) {
+      contentLength = int.parse(headers['content-length']);
+    }
+
+    return new StreamedResponse(responseStream, status, contentLength,
+        headers: headers,
+        isRedirect: isRedirect,
+        reasonPhrase: reasonPhrase);
+  }
+}
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart
index 02a0f7e..665ee1e 100644
--- a/pkg/http/lib/src/utils.dart
+++ b/pkg/http/lib/src/utils.dart
@@ -114,7 +114,7 @@
 
 /// A regular expression that matches strings that are composed entirely of
 /// ASCII-compatible characters.
-final RegExp _ASCII_ONLY = const RegExp(r"^[\x00-\x7F]+$");
+final RegExp _ASCII_ONLY = new RegExp(r"^[\x00-\x7F]+$");
 
 /// Returns whether [string] is composed entirely of ASCII-compatible
 /// characters.
@@ -133,6 +133,8 @@
 
 /// Buffers all input from an InputStream and returns it as a future.
 Future<List<int>> consumeInputStream(InputStream stream) {
+  if (stream.closed) return new Future<List<int>>.immediate(<int>[]);
+
   var completer = new Completer<List<int>>();
   /// TODO(nweiz): use BufferList when issue 6409 is fixed
   var buffer = <int>[];
@@ -183,3 +185,26 @@
   }
   return nextElement(null);
 }
+
+/// Creates a temporary directory and passes its path to [fn]. Once the [Future]
+/// returned by [fn] completes, the temporary directory and all its contents
+/// will be deleted.
+Future withTempDir(Future fn(String path)) {
+  var tempDir;
+  var future = new Directory('').createTemp().chain((dir) {
+    tempDir = dir;
+    return fn(tempDir.path);
+  });
+  future.onComplete((_) => tempDir.delete(recursive: true));
+  return future;
+}
+
+/// Configures [future] so that its result (success or exception) is passed on
+/// to [completer].
+void chainToCompleter(Future future, Completer completer) {
+  future.handleException((e) {
+    completer.completeException(e);
+    return true;
+  });
+  future.then(completer.complete);
+}
diff --git a/pkg/http/test/curl_client_test.dart b/pkg/http/test/curl_client_test.dart
new file mode 100644
index 0000000..d94ad38
--- /dev/null
+++ b/pkg/http/test/curl_client_test.dart
@@ -0,0 +1,263 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 curl_client_test;
+
+import 'dart:io';
+import 'dart:isolate';
+import 'dart:uri';
+
+import '../../unittest/lib/unittest.dart';
+import '../lib/http.dart' as http;
+import '../lib/src/utils.dart';
+import 'utils.dart';
+
+void main() {
+  setUp(startServer);
+  tearDown(stopServer);
+
+  test('head', () {
+    expect(new http.CurlClient().head(serverUrl).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, equals(''));
+    }), completes);
+  });
+
+  test('get', () {
+    expect(new http.CurlClient().get(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'GET',
+        'path': '/',
+        'headers': {
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        },
+      })));
+    }), completes);
+  });
+
+  test('post', () {
+    expect(new http.CurlClient().post(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }, fields: {
+      'some-field': 'value',
+      'other-field': 'other value'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'POST',
+        'path': '/',
+        'headers': {
+          'content-type': [
+            'application/x-www-form-urlencoded; charset=UTF-8'
+          ],
+          'content-length': ['42'],
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        },
+        'body': 'some-field=value&other-field=other%20value'
+      })));
+    }), completes);
+  });
+
+  test('post without fields', () {
+    expect(new http.CurlClient().post(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value',
+      'Content-Type': 'text/plain'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'POST',
+        'path': '/',
+        'headers': {
+          'content-type': ['text/plain'],
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        }
+      })));
+    }), completes);
+  });
+
+  test('put', () {
+    expect(new http.CurlClient().put(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }, fields: {
+      'some-field': 'value',
+      'other-field': 'other value'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'PUT',
+        'path': '/',
+        'headers': {
+          'content-type': [
+            'application/x-www-form-urlencoded; charset=UTF-8'
+          ],
+          'content-length': ['42'],
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        },
+        'body': 'some-field=value&other-field=other%20value'
+      })));
+    }), completes);
+  });
+
+  test('put without fields', () {
+    expect(new http.CurlClient().put(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value',
+      'Content-Type': 'text/plain'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'PUT',
+        'path': '/',
+        'headers': {
+          'content-type': ['text/plain'],
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        }
+      })));
+    }), completes);
+  });
+
+  test('delete', () {
+    expect(new http.CurlClient().delete(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'DELETE',
+        'path': '/',
+        'headers': {
+          'x-random-header': ['Value'],
+          'x-other-header': ['Other Value']
+        }
+      })));
+    }), completes);
+  });
+
+  test('read', () {
+    expect(new http.CurlClient().read(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }), completion(parse(equals({
+      'method': 'GET',
+      'path': '/',
+      'headers': {
+        'x-random-header': ['Value'],
+        'x-other-header': ['Other Value']
+      },
+    }))));
+  });
+
+  test('read throws an error for a 4** status code', () {
+    expect(new http.CurlClient().read(serverUrl.resolve('/error')),
+        throwsHttpException);
+  });
+
+  test('readBytes', () {
+    var future = new http.CurlClient().readBytes(serverUrl, headers: {
+      'X-Random-Header': 'Value',
+      'X-Other-Header': 'Other Value'
+    }).transform((bytes) => new String.fromCharCodes(bytes));
+
+    expect(future, completion(parse(equals({
+      'method': 'GET',
+      'path': '/',
+      'headers': {
+        'x-random-header': ['Value'],
+        'x-other-header': ['Other Value']
+      },
+    }))));
+  });
+
+  test('readBytes throws an error for a 4** status code', () {
+    expect(new http.CurlClient().readBytes(serverUrl.resolve('/error')),
+        throwsHttpException);
+  });
+
+  test('#send a StreamedRequest', () {
+    var client = new http.CurlClient();
+    var request = new http.StreamedRequest("POST", serverUrl);
+    request.headers[HttpHeaders.CONTENT_TYPE] =
+      'application/json; charset=utf-8';
+
+    var future = client.send(request).chain((response) {
+      expect(response.statusCode, equals(200));
+      return consumeInputStream(response.stream);
+    }).transform((bytes) => new String.fromCharCodes(bytes));
+    future.onComplete((_) => client.close());
+
+    expect(future, completion(parse(equals({
+      'method': 'POST',
+      'path': '/',
+      'headers': {
+        'content-type': ['application/json; charset=utf-8'],
+        'transfer-encoding': ['chunked']
+      },
+      'body': '{"hello": "world"}'
+    }))));
+
+    request.stream.writeString('{"hello": "world"}');
+    request.stream.close();
+  });
+
+  test('with one redirect', () {
+    var url = serverUrl.resolve('/redirect');
+    expect(new http.CurlClient().get(url).transform((response) {
+      expect(response.statusCode, equals(200));
+      expect(response.body, parse(equals({
+        'method': 'GET',
+        'path': '/',
+        'headers': {}
+      })));
+    }), completes);
+  });
+
+  test('with too many redirects', () {
+    expect(new http.CurlClient().get(serverUrl.resolve('/loop?1')),
+        throwsRedirectLimitExceededException);
+  });
+
+  test('with a generic failure', () {
+    expect(new http.CurlClient().get('url fail'),
+        throwsHttpException);
+  });
+
+  test('with one redirect via HEAD', () {
+    var url = serverUrl.resolve('/redirect');
+    expect(new http.CurlClient().head(url).transform((response) {
+      expect(response.statusCode, equals(200));
+    }), completes);
+  });
+
+  test('with too many redirects via HEAD', () {
+    expect(new http.CurlClient().head(serverUrl.resolve('/loop?1')),
+        throwsRedirectLimitExceededException);
+  });
+
+  test('with a generic failure via HEAD', () {
+    expect(new http.CurlClient().head('url fail'),
+        throwsHttpException);
+  });
+
+  test('without following redirects', () {
+    var request = new http.Request('GET', serverUrl.resolve('/redirect'));
+    request.followRedirects = false;
+    expect(new http.CurlClient().send(request).chain(http.Response.fromStream)
+        .transform((response) {
+      expect(response.statusCode, equals(302));
+      expect(response.isRedirect, true);
+    }), completes);
+  });
+}
diff --git a/pkg/http/test/mock_client_test.dart b/pkg/http/test/mock_client_test.dart
index 2425467..7bc39566 100644
--- a/pkg/http/test/mock_client_test.dart
+++ b/pkg/http/test/mock_client_test.dart
@@ -54,4 +54,13 @@
         .transform((response) => response.body);
     expect(future, completion(equals('Request body was "hello, world"')));
   });
+
+  test('handles a request with no body', () {
+    var client = new MockClient((request) {
+      return new Future.immediate(new http.Response('you did it', 200));
+    });
+
+    expect(client.read("http://example.com/foo"),
+        completion(equals('you did it')));
+  });
 }
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 9b4d7e9..19a3cf3 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -28,6 +28,24 @@
   _server.addRequestHandler((request) => request.path == '/error',
       (request, response) {
     response.statusCode = 400;
+    response.contentLength = 0;
+    response.outputStream.close();
+  });
+
+  _server.addRequestHandler((request) => request.path == '/loop',
+      (request, response) {
+    var n = int.parse(new Uri.fromString(request.uri).query);
+    response.statusCode = 302;
+    response.headers.set('location', '/loop?${n + 1}');
+    response.contentLength = 0;
+    response.outputStream.close();
+  });
+
+  _server.addRequestHandler((request) => request.path == '/redirect',
+      (request, response) {
+    response.statusCode = 302;
+    response.headers.set('location', '/');
+    response.contentLength = 0;
     response.outputStream.close();
   });
 
@@ -95,7 +113,6 @@
   _Parse(this._matcher);
 
   bool matches(item, MatchState matchState) {
-    print("_Parse.matches [$item]");
     if (item is! String) return false;
 
     var parsed;
@@ -138,3 +155,19 @@
   const _HttpException() : super("HttpException");
   bool matches(item, MatchState matchState) => item is HttpException;
 }
+
+/// A matcher for RedirectLimitExceededExceptions.
+const isRedirectLimitExceededException =
+    const _RedirectLimitExceededException();
+
+/// A matcher for functions that throw RedirectLimitExceededException.
+const Matcher throwsRedirectLimitExceededException =
+    const Throws(isRedirectLimitExceededException);
+
+class _RedirectLimitExceededException extends TypeMatcher {
+  const _RedirectLimitExceededException() :
+      super("RedirectLimitExceededException");
+
+  bool matches(item, MatchState matchState) =>
+    item is RedirectLimitExceededException;
+}
diff --git a/pkg/intl/lib/bidi_utils.dart b/pkg/intl/lib/bidi_utils.dart
index 782148b..7a8d728 100644
--- a/pkg/intl/lib/bidi_utils.dart
+++ b/pkg/intl/lib/bidi_utils.dart
@@ -100,7 +100,7 @@
     // The regular expression is simplified for an HTML tag (opening or
     // closing) or an HTML escape. We might want to skip over such expressions
     // when estimating the text directionality.
-    return text.replaceAll(const RegExp(r'<[^>]*>|&[^;]+;'), ' ');
+    return text.replaceAll(new RegExp(r'<[^>]*>|&[^;]+;'), ' ');
   }
 
   /**
@@ -108,7 +108,7 @@
    * LTR. If [isHtml] is true, the text is HTML or HTML-escaped.
    */
   static bool startsWithLtr(String text, [isHtml=false]) {
-    return const RegExp('^[^$_RTL_CHARS]*[$_LTR_CHARS]').hasMatch(
+    return new RegExp('^[^$_RTL_CHARS]*[$_LTR_CHARS]').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -117,7 +117,7 @@
    * RTL. If [isHtml] is true, the text is HTML or HTML-escaped.
    */
   static bool startsWithRtl(String text, [isHtml=false]) {
-    return const RegExp('^[^$_LTR_CHARS]*[$_RTL_CHARS]').hasMatch(
+    return new RegExp('^[^$_LTR_CHARS]*[$_RTL_CHARS]').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -127,7 +127,7 @@
    * HTML-escaped.
    */
   static bool endsWithLtr(String text, [isHtml=false]) {
-    return const RegExp('[$_LTR_CHARS][^$_RTL_CHARS]*\$').hasMatch(
+    return new RegExp('[$_LTR_CHARS][^$_RTL_CHARS]*\$').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -137,7 +137,7 @@
    * HTML-escaped.
    */
   static bool endsWithRtl(String text, [isHtml=false]) {
-    return const RegExp('[$_RTL_CHARS][^$_LTR_CHARS]*\$').hasMatch(
+    return new RegExp('[$_RTL_CHARS][^$_LTR_CHARS]*\$').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -146,7 +146,7 @@
    * If [isHtml] is true, the text is HTML or HTML-escaped.
    */
   static bool hasAnyLtr(String text, [isHtml=false]) {
-    return const RegExp(r'[' '$_LTR_CHARS' r']').hasMatch(
+    return new RegExp(r'[' '$_LTR_CHARS' r']').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -155,7 +155,7 @@
    * If [isHtml] is true, the text is HTML or HTML-escaped.
    */
   static bool hasAnyRtl(String text, [isHtml=false]) {
-    return const RegExp(r'[' '$_RTL_CHARS' r']').hasMatch(
+    return new RegExp(r'[' '$_RTL_CHARS' r']').hasMatch(
         isHtml? stripHtmlIfNeeded(text) : text);
   }
 
@@ -184,7 +184,7 @@
    * (Egypt), is ignored.
    */
   static bool isRtlLanguage(String languageString) {
-    return const RegExp(r'^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_]'
+    return new RegExp(r'^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_]'
         r'(Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))'
         r'($|-|_)', ignoreCase : true).hasMatch(languageString);
   }
@@ -242,7 +242,7 @@
     if (html.startsWith('<')) {
       StringBuffer buffer = new StringBuffer();
       var startIndex = 0;
-      Match match = const RegExp('<\\w+').firstMatch(html);
+      Match match = new RegExp('<\\w+').firstMatch(html);
       if (match != null) {
         buffer.add(html.substring(
             startIndex, match.end)).add(' dir=$direction');
@@ -263,7 +263,7 @@
   static String guardBracketInHtml(String str, [bool isRtlContext]) {
     var useRtl = isRtlContext == null ? hasAnyRtl(str) : isRtlContext;
     RegExp matchingBrackets =
-        const RegExp(r'(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)');
+        new RegExp(r'(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)');
     return _guardBracketHelper(str, matchingBrackets,
         '<span dir=${useRtl? "rtl" : "ltr"}>', '</span>');
   }
@@ -280,14 +280,14 @@
     var useRtl = isRtlContext == null ? hasAnyRtl(str) : isRtlContext;
     var mark = useRtl ? RLM : LRM;
     return _guardBracketHelper(str,
-        const RegExp(r'(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)'), mark, mark);
+        new RegExp(r'(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)'), mark, mark);
   }
 
   /**
    * (Mostly) reimplements the $& functionality of "replace" in JavaScript.
    * Given a [str] and the [regexp] to match with, optionally supply a string to
    * be inserted [before] the match and/or [after]. For example,
-   * `_guardBracketHelper('firetruck', const RegExp('truck'), 'hydrant', '!')`
+   * `_guardBracketHelper('firetruck', new RegExp('truck'), 'hydrant', '!')`
    * would return 'firehydrant!'.
    */
   // TODO(efortuna): Get rid of this once this is implemented in Dart.
@@ -325,17 +325,17 @@
     var hasWeaklyLtr = false;
     // Split a string into 'words' for directionality estimation based on
     // relative word counts.
-    for (String token in text.split(const RegExp(r'\s+'))) {
+    for (String token in text.split(new RegExp(r'\s+'))) {
       if (startsWithRtl(token)) {
         rtlCount++;
         total++;
-      } else if (const RegExp(r'^http://').hasMatch(token)) {
+      } else if (new RegExp(r'^http://').hasMatch(token)) {
         // Checked if token looks like something that must always be LTR even in
         // RTL text, such as a URL.
         hasWeaklyLtr = true;
       } else if (hasAnyLtr(token)) {
         total++;
-      } else if (const RegExp(r'\d').hasMatch(token)) {
+      } else if (new RegExp(r'\d').hasMatch(token)) {
         // Checked if token contains any numerals.
         hasWeaklyLtr = true;
       }
@@ -379,10 +379,10 @@
     // [\u0591-\u05f2]'.
     for (int i = 1; i < str.length; i++) {
       if (str.substring(i, i+1) == '"'
-          && const RegExp('[\u0591-\u05f2]').hasMatch(str.substring(i-1, i))) {
+          && new RegExp('[\u0591-\u05f2]').hasMatch(str.substring(i-1, i))) {
         buf.add('\u05f4');
       } else if (str.substring(i, i+1) == "'"
-          && const RegExp('[\u0591-\u05f2]').hasMatch(str.substring(i-1, i))) {
+          && new RegExp('[\u0591-\u05f2]').hasMatch(str.substring(i-1, i))) {
         buf.add('\u05f3');
       } else {
         buf.add(str.substring(i, i+1));
diff --git a/pkg/intl/lib/date_format.dart b/pkg/intl/lib/date_format.dart
index 7a5ccdb..299132b 100644
--- a/pkg/intl/lib/date_format.dart
+++ b/pkg/intl/lib/date_format.dart
@@ -445,19 +445,19 @@
    * A series of regular expressions used to parse a format string into its
    * component fields.
    */
-  static var _matchers = const [
+  static List<Pattern> _matchers = [
       // Quoted String - anything between single quotes, with escaping
       //   of single quotes by doubling them.
       // e.g. in the pattern "hh 'o''clock'" will match 'o''clock'
-      const RegExp("^\'(?:[^\']|\'\')*\'"),
+      new RegExp("^\'(?:[^\']|\'\')*\'"),
       // Fields - any sequence of 1 or more of the same field characters.
       // e.g. in "hh:mm:ss" will match hh, mm, and ss. But in "hms" would
       // match each letter individually.
-      const RegExp(
+      new RegExp(
         "^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|m+|s+|v+|z+|Z+)"),
       // Everything else - A sequence that is not quotes or field characters.
       // e.g. in "hh:mm:ss" will match the colons.
-      const RegExp("^[^\'GyMkSEahKHcLQdmsvzZ]+")
+      new RegExp("^[^\'GyMkSEahKHcLQdmsvzZ]+")
   ];
 
   /**
diff --git a/pkg/intl/lib/intl_standalone.dart b/pkg/intl/lib/intl_standalone.dart
index 6d42b5e..d8ca238 100644
--- a/pkg/intl/lib/intl_standalone.dart
+++ b/pkg/intl/lib/intl_standalone.dart
@@ -51,7 +51,7 @@
  * Regular expression to match the expected output of systeminfo on
  * Windows. e.g. System Locale:<tab>en_US;English (United States)
  */
-RegExp _sysInfoRegex = const RegExp(r"System Locale:\s+(\w\w-\w+);");
+RegExp _sysInfoRegex = new RegExp(r"System Locale:\s+(\w\w-\w+);");
 
 /**
  * Regular expression to match the expected output of reading the defaults
@@ -61,7 +61,7 @@
  *     "pt-PT",
  *     ...
  */
-RegExp _appleDefaultsRegex = const RegExp(r'(\w\w_\w+)');
+RegExp _appleDefaultsRegex = new RegExp(r'(\w\w_\w+)');
 
 /**
  * Check to see if we have a "LANG" environment variable we can use and return
diff --git a/pkg/intl/lib/src/date_format_helpers.dart b/pkg/intl/lib/src/date_format_helpers.dart
index 7def10b..e47c2cb 100644
--- a/pkg/intl/lib/src/date_format_helpers.dart
+++ b/pkg/intl/lib/src/date_format_helpers.dart
@@ -133,7 +133,7 @@
    * Assuming that the contents are characters, read as many digits as we
    * can see and then return the corresponding integer. Advance the stream.
    */
-  var digitMatcher = const RegExp(r'\d+');
+  var digitMatcher = new RegExp(r'\d+');
   int nextInteger() {
     var string = digitMatcher.stringMatch(rest());
     if (string == null || string.isEmpty) return null;
diff --git a/pkg/intl/lib/src/file_data_reader.dart b/pkg/intl/lib/src/file_data_reader.dart
index e5d3e51..4448081 100644
--- a/pkg/intl/lib/src/file_data_reader.dart
+++ b/pkg/intl/lib/src/file_data_reader.dart
@@ -22,6 +22,6 @@
   /// Read the locale data found for [locale] on our [path].
   Future read(String locale) {
     var file = new File('$path$locale.json');
-    return file.readAsText();
+    return file.readAsString();
   }
 }
diff --git a/pkg/logging/test/logging_test.dart b/pkg/logging/test/logging_test.dart
index 37518b1..fe1c4f0 100644
--- a/pkg/logging/test/logging_test.dart
+++ b/pkg/logging/test/logging_test.dart
@@ -25,7 +25,7 @@
     expect(level2 > level1, isTrue);
 
     var level3 = const Level('NOT_REAL3', 253);
-    expect(level1 !== level3, isTrue); // different instances
+    expect(!identical(level1, level3), isTrue); // different instances
     expect(level1 == level3, isTrue); // same value.
   });
 
@@ -102,10 +102,10 @@
     Logger a2 = new Logger('a');
     Logger b = new Logger('a.b');
     Logger root = Logger.root;
-    expect(a1 === a2, isTrue);
-    expect(a1 === b.parent, isTrue);
-    expect(root === a1.parent, isTrue);
-    expect(root === new Logger(''), isTrue);
+    expect(identical(a1, a2), isTrue);
+    expect(identical(a1, b.parent), isTrue);
+    expect(identical(root, a1.parent), isTrue);
+    expect(identical(root, new Logger('')), isTrue);
   });
 
   group('mutating levels', () {
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 3599c65..d7aadb7 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -9,6 +9,10 @@
 # arithmetic natively, i.e., the VM.
 fixnum/test/int_64_vm_test: Skip
 
+# Skip the cURL tests until we have bundled binaries to run them on all
+# platforms.
+http/test/curl_client_test: Skip
+
 [$compiler == dart2dart]
 *: Skip
 
diff --git a/pkg/unittest/lib/html_individual_config.dart b/pkg/unittest/lib/html_individual_config.dart
new file mode 100644
index 0000000..662f577
--- /dev/null
+++ b/pkg/unittest/lib/html_individual_config.dart
@@ -0,0 +1,44 @@
+// 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.
+
+/**
+ * A unit test library for running groups of tests in a browser, instead of the
+ * entire test file. This is especially used for large tests files that have
+ * many subtests, so we can mark groups as failing at a finer granularity than
+ * the entire test file.
+ *
+ * To use, import this file, and call [useHtmlIndividualConfiguration] at the
+ * start of your set sequence. Important constraint: your group descriptions
+ * MUST NOT contain spaces.
+ */
+#library('unittest');
+
+#import('unittest.dart', prefix: 'unittest');
+#import('html_config.dart', prefix: 'htmlconfig');
+#import('dart:html');
+
+class HtmlIndividualConfiguration extends htmlconfig.HtmlConfiguration {
+
+  String _noSuchTest = ''; 
+  HtmlIndividualConfiguration(isLayoutTest): super(isLayoutTest);
+
+  void onStart() {
+    var testGroupName = window.location.hash;
+    if (testGroupName != '') {
+      try {
+        testGroupName = testGroupName.substring(1); // cut off the #
+        unittest.filterTests('^$testGroupName');
+      } catch (e) {
+        print('tried to match "$testGroupName"');
+        print('NO_SUCH_TEST');
+        exit(1);
+      }
+    }
+    super.onStart();
+  }
+}
+
+void useHtmlIndividualConfiguration([bool isLayoutTest = false]) {
+  unittest.configure(new HtmlIndividualConfiguration(isLayoutTest));
+}
diff --git a/pkg/unittest/lib/html_layout_config.dart b/pkg/unittest/lib/html_layout_config.dart
index 1e56248..a452e79 100644
--- a/pkg/unittest/lib/html_layout_config.dart
+++ b/pkg/unittest/lib/html_layout_config.dart
@@ -40,7 +40,7 @@
   _Message.fromString(String msg) {
     // The format of a message is '<type> <elapsedTime> <body>'.
     // If we don't get a type we default to a 'log' type.
-    var messageParser = const RegExp('\([a-z]*\) \([0-9]*\) \(.*\)');
+    var messageParser = new RegExp('\([a-z]*\) \([0-9]*\) \(.*\)');
     Match match = messageParser.firstMatch(msg);
     if (match == null) {
       messageType = 'log';
diff --git a/pkg/unittest/lib/interactive_html_config.dart b/pkg/unittest/lib/interactive_html_config.dart
index 3ff750a..7cc2a04 100644
--- a/pkg/unittest/lib/interactive_html_config.dart
+++ b/pkg/unittest/lib/interactive_html_config.dart
@@ -258,7 +258,7 @@
     window.on.message.add(_messageHandler);
   }
 
-  static const _notAlphaNumeric = const RegExp('[^a-z0-9A-Z]');
+  static final _notAlphaNumeric = new RegExp('[^a-z0-9A-Z]');
 
   String _stringToDomId(String s) {
     if (s.length == 0) {
diff --git a/pkg/unittest/lib/mock.dart b/pkg/unittest/lib/mock.dart
index 928cb88..bf9d1bd 100644
--- a/pkg/unittest/lib/mock.dart
+++ b/pkg/unittest/lib/mock.dart
@@ -2,6 +2,90 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+/**
+ * A simple mocking/spy library.
+ *
+ * To create a mock objects for some class T, create a new class using:
+ *
+ *     class MockT extends Mock implements T {};
+ *
+ * Then specify the [Behavior] of the Mock for different methods using
+ * [when] (to select the method and parameters) and then the [Action]s
+ * for the [Behavior] by calling [thenReturn], [alwaysReturn], [thenThrow],
+ * [alwaysThrow], [thenCall] or [alwaysCall].
+ *
+ * [thenReturn], [thenThrow] and [thenCall] are one-shot so you would
+ * typically call these more than once to specify a sequence of actions;
+ * this can be done with chained calls, e.g.:
+ *
+ *      m.when(callsTo('foo')).
+ *          thenReturn(0).thenReturn(1).thenReturn(2);
+ *
+ * [thenCall] and [alwaysCall] allow you to proxy mocked methods, chaining
+ * to some other implementation. This provides a way to implement 'spies'.
+ *
+ * You can disable logging for a particular [Behavior] easily:
+ *
+ *     m.when(callsTo('bar')).logging = false;
+ *
+ * You can then use the mock object. Once you are done, to verify the
+ * behavior, use [getLogs] to extract a relevant subset of method call
+ * logs and apply [Matchers] to these through calling [verify].
+ *
+ * A Mock can be given a name when constructed. In this case instead of
+ * keeping its own log, it uses a shared log. This can be useful to get an
+ * audit trail of interleaved behavior. It is the responsibility of the user
+ * to ensure that mock names, if used, are unique.
+ *
+ * Limitations:
+ *
+ * * only positional parameters are supported (up to 10);
+ * * to mock getters you will need to include parentheses in the call
+ *       (e.g. m.length() will work but not m.length).
+ *
+ * Here is a simple example:
+ *
+ *     class MockList extends Mock implements List {};
+ *
+ *     List m = new MockList();
+ *     m.when(callsTo('add', anything)).alwaysReturn(0);
+ *
+ *     m.add('foo');
+ *     m.add('bar');
+ *
+ *     getLogs(m, callsTo('add', anything)).verify(happenedExactly(2));
+ *     getLogs(m, callsTo('add', 'foo')).verify(happenedOnce);
+ *     getLogs(m, callsTo('add', 'isNull)).verify(neverHappened);
+ *
+ * Note that we don't need to provide argument matchers for all arguments,
+ * but we do need to provide arguments for all matchers. So this is allowed:
+ *
+ *     m.when(callsTo('add')).alwaysReturn(0);
+ *     m.add(1, 2);
+ *
+ * But this is not allowed and will throw an exception:
+ *
+ *     m.when(callsTo('add', anything, anything)).alwaysReturn(0);
+ *     m.add(1);
+ *
+ * Here is a way to implement a 'spy', which is where we log the call
+ * but then hand it off to some other function, which is the same
+ * method in a real instance of the class being mocked:
+ *
+ *     class Foo {
+ *       bar(a, b, c) => a + b + c;
+ *     }
+ *
+ *     class MockFoo extends Mock implements Foo {
+ *       Foo real;
+ *       MockFoo() {
+ *         real = new Foo();
+ *         this.when(callsTo('bar')).alwaysCall(real.bar);
+ *       }
+ *     }
+ *
+ */
+
 library mock;
 import 'matcher.dart';
 
@@ -114,25 +198,25 @@
       nameFilter = wrapMatcher(name);
     }
     argMatchers = new List<Matcher>();
-    if (arg0 === _noArg) return;
+    if (identical(arg0, _noArg)) return;
     argMatchers.add(wrapMatcher(arg0));
-    if (arg1 === _noArg) return;
+    if (identical(arg1, _noArg)) return;
     argMatchers.add(wrapMatcher(arg1));
-    if (arg2 === _noArg) return;
+    if (identical(arg2, _noArg)) return;
     argMatchers.add(wrapMatcher(arg2));
-    if (arg3 === _noArg) return;
+    if (identical(arg3, _noArg)) return;
     argMatchers.add(wrapMatcher(arg3));
-    if (arg4 === _noArg) return;
+    if (identical(arg4, _noArg)) return;
     argMatchers.add(wrapMatcher(arg4));
-    if (arg5 === _noArg) return;
+    if (identical(arg5, _noArg)) return;
     argMatchers.add(wrapMatcher(arg5));
-    if (arg6 === _noArg) return;
+    if (identical(arg6, _noArg)) return;
     argMatchers.add(wrapMatcher(arg6));
-    if (arg7 === _noArg) return;
+    if (identical(arg7, _noArg)) return;
     argMatchers.add(wrapMatcher(arg7));
-    if (arg8 === _noArg) return;
+    if (identical(arg8, _noArg)) return;
     argMatchers.add(wrapMatcher(arg8));
-    if (arg9 === _noArg) return;
+    if (identical(arg9, _noArg)) return;
     argMatchers.add(wrapMatcher(arg9));
   }
 
@@ -333,7 +417,7 @@
 
 /** Utility function for optionally qualified method names */
 String _qualifiedName(owner, String method) {
-  if (owner == null || owner === anything) {
+  if (owner == null || identical(owner, anything)) {
     return method;
   } else if (owner is Matcher) {
     Description d = new StringDescription();
@@ -1116,89 +1200,7 @@
 /** The shared log used for named mocks. */
 LogEntryList sharedLog = null;
 
-/**
- * [Mock] is the base class for all mocked objects, with
- * support for basic mocking.
- *
- * To create a mock objects for some class T, create a new class using:
- *
- *     class MockT extends Mock implements T {};
- *
- * Then specify the [Behavior] of the Mock for different methods using
- * [when] (to select the method and parameters) and then the [Action]s
- * for the [Behavior] by calling [thenReturn], [alwaysReturn], [thenThrow],
- * [alwaysThrow], [thenCall] or [alwaysCall].
- *
- * [thenReturn], [thenThrow] and [thenCall] are one-shot so you would
- * typically call these more than once to specify a sequence of actions;
- * this can be done with chained calls, e.g.:
- *
- *      m.when(callsTo('foo')).
- *          thenReturn(0).thenReturn(1).thenReturn(2);
- *
- * [thenCall] and [alwaysCall] allow you to proxy mocked methods, chaining
- * to some other implementation. This provides a way to implement 'spies'.
- *
- * You can disable logging for a particular [Behavior] easily:
- *
- *     m.when(callsTo('bar')).logging = false;
- *
- * You can then use the mock object. Once you are done, to verify the
- * behavior, use [getLogs] to extract a relevant subset of method call
- * logs and apply [Matchers] to these through calling [verify].
- *
- * A Mock can be given a name when constructed. In this case instead of
- * keeping its own log, it uses a shared log. This can be useful to get an
- * audit trail of interleaved behavior. It is the responsibility of the user
- * to ensure that mock names, if used, are unique.
- *
- * Limitations:
- * - only positional parameters are supported (up to 10);
- * - to mock getters you will need to include parentheses in the call
- *       (e.g. m.length() will work but not m.length).
- *
- * Here is a simple example:
- *
- *     class MockList extends Mock implements List {};
- *
- *     List m = new MockList();
- *     m.when(callsTo('add', anything)).alwaysReturn(0);
- *
- *     m.add('foo');
- *     m.add('bar');
- *
- *     getLogs(m, callsTo('add', anything)).verify(happenedExactly(2));
- *     getLogs(m, callsTo('add', 'foo')).verify(happenedOnce);
- *     getLogs(m, callsTo('add', 'isNull)).verify(neverHappened);
- *
- * Note that we don't need to provide argument matchers for all arguments,
- * but we do need to provide arguments for all matchers. So this is allowed:
- *
- *     m.when(callsTo('add')).alwaysReturn(0);
- *     m.add(1, 2);
- *
- * But this is not allowed and will throw an exception:
- *
- *     m.when(callsTo('add', anything, anything)).alwaysReturn(0);
- *     m.add(1);
- *
- * Here is a way to implement a 'spy', which is where we log the call
- * but then hand it off to some other function, which is the same
- * method in a real instance of the class being mocked:
- *
- *     class Foo {
- *       bar(a, b, c) => a + b + c;
- *     }
- *
- *     class MockFoo extends Mock implements Foo {
- *       Foo real;
- *       MockFoo() {
- *         real = new Foo();
- *         this.when(callsTo('bar')).alwaysCall(real.bar);
- *       }
- *     }
- *
- */
+/** The base class for all mocked objects. */
 class Mock {
   /** The mock name. Needed if the log is shared; optional otherwise. */
   final String name;
diff --git a/pkg/unittest/lib/src/config.dart b/pkg/unittest/lib/src/config.dart
index 5dda552..cd0f365 100644
--- a/pkg/unittest/lib/src/config.dart
+++ b/pkg/unittest/lib/src/config.dart
@@ -133,7 +133,7 @@
 
   String _indent(String str) {
     // TODO(nweiz): Use this simpler code once issue 2980 is fixed.
-    // return str.replaceAll(const RegExp("^", multiLine: true), "  ");
+    // return str.replaceAll(new RegExp("^", multiLine: true), "  ");
 
     return Strings.join(str.split("\n").map((line) => "  $line"), "\n");
   }
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index 046da2c..20e9db2 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -59,7 +59,7 @@
 
 class _IsFalse extends BaseMatcher {
   const _IsFalse();
-  bool matches(item, MatchState matchState) => item != true;
+  bool matches(item, MatchState matchState) => item == false;
   Description describe(Description description) =>
       description.add('false');
 }
@@ -73,7 +73,7 @@
 class _IsSameAs extends BaseMatcher {
   final _expected;
   const _IsSameAs(this._expected);
-  bool matches(item, MatchState matchState) => item === _expected;
+  bool matches(item, MatchState matchState) => identical(item, _expected);
   // If all types were hashable we could show a hash here.
   Description describe(Description description) =>
       description.add('same instance as ').addDescriptionOf(_expected);
@@ -465,19 +465,6 @@
   bool matches(item, MatchState matchState) => item is RangeError;
 }
 
-// Temporary matcher for deprecated IndexOutOfRangeException.
-/** A matcher for IndexOutOfRangeExceptions. */
-const isIndexOutOfRangeException = const _IndexOutOfRangeException();
-
-/** A matcher for functions that throw IndexOutOfRangeException. */
-const Matcher throwsIndexOutOfRangeException =
-    const Throws(isIndexOutOfRangeException);
-
-class _IndexOutOfRangeException extends TypeMatcher {
-  const _IndexOutOfRangeException() : super("IndexOutOfRangeException");
-  bool matches(item, MatchState matchState) => item is IndexOutOfRangeException;
-}
-
 /** A matcher for NoSuchMethodErrors. */
 const isNoSuchMethodError = const _NoSuchMethodError();
 
@@ -502,15 +489,6 @@
   bool matches(item, MatchState matchState) => item is UnimplementedError;
 }
 
-// Temporary matcher until NotImplementedException is removed.
-/** A matcher for NotImplementedExceptions. */
-const isNotImplementedException = isUnimplementedError;
-
-/** A matcher for functions that throw Exception. */
-const Matcher throwsNotImplementedException =
-    const Throws(isUnimplementedError);
-
-
 /** A matcher for NullPointerExceptions. */
 const isNullPointerException = const _NullPointerException();
 
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index 87a6f9d..25d965e 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -151,6 +151,10 @@
 import 'matcher.dart';
 export 'matcher.dart';
 
+// TODO(amouravski): We should not need to import mock here, but it's necessary
+// to enable dartdoc on the mock library, as it's not picked up normally.
+import 'mock.dart';
+
 part 'src/config.dart';
 part 'src/test_case.dart';
 
@@ -834,7 +838,7 @@
 }
 
 String _fullSpec(String spec) {
-  if (spec === null) return '$_currentGroup';
+  if (spec == null) return '$_currentGroup';
   return _currentGroup != '' ? '$_currentGroup$groupSep$spec' : spec;
 }
 
diff --git a/pkg/unittest/test/matchers_test.dart b/pkg/unittest/test/matchers_test.dart
index 22f2f0c..c9045ad 100644
--- a/pkg/unittest/test/matchers_test.dart
+++ b/pkg/unittest/test/matchers_test.dart
@@ -48,6 +48,7 @@
 
     test('isFalse', () {
       shouldPass(false, isFalse);
+      shouldFail(10, isFalse, "Expected: false but: was <10>.");
       shouldFail(true, isFalse, "Expected: false but: was <true>.");
     });
 
diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart
index efb6a41..8291db8 100644
--- a/pkg/webdriver/lib/webdriver.dart
+++ b/pkg/webdriver/lib/webdriver.dart
@@ -201,7 +201,7 @@
    */
   WebDriverBase.fromUrl([this._url = 'http://localhost:4444/wd/hub']) {
     // Break out the URL components.
-    var re = const RegExp('[^:/]+://([^/]+)(/.*)');
+    var re = new RegExp('[^:/]+://([^/]+)(/.*)');
     var matches = re.firstMatch(_url);
     _host = matches[1];
     _path = matches[2];
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 3cde1ee..084cd51 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -267,6 +267,7 @@
       'sources': [
         'builtin_natives.cc',
         'builtin.h',
+        'io_natives.h',
       ],
       'includes': [
         'builtin_impl_sources.gypi',
@@ -303,6 +304,41 @@
       ],
     },
     {
+      'target_name': 'libdart_io',
+      'type': 'static_library',
+      'include_dirs': [
+        '..',
+      ],
+      'sources': [
+        'io_natives.h',
+        'io_natives.cc',
+      ],
+      'includes': [
+        'io_impl_sources.gypi',
+      ],
+      'conditions': [
+        [ 'dart_io_support==1', {
+          'dependencies': [
+            'bin/net/ssl.gyp:libssl_dart',
+          ],
+        }],
+        ['OS=="win"', {
+          # TODO(antonm): fix the implementation.
+          # Current implementation accepts char* strings
+          # and therefore fails to compile once _UNICODE is
+          # enabled.  That should be addressed using -A
+          # versions of functions and adding necessary conversions.
+          'configurations': {
+            'Common_Base': {
+              'msvs_configuration_attributes': {
+                'CharacterSet': '0',
+              },
+            },
+          },
+        }],
+      ],
+    },
+    {
       'target_name': 'libdart_withcore',
       'type': 'static_library',
       'dependencies': [
@@ -339,7 +375,8 @@
       ],
       'sources': [
         'gen_snapshot.cc',
-        'builtin.cc',
+        # Only looks up native functions in libdart_builtin, not libdart_io.
+        'builtin_gen_snapshot.cc',
         # Include generated source files.
         '<(builtin_cc_file)',
         '<(crypto_cc_file)',
@@ -421,6 +458,7 @@
       'dependencies': [
         'libdart_export',
         'libdart_builtin',
+        'libdart_io',
         'generate_snapshot_file',
       ],
       'include_dirs': [
@@ -434,7 +472,7 @@
       'conditions': [
         ['OS=="win"', {
           'link_settings': {
-            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib' ],
+            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ],
           },
           # Generate an import library on Windows, by exporting a function.
           # Extensions use this import library to link to the API in dart.exe.
@@ -453,6 +491,7 @@
       'dependencies': [
         'libdart_withcore',
         'libdart_builtin',
+        'libdart_io',
       ],
       'include_dirs': [
         '..',
@@ -473,7 +512,7 @@
       'conditions': [
         ['OS=="win"', {
           'link_settings': {
-            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib' ],
+            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ],
           },
           # Generate an import library on Windows, by exporting a function.
           # Extensions use this import library to link to the API in dart.exe.
@@ -497,6 +536,7 @@
       'dependencies': [
         'libdart_withcore',
         'libdart_builtin',
+        'libdart_io',
         'generate_snapshot_test_dat_file',
       ],
       'include_dirs': [
@@ -534,7 +574,7 @@
       'conditions': [
         ['OS=="win"', {
           'link_settings': {
-            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib' ],
+            'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ],
           },
         }],
       ],
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index f6d297e..f9218df 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -8,7 +8,7 @@
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
-
+#include "bin/io_natives.h"
 
 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = {
   /* { url_, source_, patch_url_, patch_source_, has_natives_ } */
@@ -29,6 +29,15 @@
   return DartUtils::NewString(builtin_libraries_[id].source_);
 }
 
+/**
+ * Looks up native functions in both libdart_builtin and libdart_io.
+ */
+Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
+                                          int argument_count) {
+  Dart_NativeFunction result = BuiltinNativeLookup(name, argument_count);
+  if (result != NULL) return result;
+  return IONativeLookup(name, argument_count);
+}
 
 void Builtin::SetNativeResolver(BuiltinLibraryId id) {
   UNREACHABLE();
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 27b7e09..4aea641 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("builtin");
-#import("dart:uri");
+library builtin;
+import 'dart:uri';
 
 // Corelib 'print' implementation.
 void _print(arg) {
@@ -147,7 +147,7 @@
   }
 
   var path;
-  if (_packageRoot !== null) {
+  if (_packageRoot != null) {
     path = "${_packageRoot}${uri.path}";
   } else {
     path = _entrypoint.resolve('packages/${uri.path}').path;
diff --git a/runtime/bin/builtin.h b/runtime/bin/builtin.h
index a46fbdb..b21c9af 100644
--- a/runtime/bin/builtin.h
+++ b/runtime/bin/builtin.h
@@ -42,6 +42,8 @@
  private:
   static Dart_NativeFunction NativeLookup(Dart_Handle name,
                                           int argument_count);
+  static Dart_NativeFunction BuiltinNativeLookup(Dart_Handle name,
+                                                 int argument_count);
 
   static const char builtin_source_[];
   static const char crypto_source_[];
diff --git a/runtime/bin/builtin_gen_snapshot.cc b/runtime/bin/builtin_gen_snapshot.cc
new file mode 100644
index 0000000..fd64f46
--- /dev/null
+++ b/runtime/bin/builtin_gen_snapshot.cc
@@ -0,0 +1,71 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 <stdio.h>
+
+#include "include/dart_api.h"
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+
+
+Builtin::builtin_lib_props Builtin::builtin_libraries_[] = {
+  /* { url_, source_, patch_url_, patch_source_, has_natives_ } */
+  { DartUtils::kBuiltinLibURL, builtin_source_, NULL, NULL, true },
+  { DartUtils::kJsonLibURL, json_source_, NULL, NULL, false },
+  { DartUtils::kUriLibURL, uri_source_, NULL, NULL, false },
+  { DartUtils::kCryptoLibURL, crypto_source_, NULL, NULL, false },
+  { DartUtils::kIOLibURL, io_source_,
+    DartUtils::kIOLibPatchURL, io_patch_, true },
+  { DartUtils::kUtfLibURL, utf_source_, NULL, NULL, false }
+};
+
+
+Dart_Handle Builtin::Source(BuiltinLibraryId id) {
+  ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) ==
+         kInvalidLibrary);
+  ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
+  return DartUtils::NewString(builtin_libraries_[id].source_);
+}
+
+
+Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
+                                          int argument_count) {
+  UNREACHABLE();
+  return NULL;
+}
+
+
+void Builtin::SetNativeResolver(BuiltinLibraryId id) {
+  UNREACHABLE();
+}
+
+
+Dart_Handle Builtin::LoadAndCheckLibrary(BuiltinLibraryId id) {
+  ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) ==
+         kInvalidLibrary);
+  ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
+  Dart_Handle url = DartUtils::NewString(builtin_libraries_[id].url_);
+  Dart_Handle library = Dart_LookupLibrary(url);
+  if (Dart_IsError(library)) {
+    library = Dart_LoadLibrary(url, Source(id));
+    if (!Dart_IsError(library) && (builtin_libraries_[id].has_natives_)) {
+      // Setup the native resolver for built in library functions.
+      // Looks up native functions only in libdart_builtin, not libdart_io.
+      // This is for use in the snapshot generator, which should be
+      // independent of most of the dart:io C++ code.
+      DART_CHECK_VALID(Dart_SetNativeResolver(library, BuiltinNativeLookup));
+    }
+    if (builtin_libraries_[id].patch_url_ != NULL) {
+      ASSERT(builtin_libraries_[id].patch_source_ != NULL);
+      Dart_Handle patch_url =
+          DartUtils::NewString(builtin_libraries_[id].patch_url_);
+      Dart_Handle patch_source =
+          DartUtils::NewString(builtin_libraries_[id].patch_source_);
+      DART_CHECK_VALID(Dart_LoadPatch(library, patch_url, patch_source));
+    }
+  }
+  DART_CHECK_VALID(library);
+  return library;
+}
diff --git a/runtime/bin/builtin_impl_sources.gypi b/runtime/bin/builtin_impl_sources.gypi
index ad64eac..54c8707 100644
--- a/runtime/bin/builtin_impl_sources.gypi
+++ b/runtime/bin/builtin_impl_sources.gypi
@@ -2,18 +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.
 
-# This file contains all C++ sources for the dart:builtin and dart:io
-# libraries.
+# This file contains all C++ sources for the dart:builtin library and
+# some of the C++ sources for the dart:io library.  The rest are in
+# io_impl_sources.gypi.
 {
   'sources': [
     'io_buffer.cc',
     'io_buffer.h',
-    'common.cc',
-    'crypto.cc',
-    'crypto_android.cc',
-    'crypto_linux.cc',
-    'crypto_macos.cc',
-    'crypto_win.cc',
     'dartutils.cc',
     'dartutils.h',
     'dbg_connection.cc',
@@ -33,15 +28,6 @@
     'directory_linux.cc',
     'directory_macos.cc',
     'directory_win.cc',
-    'eventhandler.cc',
-    'eventhandler.h',
-    'eventhandler_android.cc',
-    'eventhandler_linux.cc',
-    'eventhandler_linux.h',
-    'eventhandler_macos.cc',
-    'eventhandler_macos.h',
-    'eventhandler_win.cc',
-    'eventhandler_win.h',
     'extensions.h',
     'extensions.cc',
     'extensions_android.cc',
@@ -61,26 +47,6 @@
     'fdutils_macos.cc',
     'hashmap_test.cc',
     'isolate_data.h',
-    'platform.cc',
-    'platform.h',
-    'platform_android.cc',
-    'platform_linux.cc',
-    'platform_macos.cc',
-    'platform_win.cc',
-    'process.cc',
-    'process.h',
-    'process_android.cc',
-    'process_linux.cc',
-    'process_macos.cc',
-    'process_win.cc',
-    'socket.cc',
-    'socket.h',
-    'socket_android.cc',
-    'socket_linux.cc',
-    'socket_macos.cc',
-    'socket_win.cc',
-    'set.h',
-    'set_test.cc',
     'thread.h',
     'utils.h',
     'utils_android.cc',
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 68258c3..91e82e8 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -12,11 +12,11 @@
 #include "platform/assert.h"
 
 
-// List all native functions implemented in standalone dart that is used
-// to inject additional functionality e.g: Logger, file I/O, socket I/O etc.
+// Lists the native functions implementing basic functionality in
+// standalone dart, such as printing, file I/O, and platform information.
+// Advanced I/O classes like sockets and process management are implemented
+// using functions listed in io_natives.cc.
 #define BUILTIN_NATIVE_LIST(V)                                                 \
-  V(Common_IsBuiltinList, 1)                                                   \
-  V(Crypto_GetRandomBytes, 1)                                                  \
   V(Directory_Exists, 1)                                                       \
   V(Directory_Create, 1)                                                       \
   V(Directory_Current, 0)                                                      \
@@ -24,8 +24,6 @@
   V(Directory_Delete, 2)                                                       \
   V(Directory_Rename, 2)                                                       \
   V(Directory_NewServicePort, 0)                                               \
-  V(EventHandler_Start, 1)                                                     \
-  V(EventHandler_SendData, 4)                                                  \
   V(Exit, 1)                                                                   \
   V(File_Open, 2)                                                              \
   V(File_Exists, 1)                                                            \
@@ -48,27 +46,7 @@
   V(File_OpenStdio, 1)                                                         \
   V(File_GetStdioHandleType, 1)                                                \
   V(File_NewServicePort, 0)                                                    \
-  V(Logger_PrintString, 1)                                                     \
-  V(Platform_NumberOfProcessors, 0)                                            \
-  V(Platform_OperatingSystem, 0)                                               \
-  V(Platform_PathSeparator, 0)                                                 \
-  V(Platform_LocalHostname, 0)                                                 \
-  V(Platform_Environment, 0)                                                   \
-  V(Process_Start, 10)                                                         \
-  V(Process_Kill, 3)                                                           \
-  V(ServerSocket_CreateBindListen, 4)                                          \
-  V(ServerSocket_Accept, 2)                                                    \
-  V(Socket_CreateConnect, 3)                                                   \
-  V(Socket_Available, 1)                                                       \
-  V(Socket_Read, 2)                                                            \
-  V(Socket_ReadList, 4)                                                        \
-  V(Socket_WriteList, 4)                                                       \
-  V(Socket_GetPort, 1)                                                         \
-  V(Socket_GetRemotePeer, 1)                                                   \
-  V(Socket_GetError, 1)                                                        \
-  V(Socket_GetStdioHandle, 2)                                                  \
-  V(Socket_NewServicePort, 0)
-
+  V(Logger_PrintString, 1)
 
 BUILTIN_NATIVE_LIST(DECLARE_FUNCTION);
 
@@ -81,8 +59,8 @@
 };
 
 
-Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
-                                          int argument_count) {
+Dart_NativeFunction Builtin::BuiltinNativeLookup(Dart_Handle name,
+                                                 int argument_count) {
   const char* function_name = NULL;
   Dart_Handle result = Dart_StringToCString(name, &function_name);
   DART_CHECK_VALID(result);
diff --git a/runtime/bin/builtin_nolib.cc b/runtime/bin/builtin_nolib.cc
index 77428c7..be941a7 100644
--- a/runtime/bin/builtin_nolib.cc
+++ b/runtime/bin/builtin_nolib.cc
@@ -8,7 +8,7 @@
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
-
+#include "bin/io_natives.h"
 
 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = {
   /* { url_, source_, patch_url_, patch_source_, has_natives_ } */
@@ -27,6 +27,15 @@
   return Dart_NewApiError("Unreachable code in Builtin::Source (%d).", id);
 }
 
+/**
+ * Looks up native functions in both libdart_builtin and libdart_io.
+ */
+Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
+                                          int argument_count) {
+  Dart_NativeFunction result = BuiltinNativeLookup(name, argument_count);
+  if (result != NULL) return result;
+  return IONativeLookup(name, argument_count);
+}
 
 void Builtin::SetNativeResolver(BuiltinLibraryId id) {
   ASSERT((sizeof(builtin_libraries_) / sizeof(builtin_lib_props)) ==
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 3740b7e..f185437 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -16,7 +16,6 @@
 const char* DartUtils::kDartExtensionScheme = "dart-ext:";
 const char* DartUtils::kBuiltinLibURL = "dart:builtin";
 const char* DartUtils::kCoreLibURL = "dart:core";
-const char* DartUtils::kCoreImplLibURL = "dart:coreimpl";
 const char* DartUtils::kCryptoLibURL = "dart:crypto";
 const char* DartUtils::kIOLibURL = "dart:io";
 const char* DartUtils::kIOLibPatchURL = "dart:io-patch";
@@ -485,6 +484,13 @@
 }
 
 
+Dart_Handle DartUtils::GetDartClass(const char* library_url,
+                                    const char* class_name) {
+  return Dart_GetClass(Dart_LookupLibrary(NewString(library_url)),
+                       NewString(class_name));
+}
+
+
 Dart_Handle DartUtils::NewDartOSError() {
   // Extract the current OS error.
   OSError os_error;
@@ -493,22 +499,41 @@
 
 
 Dart_Handle DartUtils::NewDartOSError(OSError* os_error) {
-  // Create a Dart OSError object with the information retrieved from the OS.
-  Dart_Handle url = NewString("dart:io");
-  if (Dart_IsError(url)) return url;
-  Dart_Handle lib = Dart_LookupLibrary(url);
-  if (Dart_IsError(lib)) return lib;
-  Dart_Handle class_name = NewString("OSError");
-  if (Dart_IsError(class_name)) return class_name;
-  Dart_Handle clazz = Dart_GetClass(lib, class_name);
-  if (Dart_IsError(clazz)) return clazz;
+  // Create a dart:io OSError object with the information retrieved from the OS.
+  Dart_Handle clazz = GetDartClass(kIOLibURL, "OSError");
   Dart_Handle args[2];
   args[0] = NewString(os_error->message());
-  if (Dart_IsError(args[0])) return args[0];
   args[1] = Dart_NewInteger(os_error->code());
-  if (Dart_IsError(args[1])) return args[1];
-  Dart_Handle err = Dart_New(clazz, Dart_Null(), 2, args);
-  return err;
+  return Dart_New(clazz, Dart_Null(), 2, args);
+}
+
+
+Dart_Handle DartUtils::NewDartSocketIOException(const char* message,
+                                                Dart_Handle os_error) {
+  // Create a dart:io SocketIOException object.
+  Dart_Handle clazz = GetDartClass(kIOLibURL, "SocketIOException");
+  Dart_Handle args[2];
+  args[0] = NewString(message);
+  args[1] = os_error;
+  return Dart_New(clazz, Dart_Null(), 2, args);
+}
+
+
+Dart_Handle DartUtils::NewDartExceptionWithMessage(const char* library_url,
+                                                   const char* exception_name,
+                                                   const char* message) {
+  // Create a Dart Exception object with a message.
+  Dart_Handle clazz = GetDartClass(library_url, exception_name);
+  Dart_Handle args[1];
+  args[0] = NewString(message);
+  return Dart_New(clazz, Dart_Null(), 1, args);
+}
+
+
+Dart_Handle DartUtils::NewDartArgumentError(const char* message) {
+  return NewDartExceptionWithMessage(kCoreLibURL,
+                                     "ArgumentError",
+                                     message);
 }
 
 
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 93f7001..95d44c9 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -10,6 +10,19 @@
 #include "include/dart_api.h"
 #include "platform/globals.h"
 
+/* Handles error handles returned from Dart API functions.  If a value
+ * is an error, uses Dart_PropagateError to throw it to the enclosing
+ * Dart activation.  Otherwise, returns the original handle.
+ *
+ * This function can be used to wrap most API functions, but API
+ * functions can also be nested without this error check, since all
+ * API functions return any error handles passed in as arguments, unchanged.
+ */
+static inline Dart_Handle ThrowIfError(Dart_Handle handle) {
+  if (Dart_IsError(handle)) Dart_PropagateError(handle);
+  return handle;
+}
+
 class CommandLineOptions {
  public:
   explicit CommandLineOptions(int max_count)
@@ -105,14 +118,22 @@
   static bool PostNull(Dart_Port port_id);
   static bool PostInt32(Dart_Port port_id, int32_t value);
 
+  static Dart_Handle GetDartClass(const char* library_url,
+                                  const char* class_name);
   // Create a new Dart OSError object with the current OS error.
   static Dart_Handle NewDartOSError();
   // Create a new Dart OSError object with the provided OS error.
   static Dart_Handle NewDartOSError(OSError* os_error);
+  static Dart_Handle NewDartSocketIOException(const char* message,
+                                              Dart_Handle os_error);
+  static Dart_Handle NewDartExceptionWithMessage(const char* library_url,
+                                                 const char* exception_name,
+                                                 const char* message);
+  static Dart_Handle NewDartArgumentError(const char* message);
 
   // Create a new Dart String object from a C String.
   static Dart_Handle NewString(const char* str) {
-    ASSERT((str != NULL) && (strlen(str) != 0));
+    ASSERT(str != NULL);
     return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str),
                                   strlen(str));
   }
@@ -126,7 +147,6 @@
   static const char* kDartExtensionScheme;
   static const char* kBuiltinLibURL;
   static const char* kCoreLibURL;
-  static const char* kCoreImplLibURL;
   static const char* kCryptoLibURL;
   static const char* kIOLibURL;
   static const char* kIOLibPatchURL;
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc
index 436f987..9508dae 100644
--- a/runtime/bin/directory_win.cc
+++ b/runtime/bin/directory_win.cc
@@ -53,7 +53,9 @@
     if (written != strlen(dir_name)) {
       return false;
     }
-    bool ok = listing->HandleDirectory(path);
+    char* utf8_path = StringUtils::SystemStringToUtf8(path);
+    bool ok = listing->HandleDirectory(utf8_path);
+    free(utf8_path);
     if (!ok) return ok;
     if (recursive) {
       return ListRecursively(path, recursive, listing);
@@ -74,7 +76,10 @@
   if (written != strlen(file_name)) {
     return false;
   };
-  return listing->HandleFile(path);
+  char* utf8_path = StringUtils::SystemStringToUtf8(path);
+  bool ok = listing->HandleFile(utf8_path);
+  free(utf8_path);
+  return ok;
 }
 
 
@@ -125,7 +130,9 @@
 
 static void PostError(DirectoryListing* listing,
                       const char* dir_name) {
-  listing->HandleError(dir_name);
+  const char* utf8_path = StringUtils::SystemStringToUtf8(dir_name);
+  listing->HandleError(utf8_path);
+  free(const_cast<char*>(utf8_path));
 }
 
 
@@ -314,44 +321,61 @@
 bool Directory::List(const char* dir_name,
                      bool recursive,
                      DirectoryListing* listing) {
-  bool completed = ListRecursively(dir_name, recursive, listing);
+  const char* system_name = StringUtils::Utf8ToSystemString(dir_name);
+  bool completed = ListRecursively(system_name, recursive, listing);
+  free(const_cast<char*>(system_name));
   return completed;
 }
 
 
-Directory::ExistsResult Directory::Exists(const char* dir_name) {
+static Directory::ExistsResult ExistsHelper(const char* dir_name) {
   DWORD attributes = GetFileAttributes(dir_name);
   if (attributes == INVALID_FILE_ATTRIBUTES) {
     DWORD last_error = GetLastError();
     if (last_error == ERROR_FILE_NOT_FOUND ||
         last_error == ERROR_PATH_NOT_FOUND) {
-      return DOES_NOT_EXIST;
+      return Directory::DOES_NOT_EXIST;
     } else {
       // We might not be able to get the file attributes for other
       // reasons such as lack of permissions. In that case we do
       // not know if the directory exists.
-      return UNKNOWN;
+      return Directory::UNKNOWN;
     }
   }
   bool exists = (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
-  return exists ? EXISTS : DOES_NOT_EXIST;
+  return exists ? Directory::EXISTS : Directory::DOES_NOT_EXIST;
+}
+
+
+Directory::ExistsResult Directory::Exists(const char* dir_name) {
+  const char* system_name = StringUtils::Utf8ToSystemString(dir_name);
+  Directory::ExistsResult result = ExistsHelper(system_name);
+  free(const_cast<char*>(system_name));
+  return result;
 }
 
 
 char* Directory::Current() {
-  char* result;
   int length = GetCurrentDirectory(0, NULL);
-  result = reinterpret_cast<char*>(malloc(length + 1));
-  GetCurrentDirectory(length + 1, result);
+  char* current = reinterpret_cast<char*>(malloc(length + 1));
+  GetCurrentDirectory(length + 1, current);
+  char* result = StringUtils::SystemStringToUtf8(current);
+  free(current);
   return result;
 }
 
 
 bool Directory::Create(const char* dir_name) {
+  const char* system_name = StringUtils::Utf8ToSystemString(dir_name);
   // If the directory already exists and is a directory do not
   // attempt to create it again and treat it as a success.
-  if (Exists(dir_name) == EXISTS) return true;
-  return (CreateDirectory(dir_name, NULL) != 0);
+  if (ExistsHelper(system_name) == EXISTS) {
+    free(const_cast<char*>(system_name));
+    return true;
+  }
+  int create_status = CreateDirectory(system_name, NULL);
+  free(const_cast<char*>(system_name));
+  return (create_status != 0);
 }
 
 
@@ -369,7 +393,10 @@
       return NULL;
     }
   } else {
-    snprintf(path, MAX_PATH, "%s", const_template);
+    const char* system_template =
+        StringUtils::Utf8ToSystemString(const_template);
+    snprintf(path, MAX_PATH, "%s", system_template);
+    free(const_cast<char*>(system_template));
     path_length = strlen(path);
   }
   // Length of tempdir-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx is 44.
@@ -401,30 +428,44 @@
     free(path);
     return NULL;
   }
-  return path;
+  char* result = StringUtils::SystemStringToUtf8(path);
+  free(path);
+  return result;
 }
 
 
 bool Directory::Delete(const char* dir_name, bool recursive) {
+  bool result = false;
+  const char* system_dir_name =
+      StringUtils::Utf8ToSystemString(dir_name);
   if (!recursive) {
-    return (RemoveDirectory(dir_name) != 0);
+    result = (RemoveDirectory(system_dir_name) != 0);
   } else {
-    return DeleteRecursively(dir_name);
+    result = DeleteRecursively(system_dir_name);
   }
+  free(const_cast<char*>(system_dir_name));
+  return result;
 }
 
 
 bool Directory::Rename(const char* path, const char* new_path) {
-  ExistsResult exists = Exists(path);
+  const char* system_path = StringUtils::Utf8ToSystemString(path);
+  const char* system_new_path =
+      StringUtils::Utf8ToSystemString(new_path);
+  ExistsResult exists = ExistsHelper(system_path);
   if (exists != EXISTS) return false;
-  ExistsResult new_exists = Exists(new_path);
+  ExistsResult new_exists = ExistsHelper(system_new_path);
   // MoveFile does not allow replacing exising directories. Therefore,
   // if the new_path is currently a directory we need to delete it
   // first.
   if (new_exists == EXISTS) {
-    bool success = DeleteRecursively(new_path);
+    bool success = DeleteRecursively(system_new_path);
     if (!success) return false;
   }
   DWORD flags = MOVEFILE_WRITE_THROUGH;
-  return (MoveFileEx(path, new_path, flags) != 0);
+  int move_status =
+      MoveFileEx(system_path, system_new_path, flags);
+  free(const_cast<char*>(system_path));
+  free(const_cast<char*>(system_new_path));
+  return (move_status != 0);
 }
diff --git a/runtime/bin/eventhandler_patch.dart b/runtime/bin/eventhandler_patch.dart
index f1e3a25..8fb487a 100644
--- a/runtime/bin/eventhandler_patch.dart
+++ b/runtime/bin/eventhandler_patch.dart
@@ -4,7 +4,7 @@
 
 patch class _EventHandler {
   /* patch */ static void _start() {
-    if (_eventHandler === null) {
+    if (_eventHandler == null) {
       _eventHandler = new _EventHandlerImpl();
       _eventHandler._start();
     }
@@ -13,7 +13,7 @@
   /* patch */ static _sendData(Object sender,
                                ReceivePort receivePort,
                                int data) {
-    if (_eventHandler !== null) {
+    if (_eventHandler != null) {
       _eventHandler._sendData(sender, receivePort, data);
     }
   }
diff --git a/runtime/bin/fdutils.h b/runtime/bin/fdutils.h
index 1cb82e3..6771f21 100644
--- a/runtime/bin/fdutils.h
+++ b/runtime/bin/fdutils.h
@@ -10,6 +10,8 @@
 
 class FDUtils {
  public:
+  static bool SetCloseOnExec(intptr_t fd);
+
   static bool SetNonBlocking(intptr_t fd);
   static bool SetBlocking(intptr_t fd);
 
diff --git a/runtime/bin/fdutils_android.cc b/runtime/bin/fdutils_android.cc
index 7e8f72b..8d946e6 100644
--- a/runtime/bin/fdutils_android.cc
+++ b/runtime/bin/fdutils_android.cc
@@ -10,6 +10,22 @@
 #include "bin/fdutils.h"
 
 
+bool FDUtils::SetCloseOnExec(intptr_t fd) {
+  intptr_t status;
+  status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
+  if (status < 0) {
+    perror("fcntl F_GETFD failed");
+    return false;
+  }
+  status |= FD_CLOEXEC;
+  if (TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, status)) < 0) {
+    perror("fcntl F_SETFD failed");
+    return false;
+  }
+  return true;
+}
+
+
 static bool SetBlockingHelper(intptr_t fd, bool blocking) {
   intptr_t status;
   status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
diff --git a/runtime/bin/fdutils_linux.cc b/runtime/bin/fdutils_linux.cc
index 7e8f72b..8d946e6 100644
--- a/runtime/bin/fdutils_linux.cc
+++ b/runtime/bin/fdutils_linux.cc
@@ -10,6 +10,22 @@
 #include "bin/fdutils.h"
 
 
+bool FDUtils::SetCloseOnExec(intptr_t fd) {
+  intptr_t status;
+  status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
+  if (status < 0) {
+    perror("fcntl F_GETFD failed");
+    return false;
+  }
+  status |= FD_CLOEXEC;
+  if (TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, status)) < 0) {
+    perror("fcntl F_SETFD failed");
+    return false;
+  }
+  return true;
+}
+
+
 static bool SetBlockingHelper(intptr_t fd, bool blocking) {
   intptr_t status;
   status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
diff --git a/runtime/bin/fdutils_macos.cc b/runtime/bin/fdutils_macos.cc
index b9ea049..92e63fc 100644
--- a/runtime/bin/fdutils_macos.cc
+++ b/runtime/bin/fdutils_macos.cc
@@ -10,6 +10,22 @@
 #include "bin/fdutils.h"
 
 
+bool FDUtils::SetCloseOnExec(intptr_t fd) {
+  intptr_t status;
+  status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
+  if (status < 0) {
+    perror("fcntl F_GETFD failed");
+    return false;
+  }
+  status |= FD_CLOEXEC;
+  if (TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, status)) < 0) {
+    perror("fcntl F_SETFD failed");
+    return false;
+  }
+  return true;
+}
+
+
 static bool SetBlockingHelper(intptr_t fd, bool blocking) {
   intptr_t status;
   status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 4fbd9cf..1e5df5f 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -5,13 +5,6 @@
 #ifndef BIN_FILE_H_
 #define BIN_FILE_H_
 
-#if defined(_WIN32)
-typedef signed __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-#else
-#include <stdint.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index 77665e6..66e6251 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -115,6 +115,7 @@
   if ((mode & kTruncate) != 0) {
     flags = flags | O_TRUNC;
   }
+  flags |= O_CLOEXEC;
   int fd = TEMP_FAILURE_RETRY(open(name, flags, 0666));
   if (fd < 0) {
     return NULL;
@@ -146,7 +147,7 @@
 
 
 bool File::Create(const char* name) {
-  int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CREAT, 0666));
+  int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CREAT | O_CLOEXEC, 0666));
   if (fd < 0) {
     return false;
   }
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index 77665e6..66e6251 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -115,6 +115,7 @@
   if ((mode & kTruncate) != 0) {
     flags = flags | O_TRUNC;
   }
+  flags |= O_CLOEXEC;
   int fd = TEMP_FAILURE_RETRY(open(name, flags, 0666));
   if (fd < 0) {
     return NULL;
@@ -146,7 +147,7 @@
 
 
 bool File::Create(const char* name) {
-  int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CREAT, 0666));
+  int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CREAT | O_CLOEXEC, 0666));
   if (fd < 0) {
     return false;
   }
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index 09138cf..b5bc95a 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -12,6 +12,7 @@
 #include <limits.h>
 
 #include "bin/builtin.h"
+#include "bin/fdutils.h"
 
 class FileHandle {
  public:
@@ -120,6 +121,7 @@
   if (fd < 0) {
     return NULL;
   }
+  FDUtils::SetCloseOnExec(fd);
   if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) {
     int position = TEMP_FAILURE_RETRY(lseek(fd, 0, SEEK_END));
     if (position < 0) {
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index d32d107..97a98a6 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -104,7 +104,9 @@
   if ((mode & kTruncate) != 0) {
     flags = flags | O_TRUNC;
   }
-  int fd = open(name, flags, 0666);
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  int fd = open(system_name, flags, 0666);
+  free(const_cast<char*>(system_name));
   if (fd < 0) {
     return NULL;
   }
@@ -126,7 +128,10 @@
 
 bool File::Exists(const char* name) {
   struct stat st;
-  if (stat(name, &st) == 0) {
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  bool stat_status = stat(system_name, &st);
+  free(const_cast<char*>(system_name));
+  if (stat_status == 0) {
     return ((st.st_mode & S_IFMT) == S_IFREG);
   } else {
     return false;
@@ -135,7 +140,9 @@
 
 
 bool File::Create(const char* name) {
-  int fd = open(name, O_RDONLY | O_CREAT, 0666);
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  int fd = open(system_name, O_RDONLY | O_CREAT, 0666);
+  free(const_cast<char*>(system_name));
   if (fd < 0) {
     return false;
   }
@@ -144,7 +151,9 @@
 
 
 bool File::Delete(const char* name) {
-  int status = remove(name);
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  int status = remove(system_name);
+  free(const_cast<char*>(system_name));
   if (status == -1) {
     return false;
   }
@@ -154,7 +163,10 @@
 
 off_t File::LengthFromName(const char* name) {
   struct stat st;
-  if (stat(name, &st) == 0) {
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  int stat_status = stat(system_name, &st);
+  free(const_cast<char*>(system_name));
+  if (stat_status == 0) {
     return st.st_size;
   }
   return -1;
@@ -163,7 +175,10 @@
 
 time_t File::LastModified(const char* name) {
   struct stat st;
-  if (stat(name, &st) == 0) {
+  const char* system_name = StringUtils::Utf8ToSystemString(name);
+  int stat_status = stat(system_name, &st);
+  free(const_cast<char*>(system_name));
+  if (stat_status == 0) {
     return st.st_mtime;
   }
   return -1;
@@ -181,39 +196,53 @@
 
 char* File::GetCanonicalPath(const char* pathname) {
   struct stat st;
-  if (stat(pathname, &st) != 0) {
+  const char* system_name = StringUtils::Utf8ToSystemString(pathname);
+  int stat_status = stat(system_name, &st);
+  if (stat_status != 0) {
     SetLastError(ERROR_FILE_NOT_FOUND);
+    free(const_cast<char*>(system_name));
     return NULL;
   }
-  int required_size = GetFullPathName(pathname, 0, NULL, NULL);
+  int required_size = GetFullPathName(system_name, 0, NULL, NULL);
   char* path = static_cast<char*>(malloc(required_size));
-  int written = GetFullPathName(pathname, required_size, path, NULL);
+  int written = GetFullPathName(system_name, required_size, path, NULL);
+  free(const_cast<char*>(system_name));
   ASSERT(written == (required_size - 1));
-  return path;
+  char* result = StringUtils::SystemStringToUtf8(path);
+  free(path);
+  return result;
 }
 
 
 char* File::GetContainingDirectory(char* pathname) {
   struct stat st;
-  if (stat(pathname, &st) == 0) {
+  char* system_name = StringUtils::Utf8ToSystemString(pathname);
+  int stat_status = stat(system_name, &st);
+  if (stat_status == 0) {
     if ((st.st_mode & S_IFMT) != S_IFREG) {
       SetLastError(ERROR_FILE_NOT_FOUND);
+      free(system_name);
       return NULL;
     }
   } else {
     SetLastError(ERROR_FILE_NOT_FOUND);
+    free(system_name);
     return NULL;
   }
-  int required_size = GetFullPathName(pathname, 0, NULL, NULL);
+  int required_size = GetFullPathName(system_name, 0, NULL, NULL);
   char* path = static_cast<char*>(malloc(required_size));
   char* file_part = NULL;
-  int written = GetFullPathName(pathname, required_size, path, &file_part);
+  int written =
+    GetFullPathName(system_name, required_size, path, &file_part);
+  free(system_name);
   ASSERT(written == (required_size - 1));
   ASSERT(file_part != NULL);
   ASSERT(file_part > path);
   ASSERT(file_part[-1] == '\\');
   file_part[-1] = '\0';
-  return path;
+  char* result = StringUtils::SystemStringToUtf8(path);
+  free(path);
+  return result;
 }
 
 
diff --git a/runtime/bin/io.dart b/runtime/bin/io.dart
index f260f68..cd39eee 100644
--- a/runtime/bin/io.dart
+++ b/runtime/bin/io.dart
@@ -7,7 +7,6 @@
 // file which is in lib/io/io.dart.
 
 #library("dart:io");
-#import("dart:coreimpl");
 #import("dart:crypto");
 #import("dart:isolate");
 #import("dart:math");
diff --git a/runtime/bin/io_impl_sources.gypi b/runtime/bin/io_impl_sources.gypi
new file mode 100644
index 0000000..f86ca02
--- /dev/null
+++ b/runtime/bin/io_impl_sources.gypi
@@ -0,0 +1,47 @@
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 some C++ sources for the dart:io library.  The other
+# implementation files are in builtin_impl_sources.gypi.
+{
+  'sources': [
+    'common.cc',
+    'crypto.cc',
+    'crypto_android.cc',
+    'crypto_linux.cc',
+    'crypto_macos.cc',
+    'crypto_win.cc',
+    'eventhandler.cc',
+    'eventhandler.h',
+    'eventhandler_android.cc',
+    'eventhandler_linux.cc',
+    'eventhandler_linux.h',
+    'eventhandler_macos.cc',
+    'eventhandler_macos.h',
+    'eventhandler_win.cc',
+    'eventhandler_win.h',
+    'net/nss_memio.cc',
+    'net/nss_memio.h',
+    'platform.cc',
+    'platform.h',
+    'platform_android.cc',
+    'platform_linux.cc',
+    'platform_macos.cc',
+    'platform_win.cc',
+    'process.cc',
+    'process.h',
+    'process_android.cc',
+    'process_linux.cc',
+    'process_macos.cc',
+    'process_win.cc',
+    'socket.cc',
+    'socket.h',
+    'socket_android.cc',
+    'socket_linux.cc',
+    'socket_macos.cc',
+    'socket_win.cc',
+    'tls_socket.cc',
+    'tls_socket.h',
+  ],
+}
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
new file mode 100644
index 0000000..1cd0236
--- /dev/null
+++ b/runtime/bin/io_natives.cc
@@ -0,0 +1,77 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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/io_natives.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "include/dart_api.h"
+#include "platform/assert.h"
+
+
+// Lists the native functions implementing advanced dart:io classes.
+// Some classes, like File and Directory, list their implementations in
+// builtin_natives.cc instead.
+#define IO_NATIVE_LIST(V)                                                      \
+  V(Common_IsBuiltinList, 1)                                                   \
+  V(Crypto_GetRandomBytes, 1)                                                  \
+  V(EventHandler_Start, 1)                                                     \
+  V(EventHandler_SendData, 4)                                                  \
+  V(Platform_NumberOfProcessors, 0)                                            \
+  V(Platform_OperatingSystem, 0)                                               \
+  V(Platform_PathSeparator, 0)                                                 \
+  V(Platform_LocalHostname, 0)                                                 \
+  V(Platform_Environment, 0)                                                   \
+  V(Process_Start, 10)                                                         \
+  V(Process_Kill, 3)                                                           \
+  V(ServerSocket_CreateBindListen, 4)                                          \
+  V(ServerSocket_Accept, 2)                                                    \
+  V(Socket_CreateConnect, 3)                                                   \
+  V(Socket_Available, 1)                                                       \
+  V(Socket_Read, 2)                                                            \
+  V(Socket_ReadList, 4)                                                        \
+  V(Socket_WriteList, 4)                                                       \
+  V(Socket_GetPort, 1)                                                         \
+  V(Socket_GetRemotePeer, 1)                                                   \
+  V(Socket_GetError, 1)                                                        \
+  V(Socket_GetStdioHandle, 2)                                                  \
+  V(Socket_NewServicePort, 0)                                                  \
+  V(TlsSocket_Connect, 3)                                                      \
+  V(TlsSocket_Destroy, 1)                                                      \
+  V(TlsSocket_Handshake, 1)                                                    \
+  V(TlsSocket_Init, 1)                                                         \
+  V(TlsSocket_ProcessBuffer, 2)                                                \
+  V(TlsSocket_RegisterHandshakeCompleteCallback, 2)                            \
+  V(TlsSocket_SetCertificateDatabase, 1)
+
+IO_NATIVE_LIST(DECLARE_FUNCTION);
+
+static struct NativeEntries {
+  const char* name_;
+  Dart_NativeFunction function_;
+  int argument_count_;
+} IOEntries[] = {
+  IO_NATIVE_LIST(REGISTER_FUNCTION)
+};
+
+
+Dart_NativeFunction IONativeLookup(Dart_Handle name,
+                                   int argument_count) {
+  const char* function_name = NULL;
+  Dart_Handle result = Dart_StringToCString(name, &function_name);
+  DART_CHECK_VALID(result);
+  ASSERT(function_name != NULL);
+  int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries);
+  for (int i = 0; i < num_entries; i++) {
+    struct NativeEntries* entry = &(IOEntries[i]);
+    if (!strcmp(function_name, entry->name_) &&
+        (entry->argument_count_ == argument_count)) {
+      return reinterpret_cast<Dart_NativeFunction>(entry->function_);
+    }
+  }
+  return NULL;
+}
diff --git a/runtime/bin/io_natives.h b/runtime/bin/io_natives.h
new file mode 100644
index 0000000..1745555
--- /dev/null
+++ b/runtime/bin/io_natives.h
@@ -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.
+
+#ifndef BIN_IO_NATIVES_H_
+#define BIN_IO_NATIVES_H_
+
+#include "include/dart_api.h"
+
+Dart_NativeFunction IONativeLookup(Dart_Handle name,
+                                   int argument_count);
+
+#endif  // BIN_IO_NATIVES_H_
diff --git a/runtime/bin/io_sources.gypi b/runtime/bin/io_sources.gypi
index f74d58d..9300c1c 100644
--- a/runtime/bin/io_sources.gypi
+++ b/runtime/bin/io_sources.gypi
@@ -14,5 +14,6 @@
     'process_patch.dart',
     'socket_patch.dart',
     'stdio_patch.dart',
+    'tls_socket_patch.dart',
   ],
 }
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 7cc8f0c..534f886 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -231,6 +231,25 @@
   perf_events_symbols_file->WriteFully(buffer, num_bytes);
 }
 
+// Convert all the arguments to UTF8. On Windows, the arguments are
+// encoded in the current code page and not UTF8.
+//
+// Returns true if the arguments are converted. In that case
+// each of the arguments need to be deallocated using free.
+static bool Utf8ConvertArgv(int argc, char** argv) {
+  bool result = false;
+  for (int i = 0; i < argc; i++) {
+    char* arg = argv[i];
+    argv[i] = StringUtils::SystemStringToUtf8(arg);
+    if (i == 0) {
+      result = argv[i] != arg;
+    } else {
+      ASSERT(result == (argv[i] != arg));
+    }
+  }
+  return result;
+}
+
 
 // Parse out the command line arguments. Returns -1 if the arguments
 // are incorrect, 0 otherwise.
@@ -637,6 +656,10 @@
     fprintf(stderr, "Initialization failed\n");
   }
 
+  // On Windows, the argv strings are code page encoded and not
+  // utf8. We need to convert them to utf8.
+  bool argv_converted = Utf8ConvertArgv(argc, argv);
+
   // Parse command line arguments.
   if (ParseArguments(argc,
                      argv,
@@ -724,8 +747,8 @@
     result = SetBreakpoint(breakpoint_at, library);
     if (Dart_IsError(result)) {
       return ErrorExit("Error setting breakpoint at '%s': %s\n",
-          breakpoint_at,
-          Dart_GetError(result));
+                       breakpoint_at,
+                       Dart_GetError(result));
     }
   }
 
@@ -747,6 +770,10 @@
   Dart_ShutdownIsolate();
   // Terminate process exit-code handler.
   Process::TerminateExitCodeHandler();
+  // Free copied argument strings if converted.
+  if (argv_converted) {
+    for (int i = 0; i < argc; i++) free(argv[i]);
+  }
 
   return 0;
 }
diff --git a/runtime/bin/net/.gitignore b/runtime/bin/net/.gitignore
new file mode 100644
index 0000000..bfd80d7
--- /dev/null
+++ b/runtime/bin/net/.gitignore
@@ -0,0 +1,13 @@
+/libssl_dart.target.mk
+/minizip_dart.target.mk
+/nspr_dart.target.mk
+/nss.Makefile
+/nss_dart.target.mk
+/nss_static_dart.target.mk
+/nssckbi_dart.target.mk
+/sqlite.Makefile
+/sqlite_dart.target.mk
+/sqlite_shell_dart.target.mk
+/ssl.Makefile
+/zlib.Makefile
+/zlib_dart.target.mk
diff --git a/runtime/bin/net/nss.gyp b/runtime/bin/net/nss.gyp
new file mode 100644
index 0000000..ad5d888
--- /dev/null
+++ b/runtime/bin/net/nss.gyp
@@ -0,0 +1,1276 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 is a modified copy of Chromium's deps/third_party/nss/nss.gyp.
+# Revision 165464 (this should agree with "nss_rev" in DEPS).
+{
+  # Added by Dart. All Dart comments refer to the following block or line.
+  'includes': [
+    '../../tools/gyp/runtime-configurations.gypi',
+    '../../tools/gyp/nss_configurations.gypi',
+  ],
+  'variables': {
+    # Added by Dart.
+    'nss_directory': '../../../third_party/nss',
+    'conditions': [
+      ['OS=="ios"', {
+        'exclude_nss_root_certs%': 0,
+        'exclude_nss_libpkix%': 0,
+      }, {
+        'exclude_nss_root_certs%': 1,
+        'exclude_nss_libpkix%': 1,
+      }],
+    ],
+  },
+  'target_defaults': {
+    'configurations': {
+      'Debug': {
+        'defines': [
+          'DEBUG',
+          '_DEBUG',
+        ],
+      },
+      'Release': {
+        'defines': [
+          'NDEBUG',
+        ],
+      },
+      # Added by Dart.
+      'Dart_ia32_Base': {
+        'defines': [
+          'NSS_X86_OR_X64',
+          'NSS_X86',
+          '_X86_',
+        ],
+      },
+      # Added by Dart.
+      'Dart_x64_Base': {
+        'conditions': [
+          # On Windows, Dart is always built as a 32-bit version,
+          # even if a 64-bit build is requested.
+          ['OS=="win"', {
+            'defines': [
+              'NSS_X86_OR_X64',
+              'NSS_X86',
+              '_X86_',
+              ],
+            }, {
+            'defines': [
+              'NSS_X86_OR_X64',
+              'NSS_X64',
+              'NSS_USE_64',
+          ]}],
+        ],
+      },
+    },
+    'conditions': [
+      ['OS=="win"', {
+        'configurations': {
+          'Common_Base': {
+            'msvs_configuration_attributes': {
+              # Do not compile NSPR and NSS with /D _UNICODE /D UNICODE.
+              'CharacterSet': '0'
+            }
+          }
+        },
+        'defines!': [
+          'WIN32_LEAN_AND_MEAN',
+        ],
+      }],
+    ],
+  },
+  # Added by Dart.  We do not indent, so diffs with the original are clearer.
+  'conditions': [[ 'dart_io_support==1', {
+  'targets': [
+    {
+      'target_name': 'nspr_dart',
+      'product_name': 'crnspr',
+      'type': '<(component)',
+      # Changed by Dart: '<(nss_directory)/' added to all paths.
+      'sources': [
+        # Added by Dart.
+        'os_linux.S',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds/plarena.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds/plarena.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds/plarenas.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds/plhash.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds/plhash.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/include/plbase64.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/include/plerror.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/include/plgetopt.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/include/plstr.h',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/base64.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/plerror.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/plgetopt.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strcase.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strcat.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strchr.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strcmp.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strcpy.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strdup.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strlen.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strpbrk.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strstr.c',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/src/strtok.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/prosdep.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_darwin.cfg',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_darwin.h',
+        # Added by Dart.
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_linux.cfg',
+        # Added by Dart.
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_linux.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_pcos.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_pth.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_unixos.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_unix_errors.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_win32_errors.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_win95.cfg',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/md/_win95.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/nspr.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/obsolete/pralarm.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/obsolete/probslet.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/obsolete/protypes.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/obsolete/prsem.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/pratom.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prbit.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prclist.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prcmon.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prcountr.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prcpucfg.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prcvar.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prdtoa.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prenv.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prerr.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prerror.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prinet.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prinit.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prinrval.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prio.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/pripcsem.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private/pprio.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private/pprmwait.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private/pprthred.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private/primpl.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private/prpriv.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prlink.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prlock.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prlog.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prlong.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prmem.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prmon.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prmwait.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prnetdb.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prolock.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prpdce.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prprf.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prproces.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prrng.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prrwlock.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prshm.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prshma.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prsystem.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prthread.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prtime.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prtpool.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prtrace.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prtypes.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prvrsion.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/prwin16.h',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prdir.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prfdcach.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prfile.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prio.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/priometh.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/pripv6.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prlayer.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prlog.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prmapopt.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prmmap.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prmwait.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prpolevt.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prprf.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prscanf.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prsocket.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/io/prstdio.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/linking/prlink.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/malloc/prmalloc.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/malloc/prmem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/prosdep.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/darwin.c',
+        # Added by Dart.
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/linux.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin.s',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86.s',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86_64.s',
+        # Added by Dart.
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s',
+        # Added by Dart.
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/unix.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/unix_errors.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/uxproces.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/uxrng.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/uxshm.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/uxwrap.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/ntgc.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/ntinrval.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/ntmisc.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/ntsec.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/ntsem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w32ipcsem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w32poll.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w32rng.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w32shm.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w95cv.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w95dllmain.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w95io.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w95sock.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/w95thred.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/md/windows/win32_errors.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/memory/prseg.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/memory/prshm.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/memory/prshma.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pralarm.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pratom.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/praton.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prcountr.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prdtoa.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prenv.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prerr.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prerror.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prerrortable.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prinit.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prinrval.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pripc.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pripcsem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prlog2.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prlong.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prnetdb.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prolock.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prrng.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prsystem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prthinfo.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prtime.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prtpool.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/misc/prtrace.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/pthreads/ptio.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/pthreads/ptmisc.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/pthreads/ptsynch.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/pthreads/ptthread.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/combined/prucpu.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/combined/prucv.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/combined/prulock.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/combined/prustack.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/combined/pruthr.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prcmon.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prcthr.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prdump.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prmon.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prrwlock.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prsem.c',
+        '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prtpd.c',
+      ],
+      'defines': [
+        '_NSPR_BUILD_',
+        'FORCE_PR_LOG',
+      ],
+      'include_dirs': [
+        '<(nss_directory)/mozilla/nsprpub/pr/include',
+        '<(nss_directory)/mozilla/nsprpub/pr/include/private',
+        '<(nss_directory)/mozilla/nsprpub/lib/ds',
+        '<(nss_directory)/mozilla/nsprpub/lib/libc/include',
+      ],
+      'direct_dependent_settings': {
+        'defines': [
+          'NO_NSPR_10_SUPPORT',
+        ],
+        'include_dirs': [
+          '<(nss_directory)/mozilla/nsprpub/pr/include',
+          '<(nss_directory)/mozilla/nsprpub/lib/ds',
+          '<(nss_directory)/mozilla/nsprpub/lib/libc/include',
+        ],
+      },
+      # TODO(wtc): suppress C4244 and C4554 in prdtoa.c.
+      'msvs_disabled_warnings': [4018, 4244, 4554],
+      'conditions': [
+        ['OS=="mac" or OS=="ios"', {
+          'defines': [
+            'XP_UNIX',
+            'DARWIN',
+            'XP_MACOSX',
+            '_PR_PTHREADS',
+            'HAVE_BSD_FLOCK',
+            'HAVE_CRT_EXTERNS_H',
+            'HAVE_DLADDR',
+            'HAVE_LCHOWN',
+            'HAVE_SOCKLEN_T',
+            'HAVE_STRERROR',
+          ],
+          # Changed by Dart:
+          # nss_directory contains .., which is bad in a regular expression.
+          # So we use the partial match by dropping '^' from '^mozilla/...
+          'sources/': [
+            ['exclude', 'mozilla/nsprpub/pr/src/md/windows/'],
+            ['exclude', 'mozilla/nsprpub/pr/src/threads/combined/'],
+          ],
+          'sources!': [
+            # Added by Dart.
+            'os_linux.S',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prdir.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prfile.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prio.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prsocket.c',
+            # os_Darwin_x86.s and os_Darwin_x86_64.s are included by
+            # os_Darwin.s.
+            # Added by Dart.
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/linux.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86_64.s',
+            # Added by Dart.
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s',
+            # Added by Dart.
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pripcsem.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prcthr.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prdump.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prmon.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prsem.c',
+          ],
+        }],
+        # Added by Dart.
+        ['OS=="linux"', {
+          'defines': [
+            'HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
+            'HAVE_VISIBILITY_PRAGMA=1',
+            'XP_UNIX=1',
+            '_GNU_SOURCE=1',
+            'HAVE_FCNTL_FILE_LOCKING=1',
+            'LINUX=1',
+            'i386=1',
+            'HAVE_LCHOWN=1',
+            'HAVE_STRERROR=1',
+            'HAVE_DLADDR=1',
+            '_REENTRANT=1',
+             'FORCE_PR_LOG',
+            '_PR_PTHREADS',
+            '_NSPR_BUILD_',
+          ],
+          'sources/': [
+            ['exclude', 'mozilla/nsprpub/pr/src/md/windows/'],
+            ['exclude', 'mozilla/nsprpub/pr/src/threads/combined/'],
+          ],
+          'sources!': [
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/darwin.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Darwin_x86_64.s',
+            # os_Linux_x86.s and os_Linux_x86_64.s are included by
+            # runtime/bin/net/os_Linux.S.
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/misc/pripcsem.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prcthr.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prdump.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prmon.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/threads/prsem.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prdir.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prfile.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prio.c',
+            '<(nss_directory)/mozilla/nsprpub/pr/src/io/prsocket.c',
+          ],
+        }],
+        ['OS=="mac"', {
+          'link_settings': {
+            'libraries': [
+              '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+              '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
+            ],
+          },
+        }],
+        ['OS=="ios"', {
+          'defines!': [
+            'HAVE_CRT_EXTERNS_H',
+          ],
+        }],
+        ['OS=="win"', {
+          'defines': [
+            'XP_PC',
+            'WIN32',
+            'WIN95',
+            '_PR_GLOBAL_THREADS_ONLY',
+            '_CRT_SECURE_NO_WARNINGS',
+            '_CRT_NONSTDC_NO_WARNINGS',
+          ],
+          'sources!': [
+            # Added by Dart.
+            'os_linux.S',
+          ],
+          # Changed by Dart:
+          # nss_directory contains .., which is bad in a regular expression.
+          # So we use the partial match by dropping '^' from '^mozilla/...
+          'sources/': [
+            ['exclude', 'mozilla/nsprpub/pr/src/md/unix/'],
+            ['exclude', 'mozilla/nsprpub/pr/src/pthreads/'],
+          ],
+          'conditions': [
+            ['target_arch=="ia32"', {
+              'defines': [
+                '_X86_',
+              ],
+            }],
+          ],
+        }],
+        ['component == "static_library"', {
+          'defines': [
+            'NSPR_STATIC',
+          ],
+          'direct_dependent_settings': {
+            'defines': [
+              'NSPR_STATIC',
+            ],
+          },
+        }],
+        ['clang==1', {
+          'xcode_settings': {
+            'WARNING_CFLAGS': [
+              # nspr uses a bunch of deprecated functions (NSLinkModule etc) in
+              # prlink.c on mac.
+              '-Wno-deprecated-declarations',
+              # nspr passes "const char*" through "void*".
+              '-Wno-incompatible-pointer-types',
+              # nspr passes "int*" through "unsigned int*".
+              '-Wno-pointer-sign',
+            ],
+          },
+          'cflags': [
+            '-Wno-incompatible-pointer-types',
+            '-Wno-pointer-sign',
+          ],
+        }],
+      ],
+    },
+    {
+      'target_name': 'nss_dart',
+      'product_name': 'crnss',
+      'type': '<(component)',
+      'dependencies': [
+        'nss_static_dart',
+      ],
+      'export_dependent_settings': [
+        'nss_static_dart',
+      ],
+      'sources': [
+        # Ensure at least one object file is produced, so that MSVC does not
+        # warn when creating the static/shared library. See the note for
+        # the 'nssckbi' target for why the 'nss' target was split as such.
+        '<(nss_directory)/mozilla/security/nss/lib/nss/nssver.c',
+      ],
+      'conditions': [
+        ['exclude_nss_root_certs==0', {
+          'dependencies': [
+            'nssckbi_dart',
+          ],
+          'export_dependent_settings': [
+            'nssckbi_dart',
+          ],
+        }],
+        ['OS == "mac" and component == "shared_library"', {
+          'xcode_settings': {
+            'OTHER_LDFLAGS': ['-all_load'],
+          },
+        }],
+        ['OS == "win" and component == "shared_library"', {
+          'sources': [
+            '<(nss_directory)/mozilla/security/nss/exports_win.def',
+          ],
+        }],
+      ],
+    },
+    {
+      # This is really more of a pseudo-target to work around the fact that
+      # a single static_library target cannot contain two object files of the
+      # same name (hash.o / hash.obj). Logically, this is part of the
+      # 'nss_static' target. By separating it out, it creates a possible
+      # circular dependency between 'nss_static' and 'nssckbi' when
+      # 'exclude_nss_root_certs' is not specified, as 'nss_static' depends on
+      # the 'builtinsC_GetFunctionList' exported by this target. This is an
+      # artifact of how NSS is being statically built, which is not an
+      # officially supported configuration - normally, 'nssckbi.dll/so' would
+      # depend on libnss3.dll/so, and the higher layer caller would instruct
+      # libnss3.dll to dynamically load nssckbi.dll, breaking the circle.
+      #
+      # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency
+      # without requiring nssckbi to be built as a shared library.
+      'target_name': 'nssckbi_dart',
+      'product_name': 'crnssckbi',
+      'type': 'static_library',
+      # This target is an implementation detail - the public dependencies
+      # should be on 'nss'.
+      'suppress_wildcard': 1,
+      'sources': [
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/anchor.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/bfind.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/binst.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/bobject.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/bsession.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/bslot.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/btoken.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/builtins.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/certdata.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/ckbiver.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/constants.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins/nssckbi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ck.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ckfw.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ckfwm.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ckfwtm.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ckmd.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/ckt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/crypto.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/find.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/hash.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/instance.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/mechanism.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/mutex.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssck.api',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckepv.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckft.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckfw.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckfwc.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckfwt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckg.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckmdt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/nssckt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/object.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/session.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/sessobj.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/slot.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/token.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw/wrap.c',
+      ],
+      'dependencies': [
+        'nss_static_dart',
+      ],
+      'export_dependent_settings': [
+        'nss_static_dart',
+      ],
+      'include_dirs': [
+        '<(nss_directory)/mozilla/security/nss/lib/ckfw',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '<(nss_directory)/mozilla/security/nss/lib/ckfw/builtins',
+        ],
+      },
+    },
+    {
+      'target_name': 'nss_static_dart',
+      'type': 'static_library',
+      # This target is an implementation detail - the public dependencies
+      # should be on 'nss'.
+      'suppress_wildcard': 1,
+      'sources': [
+        '<(nss_directory)/mozilla/security/nss/lib/base/arena.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/base.h',
+        '<(nss_directory)/mozilla/security/nss/lib/base/baset.h',
+        '<(nss_directory)/mozilla/security/nss/lib/base/error.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/errorval.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/hash.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/hashops.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/item.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/libc.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/list.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/nssbase.h',
+        '<(nss_directory)/mozilla/security/nss/lib/base/nssbaset.h',
+        '<(nss_directory)/mozilla/security/nss/lib/base/nssutf8.c',
+        '<(nss_directory)/mozilla/security/nss/lib/base/tracker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/alg1485.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/cert.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certdb.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certdb.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certv3.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certxutl.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/certxutl.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/crl.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/genname.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/genname.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/polcyxtn.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/secname.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/stanpcertdb.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/xauthkid.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/xbsconst.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/xconst.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb/xconst.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certhigh.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certhtml.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certreq.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certvfy.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certvfypkix.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/certvfypkixprint.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/crlv2.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/ocsp.c',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/ocsp.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/ocspi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/ocspt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/ocspti.h',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh/xcrldist.c',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/cryptohi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/cryptoht.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/dsautil.c',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/key.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/keyhi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/keyi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/keyt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/keythi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/sechash.c',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/seckey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/secsign.c',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi/secvfy.c',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/ckhelper.c',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/ckhelper.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/dev.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devm.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devslot.c',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devtm.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devtoken.c',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/devutil.c',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/nssdev.h',
+        '<(nss_directory)/mozilla/security/nss/lib/dev/nssdevt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/aeskeywrap.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/alg2268.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/alghmac.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/alghmac.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/arcfive.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/arcfour.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/blapi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/blapii.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/blapit.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/camellia.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/camellia.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/des.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/des.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/desblapi.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/dh.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/drbg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/dsa.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ec.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ec.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ec2.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl-curve.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl-exp.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl-priv.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl_curve.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl_gf.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecl_mult.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecp.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecp_aff.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecp_jac.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecp_jm.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ecp_mont.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl/ec_naf.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/hasht.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/jpake.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/md2.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/md5.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/logtab.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi-config.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi-priv.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_amd64.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_x86_asm.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mplogic.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mplogic.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpmontg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpprime.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpprime.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mp_gf2m-priv.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mp_gf2m.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mp_gf2m.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/primes.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/pqg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/rawhash.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/rijndael.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/rijndael.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/rijndael32.tab',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/rsa.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sechash.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/secmpi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/secrng.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/seed.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/seed.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sha256.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sha512.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sha_fast.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sha_fast.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/shsign.h',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/shvfy.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/sysrand.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/tlsprfalg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/unix_rand.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/win_rand.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_certsel.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_certstore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_checker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_crlsel.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_errorstrings.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_params.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_pl_pki.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_pl_system.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_results.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_revchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_sample_modules.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkix_util.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include/pkixt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/certsel/pkix_certselector.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/certsel/pkix_certselector.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_crlchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_crlchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_policychecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_policychecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_procparams.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_procparams.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_resourcelimits.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_resourcelimits.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_trustanchor.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_trustanchor.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_valparams.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params/pkix_valparams.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_buildresult.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_buildresult.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_policynode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_policynode.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_valresult.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_valresult.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_verifynode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results/pkix_verifynode.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/store/pkix_store.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/store/pkix_store.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_build.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_build.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_lifecycle.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_lifecycle.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_validate.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top/pkix_validate.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_error.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_error.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_errpaths.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_list.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_list.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_logger.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_logger.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_tools.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util/pkix_tools.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaptemplates.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h',
+        '<(nss_directory)/mozilla/security/nss/lib/nss/nss.h',
+        '<(nss_directory)/mozilla/security/nss/lib/nss/nssinit.c',
+        '<(nss_directory)/mozilla/security/nss/lib/nss/nssrenam.h',
+        '<(nss_directory)/mozilla/security/nss/lib/nss/utilwrap.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/debug_module.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/dev3hack.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/dev3hack.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11akey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11auth.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11cert.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11cxt.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11err.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11func.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11kea.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11list.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11load.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11mech.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11merge.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11nobj.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11obj.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pars.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pbe.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pk12.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pqg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pqg.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11priv.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11pub.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11sdr.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11sdr.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11skey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11slot.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/pk11util.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/secmod.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/secmodi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/secmodti.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/secpkcs5.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/certread.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7common.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7create.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7decode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7encode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7local.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/p7local.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/pkcs7t.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/secmime.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/secmime.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7/secpkcs7.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/asymmkey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/certdecode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/certificate.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/cryptocontext.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/nsspki.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/nsspkit.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pki.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pki3hack.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pki3hack.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkibase.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkim.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkistore.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkistore.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkit.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/pkitm.h',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/symmkey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/tdcache.c',
+        '<(nss_directory)/mozilla/security/nss/lib/pki/trustdomain.c',
+        '<(nss_directory)/mozilla/security/nss/lib/smime/cms.h',
+        '<(nss_directory)/mozilla/security/nss/lib/smime/cmslocal.h',
+        '<(nss_directory)/mozilla/security/nss/lib/smime/cmsreclist.h',
+        '<(nss_directory)/mozilla/security/nss/lib/smime/cmst.h',
+        '<(nss_directory)/mozilla/security/nss/lib/smime/smime.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/ecdecode.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/fipsaudt.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/fipstest.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/fipstokn.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/jpakesftk.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lgglue.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lgglue.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lowkey.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lowkeyi.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lowkeyti.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lowpbe.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/lowpbe.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/padbuf.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pk11init.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pk11pars.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pkcs11.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pkcs11c.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pkcs11i.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pkcs11ni.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/pkcs11u.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/rsawrapr.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sdb.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sdb.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/secmodt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkdb.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkdb.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkdbt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkdbti.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkmod.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkpars.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkpars.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/sftkpwd.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/softkver.c',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/softkver.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/softoken.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/softoknt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken/tlsprf.c',
+        '<(nss_directory)/mozilla/security/nss/lib/ssl/sslerr.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/SECerrs.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/base64.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/ciferfam.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/derdec.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/derenc.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/dersubr.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/dertime.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/errstrs.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssb64.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssb64d.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssb64e.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssb64t.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssilckt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssilock.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssilock.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nsslocks.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssrwlk.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssrwlk.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssrwlkt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/nssutil.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/oidstring.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11f.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11n.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11p.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11t.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/pkcs11u.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/portreg.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/portreg.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/quickder.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secalgid.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secasn1.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secasn1d.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secasn1e.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secasn1t.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secasn1u.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/seccomon.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secder.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secdert.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secdig.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secdig.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secdigt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secerr.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secitem.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secitem.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secoid.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secoid.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secoidt.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secport.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/secport.h',
+        '<(nss_directory)/mozilla/security/nss/lib/util/sectime.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/templates.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/utf8.c',
+        '<(nss_directory)/mozilla/security/nss/lib/util/utilrename.h',
+      ],
+      'sources!': [
+        # primes.c is included by mpprime.c.
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/primes.c',
+        # unix_rand.c and win_rand.c are included by sysrand.c.
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/unix_rand.c',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/win_rand.c',
+        # debug_module.c is included by pk11load.c.
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap/debug_module.c',
+      ],
+      'dependencies': [
+        'nspr_dart',
+        'sqlite.gyp:sqlite_dart',
+      ],
+      'export_dependent_settings': [
+        'nspr_dart',
+      ],
+      'defines': [
+        'MP_API_COMPATIBLE',
+        'NSS_DISABLE_DBM',
+        'NSS_ENABLE_ECC',
+        'NSS_STATIC',
+        'NSS_USE_STATIC_LIBS',
+        'RIJNDAEL_INCLUDE_TABLES',
+        'SHLIB_VERSION=\"3\"',
+        'SOFTOKEN_SHLIB_VERSION=\"3\"',
+        'USE_UTIL_DIRECTLY',
+      ],
+      'defines!': [
+        # Regrettably, NSS can't be compiled with NO_NSPR_10_SUPPORT yet.
+        'NO_NSPR_10_SUPPORT',
+      ],
+      'include_dirs': [
+        '<(nss_directory)/mozilla/security/nss/lib/base',
+        '<(nss_directory)/mozilla/security/nss/lib/certdb',
+        '<(nss_directory)/mozilla/security/nss/lib/certhigh',
+        '<(nss_directory)/mozilla/security/nss/lib/cryptohi',
+        '<(nss_directory)/mozilla/security/nss/lib/dev',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl',
+        '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/include',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/certsel',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/checker',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/crlsel',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/params',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/results',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/store',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/top',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix/util',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/module',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/pki',
+        '<(nss_directory)/mozilla/security/nss/lib/libpkix/pkix_pl_nss/system',
+        '<(nss_directory)/mozilla/security/nss/lib/nss',
+        '<(nss_directory)/mozilla/security/nss/lib/pk11wrap',
+        '<(nss_directory)/mozilla/security/nss/lib/pkcs7',
+        '<(nss_directory)/mozilla/security/nss/lib/pki',
+        '<(nss_directory)/mozilla/security/nss/lib/smime',
+        '<(nss_directory)/mozilla/security/nss/lib/softoken',
+        '<(nss_directory)/mozilla/security/nss/lib/ssl',
+        '<(nss_directory)/mozilla/security/nss/lib/util',
+      ],
+      'direct_dependent_settings': {
+        'defines': [
+          'NSS_ENABLE_ECC',
+          'NSS_STATIC',
+          'NSS_USE_STATIC_LIBS',
+          'USE_UTIL_DIRECTLY',
+        ],
+        'include_dirs': [
+          '<(nss_directory)/mozilla/nsprpub/pr/include',
+          '<(nss_directory)/mozilla/nsprpub/lib/ds',
+          '<(nss_directory)/mozilla/nsprpub/lib/libc/include',
+          '<(nss_directory)/mozilla/security/nss/lib/base',
+          '<(nss_directory)/mozilla/security/nss/lib/certdb',
+          '<(nss_directory)/mozilla/security/nss/lib/certhigh',
+          '<(nss_directory)/mozilla/security/nss/lib/cryptohi',
+          '<(nss_directory)/mozilla/security/nss/lib/dev',
+          '<(nss_directory)/mozilla/security/nss/lib/freebl',
+          '<(nss_directory)/mozilla/security/nss/lib/freebl/ecl',
+          '<(nss_directory)/mozilla/security/nss/lib/nss',
+          '<(nss_directory)/mozilla/security/nss/lib/pk11wrap',
+          '<(nss_directory)/mozilla/security/nss/lib/pkcs7',
+          '<(nss_directory)/mozilla/security/nss/lib/pki',
+          '<(nss_directory)/mozilla/security/nss/lib/smime',
+          '<(nss_directory)/mozilla/security/nss/lib/softoken',
+          '<(nss_directory)/mozilla/security/nss/lib/util',
+        ],
+      },
+      'msvs_disabled_warnings': [4018, 4101],
+      'conditions': [
+        ['exclude_nss_root_certs==1', {
+          'defines': [
+            'NSS_DISABLE_ROOT_CERTS',
+          ],
+        }],
+        ['exclude_nss_libpkix==1', {
+          'defines': [
+            'NSS_DISABLE_LIBPKIX',
+          ],
+          'sources/': [
+            ['exclude', 'mozilla/security/nss/lib/libpkix/'],
+          ],
+          'sources!': [
+            '<(nss_directory)/mozilla/security/nss/lib/certhigh/certvfypkix.c',
+            '<(nss_directory)/mozilla/security/nss/lib/certhigh/certvfypkixprint.c',
+          ],
+          'include_dirs/': [
+            ['exclude', 'mozilla/security/nss/lib/libpkix/'],
+          ],
+        }],
+        ['target_arch=="ia32"', {
+          'sources/': [
+            ['exclude', 'amd64'],
+          ],
+        }],
+        # Added by Dart.
+        ['OS=="linux"', {
+          'defines': [
+            'XP_UNIX',
+            'HAVE_STRERROR',
+            'SHLIB_SUFFIX=\"so\"',
+            'SHLIB_PREFIX=\"lib\"',
+            'SHLIB_VERSION=\"3\"',
+            'SOFTOKEN_SHLIB_VERSION=\"3\"',
+            'SOFTOKEN_LIB_NAME=\"libsoftokn3.so\"',
+          ],
+          'sources!': [
+            '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_amd64.c',
+            '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_x86_asm.c',
+          ],
+        }],
+        ['OS=="mac" or OS=="ios"', {
+          'defines': [
+            'XP_UNIX',
+            'DARWIN',
+            'HAVE_STRERROR',
+            'HAVE_BSD_FLOCK',
+            'SHLIB_SUFFIX=\"dylib\"',
+            'SHLIB_PREFIX=\"lib\"',
+            'SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"',
+          ],
+          'sources!': [
+            '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_amd64.c',
+            '<(nss_directory)/mozilla/security/nss/lib/freebl/mpi/mpi_x86_asm.c',
+          ],
+          'xcode_settings': {
+            'conditions': [
+              ['component == "shared_library"', {
+                'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',  # no -fvisibility=hidden
+              }],
+            ],
+            # Can't use 'target_arch=="ia32"' conditional because that is
+            # only checked at GYP file generation time.
+            'GCC_PREPROCESSOR_DEFINITIONS[arch=i386]': [
+              '$(inherited)',
+              'NSS_X86_OR_X64',
+              'NSS_X86',
+              'i386',
+            ],
+            'GCC_PREPROCESSOR_DEFINITIONS[arch=x86_64]': [
+              '$(inherited)',
+              'NSS_USE_64',
+              'NSS_X86_OR_X64',
+              'NSS_X64',
+            ],
+          },
+        }],
+        ['OS=="win"', {
+          'defines': [
+            'SHLIB_SUFFIX=\"dll\"',
+            'SHLIB_PREFIX=\"\"',
+            'SOFTOKEN_LIB_NAME=\"softokn3.dll\"',
+            'XP_PC',
+            'WIN32',
+            'WIN95',
+            '_WINDOWS',
+          ],
+          'direct_dependent_settings': {
+            'defines': [
+              '_WINDOWS',
+            ],
+          },
+          'conditions': [
+            ['target_arch=="ia32"', {
+              'defines': [
+                'NSS_X86_OR_X64',
+                'NSS_X86',
+                '_X86_',
+                'MP_ASSEMBLY_MULTIPLY',
+                'MP_ASSEMBLY_SQUARE',
+                'MP_ASSEMBLY_DIV_2DX1D',
+                'MP_USE_UINT_DIGIT',
+                'MP_NO_MP_WORD',
+              ],
+            }],
+          ],
+        }],
+        ['clang==1', {
+          'xcode_settings': {
+            'WARNING_CFLAGS': [
+              # nss doesn't explicitly cast between different enum types.
+              '-Wno-conversion',
+              # nss passes "const char*" through "void*".
+              '-Wno-incompatible-pointer-types',
+              # nss prefers `a && b || c` over `(a && b) || c`.
+              '-Wno-logical-op-parentheses',
+              # nss doesn't use exhaustive switches on enums
+              '-Wno-switch',
+              # nss has some `unsigned < 0` checks.
+              '-Wno-tautological-compare',
+            ],
+          },
+          'cflags': [
+            '-Wno-conversion',
+            '-Wno-incompatible-pointer-types',
+            '-Wno-logical-op-parentheses',
+            '-Wno-switch',
+            '-Wno-tautological-compare',
+          ],
+        }],
+      ],
+    },
+  ],
+  }]],
+}
diff --git a/runtime/bin/net/nss_memio.cc b/runtime/bin/net/nss_memio.cc
new file mode 100644
index 0000000..702bbf1
--- /dev/null
+++ b/runtime/bin/net/nss_memio.cc
@@ -0,0 +1,491 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Written in NSPR style to also be suitable for adding to the NSS demo suite
+
+/* memio is a simple NSPR I/O layer that lets you decouple NSS from
+ * the real network.  It's rather like openssl's memory bio,
+ * and is useful when your app absolutely, positively doesn't
+ * want to let NSS do its own networking.
+ */
+#include "bin/net/nss_memio.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "prerror.h"
+#include "prinit.h"
+#include "prlog.h"
+
+/*--------------- private memio types -----------------------*/
+
+/*----------------------------------------------------------------------
+ Simple private circular buffer class.  Size cannot be changed once allocated.
+----------------------------------------------------------------------*/
+
+struct memio_buffer {
+    int head;     /* where to take next byte out of buf */
+    int tail;     /* where to put next byte into buf */
+    int bufsize;  /* number of bytes allocated to buf */
+    /* TODO(port): error handling is pessimistic right now.
+     * Once an error is set, the socket is considered broken
+     * (PR_WOULD_BLOCK_ERROR not included).
+     */
+    PRErrorCode last_err;
+    uint8_t* buf;
+};
+
+
+/* The 'secret' field of a PRFileDesc created by memio_CreateIOLayer points
+ * to one of these.
+ * In the public header, we use struct memio_Private as a typesafe alias
+ * for this.  This causes a few ugly typecasts in the private file, but
+ * seems safer.
+ */
+struct PRFilePrivate {
+    /* read requests are satisfied from this buffer */
+    struct memio_buffer readbuf;
+
+    /* write requests are satisfied from this buffer */
+    struct memio_buffer writebuf;
+
+    /* SSL needs to know socket peer's name */
+    PRNetAddr peername;
+
+    /* if set, empty I/O returns EOF instead of EWOULDBLOCK */
+    int eof;
+};
+
+/*--------------- private memio_buffer functions ---------------------*/
+
+/* Forward declarations.  */
+
+/* Allocate a memio_buffer of given size. */
+static void memio_buffer_new(struct memio_buffer *mb, int size);
+
+/* Deallocate a memio_buffer allocated by memio_buffer_new. */
+static void memio_buffer_destroy(struct memio_buffer *mb);
+
+/* How many bytes can be read out of the buffer without wrapping */
+static int memio_buffer_used_contiguous(const struct memio_buffer *mb);
+
+/* How many bytes exist after the wrap? */
+static int memio_buffer_wrapped_bytes(const struct memio_buffer *mb);
+
+/* How many bytes can be written into the buffer without wrapping */
+static int memio_buffer_unused_contiguous(const struct memio_buffer *mb);
+
+/* Write n bytes into the buffer.  Returns number of bytes written. */
+static int memio_buffer_put(struct memio_buffer *mb, const uint8_t* buf, int n);
+
+/* Read n bytes from the buffer.  Returns number of bytes read. */
+static int memio_buffer_get(struct memio_buffer *mb, uint8_t* buf, int n);
+
+/* Allocate a memio_buffer of given size. */
+static void memio_buffer_new(struct memio_buffer *mb, int size) {
+    mb->head = 0;
+    mb->tail = 0;
+    mb->bufsize = size;
+    mb->buf = static_cast<uint8_t*>(malloc(size));
+}
+
+/* Deallocate a memio_buffer allocated by memio_buffer_new. */
+static void memio_buffer_destroy(struct memio_buffer *mb) {
+    free(mb->buf);
+    mb->buf = NULL;
+    mb->head = 0;
+    mb->tail = 0;
+}
+
+/* How many bytes can be read out of the buffer without wrapping */
+static int memio_buffer_used_contiguous(const struct memio_buffer *mb) {
+    return (((mb->tail >= mb->head) ? mb->tail : mb->bufsize) - mb->head);
+}
+
+/* How many bytes exist after the wrap? */
+static int memio_buffer_wrapped_bytes(const struct memio_buffer *mb) {
+    return (mb->tail >= mb->head) ? 0 : mb->tail;
+}
+
+/* How many bytes can be written into the buffer without wrapping */
+static int memio_buffer_unused_contiguous(const struct memio_buffer *mb) {
+    if (mb->head > mb->tail) return mb->head - mb->tail - 1;
+    return mb->bufsize - mb->tail - (mb->head == 0);
+}
+
+/* Write n bytes into the buffer.  Returns number of bytes written. */
+static int memio_buffer_put(struct memio_buffer *mb,
+                            const uint8_t* buf,
+                            int n) {
+    int len;
+    int transferred = 0;
+
+    /* Handle part before wrap */
+    len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
+    if (len > 0) {
+        /* Buffer not full */
+        memmove(&mb->buf[mb->tail], buf, len);
+        mb->tail += len;
+        if (mb->tail == mb->bufsize)
+            mb->tail = 0;
+        n -= len;
+        buf += len;
+        transferred += len;
+
+        /* Handle part after wrap */
+        len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
+        if (len > 0) {
+            /* Output buffer still not full, input buffer still not empty */
+            memmove(&mb->buf[mb->tail], buf, len);
+            mb->tail += len;
+            if (mb->tail == mb->bufsize)
+                mb->tail = 0;
+                transferred += len;
+        }
+    }
+
+    return transferred;
+}
+
+
+/* Read n bytes from the buffer.  Returns number of bytes read. */
+static int memio_buffer_get(struct memio_buffer *mb, uint8_t* buf, int n) {
+    int len;
+    int transferred = 0;
+
+    /* Handle part before wrap */
+    len = PR_MIN(n, memio_buffer_used_contiguous(mb));
+    if (len) {
+        memmove(buf, &mb->buf[mb->head], len);
+        mb->head += len;
+        if (mb->head == mb->bufsize)
+            mb->head = 0;
+        n -= len;
+        buf += len;
+        transferred += len;
+
+        /* Handle part after wrap */
+        len = PR_MIN(n, memio_buffer_used_contiguous(mb));
+        if (len) {
+        memmove(buf, &mb->buf[mb->head], len);
+        mb->head += len;
+            if (mb->head == mb->bufsize)
+                mb->head = 0;
+                transferred += len;
+        }
+    }
+
+    return transferred;
+}
+
+/*--------------- private memio functions -----------------------*/
+
+static PRStatus PR_CALLBACK memio_Close(PRFileDesc *fd) {
+    struct PRFilePrivate *secret = fd->secret;
+    memio_buffer_destroy(&secret->readbuf);
+    memio_buffer_destroy(&secret->writebuf);
+    free(secret);
+    fd->dtor(fd);
+    return PR_SUCCESS;
+}
+
+static PRStatus PR_CALLBACK memio_Shutdown(PRFileDesc *fd, PRIntn how) {
+    /* TODO: pass shutdown status to app somehow */
+    return PR_SUCCESS;
+}
+
+/* If there was a network error in the past taking bytes
+ * out of the buffer, return it to the next call that
+ * tries to read from an empty buffer.
+ */
+static int PR_CALLBACK memio_Recv(PRFileDesc *fd,
+                                  uint8_t *buf,
+                                  PRInt32 len,
+                                  PRIntn flags,
+                                  PRIntervalTime timeout) {
+    struct PRFilePrivate *secret;
+    struct memio_buffer *mb;
+    int rv;
+
+    if (flags) {
+        PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
+        return -1;
+    }
+
+    secret = fd->secret;
+    mb = &secret->readbuf;
+    PR_ASSERT(mb->bufsize);
+    rv = memio_buffer_get(mb, buf, len);
+    if (rv == 0 && !secret->eof) {
+        if (mb->last_err)
+            PR_SetError(mb->last_err, 0);
+        else
+            PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
+        return -1;
+    }
+
+    return rv;
+}
+
+static int PR_CALLBACK memio_Read(PRFileDesc *fd, uint8_t *buf, PRInt32 len) {
+    /* pull bytes from buffer */
+    return memio_Recv(fd, buf, len, 0, PR_INTERVAL_NO_TIMEOUT);
+}
+
+static int PR_CALLBACK memio_Send(PRFileDesc *fd,
+                                  const uint8_t *buf,
+                                  PRInt32 len,
+                                  PRIntn flags,
+                                  PRIntervalTime timeout) {
+    struct PRFilePrivate *secret;
+    struct memio_buffer *mb;
+    int rv;
+
+    secret = fd->secret;
+    mb = &secret->writebuf;
+    PR_ASSERT(mb->bufsize);
+
+    if (mb->last_err) {
+        PR_SetError(mb->last_err, 0);
+        return -1;
+    }
+    rv = memio_buffer_put(mb, buf, len);
+    if (rv == 0) {
+        PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
+        return -1;
+    }
+    return rv;
+}
+
+static int PR_CALLBACK memio_Write(PRFileDesc *fd,
+                                   const uint8_t *buf,
+                                   PRInt32 len) {
+    /* append bytes to buffer */
+    return memio_Send(fd, buf, len, 0, PR_INTERVAL_NO_TIMEOUT);
+}
+
+static PRStatus PR_CALLBACK memio_GetPeerName(PRFileDesc *fd, PRNetAddr *addr) {
+    /* TODO: fail if memio_SetPeerName has not been called */
+    struct PRFilePrivate *secret = fd->secret;
+    *addr = secret->peername;
+    return PR_SUCCESS;
+}
+
+static PRStatus memio_GetSocketOption(PRFileDesc *fd,
+                                      PRSocketOptionData *data) {
+    /*
+     * Even in the original version for real tcp sockets,
+     * PR_SockOpt_Nonblocking is a special case that does not
+     * translate to a getsockopt() call
+     */
+    if (PR_SockOpt_Nonblocking == data->option) {
+        data->value.non_blocking = PR_TRUE;
+        return PR_SUCCESS;
+    }
+    PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0);
+    return PR_FAILURE;
+}
+
+/*--------------- private memio data -----------------------*/
+
+/*
+ * Implement just the bare minimum number of methods needed to make ssl happy.
+ *
+ * Oddly, PR_Recv calls ssl_Recv calls ssl_SocketIsBlocking calls
+ * PR_GetSocketOption, so we have to provide an implementation of
+ * PR_GetSocketOption that just says "I'm nonblocking".
+ */
+
+static struct PRIOMethods  memio_layer_methods = {
+    PR_DESC_LAYERED,
+    memio_Close,
+    (PRReadFN)memio_Read,
+    (PRWriteFN)memio_Write,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    memio_Shutdown,
+    (PRRecvFN)memio_Recv,
+    (PRSendFN)memio_Send,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    memio_GetPeerName,
+    NULL,
+    NULL,
+    memio_GetSocketOption,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+};
+
+static PRDescIdentity memio_identity = PR_INVALID_IO_LAYER;
+
+static PRStatus memio_InitializeLayerName(void) {
+    memio_identity = PR_GetUniqueIdentity("memio");
+    return PR_SUCCESS;
+}
+
+/*--------------- public memio functions -----------------------*/
+
+PRFileDesc *memio_CreateIOLayer(int bufsize) {
+    PRFileDesc *fd;
+    struct PRFilePrivate *secret;
+    static PRCallOnceType once;
+
+    PR_CallOnce(&once, memio_InitializeLayerName);
+
+    fd = PR_CreateIOLayerStub(memio_identity, &memio_layer_methods);
+    secret = static_cast<PRFilePrivate*>(malloc(sizeof(struct PRFilePrivate)));
+    memset(secret, 0, sizeof(*secret));
+
+    memio_buffer_new(&secret->readbuf, bufsize);
+    memio_buffer_new(&secret->writebuf, bufsize);
+    fd->secret = secret;
+    return fd;
+}
+
+void memio_SetPeerName(PRFileDesc* fd, const PRNetAddr* peername) {
+    PRFileDesc *memiofd = PR_GetIdentitiesLayer(fd, memio_identity);
+    struct PRFilePrivate *secret = memiofd->secret;
+    secret->peername = *peername;
+}
+
+memio_Private* memio_GetSecret(PRFileDesc* fd) {
+  PRFileDesc* memiofd = PR_GetIdentitiesLayer(fd, memio_identity);
+  return reinterpret_cast<memio_Private*>(memiofd->secret);
+}
+
+int memio_GetReadParams(memio_Private* secret, uint8_t** buf) {
+  struct memio_buffer* mb =
+      &(reinterpret_cast<PRFilePrivate*>(secret)->readbuf);
+  PR_ASSERT(mb->bufsize);
+
+  *buf = &mb->buf[mb->tail];
+  return memio_buffer_unused_contiguous(mb);
+}
+
+void memio_PutReadResult(memio_Private *secret, int bytes_read) {
+  struct memio_buffer* mb =
+      &(reinterpret_cast<PRFilePrivate*>(secret)->readbuf);
+  PR_ASSERT(mb->bufsize);
+
+  if (bytes_read > 0) {
+    mb->tail += bytes_read;
+    if (mb->tail == mb->bufsize)
+      mb->tail = 0;
+  } else if (bytes_read == 0) {
+    /* Record EOF condition and report to caller when buffer runs dry */
+    reinterpret_cast<PRFilePrivate*>(secret)->eof = PR_TRUE;
+  } else /* if (bytes_read < 0) */ {
+    mb->last_err = bytes_read;
+  }
+}
+
+void memio_GetWriteParams(memio_Private *secret,
+                          const uint8_t** buf1, unsigned int *len1,
+                          const uint8_t** buf2, unsigned int *len2) {
+  struct memio_buffer* mb =
+      &(reinterpret_cast<PRFilePrivate*>(secret)->writebuf);
+  PR_ASSERT(mb->bufsize);
+
+  *buf1 = &mb->buf[mb->head];
+  *len1 = memio_buffer_used_contiguous(mb);
+  *buf2 = mb->buf;
+  *len2 = memio_buffer_wrapped_bytes(mb);
+}
+
+void memio_PutWriteResult(memio_Private *secret, int bytes_written) {
+  struct memio_buffer* mb =
+      &(reinterpret_cast<PRFilePrivate*>(secret)->writebuf);
+  PR_ASSERT(mb->bufsize);
+
+  if (bytes_written > 0) {
+    mb->head += bytes_written;
+    if (mb->head >= mb->bufsize)
+      mb->head -= mb->bufsize;
+  } else if (bytes_written < 0) {
+    mb->last_err = bytes_written;
+  }
+}
+
+/*--------------- private memio_buffer self-test -----------------*/
+
+/* Even a trivial unit test is very helpful when doing circular buffers. */
+/*#define TRIVIAL_SELF_TEST*/
+#ifdef TRIVIAL_SELF_TEST
+
+#define TEST_BUFLEN 7
+
+#define CHECKEQ(a, b) { \
+    if ((a) != (b)) { \
+        printf("%d != %d, Test failed line %d\n", a, b, __LINE__); \
+        exit(1); \
+    } \
+}
+
+#define FROM_STR(a) reinterpret_cast<const uint8_t*>(a)
+
+int main() {
+    struct memio_buffer mb;
+    uint8_t buf[100];
+    int i;
+
+    memio_buffer_new(&mb, TEST_BUFLEN);
+
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1);
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 0);
+
+    CHECKEQ(memio_buffer_put(&mb, FROM_STR("howdy"), 5), 5);
+
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1-5);
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 5);
+    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 0);
+
+    CHECKEQ(memio_buffer_put(&mb, FROM_STR("!"), 1), 1);
+
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), 0);
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 6);
+    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 0);
+
+    CHECKEQ(memio_buffer_get(&mb, buf, 6), 6);
+    CHECKEQ(memcmp(buf, FROM_STR("howdy!"), 6), 0);
+
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), 1);
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 0);
+
+    CHECKEQ(memio_buffer_put(&mb, FROM_STR("01234"), 5), 5);
+
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 1);
+    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 4);
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1-5);
+
+    CHECKEQ(memio_buffer_put(&mb, FROM_STR("5"), 1), 1);
+
+    CHECKEQ(memio_buffer_unused_contiguous(&mb), 0);
+    CHECKEQ(memio_buffer_used_contiguous(&mb), 1);
+
+    /* TODO: add more cases */
+
+    printf("Test passed\n");
+    exit(0);
+}
+
+#endif
diff --git a/runtime/bin/net/nss_memio.h b/runtime/bin/net/nss_memio.h
new file mode 100644
index 0000000..bdf7afe
--- /dev/null
+++ b/runtime/bin/net/nss_memio.h
@@ -0,0 +1,90 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Written in NSPR style to also be suitable for adding to the NSS demo suite
+
+#ifndef BIN_NET_NSS_MEMIO_H_
+#define BIN_NET_NSS_MEMIO_H_
+
+#include <stddef.h>
+#include "vm/globals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "prio.h"
+
+/* Opaque structure.  Really just a more typesafe alias for PRFilePrivate. */
+struct memio_Private;
+typedef struct memio_Private memio_Private;
+
+/*----------------------------------------------------------------------
+ NSPR I/O layer that terminates in a pair of circular buffers
+ rather than talking to the real network.
+ To use this with NSS:
+ 1) call memio_CreateIOLayer to create a fake NSPR socket
+ 2) call SSL_ImportFD to ssl-ify the socket
+ 3) Do your own networking calls to set up a TCP connection
+ 4) call memio_SetPeerName to tell NSS about the other end of the connection
+ 5) While at the same time doing plaintext nonblocking NSPR I/O as
+    usual to the nspr file descriptor returned by SSL_ImportFD,
+    your app must shuttle encrypted data between
+    the real network and memio's network buffers.
+    memio_GetReadParams/memio_PutReadResult
+    are the hooks you need to pump data into memio's input buffer,
+    and memio_GetWriteParams/memio_PutWriteResult
+    are the hooks you need to pump data out of memio's output buffer.
+----------------------------------------------------------------------*/
+
+/* Create the I/O layer and its two circular buffers. */
+PRFileDesc *memio_CreateIOLayer(int bufsize);
+
+/* Must call before trying to make an ssl connection */
+void memio_SetPeerName(PRFileDesc *fd, const PRNetAddr *peername);
+
+/* Return a private pointer needed by the following
+ * four functions.  (We could have passed a PRFileDesc to
+ * them, but that would be slower.  Better for the caller
+ * to grab the pointer once and cache it.
+ * This may be a premature optimization.)
+ */
+memio_Private *memio_GetSecret(PRFileDesc *fd);
+
+/* Ask memio where to put bytes from the network, and how many it can handle.
+ * Returns bytes available to write, or 0 if none available.
+ * Puts current buffer position into *buf.
+ */
+int memio_GetReadParams(memio_Private *secret, uint8_t **buf);
+
+/* Tell memio how many bytes were read from the network.
+ * If bytes_read is 0, causes EOF to be reported to
+ * NSS after it reads the last byte from the circular buffer.
+ * If bytes_read is < 0, it is treated as an NSPR error code.
+ * See nspr/pr/src/md/unix/unix_errors.c for how to
+ * map from Unix errors to NSPR error codes.
+ * On EWOULDBLOCK or the equivalent, don't call this function.
+ */
+void memio_PutReadResult(memio_Private *secret, int bytes_read);
+
+/* Ask memio what data it has to send to the network.
+ * Returns up to two buffers of data by writing the positions and lengths into
+ * |buf1|, |len1| and |buf2|, |len2|.
+ */
+void memio_GetWriteParams(memio_Private *secret,
+                          const uint8_t **buf1, unsigned int *len1,
+                          const uint8_t **buf2, unsigned int *len2);
+
+/* Tell memio how many bytes were sent to the network.
+ * If bytes_written is < 0, it is treated as an NSPR error code.
+ * See nspr/pr/src/md/unix/unix_errors.c for how to
+ * map from Unix errors to NSPR error codes.
+ * On EWOULDBLOCK or the equivalent, don't call this function.
+ */
+void memio_PutWriteResult(memio_Private *secret, int bytes_written);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // BIN_NET_NSS_MEMIO_H_
diff --git a/runtime/bin/net/os_linux.S b/runtime/bin/net/os_linux.S
new file mode 100644
index 0000000..bee9564
--- /dev/null
+++ b/runtime/bin/net/os_linux.S
@@ -0,0 +1,11 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifdef __i386__
+#include "../../../third_party/nss/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s"
+#elif defined(__x86_64__)
+#include "../../../third_party/nss/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s"
+#endif
+
+
diff --git a/runtime/bin/net/sqlite.gyp b/runtime/bin/net/sqlite.gyp
new file mode 100644
index 0000000..543ca77
--- /dev/null
+++ b/runtime/bin/net/sqlite.gyp
@@ -0,0 +1,206 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 is a modified copy of Chromium's src/third_party/sqlite/sqlite.gyp.
+# Revision 165464 (this should agree with "nss_rev" in DEPS).
+{
+  # Added by Dart. All Dart comments refer to the following block or line.
+  'includes': [
+    '../../tools/gyp/runtime-configurations.gypi',
+    '../../tools/gyp/nss_configurations.gypi',
+  ],
+  'variables': {
+    # Added by Dart.
+    'sqlite_directory': '../../../third_party/sqlite',
+    'use_system_sqlite%': 0,
+    'required_sqlite_version': '3.6.1',
+  },
+  'target_defaults': {
+    'defines': [
+      'SQLITE_CORE',
+      'SQLITE_ENABLE_BROKEN_FTS2',
+      'SQLITE_ENABLE_FTS2',
+      'SQLITE_ENABLE_FTS3',
+      # Disabled by Dart: An external module with advanced unicode functions.
+      # 'SQLITE_ENABLE_ICU',
+      'SQLITE_ENABLE_MEMORY_MANAGEMENT',
+      'SQLITE_SECURE_DELETE',
+      'THREADSAFE',
+      '_HAS_EXCEPTIONS=0',
+    ],
+  },
+  # Added by Dart.  We do not indent, so diffs with the original are clearer.
+  'conditions': [[ 'dart_io_support==1', {
+  'targets': [
+    {
+      'target_name': 'sqlite_dart',
+      'conditions': [
+        [ 'chromeos==1' , {
+            'defines': [
+                # Despite obvious warnings about not using this flag
+                # in deployment, we are turning off sync in ChromeOS
+                # and relying on the underlying journaling filesystem
+                # to do error recovery properly.  It's much faster.
+                'SQLITE_NO_SYNC',
+                ],
+          },
+        ],
+        ['use_system_sqlite', {
+          'type': 'none',
+          'direct_dependent_settings': {
+            'defines': [
+              'USE_SYSTEM_SQLITE',
+            ],
+          },
+
+          'conditions': [
+            ['OS == "ios"', {
+              'link_settings': {
+                'libraries': [
+                  '$(SDKROOT)/usr/lib/libsqlite3.dylib',
+                ],
+              },
+            }],
+            ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
+              'direct_dependent_settings': {
+                'cflags': [
+                  # This next command produces no output but it it will fail
+                  # (and cause GYP to fail) if we don't have a recent enough
+                  # version of sqlite.
+                  '<!@(pkg-config --atleast-version=<(required_sqlite_version) sqlite3)',
+
+                  '<!@(pkg-config --cflags sqlite3)',
+                ],
+              },
+              'link_settings': {
+                'ldflags': [
+                  '<!@(pkg-config --libs-only-L --libs-only-other sqlite3)',
+                ],
+                'libraries': [
+                  '<!@(pkg-config --libs-only-l sqlite3)',
+                ],
+              },
+            }],
+          ],
+        }, { # !use_system_sqlite
+          'product_name': 'sqlite3',
+          'type': 'static_library',
+          # Changed by Dart: '<(sqlite_directory)/' added to all paths.
+          'sources': [
+            '<(sqlite_directory)/amalgamation/sqlite3.h',
+            '<(sqlite_directory)/amalgamation/sqlite3.c',
+            # fts2.c currently has a lot of conflicts when added to
+            # the amalgamation.  It is probably not worth fixing that.
+            '<(sqlite_directory)/src/ext/fts2/fts2.c',
+            '<(sqlite_directory)/src/ext/fts2/fts2.h',
+            '<(sqlite_directory)/src/ext/fts2/fts2_hash.c',
+            '<(sqlite_directory)/src/ext/fts2/fts2_hash.h',
+            '<(sqlite_directory)/src/ext/fts2/fts2_icu.c',
+            '<(sqlite_directory)/src/ext/fts2/fts2_porter.c',
+            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.c',
+            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.h',
+            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer1.c',
+          ],
+
+          # TODO(shess): Previously fts1 and rtree files were
+          # explicitly excluded from the build.  Make sure they are
+          # logically still excluded.
+
+          # TODO(shess): Should all of the sources be listed and then
+          # excluded?  For editing purposes?
+
+          'include_dirs': [
+            '<(sqlite_directory)/amalgamation',
+            # Needed for fts2 to build.
+            '<(sqlite_directory)/src/src',
+          ],
+          'dependencies': [
+            # Disabled by Dart.
+            # '../icu/icu.gyp:icui18n',
+            # Disabled by Dart.
+            # '../icu/icu.gyp:icuuc',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              '<(sqlite_directory)/.',
+              '<(sqlite_directory)/../..',
+            ],
+          },
+          'msvs_disabled_warnings': [
+            4018, 4244,
+          ],
+          'conditions': [
+            ['OS=="linux"', {
+              'link_settings': {
+                'libraries': [
+                  '-ldl',
+                ],
+              },
+            }],
+            ['OS == "android"', {
+              'defines': [
+                'HAVE_USLEEP=1',
+                'SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576',
+                'SQLITE_DEFAULT_AUTOVACUUM=1',
+                'SQLITE_TEMP_STORE=3',
+                'SQLITE_ENABLE_FTS3_BACKWARDS',
+                'DSQLITE_DEFAULT_FILE_FORMAT=4',
+              ],
+            }],
+            ['os_posix == 1 and OS != "mac" and OS != "android"', {
+              'cflags': [
+                # SQLite doesn't believe in compiler warnings,
+                # preferring testing.
+                #   http://www.sqlite.org/faq.html#q17
+                '-Wno-int-to-pointer-cast',
+                '-Wno-pointer-to-int-cast',
+              ],
+            }],
+            ['clang==1', {
+              'xcode_settings': {
+                'WARNING_CFLAGS': [
+                  # sqlite does `if (*a++ && *b++);` in a non-buggy way.
+                  '-Wno-empty-body',
+                  # sqlite has some `unsigned < 0` checks.
+                  '-Wno-tautological-compare',
+                ],
+              },
+              'cflags': [
+                '-Wno-empty-body',
+                '-Wno-tautological-compare',
+              ],
+            }],
+          ],
+        }],
+      ],
+    },
+  ],
+  'conditions': [
+    ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android" and not use_system_sqlite', {
+      'targets': [
+        {
+          'target_name': 'sqlite_shell_dart',
+          'type': 'executable',
+          'dependencies': [
+            # Disabled by Dart.
+            # '../icu/icu.gyp:icuuc',
+            'sqlite_dart',
+          ],
+          'sources': [
+            '<(sqlite_directory)/src/src/shell.c',
+            '<(sqlite_directory)/src/src/shell_icu_linux.c',
+          ],
+          'link_settings': {
+            'link_languages': ['c++'],
+          },
+        },
+      ],
+    },]
+  ],
+  }]],
+}
diff --git a/runtime/bin/net/ssl.gyp b/runtime/bin/net/ssl.gyp
new file mode 100644
index 0000000..cee5997
--- /dev/null
+++ b/runtime/bin/net/ssl.gyp
@@ -0,0 +1,168 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 is a modified copy of Chromium's src/net/third_party/nss/ssl.gyp.
+# Revision 165464 (this should agree with "nss_rev" in DEPS).
+{
+  # Conditions section for ssl-bodge (Compiling SSL on linux using system
+  # NSS and NSPR libraries) removed:
+  # 'conditions': [
+  #   [ 'os_posix == 1 and OS != "mac" and OS != "ios"', {
+  #   ...
+  #   }]],
+
+  # Added by Dart. All Dart comments refer to the following block or line.
+  'includes': [
+    '../../tools/gyp/runtime-configurations.gypi',
+    '../../tools/gyp/nss_configurations.gypi',
+  ],
+  # Added by Dart.
+  'variables': {
+    'ssl_directory': '../../../third_party/net_nss',
+    'os_posix': 0,
+  },
+  # Added by Dart.  We do not indent, so diffs with the original are clearer.
+  'conditions': [[ 'dart_io_support==1', {
+  'targets': [
+    {
+      'target_name': 'libssl_dart',
+      'type': 'static_library',
+      # Changed by Dart: '<(ssl_directory)/' added to all paths.
+      'sources': [
+        '<(ssl_directory)/ssl/authcert.c',
+        '<(ssl_directory)/ssl/cmpcert.c',
+        '<(ssl_directory)/ssl/derive.c',
+        '<(ssl_directory)/ssl/dtls1con.c',
+        '<(ssl_directory)/ssl/nsskea.c',
+        '<(ssl_directory)/ssl/os2_err.c',
+        '<(ssl_directory)/ssl/os2_err.h',
+        '<(ssl_directory)/ssl/preenc.h',
+        '<(ssl_directory)/ssl/prelib.c',
+        '<(ssl_directory)/ssl/ssl.h',
+        '<(ssl_directory)/ssl/ssl3con.c',
+        '<(ssl_directory)/ssl/ssl3ecc.c',
+        '<(ssl_directory)/ssl/ssl3ext.c',
+        '<(ssl_directory)/ssl/ssl3gthr.c',
+        '<(ssl_directory)/ssl/ssl3prot.h',
+        '<(ssl_directory)/ssl/sslauth.c',
+        '<(ssl_directory)/ssl/sslcon.c',
+        '<(ssl_directory)/ssl/ssldef.c',
+        '<(ssl_directory)/ssl/sslenum.c',
+        '<(ssl_directory)/ssl/sslerr.c',
+        '<(ssl_directory)/ssl/sslerr.h',
+        '<(ssl_directory)/ssl/SSLerrs.h',
+        '<(ssl_directory)/ssl/sslerrstrs.c',
+        '<(ssl_directory)/ssl/sslgathr.c',
+        '<(ssl_directory)/ssl/sslimpl.h',
+        '<(ssl_directory)/ssl/sslinfo.c',
+        '<(ssl_directory)/ssl/sslinit.c',
+        '<(ssl_directory)/ssl/sslmutex.c',
+        '<(ssl_directory)/ssl/sslmutex.h',
+        '<(ssl_directory)/ssl/sslnonce.c',
+        '<(ssl_directory)/ssl/sslplatf.c',
+        '<(ssl_directory)/ssl/sslproto.h',
+        '<(ssl_directory)/ssl/sslreveal.c',
+        '<(ssl_directory)/ssl/sslsecur.c',
+        '<(ssl_directory)/ssl/sslsnce.c',
+        '<(ssl_directory)/ssl/sslsock.c',
+        '<(ssl_directory)/ssl/sslt.h',
+        '<(ssl_directory)/ssl/ssltrace.c',
+        '<(ssl_directory)/ssl/sslver.c',
+        '<(ssl_directory)/ssl/unix_err.c',
+        '<(ssl_directory)/ssl/unix_err.h',
+        '<(ssl_directory)/ssl/win32err.c',
+        '<(ssl_directory)/ssl/win32err.h',
+      ],
+      'sources!': [
+        '<(ssl_directory)/ssl/os2_err.c',
+        '<(ssl_directory)/ssl/os2_err.h',
+      ],
+      'defines': [
+        'NSS_ENABLE_ECC',
+        'NSS_ENABLE_ZLIB',
+        'USE_UTIL_DIRECTLY',
+      ],
+      'defines!': [
+        # Regrettably, NSS can't be compiled with NO_NSPR_10_SUPPORT yet.
+        'NO_NSPR_10_SUPPORT',
+      ],
+      'dependencies': [
+        'zlib.gyp:zlib_dart',
+        # Dart: Start of copy of code from 'bodge' conditions section below.
+        'nss.gyp:nspr_dart',
+        'nss.gyp:nss_dart',
+      ],
+      'export_dependent_settings': [
+        'nss.gyp:nspr_dart',
+        'nss.gyp:nss_dart',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '<(ssl_directory)/ssl',
+        ],
+        'defines': [
+          'NSS_PLATFORM_CLIENT_AUTH',
+        ],
+        # Dart: End of copy of code from bodge conditions section.
+      },
+      'msvs_disabled_warnings': [4018, 4244],
+      'conditions': [
+        [ 'clang == 1', {
+          'cflags': [
+            # See http://crbug.com/138571#c8. In short, sslsecur.c picks up the
+            # system's cert.h because cert.h isn't in chromium's repo.
+            '-Wno-incompatible-pointer-types',
+          ],
+        }],
+        # Added by Dart.
+        [ 'OS == "linux"', {
+          'defines': [
+            'XP_UNIX',
+            'NSS_PLATFORM_CLIENT_AUTH',
+            'NSS_USE_STATIC_LIBS',
+          ],
+        }],
+        [ 'OS == "mac" or OS == "ios"', {
+          'defines': [
+            'XP_UNIX',
+            'DARWIN',
+            'XP_MACOSX',
+          ],
+        }],
+        [ 'OS == "win"', {
+            'sources!': [
+              '<(ssl_directory)/ssl/unix_err.c',
+              '<(ssl_directory)/ssl/unix_err.h',
+            ],
+          },
+          {  # else: OS != "win"
+            'sources!': [
+              '<(ssl_directory)/ssl/win32err.c',
+              '<(ssl_directory)/ssl/win32err.h',
+            ],
+          },
+        ],
+        # Dart: Conditions sections for ssl/bodge removed.
+        #       [ 'os_posix == 1 and OS != "mac" and OS != "ios", {
+        #         ...
+        #       ],
+        #       [ 'OS == "mac" or OS == "ios" or OS == "win"', {
+        #         ...
+        #       ],
+      ],
+      'configurations': {
+        'Debug_Base': {
+          'defines': [
+            'DEBUG',
+          ],
+        },
+      },
+    },
+  ],
+  }]],
+}
diff --git a/runtime/bin/net/zlib.gyp b/runtime/bin/net/zlib.gyp
new file mode 100644
index 0000000..e2dcd3f
--- /dev/null
+++ b/runtime/bin/net/zlib.gyp
@@ -0,0 +1,170 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 is a modified copy of src/third_party/zlib/zlib.gyp from Chromium.
+# Revision 165464 (this should agree with "nss_rev" in DEPS).
+{
+  # Added by Dart. All Dart comments refer to the following block or line.
+  'includes': [
+    '../../tools/gyp/runtime-configurations.gypi',
+    '../../tools/gyp/nss_configurations.gypi',
+  ],
+  'variables': {
+    # Added by Dart.
+    'zlib_path': '../../../third_party/zlib',
+    'conditions': [
+      [ 'OS=="none"', {
+        # Because we have a patched zlib, we cannot use the system libz.
+        # TODO(pvalchev): OpenBSD is purposefully left out, as the system
+        # zlib brings up an incompatibility that breaks rendering.
+        'use_system_zlib%': 1,
+      }, {
+        'use_system_zlib%': 0,
+      }],
+    ],
+    'use_system_minizip%': 0,
+  },
+  # Added by Dart.  We do not indent, so diffs with the original are clearer.
+  'conditions': [[ 'dart_io_support==1', {
+  'targets': [
+    {
+      'target_name': 'zlib_dart',
+      'type': 'static_library',
+      'conditions': [
+        ['use_system_zlib==0', {
+          # Changed by Dart: '<(zlib_directory)/' added to all paths.
+          'sources': [
+            '<(zlib_path)/adler32.c',
+            '<(zlib_path)/compress.c',
+            '<(zlib_path)/crc32.c',
+            '<(zlib_path)/crc32.h',
+            '<(zlib_path)/deflate.c',
+            '<(zlib_path)/deflate.h',
+            '<(zlib_path)/gzio.c',
+            '<(zlib_path)/infback.c',
+            '<(zlib_path)/inffast.c',
+            '<(zlib_path)/inffast.h',
+            '<(zlib_path)/inffixed.h',
+            '<(zlib_path)/inflate.c',
+            '<(zlib_path)/inflate.h',
+            '<(zlib_path)/inftrees.c',
+            '<(zlib_path)/inftrees.h',
+            '<(zlib_path)/mozzconf.h',
+            '<(zlib_path)/trees.c',
+            '<(zlib_path)/trees.h',
+            '<(zlib_path)/uncompr.c',
+            '<(zlib_path)/zconf.h',
+            '<(zlib_path)/zlib.h',
+            '<(zlib_path)/zutil.c',
+            '<(zlib_path)/zutil.h',
+          ],
+          'include_dirs': [
+            '<(zlib_path)/.',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              '<(zlib_path)/.',
+            ],
+          },
+          'conditions': [
+            ['OS!="win"', {
+              'product_name': 'chrome_zlib',
+            }], ['OS=="android"', {
+              'toolsets': ['target', 'host'],
+            }],
+          ],
+        }, {
+          'direct_dependent_settings': {
+            'defines': [
+              'USE_SYSTEM_ZLIB',
+            ],
+          },
+          'defines': [
+            'USE_SYSTEM_ZLIB',
+          ],
+          'link_settings': {
+            'libraries': [
+              '-lz',
+            ],
+          },
+        }],
+      ],
+    },
+    {
+      'target_name': 'minizip_dart',
+      'type': 'static_library',
+      'conditions': [
+        ['use_system_minizip==0', {
+          'sources': [
+            '<(zlib_path)/contrib/minizip/ioapi.c',
+            '<(zlib_path)/contrib/minizip/ioapi.h',
+            '<(zlib_path)/contrib/minizip/iowin32.c',
+            '<(zlib_path)/contrib/minizip/iowin32.h',
+            '<(zlib_path)/contrib/minizip/unzip.c',
+            '<(zlib_path)/contrib/minizip/unzip.h',
+            '<(zlib_path)/contrib/minizip/zip.c',
+            '<(zlib_path)/contrib/minizip/zip.h',
+          ],
+          'include_dirs': [
+            '<(zlib_path)/.',
+            '<(zlib_path)/../..',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              '<(zlib_path)/.',
+            ],
+          },
+          'conditions': [
+            ['OS!="win"', {
+              'sources!': [
+                '<(zlib_path)/contrib/minizip/iowin32.c'
+              ],
+            }],
+            ['OS=="android"', {
+              'toolsets': ['target', 'host'],
+            }],
+          ],
+        }, {
+          'direct_dependent_settings': {
+            'defines': [
+              'USE_SYSTEM_MINIZIP',
+            ],
+          },
+          'defines': [
+            'USE_SYSTEM_MINIZIP',
+          ],
+          'link_settings': {
+            'libraries': [
+              '-lminizip',
+            ],
+          },
+        }],
+        ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', {
+          # Mac, Android and the BSDs don't have fopen64, ftello64, or
+          # fseeko64. We use fopen, ftell, and fseek instead on these
+          # systems.
+          'defines': [
+            'USE_FILE32API'
+          ],
+        }],
+        ['clang==1', {
+          'xcode_settings': {
+            'WARNING_CFLAGS': [
+              # zlib uses `if ((a == b))` for some reason.
+              '-Wno-parentheses-equality',
+            ],
+          },
+          'cflags': [
+            '-Wno-parentheses-equality',
+          ],
+        }],
+      ],
+    }
+  ],
+  }]],
+}
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index 80ed277..7e76c09 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -16,15 +16,14 @@
 
 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
   Dart_EnterScope();
-  Dart_SetReturnValue(args,
-                      Dart_NewStringFromCString(Platform::OperatingSystem()));
+  Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem()));
   Dart_ExitScope();
 }
 
 
 void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
   Dart_EnterScope();
-  Dart_SetReturnValue(args, Dart_NewStringFromCString(File::PathSeparator()));
+  Dart_SetReturnValue(args, DartUtils::NewString(File::PathSeparator()));
   Dart_ExitScope();
 }
 
@@ -34,7 +33,7 @@
   const intptr_t HOSTNAME_LENGTH = 256;
   char hostname[HOSTNAME_LENGTH];
   if (Platform::LocalHostname(hostname, HOSTNAME_LENGTH)) {
-    Dart_SetReturnValue(args, Dart_NewStringFromCString(hostname));
+    Dart_SetReturnValue(args, DartUtils::NewString(hostname));
   } else {
     Dart_SetReturnValue(args, DartUtils::NewDartOSError());
   }
@@ -54,19 +53,22 @@
   } else {
     Dart_Handle result = Dart_NewList(count);
     if (Dart_IsError(result)) {
+      Platform::FreeEnvironment(env, count);
       Dart_PropagateError(result);
     }
     for (intptr_t i = 0; i < count; i++) {
-      Dart_Handle str = Dart_NewStringFromCString(env[i]);
+      Dart_Handle str = DartUtils::NewString(env[i]);
       if (Dart_IsError(str)) {
+        Platform::FreeEnvironment(env, count);
         Dart_PropagateError(str);
       }
       Dart_Handle error = Dart_ListSetAt(result, i, str);
       if (Dart_IsError(error)) {
+        Platform::FreeEnvironment(env, count);
         Dart_PropagateError(error);
       }
     }
-    delete[] env;
+    Platform::FreeEnvironment(env, count);
     Dart_SetReturnValue(args, result);
   }
   Dart_ExitScope();
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index 233740e..38cafbe 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -27,11 +27,12 @@
   // Extracts the local hostname.
   static bool LocalHostname(char* buffer, intptr_t buffer_length);
 
-  // Extracts the environment variables for the current process.
-  // The array of strings returned must be deallocated using
-  // delete[]. The number of elements in the array is returned
+  // Extracts the environment variables for the current process.  The
+  // array of strings returned must be deallocated using
+  // FreeEnvironment. The number of elements in the array is returned
   // in the count argument.
   static char** Environment(intptr_t* count);
+  static void FreeEnvironment(char** env, intptr_t count);
 
  private:
   DISALLOW_ALLOCATION();
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc
index c69f682..206eca3 100644
--- a/runtime/bin/platform_android.cc
+++ b/runtime/bin/platform_android.cc
@@ -62,6 +62,11 @@
 }
 
 
+void Platform::FreeEnvironment(char** env, intptr_t count) {
+  delete[] env;
+}
+
+
 char* Platform::StrError(int error_code) {
   static const int kBufferSize = 1024;
   char* error = static_cast<char*>(malloc(kBufferSize));
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_linux.cc
index e9ca377..2d77576 100644
--- a/runtime/bin/platform_linux.cc
+++ b/runtime/bin/platform_linux.cc
@@ -62,6 +62,11 @@
 }
 
 
+void Platform::FreeEnvironment(char** env, intptr_t count) {
+  delete[] env;
+}
+
+
 char* Platform::StrError(int error_code) {
   static const int kBufferSize = 1024;
   char* error = static_cast<char*>(malloc(kBufferSize));
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index c5759d8..822399d 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -67,6 +67,11 @@
 }
 
 
+void Platform::FreeEnvironment(char** env, intptr_t count) {
+  delete[] env;
+}
+
+
 char* Platform::StrError(int error_code) {
   static const int kBufferSize = 1024;
   char* error = static_cast<char*>(malloc(kBufferSize));
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index d5ca62f..0af539d 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -5,7 +5,6 @@
 #include "bin/platform.h"
 #include "bin/socket.h"
 
-
 bool Platform::Initialize() {
   // Nothing to do on Windows.
   return true;
@@ -36,7 +35,7 @@
 
 
 char** Platform::Environment(intptr_t* count) {
-  char* strings = GetEnvironmentStringsA();
+  char* strings = GetEnvironmentStrings();
   if (strings == NULL) return NULL;
   char* tmp = strings;
   intptr_t i = 0;
@@ -46,13 +45,20 @@
   }
   *count = i;
   char** result = new char*[i];
+  tmp = strings;
   for (intptr_t current = 0; current < i; current++) {
-    result[current] = strings;
-    strings += (strlen(strings) + 1);
+    result[current] = StringUtils::SystemStringToUtf8(tmp);
+    tmp += (strlen(tmp) + 1);
   }
+  FreeEnvironmentStrings(strings);
   return result;
 }
 
+void Platform::FreeEnvironment(char** env, int count) {
+  for (int i = 0; i < count; i++) free(env[i]);
+  delete[] env;
+}
+
 
 char* Platform::StrError(int error_code) {
   static const int kBufferSize = 1024;
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 1dd8bf6..4cdc853 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -52,7 +52,7 @@
       }
     }
 
-    if (options !== null && options.workingDirectory !== null) {
+    if (options != null && options.workingDirectory != null) {
       _workingDirectory = options.workingDirectory;
       if (_workingDirectory is !String) {
         throw new ArgumentError(
@@ -60,7 +60,7 @@
       }
     }
 
-    if (options !== null && options.environment !== null) {
+    if (options != null && options.environment != null) {
       var env = options.environment;
       if (env is !Map) {
         throw new ArgumentError("Environment is not a map: $env");
@@ -158,7 +158,10 @@
         _err.close();
         _exitHandler.close();
         completer.completeException(
-            new ProcessException(status._errorMessage, status._errorCode));
+            new ProcessException(_path,
+                                 _arguments,
+                                 status._errorMessage,
+                                 status._errorCode));
         return;
       }
       _started = true;
@@ -190,7 +193,7 @@
 
         void handleExit() {
           _ended = true;
-          if (_onExit !== null) {
+          if (_onExit != null) {
             _onExit(exitCode(exitDataBuffer));
           }
           _out.close();
@@ -245,7 +248,7 @@
 
   void set onExit(void callback(int exitCode)) {
     if (_ended) {
-      throw new ProcessException("Process killed");
+      throw new ProcessException(_path, _arguments, "Process killed");
     }
     _onExit = callback;
   }
@@ -277,15 +280,15 @@
     // Extract output encoding options and verify arguments.
     var stdoutEncoding = Encoding.UTF_8;
     var stderrEncoding = Encoding.UTF_8;
-    if (options !== null) {
-      if (options.stdoutEncoding !== null) {
+    if (options != null) {
+      if (options.stdoutEncoding != null) {
         stdoutEncoding = options.stdoutEncoding;
         if (stdoutEncoding is !Encoding) {
           throw new ArgumentError(
               'stdoutEncoding option is not an encoding: $stdoutEncoding');
         }
       }
-      if (options.stderrEncoding !== null) {
+      if (options.stderrEncoding != null) {
         stderrEncoding = options.stderrEncoding;
         if (stderrEncoding is !Encoding) {
           throw new ArgumentError(
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc
index 5628a53..3094176 100644
--- a/runtime/bin/process_win.cc
+++ b/runtime/bin/process_win.cc
@@ -8,6 +8,7 @@
 #include "bin/process.h"
 #include "bin/eventhandler.h"
 #include "bin/thread.h"
+#include "bin/utils.h"
 #include "platform/globals.h"
 
 static const int kReadHandle = 0;
@@ -398,6 +399,12 @@
   PROCESS_INFORMATION process_info;
   ZeroMemory(&process_info, sizeof(process_info));
 
+  // Transform input strings to system format.
+  path = StringUtils::Utf8ToSystemString(path);
+  for (int i = 0; i < arguments_length; i++) {
+     arguments[i] = StringUtils::Utf8ToSystemString(arguments[i]);
+  }
+
   // Compute command-line length.
   int command_line_length = strlen(path);
   for (int i = 0; i < arguments_length; i++) {
@@ -410,6 +417,8 @@
     int error_code = SetOsErrorMessage(os_error_message, os_error_message_len);
     CloseProcessPipes(
         stdin_handles, stdout_handles, stderr_handles, exit_handles);
+    free(const_cast<char*>(path));
+    for (int i = 0; i < arguments_length; i++) free(arguments[i]);
     return error_code;
   }
 
@@ -427,10 +436,17 @@
     remaining -= written;
     ASSERT(remaining >= 0);
   }
+  free(const_cast<char*>(path));
+  for (int i = 0; i < arguments_length; i++) free(arguments[i]);
 
   // Create environment block if an environment is supplied.
   char* environment_block = NULL;
   if (environment != NULL) {
+    // Convert environment strings to system strings.
+    for (intptr_t i = 0; i < environment_length; i++) {
+      environment[i] = StringUtils::Utf8ToSystemString(environment[i]);
+    }
+
     // An environment block is a sequence of zero-terminated strings
     // followed by a block-terminating zero char.
     intptr_t block_size = 1;
@@ -452,6 +468,11 @@
     // Block-terminating zero char.
     environment_block[block_index++] = '\0';
     ASSERT(block_index == block_size);
+    for (intptr_t i = 0; i < environment_length; i++) free(environment[i]);
+  }
+
+  if (working_directory != NULL) {
+    working_directory = StringUtils::Utf8ToSystemString(working_directory);
   }
 
   // Create process.
@@ -469,6 +490,9 @@
   // Deallocate command-line and environment block strings.
   delete[] command_line;
   delete[] environment_block;
+  if (working_directory != NULL) {
+    free(const_cast<char*>(working_directory));
+  }
 
   if (result == 0) {
     int error_code = SetOsErrorMessage(os_error_message, os_error_message_len);
diff --git a/runtime/bin/set.h b/runtime/bin/set.h
deleted file mode 100644
index e4c5096..0000000
--- a/runtime/bin/set.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// 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.
-
-#ifndef BIN_SET_H_
-#define BIN_SET_H_
-
-#include <stdlib.h>
-
-/*
- * Set implements a collection of distinct objects.
- */
-template <class T>
-class Set {
- private:
-  struct Node {
-    T object_;
-    Node* next_;
-  };
-
- public:
-  class Iterator {
-   public:
-    explicit Iterator(Set<T>* list) : list_(list) {
-      if (list != NULL) {
-        next_ = list->head_;
-      } else {
-        next_ = NULL;
-      }
-    }
-
-    bool HasNext() const {
-      return next_ != NULL;
-    }
-
-    void GetNext(T* entry) {
-      *entry = next_->object_;
-      next_ = next_->next_;
-    }
-
-   private:
-    const Set<T>* list_;
-    struct Node* next_;
-  };
-
-  Set() {
-    head_ = NULL;
-    tail_ = NULL;
-    size_ = 0;
-  }
-
-  ~Set() {}
-
-  bool Add(const T& element) {
-    Node* new_node = new Node;
-    new_node->object_ = element;
-    new_node->next_ = NULL;
-
-    if (Contains(element)) {
-      return false;
-    }
-
-    if (IsEmpty()) {
-      head_ = new_node;
-      tail_ = new_node;
-    } else {
-      tail_->next_ = new_node;
-      tail_ = new_node;
-    }
-    size_++;
-    return true;
-  }
-
-  T* Remove(const T& element) {
-    Node* current = head_;
-    Node* previous = NULL;
-    if (IsEmpty()) {
-      return NULL;
-    }
-
-    do {
-      if (element == current->object_) {
-        if (current == head_) {
-          head_ = head_->next_;
-        }
-        if (current == tail_) {
-          tail_ = previous;
-        }
-        if (previous != NULL) {
-          previous->next_ = current->next_;
-        }
-        size_--;
-        return &current->object_;
-      }
-      previous = current;
-      current = current->next_;
-    } while (current);
-    return NULL;
-  }
-
-  bool Contains(const T& element) {
-    T value;
-    Iterator iterator(this);
-    while (iterator.HasNext()) {
-      iterator.GetNext(&value);
-      if (value == element) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  bool IsEmpty() {
-    return head_ == NULL;
-  }
-
-  int Size() {
-    return size_;
-  }
-
- private:
-  Node* head_;
-  Node* tail_;
-  int size_;
-};
-
-#endif  // BIN_SET_H_
-
diff --git a/runtime/bin/set_test.cc b/runtime/bin/set_test.cc
deleted file mode 100644
index 6a1491b..0000000
--- a/runtime/bin/set_test.cc
+++ /dev/null
@@ -1,125 +0,0 @@
-// 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.
-
-#include "bin/set.h"
-
-#include "vm/unit_test.h"
-
-UNIT_TEST_CASE(SetOperations) {
-  Set<int> set;
-  EXPECT(set.IsEmpty());
-  EXPECT(!set.Contains(1));
-  EXPECT(set.Add(1));
-  EXPECT(set.Contains(1));
-  EXPECT(!set.IsEmpty());
-  EXPECT(!set.Remove(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Remove(1));
-  EXPECT(set.IsEmpty());
-  EXPECT(set.Add(3));
-  EXPECT(set.Contains(3));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Add(4));
-  EXPECT(set.Contains(4));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Add(5));
-  EXPECT(set.Contains(5));
-  EXPECT(set.Remove(5));
-  EXPECT(set.Remove(4));
-  EXPECT(set.Remove(3));
-  EXPECT(set.IsEmpty());
-  EXPECT(set.Add(1));
-  EXPECT(set.Contains(1));
-  EXPECT(set.Add(2));
-  EXPECT(set.Contains(2));
-  EXPECT(set.Add(3));
-  EXPECT(set.Contains(3));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Size() == 3);
-  EXPECT(set.Remove(2));
-  EXPECT(set.Remove(1));
-  EXPECT(set.Remove(3));
-  EXPECT(set.IsEmpty());
-  EXPECT(set.Size() == 0);
-  EXPECT(set.Add(1));
-  EXPECT(set.Contains(1));
-  EXPECT(set.Add(2));
-  EXPECT(set.Contains(2));
-  EXPECT(set.Add(3));
-  EXPECT(set.Contains(3));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Remove(2));
-  EXPECT(set.Remove(3));
-  EXPECT(set.Remove(1));
-  EXPECT(set.IsEmpty());
-  EXPECT(set.Add(1));
-  EXPECT(set.Contains(1));
-  EXPECT(set.Add(2));
-  EXPECT(set.Contains(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Remove(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Add(3));
-  EXPECT(set.Contains(3));
-  EXPECT(set.Add(4));
-  EXPECT(set.Contains(4));
-  EXPECT(!set.Contains(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Remove(3));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Remove(4));
-  EXPECT(set.Remove(1));
-  EXPECT(set.IsEmpty());
-  EXPECT(!set.Contains(4));
-  EXPECT(set.Add(1));
-  EXPECT(set.Contains(1));
-  EXPECT(!set.IsEmpty());
-  EXPECT(!set.Add(1));
-  EXPECT(set.Size() == 1);
-  EXPECT(set.Contains(1));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Add(2));
-  EXPECT(set.Contains(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(!set.Add(2));
-  EXPECT(set.Contains(2));
-  EXPECT(!set.IsEmpty());
-  EXPECT(set.Size() == 2);
-  EXPECT(set.Remove(1));
-  EXPECT(set.Remove(2));
-  EXPECT(set.IsEmpty());
-  EXPECT(set.Size() == 0);
-}
-
-
-UNIT_TEST_CASE(SetIterator) {
-  Set<int> set;
-  int i;
-  for (i = 1; i <= 10; i++) {
-    set.Add(i);
-  }
-
-  Set<int>::Iterator iterator(&set);
-  int value;
-  i = 0;
-
-  while (iterator.HasNext()) {
-    iterator.GetNext(&value);
-    i++;
-  }
-  EXPECT(i == 10);
-  EXPECT(!set.IsEmpty());
-
-  Set<int> emptyset;
-  Set<int>::Iterator emptyiterator(&emptyset);
-
-  i = 0;
-  while (emptyiterator.HasNext()) {
-    emptyiterator.GetNext(&value);
-    i++;
-  }
-  EXPECT(i == 0);
-  EXPECT(emptyset.IsEmpty());
-}
-
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 8f8d4c9..e0e8242 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -107,6 +107,7 @@
 
 void FUNCTION_NAME(Socket_ReadList)(Dart_NativeArguments args) {
   Dart_EnterScope();
+  static bool short_socket_reads = Dart_IsVMFlagSet("short_socket_read");
   Dart_Handle socket_obj = Dart_GetNativeArgument(args, 0);
   intptr_t socket = 0;
   Socket::GetSocketIdNativeField(socket_obj, &socket);
@@ -124,7 +125,7 @@
       Dart_PropagateError(result);
     }
     ASSERT((offset + length) <= buffer_len);
-    if (Dart_IsVMFlagSet("short_socket_read")) {
+    if (short_socket_reads) {
       length = (length + 1) / 2;
     }
     uint8_t* buffer = new uint8_t[length];
@@ -156,6 +157,7 @@
 
 void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
   Dart_EnterScope();
+  static bool short_socket_writes = Dart_IsVMFlagSet("short_socket_write");
   Dart_Handle socket_obj = Dart_GetNativeArgument(args, 0);
   intptr_t socket = 0;
   Socket::GetSocketIdNativeField(socket_obj, &socket);
@@ -172,7 +174,7 @@
   }
   ASSERT((offset + length) <= buffer_len);
 
-  if (Dart_IsVMFlagSet("short_socket_write")) {
+  if (short_socket_writes) {
     length = (length + 1) / 2;
   }
 
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index d4960f6..eac7d12 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -29,6 +29,7 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
   FDUtils::SetNonBlocking(fd);
 
   server = gethostbyname(host);
@@ -188,6 +189,8 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
+
   int optval = 1;
   TEMP_FAILURE_RETRY(
       setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)));
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 896a9da..89dd267 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -29,6 +29,7 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
   FDUtils::SetNonBlocking(fd);
 
   static const size_t kTempBufSize = 1024;
@@ -191,6 +192,8 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
+
   int optval = 1;
   TEMP_FAILURE_RETRY(
       setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)));
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc
index 5e830ff..32db433 100644
--- a/runtime/bin/socket_macos.cc
+++ b/runtime/bin/socket_macos.cc
@@ -29,6 +29,7 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
   FDUtils::SetNonBlocking(fd);
 
   server = gethostbyname(host);
@@ -187,6 +188,8 @@
     return -1;
   }
 
+  FDUtils::SetCloseOnExec(fd);
+
   int optval = 1;
   TEMP_FAILURE_RETRY(
       setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)));
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 2b22877..7ce75d3 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -137,7 +137,7 @@
   }
 
   int get port {
-    if (_port === null) {
+    if (_port == null) {
       _port = _getPort();
     }
     return _port;
@@ -190,7 +190,7 @@
   }
 
   void _sendToEventHandler(int data) {
-    if (_handler === null) {
+    if (_handler == null) {
       _handler = new ReceivePort();
       _handler.receive((var message, ignored) { _multiplex(message); });
     }
@@ -495,8 +495,8 @@
 
   InputStream get inputStream {
     if (_inputStream == null) {
-      if (_handlerMap[_SocketBase._IN_EVENT] !== null ||
-          _handlerMap[_SocketBase._CLOSE_EVENT] !== null) {
+      if (_handlerMap[_SocketBase._IN_EVENT] != null ||
+          _handlerMap[_SocketBase._CLOSE_EVENT] != null) {
         throw new StreamException(
             "Cannot get input stream when socket handlers are used");
       }
@@ -507,7 +507,7 @@
 
   OutputStream get outputStream {
     if (_outputStream == null) {
-      if (_handlerMap[_SocketBase._OUT_EVENT] !== null) {
+      if (_handlerMap[_SocketBase._OUT_EVENT] != null) {
         throw new StreamException(
             "Cannot get input stream when socket handlers are used");
       }
@@ -548,17 +548,17 @@
       // handler (connect handler cannot be called again). Change this
       // before calling any handlers as handlers can change the
       // handlers.
-      if (_clientWriteHandler === null) _onWrite = _clientWriteHandler;
+      if (_clientWriteHandler == null) _onWrite = _clientWriteHandler;
 
       // First out event is socket connected event.
-      if (_clientConnectHandler !== null) _clientConnectHandler();
+      if (_clientConnectHandler != null) _clientConnectHandler();
       _clientConnectHandler = null;
 
       // Always (even for the first out event) call the write handler.
-      if (_clientWriteHandler !== null) _clientWriteHandler();
+      if (_clientWriteHandler != null) _clientWriteHandler();
     }
 
-    if (_clientConnectHandler === null && _clientWriteHandler === null) {
+    if (_clientConnectHandler == null && _clientWriteHandler == null) {
       _onWrite = null;
     } else {
       if (_seenFirstOutEvent) {
@@ -570,14 +570,14 @@
   }
 
   int get remotePort {
-    if (_remotePort === null) {
+    if (_remotePort == null) {
       remoteHost;
     }
     return _remotePort;
   }
 
   String get remoteHost {
-    if (_remoteHost === null) {
+    if (_remoteHost == null) {
       List peer = _getRemotePeer();
       _remoteHost = peer[0];
       _remotePort = peer[1];
diff --git a/runtime/bin/tls_socket.cc b/runtime/bin/tls_socket.cc
new file mode 100644
index 0000000..c4bc0a5
--- /dev/null
+++ b/runtime/bin/tls_socket.cc
@@ -0,0 +1,385 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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/tls_socket.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <nss.h>
+#include <prerror.h>
+#include <prinit.h>
+#include <prnetdb.h>
+#include <ssl.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "bin/net/nss_memio.h"
+#include "bin/thread.h"
+#include "bin/utils.h"
+#include "platform/utils.h"
+
+#include "include/dart_api.h"
+
+bool TlsFilter::library_initialized_ = false;
+dart::Mutex TlsFilter::mutex_;  // To protect library initialization.
+static const int kTlsFilterNativeFieldIndex = 0;
+
+static TlsFilter* GetTlsFilter(Dart_NativeArguments args) {
+  TlsFilter* filter;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kTlsFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&filter)));
+  return filter;
+}
+
+
+static void SetTlsFilter(Dart_NativeArguments args, TlsFilter* filter) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_SetNativeInstanceField(
+      dart_this,
+      kTlsFilterNativeFieldIndex,
+      reinterpret_cast<intptr_t>(filter)));
+}
+
+
+void FUNCTION_NAME(TlsSocket_Init)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  TlsFilter* filter = new TlsFilter;
+  SetTlsFilter(args, filter);
+  filter->Init(dart_this);
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_Connect)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  Dart_Handle host_name = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  Dart_Handle port_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+
+  const char* host_name_string = NULL;
+  // TODO(whesse): Is truncating a Dart string containing \0 what we want?
+  ThrowIfError(Dart_StringToCString(host_name, &host_name_string));
+
+  int64_t port;
+  if (!DartUtils::GetInt64Value(port_object, &port) ||
+      port < 0 || port > 65535) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Illegal port parameter in TlsSocket"));
+  }
+
+  GetTlsFilter(args)->Connect(host_name_string, static_cast<int>(port));
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_Destroy)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  TlsFilter* filter = GetTlsFilter(args);
+  SetTlsFilter(args, NULL);
+  filter->Destroy();
+  delete filter;
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_Handshake)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  GetTlsFilter(args)->Handshake();
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_RegisterHandshakeCompleteCallback)(
+    Dart_NativeArguments args) {
+  Dart_EnterScope();
+  Dart_Handle handshake_complete =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  if (!Dart_IsClosure(handshake_complete)) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to RegisterHandshakeCompleteCallback"));
+  }
+  GetTlsFilter(args)->RegisterHandshakeCompleteCallback(handshake_complete);
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_ProcessBuffer)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  Dart_Handle buffer_id_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  int64_t buffer_id = DartUtils::GetIntegerValue(buffer_id_object);
+  if (buffer_id < 0 || buffer_id >= TlsFilter::kNumBuffers) {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Illegal argument to ProcessBuffer"));
+  }
+
+  intptr_t bytes_read =
+      GetTlsFilter(args)->ProcessBuffer(static_cast<int>(buffer_id));
+  Dart_SetReturnValue(args, Dart_NewInteger(bytes_read));
+  Dart_ExitScope();
+}
+
+
+void FUNCTION_NAME(TlsSocket_SetCertificateDatabase)
+    (Dart_NativeArguments args) {
+  Dart_EnterScope();
+  Dart_Handle dart_pkcert_dir = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  // Check that the type is string, and get the UTF-8 C string value from it.
+  if (Dart_IsString(dart_pkcert_dir)) {
+    const char* pkcert_dir = NULL;
+    ThrowIfError(Dart_StringToCString(dart_pkcert_dir, &pkcert_dir));
+    TlsFilter::InitializeLibrary(pkcert_dir);
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Non-String argument to SetCertificateDatabase"));
+  }
+  Dart_ExitScope();
+}
+
+
+void TlsFilter::Init(Dart_Handle dart_this) {
+  string_start_ = ThrowIfError(
+      Dart_NewPersistentHandle(DartUtils::NewString("start")));
+  string_length_ = ThrowIfError(
+      Dart_NewPersistentHandle(DartUtils::NewString("length")));
+
+  InitializeBuffers(dart_this);
+  memio_ = memio_CreateIOLayer(kMemioBufferSize);
+}
+
+
+void TlsFilter::InitializeBuffers(Dart_Handle dart_this) {
+  // Create TlsFilter buffers as ExternalUint8Array objects.
+  Dart_Handle dart_buffers_object = ThrowIfError(
+      Dart_GetField(dart_this, DartUtils::NewString("buffers")));
+  Dart_Handle dart_buffer_object =
+      Dart_ListGetAt(dart_buffers_object, kReadPlaintext);
+  Dart_Handle tls_external_buffer_class =
+      Dart_InstanceGetClass(dart_buffer_object);
+  Dart_Handle dart_buffer_size = ThrowIfError(
+      Dart_GetField(tls_external_buffer_class, DartUtils::NewString("SIZE")));
+  buffer_size_ = DartUtils::GetIntegerValue(dart_buffer_size);
+  if (buffer_size_ <= 0 || buffer_size_ > 1024 * 1024) {
+    Dart_ThrowException(
+        DartUtils::NewString("Invalid buffer size in _TlsExternalBuffer"));
+  }
+
+  Dart_Handle data_identifier = DartUtils::NewString("data");
+  for (int i = 0; i < kNumBuffers; ++i) {
+    dart_buffer_objects_[i] = ThrowIfError(
+        Dart_NewPersistentHandle(Dart_ListGetAt(dart_buffers_object, i)));
+    buffers_[i] = new uint8_t[buffer_size_];
+    Dart_Handle data = ThrowIfError(
+      Dart_NewExternalByteArray(buffers_[i], buffer_size_, NULL, NULL));
+    ThrowIfError(Dart_SetField(dart_buffer_objects_[i],
+                               data_identifier,
+                               data));
+  }
+}
+
+
+void TlsFilter::RegisterHandshakeCompleteCallback(Dart_Handle complete) {
+  ASSERT(NULL == handshake_complete_);
+  handshake_complete_ = ThrowIfError(Dart_NewPersistentHandle(complete));
+}
+
+
+void TlsFilter::InitializeLibrary(const char* pkcert_database) {
+  MutexLocker locker(&mutex_);
+  if (!library_initialized_) {
+    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
+    // TODO(whesse): Verify there are no UTF-8 issues here.
+    SECStatus status = NSS_Init(pkcert_database);
+    if (status != SECSuccess) {
+      ThrowPRException("Unsuccessful NSS_Init call.");
+    }
+
+    status = NSS_SetDomesticPolicy();
+    if (status != SECSuccess) {
+      ThrowPRException("Unsuccessful NSS_SetDomesticPolicy call.");
+    }
+  } else {
+    ThrowException("Called TlsFilter::InitializeLibrary more than once");
+  }
+}
+
+
+void TlsFilter::Connect(const char* host, int port) {
+  if (in_handshake_) {
+    ThrowException("Connect called while already in handshake state.");
+  }
+  PRFileDesc* my_socket = memio_;
+
+  my_socket = SSL_ImportFD(NULL, my_socket);
+  if (my_socket == NULL) {
+    ThrowPRException("Unsuccessful SSL_ImportFD call");
+  }
+
+  if (SSL_SetURL(my_socket, host) == -1) {
+    ThrowPRException("Unsuccessful SetURL call");
+  }
+
+  SECStatus status = SSL_ResetHandshake(my_socket, PR_FALSE);
+  if (status != SECSuccess) {
+    ThrowPRException("Unsuccessful SSL_ResetHandshake call");
+  }
+
+  // SetPeerAddress
+  PRNetAddr host_address;
+  char host_entry_buffer[PR_NETDB_BUF_SIZE];
+  PRHostEnt host_entry;
+  PRStatus rv = PR_GetHostByName(host, host_entry_buffer,
+                                 PR_NETDB_BUF_SIZE, &host_entry);
+  if (rv != PR_SUCCESS) {
+    ThrowPRException("Unsuccessful PR_GetHostByName call");
+  }
+
+  int index = PR_EnumerateHostEnt(0, &host_entry, port, &host_address);
+  if (index == -1 || index == 0) {
+    ThrowPRException("Unsuccessful PR_EnumerateHostEnt call");
+  }
+
+  memio_SetPeerName(my_socket, &host_address);
+  memio_ = my_socket;
+}
+
+
+void TlsFilter::Handshake() {
+  SECStatus status = SSL_ForceHandshake(memio_);
+  if (status == SECSuccess) {
+    if (in_handshake_) {
+      ThrowIfError(Dart_InvokeClosure(handshake_complete_, 0, NULL));
+      in_handshake_ = false;
+    }
+  } else {
+    PRErrorCode error = PR_GetError();
+    if (error == PR_WOULD_BLOCK_ERROR) {
+      if (!in_handshake_) {
+        in_handshake_ = true;
+      }
+    } else {
+      ThrowPRException("Unexpected handshake error");
+    }
+  }
+}
+
+
+void TlsFilter::Destroy() {
+  for (int i = 0; i < kNumBuffers; ++i) {
+    Dart_DeletePersistentHandle(dart_buffer_objects_[i]);
+    delete[] buffers_[i];
+  }
+  Dart_DeletePersistentHandle(string_start_);
+  Dart_DeletePersistentHandle(string_length_);
+  Dart_DeletePersistentHandle(handshake_complete_);
+  // TODO(whesse): Free NSS objects here.
+}
+
+
+intptr_t TlsFilter::ProcessBuffer(int buffer_index) {
+  Dart_Handle buffer_object = dart_buffer_objects_[buffer_index];
+  Dart_Handle start_object = ThrowIfError(
+      Dart_GetField(buffer_object, string_start_));
+  Dart_Handle length_object = ThrowIfError(
+      Dart_GetField(buffer_object, string_length_));
+  int64_t unsafe_start = DartUtils::GetIntegerValue(start_object);
+  int64_t unsafe_length = DartUtils::GetIntegerValue(length_object);
+  ASSERT(unsafe_start >= 0);
+  ASSERT(unsafe_start < buffer_size_);
+  ASSERT(unsafe_length >= 0);
+  ASSERT(unsafe_length <= buffer_size_);
+  intptr_t start = static_cast<intptr_t>(unsafe_start);
+  intptr_t length = static_cast<intptr_t>(unsafe_length);
+  uint8_t* buffer = buffers_[buffer_index];
+
+  int bytes_processed = 0;
+  switch (buffer_index) {
+    case kReadPlaintext: {
+      int bytes_free = buffer_size_ - start - length;
+      bytes_processed = PR_Read(memio_,
+                                buffer + start + length,
+                                bytes_free);
+      if (bytes_processed < 0) {
+        ASSERT(bytes_processed == -1);
+        // TODO(whesse): Handle unexpected errors here.
+        PRErrorCode pr_error = PR_GetError();
+        if (PR_WOULD_BLOCK_ERROR != pr_error) {
+          ThrowPRException("Error reading plaintext from TlsFilter");
+        }
+        bytes_processed = 0;
+      }
+      break;
+    }
+
+    case kWriteEncrypted: {
+      const uint8_t* buf1;
+      const uint8_t* buf2;
+      unsigned int len1;
+      unsigned int len2;
+      int bytes_free = buffer_size_ - start - length;
+      memio_Private* secret = memio_GetSecret(memio_);
+      memio_GetWriteParams(secret, &buf1, &len1, &buf2, &len2);
+      int bytes_to_send =
+          dart::Utils::Minimum(len1, static_cast<unsigned>(bytes_free));
+      if (bytes_to_send > 0) {
+        memmove(buffer + start + length, buf1, bytes_to_send);
+        bytes_processed = bytes_to_send;
+      }
+      bytes_to_send = dart::Utils::Minimum(len2,
+          static_cast<unsigned>(bytes_free - bytes_processed));
+      if (bytes_to_send > 0) {
+        memmove(buffer + start + length + bytes_processed, buf2,
+                bytes_to_send);
+        bytes_processed += bytes_to_send;
+      }
+      if (bytes_processed > 0) {
+        memio_PutWriteResult(secret, bytes_processed);
+      }
+      break;
+    }
+
+    case kReadEncrypted: {
+      if (length > 0) {
+        bytes_processed = length;
+        memio_Private* secret = memio_GetSecret(memio_);
+        uint8_t* memio_buf;
+        int free_bytes = memio_GetReadParams(secret, &memio_buf);
+        if (free_bytes < bytes_processed) bytes_processed = free_bytes;
+        memmove(memio_buf,
+                buffer + start,
+                bytes_processed);
+        memio_PutReadResult(secret, bytes_processed);
+      }
+      break;
+    }
+
+    case kWritePlaintext: {
+      if (length > 0) {
+        bytes_processed = PR_Write(memio_,
+                                   buffer + start,
+                                   length);
+      }
+
+      if (bytes_processed < 0) {
+        ASSERT(bytes_processed == -1);
+        // TODO(whesse): Handle unexpected errors here.
+        PRErrorCode pr_error = PR_GetError();
+        if (PR_WOULD_BLOCK_ERROR != pr_error) {
+          ThrowPRException("Error reading plaintext from TlsFilter");
+        }
+        bytes_processed = 0;
+      }
+      break;
+    }
+  }
+  return bytes_processed;
+}
diff --git a/runtime/bin/tls_socket.h b/runtime/bin/tls_socket.h
new file mode 100644
index 0000000..fc39b70
--- /dev/null
+++ b/runtime/bin/tls_socket.h
@@ -0,0 +1,101 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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_TLS_SOCKET_H_
+#define BIN_TLS_SOCKET_H_
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include <prinit.h>
+#include <prerror.h>
+#include <prnetdb.h>
+
+#include "bin/builtin.h"
+#include "bin/dartutils.h"
+#include "platform/globals.h"
+#include "platform/thread.h"
+
+static void ThrowException(const char* message) {
+  Dart_Handle socket_io_exception =
+      DartUtils::NewDartSocketIOException(message, Dart_Null());
+  Dart_ThrowException(socket_io_exception);
+}
+
+
+/* Handle an error reported from the NSS library. */
+static void ThrowPRException(const char* message) {
+  PRErrorCode error_code = PR_GetError();
+  int error_length = PR_GetErrorTextLength();
+  char* error_message = static_cast<char*>(malloc(error_length + 1));
+  ASSERT(error_message != NULL);
+  int copied_length = PR_GetErrorText(error_message);
+  ASSERT(copied_length == error_length);
+  error_message[error_length] = '\0';
+  OSError os_error_struct(error_code, error_message, OSError::kNSS);
+  Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
+  Dart_Handle socket_io_exception =
+      DartUtils::NewDartSocketIOException(message, os_error);
+  free(error_message);
+  Dart_ThrowException(socket_io_exception);
+}
+
+/*
+ * TlsFilter encapsulates the NSS SSL(TLS) code in a filter, that communicates
+ * with the containing _TlsFilterImpl Dart object through four shared
+ * ExternalByteArray buffers, for reading and writing plaintext, and
+ * reading and writing encrypted text.  The filter handles handshaking
+ * and certificate verification.
+ */
+class TlsFilter {
+ public:
+  // These enums must agree with those in sdk/lib/io/tls_socket.dart.
+  enum BufferIndex {
+    kReadPlaintext,
+    kWritePlaintext,
+    kReadEncrypted,
+    kWriteEncrypted,
+    kNumBuffers
+  };
+
+  TlsFilter()
+      : string_start_(NULL),
+        string_length_(NULL),
+        handshake_complete_(NULL),
+        in_handshake_(false),
+        memio_(NULL) { }
+
+  void Init(Dart_Handle dart_this);
+  void Connect(const char* host, int port);
+  void Destroy();
+  void DestroyPlatformIndependent();
+  void Handshake();
+  void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
+  static void InitializeLibrary(const char* pkcert_directory);
+
+  intptr_t ProcessBuffer(int bufferIndex);
+
+ private:
+  static const int kMemioBufferSize = 20 * KB;
+  static bool library_initialized_;
+  static dart::Mutex mutex_;  // To protect library initialization.
+
+  uint8_t* buffers_[kNumBuffers];
+  int64_t buffer_size_;
+  Dart_Handle string_start_;
+  Dart_Handle string_length_;
+  Dart_Handle dart_buffer_objects_[kNumBuffers];
+  Dart_Handle handshake_complete_;
+  bool in_handshake_;
+  PRFileDesc* memio_;
+
+  void InitializeBuffers(Dart_Handle dart_this);
+  void InitializePlatformData();
+
+  DISALLOW_COPY_AND_ASSIGN(TlsFilter);
+};
+
+#endif  // BIN_TLS_SOCKET_H_
diff --git a/runtime/bin/tls_socket_patch.dart b/runtime/bin/tls_socket_patch.dart
new file mode 100644
index 0000000..73e40e8
--- /dev/null
+++ b/runtime/bin/tls_socket_patch.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+patch class TlsSocket {
+  /* patch */ static void setCertificateDatabase(String pkcertDirectory)
+      native "TlsSocket_SetCertificateDatabase";
+}
+
+
+patch class _TlsFilter {
+  /* patch */ factory _TlsFilter() => new _TlsFilterImpl();
+}
+
+
+/**
+ * _TlsFilterImpl wraps a filter that encrypts and decrypts data travelling
+ * over a TLS encrypted socket.  The filter also handles the handshaking
+ * and certificate verification.
+ *
+ * The filter exposes its input and output buffers as Dart objects that
+ * are backed by an external C array of bytes, so that both Dart code and
+ * native code can access the same data.
+ */
+class _TlsFilterImpl extends NativeFieldWrapperClass1 implements _TlsFilter {
+  _TlsFilterImpl() {
+    buffers = new List<_TlsExternalBuffer>(_TlsSocket.NUM_BUFFERS);
+    for (int i = 0; i < _TlsSocket.NUM_BUFFERS; ++i) {
+      buffers[i] = new _TlsExternalBuffer();
+    }
+  }
+
+  void connect(String hostName, int port) native "TlsSocket_Connect";
+
+  void destroy() {
+    buffers = null;
+    _destroy();
+  }
+
+  void _destroy() native "TlsSocket_Destroy";
+
+  void handshake() native "TlsSocket_Handshake";
+
+  void init() native "TlsSocket_Init";
+
+  int processBuffer(int bufferIndex) native "TlsSocket_ProcessBuffer";
+
+  void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
+      native "TlsSocket_RegisterHandshakeCompleteCallback";
+
+  List<_TlsExternalBuffer> buffers;
+}
diff --git a/runtime/bin/utils.h b/runtime/bin/utils.h
index 7c050a4..70545ab 100644
--- a/runtime/bin/utils.h
+++ b/runtime/bin/utils.h
@@ -16,6 +16,7 @@
   enum SubSystem {
     kSystem,
     kGetAddressInfo,
+    kNSS,
     kUnknown = -1
   };
 
@@ -52,4 +53,16 @@
   DISALLOW_COPY_AND_ASSIGN(OSError);
 };
 
+class StringUtils {
+ public:
+  // The following methods convert the argument if needed.  The
+  // conversions are only needed on Windows. If the methods returns a
+  // pointer that is different from the input pointer the returned
+  // pointer is allocated with malloc and should be freed using free.
+  static const char* SystemStringToUtf8(const char* str);
+  static char* SystemStringToUtf8(char* str);
+  static const char* Utf8ToSystemString(const char* utf8);
+  static char* Utf8ToSystemString(char* utf8);
+};
+
 #endif  // BIN_UTILS_H_
diff --git a/runtime/bin/utils_android.cc b/runtime/bin/utils_android.cc
index f364e47..ab48f55 100644
--- a/runtime/bin/utils_android.cc
+++ b/runtime/bin/utils_android.cc
@@ -26,3 +26,19 @@
     UNREACHABLE();
   }
 }
+
+const char* StringUtils::SystemStringToUtf8(const char* str) {
+  return str;
+}
+
+const char* StringUtils::Utf8ToSystemString(const char* utf8) {
+  return utf8;
+}
+
+char* StringUtils::SystemStringToUtf8(char* str) {
+  return str;
+}
+
+char* StringUtils::Utf8ToSystemString(char* utf8) {
+  return utf8;
+}
diff --git a/runtime/bin/utils_linux.cc b/runtime/bin/utils_linux.cc
index f364e47..ab48f55 100644
--- a/runtime/bin/utils_linux.cc
+++ b/runtime/bin/utils_linux.cc
@@ -26,3 +26,19 @@
     UNREACHABLE();
   }
 }
+
+const char* StringUtils::SystemStringToUtf8(const char* str) {
+  return str;
+}
+
+const char* StringUtils::Utf8ToSystemString(const char* utf8) {
+  return utf8;
+}
+
+char* StringUtils::SystemStringToUtf8(char* str) {
+  return str;
+}
+
+char* StringUtils::Utf8ToSystemString(char* utf8) {
+  return utf8;
+}
diff --git a/runtime/bin/utils_macos.cc b/runtime/bin/utils_macos.cc
index f364e47..ab48f55 100644
--- a/runtime/bin/utils_macos.cc
+++ b/runtime/bin/utils_macos.cc
@@ -26,3 +26,19 @@
     UNREACHABLE();
   }
 }
+
+const char* StringUtils::SystemStringToUtf8(const char* str) {
+  return str;
+}
+
+const char* StringUtils::Utf8ToSystemString(const char* utf8) {
+  return utf8;
+}
+
+char* StringUtils::SystemStringToUtf8(char* str) {
+  return str;
+}
+
+char* StringUtils::Utf8ToSystemString(char* utf8) {
+  return utf8;
+}
diff --git a/runtime/bin/utils_win.cc b/runtime/bin/utils_win.cc
index 0dba5b5..9ee1777 100644
--- a/runtime/bin/utils_win.cc
+++ b/runtime/bin/utils_win.cc
@@ -45,3 +45,37 @@
   FormatMessageIntoBuffer(code_, message, kMaxMessageLength);
   SetMessage(message);
 }
+
+char* StringUtils::SystemStringToUtf8(char* str) {
+  int len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
+  wchar_t* unicode = new wchar_t[len+1];
+  MultiByteToWideChar(CP_ACP, 0, str, -1, unicode, len);
+  unicode[len] = '\0';
+  len = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, NULL, 0, NULL, NULL);
+  char* utf8 = reinterpret_cast<char*>(malloc(len+1));
+  WideCharToMultiByte(CP_UTF8, 0, unicode, -1, utf8, len, NULL, NULL);
+  utf8[len] = '\0';
+  delete[] unicode;
+  return utf8;
+}
+
+char* StringUtils::Utf8ToSystemString(char* utf8) {
+  int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
+  wchar_t* unicode = new wchar_t[len+1];
+  MultiByteToWideChar(CP_UTF8, 0, utf8, -1, unicode, len);
+  unicode[len] = '\0';
+  len = WideCharToMultiByte(CP_ACP, 0, unicode, -1, NULL, 0, NULL, NULL);
+  char* ansi = reinterpret_cast<char*>(malloc(len+1));
+  WideCharToMultiByte(CP_ACP, 0, unicode, -1, ansi, len, NULL, NULL);
+  ansi[len] = '\0';
+  delete[] unicode;
+  return ansi;
+}
+
+const char* StringUtils::Utf8ToSystemString(const char* utf8) {
+  return const_cast<const char*>(Utf8ToSystemString(const_cast<char*>(utf8)));
+}
+
+const char* StringUtils::SystemStringToUtf8(const char* str) {
+  return const_cast<const char*>(Utf8ToSystemString(const_cast<char*>(str)));
+}
diff --git a/runtime/dart-runtime.gyp b/runtime/dart-runtime.gyp
index 9286e71..3f6b8f5 100644
--- a/runtime/dart-runtime.gyp
+++ b/runtime/dart-runtime.gyp
@@ -4,11 +4,11 @@
 
 {
   'includes': [
+    'tools/gyp/runtime-configurations.gypi',
     'vm/vm.gypi',
     'bin/bin.gypi',
     'third_party/double-conversion/src/double-conversion.gypi',
     'third_party/jscre/jscre.gypi',
-    'tools/gyp/runtime-configurations.gypi',
     '../tools/gyp/source_filter.gypi',
   ],
   'variables': {
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 33f1775..8cc518a 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -913,6 +913,8 @@
  * data outside the Dart heap. These objects are totally detached from
  * the Dart heap. Only a subset of the Dart objects have a
  * representation as a Dart_CObject.
+ *
+ * The string encoding in the 'value.as_string' is UTF-8.
  */
 typedef struct _Dart_CObject {
   enum Type {
@@ -1324,9 +1326,9 @@
 DART_EXPORT bool Dart_IsString(Dart_Handle object);
 
 /**
- * Is this object an ASCII String?
+ * Is this object a Latin-1 (ISO-8859-1) String?
  */
-DART_EXPORT bool Dart_IsAsciiString(Dart_Handle object);
+DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object);
 
 /**
  * Gets the length of a String.
@@ -1482,6 +1484,45 @@
                                            uint16_t* utf16_array,
                                            intptr_t* length);
 
+/**
+ * Gets the storage size in bytes of a String.
+ *
+ * \param str A String.
+ * \param length Returns the storage size in bytes of the String.
+ *  This is the size in bytes needed to store the String.
+ *
+ * \return A valid handle if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str, intptr_t* size);
+
+
+/**
+ * Converts a String into an ExternalString.
+ * The original object is morphed into an external string object.
+ *
+ * \param array External space into which the string data will be
+ *   copied into. This must not move.
+ * \param length The size in bytes of the provided external space (array).
+ * \param peer An external pointer to associate with this string.
+ * \param cback A callback to be called when this string is finalized.
+ *
+ * \return the converted ExternalString object if no error occurs.
+ *   Otherwise returns an error handle.
+ *
+ * For example:
+ *  intptr_t size;
+ *  Dart_Handle result;
+ *  result = DartStringStorageSize(str, &size);
+ *  void* data = malloc(size);
+ *  result = Dart_MakeExternalString(str, data, size, NULL, NULL);
+ *
+ */
+DART_EXPORT Dart_Handle Dart_MakeExternalString(Dart_Handle str,
+                                                void* array,
+                                                intptr_t length,
+                                                void* peer,
+                                                Dart_PeerFinalizer cback);
+
 
 // --- Lists ---
 
diff --git a/runtime/lib/array.cc b/runtime/lib/array.cc
index 4d96793..ac4dc52 100644
--- a/runtime/lib/array.cc
+++ b/runtime/lib/array.cc
@@ -14,10 +14,10 @@
 
 DEFINE_NATIVE_ENTRY(ObjectArray_allocate, 2) {
   const AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments->At(0));
+      AbstractTypeArguments::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(type_arguments.IsNull() ||
          (type_arguments.IsInstantiated() && (type_arguments.Length() == 1)));
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));
   intptr_t len = length.Value();
   if (len < 0 || len > Array::kMaxElements) {
     const String& error = String::Handle(String::NewFormatted(
@@ -34,8 +34,8 @@
 
 
 DEFINE_NATIVE_ENTRY(ObjectArray_getIndexed, 2) {
-  const Array& array = Array::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));
+  const Array& array = Array::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
   if ((index.Value() < 0) || (index.Value() >= array.Length())) {
     GrowableArray<const Object*> arguments;
     arguments.Add(&index);
@@ -46,9 +46,9 @@
 
 
 DEFINE_NATIVE_ENTRY(ObjectArray_setIndexed, 3) {
-  const Array& array = Array::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));
-  const Instance& value = Instance::CheckedHandle(arguments->At(2));
+  const Array& array = Array::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
+  const Instance& value = Instance::CheckedHandle(arguments->NativeArgAt(2));
   if ((index.Value() < 0) || (index.Value() >= array.Length())) {
     GrowableArray<const Object*> arguments;
     arguments.Add(&index);
@@ -60,18 +60,18 @@
 
 
 DEFINE_NATIVE_ENTRY(ObjectArray_getLength, 1) {
-  const Array& array = Array::CheckedHandle(arguments->At(0));
+  const Array& array = Array::CheckedHandle(arguments->NativeArgAt(0));
   return Smi::New(array.Length());
 }
 
 
 // ObjectArray src, int srcStart, int dstStart, int count.
 DEFINE_NATIVE_ENTRY(ObjectArray_copyFromObjectArray, 5) {
-  const Array& dest = Array::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Array, source, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Smi, src_start, arguments->At(2));
-  GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->At(3));
-  GET_NATIVE_ARGUMENT(Smi, count, arguments->At(4));
+  const Array& dest = Array::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Array, source, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Smi, src_start, arguments->NativeArgAt(2));
+  GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->NativeArgAt(3));
+  GET_NATIVE_ARGUMENT(Smi, count, arguments->NativeArgAt(4));
   intptr_t icount = count.Value();
   if (icount < 0) {
     GrowableArray<const Object*> args;
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index aa1168f..1fb17fb 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -89,11 +89,11 @@
   }
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   void sort([Comparator<E> compare = Comparable.compare]) {
-    coreSort(this, compare);
+    _Sort.sort(this, compare);
   }
 
   int indexOf(E element, [int start = 0]) {
@@ -101,7 +101,7 @@
   }
 
   int lastIndexOf(E element, [int start = null]) {
-    if (start === null) start = length - 1;
+    if (start == null) start = length - 1;
     return Arrays.lastIndexOf(this, element, start);
   }
 
@@ -231,7 +231,7 @@
   }
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   void sort([Comparator<E> compare]) {
@@ -248,7 +248,7 @@
   }
 
   int lastIndexOf(E element, [int start = null]) {
-    if (start === null) start = length - 1;
+    if (start == null) start = length - 1;
     return Arrays.lastIndexOf(this, element, start);
   }
 
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 08ef482..5bb7ec2c 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -7,7 +7,7 @@
 // fixed size array.
 patch class _ListImpl<E> {
   /* patch */ factory List([int length = null]) {
-    if (length === null) {
+    if (length == null) {
       return new _GrowableObjectArray<E>();
     } else {
       return new _ObjectArray<E>(length);
@@ -21,4 +21,15 @@
     }
     return list;
   }
+
+  // Factory constructing a mutable List from a parser generated List literal.
+  // [elements] contains elements that are already type checked.
+  factory List._fromLiteral(List elements) {
+    var list = new List<E>();
+    if (elements.length > 0) {
+      list._setData(elements);
+      list.length = elements.length;
+    }
+    return list;
+  }
 }
diff --git a/runtime/lib/byte_array.cc b/runtime/lib/byte_array.cc
index 06efeee..2f61030 100644
--- a/runtime/lib/byte_array.cc
+++ b/runtime/lib/byte_array.cc
@@ -44,14 +44,14 @@
 
 
 #define GETTER_ARGUMENTS(ArrayT, ValueT)                                \
-  GET_NATIVE_ARGUMENT(ArrayT, array, arguments->At(0));                 \
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));
+  GET_NATIVE_ARGUMENT(ArrayT, array, arguments->NativeArgAt(0));        \
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
 
 
 #define SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT)                       \
-  GET_NATIVE_ARGUMENT(ArrayT, array, arguments->At(0));                 \
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));                    \
-  GET_NATIVE_ARGUMENT(ObjectT, value_object, arguments->At(2));
+  GET_NATIVE_ARGUMENT(ArrayT, array, arguments->NativeArgAt(0));        \
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));           \
+  GET_NATIVE_ARGUMENT(ObjectT, value_object, arguments->NativeArgAt(2));
 
 
 #define GETTER(ArrayT, ObjectT, ValueT)                                 \
@@ -147,7 +147,7 @@
 
 
 DEFINE_NATIVE_ENTRY(ByteArray_getLength, 1) {
-  GET_NATIVE_ARGUMENT(ByteArray, array, arguments->At(0));
+  GET_NATIVE_ARGUMENT(ByteArray, array, arguments->NativeArgAt(0));
   return Smi::New(array.Length());
 }
 
@@ -253,11 +253,11 @@
 
 
 DEFINE_NATIVE_ENTRY(ByteArray_setRange, 5) {
-  ByteArray& dst = ByteArray::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(2));
-  GET_NATIVE_ARGUMENT(ByteArray, src, arguments->At(3));
-  GET_NATIVE_ARGUMENT(Smi, src_start, arguments->At(4));
+  ByteArray& dst = ByteArray::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(2));
+  GET_NATIVE_ARGUMENT(ByteArray, src, arguments->NativeArgAt(3));
+  GET_NATIVE_ARGUMENT(Smi, src_start, arguments->NativeArgAt(4));
   intptr_t length_value = length.Value();
   intptr_t src_start_value = src_start.Value();
   intptr_t dst_start_value = dst_start.Value();
@@ -278,7 +278,7 @@
 // Int8Array
 
 DEFINE_NATIVE_ENTRY(Int8Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Int8Array::kMaxElements);
   return Int8Array::New(len);
@@ -298,7 +298,7 @@
 // Uint8Array
 
 DEFINE_NATIVE_ENTRY(Uint8Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Uint8Array::kMaxElements);
   return Uint8Array::New(len);
@@ -318,7 +318,7 @@
 // Int16Array
 
 DEFINE_NATIVE_ENTRY(Int16Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Int16Array::kMaxElements);
   return Int16Array::New(len);
@@ -338,7 +338,7 @@
 // Uint16Array
 
 DEFINE_NATIVE_ENTRY(Uint16Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Uint16Array::kMaxElements);
   return Uint16Array::New(len);
@@ -358,7 +358,7 @@
 // Int32Array
 
 DEFINE_NATIVE_ENTRY(Int32Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Int32Array::kMaxElements);
   return Int32Array::New(len);
@@ -378,7 +378,7 @@
 // Uint32Array
 
 DEFINE_NATIVE_ENTRY(Uint32Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Uint32Array::kMaxElements);
   return Uint32Array::New(len);
@@ -398,7 +398,7 @@
 // Int64Array
 
 DEFINE_NATIVE_ENTRY(Int64Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Int64Array::kMaxElements);
   return Int64Array::New(len);
@@ -418,7 +418,7 @@
 // Uint64Array
 
 DEFINE_NATIVE_ENTRY(Uint64Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Uint64Array::kMaxElements);
   return Uint64Array::New(len);
@@ -438,7 +438,7 @@
 // Float32Array
 
 DEFINE_NATIVE_ENTRY(Float32Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Float32Array::kMaxElements);
   return Float32Array::New(len);
@@ -458,7 +458,7 @@
 // Float64Array
 
 DEFINE_NATIVE_ENTRY(Float64Array_new, 1) {
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
   intptr_t len = length.Value();
   LengthCheck(len, Float64Array::kMaxElements);
   return Float64Array::New(len);
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index a455050..0f97c3d 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -136,8 +136,8 @@
     return Collections.map(this, new List(), f);
   }
 
-  Dynamic reduce(Dynamic initialValue,
-                 Dynamic combine(Dynamic initialValue, element)) {
+  dynamic reduce(dynamic initialValue,
+                 dynamic combine(dynamic initialValue, element)) {
     return Collections.reduce(this, initialValue, combine);
   }
 
@@ -154,7 +154,7 @@
   }
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   int get length {
@@ -184,7 +184,7 @@
   }
 
   void sort([Comparator compare = Comparable.compare]) {
-    coreSort(this, compare);
+    _Sort.sort(this, compare);
   }
 
   int indexOf(element, [int start = 0]) {
@@ -192,7 +192,7 @@
   }
 
   int lastIndexOf(element, [int start = null]) {
-    if (start === null) start = length - 1;
+    if (start == null) start = length - 1;
     return Arrays.lastIndexOf(this, element, start);
   }
 
@@ -221,7 +221,7 @@
   }
 
   ByteArray asByteArray([int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = this.length;
     }
     _rangeCheck(this.length, start, length);
@@ -331,7 +331,7 @@
   if (object is int) {
     return object;
   }
-  if (object === null) {
+  if (object == null) {
     return _requireInteger(value);
   }
   throw new ArgumentError("$object is not an integer or null");
@@ -344,7 +344,7 @@
   }
 
   factory _Int8Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = array.lengthInBytes();
     }
     return new _Int8ArrayView(array, start, length);
@@ -407,7 +407,7 @@
   }
 
   factory _Uint8Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = array.lengthInBytes();
     }
     return new _Uint8ArrayView(array, start, length);
@@ -470,7 +470,7 @@
   }
 
   factory _Int16Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Int16ArrayView(array, start, length);
@@ -533,7 +533,7 @@
   }
 
   factory _Uint16Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Uint16ArrayView(array, start, length);
@@ -596,7 +596,7 @@
   }
 
   factory _Int32Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Int32ArrayView(array, start, length);
@@ -659,7 +659,7 @@
   }
 
   factory _Uint32Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Uint32ArrayView(array, start, length);
@@ -722,7 +722,7 @@
   }
 
   factory _Int64Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Int64ArrayView(array, start, length);
@@ -785,7 +785,7 @@
   }
 
   factory _Uint64Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Uint64ArrayView(array, start, length);
@@ -848,7 +848,7 @@
   }
 
   factory _Float32Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Float32ArrayView(array, start, length);
@@ -911,7 +911,7 @@
   }
 
   factory _Float64Array.view(ByteArray array, [int start = 0, int length]) {
-    if (length === null) {
+    if (length == null) {
       length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
     }
     return new _Float64ArrayView(array, start, length);
@@ -1516,7 +1516,7 @@
 
   ByteArray subByteArray([int start = 0, int length]) {
     if (start is! int) throw new ArgumentError("start is not an int");
-    if (length === null) {
+    if (length == null) {
       length = this.lengthInBytes() - start;
     } else if (length is! int) {
       throw new ArgumentError("length is not an int");
@@ -1616,8 +1616,8 @@
     return Collections.map(this, new List(), f);
   }
 
-  Dynamic reduce(Dynamic initialValue,
-                 Dynamic combine(Dynamic initialValue, element)) {
+  dynamic reduce(dynamic initialValue,
+                 dynamic combine(dynamic initialValue, element)) {
     return Collections.reduce(this, initialValue, combine);
   }
 
@@ -1634,7 +1634,7 @@
   }
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   abstract int get length;
@@ -1662,7 +1662,7 @@
   }
 
   void sort([Comparator compare = Comparable.compare]) {
-    coreSort(this, compare);
+    _Sort.sort(this, compare);
   }
 
   int indexOf(element, [int start = 0]) {
@@ -1670,7 +1670,7 @@
   }
 
   int lastIndexOf(element, [int start = null]) {
-    if (start === null) start = length - 1;
+    if (start == null) start = length - 1;
     return Arrays.lastIndexOf(this, element, start);
   }
 
diff --git a/runtime/lib/crypto/crypto_vm.dart b/runtime/lib/crypto/crypto_vm.dart
index 8ad06e2..a542984 100644
--- a/runtime/lib/crypto/crypto_vm.dart
+++ b/runtime/lib/crypto/crypto_vm.dart
@@ -5,9 +5,9 @@
 // TODO(ager, iposva): Get rid of this file when the VM snapshot
 // generation can deal with normal library structure.
 
-#library('crypto');
+library crypto;
 
-#import('dart:math');
+import 'dart:math';
 
 /**
  * Interface for cryptographic hash functions.
@@ -22,7 +22,7 @@
  * If multiple instances of a given Hash is needed the [newInstance]
  * method can provide a new instance.
  */
-interface Hash {
+abstract class Hash {
   /**
    * Add a list of bytes to the hash computation.
    */
@@ -48,15 +48,15 @@
 /**
  * SHA1 hash function implementation.
  */
-interface SHA1 extends Hash default _SHA1 {
-  SHA1();
+abstract class SHA1 implements Hash {
+  factory SHA1() => new _SHA1();
 }
 
 /**
  * SHA256 hash function implementation.
  */
-interface SHA256 extends Hash default _SHA256 {
-  SHA256();
+abstract class SHA256 implements Hash {
+  factory SHA256() => new _SHA256();
 }
 
 /**
@@ -65,8 +65,8 @@
  * WARNING: MD5 has known collisions and should only be used when
  * required for backwards compatibility.
  */
-interface MD5 extends Hash default _MD5 {
-  MD5();
+abstract class MD5 implements Hash {
+  factory MD5() => new _MD5();
 }
 
 /**
@@ -75,11 +75,11 @@
  * The [update] method is used to add data to the message. The [digest] method
  * is used to extract the message authentication code.
  */
-interface HMAC default _HMAC {
+abstract class HMAC {
   /**
    * Create an [HMAC] object from a [Hash] and a key.
    */
-  HMAC(Hash hash, List<int> key);
+  factory HMAC(Hash hash, List<int> key) => new _HMAC(hash, key);
 
   /**
    * Add a list of bytes to the message.
@@ -96,7 +96,7 @@
 /**
  * Utility methods for working with message digests.
  */
-class CryptoUtils {
+abstract class CryptoUtils {
   /**
    * Convert a list of bytes (for example a message digest) into a hex
    * string.
diff --git a/runtime/lib/date.cc b/runtime/lib/date.cc
index 6725986..7bd1a72 100644
--- a/runtime/lib/date.cc
+++ b/runtime/lib/date.cc
@@ -16,7 +16,7 @@
 static int32_t kMaxAllowedSeconds = 2100000000;
 
 DEFINE_NATIVE_ENTRY(DateNatives_timeZoneName, 1) {
-  GET_NATIVE_ARGUMENT(Integer, dart_seconds, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Integer, dart_seconds, arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
   if (seconds < 0 || seconds > kMaxAllowedSeconds) {
     GrowableArray<const Object*> args;
@@ -29,7 +29,7 @@
 
 
 DEFINE_NATIVE_ENTRY(DateNatives_timeZoneOffsetInSeconds, 1) {
-  GET_NATIVE_ARGUMENT(Integer, dart_seconds, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Integer, dart_seconds, arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
   if (seconds < 0 || seconds > kMaxAllowedSeconds) {
     GrowableArray<const Object*> args;
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 8e2b8cc..349245e 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -16,8 +16,8 @@
       : this.isUtc = isUtc,
         this.millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch(
             year, month, day, hour, minute, second, millisecond, isUtc) {
-    if (millisecondsSinceEpoch === null) throw new ArgumentError();
-    if (isUtc === null) throw new ArgumentError();
+    if (millisecondsSinceEpoch == null) throw new ArgumentError();
+    if (isUtc == null) throw new ArgumentError();
   }
 
   /* patch */ _DateImpl.now()
diff --git a/runtime/lib/double.cc b/runtime/lib/double.cc
index 9cbb195..05977ba 100644
--- a/runtime/lib/double.cc
+++ b/runtime/lib/double.cc
@@ -17,8 +17,9 @@
 DECLARE_FLAG(bool, trace_intrinsified_natives);
 
 DEFINE_NATIVE_ENTRY(Double_doubleFromInteger, 2) {
-  ASSERT(AbstractTypeArguments::CheckedHandle(arguments->At(0)).IsNull());
-  const Integer& value = Integer::CheckedHandle(arguments->At(1));
+  ASSERT(AbstractTypeArguments::CheckedHandle(
+      arguments->NativeArgAt(0)).IsNull());
+  const Integer& value = Integer::CheckedHandle(arguments->NativeArgAt(1));
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_doubleFromInteger %s\n", value.ToCString());
   }
@@ -27,8 +28,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_add, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_add %f + %f\n", left, right);
@@ -38,8 +39,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_sub, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_sub %f - %f\n", left, right);
@@ -49,8 +50,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_mul, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_mul %f * %f\n", left, right);
@@ -60,8 +61,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_div, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_div %f / %f\n", left, right);
@@ -71,8 +72,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_trunc_div, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_trunc_div %f ~/ %f\n", left, right);
@@ -82,8 +83,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_modulo, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   double remainder = fmod(left, right);
   if (remainder == 0.0) {
@@ -101,16 +102,16 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_remainder, 2) {
-  double left = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1));
+  double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   return Double::New(fmod(left, right));
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_greaterThan, 2) {
-  const Double& left = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Double, right, arguments->At(1));
+  const Double& left = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Double, right, arguments->NativeArgAt(1));
   bool result = right.IsNull() ? false : (left.value() > right.value());
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_greaterThan %s > %s\n",
@@ -121,15 +122,15 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_greaterThanFromInteger, 2) {
-  const Double& right = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left, arguments->At(1));
+  const Double& right = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   return Bool::Get(left.AsDoubleValue() > right.value());
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_equal, 2) {
-  const Double& left = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Double, right, arguments->At(1));
+  const Double& left = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Double, right, arguments->NativeArgAt(1));
   bool result = right.IsNull() ? false : (left.value() == right.value());
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Double_equal %s == %s\n",
@@ -140,37 +141,38 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_equalToInteger, 2) {
-  const Double& left = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, right, arguments->At(1));
+  const Double& left = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, right, arguments->NativeArgAt(1));
   return Bool::Get(left.value() == right.AsDoubleValue());
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_round, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Double::New(round(arg.value()));
 }
 
 DEFINE_NATIVE_ENTRY(Double_floor, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Double::New(floor(arg.value()));
 }
 
 DEFINE_NATIVE_ENTRY(Double_ceil, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Double::New(ceil(arg.value()));
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_truncate, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Double::New(trunc(arg.value()));
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_pow, 2) {
-  const double operand = Double::CheckedHandle(arguments->At(0)).value();
-  GET_NATIVE_ARGUMENT(Double, exponent_object, arguments->At(1));
+  const double operand =
+      Double::CheckedHandle(arguments->NativeArgAt(0)).value();
+  GET_NATIVE_ARGUMENT(Double, exponent_object, arguments->NativeArgAt(1));
   const double exponent = exponent_object.value();
   return Double::New(pow(operand, exponent));
 }
@@ -182,7 +184,7 @@
 #endif
 
 DEFINE_NATIVE_ENTRY(Double_toInt, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   if (isinf(arg.value()) || isnan(arg.value())) {
     GrowableArray<const Object*> args;
     args.Add(&String::ZoneHandle(String::New(
@@ -205,8 +207,8 @@
   static const double kLowerBoundary = -1e21;
   static const double kUpperBoundary = 1e21;
 
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, fraction_digits, arguments->At(1));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, fraction_digits, arguments->NativeArgAt(1));
   double d = arg.value();
   intptr_t fraction_digits_value = fraction_digits.Value();
   if (0 <= fraction_digits_value && fraction_digits_value <= 20
@@ -223,8 +225,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_toStringAsExponential, 2) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, fraction_digits, arguments->At(1));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, fraction_digits, arguments->NativeArgAt(1));
   double d = arg.value();
   intptr_t fraction_digits_value = fraction_digits.Value();
   if (-1 <= fraction_digits_value && fraction_digits_value <= 20) {
@@ -241,8 +243,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_toStringAsPrecision, 2) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, precision, arguments->At(1));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, precision, arguments->NativeArgAt(1));
   double d = arg.value();
   intptr_t precision_value = precision.Value();
   if (1 <= precision_value && precision_value <= 21) {
@@ -258,19 +260,19 @@
 
 
 DEFINE_NATIVE_ENTRY(Double_getIsInfinite, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Bool::Get(isinf(arg.value()));
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_getIsNaN, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   return Bool::Get(isnan(arg.value()));
 }
 
 
 DEFINE_NATIVE_ENTRY(Double_getIsNegative, 1) {
-  const Double& arg = Double::CheckedHandle(arguments->At(0));
+  const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0));
   // Include negative zero, infinity.
   return Bool::Get(signbit(arg.value()) && !isnan(arg.value()));
 }
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 75de3c1..f4025f3 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -157,7 +157,7 @@
     // look at the fractionDigits first.
 
     // Step 7.
-    if (fractionDigits !== null &&
+    if (fractionDigits != null &&
         (fractionDigits < 0 || fractionDigits > 20)) {
       // TODO(antonm): should be proper RangeError or Dart counterpart.
       throw "Range error";
@@ -169,7 +169,7 @@
 
     // The dart function prints the shortest representation when fractionDigits
     // equals null. The native function wants -1 instead.
-    fractionDigits = (fractionDigits === null) ? -1 : fractionDigits;
+    fractionDigits = (fractionDigits == null) ? -1 : fractionDigits;
 
     return _toStringAsExponential(fractionDigits);
   }
diff --git a/runtime/lib/error.cc b/runtime/lib/error.cc
index febd6a0..247b555 100644
--- a/runtime/lib/error.cc
+++ b/runtime/lib/error.cc
@@ -21,8 +21,10 @@
 DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 2) {
   // No need to type check the arguments. This function can only be called
   // internally from the VM.
-  intptr_t assertion_start = Smi::CheckedHandle(arguments->At(0)).Value();
-  intptr_t assertion_end = Smi::CheckedHandle(arguments->At(1)).Value();
+  intptr_t assertion_start =
+      Smi::CheckedHandle(arguments->NativeArgAt(0)).Value();
+  intptr_t assertion_end =
+      Smi::CheckedHandle(arguments->NativeArgAt(1)).Value();
 
   // Allocate a new instance of type AssertionError.
   const Instance& assertion_error = Instance::Handle(
@@ -60,11 +62,13 @@
 DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) {
   // No need to type check the arguments. This function can only be called
   // internally from the VM.
-  intptr_t location = Smi::CheckedHandle(arguments->At(0)).Value();
-  const Instance& src_value = Instance::CheckedHandle(arguments->At(1));
-  const String& dst_type_name = String::CheckedHandle(arguments->At(2));
-  const String& dst_name = String::CheckedHandle(arguments->At(3));
-  const String& type_error = String::CheckedHandle(arguments->At(4));
+  intptr_t location = Smi::CheckedHandle(arguments->NativeArgAt(0)).Value();
+  const Instance& src_value =
+      Instance::CheckedHandle(arguments->NativeArgAt(1));
+  const String& dst_type_name =
+      String::CheckedHandle(arguments->NativeArgAt(2));
+  const String& dst_name = String::CheckedHandle(arguments->NativeArgAt(3));
+  const String& type_error = String::CheckedHandle(arguments->NativeArgAt(4));
   const String& src_type_name =
       String::Handle(Type::Handle(src_value.GetType()).UserVisibleName());
   Exceptions::CreateAndThrowTypeError(location, src_type_name,
@@ -78,7 +82,7 @@
 // Arg0: index of the case clause token into which we fall through.
 // Return value: none, throws an exception.
 DEFINE_NATIVE_ENTRY(FallThroughError_throwNew, 1) {
-  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
   intptr_t fallthrough_pos = smi_pos.Value();
 
   // Allocate a new instance of type FallThroughError.
@@ -110,8 +114,8 @@
 // Arg1: class name of the abstract class that cannot be instantiated.
 // Return value: none, throws an exception.
 DEFINE_NATIVE_ENTRY(AbstractClassInstantiationError_throwNew, 2) {
-  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->At(0));
-  GET_NATIVE_ARGUMENT(String, class_name, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(String, class_name, arguments->NativeArgAt(1));
   intptr_t error_pos = smi_pos.Value();
 
   // Allocate a new instance of type AbstractClassInstantiationError.
@@ -142,8 +146,8 @@
 // Arg1: name of the method that was not resolved at compile time.
 // Return value: none, throws an exception.
 DEFINE_NATIVE_ENTRY(NoSuchMethodError_throwNew, 2) {
-  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->At(0));
-  GET_NATIVE_ARGUMENT(String, function_name, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(String, function_name, arguments->NativeArgAt(1));
   intptr_t call_pos = smi_pos.Value();
   // Allocate a new instance of type NoSuchMethodError.
   const Instance& error = Instance::Handle(
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index 06fb46b..a218af6 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -15,13 +15,13 @@
         result = _data[i].value;
         break;
       }
-      if (key === null) {
+      if (key == null) {
         doCompact = true;
         _data[i] = null;
       }
     }
     if (doCompact) {
-      _data = _data.filter((e) => (e !== null));
+      _data = _data.filter((e) => (e != null));
     }
     return result;
   }
@@ -35,12 +35,12 @@
       if (key === object) {
         break;
       }
-      if (key === null) {
+      if (key == null) {
         doCompact = true;
         _data[i] = null;
       }
     }
-    if (i !== _data.length && value === null) {
+    if (i !== _data.length && value == null) {
       doCompact = true;
       _data[i] = null;
     } else if (i !== _data.length) {
@@ -49,12 +49,12 @@
       _data.add(new _WeakProperty(object, value));
     }
     if (doCompact) {
-      _data = _data.filter((e) => (e !== null));
+      _data = _data.filter((e) => (e != null));
     }
   }
 
   static _checkType(object) {
-    if (object === null) {
+    if (object == null) {
       throw new NullPointerException();
     }
     if (object is bool || object is num || object is String) {
diff --git a/runtime/lib/function_patch.dart b/runtime/lib/function_patch.dart
index a82084e..581449b 100644
--- a/runtime/lib/function_patch.dart
+++ b/runtime/lib/function_patch.dart
@@ -5,7 +5,7 @@
 patch class Function {
   /* patch */ static apply(Function function,
                            List positionalArguments,
-                           [Map<String,Dynamic> namedArguments]) {
+                           [Map<String,dynamic> namedArguments]) {
     throw new UnimplementedError('Function.apply not implemented');
   }
 }
diff --git a/runtime/lib/growable_array.cc b/runtime/lib/growable_array.cc
index c3b6f5e..6168d75 100644
--- a/runtime/lib/growable_array.cc
+++ b/runtime/lib/growable_array.cc
@@ -14,10 +14,10 @@
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_allocate, 2) {
   const AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments->At(0));
+      AbstractTypeArguments::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(type_arguments.IsNull() ||
          (type_arguments.IsInstantiated() && (type_arguments.Length() == 1)));
-  GET_NATIVE_ARGUMENT(Array, data, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Array, data, arguments->NativeArgAt(1));
   if ((data.Length() <= 0)) {
     const Integer& index = Integer::Handle(Integer::New(data.Length()));
     GrowableArray<const Object*> args;
@@ -33,8 +33,8 @@
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_getIndexed, 2) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
   if ((index.Value() < 0) || (index.Value() >= array.Length())) {
     GrowableArray<const Object*> args;
     args.Add(&index);
@@ -47,14 +47,14 @@
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_setIndexed, 3) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, index, arguments->At(1));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
   if ((index.Value() < 0) || (index.Value() >= array.Length())) {
     GrowableArray<const Object*> args;
     args.Add(&index);
     Exceptions::ThrowByType(Exceptions::kRange, args);
   }
-  GET_NATIVE_ARGUMENT(Instance, value, arguments->At(2));
+  GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(2));
   array.SetAt(index.Value(), value);
   return Object::null();
 }
@@ -62,22 +62,22 @@
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_getLength, 1) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
   return Smi::New(array.Length());
 }
 
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_getCapacity, 1) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
   return Smi::New(array.Capacity());
 }
 
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_setLength, 2) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, length, arguments->At(1));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));
   if ((length.Value() < 0) || (length.Value() > array.Capacity())) {
     GrowableArray<const Object*> args;
     args.Add(&length);
@@ -90,8 +90,8 @@
 
 DEFINE_NATIVE_ENTRY(GrowableObjectArray_setData, 2) {
   const GrowableObjectArray& array =
-      GrowableObjectArray::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Array, data, arguments->At(1));
+      GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Array, data, arguments->NativeArgAt(1));
   ASSERT(data.Length() > 0);
   array.SetData(data);
   return Object::null();
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index a8462a3..a34bca0 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -154,7 +154,7 @@
   }
 
   int lastIndexOf(T element, [int start = null]) {
-    if (start === null) start = length - 1;
+    if (start == null) start = length - 1;
     return Arrays.lastIndexOf(this, element, start);
   }
 
@@ -200,7 +200,7 @@
   }
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   void clear() {
@@ -208,7 +208,7 @@
   }
 
   void sort([Comparator<T> compare = Comparable.compare]) {
-    coreSort(this, compare);
+    _Sort.sort(this, compare);
   }
 
   String toString() {
diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart
index d7756e0..aa33a6d 100644
--- a/runtime/lib/immutable_map.dart
+++ b/runtime/lib/immutable_map.dart
@@ -22,7 +22,7 @@
   }
 
   bool get isEmpty {
-    return kvPairs_.length === 0;
+    return kvPairs_.length == 0;
   }
 
   int get length {
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index d831c16..c9cf18d 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -36,8 +36,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_bitAndFromInteger, 2) {
-  const Integer& right = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left, arguments->At(1));
+  const Integer& right = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right));
   ASSERT(CheckInteger(left));
   if (FLAG_trace_intrinsified_natives) {
@@ -51,8 +51,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_bitOrFromInteger, 2) {
-  const Integer& right = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left, arguments->At(1));
+  const Integer& right = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right));
   ASSERT(CheckInteger(left));
   if (FLAG_trace_intrinsified_natives) {
@@ -66,8 +66,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_bitXorFromInteger, 2) {
-  const Integer& right = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left, arguments->At(1));
+  const Integer& right = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right));
   ASSERT(CheckInteger(left));
   if (FLAG_trace_intrinsified_natives) {
@@ -81,8 +81,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_addFromInteger, 2) {
-  const Integer& right_int = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->At(1));
+  const Integer& right_int = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right_int));
   ASSERT(CheckInteger(left_int));
   if (FLAG_trace_intrinsified_natives) {
@@ -94,8 +94,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_subFromInteger, 2) {
-  const Integer& right_int = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->At(1));
+  const Integer& right_int = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right_int));
   ASSERT(CheckInteger(left_int));
   if (FLAG_trace_intrinsified_natives) {
@@ -107,8 +107,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_mulFromInteger, 2) {
-  const Integer& right_int = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->At(1));
+  const Integer& right_int = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right_int));
   ASSERT(CheckInteger(left_int));
   if (FLAG_trace_intrinsified_natives) {
@@ -120,8 +120,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_truncDivFromInteger, 2) {
-  const Integer& right_int = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->At(1));
+  const Integer& right_int = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right_int));
   ASSERT(CheckInteger(left_int));
   ASSERT(!right_int.IsZero());
@@ -130,8 +130,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_moduloFromInteger, 2) {
-  const Integer& right_int = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->At(1));
+  const Integer& right_int = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right_int));
   ASSERT(CheckInteger(right_int));
   if (FLAG_trace_intrinsified_natives) {
@@ -147,8 +147,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_greaterThanFromInteger, 2) {
-  const Integer& right = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, left, arguments->At(1));
+  const Integer& right = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(right));
   ASSERT(CheckInteger(left));
   if (FLAG_trace_intrinsified_natives) {
@@ -160,8 +160,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Integer_equalToInteger, 2) {
-  const Integer& left = Integer::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, right, arguments->At(1));
+  const Integer& left = Integer::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, right, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(left));
   ASSERT(CheckInteger(right));
   if (FLAG_trace_intrinsified_natives) {
@@ -219,8 +219,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Smi_shrFromInt, 2) {
-  const Smi& amount = Smi::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, value, arguments->At(1));
+  const Smi& amount = Smi::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, value, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(amount));
   ASSERT(CheckInteger(value));
   Integer& result = Integer::Handle(
@@ -231,8 +231,8 @@
 
 
 DEFINE_NATIVE_ENTRY(Smi_shlFromInt, 2) {
-  const Smi& amount = Smi::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, value, arguments->At(1));
+  const Smi& amount = Smi::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, value, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(amount));
   ASSERT(CheckInteger(value));
   if (FLAG_trace_intrinsified_natives) {
@@ -246,7 +246,7 @@
 
 
 DEFINE_NATIVE_ENTRY(Smi_bitNegate, 1) {
-  const Smi& operand = Smi::CheckedHandle(arguments->At(0));
+  const Smi& operand = Smi::CheckedHandle(arguments->NativeArgAt(0));
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Smi_bitNegate: %s\n", operand.ToCString());
   }
@@ -258,7 +258,7 @@
 // Mint natives.
 
 DEFINE_NATIVE_ENTRY(Mint_bitNegate, 1) {
-  const Mint& operand = Mint::CheckedHandle(arguments->At(0));
+  const Mint& operand = Mint::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(CheckInteger(operand));
   if (FLAG_trace_intrinsified_natives) {
     OS::Print("Mint_bitNegate: %s\n", operand.ToCString());
@@ -270,7 +270,7 @@
 // Bigint natives.
 
 DEFINE_NATIVE_ENTRY(Bigint_bitNegate, 1) {
-  const Bigint& value = Bigint::CheckedHandle(arguments->At(0));
+  const Bigint& value = Bigint::CheckedHandle(arguments->NativeArgAt(0));
   const Bigint& result = Bigint::Handle(BigintOperations::BitNot(value));
   ASSERT(CheckInteger(value));
   ASSERT(CheckInteger(result));
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index 2fdef36..7219bda 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -113,7 +113,8 @@
 
 
 DEFINE_NATIVE_ENTRY(ReceivePortImpl_factory, 1) {
-  ASSERT(AbstractTypeArguments::CheckedHandle(arguments->At(0)).IsNull());
+  ASSERT(AbstractTypeArguments::CheckedHandle(
+      arguments->NativeArgAt(0)).IsNull());
   intptr_t port_id =
       PortMap::CreatePort(arguments->isolate()->message_handler());
   const Object& port = Object::Handle(ReceivePortCreate(port_id));
@@ -125,17 +126,17 @@
 
 
 DEFINE_NATIVE_ENTRY(ReceivePortImpl_closeInternal, 1) {
-  GET_NATIVE_ARGUMENT(Smi, id, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Smi, id, arguments->NativeArgAt(0));
   PortMap::ClosePort(id.Value());
   return Object::null();
 }
 
 
 DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 3) {
-  GET_NATIVE_ARGUMENT(Smi, send_id, arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, reply_id, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Smi, send_id, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, reply_id, arguments->NativeArgAt(1));
   // TODO(iposva): Allow for arbitrary messages to be sent.
-  GET_NATIVE_ARGUMENT(Instance, obj, arguments->At(2));
+  GET_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(2));
 
   uint8_t* data = NULL;
   MessageWriter writer(&data, &allocator);
@@ -398,7 +399,7 @@
 
 
 DEFINE_NATIVE_ENTRY(isolate_spawnFunction, 1) {
-  GET_NATIVE_ARGUMENT(Instance, closure, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(0));
   bool throw_exception = false;
   Function& func = Function::Handle();
   if (closure.IsClosure()) {
@@ -427,7 +428,7 @@
 
 
 DEFINE_NATIVE_ENTRY(isolate_spawnUri, 1) {
-  GET_NATIVE_ARGUMENT(String, uri, arguments->At(0));
+  GET_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(0));
 
   // Canonicalize the uri with respect to the current isolate.
   char* error = NULL;
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 595beae..451b219 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.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.
 
-patch class _ReceivePortFactory {
+patch class ReceivePort {
   /* patch */ factory ReceivePort() {
     return new _ReceivePortImpl();
   }
@@ -27,16 +27,16 @@
   /**** Internal implementation details ****/
   // Called from the VM to create a new ReceivePort instance.
   static _ReceivePortImpl _get_or_create(int id) {
-    if (_portMap !== null) {
+    if (_portMap != null) {
       _ReceivePortImpl port = _portMap[id];
-      if (port !== null) {
+      if (port != null) {
         return port;
       }
     }
     return new _ReceivePortImpl._internal(id);
   }
   _ReceivePortImpl._internal(int id) : _id = id {
-    if (_portMap === null) {
+    if (_portMap == null) {
       _portMap = new Map();
     }
     _portMap[id] = this;
@@ -44,7 +44,7 @@
 
   // Called from the VM to dispatch to the handler.
   static void _handleMessage(int id, int replyId, var message) {
-    assert(_portMap !== null);
+    assert(_portMap != null);
     ReceivePort port = _portMap[id];
     SendPort replyTo = (replyId == 0) ? null : new _SendPortImpl(replyId);
     (port._onMessage)(message, replyTo);
@@ -68,7 +68,7 @@
   }
 
   void _sendNow(var message, SendPort replyTo) {
-    int replyId = (replyTo === null) ? 0 : replyTo._id;
+    int replyId = (replyTo == null) ? 0 : replyTo._id;
     _sendInternal(_id, replyId, message);
   }
 
@@ -117,7 +117,7 @@
 ReceivePort _portInternal;
 
 patch ReceivePort get port {
-  if (_portInternal === null) {
+  if (_portInternal == null) {
     _portInternal = _getPortInternal();
   }
   return _portInternal;
diff --git a/runtime/lib/lib_impl_sources.gypi b/runtime/lib/lib_impl_sources.gypi
deleted file mode 100644
index 9df2c1a..0000000
--- a/runtime/lib/lib_impl_sources.gypi
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
-# Implementation sources.
-
-{
-  'sources': [
-    'math.dart',
-    'math.cc',
-    'object.cc',
-    'regexp.cc',
-    'regexp_jsc.cc',
-    'regexp_jsc.h',
-    'regexp_patch.dart',
-  ],
-}
diff --git a/runtime/lib/lib_sources.gypi b/runtime/lib/lib_sources.gypi
index 3d3cf07..2bffa7e 100644
--- a/runtime/lib/lib_sources.gypi
+++ b/runtime/lib/lib_sources.gypi
@@ -27,15 +27,23 @@
     'integers.dart',
     'integers_patch.dart',
     'invocation_mirror_patch.dart',
-    'literal_factory.dart',
+    'map_patch.dart',
+    'math.dart',
+    'math.cc',
+    'object.cc',
     'object_patch.dart',
     'print_patch.dart',
+    'regexp.cc',
+    'regexp_jsc.cc',
+    'regexp_jsc.h',
+    'regexp_patch.dart',
     'stopwatch_patch.dart',
     'stopwatch.cc',
     'string.cc',
     'string_base.dart',
     'string_patch.dart',
     'type_patch.dart',
+    'string_patch.dart',
     'weak_property.dart',
     'weak_property.cc',
   ],
diff --git a/runtime/lib/literal_factory.dart b/runtime/lib/literal_factory.dart
deleted file mode 100644
index ba5d0a8..0000000
--- a/runtime/lib/literal_factory.dart
+++ /dev/null
@@ -1,37 +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.
-
-// Factory classes constructing mutable List and Map objects from parser
-// generated list and map literals.
-
-class _ListLiteralFactory<E> {
-  // [elements] contains elements that are already type checked.
-  factory List.fromLiteral(List elements) {
-    var list = new List<E>();
-    if (elements.length > 0) {
-      list._setData(elements);
-      list.length = elements.length;
-    }
-    return list;
-  }
-}
-
-// Factory class constructing mutable List and Map objects from parser generated
-// list and map literals.
-
-class _MapLiteralFactory<K, V> {
-  // [elements] contains n key-value pairs.
-  // The keys are at position 2*n and are already type checked by the parser
-  // in checked mode.
-  // The values are at position 2*n+1 and are not yet type checked.
-  factory Map.fromLiteral(List elements) {
-    var map = new LinkedHashMap<String, V>();
-    var len = elements.length;
-    for (int i = 1; i < len; i += 2) {
-      map[elements[i - 1]] = elements[i];
-    }
-    return map;
-  }
-}
-
diff --git a/runtime/lib/map_patch.dart b/runtime/lib/map_patch.dart
new file mode 100644
index 0000000..633b7ce
--- /dev/null
+++ b/runtime/lib/map_patch.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+patch class _HashMapImpl<K, V> {
+  // Factory constructing a Map from a parser generated Map literal.
+  // [elements] contains n key-value pairs.
+  // The keys are at position 2*n and are already type checked by the parser
+  // in checked mode.
+  // The values are at position 2*n+1 and are not yet type checked.
+  factory Map._fromLiteral(List elements) {
+    var map = new LinkedHashMap<String, V>();
+    var len = elements.length;
+    for (int i = 1; i < len; i += 2) {
+      map[elements[i - 1]] = elements[i];
+    }
+    return map;
+  }
+}
diff --git a/runtime/lib/math.cc b/runtime/lib/math.cc
index 80d37f4..de48b16 100644
--- a/runtime/lib/math.cc
+++ b/runtime/lib/math.cc
@@ -17,53 +17,53 @@
 namespace dart {
 
 DEFINE_NATIVE_ENTRY(MathNatives_sqrt, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(sqrt(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_sin, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(sin(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_cos, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(cos(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_tan, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(tan(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_asin, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(asin(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_acos, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(acos(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_atan, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(atan(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_atan2, 2) {
-  GET_NATIVE_ARGUMENT(Double, operand1, arguments->At(0));
-  GET_NATIVE_ARGUMENT(Double, operand2, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Double, operand1, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Double, operand2, arguments->NativeArgAt(1));
   return Double::New(atan2(operand1.value(), operand2.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_exp, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(exp(operand.value()));
 }
 
 DEFINE_NATIVE_ENTRY(MathNatives_log, 1) {
-  GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(log(operand.value()));
 }
 
@@ -103,7 +103,7 @@
 
 
 DEFINE_NATIVE_ENTRY(MathNatives_parseInt, 1) {
-  GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
+  GET_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
   const String& dummy_key = String::Handle(Symbols::Empty());
   Scanner scanner(value, dummy_key);
   const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
@@ -128,7 +128,7 @@
 
 
 DEFINE_NATIVE_ENTRY(MathNatives_parseDouble, 1) {
-  GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
+  GET_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
   const String& dummy_key = String::Handle(Symbols::Empty());
   Scanner scanner(value, dummy_key);
   const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index c7990b4..e075a25 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -20,7 +20,7 @@
 
 
 DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) {
-  GET_NATIVE_ARGUMENT(Instance, port, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Instance, port, arguments->NativeArgAt(0));
 
   // Get the port id from the SendPort instance.
   const Object& id_obj = Object::Handle(DartLibraryCalls::PortGetId(port));
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 969e1ae..8b57657 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -142,7 +142,7 @@
 
   Future<InstanceMirror> invoke(String memberName,
                                 List positionalArguments,
-                                [Map<String,Dynamic> namedArguments]) {
+                                [Map<String,dynamic> namedArguments]) {
     if (namedArguments != null) {
       throw new UnimplementedError(
           'named argument support is not implemented');
@@ -503,7 +503,7 @@
 
   Future<InstanceMirror> newInstance(String constructorName,
                                      List positionalArguments,
-                                     [Map<String,Dynamic> namedArguments]) {
+                                     [Map<String,dynamic> namedArguments]) {
     if (namedArguments != null) {
       throw new UnimplementedError(
           'named argument support is not implemented');
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index 24b4dfb..3d9ed92 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -11,16 +11,17 @@
 namespace dart {
 
 DEFINE_NATIVE_ENTRY(Object_toString, 1) {
-  const Instance& instance = Instance::CheckedHandle(arguments->At(0));
+  const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
   const char* c_str = instance.ToCString();
   return String::New(c_str);
 }
 
 
 DEFINE_NATIVE_ENTRY(Object_noSuchMethod, 3) {
-  const Instance& instance = Instance::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(String, function_name, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Array, func_args, arguments->At(2));
+  const Instance& instance =
+      Instance::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(String, function_name, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Array, func_args, arguments->NativeArgAt(2));
   if (instance.IsNull()) {
     GrowableArray<const Object*> args;
     args.Add(&function_name);
@@ -59,14 +60,15 @@
 
 
 DEFINE_NATIVE_ENTRY(Object_runtimeType, 1) {
-  const Instance& instance = Instance::CheckedHandle(arguments->At(0));
+  const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
   const Type& type = Type::Handle(instance.GetType());
   return type.Canonicalize();
 }
 
 
 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
-  const AbstractType& type = AbstractType::CheckedHandle(arguments->At(0));
+  const AbstractType& type =
+      AbstractType::CheckedHandle(arguments->NativeArgAt(0));
   return type.Name();
 }
 
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index f743982..00088b5 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -21,12 +21,13 @@
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_factory, 4) {
-  ASSERT(AbstractTypeArguments::CheckedHandle(arguments->At(0)).IsNull());
-  const Instance& arg1 = Instance::CheckedHandle(arguments->At(1));
+  ASSERT(AbstractTypeArguments::CheckedHandle(
+      arguments->NativeArgAt(0)).IsNull());
+  const Instance& arg1 = Instance::CheckedHandle(arguments->NativeArgAt(1));
   CheckAndThrowExceptionIfNull(arg1);
-  GET_NATIVE_ARGUMENT(String, pattern, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Instance, handle_multi_line, arguments->At(2));
-  GET_NATIVE_ARGUMENT(Instance, handle_ignore_case, arguments->At(3));
+  GET_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Instance, handle_multi_line, arguments->NativeArgAt(2));
+  GET_NATIVE_ARGUMENT(Instance, handle_ignore_case, arguments->NativeArgAt(3));
   bool ignore_case = handle_ignore_case.raw() == Bool::True();
   bool multi_line = handle_multi_line.raw() == Bool::True();
   return Jscre::Compile(pattern, multi_line, ignore_case);
@@ -34,28 +35,28 @@
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getPattern, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->At(0));
+  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return regexp.pattern();
 }
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_multiLine, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->At(0));
+  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(regexp.is_multi_line());
 }
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ignoreCase, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->At(0));
+  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(regexp.is_ignore_case());
 }
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getGroupCount, 1) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->At(0));
+  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   if (regexp.is_initialized()) {
     return regexp.num_bracket_expressions();
@@ -72,12 +73,12 @@
 
 
 DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ExecuteMatch, 3) {
-  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->At(0));
+  const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
-  const Instance& arg1 = Instance::CheckedHandle(arguments->At(1));
+  const Instance& arg1 = Instance::CheckedHandle(arguments->NativeArgAt(1));
   CheckAndThrowExceptionIfNull(arg1);
-  GET_NATIVE_ARGUMENT(String, str, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Smi, start_index, arguments->At(2));
+  GET_NATIVE_ARGUMENT(String, str, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2));
   return Jscre::Execute(regexp, str, start_index.Value());
 }
 
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart
index 115dd45..d6e830c 100644
--- a/runtime/lib/regexp_patch.dart
+++ b/runtime/lib/regexp_patch.dart
@@ -2,6 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+patch class RegExp {
+  /* patch */ factory RegExp(String pattern,
+                             {bool multiLine: false,
+                              bool ignoreCase: false}) {
+    return new _JSSyntaxRegExp(pattern,
+                               multiLine: multiLine,
+                               ignoreCase: ignoreCase);
+  }
+}
+
 class _JSRegExpMatch implements Match {
   _JSRegExpMatch(this.regexp, this.str, this._match);
 
@@ -26,8 +36,7 @@
       assert(endIndex == -1);
       return null;
     }
-    // TODO(ajohnsen): Use _substringUnchecked when regexp is in core.
-    return str.substring(startIndex, endIndex);
+    return str._substringUnchecked(startIndex, endIndex);
   }
 
   String operator [](int groupIdx) {
@@ -53,21 +62,21 @@
 }
 
 
-patch class JSSyntaxRegExp {
-  /* patch */ const factory JSSyntaxRegExp(
+class _JSSyntaxRegExp implements RegExp {
+  factory _JSSyntaxRegExp(
       String pattern,
       {bool multiLine: false,
        bool ignoreCase: false}) native "JSSyntaxRegExp_factory";
 
-  /* patch */ Match firstMatch(String str) {
+  Match firstMatch(String str) {
     List match = _ExecuteMatch(str, 0);
-    if (match === null) {
+    if (match == null) {
       return null;
     }
     return new _JSRegExpMatch(this, str, match);
   }
 
-  /* patch */ Iterable<Match> allMatches(String str) {
+  Iterable<Match> allMatches(String str) {
     List<Match> result = new List<Match>();
     int length = str.length;
     int startIndex = 0;
@@ -89,25 +98,24 @@
     return result;
   }
 
-  /* patch */ bool hasMatch(String str) {
+  bool hasMatch(String str) {
     List match = _ExecuteMatch(str, 0);
-    return (match === null) ? false : true;
+    return (match == null) ? false : true;
   }
 
-  /* patch */ String stringMatch(String str) {
+  String stringMatch(String str) {
     List match = _ExecuteMatch(str, 0);
-    if (match === null) {
+    if (match == null) {
       return null;
     }
-    // TODO(ajohnsen): Use _substringUnchecked when regexp is in core.
-    return str.substring(match[0], match[1]);
+    return str._substringUnchecked(match[0], match[1]);
   }
 
-  /* patch */ String get pattern native "JSSyntaxRegExp_getPattern";
+  String get pattern native "JSSyntaxRegExp_getPattern";
 
-  /* patch */ bool get multiLine native "JSSyntaxRegExp_multiLine";
+  bool get multiLine native "JSSyntaxRegExp_multiLine";
 
-  /* patch */ bool get ignoreCase native "JSSyntaxRegExp_ignoreCase";
+  bool get ignoreCase native "JSSyntaxRegExp_ignoreCase";
 
   int get _groupCount native "JSSyntaxRegExp_getGroupCount";
 
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index 7707ed6..76c097a 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -12,7 +12,7 @@
 namespace dart {
 
 DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 1) {
-  GET_NATIVE_ARGUMENT(Array, a, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Array, a, arguments->NativeArgAt(0));
   // TODO(srdjan): Check that parameterized type is an int.
   Zone* zone = isolate->current_zone();
   intptr_t array_len = a.Length();
@@ -51,9 +51,9 @@
 
 
 DEFINE_NATIVE_ENTRY(StringBase_substringUnchecked, 3) {
-  GET_NATIVE_ARGUMENT(String, receiver, arguments->At(0));
-  GET_NATIVE_ARGUMENT(Smi, start_obj, arguments->At(1));
-  GET_NATIVE_ARGUMENT(Smi, end_obj, arguments->At(2));
+  GET_NATIVE_ARGUMENT(String, receiver, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Smi, start_obj, arguments->NativeArgAt(1));
+  GET_NATIVE_ARGUMENT(Smi, end_obj, arguments->NativeArgAt(2));
 
   intptr_t start = start_obj.Value();
   intptr_t end = end_obj.Value();
@@ -62,7 +62,7 @@
 
 
 DEFINE_NATIVE_ENTRY(String_getHashCode, 1) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
   intptr_t hash_val = receiver.Hash();
   ASSERT(hash_val > 0);
   ASSERT(Smi::IsValid(hash_val));
@@ -71,7 +71,7 @@
 
 
 DEFINE_NATIVE_ENTRY(String_getLength, 1) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
   return Smi::New(receiver.Length());
 }
 
@@ -98,16 +98,17 @@
 
 
 DEFINE_NATIVE_ENTRY(String_charAt, 2) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, index, arguments->At(1));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
   uint32_t value = StringValueAt(receiver, index);
   ASSERT(value <= 0x10FFFF);
   return Symbols::New(&value, 1);
 }
 
 DEFINE_NATIVE_ENTRY(String_charCodeAt, 2) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(Integer, index, arguments->At(1));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
+
   int32_t value = StringValueAt(receiver, index);
   ASSERT(value >= 0);
   ASSERT(value <= 0x10FFFF);
@@ -116,28 +117,28 @@
 
 
 DEFINE_NATIVE_ENTRY(String_concat, 2) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
-  GET_NATIVE_ARGUMENT(String, b, arguments->At(1));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(String, b, arguments->NativeArgAt(1));
   return String::Concat(receiver, b);
 }
 
 
 DEFINE_NATIVE_ENTRY(String_toLowerCase, 1) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!receiver.IsNull());
   return String::ToLowerCase(receiver);
 }
 
 
 DEFINE_NATIVE_ENTRY(String_toUpperCase, 1) {
-  const String& receiver = String::CheckedHandle(arguments->At(0));
+  const String& receiver = String::CheckedHandle(arguments->NativeArgAt(0));
   ASSERT(!receiver.IsNull());
   return String::ToUpperCase(receiver);
 }
 
 
 DEFINE_NATIVE_ENTRY(Strings_concatAll, 1) {
-  GET_NATIVE_ARGUMENT(Array, strings, arguments->At(0));
+  GET_NATIVE_ARGUMENT(Array, strings, arguments->NativeArgAt(0));
   ASSERT(!strings.IsNull());
   // Check that the array contains strings.
   Instance& elem = Instance::Handle();
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index 11b594e..22e17b9 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -43,7 +43,7 @@
   int get length native "String_getLength";
 
   bool get isEmpty {
-    return this.length === 0;
+    return this.length == 0;
   }
 
   String concat(String other) native "String_concat";
@@ -61,7 +61,7 @@
       // TODO(5413632): Compare hash codes when both are present.
       return false;
     }
-    return this.compareTo(other) === 0;
+    return this.compareTo(other) == 0;
   }
 
   int compareTo(String other) {
@@ -141,7 +141,7 @@
   }
 
   String substring(int startIndex, [int endIndex]) {
-    if (endIndex === null) endIndex = this.length;
+    if (endIndex == null) endIndex = this.length;
 
     if ((startIndex < 0) || (startIndex > this.length)) {
       throw new RangeError.value(startIndex);
@@ -318,7 +318,7 @@
   // Implementations of Strings methods follow below.
   static String join(List<String> strings, String separator) {
     final int length = strings.length;
-    if (length === 0) {
+    if (length == 0) {
       return "";
     }
 
@@ -365,7 +365,7 @@
   // whitespaces for one byte strings.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 
@@ -383,7 +383,7 @@
   // whitespaces. Add checking for multi-byte whitespace codepoints.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 }
@@ -400,7 +400,7 @@
   // whitespaces. Add checking for multi-byte whitespace codepoints.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 }
@@ -417,14 +417,14 @@
   // whitespaces for one byte strings.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 }
 
 
 class _ExternalTwoByteString extends _StringBase implements String {
-  factory ExternalTwoByteString._uninstantiable() {
+  factory _ExternalTwoByteString._uninstantiable() {
     throw new UnsupportedError(
         "_ExternalTwoByteString can only be allocated by the VM");
   }
@@ -434,7 +434,7 @@
   // whitespaces. Add checking for multi-byte whitespace codepoints.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 }
@@ -451,7 +451,7 @@
   // whitespaces. Add checking for multi-byte whitespace codepoints.
   bool _isWhitespace(int codePoint) {
     return
-      (codePoint === 32) || // Space.
+      (codePoint == 32) || // Space.
       ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
   }
 }
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 2704c5f..df0393d 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -2,11 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-patch class _StringImpl {
+patch class String {
   /* patch */ factory String.fromCharCodes(List<int> charCodes) {
     return _StringBase.createFromCharCodes(charCodes);
   }
+}
 
+patch class Strings {
   /* patch */ static String join(List<String> strings, String separator) {
     return _StringBase.join(strings, separator);
   }
diff --git a/runtime/lib/utf/utf_vm.dart b/runtime/lib/utf/utf_vm.dart
index 0cd02b5..a3d8151 100644
--- a/runtime/lib/utf/utf_vm.dart
+++ b/runtime/lib/utf/utf_vm.dart
@@ -5,4 +5,4 @@
 // TODO(dgrove) - once the VM has a new way to include whole libraries,
 // remove this file and update runtime/bin/utf_sources.gypi .
 
-#library("utf");
+library utf;
diff --git a/runtime/lib/weak_property.cc b/runtime/lib/weak_property.cc
index 314ee0c..657b42c 100644
--- a/runtime/lib/weak_property.cc
+++ b/runtime/lib/weak_property.cc
@@ -11,8 +11,8 @@
 namespace dart {
 
 DEFINE_NATIVE_ENTRY(WeakProperty_new, 2) {
-  GET_NATIVE_ARGUMENT(Instance, key, arguments->At(0));
-  GET_NATIVE_ARGUMENT(Instance, value, arguments->At(1));
+  GET_NATIVE_ARGUMENT(Instance, key, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
   const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New());
   weak_property.set_key(key);
   weak_property.set_value(value);
@@ -21,20 +21,20 @@
 
 
 DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) {
-  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
+  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0));
   return weak_property.key();
 }
 
 
 DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) {
-  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
+  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0));
   return weak_property.value();
 }
 
 
 DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 2) {
-  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
-  GET_NATIVE_ARGUMENT(Instance, value, arguments->At(1));
+  GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0));
+  GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
   weak_property.set_value(value);
   return Object::null();
 }
diff --git a/runtime/platform/thread_macos.cc b/runtime/platform/thread_macos.cc
index a8401b3..71f025d 100644
--- a/runtime/platform/thread_macos.cc
+++ b/runtime/platform/thread_macos.cc
@@ -228,8 +228,9 @@
     VALIDATE_PTHREAD_RESULT(result);
   } else {
     struct timespec ts;
-    int64_t secs = millis / 1000;
-    int64_t nanos = (millis - (secs * 1000)) * 1000000;
+    int64_t secs = millis / kMillisecondsPerSecond;
+    int64_t nanos = (millis - (secs * kMillisecondsPerSecond)) *
+        kNanosecondsPerMillisecond;
     ts.tv_sec = secs;
     ts.tv_nsec = nanos;
     int result = pthread_cond_timedwait_relative_np(data_.cond(),
diff --git a/runtime/tests/vm/dart/byte_array_test.dart b/runtime/tests/vm/dart/byte_array_test.dart
index d148888..4499848 100644
--- a/runtime/tests/vm/dart/byte_array_test.dart
+++ b/runtime/tests/vm/dart/byte_array_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to be able to run in html test framework.
-#library("ByteArrayTest.dart");
+library byte_array_test;
 
-#import('dart:scalarlist');
+import 'dart:scalarlist';
 
 class ByteArrayTest {
   static testInt8List() {
diff --git a/runtime/tests/vm/dart/isolate_mirror_local_test.dart b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
index a34c4e2..821912b 100644
--- a/runtime/tests/vm/dart/isolate_mirror_local_test.dart
+++ b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
@@ -7,10 +7,10 @@
 //
 // VMOptions=--enable_type_checks
 
-#library('isolate_mirror_local_test');
+library isolate_mirror_local_test;
 
-#import('dart:isolate');
-#import('dart:mirrors');
+import 'dart:isolate';
+import 'dart:mirrors';
 
 ReceivePort exit_port;
 Set expectedTests;
@@ -317,7 +317,7 @@
   Expect.equals('dart:core.OutOfMemoryError', oom_cls.qualifiedName);
   Expect.isFalse(oom_cls.isPrivate);
   Expect.equals('Object', oom_cls.superclass.simpleName);
-  Expect.isTrue(oom_cls.defaultFactory === null);
+  Expect.isTrue(oom_cls.defaultFactory == null);
   Expect.equals('dart:core', oom_cls.owner.simpleName);
   Expect.isTrue(oom_cls.isClass);
   Expect.equals('Error', oom_cls.superinterfaces[0].simpleName);
@@ -423,7 +423,7 @@
   Expect.isTrue(cls is ClassMirror);
   Expect.equals('MyClass', cls.simpleName);
   Expect.equals('MySuperClass', cls.superclass.simpleName);
-  Expect.isTrue(cls.defaultFactory === null);
+  Expect.isTrue(cls.defaultFactory == null);
   Expect.equals('isolate_mirror_local_test', cls.owner.simpleName);
   Expect.isTrue(cls.isClass);
   Expect.equals('MyInterface', cls.superinterfaces[0].simpleName);
diff --git a/runtime/tests/vm/dart/isolate_mirror_remote_test.dart b/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
index 6bf6537..1be85fc 100644
--- a/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
+++ b/runtime/tests/vm/dart/isolate_mirror_remote_test.dart
@@ -5,10 +5,10 @@
 // Dart test program for checking implemention of MirrorSystem when
 // inspecting a remote isolate.
 
-#library('isolate_mirror_local_test');
+library isolate_mirror_local_test;
 
-#import('dart:isolate');
-#import('dart:mirrors');
+import 'dart:isolate';
+import 'dart:mirrors';
 
 void isolateMain() {
   port.receive(
diff --git a/runtime/tests/vm/test_config.dart b/runtime/tests/vm/test_config.dart
index e6e147b..394bb76 100644
--- a/runtime/tests/vm/test_config.dart
+++ b/runtime/tests/vm/test_config.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("vm_test_config");
+library vm_test_config;
 
-#import("../../../tools/testing/dart/test_suite.dart");
+import '../../../tools/testing/dart/test_suite.dart';
 
 class VMTestSuite extends CCTestSuite {
   VMTestSuite(Map configuration)
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 0a6f61b..5f2ec21 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -16,7 +16,6 @@
 
 [ $system == windows && $mode == debug ]
 cc/Sleep: Pass, Fail  # Flaky on buildbot. Issue 5133.
-cc/Monitor: Pass, Fail  # Flaky on buildbot. Issue 5133.
 
 # The following section refers to the dart vm tests which live under
 # runtime/tests/vm/dart.
diff --git a/runtime/tools/gyp/nss_configurations.gypi b/runtime/tools/gyp/nss_configurations.gypi
new file mode 100644
index 0000000..2897c6c
--- /dev/null
+++ b/runtime/tools/gyp/nss_configurations.gypi
@@ -0,0 +1,78 @@
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for 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 is included to modify the configurations to build third-party
+# code from Mozilla's NSS and NSPR libraries, modified by the Chromium project.
+# This code is C code, not C++, and is not warning-free, so we need to remove
+# C++-specific flags, and add flags to supress the warnings in the code.
+# This file is included from gyp files in the runtime/bin/net directory.
+{
+  'variables': {
+    # Used by third_party/nss, which is from Chromium.
+    # When the NSS and related libraries gyp files are processed in
+    # Dartium, do not override the settings from Dartium.  The targets will
+    # not be built.
+    'os_posix%': 1,
+    'os_bsd%': 0,
+    'chromeos%': 0,
+    'clang%': 0,
+  },
+  'target_defaults': {
+    'cflags': [
+      '-Wno-unused-variable',
+      '-Wno-unused-but-set-variable',
+      '-Wno-missing-field-initializers',
+      '-Wno-uninitialized',
+      '-Wno-sign-compare',
+      '-Wno-empty-body',
+      '-Wno-type-limits',
+      '-Wno-pointer-to-int-cast',
+      '-UHAVE_CVAR_BUILT_ON_SEM',
+    ],
+    # Removes these flags from the list cflags.
+    'cflags!': [
+      # NSS code from upstream mozilla builds with warnings,
+      # so we must allow warnings without failing.
+      '-Werror',
+      '-Wall',
+      '-ansi',
+      # This flag would let a certain assembly function be inlined,
+      # causing errors in mpcpucache.c.
+      '-fvisibility=hidden',
+      # Not supported for C, only for C++.
+      '-Wnon-virtual-dtor',
+      '-Wno-conversion-null',
+      '-fno-rtti',
+      '-fvisibility-inlines-hidden',
+      '-Woverloaded-virtual',
+    ],
+    'configurations': {
+      'Dart_Base': {
+        'xcode_settings': {
+          'WARNING_CFLAGS!': [
+            '-Wall',
+            '-Wextra',
+          ],
+        },
+      },
+      # Dart_Debug and Dart_Release are merged after Dart_Base, so we can
+      # override the 'ansi' and '-Werror' flags set at the global level in
+      # tools/gyp/configurations_xcode.gypi.
+      'Dart_Debug': {
+        'xcode_settings': {
+          # Remove 'ansi' setting.
+          'GCC_C_LANGUAGE_STANDARD': 'c99',
+          'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
+        },
+      },
+      'Dart_Release': {
+        'xcode_settings': {
+          # Remove 'ansi' setting.
+          'GCC_C_LANGUAGE_STANDARD': 'c99',
+          'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
+        },
+      },
+    },
+  },
+}
diff --git a/runtime/tools/gyp/runtime-configurations.gypi b/runtime/tools/gyp/runtime-configurations.gypi
index e0e1014..6a52f2d 100644
--- a/runtime/tools/gyp/runtime-configurations.gypi
+++ b/runtime/tools/gyp/runtime-configurations.gypi
@@ -5,6 +5,9 @@
 {
   'variables': {
     'dart_debug_optimization_level%': '2',
+    # If we have not set dart_io_support to 1 in Dart's all.gypi or common.gypi,
+    # then do not build the native libraries supporting  dart:io.
+    'dart_io_support%': 0,
   },
 
   'target_defaults': {
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index 17c81f4..373925e 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -982,9 +982,14 @@
 
 
 void Assembler::andq(Register dst, const Immediate& imm) {
-  AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(dst, REX_W);
-  EmitComplex(4, Operand(dst), imm);
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    EmitRegisterREX(dst, REX_W);
+    EmitComplex(4, Operand(dst), imm);
+  } else {
+    movq(TMP, imm);
+    andq(dst, TMP);
+  }
 }
 
 
@@ -1006,9 +1011,14 @@
 
 
 void Assembler::orq(Register dst, const Immediate& imm) {
-  AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(dst, REX_W);
-  EmitComplex(1, Operand(dst), imm);
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    EmitRegisterREX(dst, REX_W);
+    EmitComplex(1, Operand(dst), imm);
+  } else {
+    movq(TMP, imm);
+    orq(dst, TMP);
+  }
 }
 
 
@@ -1038,9 +1048,14 @@
 
 
 void Assembler::xorq(Register dst, const Immediate& imm) {
-  AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(dst, REX_W);
-  EmitComplex(6, Operand(dst), imm);
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    EmitRegisterREX(dst, REX_W);
+    EmitComplex(6, Operand(dst), imm);
+  } else {
+    movq(TMP, imm);
+    xorq(dst, TMP);
+  }
 }
 
 
@@ -1076,9 +1091,14 @@
 
 
 void Assembler::addq(Register reg, const Immediate& imm) {
-  AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(reg, REX_W);
-  EmitComplex(0, Operand(reg), imm);
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    EmitRegisterREX(reg, REX_W);
+    EmitComplex(0, Operand(reg), imm);
+  } else {
+    movq(TMP, imm);
+    addq(reg, TMP);
+  }
 }
 
 
@@ -1156,7 +1176,8 @@
 
 void Assembler::imull(Register reg, const Immediate& imm) {
   AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(reg, REX_NONE);
+  Operand operand(reg);
+  EmitOperandREX(reg, operand, REX_NONE);
   EmitUint8(0x69);
   EmitOperand(reg & 7, Operand(reg));
   EmitImmediate(imm);
@@ -1173,6 +1194,21 @@
 }
 
 
+void Assembler::imulq(Register reg, const Immediate& imm) {
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    Operand operand(reg);
+    EmitOperandREX(reg, operand, REX_W);
+    EmitUint8(0x69);
+    EmitOperand(reg & 7, Operand(reg));
+    EmitImmediate(imm);
+  } else {
+    movq(TMP, imm);
+    imulq(reg, TMP);
+  }
+}
+
+
 void Assembler::imulq(Register dst, const Address& address) {
   AssemblerBuffer::EnsureCapacity ensured(&buffer_);
   EmitOperandREX(dst, address, REX_W);
@@ -1192,9 +1228,14 @@
 
 
 void Assembler::subq(Register reg, const Immediate& imm) {
-  AssemblerBuffer::EnsureCapacity ensured(&buffer_);
-  EmitRegisterREX(reg, REX_W);
-  EmitComplex(5, Operand(reg), imm);
+  if (imm.is_int32()) {
+    AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+    EmitRegisterREX(reg, REX_W);
+    EmitComplex(5, Operand(reg), imm);
+  } else {
+    movq(TMP, imm);
+    subq(reg, TMP);
+  }
 }
 
 
diff --git a/runtime/vm/assembler_x64.h b/runtime/vm/assembler_x64.h
index 893249e..cebc865 100644
--- a/runtime/vm/assembler_x64.h
+++ b/runtime/vm/assembler_x64.h
@@ -440,6 +440,7 @@
 
   void imulq(Register dst, Register src);
   void imulq(Register dst, const Address& address);
+  void imulq(Register dst, const Immediate& imm);
 
   void subq(Register dst, Register src);
   void subq(Register reg, const Immediate& imm);
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index 4580034..f2d6fce 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -346,22 +346,34 @@
 
 
 ASSEMBLER_TEST_GENERATE(SignedMultiply64, assembler) {
+  __ pushq(R15);  // Callee saved.
   __ movq(RAX, Immediate(2));
   __ movq(RCX, Immediate(4));
   __ imulq(RAX, RCX);
+
   __ movq(R8, Immediate(2));
   __ movq(R9, Immediate(4));
   __ pushq(R9);
   __ imulq(R8, Address(RSP, 0));
   __ popq(R9);
   __ addq(RAX, R8);
+
+  __ movq(R10, Immediate(2));
+  __ movq(R11, Immediate(4));
+  __ imulq(R10, R11);
+  __ addq(RAX, R10);
+
+  __ movq(R15, Immediate(2));
+  __ imulq(R15, Immediate(4));
+  __ addq(RAX, R15);
+  __ popq(R15);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(SignedMultiply64, entry) {
   typedef int64_t (*SignedMultiply64)();
-  EXPECT_EQ(16, reinterpret_cast<SignedMultiply64>(entry)());
+  EXPECT_EQ(32, reinterpret_cast<SignedMultiply64>(entry)());
 }
 
 
@@ -371,9 +383,15 @@
 
 
 ASSEMBLER_TEST_GENERATE(SignedMultiplyLong, assembler) {
+  Label done;
   __ movq(RAX, Immediate(kLargeConstant));
   __ movq(RCX, Immediate(kAnotherLargeConstant));
   __ imulq(RAX, RCX);
+  __ imulq(RCX, Immediate(kLargeConstant));
+  __ cmpq(RAX, RCX);
+  __ j(EQUAL, &done);
+  __ int3();
+  __ Bind(&done);
   __ ret();
 }
 
@@ -417,6 +435,22 @@
 }
 
 
+ASSEMBLER_TEST_GENERATE(SignedMultiply2, assembler) {
+  __ pushq(R15);  // Callee saved.
+  __ movl(R15, Immediate(2));
+  __ imull(R15, Immediate(1000));
+  __ movl(RAX, R15);
+  __ popq(R15);
+  __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(SignedMultiply2, entry) {
+  typedef int (*SignedMultiply2)();
+  EXPECT_EQ(2000, reinterpret_cast<SignedMultiply2>(entry)());
+}
+
+
 ASSEMBLER_TEST_GENERATE(SignedDivide, assembler) {
   __ movl(RAX, Immediate(-87));
   __ movl(RDX, Immediate(123));
@@ -774,9 +808,7 @@
   __ andq(RAX, Immediate(2));
   __ cmpq(RAX, Immediate(0));
   __ j(EQUAL, &donetest1);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest1);
 
   Label donetest2;
@@ -786,9 +818,7 @@
   __ popq(RAX);
   __ cmpq(RCX, Immediate(0));
   __ j(NOT_EQUAL, &donetest2);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest2);
 
   Label donetest3;
@@ -796,9 +826,7 @@
   __ orq(RAX, Immediate(0));
   __ cmpq(RAX, Immediate(0));
   __ j(EQUAL, &donetest3);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest3);
 
   Label donetest4;
@@ -806,9 +834,7 @@
   __ orq(RAX, Immediate(0));
   __ cmpq(RAX, Immediate(0));
   __ j(NOT_EQUAL, &donetest4);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest4);
 
   Label donetest5;
@@ -817,9 +843,7 @@
   __ movq(Address(RSP, 0), RAX);
   __ cmpq(Address(RSP, 0), Immediate(0xff));
   __ j(EQUAL, &donetest5);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest5);
   __ popq(RAX);
 
@@ -828,9 +852,7 @@
   __ shlq(RAX, Immediate(3));
   __ cmpq(RAX, Immediate(8));
   __ j(EQUAL, &donetest6);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest6);
 
   Label donetest7;
@@ -838,9 +860,7 @@
   __ shrq(RAX, Immediate(1));
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest7);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest7);
 
   Label donetest8;
@@ -848,9 +868,7 @@
   __ shrq(RAX, Immediate(3));
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest8);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest8);
 
   Label donetest9;
@@ -859,9 +877,7 @@
   __ shlq(RAX, RCX);
   __ cmpq(RAX, Immediate(8));
   __ j(EQUAL, &donetest9);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest9);
 
   Label donetest10;
@@ -870,9 +886,7 @@
   __ shrq(RAX, RCX);
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest10);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest10);
 
   Label donetest6a;
@@ -890,9 +904,7 @@
   __ shrq(RAX, Immediate(1));
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest7a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest7a);
 
   Label donetest8a;
@@ -900,9 +912,7 @@
   __ shrq(RAX, Immediate(3));
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest8a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest8a);
 
   Label donetest9a;
@@ -911,9 +921,7 @@
   __ shlq(RAX, RCX);
   __ cmpq(RAX, Immediate(8));
   __ j(EQUAL, &donetest9a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest9a);
 
   Label donetest10a;
@@ -922,9 +930,7 @@
   __ shrq(RAX, RCX);
   __ cmpq(RAX, Immediate(1));
   __ j(EQUAL, &donetest10a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest10a);
 
   Label donetest11a;
@@ -933,9 +939,7 @@
   __ shrq(RAX, Immediate(3));
   __ cmpq(RAX, Immediate(0x10000000));
   __ j(EQUAL, &donetest11a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest11a);
 
   Label donetest12a;
@@ -944,9 +948,7 @@
   __ sarq(RAX, Immediate(3));
   __ cmpq(RAX, Immediate(0xf000000000000000));
   __ j(EQUAL, &donetest12a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest12a);
 
   Label donetest13a;
@@ -956,11 +958,29 @@
   __ sarq(RAX, RCX);
   __ cmpq(RAX, Immediate(0xf000000000000000));
   __ j(EQUAL, &donetest13a);
-  // Be sure to skip this crashing code.
-  __ movq(RAX, Immediate(0));
-  __ movq(Address(RAX, 0), RAX);
+  __ int3();
   __ Bind(&donetest13a);
 
+  Label donetest14, donetest15;
+  __ pushq(R15);  // Callee saved.
+  __ movq(R15, Immediate(0xf000000000000001));
+  __ andq(R15, Immediate(-1));
+  __ andq(R15, Immediate(0x8000000000000001));
+  __ orq(R15, Immediate(2));
+  __ orq(R15, Immediate(0xf800000000000000));
+  __ xorq(R15, Immediate(1));
+  __ xorq(R15, Immediate(0x0800000000000000));
+  __ cmpq(R15, Immediate(0xf000000000000002));
+  __ j(EQUAL, &donetest14);
+  __ int3();
+  __ Bind(&donetest14);
+  __ andq(R15, Immediate(2));
+  __ cmpq(R15, Immediate(2));
+  __ j(EQUAL, &donetest15);
+  __ int3();
+  __ Bind(&donetest15);
+  __ popq(R15);  // Callee saved.
+
   __ movq(RAX, Immediate(0));
   __ ret();
 }
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index 9c68a9b..f7c9aee 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -303,6 +303,14 @@
 }
 
 
+const Instance* LoadLocalNode::EvalConstExpr() const {
+  if (local().IsConst()) {
+    return local().ConstValue();
+  }
+  return NULL;
+}
+
+
 AstNode* LoadLocalNode::MakeAssignmentNode(AstNode* rhs) {
   if (local().is_final()) {
     return NULL;
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 3498c6b..104ebf3 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -289,6 +289,9 @@
     ASSERT(type_.IsZoneHandle());
     ASSERT(!type_.IsNull());
     ASSERT(type_.IsFinalized());
+    // Type may be uninstantiated when creating a generic list literal.
+    ASSERT((type.arguments() == AbstractTypeArguments::null()) ||
+           ((AbstractTypeArguments::Handle(type.arguments()).Length() == 1)));
   }
 
   void VisitChildren(AstNodeVisitor* visitor) const;
@@ -964,6 +967,7 @@
     }
   }
 
+  virtual const Instance* EvalConstExpr() const;
   virtual AstNode* MakeAssignmentNode(AstNode* rhs);
 
   DECLARE_COMMON_NODE_FUNCTIONS(LoadLocalNode);
@@ -1521,44 +1525,33 @@
 class NativeBodyNode : public AstNode {
  public:
   NativeBodyNode(intptr_t token_pos,
+                 const Function& function,
                  const String& native_c_function_name,
-                 NativeFunction native_c_function,
-                 int argument_count,
-                 bool has_optional_parameters,
-                 bool is_native_instance_closure)
+                 NativeFunction native_c_function)
       : AstNode(token_pos),
+        function_(function),
         native_c_function_name_(native_c_function_name),
-        native_c_function_(native_c_function),
-        argument_count_(argument_count),
-        has_optional_parameters_(has_optional_parameters),
-        is_native_instance_closure_(is_native_instance_closure) {
+        native_c_function_(native_c_function) {
+    ASSERT(function_.IsZoneHandle());
     ASSERT(native_c_function_ != NULL);
     ASSERT(native_c_function_name_.IsZoneHandle());
     ASSERT(native_c_function_name_.IsSymbol());
   }
 
+  const Function& function() const { return function_; }
   const String& native_c_function_name() const {
     return native_c_function_name_;
   }
   NativeFunction native_c_function() const { return native_c_function_; }
-  int argument_count() const { return argument_count_; }
-  bool has_optional_parameters() const {
-    return has_optional_parameters_;
-  }
-  bool is_native_instance_closure() const {
-    return is_native_instance_closure_;
-  }
 
   virtual void VisitChildren(AstNodeVisitor* visitor) const { }
 
   DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode);
 
  private:
+  const Function& function_;  // Native Dart function.
   const String& native_c_function_name_;
   NativeFunction native_c_function_;  // Actual non-Dart implementation.
-  const int argument_count_;  // Native Dart function argument count.
-  const bool has_optional_parameters_;  // Native Dart function kind.
-  const bool is_native_instance_closure_;  // An implicit native closure.
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode);
 };
diff --git a/runtime/vm/ast_printer.cc b/runtime/vm/ast_printer.cc
index d4d3c32..0224c25 100644
--- a/runtime/vm/ast_printer.cc
+++ b/runtime/vm/ast_printer.cc
@@ -342,7 +342,7 @@
 void AstPrinter::VisitNativeBodyNode(NativeBodyNode* node) {
   OS::Print("(native_c call '%s'(%d args))",
             node->native_c_function_name().ToCString(),
-            node->argument_count());
+            NativeArguments::ParameterCountForResolution(node->function()));
 }
 
 
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index f71cf5a..bab1d4b 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -34,14 +34,6 @@
 }
 
 
-RawScript* Bootstrap::LoadCoreImplScript(bool patch) {
-  // TODO(iposva): Use proper library name.
-  const char* url = patch ? "dart:coreimpl-patch" : "bootstrap_impl";
-  const char* source = patch ? corelib_impl_patch_ : corelib_impl_source_;
-  return LoadScript(url, source, patch);
-}
-
-
 RawScript* Bootstrap::LoadCollectionScript(bool patch) {
   const char* url = patch ? "dart:collection-patch" : "dart:collection";
   const char* source = patch ? collection_source_ : collection_source_;
diff --git a/runtime/vm/bootstrap.h b/runtime/vm/bootstrap.h
index 9f7f4e1..2668b61 100644
--- a/runtime/vm/bootstrap.h
+++ b/runtime/vm/bootstrap.h
@@ -18,7 +18,6 @@
 class Bootstrap : public AllStatic {
  public:
   static RawScript* LoadCoreScript(bool patch);
-  static RawScript* LoadCoreImplScript(bool patch);
   static RawScript* LoadCollectionScript(bool patch);
   static RawScript* LoadMathScript(bool patch);
   static RawScript* LoadIsolateScript(bool patch);
@@ -32,8 +31,6 @@
 
   static const char corelib_source_[];
   static const char corelib_patch_[];
-  static const char corelib_impl_source_[];
-  static const char corelib_impl_patch_[];
   static const char collection_source_[];
   static const char math_source_[];
   static const char math_patch_[];
diff --git a/runtime/vm/bootstrap_natives.cc b/runtime/vm/bootstrap_natives.cc
index 319a0cc..47a8c3a 100644
--- a/runtime/vm/bootstrap_natives.cc
+++ b/runtime/vm/bootstrap_natives.cc
@@ -60,10 +60,6 @@
   ASSERT(!library.IsNull());
   library.set_native_entry_resolver(resolver);
 
-  library = Library::CoreImplLibrary();
-  ASSERT(!library.IsNull());
-  library.set_native_entry_resolver(resolver);
-
   library = Library::CollectionLibrary();
   ASSERT(!library.IsNull());
   library.set_native_entry_resolver(resolver);
diff --git a/runtime/vm/bootstrap_nocorelib.cc b/runtime/vm/bootstrap_nocorelib.cc
index 26847f4..fb3b8ed 100644
--- a/runtime/vm/bootstrap_nocorelib.cc
+++ b/runtime/vm/bootstrap_nocorelib.cc
@@ -21,12 +21,6 @@
 }
 
 
-RawScript* Bootstrap::LoadCoreImplScript(bool is_patch) {
-  UNREACHABLE();
-  return Script::null();
-}
-
-
 RawScript* Bootstrap::LoadCollectionScript(bool is_patch) {
   UNREACHABLE();
   return Script::null();
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index f2bb1dc..3283db1 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -20,7 +20,7 @@
 DEFINE_FLAG(bool, trace_class_finalization, false, "Trace class finalization.");
 DEFINE_FLAG(bool, trace_type_finalization, false, "Trace type finalization.");
 DECLARE_FLAG(bool, enable_type_checks);
-
+DECLARE_FLAG(bool, use_cha);
 
 bool ClassFinalizer::AllClassesFinalized() {
   ObjectStore* object_store = Isolate::Current()->object_store();
@@ -30,6 +30,80 @@
 }
 
 
+// Removes optimized code once we load more classes, since --use_cha based
+// optimizations may have become invalid.
+// Only methods which owner classes where subclasses can be invalid.
+// TODO(srdjan): Be even more precise by recording the exact CHA optimization.
+static void RemoveOptimizedCode(
+    const GrowableArray<intptr_t>& added_subclasses_to_cids) {
+  ASSERT(FLAG_use_cha);
+  if (added_subclasses_to_cids.is_empty()) return;
+  // Deoptimize all live frames.
+  DeoptimizeIfOwner(added_subclasses_to_cids);
+  // Switch all functions' code to unoptimized.
+  const ClassTable& class_table = *Isolate::Current()->class_table();
+  Class& cls = Class::Handle();
+  Array& array = Array::Handle();
+  Function& function = Function::Handle();
+  for (intptr_t i = 0; i < added_subclasses_to_cids.length(); i++) {
+    intptr_t cid = added_subclasses_to_cids[i];
+    cls = class_table.At(cid);
+    ASSERT(!cls.IsNull());
+    array = cls.functions();
+    intptr_t num_functions = array.IsNull() ? 0 : array.Length();
+    for (intptr_t f = 0; f < num_functions; f++) {
+      function ^= array.At(f);
+      ASSERT(!function.IsNull());
+      if (function.HasOptimizedCode()) {
+        function.SwitchToUnoptimizedCode();
+      }
+    }
+  }
+}
+
+
+void AddSuperType(const Type& type,
+                  GrowableArray<intptr_t>* finalized_super_classes) {
+  ASSERT(type.HasResolvedTypeClass());
+  if (type.IsObjectType()) {
+    return;
+  }
+  const Class& cls = Class::Handle(type.type_class());
+  ASSERT(cls.is_finalized());
+  const intptr_t cid = cls.id();
+  for (intptr_t i = 0; i < finalized_super_classes->length(); i++) {
+    if ((*finalized_super_classes)[i] == cid) {
+      // Already added.
+      return;
+    }
+  }
+  finalized_super_classes->Add(cid);
+  const Type& super_type = Type::Handle(cls.super_type());
+  AddSuperType(super_type, finalized_super_classes);
+}
+
+
+// Use array instead of set since we expect very few subclassed classes
+// to occur.
+static void CollectFinalizedSuperClasses(
+    const GrowableObjectArray& pending_classes,
+    GrowableArray<intptr_t>* finalized_super_classes) {
+  Class& cls = Class::Handle();
+  Type& super_type = Type::Handle();
+  for (intptr_t i = 0; i < pending_classes.Length(); i++) {
+    cls ^= pending_classes.At(i);
+    ASSERT(!cls.is_finalized());
+    super_type ^= cls.super_type();
+    if (!super_type.IsNull()) {
+      if (super_type.HasResolvedTypeClass() &&
+          Class::Handle(super_type.type_class()).is_finalized()) {
+        AddSuperType(super_type, finalized_super_classes);
+      }
+    }
+  }
+}
+
+
 // Class finalization occurs:
 // a) when bootstrap process completes (VerifyBootstrapClasses).
 // b) after the user classes are loaded (dart_api).
@@ -45,6 +119,8 @@
   if (AllClassesFinalized()) {
     return true;
   }
+
+  GrowableArray<intptr_t> added_subclasses_to_cids;
   LongJump* base = isolate->long_jump_base();
   LongJump jump;
   isolate->set_long_jump_base(&jump);
@@ -52,6 +128,9 @@
     GrowableObjectArray& class_array = GrowableObjectArray::Handle();
     class_array = object_store->pending_classes();
     ASSERT(!class_array.IsNull());
+    // Collect superclasses that were already finalized before this run of
+    // finalization.
+    CollectFinalizedSuperClasses(class_array, &added_subclasses_to_cids);
     Class& cls = Class::Handle();
     // First resolve all superclasses.
     for (intptr_t i = 0; i < class_array.Length(); i++) {
@@ -84,6 +163,9 @@
     retval = false;
   }
   isolate->set_long_jump_base(base);
+  if (FLAG_use_cha) {
+    RemoveOptimizedCode(added_subclasses_to_cids);
+  }
   return retval;
 }
 
@@ -252,8 +334,7 @@
   }
   // If cls belongs to core lib or to core lib's implementation, restrictions
   // about allowed interfaces are lifted.
-  if ((cls.library() != Library::CoreLibrary()) &&
-      (cls.library() != Library::CoreImplLibrary())) {
+  if (cls.library() != Library::CoreLibrary()) {
     // Prevent extending core implementation classes.
     bool is_error = false;
     switch (super_class.id()) {
@@ -295,14 +376,17 @@
       case kWeakPropertyCid:
         is_error = true;
         break;
-      default:
+      default: {
         // Special case: classes for which we don't have a known class id.
         // TODO(regis): Why isn't comparing to kIntegerCid enough?
         if (Type::Handle(Type::Double()).type_class() == super_class.raw() ||
-            Type::Handle(Type::IntType()).type_class() == super_class.raw()) {
+            Type::Handle(Type::IntType()).type_class() == super_class.raw() ||
+            Type::Handle(
+                Type::StringType()).type_class() == super_class.raw()) {
           is_error = true;
         }
         break;
+      }
     }
     if (is_error) {
       const Script& script = Script::Handle(cls.script());
@@ -929,8 +1013,35 @@
                                                  const Function& function) {
   // Resolve result type.
   AbstractType& type = AbstractType::Handle(function.result_type());
+  // TODO(regis): Remove this code once the parser checks the factory name and
+  // once the core library is fixed. See issue 6641.
   // In case of a factory, the parser sets the factory result type to a type
-  // with an unresolved class whose name matches the factory name.
+  // with an unresolved class whose name matches the factory name and no type
+  // arguments. We resolve the class and specify type arguments in case the
+  // class is generic.
+  if (function.IsFactory()) {
+    Type& factory_result_type = Type::Handle();
+    factory_result_type ^= type.raw();
+    ASSERT(factory_result_type.arguments() == TypeArguments::null());
+    const UnresolvedClass& unresolved_factory_class =
+        UnresolvedClass::Handle(factory_result_type.unresolved_class());
+    const Class& factory_class =
+        Class::Handle(ResolveClass(cls, unresolved_factory_class));
+    if (factory_class.IsNull()) {
+      type = NewFinalizedMalformedType(
+          Error::Handle(),  // No previous error.
+          cls,
+          unresolved_factory_class.token_pos(),
+          kTryResolve,  // No compile-time error.
+          "cannot resolve factory class name '%s' from '%s'",
+          String::Handle(unresolved_factory_class.Name()).ToCString(),
+          String::Handle(cls.Name()).ToCString());
+    } else {
+      type = Type::New(factory_class,
+                       TypeArguments::Handle(factory_class.type_parameters()),
+                       unresolved_factory_class.token_pos());
+    }
+  }
   // It is not a compile time error if this name does not resolve to a class or
   // interface.
   ResolveType(cls, type, kCanonicalize);
@@ -1359,9 +1470,7 @@
 
   // If cls belongs to core lib or to core lib's implementation, restrictions
   // about allowed interfaces are lifted.
-  const bool cls_belongs_to_core_lib =
-      (cls.library() == Library::CoreLibrary()) ||
-      (cls.library() == Library::CoreImplLibrary());
+  const bool cls_belongs_to_core_lib = cls.library() == Library::CoreLibrary();
 
   // Resolve and check the interfaces of cls.
   visited->Add(cls_index);
@@ -1392,7 +1501,7 @@
           interface.IsNumberType() ||
           interface.IsIntType() ||
           interface.IsDoubleType() ||
-          interface.IsStringInterface() ||
+          interface.IsStringType() ||
           (interface.IsFunctionType() && !cls.IsSignatureClass()) ||
           interface.IsDynamicType()) {
         const Script& script = Script::Handle(cls.script());
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index ae4aa0c..f255232 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -27,7 +27,7 @@
   Class& cls = Class::ZoneHandle();
   const Script& script = Script::Handle();
   cls = Class::New(function_name, script, Scanner::kDummyTokenIndex);
-  const Function& function = Function::Handle(
+  const Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction,
                     true, false, false, false, cls, 0));
   function.set_result_type(Type::Handle(Type::DynamicType()));
@@ -45,7 +45,7 @@
   test->node_sequence()->Add(new ReturnNode(kPos, l));
   parsed_function->SetNodeSequence(test->node_sequence());
   parsed_function->set_instantiator(NULL);
-  parsed_function->set_default_parameter_values(Array::Handle());
+  parsed_function->set_default_parameter_values(Array::ZoneHandle());
   parsed_function->AllocateVariables();
   bool retval;
   Isolate* isolate = Isolate::Current();
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 718e9a4..008673f 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -47,11 +47,18 @@
 DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function");
 DEFINE_FLAG(bool, trace_failed_optimization_attempts, false,
     "Traces all failed optimization attempts");
+DEFINE_FLAG(bool, trace_optimized_ic_calls, false,
+    "Trace IC calls in optimized code.");
+DEFINE_FLAG(int, reoptimization_counter_threshold, 2000,
+    "Counter threshold before a function gets reoptimized.");
+DEFINE_FLAG(int, max_subtype_cache_entries, 100,
+    "Maximum number of subtype cache entries (number of checks cached).");
 
 
 DEFINE_RUNTIME_ENTRY(TraceFunctionEntry, 1) {
-  ASSERT(arguments.Count() == kTraceFunctionEntryRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() ==
+      kTraceFunctionEntryRuntimeEntry.argument_count());
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   const String& function_name = String::Handle(function.name());
   const String& class_name =
       String::Handle(Class::Handle(function.Owner()).Name());
@@ -61,8 +68,9 @@
 
 
 DEFINE_RUNTIME_ENTRY(TraceFunctionExit, 1) {
-  ASSERT(arguments.Count() == kTraceFunctionExitRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() ==
+      kTraceFunctionExitRuntimeEntry.argument_count());
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   const String& function_name = String::Handle(function.name());
   const String& class_name =
       String::Handle(Class::Handle(function.Owner()).Name());
@@ -75,15 +83,15 @@
 // This runtime entry is never called for allocating a List of a generic type,
 // because a prior run time call instantiates the element type if necessary.
 // Arg0: array length.
-// Arg1: array element type.
+// Arg1: array type arguments, i.e. vector of 1 type, the element type.
 // Return value: newly allocated array of length arg0.
 DEFINE_RUNTIME_ENTRY(AllocateArray, 2) {
-  ASSERT(arguments.Count() == kAllocateArrayRuntimeEntry.argument_count());
-  const Smi& length = Smi::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kAllocateArrayRuntimeEntry.argument_count());
+  const Smi& length = Smi::CheckedHandle(arguments.ArgAt(0));
   const Array& array = Array::Handle(Array::New(length.Value()));
   arguments.SetReturn(array);
   AbstractTypeArguments& element_type =
-      AbstractTypeArguments::CheckedHandle(arguments.At(1));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
   // An Array is raw or takes only one type argument.
   ASSERT(element_type.IsNull() ||
          ((element_type.Length() == 1) && element_type.IsInstantiated()));
@@ -97,29 +105,29 @@
 // Arg2: type arguments of the instantiator or kNoInstantiator.
 // Return value: newly allocated object.
 DEFINE_RUNTIME_ENTRY(AllocateObject, 3) {
-  ASSERT(arguments.Count() == kAllocateObjectRuntimeEntry.argument_count());
-  const Class& cls = Class::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kAllocateObjectRuntimeEntry.argument_count());
+  const Class& cls = Class::CheckedHandle(arguments.ArgAt(0));
   const Instance& instance = Instance::Handle(Instance::New(cls));
   arguments.SetReturn(instance);
   if (!cls.HasTypeArguments()) {
     // No type arguments required for a non-parameterized type.
-    ASSERT(Instance::CheckedHandle(arguments.At(1)).IsNull());
+    ASSERT(Instance::CheckedHandle(arguments.ArgAt(1)).IsNull());
     return;
   }
   AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(1));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
   ASSERT(type_arguments.IsNull() ||
          (type_arguments.Length() == cls.NumTypeArguments()));
   // If no instantiator is provided, set the type arguments and return.
-  if (Object::Handle(arguments.At(2)).IsSmi()) {
-    ASSERT(Smi::CheckedHandle(arguments.At(2)).Value() ==
+  if (Object::Handle(arguments.ArgAt(2)).IsSmi()) {
+    ASSERT(Smi::CheckedHandle(arguments.ArgAt(2)).Value() ==
            StubCode::kNoInstantiator);
     instance.SetTypeArguments(type_arguments);  // May be null.
     return;
   }
   ASSERT(!type_arguments.IsInstantiated());
   const AbstractTypeArguments& instantiator =
-      AbstractTypeArguments::CheckedHandle(arguments.At(2));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(2));
   ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
   if (instantiator.IsNull()) {
     type_arguments =
@@ -172,24 +180,24 @@
 // Return value: newly allocated object.
 DEFINE_RUNTIME_ENTRY(AllocateObjectWithBoundsCheck, 3) {
   ASSERT(FLAG_enable_type_checks);
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kAllocateObjectWithBoundsCheckRuntimeEntry.argument_count());
-  const Class& cls = Class::CheckedHandle(arguments.At(0));
+  const Class& cls = Class::CheckedHandle(arguments.ArgAt(0));
   const Instance& instance = Instance::Handle(Instance::New(cls));
   arguments.SetReturn(instance);
   ASSERT(cls.HasTypeArguments());
   AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(1));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
   ASSERT(type_arguments.IsNull() ||
          (type_arguments.Length() == cls.NumTypeArguments()));
   AbstractTypeArguments& bounds_instantiator = AbstractTypeArguments::Handle();
-  if (Object::Handle(arguments.At(2)).IsSmi()) {
-    ASSERT(Smi::CheckedHandle(arguments.At(2)).Value() ==
+  if (Object::Handle(arguments.ArgAt(2)).IsSmi()) {
+    ASSERT(Smi::CheckedHandle(arguments.ArgAt(2)).Value() ==
            StubCode::kNoInstantiator);
   } else {
     ASSERT(!type_arguments.IsInstantiated());
     const AbstractTypeArguments& instantiator =
-        AbstractTypeArguments::CheckedHandle(arguments.At(2));
+        AbstractTypeArguments::CheckedHandle(arguments.ArgAt(2));
     ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
     if (instantiator.IsNull()) {
       type_arguments =
@@ -240,12 +248,12 @@
 // Arg1: instantiator type arguments.
 // Return value: instantiated type arguments.
 DEFINE_RUNTIME_ENTRY(InstantiateTypeArguments, 2) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kInstantiateTypeArgumentsRuntimeEntry.argument_count());
   AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(0));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(0));
   const AbstractTypeArguments& instantiator =
-      AbstractTypeArguments::CheckedHandle(arguments.At(1));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
   ASSERT(!type_arguments.IsNull() && !type_arguments.IsInstantiated());
   ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
   // Code inlined in the caller should have optimized the case where the
@@ -269,11 +277,11 @@
 // Arg1: type arguments of the closure (i.e. instantiator).
 // Return value: newly allocated closure.
 DEFINE_RUNTIME_ENTRY(AllocateClosure, 2) {
-  ASSERT(arguments.Count() == kAllocateClosureRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kAllocateClosureRuntimeEntry.argument_count());
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   ASSERT(function.IsClosureFunction() && !function.IsImplicitClosureFunction());
   const AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(1));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
   ASSERT(type_arguments.IsNull() || type_arguments.IsInstantiated());
   // The current context was saved in the Isolate structure when entering the
   // runtime.
@@ -289,11 +297,11 @@
 // Arg0: local function.
 // Return value: newly allocated closure.
 DEFINE_RUNTIME_ENTRY(AllocateImplicitStaticClosure, 1) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kAllocateImplicitStaticClosureRuntimeEntry.argument_count());
   ObjectStore* object_store = isolate->object_store();
   ASSERT(object_store != NULL);
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   ASSERT(!function.IsNull());
   ASSERT(function.IsImplicitStaticClosureFunction());
   const Context& context = Context::Handle(object_store->empty_context());
@@ -307,13 +315,13 @@
 // Arg2: type arguments of the closure.
 // Return value: newly allocated closure.
 DEFINE_RUNTIME_ENTRY(AllocateImplicitInstanceClosure, 3) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kAllocateImplicitInstanceClosureRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   ASSERT(function.IsImplicitInstanceClosureFunction());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(1));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(1));
   const AbstractTypeArguments& type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(2));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(2));
   ASSERT(type_arguments.IsNull() || type_arguments.IsInstantiated());
   Context& context = Context::Handle();
   context = Context::New(1);
@@ -328,8 +336,8 @@
 // Arg0: number of variables.
 // Return value: newly allocated context.
 DEFINE_RUNTIME_ENTRY(AllocateContext, 1) {
-  ASSERT(arguments.Count() == kAllocateContextRuntimeEntry.argument_count());
-  const Smi& num_variables = Smi::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kAllocateContextRuntimeEntry.argument_count());
+  const Smi& num_variables = Smi::CheckedHandle(arguments.ArgAt(0));
   arguments.SetReturn(Context::Handle(Context::New(num_variables.Value())));
 }
 
@@ -339,8 +347,8 @@
 // Arg0: the context to be cloned.
 // Return value: newly allocated context.
 DEFINE_RUNTIME_ENTRY(CloneContext, 1) {
-  ASSERT(arguments.Count() == kCloneContextRuntimeEntry.argument_count());
-  const Context& ctx = Context::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kCloneContextRuntimeEntry.argument_count());
+  const Context& ctx = Context::CheckedHandle(arguments.ArgAt(0));
   Context& cloned_ctx = Context::Handle(Context::New(ctx.num_variables()));
   cloned_ctx.set_parent(Context::Handle(ctx.parent()));
   for (int i = 0; i < ctx.num_variables(); i++) {
@@ -495,7 +503,10 @@
   AbstractTypeArguments& last_instantiator_type_arguments =
       AbstractTypeArguments::Handle();
   Bool& last_result = Bool::Handle();
-  intptr_t len = new_cache.NumberOfChecks();
+  const intptr_t len = new_cache.NumberOfChecks();
+  if (len >= FLAG_max_subtype_cache_entries) {
+    return;
+  }
   for (intptr_t i = 0; i < len; ++i) {
     new_cache.GetCheck(
         i,
@@ -523,25 +534,34 @@
       return;
     }
   }
-  new_cache.AddCheck(instance_class.id(),
-                     instance_type_arguments,
-                     instantiator_type_arguments,
-                     result);
+  if (!instantiator_type_arguments.IsInstantiatedTypeArguments()) {
+    new_cache.AddCheck(instance_class.id(),
+                       instance_type_arguments,
+                       instantiator_type_arguments,
+                       result);
+  }
   if (FLAG_trace_type_checks) {
     AbstractType& test_type = AbstractType::Handle(type.raw());
     if (!test_type.IsInstantiated()) {
       test_type = type.InstantiateFrom(instantiator_type_arguments);
     }
-    OS::Print("  Updated test cache %p ix:%"Pd":\n"
+    OS::Print("  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",
         new_cache.raw(),
         len,
+        instance_class.id(),
+
+        instance_type_arguments.raw(),
+        instantiator_type_arguments.raw(),
+        result.ToCString(),
+
         instance_class.raw(),
         instance_class.ToCString(),
         instance_class.id(),
         instance_type_arguments.raw(),
         instance_type_arguments.ToCString(),
+
         test_type.type_class(),
         Class::Handle(test_type.type_class()).ToCString(),
         Class::Handle(test_type.type_class()).id(),
@@ -561,14 +581,14 @@
 // Arg4: SubtypeTestCache.
 // Return value: true or false, or may throw a type error in checked mode.
 DEFINE_RUNTIME_ENTRY(Instanceof, 5) {
-  ASSERT(arguments.Count() == kInstanceofRuntimeEntry.argument_count());
-  const Instance& instance = Instance::CheckedHandle(arguments.At(0));
-  const AbstractType& type = AbstractType::CheckedHandle(arguments.At(1));
-  const Instance& instantiator = Instance::CheckedHandle(arguments.At(2));
+  ASSERT(arguments.ArgCount() == kInstanceofRuntimeEntry.argument_count());
+  const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0));
+  const AbstractType& type = AbstractType::CheckedHandle(arguments.ArgAt(1));
+  const Instance& instantiator = Instance::CheckedHandle(arguments.ArgAt(2));
   const AbstractTypeArguments& instantiator_type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(3));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(3));
   const SubtypeTestCache& cache =
-      SubtypeTestCache::CheckedHandle(arguments.At(4));
+      SubtypeTestCache::CheckedHandle(arguments.ArgAt(4));
   ASSERT(type.IsFinalized());
   Error& malformed_error = Error::Handle();
   const Bool& result = Bool::Handle(
@@ -606,15 +626,17 @@
 // Arg5: SubtypeTestCache.
 // Return value: instance if a subtype, otherwise throw a TypeError.
 DEFINE_RUNTIME_ENTRY(TypeCheck, 6) {
-  ASSERT(arguments.Count() == kTypeCheckRuntimeEntry.argument_count());
-  const Instance& src_instance = Instance::CheckedHandle(arguments.At(0));
-  const AbstractType& dst_type = AbstractType::CheckedHandle(arguments.At(1));
-  const Instance& dst_instantiator = Instance::CheckedHandle(arguments.At(2));
+  ASSERT(arguments.ArgCount() == kTypeCheckRuntimeEntry.argument_count());
+  const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
+  const AbstractType& dst_type =
+      AbstractType::CheckedHandle(arguments.ArgAt(1));
+  const Instance& dst_instantiator =
+      Instance::CheckedHandle(arguments.ArgAt(2));
   const AbstractTypeArguments& instantiator_type_arguments =
-      AbstractTypeArguments::CheckedHandle(arguments.At(3));
-  const String& dst_name = String::CheckedHandle(arguments.At(4));
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(3));
+  const String& dst_name = String::CheckedHandle(arguments.ArgAt(4));
   const SubtypeTestCache& cache =
-      SubtypeTestCache::CheckedHandle(arguments.At(5));
+      SubtypeTestCache::CheckedHandle(arguments.ArgAt(5));
   ASSERT(!dst_type.IsDynamicType());  // No need to check assignment.
   ASSERT(!dst_type.IsMalformed());  // Already checked in code generator.
   ASSERT(!src_instance.IsNull());  // Already checked in inlined code.
@@ -664,12 +686,12 @@
 // Arg2: arguments descriptor array.
 // Return value: true or false.
 DEFINE_RUNTIME_ENTRY(ArgumentDefinitionTest, 3) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kArgumentDefinitionTestRuntimeEntry.argument_count());
-  const Smi& param_index = Smi::CheckedHandle(arguments.At(0));
-  const String& param_name = String::CheckedHandle(arguments.At(1));
+  const Smi& param_index = Smi::CheckedHandle(arguments.ArgAt(0));
+  const String& param_name = String::CheckedHandle(arguments.ArgAt(1));
   ASSERT(param_name.IsSymbol());
-  const Array& arg_desc = Array::CheckedHandle(arguments.At(2));
+  const Array& arg_desc = Array::CheckedHandle(arguments.ArgAt(2));
   const intptr_t num_pos_args = Smi::CheckedHandle(arg_desc.At(1)).Value();
   // Check if the formal parameter is defined by a positional argument.
   bool is_defined = num_pos_args > param_index.Value();
@@ -694,10 +716,10 @@
 // Arg0: bad object.
 // Return value: none, throws a TypeError.
 DEFINE_RUNTIME_ENTRY(ConditionTypeError, 1) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kConditionTypeErrorRuntimeEntry.argument_count());
   const intptr_t location = GetCallerLocation();
-  const Instance& src_instance = Instance::CheckedHandle(arguments.At(0));
+  const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
   ASSERT(src_instance.IsNull() || !src_instance.IsBool());
   const Type& bool_interface = Type::Handle(Type::BoolType());
   const AbstractType& src_type = AbstractType::Handle(src_instance.GetType());
@@ -718,12 +740,12 @@
 // Arg2: malformed type error message.
 // Return value: none, throws an exception.
 DEFINE_RUNTIME_ENTRY(MalformedTypeError, 3) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kMalformedTypeErrorRuntimeEntry.argument_count());
   const intptr_t location = GetCallerLocation();
-  const Instance& src_value = Instance::CheckedHandle(arguments.At(0));
-  const String& dst_name = String::CheckedHandle(arguments.At(1));
-  const String& malformed_error = String::CheckedHandle(arguments.At(2));
+  const Instance& src_value = Instance::CheckedHandle(arguments.ArgAt(0));
+  const String& dst_name = String::CheckedHandle(arguments.ArgAt(1));
+  const String& malformed_error = String::CheckedHandle(arguments.ArgAt(2));
   const String& dst_type_name = String::Handle(Symbols::New("malformed"));
   const AbstractType& src_type = AbstractType::Handle(src_value.GetType());
   const String& src_type_name = String::Handle(src_type.UserVisibleName());
@@ -734,16 +756,16 @@
 
 
 DEFINE_RUNTIME_ENTRY(Throw, 1) {
-  ASSERT(arguments.Count() == kThrowRuntimeEntry.argument_count());
-  const Instance& exception = Instance::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kThrowRuntimeEntry.argument_count());
+  const Instance& exception = Instance::CheckedHandle(arguments.ArgAt(0));
   Exceptions::Throw(exception);
 }
 
 
 DEFINE_RUNTIME_ENTRY(ReThrow, 2) {
-  ASSERT(arguments.Count() == kReThrowRuntimeEntry.argument_count());
-  const Instance& exception = Instance::CheckedHandle(arguments.At(0));
-  const Instance& stacktrace = Instance::CheckedHandle(arguments.At(1));
+  ASSERT(arguments.ArgCount() == kReThrowRuntimeEntry.argument_count());
+  const Instance& exception = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Instance& stacktrace = Instance::CheckedHandle(arguments.ArgAt(1));
   Exceptions::ReThrow(exception, stacktrace);
 }
 
@@ -791,7 +813,7 @@
 DEFINE_RUNTIME_ENTRY(PatchStaticCall, 0) {
   // This function is called after successful resolving and compilation of
   // the target method.
-  ASSERT(arguments.Count() == kPatchStaticCallRuntimeEntry.argument_count());
+  ASSERT(arguments.ArgCount() == kPatchStaticCallRuntimeEntry.argument_count());
   DartFrameIterator iterator;
   StackFrame* caller_frame = iterator.NextFrame();
   ASSERT(caller_frame != NULL);
@@ -872,9 +894,9 @@
 // patched.
 // Used by megamorphic lookup/no-such-method-handling.
 DEFINE_RUNTIME_ENTRY(ResolveCompileInstanceFunction, 1) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kResolveCompileInstanceFunctionRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
   const Code& code = Code::Handle(
       ResolveCompileInstanceCallTarget(isolate, receiver));
   arguments.SetReturn(code);
@@ -884,14 +906,14 @@
 // Gets called from debug stub when code reaches a breakpoint.
 //   Arg0: function object of the static function that was about to be called.
 DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 1) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kBreakpointStaticHandlerRuntimeEntry.argument_count());
   ASSERT(isolate->debugger() != NULL);
   isolate->debugger()->SignalBpReached();
   // Make sure the static function that is about to be called is
   // compiled. The stub will jump to the entry point without any
   // further tests.
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   if (!function.HasCode()) {
     const Error& error = Error::Handle(Compiler::CompileFunction(function));
     if (!error.IsNull()) {
@@ -904,7 +926,7 @@
 // Gets called from debug stub when code reaches a breakpoint at a return
 // in Dart code.
 DEFINE_RUNTIME_ENTRY(BreakpointReturnHandler, 0) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kBreakpointReturnHandlerRuntimeEntry.argument_count());
   ASSERT(isolate->debugger() != NULL);
   isolate->debugger()->SignalBpReached();
@@ -913,7 +935,7 @@
 
 // Gets called from debug stub when code reaches a breakpoint.
 DEFINE_RUNTIME_ENTRY(BreakpointDynamicHandler, 0) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
      kBreakpointDynamicHandlerRuntimeEntry.argument_count());
   ASSERT(isolate->debugger() != NULL);
   isolate->debugger()->SignalBpReached();
@@ -980,9 +1002,9 @@
 //   Returns: target function with compiled code or null.
 // Modifies the instance call to hold the updated IC data array.
 DEFINE_RUNTIME_ENTRY(InlineCacheMissHandlerOneArg, 1) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kInlineCacheMissHandlerOneArgRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
   GrowableArray<const Instance*> args(1);
   args.Add(&receiver);
   const Function& result =
@@ -998,10 +1020,10 @@
 //   Returns: target function with compiled code or null.
 // Modifies the instance call to hold the updated IC data array.
 DEFINE_RUNTIME_ENTRY(InlineCacheMissHandlerTwoArgs, 2) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kInlineCacheMissHandlerTwoArgsRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const Instance& other = Instance::CheckedHandle(arguments.At(1));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Instance& other = Instance::CheckedHandle(arguments.ArgAt(1));
   GrowableArray<const Instance*> args(2);
   args.Add(&receiver);
   args.Add(&other);
@@ -1019,11 +1041,11 @@
 //   Returns: target function with compiled code or null.
 // Modifies the instance call to hold the updated IC data array.
 DEFINE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs, 3) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kInlineCacheMissHandlerThreeArgsRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const Instance& arg1 = Instance::CheckedHandle(arguments.At(1));
-  const Instance& arg2 = Instance::CheckedHandle(arguments.At(2));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Instance& arg1 = Instance::CheckedHandle(arguments.ArgAt(1));
+  const Instance& arg2 = Instance::CheckedHandle(arguments.ArgAt(2));
   GrowableArray<const Instance*> args(3);
   args.Add(&receiver);
   args.Add(&arg1);
@@ -1041,12 +1063,12 @@
 //   Arg2: Target's name.
 //   Arg3: ICData.
 DEFINE_RUNTIME_ENTRY(UpdateICDataTwoArgs, 4) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
       kUpdateICDataTwoArgsRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const Instance& arg1 = Instance::CheckedHandle(arguments.At(1));
-  const String& target_name = String::CheckedHandle(arguments.At(2));
-  const ICData& ic_data = ICData::CheckedHandle(arguments.At(3));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Instance& arg1 = Instance::CheckedHandle(arguments.ArgAt(1));
+  const String& target_name = String::CheckedHandle(arguments.ArgAt(2));
+  const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(3));
   GrowableArray<const Instance*> args(2);
   args.Add(&receiver);
   args.Add(&arg1);
@@ -1098,10 +1120,10 @@
 // This is called by the megamorphic stub when it is unable to resolve an
 // instance method. This is done just before the call to noSuchMethod.
 DEFINE_RUNTIME_ENTRY(ResolveImplicitClosureFunction, 2) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kResolveImplicitClosureFunctionRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const ICData& ic_data = ICData::CheckedHandle(arguments.At(1));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
   const String& original_function_name = String::Handle(ic_data.target_name());
   Instance& closure = Instance::Handle();
   if (!Field::IsGetterName(original_function_name)) {
@@ -1146,10 +1168,10 @@
 // This is called by the megamorphic stub when it is unable to resolve an
 // instance method. This is done just before the call to noSuchMethod.
 DEFINE_RUNTIME_ENTRY(ResolveImplicitClosureThroughGetter, 2) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kResolveImplicitClosureThroughGetterRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const ICData& ic_data = ICData::CheckedHandle(arguments.At(1));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
   const String& original_function_name = String::Handle(ic_data.target_name());
   const int kNumArguments = 1;
   const int kNumNamedArguments = 0;
@@ -1238,11 +1260,11 @@
 // Arg1: arguments descriptor (originally passed as dart instance invocation).
 // Arg2: arguments array (originally passed to dart instance invocation).
 DEFINE_RUNTIME_ENTRY(InvokeImplicitClosureFunction, 3) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kInvokeImplicitClosureFunctionRuntimeEntry.argument_count());
-  const Instance& closure = Instance::CheckedHandle(arguments.At(0));
-  const Array& arg_descriptor = Array::CheckedHandle(arguments.At(1));
-  const Array& func_arguments = Array::CheckedHandle(arguments.At(2));
+  const Instance& closure = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Array& arg_descriptor = Array::CheckedHandle(arguments.ArgAt(1));
+  const Array& func_arguments = Array::CheckedHandle(arguments.ArgAt(2));
   const Function& function = Function::Handle(Closure::function(closure));
   ASSERT(!function.IsNull());
   if (!function.HasCode()) {
@@ -1257,38 +1279,12 @@
   const Instructions& instrs = Instructions::Handle(code.instructions());
   ASSERT(!instrs.IsNull());
 
-  // Adjust arguments descriptor array to account for removal of the receiver
-  // parameter. Since the arguments descriptor array is canonicalized, create a
-  // new one instead of patching the original one.
-  const intptr_t len = arg_descriptor.Length();
-  const intptr_t num_named_args = (len - 3) / 2;
-  const Array& adjusted_arg_descriptor = Array::Handle(Array::New(len));
-  Smi& smi = Smi::Handle();
-  smi ^= arg_descriptor.At(0);  // Get argument length.
-  smi = Smi::New(smi.Value() - 1);  // Adjust argument length.
-  ASSERT(smi.Value() == func_arguments.Length());
-  adjusted_arg_descriptor.SetAt(0, smi);
-  smi ^= arg_descriptor.At(1);  // Get number of positional parameters.
-  smi = Smi::New(smi.Value() - 1);  // Adjust number of positional params.
-  adjusted_arg_descriptor.SetAt(1, smi);
-  // Adjust name/position pairs for each named argument.
-  String& named_arg_name = String::Handle();
-  Smi& named_arg_pos = Smi::Handle();
-  for (intptr_t i = 0; i < num_named_args; i++) {
-    const int index = 2 + (2 * i);
-    named_arg_name ^= arg_descriptor.At(index);
-    ASSERT(named_arg_name.IsSymbol());
-    adjusted_arg_descriptor.SetAt(index, named_arg_name);
-    named_arg_pos ^= arg_descriptor.At(index + 1);
-    named_arg_pos = Smi::New(named_arg_pos.Value() - 1);
-    adjusted_arg_descriptor.SetAt(index + 1, named_arg_pos);
-  }
-  adjusted_arg_descriptor.SetAt(len - 1, Object::Handle());
-  // It is too late to share the descriptor by canonicalizing it. However, it is
-  // important that the argument names are canonicalized (i.e. are symbols).
-
   // Receiver parameter has already been skipped by caller.
-  GrowableArray<const Object*> invoke_arguments(0);
+  // The closure object is passed as implicit first argument to closure
+  // functions, since it may be needed to throw a NoSuchMethodError, in case
+  // the wrong number of arguments is passed.
+  GrowableArray<const Object*> invoke_arguments(func_arguments.Length() + 1);
+  invoke_arguments.Add(&closure);
   for (intptr_t i = 0; i < func_arguments.Length(); i++) {
     const Object& value = Object::Handle(func_arguments.At(i));
     invoke_arguments.Add(&value);
@@ -1300,7 +1296,7 @@
   ASSERT(context.isolate() == Isolate::Current());
   const Object& result = Object::Handle(
       entrypoint(instrs.EntryPoint(),
-                 adjusted_arg_descriptor,
+                 arg_descriptor,
                  invoke_arguments.data(),
                  context));
   CheckResultError(result);
@@ -1314,13 +1310,13 @@
 // Arg2: original arguments descriptor array.
 // Arg3: original arguments array.
 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction, 4) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kInvokeNoSuchMethodFunctionRuntimeEntry.argument_count());
-  const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
-  const ICData& ic_data = ICData::CheckedHandle(arguments.At(1));
+  const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
+  const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
   const String& original_function_name = String::Handle(ic_data.target_name());
-  ASSERT(!Array::CheckedHandle(arguments.At(2)).IsNull());
-  const Array& orig_arguments = Array::CheckedHandle(arguments.At(3));
+  ASSERT(!Array::CheckedHandle(arguments.ArgAt(2)).IsNull());
+  const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(3));
   // Allocate an InvocationMirror object.
   // TODO(regis): Fill in the InvocationMirror object correctly at
   // this point we do not deal with named arguments and treat them
@@ -1374,10 +1370,10 @@
 // Arg1: arguments array.
 // TODO(regis): Rename this entry?
 DEFINE_RUNTIME_ENTRY(ReportObjectNotClosure, 2) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kReportObjectNotClosureRuntimeEntry.argument_count());
-  const Instance& instance = Instance::CheckedHandle(arguments.At(0));
-  const Array& function_args = Array::CheckedHandle(arguments.At(1));
+  const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0));
+  const Array& function_args = Array::CheckedHandle(arguments.ArgAt(1));
   const String& function_name = String::Handle(Symbols::Call());
   GrowableArray<const Object*> dart_arguments(5);
   if (instance.IsNull()) {
@@ -1421,7 +1417,7 @@
 // A closure object was invoked with incompatible arguments.
 // TODO(regis): Deprecated. This case should be handled by a noSuchMethod call.
 DEFINE_RUNTIME_ENTRY(ClosureArgumentMismatch, 0) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kClosureArgumentMismatchRuntimeEntry.argument_count());
   const Instance& instance = Instance::Handle();  // Incorrect. OK for now.
   const Array& function_args = Array::Handle();  // Incorrect. OK for now.
@@ -1439,7 +1435,7 @@
 
 
 DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kStackOverflowRuntimeEntry.argument_count());
   uword stack_pos = reinterpret_cast<uword>(&arguments);
 
@@ -1501,15 +1497,31 @@
 }
 
 
+DEFINE_RUNTIME_ENTRY(TraceICCall, 2) {
+  ASSERT(arguments.ArgCount() ==
+         kTraceICCallRuntimeEntry.argument_count());
+  const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(0));
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(1));
+  DartFrameIterator iterator;
+  StackFrame* frame = iterator.NextFrame();
+  ASSERT(frame != NULL);
+  OS::Print("IC call @%#"Px": ICData: %p cnt:%"Pd" nchecks: %"Pd" %s %s\n",
+      frame->pc(),
+      ic_data.raw(),
+      function.usage_counter(),
+      ic_data.NumberOfChecks(),
+      ic_data.is_closure_call() ? "closure" : "",
+      function.ToFullyQualifiedCString());
+}
 
-// Only unoptimized code has invocation counter threshold checking.
-// Once the invocation counter threshold is reached any entry into the
-// unoptimized code is redirected to this function.
+
+// This is called from function that needs to be optimized.
+// The requesting function can be already optimized (reoptimization).
 DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
-  const intptr_t kLowInvocationCount = -100000000;
-  ASSERT(arguments.Count() ==
+  ASSERT(arguments.ArgCount() ==
          kOptimizeInvokedFunctionRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  const intptr_t kLowInvocationCount = -100000000;
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   if (isolate->debugger()->IsActive()) {
     // We cannot set breakpoints in optimized code, so do not optimize
     // the function.
@@ -1525,18 +1537,6 @@
     function.set_usage_counter(kLowInvocationCount);
     return;
   }
-  if (function.HasOptimizedCode()) {
-    // The caller has been already optimized, the caller is probably in
-    // a loop or in a recursive call chain.
-    // Leave the usage_counter at the limit so that the count test knows that
-    // method is optimized.
-    if (FLAG_trace_failed_optimization_attempts) {
-      PrintCaller("Has Optimized Code");
-    }
-    // TODO(srdjan): Enable reoptimizing optimized code, but most recognize
-    // that reoptimization was not already applied.
-    return;
-  }
   if ((FLAG_optimization_filter != NULL) &&
       (strstr(function.ToFullyQualifiedCString(),
               FLAG_optimization_filter) == NULL)) {
@@ -1544,8 +1544,6 @@
     return;
   }
   if (function.is_optimizable()) {
-    // Compilation patches the entry of unoptimized code.
-    ASSERT(!function.HasOptimizedCode());
     const Error& error =
         Error::Handle(Compiler::CompileOptimizedFunction(function));
     if (!error.IsNull()) {
@@ -1553,7 +1551,9 @@
     }
     const Code& optimized_code = Code::Handle(function.CurrentCode());
     ASSERT(!optimized_code.IsNull());
-    function.set_usage_counter(0);
+    // Set usage counter for reoptimization.
+    function.set_usage_counter(
+        function.usage_counter() - FLAG_reoptimization_counter_threshold);
   } else {
     if (FLAG_trace_failed_optimization_attempts) {
       PrintCaller("Not Optimizable");
@@ -1567,8 +1567,9 @@
 // The caller must be a static call in a Dart frame, or an entry frame.
 // Patch static call to point to 'new_entry_point'.
 DEFINE_RUNTIME_ENTRY(FixCallersTarget, 1) {
-  ASSERT(arguments.Count() == kFixCallersTargetRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() ==
+      kFixCallersTargetRuntimeEntry.argument_count());
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   ASSERT(!function.IsNull());
   ASSERT(function.HasCode());
 
@@ -1641,41 +1642,73 @@
 }
 
 
+static void DeoptimizeAt(const Code& optimized_code, uword pc) {
+  DeoptInfo& deopt_info = DeoptInfo::Handle();
+  DeoptReasonId deopt_reason = kDeoptUnknown;
+  GetDeoptInfoAtPc(optimized_code, pc, &deopt_info, &deopt_reason);
+  ASSERT(!deopt_info.IsNull());
+  const Function& function = Function::Handle(optimized_code.function());
+  const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
+  ASSERT(!unoptimized_code.IsNull());
+  // The switch to unoptimized code may have already occured.
+  if (function.HasOptimizedCode()) {
+    function.SwitchToUnoptimizedCode();
+  }
+  // Patch call site (lazy deoptimization is quite rare, patching it twice
+  // is not a performance issue).
+  uword lazy_deopt_jump = optimized_code.GetLazyDeoptPc();
+  ASSERT(lazy_deopt_jump != 0);
+  CodePatcher::InsertCallAt(pc, lazy_deopt_jump);
+  // Mark code as dead (do not GC its embedded objects).
+  optimized_code.set_is_alive(false);
+}
+
+
 // Currently checks only that all optimized frames have kDeoptIndex
 // and unoptimized code has the kDeoptAfter.
 void DeoptimizeAll() {
   DartFrameIterator iterator;
   StackFrame* frame = iterator.NextFrame();
   Code& optimized_code = Code::Handle();
-  Function& function = Function::Handle();
-  Code& unoptimized_code = Code::Handle();
   while (frame != NULL) {
     optimized_code = frame->LookupDartCode();
     if (optimized_code.is_optimized()) {
-      DeoptInfo& deopt_info = DeoptInfo::Handle();
-      DeoptReasonId deopt_reason = kDeoptUnknown;
-      GetDeoptInfoAtPc(optimized_code, frame->pc(), &deopt_info, &deopt_reason);
-      ASSERT(!deopt_info.IsNull());
-      function = optimized_code.function();
-      unoptimized_code = function.unoptimized_code();
-      ASSERT(!unoptimized_code.IsNull());
-      // The switch to unoptimized code may have already occured.
-      if (function.HasOptimizedCode()) {
-        function.SwitchToUnoptimizedCode();
-      }
-      // Patch call site (lazy deoptimization is quite rare, patching it twice
-      // is not a performance issue).
-      uword lazy_deopt_jump = optimized_code.GetLazyDeoptPc();
-      ASSERT(lazy_deopt_jump != 0);
-      CodePatcher::InsertCallAt(frame->pc(), lazy_deopt_jump);
-      // Mark code as dead (do not GC its embedded objects).
-      optimized_code.set_is_alive(false);
+      DeoptimizeAt(optimized_code, frame->pc());
     }
     frame = iterator.NextFrame();
   }
 }
 
 
+// Returns true if the given array of cids contains the given cid.
+static bool ContainsCid(const GrowableArray<intptr_t>& cids, intptr_t cid) {
+  for (intptr_t i = 0; i < cids.length(); i++) {
+    if (cids[i] == cid) {
+      return true;
+    }
+  }
+  return false;
+}
+
+
+// Deoptimize optimized code on stack if its class is in the 'classes' array.
+void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes) {
+  DartFrameIterator iterator;
+  StackFrame* frame = iterator.NextFrame();
+  Code& optimized_code = Code::Handle();
+  while (frame != NULL) {
+    optimized_code = frame->LookupDartCode();
+    if (optimized_code.is_optimized()) {
+      const intptr_t owner_cid = Class::Handle(Function::Handle(
+          optimized_code.function()).Owner()).id();
+      if (ContainsCid(classes, owner_cid)) {
+        DeoptimizeAt(optimized_code, frame->pc());
+      }
+    }
+  }
+}
+
+
 // Copy saved registers into the isolate buffer.
 static void CopySavedRegisters(uword saved_registers_address) {
   double* xmm_registers_copy = new double[kNumberOfXmmRegisters];
@@ -1779,7 +1812,8 @@
 
 static intptr_t DeoptimizeWithDeoptInfo(const Code& code,
                                         const DeoptInfo& deopt_info,
-                                        const StackFrame& caller_frame) {
+                                        const StackFrame& caller_frame,
+                                        DeoptReasonId deopt_reason) {
   const intptr_t len = deopt_info.TranslationLength();
   GrowableArray<DeoptInstr*> deopt_instructions(len);
   const Array& deopt_table = Array::Handle(code.deopt_info_array());
@@ -1798,7 +1832,8 @@
   DeoptimizationContext deopt_context(start,
                                       to_frame_size,
                                       Array::Handle(code.object_table()),
-                                      num_args);
+                                      num_args,
+                                      deopt_reason);
   for (intptr_t to_index = len - 1; to_index >= 0; to_index--) {
     deopt_instructions[to_index]->Execute(&deopt_context, to_index);
   }
@@ -1843,7 +1878,8 @@
   ASSERT(!deopt_info.IsNull());
 
   const intptr_t caller_fp =
-      DeoptimizeWithDeoptInfo(optimized_code, deopt_info, *caller_frame);
+      DeoptimizeWithDeoptInfo(optimized_code, deopt_info, *caller_frame,
+                              deopt_reason);
 
   isolate->SetDeoptFrameCopy(NULL, 0);
   isolate->set_deopt_cpu_registers_copy(NULL);
diff --git a/runtime/vm/code_generator.h b/runtime/vm/code_generator.h
index 7716ccf..a212cea 100644
--- a/runtime/vm/code_generator.h
+++ b/runtime/vm/code_generator.h
@@ -34,6 +34,7 @@
 DECLARE_RUNTIME_ENTRY(InvokeImplicitClosureFunction);
 DECLARE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction);
 DECLARE_RUNTIME_ENTRY(OptimizeInvokedFunction);
+DECLARE_RUNTIME_ENTRY(TraceICCall);
 DECLARE_RUNTIME_ENTRY(PatchStaticCall);
 DECLARE_RUNTIME_ENTRY(ReportObjectNotClosure);
 DECLARE_RUNTIME_ENTRY(ResolveCompileInstanceFunction);
@@ -49,15 +50,7 @@
 
 #define DEOPT_REASONS(V)                                                       \
   V(Unknown)                                                                   \
-  V(IncrLocal)                                                                 \
-  V(IncrInstance)                                                              \
-  V(IncrInstanceOneClass)                                                      \
-  V(InstanceGetterSameTarget)                                                  \
   V(InstanceGetter)                                                            \
-  V(StoreIndexed)                                                              \
-  V(StoreIndexedPolymorphic)                                                   \
-  V(PolymorphicInstanceCallSmiOnly)                                            \
-  V(PolymorphicInstanceCallSmiFail)                                            \
   V(PolymorphicInstanceCallTestFail)                                           \
   V(InstanceCallNoICData)                                                      \
   V(IntegerToDouble)                                                           \
@@ -65,20 +58,10 @@
   V(BinaryMintOp)                                                              \
   V(ShiftMintOp)                                                               \
   V(BinaryDoubleOp)                                                            \
-  V(InstanceSetterSameTarget)                                                  \
   V(InstanceSetter)                                                            \
-  V(SmiEquality)                                                               \
   V(Equality)                                                                  \
   V(RelationalOp)                                                              \
-  V(SmiCompareSmi)                                                             \
-  V(SmiCompareAny)                                                             \
-  V(DoubleCompareDouble)                                                       \
-  V(EqualityNoFeedback)                                                        \
   V(EqualityClassCheck)                                                        \
-  V(DoubleComparison)                                                          \
-  V(LoadIndexedFixedArray)                                                     \
-  V(LoadIndexedGrowableArray)                                                  \
-  V(LoadIndexedPolymorphic)                                                    \
   V(NoTypeFeedback)                                                            \
   V(UnaryOp)                                                                   \
   V(UnboxInteger)                                                              \
@@ -102,6 +85,7 @@
                                           const Instance& receiver);
 
 void DeoptimizeAll();
+void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes);
 
 }  // namespace dart
 
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index 1ac2d95..90d1e09 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -216,20 +216,18 @@
   default_values.SetAt(0, Smi::ZoneHandle(Smi::New(1)));  // b = 1.
   test->set_default_parameter_values(default_values);
   const Function& function = test->function();
+  function.set_is_native(true);
   function.set_num_fixed_parameters(num_fixed_params);
   function.SetNumOptionalParameters(num_opt_params, true);
-  const bool has_opt_params = true;
   const String& native_name =
       String::ZoneHandle(Symbols::New("TestSmiSub"));
   NativeFunction native_function =
       reinterpret_cast<NativeFunction>(TestSmiSub);
   node_seq->Add(new ReturnNode(kPos,
                                new NativeBodyNode(kPos,
+                                                  function,
                                                   native_name,
-                                                  native_function,
-                                                  num_params,
-                                                  has_opt_params,
-                                                  false)));
+                                                  native_function)));
 }
 
 
@@ -392,6 +390,7 @@
   default_values.SetAt(2, Smi::ZoneHandle(Smi::New(-32)));
   test->set_default_parameter_values(default_values);
   const Function& function = test->function();
+  function.set_is_native(true);
   function.set_num_fixed_parameters(num_fixed_params);
   function.SetNumOptionalParameters(num_opt_params, true);
   function.set_parameter_types(Array::Handle(Array::New(num_params)));
@@ -400,18 +399,15 @@
   for (int i = 0; i < num_params - 1; i++) {
     function.SetParameterTypeAt(i, param_type);
   }
-  const bool has_opt_params = true;
   const String& native_name =
       String::ZoneHandle(Symbols::New("TestSmiSum"));
   NativeFunction native_function =
       reinterpret_cast<NativeFunction>(TestSmiSum);
   node_seq->Add(new ReturnNode(kPos,
                                new NativeBodyNode(kPos,
+                                                  function,
                                                   native_name,
-                                                  native_function,
-                                                  num_params,
-                                                  has_opt_params,
-                                                  false)));
+                                                  native_function)));
 }
 
 
diff --git a/runtime/vm/code_patcher_ia32_test.cc b/runtime/vm/code_patcher_ia32_test.cc
index 924edd6..f88550d 100644
--- a/runtime/vm/code_patcher_ia32_test.cc
+++ b/runtime/vm/code_patcher_ia32_test.cc
@@ -20,19 +20,16 @@
 
 CODEGEN_TEST_GENERATE(NativePatchStaticCall, test) {
   SequenceNode* node_seq = test->node_sequence();
-  const int num_params = 0;
-  const bool has_opt_params = false;
   const String& native_name =
       String::ZoneHandle(Symbols::New("TestStaticCallPatching"));
   NativeFunction native_function =
       reinterpret_cast<NativeFunction>(TestStaticCallPatching);
+  test->function().set_is_native(true);
   node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
                                new NativeBodyNode(Scanner::kDummyTokenIndex,
+                                                  test->function(),
                                                   native_name,
-                                                  native_function,
-                                                  num_params,
-                                                  has_opt_params,
-                                                  false)));
+                                                  native_function)));
 }
 
 CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) {
diff --git a/runtime/vm/code_patcher_x64_test.cc b/runtime/vm/code_patcher_x64_test.cc
index 02ed092..2cfd598 100644
--- a/runtime/vm/code_patcher_x64_test.cc
+++ b/runtime/vm/code_patcher_x64_test.cc
@@ -20,19 +20,16 @@
 
 CODEGEN_TEST_GENERATE(NativePatchStaticCall, test) {
   SequenceNode* node_seq = test->node_sequence();
-  const int num_params = 0;
-  const bool has_opt_params = false;
   const String& native_name =
       String::ZoneHandle(Symbols::New("TestStaticCallPatching"));
   NativeFunction native_function =
       reinterpret_cast<NativeFunction>(TestStaticCallPatching);
+  test->function().set_is_native(true);
   node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
                                new NativeBodyNode(Scanner::kDummyTokenIndex,
+                                                  test->function(),
                                                   native_name,
-                                                  native_function,
-                                                  num_params,
-                                                  has_opt_params,
-                                                  false)));
+                                                  native_function)));
 }
 
 CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) {
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 16c426e..4b11672 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -57,8 +57,8 @@
 // Compile a function. Should call only if the function has not been compiled.
 //   Arg0: function object.
 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {
-  ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count());
-  const Function& function = Function::CheckedHandle(arguments.At(0));
+  ASSERT(arguments.ArgCount() == kCompileFunctionRuntimeEntry.argument_count());
+  const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
   ASSERT(!function.HasCode());
   const Error& error = Error::Handle(Compiler::CompileFunction(function));
   if (!error.IsNull()) {
@@ -435,7 +435,8 @@
     TIMERSCOPE(time_compilation);
     Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
     per_compile_timer.Start();
-    ParsedFunction* parsed_function = new ParsedFunction(function);
+    ParsedFunction* parsed_function = new ParsedFunction(
+        Function::ZoneHandle(function.raw()));
     if (FLAG_trace_compiler) {
       OS::Print("Compiling %sfunction: '%s' @ token %"Pd"\n",
                 (optimized ? "optimized " : ""),
@@ -535,7 +536,9 @@
   for (int i = 0; i < functions.Length(); i++) {
     func ^= functions.At(i);
     ASSERT(!func.IsNull());
-    if (!func.HasCode() && !func.is_abstract()) {
+    if (!func.HasCode() &&
+        !func.is_abstract() &&
+        !func.IsRedirectingFactory()) {
       error = CompileFunction(func);
       if (!error.IsNull()) {
         return error.raw();
@@ -561,7 +564,7 @@
     // The function needs to be associated with a named Class: the interface
     // Function fits the bill.
     const char* kEvalConst = "eval_const";
-    const Function& func = Function::Handle(Function::New(
+    const Function& func = Function::ZoneHandle(Function::New(
         String::Handle(Symbols::New(kEvalConst)),
         RawFunction::kConstImplicitGetter,
         true,  // static function.
@@ -582,7 +585,7 @@
     // here.
     ParsedFunction* parsed_function = new ParsedFunction(func);
     parsed_function->SetNodeSequence(fragment);
-    parsed_function->set_default_parameter_values(Array::Handle());
+    parsed_function->set_default_parameter_values(Array::ZoneHandle());
     parsed_function->set_expression_temp_var(
         ParsedFunction::CreateExpressionTempVar(0));
     fragment->scope()->AddVariable(parsed_function->expression_temp_var());
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 202a81f..88d0389 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1022,7 +1022,9 @@
 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message) {
   uint8_t* buffer = NULL;
   ApiMessageWriter writer(&buffer, allocator);
-  writer.WriteCMessage(message);
+  bool success = writer.WriteCMessage(message);
+
+  if (!success) return success;
 
   // Post the message at the given port.
   return PortMap::PostMessage(new Message(
@@ -1514,7 +1516,7 @@
 }
 
 
-DART_EXPORT bool Dart_IsAsciiString(Dart_Handle object) {
+DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object) {
   return RawObject::IsOneByteStringClassId(Api::ClassId(object));
 }
 
@@ -1707,16 +1709,63 @@
 }
 
 
+DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str,
+                                               intptr_t* size) {
+  Isolate* isolate = Isolate::Current();
+  DARTSCOPE(isolate);
+  const String& str_obj = Api::UnwrapStringHandle(isolate, str);
+  if (str_obj.IsNull()) {
+    RETURN_TYPE_ERROR(isolate, str, String);
+  }
+  if (size == NULL) {
+    RETURN_NULL_ERROR(size);
+  }
+  *size = (str_obj.Length() * str_obj.CharSize());
+  return Api::Success(isolate);
+}
+
+
+DART_EXPORT Dart_Handle Dart_MakeExternalString(Dart_Handle str,
+                                                void* array,
+                                                intptr_t length,
+                                                void* peer,
+                                                Dart_PeerFinalizer cback) {
+  Isolate* isolate = Isolate::Current();
+  DARTSCOPE(isolate);
+  const String& str_obj = Api::UnwrapStringHandle(isolate, str);
+  if (str_obj.IsExternal()) {
+    return str;  // String is already an external string.
+  }
+  if (str_obj.IsNull()) {
+    RETURN_TYPE_ERROR(isolate, str, String);
+  }
+  if (array == NULL) {
+    RETURN_NULL_ERROR(array);
+  }
+  intptr_t str_size = (str_obj.Length() * str_obj.CharSize());
+  if ((length < str_size) || (length > String::kMaxElements)) {
+    return Api::NewError("Dart_MakeExternalString "
+                         "expects argument length to be in the range"
+                         "[%"Pd"..%"Pd"].",
+                         str_size, String::kMaxElements);
+  }
+  return Api::NewHandle(isolate,
+                        str_obj.MakeExternal(array, length, peer, cback));
+}
+
+
 // --- Lists ---
 
 
 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) {
   if (obj.IsInstance()) {
     const Instance& instance = Instance::Cast(obj);
-    const Type& type =
-        Type::Handle(isolate, isolate->object_store()->list_interface());
+    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 (instance.IsInstanceOf(type,
+    if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate),
+                              list_class,
                               TypeArguments::Handle(isolate),
                               &malformed_type_error)) {
       ASSERT(malformed_type_error.IsNull());  // Type is a raw List.
@@ -1948,7 +1997,8 @@
   Isolate* isolate = Isolate::Current();
   DARTSCOPE(isolate);
   const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(list));
-  if (obj.IsUint8Array() || obj.IsExternalUint8Array()) {
+  if (obj.IsUint8Array() || obj.IsExternalUint8Array() ||
+      obj.IsInt8Array() || obj.IsExternalInt8Array()) {
     const ByteArray& byte_array = ByteArray::Cast(obj);
     if (Utils::RangeCheck(offset, length, byte_array.Length())) {
       ByteArray::Copy(native_array, byte_array, offset, length);
@@ -3832,7 +3882,7 @@
         "%s: invalid index %d passed in to access native instance field",
         CURRENT_FUNC, index);
   }
-  *value = instance.GetNativeField(index);
+  *value = instance.GetNativeField(isolate, index);
   return Api::Success(isolate);
 }
 
@@ -3936,20 +3986,18 @@
 DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args,
                                                int index) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
-  if (index < 0 || index >= arguments->Count()) {
+  if ((index < 0) || (index >= arguments->NativeArgCount())) {
     return Api::NewError(
         "%s: argument 'index' out of range. Expected 0..%d but saw %d.",
-        CURRENT_FUNC, arguments->Count() - 1, index);
+        CURRENT_FUNC, arguments->NativeArgCount() - 1, index);
   }
-  Isolate* isolate = arguments->isolate();
-  CHECK_ISOLATE(isolate);
-  return Api::NewHandle(isolate, arguments->At(index));
+  return Api::NewHandle(arguments->isolate(), arguments->NativeArgAt(index));
 }
 
 
 DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
-  return arguments->Count();
+  return arguments->NativeArgCount();
 }
 
 
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 8ab263a..0fa7e0b 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -518,7 +518,7 @@
   Dart_Handle str8 = Dart_NewStringFromUTF8(data8, ARRAY_SIZE(data8));
   EXPECT_VALID(str8);
   EXPECT(Dart_IsString(str8));
-  EXPECT(Dart_IsAsciiString(str8));
+  EXPECT(Dart_IsStringLatin1(str8));
   EXPECT(!Dart_IsExternalString(str8));
 
   Dart_Handle ext8 = Dart_NewExternalUTF8String(data8, ARRAY_SIZE(data8),
@@ -532,7 +532,7 @@
   Dart_Handle str16 = Dart_NewStringFromUTF16(data16, ARRAY_SIZE(data16));
   EXPECT_VALID(str16);
   EXPECT(Dart_IsString(str16));
-  EXPECT(!Dart_IsAsciiString(str16));
+  EXPECT(!Dart_IsStringLatin1(str16));
   EXPECT(!Dart_IsExternalString(str16));
 
   Dart_Handle ext16 = Dart_NewExternalUTF16String(data16, ARRAY_SIZE(data16),
@@ -2909,15 +2909,16 @@
   obj ^= Api::UnwrapHandle(result);
   const Class& cls = Class::Handle(obj.clazz());
   // We expect the newly created "NativeFields" object to have
-  // 2 dart instance fields (fld1, fld2) and kNumNativeFields native fields.
+  // 2 dart instance fields (fld1, fld2) and a reference to the native fields.
   // Hence the size of an instance of "NativeFields" should be
-  // (kNumNativeFields + 2) * kWordSize + size of object header.
+  // (1 + 2) * kWordSize + size of object header.
   // We check to make sure the instance size computed by the VM matches
   // our expectations.
   intptr_t header_size = sizeof(RawObject);
-  EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + header_size,
+  EXPECT_EQ(Utils::RoundUp(((1 + 2) * kWordSize) + header_size,
                            kObjectAlignment),
             cls.instance_size());
+  EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
 }
 
 
@@ -2977,15 +2978,16 @@
   obj ^= Api::UnwrapHandle(result);
   const Class& cls = Class::Handle(obj.clazz());
   // We expect the newly created "NativeFields" object to have
-  // 2 dart instance fields (fld1, fld2) and kNumNativeFields native fields.
+  // 2 dart instance fields (fld1, fld2) and a reference to the native fields.
   // Hence the size of an instance of "NativeFields" should be
-  // (kNumNativeFields + 2) * kWordSize + size of object header.
+  // (1 + 2) * kWordSize + size of object header.
   // We check to make sure the instance size computed by the VM matches
   // our expectations.
   intptr_t header_size = sizeof(RawObject);
-  EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + header_size,
+  EXPECT_EQ(Utils::RoundUp(((1 + 2) * kWordSize) + header_size,
                            kObjectAlignment),
             cls.instance_size());
+  EXPECT_EQ(kNumNativeFields, cls.num_native_fields());
 }
 
 
@@ -3223,7 +3225,7 @@
       "  return obj;\n"
       "}\n"
       "Function testMain2() {\n"
-      "  return function() {};\n"
+      "  return () {};\n"
       "}\n";
   Dart_Handle result;
   DARTSCOPE_NOCHECKS(Isolate::Current());
@@ -3280,6 +3282,41 @@
 }
 
 
+TEST_CASE(NegativeNativeFieldInIsolateMessage) {
+  const char* kScriptChars =
+      "import 'dart:isolate';\n"
+      "import 'dart:nativewrappers';\n"
+      "echo() {\n"
+      "  port.receive((msg, reply) {\n"
+      "    reply.send('echoing ${msg(1)}}');\n"
+      "  });\n"
+      "}\n"
+      "class Test extends NativeFieldWrapperClass2 {\n"
+      "  Test(this.i, this.j);\n"
+      "  int i, j;\n"
+      "}\n"
+      "main() {\n"
+      "  var snd = spawnFunction(echo);\n"
+      "  var obj = new Test(1,2);\n"
+      "  snd.send(obj, port.toSendPort());\n"
+      "  port.receive((msg, reply) {\n"
+      "    print('from worker ${msg}');\n"
+      "  });\n"
+      "}\n";
+
+  DARTSCOPE_NOCHECKS(Isolate::Current());
+
+  // Create a test library and Load up a test script in it.
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+
+  // Invoke 'main' which should spawn an isolate and try to send an
+  // object with native fields over to the spawned isolate. This
+  // should result in an unhandled exception which is checked.
+  Dart_Handle retobj = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT(Dart_IsError(retobj));
+}
+
+
 TEST_CASE(GetStaticField_RunsInitializer) {
   const char* kScriptChars =
       "class TestClass  {\n"
@@ -7162,6 +7199,191 @@
   EXPECT_EQ(0, isolate->heap()->PeerCount());
 }
 
+
+// Test API call to make strings external.
+static void MakeExternalCback(void* peer) {
+  *static_cast<int*>(peer) *= 2;
+}
+
+
+TEST_CASE(MakeExternalString) {
+  int peer8 = 40;
+  int peer16 = 41;
+  intptr_t length = 0;
+  intptr_t expected_length = 0;
+  {
+    Dart_EnterScope();
+
+    // First test some negative conditions.
+    uint8_t data8[] = { 'h', 'e', 'l', 'l', 'o' };
+    const char* err = "string";
+    Dart_Handle err_str = NewString(err);
+    Dart_Handle ext_err_str = Dart_NewExternalUTF8String(
+        data8, ARRAY_SIZE(data8), NULL, NULL);
+    Dart_Handle result = Dart_MakeExternalString(Dart_Null(),
+                                                 data8,
+                                                 ARRAY_SIZE(data8),
+                                                 NULL,
+                                                 NULL);
+    EXPECT(Dart_IsError(result));  // Null string object passed in.
+    result = Dart_MakeExternalString(err_str,
+                                     NULL,
+                                     ARRAY_SIZE(data8),
+                                     NULL,
+                                     NULL);
+    EXPECT(Dart_IsError(result));  // Null array pointer passed in.
+    result = Dart_MakeExternalString(err_str,
+                                     data8,
+                                     1,
+                                     NULL,
+                                     NULL);
+    EXPECT(Dart_IsError(result));  // Invalid length passed in.
+
+    const intptr_t kLength = 10;
+    intptr_t size = 0;
+
+    // Test with an external string.
+    result = Dart_MakeExternalString(ext_err_str,
+                                     data8,
+                                     ARRAY_SIZE(data8),
+                                     NULL,
+                                     NULL);
+    EXPECT(Dart_IsString(result));
+    EXPECT(Dart_IsExternalString(result));
+
+    // Test with an empty string.
+    Dart_Handle empty_str = NewString("");
+    EXPECT(Dart_IsString(empty_str));
+    EXPECT(!Dart_IsExternalString(empty_str));
+    uint8_t ext_empty_str[kLength];
+    Dart_Handle str = Dart_MakeExternalString(empty_str,
+                                              ext_empty_str,
+                                              kLength,
+                                              NULL,
+                                              NULL);
+    EXPECT(Dart_IsString(str));
+    EXPECT(Dart_IsString(empty_str));
+    EXPECT(Dart_IsStringLatin1(str));
+    EXPECT(Dart_IsStringLatin1(empty_str));
+    EXPECT(Dart_IsExternalString(str));
+    EXPECT(Dart_IsExternalString(empty_str));
+    EXPECT_VALID(Dart_StringLength(str, &length));
+    EXPECT_EQ(0, length);
+
+    // Test with a one byte ascii string.
+    const char* ascii = "string";
+    expected_length = strlen(ascii);
+    Dart_Handle ascii_str = NewString(ascii);
+    EXPECT_VALID(ascii_str);
+    EXPECT(Dart_IsString(ascii_str));
+    EXPECT(Dart_IsStringLatin1(ascii_str));
+    EXPECT(!Dart_IsExternalString(ascii_str));
+    EXPECT_VALID(Dart_StringLength(ascii_str, &length));
+    EXPECT_EQ(expected_length, length);
+
+    uint8_t ext_ascii_str[kLength];
+    EXPECT_VALID(Dart_StringStorageSize(ascii_str, &size));
+    str = Dart_MakeExternalString(ascii_str,
+                                  ext_ascii_str,
+                                  size,
+                                  &peer8,
+                                  MakeExternalCback);
+    EXPECT(Dart_IsString(str));
+    EXPECT(Dart_IsString(ascii_str));
+    EXPECT(Dart_IsStringLatin1(str));
+    EXPECT(Dart_IsStringLatin1(ascii_str));
+    EXPECT(Dart_IsExternalString(str));
+    EXPECT(Dart_IsExternalString(ascii_str));
+    EXPECT_VALID(Dart_StringLength(str, &length));
+    EXPECT_EQ(expected_length, length);
+    EXPECT_VALID(Dart_StringLength(ascii_str, &length));
+    EXPECT_EQ(expected_length, length);
+    EXPECT(Dart_IdentityEquals(str, ascii_str));
+    for (intptr_t i = 0; i < length; i++) {
+      EXPECT_EQ(ascii[i], ext_ascii_str[i]);
+    }
+
+    uint8_t data[] = { 0xE4, 0xBA, 0x8c };  // U+4E8C.
+    expected_length = 1;
+    Dart_Handle utf16_str = Dart_NewStringFromUTF8(data, ARRAY_SIZE(data));
+    EXPECT_VALID(utf16_str);
+    EXPECT(Dart_IsString(utf16_str));
+    EXPECT(!Dart_IsStringLatin1(utf16_str));
+    EXPECT(!Dart_IsExternalString(utf16_str));
+    EXPECT_VALID(Dart_StringLength(utf16_str, &length));
+    EXPECT_EQ(expected_length, length);
+
+    // Test with a two byte string.
+    uint16_t ext_utf16_str[kLength];
+    EXPECT_VALID(Dart_StringStorageSize(utf16_str, &size));
+    str = Dart_MakeExternalString(utf16_str,
+                                  ext_utf16_str,
+                                  size,
+                                  &peer16,
+                                  MakeExternalCback);
+    EXPECT(Dart_IsString(str));
+    EXPECT(Dart_IsString(utf16_str));
+    EXPECT(!Dart_IsStringLatin1(str));
+    EXPECT(!Dart_IsStringLatin1(utf16_str));
+    EXPECT(Dart_IsExternalString(str));
+    EXPECT(Dart_IsExternalString(utf16_str));
+    EXPECT_VALID(Dart_StringLength(str, &length));
+    EXPECT_EQ(expected_length, length);
+    EXPECT_VALID(Dart_StringLength(utf16_str, &length));
+    EXPECT_EQ(expected_length, length);
+    EXPECT(Dart_IdentityEquals(str, utf16_str));
+    for (intptr_t i = 0; i < length; i++) {
+      EXPECT_EQ(0x4e8c, ext_utf16_str[i]);
+    }
+
+    Dart_ExitScope();
+  }
+  EXPECT_EQ(40, peer8);
+  EXPECT_EQ(41, peer16);
+  Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
+  EXPECT_EQ(80, peer8);
+  EXPECT_EQ(82, peer16);
+}
+
+
+TEST_CASE(LazyLoadDeoptimizes) {
+  const char* kLoadFirst =
+      "start(a) {\n"
+      "  var obj = (a == 1) ? createB() : new A();\n"
+      "  for (int i = 0; i < 4000; i++) {\n"
+      "    var res = obj.foo();\n"
+      "    if (a == 1) { if (res != 1) throw 'Error'; }\n"
+      "    else if (res != 2) throw 'Error'; \n"
+      "  }\n"
+      "}\n"
+      "\n"
+      "createB() => new B();"
+      "\n"
+      "class A {\n"
+      "  foo() => goo();\n"
+      "  goo() => 2;\n"
+      "}\n";
+  const char* kLoadSecond =
+      "class B extends A {\n"
+      "  goo() => 1;\n"
+      "}\n";
+  Dart_Handle result;
+  // Create a test library and Load up a test script in it.
+  Dart_Handle lib1 = TestCase::LoadTestScript(kLoadFirst, NULL);
+  Dart_Handle dart_args[1];
+  dart_args[0] = Dart_NewInteger(0);
+  result = Dart_Invoke(lib1, NewString("start"), 1, dart_args);
+  EXPECT_VALID(result);
+
+  Dart_Handle source = NewString(kLoadSecond);
+  Dart_Handle url = NewString(TestCase::url());
+  Dart_LoadSource(TestCase::lib(), url, source);
+
+  dart_args[0] = Dart_NewInteger(1);
+  result = Dart_Invoke(lib1, NewString("start"), 1, dart_args);
+  EXPECT_VALID(result);
+}
+
 #endif  // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
 
 }  // namespace dart
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
index 7541536..64eea31 100644
--- a/runtime/vm/dart_api_message.cc
+++ b/runtime/vm/dart_api_message.cc
@@ -6,6 +6,7 @@
 #include "vm/object.h"
 #include "vm/snapshot_ids.h"
 #include "vm/symbols.h"
+#include "vm/unicode.h"
 
 namespace dart {
 
@@ -346,18 +347,48 @@
       intptr_t len = ReadSmiValue();
       intptr_t hash = ReadSmiValue();
       USE(hash);
-      Dart_CObject* object = AllocateDartCObjectString(len);
+      uint8_t *latin1 =
+          reinterpret_cast<uint8_t*>(::malloc(len * sizeof(uint8_t)));
+      intptr_t utf8_len = 0;
+      for (intptr_t i = 0; i < len; i++) {
+        latin1[i] = Read<uint8_t>();
+        utf8_len += Utf8::Length(latin1[i]);
+      }
+      Dart_CObject* object = AllocateDartCObjectString(utf8_len);
       AddBackRef(object_id, object, kIsDeserialized);
       char* p = object->value.as_string;
       for (intptr_t i = 0; i < len; i++) {
-        p[i] = Read<uint8_t>();
+        p += Utf8::Encode(latin1[i], p);
       }
-      p[len] = '\0';
+      *p = '\0';
+      ASSERT(p == (object->value.as_string + utf8_len));
+      ::free(latin1);
       return object;
     }
-    case kTwoByteStringCid:
-      // Two byte strings not supported.
-      return AllocateDartCObjectUnsupported();
+    case kTwoByteStringCid: {
+      intptr_t len = ReadSmiValue();
+      intptr_t hash = ReadSmiValue();
+      USE(hash);
+      uint16_t *utf16 =
+          reinterpret_cast<uint16_t*>(::malloc(len * sizeof(uint16_t)));
+      intptr_t utf8_len = 0;
+      for (intptr_t i = 0; i < len; i++) {
+        utf16[i] = Read<uint16_t>();
+        // TODO(sgjesse): Check for surrogate pairs.
+        utf8_len += Utf8::Length(utf16[i]);
+      }
+      Dart_CObject* object = AllocateDartCObjectString(utf8_len);
+      AddBackRef(object_id, object, kIsDeserialized);
+      char* p = object->value.as_string;
+      for (intptr_t i = 0; i < len; i++) {
+        // TODO(sgjesse): Check for surrogate pairs.
+        p += Utf8::Encode(utf16[i], p);
+      }
+      *p = '\0';
+      ASSERT(p == (object->value.as_string + utf8_len));
+      ::free(utf16);
+      return object;
+    }
     case kUint8ArrayCid: {
       intptr_t len = ReadSmiValue();
       Dart_CObject* object = AllocateDartCObjectUint8Array(len);
@@ -410,7 +441,7 @@
       object_id == kDoubleType ||
       object_id == kIntType ||
       object_id == kBoolType ||
-      object_id == kStringInterface) {
+      object_id == kStringType) {
     // Always return dynamic type (this is only a marker).
     return &dynamic_type_marker;
   }
@@ -616,11 +647,11 @@
 }
 
 
-void ApiMessageWriter::WriteCObject(Dart_CObject* object) {
+bool ApiMessageWriter::WriteCObject(Dart_CObject* object) {
   if (IsCObjectMarked(object)) {
     intptr_t object_id = GetMarkedCObjectMark(object);
     WriteIndexedObject(kMaxPredefinedObjectIds + object_id);
-    return;
+    return true;
   }
 
   Dart_CObject::Type type = object->type;
@@ -636,19 +667,20 @@
     WriteNullObject();
     // Write out array elements.
     for (int i = 0; i < object->value.as_array.length; i++) {
-      WriteCObjectRef(object->value.as_array.values[i]);
+      bool success = WriteCObjectRef(object->value.as_array.values[i]);
+      if (!success) return false;
     }
-    return;
+    return true;
   }
-  WriteCObjectInlined(object, type);
+  return WriteCObjectInlined(object, type);
 }
 
 
-void ApiMessageWriter::WriteCObjectRef(Dart_CObject* object) {
+bool ApiMessageWriter::WriteCObjectRef(Dart_CObject* object) {
   if (IsCObjectMarked(object)) {
     intptr_t object_id = GetMarkedCObjectMark(object);
     WriteIndexedObject(kMaxPredefinedObjectIds + object_id);
-    return;
+    return true;
   }
 
   Dart_CObject::Type type = object->type;
@@ -661,13 +693,13 @@
     WriteSmi(object->value.as_array.length);
     // Add object to forward list so that this object is serialized later.
     AddToForwardList(object);
-    return;
+    return true;
   }
-  WriteCObjectInlined(object, type);
+  return WriteCObjectInlined(object, type);
 }
 
 
-void ApiMessageWriter::WriteForwardedCObject(Dart_CObject* object) {
+bool ApiMessageWriter::WriteForwardedCObject(Dart_CObject* object) {
   ASSERT(IsCObjectMarked(object));
   Dart_CObject::Type type =
       static_cast<Dart_CObject::Type>(object->type & kDartCObjectTypeMask);
@@ -685,12 +717,14 @@
   WriteNullObject();
   // Write out array elements.
   for (int i = 0; i < object->value.as_array.length; i++) {
-    WriteCObjectRef(object->value.as_array.values[i]);
+    bool success = WriteCObjectRef(object->value.as_array.values[i]);
+    if (!success) return false;
   }
+  return true;
 }
 
 
-void ApiMessageWriter::WriteCObjectInlined(Dart_CObject* object,
+bool ApiMessageWriter::WriteCObjectInlined(Dart_CObject* object,
                                            Dart_CObject::Type type) {
   switch (type) {
     case Dart_CObject::kNull:
@@ -734,18 +768,42 @@
       Write<double>(object->value.as_double);
       break;
     case Dart_CObject::kString: {
+      const uint8_t* utf8_str =
+          reinterpret_cast<const uint8_t*>(object->value.as_string);
+      intptr_t utf8_len = strlen(object->value.as_string);
+      if (!Utf8::IsValid(utf8_str, utf8_len)) {
+        return false;
+      }
+
+      Utf8::Type type;
+      intptr_t len = Utf8::CodePointCount(utf8_str, utf8_len, &type);
+
       // Write out the serialization header value for this object.
       WriteInlinedHeader(object);
       // Write out the class and tags information.
-      WriteIndexedObject(kOneByteStringCid);
+      WriteIndexedObject(type == Utf8::kLatin1 ? kOneByteStringCid
+                                               : kTwoByteStringCid);
       WriteIntptrValue(0);
       // Write string length, hash and content
-      char* str = object->value.as_string;
-      intptr_t len = strlen(str);
       WriteSmi(len);
       WriteSmi(0);  // TODO(sgjesse): Hash - not written.
-      for (intptr_t i = 0; i < len; i++) {
-        Write<uint8_t>(str[i]);
+      if (type == Utf8::kLatin1) {
+        uint8_t* latin1_str =
+            reinterpret_cast<uint8_t*>(::malloc(len * sizeof(uint8_t)));
+        Utf8::DecodeToLatin1(utf8_str, utf8_len, latin1_str, len);
+        for (intptr_t i = 0; i < len; i++) {
+          Write<uint8_t>(latin1_str[i]);
+        }
+        ::free(latin1_str);
+      } else {
+        // TODO(sgjesse): Make sure surrogate pairs are handled.
+        uint16_t* utf16_str =
+            reinterpret_cast<uint16_t*>(::malloc(len * sizeof(uint16_t)));
+        Utf8::DecodeToUTF16(utf8_str, utf8_len, utf16_str, len);
+        for (intptr_t i = 0; i < len; i++) {
+          Write<uint16_t>(utf16_str[i]);
+        }
+        ::free(utf16_str);
       }
       break;
     }
@@ -788,18 +846,29 @@
     default:
       UNREACHABLE();
   }
+
+  return true;
 }
 
 
-void ApiMessageWriter::WriteCMessage(Dart_CObject* object) {
-  WriteCObject(object);
+bool ApiMessageWriter::WriteCMessage(Dart_CObject* object) {
+  bool success = WriteCObject(object);
+  if (!success) {
+    UnmarkAllCObjects(object);
+    return false;
+  }
   // Write out all objects that were added to the forward list and have
   // not been serialized yet. These would typically be fields of arrays.
   // NOTE: The forward list might grow as we process the list.
   for (intptr_t i = 0; i < forward_id_; i++) {
-    WriteForwardedCObject(forward_list_[i]);
+    success = WriteForwardedCObject(forward_list_[i]);
+    if (!success) {
+      UnmarkAllCObjects(object);
+      return false;
+    }
   }
   UnmarkAllCObjects(object);
+  return true;
 }
 
 }  // namespace dart
diff --git a/runtime/vm/dart_api_message.h b/runtime/vm/dart_api_message.h
index 57341da..c37d8fb 100644
--- a/runtime/vm/dart_api_message.h
+++ b/runtime/vm/dart_api_message.h
@@ -131,7 +131,7 @@
   void WriteMessage(intptr_t field_count, intptr_t *data);
 
   // Writes a message with a single object.
-  void WriteCMessage(Dart_CObject* object);
+  bool WriteCMessage(Dart_CObject* object);
 
  private:
   static const intptr_t kDartCObjectTypeBits = 4;
@@ -152,10 +152,10 @@
   void WriteInt32(Dart_CObject* object);
   void WriteInt64(Dart_CObject* object);
   void WriteInlinedHeader(Dart_CObject* object);
-  void WriteCObject(Dart_CObject* object);
-  void WriteCObjectRef(Dart_CObject* object);
-  void WriteForwardedCObject(Dart_CObject* object);
-  void WriteCObjectInlined(Dart_CObject* object, Dart_CObject::Type type);
+  bool WriteCObject(Dart_CObject* object);
+  bool WriteCObjectRef(Dart_CObject* object);
+  bool WriteForwardedCObject(Dart_CObject* object);
+  bool WriteCObjectInlined(Dart_CObject* object, Dart_CObject::Type type);
 
   intptr_t object_id_;
   Dart_CObject** forward_list_;
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 3287777..069ee49 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -99,6 +99,14 @@
       return error.raw();
     }
   }
+  // Set up arguments to include the closure as the first argument.
+  const int num_arguments = arguments.length() + 1;
+  GrowableArray<const Object*> args(num_arguments);
+  const Object& arg0 = Object::ZoneHandle(closure.raw());
+  args.Add(&arg0);
+  for (int i = 1; i < num_arguments; i++) {
+    args.Add(arguments[i - 1]);
+  }
   // Now Call the invoke stub which will invoke the closure.
   invokestub entrypoint = reinterpret_cast<invokestub>(
       StubCode::InvokeDartCodeEntryPoint());
@@ -107,8 +115,8 @@
   ASSERT(!code.IsNull());
   return entrypoint(
       code.EntryPoint(),
-      ArgumentsDescriptor(arguments.length(), optional_arguments_names),
-      arguments.data(),
+      ArgumentsDescriptor(num_arguments, optional_arguments_names),
+      args.data(),
       context);
 }
 
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 4bf3e9c..8056372 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -630,7 +630,7 @@
 static void ExprClosureBreakpointHandler(Dart_IsolateId isolate_id,
                                          Dart_Breakpoint bpt,
                                          Dart_StackTrace trace) {
-  static const char* expected_trace[] = {"add", "main"};
+  static const char* expected_trace[] = {"<anonymous closure>", "main"};
   Dart_Handle add_locals = Dart_NewList(4);
   Dart_ListSetAt(add_locals, 0, NewString("a"));
   Dart_ListSetAt(add_locals, 1, Dart_NewInteger(10));
@@ -648,7 +648,7 @@
       "var c;                 \n"
       "                       \n"
       "main() {               \n"
-      "  c = add(a, b) {      \n"
+      "  c = (a, b) {         \n"
       "    return a + b;      \n"
       "  };                   \n"
       "  return c(10, 20);    \n"
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 9442a46..70a77c5 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -5,6 +5,7 @@
 #include "vm/deopt_instructions.h"
 
 #include "vm/assembler_macros.h"
+#include "vm/code_patcher.h"
 #include "vm/intermediate_language.h"
 #include "vm/locations.h"
 #include "vm/parser.h"
@@ -17,7 +18,8 @@
 DeoptimizationContext::DeoptimizationContext(intptr_t* to_frame_start,
                                              intptr_t to_frame_size,
                                              const Array& object_table,
-                                             intptr_t num_args)
+                                             intptr_t num_args,
+                                             DeoptReasonId deopt_reason)
     : object_table_(object_table),
       to_frame_(to_frame_start),
       to_frame_size_(to_frame_size),
@@ -26,6 +28,7 @@
       registers_copy_(NULL),
       xmm_registers_copy_(NULL),
       num_args_(num_args),
+      deopt_reason_(deopt_reason),
       isolate_(Isolate::Current()) {
   from_frame_ = isolate_->deopt_frame_copy();
   from_frame_size_ = isolate_->deopt_frame_copy_size();
@@ -256,6 +259,18 @@
     uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_);
     intptr_t* to_addr = deopt_context->GetToFrameAddressAt(to_index);
     *to_addr = continue_at_pc;
+
+
+    uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall);
+    if (pc != 0) {
+      // If the deoptimization happened at an IC call, update the IC data
+      // to avoid repeated deoptimization at the same site next time around.
+      const ICData& ic_data = ICData::Handle(
+          CodePatcher::GetInstanceCallIcDataAt(pc));
+      if (!ic_data.IsNull()) {
+        ic_data.set_deopt_reason(deopt_context->deopt_reason());
+      }
+    }
   }
 
  private:
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h
index 79c9f23..55f8637 100644
--- a/runtime/vm/deopt_instructions.h
+++ b/runtime/vm/deopt_instructions.h
@@ -7,6 +7,7 @@
 
 #include "vm/allocation.h"
 #include "vm/assembler.h"
+#include "vm/code_generator.h"
 #include "vm/growable_array.h"
 #include "vm/object.h"
 
@@ -24,7 +25,8 @@
   DeoptimizationContext(intptr_t* to_frame_start,
                         intptr_t to_frame_size,
                         const Array& object_table,
-                        intptr_t num_args);
+                        intptr_t num_args,
+                        DeoptReasonId deopt_reason);
 
   intptr_t* GetFromFrameAddressAt(intptr_t index) const {
     ASSERT((0 <= index) && (index < from_frame_size_));
@@ -62,6 +64,8 @@
 
   intptr_t from_frame_size() const { return from_frame_size_; }
 
+  DeoptReasonId deopt_reason() const { return deopt_reason_; }
+
  private:
   const Array& object_table_;
   intptr_t* to_frame_;
@@ -71,6 +75,7 @@
   intptr_t* registers_copy_;
   double* xmm_registers_copy_;
   const intptr_t num_args_;
+  const DeoptReasonId deopt_reason_;
   intptr_t caller_fp_;
   Isolate* isolate_;
 
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index db52c38..9513ab0 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -609,7 +609,7 @@
   }
   AppendToBuffer("%s%c ", mnem, operand_size_code());
   int count = PrintRightOperand(data + 1);
-  AppendToBuffer(",0x");
+  AppendToBuffer(",");
   OperandSize immediate_size = byte_size_immediate ? BYTE_SIZE : operand_size();
   count += PrintImmediate(data + 1 + count, immediate_size);
   return 1 + count;
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 2a77c53..fc2e2c9 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -396,6 +396,9 @@
   Library& library = Library::Handle();
   String& class_name = String::Handle();
   switch (type) {
+    case kNone:
+      UNREACHABLE();
+      break;
     case kRange:
       library = Library::CoreLibrary();
       class_name = Symbols::New("RangeError");
@@ -432,6 +435,10 @@
       library = Library::CoreLibrary();
       class_name = Symbols::New("IllegalJSRegExpException");
       break;
+    case kArgumentError:
+      library = Library::CoreLibrary();
+      class_name = Symbols::New("ArgumentError");
+      break;
     case kIsolateSpawn:
       library = Library::IsolateLibrary();
       class_name = Symbols::New("IsolateSpawnException");
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index 50500f9..1fe2665 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -48,6 +48,7 @@
                                       const String& malformed_error);
 
   enum ExceptionType {
+    kNone,
     kRange,
     kArgument,
     kNoSuchMethod,
@@ -57,6 +58,7 @@
     kInternalError,
     kNullPointer,
     kIllegalJSRegExp,
+    kArgumentError,
     kIsolateSpawn
   };
 
diff --git a/runtime/vm/exceptions_test.cc b/runtime/vm/exceptions_test.cc
index ef319de..a1b5867 100644
--- a/runtime/vm/exceptions_test.cc
+++ b/runtime/vm/exceptions_test.cc
@@ -18,8 +18,8 @@
 
 void FUNCTION_NAME(Unhandled_equals)(Dart_NativeArguments args) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
-  const Instance& expected = Instance::CheckedHandle(arguments->At(0));
-  const Instance& actual = Instance::CheckedHandle(arguments->At(1));
+  const Instance& expected = Instance::CheckedHandle(arguments->NativeArgAt(0));
+  const Instance& actual = Instance::CheckedHandle(arguments->NativeArgAt(1));
   if (!expected.Equals(actual)) {
     OS::Print("expected: '%s' actual: '%s'\n",
         expected.ToCString(), actual.ToCString());
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 0097c72..609d1d6 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -496,6 +496,24 @@
 }
 
 
+// Returns true if all uses of the given range inside the given loop
+// have Any allocation policy.
+static bool HasOnlyUnconstrainedUsesInLoop(LiveRange* range,
+                                           BlockInfo* loop_header) {
+  const intptr_t boundary = loop_header->last_block()->end_pos();
+
+  UsePosition* use = range->first_use();
+  while ((use != NULL) && (use->pos() < boundary)) {
+    if (!use->location_slot()->Equals(Location::Any())) {
+      return false;
+    }
+    use = use->next();
+  }
+
+  return true;
+}
+
+
 void FlowGraphAllocator::BuildLiveRanges() {
   const intptr_t block_count = postorder_.length();
   ASSERT(postorder_.Last()->IsGraphEntry());
@@ -523,6 +541,18 @@
       current = current->previous();
     }
 
+
+    // Check if any values live into the loop can be spilled for free.
+    BlockInfo* block_info = BlockInfoAt(block->start_pos());
+    if (block_info->is_loop_header()) {
+      for (BitVector::Iterator it(live_in_[i]); !it.Done(); it.Advance()) {
+        LiveRange* range = GetLiveRange(it.Current());
+        if (HasOnlyUnconstrainedUsesInLoop(range, block_info)) {
+          range->MarkHasOnlyUnconstrainedUsesInLoop(block_info->loop_id());
+        }
+      }
+    }
+
     ConnectIncomingPhiMoves(block);
   }
 
@@ -692,41 +722,45 @@
   const intptr_t pos = join->start_pos();
 
   ZoneGrowableArray<PhiInstr*>* phis = join->phis();
-  if (phis != NULL) {
-    intptr_t move_idx = 0;
-    for (intptr_t phi_idx = 0; phi_idx < phis->length(); phi_idx++) {
-      PhiInstr* phi = (*phis)[phi_idx];
-      if (phi == NULL) continue;
+  if (phis == NULL) return;
 
-      const intptr_t vreg = phi->ssa_temp_index();
-      ASSERT(vreg != -1);
+  const bool is_loop_header = BlockInfoAt(join->start_pos())->is_loop_header();
 
-      // Expected shape of live range:
-      //
-      //                 B
-      //      phi        [--------
-      //
-      LiveRange* range = GetLiveRange(vreg);
-      range->DefineAt(pos);  // Shorten live range.
+  intptr_t move_idx = 0;
+  for (intptr_t phi_idx = 0; phi_idx < phis->length(); phi_idx++) {
+    PhiInstr* phi = (*phis)[phi_idx];
+    if (phi == NULL) continue;
 
-      for (intptr_t pred_idx = 0; pred_idx < phi->InputCount(); pred_idx++) {
-        BlockEntryInstr* pred = block->PredecessorAt(pred_idx);
-        GotoInstr* goto_instr = pred->last_instruction()->AsGoto();
-        ASSERT((goto_instr != NULL) && (goto_instr->HasParallelMove()));
-        MoveOperands* move =
-            goto_instr->parallel_move()->MoveOperandsAt(move_idx);
-        move->set_dest(Location::PrefersRegister());
-        range->AddUse(pos, move->dest_slot());
-      }
+    const intptr_t vreg = phi->ssa_temp_index();
+    ASSERT(vreg != -1);
 
-      // All phi resolution moves are connected. Phi's live range is
-      // complete.
-      AssignSafepoints(range);
+    // Expected shape of live range:
+    //
+    //                 B
+    //      phi        [--------
+    //
+    LiveRange* range = GetLiveRange(vreg);
+    range->DefineAt(pos);  // Shorten live range.
 
-      CompleteRange(range, RegisterKindForResult(phi));
+    if (is_loop_header) range->mark_loop_phi();
 
-      move_idx++;
+    for (intptr_t pred_idx = 0; pred_idx < phi->InputCount(); pred_idx++) {
+      BlockEntryInstr* pred = block->PredecessorAt(pred_idx);
+      GotoInstr* goto_instr = pred->last_instruction()->AsGoto();
+      ASSERT((goto_instr != NULL) && (goto_instr->HasParallelMove()));
+      MoveOperands* move =
+          goto_instr->parallel_move()->MoveOperandsAt(move_idx);
+      move->set_dest(Location::PrefersRegister());
+      range->AddUse(pos, move->dest_slot());
     }
+
+    // All phi resolution moves are connected. Phi's live range is
+    // complete.
+    AssignSafepoints(range);
+
+    CompleteRange(range, RegisterKindForResult(phi));
+
+    move_idx++;
   }
 }
 
@@ -1019,9 +1053,9 @@
                                    Location::Any());
 
     // Add uses to the live range of the input.
-    Value* input = current->InputAt(0);
+    Definition* input = current->InputAt(0)->definition();
     LiveRange* input_range =
-        GetLiveRange(input->definition()->ssa_temp_index());
+        GetLiveRange(input->ssa_temp_index());
     input_range->AddUseInterval(block->start_pos(), pos);
     input_range->AddUse(pos, move->src_slot());
 
@@ -1148,6 +1182,8 @@
   // both headers of reducible and irreducible loops.
   BlockInfo* current_loop = NULL;
 
+  intptr_t loop_id = 0;  // All loop headers have a unique id.
+
   const intptr_t block_count = postorder_.length();
   for (intptr_t i = 0; i < block_count; i++) {
     BlockEntryInstr* block = postorder_[i];
@@ -1165,6 +1201,8 @@
           ASSERT(successor_info != current_loop);
 
           successor_info->mark_loop_header();
+          successor_info->set_loop_id(loop_id++);
+          successor_info->set_last_block(block);
           // For loop header loop information points to the outer loop.
           successor_info->set_loop(current_loop);
           current_loop = successor_info;
@@ -1471,6 +1509,23 @@
 void FlowGraphAllocator::SpillAfter(LiveRange* range, intptr_t from) {
   TRACE_ALLOC(OS::Print("spill %"Pd" [%"Pd", %"Pd") after %"Pd"\n",
                         range->vreg(), range->Start(), range->End(), from));
+
+  // When spilling the value inside the loop check if this spill can
+  // be moved outside.
+  BlockInfo* block_info = BlockInfoAt(from);
+  if (block_info->is_loop_header() || (block_info->loop() != NULL)) {
+    BlockInfo* loop_header =
+        block_info->is_loop_header() ? block_info : block_info->loop();
+
+    if ((range->Start() <= loop_header->entry()->start_pos()) &&
+        RangeHasOnlyUnconstrainedUsesInLoop(range, loop_header->loop_id())) {
+      ASSERT(loop_header->entry()->start_pos() <= from);
+      from = loop_header->entry()->start_pos();
+      TRACE_ALLOC(OS::Print("  moved spill position to loop header %"Pd"\n",
+                            from));
+    }
+  }
+
   LiveRange* tail = range->SplitAt(from);
   Spill(tail);
 }
@@ -1623,10 +1678,65 @@
 }
 
 
+bool FlowGraphAllocator::RangeHasOnlyUnconstrainedUsesInLoop(LiveRange* range,
+                                                             intptr_t loop_id) {
+  if (range->vreg() >= 0) {
+    return GetLiveRange(range->vreg())->HasOnlyUnconstrainedUsesInLoop(loop_id);
+  }
+  return false;
+}
+
+
+bool FlowGraphAllocator::IsCheapToEvictRegisterInLoop(BlockInfo* loop,
+                                                      intptr_t reg) {
+  const intptr_t loop_start = loop->entry()->start_pos();
+  const intptr_t loop_end = loop->last_block()->end_pos();
+
+  for (intptr_t i = 0; i < registers_[reg].length(); i++) {
+    LiveRange* allocated = registers_[reg][i];
+
+    UseInterval* interval = allocated->finger()->first_pending_use_interval();
+    if (interval->Contains(loop_start)) {
+      if (!RangeHasOnlyUnconstrainedUsesInLoop(allocated, loop->loop_id())) {
+        return false;
+      }
+    } else if (interval->start() < loop_end) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+
+bool FlowGraphAllocator::HasCheapEvictionCandidate(LiveRange* phi_range) {
+  ASSERT(phi_range->is_loop_phi());
+
+  BlockInfo* loop_header = BlockInfoAt(phi_range->Start());
+  ASSERT(loop_header->is_loop_header());
+  ASSERT(phi_range->Start() == loop_header->entry()->start_pos());
+
+  for (intptr_t reg = 0; reg < NumberOfRegisters(); ++reg) {
+    if (blocked_registers_[reg]) continue;
+    if (IsCheapToEvictRegisterInLoop(loop_header, reg)) {
+      return true;
+    }
+  }
+
+  return false;
+}
+
+
 void FlowGraphAllocator::AllocateAnyRegister(LiveRange* unallocated) {
+  // If a loop phi has no register uses we might still want to allocate it
+  // to the register to reduce amount of memory moves on the back edge.
+  // This is possible if there is a register blocked by a range that can be
+  // cheaply evicted i.e. it has no register beneficial uses inside the
+  // loop.
   UsePosition* register_use =
       unallocated->finger()->FirstRegisterUse(unallocated->Start());
-  if (register_use == NULL) {
+  if ((register_use == NULL) &&
+      !(unallocated->is_loop_phi() && HasCheapEvictionCandidate(unallocated))) {
     Spill(unallocated);
     return;
   }
@@ -1642,9 +1752,12 @@
     }
   }
 
-  if (free_until < register_use->pos()) {
+  const intptr_t register_use_pos =
+      (register_use != NULL) ? register_use->pos()
+                             : unallocated->Start();
+  if (free_until < register_use_pos) {
     // Can't acquire free register. Spill until we really need one.
-    ASSERT(unallocated->Start() < ToInstructionStart(register_use->pos()));
+    ASSERT(unallocated->Start() < ToInstructionStart(register_use_pos));
     SpillBetween(unallocated, unallocated->Start(), register_use->pos());
     return;
   }
diff --git a/runtime/vm/flow_graph_allocator.h b/runtime/vm/flow_graph_allocator.h
index 4cc6203..b98fbb3 100644
--- a/runtime/vm/flow_graph_allocator.h
+++ b/runtime/vm/flow_graph_allocator.h
@@ -153,6 +153,19 @@
   // the unallocated live range as possible.
   void AllocateAnyRegister(LiveRange* unallocated);
 
+  // Returns true if the given range has only unconstrained uses in
+  // the given loop.
+  bool RangeHasOnlyUnconstrainedUsesInLoop(LiveRange* range, intptr_t loop_id);
+
+  // Returns true if there is a register blocked by a range that
+  // has only unconstrained uses in the loop. Such range is a good
+  // eviction candidate when allocator tries to allocate loop phi.
+  // Spilling loop phi will have a bigger negative impact on the
+  // performance because it introduces multiple operations with memory
+  // inside the loop body and on the back edge.
+  bool HasCheapEvictionCandidate(LiveRange* phi_range);
+  bool IsCheapToEvictRegisterInLoop(BlockInfo* loop, intptr_t reg);
+
   // Assign selected non-free register to an unallocated live range and
   // evict any interference that can be evicted by splitting and spilling
   // parts of interfering live ranges.  Place non-spilled parts into
@@ -305,11 +318,22 @@
     loop_ = loop;
   }
 
+  BlockEntryInstr* last_block() const { return last_block_; }
+  void set_last_block(BlockEntryInstr* last_block) {
+    last_block_ = last_block;
+  }
+
+  intptr_t loop_id() const { return loop_id_; }
+  void set_loop_id(intptr_t loop_id) { loop_id_ = loop_id; }
+
  private:
   BlockEntryInstr* entry_;
   BlockInfo* loop_;
   bool is_loop_header_;
 
+  BlockEntryInstr* last_block_;
+  intptr_t loop_id_;
+
   DISALLOW_COPY_AND_ASSIGN(BlockInfo);
 };
 
@@ -467,6 +491,8 @@
       first_safepoint_(NULL),
       last_safepoint_(NULL),
       next_sibling_(NULL),
+      has_only_any_uses_in_loops_(0),
+      is_loop_phi_(false),
       finger_() {
   }
 
@@ -524,6 +550,25 @@
     return spill_slot_;
   }
 
+  bool HasOnlyUnconstrainedUsesInLoop(intptr_t loop_id) const {
+    if (loop_id < kBitsPerWord) {
+      const intptr_t mask = static_cast<intptr_t>(1) << loop_id;
+      return (has_only_any_uses_in_loops_ & mask) != 0;
+    }
+    return false;
+  }
+
+  void MarkHasOnlyUnconstrainedUsesInLoop(intptr_t loop_id) {
+    if (loop_id < kBitsPerWord) {
+      has_only_any_uses_in_loops_ |= static_cast<intptr_t>(1) << loop_id;
+    }
+  }
+
+  bool is_loop_phi() const { return is_loop_phi_; }
+  void mark_loop_phi() {
+    is_loop_phi_ = true;
+  }
+
  private:
   LiveRange(intptr_t vreg,
             Location::Representation rep,
@@ -541,6 +586,8 @@
       first_safepoint_(first_safepoint),
       last_safepoint_(NULL),
       next_sibling_(next_sibling),
+      has_only_any_uses_in_loops_(0),
+      is_loop_phi_(false),
       finger_() {
   }
 
@@ -558,6 +605,9 @@
 
   LiveRange* next_sibling_;
 
+  intptr_t has_only_any_uses_in_loops_;
+  bool is_loop_phi_;
+
   AllocationFinger finger_;
 
   DISALLOW_COPY_AND_ASSIGN(LiveRange);
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 96d9e43..96d4cb8 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -508,8 +508,7 @@
       const AbstractType& dst_type =
           AbstractType::ZoneHandle(
               owner()->parsed_function().function().result_type());
-      const String& dst_name =
-          String::ZoneHandle(Symbols::New("function result"));
+      const String& dst_name = String::ZoneHandle(Symbols::FunctionResult());
       return_value = BuildAssignableValue(node->value()->token_pos(),
                                           return_value,
                                           dst_type,
@@ -606,7 +605,22 @@
 //                              type:     AbstractType
 //                              dst_name: String }
 void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) {
-  UNREACHABLE();
+  ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+  node->expr()->Visit(&for_value);
+  Append(for_value);
+  Definition* checked_value;
+  if (CanSkipTypeCheck(node->expr()->token_pos(),
+                       for_value.value(),
+                       node->type(),
+                       node->dst_name())) {
+    checked_value = for_value.value()->definition();  // No check needed.
+  } else {
+    checked_value = BuildAssertAssignable(node->expr()->token_pos(),
+                                          for_value.value(),
+                                          node->type(),
+                                          node->dst_name());
+  }
+  ReturnDefinition(checked_value);
 }
 
 
@@ -871,8 +885,6 @@
                             &instantiator,
                             &instantiator_type_arguments);
   }
-  // TODO(zerny): Remove this when issues 5216 and 5217 are fixed.
-  InlineBailout("instance of");
   InstanceOfInstr* instance_of =
       new InstanceOfInstr(node->token_pos(),
                           for_left_value.value(),
@@ -1483,6 +1495,18 @@
 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
   const Function& function = node->function();
 
+  if (function.IsImplicitStaticClosureFunction()) {
+    Instance& closure = Instance::ZoneHandle();
+    closure ^= function.implicit_static_closure();
+    if (closure.IsNull()) {
+      ObjectStore* object_store = Isolate::Current()->object_store();
+      const Context& context = Context::Handle(object_store->empty_context());
+      closure ^= Closure::New(function, context, Heap::kOld);
+      function.set_implicit_static_closure(closure);
+    }
+    ReturnDefinition(new ConstantInstr(closure));
+    return;
+  }
   Value* receiver = NULL;
   if (function.IsNonImplicitClosureFunction()) {
     // The context scope may have already been set by the non-optimizing
@@ -1496,13 +1520,12 @@
       function.set_context_scope(context_scope);
     }
     receiver = BuildNullValue();
-  } else if (function.IsImplicitInstanceClosureFunction()) {
+  } else {
+    ASSERT(function.IsImplicitInstanceClosureFunction());
     ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
     node->receiver()->Visit(&for_receiver);
     Append(for_receiver);
     receiver = for_receiver.value();
-  } else {
-    receiver = BuildNullValue();
   }
   PushArgumentInstr* push_receiver = PushArgument(receiver);
   ZoneGrowableArray<PushArgumentInstr*>* arguments =
@@ -2787,7 +2810,7 @@
   arguments->Add(new LiteralNode(args_pos, method_name));
   // The second argument is an array containing the original method arguments.
   ArrayNode* args_array =
-      new ArrayNode(args_pos, Type::ZoneHandle(Type::ListInterface()));
+      new ArrayNode(args_pos, Type::ZoneHandle(Type::ArrayType()));
   for (intptr_t i = 0; i < method_arguments->length(); i++) {
     args_array->AddElement(method_arguments->NodeAt(i));
   }
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index ef47dc0..879799f 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -22,13 +22,11 @@
 namespace dart {
 
 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables.");
-DEFINE_FLAG(bool, trace_functions, false, "Trace entry of each function.");
 DECLARE_FLAG(bool, code_comments);
 DECLARE_FLAG(bool, enable_type_checks);
 DECLARE_FLAG(bool, intrinsify);
 DECLARE_FLAG(bool, propagate_ic_data);
 DECLARE_FLAG(bool, report_usage_count);
-DECLARE_FLAG(bool, trace_functions);
 DECLARE_FLAG(int, optimization_counter_threshold);
 
 void CompilerDeoptInfo::BuildReturnAddress(DeoptInfoBuilder* builder,
@@ -147,6 +145,7 @@
       block_info_(block_order_.length()),
       deopt_infos_(),
       is_optimizing_(is_optimizing),
+      may_reoptimize_(false),
       bool_true_(Bool::ZoneHandle(Bool::True())),
       bool_false_(Bool::ZoneHandle(Bool::False())),
       double_class_(Class::ZoneHandle(
@@ -433,8 +432,8 @@
   if (!CanOptimize()) return false;
   // Intrinsification skips arguments checks, therefore disable if in checked
   // mode.
-  if (FLAG_intrinsify && !FLAG_trace_functions && !FLAG_enable_type_checks) {
-    if ((parsed_function().function().kind() == RawFunction::kImplicitGetter)) {
+  if (FLAG_intrinsify && !FLAG_enable_type_checks) {
+    if (parsed_function().function().kind() == RawFunction::kImplicitGetter) {
       // An implicit getter must have a specific AST structure.
       const SequenceNode& sequence_node = *parsed_function().node_sequence();
       ASSERT(sequence_node.length() == 1);
@@ -446,7 +445,7 @@
       GenerateInlinedGetter(load_node.field().Offset());
       return true;
     }
-    if ((parsed_function().function().kind() == RawFunction::kImplicitSetter)) {
+    if (parsed_function().function().kind() == RawFunction::kImplicitSetter) {
       // An implicit setter must have a specific AST structure.
       // Sequence node has one store node and one return NULL node.
       const SequenceNode& sequence_node = *parsed_function().node_sequence();
@@ -461,10 +460,7 @@
   }
   // Even if an intrinsified version of the function was successfully
   // generated, it may fall through to the non-intrinsified method body.
-  if (!FLAG_trace_functions) {
-    return Intrinsifier::Intrinsify(parsed_function().function(), assembler());
-  }
-  return false;
+  return Intrinsifier::Intrinsify(parsed_function().function(), assembler());
 }
 
 
@@ -480,6 +476,39 @@
   const Array& arguments_descriptor =
       DartEntry::ArgumentsDescriptor(argument_count, argument_names);
   uword label_address = 0;
+  if (is_optimizing() && (ic_data.NumberOfChecks() == 0)) {
+    if (ic_data.is_closure_call()) {
+      // This IC call may be closure call only.
+      label_address = StubCode::ClosureCallInlineCacheEntryPoint();
+      ExternalLabel target_label("InlineCache", label_address);
+      EmitInstanceCall(&target_label,
+                       ICData::ZoneHandle(ic_data.AsUnaryClassChecks()),
+                       arguments_descriptor, argument_count,
+                       deopt_id, token_pos, locs);
+      return;
+    }
+    // Emit IC call that will count and thus may need reoptimization at
+    // return instruction.
+    may_reoptimize_ = true;
+    switch (ic_data.num_args_tested()) {
+      case 1:
+        label_address = StubCode::OneArgOptimizedCheckInlineCacheEntryPoint();
+        break;
+      case 2:
+        label_address = StubCode::TwoArgsOptimizedCheckInlineCacheEntryPoint();
+        break;
+      case 3:
+        label_address =
+            StubCode::ThreeArgsOptimizedCheckInlineCacheEntryPoint();
+        break;
+      default:
+        UNIMPLEMENTED();
+    }
+    ExternalLabel target_label("InlineCache", label_address);
+    EmitOptimizedInstanceCall(&target_label, ic_data, arguments_descriptor,
+                              argument_count, deopt_id, token_pos, locs);
+    return;
+  }
   if (is_optimizing()) {
     // Megamorphic call requires one argument ICData.
     ASSERT(ic_data.num_args_tested() == 1);
@@ -500,7 +529,6 @@
     }
   }
   ExternalLabel target_label("InlineCache", label_address);
-
   EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count,
                    deopt_id, token_pos, locs);
 }
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 06d767e..3a78f8c 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -20,7 +20,6 @@
 
 DECLARE_FLAG(bool, print_ast);
 DECLARE_FLAG(bool, print_scopes);
-DECLARE_FLAG(bool, trace_functions);
 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
 
@@ -159,7 +158,7 @@
       __ cmpl(kClassIdReg, Immediate(type_class.id()));
       __ j(EQUAL, is_instance_lbl);
     }
-    if (type.IsListInterface()) {
+    if (type_class.raw() == Isolate::Current()->object_store()->list_class()) {
       GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
     }
     return GenerateSubtype1TestCacheLookup(
@@ -268,7 +267,7 @@
         kClassIdReg, type, is_instance_lbl, is_not_instance_lbl);
     return false;
   }
-  if (type.IsStringInterface()) {
+  if (type.IsStringType()) {
     GenerateStringTypeCheck(kClassIdReg, is_instance_lbl, is_not_instance_lbl);
     return false;
   }
@@ -627,17 +626,15 @@
 void FlowGraphCompiler::CopyParameters() {
   __ Comment("Copy parameters");
   const Function& function = parsed_function().function();
-  const bool is_native_instance_closure =
-      function.is_native() && function.IsImplicitInstanceClosureFunction();
   LocalScope* scope = parsed_function().node_sequence()->scope();
   const int num_fixed_params = function.num_fixed_parameters();
   const int num_opt_pos_params = function.NumOptionalPositionalParameters();
-  int num_opt_named_params = function.NumOptionalNamedParameters();
+  const int num_opt_named_params = function.NumOptionalNamedParameters();
   const int num_params =
       num_fixed_params + num_opt_pos_params + num_opt_named_params;
-  int implicit_this_param_pos = is_native_instance_closure ? -1 : 0;
+  ASSERT(function.NumParameters() == num_params);
   ASSERT(parsed_function().first_parameter_index() ==
-         ParsedFunction::kFirstLocalSlotIndex + implicit_this_param_pos);
+         ParsedFunction::kFirstLocalSlotIndex);
 
   // Check that min_num_pos_args <= num_pos_args <= max_num_pos_args,
   // where num_pos_args is the number of positional arguments passed in.
@@ -668,13 +665,7 @@
 
   // Let EDI point to the last copied positional argument, i.e. to
   // fp[ParsedFunction::kFirstLocalSlotIndex - (num_pos_args - 1)].
-  const int index =
-      ParsedFunction::kFirstLocalSlotIndex + 1 + implicit_this_param_pos;
-  // First copy captured receiver if function is an implicit native closure.
-  if (is_native_instance_closure) {
-    __ movl(EAX, FieldAddress(CTX, Context::variable_offset(0)));
-    __ movl(Address(EBP, (index * kWordSize)), EAX);
-  }
+  const int index = ParsedFunction::kFirstLocalSlotIndex + 1;
   __ leal(EDI, Address(EBP, (index * kWordSize)));
   __ subl(EDI, ECX);  // ECX is a Smi, subtract twice for TIMES_4 scaling.
   __ subl(EDI, ECX);
@@ -753,8 +744,8 @@
       // We do not use the final allocation index of the variable here, i.e.
       // scope->VariableAt(i)->index(), because captured variables still need
       // to be copied to the context that is not yet allocated.
-      intptr_t computed_param_pos = (ParsedFunction::kFirstLocalSlotIndex -
-                                     param_pos + implicit_this_param_pos);
+      const intptr_t computed_param_pos =
+          ParsedFunction::kFirstLocalSlotIndex - param_pos;
       const Address param_addr(EBP, (computed_param_pos * kWordSize));
       __ movl(param_addr, EAX);
       __ Bind(&next_parameter);
@@ -764,7 +755,8 @@
     // Check that EDI now points to the null terminator in the array descriptor.
     __ cmpl(Address(EDI, 0), raw_null);
     __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
-  } else if (num_opt_pos_params > 0) {
+  } else {
+    ASSERT(num_opt_pos_params > 0);
     // Number of positional args is the second Smi in descriptor array (EDX).
     __ movl(ECX, FieldAddress(EDX, Array::data_offset() + (1 * kWordSize)));
     __ SmiUntag(ECX);
@@ -784,8 +776,8 @@
       // We do not use the final allocation index of the variable here, i.e.
       // scope->VariableAt(i)->index(), because captured variables still need
       // to be copied to the context that is not yet allocated.
-      intptr_t computed_param_pos = (ParsedFunction::kFirstLocalSlotIndex -
-                                     param_pos + implicit_this_param_pos);
+      const intptr_t computed_param_pos =
+          ParsedFunction::kFirstLocalSlotIndex - param_pos;
       const Address param_addr(EBP, (computed_param_pos * kWordSize));
       __ movl(param_addr, EAX);
       __ Bind(&next_parameter);
@@ -796,9 +788,6 @@
     // Check that ECX equals EBX, i.e. no named arguments passed.
     __ cmpl(ECX, EBX);
     __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
-  } else {
-    ASSERT(is_native_instance_closure);
-    __ jmp(&all_arguments_processed, Assembler::kNearJump);
   }
 
   __ Bind(&wrong_num_arguments);
@@ -843,23 +832,6 @@
                                       0);  // No registers.
   }
 
-  if (FLAG_trace_functions) {
-    __ pushl(EAX);  // Preserve result.
-    __ PushObject(Function::ZoneHandle(function.raw()));
-    // We do not use GenerateCallRuntime because of the non-standard (empty)
-    // stackmap used here.
-    __ CallRuntime(kTraceFunctionExitRuntimeEntry);
-    AddCurrentDescriptor(PcDescriptors::kOther,
-                         Isolate::kNoDeoptId,
-                         0);  // No token position.
-    if (is_optimizing()) {
-      stackmap_table_builder_->AddEntry(assembler()->CodeSize(),
-                                        empty_stack_bitmap,
-                                        0);  // No registers.
-    }
-    __ popl(EAX);  // Remove argument.
-    __ popl(EAX);  // Restore result.
-  }
   __ LeaveFrame();
   __ ret();
 
@@ -1070,6 +1042,32 @@
 }
 
 
+void FlowGraphCompiler::EmitOptimizedInstanceCall(
+    ExternalLabel* target_label,
+    const ICData& ic_data,
+    const Array& arguments_descriptor,
+    intptr_t argument_count,
+    intptr_t deopt_id,
+    intptr_t token_pos,
+    LocationSummary* locs) {
+  // Each ICData propagated from unoptimized to optimized code contains the
+  // function that corresponds to the Dart function of that IC call. Due
+  // to inlining in optimized code, that function may not correspond to the
+  // top-level function (parsed_function().function()) which could be
+  // reoptimized and which counter needs to be incremented.
+  // Pass the function explicitly.
+  __ LoadObject(EDI, parsed_function().function());
+  __ LoadObject(ECX, ic_data);
+  __ LoadObject(EDX, arguments_descriptor);
+  GenerateDartCall(deopt_id,
+                   token_pos,
+                   target_label,
+                   PcDescriptors::kIcCall,
+                   locs);
+  __ Drop(argument_count);
+}
+
+
 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
                                          const ICData& ic_data,
                                          const Array& arguments_descriptor,
diff --git a/runtime/vm/flow_graph_compiler_ia32.h b/runtime/vm/flow_graph_compiler_ia32.h
index 9e75d91..f949317 100644
--- a/runtime/vm/flow_graph_compiler_ia32.h
+++ b/runtime/vm/flow_graph_compiler_ia32.h
@@ -125,6 +125,14 @@
 
   void EmitComment(Instruction* instr);
 
+  void EmitOptimizedInstanceCall(ExternalLabel* target_label,
+                                 const ICData& ic_data,
+                                 const Array& arguments_descriptor,
+                                 intptr_t argument_count,
+                                 intptr_t deopt_id,
+                                 intptr_t token_pos,
+                                 LocationSummary* locs);
+
   void EmitInstanceCall(ExternalLabel* target_label,
                         const ICData& ic_data,
                         const Array& arguments_descriptor,
@@ -202,6 +210,8 @@
     return current_block_->try_index();
   }
 
+  bool may_reoptimize() const { return may_reoptimize_; }
+
   static const int kLocalsOffsetFromFP = (-1 * kWordSize);
 
   static Condition FlipCondition(Condition condition);
@@ -311,6 +321,8 @@
   GrowableArray<CompilerDeoptInfo*> deopt_infos_;
   GrowableArray<SlowPathCode*> slow_path_code_;
   const bool is_optimizing_;
+  // Set to true if optimized code has IC calls.
+  bool may_reoptimize_;
 
   const Bool& bool_true_;
   const Bool& bool_false_;
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 9aa1a06..eee2c68 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -20,7 +20,6 @@
 
 DECLARE_FLAG(bool, print_ast);
 DECLARE_FLAG(bool, print_scopes);
-DECLARE_FLAG(bool, trace_functions);
 DECLARE_FLAG(bool, use_sse41);
 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
 
@@ -159,7 +158,7 @@
       __ cmpl(kClassIdReg, Immediate(type_class.id()));
       __ j(EQUAL, is_instance_lbl);
     }
-    if (type.IsListInterface()) {
+    if (type_class.raw() == Isolate::Current()->object_store()->list_class()) {
       GenerateListTypeCheck(kClassIdReg, is_instance_lbl);
     }
     return GenerateSubtype1TestCacheLookup(
@@ -268,7 +267,7 @@
         kClassIdReg, type, is_instance_lbl, is_not_instance_lbl);
     return false;
   }
-  if (type.IsStringInterface()) {
+  if (type.IsStringType()) {
     GenerateStringTypeCheck(kClassIdReg, is_instance_lbl, is_not_instance_lbl);
     return false;
   }
@@ -627,17 +626,15 @@
 void FlowGraphCompiler::CopyParameters() {
   __ Comment("Copy parameters");
   const Function& function = parsed_function().function();
-  const bool is_native_instance_closure =
-      function.is_native() && function.IsImplicitInstanceClosureFunction();
   LocalScope* scope = parsed_function().node_sequence()->scope();
   const int num_fixed_params = function.num_fixed_parameters();
   const int num_opt_pos_params = function.NumOptionalPositionalParameters();
-  int num_opt_named_params = function.NumOptionalNamedParameters();
+  const int num_opt_named_params = function.NumOptionalNamedParameters();
   const int num_params =
       num_fixed_params + num_opt_pos_params + num_opt_named_params;
-  int implicit_this_param_pos = is_native_instance_closure ? -1 : 0;
+  ASSERT(function.NumParameters() == num_params);
   ASSERT(parsed_function().first_parameter_index() ==
-         ParsedFunction::kFirstLocalSlotIndex + implicit_this_param_pos);
+         ParsedFunction::kFirstLocalSlotIndex);
 
   // Check that min_num_pos_args <= num_pos_args <= max_num_pos_args,
   // where num_pos_args is the number of positional arguments passed in.
@@ -668,19 +665,12 @@
 
   // Let RDI point to the last copied positional argument, i.e. to
   // fp[ParsedFunction::kFirstLocalSlotIndex - (num_pos_args - 1)].
-  const int index =
-      ParsedFunction::kFirstLocalSlotIndex + 1 + implicit_this_param_pos;
-  // First copy captured receiver if function is an implicit native closure.
-  if (is_native_instance_closure) {
-    __ movq(RAX, FieldAddress(CTX, Context::variable_offset(0)));
-    __ movq(Address(RBP, (index * kWordSize)), RAX);
-  }
+  const int index = ParsedFunction::kFirstLocalSlotIndex + 1;
   __ SmiUntag(RCX);
   __ movq(RAX, RCX);
   __ negq(RAX);
   // -num_pos_args is in RAX.
-  // (ParsedFunction::kFirstLocalSlotIndex + 1 + implicit_this_param_pos)
-  // is in index.
+  // (ParsedFunction::kFirstLocalSlotIndex + 1) is in index.
   __ leaq(RDI, Address(RBP, RAX, TIMES_8, (index * kWordSize)));
   Label loop, loop_condition;
   __ jmp(&loop_condition, Assembler::kNearJump);
@@ -756,8 +746,8 @@
       // We do not use the final allocation index of the variable here, i.e.
       // scope->VariableAt(i)->index(), because captured variables still need
       // to be copied to the context that is not yet allocated.
-      intptr_t computed_param_pos = (ParsedFunction::kFirstLocalSlotIndex -
-                                     param_pos + implicit_this_param_pos);
+      const intptr_t computed_param_pos =
+          ParsedFunction::kFirstLocalSlotIndex - param_pos;
       const Address param_addr(RBP, (computed_param_pos * kWordSize));
       __ movq(param_addr, RAX);
       __ Bind(&next_parameter);
@@ -767,7 +757,8 @@
     // Check that RDI now points to the null terminator in the array descriptor.
     __ cmpq(Address(RDI, 0), raw_null);
     __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
-  } else if (num_opt_pos_params > 0) {
+  } else {
+    ASSERT(num_opt_pos_params > 0);
     // Number of positional args is the second Smi in descriptor array (R10).
     __ movq(RCX, FieldAddress(R10, Array::data_offset() + (1 * kWordSize)));
     __ SmiUntag(RCX);
@@ -787,8 +778,8 @@
       // We do not use the final allocation index of the variable here, i.e.
       // scope->VariableAt(i)->index(), because captured variables still need
       // to be copied to the context that is not yet allocated.
-      intptr_t computed_param_pos = (ParsedFunction::kFirstLocalSlotIndex -
-                                     param_pos + implicit_this_param_pos);
+      const intptr_t computed_param_pos =
+          ParsedFunction::kFirstLocalSlotIndex - param_pos;
       const Address param_addr(RBP, (computed_param_pos * kWordSize));
       __ movq(param_addr, RAX);
       __ Bind(&next_parameter);
@@ -799,9 +790,6 @@
     // Check that RCX equals RBX, i.e. no named arguments passed.
     __ cmpq(RCX, RBX);
     __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
-  } else {
-    ASSERT(is_native_instance_closure);
-    __ jmp(&all_arguments_processed, Assembler::kNearJump);
   }
 
   __ Bind(&wrong_num_arguments);
@@ -846,23 +834,6 @@
                                       0);  // No registers.
   }
 
-  if (FLAG_trace_functions) {
-    __ pushq(RAX);  // Preserve result.
-    __ PushObject(Function::ZoneHandle(function.raw()));
-    // We do not use GenerateCallRuntime because of the non-standard (empty)
-    // stackmap used here.
-    __ CallRuntime(kTraceFunctionExitRuntimeEntry);
-    AddCurrentDescriptor(PcDescriptors::kOther,
-                         Isolate::kNoDeoptId,
-                         0);  // No token position.
-    if (is_optimizing()) {
-      stackmap_table_builder_->AddEntry(assembler()->CodeSize(),
-                                        empty_stack_bitmap,
-                                        0);  // No registers.
-    }
-    __ popq(RAX);  // Remove argument.
-    __ popq(RAX);  // Restore result.
-  }
   __ LeaveFrame();
   __ ret();
 
@@ -1075,6 +1046,32 @@
 }
 
 
+void FlowGraphCompiler::EmitOptimizedInstanceCall(
+    ExternalLabel* target_label,
+    const ICData& ic_data,
+    const Array& arguments_descriptor,
+    intptr_t argument_count,
+    intptr_t deopt_id,
+    intptr_t token_pos,
+    LocationSummary* locs) {
+  // Each ICData propagated from unoptimized to optimized code contains the
+  // function that corresponds to the Dart function of that IC call. Due
+  // to inlining in optimized code, that function may not correspond to the
+  // top-level function (parsed_function().function()) which could be
+  // reoptimized and which counter needs to be incremented.
+  // Pass the function explicitly.
+  __ LoadObject(RDI, parsed_function().function());
+  __ LoadObject(RBX, ic_data);
+  __ LoadObject(R10, arguments_descriptor);
+  GenerateDartCall(deopt_id,
+                   token_pos,
+                   target_label,
+                   PcDescriptors::kIcCall,
+                   locs);
+  __ Drop(argument_count);
+}
+
+
 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
                                          const ICData& ic_data,
                                          const Array& arguments_descriptor,
diff --git a/runtime/vm/flow_graph_compiler_x64.h b/runtime/vm/flow_graph_compiler_x64.h
index 8bda052..146d9eb 100644
--- a/runtime/vm/flow_graph_compiler_x64.h
+++ b/runtime/vm/flow_graph_compiler_x64.h
@@ -125,6 +125,14 @@
 
   void EmitComment(Instruction* instr);
 
+  void EmitOptimizedInstanceCall(ExternalLabel* target_label,
+                                 const ICData& ic_data,
+                                 const Array& arguments_descriptor,
+                                 intptr_t argument_count,
+                                 intptr_t deopt_id,
+                                 intptr_t token_pos,
+                                 LocationSummary* locs);
+
   void EmitInstanceCall(ExternalLabel* target_label,
                         const ICData& ic_data,
                         const Array& arguments_descriptor,
@@ -204,6 +212,8 @@
     return current_block_->try_index();
   }
 
+  bool may_reoptimize() const { return may_reoptimize_; }
+
   static Condition FlipCondition(Condition condition);
 
   static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r);
@@ -311,6 +321,8 @@
   GrowableArray<CompilerDeoptInfo*> deopt_infos_;
   GrowableArray<SlowPathCode*> slow_path_code_;
   const bool is_optimizing_;
+  // Set to true if optimized code has IC calls.
+  bool may_reoptimize_;
 
   const Bool& bool_true_;
   const Bool& bool_false_;
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index b5848d6..5b39c10 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -214,7 +214,7 @@
     ASSERT(graph != NULL);
     const Function& function = graph->parsed_function().function();
     ASSERT(function.HasCode());
-    const Code& code = Code::Handle(function.CurrentCode());
+    const Code& code = Code::Handle(function.unoptimized_code());
     skip_static_call_deopt_ids_.Clear();
     code.ExtractUncalledStaticCallDeoptIds(&skip_static_call_deopt_ids_);
     for (BlockIterator block_it = graph->postorder_iterator();
@@ -262,7 +262,6 @@
  public:
   explicit CallSiteInliner(FlowGraph* flow_graph)
       : caller_graph_(flow_graph),
-        next_ssa_temp_index_(flow_graph->max_virtual_register_number()),
         inlined_(false),
         initial_size_(flow_graph->InstructionCount()),
         inlined_size_(0),
@@ -451,7 +450,8 @@
                          &CompilerStats::graphinliner_ssa_timer,
                          isolate);
         // Compute SSA on the callee graph, catching bailouts.
-        callee_graph->ComputeSSA(next_ssa_temp_index_, &param_stubs);
+        callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(),
+                                 &param_stubs);
         callee_graph->ComputeUseLists();
       }
 
@@ -520,7 +520,6 @@
 
         // Plug result in the caller graph.
         caller_graph_->InlineCall(call, callee_graph);
-        next_ssa_temp_index_ = caller_graph_->max_virtual_register_number();
 
         // Remove push arguments of the call.
         for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
@@ -627,8 +626,8 @@
         TRACE_INLINING(OS::Print("     Bailout: non-closure operator\n"));
         continue;
       }
-      GrowableArray<Value*> arguments(call->ArgumentCount() - 1);
-      for (int i = 1; i < call->ArgumentCount(); ++i) {
+      GrowableArray<Value*> arguments(call->ArgumentCount());
+      for (int i = 0; i < call->ArgumentCount(); ++i) {
         arguments.Add(call->ArgumentAt(i)->value());
       }
       TryInlining(closure->function(),
@@ -757,7 +756,6 @@
 
 
   FlowGraph* caller_graph_;
-  intptr_t next_ssa_temp_index_;
   bool inlined_;
   intptr_t initial_size_;
   intptr_t inlined_size_;
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 9b61175..6172ca5 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -32,6 +32,7 @@
     "Eliminate redundant bounds checks.");
 DEFINE_FLAG(int, max_polymorphic_checks, 4,
     "Maximum number of polymorphic check, otherwise it is megamorphic.");
+DEFINE_FLAG(bool, remove_redundant_phis, true, "Remove redundant phis.");
 
 
 void FlowGraphOptimizer::ApplyICData() {
@@ -679,9 +680,16 @@
     case Token::kADD:
     case Token::kSUB:
       if (HasOnlyTwoSmis(ic_data)) {
-        operands_type = kSmiCid;
+        // Don't generate smi code if the IC data is marked because
+        // of an overflow.
+        operands_type = (ic_data.deopt_reason() == kDeoptBinarySmiOp)
+            ? kMintCid
+            : kSmiCid;
       } else if (HasTwoMintOrSmi(ic_data) &&
                  FlowGraphCompiler::SupportsUnboxedMints()) {
+        // Don't generate mint code if the IC data is marked because of an
+        // overflow.
+        if (ic_data.deopt_reason() == kDeoptBinaryMintOp) return false;
         operands_type = kMintCid;
       } else if (ShouldSpecializeForDouble(ic_data)) {
         operands_type = kDoubleCid;
@@ -691,6 +699,10 @@
       break;
     case Token::kMUL:
       if (HasOnlyTwoSmis(ic_data)) {
+        // Don't generate smi code if the IC data is marked because of an
+        // overflow.
+        // TODO(fschneider): Add unboxed mint multiplication.
+        if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false;
         operands_type = kSmiCid;
       } else if (ShouldSpecializeForDouble(ic_data)) {
         operands_type = kDoubleCid;
@@ -717,8 +729,7 @@
     case Token::kBIT_XOR:
       if (HasOnlyTwoSmis(ic_data)) {
         operands_type = kSmiCid;
-      } else if (HasTwoMintOrSmi(ic_data) &&
-                 FlowGraphCompiler::SupportsUnboxedMints()) {
+      } else if (HasTwoMintOrSmi(ic_data)) {
         operands_type = kMintCid;
       } else {
         return false;
@@ -727,11 +738,19 @@
     case Token::kSHR:
     case Token::kSHL:
       if (HasOnlyTwoSmis(ic_data)) {
-        operands_type = kSmiCid;
-      } else if (FlowGraphCompiler::SupportsUnboxedMints() &&
-                 HasTwoMintOrSmi(ic_data) &&
+        // Left shift may overflow from smi into mint or big ints.
+        // Don't generate smi code if the IC data is marked because
+        // of an overflow.
+        if (ic_data.deopt_reason() == kDeoptShiftMintOp) return false;
+        operands_type = (ic_data.deopt_reason() == kDeoptBinarySmiOp)
+            ? kMintCid
+            : kSmiCid;
+      } else if (HasTwoMintOrSmi(ic_data) &&
                  HasOnlyOneSmi(ICData::Handle(
                      ic_data.AsUnaryClassChecksForArgNr(1)))) {
+        // Don't generate mint code if the IC data is marked because of an
+        // overflow.
+        if (ic_data.deopt_reason() == kDeoptShiftMintOp) return false;
         // Check for smi/mint << smi or smi/mint >> smi.
         operands_type = kMintCid;
       } else {
@@ -740,6 +759,7 @@
       break;
     case Token::kTRUNCDIV:
       if (HasOnlyTwoSmis(ic_data)) {
+        if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false;
         operands_type = kSmiCid;
       } else {
         return false;
@@ -768,6 +788,7 @@
     call->ReplaceWith(double_bin_op, current_iterator());
     RemovePushArguments(call);
   } else if (operands_type == kMintCid) {
+    if (!FlowGraphCompiler::SupportsUnboxedMints()) return false;
     Value* left = call->ArgumentAt(0)->value();
     Value* right = call->ArgumentAt(1)->value();
     if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
@@ -3701,10 +3722,12 @@
   graph_->ComputeDominators(&dominance_frontier);
   graph_->ComputeUseLists();
 
-  for (intptr_t i = 0; i < redundant_phis.length(); i++) {
-    PhiInstr* phi = redundant_phis[i];
-    phi->ReplaceUsesWith(phi->InputAt(0)->definition());
-    phi->mark_dead();
+  if (FLAG_remove_redundant_phis) {
+    for (intptr_t i = 0; i < redundant_phis.length(); i++) {
+      PhiInstr* phi = redundant_phis[i];
+      phi->ReplaceUsesWith(phi->InputAt(0)->definition());
+      phi->mark_dead();
+    }
   }
 
   if (FLAG_trace_constant_propagation) {
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index fb4e927..819a80a9 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -73,15 +73,22 @@
     return 0;
   }
 
-  uword TryAllocate(intptr_t size, Space space) {
+  uword TryAllocate(
+      intptr_t size,
+      Space space,
+      PageSpace::GrowthPolicy growth_policy = PageSpace::kControlGrowth) {
     ASSERT(!read_only_);
     switch (space) {
       case kNew:
         return new_space_->TryAllocate(size);
       case kOld:
-        return old_space_->TryAllocate(size, HeapPage::kData);
+        return old_space_->TryAllocate(size,
+                                       HeapPage::kData,
+                                       growth_policy);
       case kCode:
-        return old_space_->TryAllocate(size, HeapPage::kExecutable);
+        return old_space_->TryAllocate(size,
+                                       HeapPage::kExecutable,
+                                       growth_policy);
       default:
         UNREACHABLE();
     }
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 3984e9d..b3410f5 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -113,6 +113,7 @@
   for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
     GrowableArray<intptr_t> class_ids;
     ic_data.GetCheckAt(i, &class_ids, &target);
+    const intptr_t count = ic_data.GetCountAt(i);
     if (i > 0) {
       f->Print(" | ");
     }
@@ -124,6 +125,9 @@
           Class::Handle(Isolate::Current()->class_table()->At(class_ids[k]));
       f->Print("%s", String::Handle(cls.Name()).ToCString());
     }
+    if (count > 0) {
+      f->Print(" #%"Pd, count);
+    }
   }
   f->Print("]");
 }
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 340065d..21d220d 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -231,11 +231,9 @@
     const Function& function) {
   // Only core and math library methods can be recognized.
   const Library& core_lib = Library::Handle(Library::CoreLibrary());
-  const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
   const Library& math_lib = Library::Handle(Library::MathLibrary());
   const Class& function_class = Class::Handle(function.Owner());
   if ((function_class.library() != core_lib.raw()) &&
-      (function_class.library() != core_impl_lib.raw()) &&
       (function_class.library() != math_lib.raw())) {
     return kUnknown;
   }
@@ -1329,6 +1327,12 @@
     case Token::kBIT_OR:
     case Token::kBIT_XOR:
       return false;
+    case Token::kSHR: {
+      // Can't deopt if shift-count is known positive.
+      Range* right_range = this->right()->definition()->range();
+      return (right_range == NULL)
+          || !right_range->IsWithin(0, RangeBoundary::kPlusInfinity);
+    }
     default:
       return overflow_;
   }
@@ -1841,14 +1845,12 @@
 
 
 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  // The arguments to the stub include the closure.  The arguments
-  // descriptor describes the closure's arguments (and so does not include
-  // the closure).
+  // The arguments to the stub include the closure, as does the arguments
+  // descriptor.
   Register temp_reg = locs()->temp(0).reg();
   int argument_count = ArgumentCount();
   const Array& arguments_descriptor =
-      DartEntry::ArgumentsDescriptor(argument_count - 1,
-                                         argument_names());
+      DartEntry::ArgumentsDescriptor(argument_count, argument_names());
   __ LoadObject(temp_reg, arguments_descriptor);
   compiler->GenerateDartCall(deopt_id(),
                              token_pos(),
@@ -1873,7 +1875,8 @@
                                checked_argument_count());
   }
   if (compiler->is_optimizing()) {
-    if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
+    ASSERT(HasICData());
+    if (ic_data()->NumberOfChecks() > 0) {
       const ICData& unary_ic_data =
           ICData::ZoneHandle(ic_data()->AsUnaryClassChecks());
       compiler->GenerateInstanceCall(deopt_id(),
@@ -1883,11 +1886,16 @@
                                      locs(),
                                      unary_ic_data);
     } else {
-      Label* deopt =
-          compiler->AddDeoptStub(deopt_id(), kDeoptInstanceCallNoICData);
-      __ jmp(deopt);
+      // Call was not visited yet, use original ICData in order to populate it.
+      compiler->GenerateInstanceCall(deopt_id(),
+                                     token_pos(),
+                                     ArgumentCount(),
+                                     argument_names(),
+                                     locs(),
+                                     call_ic_data);
     }
   } else {
+    // Unoptimized code.
     ASSERT(!HasICData());
     compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
                                    deopt_id(),
@@ -2022,6 +2030,7 @@
 
 void CreateClosureInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const Function& closure_function = function();
+  ASSERT(!closure_function.IsImplicitStaticClosureFunction());
   const Code& stub = Code::Handle(
       StubCode::GetAllocationStubForClosure(closure_function));
   const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
@@ -2506,8 +2515,6 @@
     return;
   }
 
-
-  // If left is a l
   RangeBoundary left_min =
     IsArrayLength(left_defn) ?
         RangeBoundary::FromDefinition(left_defn) : left_range->min();
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 7010631..23af66f 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -2524,6 +2524,8 @@
 
   intptr_t token_pos() const { return ast_node_.token_pos(); }
 
+  const Function& function() const { return ast_node_.function(); }
+
   const String& native_name() const {
     return ast_node_.native_c_function_name();
   }
@@ -2532,16 +2534,6 @@
     return ast_node_.native_c_function();
   }
 
-  intptr_t argument_count() const { return ast_node_.argument_count(); }
-
-  bool has_optional_parameters() const {
-    return ast_node_.has_optional_parameters();
-  }
-
-  bool is_native_instance_closure() const {
-    return ast_node_.is_native_instance_closure();
-  }
-
   virtual void PrintOperandsTo(BufferFormatter* f) const;
 
   virtual bool CanDeoptimize() const { return false; }
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 3d2ebb5..74b2a17 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -20,7 +20,6 @@
 namespace dart {
 
 DECLARE_FLAG(int, optimization_counter_threshold);
-DECLARE_FLAG(bool, trace_functions);
 DECLARE_FLAG(bool, propagate_ic_data);
 
 // Generic summary for call instructions that have all arguments pushed
@@ -36,52 +35,61 @@
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 1;
   LocationSummary* locs =
-      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
   locs->set_in(0, Location::RegisterLocation(EAX));
-  locs->set_temp(0, Location::RequiresRegister());
+  locs->set_temp(0, Location::RegisterLocation(EDX));
   return locs;
 }
 
 
+// Attempt optimized compilation at return instruction instead of at the entry.
+// The entry needs to be patchable, no inlined objects are allowed in the area
+// that will be overwritten by the patch instruction: a jump).
 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const Function& function =
+      Function::ZoneHandle(compiler->parsed_function().function().raw());
   Register result = locs()->in(0).reg();
-  Register temp = locs()->temp(0).reg();
+  Register func_reg = locs()->temp(0).reg();
   ASSERT(result == EAX);
-  if (!compiler->is_optimizing()) {
-    // Count only in unoptimized code.
-    // TODO(srdjan): Replace the counting code with a type feedback
-    // collection and counting stub.
-    const Function& function =
-          Function::ZoneHandle(compiler->parsed_function().function().raw());
-    __ LoadObject(temp, function);
-    __ incl(FieldAddress(temp, Function::usage_counter_offset()));
+  if (compiler->is_optimizing()) {
+    if (compiler->may_reoptimize()) {
+      // Increment of counter occurs only in optimized IC calls, as they
+      // can cause reoptimization.
+      Label done;
+      __ LoadObject(func_reg, function);
+      __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
+          Immediate(FLAG_optimization_counter_threshold));
+      __ j(LESS, &done, Assembler::kNearJump);
+      // Equal (or greater), optimize. Note that counter can reach equality
+      // only at return instruction.
+      // The stub call preserves result register (EAX).
+      ASSERT(func_reg == EDX);
+      compiler->GenerateCall(0,  // no token position.
+                             &StubCode::OptimizeFunctionLabel(),
+                             PcDescriptors::kOther,
+                             locs());
+      __ Bind(&done);
+    }
+  } else {
+    __ LoadObject(func_reg, function);
+    __ incl(FieldAddress(func_reg, Function::usage_counter_offset()));
     if (FlowGraphCompiler::CanOptimize() &&
         compiler->parsed_function().function().is_optimizable()) {
       // Do not optimize if usage count must be reported.
-      __ cmpl(FieldAddress(temp, Function::usage_counter_offset()),
+      __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
           Immediate(FLAG_optimization_counter_threshold));
       Label not_yet_hot;
       __ j(LESS, &not_yet_hot, Assembler::kNearJump);
-      __ pushl(result);  // Preserve result.
-      __ pushl(temp);  // Argument for runtime: function to optimize.
-      __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
-      __ popl(temp);  // Remove argument.
-      __ popl(result);  // Restore result.
+      // Equal (or greater), optimize.
+      // The stub call preserves result register (EAX).
+      ASSERT(func_reg == EDX);
+      compiler->GenerateCall(0,  // no token position.
+                             &StubCode::OptimizeFunctionLabel(),
+                             PcDescriptors::kOther,
+                             locs());
       __ Bind(&not_yet_hot);
     }
   }
-  if (FLAG_trace_functions) {
-    const Function& function =
-        Function::ZoneHandle(compiler->parsed_function().function().raw());
-    __ LoadObject(temp, function);
-    __ pushl(result);  // Preserve result.
-    __ pushl(temp);
-    compiler->GenerateCallRuntime(0,
-                                  kTraceFunctionExitRuntimeEntry,
-                                  locs());
-    __ popl(temp);  // Remove argument.
-    __ popl(result);  // Restore result.
-  }
 #if defined(DEBUG)
   // TODO(srdjan): Fix for functions with finally clause.
   // A finally clause may leave a previously pushed return value if it
@@ -295,7 +303,11 @@
     LocationSummary* locs =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     locs->set_in(0, Location::RegisterOrConstant(left()));
-    locs->set_in(1, Location::RegisterOrConstant(right()));
+    // Only one input can be a constant operand. The case of two constant
+    // operands should be handled by constant propagation.
+    locs->set_in(1, locs->in(0).IsConstant()
+                        ? Location::RequiresRegister()
+                        : Location::RegisterOrConstant(right()));
     locs->set_out(Location::RequiresRegister());
     return locs;
   }
@@ -357,7 +369,13 @@
   ICData& equality_ic_data = ICData::ZoneHandle();
   if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
     ASSERT(!original_ic_data.IsNull());
-    equality_ic_data = original_ic_data.AsUnaryClassChecks();
+    if (original_ic_data.NumberOfChecks() == 0) {
+      // IC call for reoptimization populates original ICData.
+      equality_ic_data = original_ic_data.raw();
+    } else {
+      // Megamorphic call.
+      equality_ic_data = original_ic_data.AsUnaryClassChecks();
+    }
   } else {
     equality_ic_data = ICData::New(compiler->parsed_function().function(),
                                    operator_name,
@@ -619,36 +637,10 @@
                                 BranchInstr* branch) {
   Location left = locs.in(0);
   Location right = locs.in(1);
+  ASSERT(!left.IsConstant() || !right.IsConstant());
 
   Condition true_condition = TokenKindToSmiCondition(kind);
 
-  if (left.IsConstant() && right.IsConstant()) {
-    bool result = false;
-    // One of them could be NULL (for equality only).
-    if (left.constant().IsNull() || right.constant().IsNull()) {
-      ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
-      result = left.constant().IsNull() && right.constant().IsNull();
-      if (kind == Token::kNE) {
-        result = !result;
-      }
-    } else {
-    // TODO(vegorov): should be eliminated earlier by constant propagation.
-      result = FlowGraphCompiler::EvaluateCondition(
-          true_condition,
-          Smi::Cast(left.constant()).Value(),
-          Smi::Cast(right.constant()).Value());
-    }
-
-    if (branch != NULL) {
-      branch->EmitBranchOnValue(compiler, result);
-    } else {
-      __ LoadObject(locs.out().reg(), result ? compiler->bool_true()
-                                             : compiler->bool_false());
-    }
-
-    return;
-  }
-
   if (left.IsConstant()) {
     __ CompareObject(right.reg(), left.constant());
     true_condition = FlowGraphCompiler::FlipCondition(true_condition);
@@ -930,7 +922,11 @@
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RegisterOrConstant(left()));
-    summary->set_in(1, Location::RegisterOrConstant(right()));
+    // Only one input can be a constant operand. The case of two constant
+    // operands should be handled by constant propagation.
+    summary->set_in(1, summary->in(0).IsConstant()
+                           ? Location::RequiresRegister()
+                           : Location::RegisterOrConstant(right()));
     summary->set_out(Location::RequiresRegister());
     return summary;
   }
@@ -999,7 +995,13 @@
   ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw());
   if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
     ASSERT(!ic_data()->IsNull());
-    relational_ic_data = ic_data()->AsUnaryClassChecks();
+    if (ic_data()->NumberOfChecks() == 0) {
+      // IC call for reoptimization populates original ICData.
+      relational_ic_data = ic_data()->raw();
+    } else {
+      // Megamorphic call.
+      relational_ic_data = ic_data()->AsUnaryClassChecks();
+    }
   } else {
     relational_ic_data = ICData::New(compiler->parsed_function().function(),
                                      function_name,
@@ -1057,18 +1059,14 @@
   // Push the result place holder initialized to NULL.
   __ PushObject(Object::ZoneHandle());
   // Pass a pointer to the first argument in EAX.
-  intptr_t arg_count = argument_count();
-  if (is_native_instance_closure()) {
-    arg_count += 1;
-  }
-  if (!has_optional_parameters() && !is_native_instance_closure()) {
-    __ leal(EAX, Address(EBP, (1 + arg_count) * kWordSize));
+  if (!function().HasOptionalParameters()) {
+    __ leal(EAX, Address(EBP, (1 + function().NumParameters()) * kWordSize));
   } else {
     __ leal(EAX,
             Address(EBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize));
   }
   __ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function())));
-  __ movl(EDX, Immediate(arg_count));
+  __ movl(EDX, Immediate(NativeArguments::ComputeArgcTag(function())));
   compiler->GenerateCall(token_pos(),
                          &StubCode::CallNativeCFunctionLabel(),
                          PcDescriptors::kOther,
@@ -1732,26 +1730,24 @@
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrConstant(right(), ECX));
+    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
     summary->set_out(Location::SameAsFirstInput());
     return summary;
   } else if (op_kind() == Token::kSHL) {
-    // Two Smi operands can easily overflow into Mint.
-    const intptr_t kNumTemps = 2;
+    const intptr_t kNumTemps = 1;
     LocationSummary* summary =
-        new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
-    summary->set_in(0, Location::RegisterLocation(EAX));
-    summary->set_in(1, Location::RegisterLocation(EDX));
-    summary->set_temp(0, Location::RegisterLocation(EBX));
-    summary->set_temp(1, Location::RegisterLocation(ECX));
-    summary->set_out(Location::RegisterLocation(EAX));
+        new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+    summary->set_temp(0, Location::RequiresRegister());
+    summary->set_out(Location::SameAsFirstInput());
     return summary;
   } else {
     const intptr_t kNumTemps = 0;
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::RegisterOrConstant(right()));
+    summary->set_in(1, Location::RegisterOrSmiConstant(right()));
     summary->set_out(Location::SameAsFirstInput());
     return summary;
   }
@@ -1826,6 +1822,27 @@
         __ SmiTag(left);
         break;
       }
+      case Token::kSHL: {
+        // shll operation masks the count to 5 bits.
+        const intptr_t kCountLimit = 0x1F;
+        intptr_t value = Smi::Cast(constant).Value();
+        if (value == 0) break;
+        if ((value < 0) || (value >= kCountLimit)) {
+          // This condition may not be known earlier in some cases because
+          // of constant propagation, inlining, etc.
+          __ jmp(deopt);
+          break;
+        }
+        Register temp = locs()->temp(0).reg();
+        __ movl(temp, left);
+        __ shll(left, Immediate(value));
+        __ sarl(left, Immediate(value));
+        __ cmpl(left, temp);
+        __ j(NOT_EQUAL, deopt);  // Overflow.
+        // Shift for result now we know there is no overflow.
+        __ shll(left, Immediate(value));
+        break;
+      }
 
       default:
         UNREACHABLE();
@@ -1892,16 +1909,22 @@
       break;
     }
     case Token::kSHR: {
-      // sarl operation masks the count to 5 bits.
-      const Immediate kCountLimit = Immediate(0x1F);
-      __ cmpl(right, Immediate(0));
-      __ j(LESS, deopt);
+      if (CanDeoptimize()) {
+        __ cmpl(right, Immediate(0));
+        __ j(LESS, deopt);
+      }
       __ SmiUntag(right);
-      __ cmpl(right, kCountLimit);
-      Label count_ok;
-      __ j(LESS, &count_ok, Assembler::kNearJump);
-      __ movl(right, kCountLimit);
-      __ Bind(&count_ok);
+      // sarl operation masks the count to 5 bits.
+      const intptr_t kCountLimit = 0x1F;
+      Range* right_range = this->right()->definition()->range();
+      if ((right_range == NULL) ||
+          !right_range->IsWithin(RangeBoundary::kMinusInfinity, kCountLimit)) {
+       __ cmpl(right, Immediate(kCountLimit));
+        Label count_ok;
+        __ j(LESS, &count_ok, Assembler::kNearJump);
+        __ movl(right, Immediate(kCountLimit));
+        __ Bind(&count_ok);
+      }
       ASSERT(right == ECX);  // Count must be in ECX
       __ SmiUntag(left);
       __ sarl(left, right);
@@ -1910,7 +1933,6 @@
     }
     case Token::kSHL: {
       Register temp = locs()->temp(0).reg();
-      Label call_method, done;
       // Check if count too large for handling it inlined.
       __ movl(temp, left);
       Range* right_range = this->right()->definition()->range();
@@ -1919,38 +1941,17 @@
       if (right_needs_check) {
         __ cmpl(right,
           Immediate(reinterpret_cast<int32_t>(Smi::New(Smi::kBits))));
-        __ j(ABOVE_EQUAL, &call_method, Assembler::kNearJump);
+        __ j(ABOVE_EQUAL, deopt);
       }
-      Register right_temp = locs()->temp(1).reg();
-      ASSERT(right_temp == ECX);  // Count must be in ECX
-      __ movl(right_temp, right);
-      __ SmiUntag(right_temp);
+      ASSERT(right == ECX);  // Count must be in ECX
+      __ SmiUntag(right);
       // Overflow test (preserve temp and right);
-      __ shll(left, right_temp);
-      __ sarl(left, right_temp);
+      __ shll(left, right);
+      __ sarl(left, right);
       __ cmpl(left, temp);
-      __ j(NOT_EQUAL, &call_method, Assembler::kNearJump);  // Overflow.
+      __ j(NOT_EQUAL, deopt);  // Overflow.
       // Shift for result now we know there is no overflow.
-      __ shll(left, right_temp);
-      __ jmp(&done);
-      {
-        __ Bind(&call_method);
-        Function& target = Function::ZoneHandle(
-            ic_data()->GetTargetForReceiverClassId(kSmiCid));
-        ASSERT(!target.IsNull());
-        const intptr_t kArgumentCount = 2;
-        __ pushl(temp);
-        __ pushl(right);
-        compiler->GenerateStaticCall(
-            deopt_id(),
-            instance_call()->token_pos(),
-            target,
-            kArgumentCount,
-            Array::Handle(),  // No argument names.
-            locs());
-        ASSERT(result == EAX);
-      }
-      __ Bind(&done);
+      __ shll(left, right);
       break;
     }
     case Token::kDIV: {
@@ -2387,8 +2388,8 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs =
       new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::RegisterOrConstant(array()));
-  locs->set_in(1, Location::RegisterOrConstant(index()));
+  locs->set_in(0, Location::RegisterOrSmiConstant(array()));
+  locs->set_in(1, Location::RegisterOrSmiConstant(index()));
   return locs;
 }
 
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index e9a35e2..32766ac1 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -20,7 +20,6 @@
 namespace dart {
 
 DECLARE_FLAG(int, optimization_counter_threshold);
-DECLARE_FLAG(bool, trace_functions);
 DECLARE_FLAG(bool, propagate_ic_data);
 
 // Generic summary for call instructions that have all arguments pushed
@@ -36,53 +35,65 @@
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 1;
   LocationSummary* locs =
-      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
   locs->set_in(0, Location::RegisterLocation(RAX));
-  locs->set_temp(0, Location::RequiresRegister());
+  locs->set_temp(0, Location::RegisterLocation(RDX));
   return locs;
 }
 
 
+// Attempt optimized compilation at return instruction instead of at the entry.
+// The entry needs to be patchable, no inlined objects are allowed in the area
+// that will be overwritten by the patch instruction: a jump).
 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const Function& function =
+      Function::ZoneHandle(compiler->parsed_function().function().raw());
   Register result = locs()->in(0).reg();
-  Register temp = locs()->temp(0).reg();
+  Register func_reg = locs()->temp(0).reg();
   ASSERT(result == RAX);
-  if (!compiler->is_optimizing()) {
+  if (compiler->is_optimizing()) {
+    if (compiler->may_reoptimize()) {
+      // Increment of counter occurs only in optimized IC calls, as they
+      // can cause reoptimization.
+      Label done;
+      __ LoadObject(func_reg, function);
+      __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
+          Immediate(FLAG_optimization_counter_threshold));
+      __ j(LESS, &done, Assembler::kNearJump);
+      // Equal (or greater), optimize. Note that counter can reach equality
+      // only at return instruction.
+      // The stub call preserves result register (EAX).
+      ASSERT(func_reg == RDX);
+      compiler->GenerateCall(0,  // no token position.
+                             &StubCode::OptimizeFunctionLabel(),
+                             PcDescriptors::kOther,
+                             locs());
+      __ Bind(&done);
+    }
+  } else {
     __ Comment("Check function counter");
     // Count only in unoptimized code.
     // TODO(srdjan): Replace the counting code with a type feedback
     // collection and counting stub.
-    const Function& function =
-          Function::ZoneHandle(compiler->parsed_function().function().raw());
-    __ LoadObject(temp, function);
-    __ incq(FieldAddress(temp, Function::usage_counter_offset()));
+    __ LoadObject(func_reg, function);
+    __ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
     if (FlowGraphCompiler::CanOptimize() &&
         compiler->parsed_function().function().is_optimizable()) {
       // Do not optimize if usage count must be reported.
-      __ cmpq(FieldAddress(temp, Function::usage_counter_offset()),
+      __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
           Immediate(FLAG_optimization_counter_threshold));
       Label not_yet_hot;
       __ j(LESS, &not_yet_hot, Assembler::kNearJump);
-      __ pushq(result);  // Preserve result.
-      __ pushq(temp);  // Argument for runtime: function to optimize.
-      __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
-      __ popq(temp);  // Remove argument.
-      __ popq(result);  // Restore result.
+      // Equal (or greater), optimize.
+      // The stub call preserves result register(RAX)
+      ASSERT(func_reg == RDX);
+      compiler->GenerateCall(0,  // no token position.
+                             &StubCode::OptimizeFunctionLabel(),
+                             PcDescriptors::kOther,
+                             locs());
       __ Bind(&not_yet_hot);
     }
   }
-  if (FLAG_trace_functions) {
-    const Function& function =
-        Function::ZoneHandle(compiler->parsed_function().function().raw());
-    __ LoadObject(temp, function);
-    __ pushq(result);  // Preserve result.
-    __ pushq(temp);
-    compiler->GenerateCallRuntime(0,
-                                  kTraceFunctionExitRuntimeEntry,
-                                  NULL);
-    __ popq(temp);  // Remove argument.
-    __ popq(result);  // Restore result.
-  }
 #if defined(DEBUG)
   // TODO(srdjan): Fix for functions with finally clause.
   // A finally clause may leave a previously pushed return value if it
@@ -293,7 +304,11 @@
     LocationSummary* locs =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     locs->set_in(0, Location::RegisterOrConstant(left()));
-    locs->set_in(1, Location::RegisterOrConstant(right()));
+    // Only one input can be a constant operand. The case of two constant
+    // operands should be handled by constant propagation.
+    locs->set_in(1, locs->in(0).IsConstant()
+                        ? Location::RequiresRegister()
+                        : Location::RegisterOrConstant(right()));
     locs->set_out(Location::RequiresRegister());
     return locs;
   }
@@ -355,7 +370,13 @@
   ICData& equality_ic_data = ICData::ZoneHandle(original_ic_data.raw());
   if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
     ASSERT(!original_ic_data.IsNull());
-    equality_ic_data = original_ic_data.AsUnaryClassChecks();
+    if (original_ic_data.NumberOfChecks() == 0) {
+      // IC call for reoptimization populates original ICData.
+      equality_ic_data = original_ic_data.raw();
+    } else {
+      // Megamorphic call.
+      equality_ic_data = original_ic_data.AsUnaryClassChecks();
+    }
   } else {
     equality_ic_data = ICData::New(compiler->parsed_function().function(),
                                    operator_name,
@@ -618,36 +639,10 @@
                                 BranchInstr* branch) {
   Location left = locs.in(0);
   Location right = locs.in(1);
+  ASSERT(!left.IsConstant() || !right.IsConstant());
 
   Condition true_condition = TokenKindToSmiCondition(kind);
 
-  if (left.IsConstant() && right.IsConstant()) {
-    bool result = false;
-    // One of them could be NULL (for equality only).
-    if (left.constant().IsNull() || right.constant().IsNull()) {
-      ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
-      result = left.constant().IsNull() && right.constant().IsNull();
-      if (kind == Token::kNE) {
-        result = !result;
-      }
-    } else {
-      // TODO(vegorov): should be eliminated earlier by constant propagation.
-      result = FlowGraphCompiler::EvaluateCondition(
-          true_condition,
-          Smi::Cast(left.constant()).Value(),
-          Smi::Cast(right.constant()).Value());
-    }
-
-    if (branch != NULL) {
-      branch->EmitBranchOnValue(compiler, result);
-    } else {
-      __ LoadObject(locs.out().reg(), result ? compiler->bool_true()
-                                             : compiler->bool_false());
-    }
-
-    return;
-  }
-
   if (left.IsConstant()) {
     __ CompareObject(right.reg(), left.constant());
     true_condition = FlowGraphCompiler::FlipCondition(true_condition);
@@ -802,7 +797,11 @@
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RegisterOrConstant(left()));
-    summary->set_in(1, Location::RegisterOrConstant(right()));
+    // Only one input can be a constant operand. The case of two constant
+    // operands should be handled by constant propagation.
+    summary->set_in(1, summary->in(0).IsConstant()
+                           ? Location::RequiresRegister()
+                           : Location::RegisterOrConstant(right()));
     summary->set_out(Location::RequiresRegister());
     return summary;
   }
@@ -868,7 +867,13 @@
   ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw());
   if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
     ASSERT(!ic_data()->IsNull());
-    relational_ic_data = ic_data()->AsUnaryClassChecks();
+    if (ic_data()->NumberOfChecks() == 0) {
+      // IC call for reoptimization populates original ICData.
+      relational_ic_data = ic_data()->raw();
+    } else {
+      // Megamorphic call.
+      relational_ic_data = ic_data()->AsUnaryClassChecks();
+    }
   } else {
     relational_ic_data = ICData::New(compiler->parsed_function().function(),
                                      function_name,
@@ -922,18 +927,14 @@
   // Push the result place holder initialized to NULL.
   __ PushObject(Object::ZoneHandle());
   // Pass a pointer to the first argument in RAX.
-  intptr_t arg_count = argument_count();
-  if (is_native_instance_closure()) {
-    arg_count += 1;
-  }
-  if (!has_optional_parameters() && !is_native_instance_closure()) {
-    __ leaq(RAX, Address(RBP, (1 + arg_count) * kWordSize));
+  if (!function().HasOptionalParameters()) {
+    __ leaq(RAX, Address(RBP, (1 + function().NumParameters()) * kWordSize));
   } else {
     __ leaq(RAX,
             Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize));
   }
   __ movq(RBX, Immediate(reinterpret_cast<uword>(native_c_function())));
-  __ movq(R10, Immediate(arg_count));
+  __ movq(R10, Immediate(NativeArguments::ComputeArgcTag(function())));
   compiler->GenerateCall(token_pos(),
                          &StubCode::CallNativeCFunctionLabel(),
                          PcDescriptors::kOther,
@@ -1612,26 +1613,24 @@
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::RegisterLocation(RCX));
+    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
     summary->set_out(Location::SameAsFirstInput());
     return summary;
   } else if (op_kind() == Token::kSHL) {
-    // Two Smi operands can easily overflow into Mint.
-    const intptr_t kNumTemps = 2;
+    const intptr_t kNumTemps = 1;
     LocationSummary* summary =
-        new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
-    summary->set_in(0, Location::RegisterLocation(RAX));
-    summary->set_in(1, Location::RegisterLocation(RDX));
-    summary->set_out(Location::RegisterLocation(RAX));
-    summary->set_temp(0, Location::RegisterLocation(RBX));
-    summary->set_temp(1, Location::RegisterLocation(RCX));
+        new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
+    summary->set_temp(0, Location::RequiresRegister());
+    summary->set_out(Location::SameAsFirstInput());
     return summary;
   } else {
     const intptr_t kNumTemps = 0;
     LocationSummary* summary =
         new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::RequiresRegister());
+    summary->set_in(1, Location::RegisterOrSmiConstant(right()));
     summary->set_out(Location::SameAsFirstInput());
     return summary;
   }
@@ -1664,6 +1663,13 @@
         if (deopt != NULL) __ j(OVERFLOW, deopt);
         break;
       }
+      case Token::kMUL: {
+        // Keep left value tagged and untag right value.
+        const intptr_t value = Smi::Cast(constant).Value();
+        __ imulq(left, Immediate(value));
+        if (deopt != NULL) __ j(OVERFLOW, deopt);
+        break;
+      }
       case Token::kBIT_AND: {
         // No overflow check.
         __ andq(left, Immediate(imm));
@@ -1701,6 +1707,28 @@
         __ SmiTag(left);
         break;
       }
+      case Token::kSHL: {
+        // shlq operation masks the count to 6 bits.
+        const intptr_t kCountLimit = 0x3F;
+        intptr_t value = Smi::Cast(constant).Value();
+        if (value == 0) break;
+        if ((value < 0) || (value >= kCountLimit)) {
+          // This condition may not be known earlier in some cases because
+          // of constant propagation, inlining, etc.
+          __ jmp(deopt);
+          break;
+        }
+        Register temp = locs()->temp(0).reg();
+        __ movq(temp, left);
+        __ shlq(left, Immediate(value));
+        __ sarq(left, Immediate(value));
+        __ cmpq(left, temp);
+        __ j(NOT_EQUAL, deopt);  // Overflow.
+        // Shift for result now we know there is no overflow.
+        __ shlq(left, Immediate(value));
+        break;
+      }
+
       default:
         UNREACHABLE();
         break;
@@ -1766,16 +1794,22 @@
       break;
     }
     case Token::kSHR: {
-      // sarq operation masks the count to 6 bits.
-      const Immediate kCountLimit = Immediate(0x3F);
-      __ cmpq(right, Immediate(0));
-      __ j(LESS, deopt);
+      if (CanDeoptimize()) {
+        __ cmpq(right, Immediate(0));
+        __ j(LESS, deopt);
+      }
       __ SmiUntag(right);
-      __ cmpq(right, kCountLimit);
-      Label count_ok;
-      __ j(LESS, &count_ok, Assembler::kNearJump);
-      __ movq(right, kCountLimit);
-      __ Bind(&count_ok);
+      // sarq operation masks the count to 6 bits.
+      const intptr_t kCountLimit = 0x3F;
+      Range* right_range = this->right()->definition()->range();
+      if ((right_range == NULL) ||
+          !right_range->IsWithin(RangeBoundary::kMinusInfinity, kCountLimit)) {
+        __ cmpq(right, Immediate(kCountLimit));
+        Label count_ok;
+        __ j(LESS, &count_ok, Assembler::kNearJump);
+        __ movq(right, Immediate(kCountLimit));
+        __ Bind(&count_ok);
+      }
       ASSERT(right == RCX);  // Count must be in RCX
       __ SmiUntag(left);
       __ sarq(left, right);
@@ -1784,7 +1818,6 @@
     }
     case Token::kSHL: {
       Register temp = locs()->temp(0).reg();
-      Label call_method, done;
       // Check if count too large for handling it inlined.
       __ movq(temp, left);
       Range* right_range = this->right()->definition()->range();
@@ -1793,38 +1826,17 @@
       if (right_needs_check) {
         __ cmpq(right,
             Immediate(reinterpret_cast<int64_t>(Smi::New(Smi::kBits))));
-        __ j(ABOVE_EQUAL, &call_method, Assembler::kNearJump);
+        __ j(ABOVE_EQUAL, deopt);
       }
-      Register right_temp = locs()->temp(1).reg();
-      ASSERT(right_temp == RCX);  // Count must be in RCX
-      __ movq(right_temp, right);
-      __ SmiUntag(right_temp);
+      ASSERT(right == RCX);  // Count must be in RCX
+      __ SmiUntag(right);
       // Overflow test (preserve temp and right);
-      __ shlq(left, right_temp);
-      __ sarq(left, right_temp);
+      __ shlq(left, right);
+      __ sarq(left, right);
       __ cmpq(left, temp);
-      __ j(NOT_EQUAL, &call_method, Assembler::kNearJump);  // Overflow.
+      __ j(NOT_EQUAL, deopt);  // Overflow.
       // Shift for result now we know there is no overflow.
-      __ shlq(left, right_temp);
-      __ jmp(&done);
-      {
-        __ Bind(&call_method);
-        Function& target = Function::ZoneHandle(
-            ic_data()->GetTargetForReceiverClassId(kSmiCid));
-        ASSERT(!target.IsNull());
-        const intptr_t kArgumentCount = 2;
-        __ pushq(temp);
-        __ pushq(right);
-        compiler->GenerateStaticCall(
-            deopt_id(),
-            instance_call()->token_pos(),
-            target,
-            kArgumentCount,
-            Array::Handle(),  // No argument names.
-            locs());
-        ASSERT(result == RAX);
-      }
-      __ Bind(&done);
+      __ shlq(left, right);
       break;
     }
     case Token::kDIV: {
@@ -2264,8 +2276,8 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs =
       new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::RequiresRegister());
-  locs->set_in(1, Location::RegisterOrConstant(index()));
+  locs->set_in(0, Location::RegisterOrSmiConstant(array()));
+  locs->set_in(1, Location::RegisterOrSmiConstant(index()));
   return locs;
 }
 
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index 007ac57..59adb5c 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -17,10 +17,9 @@
     return true;
   }
   if ((name[0] == '_') && (test_name[0] == '_')) {
-    // Check if the private class is member of core, coreimpl or
-    // scalarlist and matches the test_class_name.
+    // Check if the private class is member of core or scalarlist and matches
+    // the test_class_name.
     const Library& core_lib = Library::Handle(Library::CoreLibrary());
-    const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
     const Library& scalarlist_lib =
         Library::Handle(Library::ScalarlistLibrary());
     String& test_str = String::Handle(String::New(test_name));
@@ -31,11 +30,6 @@
       return true;
     }
     test_str_with_key =
-        String::Concat(test_str, String::Handle(core_impl_lib.private_key()));
-    if (strcmp(test_str_with_key.ToCString(), name) == 0) {
-      return true;
-    }
-    test_str_with_key =
         String::Concat(test_str, String::Handle(scalarlist_lib.private_key()));
     if (strcmp(test_str_with_key.ToCString(), name) == 0) {
       return true;
@@ -78,7 +72,6 @@
   const Class& function_class = Class::Handle(function.Owner());
   // Only core, math and scalarlist library methods can be intrinsified.
   if ((function_class.library() != Library::CoreLibrary()) &&
-      (function_class.library() != Library::CoreImplLibrary()) &&
       (function_class.library() != Library::MathLibrary()) &&
       (function_class.library() != Library::ScalarlistLibrary())) {
     return false;
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc
index deffe33..c400725 100644
--- a/runtime/vm/locations.cc
+++ b/runtime/vm/locations.cc
@@ -53,6 +53,14 @@
 }
 
 
+Location Location::RegisterOrSmiConstant(Value* value) {
+  ConstantInstr* constant = value->definition()->AsConstant();
+  return ((constant != NULL) && constant->value().IsSmi())
+      ? Location::Constant(constant->value())
+      : Location::RequiresRegister();
+}
+
+
 Location Location::FixedRegisterOrConstant(Value* value, Register reg) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return (constant != NULL)
@@ -61,6 +69,14 @@
 }
 
 
+Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) {
+  ConstantInstr* constant = value->definition()->AsConstant();
+  return ((constant != NULL) && constant->value().IsSmi())
+      ? Location::Constant(constant->value())
+      : Location::RegisterLocation(reg);
+}
+
+
 const char* Location::Name() const {
   switch (kind()) {
     case kInvalid: return "?";
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index d08ae50..4522b1a 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -264,7 +264,9 @@
 
   // Constants.
   static Location RegisterOrConstant(Value* value);
+  static Location RegisterOrSmiConstant(Value* value);
   static Location FixedRegisterOrConstant(Value* value, Register reg);
+  static Location FixedRegisterOrSmiConstant(Value* value, Register reg);
 
   const char* Name() const;
   void PrintTo(BufferFormatter* f) const;
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index a6f967b..211f04a 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -41,6 +41,7 @@
 
 void SetReturnValueHelper(Dart_NativeArguments, Dart_Handle);
 
+
 // Class NativeArguments is used to access arguments passed in from
 // generated dart code to a runtime function or a dart library native
 // function. It is also used to set the return value if any at the slot
@@ -49,35 +50,106 @@
 // following signature:
 //   void function_name(NativeArguments arguments);
 // Inside the function, arguments are accessed as follows:
-//   const Type& arg1 = Type::CheckedHandle(arguments.GetArgument(0));
-//   const Type& arg2 = Type::CheckedHandle(arguments.GetArgument(1));
+//   const Instance& arg0 = Instance::CheckedHandle(arguments.At(0));
+//   const Smi& arg1 = Smi::CheckedHandle(arguments.At(1));
 // The return value is set as follows:
 //   arguments.SetReturn(result);
-// NOTE: Since we pass this as a pass by value argument in the stubs we don't
+// NOTE: Since we pass 'this' as a pass-by-value argument in the stubs we don't
 // have DISALLOW_COPY_AND_ASSIGN in the class definition and do not make it a
 // subclass of ValueObject.
 class NativeArguments {
  public:
   Isolate* isolate() const { return isolate_; }
-  int Count() const { return argc_; }
+  int ArgCount() const { return ArgcBits::decode(argc_tag_); }
 
-  RawObject* At(int index) const {
-    ASSERT(index >=0 && index < argc_);
+  // Returns true if the arguments are those of an instance function call.
+  bool ToInstanceFunction() const {
+    return InstanceFunctionBit::decode(argc_tag_);
+  }
+
+  // Returns true if the arguments are those of a closure function call.
+  bool ToClosureFunction() const {
+    return ClosureFunctionBit::decode(argc_tag_);
+  }
+
+  RawObject* ArgAt(int index) const {
+    ASSERT((index >= 0) && (index < ArgCount()));
     return (*argv_)[-index];
   }
 
+  int NumHiddenArgs() const {
+    // For static closure functions, the closure at index 0 is hidden.
+    // In the instance closure function case, the receiver is accessed from
+    // the context and the closure at index 0 is hidden, so the apparent
+    // argument count remains unchanged.
+    if (ToClosureFunction() && !ToInstanceFunction()) {
+      return 1;
+    }
+    return 0;
+  }
+
+  int NativeArgCount() const {
+    return ArgCount() - NumHiddenArgs();
+  }
+
+  RawObject* NativeArgAt(int index) const {
+    ASSERT((index >= 0) && (index < NativeArgCount()));
+    if ((index == 0) && ToClosureFunction() && ToInstanceFunction()) {
+      // Retrieve the receiver from the context.
+      const Context& context = Context::Handle(isolate_->top_context());
+      return context.At(0);
+    } else {
+      const int actual_index = index + NumHiddenArgs();
+      return ArgAt(actual_index);
+    }
+  }
+
   void SetReturn(const Object& value) const;
 
   static intptr_t isolate_offset() {
     return OFFSET_OF(NativeArguments, isolate_);
   }
-  static intptr_t argc_offset() { return OFFSET_OF(NativeArguments, argc_); }
+  static intptr_t argc_tag_offset() {
+    return OFFSET_OF(NativeArguments, argc_tag_);
+  }
   static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); }
   static intptr_t retval_offset() {
     return OFFSET_OF(NativeArguments, retval_);
   }
 
+  static int ParameterCountForResolution(const Function& function) {
+    ASSERT(function.is_native());
+    ASSERT(!function.IsConstructor());  // Not supported.
+    int count = function.NumParameters();
+    if (function.is_static() && function.IsClosureFunction()) {
+      // The closure object is hidden and not accessible from native code.
+      // However, if the function is an instance closure function, the captured
+      // receiver located in the context is made accessible in native code at
+      // index 0, thereby hidding the closure object at index 0.
+      count--;
+    }
+    return count;
+  }
+
+  static int ComputeArgcTag(const Function& function) {
+    ASSERT(function.is_native());
+    ASSERT(!function.IsConstructor());  // Not supported.
+    int tag = ArgcBits::encode(function.NumParameters());
+    tag = InstanceFunctionBit::update(!function.is_static(), tag);
+    tag = ClosureFunctionBit::update(function.IsClosureFunction(), tag);
+    return tag;
+  }
+
  private:
+  enum ArgcTagBits {
+    kArgcBit = 0,
+    kArgcSize = 24,
+    kInstanceFunctionBit = 24,
+    kClosureFunctionBit = 25,
+  };
+  class ArgcBits : public BitField<int, kArgcBit, kArgcSize> {};
+  class InstanceFunctionBit : public BitField<bool, kInstanceFunctionBit, 1> {};
+  class ClosureFunctionBit : public BitField<bool, kClosureFunctionBit, 1> {};
   friend class BootstrapNatives;
   friend void SetReturnValueHelper(Dart_NativeArguments, Dart_Handle);
 
@@ -88,7 +160,7 @@
   void SetReturnUnsafe(RawObject* value) const;
 
   Isolate* isolate_;  // Current isolate pointer.
-  int argc_;  // Number of arguments passed to the runtime call.
+  int argc_tag_;  // Encodes argument count and invoked native call type.
   RawObject*(*argv_)[];  // Pointer to an array of arguments to runtime call.
   RawObject** retval_;  // Pointer to the return value area.
 };
diff --git a/runtime/vm/native_entry.h b/runtime/vm/native_entry.h
index f027279..aad7fb9 100644
--- a/runtime/vm/native_entry.h
+++ b/runtime/vm/native_entry.h
@@ -36,7 +36,7 @@
     CHECK_STACK_ALIGNMENT;                                                     \
     VERIFY_ON_TRANSITION;                                                      \
     NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);     \
-    ASSERT(arguments->Count() == argument_count);                              \
+    ASSERT(arguments->NativeArgCount() == argument_count);                     \
     if (FLAG_trace_natives) OS::Print("Calling native: %s\n", ""#name);        \
     {                                                                          \
       StackZone zone(arguments->isolate());                                    \
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 92f5e28..5dc09dd 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -474,6 +474,48 @@
 }
 
 
+// Make unused space in an object whose type has been transformed safe
+// for traversing during GC.
+// The unused part of the transformed object is marked as an Array
+// object or a regular Object so that it can be traversed during garbage
+// collection.
+void Object::MakeUnusedSpaceTraversable(const Object& obj,
+                                        intptr_t original_size,
+                                        intptr_t used_size) {
+  ASSERT(Isolate::Current()->no_gc_scope_depth() > 0);
+  ASSERT(!obj.IsNull());
+  ASSERT(original_size >= used_size);
+  if (original_size > used_size) {
+    intptr_t leftover_size = original_size - used_size;
+
+    uword addr = RawObject::ToAddr(obj.raw()) + used_size;
+    if (leftover_size >= Array::InstanceSize(0)) {
+      // As we have enough space to use an array object, update the leftover
+      // space as an Array object.
+      RawArray* raw = reinterpret_cast<RawArray*>(RawObject::FromAddr(addr));
+      uword tags = 0;
+      tags = RawObject::SizeTag::update(leftover_size, tags);
+      tags = RawObject::ClassIdTag::update(kArrayCid, tags);
+      raw->ptr()->tags_ = tags;
+      intptr_t leftover_len =
+          ((leftover_size - Array::InstanceSize(0)) / kWordSize);
+      ASSERT(Array::InstanceSize(leftover_len) == leftover_size);
+      raw->ptr()->tags_ = tags;
+      raw->ptr()->length_ = Smi::New(leftover_len);
+    } else {
+      // Update the leftover space as a basic object.
+      ASSERT(leftover_size == Object::InstanceSize());
+      RawObject* raw =
+          reinterpret_cast<RawObject*>(RawObject::FromAddr(addr));
+      uword tags = 0;
+      tags = RawObject::SizeTag::update(leftover_size, tags);
+      tags = RawObject::ClassIdTag::update(kInstanceCid, tags);
+      raw->ptr()->tags_ = tags;
+    }
+  }
+}
+
+
 RawClass* Object::CreateAndRegisterInterface(const char* cname,
                                              const Script& script,
                                              const Library& lib) {
@@ -560,8 +602,6 @@
   Library::InitCoreLibrary(isolate);
   Library& core_lib = Library::Handle(Library::CoreLibrary());
   ASSERT(!core_lib.IsNull());
-  Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
-  ASSERT(!core_impl_lib.IsNull());
 
   const GrowableObjectArray& pending_classes =
       GrowableObjectArray::Handle(GrowableObjectArray::New(Heap::kOld));
@@ -573,9 +613,6 @@
   // Now that the symbol table is initialized and that the core dictionary as
   // well as the core implementation dictionary have been setup, preallocate
   // remaining classes and register them by name in the dictionaries.
-  const Script& impl_script = Script::Handle(
-      Bootstrap::LoadCoreImplScript(false));
-
   String& name = String::Handle();
   cls = Class::New<Bool>();
   object_store->set_bool_class(cls);
@@ -587,6 +624,13 @@
   name = Symbols::ObjectArray();
   RegisterPrivateClass(cls, name, core_lib);
   pending_classes.Add(cls, Heap::kOld);
+  // We cannot use NewNonParameterizedType(cls), because Array is parameterized.
+  type ^= Type::New(Object::Handle(cls.raw()),
+                    TypeArguments::Handle(),
+                    Scanner::kDummyTokenIndex);
+  type.set_is_finalized_instantiated();
+  type ^= type.Canonicalize();
+  object_store->set_array_type(type);
 
   cls = object_store->growable_object_array_class();  // Was allocated above.
   name = Symbols::GrowableObjectArray();
@@ -627,14 +671,14 @@
   cls = Class::New<Stacktrace>();
   object_store->set_stacktrace_class(cls);
   name = Symbols::Stacktrace();
-  RegisterClass(cls, name, core_impl_lib);
+  RegisterClass(cls, name, core_lib);
   pending_classes.Add(cls, Heap::kOld);
   // Super type set below, after Object is allocated.
 
   cls = Class::New<JSRegExp>();
   object_store->set_jsregexp_class(cls);
   name = Symbols::JSSyntaxRegExp();
-  RegisterClass(cls, name, core_impl_lib);
+  RegisterPrivateClass(cls, name, core_lib);
   pending_classes.Add(cls, Heap::kOld);
 
   // Initialize the base interfaces used by the core VM classes.
@@ -835,15 +879,16 @@
   type = Type::NewNonParameterizedType(cls);
   object_store->set_double_type(type);
 
-  cls = CreateAndRegisterInterface("String", script, core_lib);
+  name = Symbols::New("String");
+  cls = Class::New<Instance>(name, script, Scanner::kDummyTokenIndex);
+  RegisterClass(cls, name, core_lib);
   pending_classes.Add(cls, Heap::kOld);
   type = Type::NewNonParameterizedType(cls);
-  object_store->set_string_interface(type);
+  object_store->set_string_type(type);
 
   cls = CreateAndRegisterInterface("List", script, core_lib);
   pending_classes.Add(cls, Heap::kOld);
-  type = Type::NewNonParameterizedType(cls);
-  object_store->set_list_interface(type);
+  object_store->set_list_class(cls);
 
   cls = object_store->bool_class();
   type = Type::NewNonParameterizedType(cls);
@@ -901,15 +946,6 @@
   if (!error.IsNull()) {
     return error.raw();
   }
-  error = Bootstrap::Compile(core_impl_lib, impl_script);
-  if (!error.IsNull()) {
-    return error.raw();
-  }
-  patch_script = Bootstrap::LoadCoreImplScript(true);
-  error = core_impl_lib.Patch(patch_script);
-  if (!error.IsNull()) {
-    return error.raw();
-  }
   const Script& collection_script =
       Script::Handle(Bootstrap::LoadCollectionScript(false));
   const Library& collection_lib =
@@ -1867,8 +1903,9 @@
     cls.SetFunctions(empty_array);
     // Set super class to Object.
     cls.set_super_type(Type::Handle(Type::ObjectType()));
-    // Compute instance size.
-    intptr_t instance_size = (field_count * kWordSize) + sizeof(RawObject);
+    // Compute instance size. First word contains a pointer to a properly
+    // sized typed array once the first native field has been set.
+    intptr_t instance_size = sizeof(RawObject) + kWordSize;
     cls.set_instance_size(RoundedAllocationSize(instance_size));
     cls.set_next_field_offset(instance_size);
     cls.set_num_native_fields(field_count);
@@ -3064,6 +3101,27 @@
 }
 
 
+RawInstance* Function::implicit_static_closure() const {
+  if (IsImplicitStaticClosureFunction()) {
+    const Object& obj = Object::Handle(raw_ptr()->data_);
+    ASSERT(!obj.IsNull());
+    return ClosureData::Cast(obj).implicit_static_closure();
+  }
+  return Instance::null();
+}
+
+
+void Function::set_implicit_static_closure(const Instance& closure) const {
+  if (IsImplicitStaticClosureFunction()) {
+    const Object& obj = Object::Handle(raw_ptr()->data_);
+    ASSERT(!obj.IsNull());
+    ClosureData::Cast(obj).set_implicit_static_closure(closure);
+    return;
+  }
+  UNREACHABLE();
+}
+
+
 RawCode* Function::closure_allocation_stub() const {
   if (IsClosureFunction()) {
     const Object& obj = Object::Handle(raw_ptr()->data_);
@@ -3409,11 +3467,16 @@
       return 2;  // Instance, phase.
     }
   }
-  if (!is_static() &&
-      kind() != RawFunction::kClosureFunction &&
-      kind() != RawFunction::kSignatureFunction) {
+  if ((kind() == RawFunction::kClosureFunction) ||
+      (kind() == RawFunction::kSignatureFunction)) {
+    return 1;  // Closure object.
+  }
+  if (!is_static()) {
     // Closure functions defined inside instance (i.e. non-static) functions are
     // marked as non-static, but they do not have a receiver.
+    // Closures are handled above.
+    ASSERT((kind() != RawFunction::kClosureFunction) &&
+           (kind() != RawFunction::kSignatureFunction));
     return 1;  // Receiver.
   }
   return 0;  // No implicit parameters.
@@ -3866,9 +3929,11 @@
   closure_function.set_result_type(AbstractType::Handle(result_type()));
 
   // Set closure function's formal parameters to this formal parameters,
-  // removing the receiver if this is an instance method.
+  // removing the receiver if this is an instance method and adding the closure
+  // object as first parameter.
+  const int kClosure = 1;
   const int has_receiver = is_static() ? 0 : 1;
-  const int num_fixed_params = num_fixed_parameters() - has_receiver;
+  const int num_fixed_params = kClosure - has_receiver + num_fixed_parameters();
   const int num_opt_params = NumOptionalParameters();
   const bool has_opt_pos_params = HasOptionalPositionalParameters();
   const int num_params = num_fixed_params + num_opt_params;
@@ -3880,10 +3945,15 @@
                                                                 Heap::kOld)));
   AbstractType& param_type = AbstractType::Handle();
   String& param_name = String::Handle();
-  for (int i = 0; i < num_params; i++) {
-    param_type = ParameterTypeAt(i + has_receiver);
+  // Add implicit closure object parameter.
+  param_type = Type::DynamicType();
+  closure_function.SetParameterTypeAt(0, param_type);
+  param_name = Symbols::ClosureParameter();
+  closure_function.SetParameterNameAt(0, param_name);
+  for (int i = kClosure; i < num_params; i++) {
+    param_type = ParameterTypeAt(has_receiver - kClosure + i);
     closure_function.SetParameterTypeAt(i, param_type);
-    param_name = ParameterNameAt(i + has_receiver);
+    param_name = ParameterNameAt(has_receiver - kClosure + i);
     closure_function.SetParameterNameAt(i, param_name);
   }
 
@@ -3976,7 +4046,12 @@
   const intptr_t num_opt_params = num_opt_pos_params + num_opt_named_params;
   ASSERT((num_fixed_params + num_opt_params) == num_params);
   pieces.Add(kLParen);
-  for (intptr_t i = 0; i < num_fixed_params; i++) {
+  intptr_t i = 0;
+  if (name_visibility == kUserVisibleName) {
+    // Hide implicit parameters.
+    i = NumImplicitParameters();
+  }
+  while (i < num_fixed_params) {
     param_type = ParameterTypeAt(i);
     ASSERT(!param_type.IsNull());
     if (instantiate && !param_type.IsInstantiated()) {
@@ -3987,6 +4062,7 @@
     if (i != (num_params - 1)) {
       pieces.Add(kCommaSpace);
     }
+    i++;
   }
   if (num_opt_params > 0) {
     if (num_opt_pos_params > 0) {
@@ -4150,6 +4226,13 @@
 }
 
 
+void ClosureData::set_implicit_static_closure(const Instance& closure) const {
+  ASSERT(!closure.IsNull());
+  ASSERT(raw_ptr()->closure_ == Instance::null());
+  StorePointer(&raw_ptr()->closure_, closure.raw());
+}
+
+
 void ClosureData::set_closure_allocation_stub(const Code& value) const {
   ASSERT(!value.IsNull());
   ASSERT(raw_ptr()->closure_allocation_stub_ == Code::null());
@@ -5835,19 +5918,7 @@
   const Library& core_lib =
       Library::Handle(Library::NewLibraryHelper(core_lib_url, false));
   core_lib.Register();
-  const Namespace& core_ns = Namespace::Handle(
-      Namespace::New(core_lib, Array::Handle(), Array::Handle()));
   isolate->object_store()->set_core_library(core_lib);
-  const String& core_impl_lib_url =
-      String::Handle(Symbols::New("dart:coreimpl"));
-  const Library& core_impl_lib =
-      Library::Handle(Library::NewLibraryHelper(core_impl_lib_url, false));
-  isolate->object_store()->set_core_impl_library(core_impl_lib);
-  core_impl_lib.Register();
-  const Namespace& impl_ns = Namespace::Handle(
-      Namespace::New(core_impl_lib, Array::Handle(), Array::Handle()));
-  core_lib.AddImport(impl_ns);
-  core_impl_lib.AddImport(core_ns);
   Library::InitMathLibrary(isolate);
   const Library& math_lib = Library::Handle(Library::MathLibrary());
   const Namespace& math_ns = Namespace::Handle(
@@ -5858,9 +5929,7 @@
   const Namespace& collection_ns = Namespace::Handle(
       Namespace::New(collection_lib, Array::Handle(), Array::Handle()));
   core_lib.AddImport(math_ns);
-  core_impl_lib.AddImport(math_ns);
   core_lib.AddImport(collection_ns);
-  core_impl_lib.AddImport(collection_ns);
   isolate->object_store()->set_root_library(Library::Handle());
 
   // Hook up predefined classes without setting their library pointers. These
@@ -5887,10 +5956,6 @@
   const String& url = String::Handle(Symbols::New("dart:math"));
   const Library& lib = Library::Handle(Library::NewLibraryHelper(url, true));
   lib.Register();
-  const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
-  const Namespace& impl_ns = Namespace::Handle(
-      Namespace::New(core_impl_lib, Array::Handle(), Array::Handle()));
-  lib.AddImport(impl_ns);
   isolate->object_store()->set_math_library(lib);
 }
 
@@ -6041,11 +6106,6 @@
 }
 
 
-RawLibrary* Library::CoreImplLibrary() {
-  return Isolate::Current()->object_store()->core_impl_library();
-}
-
-
 RawLibrary* Library::CollectionLibrary() {
   return Isolate::Current()->object_store()->collection_library();
 }
@@ -7136,7 +7196,7 @@
 
 
 const char* Code::ToCString() const {
-  const char* kFormat = "Code entry:0x%d";
+  const char* kFormat = "Code entry:%p";
   intptr_t len = OS::SNPrint(NULL, 0, kFormat, EntryPoint()) + 1;
   char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
   OS::SNPrint(chars, len, kFormat, EntryPoint());
@@ -7211,6 +7271,7 @@
 
 void Code::ExtractUncalledStaticCallDeoptIds(
     GrowableArray<intptr_t>* deopt_ids) const {
+  ASSERT(!IsNull() && !is_optimized());
   ASSERT(deopt_ids != NULL);
   deopt_ids->Clear();
   const PcDescriptors& descriptors =
@@ -7335,7 +7396,18 @@
 }
 
 
+bool ContextScope::IsConstAt(intptr_t scope_index) const {
+  return Bool::Handle(VariableDescAddr(scope_index)->is_const).value();
+}
+
+
+void ContextScope::SetIsConstAt(intptr_t scope_index, bool is_const) const {
+  VariableDescAddr(scope_index)->is_const = Bool::Get(is_const);
+}
+
+
 RawAbstractType* ContextScope::TypeAt(intptr_t scope_index) const {
+  ASSERT(!IsConstAt(scope_index));
   return VariableDescAddr(scope_index)->type;
 }
 
@@ -7346,6 +7418,19 @@
 }
 
 
+RawInstance* ContextScope::ConstValueAt(intptr_t scope_index) const {
+  ASSERT(IsConstAt(scope_index));
+  return VariableDescAddr(scope_index)->value;
+}
+
+
+void ContextScope::SetConstValueAt(
+    intptr_t scope_index, const Instance& value) const {
+  ASSERT(IsConstAt(scope_index));
+  StorePointer(&(VariableDescAddr(scope_index)->value), value.raw());
+}
+
+
 intptr_t ContextScope::ContextIndexAt(intptr_t scope_index) const {
   return Smi::Value(VariableDescAddr(scope_index)->context_index);
 }
@@ -7374,11 +7459,12 @@
 
 
 const char* ICData::ToCString() const {
-  const char* kFormat = "ICData target:%s";
+  const char* kFormat = "ICData target:'%s' num-checks: %"Pd"";
   const String& name = String::Handle(target_name());
-  intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString()) + 1;
+  const intptr_t num = NumberOfChecks();
+  intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString(), num) + 1;
   char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
-  OS::SNPrint(chars, len, kFormat, name.ToCString());
+  OS::SNPrint(chars, len, kFormat, name.ToCString(), num);
   return chars;
 }
 
@@ -7408,8 +7494,22 @@
 }
 
 
+void ICData::set_deopt_reason(intptr_t deopt_reason) const {
+  raw_ptr()->deopt_reason_ = deopt_reason;
+}
+
+void ICData::set_is_closure_call(bool value) const {
+  raw_ptr()->is_closure_call_ = value ? 1 : 0;
+}
+
+
+intptr_t ICData::TestEntryLengthFor(intptr_t num_args) {
+  return num_args + 1 /* target function*/ + 1 /* frequency */;
+}
+
+
 intptr_t ICData::TestEntryLength() const {
-  return num_args_tested() + 1 /* target function*/;
+  return TestEntryLengthFor(num_args_tested());
 }
 
 
@@ -7470,7 +7570,8 @@
     data.SetAt(data_pos++, Smi::Handle(Smi::New(class_ids[i])));
   }
   ASSERT(!target.IsNull());
-  data.SetAt(data_pos, target);
+  data.SetAt(data_pos++, target);
+  data.SetAt(data_pos, Smi::Handle(Smi::New(1)));
 }
 
 
@@ -7493,18 +7594,17 @@
   WriteSentinel();
   intptr_t data_pos = old_num * TestEntryLength();
   if ((receiver_class_id == kSmiCid) && (data_pos > 0)) {
-    // Instert kSmiCid in position 0.
-    const intptr_t zero_class_id = GetReceiverClassIdAt(0);
-    ASSERT(zero_class_id != kSmiCid);  // Simple duplicate entry check.
-    const Function& zero_target = Function::Handle(GetTargetAt(0));
-    data.SetAt(0, Smi::Handle(Smi::New(receiver_class_id)));
-    data.SetAt(1, target);
-    data.SetAt(data_pos, Smi::Handle(Smi::New(zero_class_id)));
-    data.SetAt(data_pos + 1, zero_target);
-  } else {
-    data.SetAt(data_pos, Smi::Handle(Smi::New(receiver_class_id)));
-    data.SetAt(data_pos + 1, target);
+    ASSERT(GetReceiverClassIdAt(0) != kSmiCid);
+    // Move class occupying position 0 to the data_pos.
+    for (intptr_t i = 0; i < TestEntryLength(); i++) {
+      data.SetAt(data_pos + i, Object::Handle(data.At(i)));
+    }
+    // Insert kSmiCid in position 0.
+    data_pos = 0;
   }
+  data.SetAt(data_pos, Smi::Handle(Smi::New(receiver_class_id)));
+  data.SetAt(data_pos + 1, target);
+  data.SetAt(data_pos + 2, Smi::Handle(Smi::New(1)));
 }
 
 
@@ -7522,7 +7622,7 @@
     smi ^= data.At(data_pos++);
     class_ids->Add(smi.Value());
   }
-  (*target) ^= data.At(data_pos);
+  (*target) ^= data.At(data_pos++);
 }
 
 
@@ -7567,6 +7667,16 @@
 }
 
 
+intptr_t ICData::GetCountAt(intptr_t index) const {
+  const Array& data = Array::Handle(ic_data());
+  const intptr_t data_pos = index * TestEntryLength() +
+      CountIndexFor(num_args_tested());
+  Smi& smi = Smi::Handle();
+  smi ^= data.At(data_pos);
+  return smi.Value();
+}
+
+
 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const {
   const intptr_t len = NumberOfChecks();
   for (intptr_t i = 0; i < len; i++) {
@@ -7682,7 +7792,9 @@
   result.set_target_name(target_name);
   result.set_deopt_id(deopt_id);
   result.set_num_args_tested(num_args_tested);
-  // Number of array elements in one test entry (num_args_tested + 1)
+  result.set_deopt_reason(kDeoptUnknown);
+  result.set_is_closure_call(false);
+  // Number of array elements in one test entry.
   intptr_t len = result.TestEntryLength();
   // IC data array must be null terminated (sentinel entry).
   const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld));
@@ -8144,6 +8256,20 @@
 }
 
 
+void Instance::SetNativeField(int index, intptr_t value) const {
+  ASSERT(IsValidNativeIndex(index));
+  Object& native_fields = Object::Handle(*NativeFieldsAddr());
+  if (native_fields.IsNull()) {
+    // Allocate backing storage for the native fields.
+    const Class& cls = Class::Handle(clazz());
+    int num_native_fields = cls.num_native_fields();
+    native_fields = IntPtrArray::New(num_native_fields);
+    StorePointer(NativeFieldsAddr(), native_fields.raw());
+  }
+  IntPtrArray::Cast(native_fields).SetAt(index, value);
+}
+
+
 bool Instance::IsClosure() const {
   const Class& cls = Class::Handle(clazz());
   return cls.IsSignatureClass();
@@ -8158,14 +8284,6 @@
     RawObject* raw = Object::Allocate(cls.id(), instance_size, space);
     NoGCScope no_gc;
     result ^= raw;
-    uword addr = reinterpret_cast<uword>(result.raw_ptr());
-    // Initialize fields.
-    intptr_t offset = sizeof(RawObject);
-    // Initialize all native fields to NULL.
-    for (intptr_t i = 0; i < cls.num_native_fields(); i++) {
-      *reinterpret_cast<uword*>(addr + offset) = 0;
-      offset += kWordSize;
-    }
   }
   return result.raw();
 }
@@ -8432,9 +8550,9 @@
 }
 
 
-bool AbstractType::IsStringInterface() const {
+bool AbstractType::IsStringType() const {
   return HasResolvedTypeClass() &&
-      (type_class() == Type::Handle(Type::StringInterface()).type_class());
+      (type_class() == Type::Handle(Type::StringType()).type_class());
 }
 
 
@@ -8444,12 +8562,6 @@
 }
 
 
-bool AbstractType::IsListInterface() const {
-  return HasResolvedTypeClass() &&
-      (type_class() == Type::Handle(Type::ListInterface()).type_class());
-}
-
-
 bool AbstractType::TypeTest(TypeTestKind test_kind,
                             const AbstractType& other,
                             Error* malformed_error) const {
@@ -8571,8 +8683,13 @@
 }
 
 
-RawType* Type::StringInterface() {
-  return Isolate::Current()->object_store()->string_interface();
+RawType* Type::StringType() {
+  return Isolate::Current()->object_store()->string_type();
+}
+
+
+RawType* Type::ArrayType() {
+  return Isolate::Current()->object_store()->array_type();
 }
 
 
@@ -8581,11 +8698,6 @@
 }
 
 
-RawType* Type::ListInterface() {
-  return Isolate::Current()->object_store()->list_interface();
-}
-
-
 RawType* Type::NewNonParameterizedType(const Class& type_class) {
   ASSERT(!type_class.HasTypeArguments());
   const TypeArguments& no_type_arguments = TypeArguments::Handle();
@@ -9024,11 +9136,14 @@
 
 
 const char* TypeParameter::ToCString() const {
-  const char* format = "TypeParameter: name %s; index: %d";
+  const char* format = "TypeParameter: name %s; index: %d; class: %s";
   const char* name_cstr = String::Handle(Name()).ToCString();
-  intptr_t len = OS::SNPrint(NULL, 0, format, name_cstr, index()) + 1;
+  const Class& cls = Class::Handle(parameterized_class());
+  const char* cls_cstr =
+      cls.IsNull() ? " null" : String::Handle(cls.Name()).ToCString();
+  intptr_t len = OS::SNPrint(NULL, 0, format, name_cstr, index(), cls_cstr) + 1;
   char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
-  OS::SNPrint(chars, len, format, name_cstr, index());
+  OS::SNPrint(chars, len, format, name_cstr, index(), cls_cstr);
   return chars;
 }
 
@@ -9997,12 +10112,12 @@
                        Heap::Space space) {
   Utf8::Type type;
   intptr_t len = Utf8::CodePointCount(utf8_array, array_len, &type);
-  if (type == Utf8::kAscii) {
+  if (type == Utf8::kLatin1) {
     const String& strobj = String::Handle(OneByteString::New(len, space));
     if (len > 0) {
       NoGCScope no_gc;
-      Utf8::DecodeToAscii(utf8_array, array_len,
-                          OneByteString::CharAddr(strobj, 0), len);
+      Utf8::DecodeToLatin1(utf8_array, array_len,
+                           OneByteString::CharAddr(strobj, 0), len);
     }
     return strobj.raw();
   }
@@ -10020,7 +10135,7 @@
                        Heap::Space space) {
   bool is_one_byte_string = true;
   for (intptr_t i = 0; i < array_len; ++i) {
-    if (utf16_array[i] > 0x7F) {
+    if (utf16_array[i] > 0xFF) {
       is_one_byte_string = false;
       break;
     }
@@ -10038,7 +10153,7 @@
   bool is_one_byte_string = true;
   intptr_t utf16_len = array_len;
   for (intptr_t i = 0; i < array_len; ++i) {
-    if (utf32_array[i] > 0x7F) {
+    if (utf32_array[i] > 0xFF) {
       is_one_byte_string = false;
     }
     if (utf32_array[i] > 0xFFFF) {
@@ -10119,7 +10234,7 @@
   if (dst.IsOneByteString()) {
     NoGCScope no_gc;
     for (intptr_t i = 0; i < array_len; ++i) {
-      ASSERT(utf16_array[i] <= 0x7F);
+      ASSERT(utf16_array[i] <= 0xFF);
       *OneByteString::CharAddr(dst, i + dst_offset) = utf16_array[i];
     }
   } else {
@@ -10274,7 +10389,7 @@
   intptr_t char_size = str.CharSize();
   if (char_size == kTwoByteChar) {
     for (intptr_t i = begin_index; i < begin_index + length; ++i) {
-      if (str.CharAt(i) > 0x7F) {
+      if (str.CharAt(i) > 0xFF) {
         is_one_byte_string = false;
         break;
       }
@@ -10301,16 +10416,93 @@
 
 
 void String::ToUTF8(uint8_t* utf8_array, intptr_t array_len) const {
-  if (CharSize() == kOneByteChar) {
-    const String& obj = *this;
-    ASSERT(array_len >= obj.Length());
-    if (obj.Length() > 0) {
-      memmove(utf8_array, OneByteString::CharAddr(obj, 0), obj.Length());
+  ASSERT(array_len >= Utf8::Length(*this));
+  Utf8::Encode(*this, reinterpret_cast<char*>(utf8_array), array_len);
+}
+
+
+static void AddFinalizer(const Object& referent,
+                         void* peer,
+                         Dart_WeakPersistentHandleFinalizer callback) {
+  ASSERT(callback != NULL);
+  ApiState* state = Isolate::Current()->api_state();
+  ASSERT(state != NULL);
+  FinalizablePersistentHandle* weak_ref =
+      state->weak_persistent_handles().AllocateHandle();
+  weak_ref->set_raw(referent);
+  weak_ref->set_peer(peer);
+  weak_ref->set_callback(callback);
+}
+
+
+RawString* String::MakeExternal(void* array,
+                                intptr_t length,
+                                void* peer,
+                                Dart_PeerFinalizer cback) const {
+  ASSERT(array != NULL);
+  intptr_t str_length = this->Length();
+  ASSERT(length >= (str_length * this->CharSize()));
+  intptr_t class_id = raw()->GetClassId();
+  intptr_t used_size = 0;
+  intptr_t original_size = 0;
+  uword tags = 0;
+  NoGCScope no_gc;
+
+  if (class_id == kOneByteStringCid) {
+    used_size = ExternalOneByteString::InstanceSize();
+    original_size = OneByteString::InstanceSize(str_length);
+    ASSERT(original_size >= used_size);
+
+    // Copy the data into the external array.
+    if (str_length > 0) {
+      memmove(array, OneByteString::CharAddr(*this, 0), str_length);
     }
+
+    // Update the class information of the object.
+    const intptr_t class_id = kExternalOneByteStringCid;
+    tags = RawObject::SizeTag::update(used_size, tags);
+    tags = RawObject::ClassIdTag::update(class_id, tags);
+    raw_ptr()->tags_ = tags;
+    const String& result = String::Handle(this->raw());
+    ExternalStringData<uint8_t>* ext_data = new ExternalStringData<uint8_t>(
+        reinterpret_cast<const uint8_t*>(array), peer, cback);
+    result.SetLength(str_length);
+    result.SetHash(0);
+    ExternalOneByteString::SetExternalData(result, ext_data);
+    AddFinalizer(result, ext_data, ExternalOneByteString::Finalize);
   } else {
-    ASSERT(array_len >= Utf8::Length(*this));
-    Utf8::Encode(*this, reinterpret_cast<char*>(utf8_array), array_len);
+    ASSERT(class_id == kTwoByteStringCid);
+    used_size = ExternalTwoByteString::InstanceSize();
+    original_size = TwoByteString::InstanceSize(str_length);
+    ASSERT(original_size >= used_size);
+
+    // Copy the data into the external array.
+    if (str_length > 0) {
+      memmove(array,
+              TwoByteString::CharAddr(*this, 0),
+              (str_length * kTwoByteChar));
+    }
+
+    // Update the class information of the object.
+    const intptr_t class_id = kExternalTwoByteStringCid;
+    tags = RawObject::SizeTag::update(used_size, tags);
+    tags = RawObject::ClassIdTag::update(class_id, tags);
+    raw_ptr()->tags_ = tags;
+    const String& result = String::Handle(this->raw());
+    ExternalStringData<uint16_t>* ext_data = new ExternalStringData<uint16_t>(
+        reinterpret_cast<const uint16_t*>(array), peer, cback);
+    result.SetLength(str_length);
+    result.SetHash(0);
+    ExternalTwoByteString::SetExternalData(result, ext_data);
+    AddFinalizer(result, ext_data, ExternalTwoByteString::Finalize);
   }
+
+  // If there is any left over space fill it with either an Array object or
+  // just a plain object (depending on the amount of left over space) so
+  // that it can be traversed over successfully during garbage collection.
+  Object::MakeUnusedSpaceTraversable(*this, original_size, used_size);
+
+  return this->raw();
 }
 
 
@@ -10333,10 +10525,10 @@
   if (!has_mapping) {
     return str.raw();
   }
-  if (dst_max <= 0x7F) {
+  if (dst_max <= 0xFF) {
     return OneByteString::Transform(mapping, str, space);
   }
-  ASSERT(dst_max > 0x7F);
+  ASSERT(dst_max > 0xFF);
   return TwoByteString::Transform(mapping, str, space);
 }
 
@@ -10484,7 +10676,7 @@
                                      Heap::Space space) {
   const String& result =String::Handle(OneByteString::New(len, space));
   for (intptr_t i = 0; i < len; ++i) {
-    ASSERT(characters[i] <= 0x7F);
+    ASSERT(characters[i] <= 0xFF);
     *CharAddr(result, i) = characters[i];
   }
   return OneByteString::raw(result);
@@ -10496,7 +10688,7 @@
                                      Heap::Space space) {
   const String& result = String::Handle(OneByteString::New(len, space));
   for (intptr_t i = 0; i < len; ++i) {
-    ASSERT(characters[i] <= 0x7F);
+    ASSERT(characters[i] <= 0xFF);
     *CharAddr(result, i) = characters[i];
   }
   return OneByteString::raw(result);
@@ -10550,7 +10742,7 @@
   const String& result = String::Handle(OneByteString::New(len, space));
   for (intptr_t i = 0; i < len; ++i) {
     int32_t ch = mapping(str.CharAt(i));
-    ASSERT(ch >= 0 && ch <= 0x7F);
+    ASSERT(ch >= 0 && ch <= 0xFF);
     *CharAddr(result, i) = ch;
   }
   return OneByteString::raw(result);
@@ -10704,20 +10896,6 @@
 }
 
 
-static void AddFinalizer(const Object& referent,
-                         void* peer,
-                         Dart_WeakPersistentHandleFinalizer callback) {
-  ASSERT(callback != NULL);
-  ApiState* state = Isolate::Current()->api_state();
-  ASSERT(state != NULL);
-  FinalizablePersistentHandle* weak_ref =
-      state->weak_persistent_handles().AllocateHandle();
-  weak_ref->set_raw(referent);
-  weak_ref->set_peer(peer);
-  weak_ref->set_callback(callback);
-}
-
-
 RawExternalOneByteString* ExternalOneByteString::New(
     const uint8_t* data,
     intptr_t len,
@@ -10947,33 +11125,8 @@
   // If there is any left over space fill it with either an Array object or
   // just a plain object (depending on the amount of left over space) so
   // that it can be traversed over successfully during garbage collection.
-  if (capacity_size != used_size) {
-    ASSERT(capacity_len > used_len);
-    intptr_t leftover_size = capacity_size - used_size;
+  Object::MakeUnusedSpaceTraversable(array, capacity_size, used_size);
 
-    uword addr = RawObject::ToAddr(array.raw()) + used_size;
-    if (leftover_size >= Array::InstanceSize(0)) {
-      // As we have enough space to use an array object, update the leftover
-      // space as an Array object.
-      RawArray* raw = reinterpret_cast<RawArray*>(RawObject::FromAddr(addr));
-      tags = 0;
-      tags = RawObject::SizeTag::update(leftover_size, tags);
-      tags = RawObject::ClassIdTag::update(kArrayCid, tags);
-      raw->ptr()->tags_ = tags;
-      intptr_t leftover_len =
-          ((leftover_size - Array::InstanceSize(0)) / kWordSize);
-      raw->ptr()->tags_ = tags;
-      raw->ptr()->length_ = Smi::New(leftover_len);
-    } else {
-      // Update the leftover space as a basic object.
-      ASSERT(leftover_size == Object::InstanceSize());
-      RawObject* raw = reinterpret_cast<RawObject*>(RawObject::FromAddr(addr));
-      tags = 0;
-      tags = RawObject::SizeTag::update(leftover_size, tags);
-      tags = RawObject::ClassIdTag::update(kInstanceCid, tags);
-      raw->ptr()->tags_ = tags;
-    }
-  }
   return array.raw();
 }
 
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 2836dda..07cb5bf 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -300,6 +300,9 @@
   static void InitFromSnapshot(Isolate* isolate);
   static void InitOnce();
   static void RegisterSingletonClassNames();
+  static void MakeUnusedSpaceTraversable(const Object& obj,
+                                         intptr_t original_size,
+                                         intptr_t used_size);
 
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawObject));
@@ -1147,6 +1150,9 @@
   RawClass* signature_class() const;
   void set_signature_class(const Class& value) const;
 
+  RawInstance* implicit_static_closure() const;
+  void set_implicit_static_closure(const Instance& closure) const;
+
   RawCode* closure_allocation_stub() const;
   void set_closure_allocation_stub(const Code& value) const;
 
@@ -1520,6 +1526,11 @@
   RawClass* signature_class() const { return raw_ptr()->signature_class_; }
   void set_signature_class(const Class& value) const;
 
+  RawInstance* implicit_static_closure() const {
+    return raw_ptr()->closure_;
+  }
+  void set_implicit_static_closure(const Instance& closure) const;
+
   RawCode* closure_allocation_stub() const {
     return raw_ptr()->closure_allocation_stub_;
   }
@@ -1955,7 +1966,6 @@
   static void InitNativeWrappersLibrary(Isolate* isolate);
 
   static RawLibrary* CoreLibrary();
-  static RawLibrary* CoreImplLibrary();
   static RawLibrary* CollectionLibrary();
   static RawLibrary* MathLibrary();
   static RawLibrary* IsolateLibrary();
@@ -2570,6 +2580,8 @@
   uword GetDeoptBeforePcAtDeoptId(intptr_t deopt_id) const;
   uword GetDeoptAfterPcAtDeoptId(intptr_t deopt_id) const;
 
+  uword GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const;
+
   // Returns true if there is an object in the code between 'start_offset'
   // (inclusive) and 'end_offset' (exclusive).
   bool ObjectExistsInArea(intptr_t start_offest, intptr_t end_offset) const;
@@ -2626,7 +2638,6 @@
     *PointerOffsetAddrAt(index) = offset_in_instructions;
   }
 
-  uword GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const;
 
   // New is a private method as RawInstruction and RawCode objects should
   // only be created using the Code::FinalizeCode method. This method creates
@@ -2720,11 +2731,17 @@
   void SetNameAt(intptr_t scope_index, const String& name) const;
 
   bool IsFinalAt(intptr_t scope_index) const;
-  void SetIsFinalAt(intptr_t scope_index, bool is_const) const;
+  void SetIsFinalAt(intptr_t scope_index, bool is_final) const;
+
+  bool IsConstAt(intptr_t scope_index) const;
+  void SetIsConstAt(intptr_t scope_index, bool is_const) const;
 
   RawAbstractType* TypeAt(intptr_t scope_index) const;
   void SetTypeAt(intptr_t scope_index, const AbstractType& type) const;
 
+  RawInstance* ConstValueAt(intptr_t scope_index) const;
+  void SetConstValueAt(intptr_t scope_index, const Instance& value) const;
+
   intptr_t ContextIndexAt(intptr_t scope_index) const;
   void SetContextIndexAt(intptr_t scope_index, intptr_t context_index) const;
 
@@ -2786,6 +2803,18 @@
     return raw_ptr()->deopt_id_;
   }
 
+  intptr_t deopt_reason() const {
+    return raw_ptr()->deopt_reason_;
+  }
+
+  void set_deopt_reason(intptr_t reason) const;
+
+  bool is_closure_call() const {
+    return raw_ptr()->is_closure_call_ == 1;
+  }
+
+  void set_is_closure_call(bool value) const;
+
   intptr_t NumberOfChecks() const;
 
   static intptr_t InstanceSize() {
@@ -2808,6 +2837,10 @@
     return OFFSET_OF(RawICData, function_);
   }
 
+  static intptr_t is_closure_call_offset() {
+    return OFFSET_OF(RawICData, is_closure_call_);
+  }
+
   // Adding checks.
 
   // Adds one more class test to ICData. Length of 'classes' must be equal to
@@ -2833,6 +2866,8 @@
   RawFunction* GetTargetAt(intptr_t index) const;
   RawFunction* GetTargetForReceiverClassId(intptr_t class_id) const;
 
+  intptr_t GetCountAt(intptr_t index) const;
+
   // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise
   // returns a new ICData object containing only unique arg_nr checks.
   RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const;
@@ -2849,6 +2884,16 @@
                         intptr_t deopt_id,
                         intptr_t num_args_tested);
 
+  static intptr_t TestEntryLengthFor(intptr_t num_args);
+
+  static intptr_t TargetIndexFor(intptr_t num_args) {
+    return num_args;
+  }
+
+  static intptr_t CountIndexFor(intptr_t num_args) {
+    return (num_args + 1);
+  }
+
  private:
   RawArray* ic_data() const {
     return raw_ptr()->ic_data_;
@@ -3061,13 +3106,8 @@
     return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_));
   }
 
-  intptr_t GetNativeField(int index) const {
-    return *NativeFieldAddr(index);
-  }
-
-  void SetNativeField(int index, intptr_t value) const {
-    *NativeFieldAddr(index) = value;
-  }
+  inline intptr_t GetNativeField(Isolate* isolate, int index) const;
+  void SetNativeField(int index, intptr_t value) const;
 
   // Returns true if the instance is a closure object.
   bool IsClosure() const;
@@ -3086,11 +3126,8 @@
   RawObject** FieldAddr(const Field& field) const {
     return FieldAddrAtOffset(field.Offset());
   }
-  intptr_t* NativeFieldAddr(int index) const {
-    ASSERT(IsValidNativeIndex(index));
-    return reinterpret_cast<intptr_t*>((raw_value() - kHeapObjectTag)
-                                       + (index * kWordSize)
-                                       + sizeof(RawObject));
+  RawObject** NativeFieldsAddr() const {
+    return FieldAddrAtOffset(sizeof(RawObject));
   }
   void SetFieldAtOffset(intptr_t offset, const Object& value) const {
     StorePointer(FieldAddrAtOffset(offset), value.raw());
@@ -3179,15 +3216,12 @@
   // Check if this type represents the 'num' type.
   bool IsNumberType() const;
 
-  // Check if this type represents the 'String' interface.
-  bool IsStringInterface() const;
+  // Check if this type represents the 'String' type.
+  bool IsStringType() const;
 
   // Check if this type represents the 'Function' type.
   bool IsFunctionType() const;
 
-  // Check if this type represents the 'List' interface.
-  bool IsListInterface() const;
-
   // Check if this type is an interface type.
   bool IsInterfaceType() const {
     if (!HasResolvedTypeClass()) {
@@ -3303,15 +3337,15 @@
   // The 'num' interface type.
   static RawType* Number();
 
-  // The 'String' interface type.
-  static RawType* StringInterface();
+  // The 'String' type.
+  static RawType* StringType();
+
+  // The 'Array' type.
+  static RawType* ArrayType();
 
   // The 'Function' interface type.
   static RawType* Function();
 
-  // The 'List' interface type.
-  static RawType* ListInterface();
-
   // The finalized type of the given non-parameterized class.
   static RawType* NewNonParameterizedType(const Class& type_class);
 
@@ -3731,6 +3765,17 @@
 
   void ToUTF8(uint8_t* utf8_array, intptr_t array_len) const;
 
+  // Copies the string characters into the provided external array
+  // and morphs the string object into an external string object.
+  // The remaining unused part of the original string object is marked as
+  // an Array object or a regular Object so that it can be traversed during
+  // garbage collection.
+  RawString* MakeExternal(void* array,
+                          intptr_t length,
+                          void* peer,
+                          Dart_PeerFinalizer cback) const;
+
+
   // Creates a new String object from a C string that is assumed to contain
   // UTF-8 encoded characters and '\0' is considered a termination character.
   static RawString* New(const char* cstr, Heap::Space space = Heap::kNew);
@@ -4209,6 +4254,7 @@
     return raw_ptr()->type_arguments_;
   }
   virtual void SetTypeArguments(const AbstractTypeArguments& value) const {
+    ASSERT(value.IsNull() || ((value.Length() == 1) && value.IsInstantiated()));
     StorePointer(&raw_ptr()->type_arguments_, value.raw());
   }
 
@@ -4276,6 +4322,7 @@
 
   HEAP_OBJECT_IMPLEMENTATION(Array, Instance);
   friend class Class;
+  friend class String;
 };
 
 
@@ -4335,6 +4382,7 @@
     return raw_ptr()->type_arguments_;
   }
   virtual void SetTypeArguments(const AbstractTypeArguments& value) const {
+    ASSERT(value.IsNull() || ((value.Length() == 1) && value.IsInstantiated()));
     const Array& contents = Array::Handle(data());
     contents.SetTypeArguments(value);
     StorePointer(&raw_ptr()->type_arguments_, value.raw());
@@ -5836,6 +5884,18 @@
 }
 
 
+intptr_t Instance::GetNativeField(Isolate* isolate, int index) const {
+  ASSERT(IsValidNativeIndex(index));
+  NoGCScope no_gc;
+  RawIntPtrArray* native_fields =
+      reinterpret_cast<RawIntPtrArray*>(*NativeFieldsAddr());
+  if (native_fields == IntPtrArray::null()) {
+    return 0;
+  }
+  return native_fields->ptr()->data_[index];
+}
+
+
 bool String::Equals(const String& str) const {
   if (raw() == str.raw()) {
     return true;  // Both handles point to the same raw instance.
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index 970ad17..cf7555c 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -27,15 +27,16 @@
     mint_class_(Class::null()),
     bigint_class_(Class::null()),
     double_class_(Class::null()),
-    string_interface_(Type::null()),
+    string_type_(Type::null()),
     one_byte_string_class_(Class::null()),
     two_byte_string_class_(Class::null()),
     external_one_byte_string_class_(Class::null()),
     external_two_byte_string_class_(Class::null()),
     bool_type_(Type::null()),
     bool_class_(Class::null()),
-    list_interface_(Type::null()),
+    list_class_(Class::null()),
     array_class_(Class::null()),
+    array_type_(Type::null()),
     immutable_array_class_(Class::null()),
     growable_object_array_class_(Class::null()),
     int8_array_class_(Class::null()),
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index f59d78c..ba7b09f 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -102,9 +102,9 @@
   RawClass* bigint_class() const { return bigint_class_; }
   void set_bigint_class(const Class& value) { bigint_class_ = value.raw(); }
 
-  RawType* string_interface() const { return string_interface_; }
-  void set_string_interface(const Type& value) {
-    string_interface_ = value.raw();
+  RawType* string_type() const { return string_type_; }
+  void set_string_type(const Type& value) {
+    string_type_ = value.raw();
   }
 
   RawClass* one_byte_string_class() const { return one_byte_string_class_; }
@@ -137,10 +137,8 @@
   RawClass* bool_class() const { return bool_class_; }
   void set_bool_class(const Class& value) { bool_class_ = value.raw(); }
 
-  RawType* list_interface() const { return list_interface_; }
-  void set_list_interface(const Type& value) {
-    list_interface_ = 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(); }
@@ -148,6 +146,9 @@
     return OFFSET_OF(ObjectStore, array_class_);
   }
 
+  RawType* array_type() const { return array_type_; }
+  void set_array_type(const Type& value) { array_type_ = value.raw(); }
+
   RawClass* immutable_array_class() const { return immutable_array_class_; }
   void set_immutable_array_class(const Class& value) {
     immutable_array_class_ = value.raw();
@@ -479,15 +480,16 @@
   RawClass* bigint_class_;
   RawClass* double_class_;
   RawType* double_type_;
-  RawType* string_interface_;
+  RawType* string_type_;
   RawClass* one_byte_string_class_;
   RawClass* two_byte_string_class_;
   RawClass* external_one_byte_string_class_;
   RawClass* external_two_byte_string_class_;
   RawType* bool_type_;
   RawClass* bool_class_;
-  RawType* list_interface_;
+  RawClass* list_class_;
   RawClass* array_class_;
+  RawType* array_type_;
   RawClass* immutable_array_class_;
   RawClass* growable_object_array_class_;
   RawClass* int8_array_class_;
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 2c35fd7..354c11c 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -117,7 +117,7 @@
 
 TEST_CASE(TypeArguments) {
   const Type& type1 = Type::Handle(Type::Double());
-  const Type& type2 = Type::Handle(Type::StringInterface());
+  const Type& type2 = Type::Handle(Type::StringType());
   const TypeArguments& type_arguments1 = TypeArguments::Handle(
     TypeArguments::New(2));
   type_arguments1.SetTypeAt(0, type1);
@@ -576,13 +576,13 @@
 
   // Create a 1-byte string from an array of 2-byte elements.
   {
-    const uint16_t char16[] = { 0x00, 0x1F, 0x7F };
+    const uint16_t char16[] = { 0x00, 0x7F, 0xFF };
     const String& str8 = String::Handle(String::New(char16, 3));
     EXPECT(str8.IsOneByteString());
     EXPECT(!str8.IsTwoByteString());
     EXPECT_EQ(0x00, str8.CharAt(0));
-    EXPECT_EQ(0x1F, str8.CharAt(1));
-    EXPECT_EQ(0x7F, str8.CharAt(2));
+    EXPECT_EQ(0x7F, str8.CharAt(1));
+    EXPECT_EQ(0xFF, str8.CharAt(2));
   }
 
   // Create a 1-byte string from an array of 4-byte elements.
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 2ecd491..4c9027b 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -33,7 +33,8 @@
             "Warning on legacy type Dynamic)");
 DEFINE_FLAG(bool, warn_legacy_getters, false,
             "Warning on legacy getter syntax");
-DECLARE_FLAG(bool, use_cha);
+DEFINE_FLAG(bool, strict_function_literals, false,
+            "enforce new function literal rules");
 
 static void CheckedModeHandler(bool value) {
   FLAG_enable_asserts = value;
@@ -154,11 +155,9 @@
   const intptr_t num_fixed_params = function().num_fixed_parameters();
   const intptr_t num_opt_params = function().NumOptionalParameters();
   intptr_t num_params = num_fixed_params + num_opt_params;
-  const bool is_native_instance_closure =
-      function().is_native() && function().IsImplicitInstanceClosureFunction();
   // Compute start indices to parameters and locals, and the number of
   // parameters to copy.
-  if ((num_opt_params == 0) && !is_native_instance_closure) {
+  if (num_opt_params == 0) {
     // Parameter i will be at fp[1 + num_params - i] and local variable
     // j will be at fp[kFirstLocalSlotIndex - j].
     ASSERT(GetSavedArgumentsDescriptorVar() == NULL);
@@ -177,11 +176,6 @@
     first_parameter_index_ = kFirstLocalSlotIndex;
     first_stack_local_index_ = first_parameter_index_ - num_params;
     num_copied_params_ = num_params;
-    if (is_native_instance_closure) {
-      num_copied_params_ += 1;
-      first_parameter_index_ -= 1;
-      first_stack_local_index_ -= 1;
-    }
   }
 
   // Allocate parameters and local variables, either in the local frame or
@@ -343,42 +337,8 @@
 }
 
 
-// Removes optimized code once we load more classes, since --use_cha based
-// optimizations may have become invalid.
-// TODO(srdjan): Note which functions use which CHA decision and deoptimize
-// only the necessary ones.
-static void RemoveOptimizedCode() {
-  ASSERT(FLAG_use_cha);
-  // Deoptimize all live frames.
-  DeoptimizeAll();
-  // Switch all functions' code to unoptimized.
-  const ClassTable& class_table = *Isolate::Current()->class_table();
-  Class& cls = Class::Handle();
-  Array& array = Array::Handle();
-  Function& function = Function::Handle();
-  const intptr_t num_cids = class_table.NumCids();
-  for (intptr_t i = kInstanceCid; i < num_cids; i++) {
-    if (!class_table.HasValidClassAt(i)) continue;
-    cls = class_table.At(i);
-    ASSERT(!cls.IsNull());
-    array = cls.functions();
-    intptr_t num_functions = array.IsNull() ? 0 : array.Length();
-    for (intptr_t f = 0; f < num_functions; f++) {
-      function ^= array.At(f);
-      ASSERT(!function.IsNull());
-      if (function.HasOptimizedCode()) {
-        function.SwitchToUnoptimizedCode();
-      }
-    }
-  }
-}
-
-
 void Parser::ParseCompilationUnit(const Library& library,
                                   const Script& script) {
-  if (FLAG_use_cha) {
-    RemoveOptimizedCode();
-  }
   ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump());
   TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
   Parser parser(script, library);
@@ -779,7 +739,7 @@
   const Script& script = Script::Handle(isolate, func.script());
   Parser parser(script, func, func.token_pos());
   SequenceNode* node_sequence = NULL;
-  Array& default_parameter_values = Array::Handle(isolate, Array::null());
+  Array& default_parameter_values = Array::ZoneHandle(isolate, Array::null());
   switch (func.kind()) {
     case RawFunction::kRegularFunction:
     case RawFunction::kClosureFunction:
@@ -1169,6 +1129,13 @@
 
       // Finish parsing the function type parameter.
       ParamList func_params;
+
+      // Add implicit closure object parameter.
+      func_params.AddFinalParameter(
+          TokenPos(),
+          &String::ZoneHandle(Symbols::ClosureParameter()),
+          &Type::ZoneHandle(Type::DynamicType()));
+
       const bool no_explicit_default_values = false;
       ParseFormalParameterList(no_explicit_default_values, &func_params);
 
@@ -1365,14 +1332,6 @@
 }
 
 
-// Lookup class in the corelib implementation which contains various VM
-// helper methods and classes.
-static RawClass* LookupImplClass(const String& class_name) {
-  Library& coreimpl = Library::Handle(Library::CoreImplLibrary());
-  return coreimpl.LookupClassAllowPrivate(class_name);
-}
-
-
 // Lookup class in the core lib which also contains various VM
 // helper methods and classes. Allow look up of private classes.
 static RawClass* LookupCoreClass(const String& class_name) {
@@ -1399,7 +1358,7 @@
   arguments->Add(new LiteralNode(args_pos, function_name));
   // The second argument is an array containing the original function arguments.
   ArrayNode* args_array = new ArrayNode(
-      args_pos, Type::ZoneHandle(Type::ListInterface()));
+      args_pos, Type::ZoneHandle(Type::ArrayType()));
   for (intptr_t i = 1; i < function_args.length(); i++) {
     args_array->AddElement(function_args.NodeAt(i));
   }
@@ -2279,15 +2238,22 @@
   OpenFunctionBlock(func);  // Build local scope for function.
 
   ParamList params;
-  // Static functions do not have a receiver.
-  // An instance closure may capture and access the receiver, but via the
-  // context and not via the first formal parameter.
-  // The first parameter of a factory is the AbstractTypeArguments vector of
-  // the type of the instance to be allocated.
-  if (!func.is_static() && !func.IsClosureFunction()) {
+  // An instance closure function may capture and access the receiver, but via
+  // the context and not via the first formal parameter.
+  if (func.IsClosureFunction()) {
+    // The first parameter of a closure function is the closure object.
+    ASSERT(!func.is_const());  // Closure functions cannot be const.
+    params.AddFinalParameter(
+        TokenPos(),
+        &String::ZoneHandle(Symbols::ClosureParameter()),
+        &Type::ZoneHandle(Type::DynamicType()));
+  } else if (!func.is_static()) {
+    // Static functions do not have a receiver.
     ASSERT(current_class().raw() == func.Owner());
     params.AddReceiver(ReceiverType(TokenPos()));
   } else if (func.IsFactory()) {
+    // The first parameter of a factory is the AbstractTypeArguments vector of
+    // the type of the instance to be allocated.
     params.AddFinalParameter(
         TokenPos(),
         &String::ZoneHandle(Symbols::TypeArgumentsParameter()),
@@ -2473,13 +2439,13 @@
              "static method '%s' cannot be abstract",
              method->name->ToCString());
   }
-  if (method->has_const && !(method->IsConstructor() || method->IsFactory())) {
+  if (method->has_const && !method->IsFactoryOrConstructor()) {
     ErrorMsg(method->name_pos, "'const' not allowed for methods");
   }
-  if (method->IsFactoryOrConstructor() && method->has_abstract) {
+  if (method->has_abstract && method->IsFactoryOrConstructor()) {
     ErrorMsg(method->name_pos, "constructor cannot be abstract");
   }
-  if (method->IsConstructor() && method->has_const) {
+  if (method->has_const && method->IsConstructor()) {
     Class& cls = Class::Handle(library_.LookupClass(members->class_name()));
     cls.set_is_const();
   }
@@ -2646,13 +2612,9 @@
       ErrorMsg(method->name_pos,
                "external method '%s' may not have a function body",
                method->name->ToCString());
-    } else if (method->IsConstructor() && method->has_const) {
+    } else if (method->IsFactoryOrConstructor() && method->has_const) {
       ErrorMsg(method->name_pos,
-               "const constructor '%s' may not have a function body",
-               method->name->ToCString());
-    } else if (method->IsFactory() && method->has_const) {
-      ErrorMsg(method->name_pos,
-               "const factory '%s' may not have a function body",
+               "const constructor or factory '%s' may not have a function body",
                method->name->ToCString());
     } else if (members->is_interface()) {
       ErrorMsg(method->name_pos,
@@ -2678,9 +2640,9 @@
     } else if (members->is_interface()) {
       ErrorMsg(method->name_pos,
                "function body not allowed in interface declaration");
-    } else if (method->IsConstructor() && method->has_const) {
+    } else if (method->IsFactoryOrConstructor() && method->has_const) {
       ErrorMsg(method->name_pos,
-               "const constructor '%s' may not have a function body",
+               "const constructor or factory '%s' may not be native",
                method->name->ToCString());
     }
     if (method->redirect_name != NULL) {
@@ -3010,6 +2972,11 @@
   if (IsIdentifier() &&
       (CurrentLiteral()->Equals(members->class_name()) || member.has_factory)) {
     if (member.has_factory) {
+      // TODO(regis): Simplify this code once the core library is fixed.
+      // See issue 6641.
+      // Per specification, the name of the factory must be the name of the
+      // immediately enclosing class.
+
       // The factory name may be qualified.
       QualIdent factory_name;
       ParseQualIdent(&factory_name);
@@ -3436,6 +3403,13 @@
     ErrorMsg("formal parameter list expected");
   }
   ParamList func_params;
+
+  // Add implicit closure object parameter.
+  func_params.AddFinalParameter(
+      TokenPos(),
+      &String::ZoneHandle(Symbols::ClosureParameter()),
+      &Type::ZoneHandle(Type::DynamicType()));
+
   const bool no_explicit_default_values = false;
   ParseFormalParameterList(no_explicit_default_values, &func_params);
   // The field 'is_static' has no meaning for signature functions.
@@ -4314,6 +4288,9 @@
 
 
 void Parser::ParseIdentList(GrowableObjectArray* names) {
+  if (!IsIdentifier()) {
+    ErrorMsg("identifier expected");
+  }
   while (IsIdentifier()) {
     names->Add(*CurrentLiteral());
     ConsumeToken();  // Identifier.
@@ -4455,6 +4432,10 @@
     return;
   }
 
+  const bool is_script = (script_.kind() == RawScript::kScriptTag);
+  const bool is_library = (script_.kind() == RawScript::kLibraryTag);
+  ASSERT(script_.kind() != RawScript::kSourceTag);
+
   // We may read metadata tokens that are part of the toplevel
   // declaration that follows the library definitions. Therefore, we
   // need to remember the position of the last token that was
@@ -4465,11 +4446,14 @@
     ParseLibraryName();
     metadata_pos = TokenPos();
     SkipMetadata();
-  } else if (script_.kind() == RawScript::kLibraryTag) {
+  } else if (is_library) {
     ErrorMsg("library name definition expected");
   }
   while ((CurrentToken() == Token::kIMPORT) ||
       (CurrentToken() == Token::kEXPORT)) {
+    if (is_script && (CurrentToken() == Token::kEXPORT)) {
+      ErrorMsg("export not allowed in scripts");
+    }
     ParseLibraryImportExport();
     metadata_pos = TokenPos();
     SkipMetadata();
@@ -4726,35 +4710,28 @@
   func.set_is_native(true);
   TRACE_PARSER("ParseNativeFunctionBlock");
   const Class& cls = Class::Handle(func.Owner());
-  const int num_parameters = params->parameters->length();
-  const bool is_instance_closure = func.IsImplicitInstanceClosureFunction();
-  int num_params_for_resolution = num_parameters;
+  ASSERT(func.NumParameters() == params->parameters->length());
 
   // Parse the function name out.
   const intptr_t native_pos = TokenPos();
   const String& native_name = ParseNativeDeclaration();
 
-  if (is_instance_closure) {
-    num_params_for_resolution += 1;  // account for 'this' when resolving.
-  }
   // Now resolve the native function to the corresponding native entrypoint.
+  const int num_params = NativeArguments::ParameterCountForResolution(func);
   NativeFunction native_function = NativeEntry::ResolveNative(
-      cls, native_name, num_params_for_resolution);
+      cls, native_name, num_params);
   if (native_function == NULL) {
     ErrorMsg(native_pos, "native function '%s' cannot be found",
         native_name.ToCString());
   }
 
-  const bool has_opt_params = (params->num_optional_parameters > 0);
-
   // Now add the NativeBodyNode and return statement.
   current_block_->statements->Add(
-      new ReturnNode(TokenPos(), new NativeBodyNode(TokenPos(),
-                                                    native_name,
-                                                    native_function,
-                                                    num_parameters,
-                                                    has_opt_params,
-                                                    is_instance_closure)));
+      new ReturnNode(TokenPos(),
+                     new NativeBodyNode(TokenPos(),
+                                        Function::ZoneHandle(func.raw()),
+                                        native_name,
+                                        native_function)));
 }
 
 
@@ -4844,6 +4821,10 @@
     ConsumeToken();
     AstNode* expr = ParseExpr(is_const, kConsumeCascades);
     initialization = new StoreLocalNode(assign_pos, variable, expr);
+    if (is_const) {
+      ASSERT(expr->IsLiteralNode());
+      variable->SetConstValue(expr->AsLiteralNode()->literal());
+    }
   } else if (is_final || is_const) {
     ErrorMsg(ident_pos,
     "missing initialization of 'final' or 'const' variable");
@@ -4944,25 +4925,46 @@
   const String* function_name = NULL;
 
   result_type = Type::DynamicType();
-  if (CurrentToken() == Token::kVOID) {
-    ConsumeToken();
-    result_type = Type::VoidType();
-  } else if ((CurrentToken() == Token::kIDENT) &&
-             (LookaheadToken(1) != Token::kLPAREN)) {
-    result_type = ParseType(ClassFinalizer::kCanonicalize);
-  }
-  const intptr_t ident_pos = TokenPos();
-  if (IsIdentifier()) {
-    variable_name = CurrentLiteral();
-    function_name = variable_name;
-    ConsumeToken();
-  } else {
-    if (!is_literal) {
-      ErrorMsg("function name expected");
+
+  intptr_t ident_pos = TokenPos();
+  if (FLAG_strict_function_literals) {
+    if (is_literal) {
+      ASSERT(CurrentToken() == Token::kLPAREN);
+      function_name = &String::ZoneHandle(Symbols::AnonymousClosure());
+    } else {
+      if (CurrentToken() == Token::kVOID) {
+        ConsumeToken();
+        result_type = Type::VoidType();
+      } else if ((CurrentToken() == Token::kIDENT) &&
+                 (LookaheadToken(1) != Token::kLPAREN)) {
+        result_type = ParseType(ClassFinalizer::kCanonicalize);
+      }
+      ident_pos = TokenPos();
+      variable_name = ExpectIdentifier("function name expected");
+      function_name = variable_name;
     }
-    function_name = &String::ZoneHandle(Symbols::AnonymousClosure());
+  } else {
+    // TODO(hausner) remove this block once support for old-style function
+    // literals is gone.
+    if (CurrentToken() == Token::kVOID) {
+      ConsumeToken();
+      result_type = Type::VoidType();
+    } else if ((CurrentToken() == Token::kIDENT) &&
+               (LookaheadToken(1) != Token::kLPAREN)) {
+      result_type = ParseType(ClassFinalizer::kCanonicalize);
+    }
+    ident_pos = TokenPos();
+    if (IsIdentifier()) {
+      variable_name = CurrentLiteral();
+      function_name = variable_name;
+      ConsumeToken();
+    } else {
+      if (!is_literal) {
+        ErrorMsg("function name expected");
+      }
+      function_name = &String::ZoneHandle(Symbols::AnonymousClosure());
+    }
   }
-  ASSERT(ident_pos >= 0);
 
   if (CurrentToken() != Token::kLPAREN) {
     ErrorMsg("'(' expected");
@@ -5178,7 +5180,7 @@
     *value = CurrentDoubleLiteral();
     return true;
   } else if ((CurrentToken() == Token::kSTRING) &&
-      (no_check || type.IsStringInterface())) {
+      (no_check || type.IsStringType())) {
     *value = CurrentLiteral()->raw();
     return true;
   } else if ((CurrentToken() == Token::kTRUE) &&
@@ -5364,29 +5366,46 @@
 
 
 bool Parser::IsFunctionLiteral() {
-  if (!allow_function_literals_) {
-    return false;
-  }
-  const intptr_t saved_pos = TokenPos();
-  bool is_function_literal = false;
-  if (IsIdentifier() && (LookaheadToken(1) == Token::kLPAREN)) {
-    ConsumeToken();  // Consume function identifier.
-  } else if (TryParseReturnType()) {
-    if (!IsIdentifier()) {
-      SetPosition(saved_pos);
+  // TODO(hausner): Remove code block that supports old-style function
+  // literals.
+  if (FLAG_strict_function_literals) {
+    if (CurrentToken() != Token::kLPAREN || !allow_function_literals_) {
       return false;
     }
-    ConsumeToken();  // Comsume function identifier.
-  }
-  if (CurrentToken() == Token::kLPAREN) {
+    const intptr_t saved_pos = TokenPos();
+    bool is_function_literal = false;
     SkipToMatchingParenthesis();
     if ((CurrentToken() == Token::kLBRACE) ||
         (CurrentToken() == Token::kARROW)) {
       is_function_literal = true;
     }
+    SetPosition(saved_pos);
+    return is_function_literal;
+  } else {
+    if (!allow_function_literals_) {
+      return false;
+    }
+    const intptr_t saved_pos = TokenPos();
+    bool is_function_literal = false;
+    if (IsIdentifier() && (LookaheadToken(1) == Token::kLPAREN)) {
+      ConsumeToken();  // Consume function identifier.
+    } else if (TryParseReturnType()) {
+      if (!IsIdentifier()) {
+        SetPosition(saved_pos);
+        return false;
+      }
+      ConsumeToken();  // Comsume function identifier.
+    }
+    if (CurrentToken() == Token::kLPAREN) {
+      SkipToMatchingParenthesis();
+      if ((CurrentToken() == Token::kLBRACE) ||
+          (CurrentToken() == Token::kARROW)) {
+        is_function_literal = true;
+      }
+    }
+    SetPosition(saved_pos);
+    return is_function_literal;
   }
-  SetPosition(saved_pos);
-  return is_function_literal;
 }
 
 
@@ -8077,22 +8096,17 @@
   // +2 for implicit receiver and construction phase arguments.
   GrowableArray<const Object*> arg_values(arguments->length() + 2);
   Instance& instance = Instance::Handle();
-  if (!constructor.IsFactory()) {
-    instance = Instance::New(type_class, Heap::kOld);
-    if (!type_arguments.IsNull()) {
-      if (!type_arguments.IsInstantiated()) {
-        ErrorMsg("type must be constant in const constructor");
-      }
-      instance.SetTypeArguments(
-          AbstractTypeArguments::Handle(type_arguments.Canonicalize()));
+  ASSERT(!constructor.IsFactory());
+  instance = Instance::New(type_class, Heap::kOld);
+  if (!type_arguments.IsNull()) {
+    if (!type_arguments.IsInstantiated()) {
+      ErrorMsg("type must be constant in const constructor");
     }
-    arg_values.Add(&instance);
-    arg_values.Add(&Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)));
-  } else {
-    // Prepend type_arguments to list of arguments to factory.
-    ASSERT(type_arguments.IsZoneHandle());
-    arg_values.Add(&type_arguments);
+    instance.SetTypeArguments(
+        AbstractTypeArguments::Handle(type_arguments.Canonicalize()));
   }
+  arg_values.Add(&instance);
+  arg_values.Add(&Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)));
   for (int i = 0; i < arguments->length(); i++) {
     AstNode* arg = arguments->NodeAt(i);
     // Arguments have been evaluated to a literal value already.
@@ -8111,10 +8125,6 @@
         return Object::null();
       }
   } else {
-    if (constructor.IsFactory()) {
-      // The factory method returns the allocated object.
-      instance ^= result.raw();
-    }
     if (!instance.IsNull()) {
       instance ^= instance.Canonicalize();
     }
@@ -8135,7 +8145,11 @@
   LocalVariable* local = LookupLocalScope(ident);
   if (local != NULL) {
     if (node != NULL) {
-      *node = new LoadLocalNode(ident_pos, local);
+      if (local->IsConst()) {
+        *node = new LiteralNode(ident_pos, *local->ConstValue());
+      } else {
+        *node = new LoadLocalNode(ident_pos, local);
+      }
     }
     return true;
   }
@@ -8680,10 +8694,10 @@
     }
   }
   ASSERT(type_arguments.IsNull() || (type_arguments.Length() == 1));
-  const Class& list_class = Class::Handle(
-      Type::Handle(Type::ListInterface()).type_class());
+  const Class& array_class = Class::Handle(
+      Type::Handle(Type::ArrayType()).type_class());
   Type& type = Type::ZoneHandle(
-      Type::New(list_class, type_arguments, type_pos));
+      Type::New(array_class, type_arguments, type_pos));
   type ^= ClassFinalizer::FinalizeType(
       current_class(), type, ClassFinalizer::kCanonicalize);
   ArrayNode* list = new ArrayNode(TokenPos(), type);
@@ -8749,29 +8763,42 @@
     return new LiteralNode(literal_pos, const_list);
   } else {
     // Factory call at runtime.
-    String& list_literal_factory_class_name = String::Handle(
-        Symbols::ListLiteralFactoryClass());
-    const Class& list_literal_factory_class =
-        Class::Handle(LookupCoreClass(list_literal_factory_class_name));
-    ASSERT(!list_literal_factory_class.IsNull());
-    const String& list_literal_factory_name =
+    // TODO(regis): Once _ListImpl is removed, use Symbols::List() instead of
+    // Symbols::ListImplementation() on the following line.
+    String& factory_class_name = String::Handle(Symbols::ListImplementation());
+    const Class& factory_class =
+        Class::Handle(LookupCoreClass(factory_class_name));
+    ASSERT(!factory_class.IsNull());
+    const String& factory_method_name =
         String::Handle(Symbols::ListLiteralFactory());
-    const Function& list_literal_factory = Function::ZoneHandle(
-        list_literal_factory_class.LookupFactory(list_literal_factory_name));
-    ASSERT(!list_literal_factory.IsNull());
+    const Function& factory_method = Function::ZoneHandle(
+        factory_class.LookupFactory(factory_method_name));
+    ASSERT(!factory_method.IsNull());
     if (!type_arguments.IsNull() &&
         !type_arguments.IsInstantiated() &&
         (current_block_->scope->function_level() > 0)) {
       // Make sure that the instantiator is captured.
       CaptureInstantiator();
     }
+    AbstractTypeArguments& factory_type_args =
+        AbstractTypeArguments::ZoneHandle(type_arguments.raw());
+    // If the factory class extends other parameterized classes, adjust the
+    // type argument vector.
+    if (!factory_type_args.IsNull() && (factory_class.NumTypeArguments() > 1)) {
+      ASSERT(factory_type_args.Length() == 1);
+      Type& factory_type = Type::Handle(Type::New(
+          factory_class, factory_type_args, type_pos, Heap::kNew));
+      factory_type ^= ClassFinalizer::FinalizeType(
+          current_class(), factory_type, ClassFinalizer::kFinalize);
+      factory_type_args = factory_type.arguments();
+      ASSERT(factory_type_args.Length() == factory_class.NumTypeArguments());
+    }
+    factory_type_args = factory_type_args.Canonicalize();
     ArgumentListNode* factory_param = new ArgumentListNode(literal_pos);
     factory_param->Add(list);
-    AbstractTypeArguments& canonical_type_arguments =
-        AbstractTypeArguments::ZoneHandle(type_arguments.Canonicalize());
     return CreateConstructorCallNode(literal_pos,
-                                     canonical_type_arguments,
-                                     list_literal_factory,
+                                     factory_type_args,
+                                     factory_method,
                                      factory_param);
   }
 }
@@ -8846,7 +8873,7 @@
                 "the key type and the value type");
       }
       TypeArguments& type_array = TypeArguments::Handle(TypeArguments::New(2));
-      type_array.SetTypeAt(0, Type::Handle(Type::StringInterface()));
+      type_array.SetTypeAt(0, Type::Handle(Type::StringType()));
       type_array.SetTypeAt(1, value_type);
       map_type_arguments = type_array.raw();
     } else if (map_type_arguments.Length() > 2) {
@@ -8857,7 +8884,7 @@
       const AbstractType& key_type =
           AbstractType::Handle(map_type_arguments.TypeAt(0));
       value_type = map_type_arguments.TypeAt(1);
-      if (!key_type.IsStringInterface()) {
+      if (!key_type.IsStringType()) {
         ErrorMsg(type_pos, "the key type of a map literal must be 'String'");
       }
     }
@@ -8872,8 +8899,8 @@
 
   // The kv_pair array is temporary and of element type dynamic. It is passed
   // to the factory to initialize a properly typed map.
-  ArrayNode* kv_pairs =
-      new ArrayNode(TokenPos(), Type::ZoneHandle(Type::ListInterface()));
+  ArrayNode* kv_pairs = new ArrayNode(
+      TokenPos(), Type::ZoneHandle(Type::ArrayType()));
 
   // Parse the map entries. Note: there may be an optional extra
   // comma after the last entry.
@@ -8951,8 +8978,11 @@
     const String& immutable_map_class_name =
         String::Handle(Symbols::ImmutableMap());
     const Class& immutable_map_class =
-        Class::Handle(LookupImplClass(immutable_map_class_name));
+        Class::Handle(LookupCoreClass(immutable_map_class_name));
     ASSERT(!immutable_map_class.IsNull());
+    // If the immutable map class extends other parameterized classes, we need
+    // to adjust the type argument vector. This is currently not the case.
+    ASSERT(immutable_map_class.NumTypeArguments() == 2);
     ArgumentListNode* constr_args = new ArgumentListNode(TokenPos());
     constr_args->Add(new LiteralNode(literal_pos, key_value_array));
     const String& constr_name =
@@ -8974,27 +9004,40 @@
     }
   } else {
     // Factory call at runtime.
-    String& map_literal_factory_class_name = String::Handle(
-        Symbols::MapLiteralFactoryClass());
-    const Class& map_literal_factory_class =
-        Class::Handle(LookupCoreClass(map_literal_factory_class_name));
-    ASSERT(!map_literal_factory_class.IsNull());
-    const String& map_literal_factory_name =
+    String& factory_class_name = String::Handle(Symbols::MapImplementation());
+    const Class& factory_class =
+        Class::Handle(LookupCoreClass(factory_class_name));
+    ASSERT(!factory_class.IsNull());
+    const String& factory_method_name =
         String::Handle(Symbols::MapLiteralFactory());
-    const Function& map_literal_factory = Function::ZoneHandle(
-        map_literal_factory_class.LookupFactory(map_literal_factory_name));
-    ASSERT(!map_literal_factory.IsNull());
+    const Function& factory_method = Function::ZoneHandle(
+        factory_class.LookupFactory(factory_method_name));
+    ASSERT(!factory_method.IsNull());
     if (!map_type_arguments.IsNull() &&
         !map_type_arguments.IsInstantiated() &&
         (current_block_->scope->function_level() > 0)) {
       // Make sure that the instantiator is captured.
       CaptureInstantiator();
     }
+    AbstractTypeArguments& factory_type_args =
+        AbstractTypeArguments::ZoneHandle(map_type_arguments.raw());
+    // If the factory class extends other parameterized classes, adjust the
+    // type argument vector.
+    if (!factory_type_args.IsNull() && (factory_class.NumTypeArguments() > 2)) {
+      ASSERT(factory_type_args.Length() == 2);
+      Type& factory_type = Type::Handle(Type::New(
+          factory_class, factory_type_args, type_pos, Heap::kNew));
+      factory_type ^= ClassFinalizer::FinalizeType(
+          current_class(), factory_type, ClassFinalizer::kFinalize);
+      factory_type_args = factory_type.arguments();
+      ASSERT(factory_type_args.Length() == factory_class.NumTypeArguments());
+    }
+    factory_type_args = factory_type_args.Canonicalize();
     ArgumentListNode* factory_param = new ArgumentListNode(literal_pos);
     factory_param->Add(kv_pairs);
     return CreateConstructorCallNode(literal_pos,
-                                     map_type_arguments,
-                                     map_literal_factory,
+                                     factory_type_args,
+                                     factory_method,
                                      factory_param);
   }
 }
@@ -9188,6 +9231,10 @@
     ASSERT(!constructor_class.is_interface());
   }
 
+  // An additional type check of the result of a redirecting factory may be
+  // required.
+  AbstractType& type_bound = AbstractType::ZoneHandle();
+
   // Make sure that an appropriate constructor exists.
   const String& constructor_name =
       BuildConstructorName(constructor_class_name, named_constructor);
@@ -9214,18 +9261,28 @@
       }
       return ThrowNoSuchMethodError(call_pos, external_constructor_name);
     } else if (constructor.IsRedirectingFactory()) {
-      type = constructor.RedirectionType();
-      if (type.IsMalformed()) {
+      Type& redirect_type = Type::Handle(constructor.RedirectionType());
+      if (!redirect_type.IsMalformed() && !redirect_type.IsInstantiated()) {
+        // The type arguments of the redirection type are instantiated from the
+        // type arguments of the parsed type of the 'new' or 'const' expression.
+        redirect_type ^= redirect_type.InstantiateFrom(type_arguments);
+      }
+      if (redirect_type.IsMalformed()) {
         if (is_const) {
-          const Error& error = Error::Handle(type.malformed_error());
+          const Error& error = Error::Handle(redirect_type.malformed_error());
           ErrorMsg(error);
         }
-        return ThrowTypeError(type.token_pos(), type);
+        return ThrowTypeError(redirect_type.token_pos(), redirect_type);
       }
-      constructor = constructor.RedirectionTarget();
-      ASSERT(!constructor.IsNull());
+      if (FLAG_enable_type_checks && !redirect_type.IsSubtypeOf(type, NULL)) {
+        // Additional type checking of the result is necessary.
+        type_bound = type.raw();
+      }
+      type = redirect_type.raw();
       type_class = type.type_class();
       type_arguments = type.arguments();
+      constructor = constructor.RedirectionTarget();
+      ASSERT(!constructor.IsNull());
       constructor_class = constructor.Owner();
       ASSERT(type_class.raw() == constructor_class.raw());
     }
@@ -9238,8 +9295,7 @@
   // It is ok to call a factory method of an abstract class, but it is
   // a dynamic error to instantiate an abstract class.
   ASSERT(!constructor.IsNull());
-  if (constructor_class.is_abstract() &&
-      !constructor.IsFactory()) {
+  if (constructor_class.is_abstract() && !constructor.IsFactory()) {
     ArgumentListNode* arguments = new ArgumentListNode(type_pos);
     arguments->Add(new LiteralNode(
         TokenPos(), Integer::ZoneHandle(Integer::New(type_pos))));
@@ -9337,6 +9393,23 @@
       const Instance& const_instance = Instance::Cast(constructor_result);
       new_object = new LiteralNode(new_pos,
                                    Instance::ZoneHandle(const_instance.raw()));
+      if (!type_bound.IsNull()) {
+        ASSERT(!type_bound.IsMalformed());
+        Error& malformed_error = Error::Handle();
+        if (!const_instance.IsInstanceOf(type_bound,
+                                         TypeArguments::Handle(),
+                                         &malformed_error)) {
+          type_bound = ClassFinalizer::NewFinalizedMalformedType(
+              malformed_error,
+              current_class(),
+              new_pos,
+              ClassFinalizer::kTryResolve,  // 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);
+        }
+        type_bound = AbstractType::null();
+      }
     }
   } else {
     CheckFunctionIsCallable(new_pos, constructor);
@@ -9352,6 +9425,10 @@
     new_object = CreateConstructorCallNode(
         new_pos, type_arguments, constructor, arguments);
   }
+  if (!type_bound.IsNull()) {
+    const String& dst_name = String::ZoneHandle(Symbols::FactoryResult());
+    new_object = new AssignableNode(new_pos, new_object, type_bound, dst_name);
+  }
   return new_object;
 }
 
@@ -9412,8 +9489,8 @@
   }
   // String interpolation needed.
   bool is_compiletime_const = true;
-  ArrayNode* values = new ArrayNode(TokenPos(),
-                                    Type::ZoneHandle(Type::ListInterface()));
+  ArrayNode* values = new ArrayNode(
+      TokenPos(), Type::ZoneHandle(Type::ArrayType()));
   while (CurrentToken() == Token::kSTRING) {
     values->AddElement(new LiteralNode(TokenPos(), *CurrentLiteral()));
     ConsumeToken();
@@ -9491,7 +9568,7 @@
     saved_args_desc_var =
         new LocalVariable(owner_function.token_pos(),
                           saved_args_desc_name,
-                          Type::ZoneHandle(Type::ListInterface()));
+                          Type::ZoneHandle(Type::ArrayType()));
     saved_args_desc_var->set_is_final();
     // The saved arguments descriptor variable must be added just after the
     // formal parameters. This simplifies the 2-step saving of a captured
@@ -9651,6 +9728,9 @@
 const Instance& Parser::EvaluateConstExpr(AstNode* expr) {
   if (expr->IsLiteralNode()) {
     return expr->AsLiteralNode()->literal();
+  } else if (expr->IsLoadLocalNode() &&
+      expr->AsLoadLocalNode()->local().IsConst()) {
+    return *expr->AsLoadLocalNode()->local().ConstValue();
   } else {
     ASSERT(expr->EvalConstExpr() != NULL);
     ReturnNode* ret = new ReturnNode(expr->token_pos(), expr);
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 69d27af..e3c082d 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -36,13 +36,15 @@
       : function_(function),
         node_sequence_(NULL),
         instantiator_(NULL),
-        default_parameter_values_(Array::Handle()),
+        default_parameter_values_(Array::ZoneHandle()),
         saved_context_var_(NULL),
         expression_temp_var_(NULL),
         first_parameter_index_(0),
         first_stack_local_index_(0),
         num_copied_params_(0),
-        num_stack_locals_(0) { }
+        num_stack_locals_(0) {
+    ASSERT(function.IsZoneHandle());
+  }
 
   const Function& function() const { return function_; }
 
@@ -59,6 +61,7 @@
     return default_parameter_values_;
   }
   void set_default_parameter_values(const Array& default_parameter_values) {
+    ASSERT(default_parameter_values.IsZoneHandle());
     default_parameter_values_ = default_parameter_values.raw();
   }
 
diff --git a/runtime/vm/parser_test.cc b/runtime/vm/parser_test.cc
index 99433c5..f04eef1 100644
--- a/runtime/vm/parser_test.cc
+++ b/runtime/vm/parser_test.cc
@@ -20,7 +20,7 @@
   EXPECT(!cls.IsNull());
 
   String& funcname = String::Handle(String::New(fname));
-  Function& function = Function::Handle(cls.LookupStaticFunction(funcname));
+  Function& function = Function::ZoneHandle(cls.LookupStaticFunction(funcname));
   EXPECT(!function.IsNull());
 
   bool retval;
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 582c649..d95b996 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -593,13 +593,17 @@
                                             ObjectPointerVisitor* visitor) {
   // Make sure that we got here with the tagged pointer as this.
   ASSERT(raw_obj->IsHeapObject());
-  RawClass* cls = visitor->isolate()->class_table()->At(raw_obj->GetClassId());
-  intptr_t instance_size = cls->ptr()->instance_size_;
-  intptr_t num_native_fields = cls->ptr()->num_native_fields_;
+  uword tags = raw_obj->ptr()->tags_;
+  intptr_t instance_size = SizeTag::decode(tags);
+  if (instance_size == 0) {
+    RawClass* cls =
+        visitor->isolate()->class_table()->At(raw_obj->GetClassId());
+    instance_size = cls->ptr()->instance_size_;
+  }
 
   // Calculate the first and last raw object pointer fields.
   uword obj_addr = RawObject::ToAddr(raw_obj);
-  uword from = obj_addr + sizeof(RawObject) + num_native_fields * kWordSize;
+  uword from = obj_addr + sizeof(RawObject);
   uword to = obj_addr + instance_size - kWordSize;
   visitor->VisitPointers(reinterpret_cast<RawObject**>(from),
                          reinterpret_cast<RawObject**>(to));
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index cc6ae14..a29c3ae 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -572,7 +572,10 @@
   RawContextScope* context_scope_;
   RawFunction* parent_function_;  // Enclosing function of this local function.
   RawClass* signature_class_;
-  RawCode* closure_allocation_stub_;  // Stub code for allocation of closures.
+  union {
+    RawInstance* closure_;  // Closure object for static implicit closures.
+    RawCode* closure_allocation_stub_;  // Stub code for allocation of closures.
+  };
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->closure_allocation_stub_);
   }
@@ -894,7 +897,11 @@
     RawSmi* token_pos;
     RawString* name;
     RawBool* is_final;
-    RawAbstractType* type;
+    RawBool* is_const;
+    union {
+      RawAbstractType* type;
+      RawInstance* value;  // iff is_const is true
+    };
     RawSmi* context_index;
     RawSmi* context_level;
   };
@@ -925,6 +932,8 @@
   }
   intptr_t deopt_id_;         // Deoptimization id corresponding to this IC.
   intptr_t num_args_tested_;  // Number of arguments tested in IC.
+  uint8_t deopt_reason_;      // Last deoptimization reason.
+  uint8_t is_closure_call_;   // 0 or 1.
 };
 
 
@@ -934,7 +943,6 @@
 };
 
 
-
 class RawError : public RawObject {
   RAW_HEAP_OBJECT_IMPLEMENTATION(Error);
 };
@@ -1231,6 +1239,18 @@
 };
 
 
+// Define an aliases for intptr_t.
+#if defined(ARCH_IS_32_BIT)
+#define RawIntPtrArray RawInt32Array
+#define IntPtrArray Int32Array
+#elif defined(ARCH_IS_64_BIT)
+#define RawIntPtrArray RawInt64Array
+#define IntPtrArray Int64Array
+#else
+#error Architecture is not 32-bit or 64-bit.
+#endif  // ARCH_IS_32_BIT
+
+
 class RawByteArray : public RawInstance {
   RAW_HEAP_OBJECT_IMPLEMENTATION(ByteArray);
 
@@ -1278,6 +1298,8 @@
 
   // Variable length data follows here.
   int32_t data_[0];
+
+  friend class Instance;
 };
 
 
@@ -1294,6 +1316,8 @@
 
   // Variable length data follows here.
   int64_t data_[0];
+
+  friend class Instance;
 };
 
 
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 1248eca..f6540c1 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -505,9 +505,19 @@
   writer->WriteVMIsolateObject(kClosureDataCid);
   writer->WriteIntptrValue(writer->GetObjectTags(this));
 
-  // Write out all the object pointer fields.
-  SnapshotWriterVisitor visitor(writer);
-  visitor.VisitPointers(from(), to());
+  // Context scope.
+  // We don't write the context scope in the snapshot.
+  writer->WriteObjectImpl(Object::null());
+
+  // Parent function.
+  writer->WriteObjectImpl(ptr()->parent_function_);
+
+  // Signature class.
+  writer->WriteObjectImpl(ptr()->signature_class_);
+
+  // Static closure/Closure allocation stub.
+  // We don't write the closure or allocation stub in the snapshot.
+  writer->WriteObjectImpl(Object::null());
 }
 
 
@@ -1213,49 +1223,15 @@
                                         intptr_t object_id,
                                         intptr_t tags,
                                         Snapshot::Kind kind) {
-  ASSERT(reader != NULL);
-  ASSERT(kind == Snapshot::kMessage);
-
-  // Allocate context scope object.
-  intptr_t num_vars = reader->ReadIntptrValue();
-  ContextScope& scope = ContextScope::ZoneHandle(reader->isolate(),
-                                                 ContextScope::New(num_vars));
-  reader->AddBackRef(object_id, &scope, kIsDeserialized);
-
-  // Set the object tags.
-  scope.set_tags(tags);
-
-  // Set all the object fields.
-  // TODO(5411462): Need to assert No GC can happen here, even though
-  // allocations may happen.
-  intptr_t num_flds = (scope.raw()->to(num_vars) - scope.raw()->from());
-  for (intptr_t i = 0; i <= num_flds; i++) {
-    scope.StorePointer((scope.raw()->from() + i), reader->ReadObjectRef());
-  }
-
-  return scope.raw();
+  UNREACHABLE();
+  return NULL;
 }
 
 
 void RawContextScope::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
                               Snapshot::Kind kind) {
-  ASSERT(writer != NULL);
-  ASSERT(kind == Snapshot::kMessage);
-
-  // Write out the serialization header value for this object.
-  writer->WriteInlinedObjectHeader(object_id);
-
-  // Write out the class and tags information.
-  writer->WriteVMIsolateObject(kContextScopeCid);
-  writer->WriteIntptrValue(writer->GetObjectTags(this));
-
-  // Serialize number of variables.
-  writer->WriteIntptrValue(ptr()->num_variables_);
-
-  // Write out all the object pointer fields.
-  SnapshotWriterVisitor visitor(writer);
-  visitor.VisitPointers(from(), to(ptr()->num_variables_));
+  UNREACHABLE();
 }
 
 
diff --git a/runtime/vm/runtime_entry_test.cc b/runtime/vm/runtime_entry_test.cc
index a4aa7f5..a368af6 100644
--- a/runtime/vm/runtime_entry_test.cc
+++ b/runtime/vm/runtime_entry_test.cc
@@ -36,9 +36,9 @@
 // Arg1: a smi.
 // Result: a smi representing arg0 - arg1.
 DEFINE_RUNTIME_ENTRY(TestSmiSub, 2) {
-  ASSERT(arguments.Count() == kTestSmiSubRuntimeEntry.argument_count());
-  const Smi& left = Smi::CheckedHandle(arguments.At(0));
-  const Smi& right = Smi::CheckedHandle(arguments.At(1));
+  ASSERT(arguments.ArgCount() == kTestSmiSubRuntimeEntry.argument_count());
+  const Smi& left = Smi::CheckedHandle(arguments.ArgAt(0));
+  const Smi& right = Smi::CheckedHandle(arguments.ArgAt(1));
   // Ignoring overflow in the calculation below.
   intptr_t result = left.Value() - right.Value();
   arguments.SetReturn(Smi::Handle(Smi::New(result)));
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index e1b4326..44a5c7b 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -73,6 +73,8 @@
         heap_(scavenger->heap_),
         vm_heap_(Dart::vm_isolate()->heap()),
         delayed_weak_stack_(),
+        growth_policy_(PageSpace::kControlGrowth),
+        bytes_promoted_(0),
         visiting_old_pointers_(false),
         in_scavenge_pointer_(false) {}
 
@@ -107,6 +109,8 @@
     }
   }
 
+  intptr_t bytes_promoted() { return bytes_promoted_; }
+
  private:
   void UpdateStoreBuffer(RawObject** p, RawObject* obj) {
     uword ptr = reinterpret_cast<uword>(p);
@@ -175,14 +179,30 @@
         //
         // This object is a survivor of a previous scavenge. Attempt to promote
         // the object.
-        new_addr = heap_->TryAllocate(size, Heap::kOld);
+        new_addr = heap_->TryAllocate(size, Heap::kOld, growth_policy_);
         if (new_addr != 0) {
           // If promotion succeeded then we need to remember it so that it can
           // be traversed later.
           scavenger_->PushToPromotedStack(new_addr);
-        } else {
-          // Promotion did not succeed. Copy into the to space instead.
+          bytes_promoted_ += size;
+        } else if (!scavenger_->had_promotion_failure_) {
+          // Signal a promotion failure and set the growth policy for
+          // this, and all subsequent promotion allocations, to force
+          // growth.
           scavenger_->had_promotion_failure_ = true;
+          growth_policy_ = PageSpace::kForceGrowth;
+          new_addr = heap_->TryAllocate(size, Heap::kOld, growth_policy_);
+          if (new_addr != 0) {
+            scavenger_->PushToPromotedStack(new_addr);
+            bytes_promoted_ += size;
+          } else {
+            // Promotion did not succeed. Copy into the to space
+            // instead.
+            new_addr = scavenger_->TryAllocate(size);
+          }
+        } else {
+          ASSERT(growth_policy_ == PageSpace::kForceGrowth);
+          // Promotion did not succeed. Copy into the to space instead.
           new_addr = scavenger_->TryAllocate(size);
         }
       }
@@ -211,6 +231,8 @@
   typedef std::multimap<RawObject*, RawWeakProperty*> DelaySet;
   DelaySet delay_set_;
   GrowableArray<RawObject*> delayed_weak_stack_;
+  PageSpace::GrowthPolicy growth_policy_;
+  intptr_t bytes_promoted_;
 
   bool visiting_old_pointers_;
   bool in_scavenge_pointer_;
@@ -615,6 +637,9 @@
   }
   Timer timer(FLAG_verbose_gc, "Scavenge");
   timer.Start();
+
+  intptr_t in_use_before = in_use();
+
   // Setup the visitor and run a scavenge.
   ScavengerVisitor visitor(isolate, this);
   Prologue(isolate, invoke_api_callbacks);
@@ -627,10 +652,17 @@
   ProcessPeerReferents();
   Epilogue(isolate, invoke_api_callbacks);
   timer.Stop();
+
   if (FLAG_verbose_gc) {
-    OS::PrintErr("Scavenge[%d]: %"Pd64"us\n",
+    const intptr_t KB2 = KB / 2;
+    OS::PrintErr("Scavenge[%d]: %"Pd64"us (%"Pd"K -> %"Pd"K, %"Pd"K)\n"
+                 "Promoted %"Pd"K\n",
                  count_,
-                 timer.TotalElapsedTime());
+                 timer.TotalElapsedTime(),
+                 (in_use_before + KB2) / KB,
+                 (in_use() + KB2) / KB,
+                 (capacity() + KB2) / KB,
+                 (visitor.bytes_promoted() + KB2) / KB);
   }
 
   if (FLAG_verify_after_gc) {
diff --git a/runtime/vm/scopes.cc b/runtime/vm/scopes.cc
index 27b1ef8..588587c 100644
--- a/runtime/vm/scopes.cc
+++ b/runtime/vm/scopes.cc
@@ -460,7 +460,12 @@
       context_scope.SetTokenIndexAt(captured_idx, variable->token_pos());
       context_scope.SetNameAt(captured_idx, variable->name());
       context_scope.SetIsFinalAt(captured_idx, variable->is_final());
-      context_scope.SetTypeAt(captured_idx, variable->type());
+      context_scope.SetIsConstAt(captured_idx, variable->IsConst());
+      if (variable->IsConst()) {
+        context_scope.SetConstValueAt(captured_idx, *variable->ConstValue());
+      } else {
+        context_scope.SetTypeAt(captured_idx, variable->type());
+      }
       context_scope.SetContextIndexAt(captured_idx, variable->index());
       // Adjust the context level relative to the current context level,
       // since the context of the current scope will be at level 0 when
@@ -482,10 +487,18 @@
   LocalScope* outer_scope = new LocalScope(NULL, -1, 0);
   // Add all variables as aliases to the outer scope.
   for (int i = 0; i < context_scope.num_variables(); i++) {
-    LocalVariable* variable =
-        new LocalVariable(context_scope.TokenIndexAt(i),
-                          String::ZoneHandle(context_scope.NameAt(i)),
-                          AbstractType::ZoneHandle(context_scope.TypeAt(i)));
+    LocalVariable* variable;
+    if (context_scope.IsConstAt(i)) {
+      variable = new LocalVariable(context_scope.TokenIndexAt(i),
+          String::ZoneHandle(context_scope.NameAt(i)),
+          AbstractType::ZoneHandle(Type::DynamicType()));
+      variable->SetConstValue(
+          Instance::ZoneHandle(context_scope.ConstValueAt(i)));
+    } else {
+      variable = new LocalVariable(context_scope.TokenIndexAt(i),
+          String::ZoneHandle(context_scope.NameAt(i)),
+          AbstractType::ZoneHandle(context_scope.TypeAt(i)));
+    }
     variable->set_is_captured();
     variable->set_index(context_scope.ContextIndexAt(i));
     if (context_scope.IsFinalAt(i)) {
@@ -516,6 +529,7 @@
   context_scope.SetTokenIndexAt(0, func.token_pos());
   context_scope.SetNameAt(0, name);
   context_scope.SetIsFinalAt(0, true);
+  context_scope.SetIsConstAt(0, false);
   const AbstractType& type = AbstractType::Handle(func.ParameterTypeAt(0));
   context_scope.SetTypeAt(0, type);
   context_scope.SetContextIndexAt(0, 0);
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index 75f837c..65f0132 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -28,6 +28,7 @@
       name_(name),
       owner_(NULL),
       type_(type),
+      const_value_(NULL),
       is_final_(false),
       is_captured_(false),
       is_invisible_(false),
@@ -71,6 +72,20 @@
     is_invisible_ = value;
   }
 
+  bool IsConst() const {
+    return const_value_ != NULL;
+  }
+
+  void SetConstValue(const Instance& value) {
+    ASSERT(value.IsZoneHandle());
+    const_value_ = &value;
+  }
+
+  const Instance* ConstValue() const {
+    ASSERT(IsConst());
+    return const_value_;
+  }
+
   bool Equals(const LocalVariable& other) const;
 
   // Map the frame index to a bit-vector index.  Assumes the variable is
@@ -88,6 +103,8 @@
 
   const AbstractType& type_;  // Declaration type of local variable.
 
+  const Instance* const_value_;   // NULL or compile-time const value.
+
   bool is_final_;  // If true, this variable is readonly.
   bool is_captured_;  // If true, this variable lives in the context, otherwise
                       // in the stack frame.
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index e966889..c11e321 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -9,6 +9,7 @@
 #include "vm/bootstrap.h"
 #include "vm/exceptions.h"
 #include "vm/heap.h"
+#include "vm/longjump.h"
 #include "vm/object.h"
 #include "vm/object_store.h"
 #include "vm/snapshot_ids.h"
@@ -37,7 +38,7 @@
 
 static bool IsObjectStoreTypeId(intptr_t index) {
   // Check if this is a type which is stored in the object store.
-  return (index >= kObjectType && index <= kListInterface);
+  return (index >= kObjectType && index <= kArrayType);
 }
 
 
@@ -67,8 +68,8 @@
     case kDoubleType: return object_store->double_type();
     case kIntType: return object_store->int_type();
     case kBoolType: return object_store->bool_type();
-    case kStringInterface: return object_store->string_interface();
-    case kListInterface: return object_store->list_interface();
+    case kStringType: return object_store->string_type();
+    case kArrayType: return object_store->array_type();
     default: break;
   }
   UNREACHABLE();
@@ -100,10 +101,10 @@
     return kIntType;
   } else if (raw_type == object_store->bool_type()) {
     return kBoolType;
-  } else if (raw_type == object_store->string_interface()) {
-    return kStringInterface;
-  } else if (raw_type == object_store->list_interface()) {
-    return kListInterface;
+  } else if (raw_type == object_store->string_type()) {
+    return kStringType;
+  } else if (raw_type == object_store->array_type()) {
+    return kArrayType;
   }
   return kInvalidIndex;
 }
@@ -740,6 +741,21 @@
 }
 
 
+SnapshotWriter::SnapshotWriter(Snapshot::Kind kind,
+               uint8_t** buffer,
+               ReAlloc alloc,
+               intptr_t increment_size)
+    : BaseWriter(buffer, alloc, increment_size),
+      kind_(kind),
+      object_store_(Isolate::Current()->object_store()),
+      class_table_(Isolate::Current()->class_table()),
+      forward_list_(),
+      exception_type_(Exceptions::kNone),
+      exception_msg_(NULL),
+      error_(LanguageError::Handle()) {
+}
+
+
 void SnapshotWriter::WriteObject(RawObject* rawobj) {
   WriteObjectImpl(rawobj);
   WriteForwardedObjects();
@@ -800,7 +816,14 @@
   intptr_t class_id = cls->ptr()->id_;
   ASSERT(class_id == raw->GetClassId());
   if (class_id >= kNumPredefinedCids) {
-    ASSERT(!Class::IsSignatureClass(cls));
+    if (Class::IsSignatureClass(cls)) {
+      // We do not allow closure objects in an isolate message.
+      set_exception_type(Exceptions::kArgumentError);
+      // TODO(6726): Allocate these constant strings once in the VM isolate.
+      set_exception_msg("Illegal argument in isolate message"
+                        " : (object is a closure)");
+      Isolate::Current()->long_jump_base()->Jump(1, *ErrorHandle());
+    }
     // Object is being referenced, add it to the forward ref list and mark
     // it so that future references to this object in the snapshot will use
     // this object id. Mark it as not having been serialized yet so that we
@@ -885,19 +908,36 @@
   ObjectStore* object_store = isolate->object_store();
   ASSERT(object_store != NULL);
 
-  // Reserve space in the output buffer for a snapshot header.
-  ReserveHeader();
+  // Setup for long jump in case there is an exception while writing
+  // the snapshot.
+  LongJump* base = isolate->long_jump_base();
+  LongJump jump;
+  isolate->set_long_jump_base(&jump);
+  // TODO(6726): Allocate these constant strings once in the VM isolate.
+  *ErrorHandle() = LanguageError::New(
+      String::Handle(String::New("Error while writing full snapshot")));
+  if (setjmp(*jump.Set()) == 0) {
+    NoGCScope no_gc;
 
-  // Write out all the objects in the object store of the isolate which
-  // is the root set for all dart allocated objects at this point.
-  SnapshotWriterVisitor visitor(this, false);
-  object_store->VisitObjectPointers(&visitor);
+    // Reserve space in the output buffer for a snapshot header.
+    ReserveHeader();
 
-  // Write out all forwarded objects.
-  WriteForwardedObjects();
+    // Write out all the objects in the object store of the isolate which
+    // is the root set for all dart allocated objects at this point.
+    SnapshotWriterVisitor visitor(this, false);
+    object_store->VisitObjectPointers(&visitor);
 
-  FillHeader(kind());
-  UnmarkAll();
+    // Write out all forwarded objects.
+    WriteForwardedObjects();
+
+    FillHeader(kind());
+    UnmarkAll();
+
+    isolate->set_long_jump_base(base);
+  } else {
+    isolate->set_long_jump_base(base);
+    ThrowException(exception_type(), exception_msg());
+  }
 }
 
 
@@ -1031,11 +1071,24 @@
   intptr_t class_id = cls->ptr()->id_;
 
   if (class_id >= kNumPredefinedCids) {
-    ASSERT(!Class::IsSignatureClass(cls));
+    if (Class::IsSignatureClass(cls)) {
+      // We do not allow closure objects in an isolate message.
+      set_exception_type(Exceptions::kArgumentError);
+      // TODO(6726): Allocate these constant strings once in the VM isolate.
+      set_exception_msg("Illegal argument in isolate message"
+                        " : (object is a closure)");
+      Isolate::Current()->long_jump_base()->Jump(1, *ErrorHandle());
+    }
+    if (cls->ptr()->num_native_fields_ != 0) {
+      // We do not allow objects with native fields in an isolate message.
+      set_exception_type(Exceptions::kArgumentError);
+      // TODO(6726): Allocate these constant strings once in the VM isolate.
+      set_exception_msg("Illegal argument in isolate message"
+                        " : (object extends NativeWrapper)");
+
+      Isolate::Current()->long_jump_base()->Jump(1, *ErrorHandle());
+    }
     // Object is regular dart instance.
-    // TODO(5411462): figure out what we need to do if an object with native
-    // fields is serialized (throw exception or serialize a null object).
-    ASSERT(cls->ptr()->num_native_fields_ == 0);
     intptr_t instance_size = cls->ptr()->instance_size_;
     ASSERT(instance_size != 0);
 
@@ -1148,14 +1201,42 @@
 }
 
 
+void SnapshotWriter::ThrowException(Exceptions::ExceptionType type,
+                                    const char* msg) {
+  Isolate::Current()->object_store()->clear_sticky_error();
+  UnmarkAll();
+  const String& msg_obj = String::Handle(String::New(msg));
+  GrowableArray<const Object*> args(1);
+  args.Add(&msg_obj);
+  Exceptions::ThrowByType(type, args);
+  UNREACHABLE();
+}
+
+
 void ScriptSnapshotWriter::WriteScriptSnapshot(const Library& lib) {
   ASSERT(kind() == Snapshot::kScript);
+  Isolate* isolate = Isolate::Current();
+  ASSERT(isolate != NULL);
 
-  // Write out the library object.
-  ReserveHeader();
-  WriteObject(lib.raw());
-  FillHeader(kind());
-  UnmarkAll();
+  // Setup for long jump in case there is an exception while writing
+  // the snapshot.
+  LongJump* base = isolate->long_jump_base();
+  LongJump jump;
+  isolate->set_long_jump_base(&jump);
+  *ErrorHandle() = LanguageError::New(
+      String::Handle(String::New("Error while writing script snapshot")));
+  if (setjmp(*jump.Set()) == 0) {
+    // Write out the library object.
+    NoGCScope no_gc;
+    ReserveHeader();
+    WriteObject(lib.raw());
+    FillHeader(kind());
+    UnmarkAll();
+    isolate->set_long_jump_base(base);
+  } else {
+    isolate->set_long_jump_base(base);
+    ThrowException(exception_type(), exception_msg());
+  }
 }
 
 
@@ -1173,8 +1254,25 @@
 
 void MessageWriter::WriteMessage(const Object& obj) {
   ASSERT(kind() == Snapshot::kMessage);
-  WriteObject(obj.raw());
-  UnmarkAll();
+  Isolate* isolate = Isolate::Current();
+  ASSERT(isolate != NULL);
+
+  // Setup for long jump in case there is an exception while writing
+  // the message.
+  LongJump* base = isolate->long_jump_base();
+  LongJump jump;
+  isolate->set_long_jump_base(&jump);
+  *ErrorHandle() = LanguageError::New(
+      String::Handle(String::New("Error while writing message")));
+  if (setjmp(*jump.Set()) == 0) {
+    NoGCScope no_gc;
+    WriteObject(obj.raw());
+    UnmarkAll();
+    isolate->set_long_jump_base(base);
+  } else {
+    isolate->set_long_jump_base(base);
+    ThrowException(exception_type(), exception_msg());
+  }
 }
 
 
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index fba122a..378a7bd 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -9,6 +9,7 @@
 #include "vm/allocation.h"
 #include "vm/bitfield.h"
 #include "vm/datastream.h"
+#include "vm/exceptions.h"
 #include "vm/globals.h"
 #include "vm/growable_array.h"
 #include "vm/isolate.h"
@@ -25,6 +26,7 @@
 class ExternalUint8Array;
 class GrowableObjectArray;
 class Heap;
+class LanguageError;
 class Library;
 class Object;
 class ObjectStore;
@@ -426,13 +428,7 @@
   SnapshotWriter(Snapshot::Kind kind,
                  uint8_t** buffer,
                  ReAlloc alloc,
-                 intptr_t increment_size)
-      : BaseWriter(buffer, alloc, increment_size),
-        kind_(kind),
-        object_store_(Isolate::Current()->object_store()),
-        class_table_(Isolate::Current()->class_table()),
-        forward_list_() {
-  }
+                 intptr_t increment_size);
 
  public:
   // Snapshot kind.
@@ -443,6 +439,19 @@
 
   uword GetObjectTags(RawObject* raw);
 
+  Exceptions::ExceptionType exception_type() const {
+    return exception_type_;
+  }
+  void set_exception_type(Exceptions::ExceptionType type) {
+    exception_type_ = type;
+  }
+  const char* exception_msg() const { return exception_msg_; }
+  void set_exception_msg(const char* msg) {
+    exception_msg_ = msg;
+  }
+  LanguageError* ErrorHandle() { return &error_; }
+  void ThrowException(Exceptions::ExceptionType type, const char* msg);
+
  protected:
   class ForwardObjectNode : public ZoneAllocated {
    public:
@@ -486,9 +495,13 @@
   ObjectStore* object_store_;  // Object store for common classes.
   ClassTable* class_table_;  // Class table for the class index to class lookup.
   GrowableArray<ForwardObjectNode*> forward_list_;
+  Exceptions::ExceptionType exception_type_;  // Exception type.
+  const char* exception_msg_;  // Message associated with exception.
+  LanguageError& error_;  // Error handle.
 
   friend class RawArray;
   friend class RawClass;
+  friend class RawClosureData;
   friend class RawGrowableObjectArray;
   friend class RawImmutableArray;
   friend class RawJSRegExp;
diff --git a/runtime/vm/snapshot_ids.h b/runtime/vm/snapshot_ids.h
index 64efd56..963a83b 100644
--- a/runtime/vm/snapshot_ids.h
+++ b/runtime/vm/snapshot_ids.h
@@ -32,8 +32,8 @@
   kDoubleType,
   kIntType,
   kBoolType,
-  kStringInterface,
-  kListInterface,
+  kStringType,
+  kArrayType,
 
   kInstanceObjectId,
   kMaxPredefinedObjectIds,
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index d0e57de..083b28f 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -11,6 +11,7 @@
 #include "vm/dart_api_state.h"
 #include "vm/snapshot.h"
 #include "vm/symbols.h"
+#include "vm/unicode.h"
 #include "vm/unit_test.h"
 
 namespace dart {
@@ -497,13 +498,12 @@
 }
 
 
-TEST_CASE(SerializeString) {
+static void TestString(const char* cstr) {
   StackZone zone(Isolate::Current());
-
+  EXPECT(Utf8::IsValid(reinterpret_cast<const uint8_t*>(cstr), strlen(cstr)));
   // Write snapshot with object content.
   uint8_t* buffer;
   MessageWriter writer(&buffer, &zone_allocator);
-  static const char* cstr = "This string shall be serialized";
   String& str = String::Handle(String::New(cstr));
   writer.WriteMessage(str);
   intptr_t buffer_len = writer.BytesWritten();
@@ -525,6 +525,21 @@
 }
 
 
+TEST_CASE(SerializeString) {
+  TestString("This string shall be serialized");
+  TestString("æøå");  // This file is UTF-8 encoded.
+  char data[] = {0x01,
+                 0x7f,
+                 0xc2, 0x80,         // 0x80
+                 0xdf, 0xbf,         // 0x7ff
+                 0xe0, 0xa0, 0x80,   // 0x800
+                 0xef, 0xbf, 0xbf,   // 0xffff
+                 0x00};              // String termination.
+  TestString(data);
+  // TODO(sgjesse): Add tests with non-BMP characters.
+}
+
+
 TEST_CASE(SerializeArray) {
   StackZone zone(Isolate::Current());
 
@@ -867,11 +882,6 @@
   EXPECT(!lib.IsNull());
   IterateScripts(lib);
 
-  // Check core impl lib.
-  lib = Library::CoreImplLibrary();
-  EXPECT(!lib.IsNull());
-  IterateScripts(lib);
-
   // Check isolate lib.
   lib = Library::IsolateLibrary();
   EXPECT(!lib.IsNull());
@@ -1255,9 +1265,12 @@
       "getBigint() {\n"
       "  return -0x424242424242424242424242424242424242;\n"
       "}\n"
-      "getString() {\n"
+      "getAsciiString() {\n"
       "  return \"Hello, world!\";\n"
       "}\n"
+      "getNonAsciiString() {\n"
+      "  return \"Blåbærgrød\";\n"
+      "}\n"
       "getList() {\n"
       "  return new List(kArrayLength);\n"
       "}\n";
@@ -1276,10 +1289,15 @@
   Dart_Handle bigint_result;
   bigint_result = Dart_Invoke(lib, NewString("getBigint"), 0, NULL);
   EXPECT_VALID(bigint_result);
-  Dart_Handle string_result;
-  string_result = Dart_Invoke(lib, NewString("getString"), 0, NULL);
-  EXPECT_VALID(string_result);
-  EXPECT(Dart_IsString(string_result));
+  Dart_Handle ascii_string_result;
+  ascii_string_result = Dart_Invoke(lib, NewString("getAsciiString"), 0, NULL);
+  EXPECT_VALID(ascii_string_result);
+  EXPECT(Dart_IsString(ascii_string_result));
+  Dart_Handle non_ascii_string_result;
+  non_ascii_string_result =
+      Dart_Invoke(lib, NewString("getNonAsciiString"), 0, NULL);
+  EXPECT_VALID(non_ascii_string_result);
+  EXPECT(Dart_IsString(non_ascii_string_result));
 
   {
     DARTSCOPE_NOCHECKS(isolate);
@@ -1326,7 +1344,7 @@
       uint8_t* buffer;
       MessageWriter writer(&buffer, &zone_allocator);
       String& str = String::Handle();
-      str ^= Api::UnwrapHandle(string_result);
+      str ^= Api::UnwrapHandle(ascii_string_result);
       writer.WriteMessage(str);
       intptr_t buffer_len = writer.BytesWritten();
 
@@ -1339,6 +1357,24 @@
       EXPECT_STREQ("Hello, world!", root->value.as_string);
       CheckEncodeDecodeMessage(root);
     }
+    {
+      StackZone zone(Isolate::Current());
+      uint8_t* buffer;
+      MessageWriter writer(&buffer, &zone_allocator);
+      String& str = String::Handle();
+      str ^= Api::UnwrapHandle(non_ascii_string_result);
+      writer.WriteMessage(str);
+      intptr_t buffer_len = writer.BytesWritten();
+
+      // Read object back from the snapshot into a C structure.
+      ApiNativeScope scope;
+      ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+      Dart_CObject* root = api_reader.ReadMessage();
+      EXPECT_NOTNULL(root);
+      EXPECT_EQ(Dart_CObject::kString, root->type);
+      EXPECT_STREQ("Blåbærgrød", root->value.as_string);
+      CheckEncodeDecodeMessage(root);
+    }
   }
   Dart_ExitScope();
   Dart_ShutdownIsolate();
@@ -2018,7 +2054,7 @@
       "  var exception = '';\n"
       "  var port = new ReceivePort();\n"
       "  port.receive((message, replyTo) {\n"
-      "    if (messageCount < 7) {\n"
+      "    if (messageCount < 8) {\n"
       "      exception = '$exception${message}';\n"
       "    } else {\n"
       "      exception = '$exception${message.length}';\n"
@@ -2027,7 +2063,7 @@
       "      }\n"
       "    }\n"
       "    messageCount++;\n"
-      "    if (messageCount == 8) throw new Exception(exception);\n"
+      "    if (messageCount == 9) throw new Exception(exception);\n"
       "  });\n"
       "  return port.toSendPort();\n"
       "}\n";
@@ -2066,6 +2102,16 @@
   object.value.as_string = const_cast<char*>("456");
   EXPECT(Dart_PostCObject(send_port_id, &object));
 
+  object.type = Dart_CObject::kString;
+  object.value.as_string = const_cast<char*>("æøå");
+  EXPECT(Dart_PostCObject(send_port_id, &object));
+
+  // Try to post an invalid UTF-8 sequence (lead surrogate).
+  char data[] = {0xed, 0xa0, 0x80, 0};  // 0xd800
+  object.type = Dart_CObject::kString;
+  object.value.as_string = const_cast<char*>(data);
+  EXPECT(!Dart_PostCObject(send_port_id, &object));
+
   object.type = Dart_CObject::kDouble;
   object.value.as_double = 3.14;
   EXPECT(Dart_PostCObject(send_port_id, &object));
@@ -2096,7 +2142,7 @@
   result = Dart_RunLoop();
   EXPECT(Dart_IsError(result));
   EXPECT(Dart_ErrorHasException(result));
-  EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n",
+  EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n",
                    Dart_GetError(result));
 
   Dart_ExitScope();
diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart
index 02fbb19..2ba9fa2 100644
--- a/runtime/vm/snapshot_test.dart
+++ b/runtime/vm/snapshot_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("dart:isolate");
+import 'dart:isolate';
 
 class Fields {
   Fields(int i, int j) : fld1 = i, fld2 = j, fld5 = true {}
@@ -115,7 +115,7 @@
 
   void push(int pile, TowersDisk disk) {
     TowersDisk top = piles[pile];
-    if ((top !== null) && (disk.size >= top.size))
+    if ((top != null) && (disk.size >= top.size))
       Error.error("Cannot put a big disk on a smaller disk.");
     disk.next = top;
     piles[pile] = disk;
@@ -123,7 +123,7 @@
 
   TowersDisk pop(int pile) {
     var top = piles[pile];
-    if (top === null)
+    if (top == null)
       Error.error("Attempting to remove a disk from an empty pile.");
     piles[pile] = top.next;
     top.next = null;
@@ -526,10 +526,10 @@
 
   void insert(int n) {
     if (n < value) {
-      if (left === null) left = new TreeNodePress(n);
+      if (left == null) left = new TreeNodePress(n);
       else left.insert(n);
     } else {
-      if (right === null) right = new TreeNodePress(n);
+      if (right == null) right = new TreeNodePress(n);
       else right.insert(n);
     }
   }
@@ -539,8 +539,8 @@
     TreeNodePress right = this.right;
     int value = this.value;
 
-    return ((left === null) || ((left.value < value) && left.check())) &&
-           ((right === null) || ((right.value >= value) && right.check()));
+    return ((left == null) || ((left.value < value) && left.check())) &&
+           ((right == null) || ((right.value >= value) && right.check()));
   }
 }
 
@@ -610,8 +610,8 @@
   static bool isShorter(ListElement x, ListElement y) {
     ListElement xTail = x;
     ListElement yTail = y;
-    while (yTail !== null) {
-      if (xTail === null) return true;
+    while (yTail != null) {
+      if (xTail == null) return true;
       xTail = xTail.next;
       yTail = yTail.next;
     }
@@ -1327,12 +1327,12 @@
       Expect.equals(true, sendObject is List);
       Expect.equals(true, replyObject is List);
       Expect.equals(sendObject.length, replyObject.length);
-      Expect.equals(true, replyObject[1] === replyObject);
-      Expect.equals(true, replyObject[3] === replyObject);
-      Expect.equals(true, replyObject[0] === replyObject[2][1]);
-      Expect.equals(true, replyObject[0] === replyObject[2][2]);
-      Expect.equals(true, replyObject[2] === replyObject[4][0]);
-      Expect.equals(true, replyObject[0][0] === replyObject[0][2]);
+      Expect.equals(true, identical(replyObject[1], replyObject));
+      Expect.equals(true, identical(replyObject[3], replyObject));
+      Expect.equals(true, identical(replyObject[0], replyObject[2][1]));
+      Expect.equals(true, identical(replyObject[0], replyObject[2][2]));
+      Expect.equals(true, identical(replyObject[2], replyObject[4][0]));
+      Expect.equals(true, identical(replyObject[0][0], replyObject[0][2]));
       // Bigint literals are not canonicalized so do a == check.
       Expect.equals(true, replyObject[0][3] == replyObject[4][4]);
     });
@@ -1454,7 +1454,7 @@
   }
 
   void notifyProcessedLine(LineProcessorClient client, int y, List<int> line) {
-    assert(_result[y] === null);
+    assert(_result[y] == null);
     _result[y] = line;
     _lineProcessedBy[y] = client;
 
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 4348fc6..b39e01b 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -42,8 +42,8 @@
 
 void FUNCTION_NAME(StackFrame_equals)(Dart_NativeArguments args) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
-  const Instance& expected = Instance::CheckedHandle(arguments->At(0));
-  const Instance& actual = Instance::CheckedHandle(arguments->At(1));
+  const Instance& expected = Instance::CheckedHandle(arguments->NativeArgAt(0));
+  const Instance& actual = Instance::CheckedHandle(arguments->NativeArgAt(1));
   if (!expected.Equals(actual)) {
     OS::Print("expected: '%s' actual: '%s'\n",
         expected.ToCString(), actual.ToCString());
diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h
index 9d309e7..ac02e84 100644
--- a/runtime/vm/stub_code.h
+++ b/runtime/vm/stub_code.h
@@ -55,7 +55,12 @@
   V(OneArgCheckInlineCache)                                                    \
   V(TwoArgsCheckInlineCache)                                                   \
   V(ThreeArgsCheckInlineCache)                                                 \
+  V(OneArgOptimizedCheckInlineCache)                                           \
+  V(TwoArgsOptimizedCheckInlineCache)                                          \
+  V(ThreeArgsOptimizedCheckInlineCache)                                        \
+  V(ClosureCallInlineCache)                                                    \
   V(MegamorphicCall)                                                           \
+  V(OptimizeFunction)                                                          \
   V(BreakpointDynamic)                                                         \
   V(EqualityWithNullArg)                                                       \
 
@@ -185,8 +190,8 @@
   static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
                                                 intptr_t num_args);
   static void GenerateUsageCounterIncrement(Assembler* assembler,
-                                            Register ic_reg,
                                             Register temp_reg);
+  static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 0210021..79badc1 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -25,6 +25,7 @@
 DEFINE_FLAG(bool, use_slow_path, false,
     "Set to true for debugging & verifying the slow paths.");
 DECLARE_FLAG(int, optimization_counter_threshold);
+DECLARE_FLAG(bool, trace_optimized_ic_calls);
 
 // Input parameters:
 //   ESP : points to return address.
@@ -36,7 +37,7 @@
 // Must preserve callee saved registers EDI and EBX.
 void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
   const intptr_t isolate_offset = NativeArguments::isolate_offset();
-  const intptr_t argc_offset = NativeArguments::argc_offset();
+  const intptr_t argc_tag_offset = NativeArguments::argc_tag_offset();
   const intptr_t argv_offset = NativeArguments::argv_offset();
   const intptr_t retval_offset = NativeArguments::retval_offset();
 
@@ -63,7 +64,9 @@
 
   // Pass NativeArguments structure by value and call runtime.
   __ movl(Address(ESP, isolate_offset), CTX);  // Set isolate in NativeArgs.
-  __ movl(Address(ESP, argc_offset), EDX);  // Set argc in NativeArguments.
+  // There are no runtime calls to closures, so we do not need to set the tag
+  // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_.
+  __ movl(Address(ESP, argc_tag_offset), EDX);  // Set argc in NativeArguments.
   __ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize));  // Compute argv.
   __ movl(Address(ESP, argv_offset), EAX);  // Set argv in NativeArguments.
   __ addl(EAX, Immediate(1 * kWordSize));  // Retval is next to 1st argument.
@@ -113,16 +116,15 @@
 //   ESP : points to return address.
 //   ESP + 4 : address of return value.
 //   EAX : address of first argument in argument array.
-//   EAX - 4*EDX + 4 : address of last argument in argument array.
 //   ECX : address of the native function to call.
-//   EDX : number of arguments to the call.
+//   EDX : argc_tag including number of arguments and function kind.
 // Uses EDI.
 void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
   const intptr_t native_args_struct_offset = kWordSize;
   const intptr_t isolate_offset =
       NativeArguments::isolate_offset() + native_args_struct_offset;
-  const intptr_t argc_offset =
-      NativeArguments::argc_offset() + native_args_struct_offset;
+  const intptr_t argc_tag_offset =
+      NativeArguments::argc_tag_offset() + native_args_struct_offset;
   const intptr_t argv_offset =
       NativeArguments::argv_offset() + native_args_struct_offset;
   const intptr_t retval_offset =
@@ -153,7 +155,7 @@
 
   // Pass NativeArguments structure by value and call native function.
   __ movl(Address(ESP, isolate_offset), CTX);  // Set isolate in NativeArgs.
-  __ movl(Address(ESP, argc_offset), EDX);  // Set argc in NativeArguments.
+  __ movl(Address(ESP, argc_tag_offset), EDX);  // Set argc in NativeArguments.
   __ movl(Address(ESP, argv_offset), EAX);  // Set argv in NativeArguments.
   __ leal(EAX, Address(EBP, 2 * kWordSize));  // Compute return value addr.
   __ movl(Address(ESP, retval_offset), EAX);  // Set retval in NativeArguments.
@@ -734,10 +736,10 @@
 
 // Input parameters:
 //   EDX: Arguments descriptor array (num_args is first Smi element, closure
-//        object is not included in num_args).
-// Note: The closure object is pushed before the first argument to the function
-//       being called, the stub accesses the closure from this location directly
-//       when setting up the context and resolving the entry point.
+//        object is included in num_args and is first argument).
+// Note: The closure object is the first argument to the function being
+//       called, the stub accesses the closure from this location directly
+//       when trying to resolve the call.
 // Uses EDI.
 void StubCode::GenerateCallClosureFunctionStub(Assembler* assembler) {
   const Immediate raw_null =
@@ -746,7 +748,7 @@
   // Total number of args is the first Smi in args descriptor array (EDX).
   __ movl(EAX, FieldAddress(EDX, Array::data_offset()));  // Load num_args.
   // Load closure object in EDI.
-  __ movl(EDI, Address(ESP, EAX, TIMES_2, kWordSize));  // EAX is a Smi.
+  __ movl(EDI, Address(ESP, EAX, TIMES_2, 0));  // EAX is a Smi.
 
   // Verify that EDI is a closure by checking its class.
   Label not_closure;
@@ -780,7 +782,7 @@
   AssemblerMacros::EnterStubFrame(assembler);
 
   __ pushl(EDX);  // Preserve arguments descriptor array.
-  __ pushl(ECX);
+  __ pushl(ECX);  // Preserve read-only function object argument.
   __ CallRuntime(kCompileFunctionRuntimeEntry);
   __ popl(ECX);  // Restore read-only function object argument in ECX.
   __ popl(EDX);  // Restore arguments descriptor array.
@@ -804,7 +806,7 @@
   // object, passing the non-closure object and its arguments array.
   // EDI: non-closure object.
   // EDX: arguments descriptor array (num_args is first Smi element, closure
-  //      object is not included in num_args).
+  //      object is included in num_args).
 
   // Create a stub frame as we are pushing some objects on the stack before
   // calling into the runtime.
@@ -815,6 +817,7 @@
     // Total number of args is the first Smi in args descriptor array (EDX).
   __ movl(EDI, FieldAddress(EDX, Array::data_offset()));  // Load num_args.
   __ SmiUntag(EDI);
+  __ subl(EDI, Immediate(1));  // Arguments array length, minus the closure.
   // See stack layout below explaining "wordSize * 5" offset.
   PushArgumentsArray(assembler, (kWordSize * 5));
 
@@ -1237,9 +1240,9 @@
     // EAX: new object start.
     // EBX: next object start.
     // EDX: class of the object to be allocated.
+    // EDI: new object type arguments (if is_cls_parameterized).
     // First try inlining the initialization without a loop.
-    if (instance_size < (kInlineInstanceSize * kWordSize) &&
-        cls.num_native_fields() == 0) {
+    if (instance_size < (kInlineInstanceSize * kWordSize)) {
       // Check if the object contains any non-header fields.
       // Small objects are initialized using a consecutive set of writes.
       for (intptr_t current_offset = sizeof(RawObject);
@@ -1250,31 +1253,11 @@
     } else {
       __ leal(ECX, Address(EAX, sizeof(RawObject)));
       // Loop until the whole object is initialized.
-      Label init_loop;
-      if (cls.num_native_fields() > 0) {
-        // Initialize native fields.
-        // EAX: new object.
-        // EBX: next object start.
-        // EDX: class of the object to be allocated.
-        // ECX: next word to be initialized.
-        intptr_t offset = Class::num_native_fields_offset() - kHeapObjectTag;
-        __ movl(EDX, Address(EDX, offset));
-        __ leal(EDX, Address(EAX, EDX, TIMES_4, sizeof(RawObject)));
-
-        // EDX: start of dart fields.
-        // ECX: next word to be initialized.
-        Label init_native_loop;
-        __ Bind(&init_native_loop);
-        __ cmpl(ECX, EDX);
-        __ j(ABOVE_EQUAL, &init_loop, Assembler::kNearJump);
-        __ movl(Address(ECX, 0), Immediate(0));
-        __ addl(ECX, Immediate(kWordSize));
-        __ jmp(&init_native_loop, Assembler::kNearJump);
-      }
-      // Now initialize the dart fields.
       // EAX: new object.
       // EBX: next object start.
       // ECX: next word to be initialized.
+      // EDI: new object type arguments (if is_cls_parameterized).
+      Label init_loop;
       Label done;
       __ Bind(&init_loop);
       __ cmpl(ECX, EBX);
@@ -1543,24 +1526,61 @@
 }
 
 
-// Loads function into 'temp_reg', preserves 'ic_reg'.
+void StubCode::GenerateOptimizedUsageCounterIncrement(Assembler* assembler) {
+  Register argdesc_reg = EDX;
+  Register ic_reg = ECX;
+  Register func_reg = EDI;
+  if (FLAG_trace_optimized_ic_calls) {
+    AssemblerMacros::EnterStubFrame(assembler);
+    __ pushl(func_reg);     // Preserve
+    __ pushl(argdesc_reg);  // Preserve.
+    __ pushl(ic_reg);       // Preserve.
+    __ pushl(ic_reg);       // Argument.
+    __ pushl(func_reg);     // Argument.
+    __ CallRuntime(kTraceICCallRuntimeEntry);
+    __ popl(EAX);          // Discard argument;
+    __ popl(EAX);          // Discard argument;
+    __ popl(ic_reg);       // Restore.
+    __ popl(argdesc_reg);  // Restore.
+    __ popl(func_reg);     // Restore.
+    __ LeaveFrame();
+  }
+  Label is_hot;
+  if (FlowGraphCompiler::CanOptimize()) {
+    ASSERT(FLAG_optimization_counter_threshold > 1);
+    __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
+        Immediate(FLAG_optimization_counter_threshold));
+    __ j(GREATER_EQUAL, &is_hot, Assembler::kNearJump);
+    // As long as VM has no OSR do not optimize in the middle of the function
+    // but only at exit so that we have collected all type feedback before
+    // optimizing.
+  }
+  __ incl(FieldAddress(func_reg, Function::usage_counter_offset()));
+  __ Bind(&is_hot);
+}
+
+
+
+// Loads function into 'temp_reg'.
 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler,
-                                             Register ic_reg,
                                              Register temp_reg) {
-  __ movl(temp_reg, FieldAddress(ic_reg, ICData::function_offset()));
+  Register ic_reg = ECX;
+  Register func_reg = temp_reg;
+  ASSERT(ic_reg != func_reg);
+  __ movl(func_reg, FieldAddress(ic_reg, ICData::function_offset()));
   Label is_hot;
   if (FlowGraphCompiler::CanOptimize()) {
     ASSERT(FLAG_optimization_counter_threshold > 1);
     // The usage_counter is always less than FLAG_optimization_counter_threshold
     // except when the function gets optimized.
-    __ cmpl(FieldAddress(temp_reg, Function::usage_counter_offset()),
+    __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
         Immediate(FLAG_optimization_counter_threshold));
     __ j(EQUAL, &is_hot, Assembler::kNearJump);
     // As long as VM has no OSR do not optimize in the middle of the function
     // but only at exit so that we have collected all type feedback before
     // optimizing.
   }
-  __ incl(FieldAddress(temp_reg, Function::usage_counter_offset()));
+  __ incl(FieldAddress(func_reg, Function::usage_counter_offset()));
   __ Bind(&is_hot);
 }
 
@@ -1634,8 +1654,8 @@
     __ movl(EAX, Address(ESP, EAX, TIMES_2, 0));
     __ call(&get_class_id_as_smi);
   }
-  // Each test entry has (1 + num_args) array elements.
-  const intptr_t entry_size = (num_args + 1) * kWordSize;
+
+  const intptr_t entry_size = ICData::TestEntryLengthFor(num_args) * kWordSize;
   __ addl(EBX, Immediate(entry_size));  // Next entry.
   __ movl(EDI, Address(EBX, 0));  // Next class ID.
 
@@ -1682,11 +1702,20 @@
   __ cmpl(EAX, raw_null);
   __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump);
   // NoSuchMethod or closure.
+  // Mark IC call that it may be a closure call that does not collect
+  // type feedback.
+  __ movb(FieldAddress(ECX, ICData::is_closure_call_offset()), Immediate(1));
   __ jmp(&StubCode::InstanceFunctionLookupLabel());
 
   __ Bind(&found);
-  // EBX: Pointer to an IC data check group (classes + target)
-  __ movl(EAX, Address(EBX, kWordSize * num_args));  // Target function.
+  // EBX: Pointer to an IC data check group.
+  const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize;
+  const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize;
+  __ movl(EAX, Address(EBX, target_offset));
+  __ addl(Address(EBX, count_offset), Immediate(Smi::RawValue(1)));
+  __ j(NO_OVERFLOW, &call_target_function);
+  __ movl(Address(EBX, count_offset),
+          Immediate(Smi::RawValue(Smi::kMaxValue)));
 
   __ Bind(&call_target_function);
   // EAX: Target function.
@@ -1723,27 +1752,67 @@
 //   - N classes.
 //   - 1 target function.
 void StubCode::GenerateOneArgCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, ECX, EBX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 1);
+  GenerateUsageCounterIncrement(assembler, EBX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
 }
 
 
 void StubCode::GenerateTwoArgsCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, ECX, EBX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 2);
+  GenerateUsageCounterIncrement(assembler, EBX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 2);
 }
 
 
 void StubCode::GenerateThreeArgsCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, ECX, EBX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 3);
+  GenerateUsageCounterIncrement(assembler, EBX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 3);
+}
+
+
+
+// Use inline cache data array to invoke the target or continue in inline
+// cache miss handler. Stub for 1-argument check (receiver class).
+//  EDI: function which counter needs to be incremented.
+//  ECX: Inline cache data object.
+//  EDX: Arguments array.
+//  TOS(0): Return address.
+// Inline cache data object structure:
+// 0: function-name
+// 1: N, number of arguments checked.
+// 2 .. (length - 1): group of checks, each check containing:
+//   - N classes.
+//   - 1 target function.
+void StubCode::GenerateOneArgOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
+}
+
+
+void StubCode::GenerateTwoArgsOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 2);
+}
+
+
+void StubCode::GenerateThreeArgsOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 3);
+}
+
+
+// Do not count as no type feedback is collected.
+void StubCode::GenerateClosureCallInlineCacheStub(Assembler* assembler) {
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
 }
 
 
 // Megamorphic call is currently implemented as IC call but through a stub
 // that does not check/count function invocations.
 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) {
-  return GenerateNArgsCheckInlineCacheStub(assembler, 1);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
 }
 
 
@@ -1987,10 +2056,11 @@
 // EAX: result.
 // TODO(srdjan): Move to VM stubs once Boolean objects become VM objects.
 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) {
+  static const intptr_t kNumArgsTested = 2;
 #if defined(DEBUG)
   { Label ok;
     __ movl(EAX, FieldAddress(ECX, ICData::num_args_tested_offset()));
-    __ cmpl(EAX, Immediate(2));
+    __ cmpl(EAX, Immediate(kNumArgsTested));
     __ j(EQUAL, &ok, Assembler::kNearJump);
     __ Stop("Incorrect ICData for equality");
     __ Bind(&ok);
@@ -2003,7 +2073,7 @@
   __ leal(EBX, FieldAddress(EBX, Array::data_offset()));
   // EBX: points directly to the first ic data array element.
 
-  Label get_class_id_as_smi, no_match, loop, compute_result;
+  Label get_class_id_as_smi, no_match, loop, compute_result, found;
   __ Bind(&loop);
   // Check left.
   __ movl(EAX, Address(ESP, 2 * kWordSize));
@@ -2016,15 +2086,24 @@
   __ call(&get_class_id_as_smi);
   __ movl(EDI, Address(EBX, 1 * kWordSize));
   __ cmpl(EAX, EDI);  // Class id match?
-  __ j(EQUAL, &compute_result, Assembler::kNearJump);
+  __ j(EQUAL, &found, Assembler::kNearJump);
   __ Bind(&no_match);
-  // Each test entry has (1 + 2) array elements (2 arguments, 1 target).
-  __ addl(EBX, Immediate(kWordSize * (1 + 2)));  // Next element.
+  // Next check group.
+  __ addl(EBX, Immediate(
+      kWordSize * ICData::TestEntryLengthFor(kNumArgsTested)));
   __ cmpl(EDI, Immediate(Smi::RawValue(kIllegalCid)));  // Done?
   __ j(NOT_EQUAL, &loop, Assembler::kNearJump);
   Label update_ic_data;
   __ jmp(&update_ic_data);
 
+  __ Bind(&found);
+  const intptr_t count_offset =
+      ICData::CountIndexFor(kNumArgsTested) * kWordSize;
+  __ addl(Address(EBX, count_offset), Immediate(Smi::RawValue(1)));
+  __ j(NO_OVERFLOW, &compute_result);
+  __ movl(Address(EBX, count_offset),
+          Immediate(Smi::RawValue(Smi::kMaxValue)));
+
   __ Bind(&compute_result);
   Label true_label;
   __ movl(EAX, Address(ESP, 1 * kWordSize));
@@ -2068,6 +2147,20 @@
 }
 
 
+// Calls to runtime to ooptimized give function
+// EDX: function to be reoptimized.
+// EAX: result of function being optimized (preserved).
+void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
+  AssemblerMacros::EnterStubFrame(assembler);
+  __ pushl(EAX);
+  __ pushl(EDX);
+  __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
+  __ popl(EDX);
+  __ popl(EAX);
+  __ LeaveFrame();
+  __ ret();
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_IA32
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index a75461d..5048aa5 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -25,7 +25,7 @@
 DEFINE_FLAG(bool, use_slow_path, false,
     "Set to true for debugging & verifying the slow paths.");
 DECLARE_FLAG(int, optimization_counter_threshold);
-
+DECLARE_FLAG(bool, trace_optimized_ic_calls);
 
 // Input parameters:
 //   RSP : points to return address.
@@ -38,7 +38,7 @@
 void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
   ASSERT((R12 != CTX) && (R13 != CTX));
   const intptr_t isolate_offset = NativeArguments::isolate_offset();
-  const intptr_t argc_offset = NativeArguments::argc_offset();
+  const intptr_t argc_tag_offset = NativeArguments::argc_tag_offset();
   const intptr_t argv_offset = NativeArguments::argv_offset();
   const intptr_t retval_offset = NativeArguments::retval_offset();
 
@@ -65,7 +65,9 @@
 
   // Pass NativeArguments structure by value and call runtime.
   __ movq(Address(RSP, isolate_offset), CTX);  // Set isolate in NativeArgs.
-  __ movq(Address(RSP, argc_offset), R10);  // Set argc in NativeArguments.
+  // There are no runtime calls to closures, so we do not need to set the tag
+  // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_.
+  __ movq(Address(RSP, argc_tag_offset), R10);  // Set argc in NativeArguments.
   __ leaq(RAX, Address(RBP, R10, TIMES_8, 1 * kWordSize));  // Compute argv.
   __ movq(Address(RSP, argv_offset), RAX);  // Set argv in NativeArguments.
   __ addq(RAX, Immediate(1 * kWordSize));  // Retval is next to 1st argument.
@@ -115,15 +117,14 @@
 //   RSP : points to return address.
 //   RSP + 8 : address of return value.
 //   RAX : address of first argument in argument array.
-//   RAX - 8*R10 + 8 : address of last argument in argument array.
 //   RBX : address of the native function to call.
-//   R10 : number of arguments to the call.
+//   R10 : argc_tag including number of arguments and function kind.
 void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
   const intptr_t native_args_struct_offset = 0;
   const intptr_t isolate_offset =
       NativeArguments::isolate_offset() + native_args_struct_offset;
-  const intptr_t argc_offset =
-      NativeArguments::argc_offset() + native_args_struct_offset;
+  const intptr_t argc_tag_offset =
+      NativeArguments::argc_tag_offset() + native_args_struct_offset;
   const intptr_t argv_offset =
       NativeArguments::argv_offset() + native_args_struct_offset;
   const intptr_t retval_offset =
@@ -154,7 +155,7 @@
 
   // Pass NativeArguments structure by value and call native function.
   __ movq(Address(RSP, isolate_offset), CTX);  // Set isolate in NativeArgs.
-  __ movq(Address(RSP, argc_offset), R10);  // Set argc in NativeArguments.
+  __ movq(Address(RSP, argc_tag_offset), R10);  // Set argc in NativeArguments.
   __ movq(Address(RSP, argv_offset), RAX);  // Set argv in NativeArguments.
   __ leaq(RAX, Address(RBP, 2 * kWordSize));  // Compute return value addr.
   __ movq(Address(RSP, retval_offset), RAX);  // Set retval in NativeArguments.
@@ -718,10 +719,10 @@
 
 // Input parameters:
 //   R10: Arguments descriptor array (num_args is first Smi element, closure
-//        object is not included in num_args).
-// Note: The closure object is pushed before the first argument to the function
-//       being called, the stub accesses the closure from this location directly
-//       when setting up the context and resolving the entry point.
+//        object is included in num_args and is first argument).
+// Note: The closure object is the first argument to the function being
+//       called, the stub accesses the closure from this location directly
+//       when trying to resolve the call.
 void StubCode::GenerateCallClosureFunctionStub(Assembler* assembler) {
   const Immediate raw_null =
       Immediate(reinterpret_cast<intptr_t>(Object::null()));
@@ -729,7 +730,7 @@
   // Total number of args is the first Smi in args descriptor array (R10).
   __ movq(RAX, FieldAddress(R10, Array::data_offset()));  // Load num_args.
   // Load closure object in R13.
-  __ movq(R13, Address(RSP, RAX, TIMES_4, kWordSize));  // RAX is a Smi.
+  __ movq(R13, Address(RSP, RAX, TIMES_4, 0));  // RAX is a Smi.
 
   // Verify that R13 is a closure by checking its class.
   Label not_closure;
@@ -787,7 +788,7 @@
   // object, passing the non-closure object and its arguments array.
   // R13: non-closure object.
   // R10: arguments descriptor array (num_args is first Smi element, closure
-  //      object is not included in num_args).
+  //      object is included in num_args).
 
   // Create a stub frame as we are pushing some objects on the stack before
   // calling into the runtime.
@@ -798,6 +799,7 @@
     // Total number of args is the first Smi in args descriptor array (R10).
   __ movq(R13, FieldAddress(R10, Array::data_offset()));  // Load num_args.
   __ SmiUntag(R13);
+  __ subq(R13, Immediate(1));  // Arguments array length, minus the closure.
   // See stack layout below explaining "wordSize * 5" offset.
   PushArgumentsArray(assembler, (kWordSize * 5));
 
@@ -1218,9 +1220,9 @@
     // RAX: new object start.
     // RBX: next object start.
     // RDX: class of the object to be allocated.
+    // RDI: new object type arguments (if is_cls_parameterized).
     // First try inlining the initialization without a loop.
-    if (instance_size < (kInlineInstanceSize * kWordSize) &&
-        cls.num_native_fields() == 0) {
+    if (instance_size < (kInlineInstanceSize * kWordSize)) {
       // Check if the object contains any non-header fields.
       // Small objects are initialized using a consecutive set of writes.
       for (intptr_t current_offset = sizeof(RawObject);
@@ -1231,31 +1233,11 @@
     } else {
       __ leaq(RCX, Address(RAX, sizeof(RawObject)));
       // Loop until the whole object is initialized.
-      Label init_loop;
-      if (cls.num_native_fields() > 0) {
-        // Initialize native fields.
-        // RAX: new object.
-        // RBX: next object start.
-        // RDX: class of the object to be allocated.
-        // RCX: next word to be initialized.
-        intptr_t offset = Class::num_native_fields_offset() - kHeapObjectTag;
-        __ movq(RDX, Address(RDX, offset));
-        __ leaq(RDX, Address(RAX, RDX, TIMES_8, sizeof(RawObject)));
-
-        // RDX: start of dart fields.
-        // RCX: next word to be initialized.
-        Label init_native_loop;
-        __ Bind(&init_native_loop);
-        __ cmpq(RCX, RDX);
-        __ j(ABOVE_EQUAL, &init_loop, Assembler::kNearJump);
-        __ movq(Address(RCX, 0), Immediate(0));
-        __ addq(RCX, Immediate(kWordSize));
-        __ jmp(&init_native_loop, Assembler::kNearJump);
-      }
-      // Now initialize the dart fields.
       // RAX: new object.
       // RBX: next object start.
       // RCX: next word to be initialized.
+      // RDI: new object type arguments (if is_cls_parameterized).
+      Label init_loop;
       Label done;
       __ Bind(&init_loop);
       __ cmpq(RCX, RBX);
@@ -1523,24 +1505,60 @@
 }
 
 
+void StubCode::GenerateOptimizedUsageCounterIncrement(Assembler* assembler) {
+  Register argdesc_reg = R10;
+  Register ic_reg = RBX;
+  Register func_reg = RDI;
+  if (FLAG_trace_optimized_ic_calls) {
+    AssemblerMacros::EnterStubFrame(assembler);
+    __ pushq(func_reg);     // Preserve
+    __ pushq(argdesc_reg);  // Preserve.
+    __ pushq(ic_reg);       // Preserve.
+    __ pushq(ic_reg);       // Argument.
+    __ pushq(func_reg);     // Argument.
+    __ CallRuntime(kTraceICCallRuntimeEntry);
+    __ popq(RAX);          // Discard argument;
+    __ popq(RAX);          // Discard argument;
+    __ popq(ic_reg);       // Restore.
+    __ popq(argdesc_reg);  // Restore.
+    __ popq(func_reg);     // Restore.
+    __ LeaveFrame();
+  }
+  Label is_hot;
+  if (FlowGraphCompiler::CanOptimize()) {
+    ASSERT(FLAG_optimization_counter_threshold > 1);
+    __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
+        Immediate(FLAG_optimization_counter_threshold));
+    __ j(GREATER_EQUAL, &is_hot, Assembler::kNearJump);
+    // As long as VM has no OSR do not optimize in the middle of the function
+    // but only at exit so that we have collected all type feedback before
+    // optimizing.
+  }
+  __ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
+  __ Bind(&is_hot);
+}
+
+
 // Loads function into 'temp_reg', preserves 'ic_reg'.
 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler,
-                                             Register ic_reg,
                                              Register temp_reg) {
-  __ movq(temp_reg, FieldAddress(ic_reg, ICData::function_offset()));
+  Register ic_reg = RBX;
+  Register func_reg = temp_reg;
+  ASSERT(ic_reg != func_reg);
+  __ movq(func_reg, FieldAddress(ic_reg, ICData::function_offset()));
   Label is_hot;
   if (FlowGraphCompiler::CanOptimize()) {
     ASSERT(FLAG_optimization_counter_threshold > 1);
     // The usage_counter is always less than FLAG_optimization_counter_threshold
     // except when the function gets optimized.
-    __ cmpq(FieldAddress(temp_reg, Function::usage_counter_offset()),
+    __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
         Immediate(FLAG_optimization_counter_threshold));
     __ j(EQUAL, &is_hot, Assembler::kNearJump);
     // As long as VM has no OSR do not optimize in the middle of the function
     // but only at exit so that we have collected all type feedback before
     // optimizing.
   }
-  __ incq(FieldAddress(temp_reg, Function::usage_counter_offset()));
+  __ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
   __ Bind(&is_hot);
 }
 
@@ -1613,8 +1631,8 @@
     __ movq(RAX, Address(RSP, RAX, TIMES_4, 0));
     __ call(&get_class_id_as_smi);
   }
-  // Each test entry has (1 + num_args) array elements.
-  const intptr_t entry_size = (num_args + 1) * kWordSize;
+
+  const intptr_t entry_size = ICData::TestEntryLengthFor(num_args) * kWordSize;
   __ addq(R12, Immediate(entry_size));  // Next entry.
   __ movq(R13, Address(R12, 0));  // Next class ID.
 
@@ -1659,11 +1677,20 @@
   __ cmpq(RAX, raw_null);
   __ j(NOT_EQUAL, &call_target_function, Assembler::kNearJump);
   // NoSuchMethod or closure.
+  // Mark IC call that it may be a closure call that does not collect
+  // type feedback.
+  __ movb(FieldAddress(RBX, ICData::is_closure_call_offset()), Immediate(1));
   __ jmp(&StubCode::InstanceFunctionLookupLabel());
 
   __ Bind(&found);
-  // R12: Pointer to an IC data check group (classes + target)
-  __ movq(RAX, Address(R12, kWordSize * num_args));  // Target function.
+  // R12: Pointer to an IC data check group.
+  const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize;
+  const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize;
+  __ movq(RAX, Address(R12, target_offset));
+  __ addq(Address(R12, count_offset), Immediate(Smi::RawValue(1)));
+  __ j(NO_OVERFLOW, &call_target_function);
+  __ movq(Address(R12, count_offset),
+          Immediate(Smi::RawValue(Smi::kMaxValue)));
 
   __ Bind(&call_target_function);
   // RAX: Target function.
@@ -1699,26 +1726,65 @@
 //   - N classes.
 //   - 1 target function.
 void StubCode::GenerateOneArgCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, RBX, RCX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 1);
+  GenerateUsageCounterIncrement(assembler, RCX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
 }
 
 
 void StubCode::GenerateTwoArgsCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, RBX, RCX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 2);
+  GenerateUsageCounterIncrement(assembler, RCX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 2);
 }
 
 
 void StubCode::GenerateThreeArgsCheckInlineCacheStub(Assembler* assembler) {
-  GenerateUsageCounterIncrement(assembler, RBX, RCX);
-  return GenerateNArgsCheckInlineCacheStub(assembler, 3);
+  GenerateUsageCounterIncrement(assembler, RCX);
+  GenerateNArgsCheckInlineCacheStub(assembler, 3);
 }
 
+// Use inline cache data array to invoke the target or continue in inline
+// cache miss handler. Stub for 1-argument check (receiver class).
+//  RDI: function which counter needs to be incremented.
+//  RBX: Inline cache data object.
+//  RDX: Arguments array.
+//  TOS(0): Return address.
+// Inline cache data object structure:
+// 0: function-name
+// 1: N, number of arguments checked.
+// 2 .. (length - 1): group of checks, each check containing:
+//   - N classes.
+//   - 1 target function.
+void StubCode::GenerateOneArgOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
+}
+
+
+void StubCode::GenerateTwoArgsOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 2);
+}
+
+
+void StubCode::GenerateThreeArgsOptimizedCheckInlineCacheStub(
+    Assembler* assembler) {
+  GenerateOptimizedUsageCounterIncrement(assembler);
+  GenerateNArgsCheckInlineCacheStub(assembler, 3);
+}
+
+
+// Do not count as no type feedback is collected.
+void StubCode::GenerateClosureCallInlineCacheStub(Assembler* assembler) {
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
+}
+
+
 // Megamorphic call is currently implemented as IC call but through a stub
 // that does not check/count function invocations.
 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) {
-  return GenerateNArgsCheckInlineCacheStub(assembler, 1);
+  GenerateNArgsCheckInlineCacheStub(assembler, 1);
 }
 
 //  RBX: Function object.
@@ -1949,10 +2015,11 @@
 // RAX: result.
 // TODO(srdjan): Move to VM stubs once Boolean objects become VM objects.
 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) {
+  static const intptr_t kNumArgsTested = 2;
 #if defined(DEBUG)
   { Label ok;
     __ movq(RCX, FieldAddress(RBX, ICData::num_args_tested_offset()));
-    __ cmpq(RCX, Immediate(2));
+    __ cmpq(RCX, Immediate(kNumArgsTested));
     __ j(EQUAL, &ok, Assembler::kNearJump);
     __ Stop("Incorrect ICData for equality");
     __ Bind(&ok);
@@ -1965,7 +2032,7 @@
   __ leaq(R12, FieldAddress(R12, Array::data_offset()));
   // R12: points directly to the first ic data array element.
 
-  Label get_class_id_as_smi, no_match, loop, compute_result;
+  Label get_class_id_as_smi, no_match, loop, compute_result, found;
   __ Bind(&loop);
   // Check left.
   __ movq(RAX, Address(RSP, 2 * kWordSize));
@@ -1978,15 +2045,24 @@
   __ call(&get_class_id_as_smi);
   __ movq(R13, Address(R12, 1 * kWordSize));
   __ cmpq(RAX, R13);  // Class id match?
-  __ j(EQUAL, &compute_result, Assembler::kNearJump);
+  __ j(EQUAL, &found, Assembler::kNearJump);
   __ Bind(&no_match);
-  // Each test entry has (1 + 2) array elements (2 arguments, 1 target).
-  __ addq(R12, Immediate(kWordSize * (1 + 2)));  // Next element.
+  // Next check group.
+  __ addq(R12, Immediate(
+      kWordSize * ICData::TestEntryLengthFor(kNumArgsTested)));
   __ cmpq(R13, Immediate(Smi::RawValue(kIllegalCid)));  // Done?
   __ j(NOT_EQUAL, &loop, Assembler::kNearJump);
   Label update_ic_data;
   __ jmp(&update_ic_data);
 
+  __ Bind(&found);
+  const intptr_t count_offset =
+      ICData::CountIndexFor(kNumArgsTested) * kWordSize;
+  __ addq(Address(R12, count_offset), Immediate(Smi::RawValue(1)));
+  __ j(NO_OVERFLOW, &compute_result);
+  __ movq(Address(R12, count_offset),
+          Immediate(Smi::RawValue(Smi::kMaxValue)));
+
   __ Bind(&compute_result);
   Label true_label;
   __ movq(RAX, Address(RSP, 1 * kWordSize));
@@ -2029,6 +2105,20 @@
   __ jmp(&compute_result, Assembler::kNearJump);
 }
 
+// Calls to the runtime to optimize the given function.
+// RDX: function to be reoptimized.
+// RAX: result of function being optimized (preserved).
+void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
+  AssemblerMacros::EnterStubFrame(assembler);
+  __ pushq(RAX);
+  __ pushq(RDX);
+  __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
+  __ popq(RDX);
+  __ popq(RAX);
+  __ LeaveFrame();
+  __ ret();
+}
+
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_X64
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 3572964..33c0ac6 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -16,8 +16,6 @@
 
 RawString* Symbols::predefined_[Symbols::kMaxId];
 
-// Turn off population of symbols in the VM symbol table, so that we
-// don't find these symbols while doing a Symbols::New(...).
 static const char* names[] = {
   NULL,
 
@@ -41,15 +39,16 @@
   // Create and setup a symbol table in the vm isolate.
   SetupSymbolTable(isolate);
 
-  // Turn off population of symbols in the VM symbol table, so that we
-  // don't find these symbols while doing a Symbols::New(...).
   // Create all predefined symbols.
   ASSERT((sizeof(names) / sizeof(const char*)) == Symbols::kMaxId);
-  const Array& symbol_table =
-      Array::Handle(isolate->object_store()->symbol_table());
+  ObjectStore* object_store = isolate->object_store();
+  Array& symbol_table = Array::Handle();
   dart::String& str = String::Handle();
 
   for (intptr_t i = 1; i < Symbols::kMaxId; i++) {
+    // The symbol_table needs to be reloaded as it might have grown in the
+    // previous iteration.
+    symbol_table = object_store->symbol_table();
     str = OneByteString::New(names[i], Heap::kOld);
     Add(symbol_table, str);
     predefined_[i] = str.raw();
@@ -103,9 +102,9 @@
   if (len == 0) {
     return Symbols::New(reinterpret_cast<uint8_t*>(NULL), 0);
   }
-  if (type == Utf8::kAscii) {
+  if (type == Utf8::kLatin1) {
     uint8_t* characters = zone->Alloc<uint8_t>(len);
-    Utf8::DecodeToAscii(utf8_array, str_len, characters, len);
+    Utf8::DecodeToLatin1(utf8_array, str_len, characters, len);
     return New(characters, len);
   }
   ASSERT((type == Utf8::kBMP) || (type == Utf8::kSMP));
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 8fb33eb..16c1fd4 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -32,6 +32,7 @@
   V(Value, "value")                                                            \
   V(ExprTemp, ":expr_temp")                                                    \
   V(AnonymousClosure, "<anonymous closure>")                                   \
+  V(ClosureParameter, ":closure")                                              \
   V(PhaseParameter, ":phase")                                                  \
   V(TypeArgumentsParameter, ":type_arguments")                                 \
   V(AssertionError, "AssertionErrorImplementation")                            \
@@ -41,12 +42,11 @@
     "AbstractClassInstantiationErrorImplementation")                           \
   V(NoSuchMethodError, "NoSuchMethodErrorImplementation")                      \
   V(ThrowNew, "_throwNew")                                                     \
-  V(ListLiteralFactoryClass, "_ListLiteralFactory")                            \
-  V(ListLiteralFactory, "List.fromLiteral")                                    \
+  V(ListLiteralFactory, "List._fromLiteral")                                   \
   V(ListImplementation, "_ListImpl")                                           \
   V(ListFactory, "List.")                                                      \
-  V(MapLiteralFactoryClass, "_MapLiteralFactory")                              \
-  V(MapLiteralFactory, "Map.fromLiteral")                                      \
+  V(MapImplementation, "_HashMapImpl")                                         \
+  V(MapLiteralFactory, "Map._fromLiteral")                                     \
   V(ImmutableMap, "ImmutableMap")                                              \
   V(ImmutableMapConstructor, "ImmutableMap._create")                           \
   V(StringBase, "_StringBase")                                                 \
@@ -74,6 +74,8 @@
   V(InstantiatedTypeArguments, "InstantiatedTypeArguments")                    \
   V(PatchClass, "PatchClass")                                                  \
   V(Function, "Function")                                                      \
+  V(FunctionResult, "function result")                                         \
+  V(FactoryResult, "factory result")                                           \
   V(ClosureData, "ClosureData")                                                \
   V(RedirectionData, "RedirectionData")                                        \
   V(Field, "Field")                                                            \
@@ -113,7 +115,7 @@
   V(ExternalOneByteString, "_ExternalOneByteString")                           \
   V(ExternalTwoByteString, "_ExternalTwoByteString")                           \
   V(Stacktrace, "Stacktrace")                                                  \
-  V(JSSyntaxRegExp, "JSSyntaxRegExp")                                          \
+  V(JSSyntaxRegExp, "_JSSyntaxRegExp")                                         \
   V(Object, "Object")                                                          \
   V(_Int8Array, "_Int8Array")                                                  \
   V(_Uint8Array, "_Uint8Array")                                                \
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 31e794a..db850f4 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -39,18 +39,33 @@
   monitor->Enter();
   monitor->Exit();
 
-  {
+  const int kNumAttempts = 5;
+  int attempts = 0;
+  while (attempts < kNumAttempts) {
     MonitorLocker ml(monitor);
     int64_t start = OS::GetCurrentTimeMillis();
     int64_t wait_time = 2017;
     Monitor::WaitResult wait_result = ml.Wait(wait_time);
     int64_t stop = OS::GetCurrentTimeMillis();
+
+    // We expect to be timing out here.
     EXPECT_EQ(Monitor::kTimedOut, wait_result);
+
+    // Check whether this attempt falls within the exptected time limits.
+    int64_t wakeup_time = stop - start;
+    OS::Print("wakeup_time: %"Pd64"\n", wakeup_time);
     const int kAcceptableTimeJitter = 20;  // Measured in milliseconds.
-    EXPECT_LE(wait_time - kAcceptableTimeJitter, stop - start);
     const int kAcceptableWakeupDelay = 150;  // Measured in milliseconds.
-    EXPECT_GE(wait_time + kAcceptableWakeupDelay, stop - start);
+    if (((wait_time - kAcceptableTimeJitter) <= wakeup_time) &&
+        (wakeup_time <= (wait_time + kAcceptableWakeupDelay))) {
+      break;
+    }
+
+    // Record the attempt.
+    attempts++;
   }
+  EXPECT_LT(attempts, kNumAttempts);
+
   // The isolate shutdown and the destruction of the mutex are out-of-order on
   // purpose.
   isolate->Shutdown();
diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
index 42cd426..e2e741d8 100644
--- a/runtime/vm/unicode.cc
+++ b/runtime/vm/unicode.cc
@@ -58,8 +58,8 @@
 }
 
 
-static bool IsAsciiSequenceStart(uint8_t code_unit) {
-  // Check is codepoint is <= U+007F
+static bool IsLatin1SequenceStart(uint8_t code_unit) {
+  // Check is codepoint is <= U+00FF
   return (code_unit <= Utf8::kMaxOneByteChar);
 }
 
@@ -101,17 +101,17 @@
                               intptr_t array_len,
                               Type* type) {
   intptr_t len = 0;
-  Type char_type = kAscii;
+  Type char_type = kLatin1;
   for (intptr_t i = 0; i < array_len; i++) {
     uint8_t code_unit = utf8_array[i];
     if (!IsTrailByte(code_unit)) {
       ++len;
     }
-    if (!IsAsciiSequenceStart(code_unit)) {  // > U+007F
+    if (!IsLatin1SequenceStart(code_unit)) {  // > U+00FF
       if (IsSmpSequenceStart(code_unit)) {  // >= U+10000
         char_type = kSMP;
         ++len;
-      } else if (char_type == kAscii) {
+      } else if (char_type == kLatin1) {
         char_type = kBMP;
       }
     }
@@ -251,19 +251,26 @@
 }
 
 
-bool Utf8::DecodeToAscii(const uint8_t* utf8_array,
-                         intptr_t array_len,
-                         uint8_t* dst,
-                         intptr_t len) {
-  if (len < array_len) {
+bool Utf8::DecodeToLatin1(const uint8_t* utf8_array,
+                          intptr_t array_len,
+                          uint8_t* dst,
+                          intptr_t len) {
+  intptr_t i = 0;
+  intptr_t j = 0;
+  intptr_t num_bytes;
+  for (; (i < array_len) && (j < len); i += num_bytes, ++j) {
+    int32_t ch;
+    ASSERT(IsLatin1SequenceStart(utf8_array[i]));
+    num_bytes = Utf8::Decode(&utf8_array[i], (array_len - i), &ch);
+    if (ch == -1) {
+      return false;  // invalid input
+    }
+    ASSERT(ch <= 0xff);
+    dst[j] = ch;
+  }
+  if ((i < array_len) && (j == len)) {
     return false;  // output overflow
   }
-#ifdef DEBUG
-  for (intptr_t i = 0; i < array_len; i++) {
-    ASSERT(IsAsciiSequenceStart(utf8_array[i]));
-  }
-#endif
-  memmove(dst, utf8_array, array_len);
   return true;  // success
 }
 
diff --git a/runtime/vm/unicode.h b/runtime/vm/unicode.h
index ce572dc..28beaad 100644
--- a/runtime/vm/unicode.h
+++ b/runtime/vm/unicode.h
@@ -15,7 +15,7 @@
 class Utf8 : AllStatic {
  public:
   enum Type {
-    kAscii = 0,  // ASCII character set.
+    kLatin1 = 0,  // Latin-1 character set.
     kBMP,  // Basic Multilingual Plane.
     kSMP,  // Supplementary Multilingual Plane.
   };
@@ -46,10 +46,10 @@
                          intptr_t array_len,
                          int32_t* ch);
 
-  static bool DecodeToAscii(const uint8_t* utf8_array,
-                            intptr_t array_len,
-                            uint8_t* dst,
-                            intptr_t len);
+  static bool DecodeToLatin1(const uint8_t* utf8_array,
+                             intptr_t array_len,
+                             uint8_t* dst,
+                             intptr_t len);
   static bool DecodeToUTF16(const uint8_t* utf8_array,
                             intptr_t array_len,
                             uint16_t* dst,
diff --git a/runtime/vm/vm.gypi b/runtime/vm/vm.gypi
index cc45491..0fb1bd9 100644
--- a/runtime/vm/vm.gypi
+++ b/runtime/vm/vm.gypi
@@ -7,8 +7,6 @@
     'builtin_in_cc_file': '../bin/builtin_in.cc',
     'corelib_cc_file': '<(SHARED_INTERMEDIATE_DIR)/corelib_gen.cc',
     'corelib_patch_cc_file': '<(SHARED_INTERMEDIATE_DIR)/corelib_patch_gen.cc',
-    'corelib_impl_cc_file': '<(SHARED_INTERMEDIATE_DIR)/corelib_impl_gen.cc',
-    'corelib_impl_patch_cc_file': '<(SHARED_INTERMEDIATE_DIR)/corelib_impl_patch_gen.cc',
     'collection_cc_file': '<(SHARED_INTERMEDIATE_DIR)/collection_gen.cc',
     'math_cc_file': '<(SHARED_INTERMEDIATE_DIR)/math_gen.cc',
     'math_patch_cc_file': '<(SHARED_INTERMEDIATE_DIR)/math_patch_gen.cc',
@@ -67,8 +65,6 @@
       'dependencies': [
         'generate_corelib_cc_file',
         'generate_corelib_patch_cc_file',
-        'generate_corelib_impl_cc_file',
-        'generate_corelib_impl_patch_cc_file',
         'generate_collection_cc_file',
         'generate_math_cc_file',
         'generate_math_patch_cc_file',
@@ -81,7 +77,6 @@
       ],
       'includes': [
         '../lib/lib_sources.gypi',
-        '../lib/lib_impl_sources.gypi',
         '../lib/isolate_sources.gypi',
         '../lib/mirrors_sources.gypi',
         '../lib/scalarlist_sources.gypi',
@@ -91,8 +86,6 @@
         # Include generated source files.
         '<(corelib_cc_file)',
         '<(corelib_patch_cc_file)',
-        '<(corelib_impl_cc_file)',
-        '<(corelib_impl_patch_cc_file)',
         '<(collection_cc_file)',
         '<(math_cc_file)',
         '<(math_patch_cc_file)',
@@ -112,7 +105,6 @@
       'type': 'static_library',
       'includes': [
         '../lib/lib_sources.gypi',
-        '../lib/lib_impl_sources.gypi',
         '../lib/isolate_sources.gypi',
         '../lib/mirrors_sources.gypi',
         '../lib/scalarlist_sources.gypi',
@@ -201,82 +193,6 @@
       ]
     },
     {
-      'target_name': 'generate_corelib_impl_cc_file',
-      'type': 'none',
-      'includes': [
-        # Load the shared core library sources.
-        '../../sdk/lib/coreimpl/corelib_impl_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_corelib_impl_cc',
-          'inputs': [
-            '../tools/create_string_literal.py',
-            '<(builtin_in_cc_file)',
-            '<@(_sources)',
-          ],
-          'outputs': [
-            '<(corelib_impl_cc_file)',
-          ],
-          'action': [
-            'python',
-            'tools/create_string_literal.py',
-            '--output', '<(corelib_impl_cc_file)',
-            '--input_cc', '<(builtin_in_cc_file)',
-            '--include', 'vm/bootstrap.h',
-            '--var_name', 'dart::Bootstrap::corelib_impl_source_',
-            '<@(_sources)',
-          ],
-          'message': 'Generating ''<(corelib_impl_cc_file)'' file.'
-        },
-      ]
-    },
-    {
-      'target_name': 'generate_corelib_impl_patch_cc_file',
-      'type': 'none',
-      'includes': [
-        # Load the runtime implementation sources.
-        '../lib/lib_impl_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_corelib_impl_patch_cc',
-          'inputs': [
-            '../tools/create_string_literal.py',
-            '<(builtin_in_cc_file)',
-            '<@(_sources)',
-          ],
-          'outputs': [
-            '<(corelib_impl_patch_cc_file)',
-          ],
-          'action': [
-            'python',
-            'tools/create_string_literal.py',
-            '--output', '<(corelib_impl_patch_cc_file)',
-            '--input_cc', '<(builtin_in_cc_file)',
-            '--include', 'vm/bootstrap.h',
-            '--var_name', 'dart::Bootstrap::corelib_impl_patch_',
-            '<@(_sources)',
-          ],
-          'message': 'Generating ''<(corelib_impl_patch_cc_file)'' file.'
-        },
-      ]
-    },
-    {
       'target_name': 'generate_collection_cc_file',
       'type': 'none',
       'includes': [
diff --git a/sdk/bin/dart b/sdk/bin/dart
new file mode 100755
index 0000000..6bb8e1c
--- /dev/null
+++ b/sdk/bin/dart
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Setting CUR_DIR this way is ugly, but is needed to handle the case where
+# sdk/bin has been symlinked to. On MacOS, readlink doesn't work with this case.
+CUR_DIR="$(cd "${0%/*}" ; pwd -P)"
+
+if [ -z "$DART_CONFIGURATION" ];
+then
+  DART_CONFIGURATION="ReleaseIA32"
+fi
+
+if [[ `uname` -eq 'Darwin' ]]; 
+then
+  BIN_DIR="$CUR_DIR"/../../xcodebuild/$DART_CONFIGURATION
+else
+  BIN_DIR="$CUR_DIR"/../../out/$DART_CONFIGURATION
+fi 
+
+exec "$BIN_DIR"/dart "$@"
diff --git a/sdk/bin/dart.bat b/sdk/bin/dart.bat
new file mode 100644
index 0000000..eee051c
--- /dev/null
+++ b/sdk/bin/dart.bat
@@ -0,0 +1,16 @@
+@echo off
+REM Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+set SCRIPTPATH=%~dp0
+
+REM Does the path have a trailing slash? If so, remove it.
+if %SCRIPTPATH:~-1%== set SCRIPTPATH=%SCRIPTPATH:~0,-1%
+
+REM DART_CONFIGURATION defaults to ReleaseIA32
+if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseIA32
+
+set arguments=%*
+
+"%SCRIPTPATH%\..\..\build\%DART_CONFIGURATION%\dart.exe" %arguments%
diff --git a/sdk/bin/dart2js b/sdk/bin/dart2js
new file mode 100755
index 0000000..dfa5228
--- /dev/null
+++ b/sdk/bin/dart2js
@@ -0,0 +1,26 @@
+#!/bin/bash
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Setting BIN_DIR this way is ugly, but is needed to handle the case where
+# dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
+# with this case.
+BIN_DIR="$(cd "${0%/*}" ; pwd -P)"
+
+unset COLORS
+if test -t 1; then
+  # Stdout is a terminal.
+  if test 8 -le `tput colors`; then
+    # Stdout has at least 8 colors, so enable colors.
+    COLORS="--enable-diagnostic-colors"
+  fi
+fi
+
+unset SNAPSHOT
+if test -f "$BIN_DIR/../lib/_internal/compiler/implementation/dart2js.dart.snapshot"; then
+  # TODO(ahe): Remove the following line when we are relatively sure it works.
+  echo Using snapshot "$BIN_DIR/../lib/_internal/compiler/implementation/dart2js.dart.snapshot" 1>&2
+  SNAPSHOT="--use_script_snapshot=$BIN_DIR/../lib/_internal/compiler/implementation/dart2js.dart.snapshot"
+fi
+exec "$BIN_DIR"/dart --no_use_inlining --heap_growth_rate=32 $SNAPSHOT "$BIN_DIR/../lib/_internal/compiler/implementation/dart2js.dart" $COLORS "$@"
diff --git a/sdk/bin/dart2js.bat b/sdk/bin/dart2js.bat
new file mode 100644
index 0000000..86ede92
--- /dev/null
+++ b/sdk/bin/dart2js.bat
@@ -0,0 +1,15 @@
+@echo off
+REM Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+set SCRIPTPATH=%~dp0
+
+REM Does the path have a trailing slash? If so, remove it.
+if %SCRIPTPATH:~-1%== set SCRIPTPATH=%SCRIPTPATH:~0,-1%
+
+set arguments=%*
+set SNAPSHOTNAME=%SCRIPTPATH%dart2js.snapshot
+if exist %SNAPSHOTNAME% set SNAPSHOT=--use_script_snapshot=%SNAPSHOTNAME%
+
+"%SCRIPTPATH%dart" --no_use_inlining --heap_growth_rate=32 %SNAPSHOT% "%SCRIPTPATH%..\lib\_internal\compiler\implementation\dart2js.dart" %arguments%
diff --git a/sdk/bin/dartdoc b/sdk/bin/dartdoc
new file mode 100755
index 0000000..f694a9e
--- /dev/null
+++ b/sdk/bin/dartdoc
@@ -0,0 +1,26 @@
+#!/bin/bash
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Setting BIN_DIR this way is ugly, but is needed to handle the case where
+# dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
+# with this case.
+BIN_DIR="$(cd "${0%/*}" ; pwd -P)"
+
+unset COLORS
+if test -t 1; then
+  # Stdout is a terminal.
+  if test 8 -le `tput colors`; then
+    # Stdout has at least 8 colors, so enable colors.
+    COLORS="--enable-diagnostic-colors"
+  fi
+fi
+
+unset SNAPSHOT
+if test -f "$BIN_DIR/../lib/_internal/dartdoc/bin/dartdoc.dart.snapshot"; then
+  # TODO(ahe): Remove the following line when we are relatively sure it works.
+  echo Using snapshot "$BIN_DIR/../lib/_internal/dartdoc/bin/dartdoc.dart.snapshot" 1>&2
+  SNAPSHOT="--use_script_snapshot=$BIN_DIR/../lib/_internal/dartdoc/bin/dartdoc.dart.snapshot"
+fi
+exec "$BIN_DIR"/dart --no_use_inlining --heap_growth_rate=32 $SNAPSHOT "$BIN_DIR/../lib/_internal/dartdoc/bin/dartdoc.dart" $COLORS "$@"
diff --git a/sdk/bin/dartdoc.bat b/sdk/bin/dartdoc.bat
new file mode 100644
index 0000000..cf91da6
--- /dev/null
+++ b/sdk/bin/dartdoc.bat
@@ -0,0 +1,15 @@
+@echo off
+REM Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+set SCRIPTPATH=%~dp0
+
+REM Does the path have a trailing slash? If so, remove it.
+if %SCRIPTPATH:~-1%== set SCRIPTPATH=%SCRIPTPATH:~0,-1%
+
+set arguments=%*
+set SNAPSHOTNAME=%SCRIPTPATH%dart2js.snapshot
+if exist %SNAPSHOTNAME% set SNAPSHOT=--use_script_snapshot=%SNAPSHOTNAME%
+
+"%SCRIPTPATH%dart" --no_use_inlining --heap_growth_rate=32 %SNAPSHOT% "%SCRIPTPATH%..\lib\_internal\dartdoc\bin\dartdoc.dart" %arguments%
diff --git a/sdk/bin/pub b/sdk/bin/pub
new file mode 100755
index 0000000..726b58b
--- /dev/null
+++ b/sdk/bin/pub
@@ -0,0 +1,13 @@
+#!/bin/bash
+# Run pub.dart on the Dart VM. This script assumes the Dart SDK's directory
+# structure.
+
+# Setting BIN_DIR this way is ugly, but is needed to handle the case where
+# dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
+# with this case.
+BIN_DIR="$(cd "${0%/*}" ; pwd -P)"
+export DART_SDK="$(cd "${BIN_DIR%/*}" ; pwd -P)"
+
+# TODO(dgrove): This doesn't work yet. It will once dartbug.com/6619 is
+# fixed.
+exec "$BIN_DIR"/dart "$DART_SDK"/lib/_internal/pub/pub.dart $@
diff --git a/sdk/bin/pub.bat b/sdk/bin/pub.bat
new file mode 100644
index 0000000..dba1caf
--- /dev/null
+++ b/sdk/bin/pub.bat
@@ -0,0 +1,17 @@
+@echo off
+REM Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+REM Run pub.dart on the Dart VM. This script assumes the Dart SDK's directory
+REM structure.
+
+set SCRIPTPATH=%~dp0
+
+REM Does the string have a trailing slash? If so, remove it.
+if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
+
+REM Set DART_SDK so pub can find SDK packages.
+set DART_SDK=%SCRIPTPATH%\..\
+
+"%SCRIPTPATH%\dart" "%SCRIPTPATH%\..\util\pub\pub.dart" %*
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index 0d92a95..e84d45c 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -30,11 +30,19 @@
             enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
             enableUserAssertions: hasOption(options, '--enable-checked-mode'),
             enableMinification: hasOption(options, '--minify'),
+            enableNativeLiveTypeAnalysis:
+              hasOption(options, '--enable-native-live-type-analysis'),
             emitJavaScript: !hasOption(options, '--output-type=dart'),
             disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'),
+            analyzeAll: hasOption(options, '--analyze-all'),
+            rejectDeprecatedFeatures:
+                hasOption(options, '--reject-deprecated-language-features'),
+            checkDeprecationInSdk:
+                hasOption(options,
+                          '--report-sdk-use-of-deprecated-language-features'),
             strips: getStrips(options),
             enableConcreteTypeInference:
-              hasOption(options, '--enable-concrete-type-inference')) {
+                hasOption(options, '--enable-concrete-type-inference')) {
     if (!libraryRoot.path.endsWith("/")) {
       throw new ArgumentError("libraryRoot must end with a /");
     }
diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart
index 0465c22..4d6be1c 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -479,34 +479,29 @@
 
   /** Returns a non-unique name for the given closure element. */
   String closureName(Element element) {
-    List<String> parts = <String>[];
+    Link<String> parts = const Link<String>();
     SourceString ownName = element.name;
     if (ownName == null || ownName.stringValue == "") {
-      parts.add("anon");
+      parts = parts.prepend("anon");
     } else {
-      parts.add(ownName.slowToString());
+      parts = parts.prepend(ownName.slowToString());
     }
     for (Element enclosingElement = element.enclosingElement;
          enclosingElement != null &&
-             (identical(enclosingElement.kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY)
+             (identical(enclosingElement.kind,
+                        ElementKind.GENERATIVE_CONSTRUCTOR_BODY)
               || identical(enclosingElement.kind, ElementKind.CLASS)
               || identical(enclosingElement.kind, ElementKind.FUNCTION)
               || identical(enclosingElement.kind, ElementKind.GETTER)
               || identical(enclosingElement.kind, ElementKind.SETTER));
          enclosingElement = enclosingElement.enclosingElement) {
-      SourceString surroundingName = enclosingElement.name;
-      if (surroundingName != null) {
-        String surroundingNameString = surroundingName.slowToString();
-        if (surroundingNameString != "") parts.add(surroundingNameString);
-      }
+      SourceString surroundingName =
+          Elements.operatorNameToIdentifier(enclosingElement.name);
+      parts = parts.prepend(surroundingName.slowToString());
     }
-    // Invert the parts.
-    for (int i = 0, j = parts.length - 1; i < j; i++, j--) {
-      var tmp = parts[i];
-      parts[i] = parts[j];
-      parts[j] = tmp;
-    }
-    return Strings.join(parts, "_");
+    StringBuffer sb = new StringBuffer();
+    parts.printOn(sb, '_');
+    return sb.toString();
   }
 
   ClosureClassMap globalizeClosure(FunctionExpression node, Element element) {
diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
index e005cd7..1f16080 100644
--- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
+++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
@@ -38,6 +38,8 @@
   String get name => 'ConstantHandler';
 
   void registerCompileTimeConstant(Constant constant) {
+    compiler.enqueuer.codegen.registerInstantiatedClass(
+        constant.computeType(compiler).element);
     compiledConstants.add(constant);
   }
 
@@ -158,7 +160,7 @@
 
   Constant compileNodeWithDefinitions(Node node,
                                       TreeElements definitions,
-                                      {bool isConst}) {
+                                      {bool isConst: false}) {
     return measure(() {
       assert(node != null);
       CompileTimeConstantEvaluator evaluator = new CompileTimeConstantEvaluator(
@@ -250,7 +252,7 @@
   CompileTimeConstantEvaluator(this.constantSystem,
                                this.elements,
                                this.compiler,
-                               {bool isConst})
+                               {bool isConst: false})
       : this.isEvaluatingConstant = isConst;
 
   Constant evaluate(Node node) {
@@ -339,7 +341,7 @@
     classElement.ensureResolved(compiler);
     // TODO(floitsch): copy over the generic type.
     DartType type = new InterfaceType(classElement);
-    compiler.enqueuer.codegen.registerInstantiatedClass(classElement);
+    registerInstantiatedClass(classElement);
     Constant constant = new MapConstant(type, keysList, values, protoValue);
     compiler.constantHandler.registerCompileTimeConstant(constant);
     return constant;
@@ -349,7 +351,16 @@
     return constantSystem.createNull();
   }
 
+  void registerInstantiatedClass(ClassElement element) {
+    compiler.enqueuer.codegen.registerInstantiatedClass(element);
+  }
+
+  void registerStringInstance() {
+    registerInstantiatedClass(compiler.stringClass);
+  }
+
   Constant visitLiteralString(LiteralString node) {
+    registerStringInstance();
     return constantSystem.createString(node.dartString, node);
   }
 
@@ -357,6 +368,7 @@
     StringConstant left = evaluate(node.first);
     StringConstant right = evaluate(node.second);
     if (left == null || right == null) return null;
+    registerStringInstance();
     return constantSystem.createString(
         new DartString.concat(left.value, right.value), node);
   }
@@ -384,6 +396,7 @@
       if (partString == null) return null;
       accumulator = new DartString.concat(accumulator, partString.value);
     };
+    registerStringInstance();
     return constantSystem.createString(accumulator, node);
   }
 
@@ -570,6 +583,7 @@
 
     Send send = node.send;
     FunctionElement constructor = elements[send];
+    constructor = constructor.redirectionTarget;
     ClassElement classElement = constructor.getEnclosingClass();
     if (classElement.isInterface()) {
       compiler.resolver.resolveMethodElement(constructor);
@@ -805,7 +819,7 @@
     classElement.implementation.forEachInstanceField(
         (ClassElement enclosing, Element field) {
           Constant fieldValue = fieldValues[field];
-          if (fieldValue === null) {
+          if (fieldValue == null) {
             // Use the default value.
             fieldValue = compiler.compileConstant(field);
           }
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 774c2c6..e416804 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -74,8 +74,16 @@
 
   void enqueueHelpers(Enqueuer world);
   void codegen(WorkItem work);
-  void processNativeClasses(Enqueuer world,
-                            Collection<LibraryElement> libraries);
+
+  // The backend determines the native resolution enqueuer, with a no-op
+  // default, so tools like dart2dart can ignore the native classes.
+  native.NativeEnqueuer nativeResolutionEnqueuer(world) {
+    return new native.NativeEnqueuer();
+  }
+  native.NativeEnqueuer nativeCodegenEnqueuer(world) {
+    return new native.NativeEnqueuer();
+  }
+
   void assembleProgram();
   List<CompilerTask> get tasks;
 
@@ -87,6 +95,7 @@
   }
 
   SourceString getCheckedModeHelper(DartType type) => null;
+  void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {}
 
   Element getInterceptor(Selector selector);
 }
@@ -102,6 +111,10 @@
   final bool enableTypeAssertions;
   final bool enableUserAssertions;
   final bool enableConcreteTypeInference;
+  final bool analyzeAll;
+  final bool enableNativeLiveTypeAnalysis;
+  final bool rejectDeprecatedFeatures;
+  final bool checkDeprecationInSdk;
 
   bool disableInlining = false;
 
@@ -110,7 +123,6 @@
   CompilerTask measuredTask;
   Element _currentElement;
   LibraryElement coreLibrary;
-  LibraryElement coreImplLibrary;
   LibraryElement isolateLibrary;
   LibraryElement jsHelperLibrary;
   LibraryElement interceptorsLibrary;
@@ -210,9 +222,13 @@
             this.enableUserAssertions: false,
             this.enableConcreteTypeInference: false,
             this.enableMinification: false,
+            this.enableNativeLiveTypeAnalysis: false,
             bool emitJavaScript: true,
             bool generateSourceMap: true,
             bool disallowUnsafeEval: false,
+            this.analyzeAll: false,
+            this.rejectDeprecatedFeatures: false,
+            this.checkDeprecationInSdk: false,
             List<String> strips: const []})
       : libraries = new Map<String, LibraryElement>(),
         progress = new Stopwatch() {
@@ -329,12 +345,10 @@
     try {
       runCompiler(uri);
     } on CompilerCancelledException catch (exception) {
-      log(exception.toString());
-      log('compilation failed');
+      log('Error: $exception');
       return false;
     }
     tracer.close();
-    log('compilation succeeded');
     return true;
   }
 
@@ -376,8 +390,8 @@
   void onLibraryScanned(LibraryElement library, Uri uri) {
     if (dynamicClass != null) {
       // When loading the built-in libraries, dynamicClass is null. We
-      // take advantage of this as core and coreimpl import js_helper
-      // and see Dynamic this way.
+      // take advantage of this as core imports js_helper and sees [dynamic]
+      // this way.
       withCurrentElement(dynamicClass, () {
         library.addToScope(dynamicClass, this);
       });
@@ -387,12 +401,11 @@
   LibraryElement scanBuiltinLibrary(String filename);
 
   void initializeSpecialClasses() {
-    bool coreLibValid = true;
+    final List missingClasses = [];
     ClassElement lookupSpecialClass(SourceString name) {
       ClassElement result = coreLibrary.find(name);
       if (result == null) {
-        log('core library class $name missing');
-        coreLibValid = false;
+        missingClasses.add(name.slowToString());
       }
       return result;
     }
@@ -412,21 +425,19 @@
     dynamicClass = lookupSpecialClass(const SourceString('Dynamic_'));
     nullClass = lookupSpecialClass(const SourceString('Null'));
     types = new Types(this, dynamicClass);
-    if (!coreLibValid) {
-      cancel('core library does not contain required classes');
+    if (!missingClasses.isEmpty) {
+      cancel('core library does not contain required classes: $missingClasses');
     }
   }
 
   void scanBuiltinLibraries() {
-    loadCoreImplLibrary();
     jsHelperLibrary = scanBuiltinLibrary('_js_helper');
     interceptorsLibrary = scanBuiltinLibrary('_interceptors');
 
-    // The core and coreimpl libraries were loaded and patched before
-    // jsHelperLibrary was initialized, so it wasn't imported into those
-    // two libraries during patching.
+    // The core library was loaded and patched before jsHelperLibrary was
+    // initialized, so it wasn't imported into those two libraries during
+    // patching.
     importHelperLibrary(coreLibrary);
-    importHelperLibrary(coreImplLibrary);
     importHelperLibrary(interceptorsLibrary);
 
     addForeignFunctions(jsHelperLibrary);
@@ -445,11 +456,6 @@
         const SourceString('invokeOn'));
   }
 
-  void loadCoreImplLibrary() {
-    Uri coreImplUri = new Uri.fromComponents(scheme: 'dart', path: 'coreimpl');
-    coreImplLibrary = libraryLoader.loadLibrary(coreImplUri, null, coreImplUri);
-  }
-
   void importHelperLibrary(LibraryElement library) {
     if (jsHelperLibrary != null) {
       libraryLoader.importLibrary(library, jsHelperLibrary, null);
@@ -487,7 +493,8 @@
         || libraryName == 'dart:mirrors'
         || libraryName == 'dart:isolate'
         || libraryName == 'dart:math'
-        || libraryName == 'dart:html') {
+        || libraryName == 'dart:html'
+        || libraryName == 'dart:svg') {
       if (libraryName == 'dart:html' || libraryName == 'dart:mirrors') {
         // dart:html needs access to convertDartClosureToJS.
         // dart:mirrors needs access to the Primitives class.
@@ -523,9 +530,10 @@
 
     log('Resolving...');
     phase = PHASE_RESOLVING;
+    if (analyzeAll) libraries.forEach((_, lib) => fullyEnqueueLibrary(lib));
     backend.enqueueHelpers(enqueuer.resolution);
     processQueue(enqueuer.resolution, main);
-    log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.');
+    enqueuer.resolution.logSummary(log);
 
     if (compilationFailed) return;
 
@@ -539,7 +547,7 @@
     log('Compiling...');
     phase = PHASE_COMPILING;
     processQueue(enqueuer.codegen, main);
-    log('Compiled ${codegenWorld.generatedCode.length} methods.');
+    enqueuer.codegen.logSummary(log);
 
     if (compilationFailed) return;
 
@@ -548,8 +556,24 @@
     checkQueues();
   }
 
+  void fullyEnqueueLibrary(LibraryElement library) {
+    library.forEachLocalMember(fullyEnqueueTopLevelElement);
+  }
+
+  void fullyEnqueueTopLevelElement(Element element) {
+    if (element.isClass()) {
+      ClassElement cls = element;
+      cls.ensureResolved(this);
+      for (Element member in cls.localMembers) {
+        enqueuer.resolution.addToWorkList(member);
+      }
+    } else {
+      enqueuer.resolution.addToWorkList(element);
+    }
+  }
+
   void processQueue(Enqueuer world, Element main) {
-    backend.processNativeClasses(world, libraries.values);
+    world.nativeEnqueuer.processNativeClasses(libraries.values);
     world.addToWorkList(main);
     progress.reset();
     world.forEach((WorkItem work) {
@@ -615,14 +639,6 @@
     assert(invariant(element, element.isDeclaration));
     TreeElements elements = enqueuer.resolution.getCachedElements(element);
     if (elements != null) return elements;
-    final int allowed = ElementCategory.VARIABLE | ElementCategory.FUNCTION
-                        | ElementCategory.FACTORY;
-    ElementKind kind = element.kind;
-    if (!element.isAccessor() &&
-        ((identical(kind, ElementKind.ABSTRACT_FIELD)) ||
-         (kind.category & allowed) == 0)) {
-      return null;
-    }
     assert(parser != null);
     Node tree = parser.parse(element);
     validator.validate(tree);
@@ -752,6 +768,21 @@
     reportDiagnostic(span, "$message", kind);
   }
 
+  void onDeprecatedFeature(Spannable span, String feature) {
+    if (currentElement == null)
+      throw new SpannableAssertionFailure(span, feature);
+    if (!checkDeprecationInSdk &&
+        currentElement.getLibrary().isPlatformLibrary) {
+      return;
+    }
+    var kind = rejectDeprecatedFeatures
+        ? api.Diagnostic.ERROR : api.Diagnostic.WARNING;
+    var message = rejectDeprecatedFeatures
+        ? MessageKind.DEPRECATED_FEATURE_ERROR.error([feature])
+        : MessageKind.DEPRECATED_FEATURE_WARNING.error([feature]);
+    reportMessage(spanFromSpannable(span), message, kind);
+  }
+
   void reportDiagnostic(SourceSpan span, String message, api.Diagnostic kind);
 
   SourceSpan spanFromTokens(Token begin, Token end, [Uri uri]) {
diff --git a/sdk/lib/_internal/compiler/implementation/constant_system.dart b/sdk/lib/_internal/compiler/implementation/constant_system.dart
index 566c673..91808d4 100644
--- a/sdk/lib/_internal/compiler/implementation/constant_system.dart
+++ b/sdk/lib/_internal/compiler/implementation/constant_system.dart
@@ -4,18 +4,18 @@
 
 part of dart2js;
 
-interface Operation {
-  final SourceString name;
+abstract class Operation {
+  SourceString get name;
   bool isUserDefinable();
 }
 
-interface UnaryOperation extends Operation {
+abstract class UnaryOperation extends Operation {
   /** Returns [:null:] if it was unable to fold the operation. */
   Constant fold(Constant constant);
   apply(value);
 }
 
-interface BinaryOperation extends Operation {
+abstract class BinaryOperation extends Operation {
   /** Returns [:null:] if it was unable to fold the operation. */
   Constant fold(Constant left, Constant right);
   apply(left, right);
@@ -24,7 +24,7 @@
 /**
  * A [ConstantSystem] is responsible for creating constants and folding them.
  */
-interface ConstantSystem {
+abstract class ConstantSystem {
   BinaryOperation get add;
   BinaryOperation get bitAnd;
   UnaryOperation get bitNot;
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index f6a91d7..fdc98b9 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -35,7 +35,7 @@
 String extractParameter(String argument) {
   // m[0] is the entire match (which will be equal to argument). m[1]
   // is something like "-o" or "--out=", and m[2] is the parameter.
-  Match m = const RegExp('^(-[a-z]|--.+=)(.*)').firstMatch(argument);
+  Match m = new RegExp('^(-[a-z]|--.+=)(.*)').firstMatch(argument);
   if (m == null) helpAndFail('Error: Unknown option "$argument".');
   return m[2];
 }
@@ -109,6 +109,12 @@
     passThrough(argument);
   }
 
+  String getDepsOutput(Map<String, SourceFile> sourceFiles) {
+    var filenames = new List.from(sourceFiles.keys);
+    filenames.sort();
+    return Strings.join(filenames, "\n");
+  }
+
   setStrip(String argument) {
     stripArgumentSet = true;
     passThrough(argument);
@@ -157,6 +163,12 @@
     new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
     new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
     new OptionHandler('--disallow-unsafe-eval', passThrough),
+    new OptionHandler('--analyze-all', passThrough),
+    new OptionHandler('--enable-native-live-type-analysis', passThrough),
+    new OptionHandler('--reject-deprecated-language-features', passThrough),
+    new OptionHandler('--report-sdk-use-of-deprecated-language-features',
+                      passThrough),
+
     // The following two options must come last.
     new OptionHandler('-.*', (String argument) {
       helpAndFail('Error: Unknown option "$argument".');
@@ -283,6 +295,7 @@
       sourceMapOut.path.substring(sourceMapOut.path.lastIndexOf('/') + 1);
   code = '$code\n//@ sourceMappingURL=${sourceMapFileName}';
   writeString(out, code);
+  writeString(new Uri.fromString('$out.deps'), getDepsOutput(sourceFiles));
   int bytesWritten = code.length;
   info('compiled $dartBytesRead bytes Dart -> $bytesWritten bytes '
        '$outputLanguage in ${relativize(cwd, out, isWindows)}');
@@ -367,6 +380,12 @@
   -p<path>, --package-root=<path>
     Where to find packages, that is, "package:..." imports.
 
+  --analyze-all
+    Analyze all code.  Without this option, the compiler only analyzes
+    code that is reachable from [main].  This option is useful for
+    finding errors in libraries, but using it can result in bigger and
+    slower output.
+
   --minify
     Generate minified output.
 
@@ -395,11 +414,30 @@
   --enable-concrete-type-inference
     Enable experimental concrete type inference.
 
+  --enable-native-live-type-analysis
+    Remove unused native types from dart:html and related libraries. This is
+    expected to become the default behavior.
+
   --disallow-unsafe-eval
     Disables dynamic generation of code in the generated output. This is
     necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).
     This flag is not continuously tested. Please report breakages and we
-    will fix them as soon as possible.''');
+    will fix them as soon as possible.
+
+  --reject-deprecated-language-features
+    Reject deprecated language features.  Without this option, the
+    compiler will accept language features that are no longer valid
+    according to The Dart Programming Language Specification, version
+    0.12, M1.
+
+  --report-sdk-use-of-deprecated-language-features
+    Report use of deprecated features in Dart platform libraries.
+    Without this option, the compiler will silently accept use of
+    deprecated language features from these libraries.  The option
+    --reject-deprecated-language-features controls if these usages are
+    reported as errors or warnings.
+
+'''.trim());
 }
 
 void helpAndExit(bool verbose) {
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index 34d36bc..b31e471 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -75,7 +75,7 @@
 
   visitGetterSend(Send node) {
     final element = elements[node];
-    // element === null means dynamic property access.
+    // element == null means dynamic property access.
     if (element == null) {
       collector.tryMakeMemberPlaceholder(node.selector);
     } else if (element.isErroneous()) {
@@ -211,7 +211,7 @@
       VariableDefinitions definitions = elementNode;
       for (Node definition in definitions.definitions) {
         final definitionElement = treeElements[definition];
-        // definitionElement === null if variable is actually unused.
+        // definitionElement == null if variable is actually unused.
         if (definitionElement == null) continue;
         collectFieldDeclarationPlaceholders(definitionElement, definition);
       }
diff --git a/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart b/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart
index fa335e0..19f5501 100644
--- a/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart
@@ -19,4 +19,6 @@
   SourceSpan spanFromNode(Node node, [Uri uri]);
 
   void reportMessage(SourceSpan span, Diagnostic message, api.Diagnostic kind);
+
+  void onDeprecatedFeature(Spannable span, String feature);
 }
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 684ba90..fbdc8ca 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -1802,62 +1802,92 @@
     return new SourceString('$r\$$s');
   }
 
-  static const SourceString OPERATOR_EQUALS =
-      const SourceString(r'operator$eq');
-
-  static SourceString constructOperatorName(SourceString selector,
-                                            bool isUnary) {
-    String str = selector.stringValue;
-    if (identical(str, '==') || identical(str, '!=')) return OPERATOR_EQUALS;
-
-    if (identical(str, '~')) {
-      str = 'not';
-    } else if (identical(str, '-') && isUnary) {
-      // TODO(ahe): Return something like 'unary -'.
-      return const SourceString('negate');
-    } else if (identical(str, '[]')) {
-      str = 'index';
-    } else if (identical(str, '[]=')) {
-      str = 'indexSet';
-    } else if (identical(str, '*') || identical(str, '*=')) {
-      str = 'mul';
-    } else if (identical(str, '/') || identical(str, '/=')) {
-      str = 'div';
-    } else if (identical(str, '%') || identical(str, '%=')) {
-      str = 'mod';
-    } else if (identical(str, '~/') || identical(str, '~/=')) {
-      str = 'tdiv';
-    } else if (identical(str, '+') || identical(str, '+=')) {
-      str = 'add';
-    } else if (identical(str, '-') || identical(str, '-=')) {
-      str = 'sub';
-    } else if (identical(str, '<<') || identical(str, '<<=')) {
-      str = 'shl';
-    } else if (identical(str, '>>') || identical(str, '>>=')) {
-      str = 'shr';
-    } else if (identical(str, '>=')) {
-      str = 'ge';
-    } else if (identical(str, '>')) {
-      str = 'gt';
-    } else if (identical(str, '<=')) {
-      str = 'le';
-    } else if (identical(str, '<')) {
-      str = 'lt';
-    } else if (identical(str, '&') || identical(str, '&=')) {
-      str = 'and';
-    } else if (identical(str, '^') || identical(str, '^=')) {
-      str = 'xor';
-    } else if (identical(str, '|') || identical(str, '|=')) {
-      str = 'or';
-    } else if (selector == const SourceString('negate')) {
-      // TODO(ahe): Remove this case: Legacy support for pre-0.11 spec.
-      return selector;
-    } else if (identical(str, '?')) {
-      return selector;
+  /**
+   * Map an operator-name to a valid Dart identifier.
+   *
+   * For non-operator names, this metod just returns its input.
+   *
+   * The results returned from this method are guaranteed to be valid
+   * JavaScript identifers, except it may include reserved words for
+   * non-operator names.
+   */
+  static SourceString operatorNameToIdentifier(SourceString name) {
+    if (name == null) return null;
+    String value = name.stringValue;
+    if (value == null) {
+      return name;
+    } else if (identical(value, '==')) {
+      return const SourceString(r'operator$eq');
+    } else if (identical(value, '~')) {
+      return const SourceString(r'operator$not');
+    } else if (identical(value, '[]')) {
+      return const SourceString(r'operator$index');
+    } else if (identical(value, '[]=')) {
+      return const SourceString(r'oprator$indexSet');
+    } else if (identical(value, '*')) {
+      return const SourceString(r'operator$mul');
+    } else if (identical(value, '/')) {
+      return const SourceString(r'operator$div');
+    } else if (identical(value, '%')) {
+      return const SourceString(r'operator$mod');
+    } else if (identical(value, '~/')) {
+      return const SourceString(r'operator$tdiv');
+    } else if (identical(value, '+')) {
+      return const SourceString(r'operator$add');
+    } else if (identical(value, '<<')) {
+      return const SourceString(r'operator$shl');
+    } else if (identical(value, '>>')) {
+      return const SourceString(r'operator$shr');
+    } else if (identical(value, '>=')) {
+      return const SourceString(r'operator$ge');
+    } else if (identical(value, '>')) {
+      return const SourceString(r'operator$gt');
+    } else if (identical(value, '<=')) {
+      return const SourceString(r'operator$le');
+    } else if (identical(value, '<')) {
+      return const SourceString(r'operator$lt');
+    } else if (identical(value, '&')) {
+      return const SourceString(r'operator$and');
+    } else if (identical(value, '^')) {
+      return const SourceString(r'operator$xor');
+    } else if (identical(value, '|')) {
+      return const SourceString(r'operator$or');
+    } else if (identical(value, '-')) {
+      return const SourceString(r'operator$sub');
+    } else if (identical(value, 'unary-')) {
+      return const SourceString(r'operator$negate');
     } else {
-      throw new Exception('Unhandled selector: ${selector.slowToString()}');
+      return name;
     }
-    return new SourceString('operator\$$str');
+  }
+
+  static SourceString constructOperatorName(SourceString op, bool isUnary) {
+    String value = op.stringValue;
+    if ((value === '==') ||
+        (value === '~') ||
+        (value === '[]') ||
+        (value === '[]=') ||
+        (value === '*') ||
+        (value === '/') ||
+        (value === '%') ||
+        (value === '~/') ||
+        (value === '+') ||
+        (value === '<<') ||
+        (value === '>>>') ||
+        (value === '>>') ||
+        (value === '>=') ||
+        (value === '>') ||
+        (value === '<=') ||
+        (value === '<') ||
+        (value === '&') ||
+        (value === '^') ||
+        (value === '|')) {
+      return op;
+    } else if (value === '-') {
+      return isUnary ? const SourceString('unary-') : op;
+    } else {
+      throw 'Unhandled operator: ${op.slowToString()}';
+    }
   }
 
   static SourceString mapToUserOperator(SourceString op) {
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index eac0761..8ed7bdb 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -18,6 +18,10 @@
       super(compiler) {
     codegen.task = this;
     resolution.task = this;
+
+    codegen.nativeEnqueuer = compiler.backend.nativeCodegenEnqueuer(codegen);
+    resolution.nativeEnqueuer =
+        compiler.backend.nativeResolutionEnqueuer(resolution);
   }
 }
 
@@ -40,6 +44,7 @@
 
   bool queueIsClosed = false;
   EnqueueTask task;
+  native.NativeEnqueuer nativeEnqueuer;  // Set by EnqueueTask
 
   Enqueuer(this.name, this.compiler,
            ItemCompilationContext itemCompilationContextCreator())
@@ -116,6 +121,8 @@
         && library.uri.toString() == 'dart:isolate') {
       compiler.enableIsolateSupport(library);
     }
+
+    nativeEnqueuer.registerElement(element);
   }
 
   /**
@@ -131,14 +138,9 @@
   }
 
   void registerInstantiatedClass(ClassElement cls) {
-    if (cls.isInterface()) {
-      compiler.internalErrorOnElement(
-          // Use the current element, as this is where cls is referenced from.
-          compiler.currentElement,
-          'Expected a class, but $cls is an interface.');
-    }
     universe.instantiatedClasses.add(cls);
     onRegisterInstantiatedClass(cls);
+    compiler.backend.registerInstantiatedClass(cls, this);
   }
 
   bool checkNoEnqueuedInvokedInstanceMethods() {
@@ -167,7 +169,11 @@
     if (universe.generatedCode.containsKey(member)) return;
     if (resolvedElements[member] != null) return;
     if (!member.isInstanceMember()) return;
-    if (member.isField()) return;
+    if (member.isField()) {
+      // Native fields need to go into instanceMembersByName as they are virtual
+      // instantiation points and escape points.
+      if (!member.enclosingElement.isNative()) return;
+    }
 
     String memberName = member.name.slowToString();
     Link<Element> members = instanceMembersByName.putIfAbsent(
@@ -199,10 +205,19 @@
       if (universe.hasInvocation(member, compiler)) {
         return addToWorkList(member);
       }
-    } else if (identical(member.kind, ElementKind.SETTER)) {
+    } else if (member.kind == ElementKind.SETTER) {
       if (universe.hasInvokedSetter(member, compiler)) {
         return addToWorkList(member);
       }
+    } else if (member.kind == ElementKind.FIELD &&
+               member.enclosingElement.isNative()) {
+      if (universe.hasInvokedGetter(member, compiler) ||
+          universe.hasInvocation(member, compiler)) {
+        nativeEnqueuer.registerFieldLoad(member);
+      }
+      if (universe.hasInvokedSetter(member, compiler)) {
+        nativeEnqueuer.registerFieldStore(member);
+      }
     }
   }
 
@@ -218,9 +233,7 @@
         if (seenClasses.contains(cls)) continue;
         seenClasses.add(cls);
         cls.ensureResolved(compiler);
-        if (!cls.isInterface()) {
-          cls.implementation.forEachMember(processInstantiatedClassMember);
-        }
+        cls.implementation.forEachMember(processInstantiatedClassMember);
         if (isResolutionQueue) {
           compiler.resolver.checkMembers(cls);
         }
@@ -292,7 +305,25 @@
   void handleUnseenSelector(SourceString methodName, Selector selector) {
     processInstanceMembers(methodName, (Element member) {
       if (selector.applies(member, compiler)) {
-        addToWorkList(member);
+        if (member.isField() && member.enclosingElement.isNative()) {
+          if (selector.isGetter() || selector.isCall()) {
+            nativeEnqueuer.registerFieldLoad(member);
+            // We have to also handle storing to the field because we only get
+            // one look at each member and there might be a store we have not
+            // seen yet.
+            // TODO(sra): Process fields for storing separately.
+            nativeEnqueuer.registerFieldStore(member);
+          } else {
+            nativeEnqueuer.registerFieldStore(member);
+            // We have to also handle loading from the field because we only get
+            // one look at each member and there might be a load we have not
+            // seen yet.
+            // TODO(sra): Process fields for storing separately.
+            nativeEnqueuer.registerFieldLoad(member);
+          }
+        } else {
+          addToWorkList(member);
+        }
         return true;
       }
       return false;
@@ -366,6 +397,13 @@
 
   String toString() => 'Enqueuer($name)';
 
+  void logSummary(log(message)) {
+    log(isResolutionQueue
+        ? 'Resolved ${resolvedElements.length} elements.'
+        : 'Compiled ${universe.generatedCode.length} methods.');
+    nativeEnqueuer.logSummary(log);
+  }
+
   registerUsedSelector(Selector selector) {
     Element interceptor = compiler.backend.getInterceptor(selector);
     if (interceptor != null) {
diff --git a/sdk/lib/_internal/compiler/implementation/js/printer.dart b/sdk/lib/_internal/compiler/implementation/js/printer.dart
index 5bdbfd9..267ccc5 100644
--- a/sdk/lib/_internal/compiler/implementation/js/printer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/printer.dart
@@ -12,20 +12,21 @@
   bool inForInit = false;
   bool atStatementBegin = false;
   final DanglingElseVisitor danglingElseVisitor;
-  final Namer namer;
+  final LocalNamer localNamer;
   bool pendingSemicolon = false;
   bool pendingSpace = false;
+  static final identifierRegexp = new RegExp(r'^[a-zA-Z_0-9$]');
 
   Printer(leg.Compiler compiler, { allowVariableMinification: true })
       : shouldCompressOutput = compiler.enableMinification,
         this.compiler = compiler,
         outBuffer = new leg.CodeBuffer(),
         danglingElseVisitor = new DanglingElseVisitor(compiler),
-        namer = determineRenamer(compiler.enableMinification,
-                                 allowVariableMinification);
+        localNamer = determineRenamer(compiler.enableMinification,
+                                      allowVariableMinification);
 
-  static Namer determineRenamer(bool shouldCompressOutput,
-                                bool allowVariableMinification) {
+  static LocalNamer determineRenamer(bool shouldCompressOutput,
+                                     bool allowVariableMinification) {
     return (shouldCompressOutput && allowVariableMinification)
         ? new MinifyRenamer() : new IdentityNamer();
   }
@@ -46,7 +47,6 @@
 
   void out(String str) {
     if (str != "") {
-      const identifierRegexp = const RegExp(r'^[a-zA-Z_0-9$]');
       if (pendingSemicolon && (!shouldCompressOutput || str != "}")) {
         outBuffer.add(";");
       }
@@ -391,7 +391,7 @@
       visitNestedExpression(name, PRIMARY,
                             newInForInit: false, newAtStatementBegin: false);
     }
-    namer.enterScope(vars);
+    localNamer.enterScope(vars);
     out("(");
     if (fun.params != null) {
       visitCommaSeparated(fun.params, PRIMARY,
@@ -399,7 +399,7 @@
     }
     out(")");
     blockBody(fun.body, needsSeparation: false, needsNewline: false);
-    namer.leaveScope();
+    localNamer.leaveScope();
   }
 
   visitFunctionDeclaration(FunctionDeclaration declaration) {
@@ -639,7 +639,7 @@
   }
 
   visitVariableUse(VariableUse ref) {
-    out(namer.getName(ref.name));
+    out(localNamer.getName(ref.name));
   }
 
   visitThis(This node) {
@@ -647,11 +647,11 @@
   }
 
   visitVariableDeclaration(VariableDeclaration decl) {
-    out(namer.getName(decl.name));
+    out(localNamer.getName(decl.name));
   }
 
   visitParameter(Parameter param) {
-    out(namer.getName(param.name));
+    out(localNamer.getName(param.name));
   }
 
   bool isDigit(int charCode) {
@@ -944,7 +944,7 @@
 }
 
 
-abstract class Namer {
+abstract class LocalNamer {
   String getName(String oldName);
   String declareVariable(String oldName);
   String declareParameter(String oldName);
@@ -953,7 +953,7 @@
 }
 
 
-class IdentityNamer implements Namer {
+class IdentityNamer implements LocalNamer {
   String getName(String oldName) => oldName;
   String declareVariable(String oldName) => oldName;
   String declareParameter(String oldName) => oldName;
@@ -962,7 +962,7 @@
 }
 
 
-class MinifyRenamer implements Namer {
+class MinifyRenamer implements LocalNamer {
   final List<Map<String, String>> maps = [];
   final List<int> parameterNumberStack = [];
   final List<int> variableNumberStack = [];
@@ -1067,7 +1067,7 @@
       codes.add(charCodes.$0 + digit);
       newName = new String.fromCharCodes(codes);
     }
-    assert(const RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
+    assert(new RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
     maps.last[oldName] = newName;
     return newName;
   }
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 9cedefb..5cc96d6 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -646,6 +646,11 @@
   SsaCodeGeneratorTask generator;
   CodeEmitterTask emitter;
 
+  ClassElement jsStringClass;
+  ClassElement jsArrayClass;
+  ClassElement objectInterceptorClass;
+  Element getInterceptorMethod;
+
   final Namer namer;
 
   /**
@@ -668,17 +673,31 @@
 
   final Interceptors interceptors;
 
+  /**
+   * A collection of selectors of intercepted method calls. The
+   * emitter uses this set to generate the [:ObjectInterceptor:] class
+   * whose members just forward the call to the intercepted receiver.
+   */
+  final Set<Selector> usedInterceptors;
+
+  /**
+   * The members of instantiated interceptor classes: maps a member
+   * name to the list of members that have that name. This map is used
+   * by the codegen to know whether a send must be intercepted or not.
+   */
+  final Map<SourceString, List<Element>> interceptedElements;  
+
   List<CompilerTask> get tasks {
     return <CompilerTask>[builder, optimizer, generator, emitter];
   }
 
-  JavaScriptBackend(Compiler compiler,
-                    bool generateSourceMap,
-                    bool disableEval)
-      : namer = new Namer(compiler),
+  JavaScriptBackend(Compiler compiler, bool generateSourceMap, bool disableEval)
+      : namer = determineNamer(compiler),
         returnInfo = new Map<Element, ReturnInfo>(),
         invalidateAfterCodegen = new List<Element>(),
         interceptors = new Interceptors(compiler),
+        usedInterceptors = new Set<Selector>(),
+        interceptedElements = new Map<SourceString, List<Element>>(),
         super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
     emitter = disableEval
         ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
@@ -690,6 +709,67 @@
     fieldTypes = new FieldTypesRegistry(this);
   }
 
+  static Namer determineNamer(Compiler compiler) {
+    return compiler.enableMinification ?
+        new MinifyNamer(compiler) :
+        new Namer(compiler);
+  }
+
+  bool isInterceptorClass(Element element) {
+    if (element == null) return false;
+    return element == jsStringClass || element == jsArrayClass;
+  }
+
+  void addInterceptedSelector(Selector selector) {
+    usedInterceptors.add(selector);
+  }
+
+  bool shouldInterceptSelector(Selector selector) {
+    List<Element> intercepted = interceptedElements[selector.name];
+    if (intercepted == null) return false;
+    for (Element element in intercepted) {
+      if (selector.applies(element, compiler)) return true;
+    }
+    return false;
+  }
+
+  void initializeInterceptorElements() {
+    objectInterceptorClass =
+        compiler.findInterceptor(const SourceString('ObjectInterceptor'));
+    getInterceptorMethod =
+        compiler.findInterceptor(const SourceString('getInterceptor'));
+  }
+
+
+  void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {
+    ClassElement result = null;
+    if (cls == compiler.stringClass) {
+      if (jsStringClass == null) {
+        jsStringClass =
+            compiler.findInterceptor(const SourceString('JSString'));
+        initializeInterceptorElements();
+      }
+      result = jsStringClass;
+    } else if (cls == compiler.listClass) {
+      if (jsArrayClass == null) {
+        jsArrayClass =
+            compiler.findInterceptor(const SourceString('JSArray'));
+        initializeInterceptorElements();
+      }
+      result = jsArrayClass;
+    }
+
+    if (result == null) return;
+
+    result.forEachMember((_, Element member) {
+      List<Element> list = interceptedElements.putIfAbsent(
+          member.name, () => new List<Element>());
+      list.add(member);
+    });
+
+    enqueuer.registerInstantiatedClass(result);
+  }
+
   Element get cyclicThrowHelper {
     return compiler.findHelper(const SourceString("throwCyclicInit"));
   }
@@ -699,7 +779,7 @@
   }
 
   Element getInterceptor(Selector selector) {
-    return interceptors.getStaticInterceptorBySelector(selector);
+    return interceptors.getStaticInterceptor(selector);
   }
 
   void enqueueHelpers(Enqueuer world) {
@@ -748,9 +828,13 @@
     invalidateAfterCodegen.clear();
   }
 
-  void processNativeClasses(Enqueuer world,
-                            Collection<LibraryElement> libraries) {
-    native.processNativeClasses(world, emitter, libraries);
+
+  native.NativeEnqueuer nativeResolutionEnqueuer(Enqueuer world) {
+    return new native.NativeResolutionEnqueuer(world, compiler);
+  }
+
+  native.NativeEnqueuer nativeCodegenEnqueuer(Enqueuer world) {
+    return new native.NativeCodegenEnqueuer(world, compiler, emitter);
   }
 
   void assembleProgram() {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
index ad7b2b0..a9e49c0 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
@@ -92,51 +92,12 @@
   void writeEscapedString(DartString string,
                           CodeBuffer buffer,
                           Node diagnosticNode) {
-    Iterator<int> iterator = string.iterator();
-    while (iterator.hasNext) {
-      int code = iterator.next();
-      if (identical(code, $SQ)) {
-        buffer.add(r"\'");
-      } else if (identical(code, $LF)) {
-        buffer.add(r'\n');
-      } else if (identical(code, $CR)) {
-        buffer.add(r'\r');
-      } else if (identical(code, $LS)) {
-        // This Unicode line terminator and $PS are invalid in JS string
-        // literals.
-        buffer.add(r'\u2028');
-      } else if (identical(code, $PS)) {
-        buffer.add(r'\u2029');
-      } else if (identical(code, $BACKSLASH)) {
-        buffer.add(r'\\');
-      } else {
-        if (code > 0xffff) {
-          compiler.reportError(
-              diagnosticNode,
-              'Unhandled non-BMP character: U+${code.toRadixString(16)}');
-        }
-        // TODO(lrn): Consider whether all codes above 0x7f really need to
-        // be escaped. We build a Dart string here, so it should be a literal
-        // stage that converts it to, e.g., UTF-8 for a JS interpreter.
-        if (code < 0x20) {
-          buffer.add(r'\x');
-          if (code < 0x10) buffer.add('0');
-          buffer.add(code.toRadixString(16));
-        } else if (code >= 0x80) {
-          if (code < 0x100) {
-            buffer.add(r'\x');
-          } else {
-            buffer.add(r'\u');
-            if (code < 0x1000) {
-              buffer.add('0');
-            }
-          }
-          buffer.add(code.toRadixString(16));
-        } else {
-          buffer.addCharCode(code);
-        }
-      }
+    void onError(code) {
+      compiler.reportError(
+          diagnosticNode,
+          'Unhandled non-BMP character: U+${code.toRadixString(16)}');
     }
+    writeJsonEscapedCharsOn(string.iterator(), buffer, onError);
   }
 
   void visitString(StringConstant constant) {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 6972a0e..e8ad203 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -44,7 +44,20 @@
       well as in the generated code. */
   String isolateProperties;
   String classesCollector;
+
+  /**
+   * A cache of closures that are used to closurize instance methods.
+   * A closure is dynamically bound to the instance used when
+   * closurized.
+   */
   final Map<int, String> boundClosureCache;
+
+  /**
+   * A cache of closures that are used to closurize instance methods
+   * of interceptors. These closures are dynamically bound to the
+   * interceptor instance, and the actual receiver of the method.
+   */
+  final Map<int, String> interceptorClosureCache;
   Set<ClassElement> checkedClasses;
 
   final bool generateSourceMap;
@@ -54,6 +67,7 @@
         mainBuffer = new CodeBuffer(),
         this.namer = namer,
         boundClosureCache = new Map<int, String>(),
+        interceptorClosureCache = new Map<int, String>(),
         constantEmitter = new ConstantEmitter(compiler, namer),
         super(compiler) {
     nativeEmitter = new NativeEmitter(this);
@@ -93,29 +107,51 @@
   String get lazyInitializerName
       => '${namer.ISOLATE}.\$lazy';
 
-  final String GETTER_SUFFIX = "?";
-  final String SETTER_SUFFIX = "!";
-  final String GETTER_SETTER_SUFFIX = "=";
+  // Property name suffixes.  If the accessors are renaming then the format
+  // is <accessorName>:<fieldName><suffix>.  We use the suffix to know whether
+  // to look for the ':' separator in order to avoid doing the indexOf operation
+  // on every single property (they are quite rare).  None of these characters
+  // are legal in an identifier and they are related by bit patterns.
+  // setter          <          0x3c
+  // both            =          0x3d
+  // getter          >          0x3e
+  // renaming setter |          0x7c
+  // renaming both   }          0x7d
+  // renaming getter ~          0x7e
+  const SUFFIX_MASK = 0x3f;
+  const FIRST_SUFFIX_CODE = 0x3c;
+  const SETTER_CODE = 0x3c;
+  const GETTER_SETTER_CODE = 0x3d;
+  const GETTER_CODE = 0x3e;
+  const RENAMING_FLAG = 0x40;
+  String needsGetterCode(String variable) => '($variable & 3) > 0';
+  String needsSetterCode(String variable) => '($variable & 2) == 0';
+  String isRenaming(String variable) => '($variable & $RENAMING_FLAG) != 0';
 
   String get generateGetterSetterFunction {
     return """
   function(field, prototype) {
     var len = field.length;
-    var lastChar = field[len - 1];
-    var needsGetter = lastChar == '$GETTER_SUFFIX' || lastChar == '$GETTER_SETTER_SUFFIX';
-    var needsSetter = lastChar == '$SETTER_SUFFIX' || lastChar == '$GETTER_SETTER_SUFFIX';
-    if (needsGetter || needsSetter) field = field.substring(0, len - 1);
-    if (needsGetter) {
-      var getterString = "return this." + field + ";";
-  """
-  /* The supportsProtoCheck below depends on the getter/setter convention.
-         When changing here, update the protoCheck too. */
-  """
-      prototype["get\$" + field] = new Function(getterString);
-    }
-    if (needsSetter) {
-      var setterString = "this." + field + " = v;";
-      prototype["set\$" + field] = new Function("v", setterString);
+    var lastCharCode = field.charCodeAt(len - 1);
+    var needsAccessor = (lastCharCode & $SUFFIX_MASK) >= $FIRST_SUFFIX_CODE;
+    if (needsAccessor) {
+      var needsGetter = ${needsGetterCode('lastCharCode')};
+      var needsSetter = ${needsSetterCode('lastCharCode')};
+      var renaming = ${isRenaming('lastCharCode')};
+      var accessorName = field = field.substring(0, len - 1);
+      if (renaming) {
+        var divider = field.indexOf(":");
+        accessorName = field.substring(0, divider);
+        field = field.substring(divider + 1);
+      }
+      if (needsGetter) {
+        var getterString = "return this." + field + ";";
+        prototype["get\$" + accessorName] = new Function(getterString);
+      }
+      if (needsSetter) {
+        var setterString = "this." + field + " = v;";
+        prototype["set\$" + accessorName] = new Function("v", setterString);
+      }
     }
     return field;
   }""";
@@ -176,7 +212,7 @@
 var tmp = $defineClassName('c', ['f?'], {}).prototype;
 if (tmp.__proto__) {
   tmp.__proto__ = {};
-  if (typeof tmp.get\$f !== "undefined") $supportsProtoName = true;
+  if (typeof tmp.get\$f !== 'undefined') $supportsProtoName = true;
 }
 ''';
   }
@@ -380,19 +416,40 @@
     CodeBuffer buffer = new CodeBuffer();
     buffer.add('function(');
 
+    JavaScriptBackend backend = compiler.backend;
+    bool isInterceptorClass =
+        backend.isInterceptorClass(member.getEnclosingClass());
+
+    // If the method is in an interceptor class, we need to also pass
+    // the actual receiver.
+    int extraArgumentCount = isInterceptorClass ? 1 : 0;
+    // Use '$' to avoid clashes with other parameter names. Using '$'
+    // works because [JsNames.getValid] used for getting parameter
+    // names never returns '$'.
+    String extraArgumentName = r'$';
+
     // The parameters that this stub takes.
-    List<String> parametersBuffer = new List<String>(selector.argumentCount);
+    List<String> parametersBuffer =
+        new List<String>(selector.argumentCount + extraArgumentCount);
     // The arguments that will be passed to the real method.
-    List<String> argumentsBuffer = new List<String>(parameters.parameterCount);
+    List<String> argumentsBuffer =
+        new List<String>(parameters.parameterCount + extraArgumentCount);
 
     int count = 0;
+    if (isInterceptorClass) {
+      count++;
+      parametersBuffer[0] = extraArgumentName;
+      argumentsBuffer[0] = extraArgumentName;
+    }
+
     int indexOfLastOptionalArgumentInParameters = positionalArgumentCount - 1;
     TreeElements elements =
         compiler.enqueuer.resolution.getCachedElements(member);
 
     parameters.orderedForEachParameter((Element element) {
       String jsName = JsNames.getValid(element.name.slowToString());
-      if (count < positionalArgumentCount) {
+      assert(jsName != extraArgumentName);
+      if (count < positionalArgumentCount + extraArgumentCount) {
         parametersBuffer[count] = jsName;
         argumentsBuffer[count] = jsName;
       } else {
@@ -474,7 +531,7 @@
     // on A and a typed selector on B could yield the same stub.
     Set<String> generatedStubNames = new Set<String>();
     if (compiler.enabledFunctionApply
-        && member.name == Namer.CLOSURE_INVOCATION_NAME) {
+        && member.name == namer.CLOSURE_INVOCATION_NAME) {
       // If [Function.apply] is called, we pessimistically compile all
       // possible stubs for this closure.
       FunctionSignature signature = member.computeSignature(compiler);
@@ -617,7 +674,7 @@
                            bool needsLeadingComma) {
     assert(invariant(classElement, classElement.isDeclaration));
     bool needsComma = needsLeadingComma;
-    void defineInstanceMember(String name, CodeBuffer memberBuffer) {
+    void defineInstanceMember(String name, StringBuffer memberBuffer) {
       if (needsComma) buffer.add(',');
       needsComma = true;
       buffer.add('\n');
@@ -625,6 +682,13 @@
       buffer.add(memberBuffer);
     }
 
+    JavaScriptBackend backend = compiler.backend;
+    if (classElement == backend.objectInterceptorClass) {
+      emitInterceptorMethods(defineInstanceMember);
+      // The ObjectInterceptor does not have any instance methods.
+      return;
+    }
+
     classElement.implementation.forEachMember(
         (ClassElement enclosing, Element member) {
           assert(invariant(classElement, member.isDeclaration));
@@ -667,6 +731,7 @@
   void visitClassFields(ClassElement classElement,
                         void addField(Element member,
                                       String name,
+                                      String accessorName,
                                       bool needsGetter,
                                       bool needsSetter,
                                       bool needsCheckedSetter)) {
@@ -702,9 +767,11 @@
       if ((isInstantiated && !enclosingClass.isNative())
           || needsGetter
           || needsSetter) {
-        String fieldName = isShadowed
+        String accessorName = isShadowed
             ? namer.shadowedFieldName(member)
             : namer.getName(member);
+        String fieldName = enclosingClass.isNative() ?
+            member.name.slowToString() : accessorName;
         bool needsCheckedSetter = false;
         if (needsSetter && compiler.enableTypeAssertions
             && canGenerateCheckedSetter(member)) {
@@ -714,6 +781,7 @@
         // Getters and setters with suffixes will be generated dynamically.
         addField(member,
                  fieldName,
+                 accessorName,
                  needsGetter,
                  needsSetter,
                  needsCheckedSetter);
@@ -730,13 +798,17 @@
         includeSuperMembers: isInstantiated && !classElement.isNative());
   }
 
-  void generateGetter(Element member, String fieldName, CodeBuffer buffer) {
-    String getterName = namer.getterName(member.getLibrary(), member.name);
+  void generateGetter(Element member, String fieldName, String accessorName,
+                      CodeBuffer buffer) {
+    String getterName =
+        namer.getterName(member.getLibrary(), new SourceString(accessorName));
     buffer.add("$getterName: function() { return this.$fieldName; }");
   }
 
-  void generateSetter(Element member, String fieldName, CodeBuffer buffer) {
-    String setterName = namer.setterName(member.getLibrary(), member.name);
+  void generateSetter(Element member, String fieldName, String accessorName,
+                      CodeBuffer buffer) {
+    String setterName =
+        namer.setterName(member.getLibrary(), new SourceString(accessorName));
     buffer.add("$setterName: function(v) { this.$fieldName = v; }");
   }
 
@@ -753,6 +825,7 @@
 
   void generateCheckedSetter(Element member,
                              String fieldName,
+                             String accessorName,
                              CodeBuffer buffer) {
     assert(canGenerateCheckedSetter(member));
     DartType type = member.computeType(compiler);
@@ -763,7 +836,8 @@
     if (helperElement.computeSignature(compiler).parameterCount != 1) {
       additionalArgument = ", '${namer.operatorIs(type.element)}'";
     }
-    String setterName = namer.setterName(member.getLibrary(), member.name);
+    String setterName =
+        namer.publicSetterName(new SourceString(accessorName));
     buffer.add("$setterName: function(v) { "
         "this.$fieldName = $helperName(v$additionalArgument); }");
   }
@@ -777,6 +851,7 @@
     bool isFirstField = true;
     visitClassFields(classElement, (Element member,
                                     String name,
+                                    String accessorName,
                                     bool needsGetter,
                                     bool needsSetter,
                                     bool needsCheckedSetter) {
@@ -785,13 +860,19 @@
       } else {
         buffer.add(", ");
       }
-      buffer.add('"$name');
+      buffer.add('"$accessorName');
+      int flag = 0;
+      if (name != accessorName) {
+        buffer.add(':$name');
+        assert(needsGetter || needsSetter);
+        flag = RENAMING_FLAG;
+      }
       if (needsGetter && needsSetter) {
-        buffer.add(GETTER_SETTER_SUFFIX);
+        buffer.addCharCode(GETTER_SETTER_CODE + flag);
       } else if (needsGetter) {
-        buffer.add(GETTER_SUFFIX);
+        buffer.addCharCode(GETTER_CODE + flag);
       } else if (needsSetter) {
-        buffer.add(SETTER_SUFFIX);
+        buffer.addCharCode(SETTER_CODE + flag);
       }
       buffer.add('"');
     });
@@ -803,6 +884,7 @@
                                {bool omitLeadingComma: false}) {
     visitClassFields(classElement, (Element member,
                                     String name,
+                                    String accessorName,
                                     bool needsGetter,
                                     bool needsSetter,
                                     bool needsCheckedSetter) {
@@ -813,7 +895,7 @@
         } else {
           omitLeadingComma = false;
         }
-        generateCheckedSetter(member, name, buffer);
+        generateCheckedSetter(member, name, accessorName, buffer);
       }
     });
   }
@@ -855,6 +937,39 @@
     buffer.add('\n};\n\n');
   }
 
+  void emitInterceptorMethods(
+      void defineInstanceMember(String name, StringBuffer memberBuffer)) {
+    JavaScriptBackend backend = compiler.backend;
+    // Emit forwarders for the ObjectInterceptor class. We need to
+    // emit all possible sends on intercepted methods.
+    for (Selector selector in backend.usedInterceptors) {
+      String name;
+      String comma = '';
+      String parameters = '';
+      if (selector.isGetter()) {
+        name = backend.namer.getterName(selector.library, selector.name);
+      } else if (selector.isSetter()) {
+        name = backend.namer.setterName(selector.library, selector.name);
+      } else {
+        assert(selector.isCall());
+        name = backend.namer.instanceMethodInvocationName(
+            selector.library, selector.name, selector);
+        if (selector.argumentCount > 0) {
+          comma = ', ';
+          int i = 0;
+          for (; i < selector.argumentCount - 1; i++) {
+            parameters = '${parameters}a$i, ';
+          }
+          parameters = '${parameters}a$i';
+        }
+      }
+      StringBuffer body = new StringBuffer(
+          "function(receiver$comma$parameters) {"
+              " return receiver.$name($parameters); }");
+      defineInstanceMember(name, body);
+    }
+  }
+
   /**
    * Generate "is tests" for [cls]: itself, and the "is tests" for the
    * classes it implements. We don't need to add the "is tests" of the
@@ -866,6 +981,12 @@
       emitIsTest(cls);
     }
     Set<Element> generated = new Set<Element>();
+    // A class that defines a [:call:] method implicitly implements
+    // [Function].
+    if (checkedClasses.contains(compiler.functionClass)
+        && cls.lookupLocalMember(Compiler.CALL_OPERATOR_NAME) != null) {
+      generateInterfacesIsTests(compiler.functionClass, emitIsTest, generated);
+    }
     for (DartType interfaceType in cls.interfaces) {
       generateInterfacesIsTests(interfaceType.element, emitIsTest, generated);
     }
@@ -1000,7 +1121,7 @@
       // create a fake element with the correct name.
       // Note: the callElement will not have any enclosingElement.
       FunctionElement callElement =
-          new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, element);
+          new ClosureInvocationElement(namer.CLOSURE_INVOCATION_NAME, element);
       String staticName = namer.getName(element);
       String invocationName = namer.instanceMethodName(callElement);
       String fieldAccess = '$isolateProperties.$staticName';
@@ -1016,11 +1137,13 @@
   }
 
   void emitBoundClosureClassHeader(String mangledName,
-                             String superName,
-                             CodeBuffer buffer) {
+                                   String superName,
+                                   String extraArgument,
+                                   CodeBuffer buffer) {
+    extraArgument = extraArgument.isEmpty ? '' : ", '$extraArgument'";
     buffer.add("""
 $classesCollector.$mangledName = {'':
-['self', 'target'],
+['self'$extraArgument, 'target'],
 'super': '$superName',
 """);
   }
@@ -1057,8 +1180,27 @@
     bool hasOptionalParameters = member.optionalParameterCount(compiler) != 0;
     int parameterCount = member.parameterCount(compiler);
 
+    Map<int, String> cache;
+    String extraArg;
+    String extraArgWithThis;
+    String extraArgWithoutComma;
+    // Methods on foreign classes take an extra parameter, which is
+    // the actual receiver of the call.
+    JavaScriptBackend backend = compiler.backend;
+    if (backend.isInterceptorClass(member.getEnclosingClass())) {
+      cache = interceptorClosureCache;
+      extraArg = 'receiver, ';
+      extraArgWithThis = 'this.receiver, ';
+      extraArgWithoutComma = 'receiver';
+    } else {
+      cache = boundClosureCache;
+      extraArg = '';
+      extraArgWithoutComma = '';
+      extraArgWithThis = '';
+    }
+
     String closureClass =
-        hasOptionalParameters ? null : boundClosureCache[parameterCount];
+        hasOptionalParameters ? null : cache[parameterCount];
     if (closureClass == null) {
       // Either the class was not cached yet, or there are optional parameters.
       // Create a new closure class.
@@ -1071,13 +1213,14 @@
 
       // Define the constructor with a name so that Object.toString can
       // find the class name of the closure class.
-      emitBoundClosureClassHeader(mangledName, superName, boundClosureBuffer);
+      emitBoundClosureClassHeader(
+          mangledName, superName, extraArgWithoutComma, boundClosureBuffer);
       // Now add the methods on the closure class. The instance method does not
       // have the correct name. Since [addParameterStubs] use the name to create
       // its stubs we simply create a fake element with the correct name.
       // Note: the callElement will not have any enclosingElement.
       FunctionElement callElement =
-          new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, member);
+          new ClosureInvocationElement(namer.CLOSURE_INVOCATION_NAME, member);
 
       String invocationName = namer.instanceMethodName(callElement);
       List<String> arguments = new List<String>(parameterCount);
@@ -1087,7 +1230,8 @@
       String joinedArgs = Strings.join(arguments, ", ");
       boundClosureBuffer.add(
           "$invocationName: function($joinedArgs) {");
-      boundClosureBuffer.add(" return this.self[this.target]($joinedArgs);");
+      boundClosureBuffer.add(
+          " return this.self[this.target]($extraArgWithThis$joinedArgs);");
       boundClosureBuffer.add(" }");
       addParameterStubs(callElement, (String stubName, CodeBuffer memberValue) {
         boundClosureBuffer.add(',\n $stubName: $memberValue');
@@ -1098,7 +1242,7 @@
 
       // Cache it.
       if (!hasOptionalParameters) {
-        boundClosureCache[parameterCount] = closureClass;
+        cache[parameterCount] = closureClass;
       }
     }
 
@@ -1106,8 +1250,8 @@
     String getterName = namer.getterName(member.getLibrary(), member.name);
     String targetName = namer.instanceMethodName(member);
     CodeBuffer getterBuffer = new CodeBuffer();
-    getterBuffer.add(
-        "function() { return new $closureClass(this, '$targetName'); }");
+    getterBuffer.add("function($extraArgWithoutComma) "
+        "{ return new $closureClass(this, $extraArg'$targetName'); }");
     defineInstanceMember(getterName, getterBuffer);
   }
 
@@ -1133,7 +1277,7 @@
         String invocationName =
             namer.instanceMethodInvocationName(memberLibrary, member.name,
                                                selector);
-        SourceString callName = Namer.CLOSURE_INVOCATION_NAME;
+        SourceString callName = namer.CLOSURE_INVOCATION_NAME;
         String closureCallName =
             namer.instanceMethodInvocationName(memberLibrary, callName,
                                                selector);
@@ -1308,11 +1452,14 @@
       }
       String internalName = namer.instanceMethodInvocationName(
           selector.library, new SourceString(methodName), selector);
+      Element createInvocationMirror =
+          compiler.findHelper(const SourceString('createInvocationMirror'));
       CodeBuffer buffer = new CodeBuffer();
       buffer.add('function($args) {\n');
       buffer.add('  return this.$noSuchMethodName('
-                     '\$.createInvocationMirror("$methodName", "$internalName",'
-                     ' $type, [$args], [$argNames]));\n');
+                        '${namer.isolateAccess(createInvocationMirror)}('
+                            '"$methodName", "$internalName",'
+                            '$type, [$args], [$argNames]));\n');
       buffer.add(' }');
       return buffer;
     }
@@ -1485,10 +1632,10 @@
 //
 // BEGIN invoke [main].
 //
-if (typeof document != 'undefined' && document.readyState != 'complete') {
+if (typeof document !== 'undefined' && document.readyState != 'complete') {
   document.addEventListener('readystatechange', function () {
     if (document.readyState == 'complete') {
-      if (typeof dartMainRunner == 'function') {
+      if (typeof dartMainRunner === 'function') {
         dartMainRunner(function() { ${mainCall}; });
       } else {
         ${mainCall};
@@ -1496,7 +1643,7 @@
     }
   }, false);
 } else {
-  if (typeof dartMainRunner == 'function') {
+  if (typeof dartMainRunner === 'function') {
     dartMainRunner(function() { ${mainCall}; });
   } else {
     ${mainCall};
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
index db2463e..00563f0 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
@@ -61,14 +61,27 @@
 
   void emitBoundClosureClassHeader(String mangledName,
                                    String superName,
+                                   String extraArgument,
                                    CodeBuffer buffer) {
-    buffer.add("""
+    if (!extraArgument.isEmpty) {
+      buffer.add("""
+$classesCollector.$mangledName = {'': function $mangledName(
+    self, $extraArgument, target) {
+  this.self = self;
+  this.$extraArgument = $extraArgument,
+  this.target = target;
+ },
+ 'super': '$superName',
+""");
+    } else {
+      buffer.add("""
 $classesCollector.$mangledName = {'': function $mangledName(self, target) {
   this.self = self;
   this.target = target;
  },
  'super': '$superName',
 """);
+    }
   }
 
   void emitClassConstructor(ClassElement classElement, CodeBuffer buffer) {
@@ -83,6 +96,7 @@
     List<String> fields = <String>[];
     visitClassFields(classElement, (Element member,
                                     String name,
+                                    String accessorName,
                                     bool needsGetter,
                                     bool needsSetter,
                                     bool needsCheckedSetter) {
@@ -123,21 +137,22 @@
 
     visitClassFields(classElement, (Element member,
                                     String name,
+                                    String accessorName,
                                     bool needsGetter,
                                     bool needsSetter,
                                     bool needsCheckedSetter) {
       if (needsGetter) {
         emitComma();
-        generateGetter(member, name, buffer);
+        generateGetter(member, name, accessorName, buffer);
       }
       if (needsSetter) {
         emitComma();
-        generateSetter(member, name, buffer);
+        generateSetter(member, name, accessorName, buffer);
       }
       if (needsCheckedSetter) {
         assert(!needsSetter);
         emitComma();
-        generateCheckedSetter(member, name, buffer);
+        generateCheckedSetter(member, name, accessorName, buffer);
       }
     });
   }
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
index 3085bf2..2a9d4da 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
@@ -23,4 +23,5 @@
 part 'emitter.dart';
 part 'emitter_no_eval.dart';
 part 'namer.dart';
+part 'minify_namer.dart';
 part 'native_emitter.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
new file mode 100644
index 0000000..f252b54
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
@@ -0,0 +1,106 @@
+// 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.
+
+/**
+ * Assigns JavaScript identifiers to Dart variables, class-names and members.
+ */
+class MinifyNamer extends Namer {
+  MinifyNamer(Compiler compiler) : super(compiler);
+
+  String get ISOLATE => 'I';
+  String get ISOLATE_PROPERTIES => 'p';
+  bool get shouldMinify => true;
+
+  const ALPHABET_CHARACTERS = 52;  // a-zA-Z.
+  const ALPHANUMERIC_CHARACTERS = 62;  // a-zA-Z0-9.
+
+  // You can pass an invalid identifier to this and unlike its non-minifying
+  // counterpart it will never return the proposedName as the new fresh name.
+  String getFreshName(String proposedName, Set<String> usedNames) {
+    var freshName = _getUnusedName(proposedName, usedNames);
+    usedNames.add(freshName);
+    return freshName;
+  }
+
+  // This gets a minified name based on a hash of the proposed name.  This
+  // is slightly less efficient than just getting the next name in a series,
+  // but it means that small changes in the input program will give smallish
+  // changes in the output, which can be useful for diffing etc.
+  String _getUnusedName(String proposedName, Set<String> usedNames) {
+    // Try single-character names with characters that occur in the
+    // input.
+    for (int i = 0; i < proposedName.length; i++) {
+      String candidate = proposedName[i];
+      int code = candidate.charCodeAt(0);
+      if (code < $A) continue;
+      if (code > $z) continue;
+      if (code > $Z && code < $a) continue;
+      if (!usedNames.contains(candidate)) return candidate;
+    }
+
+    int hash = _calculateHash(proposedName);
+    // Avoid very small hashes that won't try many names.
+    hash = hash < 1000 ? hash * 314159 : hash;  // Yes, it's prime.
+
+    // Try other n-character names based on the hash.  We try one to three
+    // character identifiers.  For each length we try around 10 different names
+    // in a predictable order determined by the proposed name.  This is in order
+    // to make the renamer stable: small changes in the input should nornally
+    // result in relatively small changes in the output.
+    for (var n = 1; n <= 3; n++) {
+      int h = hash;
+      while (h > 10) {
+        var codes = <int>[_letterNumber(h)];
+        int h2 = h ~/ ALPHABET_CHARACTERS;
+        for (var i = 1; i < n; i++) {
+          codes.add(_alphaNumericNumber(h2));
+          h2 ~/= ALPHANUMERIC_CHARACTERS;
+        }
+        final candidate = new String.fromCharCodes(codes);
+        if (!usedNames.contains(candidate) && !jsReserved.contains(candidate)) {
+          return candidate;
+        }
+        // Try again with a slightly different hash.  After around 10 turns
+        // around this loop h is zero and we try a longer name.
+        h ~/= 7;
+      }
+    }
+
+    // If we can't find a hash based name in the three-letter space, then base
+    // the name on a letter and a counter.
+    var startLetter = new String.fromCharCodes([_letterNumber(hash)]);
+    var i = 0;
+    while (usedNames.contains("$startLetter$i")) {
+      i++;
+    }
+    return "$startLetter$i";
+  }
+
+  int _calculateHash(String name) {
+    int h = 0;
+    for (int i = 0; i < name.length; i++) {
+      h += name.charCodeAt(i);
+      h &= 0xffffffff;
+      h += h << 10;
+      h &= 0xffffffff;
+      h ^= h >> 6;
+      h &= 0xffffffff;
+    }
+    return h;
+  }
+
+  int _letterNumber(int x) {
+    if (x >= ALPHABET_CHARACTERS) x %= ALPHABET_CHARACTERS;
+    if (x < 26) return $a + x;
+    return $A + x - 26;
+  }
+
+  int _alphaNumericNumber(int x) {
+    if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS;
+    if (x < 26) return $a + x;
+    if (x < 52) return $A + x - 26;
+    return $0 + x - 52;
+  }
+
+}
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 1236aa6..3d134c2 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -8,8 +8,6 @@
  * Assigns JavaScript identifiers to Dart variables, class-names and members.
  */
 class Namer {
-  final Compiler compiler;
-
   static Set<String> _jsReserved = null;
   Set<String> get jsReserved {
     if (_jsReserved == null) {
@@ -20,32 +18,59 @@
     return _jsReserved;
   }
 
+  final String CURRENT_ISOLATE = r'$';
+
   /**
    * Map from top-level or static elements to their unique identifiers provided
    * by [getName].
    *
    * Invariant: Keys must be declaration elements.
    */
+  final Compiler compiler;
   final Map<Element, String> globals;
-  final Map<String, int> usedGlobals;
   final Map<String, LibraryElement> shortPrivateNameOwners;
+  final Set<String> usedGlobalNames;
+  final Set<String> usedInstanceNames;
+  final Map<String, String> instanceNameMap;
+  final Map<String, String> globalNameMap;
+  final Map<String, int> popularNameCounters;
+
+  /**
+   * A cache of names used for bailout methods. We make sure two
+   * bailout methods cannot have the same name because if the two
+   * bailout methods are in a class and a subclass, we would
+   * call the wrong bailout method at runtime. To make it
+   * simple, we don't keep track of inheritance and always avoid
+   * similar names.
+   */
+  final Set<String> usedBailoutInstanceNames;
+  final Map<Element, String> bailoutNames;
 
   final Map<Constant, String> constantNames;
 
   Namer(this.compiler)
       : globals = new Map<Element, String>(),
-        usedGlobals = new Map<String, int>(),
         shortPrivateNameOwners = new Map<String, LibraryElement>(),
-        constantNames = new Map<Constant, String>();
+        bailoutNames = new Map<Element, String>(),
+        usedBailoutInstanceNames = new Set<String>(),
+        usedGlobalNames = new Set<String>(),
+        usedInstanceNames = new Set<String>(),
+        instanceNameMap = new Map<String, String>(),
+        globalNameMap = new Map<String, String>(),
+        constantNames = new Map<Constant, String>(),
+        popularNameCounters = new Map<String, int>();
 
-  final String CURRENT_ISOLATE = r'$';
-  final String ISOLATE = 'Isolate';
-  final String ISOLATE_PROPERTIES = r"$isolateProperties";
-  /** Some closures must contain their name. The name is stored in
-    * [STATIC_CLOSURE_NAME_NAME]. */
-  final String STATIC_CLOSURE_NAME_NAME = r'$name';
-  static const SourceString CLOSURE_INVOCATION_NAME =
-      Compiler.CALL_OPERATOR_NAME;
+  String get ISOLATE => 'Isolate';
+  String get ISOLATE_PROPERTIES => r'$isolateProperties';
+  /**
+   * Some closures must contain their name. The name is stored in
+   * [STATIC_CLOSURE_NAME_NAME].
+   */
+  String get STATIC_CLOSURE_NAME_NAME => r'$name';
+  SourceString get CLOSURE_INVOCATION_NAME => Compiler.CALL_OPERATOR_NAME;
+  bool get shouldMinify => false;
+
+  bool isReserved(String name) => name == ISOLATE;
 
   String constantName(Constant constant) {
     // In the current implementation it doesn't make sense to give names to
@@ -54,16 +79,30 @@
     assert(!constant.isFunction());
     String result = constantNames[constant];
     if (result == null) {
-      result = getFreshGlobalName("CTC");
+      String longName;
+      if (shouldMinify) {
+        if (constant.isString()) {
+          StringConstant stringConstant = constant;
+          // The minifier never returns the same string as we suggested so we
+          // can suggest any name and it will use it as input to the hashing
+          // algorithm.  This means that constants will tend to have the same
+          // name from version to version of the program being minfied.
+          longName = stringConstant.value.slowToString();
+        } else {
+          longName = "C";
+        }
+      } else {
+        longName = "CTC";
+      }
+      result = getFreshName(longName, usedGlobalNames);
       constantNames[constant] = result;
     }
     return result;
   }
 
   String closureInvocationName(Selector selector) {
-    // TODO(floitsch): mangle, while not conflicting with instance names.
-    return instanceMethodInvocationName(null, CLOSURE_INVOCATION_NAME,
-                                        selector);
+    return
+        instanceMethodInvocationName(null, CLOSURE_INVOCATION_NAME, selector);
   }
 
   String breakLabelName(LabelElement label) {
@@ -89,6 +128,7 @@
    * mangles the [name] so that each library has a unique name.
    */
   String privateName(LibraryElement lib, SourceString name) {
+    String result;
     if (name.isPrivate()) {
       String nameString = name.slowToString();
       // The first library asking for a short private name wins.
@@ -97,21 +137,26 @@
       // If a private name could clash with a mangled private name we don't
       // use the short name. For example a private name "_lib3_foo" would
       // clash with "_foo" from "lib3".
-      if (identical(owner, lib) && !nameString.startsWith('_$LIBRARY_PREFIX')) {
-        return nameString;
+      if (owner == lib &&
+          !nameString.startsWith('_$LIBRARY_PREFIX') &&
+          !shouldMinify) {
+        result = nameString;
+      } else {
+        String libName = getName(lib);
+        // If a library name does not start with the [LIBRARY_PREFIX] then our
+        // assumptions about clashing with mangled private members do not hold.
+        assert(shouldMinify || libName.startsWith(LIBRARY_PREFIX));
+        // TODO(erikcorry): Fix this with other manglings to avoid clashes.
+        result = '_lib$libName\$$nameString';
       }
-      String libName = getName(lib);
-      // If a library name does not start with the [LIBRARY_PREFIX] then our
-      // assumptions about clashing with mangled private members do not hold.
-      assert(libName.startsWith(LIBRARY_PREFIX));
-      return '_$libName$nameString';
     } else {
-      return name.slowToString();
+      result = name.slowToString();
     }
+    return result;
   }
 
   String instanceMethodName(FunctionElement element) {
-    SourceString name = element.name;
+    SourceString name = Elements.operatorNameToIdentifier(element.name);
     LibraryElement lib = element.getLibrary();
     if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
       ConstructorBodyElement bodyElement = element;
@@ -120,24 +165,32 @@
     FunctionSignature signature = element.computeSignature(compiler);
     String methodName =
         '${privateName(lib, name)}\$${signature.parameterCount}';
-    if (!signature.optionalParametersAreNamed) {
-      return methodName;
-    } else if (!signature.optionalParameters.isEmpty) {
+    if (signature.optionalParametersAreNamed &&
+        !signature.optionalParameters.isEmpty) {
       StringBuffer buffer = new StringBuffer();
       signature.orderedOptionalParameters.forEach((Element element) {
         buffer.add('\$${JsNames.getValid(element.name.slowToString())}');
       });
-      return '$methodName$buffer';
+      methodName = '$methodName$buffer';
     }
+    if (name == CLOSURE_INVOCATION_NAME) return methodName;
+    return getMappedInstanceName(methodName);
   }
 
   String publicInstanceMethodNameByArity(SourceString name, int arity) {
+    name = Elements.operatorNameToIdentifier(name);
     assert(!name.isPrivate());
-    return '${name.slowToString()}\$$arity';
+    var base = name.slowToString();
+    // We don't mangle the closure invoking function name because it is
+    // generated in applyFunction.
+    var proposedName = '$base\$$arity';
+    if (base == CLOSURE_INVOCATION_NAME) return proposedName;
+    return getMappedInstanceName(proposedName);
   }
 
   String instanceMethodInvocationName(LibraryElement lib, SourceString name,
                                       Selector selector) {
+    name = Elements.operatorNameToIdentifier(name);
     // TODO(floitsch): mangle, while preserving uniqueness.
     StringBuffer buffer = new StringBuffer();
     List<SourceString> names = selector.getOrderedNamedArguments();
@@ -145,12 +198,16 @@
       buffer.add(r'$');
       argumentName.printOn(buffer);
     }
-    return '${privateName(lib, name)}\$${selector.argumentCount}$buffer';
+    if (name == CLOSURE_INVOCATION_NAME) {
+      return '$CLOSURE_INVOCATION_NAME\$${selector.argumentCount}$buffer';
+    }
+    return getMappedInstanceName(
+        '${privateName(lib, name)}\$${selector.argumentCount}$buffer');
   }
 
   String instanceFieldName(LibraryElement libraryElement, SourceString name) {
     String proposedName = privateName(libraryElement, name);
-    return safeName(proposedName);
+    return getMappedInstanceName(proposedName);
   }
 
   String shadowedFieldName(Element fieldElement) {
@@ -159,45 +216,71 @@
     String libName = getName(libraryElement);
     String clsName = getName(cls);
     String instanceName = instanceFieldName(libraryElement, fieldElement.name);
-    return safeName('$libName\$$clsName\$$instanceName');
+    return getMappedInstanceName('$libName\$$clsName\$$instanceName');
   }
 
   String setterName(LibraryElement lib, SourceString name) {
     // We dynamically create setters from the field-name. The setter name must
     // therefore be derived from the instance field-name.
-    String fieldName = safeName(privateName(lib, name));
+    String fieldName = getMappedInstanceName(privateName(lib, name));
     return 'set\$$fieldName';
   }
 
   String publicGetterName(SourceString name) {
     // We dynamically create getters from the field-name. The getter name must
     // therefore be derived from the instance field-name.
-    String fieldName = safeName(name.slowToString());
+    String fieldName = getMappedInstanceName(name.slowToString());
     return 'get\$$fieldName';
   }
 
   String getterName(LibraryElement lib, SourceString name) {
     // We dynamically create getters from the field-name. The getter name must
     // therefore be derived from the instance field-name.
-    String fieldName = safeName(privateName(lib, name));
+    String fieldName = getMappedInstanceName(privateName(lib, name));
     return 'get\$$fieldName';
   }
 
-  String getFreshGlobalName(String proposedName) {
-    String name = proposedName;
-    int count = usedGlobals[name];
-    if (count != null) {
-      // Not the first time we see this name. Append a number to make it unique.
-      do {
-        name = '$proposedName${count++}';
-      } while (usedGlobals[name] != null);
-      // Record the count in case we see this name later. We
-      // frequently see names multiple times, as all our closures use
-      // the same name for their class.
-      usedGlobals[proposedName] = count;
+  String publicSetterName(SourceString name) {
+    // We dynamically create setter from the field-name. The setter name must
+    // therefore be derived from the instance field-name.
+    String fieldName = name.slowToString();
+    return 'set\$$fieldName';
+  }
+
+  String getMappedGlobalName(String proposedName) {
+    var newName = globalNameMap[proposedName];
+    if (newName == null) {
+      newName = getFreshName(proposedName, usedGlobalNames);
+      globalNameMap[proposedName] = newName;
     }
-    usedGlobals[name] = 0;
-    return name;
+    return newName;
+  }
+
+  String getMappedInstanceName(String proposedName) {
+    var newName = instanceNameMap[proposedName];
+    if (newName == null) {
+      newName = getFreshName(proposedName, usedInstanceNames);
+      instanceNameMap[proposedName] = newName;
+    }
+    return newName;
+  }
+
+  String getFreshName(String proposedName, Set<String> usedNames) {
+    var candidate;
+    proposedName = safeName(proposedName);
+    if (!usedNames.contains(proposedName)) {
+      candidate = proposedName;
+    } else {
+      var counter = popularNameCounters[proposedName];
+      var i = counter == null ? 0 : counter;
+      while (usedNames.contains("$proposedName$i")) {
+        i++;
+      }
+      popularNameCounters[proposedName] = i + 1;
+      candidate = "$proposedName$i";
+    }
+    usedNames.add(candidate);
+    return candidate;
   }
 
   static const String LIBRARY_PREFIX = "lib";
@@ -225,17 +308,33 @@
       } else {
         name = element.name.slowToString();
       }
-    } else if (identical(element.kind, ElementKind.LIBRARY)) {
+    } else if (element.isLibrary()) {
       name = LIBRARY_PREFIX;
     } else {
       name = element.name.slowToString();
     }
     // Prefix the name with '$' if it is reserved.
-    return safeName(name);
+    return name;
   }
 
   String getBailoutName(Element element) {
-    return '${getName(element)}\$bailout';
+    String name = bailoutNames[element];
+    if (name != null) return name;
+    bool global = !element.isInstanceMember();
+    String unminifiedName = '${getName(element)}\$bailout';
+    if (global) {
+      name = getMappedGlobalName(unminifiedName);
+    } else {
+      name = unminifiedName;
+      int i = 0;
+      while (usedBailoutInstanceNames.contains(name)) {
+        name = '$unminifiedName${i++}';
+      }
+      name = getMappedInstanceName(name);
+      usedBailoutInstanceNames.add(name);
+    }
+    bailoutNames[element] = name;
+    return name;
   }
 
   /**
@@ -274,17 +373,25 @@
       if (identical(kind, ElementKind.VARIABLE) ||
           identical(kind, ElementKind.PARAMETER)) {
         // The name is not guaranteed to be unique.
-        return guess;
+        return safeName(guess);
       }
-      if (identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR) ||
-          identical(kind, ElementKind.FUNCTION) ||
-          identical(kind, ElementKind.CLASS) ||
-          identical(kind, ElementKind.FIELD) ||
-          identical(kind, ElementKind.GETTER) ||
-          identical(kind, ElementKind.SETTER) ||
-          identical(kind, ElementKind.TYPEDEF) ||
-          identical(kind, ElementKind.LIBRARY)) {
-        String result = getFreshGlobalName(guess);
+      if (kind == ElementKind.GENERATIVE_CONSTRUCTOR ||
+          kind == ElementKind.FUNCTION ||
+          kind == ElementKind.CLASS ||
+          kind == ElementKind.FIELD ||
+          kind == ElementKind.GETTER ||
+          kind == ElementKind.SETTER ||
+          kind == ElementKind.TYPEDEF ||
+          kind == ElementKind.LIBRARY) {
+        bool isNative = false;
+        if (identical(kind, ElementKind.CLASS)) {
+          ClassElement class_elt = element;
+          isNative = class_elt.isNative();
+        }
+        if (Elements.isInstanceField(element)) {
+          isNative = element.isNative();
+        }
+        String result = isNative ? guess : getFreshName(guess, usedGlobalNames);
         globals[element] = result;
         return result;
       }
@@ -294,9 +401,8 @@
   }
 
   String getLazyInitializerName(Element element) {
-    // TODO(floitsch): mangle while not conflicting with other statics.
     assert(Elements.isStaticOrTopLevelField(element));
-    return "get\$${getName(element)}";
+    return getMappedGlobalName("get\$${getName(element)}");
   }
 
   String isolatePropertiesAccess(Element element) {
@@ -312,7 +418,8 @@
   }
 
   String isolateBailoutAccess(Element element) {
-    return '${isolateAccess(element)}\$bailout';
+    String newName = getMappedGlobalName('${getName(element)}\$bailout');
+    return '$CURRENT_ISOLATE.$newName';
   }
 
   String isolateLazyInitializerAccess(Element element) {
@@ -320,6 +427,7 @@
   }
 
   String operatorIs(Element element) {
+    // TODO(erikcorry): Reduce from is$x to ix when we are minifying.
     return 'is\$${getName(element)}';
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index f75c3d7..253c1fa 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -27,8 +27,8 @@
   }
 
   patch Type get runtimeType {
-    String key = getRuntimeTypeString(this);
-    return getOrCreateCachedRuntimeType(key);
+    String type = getRuntimeTypeString(this);
+    return new TypeImpl(type);
   }
 }
 
@@ -36,7 +36,7 @@
 patch class Function {
   patch static apply(Function function,
                      List positionalArguments,
-                     [Map<String,Dynamic> namedArguments]) {
+                     [Map<String,dynamic> namedArguments]) {
     return Primitives.applyFunction(
         function, positionalArguments, namedArguments);
   }
@@ -167,8 +167,7 @@
 }
 
 
-// Patch for String implementation.
-patch class _StringImpl {
+patch class String {
   patch factory String.fromCharCodes(List<int> charCodes) {
     checkNull(charCodes);
     if (!isJsArray(charCodes)) {
@@ -177,7 +176,10 @@
     }
     return Primitives.stringFromCharCodes(charCodes);
   }
+}
 
+// Patch for String implementation.
+patch class Strings {
   patch static String join(List<String> strings, String separator) {
     checkNull(strings);
     checkNull(separator);
@@ -212,3 +214,12 @@
     return array;
   }
 }
+
+patch class RegExp {
+  patch factory RegExp(String pattern,
+                       {bool multiLine: false,
+                        bool ignoreCase: false})
+    => new JSSyntaxRegExp(pattern,
+                          multiLine: multiLine,
+                          ignoreCase: ignoreCase);
+}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/coreimpl_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/coreimpl_patch.dart
deleted file mode 100644
index 4ef493e..0000000
--- a/sdk/lib/_internal/compiler/implementation/lib/coreimpl_patch.dart
+++ /dev/null
@@ -1,131 +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.
-
-// Patch file for dart:coreimpl classes.
-
-// Patch for RegExp implementation.
-// TODO(ager): Split out into regexp_patch.dart and allow #source in
-// patch files?
-patch class JSSyntaxRegExp {
-  final String _pattern;
-  final bool _multiLine;
-  final bool _ignoreCase;
-
-  patch const JSSyntaxRegExp(String pattern,
-                             {bool multiLine: false,
-                              bool ignoreCase: false})
-      : _pattern = pattern,
-        _multiLine = multiLine,
-        _ignoreCase = ignoreCase;
-
-  patch Match firstMatch(String str) {
-    List<String> m = regExpExec(this, checkString(str));
-    if (m == null) return null;
-    var matchStart = regExpMatchStart(m);
-    // m.lastIndex only works with flag 'g'.
-    var matchEnd = matchStart + m[0].length;
-    return new _MatchImplementation(pattern, str, matchStart, matchEnd, m);
-  }
-
-  patch bool hasMatch(String str) => regExpTest(this, checkString(str));
-
-  patch String stringMatch(String str) {
-    var match = firstMatch(str);
-    return match == null ? null : match.group(0);
-  }
-
-  patch Iterable<Match> allMatches(String str) {
-    checkString(str);
-    return new _AllMatchesIterable(this, str);
-  }
-
-  patch String get pattern => _pattern;
-  patch bool get multiLine => _multiLine;
-  patch bool get ignoreCase => _ignoreCase;
-
-  static JSSyntaxRegExp _globalVersionOf(JSSyntaxRegExp other) {
-    JSSyntaxRegExp re = new JSSyntaxRegExp(other.pattern,
-                                           multiLine: other.multiLine,
-                                           ignoreCase: other.ignoreCase);
-    regExpAttachGlobalNative(re);
-    return re;
-  }
-
-  _getNative() => regExpGetNative(this);
-}
-
-class _MatchImplementation implements Match {
-  final String pattern;
-  final String str;
-  final int start;
-  final int end;
-  final List<String> _groups;
-
-  const _MatchImplementation(
-      String this.pattern,
-      String this.str,
-      int this.start,
-      int this.end,
-      List<String> this._groups);
-
-  String group(int index) => _groups[index];
-  String operator [](int index) => group(index);
-  int get groupCount => _groups.length - 1;
-
-  List<String> groups(List<int> groups) {
-    List<String> out = [];
-    for (int i in groups) {
-      out.add(group(i));
-    }
-    return out;
-  }
-}
-
-class _AllMatchesIterable implements Iterable<Match> {
-  final JSSyntaxRegExp _re;
-  final String _str;
-
-  const _AllMatchesIterable(this._re, this._str);
-
-  Iterator<Match> iterator() => new _AllMatchesIterator(_re, _str);
-}
-
-class _AllMatchesIterator implements Iterator<Match> {
-  final RegExp _re;
-  final String _str;
-  Match _next;
-  bool _done;
-
-  _AllMatchesIterator(JSSyntaxRegExp re, String this._str)
-    : _done = false, _re = JSSyntaxRegExp._globalVersionOf(re);
-
-  Match next() {
-    if (!hasNext) {
-      throw new StateError("No more elements");
-    }
-
-    // _next is set by [hasNext].
-    var next = _next;
-    _next = null;
-    return next;
-  }
-
-  bool get hasNext {
-    if (_done) {
-      return false;
-    } else if (_next != null) {
-      return true;
-    }
-
-    // firstMatch actually acts as nextMatch because of
-    // hidden global flag.
-    _next = _re.firstMatch(_str);
-    if (_next == null) {
-      _done = true;
-      return false;
-    } else {
-      return true;
-    }
-  }
-}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
index 2fc25a6..ca685dc 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
@@ -2,51 +2,35 @@
 // for 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:_interceptors');
+library _interceptors;
 
-#import('dart:collection');
+import 'dart:collection';
 
-add$1(var receiver, var value) {
-  if (isJsArray(receiver)) {
-    checkGrowable(receiver, 'add');
-    JS('Object', r'#.push(#)', receiver, value);
-    return;
-  }
-  return UNINTERCEPTED(receiver.add(value));
+part 'js_array.dart';
+part 'js_string.dart';
+
+/**
+ * The interceptor class for all non-primitive objects. All its
+ * members are synthethized by the compiler's emitter.
+ */
+class ObjectInterceptor {
+  const ObjectInterceptor();
 }
 
-removeAt$1(var receiver, var index) {
-  if (isJsArray(receiver)) {
-    if (index is !int) throw new ArgumentError(index);
-    if (index < 0 || index >= receiver.length) {
-      throw new RangeError.value(index);
-    }
-    checkGrowable(receiver, 'removeAt');
-    return JS("Object", r'#.splice(#, 1)[0]', receiver, index);
-  }
-  return UNINTERCEPTED(receiver.removeAt(index));
-}
-
-removeLast(var receiver) {
-  if (isJsArray(receiver)) {
-    checkGrowable(receiver, 'removeLast');
-    if (receiver.length == 0) throw new RangeError.value(-1);
-    return JS('Object', r'#.pop()', receiver);
-  }
-  return UNINTERCEPTED(receiver.removeLast());
-}
-
-filter(var receiver, var predicate) {
-  if (!isJsArray(receiver)) {
-    return UNINTERCEPTED(receiver.filter(predicate));
-  } else {
-    return Collections.filter(receiver, [], predicate);
-  }
+/**
+ * Get the interceptor for [object]. Called by the compiler when it needs
+ * to emit a call to an intercepted method, that is a method that is
+ * defined in an interceptor class.
+ */
+getInterceptor(object) {
+  if (object is String) return const JSString();
+  if (isJsArray(object)) return const JSArray();
+  return const ObjectInterceptor();
 }
 
 get$length(var receiver) {
   if (receiver is String || isJsArray(receiver)) {
-    return JS('num', r'#.length', receiver);
+    return JS('num', r'#.length', receiver);  // TODO(sra): Use 'int'?
   } else {
     return UNINTERCEPTED(receiver.length);
   }
@@ -66,7 +50,7 @@
 }
 
 toString(var value) {
-  if (JS('bool', r'typeof # == "object" && # !== null', value, value)) {
+  if (JS('bool', r'typeof # == "object" && # != null', value, value)) {
     if (isJsArray(value)) {
       return Collections.collectionToString(value);
     } else {
@@ -80,25 +64,7 @@
   if (JS('bool', r'typeof # == "function"', value)) {
     return 'Closure';
   }
-  return JS('string', r'String(#)', value);
-}
-
-iterator(receiver) {
-  if (isJsArray(receiver)) {
-    return new ListIterator(receiver);
-  }
-  return UNINTERCEPTED(receiver.iterator());
-}
-
-charCodeAt(var receiver, int index) {
-  if (receiver is String) {
-    if (index is !num) throw new ArgumentError(index);
-    if (index < 0) throw new RangeError.value(index);
-    if (index >= receiver.length) throw new RangeError.value(index);
-    return JS('int', r'#.charCodeAt(#)', receiver, index);
-  } else {
-    return UNINTERCEPTED(receiver.charCodeAt(index));
-  }
+  return JS('String', r'String(#)', value);
 }
 
 get$isEmpty(receiver) {
@@ -140,69 +106,11 @@
   }
 }
 
-addAll(receiver, collection) {
-  if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.addAll(collection));
-
-  // TODO(ahe): Use for-in when it is implemented correctly.
-  var iterator = collection.iterator();
-  while (iterator.hasNext) {
-    receiver.add(iterator.next());
+iterator(receiver) {
+  if (isJsArray(receiver)) {
+    return new ListIterator(receiver);
   }
-}
-
-addLast(receiver, value) {
-  if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.addLast(value));
-
-  checkGrowable(receiver, 'addLast');
-  JS('Object', r'#.push(#)', receiver, value);
-}
-
-clear(receiver) {
-  if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.clear());
-  receiver.length = 0;
-}
-
-forEach(receiver, f) {
-  if (!isJsArray(receiver)) {
-    return UNINTERCEPTED(receiver.forEach(f));
-  } else {
-    return Collections.forEach(receiver, f);
-  }
-}
-
-map(receiver, f) {
-  if (!isJsArray(receiver)) {
-    return UNINTERCEPTED(receiver.map(f));
-  } else {
-    return Collections.map(receiver, [], f);
-  }
-}
-
-reduce(receiver, initialValue, f) {
-  if (!isJsArray(receiver)) {
-    return UNINTERCEPTED(receiver.reduce(initialValue, f));
-  } else {
-    return Collections.reduce(receiver, initialValue, f);
-  }
-}
-
-getRange(receiver, start, length) {
-  if (!isJsArray(receiver)) {
-    return UNINTERCEPTED(receiver.getRange(start, length));
-  }
-  if (0 == length) return [];
-  checkNull(start); // TODO(ahe): This is not specified but co19 tests it.
-  checkNull(length); // TODO(ahe): This is not specified but co19 tests it.
-  if (start is !int) throw new ArgumentError(start);
-  if (length is !int) throw new ArgumentError(length);
-  if (length < 0) throw new ArgumentError(length);
-  if (start < 0) throw new RangeError.value(start);
-  var end = start + length;
-  if (end > receiver.length) {
-    throw new RangeError.value(length);
-  }
-  if (length < 0) throw new ArgumentError(length);
-  return JS('Object', r'#.slice(#, #)', receiver, start, end);
+  return UNINTERCEPTED(receiver.iterator());
 }
 
 indexOf$1(receiver, element) {
@@ -502,19 +410,6 @@
   return JS('String', r'#.toString(#)', receiver, radix);
 }
 
-allMatches(receiver, str) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.allMatches(str));
-  checkString(str);
-  return allMatchesInStringUnchecked(receiver, str);
-}
-
-concat(receiver, other) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.concat(other));
-
-  if (other is !String) throw new ArgumentError(other);
-  return JS('String', r'# + #', receiver, other);
-}
-
 contains$1(receiver, other) {
   if (receiver is String) {
     return contains$2(receiver, other, 0);
@@ -535,91 +430,6 @@
   return stringContainsUnchecked(receiver, other, startIndex);
 }
 
-endsWith(receiver, other) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.endsWith(other));
-
-  checkString(other);
-  int receiverLength = receiver.length;
-  int otherLength = other.length;
-  if (otherLength > receiverLength) return false;
-  return other == receiver.substring(receiverLength - otherLength);
-}
-
-replaceAll(receiver, from, to) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.replaceAll(from, to));
-
-  checkString(to);
-  return stringReplaceAllUnchecked(receiver, from, to);
-}
-
-replaceFirst(receiver, from, to) {
-  if (receiver is !String) {
-    return UNINTERCEPTED(receiver.replaceFirst(from, to));
-  }
-  checkString(to);
-  return stringReplaceFirstUnchecked(receiver, from, to);
-}
-
-split(receiver, pattern) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.split(pattern));
-  checkNull(pattern);
-  return stringSplitUnchecked(receiver, pattern);
-}
-
-splitChars(receiver) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.splitChars());
-
-  return JS('List', r'#.split("")', receiver);
-}
-
-startsWith(receiver, other) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.startsWith(other));
-  checkString(other);
-
-  int length = other.length;
-  if (length > receiver.length) return false;
-  return JS('bool', r'# == #', other,
-            JS('String', r'#.substring(0, #)', receiver, length));
-}
-
-substring$1(receiver, startIndex) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.substring(startIndex));
-
-  return substring$2(receiver, startIndex, null);
-}
-
-substring$2(receiver, startIndex, endIndex) {
-  if (receiver is !String) {
-    return UNINTERCEPTED(receiver.substring(startIndex, endIndex));
-  }
-  checkNum(startIndex);
-  var length = receiver.length;
-  if (endIndex == null) endIndex = length;
-  checkNum(endIndex);
-  if (startIndex < 0 ) throw new RangeError.value(startIndex);
-  if (startIndex > endIndex) throw new RangeError.value(startIndex);
-  if (endIndex > length) throw new RangeError.value(endIndex);
-  return substringUnchecked(receiver, startIndex, endIndex);
-}
-
-toLowerCase(receiver) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.toLowerCase());
-
-  return JS('String', r'#.toLowerCase()', receiver);
-}
-
-toUpperCase(receiver) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.toUpperCase());
-
-  return JS('String', r'#.toUpperCase()', receiver);
-}
-
-trim(receiver) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.trim());
-
-  return JS('String', r'#.trim()', receiver);
-}
-
 /**
  * This is the [Jenkins hash function][1] but using masking to keep
  * values in SMI range.
@@ -630,30 +440,20 @@
   // TODO(ahe): This method shouldn't have to use JS. Update when our
   // optimizations are smarter.
   if (receiver == null) return 0;
-  if (receiver is num) return JS('int', r'# & 0x1FFFFFFF', receiver);
+  if (receiver is num) return receiver & 0x1FFFFFFF;
   if (receiver is bool) return receiver ? 0x40377024 : 0xc18c0076;
   if (isJsArray(receiver)) return Primitives.objectHashCode(receiver);
   if (receiver is !String) return UNINTERCEPTED(receiver.hashCode);
   int hash = 0;
-  int length = JS('int', r'#.length', receiver);
+  int length = receiver.length;
   for (int i = 0; i < length; i++) {
     hash = 0x1fffffff & (hash + JS('int', r'#.charCodeAt(#)', receiver, i));
-    hash = 0x1fffffff & (hash + JS('int', r'# << #', 0x0007ffff & hash, 10));
-    hash ^= hash >> 6;
+    hash = 0x1fffffff & (hash + (0x0007ffff & hash) << 10);
+    hash = JS('int', '# ^ (# >> 6)', hash, hash);
   }
-  hash = 0x1fffffff & (hash + JS('int', r'# << #', 0x03ffffff & hash, 3));
-  hash ^= hash >> 11;
-  return 0x1fffffff & (hash + JS('int', r'# << #', 0x00003fff & hash, 15));
-}
-
-get$charCodes(receiver) {
-  if (receiver is !String) return UNINTERCEPTED(receiver.charCodes);
-  int len = receiver.length;
-  List<int> result = new List<int>(len);
-  for (int i = 0; i < len; i++) {
-    result[i] = receiver.charCodeAt(i);
-  }
-  return result;
+  hash = 0x1fffffff & (hash + (0x03ffffff & hash) <<  3);
+  hash = JS('int', '# ^ (# >> 11)', hash, hash);
+  return 0x1fffffff & (hash + (0x00003fff & hash) << 15);
 }
 
 get$isEven(receiver) {
@@ -668,17 +468,17 @@
 
 get$runtimeType(receiver) {
   if (receiver is int) {
-    return getOrCreateCachedRuntimeType('int');
+    return createRuntimeType('int');
   } else if (receiver is String) {
-    return getOrCreateCachedRuntimeType('String');
+    return createRuntimeType('String');
   } else if (receiver is double) {
-    return getOrCreateCachedRuntimeType('double');
+    return createRuntimeType('double');
   } else if (receiver is bool) {
-    return getOrCreateCachedRuntimeType('bool');
+    return createRuntimeType('bool');
   } else if (receiver == null) {
-    return getOrCreateCachedRuntimeType('Null');
+    return createRuntimeType('Null');
   } else if (isJsArray(receiver)) {
-    return getOrCreateCachedRuntimeType('List');
+    return createRuntimeType('List');
   } else {
     return UNINTERCEPTED(receiver.runtimeType);
   }
diff --git a/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
index f603e87..e06bd18 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
@@ -167,6 +167,18 @@
   patch factory Socket(String host, int port) => new _Socket(host, port);
 }
 
+patch class TlsSocket {
+  patch static void setCertificateDatabase(String pkcertDirectory) {
+    throw new UnsupportedError("TlsSocket.setCertificateDatabase");
+  }
+}
+
+patch class _TlsFilter {
+  patch factory _TlsFilter() {
+    throw new UnsupportedError("_TlsFilter._TlsFilter");
+  }
+}
+
 patch class _StdIOUtils {
   patch static _getStdioHandle(Socket socket, int num) {
     throw new UnsupportedError("StdIOUtils._getStdioHandle");
diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
index 1eeec4e..9c7b19d 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
@@ -4,7 +4,7 @@
 
 // Patch file for the dart:isolate library.
 
-#import("dart:uri");
+import 'dart:uri';
 
 /**
  * Called by the compiler to support switching
@@ -85,7 +85,7 @@
 // TODO(eub, sigmund): move the "manager" to be entirely in JS.
 // Running any Dart code outside the context of an isolate gives it
 // the change to break the isolate abstraction.
-_Manager get _globalState => JS("Object", r"$globalState");
+_Manager get _globalState => JS("_Manager", r"$globalState");
 set _globalState(_Manager val) {
   JS("void", r"$globalState = #", val);
 }
@@ -188,9 +188,9 @@
   }
 
   void _nativeDetectEnvironment() {
-    JS("void", r"#.isWorker = $isWorker", this);
-    JS("void", r"#.supportsWorkers = $supportsWorkers", this);
-    JS("void", r"#.fromCommandLine = typeof(window) == 'undefined'", this);
+    JS("void", r"# = $isWorker", isWorker);
+    JS("void", r"# = $supportsWorkers", supportsWorkers);
+    JS("void", r"# = typeof(window) == 'undefined'", fromCommandLine);
   }
 
   void _nativeInitWorkerMessageHandler() {
@@ -238,7 +238,7 @@
    * Run [code] in the context of the isolate represented by [this]. Note this
    * is called from JavaScript (see $wrap_call in corejs.dart).
    */
-  Dynamic eval(Function code) {
+  dynamic eval(Function code) {
     var old = _globalState.currentContext;
     _globalState.currentContext = this;
     this._setGlobals();
@@ -393,10 +393,10 @@
  * are actually available.
  */
 class _WorkerStub implements _ManagerStub native "*Worker" {
-  get id => JS("Object", "#.id", this);
+  get id => JS("var", "#.id", this);
   void set id(i) { JS("void", "#.id = #", this, i); }
   void set onmessage(f) { JS("void", "#.onmessage = #", this, f); }
-  void postMessage(msg) => JS("Object", "#.postMessage(#)", this, msg);
+  void postMessage(msg) => JS("void", "#.postMessage(#)", this, msg);
   // terminate() is implemented by Worker.
   void terminate();
 }
@@ -412,14 +412,15 @@
   static String get _thisScript => JS("String", r"$thisScriptUrl");
 
   /** Starts a new worker with the given URL. */
-  static _WorkerStub _newWorker(url) => JS("Object", r"new Worker(#)", url);
+  static _WorkerStub _newWorker(url) => JS("_WorkerStub", r"new Worker(#)", url);
 
   /**
    * Assume that [e] is a browser message event and extract its message data.
    * We don't import the dom explicitly so, when workers are disabled, this
    * library can also run on top of nodejs.
    */
-  static _getEventData(e) => JS("Object", "#.data", e);
+  //static _getEventData(e) => JS("Object", "#.data", e);
+  static _getEventData(e) => JS("", "#.data", e);
 
   /**
    * Process messages on a worker, either to control the worker instance or to
@@ -488,7 +489,7 @@
    * Extract the constructor of runnable, so it can be allocated in another
    * isolate.
    */
-  static Dynamic _getJSConstructor(Isolate runnable) {
+  static dynamic _getJSConstructor(Isolate runnable) {
     return JS("Object", "#.constructor", runnable);
   }
 
@@ -496,16 +497,16 @@
   // TODO(sigmund): find a browser-generic way to support this.
   // TODO(floitsch): is this function still used? If yes, should we use
   // Primitives.objectTypeName instead?
-  static Dynamic _getJSConstructorName(Isolate runnable) {
+  static dynamic _getJSConstructorName(Isolate runnable) {
     return JS("Object", "#.constructor.name", runnable);
   }
 
   /** Find a constructor given its name. */
-  static Dynamic _getJSConstructorFromName(String factoryName) {
+  static dynamic _getJSConstructorFromName(String factoryName) {
     return JS("Object", r"$globalThis[#]", factoryName);
   }
 
-  static Dynamic _getJSFunctionFromName(String functionName) {
+  static dynamic _getJSFunctionFromName(String functionName) {
     return JS("Object", r"$globalThis[#]", functionName);
   }
 
@@ -519,7 +520,7 @@
   }
 
   /** Create a new JavaScript object instance given its constructor. */
-  static Dynamic _allocate(var ctor) {
+  static dynamic _allocate(var ctor) {
     return JS("Object", "new #()", ctor);
   }
 
@@ -791,7 +792,7 @@
 }
 
 /** Default factory for receive ports. */
-patch class _ReceivePortFactory {
+patch class ReceivePort {
   patch factory ReceivePort() {
     return new _ReceivePortImpl();
   }
@@ -1015,7 +1016,7 @@
   }
 
   _getAttachedInfo(var o) {
-    return JS("Object", "#['__MessageTraverser__attached_info__']", o);
+    return JS("", "#['__MessageTraverser__attached_info__']", o);
   }
 }
 
@@ -1171,7 +1172,7 @@
 
 /** Deserializes arrays created with [_Serializer]. */
 class _Deserializer {
-  Map<int, Dynamic> _deserialized;
+  Map<int, dynamic> _deserialized;
 
   _Deserializer();
 
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
new file mode 100644
index 0000000..9f5db9b
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
@@ -0,0 +1,83 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 _interceptors;
+
+/**
+ * The interceptor class for [List]. The compiler recognizes this
+ * class as an interceptor, and changes references to [:this:] to
+ * actually use the receiver of the method, which is generated as an extra
+ * argument added to each member.
+ */
+class JSArray<E> implements List<E> {
+  const JSArray();
+
+  void add(E value) {
+    checkGrowable(this, 'add');
+    JS('void', r'#.push(#)', this, value);
+  }
+
+  E removeAt(int index) {
+    if (index is !int) throw new ArgumentError(index);
+    if (index < 0 || index >= length) {
+      throw new RangeError.value(index);
+    }
+    checkGrowable(this, 'removeAt');
+    return JS('var', r'#.splice(#, 1)[0]', this, index);
+  }
+
+  E removeLast() {
+    checkGrowable(this, 'removeLast');
+    if (length == 0) throw new RangeError.value(-1);
+    return JS('var', r'#.pop()', this);
+  }
+
+  List<E> filter(bool f(E element)) {
+    return Collections.filter(this, <E>[], f);
+  }
+
+  void addAll(Collection<E> collection) {
+    for (Element e in collection) {
+      this.add(e);
+    }
+  }
+
+  void addLast(E value) {
+    checkGrowable(this, 'addLast');
+    JS('void', r'#.push(#)', this, value);
+  }
+
+  void clear() {
+    length = 0;
+  }
+
+  void forEach(void f(E element)) {
+    return Collections.forEach(this, f);
+  }
+
+  Collection map(f(E element)) {
+    return Collections.map(this, [], f);
+  }
+
+  reduce(initialValue, combine(previousValue, E element)) {
+    return Collections.reduce(this, initialValue, combine);
+  }
+
+  List<E> getRange(int start, int length) {
+    // TODO(ngeoffray): Parameterize the return value.
+    if (0 == length) return [];
+    checkNull(start); // TODO(ahe): This is not specified but co19 tests it.
+    checkNull(length); // TODO(ahe): This is not specified but co19 tests it.
+    if (start is !int) throw new ArgumentError(start);
+    if (length is !int) throw new ArgumentError(length);
+    if (length < 0) throw new ArgumentError(length);
+    if (start < 0) throw new RangeError.value(start);
+    int end = start + length;
+    if (end > this.length) {
+      throw new RangeError.value(length);
+    }
+    if (length < 0) throw new ArgumentError(length);
+    return JS('List', r'#.slice(#, #)', this, start, end);
+  }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 5b4f36a6..8e9dbb1 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -2,16 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('dart:_js_helper');
+library _js_helper;
 
-#import('dart:coreimpl');
-#import('dart:collection');
+import 'dart:collection';
 
-#source('constant_map.dart');
-#source('native_helper.dart');
-#source('regexp_helper.dart');
-#source('string_helper.dart');
-#source('mirror_opt_in_message.dart');
+part 'constant_map.dart';
+part 'native_helper.dart';
+part 'regexp_helper.dart';
+part 'string_helper.dart';
+part 'mirror_opt_in_message.dart';
 
 // Performance critical helper methods.
 add(var a, var b) => (a is num && b is num)
@@ -303,7 +302,7 @@
     if (index < 0 || index >= a.length) {
       throw new RangeError.value(index);
     }
-    return JS('Object', r'#[#]', a, index);
+    return JS('', r'#[#]', a, index);
   }
   return UNINTERCEPTED(a[index]);
 }
@@ -317,7 +316,7 @@
       throw new RangeError.value(index);
     }
     checkMutable(a, 'indexed set');
-    JS('Object', r'#[#] = #', a, index, value);
+    JS('void', r'#[#] = #', a, index, value);
     return;
   }
   UNINTERCEPTED(a[index] = value);
@@ -348,7 +347,7 @@
   bool get hasNext => i < JS('int', r'#.length', list);
   T next() {
     if (!hasNext) throw new StateError("No more elements");
-    var value = JS('Object', r'#[#]', list, i);
+    var value = JS('', r'#[#]', list, i);
     i += 1;
     return value;
   }
@@ -465,7 +464,7 @@
 
   static int parseInt(String string) {
     checkString(string);
-    var match = JS('List',
+    var match = JS('=List',
                    r'/^\s*[+-]?(?:0(x)[a-f0-9]+|\d+)\s*$/i.exec(#)',
                    string);
     if (match == null) {
@@ -523,11 +522,14 @@
   }
 
   static List newList(length) {
-    if (length == null) return JS('Object', r'new Array()');
+    // TODO(sra): For good concrete type analysis we need the JS-type to
+    // specifically name the JavaScript Array implementation.  'List' matches
+    // all the dart:html types that implement List<T>.
+    if (length == null) return JS('=List', r'new Array()');
     if ((length is !int) || (length < 0)) {
       throw new ArgumentError(length);
     }
-    var result = JS('Object', r'new Array(#)', length);
+    var result = JS('=List', r'new Array(#)', length);
     JS('void', r'#.fixed$length = #', result, true);
     return result;
   }
@@ -584,7 +586,7 @@
   }
 
   static patchUpY2K(value, years, isUtc) {
-    var date = JS('Object', r'new Date(#)', value);
+    var date = JS('', r'new Date(#)', value);
     if (isUtc) {
       JS('num', r'#.setUTCFullYear(#)', date, years);
     } else {
@@ -682,7 +684,7 @@
 
   static applyFunction(Function function,
                        List positionalArguments,
-                       Map<String, Dynamic> namedArguments) {
+                       Map<String, dynamic> namedArguments) {
     int argumentCount = 0;
     StringBuffer buffer = new StringBuffer();
     List arguments = [];
@@ -813,9 +815,6 @@
   return value;
 }
 
-substringUnchecked(receiver, startIndex, endIndex)
-  => JS('String', r'#.substring(#, #)', receiver, startIndex, endIndex);
-
 class MathNatives {
   static int parseInt(str) {
     checkString(str);
@@ -896,7 +895,7 @@
  */
 $throw(ex) {
   if (ex == null) ex = const NullPointerException();
-  var jsError = JS('Object', r'new Error()');
+  var jsError = JS('var', r'new Error()');
   JS('void', r'#.name = #', jsError, ex);
   JS('void', r'#.description = #', jsError, ex);
   JS('void', r'#.dartException = #', jsError, ex);
@@ -911,7 +910,7 @@
  * JavaScript Error to which we have added a property 'dartException'
  * which holds a Dart object.
  */
-toStringWrapper() => JS('Object', r'this.dartException').toString();
+toStringWrapper() => JS('', r'this.dartException').toString();
 
 makeLiteralListConst(list) {
   JS('bool', r'#.immutable$list = #', list, true);
@@ -934,12 +933,15 @@
  *
  * Some native exceptions are mapped to new Dart instances, others are
  * returned unmodified.
+ *
+ * TODO(erikcorry): Fix this to produce consistent result regardless of
+ * minification.
  */
 unwrapException(ex) {
   // Note that we are checking if the object has the property. If it
   // has, it could be set to null if the thrown value is null.
   if (JS('bool', r'"dartException" in #', ex)) {
-    return JS('Object', r'#.dartException', ex);
+    return JS('', r'#.dartException', ex);
   }
 
   // Grab hold of the exception message. This field is available on
@@ -1111,6 +1113,23 @@
 }
 
 /**
+ * A metadata annotation describing the types instantiated by a native element.
+ */
+class Creates {
+  final String types;
+  const Creates(this.types);
+}
+
+/**
+ * A metadata annotation describing the types returned or yielded by a native
+ * element.
+ */
+class Returns {
+  final String types;
+  const Returns(this.types);
+}
+
+/**
  * Represents the type of Null. The compiler treats this specially.
  * TODO(lrn): Null should be defined in core. It's a class, like int.
  * It just happens to act differently in assignability tests and,
@@ -1467,20 +1486,15 @@
   final String typeName;
   TypeImpl(this.typeName);
   toString() => typeName;
-}
-
-var runtimeTypeCache = JS('var', '{}');
-
-Type getOrCreateCachedRuntimeType(String key) {
-  Type result = JS('Type', r'#[#]', runtimeTypeCache, key);
-  if (result == null) {
-    result = new TypeImpl(key);
-    JS('var', r'#[#] = #', runtimeTypeCache, key, result);
+  bool operator ==(other) {
+    if (other is !TypeImpl) return false;
+    return typeName == other.typeName;
   }
-  return result;
 }
 
 String getRuntimeTypeString(var object) {
-  var typeInfo = JS('Object', r'#.builtin$typeInfo', object);
+  var typeInfo = JS('var', r'#.builtin$typeInfo', object);
   return JS('String', r'#.runtimeType', typeInfo);
 }
+
+createRuntimeType(String name) => new TypeImpl(name);
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
new file mode 100644
index 0000000..d796ef2
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
@@ -0,0 +1,96 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 _interceptors;
+
+/**
+ * The interceptor class for [String]. The compiler recognizes this
+ * class as an interceptor, and changes references to [:this:] to
+ * actually use the receiver of the method, which is generated as an extra
+ * argument added to each member.
+ */
+class JSString implements String {
+  const JSString();
+
+  int charCodeAt(index) {
+    if (index is !num) throw new ArgumentError(index);
+    if (index < 0) throw new RangeError.value(index);
+    if (index >= length) throw new RangeError.value(index);
+    return JS('int', r'#.charCodeAt(#)', this, index);
+  }
+
+  Iterable<Match> allMatches(String str) {
+    checkString(str);
+    return allMatchesInStringUnchecked(this, str);
+  }
+
+  String concat(String other) {
+    if (other is !String) throw new ArgumentError(other);
+    return JS('String', r'# + #', this, other);
+  }
+
+  bool endsWith(String other) {
+    checkString(other);
+    int otherLength = other.length;
+    if (otherLength > length) return false;
+    return other == substring(length - otherLength);
+  }
+
+  String replaceAll(Pattern from, String to) {
+    checkString(to);
+    return stringReplaceAllUnchecked(this, from, to);
+  }
+
+  String replaceFirst(Pattern from, String to) {
+    checkString(to);
+    return stringReplaceFirstUnchecked(this, from, to);
+  }
+
+  List<String> split(Pattern pattern) {
+    checkNull(pattern);
+    return stringSplitUnchecked(this, pattern);
+  }
+
+  List<String> splitChars() {
+    return JS('List', r'#.split("")', this);
+  }
+
+  bool startsWith(String other) {
+    checkString(other);
+    int otherLength = other.length;
+    if (otherLength > length) return false;
+    return JS('bool', r'# == #', other,
+              JS('String', r'#.substring(0, #)', this, otherLength));
+  }
+
+  String substring(int startIndex, [int endIndex]) {
+    checkNum(startIndex);
+    if (endIndex == null) endIndex = length;
+    checkNum(endIndex);
+    if (startIndex < 0 ) throw new RangeError.value(startIndex);
+    if (startIndex > endIndex) throw new RangeError.value(startIndex);
+    if (endIndex > length) throw new RangeError.value(endIndex);
+    return JS('String', r'#.substring(#, #)', this, startIndex, endIndex);
+  }
+
+  String toLowerCase() {
+    return JS('String', r'#.toLowerCase()', this);
+  }
+
+  String toUpperCase() {
+    return JS('String', r'#.toUpperCase()', this);
+  }
+
+  String trim() {
+    return JS('String', r'#.trim()', this);
+  }
+
+  List<int> get charCodes  {
+    List<int> result = new List<int>(length);
+    for (int i = 0; i < length; i++) {
+      result[i] = charCodeAt(i);
+    }
+    return result;
+  }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/native_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/native_helper.dart
index 196136d..f6ee855 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/native_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/native_helper.dart
@@ -42,7 +42,6 @@
 String typeNameInFirefox(obj) {
   String name = JS('String', '#', constructorNameFallback(obj));
   if (name == 'Window') return 'DOMWindow';
-  if (name == 'Document') return 'HTMLDocument';
   if (name == 'XMLDocument') return 'Document';
   if (name == 'WorkerMessageEvent') return 'MessageEvent';
   if (name == 'DragEvent') return 'MouseEvent';
@@ -116,10 +115,6 @@
   JS('var', '#[#] = #', array, index, value);
 }
 
-propertyGet(var object, String property) {
-  return JS('var', '#[#]', object, property);
-}
-
 void propertySet(var object, String property, var value) {
   JS('var', '#[#] = #', object, property, value);
 }
@@ -203,21 +198,31 @@
             String name,
             var methods,
             List arguments) {
+  // The tag is related to the class name.  E.g. the dart:html class
+  // '_ButtonElement' has the tag 'HTMLButtonElement'.  TODO(erikcorry): rename
+  // getTypeNameOf to getTypeTag.
   String tag = getTypeNameOf(obj);
-  var method = JS('var', '#[#]', methods, tag);
+  var hasOwnProperty = JS('var', 'Object.prototype.hasOwnProperty');
+  var method = lookupDynamicClass(hasOwnProperty, methods, tag);
 
   if (method == null && _dynamicMetadata != null) {
+    // Look at the inheritance data, getting the class tags and using them
+    // to check the methods table for this method name.
     for (int i = 0; i < arrayLength(_dynamicMetadata); i++) {
       MetaInfo entry = arrayGet(_dynamicMetadata, i);
-      if (JS('bool', '#', propertyGet(entry._set, tag))) {
-        method = propertyGet(methods, entry._tag);
+      if (JS('bool', '#.call(#, #)', hasOwnProperty, entry._set, tag)) {
+        method = lookupDynamicClass(hasOwnProperty, methods, entry._tag);
+        // Stop if we found it in the methods array.
         if (method != null) break;
       }
     }
   }
 
+  // If we didn't find the method then look up in the Dart Object class, using
+  // getTypeNameOf in case the minifier has renamed Object.
   if (method == null) {
-    method = propertyGet(methods, 'Object');
+    String nameOfObjectClass = getTypeNameOf(const Object());
+    method = lookupDynamicClass(hasOwnProperty, methods, nameOfObjectClass);
   }
 
   var proto = JS('var', 'Object.getPrototypeOf(#)', obj);
@@ -237,13 +242,24 @@
       proto, name, name);
   }
 
-  if (JS('bool', '!#.hasOwnProperty(#)', proto, name)) {
+  if (JS('bool', '!#.call(#, #)', hasOwnProperty, proto, name)) {
     defineProperty(proto, name, method);
   }
 
   return JS('var', '#.apply(#, #)', method, obj, arguments);
 }
 
+// For each method name and class inheritance subtree, we use an ordinary JS
+// object as a hash map to store the method for each class.  Entries are added
+// in native_emitter.dart (see dynamicName).  In order to avoid the class names
+// clashing with the method names on Object.prototype (needed for native
+// objects) we must always use hasOwnProperty.
+var lookupDynamicClass(var hasOwnProperty, var methods, String className) {
+  return JS('bool', '#.call(#, #)', hasOwnProperty, methods, className) ?
+         JS('var', '#[#]', methods, className) :
+         null;
+}
+
 /**
  * Code for doing the dynamic dispatch on JavaScript prototypes that are not
  * available at compile-time. Each property of a native Dart class
@@ -271,7 +287,10 @@
   var methods = JS('var', '{}');
   // If there is a method attached to the Dart Object class, use it as
   // the method to call in case no method is registered for that type.
-  var dartMethod = JS('var', 'Object.getPrototypeOf(#)[#]', const Object(), name);
+  var dartMethod =
+      JS('var', 'Object.getPrototypeOf(#)[#]', const Object(), name);
+  // Take the method from the Dart Object class if we didn't find it yet and it
+  // is there.
   if (dartMethod != null) propertySet(methods, 'Object', dartMethod);
 
   var bind = JS('var',
diff --git a/sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart
index 42f6493..441512e 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart
@@ -4,8 +4,8 @@
 
 List regExpExec(JSSyntaxRegExp regExp, String str) {
   var nativeRegExp = regExpGetNative(regExp);
-  var result = JS('List', r'#.exec(#)', nativeRegExp, str);
-  if (JS('bool', r'# === null', result)) return null;
+  var result = JS('=List', r'#.exec(#)', nativeRegExp, str);
+  if (JS('bool', r'# == null', result)) return null;
   return result;
 }
 
@@ -23,7 +23,7 @@
 }
 
 regExpAttachGlobalNative(JSSyntaxRegExp regExp) {
-  JS('var', r'#._re = #', regExp, regExpMakeNative(regExp, global: true));
+  JS('void', r'#._re = #', regExp, regExpMakeNative(regExp, global: true));
 }
 
 regExpMakeNative(JSSyntaxRegExp regExp, {bool global: false}) {
@@ -36,7 +36,7 @@
   if (ignoreCase) sb.add('i');
   if (global) sb.add('g');
   try {
-    return JS('Object', r'new RegExp(#, #)', pattern, sb.toString());
+    return JS('var', r'new RegExp(#, #)', pattern, sb.toString());
   } catch (e) {
     throw new IllegalJSRegExpException(pattern,
                                        JS('String', r'String(#)', e));
@@ -44,3 +44,126 @@
 }
 
 int regExpMatchStart(m) => JS('int', r'#.index', m);
+
+class JSSyntaxRegExp implements RegExp {
+  final String _pattern;
+  final bool _multiLine;
+  final bool _ignoreCase;
+
+  const JSSyntaxRegExp(String pattern,
+                       {bool multiLine: false,
+                        bool ignoreCase: false})
+      : _pattern = pattern,
+        _multiLine = multiLine,
+        _ignoreCase = ignoreCase;
+
+  Match firstMatch(String str) {
+    List<String> m = regExpExec(this, checkString(str));
+    if (m == null) return null;
+    var matchStart = regExpMatchStart(m);
+    // m.lastIndex only works with flag 'g'.
+    var matchEnd = matchStart + m[0].length;
+    return new _MatchImplementation(pattern, str, matchStart, matchEnd, m);
+  }
+
+  bool hasMatch(String str) => regExpTest(this, checkString(str));
+
+  String stringMatch(String str) {
+    var match = firstMatch(str);
+    return match == null ? null : match.group(0);
+  }
+
+  Iterable<Match> allMatches(String str) {
+    checkString(str);
+    return new _AllMatchesIterable(this, str);
+  }
+
+  String get pattern => _pattern;
+  bool get multiLine => _multiLine;
+  bool get ignoreCase => _ignoreCase;
+
+  static JSSyntaxRegExp _globalVersionOf(JSSyntaxRegExp other) {
+    JSSyntaxRegExp re = new JSSyntaxRegExp(other.pattern,
+                                           multiLine: other.multiLine,
+                                           ignoreCase: other.ignoreCase);
+    regExpAttachGlobalNative(re);
+    return re;
+  }
+
+  _getNative() => regExpGetNative(this);
+}
+
+class _MatchImplementation implements Match {
+  final String pattern;
+  final String str;
+  final int start;
+  final int end;
+  final List<String> _groups;
+
+  const _MatchImplementation(
+      String this.pattern,
+      String this.str,
+      int this.start,
+      int this.end,
+      List<String> this._groups);
+
+  String group(int index) => _groups[index];
+  String operator [](int index) => group(index);
+  int get groupCount => _groups.length - 1;
+
+  List<String> groups(List<int> groups) {
+    List<String> out = [];
+    for (int i in groups) {
+      out.add(group(i));
+    }
+    return out;
+  }
+}
+
+class _AllMatchesIterable implements Iterable<Match> {
+  final JSSyntaxRegExp _re;
+  final String _str;
+
+  const _AllMatchesIterable(this._re, this._str);
+
+  Iterator<Match> iterator() => new _AllMatchesIterator(_re, _str);
+}
+
+class _AllMatchesIterator implements Iterator<Match> {
+  final RegExp _re;
+  final String _str;
+  Match _next;
+  bool _done;
+
+  _AllMatchesIterator(JSSyntaxRegExp re, String this._str)
+    : _done = false, _re = JSSyntaxRegExp._globalVersionOf(re);
+
+  Match next() {
+    if (!hasNext) {
+      throw new StateError("No more elements");
+    }
+
+    // _next is set by [hasNext].
+    var next = _next;
+    _next = null;
+    return next;
+  }
+
+  bool get hasNext {
+    if (_done) {
+      return false;
+    } else if (_next != null) {
+      return true;
+    }
+
+    // firstMatch actually acts as nextMatch because of
+    // hidden global flag.
+    _next = _re.firstMatch(_str);
+    if (_next == null) {
+      _done = true;
+      return false;
+    } else {
+      return true;
+    }
+  }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
index 3a35778..70580df 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
@@ -75,6 +75,8 @@
   return JS('String', r'#.replace(#, #)', receiver, replacer, to);
 }
 
+final RegExp quoteRegExp = new JSSyntaxRegExp(r'[-[\]{}()*+?.,\\^$|#\s]');
+
 stringReplaceAllUnchecked(receiver, from, to) {
   if (from is String) {
     if (from == "") {
@@ -91,8 +93,6 @@
         return result.toString();
       }
     } else {
-      RegExp quoteRegExp =
-          const JSSyntaxRegExp(r'[-[\]{}()*+?.,\\^$|#\s]');
       var quoter = regExpMakeNative(quoteRegExp, global: true);
       var quoted = JS('String', r'#.replace(#, "\\$&")', from, quoter);
       RegExp replaceRegExp = new JSSyntaxRegExp(quoted);
@@ -124,10 +124,10 @@
 
 stringSplitUnchecked(receiver, pattern) {
   if (pattern is String) {
-    return JS('List', r'#.split(#)', receiver, pattern);
+    return JS('=List', r'#.split(#)', receiver, pattern);
   } else if (pattern is JSSyntaxRegExp) {
     var re = regExpGetNative(pattern);
-    return JS('List', r'#.split(#)', receiver, re);
+    return JS('=List', r'#.split(#)', receiver, re);
   } else {
     throw "String.split(Pattern) UNIMPLEMENTED";
   }
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index 359aa43..6a247e2 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -173,11 +173,12 @@
     Uri base = library.entryCompilationUnit.script.uri;
     for (LibraryTag tag in library.tags.reverse()) {
       if (tag.isImport) {
-        tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag);
-        if (tag.uri.dartString.slowToString() == 'dart:core') {
+        Import import = tag;
+        tagState = checkTag(TagState.IMPORT_OR_EXPORT, import);
+        if (import.uri.dartString.slowToString() == 'dart:core') {
           importsDartCore = true;
         }
-        libraryDependencies.addLast(tag);
+        libraryDependencies.addLast(import);
       } else if (tag.isExport) {
         tagState = checkTag(TagState.IMPORT_OR_EXPORT, tag);
         libraryDependencies.addLast(tag);
@@ -190,10 +191,11 @@
         }
         checkDuplicatedLibraryName(library);
       } else if (tag.isPart) {
-        StringNode uri = tag.uri;
+        Part part = tag;
+        StringNode uri = part.uri;
         Uri resolved = base.resolve(uri.dartString.slowToString());
-        tagState = checkTag(TagState.SOURCE, tag);
-        scanPart(tag, resolved, library);
+        tagState = checkTag(TagState.SOURCE, part);
+        scanPart(part, resolved, library);
       } else {
         compiler.internalError("Unhandled library tag.", node: tag);
       }
@@ -546,8 +548,16 @@
     SourceString name = element.name;
     Element existingElement = exportScope[name];
     if (existingElement != null) {
-      if (existingElement.getLibrary() != library) {
+      if (existingElement.isErroneous()) {
+        compiler.reportMessage(compiler.spanFromElement(element),
+            MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
+        element = existingElement;
+      } else if (existingElement.getLibrary() != library) {
         // Declared elements hide exported elements.
+        compiler.reportMessage(compiler.spanFromElement(existingElement),
+            MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
+        compiler.reportMessage(compiler.spanFromElement(element),
+            MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
         element = exportScope[name] = new ErroneousElement(
             MessageKind.DUPLICATE_EXPORT, [name], name, library);
       }
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
index fe4e6da..825498e 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
@@ -177,12 +177,24 @@
   void internalError(String message,
                      {Node node, Token token, HInstruction instruction,
                       Element element}) {
-    cancel('Internal error: $message', node, token, instruction, element);
+    cancel('Internal error: $message', node: node, token: token,
+           instruction: instruction, element: element);
   }
 
   void internalErrorOnElement(Element element, String message) {
     internalError(message, element: element);
   }
+
+  SourceSpan spanFromNode(Node node, [Uri uri]) {
+    // TODO(johnniwinther): implement this.
+    throw 'unimplemented';
+  }
+
+  void reportMessage(SourceSpan span, Diagnostic message,
+                     diagnostics.Diagnostic kind) {
+    // TODO(johnniwinther): implement this.
+    throw 'unimplemented';
+  }
 }
 
 //------------------------------------------------------------------------------
@@ -253,7 +265,7 @@
   }
 
   void processQueueList(Enqueuer world, List<LibraryElement> elements) {
-    backend.processNativeClasses(world, libraries.values);
+    world.nativeEnqueuer.processNativeClasses(libraries.values);
     for (var library in elements) {
       library.forEachLocalMember((element) {
         world.addToWorkList(element);
@@ -1371,7 +1383,11 @@
 
   factory Dart2JsMethodMirror(Dart2JsContainerMirror objectMirror,
                               FunctionElement function) {
-    String simpleName = function.name.slowToString();
+    String realName = function.name.slowToString();
+    // TODO(ahe): This method should not be calling
+    // Elements.operatorNameToIdentifier.
+    String simpleName =
+        Elements.operatorNameToIdentifier(function.name).slowToString();
     String displayName;
     String constructorName = null;
     String operatorName = null;
@@ -1412,7 +1428,7 @@
       }
       // Simple name is TypeName.constructorName.
       displayName = simpleName;
-    } else if (simpleName == 'negate') {
+    } else if (realName == 'unary-') {
       kind = Dart2JsMethodKind.OPERATOR;
       operatorName = '-';
       // Simple name is 'unary-'.
@@ -1536,4 +1552,3 @@
     }
   }
 }
-
diff --git a/sdk/lib/_internal/compiler/implementation/native_handler.dart b/sdk/lib/_internal/compiler/implementation/native_handler.dart
index 0ba42ae..038fbdd 100644
--- a/sdk/lib/_internal/compiler/implementation/native_handler.dart
+++ b/sdk/lib/_internal/compiler/implementation/native_handler.dart
@@ -8,70 +8,334 @@
 import 'dart2jslib.dart' hide SourceString;
 import 'elements/elements.dart';
 import 'js_backend/js_backend.dart';
+import 'resolution/resolution.dart' show ResolverVisitor;
 import 'scanner/scannerlib.dart';
 import 'ssa/ssa.dart';
 import 'tree/tree.dart';
 import 'util/util.dart';
 
-void processNativeClasses(Enqueuer world,
-                          CodeEmitterTask emitter,
-                          Collection<LibraryElement> libraries) {
-  for (LibraryElement library in libraries) {
-    processNativeClassesInLibrary(world, emitter, library);
+
+/// This class is a temporary work-around until we get a more powerful DartType.
+class SpecialType {
+  final String name;
+  const SpecialType._(this.name);
+
+  /// The type Object, but no subtypes:
+  static const JsObject = const SpecialType._('=Object');
+
+  /// The specific implementation of List that is JavaScript Array:
+  static const JsArray = const SpecialType._('=List');
+}
+
+
+/**
+ * This could be an abstract class but we use it as a stub for the dart_backend.
+ */
+class NativeEnqueuer {
+  /// Initial entry point to native enqueuer.
+  void processNativeClasses(Collection<LibraryElement> libraries) {}
+
+  void registerElement(Element element) {}
+
+  /// Method is a member of a native class.
+  void registerMethod(Element method) {}
+
+  /// Compute types instantiated due to getting a native field.
+  void registerFieldLoad(Element field) {}
+
+  /// Compute types instantiated due to setting a native field.
+  void registerFieldStore(Element field) {}
+
+  /**
+   * Handles JS-calls, which can be an instantiation point for types.
+   *
+   * For example, the following code instantiates and returns native classes
+   * that are `_DOMWindowImpl` or a subtype.
+   *
+   *     JS('_DOMWindowImpl', 'window')
+   *
+   */
+  // TODO(sra): The entry from codegen will not have a resolver.
+  void registerJsCall(Send node, ResolverVisitor resolver) {}
+
+  /// Emits a summary information using the [log] function.
+  void logSummary(log(message)) {}
+}
+
+
+class NativeEnqueuerBase implements NativeEnqueuer {
+
+  /**
+   * The set of all native classes.  Each native class is in [nativeClasses] and
+   * exactly one of [unusedClasses], [pendingClasses] and [registeredClasses].
+   */
+  final Set<ClassElement> nativeClasses = new Set<ClassElement>();
+
+  final Set<ClassElement> registeredClasses = new Set<ClassElement>();
+  final Set<ClassElement> pendingClasses = new Set<ClassElement>();
+  final Set<ClassElement> unusedClasses = new Set<ClassElement>();
+
+  /**
+   * Records matched constraints ([SpecialType] or [DartType]).  Once a type
+   * constraint has been matched, there is no need to match it again.
+   */
+  final Set matchedTypeConstraints = new Set();
+
+  /// Pending actions.  Classes in [pendingClasses] have action thunks in
+  /// [queue] to register the class.
+  final queue = new Queue();
+  bool flushing = false;
+
+
+  final Enqueuer world;
+  final Compiler compiler;
+  final bool enableLiveTypeAnalysis;
+
+  ClassElement _annotationCreatesClass;
+  ClassElement _annotationReturnsClass;
+
+  /// Subclasses of [NativeEnqueuerBase] are constructed by the backend.
+  NativeEnqueuerBase(this.world, this.compiler, this.enableLiveTypeAnalysis);
+
+  void processNativeClasses(Collection<LibraryElement> libraries) {
+    libraries.forEach(processNativeClassesInLibrary);
+    if (!enableLiveTypeAnalysis) {
+      nativeClasses.forEach((c) => enqueueClass(c, 'forced'));
+      flushQueue();
+    }
+  }
+
+  void processNativeClassesInLibrary(LibraryElement library) {
+    // Use implementation to ensure the inclusion of injected members.
+    library.implementation.forEachLocalMember((Element element) {
+      if (element.kind == ElementKind.CLASS) {
+        ClassElement classElement = element;
+        if (classElement.isNative()) {
+          nativeClasses.add(classElement);
+          unusedClasses.add(classElement);
+
+          // Resolve class to ensure the class has valid inheritance info.
+          classElement.ensureResolved(compiler);
+        }
+      }
+    });
+  }
+
+  ClassElement get annotationCreatesClass {
+    if (_annotationCreatesClass == null) findAnnotationClasses();
+    return _annotationCreatesClass;
+  }
+
+  ClassElement get annotationReturnsClass {
+    if (_annotationReturnsClass == null) findAnnotationClasses();
+    return _annotationReturnsClass;
+  }
+
+  void findAnnotationClasses() {
+    ClassElement find(name) {
+      Element e = compiler.findHelper(name);
+      if (e == null || e is! ClassElement) {
+        compiler.cancel("Could not find implementation class '${name}'");
+      }
+      return e;
+    }
+    _annotationCreatesClass = find(const SourceString('Creates'));
+    _annotationReturnsClass = find(const SourceString('Returns'));
+  }
+
+
+  enqueueClass(ClassElement classElement, cause) {
+    assert(unusedClasses.contains(classElement));
+    unusedClasses.remove(classElement);
+    pendingClasses.add(classElement);
+    queue.add(() { processClass(classElement, cause); });
+  }
+
+  void flushQueue() {
+    if (flushing) return;
+    flushing = true;
+    while (!queue.isEmpty) {
+      (queue.removeFirst())();
+    }
+    flushing = false;
+  }
+
+  processClass(ClassElement classElement, cause) {
+    assert(!registeredClasses.contains(classElement));
+
+    bool firstTime = registeredClasses.isEmpty;
+    pendingClasses.remove(classElement);
+    registeredClasses.add(classElement);
+
+    world.registerInstantiatedClass(classElement);
+
+    // Also parse the node to know all its methods because otherwise it will
+    // only be parsed if there is a call to one of its constructors.
+    classElement.parseNode(compiler);
+
+    if (firstTime) {
+      queue.add(onFirstNativeClass);
+    }
+  }
+
+  registerElement(Element element) {
+    if (element.isFunction()) return registerMethod(element);
+  }
+
+  registerMethod(Element method) {
+    if (isNativeMethod(method)) {
+      processNativeBehavior(
+          NativeBehavior.ofMethod(method, compiler),
+          method);
+      flushQueue();
+    }
+  }
+
+  bool isNativeMethod(Element element) {
+    if (!element.getLibrary().canUseNative) return false;
+    // Native method?
+    return compiler.withCurrentElement(element, () {
+      Node node = element.parseNode(compiler);
+      if (node is! FunctionExpression) return false;
+      node = node.body;
+      Token token = node.getBeginToken();
+      if (identical(token.stringValue, 'native')) return true;
+      return false;
+    });
+  }
+
+  void registerFieldLoad(Element field) {
+    processNativeBehavior(
+        NativeBehavior.ofFieldLoad(field, compiler),
+        field);
+    flushQueue();
+  }
+
+  void registerFieldStore(Element field) {
+    processNativeBehavior(
+        NativeBehavior.ofFieldStore(field, compiler),
+        field);
+    flushQueue();
+  }
+
+  void registerJsCall(Send node, ResolverVisitor resolver) {
+    processNativeBehavior(
+        NativeBehavior.ofJsCall(node, compiler, resolver),
+        node);
+    flushQueue();
+  }
+
+  processNativeBehavior(NativeBehavior behavior, cause) {
+    bool allUsedBefore = unusedClasses.isEmpty;
+    for (var type in behavior.typesInstantiated) {
+      if (matchedTypeConstraints.contains(type)) continue;
+      matchedTypeConstraints.add(type);
+      if (type is SpecialType) {
+        // The two special types (=Object, =List) are always instantiated.
+        continue;
+      }
+      assert(type is DartType);
+      enqueueUnusedClassesMatching(
+          (nativeClass)  => compiler.types.isSubtype(nativeClass.type, type),
+          cause,
+          'subtypeof($type)');
+    }
+
+    // Give an info so that library developers can compile with -v to find why
+    // all the native classes are included.
+    if (unusedClasses.isEmpty && !allUsedBefore) {
+      compiler.log('All native types marked as used due to $cause.');
+    }
+  }
+
+  enqueueUnusedClassesMatching(bool predicate(classElement),
+                               cause,
+                               [String reason]) {
+    Collection matches = unusedClasses.filter(predicate);
+    matches.forEach((c) => enqueueClass(c, cause));
+  }
+
+  onFirstNativeClass() {
+    staticUse(name) => world.registerStaticUse(compiler.findHelper(name));
+
+    staticUse(const SourceString('dynamicFunction'));
+    staticUse(const SourceString('dynamicSetMetadata'));
+    staticUse(const SourceString('defineProperty'));
+    staticUse(const SourceString('toStringForNativeObject'));
+    staticUse(const SourceString('hashCodeForNativeObject'));
+
+    addNativeExceptions();
+  }
+
+  addNativeExceptions() {
+    enqueueUnusedClassesMatching((classElement) {
+        // TODO(sra): Annotate exception classes in dart:html.
+        String name = classElement.name.slowToString();
+        if (name.contains('Exception')) return true;
+        if (name.contains('Error')) return true;
+        return false;
+      },
+      'native exception');
   }
 }
 
-void addSubtypes(ClassElement cls,
-                 NativeEmitter emitter) {
-  for (DartType type in cls.allSupertypes) {
-    List<Element> subtypes = emitter.subtypes.putIfAbsent(
-        type.element,
-        () => <ClassElement>[]);
-    subtypes.add(cls);
-  }
 
-  List<Element> directSubtypes = emitter.directSubtypes.putIfAbsent(
-      cls.superclass,
-      () => <ClassElement>[]);
-  directSubtypes.add(cls);
+class NativeResolutionEnqueuer extends NativeEnqueuerBase {
+
+  NativeResolutionEnqueuer(Enqueuer world, Compiler compiler)
+    : super(world, compiler, compiler.enableNativeLiveTypeAnalysis);
+
+  void logSummary(log(message)) {
+    log('Resolved ${registeredClasses.length} native elements used, '
+        '${unusedClasses.length} native elements dead.');
+  }
 }
 
-void processNativeClassesInLibrary(Enqueuer world,
-                                   CodeEmitterTask emitter,
-                                   LibraryElement library) {
-  bool hasNativeClass = false;
-  final compiler = emitter.compiler;
-  // Use implementation to ensure the inclusion of injected members.
-  library.implementation.forEachLocalMember((Element element) {
-    if (element.kind == ElementKind.CLASS) {
-      ClassElement classElement = element;
-      if (classElement.isNative()) {
-        hasNativeClass = true;
-        world.registerInstantiatedClass(classElement);
-        // Also parse the node to know all its methods because
-        // otherwise it will only be parsed if there is a call to
-        // one of its constructor.
-        classElement.parseNode(compiler);
-        // Resolve to setup the inheritance.
-        classElement.ensureResolved(compiler);
-        // Add the information that this class is a subtype of
-        // its supertypes. The code emitter and the ssa builder use that
-        // information.
-        addSubtypes(classElement, emitter.nativeEmitter);
+
+class NativeCodegenEnqueuer extends NativeEnqueuerBase {
+
+  final CodeEmitterTask emitter;
+
+  NativeCodegenEnqueuer(Enqueuer world, Compiler compiler, this.emitter)
+    : super(world, compiler, compiler.enableNativeLiveTypeAnalysis);
+
+  void processNativeClasses(Collection<LibraryElement> libraries) {
+    super.processNativeClasses(libraries);
+
+    // HACK HACK - add all the resolved classes.
+    for (final classElement
+         in compiler.enqueuer.resolution.nativeEnqueuer.registeredClasses) {
+      if (unusedClasses.contains(classElement)) {
+        enqueueClass(classElement, 'was resolved');
       }
     }
-  });
-  if (hasNativeClass) {
-    world.registerStaticUse(compiler.findHelper(
-        const SourceString('dynamicFunction')));
-    world.registerStaticUse(compiler.findHelper(
-        const SourceString('dynamicSetMetadata')));
-    world.registerStaticUse(compiler.findHelper(
-        const SourceString('defineProperty')));
-    world.registerStaticUse(compiler.findHelper(
-        const SourceString('toStringForNativeObject')));
-    world.registerStaticUse(compiler.findHelper(
-        const SourceString('hashCodeForNativeObject')));
+    flushQueue();
+  }
+
+  processClass(ClassElement classElement, cause) {
+    super.processClass(classElement, cause);
+    // Add the information that this class is a subtype of its supertypes.  The
+    // code emitter and the ssa builder use that information.
+    addSubtypes(classElement, emitter.nativeEmitter);
+  }
+
+  void addSubtypes(ClassElement cls, NativeEmitter emitter) {
+    for (DartType type in cls.allSupertypes) {
+      List<Element> subtypes = emitter.subtypes.putIfAbsent(
+          type.element,
+          () => <ClassElement>[]);
+      subtypes.add(cls);
+    }
+
+    List<Element> directSubtypes = emitter.directSubtypes.putIfAbsent(
+        cls.superclass,
+        () => <ClassElement>[]);
+    directSubtypes.add(cls);
+  }
+
+  void logSummary(log(message)) {
+    log('Compiled ${registeredClasses.length} native classes, '
+        '${unusedClasses.length} native classes omitted.');
   }
 }
 
@@ -82,11 +346,252 @@
   if (library.entryCompilationUnit.script.name.contains(
           'dart/tests/compiler/dart2js_native')
       || libraryName == 'dart:isolate'
-      || libraryName == 'dart:html') {
+      || libraryName == 'dart:html'
+      || libraryName == 'dart:svg') {
     library.canUseNative = true;
   }
 }
 
+/**
+ * A summary of the behavior of a native element.
+ *
+ * Native code can return values of one type and cause native subtypes of
+ * another type to be instantiated.  By default, we compute both from the
+ * declared type.
+ *
+ * A field might yield any native type that 'is' the field type.
+ *
+ * A method might create and return instances of native subclasses of its
+ * declared return type, and a callback argument may be called with instances of
+ * the callback parameter type (e.g. Event).
+ *
+ * If there is one or more @Creates annotations, the union of the named types
+ * replaces the inferred instantiated type, and the return type is ignored for
+ * the purpose of inferring instantiated types.
+ *
+ *     @Creates(IDBCursor)    // Created asynchronously.
+ *     @Creates(IDBRequest)   // Created synchronously (for return value).
+ *     IDBRequest request = objectStore.openCursor();
+ *
+ * If there is one or more @Returns annotations, the union of the named types
+ * replaces the declared return type.
+ *
+ *     @Returns(IDBRequest)
+ *     IDBRequest request = objectStore.openCursor();
+ */
+class NativeBehavior {
+
+  /// [DartType]s or [SpecialType]s returned or yielded by the native element.
+  final Collection typesReturned = [];
+
+  /// [DartType]s or [SpecialType]s instantiated by the native element.
+  final Collection typesInstantiated = [];
+
+  static final NativeBehavior NONE = new NativeBehavior();
+
+  //NativeBehavior();
+
+  static NativeBehavior ofJsCall(Send jsCall, Compiler compiler, resolver) {
+    // The first argument of a JS-call is a string encoding various attributes
+    // of the code.
+    //
+    //  'Type1|Type2'.  A union type.
+    //  '=Object'.      A JavaScript Object, no subtype.
+    //  '=List'.        A JavaScript Array, no subtype.
+
+    var argNodes = jsCall.arguments;
+    if (argNodes.isEmpty) {
+      compiler.cancel("JS expression has no type", node: jsCall);
+    }
+
+    var firstArg = argNodes.head;
+    LiteralString specLiteral = firstArg.asLiteralString();
+    if (specLiteral != null) {
+      String specString = specLiteral.dartString.slowToString();
+      // Various things that are not in fact types.
+      if (specString == 'void') return NativeBehavior.NONE;
+      if (specString == '' || specString == 'var') {
+        var behavior = new NativeBehavior();
+        behavior.typesReturned.add(compiler.objectClass.computeType(compiler));
+        return behavior;
+      }
+      var behavior = new NativeBehavior();
+      for (final typeString in specString.split('|')) {
+        var type = _parseType(typeString, compiler,
+            (name) => resolver.resolveTypeFromString(name),
+            jsCall);
+        behavior.typesInstantiated.add(type);
+        behavior.typesReturned.add(type);
+      }
+      return behavior;
+    }
+
+    // TODO(sra): We could accept a type identifier? e.g. JS(bool, '1<2').  It
+    // is not very satisfactory because it does not work for void, dynamic.
+
+    compiler.cancel("Unexpected JS first argument", node: firstArg);
+  }
+
+  static NativeBehavior ofMethod(Element method, Compiler compiler) {
+    DartType type = method.computeType(compiler);
+    var behavior = new NativeBehavior();
+    behavior.typesReturned.add(type.returnType);
+    behavior._capture(type, compiler);
+
+    // TODO(sra): Optional arguments are currently missing from the
+    // DartType. This should be fixed so the following work-around can be
+    // removed.
+    method.computeSignature(compiler).forEachOptionalParameter(
+        (Element parameter) {
+          behavior._escape(parameter.computeType(compiler), compiler);
+        });
+
+    behavior._overrideWithAnnotations(method, compiler);
+    return behavior;
+  }
+
+  static NativeBehavior ofFieldLoad(Element field, Compiler compiler) {
+    DartType type = field.computeType(compiler);
+    var behavior = new NativeBehavior();
+    behavior.typesReturned.add(type);
+    behavior._capture(type, compiler);
+    behavior._overrideWithAnnotations(field, compiler);
+    return behavior;
+  }
+
+  static NativeBehavior ofFieldStore(Element field, Compiler compiler) {
+    DartType type = field.computeType(compiler);
+    var behavior = new NativeBehavior();
+    behavior._escape(type, compiler);
+    // We don't override the default behaviour - the annotations apply to
+    // loading the field.
+    return behavior;
+  }
+
+  void _overrideWithAnnotations(Element element, Compiler compiler) {
+    if (element.metadata.isEmpty) return;
+
+    DartType lookup(String name) {
+      Element e = element.buildScope().lookup(new SourceString(name));
+      if (e == null) return null;
+      if (e is! ClassElement) return null;
+      e.ensureResolved(compiler);
+      return e.computeType(compiler);
+    }
+
+    var creates =
+        _collect(element, compiler,
+            compiler.enqueuer.resolution.nativeEnqueuer.annotationCreatesClass,
+            lookup);
+    var returns =
+        _collect(element, compiler,
+            compiler.enqueuer.resolution.nativeEnqueuer.annotationReturnsClass,
+            lookup);
+
+    if (creates != null) {
+      typesInstantiated..clear()..addAll(creates);
+    }
+    if (returns != null) {
+      typesReturned..clear()..addAll(returns);
+    }
+  }
+
+  /**
+   * Returns a list of type constraints from the annotations of
+   * [annotationClass].
+   * Returns `null` if no constraints.
+   */
+  static _collect(Element element, Compiler compiler, Element annotationClass,
+                  lookup(str)) {
+    var types = null;
+    for (Link<MetadataAnnotation> link = element.metadata;
+         !link.isEmpty;
+         link = link.tail) {
+      MetadataAnnotation annotation = link.head.ensureResolved(compiler);
+      var value = annotation.value;
+      if (value is! ConstructedConstant) continue;
+      if (value.type is! InterfaceType) continue;
+      if (!identical(value.type.element, annotationClass)) continue;
+
+      var fields = value.fields;
+      // TODO(sra): Better validation of the constant.
+      if (fields.length != 1 || fields[0] is! StringConstant) {
+        compiler.cancel(
+            'Annotations needs one string: ${annotation.parseNode(compiler)}');
+      }
+      String specString = fields[0].toDartString().slowToString();
+      for (final typeString in specString.split('|')) {
+        var type = _parseType(typeString, compiler, lookup, annotation);
+        if (types == null) types = [];
+        types.add(type);
+      }
+    }
+    return types;
+  }
+
+  /// Models the behavior of having intances of [type] escape from Dart code
+  /// into native code.
+  void _escape(DartType type, Compiler compiler) {
+    type = type.unalias(compiler);
+    if (type is FunctionType) {
+      // A function might be called from native code, passing us novel
+      // parameters.
+      _escape(type.returnType, compiler);
+      for (Link<DartType> parameters = type.parameterTypes;
+           !parameters.isEmpty;
+           parameters = parameters.tail) {
+        _capture(parameters.head, compiler);
+      }
+    }
+  }
+
+  /// Models the behavior of Dart code receiving instances and methods of [type]
+  /// from native code.  We usually start the analysis by capturing a native
+  /// method that has been used.
+  void _capture(DartType type, Compiler compiler) {
+    type = type.unalias(compiler);
+    if (type is FunctionType) {
+      _capture(type.returnType, compiler);
+      for (Link<DartType> parameters = type.parameterTypes;
+           !parameters.isEmpty;
+           parameters = parameters.tail) {
+        _escape(parameters.head, compiler);
+      }
+    } else {
+      typesInstantiated.add(type);
+    }
+  }
+
+  static _parseType(String typeString, Compiler compiler,
+      lookup(name), locationNodeOrElement) {
+    if (typeString == '=Object') return SpecialType.JsObject;
+    if (typeString == '=List') return SpecialType.JsArray;
+    if (typeString == 'dynamic') {
+      return  compiler.dynamicClass.computeType(compiler);
+    }
+    DartType type = lookup(typeString);
+    if (type != null) return type;
+
+    int index = typeString.indexOf('<');
+    if (index < 1) {
+      compiler.cancel("Type '$typeString' not found",
+          node: _errorNode(locationNodeOrElement, compiler));
+    }
+    type = lookup(typeString.substring(0, index));
+    if (type != null)  {
+      // TODO(sra): Parse type parameters.
+      return type;
+    }
+    compiler.cancel("Type '$typeString' not found",
+        node: _errorNode(locationNodeOrElement, compiler));
+  }
+
+  static _errorNode(locationNodeOrElement, compiler) {
+    if (locationNodeOrElement is Node) return locationNodeOrElement;
+    return locationNodeOrElement.parseNode(compiler);
+  }
+}
+
 void checkAllowedLibrary(ElementListener listener, Token token) {
   LibraryElement currentLibrary = listener.compilationUnitElement.getLibrary();
   if (!currentLibrary.canUseNative) {
@@ -175,6 +680,8 @@
   return false;
 }
 
+final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
+
 void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
   Compiler compiler = builder.compiler;
   FunctionElement element = builder.work.element;
@@ -211,7 +718,6 @@
   // 1) foo() native; hasBody = false, isRedirecting = false
   // 2) foo() native "bar"; hasBody = false, isRedirecting = true
   // 3) foo() native "return 42"; hasBody = true, isRedirecting = false
-  RegExp nativeRedirectionRegExp = const RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
   bool hasBody = false;
   bool isRedirecting = false;
   String nativeMethodName = element.name.slowToString();
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 1ebc710..d2c8c11 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -76,6 +76,12 @@
 
   TreeElements resolve(Element element) {
     return measure(() {
+      if (Elements.isErroneousElement(element)) return null;
+
+      for (MetadataAnnotation metadata in element.metadata) {
+        metadata.ensureResolved(compiler);
+      }
+
       ElementKind kind = element.kind;
       if (identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR) ||
           identical(kind, ElementKind.FUNCTION) ||
@@ -90,6 +96,14 @@
           identical(kind, ElementKind.FIELD_PARAMETER)) {
         return resolveParameter(element);
       }
+      if (element.isClass()) {
+        ClassElement cls = element;
+        cls.ensureResolved(compiler);
+        return null;
+      } else if (element.isTypedef() || element.isTypeVariable()) {
+        element.computeType(compiler);
+        return null;
+      }
 
       compiler.unimplemented("resolve($element)",
                              node: element.parseNode(compiler));
@@ -445,6 +459,9 @@
       // TODO(johnniwinther): Check matching type variables and
       // empty extends/implements clauses.
     }
+    for (MetadataAnnotation metadata in element.metadata) {
+      metadata.ensureResolved(compiler);
+    }
   }
 
   void checkMembers(ClassElement cls) {
@@ -628,7 +645,7 @@
           visitorFor(annotation.annotatedElement.enclosingElement);
       node.accept(visitor);
       annotation.value = compiler.constantHandler.compileNodeWithDefinitions(
-          node, visitor.mapping);
+          node, visitor.mapping, isConst: true);
 
       annotation.resolutionState = STATE_DONE;
     }));
@@ -1031,12 +1048,14 @@
     if (send != null) {
       typeName = send.selector;
     }
-    if (identical(typeName.source.stringValue, 'void')) {
+    String stringValue = typeName.source.stringValue;
+    if (identical(stringValue, 'void')) {
       return compiler.types.voidType.element;
-    } else if (
-        // TODO(aprelev@gmail.com): Remove deprecated Dynamic keyword support.
-        identical(typeName.source.stringValue, 'Dynamic')
-        || identical(typeName.source.stringValue, 'dynamic')) {
+    } else if (identical(stringValue, 'Dynamic')) {
+      // TODO(aprelev@gmail.com): Remove deprecated Dynamic keyword support.
+      compiler.onDeprecatedFeature(typeName, 'Dynamic');
+      return compiler.dynamicClass;
+    } else if (identical(stringValue, 'dynamic')) {
       return compiler.dynamicClass;
     } else if (send != null) {
       Element e = scope.lookup(send.receiver.asIdentifier().source);
@@ -1201,8 +1220,12 @@
     Element result = scope.lookup(name);
     if (!Elements.isUnresolved(result)) {
       if (!inInstanceContext && result.isInstanceMember()) {
-        error(node, MessageKind.NO_INSTANCE_AVAILABLE, [node]);
-        // TODO(johnniwinther): Create an ErroneousElement.
+        compiler.reportMessage(compiler.spanFromNode(node),
+            MessageKind.NO_INSTANCE_AVAILABLE.error([name]),
+            Diagnostic.ERROR);
+        return new ErroneousElement(MessageKind.NO_INSTANCE_AVAILABLE,
+                                    [name],
+                                    name, enclosingElement);
       } else if (result.isAmbiguous()) {
         AmbiguousElement ambiguous = result;
         compiler.reportMessage(compiler.spanFromNode(node),
@@ -1472,7 +1495,7 @@
         enclosingElement);
     Scope oldScope = scope; // The scope is modified by [setupFunction].
     setupFunction(node, function);
-    defineElement(node, function, doAddToScope: node.name !== null);
+    defineElement(node, function, doAddToScope: node.name != null);
 
     Element previousEnclosingElement = enclosingElement;
     enclosingElement = function;
@@ -1615,12 +1638,17 @@
     if (node.isOperator) {
       SourceString source = node.selector.asOperator().source;
       String string = source.stringValue;
-      if (identical(string, '!')   || identical(string, '&&')  || string == '||' ||
-          identical(string, 'is')  || identical(string, 'as')  ||
+      if (identical(string, '!') ||
+          identical(string, '&&') || identical(string, '||') ||
+          identical(string, 'is') || identical(string, 'as') ||
           identical(string, '===') || identical(string, '!==') ||
+          identical(string, '?') ||
           identical(string, '>>>')) {
         return null;
       }
+      if (!isUserDefinableOperator(source.stringValue)) {
+        source = Elements.mapToUserOperator(source);
+      }
       return node.arguments.isEmpty
           ? new Selector.unaryOperator(source)
           : new Selector.binaryOperator(source);
@@ -1735,6 +1763,12 @@
       } else if (!selector.applies(target, compiler)) {
         warnArgumentMismatch(node, target);
       }
+
+      if (target != null &&
+          target.kind == ElementKind.FOREIGN &&
+          selector.name == const SourceString('JS')) {
+        world.nativeEnqueuer.registerJsCall(node, this);
+      }
     }
 
     // TODO(ngeoffray): Warn if target is null and the send is
@@ -1751,6 +1785,15 @@
             [target.name]);
   }
 
+  /// Callback for native enqueuer to parse a type.  Returns [:null:] on error.
+  DartType resolveTypeFromString(String typeName) {
+    Element element = scope.lookup(new SourceString(typeName));
+    if (element == null) return null;
+    if (element is! ClassElement) return null;
+    element.ensureResolved(compiler);
+    return element.computeType(compiler);
+  }
+
   visitSendSet(SendSet node) {
     Element target = resolveSend(node);
     Element setter = target;
@@ -1857,12 +1900,14 @@
   }
 
   visitLiteralString(LiteralString node) {
+    world.registerInstantiatedClass(compiler.stringClass);
   }
 
   visitLiteralNull(LiteralNull node) {
   }
 
   visitStringJuxtaposition(StringJuxtaposition node) {
+    world.registerInstantiatedClass(compiler.stringClass);
     node.visitChildren(this);
   }
 
@@ -2053,6 +2098,7 @@
   }
 
   visitLiteralList(LiteralList node) {
+    world.registerInstantiatedClass(compiler.listClass);
     NodeList arguments = node.typeArguments;
     if (arguments != null) {
       Link<Node> nodes = arguments.nodes;
@@ -2074,6 +2120,7 @@
   }
 
   visitStringInterpolation(StringInterpolation node) {
+    world.registerInstantiatedClass(compiler.stringClass);
     node.visitChildren(this);
   }
 
@@ -2608,8 +2655,8 @@
     LibraryElement lib = element.getLibrary();
     return
       !identical(lib, compiler.coreLibrary) &&
-      !identical(lib, compiler.coreImplLibrary) &&
       !identical(lib, compiler.jsHelperLibrary) &&
+      !identical(lib, compiler.interceptorsLibrary) &&
       (identical(type.element, compiler.dynamicClass) ||
        identical(type.element, compiler.boolClass) ||
        identical(type.element, compiler.numClass) ||
@@ -2882,13 +2929,17 @@
       }
     } else {
       if (element.isGetter()) {
-        if (!element.getLibrary().isPlatformLibrary) {
-          // TODO(ahe): Remove the isPlatformLibrary check.
-          if (!identical(formalParameters.getEndToken().next.stringValue, 'native')) {
-            // TODO(ahe): Remove the check for native keyword.
+        if (!identical(formalParameters.getEndToken().next.stringValue,
+                       // TODO(ahe): Remove the check for native keyword.
+                       'native')) {
+          if (compiler.rejectDeprecatedFeatures &&
+              // TODO(ahe): Remove isPlatformLibrary check.
+              !element.getLibrary().isPlatformLibrary) {
             compiler.reportMessage(compiler.spanFromNode(formalParameters),
                                    MessageKind.EXTRA_FORMALS.error([]),
-                                   Diagnostic.WARNING);
+                                   Diagnostic.ERROR);
+          } else {
+            compiler.onDeprecatedFeature(formalParameters, 'getter parameters');
           }
         }
       }
diff --git a/sdk/lib/_internal/compiler/implementation/runtime_types.dart b/sdk/lib/_internal/compiler/implementation/runtime_types.dart
index c583cb1..3f7967a 100644
--- a/sdk/lib/_internal/compiler/implementation/runtime_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/runtime_types.dart
@@ -11,10 +11,6 @@
 import 'util/util.dart';
 
 class RuntimeTypeInformation {
-
-  static final SourceString CACHE_HELPER_NAME =
-      const SourceString('getOrCreateCachedRuntimeType');
-
   /**
    * Names used for elements in runtime type information. This map is kept to
    * detect elements with the same name and use a different name instead.
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
index 8e3c360..e7ceaf8 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
@@ -176,4 +176,13 @@
     metadata = const Link<MetadataAnnotation>();
     enclosingElement.addMember(memberElement, listener);
   }
+
+  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
+    popNode(); // Discard arguments.
+    if (periodBeforeName != null) {
+      popNode(); // Discard name.
+    }
+    popNode(); // Discard node (Send or Identifier).
+    pushMetadata(new PartialMetadataAnnotation(beginToken));
+  }
 }
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index ae3453b..783be1c 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -254,7 +254,7 @@
   void beginMetadata(Token token) {
   }
 
-  void endMetadata(Token beginToken, Token endToken) {
+  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
   }
 
   void beginOptionalFormalParameters(Token token) {
@@ -605,6 +605,8 @@
   toString() => reason;
 }
 
+typedef int IdGenerator();
+
 /**
  * A parser event listener designed to work with [PartialParser]. It
  * builds elements representing the top-level declarations found in
@@ -612,7 +614,7 @@
  * [compilationUnitElement].
  */
 class ElementListener extends Listener {
-  Function idGenerator;
+  final IdGenerator idGenerator;
   final DiagnosticListener listener;
   final CompilationUnitElement compilationUnitElement;
   final StringValidator stringValidator;
@@ -623,10 +625,9 @@
   Link<MetadataAnnotation> metadata = const Link<MetadataAnnotation>();
 
   ElementListener(DiagnosticListener listener,
-                  CompilationUnitElement this.compilationUnitElement,
-                  int idGenerator())
+                  this.compilationUnitElement,
+                  this.idGenerator)
       : this.listener = listener,
-        this.idGenerator = idGenerator,
         stringValidator = new StringValidator(listener),
         interpolationScope = const Link<StringQuoting>();
 
@@ -735,7 +736,10 @@
     }
   }
 
-  void endMetadata(Token beginToken, Token endToken) {
+  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
+    if (periodBeforeName != null) {
+      popNode(); // Discard name.
+    }
     popNode(); // Discard node (Send or Identifier).
     pushMetadata(new PartialMetadataAnnotation(beginToken));
   }
@@ -788,6 +792,7 @@
     pushElement(new PartialClassElement(
         name.source, interfaceKeyword, endToken, compilationUnitElement, id));
     rejectBuiltInIdentifier(name);
+    listener.onDeprecatedFeature(interfaceKeyword, 'interface declarations');
   }
 
   void endFunctionTypeAlias(Token typedefKeyword, Token endToken) {
@@ -1002,8 +1007,9 @@
     metadata = metadata.prepend(annotation);
   }
 
+  // TODO(ahe): Remove this method.
   void addScriptTag(ScriptTag tag) {
-    // TODO(ahe): Remove this method.
+    listener.onDeprecatedFeature(tag, '# tags');
     addLibraryTag(tag.toLibraryTag());
   }
 
@@ -1335,6 +1341,9 @@
       NodeList arguments = new NodeList.singleton(argument);
       pushNode(new Send(receiver, new Operator(token), arguments));
     }
+    if (identical(tokenString, '===') || identical(tokenString, '!==')) {
+      listener.onDeprecatedFeature(token, tokenString);
+    }
   }
 
   void beginCascade(Token token) {
@@ -1722,6 +1731,43 @@
                                 beginToken, inKeyword));
   }
 
+  void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
+    NodeList arguments = popNode();
+    if (arguments == null) {
+      // This is a constant expression.
+      Identifier name;
+      if (periodBeforeName != null) {
+        name = popNode();
+      }
+      NodeList typeArguments = popNode();
+      Node receiver = popNode();
+      if (typeArguments != null) {
+        receiver = new TypeAnnotation(receiver, typeArguments);
+        recoverableError('Error: type arguments are not allowed here',
+                         node: typeArguments);
+      } else {
+        Identifier identifier = receiver.asIdentifier();
+        Send send = receiver.asSend();
+        if (identifier != null) {
+          receiver = new Send(null, identifier);
+        } else if (send == null) {
+          internalError(node: receiver);
+        }
+      }
+      Send send = receiver;
+      if (name != null) {
+        send = new Send(receiver, name);
+      }
+      pushNode(send);
+    } else {
+      // This is a const constructor call.
+      endConstructorReference(beginToken, periodBeforeName, endToken);
+      Node constructor = popNode();
+      pushNode(new NewExpression(beginToken,
+                                 new Send(null, constructor, arguments)));
+    }
+  }
+
   void handleAssertStatement(Token assertKeyword, Token semicolonToken) {
     NodeList arguments = popNode();
     Node selector = new Identifier(assertKeyword);
@@ -1892,7 +1938,7 @@
     if (cachedNode != null) return cachedNode;
     cachedNode = parse(listener,
                        annotatedElement.getCompilationUnit(),
-                       (p) => p.parseSend(beginToken.next));
+                       (p) => p.parseMetadata(beginToken));
     return cachedNode;
   }
 }
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
index 73e8c0a..f7ea476 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
@@ -210,9 +210,14 @@
     assert(optional('@', token));
     token = parseIdentifier(token.next);
     token = parseQualifiedRestOpt(token);
-    token = parseQualifiedRestOpt(token);
+    token = parseTypeArgumentsOpt(token);
+    Token period = null;
+    if (optional('.', token)) {
+      period = token;
+      token = parseIdentifier(token.next);
+    }
     token = parseArgumentsOpt(token);
-    listener.endMetadata(atToken, token);
+    listener.endMetadata(atToken, period, token);
     return token;
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart
index 7516e6c..02f409a 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart
@@ -99,7 +99,7 @@
     } else if (identical(value, '=>')) {
       token = parseExpression(token.next);
       expectSemicolon(token);
-    } else if (value === '=') {
+    } else if (value == '=') {
       token = parseRedirectingFactoryBody(token);
       expectSemicolon(token);
     } else {
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart b/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
index 63b9381..c158df6 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
@@ -10,7 +10,13 @@
 
   void scanLibrary(LibraryElement library) {
     var compilationUnit = library.entryCompilationUnit;
-    compiler.log("scanning library ${compilationUnit.script.name}");
+    var canonicalUri = library.uri.toString();
+    var resolvedUri = compilationUnit.script.uri.toString();
+    if (canonicalUri == resolvedUri) {
+      compiler.log("scanning library $canonicalUri");
+    } else {
+      compiler.log("scanning library $canonicalUri ($resolvedUri)");
+    }
     scan(compilationUnit);
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/token.dart b/sdk/lib/_internal/compiler/implementation/scanner/token.dart
index 9012021..a768b50 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/token.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/token.dart
@@ -177,8 +177,8 @@
   String slowToString() => value.slowToString();
 }
 
-interface SourceString extends Iterable<int> default StringWrapper {
-  const SourceString(String string);
+abstract class SourceString extends Iterable<int> {
+  const factory SourceString(String string) = StringWrapper;
 
   void printOn(StringBuffer sb);
 
diff --git a/sdk/lib/_internal/compiler/implementation/source_map_builder.dart b/sdk/lib/_internal/compiler/implementation/source_map_builder.dart
index 0670ee2..06a6ca0 100644
--- a/sdk/lib/_internal/compiler/implementation/source_map_builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_map_builder.dart
@@ -4,9 +4,8 @@
 
 library source_map_builder;
 
-import 'dart:json';
-
-import 'scanner/scannerlib.dart';
+import 'util/util.dart';
+import 'scanner/scannerlib.dart' show Token;
 import 'source_file.dart';
 
 class SourceMapBuilder {
@@ -53,6 +52,19 @@
     entries.add(new SourceMapEntry(sourceLocation, targetOffset));
   }
 
+  void printStringListOn(List<String> strings, StringBuffer buffer) {
+    bool first = true;
+    buffer.add('[');
+    for (String string in strings) {
+      if (!first) buffer.add(',');
+      buffer.add("'");
+      writeJsonEscapedCharsOn(string.charCodes.iterator(), buffer, null);
+      buffer.add("'");
+      first = false;
+    }
+    buffer.add(']');
+  }
+
   String build(SourceFile targetFile) {
     StringBuffer buffer = new StringBuffer();
     buffer.add('{\n');
@@ -61,10 +73,10 @@
     entries.forEach((SourceMapEntry entry) => writeEntry(entry, targetFile, buffer));
     buffer.add('",\n');
     buffer.add('  "sources": ');
-    JSON.printOn(sourceUrlList, buffer);
+    printStringListOn(sourceUrlList, buffer);
     buffer.add(',\n');
     buffer.add('  "names": ');
-    JSON.printOn(sourceNameList, buffer);
+    printStringListOn(sourceNameList, buffer);
     buffer.add('\n}\n');
     return buffer.toString();
   }
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index cab86dd..b6137f2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -45,44 +45,40 @@
     compiler.unimplemented('Unknown operator', node: op);
   }
 
-  // TODO(karlklose,kasperl): change uses of getStatic[Get|Set]Interceptor to
-  // use this function.
-  Element getStaticInterceptorBySelector(Selector selector) {
+  Element getStaticInterceptor(Selector selector) {
+    // Check if we have an interceptor method implemented with
+    // interceptor classes.
+    JavaScriptBackend backend = compiler.backend;
+    if (backend.shouldInterceptSelector(selector)) {
+      return backend.getInterceptorMethod;
+    }
+
+    // Fall back to the old interceptor mechanism.
+    String name = selector.name.slowToString();
     if (selector.isGetter()) {
       // TODO(lrn): If there is no get-interceptor, but there is a
       // method-interceptor, we should generate a get-interceptor automatically.
-      return getStaticGetInterceptor(selector.name);
+      String mangledName = "get\$$name";
+      return compiler.findInterceptor(new SourceString(mangledName));
     } else if (selector.isSetter()) {
-      return getStaticSetInterceptor(selector.name);
+      String mangledName = "set\$$name";
+      return compiler.findInterceptor(new SourceString(mangledName));
     } else {
-      return getStaticInterceptor(selector.name, selector.argumentCount);
+      Element element = compiler.findInterceptor(new SourceString(name));
+      if (element != null && element.isFunction()) {
+        // Only pick the function element with the short name if the
+        // number of parameters it expects matches the number we're
+        // passing modulo the receiver.
+        FunctionElement function = element;
+        if (function.parameterCount(compiler) == selector.argumentCount + 1) {
+          return element;
+        }
+      }
+      String longMangledName = "$name\$${selector.argumentCount}";
+      return compiler.findInterceptor(new SourceString(longMangledName));
     }
   }
 
-  Element getStaticInterceptor(SourceString name, int parameters) {
-    String mangledName = name.slowToString();
-    Element element = compiler.findInterceptor(new SourceString(mangledName));
-    if (element != null && element.isFunction()) {
-      // Only pick the function element with the short name if the
-      // number of parameters it expects matches the number we're
-      // passing modulo the receiver.
-      FunctionElement function = element;
-      if (function.parameterCount(compiler) == parameters + 1) return element;
-    }
-    String longMangledName = "$mangledName\$$parameters";
-    return compiler.findInterceptor(new SourceString(longMangledName));
-  }
-
-  Element getStaticGetInterceptor(SourceString name) {
-    String mangledName = "get\$${name.slowToString()}";
-    return compiler.findInterceptor(new SourceString(mangledName));
-  }
-
-  Element getStaticSetInterceptor(SourceString name) {
-    String mangledName = "set\$${name.slowToString()}";
-    return compiler.findInterceptor(new SourceString(mangledName));
-  }
-
   Element getOperatorInterceptor(Operator op) {
     SourceString name = mapOperatorToMethodName(op);
     return compiler.findHelper(name);
@@ -412,9 +408,9 @@
     });
     if (closureData.isClosure()) {
       // Inside closure redirect references to itself to [:this:].
-      HInstruction thisInstruction = new HThis();
-      builder.add(thisInstruction);
-      updateLocal(closureData.closureElement, thisInstruction);
+      builder.thisInstruction = new HThis(closureData.thisElement);
+      builder.graph.entry.addAtEntry(builder.thisInstruction);
+      updateLocal(closureData.closureElement, builder.thisInstruction);
     } else if (element.isInstanceMember()
                || element.isGenerativeConstructor()) {
       // Once closures have been mapped to classes their instance members might
@@ -422,9 +418,19 @@
       // context.
       ClassElement cls = element.getEnclosingClass();
       DartType type = cls.computeType(builder.compiler);
-      HInstruction thisInstruction = new HThis(new HBoundedType.nonNull(type));
-      builder.add(thisInstruction);
-      directLocals[closureData.thisElement] = thisInstruction;
+      builder.thisInstruction = new HThis(closureData.thisElement,
+                                          new HBoundedType.nonNull(type));
+      builder.graph.entry.addAtEntry(builder.thisInstruction);
+      directLocals[closureData.thisElement] = builder.thisInstruction;
+    }
+
+    if (builder.backend.isInterceptorClass(element.getEnclosingClass())) {
+      Element parameter = new Element(
+          const SourceString('receiver'), ElementKind.VARIABLE, element);
+      HParameterValue value = new HParameterValue(parameter);
+      builder.graph.entry.addAfter(
+          directLocals[closureData.thisElement], value);
+      directLocals[closureData.thisElement] = value;
     }
   }
 
@@ -893,6 +899,7 @@
   LocalsHandler localsHandler;
   HInstruction rethrowableException;
   Map<Element, HInstruction> parameters;
+  HInstruction thisInstruction;
   final RuntimeTypeInformation rti;
   HParameterValue lastAddedParameter;
 
@@ -1155,6 +1162,15 @@
     return true;
   }
 
+  inlinedFrom(Element element, f()) {
+    return compiler.withCurrentElement(element, () {
+      sourceElementStack.add(element);
+      var result = f();
+      sourceElementStack.removeLast();
+      return result;
+    });
+  }
+
   /**
    * Documentation wanted -- johnniwinther
    *
@@ -1165,16 +1181,19 @@
                              Selector selector,
                              Link<Node> arguments,
                              List<FunctionElement> constructors,
-                             Map<Element, HInstruction> fieldValues) {
+                             Map<Element, HInstruction> fieldValues,
+                             FunctionElement inlinedFromElement) {
     compiler.withCurrentElement(constructor, () {
       assert(invariant(constructor, constructor.isImplementation));
       constructors.addLast(constructor);
 
       List<HInstruction> compiledArguments = new List<HInstruction>();
-      bool succeeded = addStaticSendArgumentsToList(selector,
-                                                    arguments,
-                                                    constructor,
-                                                    compiledArguments);
+      bool succeeded =
+          inlinedFrom(inlinedFromElement,
+                       () => addStaticSendArgumentsToList(selector,
+                                                          arguments,
+                                                          constructor,
+                                                          compiledArguments));
       if (!succeeded) {
         // Non-matching super and redirects are compile-time errors and thus
         // checked by the resolver.
@@ -1259,7 +1278,7 @@
           Selector selector = elements.getSelector(call);
           Link<Node> arguments = call.arguments;
           inlineSuperOrRedirect(target, selector, arguments, constructors,
-                                fieldValues);
+                                fieldValues, constructor);
           foundSuperOrRedirect = true;
         } else {
           // A field initializer.
@@ -1293,7 +1312,8 @@
                               selector,
                               const Link<Node>(),
                               constructors,
-                              fieldValues);
+                              fieldValues,
+                              constructor);
       }
     }
   }
@@ -1313,7 +1333,7 @@
           Node node = member.parseNode(compiler);
           SendSet assignment = node.asSendSet();
           HInstruction value;
-          if (assignment === null) {
+          if (assignment == null) {
             value = graph.addConstantNull(constantSystem);
           } else {
             Node right = assignment.arguments.head;
@@ -1472,12 +1492,12 @@
       // This is the code we emit for a parameter that is being checked
       // on whether it was given at value at the call site:
       //
-      // foo([a = 42) {
+      // foo([a = 42]) {
       //   if (?a) print('parameter passed $a');
       // }
       //
       // foo([a = 42]) {
-      //   var t1 = a === sentinel;
+      //   var t1 = identical(a, sentinel);
       //   if (t1) a = 42;
       //   if (!t1) print('parameter passed ' + a);
       // }
@@ -2271,6 +2291,17 @@
     return result;
   }
 
+  Element getInterceptor(Send send, Selector selector) {
+    if (!methodInterceptionEnabled) return null;
+    if (!backend.isInterceptorClass(currentElement.getEnclosingClass())
+        && send.receiver == null) {
+      // The call applies to [:this:] which can not be an interceptor
+      // object.
+      return null;
+    }
+    return interceptors.getStaticInterceptor(selector);
+  }
+
   void generateInstanceGetterWithCompiledReceiver(Send send,
                                                   HInstruction receiver) {
     assert(Elements.isInstanceSend(send, elements));
@@ -2282,13 +2313,32 @@
         : elements.getSelector(send.selector);
     assert(selector.isGetter());
     SourceString getterName = selector.name;
-    Element staticInterceptor = null;
-    if (methodInterceptionEnabled) {
-      staticInterceptor = interceptors.getStaticGetInterceptor(getterName);
-    }
+    Element interceptor = getInterceptor(send, selector);
+
     bool hasGetter = compiler.world.hasAnyUserDefinedGetter(selector);
-    if (staticInterceptor != null) {
-      HStatic target = new HStatic(staticInterceptor);
+    if (interceptor == backend.getInterceptorMethod && interceptor != null) {
+      // If we're using an interceptor class, emit a call to the
+      // interceptor method and then the actual dynamic call on the
+      // interceptor object.
+      HInstruction instruction;
+      if (backend.isInterceptorClass(currentElement.getEnclosingClass())
+          && send.receiver == null) {
+        instruction = thisInstruction;
+      } else {
+        HStatic target = new HStatic(interceptor);
+        add(target);
+        instruction = new HInvokeStatic(<HInstruction>[target, receiver]);
+        add(instruction);
+      }
+      instruction = new HInvokeDynamicGetter(
+          selector, null, instruction, !hasGetter);
+      // Add the receiver as an argument to the getter call on the
+      // interceptor.
+      instruction.inputs.add(receiver);
+      pushWithPosition(instruction, send);
+    } else if (elements[send] == null && interceptor != null) {
+      // Use the old, deprecated interceptor mechanism.
+      HStatic target = new HStatic(interceptor);
       add(target);
       List<HInstruction> inputs = <HInstruction>[target, receiver];
       pushWithPosition(new HInvokeInterceptor(selector, inputs, !hasGetter),
@@ -2345,13 +2395,13 @@
     Selector selector = elements.getSelector(send);
     assert(selector.isSetter());
     SourceString setterName = selector.name;
-    Element staticInterceptor = null;
-    if (methodInterceptionEnabled) {
-      staticInterceptor = interceptors.getStaticSetInterceptor(setterName);
-    }
+    Element interceptor = getInterceptor(send, selector);
     bool hasSetter = compiler.world.hasAnyUserDefinedSetter(selector);
-    if (staticInterceptor != null) {
-      HStatic target = new HStatic(staticInterceptor);
+    if (interceptor != null && interceptor == backend.getInterceptorMethod) {
+      compiler.internalError(
+          'Unimplemented intercepted setter call with interceptor classes');
+    } else if (interceptor != null && elements[send] == null) {
+      HStatic target = new HStatic(interceptor);
       add(target);
       List<HInstruction> inputs = <HInstruction>[target, receiver, value];
       addWithPosition(new HInvokeInterceptor(selector, inputs), send);
@@ -2615,20 +2665,41 @@
       dartMethodName = node.selector.asIdentifier().source;
     }
 
-    Element interceptor = null;
-    if (methodInterceptionEnabled && node.receiver != null) {
-      interceptor = interceptors.getStaticInterceptor(dartMethodName,
-                                                      node.argumentCount());
-    }
+    Element interceptor = getInterceptor(node, selector);
+
     if (interceptor != null) {
-      HStatic target = new HStatic(interceptor);
-      add(target);
-      inputs.add(target);
-      visit(node.receiver);
-      inputs.add(pop());
-      addGenericSendArgumentsToList(node.arguments, inputs);
-      pushWithPosition(new HInvokeInterceptor(selector, inputs), node);
-      return;
+      if (interceptor == backend.getInterceptorMethod) {
+        if (backend.isInterceptorClass(currentElement.getEnclosingClass())
+            && node.receiver == null) {
+          inputs.add(thisInstruction);
+          inputs.add(localsHandler.readThis());
+        } else {
+          HStatic target = new HStatic(interceptor);
+          add(target);
+          visit(node.receiver);
+          HInstruction receiver = pop();
+          HInstruction instruction =
+              new HInvokeStatic(<HInstruction>[target, receiver]);
+          add(instruction);
+          inputs.add(instruction);
+          inputs.add(receiver);
+        }
+        addDynamicSendArgumentsToList(node, inputs);
+        // The first entry in the inputs list is the interceptor. The
+        // second is the receiver, and the others are the arguments.
+        HInstruction instruction = new HInvokeDynamicMethod(selector, inputs);
+        pushWithPosition(instruction, node);
+        return;
+      } else if (elements[node] == null) {
+        HStatic target = new HStatic(interceptor);
+        add(target);
+        inputs.add(target);
+        visit(node.receiver);
+        inputs.add(pop());
+        addGenericSendArgumentsToList(node.arguments, inputs);
+        pushWithPosition(new HInvokeInterceptor(selector, inputs), node);
+        return;
+      }
     }
 
     Element element = elements[node];
@@ -2728,7 +2799,7 @@
     }
     addGenericSendArgumentsToList(node.arguments, inputs);
     String name = backend.namer.publicInstanceMethodNameByArity(
-        Elements.OPERATOR_EQUALS, 1);
+        const SourceString('=='), 1);
     push(new HForeign(new DartString.literal('!!#.$name'),
                       const LiteralDartString('bool'),
                       inputs));
@@ -3090,7 +3161,7 @@
       return;
     }
 
-    if (type.element.modifiers.isAbstract() &&
+    if (constructor.getEnclosingClass().isAbstract(compiler) &&
         constructor.isGenerativeConstructor()) {
       generateAbstractClassInstantiationError(node, type.name.slowToString());
       return;
@@ -3194,7 +3265,7 @@
     Element element = elements[node];
     HInstruction name;
     Element helper =
-        compiler.findHelper(RuntimeTypeInformation.CACHE_HELPER_NAME);
+        compiler.findHelper(const SourceString('createRuntimeType'));
     if (element.isClass()) {
       String string = rti.generateRuntimeTypeString(element, 0);
       name = addConstantString(node.selector, string);
@@ -3686,7 +3757,9 @@
     HInstruction iterator;
     void buildInitializer() {
       SourceString iteratorName = const SourceString("iterator");
-      Element interceptor = interceptors.getStaticInterceptor(iteratorName, 0);
+      Selector selector =
+          new Selector.call(iteratorName, work.element.getLibrary(), 0);
+      Element interceptor = interceptors.getStaticInterceptor(selector);
       assert(interceptor != null);
       visit(node.expression);
       pushInvokeHelper1(interceptor, pop());
@@ -3695,7 +3768,7 @@
     HInstruction buildCondition() {
       SourceString name = const SourceString('hasNext');
       Selector selector = new Selector.getter(name, work.element.getLibrary());
-      if (interceptors.getStaticGetInterceptor(name) != null) {
+      if (interceptors.getStaticInterceptor(selector) != null) {
         compiler.internalError("hasNext getter must not be intercepted",
                                node: node);
       }
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 040337d..1cc242f 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1520,6 +1520,16 @@
                        arguments);
   }
 
+  // TODO(ngeoffray): Once we remove the old interceptors, we can
+  // start using HInvokeInterceptor to represent interceptor calls on
+  // an Interceptor class. Currently we recognize if a call is a call
+  // on an interceptor by checking if the arguments in the inputs list
+  // is one more than the arguments in the selector. The extra
+  // argument in an interceptor call is the actual receiver.
+  bool isInterceptorCall(HInvokeDynamic node) {
+    return node.inputs.length - 1 != node.selector.argumentCount;
+  }
+
   visitInvokeDynamicMethod(HInvokeDynamicMethod node) {
     use(node.receiver);
     js.Expression object = pop();
@@ -1541,7 +1551,16 @@
 
       // Register this invocation to collect the types used at all call sites.
       Selector selector = getOptimizedSelectorFor(node, node.selector);
-      backend.registerDynamicInvocation(node, selector, types);
+      // TODO(ngeoffray): Remove the following restriction. Because
+      // the second input of this interceptor call is the actual
+      // receiver (the first is the interceptor), the backend gets
+      // confused. We should pass a list of types instead of a node to
+      // [registerDynamicInvocation].
+      if (!isInterceptorCall(node)) {
+        backend.registerDynamicInvocation(node, selector, types);
+      } else {
+        backend.addInterceptedSelector(selector);
+      }
 
       // If we don't know what we're calling or if we are calling a getter,
       // we need to register that fact that we may be calling a closure
@@ -1571,6 +1590,8 @@
                                    Selector defaultSelector) {
     // TODO(4434): For private members we need to use the untyped selector.
     if (defaultSelector.name.isPrivate()) return defaultSelector;
+    // TODO(ngeoffray): Type intercepted calls.
+    if (isInterceptorCall(node)) return defaultSelector;
     // If [JSInvocationMirror.invokeOn] has been called, we must not create a
     // typed selector based on the receiver type.
     if (node.element == null && // Invocation is not exact.
@@ -1603,6 +1624,9 @@
     push(jsPropertyCall(pop(), name, visitArguments(node.inputs)), node);
     world.registerDynamicGetter(
         getter.name, getOptimizedSelectorFor(node, getter));
+    if (isInterceptorCall(node)) {
+      backend.addInterceptedSelector(getter);
+    }
   }
 
   visitInvokeClosure(HInvokeClosure node) {
@@ -1755,6 +1779,7 @@
       }
       push(new js.LiteralExpression.withData(code, data), node);
     }
+    // TODO(sra): Tell world.nativeEnqueuer about the types created here.
   }
 
   visitForeignNew(HForeignNew node) {
@@ -2601,8 +2626,6 @@
 
     js.Expression bailoutTarget;
     if (element.isInstanceMember()) {
-      // TODO(ngeoffray): This does not work in case we come from a
-      // super call. We must make bailout names unique.
       String bailoutName = namer.getBailoutName(element);
       bailoutTarget = new js.PropertyAccess.field(new js.This(), bailoutName);
     } else {
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index ac51d42..346d80b 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -517,7 +517,6 @@
   }
 
   void addAtEntry(HInstruction instruction) {
-    assert(isClosed());
     assert(instruction is !HPhi);
     super.addBefore(first, instruction);
     instruction.notifyAddedToBlock(this);
@@ -2159,7 +2158,7 @@
 }
 
 class HThis extends HParameterValue {
-  HThis([HType type = HType.UNKNOWN]) : super(null) {
+  HThis(Element element, [HType type = HType.UNKNOWN]) : super(element) {
     guaranteedType = type;
   }
   toString() => 'this';
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 26f990d..6333b0e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -39,7 +39,7 @@
           new SsaConstantFolder(constantSystem, backend, work, types),
           new SsaTypeConversionInserter(compiler),
           new SsaTypePropagator(compiler, types),
-          new SsaCheckInserter(backend, types, context.boundsChecked),
+          new SsaCheckInserter(backend, work, types, context.boundsChecked),
           new SsaConstantFolder(constantSystem, backend, work, types),
           new SsaRedundantPhiEliminator(),
           new SsaDeadPhiEliminator(),
@@ -81,7 +81,7 @@
           // Then run the [SsaCheckInserter] because the type propagator also
           // propagated types non-speculatively. For example, it might have
           // propagated the type array for a call to the List constructor.
-          new SsaCheckInserter(backend, types, context.boundsChecked)];
+          new SsaCheckInserter(backend, work, types, context.boundsChecked)];
       runPhases(graph, phases);
       return !work.guards.isEmpty;
     });
@@ -102,7 +102,7 @@
       // Also run the type propagator, to please the codegen in case
       // no other optimization is run.
       runPhases(graph, <OptimizationPhase>[
-          new SsaCheckInserter(backend, types, context.boundsChecked),
+          new SsaCheckInserter(backend, work, types, context.boundsChecked),
           new SsaTypePropagator(compiler, types)]);
     });
   }
@@ -459,7 +459,7 @@
     HType leftType = types[left];
     if (leftType.isExact()) {
       HBoundedType type = leftType;
-      Element element = type.lookupMember(Elements.OPERATOR_EQUALS);
+      Element element = type.lookupMember(const SourceString('=='));
       if (element != null) {
         // If the left-hand side is guaranteed to be a non-primitive
         // type and and it defines operator==, we emit a call to that
@@ -651,15 +651,22 @@
   final HTypeMap types;
   final ConstantSystem constantSystem;
   final Set<HInstruction> boundsChecked;
+  final WorkItem work;
   final String name = "SsaCheckInserter";
   HGraph graph;
   Element lengthInterceptor;
+  Selector lengthSelector;
 
-  SsaCheckInserter(JavaScriptBackend backend, this.types, this.boundsChecked)
+  SsaCheckInserter(JavaScriptBackend backend,
+                   this.work,
+                   this.types,
+                   this.boundsChecked)
       : constantSystem = backend.constantSystem {
     SourceString lengthString = const SourceString('length');
+    lengthSelector =
+        new Selector.getter(lengthString, work.element.getLibrary());
     lengthInterceptor =
-        backend.builder.interceptors.getStaticGetInterceptor(lengthString);
+        backend.builder.interceptors.getStaticInterceptor(lengthSelector);
   }
 
   void visitGraph(HGraph graph) {
@@ -681,11 +688,8 @@
                                  HInstruction index) {
     HStatic interceptor = new HStatic(lengthInterceptor);
     node.block.addBefore(node, interceptor);
-    Selector selector = new Selector.getter(
-        const SourceString('length'),
-        lengthInterceptor.getLibrary());  // TODO(kasperl): Wrong.
     HInvokeInterceptor length = new HInvokeInterceptor(
-        selector, <HInstruction>[interceptor, receiver], true);
+        lengthSelector, <HInstruction>[interceptor, receiver], true);
     types[length] = HType.INTEGER;
     node.block.addBefore(node, length);
 
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
index 29051a2..5e9598e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart
@@ -80,7 +80,7 @@
         markInvalid("dominated block not pointing back");
       }
       if (dominated.id == null || dominated.id <= lastId) {
-        markInvalid("dominated.id === null or dominated has <= id");
+        markInvalid("dominated.id == null or dominated has <= id");
       }
       lastId = dominated.id;
     }
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
index b416c3f..2aa36a9 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
@@ -441,12 +441,17 @@
  */
 class VariableNamer {
   final VariableNames names;
+  final Compiler compiler;
   final Set<String> usedNames;
   final Map<Element, String> parameterNames;
   final List<String> freeTemporaryNames;
   int temporaryIndex = 0;
+  static final RegExp regexp = new RegExp('t[0-9]+');
 
-  VariableNamer(LiveEnvironment environment, this.names, this.parameterNames)
+  VariableNamer(LiveEnvironment environment,
+                this.names,
+                this.parameterNames,
+                this.compiler)
     : usedNames = new Set<String>(),
       freeTemporaryNames = new List<String>() {
     // [VariableNames.swapTemp] is used when there is a cycle in a copy handler.
@@ -511,11 +516,11 @@
       if (name != null) return addAllocatedName(instruction, name);
     }
 
-    // The dom/html libraries have inline JS code that reference	
-    // parameter names directly. Long-term such code will be rejected.
-    // Now, just don't mangle the parameter name.
     if (instruction is HParameterValue
         && instruction.sourceElement.enclosingElement.isNative()) {
+      // The dom/html libraries have inline JS code that reference	
+      // parameter names directly. Long-term such code will be rejected.
+      // Now, just don't mangle the parameter name.
       name = instruction.sourceElement.name.slowToString();
     } else if (instruction.sourceElement != null) {
       name = allocateWithHint(instruction.sourceElement.name.slowToString());
@@ -530,7 +535,6 @@
         name = allocateTemporary();
       }
     }
-
     return addAllocatedName(instruction, name);
   }
 
@@ -550,7 +554,6 @@
   void freeName(HInstruction instruction) {
     String ownName = names.ownName[instruction];
     if (ownName != null) {
-      RegExp regexp = const RegExp('t[0-9]+');
       // We check if we have already looked for temporary names
       // because if we haven't, chances are the temporary we allocate
       // in this block can match a phi with the same name in the
@@ -599,7 +602,7 @@
 
   void visitBasicBlock(HBasicBlock block) {
     VariableNamer namer = new VariableNamer(
-        liveInstructions[block], names, parameterNames);
+        liveInstructions[block], names, parameterNames, compiler);
 
     block.forEachPhi((HPhi phi) {
       handlePhi(phi, namer);
@@ -618,7 +621,8 @@
     // TODO(ngeoffray): locals/parameters are being generated at use site,
     // but we need a name for them. We should probably not make
     // them generate at use site to make things simpler.
-    if (instruction is HLocalValue && instruction is !HThis) return true;
+    if (instruction is HThis) return false;
+    if (instruction is HLocalValue) return true;
     if (instruction.usedBy.isEmpty) return false;
     if (generateAtUseSite.contains(instruction)) return false;
     // A [HCheck] instruction that has control flow needs a name only if its
diff --git a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
index 99d3a88..d8e5473 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
@@ -400,7 +400,10 @@
     if (send != null) send.accept(visitor);
   }
 
-  bool isConst() => identical(newToken.stringValue, 'const');
+  bool isConst() {
+    return identical(newToken.stringValue, 'const')
+        || identical(newToken.stringValue, '@');
+  }
 
   Token getBeginToken() => newToken;
 
diff --git a/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
index ec025ea..1d8731d 100644
--- a/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
@@ -459,9 +459,7 @@
     final ClassBaseType int = baseTypes.intBaseType;
     final ClassBaseType double = baseTypes.doubleBaseType;
     final ClassBaseType num = baseTypes.numBaseType;
-    for (String operator in ['add', 'mul', 'sub']) {
-      final String method = r"operator$".concat(operator);
-
+    for (String method in ['+', '*', '-']) {
       rule(int, method, int, int);
       rule(int, method, double, num);
       rule(int, method, num, num);
@@ -484,7 +482,7 @@
   List<FunctionElement> getMembersByName(SourceString methodName) {
     // TODO(polux): make this faster!
     var result = new List<FunctionElement>();
-    for (final cls in compiler.enqueuer.resolution.seenClasses) {
+    for (ClassElement cls in compiler.enqueuer.resolution.seenClasses) {
       Element elem = cls.lookupLocalMember(methodName);
       if (elem != null) {
         result.add(elem);
@@ -992,55 +990,99 @@
     inferrer.fail(node, 'not yet implemented');
   }
 
+  ConcreteType analyzeSetElement(Element receiver, ConcreteType argumentType) {
+    environment = environment.put(receiver, argumentType);
+    if (receiver.isField()) {
+      inferrer.augmentFieldType(receiver, argumentType);
+    } else if (receiver.isSetter()){
+      FunctionElement setter = receiver;
+      // TODO(polux): A setter always returns void so there's no need to
+      // invalidate its callers even if it is called with new arguments.
+      // However, if we start to record more than returned types, like
+      // exceptions for instance, we need to do it by uncommenting the following
+      // line.
+      // inferrer.addCaller(setter, currentMethod);
+      BaseType baseReceiverType = new ClassBaseType(receiver.enclosingElement);
+      inferrer.getSendReturnType(setter, baseReceiverType,
+          new ArgumentsTypes([argumentType], new Map()));
+    }
+    return argumentType;
+  }
+
+  ConcreteType analyzeSetNode(Node receiver, ConcreteType argumentType,
+                              SourceString source) {
+    ConcreteType receiverType = analyze(receiver);
+
+    void augmentField(BaseType baseReceiverType, Element fieldOrSetter) {
+      if (fieldOrSetter.isField()) {
+        inferrer.augmentFieldType(fieldOrSetter, argumentType);
+      } else {
+        AbstractFieldElement abstractField = fieldOrSetter;
+        FunctionElement setter = abstractField.setter;
+        // TODO(polux): A setter always returns void so there's no need to
+        // invalidate its callers even if it is called with new arguments.
+        // However, if we start to record more than returned types, like
+        // exceptions for instance, we need to do it by uncommenting the
+        // following line.
+        // inferrer.addCaller(setter, currentMethod);
+        inferrer.getSendReturnType(setter, baseReceiverType,
+            new ArgumentsTypes([argumentType], new Map()));
+      }
+    }
+
+    if (receiverType.isUnkown()) {
+      for (FunctionElement member in inferrer.getMembersByName(source)) {
+        Element classElem = member.getEnclosingClass();
+        BaseType baseReceiverType = new ClassBaseType(classElem);
+        augmentField(baseReceiverType, member);
+      }
+    } else {
+      for (ClassBaseType baseReceiverType in receiverType.baseTypes) {
+        Element member = baseReceiverType.element.lookupMember(source);
+        if (member != null) {
+          augmentField(baseReceiverType, member);
+        }
+      }
+    }
+    return argumentType;
+  }
+
+  SourceString canonicalizeCompoundOperator(String op) {
+    // TODO(ahe): This class should work on elements or selectors, not
+    // names.  Otherwise, it is repeating work the resolver has
+    // already done (or should have done).  In this case, the problem
+    // is that the resolver is not recording the selectors it is
+    // registering in registerBinaryOperator in
+    // ResolverVisitor.visitSendSet.
+    if (op == '++') return const SourceString(r'+');
+    else return const SourceString(r'-');
+  }
+
   // TODO(polux): handle sendset as expression
   ConcreteType visitSendSet(SendSet node) {
     Identifier selector = node.selector;
     final name = node.assignmentOperator.source.stringValue;
-    if (identical(name, '++') || identical(name, '--')) {
-      inferrer.fail(node, 'not yet implemented');
+    ConcreteType argumentType;
+    if (name == '++' || name == '--') {
+      ConcreteType receiverType = visitGetterSend(node);
+      SourceString canonicalizedMethodName = canonicalizeCompoundOperator(name);
+      List<ConcreteType> positionalArguments = <ConcreteType>[
+          new ConcreteType.singleton(inferrer.baseTypes.intBaseType)];
+      ArgumentsTypes argumentsTypes =
+          new ArgumentsTypes(positionalArguments, new Map());
+      argumentType = analyzeDynamicSend(receiverType, canonicalizedMethodName,
+                                        argumentsTypes);
     } else {
-      Element element = elements[node];
-      if (element != null) {
-        ConcreteType type = analyze(node.argumentsNode);
-        environment = environment.put(elements[node], type);
-        if (element.isField()) {
-          inferrer.augmentFieldType(element, type);
-        }
-      } else {
-        ConcreteType receiverType = analyze(node.receiver);
-        ConcreteType type = analyze(node.argumentsNode);
-        SourceString source = node.selector.asIdentifier().source;
-
-        void augmentField(BaseType baseReceiverType, Element fieldOrSetter) {
-          if (fieldOrSetter.isField()) {
-            inferrer.augmentFieldType(fieldOrSetter, type);
-          } else {
-            FunctionElement setter =
-                (fieldOrSetter as AbstractFieldElement).setter;
-            // TODO: uncomment if we add an effect system
-            //inferrer.addCaller(setter, currentMethod);
-            inferrer.getSendReturnType(setter, baseReceiverType,
-                new ArgumentsTypes([type], new Map()));
-          }
-        }
-
-        if (receiverType.isUnkown()) {
-          for (final member in inferrer.getMembersByName(source)) {
-              Element classElem = member.enclosingElement;
-              BaseType baseReceiverType = new ClassBaseType(classElem);
-              augmentField(baseReceiverType, member);
-            }
-        } else {
-          for (ClassBaseType baseReceiverType in receiverType.baseTypes) {
-            Element member = baseReceiverType.element.lookupMember(source);
-            if (member != null) {
-              augmentField(baseReceiverType, member);
-            }
-          }
-        }
-      }
+      argumentType = analyze(node.argumentsNode);
     }
-    return new ConcreteType.empty();
+
+    Element element = elements[node];
+    if (element != null) {
+      return analyzeSetElement(element, argumentType);
+    } else {
+      return analyzeSetNode(node.receiver, argumentType,
+                            node.selector.asIdentifier().source);
+    }
   }
 
   ConcreteType visitLiteralInt(LiteralInt node) {
@@ -1098,7 +1140,7 @@
 
   ConcreteType visitReturn(Return node) {
     final expression = node.expression;
-    return (expression === null)
+    return (expression == null)
         ? new ConcreteType.singleton(const NullBaseType())
         : analyze(expression);
   }
@@ -1237,6 +1279,19 @@
     return visitDynamicSend(node);
   }
 
+  ConcreteType analyzeFieldRead(Element field) {
+    inferrer.addReader(field, currentMethod);
+    return inferrer.getFieldType(field);
+  }
+
+  ConcreteType analyzeGetterSend(BaseType baseReceiverType,
+                                 FunctionElement getter) {
+      inferrer.addCaller(getter, currentMethod);
+      return inferrer.getSendReturnType(getter,
+                                        baseReceiverType,
+                                        new ArgumentsTypes([], new Map()));
+  }
+
   ConcreteType visitGetterSend(Send node) {
     Element element = elements[node];
     if (element != null) {
@@ -1246,9 +1301,15 @@
         // node is a local variable
         return result;
       } else {
-        // node is a field of this
-        inferrer.addReader(element, currentMethod);
-        return inferrer.getFieldType(element);
+        // node is a field or a getter of this
+        if (element.isField()) {
+          return analyzeFieldRead(element);
+        } else {
+          assert(element.isGetter());
+          ClassBaseType baseReceiverType =
+              new ClassBaseType(element.enclosingElement);
+          return analyzeGetterSend(baseReceiverType, element);
+        }
       }
     } else {
       // node is a field of not(this)
@@ -1257,18 +1318,12 @@
       ConcreteType result = new ConcreteType.empty();
       void augmentResult(BaseType baseReceiverType, Element getterOrField) {
         if (getterOrField.isField()) {
-          inferrer.addReader(getterOrField, currentMethod);
-          result = result.union(inferrer.getFieldType(getterOrField));
+          result = result.union(analyzeFieldRead(getterOrField));
         } else {
           // call to a getter
-          FunctionElement getter =
-              (getterOrField as AbstractFieldElement).getter;
-          inferrer.addCaller(getter, currentMethod);
-          ConcreteType returnType =
-              inferrer.getSendReturnType(getter,
-                                         baseReceiverType,
-                                         new ArgumentsTypes([], new Map()));
-          result = result.union(returnType);
+          AbstractFieldElement abstractField = getterOrField;
+          result = result.union(analyzeGetterSend(baseReceiverType,
+                                                  abstractField.getter));
         }
       }
 
@@ -1277,7 +1332,7 @@
         List<Element> members =
             inferrer.getMembersByName(node.selector.asIdentifier().source);
         for (final member in members) {
-          Element classElement = member.enclosingElement;
+          Element classElement = member.getEnclosingClass();
           ClassBaseType baseReceiverType = new ClassBaseType(classElement);
           augmentResult(baseReceiverType, member);
         }
@@ -1342,18 +1397,15 @@
         : s;
   }
 
-  ConcreteType visitDynamicSend(Send node) {
-    ConcreteType receiverType = (node.receiver != null)
-        ? analyze(node.receiver)
-        : new ConcreteType.singleton(
-            new ClassBaseType(currentMethod.getEnclosingClass()));
+  ConcreteType analyzeDynamicSend(ConcreteType receiverType,
+                                  SourceString canonicalizedMethodName,
+                                  ArgumentsTypes argumentsTypes) {
     ConcreteType result = new ConcreteType.empty();
-    final argumentsTypes = analyzeArguments(node.arguments);
 
     if (receiverType.isUnkown()) {
-      List<FunctionElement> methods = inferrer.getMembersByName(
-          canonicalizeMethodName(node.selector.asIdentifier().source));
-      for (final method in methods) {
+      List<FunctionElement> methods =
+          inferrer.getMembersByName(canonicalizedMethodName);
+      for (FunctionElement method in methods) {
         inferrer.addCaller(method, currentMethod);
         Element classElem = method.enclosingElement;
         ClassBaseType baseReceiverType = new ClassBaseType(classElem);
@@ -1365,8 +1417,8 @@
       for (BaseType baseReceiverType in receiverType.baseTypes) {
         if (!baseReceiverType.isNull()) {
           ClassBaseType classBaseReceiverType = baseReceiverType;
-          FunctionElement method = classBaseReceiverType.element
-              .lookupMember(canonicalizeMethodName(node.selector.asIdentifier().source));
+          FunctionElement method = classBaseReceiverType.element.lookupMember(
+              canonicalizedMethodName);
           if (method != null) {
             inferrer.addCaller(method, currentMethod);
             result = result.union(inferrer.getSendReturnType(method,
@@ -1378,6 +1430,17 @@
     return result;
   }
 
+  ConcreteType visitDynamicSend(Send node) {
+    ConcreteType receiverType = (node.receiver != null)
+        ? analyze(node.receiver)
+        : new ConcreteType.singleton(
+            new ClassBaseType(currentMethod.getEnclosingClass()));
+    SourceString name =
+        canonicalizeMethodName(node.selector.asIdentifier().source);
+    ArgumentsTypes argumentsTypes = analyzeArguments(node.arguments);
+    return analyzeDynamicSend(receiverType, name, argumentsTypes);
+  }
+
   ConcreteType visitForeignSend(Send node) {
     inferrer.fail(node, 'not implemented');
   }
diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
index 596a85a..ced6600 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
@@ -231,6 +231,7 @@
     if (element.isGetter()) return isGetter() || isCall();
     if (element.isField()) return isGetter() || isSetter() || isCall();
     if (isGetter()) return true;
+    if (isSetter()) return false;
 
     FunctionElement function = element;
     FunctionSignature parameters = function.computeSignature(compiler);
diff --git a/sdk/lib/_internal/compiler/implementation/util/link.dart b/sdk/lib/_internal/compiler/implementation/util/link.dart
index b50b86a..b4ad7da 100644
--- a/sdk/lib/_internal/compiler/implementation/util/link.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/link.dart
@@ -30,7 +30,6 @@
   const Link();
 
   Link<T> prepend(T element) {
-    // TODO(ahe): Use new Link<T>, but this cost 8% performance on VM.
     return new LinkEntry<T>(element, this);
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/util/util.dart b/sdk/lib/_internal/compiler/implementation/util/util.dart
index b39bd46..64194ea 100644
--- a/sdk/lib/_internal/compiler/implementation/util/util.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/util.dart
@@ -5,6 +5,7 @@
 library org_dartlang_compiler_util;
 
 import 'util_implementation.dart';
+import 'characters.dart';
 
 part 'link.dart';
 
@@ -20,5 +21,55 @@
   final String message;
   SpannableAssertionFailure(this.node, this.message);
 
-  String toString() => 'compiler crashed.';
+  String toString() => 'Compiler crashed: $message.';
+}
+
+/// Writes the characters of [iterator] on [buffer].  The characters
+/// are escaped as suitable for JavaScript and JSON.  [buffer] is
+/// anything which supports [:add:] and [:addCharCode:], for example,
+/// [StringBuffer].
+void writeJsonEscapedCharsOn(Iterator<int> iterator, buffer, onError(code)) {
+  while (iterator.hasNext) {
+    int code = iterator.next();
+    if (identical(code, $SQ)) {
+      buffer.add(r"\'");
+    } else if (identical(code, $LF)) {
+      buffer.add(r'\n');
+    } else if (identical(code, $CR)) {
+      buffer.add(r'\r');
+    } else if (identical(code, $LS)) {
+      // This Unicode line terminator and $PS are invalid in JS string
+      // literals.
+      buffer.add(r'\u2028');
+    } else if (identical(code, $PS)) {
+      buffer.add(r'\u2029');
+    } else if (identical(code, $BACKSLASH)) {
+      buffer.add(r'\\');
+    } else {
+      if (code > 0xffff) {
+        if (onError != null) onError(code);
+        throw 'Unhandled non-BMP character: ${code.toRadixString(16)}';
+      }
+      // TODO(lrn): Consider whether all codes above 0x7f really need to
+      // be escaped. We build a Dart string here, so it should be a literal
+      // stage that converts it to, e.g., UTF-8 for a JS interpreter.
+      if (code < 0x20) {
+        buffer.add(r'\x');
+        if (code < 0x10) buffer.add('0');
+        buffer.add(code.toRadixString(16));
+      } else if (code >= 0x80) {
+        if (code < 0x100) {
+          buffer.add(r'\x');
+        } else {
+          buffer.add(r'\u');
+          if (code < 0x1000) {
+            buffer.add('0');
+          }
+        }
+        buffer.add(code.toRadixString(16));
+      } else {
+        buffer.addCharCode(code);
+      }
+    }
+  }
 }
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 97df27f..536f5fc 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -243,9 +243,20 @@
   static const MISSING_FORMALS = const MessageKind(
       "Error: Formal parameters are missing.");
 
-  // TODO(ahe): Change the message below when it becomes an error.
   static const EXTRA_FORMALS = const MessageKind(
-      "Warning: Formal parameters will not be allowed here in M1.");
+      "Error: Formal parameters are not allowed here.");
+
+  // TODO(ahe): This message is hard to localize.  This is acceptable,
+  // as it will be removed when we ship Dart version 1.0.
+  static const DEPRECATED_FEATURE_WARNING = const MessageKind(
+      "Warning: deprecated language feature, #{1}, "
+      "will be removed in a future Dart milestone.");
+
+  // TODO(ahe): This message is hard to localize.  This is acceptable,
+  // as it will be removed when we ship Dart version 1.0.
+  static const DEPRECATED_FEATURE_ERROR = const MessageKind(
+      "Error: #{1} are not legal "
+      "due to option --reject-deprecated-language-features.");
 
   static const CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind(
       "Error: cannot have return type for constructor.");
diff --git a/sdk/lib/_internal/compiler/samples/leap/leap_server.dart b/sdk/lib/_internal/compiler/samples/leap/leap_server.dart
index 95fad72..adf8cbc 100644
--- a/sdk/lib/_internal/compiler/samples/leap/leap_server.dart
+++ b/sdk/lib/_internal/compiler/samples/leap/leap_server.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('dart:io');
+import 'dart:io';
 
 class Conversation {
   HttpRequest request;
diff --git a/sdk/lib/_internal/compiler/samples/leap/request_cache.dart b/sdk/lib/_internal/compiler/samples/leap/request_cache.dart
index 185a8d7..637fa7a 100644
--- a/sdk/lib/_internal/compiler/samples/leap/request_cache.dart
+++ b/sdk/lib/_internal/compiler/samples/leap/request_cache.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('request_cache');
+library request_cache;
 
-#import('dart:html');
+import 'dart:html';
 
 /** File system implementation using HTML5's Web Storage. */
 class HttpRequestCache {
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index fb116a1..a4714bb 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -1527,7 +1527,7 @@
     // TODO(rnystrom): Why don't we have a nice type in the platform for this?
     // TODO(rnystrom): This is a bit hackish. We consider any URL that lacks
     // a scheme to be relative.
-    return const RegExp(r'^\w+:').hasMatch(url);
+    return new RegExp(r'^\w+:').hasMatch(url);
   }
 
   /** Gets the URL to the documentation for [library]. */
diff --git a/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart b/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
index 3487900..f8c970a 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
@@ -5,39 +5,39 @@
 part of markdown;
 
 /// The line contains only whitespace or is empty.
-const _RE_EMPTY = const RegExp(r'^([ \t]*)$');
+final _RE_EMPTY = new RegExp(r'^([ \t]*)$');
 
 /// A series of `=` or `-` (on the next line) define setext-style headers.
-const _RE_SETEXT = const RegExp(r'^((=+)|(-+))$');
+final _RE_SETEXT = new RegExp(r'^((=+)|(-+))$');
 
 /// Leading (and trailing) `#` define atx-style headers.
-const _RE_HEADER = const RegExp(r'^(#{1,6})(.*?)#*$');
+final _RE_HEADER = new RegExp(r'^(#{1,6})(.*?)#*$');
 
 /// The line starts with `>` with one optional space after.
-const _RE_BLOCKQUOTE = const RegExp(r'^[ ]{0,3}>[ ]?(.*)$');
+final _RE_BLOCKQUOTE = new RegExp(r'^[ ]{0,3}>[ ]?(.*)$');
 
 /// A line indented four spaces. Used for code blocks and lists.
-const _RE_INDENT = const RegExp(r'^(?:    |\t)(.*)$');
+final _RE_INDENT = new RegExp(r'^(?:    |\t)(.*)$');
 
 /// Three or more hyphens, asterisks or underscores by themselves. Note that
 /// a line like `----` is valid as both HR and SETEXT. In case of a tie,
 /// SETEXT should win.
-const _RE_HR = const RegExp(r'^[ ]{0,3}((-+[ ]{0,2}){3,}|'
+final _RE_HR = new RegExp(r'^[ ]{0,3}((-+[ ]{0,2}){3,}|'
                                  r'(_+[ ]{0,2}){3,}|'
                                  r'(\*+[ ]{0,2}){3,})$');
 
 /// Really hacky way to detect block-level embedded HTML. Just looks for
 /// "<somename".
-const _RE_HTML = const RegExp(r'^<[ ]*\w+[ >]');
+final _RE_HTML = new RegExp(r'^<[ ]*\w+[ >]');
 
 /// A line starting with one of these markers: `-`, `*`, `+`. May have up to
 /// three leading spaces before the marker and any number of spaces or tabs
 /// after.
-const _RE_UL = const RegExp(r'^[ ]{0,3}[*+-][ \t]+(.*)$');
+final _RE_UL = new RegExp(r'^[ ]{0,3}[*+-][ \t]+(.*)$');
 
 /// A line starting with a number like `123.`. May have up to three leading
 /// spaces before the marker and any number of spaces or tabs after.
-const _RE_OL = const RegExp(r'^[ ]{0,3}\d+\.[ \t]+(.*)$');
+final _RE_OL = new RegExp(r'^[ ]{0,3}\d+\.[ \t]+(.*)$');
 
 /// Maintains the internal state needed to parse a series of lines into blocks
 /// of markdown suitable for further inline parsing.
@@ -370,7 +370,7 @@
       bool blockItem = item.forceBlock || (item.lines.length > 1);
 
       // See if it matches some block parser.
-      final blocksInList = const [
+      final blocksInList = [
         _RE_BLOCKQUOTE,
         _RE_HEADER,
         _RE_HR,
diff --git a/sdk/lib/_internal/dartdoc/lib/src/markdown/html_renderer.dart b/sdk/lib/_internal/dartdoc/lib/src/markdown/html_renderer.dart
index c25db6f..d44c5f5 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/markdown/html_renderer.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/markdown/html_renderer.dart
@@ -8,7 +8,7 @@
 
 /// Translates a parsed AST to HTML.
 class HtmlRenderer implements NodeVisitor {
-  static const _BLOCK_TAGS = const RegExp(
+  static final _BLOCK_TAGS = new RegExp(
       'blockquote|h1|h2|h3|h4|h5|h6|hr|p|pre');
 
   StringBuffer buffer;
diff --git a/sdk/lib/_internal/dartdoc/test/dartdoc_search_test.dart b/sdk/lib/_internal/dartdoc/test/dartdoc_search_test.dart
index fff9349..afab003 100644
--- a/sdk/lib/_internal/dartdoc/test/dartdoc_search_test.dart
+++ b/sdk/lib/_internal/dartdoc/test/dartdoc_search_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a

 // BSD-style license that can be found in the LICENSE file.

 

-#library('dartdoc_search_test');

+library dartdoc_search_test;

 

 // TODO(rnystrom): Use "package:" URL (#4968).

-#source('../lib/src/dartdoc/nav.dart');

-#source('../lib/src/client/search.dart');

+part '../lib/src/dartdoc/nav.dart';

+part '../lib/src/client/search.dart';

 

 const String URL = 'dummy-url';

 

diff --git a/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart b/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
index 27fc89a..143332b 100644
--- a/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
+++ b/sdk/lib/_internal/dartdoc/test/dartdoc_test.dart
@@ -10,7 +10,7 @@
 import '../lib/markdown.dart' as md;
 
 // TODO(rnystrom): Better path to unittest.
-import '../../../pkg/unittest/lib/unittest.dart';
+import '../../../../../pkg/unittest/lib/unittest.dart';
 
 main() {
   group('countOccurrences', () {
diff --git a/sdk/lib/_internal/dartdoc/test/markdown_test.dart b/sdk/lib/_internal/dartdoc/test/markdown_test.dart
index ceb6813..e55eb95 100644
--- a/sdk/lib/_internal/dartdoc/test/markdown_test.dart
+++ b/sdk/lib/_internal/dartdoc/test/markdown_test.dart
@@ -9,7 +9,7 @@
 import '../lib/markdown.dart';
 
 // TODO(rnystrom): Better path to unittest.
-import '../../../pkg/unittest/lib/unittest.dart';
+import '../../../../../pkg/unittest/lib/unittest.dart';
 
 /// Most of these tests are based on observing how showdown behaves:
 /// http://softwaremaniacs.org/playground/showdown-highlight/
diff --git a/sdk/lib/_internal/libraries.dart b/sdk/lib/_internal/libraries.dart
index 6669eaa4..50bb70a 100644
--- a/sdk/lib/_internal/libraries.dart
+++ b/sdk/lib/_internal/libraries.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('libraries');
+library libraries;
 
 /**
  * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js
@@ -30,11 +30,6 @@
       "core/core.dart",
       dart2jsPatchPath: "_internal/compiler/implementation/lib/core_patch.dart"),
 
-  "coreimpl": const LibraryInfo(
-      "coreimpl/coreimpl.dart",
-      implementation: true,
-      dart2jsPatchPath: "_internal/compiler/implementation/lib/coreimpl_patch.dart"),
-
   "crypto": const LibraryInfo(
       "crypto/crypto.dart"),
 
@@ -75,6 +70,11 @@
       category: "Server",
       dart2jsPatchPath: "_internal/compiler/implementation/lib/scalarlist_patch.dart"),
 
+  "svg": const LibraryInfo(
+        "svg/dartium/svg_dartium.dart",
+        category: "Client",
+        dart2jsPath: "svg/dart2js/svg_dart2js.dart"),
+
   "uri": const LibraryInfo(
       "uri/uri.dart"),
 
@@ -140,7 +140,7 @@
    * The implication is that these libraries are less commonly used
    * and that tools like Dart Editor should not show these libraries
    * in a list of all libraries unless the user specifically asks the tool to
-   * do so. (E.g. "coreimpl" contains implementation for the "core" library).
+   * do so.
    */
   final bool implementation;
 
diff --git a/sdk/lib/collection/arrays.dart b/sdk/lib/collection/arrays.dart
index 7835182..ce8f8b4 100644
--- a/sdk/lib/collection/arrays.dart
+++ b/sdk/lib/collection/arrays.dart
@@ -6,8 +6,8 @@
 class Arrays {
   static void copy(List src, int srcStart,
                    List dst, int dstStart, int count) {
-    if (srcStart === null) srcStart = 0;
-    if (dstStart === null) dstStart = 0;
+    if (srcStart == null) srcStart = 0;
+    if (dstStart == null) dstStart = 0;
 
     if (srcStart < dstStart) {
       for (int i = srcStart + count - 1, j = dstStart + count - 1;
@@ -22,13 +22,13 @@
   }
 
   static bool areEqual(List a, Object b) {
-    if (a === b) return true;
+    if (identical(a, b)) return true;
     if (!(b is List)) return false;
     int length = a.length;
     if (length != b.length) return false;
 
     for (int i = 0; i < length; i++) {
-      if (a[i] !== b[i]) return false;
+      if (!identical(a[i], b[i])) return false;
     }
     return true;
   }
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index 2bee21c..f0f0546 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -42,9 +42,9 @@
     return destination;
   }
 
-  static Dynamic reduce(Iterable iterable,
-                        Dynamic initialValue,
-                        Dynamic combine(Dynamic previousValue, element)) {
+  static dynamic reduce(Iterable iterable,
+                        dynamic initialValue,
+                        dynamic combine(dynamic previousValue, element)) {
     for (final element in iterable) {
       initialValue = combine(initialValue, element);
     }
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 974c2bc..cf2b2cf 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -63,28 +63,28 @@
     while (true) {
       int comp = key.compareTo(current.key);
       if (comp < 0) {
-        if (current.left === null) break;
+        if (current.left == null) break;
         if (key.compareTo(current.left.key) < 0) {
           // Rotate right.
           SplayTreeNode<K, V> tmp = current.left;
           current.left = tmp.right;
           tmp.right = current;
           current = tmp;
-          if (current.left === null) break;
+          if (current.left == null) break;
         }
         // Link right.
         right.left = current;
         right = current;
         current = current.left;
       } else if (comp > 0) {
-        if (current.right === null) break;
+        if (current.right == null) break;
         if (key.compareTo(current.right.key) > 0) {
           // Rotate left.
           SplayTreeNode<K, V> tmp = current.right;
           current.right = tmp.left;
           tmp.left = current;
           current = tmp;
-          if (current.right === null) break;
+          if (current.right == null) break;
         }
         // Link left.
         left.right = current;
@@ -121,7 +121,7 @@
 
     _count--;
     // assert(_count >= 0);
-    if (_root.left === null) {
+    if (_root.left == null) {
       _root = _root.right;
     } else {
       SplayTreeNode<K, V> right = _root.right;
@@ -171,21 +171,21 @@
   }
 
   bool get isEmpty {
-    // assert(!((_root === null) && (_count != 0)));
-    // assert(!((_count == 0) && (_root !== null)));
-    return (_root === null);
+    // assert(!((_root == null) && (_count != 0)));
+    // assert(!((_count == 0) && (_root != null)));
+    return (_root == null);
   }
 
   void forEach(void f(K key, V value)) {
     List<SplayTreeNode<K, V>> list = new List<SplayTreeNode<K, V>>();
     SplayTreeNode<K, V> current = _root;
-    while (current !== null) {
-      if (current.left !== null) {
+    while (current != null) {
+      if (current.left != null) {
         list.add(current);
         current = current.left;
       } else {
         f(current.key, current.value);
-        while (current.right === null) {
+        while (current.right == null) {
           if (list.isEmpty) return;
           current = list.removeLast();
           f(current.key, current.value);
@@ -215,7 +215,7 @@
   bool containsValue(V value) {
     bool found = false;
     bool visit(SplayTreeNode node) {
-      if (node === null) return false;
+      if (node == null) return false;
       if (node.value == value) return true;
       return visit(node.left) || visit(node.right);
     }
@@ -242,9 +242,9 @@
    * Get the first key in the map. Returns [null] if the map is empty.
    */
   K firstKey() {
-    if (_root === null) return null;
+    if (_root == null) return null;
     SplayTreeNode<K, V> node = _root;
-    while (node.left !== null) {
+    while (node.left != null) {
       node = node.left;
     }
     // Maybe implement a splay-method that can splay the minimum without
@@ -257,9 +257,9 @@
    * Get the last key in the map. Returns [null] if the map is empty.
    */
   K lastKey() {
-    if (_root === null) return null;
+    if (_root == null) return null;
     SplayTreeNode<K, V> node = _root;
-    while (node.right !== null) {
+    while (node.right != null) {
       node = node.right;
     }
     // Maybe implement a splay-method that can splay the maximum without
@@ -275,7 +275,7 @@
   K lastKeyBefore(K key) {
     splay_(key);
     K visit(SplayTreeNode node, K ifEmpty) {
-      if (node === null) return ifEmpty;
+      if (node == null) return ifEmpty;
       if (node.key.compareTo(key) >= 0) {
         return visit(node.left, ifEmpty);
       }
@@ -293,7 +293,7 @@
   K firstKeyAfter(K key) {
     splay_(key);
     K visit(SplayTreeNode node, K ifEmpty) {
-      if (node === null) return ifEmpty;
+      if (node == null) return ifEmpty;
       if (node.key.compareTo(key) > 0) {
         return visit(node.left, node.key);
       }
diff --git a/sdk/lib/core/collection.dart b/sdk/lib/core/collection.dart
index 51ffc39..2565c48 100644
--- a/sdk/lib/core/collection.dart
+++ b/sdk/lib/core/collection.dart
@@ -63,8 +63,8 @@
    *
    *   collection.reduce(0, (prev, element) => prev + element);
    */
-  Dynamic reduce(var initialValue,
-                 Dynamic combine(var previousValue, E element)) {
+  dynamic reduce(var initialValue,
+                 dynamic combine(var previousValue, E element)) {
     var value = initialValue;
     for (E element in this) value = combine(value, element);
     return value;
diff --git a/sdk/lib/core/core.dart b/sdk/lib/core/core.dart
index bf9af27..fb17dc3 100644
--- a/sdk/lib/core/core.dart
+++ b/sdk/lib/core/core.dart
@@ -4,7 +4,6 @@
 
 #library("dart:core");
 
-#import("dart:coreimpl");
 #import("dart:collection");
 
 #source("bool.dart");
diff --git a/sdk/lib/core/date.dart b/sdk/lib/core/date.dart
index 7ab46cf..3ce0b07 100644
--- a/sdk/lib/core/date.dart
+++ b/sdk/lib/core/date.dart
@@ -257,20 +257,20 @@
     //    - "20120227"
     //    - "2012-02-27T14Z"
     //    - "-123450101 00:00:00 Z"  // In the year -12345.
-    final RegExp re = const RegExp(
+    final RegExp re = new RegExp(
         r'^([+-]?\d?\d\d\d\d)-?(\d\d)-?(\d\d)'  // The day part.
         r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ])?)?$');
     Match match = re.firstMatch(formattedString);
-    if (match !== null) {
+    if (match != null) {
       int parseIntOrZero(String matched) {
         // TODO(floitsch): we should not need to test against the empty string.
-        if (matched === null || matched == "") return 0;
+        if (matched == null || matched == "") return 0;
         return int.parse(matched);
       }
 
       double parseDoubleOrZero(String matched) {
         // TODO(floitsch): we should not need to test against the empty string.
-        if (matched === null || matched == "") return 0.0;
+        if (matched == null || matched == "") return 0.0;
         return double.parse(matched);
       }
 
@@ -287,10 +287,10 @@
         millisecond = 999;
       }
       // TODO(floitsch): we should not need to test against the empty string.
-      bool isUtc = (match[8] !== null) && (match[8] != "");
+      bool isUtc = (match[8] != null) && (match[8] != "");
       int millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch(
           years, month, day, hour, minute, second, millisecond, isUtc);
-      if (millisecondsSinceEpoch === null) {
+      if (millisecondsSinceEpoch == null) {
         throw new ArgumentError(formattedString);
       }
       if (addOneMillisecond) millisecondsSinceEpoch++;
@@ -308,7 +308,7 @@
     if (millisecondsSinceEpoch.abs() > _MAX_MILLISECONDS_SINCE_EPOCH) {
       throw new ArgumentError(millisecondsSinceEpoch);
     }
-    if (isUtc === null) throw new ArgumentError(isUtc);
+    if (isUtc == null) throw new ArgumentError(isUtc);
   }
 
   bool operator ==(other) {
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index fec2de5..7ce8628 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -44,9 +44,8 @@
 /**
  * Exception thrown because of an index outside of the valid range.
  *
- * Temporarily implements [IndexOutOfRangeException] for backwards compatiblity.
  */
-class RangeError extends ArgumentError implements IndexOutOfRangeException {
+class RangeError extends ArgumentError {
   // TODO(lrn): This constructor should be called only with string values.
   // It currently isn't in all cases.
   /**
@@ -54,7 +53,7 @@
    *
    * Temporarily made const for backwards compatibilty.
    */
-  const RangeError(var message) : super(message);
+  RangeError(var message) : super(message);
 
   /** Create a new [RangeError] with a message for the given [value]. */
   RangeError.value(num value) : super("value $value");
@@ -62,26 +61,6 @@
   String toString() => "RangeError: $message";
 }
 
-/**
- * Temporary backwards compatibilty class.
- *
- * This class allows code throwing the old [IndexOutOfRangeException] to
- * work until they change to the new [RangeError] name.
- * Constructor of [RangeError] is const only to support this interface.
- */
-interface IndexOutOfRangeException extends Exception default RangeError {
-  const IndexOutOfRangeException(var message);
-}
-
-
-/**
- * Temporary backwards compatibility class.
- *
- * Removed when users have had time to change to using [ArgumentError].
- */
-class IllegalArgumentException extends ArgumentError {
-  const IllegalArgumentException([argument = ""]) : super(argument);
-}
 
 /**
  * Error thrown when control reaches the end of a switch case.
@@ -95,6 +74,7 @@
   const FallThroughError();
 }
 
+
 class AbstractClassInstantiationError implements Error {
   final String _className;
   const AbstractClassInstantiationError(String this._className);
@@ -108,7 +88,7 @@
   final Object _receiver;
   final String _memberName;
   final List _arguments;
-  final Map<String,Dynamic> _namedArguments;
+  final Map<String,dynamic> _namedArguments;
   final List _existingArgumentNames;
 
   /**
@@ -128,7 +108,7 @@
   const NoSuchMethodError(Object this._receiver,
                           String this._memberName,
                           List this._arguments,
-                          Map<String,Dynamic> this._namedArguments,
+                          Map<String,dynamic> this._namedArguments,
                           [List existingArgumentNames = null])
       : this._existingArgumentNames = existingArgumentNames;
 
@@ -154,7 +134,7 @@
         i++;
       });
     }
-    if (_existingArgumentNames === null) {
+    if (_existingArgumentNames == null) {
       return "NoSuchMethodError : method not found: '$_memberName'\n"
           "Receiver: ${safeToString(_receiver)}\n"
           "Arguments: [$sb]";
@@ -219,25 +199,16 @@
  * If a class is not intending to implement the feature, it should throw
  * an [UnsupportedError] instead. This error is only intended for
  * use during development.
- *
- * This class temporarily implements [Exception] for backwards compatibility.
- * The constructor is temporarily const to support [NotImplementedException].
  */
-class UnimplementedError implements UnsupportedError, NotImplementedException {
+class UnimplementedError implements UnsupportedError {
   final String message;
-  const UnimplementedError([String this.message]);
-  String toString() => (this.message !== null
+  UnimplementedError([String this.message]);
+  String toString() => (this.message != null
                         ? "UnimplementedError: $message"
                         : "UnimplementedError");
 }
 
 
-/** Temporary class added for backwards compatibility. Will be removed. */
-interface NotImplementedException extends Exception default UnimplementedError {
-  const NotImplementedException([String message]);
-}
-
-
 /**
  * The operation was not allowed by the current state of the object.
  *
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart
index 2d2bc43..61f3f89 100644
--- a/sdk/lib/core/exceptions.dart
+++ b/sdk/lib/core/exceptions.dart
@@ -8,10 +8,8 @@
  * Interface implemented by all core library exceptions.
  * Defaults to an implementation that only carries a simple message.
  */
-interface Exception default _ExceptionImplementation {
-  // TODO(lrn): This should be an abstract class, but we don't yet support
-  // redirecting factory constructors.
-  const Exception([var message]);
+abstract class Exception {
+  const factory Exception([var message]) = _ExceptionImplementation;
 }
 
 
diff --git a/sdk/lib/core/expect.dart b/sdk/lib/core/expect.dart
index b26ddc5..2049b92 100644
--- a/sdk/lib/core/expect.dart
+++ b/sdk/lib/core/expect.dart
@@ -23,7 +23,7 @@
    * Checks whether the actual value is a bool and its value is true.
    */
   static void isTrue(var actual, [String reason = null]) {
-    if (actual === true) return;
+    if (_identical(actual, true)) return;
     String msg = _getMessage(reason);
     _fail("Expect.isTrue($actual$msg) fails.");
   }
@@ -32,7 +32,7 @@
    * Checks whether the actual value is a bool and its value is false.
    */
   static void isFalse(var actual, [String reason = null]) {
-    if (actual === false) return;
+    if (_identical(actual, false)) return;
     String msg = _getMessage(reason);
     _fail("Expect.isFalse($actual$msg) fails.");
   }
@@ -41,7 +41,7 @@
    * Checks whether [actual] is null.
    */
   static void isNull(actual, [String reason = null]) {
-    if (null === actual) return;
+    if (null == actual) return;
     String msg = _getMessage(reason);
     _fail("Expect.isNull(actual: <$actual>$msg) fails.");
   }
@@ -50,7 +50,7 @@
    * Checks whether [actual] is not null.
    */
   static void isNotNull(actual, [String reason = null]) {
-    if (null !== actual) return;
+    if (null != actual) return;
     String msg = _getMessage(reason);
     _fail("Expect.isNotNull(actual: <$actual>$msg) fails.");
   }
@@ -60,7 +60,7 @@
    * (using `===`).
    */
   static void identical(var expected, var actual, [String reason = null]) {
-    if (expected === actual) return;
+    if (_identical(expected, actual)) return;
     String msg = _getMessage(reason);
     _fail("Expect.identical(expected: <$expected>, actual: <$actual>$msg) "
           "fails.");
@@ -80,7 +80,7 @@
                            num actual,
                            [num tolerance = null,
                             String reason = null]) {
-    if (tolerance === null) {
+    if (tolerance == null) {
       tolerance = (expected / 1e4).abs();
     }
     // Note: use !( <= ) rather than > so we fail on NaNs
@@ -159,7 +159,7 @@
         'Expect.stringEquals(expected: <$expected>", <$actual>$msg) fails';
 
     if (expected == actual) return;
-    if ((expected === null) || (actual === null)) {
+    if ((expected == null) || (actual == null)) {
       _fail('$defaultMessage');
     }
     // scan from the left until we find a mismatch
@@ -265,7 +265,7 @@
     try {
       f();
     } catch (e, s) {
-      if (check !== null) {
+      if (check != null) {
         if (!check(e)) {
           String msg = reason == null ? "" : reason;
           _fail("Expect.throws($msg): Unexpected '$e'\n$s");
@@ -278,13 +278,15 @@
   }
 
   static String _getMessage(String reason)
-      => (reason === null) ? "" : ", '$reason'";
+      => (reason == null) ? "" : ", '$reason'";
 
   static void _fail(String message) {
     throw new ExpectException(message);
   }
 }
 
+bool _identical(a, b) => identical(a, b);
+
 typedef bool _CheckExceptionFn(exception);
 
 class ExpectException implements Exception {
diff --git a/sdk/lib/core/function.dart b/sdk/lib/core/function.dart
index 747a6a3..2964876 100644
--- a/sdk/lib/core/function.dart
+++ b/sdk/lib/core/function.dart
@@ -29,5 +29,5 @@
    */
   external static apply(Function function,
                         List positionalArguments,
-                        [Map<String,Dynamic> namedArguments]);
+                        [Map<String,dynamic> namedArguments]);
 }
diff --git a/sdk/lib/core/invocation_mirror.dart b/sdk/lib/core/invocation_mirror.dart
index b83ced2..68769e3 100644
--- a/sdk/lib/core/invocation_mirror.dart
+++ b/sdk/lib/core/invocation_mirror.dart
@@ -17,7 +17,7 @@
   List get positionalArguments;
 
   /** An unmodifiable view of the named arguments of the call. */
-  Map<String, Dynamic> get namedArguments;
+  Map<String, dynamic> get namedArguments;
 
   /** Whether the invocation was a method call. */
   bool get isMethod;
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 60db6ce..58c9bf2 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -198,7 +198,7 @@
     while (true) {
       // [existingKey] can be either of type [K] or [_DeletedKeySentinel].
       Object existingKey = _keys[hash];
-      if (existingKey === null) {
+      if (existingKey == null) {
         // We are sure the key is not already in the set.
         // If the current slot is empty and we didn't find any
         // insertion slot before, return this slot.
@@ -208,7 +208,8 @@
       } else if (existingKey == key) {
         // The key is already in the map. Return its slot.
         return hash;
-      } else if ((insertionIndex < 0) && (_DELETED_KEY === existingKey)) {
+      } else if ((insertionIndex < 0) &&
+                 (identical(existingKey, _DELETED_KEY))) {
         // The slot contains a deleted element. Because previous calls to this
         // method may not have had this slot deleted, we must continue iterate
         // to find if there is a slot with the given key.
@@ -232,7 +233,7 @@
       Object existingKey = _keys[hash];
       // If the slot does not contain anything (in particular, it does not
       // contain a deleted key), we know the key is not in the map.
-      if (existingKey === null) return -1;
+      if (existingKey == null) return -1;
       // The key is in the map, return its index.
       if (existingKey == key) return hash;
       // Go to the next probe.
@@ -278,7 +279,7 @@
       // [key] can be either of type [K] or [_DeletedKeySentinel].
       Object key = oldKeys[i];
       // If there is no key, we don't need to deal with the current slot.
-      if (key === null || key === _DELETED_KEY) {
+      if (key == null || identical(key, _DELETED_KEY)) {
         continue;
       }
       V value = oldValues[i];
@@ -303,7 +304,7 @@
   void operator []=(K key, V value) {
     _ensureCapacity();
     int index = _probeForAdding(key);
-    if ((_keys[index] === null) || (_keys[index] === _DELETED_KEY)) {
+    if ((_keys[index] == null) || (identical(_keys[index], _DELETED_KEY))) {
       _numberOfEntries++;
     }
     _keys[index] = key;
@@ -351,7 +352,7 @@
     int length = _keys.length;
     for (int i = 0; i < length; i++) {
       var key = _keys[i];
-      if ((key !== null) && (key !== _DELETED_KEY)) {
+      if ((key != null) && (!identical(key, _DELETED_KEY))) {
         f(key, _values[i]);
       }
     }
@@ -361,7 +362,7 @@
   Collection<K> get keys {
     List<K> list = new List<K>(length);
     int i = 0;
-    forEach(void _(K key, V value) {
+    forEach((K key, V value) {
       list[i++] = key;
     });
     return list;
@@ -370,7 +371,7 @@
   Collection<V> get values {
     List<V> list = new List<V>(length);
     int i = 0;
-    forEach(void _(K key, V value) {
+    forEach((K key, V value) {
       list[i++] = value;
     });
     return list;
@@ -384,7 +385,7 @@
     int length = _values.length;
     for (int i = 0; i < length; i++) {
       var key = _keys[i];
-      if ((key !== null) && (key !== _DELETED_KEY)) {
+      if ((key != null) && (!identical(key, _DELETED_KEY))) {
         if (_values[i] == value) return true;
       }
     }
@@ -450,20 +451,20 @@
 
   V operator [](K key) {
     DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map[key];
-    if (entry === null) return null;
+    if (entry == null) return null;
     return entry.element.value;
   }
 
   V remove(K key) {
     DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map.remove(key);
-    if (entry === null) return null;
+    if (entry == null) return null;
     entry.remove();
     return entry.element.value;
   }
 
   V putIfAbsent(K key, V ifAbsent()) {
     V value = this[key];
-    if ((this[key] === null) && !(containsKey(key))) {
+    if ((this[key] == null) && !(containsKey(key))) {
       value = ifAbsent();
       this[key] = value;
     }
@@ -473,7 +474,7 @@
   Collection<K> get keys {
     List<K> list = new List<K>(length);
     int index = 0;
-    _list.forEach(void _(_KeyValuePair<K, V> entry) {
+    _list.forEach((_KeyValuePair<K, V> entry) {
       list[index++] = entry.key;
     });
     assert(index == length);
@@ -484,7 +485,7 @@
   Collection<V> get values {
     List<V> list = new List<V>(length);
     int index = 0;
-    _list.forEach(void _(_KeyValuePair<K, V> entry) {
+    _list.forEach((_KeyValuePair<K, V> entry) {
       list[index++] = entry.value;
     });
     assert(index == length);
@@ -492,7 +493,7 @@
   }
 
   void forEach(void f(K key, V value)) {
-    _list.forEach(void _(_KeyValuePair<K, V> entry) {
+    _list.forEach((_KeyValuePair<K, V> entry) {
       f(entry.key, entry.value);
     });
   }
@@ -502,7 +503,7 @@
   }
 
   bool containsValue(V value) {
-    return _list.some(bool _(_KeyValuePair<K, V> entry) {
+    return _list.some((_KeyValuePair<K, V> entry) {
       return (entry.value == value);
     });
   }
diff --git a/sdk/lib/core/options.dart b/sdk/lib/core/options.dart
index 3377c30..3a4d703 100644
--- a/sdk/lib/core/options.dart
+++ b/sdk/lib/core/options.dart
@@ -45,7 +45,7 @@
 
 class _OptionsImpl implements Options {
   List<String> get arguments {
-    if (_arguments === null) {
+    if (_arguments == null) {
       // On first access make a copy of the native arguments.
       _arguments = _nativeArguments.getRange(0, _nativeArguments.length);
     }
diff --git a/sdk/lib/core/queue.dart b/sdk/lib/core/queue.dart
index bf1e49c..20798a7 100644
--- a/sdk/lib/core/queue.dart
+++ b/sdk/lib/core/queue.dart
@@ -229,12 +229,12 @@
 
   int get length {
     int counter = 0;
-    forEach(void _(E element) { counter++; });
+    forEach((E element) { counter++; });
     return counter;
   }
 
   bool get isEmpty {
-    return (_sentinel._next === _sentinel);
+    return (identical(_sentinel._next, _sentinel));
   }
 
   void clear() {
@@ -244,7 +244,7 @@
 
   void forEach(void f(E element)) {
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       f(entry._element);
       entry = nextEntry;
@@ -253,7 +253,7 @@
 
   void forEachEntry(void f(DoubleLinkedQueueEntry<E> element)) {
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       f(entry);
       entry = nextEntry;
@@ -262,7 +262,7 @@
 
   bool every(bool f(E element)) {
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       if (!f(entry._element)) return false;
       entry = nextEntry;
@@ -272,7 +272,7 @@
 
   bool some(bool f(E element)) {
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       if (f(entry._element)) return true;
       entry = nextEntry;
@@ -283,7 +283,7 @@
   Queue map(f(E element)) {
     Queue other = new Queue();
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       other.addLast(f(entry._element));
       entry = nextEntry;
@@ -291,15 +291,15 @@
     return other;
   }
 
-  Dynamic reduce(Dynamic initialValue,
-                 Dynamic combine(Dynamic previousValue, E element)) {
+  dynamic reduce(dynamic initialValue,
+                 dynamic combine(dynamic previousValue, E element)) {
     return Collections.reduce(this, initialValue, combine);
   }
 
   Queue<E> filter(bool f(E element)) {
     Queue<E> other = new Queue<E>();
     DoubleLinkedQueueEntry<E> entry = _sentinel._next;
-    while (entry !== _sentinel) {
+    while (!identical(entry, _sentinel)) {
       DoubleLinkedQueueEntry<E> nextEntry = entry._next;
       if (f(entry._element)) other.addLast(entry._element);
       entry = nextEntry;
@@ -325,7 +325,7 @@
   }
 
   bool get hasNext {
-    return _currentEntry._next !== _sentinel;
+    return !identical(_currentEntry._next, _sentinel);
   }
 
   E next() {
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index 99f8bef..c652db8 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -10,7 +10,7 @@
  * The following example finds all matches of a [RegExp] in a [String]
  * and iterates through the returned iterable of [Match] objects.
  *
- *     RegExp exp = const RegExp(r"(\w+)");
+ *     RegExp exp = new RegExp(r"(\w+)");
  *     String str = "Parse my string";
  *     Iterable<Match> matches = exp.allMatches(str);
  *     for (Match m in matches) {
@@ -84,17 +84,17 @@
  * The following example finds all matches of a regular expression in
  * a string.
  *
- *     RegExp exp = const RegExp(r"(\w+)");
+ *     RegExp exp = new RegExp(r"(\w+)");
  *     String str = "Parse my string";
  *     Iterable<Match> matches = exp.allMatches(str);
  */
-interface RegExp extends Pattern default JSSyntaxRegExp {
+abstract class RegExp implements Pattern {
   /**
    * Constructs a regular expression. The default implementation of a
    * [RegExp] sets [multiLine] and [ignoreCase] to false.
    */
-  const RegExp(String pattern, {bool multiLine: false,
-                                bool ignoreCase: false});
+  external factory RegExp(String pattern, {bool multiLine: false,
+                                           bool ignoreCase: false});
 
   /**
    * Searches for the first match of the regular expression
diff --git a/sdk/lib/core/sequences.dart b/sdk/lib/core/sequences.dart
index 32a3b40..fcf8225a 100644
--- a/sdk/lib/core/sequences.dart
+++ b/sdk/lib/core/sequences.dart
@@ -10,7 +10,7 @@
  * It is intended for data structures where access by index is
  * the most efficient way to access the data.
  */
-abstract class Sequence<T> {
+abstract class Sequence<E> {
   /**
    * The limit of valid indices of the sequence.
    *
@@ -24,7 +24,7 @@
    * Valid indices must be in the range [:0..length - 1:].
    * The lookup operator should be efficient.
    */
-  T operator[](int index);
+  E operator[](int index);
 }
 
 /**
@@ -100,7 +100,7 @@
 
   int get length => sequence.length;
 
-  T operator[](int index) => sequence[index];
+  E operator[](int index) => sequence[index];
 
   int indexOf(E value, [int start = 0]) {
     for (int i = start; i < sequence.length; i++) {
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 7c1f2a7..47c706f 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -110,14 +110,14 @@
   }
 
   void addAll(Collection<E> collection) {
-    collection.forEach(void _(E value) {
+    collection.forEach((E value) {
       add(value);
     });
   }
 
   Set<E> intersection(Collection<E> collection) {
     Set<E> result = new Set<E>();
-    collection.forEach(void _(E value) {
+    collection.forEach((E value) {
       if (contains(value)) result.add(value);
     });
     return result;
@@ -128,39 +128,39 @@
   }
 
   void removeAll(Collection<E> collection) {
-    collection.forEach(void _(E value) {
+    collection.forEach((E value) {
       remove(value);
     });
   }
 
   bool containsAll(Collection<E> collection) {
-    return collection.every(bool _(E value) {
+    return collection.every((E value) {
       return contains(value);
     });
   }
 
   void forEach(void f(E element)) {
-    _backingMap.forEach(void _(E key, E value) {
+    _backingMap.forEach((E key, E value) {
       f(key);
     });
   }
 
   Set map(f(E element)) {
     Set result = new Set();
-    _backingMap.forEach(void _(E key, E value) {
+    _backingMap.forEach((E key, E value) {
       result.add(f(key));
     });
     return result;
   }
 
-  Dynamic reduce(Dynamic initialValue,
-                 Dynamic combine(Dynamic previousValue, E element)) {
+  dynamic reduce(dynamic initialValue,
+                 dynamic combine(dynamic previousValue, E element)) {
     return Collections.reduce(this, initialValue, combine);
   }
 
   Set<E> filter(bool f(E element)) {
     Set<E> result = new Set<E>();
-    _backingMap.forEach(void _(E key, E value) {
+    _backingMap.forEach((E key, E value) {
       if (f(key)) result.add(key);
     });
     return result;
@@ -234,7 +234,7 @@
     do {
       if (++_nextValidIndex >= length) break;
       entry = _entries[_nextValidIndex];
-    } while ((entry === null) || (entry === deletedKey));
+    } while ((entry == null) || identical(entry, deletedKey));
   }
 
   // The entries in the set. May contain null or the sentinel value.
diff --git a/sdk/lib/core/sort.dart b/sdk/lib/core/sort.dart
index 252a110..737d6da 100644
--- a/sdk/lib/core/sort.dart
+++ b/sdk/lib/core/sort.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.
 
-// TODO(ajohnsen): Remove once coreimpl is eliminated.
+// TODO(ajohnsen): Remove once dart2js intercepters can work without it.
 /**
  * WARNING: This method is temporary and will go away soon.
  */
diff --git a/sdk/lib/core/stopwatch.dart b/sdk/lib/core/stopwatch.dart
index 79e08c9..14aa551 100644
--- a/sdk/lib/core/stopwatch.dart
+++ b/sdk/lib/core/stopwatch.dart
@@ -75,11 +75,11 @@
   _StopwatchImpl() : _start = null, _stop = null {}
 
   void start() {
-    if (_start === null) {
+    if (_start == null) {
       // This stopwatch has never been started.
       _start = _now();
     } else {
-      if (_stop === null) {
+      if (_stop == null) {
         return;
       }
       // Restarting this stopwatch. Prepend the elapsed time to the current
@@ -90,18 +90,18 @@
   }
 
   void stop() {
-    if (_start === null || _stop !== null) {
+    if (_start == null || _stop != null) {
       return;
     }
     _stop = _now();
   }
 
   void reset() {
-    if (_start === null) return;
+    if (_start == null) return;
     // If [_start] is not null, then the stopwatch had already been started. It
     // may running right now.
     _start = _now();
-    if (_stop !== null) {
+    if (_stop != null) {
       // The watch is not running. So simply set the [_stop] to [_start] thus
       // having an elapsed time of 0.
       _stop = _start;
@@ -109,10 +109,10 @@
   }
 
   int get elapsedTicks {
-    if (_start === null) {
+    if (_start == null) {
       return 0;
     }
-    return (_stop === null) ? (_now() - _start) : (_stop - _start);
+    return (_stop == null) ? (_now() - _start) : (_stop - _start);
   }
 
   int get elapsedMicroseconds {
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index ad4aefe..f2d0e61 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -8,13 +8,11 @@
  * scalar character codes accessible through the [charCodeAt] or the
  * [charCodes] method.
  */
-interface String
-    extends Comparable, Pattern, Sequence<String>
-    default _StringImpl {
+abstract class String implements Comparable, Pattern, Sequence<String> {
   /**
    * Allocates a new String for the specified [charCodes].
    */
-  String.fromCharCodes(List<int> charCodes);
+  external factory String.fromCharCodes(List<int> charCodes);
 
   /**
    * Gets the character (as [String]) at the given [index].
@@ -131,22 +129,3 @@
    */
   String toUpperCase();
 }
-
-class _StringImpl {
-  /**
-   * Factory implementation of String.fromCharCodes:
-   * Allocates a new String for the specified [charCodes].
-   */
-  external factory String.fromCharCodes(List<int> charCodes);
-
-  /**
-   * Joins all the given strings to create a new string.
-   */
-  external static String join(List<String> strings, String separator);
-
-  /**
-   * Concatenates all the given strings to create a new string.
-   */
-  external static String concatAll(List<String> strings);
-
-}
diff --git a/sdk/lib/core/string_buffer.dart b/sdk/lib/core/string_buffer.dart
index 0561d83..78230a0 100644
--- a/sdk/lib/core/string_buffer.dart
+++ b/sdk/lib/core/string_buffer.dart
@@ -68,7 +68,7 @@
   }
 
   bool get isEmpty {
-    return _length === 0;
+    return _length == 0;
   }
 
   /**
@@ -76,7 +76,7 @@
    */
   StringBuffer add(Object obj) {
     String str = obj.toString();
-    if (str === null || str.isEmpty) {
+    if (str == null || str.isEmpty) {
       return this;
     }
     _buffer.add(str);
@@ -115,9 +115,9 @@
    * Returns the contents of buffer as a concatenated string.
    */
   String toString() {
-    if (_buffer.length === 0) return "";
-    if (_buffer.length === 1) return _buffer[0];
-    String result = _StringImpl.concatAll(_buffer);
+    if (_buffer.length == 0) return "";
+    if (_buffer.length == 1) return _buffer[0];
+    String result = Strings.concatAll(_buffer);
     _buffer.clear();
     _buffer.add(result);
     // Since we track the length at each add operation, there is no
diff --git a/sdk/lib/core/strings.dart b/sdk/lib/core/strings.dart
index 86655e9..5029b46 100644
--- a/sdk/lib/core/strings.dart
+++ b/sdk/lib/core/strings.dart
@@ -6,14 +6,10 @@
   /**
    * Joins all the given strings to create a new string.
    */
-  static String join(List<String> strings, String separator) {
-    return _StringImpl.join(strings, separator);
-  }
+  external static String join(List<String> strings, String separator);
 
   /**
    * Concatenates all the given strings to create a new string.
    */
-  static String concatAll(List<String> strings) {
-    return _StringImpl.concatAll(strings);
-  }
+  external static String concatAll(List<String> strings);
 }
diff --git a/sdk/lib/coreimpl/corelib_impl_sources.gypi b/sdk/lib/coreimpl/corelib_impl_sources.gypi
deleted file mode 100644
index 7f6bcbf..0000000
--- a/sdk/lib/coreimpl/corelib_impl_sources.gypi
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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.
-
-{
-  'sources': [
-    'regexp.dart',
-  ],
-}
diff --git a/sdk/lib/coreimpl/regexp.dart b/sdk/lib/coreimpl/regexp.dart
deleted file mode 100644
index b707631..0000000
--- a/sdk/lib/coreimpl/regexp.dart
+++ /dev/null
@@ -1,16 +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.
-
-class JSSyntaxRegExp implements RegExp {
-  external const JSSyntaxRegExp(String pattern,
-                                {bool multiLine: false,
-                                 bool ignoreCase: false});
-  external Match firstMatch(String str);
-  external Iterable<Match> allMatches(String str);
-  external bool hasMatch(String str);
-  external String stringMatch(String str);
-  external String get pattern;
-  external bool get multiLine;
-  external bool get ignoreCase;
-}
diff --git a/sdk/lib/crypto/crypto.dart b/sdk/lib/crypto/crypto.dart
index ff63492..1064ca0 100644
--- a/sdk/lib/crypto/crypto.dart
+++ b/sdk/lib/crypto/crypto.dart
@@ -52,15 +52,15 @@
 /**
  * SHA1 hash function implementation.
  */
-interface SHA1 extends Hash default _SHA1 {
-  SHA1();
+abstract class SHA1 implements Hash {
+  factory SHA1() => new _SHA1();
 }
 
 /**
  * SHA256 hash function implementation.
  */
-interface SHA256 extends Hash default _SHA256 {
-  SHA256();
+abstract class SHA256 implements Hash {
+  factory SHA256() => new _SHA256();
 }
 
 /**
@@ -69,8 +69,8 @@
  * WARNING: MD5 has known collisions and should only be used when
  * required for backwards compatibility.
  */
-interface MD5 extends Hash default _MD5 {
-  MD5();
+abstract class MD5 implements Hash {
+  factory MD5() => new _MD5();
 }
 
 /**
@@ -79,11 +79,11 @@
  * The [update] method is used to add data to the message. The [digest] method
  * is used to extract the message authentication code.
  */
-interface HMAC default _HMAC {
+abstract class HMAC {
   /**
    * Create an [HMAC] object from a [Hash] and a key.
    */
-  HMAC(Hash hash, List<int> key);
+  factory HMAC(Hash hash, List<int> key) => new _HMAC(hash, key);
 
   /**
    * Add a list of bytes to the message.
@@ -100,7 +100,7 @@
 /**
  * Utility methods for working with message digests.
  */
-class CryptoUtils {
+abstract class CryptoUtils {
   /**
    * Convert a list of bytes (for example a message digest) into a hex
    * string.
diff --git a/sdk/lib/crypto/crypto_utils.dart b/sdk/lib/crypto/crypto_utils.dart
index 043ab21..b9b4305 100644
--- a/sdk/lib/crypto/crypto_utils.dart
+++ b/sdk/lib/crypto/crypto_utils.dart
@@ -6,7 +6,7 @@
   _LineWrappingStringBuffer(int this._lineLength) : _sb = new StringBuffer();
 
   void add(String s) {
-    if (_lineLength !== null && _currentLineLength == _lineLength) {
+    if (_lineLength != null && _currentLineLength == _lineLength) {
       _sb.add('\r\n');
       _currentLineLength = 0;
     }
@@ -21,7 +21,7 @@
   int _currentLineLength = 0;
 }
 
-class _CryptoUtils {
+abstract class _CryptoUtils {
   static String bytesToHex(List<int> bytes) {
     var result = new StringBuffer();
     for (var part in bytes) {
diff --git a/sdk/lib/crypto/hash_utils.dart b/sdk/lib/crypto/hash_utils.dart
index bce8c8a..d3c23f5 100644
--- a/sdk/lib/crypto/hash_utils.dart
+++ b/sdk/lib/crypto/hash_utils.dart
@@ -19,7 +19,7 @@
 
 // Base class encapsulating common behavior for cryptographic hash
 // functions.
-class _HashBase implements Hash {
+abstract class _HashBase implements Hash {
   _HashBase(int this._chunkSizeInWords,
             int this._digestSizeInWords,
             bool this._bigEndianWords)
@@ -58,10 +58,10 @@
   }
 
   // Create a fresh instance of this Hash.
-  abstract newInstance();
+  newInstance();
 
   // One round of the hash computation.
-  abstract _updateHash(List<int> m);
+  _updateHash(List<int> m);
 
   // Helper methods.
   _add32(x, y) => (x + y) & _MASK_32;
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 5c2265e4..1fa9db2 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -2,6 +2,7 @@
 
 import 'dart:isolate';
 import 'dart:json';
+import 'dart:svg' as svg;
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
@@ -17,7 +18,7 @@
 
 LocalWindow get window => JS('LocalWindow', 'window');
 
-Document get document => JS('Document', 'document');
+HtmlDocument get document => JS('Document', 'document');
 
 Element query(String selector) => document.query(selector);
 List<Element> queryAll(String selector) => document.queryAll(selector);
@@ -42,6 +43,10 @@
 
 // TODO(vsm): Plumb this properly.
 spawnDomFunction(f) => spawnFunction(f);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AbstractWorker
 class AbstractWorker extends EventTarget native "*AbstractWorker" {
@@ -67,6 +72,10 @@
 
   EventListenerList get error => this['error'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AnalyserNode
 class AnalyserNode extends AudioNode native "*AnalyserNode" {
@@ -95,6 +104,10 @@
   /** @domName AnalyserNode.getFloatFrequencyData */
   void getFloatFrequencyData(Float32Array array) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLAnchorElement
 class AnchorElement extends Element implements Element native "*HTMLAnchorElement" {
@@ -169,6 +182,10 @@
   /** @domName HTMLAnchorElement.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitAnimation
 class Animation native "*WebKitAnimation" {
@@ -218,6 +235,10 @@
   /** @domName WebKitAnimation.play */
   void play() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitAnimationEvent
 class AnimationEvent extends Event native "*WebKitAnimationEvent" {
@@ -228,6 +249,10 @@
   /** @domName WebKitAnimationEvent.elapsedTime */
   final num elapsedTime;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLAppletElement
 class AppletElement extends Element implements Element native "*HTMLAppletElement" {
@@ -265,6 +290,10 @@
   /** @domName HTMLAppletElement.width */
   String width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLAreaElement
 class AreaElement extends Element implements Element native "*HTMLAreaElement" {
@@ -313,6 +342,10 @@
   /** @domName HTMLAreaElement.target */
   String target;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ArrayBuffer
 class ArrayBuffer native "*ArrayBuffer" {
@@ -325,6 +358,10 @@
   /** @domName ArrayBuffer.slice */
   ArrayBuffer slice(int begin, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ArrayBufferView
 class ArrayBufferView native "*ArrayBufferView" {
@@ -338,6 +375,10 @@
   /** @domName ArrayBufferView.byteOffset */
   final int byteOffset;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Attr
 class Attr extends Node native "*Attr" {
@@ -357,6 +398,10 @@
   /** @domName Attr.value */
   String value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioBuffer
 class AudioBuffer native "*AudioBuffer" {
@@ -391,6 +436,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class AudioBufferSourceNode extends AudioSourceNode native "*AudioBufferSourceNode" {
 
   // TODO(efortuna): Remove these methods when Chrome stable also uses start
@@ -457,6 +503,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class AudioContext extends EventTarget native "*AudioContext" {
   factory AudioContext() => _AudioContextFactoryProvider.createAudioContext();
 
@@ -562,6 +609,10 @@
 
   EventListenerList get complete => this['complete'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioDestinationNode
 class AudioDestinationNode extends AudioNode native "*AudioDestinationNode" {
@@ -569,6 +620,10 @@
   /** @domName AudioDestinationNode.numberOfChannels */
   final int numberOfChannels;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLAudioElement
 class AudioElement extends MediaElement native "*HTMLAudioElement" {
@@ -580,10 +635,18 @@
     return _AudioElementFactoryProvider.createAudioElement(src);
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioGain
 class AudioGain extends AudioParam native "*AudioGain" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioListener
 class AudioListener native "*AudioListener" {
@@ -603,6 +666,10 @@
   /** @domName AudioListener.setVelocity */
   void setVelocity(num x, num y, num z) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioNode
 class AudioNode native "*AudioNode" {
@@ -622,6 +689,10 @@
   /** @domName AudioNode.disconnect */
   void disconnect(int output) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioParam
 class AudioParam native "*AudioParam" {
@@ -662,6 +733,10 @@
   /** @domName AudioParam.setValueCurveAtTime */
   void setValueCurveAtTime(Float32Array values, num time, num duration) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioProcessingEvent
 class AudioProcessingEvent extends Event native "*AudioProcessingEvent" {
@@ -672,10 +747,18 @@
   /** @domName AudioProcessingEvent.outputBuffer */
   final AudioBuffer outputBuffer;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName AudioSourceNode
 class AudioSourceNode extends AudioNode native "*AudioSourceNode" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLBRElement
 class BRElement extends Element implements Element native "*HTMLBRElement" {
@@ -685,6 +768,10 @@
   /** @domName HTMLBRElement.clear */
   String clear;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName BarInfo
 class BarInfo native "*BarInfo" {
@@ -692,6 +779,10 @@
   /** @domName BarInfo.visible */
   final bool visible;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLBaseElement
 class BaseElement extends Element implements Element native "*HTMLBaseElement" {
@@ -704,6 +795,10 @@
   /** @domName HTMLBaseElement.target */
   String target;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLBaseFontElement
 class BaseFontElement extends Element implements Element native "*HTMLBaseFontElement" {
@@ -717,6 +812,10 @@
   /** @domName HTMLBaseFontElement.size */
   int size;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName BatteryManager
 class BatteryManager extends EventTarget native "*BatteryManager" {
@@ -760,6 +859,10 @@
 
   EventListenerList get levelChange => this['levelchange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName BeforeLoadEvent
 class BeforeLoadEvent extends Event native "*BeforeLoadEvent" {
@@ -767,6 +870,10 @@
   /** @domName BeforeLoadEvent.url */
   final String url;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName BiquadFilterNode
 class BiquadFilterNode extends AudioNode native "*BiquadFilterNode" {
@@ -802,6 +909,10 @@
   /** @domName BiquadFilterNode.getFrequencyResponse */
   void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Blob
 class Blob native "*Blob" {
@@ -825,6 +936,10 @@
   /** @domName Blob.slice */
   Blob slice([int start, int end, String contentType]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLBodyElement
 class BodyElement extends Element implements Element native "*HTMLBodyElement" {
@@ -882,6 +997,10 @@
 
   EventListenerList get unload => this['unload'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLButtonElement
 class ButtonElement extends Element implements Element native "*HTMLButtonElement" {
@@ -939,10 +1058,18 @@
   /** @domName HTMLButtonElement.setCustomValidity */
   void setCustomValidity(String error) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CDATASection
 class CDATASection extends Text native "*CDATASection" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSCharsetRule
 class CSSCharsetRule extends CSSRule native "*CSSCharsetRule" {
@@ -950,6 +1077,10 @@
   /** @domName CSSCharsetRule.encoding */
   String encoding;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSFontFaceRule
 class CSSFontFaceRule extends CSSRule native "*CSSFontFaceRule" {
@@ -957,6 +1088,10 @@
   /** @domName CSSFontFaceRule.style */
   final CSSStyleDeclaration style;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSImportRule
 class CSSImportRule extends CSSRule native "*CSSImportRule" {
@@ -970,6 +1105,10 @@
   /** @domName CSSImportRule.styleSheet */
   final CSSStyleSheet styleSheet;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitCSSKeyframeRule
 class CSSKeyframeRule extends CSSRule native "*WebKitCSSKeyframeRule" {
@@ -980,6 +1119,10 @@
   /** @domName WebKitCSSKeyframeRule.style */
   final CSSStyleDeclaration style;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitCSSKeyframesRule
 class CSSKeyframesRule extends CSSRule native "*WebKitCSSKeyframesRule" {
@@ -999,6 +1142,10 @@
   /** @domName WebKitCSSKeyframesRule.insertRule */
   void insertRule(String rule) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitCSSMatrix
 class CSSMatrix native "*WebKitCSSMatrix" {
@@ -1106,6 +1253,10 @@
   /** @domName WebKitCSSMatrix.translate */
   CSSMatrix translate(num x, num y, num z) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSMediaRule
 class CSSMediaRule extends CSSRule native "*CSSMediaRule" {
@@ -1122,6 +1273,10 @@
   /** @domName CSSMediaRule.insertRule */
   int insertRule(String rule, int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSPageRule
 class CSSPageRule extends CSSRule native "*CSSPageRule" {
@@ -1132,6 +1287,10 @@
   /** @domName CSSPageRule.style */
   final CSSStyleDeclaration style;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSPrimitiveValue
 class CSSPrimitiveValue extends CSSValue native "*CSSPrimitiveValue" {
@@ -1218,6 +1377,10 @@
   /** @domName CSSPrimitiveValue.setStringValue */
   void setStringValue(int stringType, String stringValue) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSRule
 class CSSRule native "*CSSRule" {
@@ -1256,6 +1419,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.
 
+
 String _cachedBrowserPrefix;
 
 String get _browserPrefix {
@@ -4087,6 +4251,10 @@
     setProperty('zoom', value, '');
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSStyleRule
 class CSSStyleRule extends CSSRule native "*CSSStyleRule" {
@@ -4097,6 +4265,10 @@
   /** @domName CSSStyleRule.style */
   final CSSStyleDeclaration style;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSStyleSheet
 class CSSStyleSheet extends StyleSheet native "*CSSStyleSheet" {
@@ -4122,6 +4294,10 @@
   /** @domName CSSStyleSheet.removeRule */
   void removeRule(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitCSSTransformValue
 class CSSTransformValue extends _CSSValueList native "*WebKitCSSTransformValue" {
@@ -4171,10 +4347,18 @@
   /** @domName WebKitCSSTransformValue.operationType */
   final int operationType;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSUnknownRule
 class CSSUnknownRule extends CSSRule native "*CSSUnknownRule" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSValue
 class CSSValue native "*CSSValue" {
@@ -4197,6 +4381,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class CanvasElement extends Element implements Element native "*HTMLCanvasElement" {
 
   factory CanvasElement({int width, int height}) {
@@ -4222,6 +4407,10 @@
   CanvasRenderingContext getContext(String contextId) native;
   CanvasRenderingContext2D get context2d => getContext('2d');
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CanvasGradient
 class CanvasGradient native "*CanvasGradient" {
@@ -4229,10 +4418,18 @@
   /** @domName CanvasGradient.addColorStop */
   void addColorStop(num offset, String color) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CanvasPattern
 class CanvasPattern native "*CanvasPattern" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CanvasRenderingContext
 class CanvasRenderingContext native "*CanvasRenderingContext" {
@@ -4244,6 +4441,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRenderingContext2D" {
 
   /** @domName CanvasRenderingContext2D.fillStyle */
@@ -4331,20 +4529,19 @@
   void closePath() native;
 
   /** @domName CanvasRenderingContext2D.createImageData */
-  ImageData createImageData(imagedata_OR_sw, [sh]) {
-    if ((imagedata_OR_sw is ImageData || imagedata_OR_sw == null) &&
+  ImageData createImageData(imagedata_OR_sw, [num sh]) {
+    if ((?imagedata_OR_sw && (imagedata_OR_sw is ImageData || imagedata_OR_sw == null)) &&
         !?sh) {
       var imagedata_1 = _convertDartToNative_ImageData(imagedata_OR_sw);
       return _convertNativeToDart_ImageData(_createImageData_1(imagedata_1));
     }
-    if ((imagedata_OR_sw is num || imagedata_OR_sw == null) &&
-        (sh is num || sh == null)) {
+    if ((?imagedata_OR_sw && (imagedata_OR_sw is num || imagedata_OR_sw == null))) {
       return _convertNativeToDart_ImageData(_createImageData_2(imagedata_OR_sw, sh));
     }
     throw const Exception("Incorrect number or type of arguments");
   }
   _createImageData_1(imagedata) native "createImageData";
-  _createImageData_2(num sw, num sh) native "createImageData";
+  _createImageData_2(num sw, sh) native "createImageData";
 
   /** @domName CanvasRenderingContext2D.createLinearGradient */
   CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native;
@@ -4392,7 +4589,7 @@
   void moveTo(num x, num y) native;
 
   /** @domName CanvasRenderingContext2D.putImageData */
-  void putImageData(ImageData imagedata, num dx, num dy, [dirtyX, dirtyY, dirtyWidth, dirtyHeight]) {
+  void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
     if (!?dirtyX &&
         !?dirtyY &&
         !?dirtyWidth &&
@@ -4401,18 +4598,13 @@
       _putImageData_1(imagedata_1, dx, dy);
       return;
     }
-    if ((dirtyX is num || dirtyX == null) &&
-        (dirtyY is num || dirtyY == null) &&
-        (dirtyWidth is num || dirtyWidth == null) &&
-        (dirtyHeight is num || dirtyHeight == null)) {
-      var imagedata_2 = _convertDartToNative_ImageData(imagedata);
-      _putImageData_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
-      return;
-    }
+    var imagedata_2 = _convertDartToNative_ImageData(imagedata);
+    _putImageData_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+    return;
     throw const Exception("Incorrect number or type of arguments");
   }
   void _putImageData_1(imagedata, dx, dy) native "putImageData";
-  void _putImageData_2(imagedata, dx, dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "putImageData";
+  void _putImageData_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "putImageData";
 
   /** @domName CanvasRenderingContext2D.quadraticCurveTo */
   void quadraticCurveTo(num cpx, num cpy, num x, num y) native;
@@ -4481,7 +4673,7 @@
   _webkitGetImageDataHD_1(sx, sy, sw, sh) native "webkitGetImageDataHD";
 
   /** @domName CanvasRenderingContext2D.webkitPutImageDataHD */
-  void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [dirtyX, dirtyY, dirtyWidth, dirtyHeight]) {
+  void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
     if (!?dirtyX &&
         !?dirtyY &&
         !?dirtyWidth &&
@@ -4490,18 +4682,13 @@
       _webkitPutImageDataHD_1(imagedata_1, dx, dy);
       return;
     }
-    if ((dirtyX is num || dirtyX == null) &&
-        (dirtyY is num || dirtyY == null) &&
-        (dirtyWidth is num || dirtyWidth == null) &&
-        (dirtyHeight is num || dirtyHeight == null)) {
-      var imagedata_2 = _convertDartToNative_ImageData(imagedata);
-      _webkitPutImageDataHD_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
-      return;
-    }
+    var imagedata_2 = _convertDartToNative_ImageData(imagedata);
+    _webkitPutImageDataHD_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+    return;
     throw const Exception("Incorrect number or type of arguments");
   }
   void _webkitPutImageDataHD_1(imagedata, dx, dy) native "webkitPutImageDataHD";
-  void _webkitPutImageDataHD_2(imagedata, dx, dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "webkitPutImageDataHD";
+  void _webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "webkitPutImageDataHD";
 
 
   /**
@@ -4540,14 +4727,26 @@
     this.strokeStyle = 'hsla($h, $s%, $l%, $a)';
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ChannelMergerNode
 class ChannelMergerNode extends AudioNode native "*ChannelMergerNode" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ChannelSplitterNode
 class ChannelSplitterNode extends AudioNode native "*ChannelSplitterNode" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CharacterData
 class CharacterData extends Node native "*CharacterData" {
@@ -4576,6 +4775,10 @@
   /** @domName CharacterData.substringData */
   String substringData(int offset, int length) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ClientRect
 class ClientRect native "*ClientRect" {
@@ -4598,6 +4801,10 @@
   /** @domName ClientRect.width */
   final num width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Clipboard
 class Clipboard native "*Clipboard" {
@@ -4629,6 +4836,10 @@
   /** @domName Clipboard.setDragImage */
   void setDragImage(ImageElement image, int x, int y) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CloseEvent
 class CloseEvent extends Event native "*CloseEvent" {
@@ -4642,10 +4853,18 @@
   /** @domName CloseEvent.wasClean */
   final bool wasClean;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Comment
 class Comment extends CharacterData native "*Comment" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CompositionEvent
 class CompositionEvent extends UIEvent native "*CompositionEvent" {
@@ -4660,6 +4879,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Console
     // Console is sometimes a singleton bag-of-properties without a prototype.
     native "=(typeof console == 'undefined' ? {} : console)" {
@@ -4728,6 +4948,10 @@
   void warn(Object arg) native;
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLContentElement
 class ContentElement extends Element implements Element native "*HTMLContentElement" {
@@ -4743,6 +4967,10 @@
   /** @domName HTMLContentElement.getDistributedNodes */
   List<Node> getDistributedNodes() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ConvolverNode
 class ConvolverNode extends AudioNode native "*ConvolverNode" {
@@ -4753,6 +4981,10 @@
   /** @domName ConvolverNode.normalize */
   bool normalize;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Coordinates
 class Coordinates native "*Coordinates" {
@@ -4778,6 +5010,10 @@
   /** @domName Coordinates.speed */
   final num speed;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Counter
 class Counter native "*Counter" {
@@ -4791,6 +5027,10 @@
   /** @domName Counter.separator */
   final String separator;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Crypto
 class Crypto native "*Crypto" {
@@ -4804,6 +5044,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class CustomEvent extends Event native "*CustomEvent" {
   factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true,
       Object detail]) => _CustomEventFactoryProvider.createCustomEvent(
@@ -4816,6 +5057,10 @@
   void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native "initCustomEvent";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLDListElement
 class DListElement extends Element implements Element native "*HTMLDListElement" {
@@ -4825,6 +5070,10 @@
   /** @domName HTMLDListElement.compact */
   bool compact;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMApplicationCache
 class DOMApplicationCache extends EventTarget native "*DOMApplicationCache" {
@@ -4888,6 +5137,10 @@
 
   EventListenerList get updateReady => this['updateready'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMError
 class DOMError native "*DOMError" {
@@ -4895,6 +5148,10 @@
   /** @domName DOMError.name */
   final String name;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMException
 class DOMException native "*DOMException" {
@@ -4961,6 +5218,10 @@
   /** @domName DOMException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMFileSystem
 class DOMFileSystem native "*DOMFileSystem" {
@@ -4971,6 +5232,10 @@
   /** @domName DOMFileSystem.root */
   final DirectoryEntry root;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMFileSystemSync
 class DOMFileSystemSync native "*DOMFileSystemSync" {
@@ -4981,6 +5246,10 @@
   /** @domName DOMFileSystemSync.root */
   final DirectoryEntrySync root;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMImplementation
 class DOMImplementation native "*DOMImplementation" {
@@ -4995,11 +5264,15 @@
   DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native;
 
   /** @domName DOMImplementation.createHTMLDocument */
-  Document createHTMLDocument(String title) native;
+  HtmlDocument createHTMLDocument(String title) native;
 
   /** @domName DOMImplementation.hasFeature */
   bool hasFeature(String feature, String version) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MimeType
 class DOMMimeType native "*MimeType" {
@@ -5016,6 +5289,10 @@
   /** @domName MimeType.type */
   final String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MimeTypeArray
 class DOMMimeTypeArray implements JavaScriptIndexingBehavior, List<DOMMimeType> native "*MimeTypeArray" {
@@ -5037,7 +5314,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<DOMMimeType>(this);
+    return new FixedSizeListIterator<DOMMimeType>(this);
   }
 
   // From Collection<DOMMimeType>:
@@ -5112,6 +5389,10 @@
   /** @domName MimeTypeArray.namedItem */
   DOMMimeType namedItem(String name) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMParser
 class DOMParser native "*DOMParser" {
@@ -5121,6 +5402,10 @@
   /** @domName DOMParser.parseFromString */
   Document parseFromString(String str, String contentType) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Plugin
 class DOMPlugin native "*Plugin" {
@@ -5143,6 +5428,10 @@
   /** @domName Plugin.namedItem */
   DOMMimeType namedItem(String name) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PluginArray
 class DOMPluginArray implements JavaScriptIndexingBehavior, List<DOMPlugin> native "*PluginArray" {
@@ -5164,7 +5453,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<DOMPlugin>(this);
+    return new FixedSizeListIterator<DOMPlugin>(this);
   }
 
   // From Collection<DOMPlugin>:
@@ -5242,6 +5531,10 @@
   /** @domName PluginArray.refresh */
   void refresh(bool reload) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Selection
 class DOMSelection native "*Selection" {
@@ -5324,6 +5617,10 @@
   /** @domName Selection.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMSettableTokenList
 class DOMSettableTokenList extends DOMTokenList native "*DOMSettableTokenList" {
@@ -5331,9 +5628,18 @@
   /** @domName DOMSettableTokenList.value */
   String value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
 /// @domName DOMStringMap
 abstract class DOMStringMap {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMTokenList
 class DOMTokenList native "*DOMTokenList" {
@@ -5353,6 +5659,10 @@
   /** @domName DOMTokenList.toggle */
   bool toggle(String token, [bool force]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLDataListElement
 class DataListElement extends Element implements Element native "*HTMLDataListElement" {
@@ -5362,6 +5672,10 @@
   /** @domName HTMLDataListElement.options */
   final HTMLCollection options;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DataTransferItem
 class DataTransferItem native "*DataTransferItem" {
@@ -5381,6 +5695,10 @@
   /** @domName DataTransferItem.webkitGetAsEntry */
   Entry webkitGetAsEntry() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DataTransferItemList
 class DataTransferItemList native "*DataTransferItemList" {
@@ -5397,6 +5715,10 @@
   /** @domName DataTransferItemList.item */
   DataTransferItem item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DataView
 class DataView extends ArrayBufferView native "*DataView" {
@@ -5459,6 +5781,10 @@
   /** @domName DataView.setUint8 */
   void setUint8(int byteOffset, int value) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Database
 class Database native "*Database" {
@@ -5483,6 +5809,10 @@
 
 
 typedef void DatabaseCallback(database);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DatabaseSync
 class DatabaseSync native "*DatabaseSync" {
@@ -5502,6 +5832,10 @@
   /** @domName DatabaseSync.transaction */
   void transaction(SQLTransactionSyncCallback callback) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DedicatedWorkerContext
 class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerContext" {
@@ -5513,7 +5847,7 @@
     new DedicatedWorkerContextEvents(this);
 
   /** @domName DedicatedWorkerContext.postMessage */
-  void postMessage(/*any*/ message, [messagePorts]) {
+  void postMessage(/*any*/ message, [List messagePorts]) {
     if (?messagePorts) {
       var message_1 = _convertDartToNative_SerializedScriptValue(message);
       _postMessage_1(message_1, messagePorts);
@@ -5532,6 +5866,10 @@
 
   EventListenerList get message => this['message'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DelayNode
 class DelayNode extends AudioNode native "*DelayNode" {
@@ -5539,6 +5877,10 @@
   /** @domName DelayNode.delayTime */
   final AudioParam delayTime;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLDetailsElement
 class DetailsElement extends Element implements Element native "*HTMLDetailsElement" {
@@ -5548,6 +5890,10 @@
   /** @domName HTMLDetailsElement.open */
   bool open;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DeviceMotionEvent
 class DeviceMotionEvent extends Event native "*DeviceMotionEvent" {
@@ -5555,6 +5901,10 @@
   /** @domName DeviceMotionEvent.interval */
   final num interval;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DeviceOrientationEvent
 class DeviceOrientationEvent extends Event native "*DeviceOrientationEvent" {
@@ -5574,6 +5924,10 @@
   /** @domName DeviceOrientationEvent.initDeviceOrientationEvent */
   void initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLDirectoryElement
 class DirectoryElement extends Element implements Element native "*HTMLDirectoryElement" {
@@ -5581,6 +5935,10 @@
   /** @domName HTMLDirectoryElement.compact */
   bool compact;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DirectoryEntry
 class DirectoryEntry extends Entry native "*DirectoryEntry" {
@@ -5589,7 +5947,7 @@
   DirectoryReader createReader() native;
 
   /** @domName DirectoryEntry.getDirectory */
-  void getDirectory(String path, {options, successCallback, errorCallback}) {
+  void getDirectory(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
     if (?errorCallback) {
       var options_1 = _convertDartToNative_Dictionary(options);
       _getDirectory_1(path, options_1, successCallback, errorCallback);
@@ -5614,7 +5972,7 @@
   void _getDirectory_4(path) native "getDirectory";
 
   /** @domName DirectoryEntry.getFile */
-  void getFile(String path, {options, successCallback, errorCallback}) {
+  void getFile(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
     if (?errorCallback) {
       var options_1 = _convertDartToNative_Dictionary(options);
       _getFile_1(path, options_1, successCallback, errorCallback);
@@ -5641,6 +5999,10 @@
   /** @domName DirectoryEntry.removeRecursively */
   void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallback]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DirectoryEntrySync
 class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" {
@@ -5665,6 +6027,10 @@
   /** @domName DirectoryEntrySync.removeRecursively */
   void removeRecursively() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DirectoryReader
 class DirectoryReader native "*DirectoryReader" {
@@ -5672,6 +6038,10 @@
   /** @domName DirectoryReader.readEntries */
   void readEntries(EntriesCallback successCallback, [ErrorCallback errorCallback]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DirectoryReaderSync
 class DirectoryReaderSync native "*DirectoryReaderSync" {
@@ -5679,21 +6049,22 @@
   /** @domName DirectoryReaderSync.readEntries */
   List<EntrySync> readEntries() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLDivElement
 class DivElement extends Element implements Element native "*HTMLDivElement" {
 
   factory DivElement() => _Elements.createDivElement();
-
-  /** @domName HTMLDivElement.align */
-  String align;
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for 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 Document extends Node
-    native "*HTMLDocument"
+
+class Document extends Node  native "*Document"
 {
 
 
@@ -5703,11 +6074,13 @@
   DocumentEvents get on =>
     new DocumentEvents(this);
 
-  /** @domName HTMLDocument.activeElement */
-  final Element activeElement;
+  /** @domName Document.body */
+  Element get $dom_body => JS("Element", "#.body", this);
 
   /** @domName Document.body */
-  Element body;
+  void set $dom_body(Element value) {
+    JS("void", "#.body = #", this, value);
+  }
 
   /** @domName Document.charset */
   String charset;
@@ -5717,7 +6090,7 @@
 
   /** @domName Document.defaultView */
   Window get window => _convertNativeToDart_Window(this._window);
-  Window get _window => JS("Window", "#.defaultView", this);
+  dynamic get _window => JS("dynamic", "#.defaultView", this);
 
   /** @domName Document.documentElement */
   final Element documentElement;
@@ -5726,13 +6099,13 @@
   final String domain;
 
   /** @domName Document.head */
-  final HeadElement head;
+  HeadElement get $dom_head => JS("HeadElement", "#.head", this);
 
   /** @domName Document.implementation */
   final DOMImplementation implementation;
 
   /** @domName Document.lastModified */
-  final String lastModified;
+  String get $dom_lastModified => JS("String", "#.lastModified", this);
 
   /** @domName Document.preferredStylesheetSet */
   final String preferredStylesheetSet;
@@ -5741,43 +6114,42 @@
   final String readyState;
 
   /** @domName Document.referrer */
-  final String referrer;
+  String get $dom_referrer => JS("String", "#.referrer", this);
 
   /** @domName Document.selectedStylesheetSet */
   String selectedStylesheetSet;
 
   /** @domName Document.styleSheets */
-  final List<StyleSheet> styleSheets;
+  List<StyleSheet> get $dom_styleSheets => JS("List<StyleSheet>", "#.styleSheets", this);
 
   /** @domName Document.title */
-  String title;
+  String get $dom_title => JS("String", "#.title", this);
 
-  /** @domName Document.webkitCurrentFullScreenElement */
-  final Element webkitCurrentFullScreenElement;
-
-  /** @domName Document.webkitFullScreenKeyboardInputAllowed */
-  final bool webkitFullScreenKeyboardInputAllowed;
+  /** @domName Document.title */
+  void set $dom_title(String value) {
+    JS("void", "#.title = #", this, value);
+  }
 
   /** @domName Document.webkitFullscreenElement */
-  final Element webkitFullscreenElement;
+  Element get $dom_webkitFullscreenElement => JS("Element", "#.webkitFullscreenElement", this);
 
   /** @domName Document.webkitFullscreenEnabled */
-  final bool webkitFullscreenEnabled;
+  bool get $dom_webkitFullscreenEnabled => JS("bool", "#.webkitFullscreenEnabled", this);
 
   /** @domName Document.webkitHidden */
-  final bool webkitHidden;
+  bool get $dom_webkitHidden => JS("bool", "#.webkitHidden", this);
 
   /** @domName Document.webkitIsFullScreen */
-  final bool webkitIsFullScreen;
+  bool get $dom_webkitIsFullScreen => JS("bool", "#.webkitIsFullScreen", this);
 
   /** @domName Document.webkitPointerLockElement */
-  final Element webkitPointerLockElement;
+  Element get $dom_webkitPointerLockElement => JS("Element", "#.webkitPointerLockElement", this);
 
   /** @domName Document.webkitVisibilityState */
-  final String webkitVisibilityState;
+  String get $dom_webkitVisibilityState => JS("String", "#.webkitVisibilityState", this);
 
   /** @domName Document.caretRangeFromPoint */
-  Range caretRangeFromPoint(int x, int y) native;
+  Range $dom_caretRangeFromPoint(int x, int y) native "caretRangeFromPoint";
 
   /** @domName Document.createCDATASection */
   CDATASection createCDATASection(String data) native;
@@ -5802,16 +6174,16 @@
 
   /** @domName Document.createTouch */
   Touch createTouch(LocalWindow window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
-    EventTarget target_1 = _convertDartToNative_EventTarget(target);
+    var target_1 = _convertDartToNative_EventTarget(target);
     return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
   }
-  Touch _createTouch_1(LocalWindow window, EventTarget target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native "createTouch";
+  Touch _createTouch_1(LocalWindow window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native "createTouch";
 
   /** @domName Document.createTouchList */
   TouchList $dom_createTouchList() native "createTouchList";
 
   /** @domName Document.elementFromPoint */
-  Element elementFromPoint(int x, int y) native;
+  Element $dom_elementFromPoint(int x, int y) native "elementFromPoint";
 
   /** @domName Document.execCommand */
   bool execCommand(String command, bool userInterface, String value) native;
@@ -5853,27 +6225,27 @@
   List<Node> $dom_querySelectorAll(String selectors) native "querySelectorAll";
 
   /** @domName Document.webkitCancelFullScreen */
-  void webkitCancelFullScreen() native;
+  void $dom_webkitCancelFullScreen() native "webkitCancelFullScreen";
 
   /** @domName Document.webkitExitFullscreen */
-  void webkitExitFullscreen() native;
+  void $dom_webkitExitFullscreen() native "webkitExitFullscreen";
 
   /** @domName Document.webkitExitPointerLock */
-  void webkitExitPointerLock() native;
+  void $dom_webkitExitPointerLock() native "webkitExitPointerLock";
 
   // TODO(jacobr): implement all Element methods not on Document.
 
   Element query(String selectors) {
     // It is fine for our RegExp to detect element id query selectors to have
     // false negatives but not false positives.
-    if (const RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
+    if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
       return $dom_getElementById(selectors.substring(1));
     }
     return $dom_querySelector(selectors);
   }
 
   List<Element> queryAll(String selectors) {
-    if (const RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
+    if (new RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByName(
           selectors.substring(7,selectors.length - 2));
       int len = mutableMatches.length;
@@ -5882,7 +6254,7 @@
         copyOfMatches[i] = mutableMatches[i];
       }
       return new _FrozenElementList._wrap(copyOfMatches);
-    } else if (const RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
+    } else if (new RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByTagName(selectors);
       int len = mutableMatches.length;
       final copyOfMatches = new List<Element>(len);
@@ -6001,128 +6373,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class _FilteredElementList implements List {
-  final Node _node;
-  final List<Node> _childNodes;
-
-  _FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
-
-  // We can't memoize this, since it's possible that children will be messed
-  // with externally to this class.
-  //
-  // TODO(nweiz): Do we really need to copy the list to make the types work out?
-  List<Element> get _filtered =>
-    new List.from(_childNodes.filter((n) => n is Element));
-
-  void forEach(void f(Element element)) {
-    _filtered.forEach(f);
-  }
-
-  void operator []=(int index, Element value) {
-    this[index].replaceWith(value);
-  }
-
-  void set length(int newLength) {
-    final len = this.length;
-    if (newLength >= len) {
-      return;
-    } else if (newLength < 0) {
-      throw new ArgumentError("Invalid list length");
-    }
-
-    removeRange(newLength - 1, len - newLength);
-  }
-
-  void add(Element value) {
-    _childNodes.add(value);
-  }
-
-  void addAll(Collection<Element> collection) {
-    collection.forEach(add);
-  }
-
-  void addLast(Element value) {
-    add(value);
-  }
-
-  bool contains(Element element) {
-    return element is Element && _childNodes.contains(element);
-  }
-
-  void sort([Comparator<Element> compare = Comparable.compare]) {
-    throw new UnsupportedError('TODO(jacobr): should we impl?');
-  }
-
-  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
-    throw new UnimplementedError();
-  }
-
-  void removeRange(int start, int rangeLength) {
-    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
-  }
-
-  void insertRange(int start, int rangeLength, [initialValue = null]) {
-    throw new UnimplementedError();
-  }
-
-  void clear() {
-    // Currently, ElementList#clear clears even non-element nodes, so we follow
-    // that behavior.
-    _childNodes.clear();
-  }
-
-  Element removeLast() {
-    final result = this.last;
-    if (result != null) {
-      result.remove();
-    }
-    return result;
-  }
-
-  Collection map(f(Element element)) => _filtered.map(f);
-  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
-  bool every(bool f(Element element)) => _filtered.every(f);
-  bool some(bool f(Element element)) => _filtered.some(f);
-  bool get isEmpty => _filtered.isEmpty;
-  int get length => _filtered.length;
-  Element operator [](int index) => _filtered[index];
-  Iterator<Element> iterator() => _filtered.iterator();
-  List<Element> getRange(int start, int rangeLength) =>
-    _filtered.getRange(start, rangeLength);
-  int indexOf(Element element, [int start = 0]) =>
-    _filtered.indexOf(element, start);
-
-  int lastIndexOf(Element element, [int start = null]) {
-    if (start == null) start = length - 1;
-    return _filtered.lastIndexOf(element, start);
-  }
-
-  Element get last => _filtered.last;
-}
 
 Future<CSSStyleDeclaration> _emptyStyleFuture() {
   return _createMeasurementFuture(() => new Element.tag('div').style,
                                   new Completer<CSSStyleDeclaration>());
 }
 
-class EmptyElementRect implements ElementRect {
-  final ClientRect client = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect offset = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect scroll = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect bounding = const _SimpleClientRect(0, 0, 0, 0);
-  final List<ClientRect> clientRects = const <ClientRect>[];
-
-  const EmptyElementRect();
-}
-
-class _FrozenCssClassSet extends _CssClassSet {
-  _FrozenCssClassSet() : super(null);
-
-  void _write(Set s) {
+class _FrozenCssClassSet extends CssClassSet {
+  void writeClasses(Set s) {
     throw new UnsupportedError(
         'frozen class set cannot be modified');
   }
-  Set<String> _read() => new Set<String>();
+  Set<String> readClasses() => new Set<String>();
 
   bool get frozen => true;
 }
@@ -6133,14 +6395,14 @@
   factory DocumentFragment.html(String html) =>
       _DocumentFragmentFactoryProvider.createDocumentFragment_html(html);
 
-  factory DocumentFragment.svg(String svg) =>
-      new _DocumentFragmentFactoryProvider.createDocumentFragment_svg(svg);
+  factory DocumentFragment.svg(String svgContent) =>
+      new _DocumentFragmentFactoryProvider.createDocumentFragment_svg(svgContent);
 
   List<Element> _elements;
 
   List<Element> get elements {
     if (_elements == null) {
-      _elements = new _FilteredElementList(this);
+      _elements = new FilteredElementList(this);
     }
     return _elements;
   }
@@ -6211,15 +6473,10 @@
     this.insertAdjacentText('beforeend', text);
   }
 
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(() => const EmptyElementRect(),
-                                    new Completer<ElementRect>());
-  }
-
   // If we can come up with a semi-reasonable default value for an Element
   // getter, we'll use it. In general, these return the same values as an
   // element that has no parent.
@@ -6378,6 +6635,10 @@
   List<Node> $dom_querySelectorAll(String selectors) native "querySelectorAll";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DocumentType
 class DocumentType extends Node native "*DocumentType" {
@@ -6403,6 +6664,10 @@
   /** @domName DocumentType.remove */
   void remove() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DynamicsCompressorNode
 class DynamicsCompressorNode extends AudioNode native "*DynamicsCompressorNode" {
@@ -6425,6 +6690,10 @@
   /** @domName DynamicsCompressorNode.threshold */
   final AudioParam threshold;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EXTTextureFilterAnisotropic
 class EXTTextureFilterAnisotropic native "*EXTTextureFilterAnisotropic" {
@@ -6437,6 +6706,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.
 
+
 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
 // functionality.
 class _ChildrenElementList implements List {
@@ -6905,136 +7175,17 @@
   String _strip(String key) => key.substring(5);
 }
 
-abstract class CssClassSet implements Set<String> {
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String token);
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen;
-}
-
-class _CssClassSet extends CssClassSet {
+class _ElementCssClassSet extends CssClassSet {
 
   final Element _element;
 
-  _CssClassSet(this._element);
+  _ElementCssClassSet(this._element);
 
-  String toString() => _formatSet(_read());
+  Set<String> readClasses() {
+    var s = new Set<String>();
+    var classname = _element.$dom_className;
 
-  // interface Iterable - BEGIN
-  Iterator<String> iterator() => _read().iterator();
-  // interface Iterable - END
-
-  // interface Collection - BEGIN
-  void forEach(void f(String element)) {
-    _read().forEach(f);
-  }
-
-  Collection map(f(String element)) => _read().map(f);
-
-  Collection<String> filter(bool f(String element)) => _read().filter(f);
-
-  bool every(bool f(String element)) => _read().every(f);
-
-  bool some(bool f(String element)) => _read().some(f);
-
-  bool get isEmpty => _read().isEmpty;
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen => false;
-
-  int get length =>_read().length;
-
-  // interface Collection - END
-
-  // interface Set - BEGIN
-  bool contains(String value) => _read().contains(value);
-
-  void add(String value) {
-    // TODO - figure out if we need to do any validation here
-    // or if the browser natively does enough
-    _modify((s) => s.add(value));
-  }
-
-  bool remove(String value) {
-    Set<String> s = _read();
-    bool result = s.remove(value);
-    _write(s);
-    return result;
-  }
-
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String value) {
-    Set<String> s = _read();
-    bool result = false;
-    if (s.contains(value)) {
-      s.remove(value);
-    } else {
-      s.add(value);
-      result = true;
-    }
-    _write(s);
-    return result;
-  }
-
-  void addAll(Collection<String> collection) {
-    // TODO - see comment above about validation
-    _modify((s) => s.addAll(collection));
-  }
-
-  void removeAll(Collection<String> collection) {
-    _modify((s) => s.removeAll(collection));
-  }
-
-  bool isSubsetOf(Collection<String> collection) =>
-    _read().isSubsetOf(collection);
-
-  bool containsAll(Collection<String> collection) =>
-    _read().containsAll(collection);
-
-  Set<String> intersection(Collection<String> other) =>
-    _read().intersection(other);
-
-  void clear() {
-    _modify((s) => s.clear());
-  }
-  // interface Set - END
-
-  /**
-   * Helper method used to modify the set of css classes on this element.
-   *
-   *   f - callback with:
-   *      s - a Set of all the css class name currently on this element.
-   *
-   *   After f returns, the modified set is written to the
-   *       className property of this element.
-   */
-  void _modify( f(Set<String> s)) {
-    Set<String> s = _read();
-    f(s);
-    _write(s);
-  }
-
-  /**
-   * Read the class names from the Element class property,
-   * and put them into a set (duplicates are discarded).
-   */
-  Set<String> _read() {
-    // TODO(mattsh) simplify this once split can take regex.
-    Set<String> s = new Set<String>();
-    for (String name in _classname().split(' ')) {
+    for (String name in classname.split(' ')) {
       String trimmed = name.trim();
       if (!trimmed.isEmpty) {
         s.add(trimmed);
@@ -7043,24 +7194,9 @@
     return s;
   }
 
-  /**
-   * Read the class names as a space-separated string. This is meant to be
-   * overridden by subclasses.
-   */
-  String _classname() => _element.$dom_className;
-
-  /**
-   * Join all the elements of a set into one string and write
-   * back to the element.
-   */
-  void _write(Set s) {
-    _element.$dom_className = _formatSet(s);
-  }
-
-  String _formatSet(Set<String> s) {
-    // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605
+  void writeClasses(Set<String> s) {
     List list = new List.from(s);
-    return Strings.join(list, ' ');
+    _element.$dom_className = Strings.join(list, ' ');
   }
 }
 
@@ -7082,53 +7218,6 @@
   String toString() => "($left, $top, $width, $height)";
 }
 
-// TODO(jacobr): we cannot currently be lazy about calculating the client
-// rects as we must perform all measurement queries at a safe point to avoid
-// triggering unneeded layouts.
-/**
- * All your element measurement needs in one place.
- * @domName none
- */
-class ElementRect {
-  // Relative to offsetParent.
-  final ClientRect client;
-  final ClientRect offset;
-  final ClientRect scroll;
-
-  // TODO(jacobr): should we move these outside of ElementRect to avoid the
-  // overhead of computing them every time even though they are rarely used.
-  final ClientRect _boundingClientRect;
-  final _ClientRectList _clientRects;
-
-  ElementRect(Element element) :
-    client = new _SimpleClientRect(element.clientLeft,
-                                  element.clientTop,
-                                  element.clientWidth,
-                                  element.clientHeight),
-    offset = new _SimpleClientRect(element.offsetLeft,
-                                  element.offsetTop,
-                                  element.offsetWidth,
-                                  element.offsetHeight),
-    scroll = new _SimpleClientRect(element.scrollLeft,
-                                  element.scrollTop,
-                                  element.scrollWidth,
-                                  element.scrollHeight),
-    _boundingClientRect = element.getBoundingClientRect(),
-    _clientRects = element.getClientRects();
-
-  // In global coords.
-  ClientRect get bounding => _boundingClientRect;
-
-  // In global coords.
-  List<ClientRect> get clientRects {
-    final out = new List(_clientRects.length);
-    for (num i = 0; i < _clientRects.length; i++) {
-      out[i] = _clientRects.item(i);
-    }
-    return out;
-  }
-}
-
 class Element extends Node implements ElementTraversal native "*Element" {
 
   factory Element.html(String html) =>
@@ -7168,7 +7257,7 @@
     new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
 
   /** @domName className, classList */
-  CssClassSet get classes => new _CssClassSet(this);
+  CssClassSet get classes => new _ElementCssClassSet(this);
 
   void set classes(Collection<String> value) {
     CssClassSet classSet = classes;
@@ -7187,17 +7276,6 @@
     }
   }
 
-  /**
-   * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
-   * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
-   * scrollHeight, scrollWidth, scrollTop, scrollLeft
-   */
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(
-        () => new ElementRect(this),
-        new Completer<ElementRect>());
-  }
-
   /** @domName Window.getComputedStyle */
   Future<CSSStyleDeclaration> get computedStyle {
      // TODO(jacobr): last param should be null, see b/5045788
@@ -7222,7 +7300,7 @@
    * Parses the specified text as HTML and adds the resulting node after the
    * last child of this.
    */
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
@@ -7488,7 +7566,7 @@
 // Temporary dispatch hook to support WebComponents.
 Function dynamicUnknownElementDispatcher;
 
-final _START_TAG_REGEXP = const RegExp('<(\\w+)');
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
 class _ElementFactoryProvider {
   static final _CUSTOM_PARENT_TAG_MAP = const {
     'body' : 'html',
@@ -7550,6 +7628,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class ElementEvents extends Events {
   ElementEvents(EventTarget _ptr) : super(_ptr);
 
@@ -7660,6 +7739,11 @@
     }
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
 /// @domName ElementTimeControl
 abstract class ElementTimeControl {
 
@@ -7675,6 +7759,11 @@
   /** @domName ElementTimeControl.endElementAt */
   void endElementAt(num offset);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
 /// @domName ElementTraversal
 abstract class ElementTraversal {
 
@@ -7688,6 +7777,10 @@
 
   Element previousElementSibling;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLEmbedElement
 class EmbedElement extends Element implements Element native "*HTMLEmbedElement" {
@@ -7712,6 +7805,10 @@
   /** @domName HTMLEmbedElement.width */
   String width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EntityReference
 class EntityReference extends Node native "*EntityReference" {
@@ -7724,6 +7821,10 @@
 
 
 typedef void EntriesCallback(List<Entry> entries);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Entry
 class Entry native "*Entry" {
@@ -7769,6 +7870,10 @@
 
 
 typedef void EntryCallback(Entry entry);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EntrySync
 class EntrySync native "*EntrySync" {
@@ -7814,6 +7919,10 @@
 
 
 typedef void ErrorCallback(FileError error);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ErrorEvent
 class ErrorEvent extends Event native "*ErrorEvent" {
@@ -7833,6 +7942,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Event native "*Event" {
   // In JS, canBubble and cancelable are technically required parameters to
   // init*Event. In practice, though, if they aren't provided they simply
@@ -7897,7 +8007,7 @@
 
   /** @domName Event.currentTarget */
   EventTarget get currentTarget => _convertNativeToDart_EventTarget(this._currentTarget);
-  EventTarget get _currentTarget => JS("EventTarget", "#.currentTarget", this);
+  dynamic get _currentTarget => JS("dynamic", "#.currentTarget", this);
 
   /** @domName Event.defaultPrevented */
   final bool defaultPrevented;
@@ -7908,13 +8018,9 @@
   /** @domName Event.returnValue */
   bool returnValue;
 
-  /** @domName Event.srcElement */
-  EventTarget get srcElement => _convertNativeToDart_EventTarget(this._srcElement);
-  EventTarget get _srcElement => JS("EventTarget", "#.srcElement", this);
-
   /** @domName Event.target */
   EventTarget get target => _convertNativeToDart_EventTarget(this._target);
-  EventTarget get _target => JS("EventTarget", "#.target", this);
+  dynamic get _target => JS("dynamic", "#.target", this);
 
   /** @domName Event.timeStamp */
   final int timeStamp;
@@ -7935,6 +8041,10 @@
   void stopPropagation() native;
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EventException
 class EventException native "*EventException" {
@@ -7955,6 +8065,10 @@
   /** @domName EventException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EventSource
 class EventSource extends EventTarget native "*EventSource" {
@@ -8008,6 +8122,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Events {
   /* Raw event target. */
   final EventTarget _ptr;
@@ -8069,6 +8184,10 @@
   void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "removeEventListener";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLFieldSetElement
 class FieldSetElement extends Element implements Element native "*HTMLFieldSetElement" {
@@ -8105,6 +8224,10 @@
   /** @domName HTMLFieldSetElement.setCustomValidity */
   void setCustomValidity(String error) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName File
 class File extends Blob native "*File" {
@@ -8126,6 +8249,10 @@
 
 
 typedef void FileCallback(File file);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileEntry
 class FileEntry extends Entry native "*FileEntry" {
@@ -8136,6 +8263,10 @@
   /** @domName FileEntry.file */
   void file(FileCallback successCallback, [ErrorCallback errorCallback]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileEntrySync
 class FileEntrySync extends EntrySync native "*FileEntrySync" {
@@ -8146,6 +8277,10 @@
   /** @domName FileEntrySync.file */
   File file() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileError
 class FileError native "*FileError" {
@@ -8177,6 +8312,10 @@
   /** @domName FileError.code */
   final int code;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileException
 class FileException native "*FileException" {
@@ -8217,6 +8356,10 @@
   /** @domName FileException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileReader
 class FileReader extends EventTarget native "*FileReader" {
@@ -8284,6 +8427,10 @@
 
   EventListenerList get progress => this['progress'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileReaderSync
 class FileReaderSync native "*FileReaderSync" {
@@ -8310,6 +8457,10 @@
 
 
 typedef void FileSystemCallback(DOMFileSystem fileSystem);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileWriter
 class FileWriter extends EventTarget native "*FileWriter" {
@@ -8383,6 +8534,10 @@
 
 
 typedef void FileWriterCallback(FileWriter fileWriter);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileWriterSync
 class FileWriterSync native "*FileWriterSync" {
@@ -8402,6 +8557,10 @@
   /** @domName FileWriterSync.write */
   void write(Blob data) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Float32Array
 class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<num> native "*Float32Array" {
@@ -8432,7 +8591,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<num>(this);
+    return new FixedSizeListIterator<num>(this);
   }
 
   // From Collection<num>:
@@ -8507,6 +8666,10 @@
   /** @domName Float32Array.subarray */
   Float32Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Float64Array
 class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<num> native "*Float64Array" {
@@ -8537,7 +8700,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<num>(this);
+    return new FixedSizeListIterator<num>(this);
   }
 
   // From Collection<num>:
@@ -8612,6 +8775,10 @@
   /** @domName Float64Array.subarray */
   Float64Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLFontElement
 class FontElement extends Element implements Element native "*HTMLFontElement" {
@@ -8625,6 +8792,10 @@
   /** @domName HTMLFontElement.size */
   String size;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FormData
 class FormData native "*FormData" {
@@ -8639,6 +8810,10 @@
   /** @domName FormData.append */
   void append(String name, String value, String filename) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLFormElement
 class FormElement extends Element implements Element native "*HTMLFormElement" {
@@ -8684,13 +8859,17 @@
   /** @domName HTMLFormElement.submit */
   void submit() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLFrameElement
 class FrameElement extends Element implements Element native "*HTMLFrameElement" {
 
   /** @domName HTMLFrameElement.contentWindow */
   Window get contentWindow => _convertNativeToDart_Window(this._contentWindow);
-  Window get _contentWindow => JS("Window", "#.contentWindow", this);
+  dynamic get _contentWindow => JS("dynamic", "#.contentWindow", this);
 
   /** @domName HTMLFrameElement.frameBorder */
   String frameBorder;
@@ -8725,6 +8904,10 @@
   /** @domName HTMLFrameElement.width */
   final int width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLFrameSetElement
 class FrameSetElement extends Element implements Element native "*HTMLFrameSetElement" {
@@ -8771,6 +8954,10 @@
 
   EventListenerList get unload => this['unload'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName GainNode
 class GainNode extends AudioNode native "*GainNode" {
@@ -8778,6 +8965,10 @@
   /** @domName GainNode.gain */
   final AudioGain gain;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Gamepad
 class Gamepad native "*Gamepad" {
@@ -8797,6 +8988,10 @@
   /** @domName Gamepad.timestamp */
   final int timestamp;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Geolocation
 class Geolocation native "*Geolocation" {
@@ -8810,6 +9005,10 @@
   /** @domName Geolocation.watchPosition */
   int watchPosition(PositionCallback successCallback, [PositionErrorCallback errorCallback, Object options]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Geoposition
 class Geoposition native "*Geoposition" {
@@ -8820,6 +9019,10 @@
   /** @domName Geoposition.timestamp */
   final int timestamp;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLHRElement
 class HRElement extends Element implements Element native "*HTMLHRElement" {
@@ -8838,6 +9041,10 @@
   /** @domName HTMLHRElement.width */
   String width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLAllCollection
 class HTMLAllCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLAllCollection" {
@@ -8859,7 +9066,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -8937,6 +9144,10 @@
   /** @domName HTMLAllCollection.tags */
   List<Node> tags(String name) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLCollection
 class HTMLCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLCollection" {
@@ -8958,7 +9169,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -9033,6 +9244,10 @@
   /** @domName HTMLCollection.namedItem */
   Node namedItem(String name) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLOptionsCollection
 class HTMLOptionsCollection extends HTMLCollection native "*HTMLOptionsCollection" {
@@ -9052,6 +9267,10 @@
   /** @domName HTMLOptionsCollection.remove */
   void remove(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HashChangeEvent
 class HashChangeEvent extends Event native "*HashChangeEvent" {
@@ -9065,6 +9284,10 @@
   /** @domName HashChangeEvent.initHashChangeEvent */
   void initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLHeadElement
 class HeadElement extends Element implements Element native "*HTMLHeadElement" {
@@ -9074,6 +9297,10 @@
   /** @domName HTMLHeadElement.profile */
   String profile;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLHeadingElement
 class HeadingElement extends Element implements Element native "*HTMLHeadingElement" {
@@ -9093,6 +9320,94 @@
   /** @domName HTMLHeadingElement.align */
   String align;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+class HtmlDocument extends Document native "*HTMLDocument" {
+
+  /** @domName HTMLDocument.activeElement */
+  final Element activeElement;
+
+  /** @domName Document.body */
+  BodyElement get body => document.$dom_body;
+
+  /** @domName Document.body */
+  void set body(BodyElement value) {
+    document.$dom_body = value;
+  }
+
+  /** @domName Document.caretRangeFromPoint */
+  Range caretRangeFromPoint(int x, int y) {
+    return document.$dom_caretRangeFromPoint(x, y);
+  }
+
+  /** @domName Document.elementFromPoint */
+  Element elementFromPoint(int x, int y) {
+    return document.$dom_elementFromPoint(x, y);
+  }
+
+  /** @domName Document.head */
+  HeadElement get head => document.$dom_head;
+
+  /** @domName Document.lastModified */
+  String get lastModified => document.$dom_lastModified;
+
+  /** @domName Document.referrer */
+  String get referrer => document.$dom_referrer;
+
+  /** @domName Document.styleSheets */
+  List<StyleSheet> get styleSheets => document.$dom_styleSheets;
+
+  /** @domName Document.title */
+  String get title => document.$dom_title;
+
+  /** @domName Document.title */
+  void set title(String value) {
+    document.$dom_title = value;
+  }
+
+  /** @domName Document.webkitCancelFullScreen */
+  void webkitCancelFullScreen() {
+    document.$dom_webkitCancelFullScreen();
+  }
+
+  /** @domName Document.webkitExitFullscreen */
+  void webkitExitFullscreen() {
+    document.$dom_webkitExitFullscreen();
+  }
+
+  /** @domName Document.webkitExitPointerLock */
+  void webkitExitPointerLock() {
+    document.$dom_webkitExitPointerLock();
+  }
+
+  /** @domName Document.webkitFullscreenElement */
+  Element get webkitFullscreenElement => document.$dom_webkitFullscreenElement;
+
+  /** @domName Document.webkitFullscreenEnabled */
+  bool get webkitFullscreenEnabled => document.$dom_webkitFullscreenEnabled;
+
+  /** @domName Document.webkitHidden */
+  bool get webkitHidden => document.$dom_webkitHidden;
+
+  /** @domName Document.webkitIsFullScreen */
+  bool get webkitIsFullScreen => document.$dom_webkitIsFullScreen;
+
+  /** @domName Document.webkitPointerLockElement */
+  Element get webkitPointerLockElement =>
+      document.$dom_webkitPointerLockElement;
+
+  /** @domName Document.webkitVisibilityState */
+  String get webkitVisibilityState => document.$dom_webkitVisibilityState;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLHtmlElement
 class HtmlElement extends Element implements Element native "*HTMLHtmlElement" {
@@ -9103,6 +9418,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class HttpRequest extends EventTarget native "*XMLHttpRequest" {
   factory HttpRequest.get(String url, onSuccess(HttpRequest request)) =>
       _HttpRequestFactoryProvider.createHttpRequest_get(url, onSuccess);
@@ -9205,6 +9521,10 @@
 
   EventListenerList get readyStateChange => this['readystatechange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XMLHttpRequestException
 class HttpRequestException native "*XMLHttpRequestException" {
@@ -9225,6 +9545,10 @@
   /** @domName XMLHttpRequestException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XMLHttpRequestProgressEvent
 class HttpRequestProgressEvent extends ProgressEvent native "*XMLHttpRequestProgressEvent" {
@@ -9235,6 +9559,10 @@
   /** @domName XMLHttpRequestProgressEvent.totalSize */
   final int totalSize;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XMLHttpRequestUpload
 class HttpRequestUpload extends EventTarget native "*XMLHttpRequestUpload" {
@@ -9270,10 +9598,18 @@
 
   EventListenerList get progress => this['progress'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBAny
 class IDBAny native "*IDBAny" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBCursor
 class IDBCursor native "*IDBCursor" {
@@ -9302,7 +9638,7 @@
   void advance(int count) native;
 
   /** @domName IDBCursor.continueFunction */
-  void continueFunction([key]) {
+  void continueFunction([/*IDBKey*/ key]) {
     if (?key) {
       var key_1 = _convertDartToNative_IDBKey(key);
       _continueFunction_1(key_1);
@@ -9324,6 +9660,10 @@
   }
   IDBRequest _update_1(value) native "update";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBCursorWithValue
 class IDBCursorWithValue extends IDBCursor native "*IDBCursorWithValue" {
@@ -9335,6 +9675,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class IDBDatabase extends EventTarget native "*IDBDatabase" {
 
   IDBTransaction transaction(storeName_OR_storeNames, String mode) {
@@ -9401,7 +9742,7 @@
   void close() native;
 
   /** @domName IDBDatabase.createObjectStore */
-  IDBObjectStore createObjectStore(String name, [options]) {
+  IDBObjectStore createObjectStore(String name, [Map options]) {
     if (?options) {
       var options_1 = _convertDartToNative_Dictionary(options);
       return _createObjectStore_1(name, options_1);
@@ -9437,6 +9778,10 @@
 
   EventListenerList get versionChange => this['versionchange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBDatabaseException
 class IDBDatabaseException native "*IDBDatabaseException" {
@@ -9479,6 +9824,10 @@
   /** @domName IDBDatabaseException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBFactory
 class IDBFactory native "*IDBFactory" {
@@ -9500,6 +9849,10 @@
   /** @domName IDBFactory.webkitGetDatabaseNames */
   IDBRequest webkitGetDatabaseNames() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBIndex
 class IDBIndex native "*IDBIndex" {
@@ -9524,7 +9877,7 @@
     if (!?key_OR_range) {
       return _count_1();
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null)) {
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))) {
       return _count_2(key_OR_range);
     }
     if (?key_OR_range) {
@@ -9539,7 +9892,7 @@
 
   /** @domName IDBIndex.get */
   IDBRequest get(key) {
-    if ((key is IDBKeyRange || key == null)) {
+    if ((?key && (key is IDBKeyRange || key == null))) {
       return _get_1(key);
     }
     if (?key) {
@@ -9553,7 +9906,7 @@
 
   /** @domName IDBIndex.getKey */
   IDBRequest getKey(key) {
-    if ((key is IDBKeyRange || key == null)) {
+    if ((?key && (key is IDBKeyRange || key == null))) {
       return _getKey_1(key);
     }
     if (?key) {
@@ -9566,17 +9919,16 @@
   IDBRequest _getKey_2(key) native "getKey";
 
   /** @domName IDBIndex.openCursor */
-  IDBRequest openCursor([key_OR_range, direction]) {
+  IDBRequest openCursor([key_OR_range, String direction]) {
     if (!?key_OR_range &&
         !?direction) {
       return _openCursor_1();
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null)) &&
         !?direction) {
       return _openCursor_2(key_OR_range);
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
-        (direction is String || direction == null)) {
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))) {
       return _openCursor_3(key_OR_range, direction);
     }
     if (?key_OR_range &&
@@ -9584,8 +9936,7 @@
       var key_1 = _convertDartToNative_IDBKey(key_OR_range);
       return _openCursor_4(key_1);
     }
-    if (?key_OR_range &&
-        (direction is String || direction == null)) {
+    if (?key_OR_range) {
       var key_2 = _convertDartToNative_IDBKey(key_OR_range);
       return _openCursor_5(key_2, direction);
     }
@@ -9593,22 +9944,21 @@
   }
   IDBRequest _openCursor_1() native "openCursor";
   IDBRequest _openCursor_2(IDBKeyRange range) native "openCursor";
-  IDBRequest _openCursor_3(IDBKeyRange range, String direction) native "openCursor";
+  IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor";
   IDBRequest _openCursor_4(key) native "openCursor";
-  IDBRequest _openCursor_5(key, String direction) native "openCursor";
+  IDBRequest _openCursor_5(key, direction) native "openCursor";
 
   /** @domName IDBIndex.openKeyCursor */
-  IDBRequest openKeyCursor([key_OR_range, direction]) {
+  IDBRequest openKeyCursor([key_OR_range, String direction]) {
     if (!?key_OR_range &&
         !?direction) {
       return _openKeyCursor_1();
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null)) &&
         !?direction) {
       return _openKeyCursor_2(key_OR_range);
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
-        (direction is String || direction == null)) {
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))) {
       return _openKeyCursor_3(key_OR_range, direction);
     }
     if (?key_OR_range &&
@@ -9616,8 +9966,7 @@
       var key_1 = _convertDartToNative_IDBKey(key_OR_range);
       return _openKeyCursor_4(key_1);
     }
-    if (?key_OR_range &&
-        (direction is String || direction == null)) {
+    if (?key_OR_range) {
       var key_2 = _convertDartToNative_IDBKey(key_OR_range);
       return _openKeyCursor_5(key_2, direction);
     }
@@ -9625,10 +9974,14 @@
   }
   IDBRequest _openKeyCursor_1() native "openKeyCursor";
   IDBRequest _openKeyCursor_2(IDBKeyRange range) native "openKeyCursor";
-  IDBRequest _openKeyCursor_3(IDBKeyRange range, String direction) native "openKeyCursor";
+  IDBRequest _openKeyCursor_3(IDBKeyRange range, direction) native "openKeyCursor";
   IDBRequest _openKeyCursor_4(key) native "openKeyCursor";
-  IDBRequest _openKeyCursor_5(key, String direction) native "openKeyCursor";
+  IDBRequest _openKeyCursor_5(key, direction) native "openKeyCursor";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBKey
 class IDBKey native "*IDBKey" {
@@ -9637,6 +9990,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class IDBKeyRange native "*IDBKeyRange" {
   /**
    * @domName IDBKeyRange.only
@@ -9680,7 +10034,7 @@
   final bool upperOpen;
 
   /** @domName IDBKeyRange.bound_ */
-  static IDBKeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [lowerOpen, upperOpen]) {
+  static IDBKeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
     if (?upperOpen) {
       var lower_1 = _convertDartToNative_IDBKey(lower);
       var upper_2 = _convertDartToNative_IDBKey(upper);
@@ -9695,12 +10049,12 @@
     var upper_6 = _convertDartToNative_IDBKey(upper);
     return _bound__3(lower_5, upper_6);
   }
-  IDBKeyRange _bound__1(lower, upper, bool lowerOpen, bool upperOpen) native "bound";
-  IDBKeyRange _bound__2(lower, upper, bool lowerOpen) native "bound";
+  IDBKeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native "bound";
+  IDBKeyRange _bound__2(lower, upper, lowerOpen) native "bound";
   IDBKeyRange _bound__3(lower, upper) native "bound";
 
   /** @domName IDBKeyRange.lowerBound_ */
-  static IDBKeyRange lowerBound_(/*IDBKey*/ bound, [open]) {
+  static IDBKeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
     if (?open) {
       var bound_1 = _convertDartToNative_IDBKey(bound);
       return _lowerBound__1(bound_1, open);
@@ -9708,7 +10062,7 @@
     var bound_2 = _convertDartToNative_IDBKey(bound);
     return _lowerBound__2(bound_2);
   }
-  IDBKeyRange _lowerBound__1(bound, bool open) native "lowerBound";
+  IDBKeyRange _lowerBound__1(bound, open) native "lowerBound";
   IDBKeyRange _lowerBound__2(bound) native "lowerBound";
 
   /** @domName IDBKeyRange.only_ */
@@ -9719,7 +10073,7 @@
   IDBKeyRange _only__1(value) native "only";
 
   /** @domName IDBKeyRange.upperBound_ */
-  static IDBKeyRange upperBound_(/*IDBKey*/ bound, [open]) {
+  static IDBKeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
     if (?open) {
       var bound_1 = _convertDartToNative_IDBKey(bound);
       return _upperBound__1(bound_1, open);
@@ -9727,10 +10081,14 @@
     var bound_2 = _convertDartToNative_IDBKey(bound);
     return _upperBound__2(bound_2);
   }
-  IDBKeyRange _upperBound__1(bound, bool open) native "upperBound";
+  IDBKeyRange _upperBound__1(bound, open) native "upperBound";
   IDBKeyRange _upperBound__2(bound) native "upperBound";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBObjectStore
 class IDBObjectStore native "*IDBObjectStore" {
@@ -9751,7 +10109,7 @@
   final IDBTransaction transaction;
 
   /** @domName IDBObjectStore.add */
-  IDBRequest add(/*any*/ value, [key]) {
+  IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) {
     if (?key) {
       var value_1 = _convertDartToNative_SerializedScriptValue(value);
       var key_2 = _convertDartToNative_IDBKey(key);
@@ -9771,7 +10129,7 @@
     if (!?key_OR_range) {
       return _count_1();
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null)) {
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))) {
       return _count_2(key_OR_range);
     }
     if (?key_OR_range) {
@@ -9785,24 +10143,22 @@
   IDBRequest _count_3(key) native "count";
 
   /** @domName IDBObjectStore.createIndex */
-  IDBIndex createIndex(String name, keyPath, [options]) {
-    if ((keyPath is List<String> || keyPath == null) &&
+  IDBIndex createIndex(String name, keyPath, [Map options]) {
+    if ((?keyPath && (keyPath is List<String> || keyPath == null)) &&
         !?options) {
       List keyPath_1 = _convertDartToNative_StringArray(keyPath);
       return _createIndex_1(name, keyPath_1);
     }
-    if ((keyPath is List<String> || keyPath == null) &&
-        (options is Map || options == null)) {
+    if ((?keyPath && (keyPath is List<String> || keyPath == null))) {
       List keyPath_2 = _convertDartToNative_StringArray(keyPath);
       var options_3 = _convertDartToNative_Dictionary(options);
       return _createIndex_2(name, keyPath_2, options_3);
     }
-    if ((keyPath is String || keyPath == null) &&
+    if ((?keyPath && (keyPath is String || keyPath == null)) &&
         !?options) {
       return _createIndex_3(name, keyPath);
     }
-    if ((keyPath is String || keyPath == null) &&
-        (options is Map || options == null)) {
+    if ((?keyPath && (keyPath is String || keyPath == null))) {
       var options_4 = _convertDartToNative_Dictionary(options);
       return _createIndex_4(name, keyPath, options_4);
     }
@@ -9815,7 +10171,7 @@
 
   /** @domName IDBObjectStore.delete */
   IDBRequest delete(key_OR_keyRange) {
-    if ((key_OR_keyRange is IDBKeyRange || key_OR_keyRange == null)) {
+    if ((?key_OR_keyRange && (key_OR_keyRange is IDBKeyRange || key_OR_keyRange == null))) {
       return _delete_1(key_OR_keyRange);
     }
     if (?key_OR_keyRange) {
@@ -9832,7 +10188,7 @@
 
   /** @domName IDBObjectStore.getObject */
   IDBRequest getObject(key) {
-    if ((key is IDBKeyRange || key == null)) {
+    if ((?key && (key is IDBKeyRange || key == null))) {
       return _getObject_1(key);
     }
     if (?key) {
@@ -9848,17 +10204,16 @@
   IDBIndex index(String name) native;
 
   /** @domName IDBObjectStore.openCursor */
-  IDBRequest openCursor([key_OR_range, direction]) {
+  IDBRequest openCursor([key_OR_range, String direction]) {
     if (!?key_OR_range &&
         !?direction) {
       return _openCursor_1();
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null)) &&
         !?direction) {
       return _openCursor_2(key_OR_range);
     }
-    if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
-        (direction is String || direction == null)) {
+    if ((?key_OR_range && (key_OR_range is IDBKeyRange || key_OR_range == null))) {
       return _openCursor_3(key_OR_range, direction);
     }
     if (?key_OR_range &&
@@ -9866,8 +10221,7 @@
       var key_1 = _convertDartToNative_IDBKey(key_OR_range);
       return _openCursor_4(key_1);
     }
-    if (?key_OR_range &&
-        (direction is String || direction == null)) {
+    if (?key_OR_range) {
       var key_2 = _convertDartToNative_IDBKey(key_OR_range);
       return _openCursor_5(key_2, direction);
     }
@@ -9875,12 +10229,12 @@
   }
   IDBRequest _openCursor_1() native "openCursor";
   IDBRequest _openCursor_2(IDBKeyRange range) native "openCursor";
-  IDBRequest _openCursor_3(IDBKeyRange range, String direction) native "openCursor";
+  IDBRequest _openCursor_3(IDBKeyRange range, direction) native "openCursor";
   IDBRequest _openCursor_4(key) native "openCursor";
-  IDBRequest _openCursor_5(key, String direction) native "openCursor";
+  IDBRequest _openCursor_5(key, direction) native "openCursor";
 
   /** @domName IDBObjectStore.put */
-  IDBRequest put(/*any*/ value, [key]) {
+  IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) {
     if (?key) {
       var value_1 = _convertDartToNative_SerializedScriptValue(value);
       var key_2 = _convertDartToNative_IDBKey(key);
@@ -9892,6 +10246,10 @@
   IDBRequest _put_1(value, key) native "put";
   IDBRequest _put_2(value) native "put";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBOpenDBRequest
 class IDBOpenDBRequest extends IDBRequest implements EventTarget native "*IDBOpenDBRequest" {
@@ -9910,6 +10268,10 @@
 
   EventListenerList get upgradeNeeded => this['upgradeneeded'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBRequest
 class IDBRequest extends EventTarget native "*IDBRequest" {
@@ -9959,6 +10321,10 @@
 
   EventListenerList get success => this['success'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBTransaction
 class IDBTransaction extends EventTarget native "*IDBTransaction" {
@@ -10009,6 +10375,10 @@
 
   EventListenerList get error => this['error'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBVersionChangeEvent
 class IDBUpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" {
@@ -10019,6 +10389,10 @@
   /** @domName IDBVersionChangeEvent.oldVersion */
   final int oldVersion;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBVersionChangeEvent
 class IDBVersionChangeEvent extends Event native "*IDBVersionChangeEvent" {
@@ -10026,6 +10400,10 @@
   /** @domName IDBVersionChangeEvent.version */
   final String version;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IDBVersionChangeRequest
 class IDBVersionChangeRequest extends IDBRequest implements EventTarget native "*IDBVersionChangeRequest" {
@@ -10042,6 +10420,10 @@
 
   EventListenerList get blocked => this['blocked'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLIFrameElement
 class IFrameElement extends Element implements Element native "*HTMLIFrameElement" {
@@ -10053,7 +10435,7 @@
 
   /** @domName HTMLIFrameElement.contentWindow */
   Window get contentWindow => _convertNativeToDart_Window(this._contentWindow);
-  Window get _contentWindow => JS("Window", "#.contentWindow", this);
+  dynamic get _contentWindow => JS("dynamic", "#.contentWindow", this);
 
   /** @domName HTMLIFrameElement.frameBorder */
   String frameBorder;
@@ -10096,6 +10478,10 @@
 
 
 typedef void IceCallback(IceCandidate candidate, bool moreToFollow, PeerConnection00 source);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName IceCandidate
 class IceCandidate native "*IceCandidate" {
@@ -10108,6 +10494,10 @@
   /** @domName IceCandidate.toSdp */
   String toSdp() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ImageData
 class ImageData native "*ImageData" {
@@ -10121,6 +10511,10 @@
   /** @domName ImageData.width */
   final int width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLImageElement
 class ImageElement extends Element implements Element native "*HTMLImageElement" {
@@ -10195,6 +10589,10 @@
   /** @domName HTMLImageElement.y */
   final int y;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLInputElement
 class InputElement extends Element implements Element native "*HTMLInputElement" {
@@ -10389,6 +10787,10 @@
 
   EventListenerList get speechChange => this['webkitSpeechChange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Int16Array
 class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int16Array" {
@@ -10419,7 +10821,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -10494,6 +10896,10 @@
   /** @domName Int16Array.subarray */
   Int16Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Int32Array
 class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int32Array" {
@@ -10524,7 +10930,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -10599,6 +11005,10 @@
   /** @domName Int32Array.subarray */
   Int32Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Int8Array
 class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int8Array" {
@@ -10629,7 +11039,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -10704,6 +11114,10 @@
   /** @domName Int8Array.subarray */
   Int8Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName JavaScriptCallFrame
 class JavaScriptCallFrame native "*JavaScriptCallFrame" {
@@ -10751,6 +11165,10 @@
   /** @domName JavaScriptCallFrame.scopeType */
   int scopeType(int scopeIndex) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName KeyboardEvent
 class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
@@ -10779,6 +11197,10 @@
   /** @domName KeyboardEvent.initKeyboardEvent */
   void initKeyboardEvent(String type, bool canBubble, bool cancelable, LocalWindow view, String keyIdentifier, int keyLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLKeygenElement
 class KeygenElement extends Element implements Element native "*HTMLKeygenElement" {
@@ -10824,6 +11246,10 @@
   /** @domName HTMLKeygenElement.setCustomValidity */
   void setCustomValidity(String error) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLLIElement
 class LIElement extends Element implements Element native "*HTMLLIElement" {
@@ -10836,6 +11262,10 @@
   /** @domName HTMLLIElement.value */
   int value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLLabelElement
 class LabelElement extends Element implements Element native "*HTMLLabelElement" {
@@ -10851,6 +11281,10 @@
   /** @domName HTMLLabelElement.htmlFor */
   String htmlFor;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLLegendElement
 class LegendElement extends Element implements Element native "*HTMLLegendElement" {
@@ -10863,6 +11297,10 @@
   /** @domName HTMLLegendElement.form */
   final FormElement form;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLLinkElement
 class LinkElement extends Element implements Element native "*HTMLLinkElement" {
@@ -10902,6 +11340,10 @@
   /** @domName HTMLLinkElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName History
 class LocalHistory implements History native "*History" {
@@ -10927,6 +11369,10 @@
   /** @domName History.replaceState */
   void replaceState(Object data, String title, [String url]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Location
 class LocalLocation implements Location native "*Location" {
@@ -10973,6 +11419,10 @@
   /** @domName Location.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName LocalMediaStream
 class LocalMediaStream extends MediaStream implements EventTarget native "*LocalMediaStream" {
@@ -10984,6 +11434,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class LocalWindow extends EventTarget implements Window native "@*DOMWindow" {
 
   Document get document => JS('Document', '#.document', this);
@@ -11028,7 +11479,7 @@
     }
   }
 
-  var _location_wrapper;  // Cached wrapped Location object.
+  _LocationWrapper _location_wrapper;  // Cached wrapped Location object.
 
   // Native getter and setter to access raw Location object.
   Location get _location => JS('Location', '#.location', this);
@@ -11139,9 +11590,6 @@
   /** @domName Window.applicationCache */
   final DOMApplicationCache applicationCache;
 
-  /** @domName Window.clientInformation */
-  final Navigator clientInformation;
-
   /** @domName Window.closed */
   final bool closed;
 
@@ -11192,7 +11640,7 @@
 
   /** @domName Window.opener */
   Window get opener => _convertNativeToDart_Window(this._opener);
-  Window get _opener => JS("Window", "#.opener", this);
+  dynamic get _opener => JS("dynamic", "#.opener", this);
 
   /** @domName Window.outerHeight */
   final int outerHeight;
@@ -11211,7 +11659,7 @@
 
   /** @domName Window.parent */
   Window get parent => _convertNativeToDart_Window(this._parent);
-  Window get _parent => JS("Window", "#.parent", this);
+  dynamic get _parent => JS("dynamic", "#.parent", this);
 
   /** @domName Window.performance */
   final Performance performance;
@@ -11245,7 +11693,7 @@
 
   /** @domName Window.self */
   Window get self => _convertNativeToDart_Window(this._self);
-  Window get _self => JS("Window", "#.self", this);
+  dynamic get _self => JS("dynamic", "#.self", this);
 
   /** @domName Window.sessionStorage */
   final Storage sessionStorage;
@@ -11264,7 +11712,7 @@
 
   /** @domName Window.top */
   Window get top => _convertNativeToDart_Window(this._top);
-  Window get _top => JS("Window", "#.top", this);
+  dynamic get _top => JS("dynamic", "#.top", this);
 
   /** @domName DOMWindow.webkitIndexedDB */
   final IDBFactory webkitIndexedDB;
@@ -11277,7 +11725,7 @@
 
   /** @domName Window.window */
   Window get window => _convertNativeToDart_Window(this._window);
-  Window get _window => JS("Window", "#.window", this);
+  dynamic get _window => JS("dynamic", "#.window", this);
 
   /** @domName Window.addEventListener */
   void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "addEventListener";
@@ -11340,15 +11788,14 @@
   Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
 
   /** @domName Window.postMessage */
-  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [messagePorts]) {
+  void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
     if (?message &&
         !?messagePorts) {
       var message_1 = _convertDartToNative_SerializedScriptValue(message);
       _postMessage_1(message_1, targetOrigin);
       return;
     }
-    if (?message &&
-        (messagePorts is List || messagePorts == null)) {
+    if (?message) {
       var message_2 = _convertDartToNative_SerializedScriptValue(message);
       _postMessage_2(message_2, targetOrigin, messagePorts);
       return;
@@ -11361,9 +11808,6 @@
   /** @domName Window.print */
   void print() native;
 
-  /** @domName Window.prompt */
-  String prompt(String message, String defaultValue) native;
-
   /** @domName Window.releaseEvents */
   void releaseEvents() native;
 
@@ -11560,6 +12004,10 @@
 
   EventListenerList get transitionEnd => this['webkitTransitionEnd'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMapElement
 class MapElement extends Element implements Element native "*HTMLMapElement" {
@@ -11572,6 +12020,10 @@
   /** @domName HTMLMapElement.name */
   String name;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMarqueeElement
 class MarqueeElement extends Element implements Element native "*HTMLMarqueeElement" {
@@ -11615,6 +12067,10 @@
   /** @domName HTMLMarqueeElement.stop */
   void stop() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaController
 class MediaController extends EventTarget native "*MediaController" {
@@ -11666,6 +12122,10 @@
   /** @domName MediaController.removeEventListener */
   void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "removeEventListener";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMediaElement
 class MediaElement extends Element implements Element native "*HTMLMediaElement" {
@@ -11868,6 +12328,10 @@
 
   EventListenerList get needKey => this['webkitneedkey'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaElementAudioSourceNode
 class MediaElementAudioSourceNode extends AudioSourceNode native "*MediaElementAudioSourceNode" {
@@ -11875,6 +12339,10 @@
   /** @domName MediaElementAudioSourceNode.mediaElement */
   final MediaElement mediaElement;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaError
 class MediaError native "*MediaError" {
@@ -11892,6 +12360,10 @@
   /** @domName MediaError.code */
   final int code;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaKeyError
 class MediaKeyError native "*MediaKeyError" {
@@ -11911,6 +12383,10 @@
   /** @domName MediaKeyError.code */
   final int code;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaKeyEvent
 class MediaKeyEvent extends Event native "*MediaKeyEvent" {
@@ -11936,6 +12412,10 @@
   /** @domName MediaKeyEvent.systemCode */
   final int systemCode;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaList
 class MediaList native "*MediaList" {
@@ -11955,6 +12435,10 @@
   /** @domName MediaList.item */
   String item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaQueryList
 class MediaQueryList native "*MediaQueryList" {
@@ -11971,12 +12455,21 @@
   /** @domName MediaQueryList.removeListener */
   void removeListener(MediaQueryListListener listener) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
 /// @domName MediaQueryListListener
 abstract class MediaQueryListListener {
 
   /** @domName MediaQueryListListener.queryChanged */
   void queryChanged(MediaQueryList list);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaSource
 class MediaSource extends EventTarget native "*MediaSource" {
@@ -12013,6 +12506,10 @@
   /** @domName MediaSource.removeSourceBuffer */
   void removeSourceBuffer(SourceBuffer buffer) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStream
 class MediaStream extends EventTarget native "*MediaStream" {
@@ -12056,6 +12553,10 @@
 
   EventListenerList get ended => this['ended'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamAudioSourceNode
 class MediaStreamAudioSourceNode extends AudioSourceNode native "*MediaStreamAudioSourceNode" {
@@ -12063,6 +12564,10 @@
   /** @domName MediaStreamAudioSourceNode.mediaStream */
   final MediaStream mediaStream;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamEvent
 class MediaStreamEvent extends Event native "*MediaStreamEvent" {
@@ -12070,6 +12575,10 @@
   /** @domName MediaStreamEvent.stream */
   final MediaStream stream;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamTrack
 class MediaStreamTrack extends EventTarget native "*MediaStreamTrack" {
@@ -12117,6 +12626,10 @@
 
   EventListenerList get unmute => this['unmute'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamTrackEvent
 class MediaStreamTrackEvent extends Event native "*MediaStreamTrackEvent" {
@@ -12124,6 +12637,10 @@
   /** @domName MediaStreamTrackEvent.track */
   final MediaStreamTrack track;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamTrackList
 class MediaStreamTrackList extends EventTarget native "*MediaStreamTrackList" {
@@ -12163,6 +12680,10 @@
 
   EventListenerList get removeTrack => this['removetrack'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MemoryInfo
 class MemoryInfo native "*MemoryInfo" {
@@ -12176,6 +12697,10 @@
   /** @domName MemoryInfo.usedJSHeapSize */
   final int usedJSHeapSize;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMenuElement
 class MenuElement extends Element implements Element native "*HTMLMenuElement" {
@@ -12185,6 +12710,10 @@
   /** @domName HTMLMenuElement.compact */
   bool compact;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MessageChannel
 class MessageChannel native "*MessageChannel" {
@@ -12197,6 +12726,10 @@
   /** @domName MessageChannel.port2 */
   final MessagePort port2;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MessageEvent
 class MessageEvent extends Event native "*MessageEvent" {
@@ -12216,7 +12749,7 @@
 
   /** @domName MessageEvent.source */
   Window get source => _convertNativeToDart_Window(this._source);
-  Window get _source => JS("Window", "#.source", this);
+  dynamic get _source => JS("dynamic", "#.source", this);
 
   /** @domName MessageEvent.initMessageEvent */
   void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, LocalWindow sourceArg, List messagePorts) native;
@@ -12224,6 +12757,10 @@
   /** @domName MessageEvent.webkitInitMessageEvent */
   void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, LocalWindow sourceArg, List transferables) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MessagePort
 class MessagePort extends EventTarget native "*MessagePort" {
@@ -12244,7 +12781,7 @@
   bool $dom_dispatchEvent(Event evt) native "dispatchEvent";
 
   /** @domName MessagePort.postMessage */
-  void postMessage(/*any*/ message, [messagePorts]) {
+  void postMessage(/*any*/ message, [List messagePorts]) {
     if (?messagePorts) {
       var message_1 = _convertDartToNative_SerializedScriptValue(message);
       _postMessage_1(message_1, messagePorts);
@@ -12269,6 +12806,10 @@
 
   EventListenerList get message => this['message'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMetaElement
 class MetaElement extends Element implements Element native "*HTMLMetaElement" {
@@ -12285,6 +12826,10 @@
   /** @domName HTMLMetaElement.scheme */
   String scheme;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Metadata
 class Metadata native "*Metadata" {
@@ -12303,6 +12848,10 @@
 
 
 typedef void MetadataCallback(Metadata metadata);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLMeterElement
 class MeterElement extends Element implements Element native "*HTMLMeterElement" {
@@ -12330,6 +12879,10 @@
   /** @domName HTMLMeterElement.value */
   num value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLModElement
 class ModElement extends Element implements Element native "*HTMLModElement" {
@@ -12344,6 +12897,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class MouseEvent extends UIEvent native "*MouseEvent" {
   factory MouseEvent(String type, Window view, int detail, int screenX,
       int screenY, int clientX, int clientY, int button, [bool canBubble = true,
@@ -12382,7 +12936,7 @@
 
   /** @domName MouseEvent.relatedTarget */
   EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._relatedTarget);
-  EventTarget get _relatedTarget => JS("EventTarget", "#.relatedTarget", this);
+  dynamic get _relatedTarget => JS("dynamic", "#.relatedTarget", this);
 
   /** @domName MouseEvent.screenX */
   final int screenX;
@@ -12410,11 +12964,11 @@
 
   /** @domName MouseEvent.initMouseEvent */
   void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, LocalWindow view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
-    EventTarget relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget);
+    var relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget);
     _$dom_initMouseEvent_1(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
     return;
   }
-  void _$dom_initMouseEvent_1(type, canBubble, cancelable, LocalWindow view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, EventTarget relatedTarget) native "initMouseEvent";
+  void _$dom_initMouseEvent_1(type, canBubble, cancelable, LocalWindow view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native "initMouseEvent";
 
 
   int get offsetX {
@@ -12453,6 +13007,10 @@
 
 
 typedef void MutationCallback(List<MutationRecord> mutations, MutationObserver observer);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MutationEvent
 class MutationEvent extends Event native "*MutationEvent" {
@@ -12485,6 +13043,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class MutationObserver native "*MutationObserver" {
 
   factory MutationObserver(MutationCallback callback) => _MutationObserverFactoryProvider.createMutationObserver(callback);
@@ -12564,6 +13123,10 @@
   // Call native function with no conversions.
   void _call(target, options) native 'observe';
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MutationRecord
 class MutationRecord native "*MutationRecord" {
@@ -12595,6 +13158,10 @@
   /** @domName MutationRecord.type */
   final String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName NamedNodeMap
 class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*NamedNodeMap" {
@@ -12616,7 +13183,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -12706,6 +13273,10 @@
   /** @domName NamedNodeMap.setNamedItemNS */
   Node setNamedItemNS(Node node) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Navigator
 class Navigator native "*Navigator" {
@@ -12768,7 +13339,7 @@
   List<Gamepad> webkitGetGamepads() native;
 
   /** @domName Navigator.webkitGetUserMedia */
-  void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [errorCallback]) {
+  void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [NavigatorUserMediaErrorCallback errorCallback]) {
     if (?errorCallback) {
       var options_1 = _convertDartToNative_Dictionary(options);
       _webkitGetUserMedia_1(options_1, successCallback, errorCallback);
@@ -12781,6 +13352,10 @@
   void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback) native "webkitGetUserMedia";
   void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successCallback) native "webkitGetUserMedia";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName NavigatorUserMediaError
 class NavigatorUserMediaError native "*NavigatorUserMediaError" {
@@ -12810,6 +13385,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.
 
+
 /**
  * Lazy implementation of the child nodes of an element that does not request
  * the actual child nodes of an element until strictly necessary greatly
@@ -13008,7 +13584,7 @@
   Node get nextNode => JS("Node", "#.nextSibling", this);
 
   /** @domName Node.nodeType */
-  int get $dom_nodeType => JS("int", "#.nodeType", this);
+  final int nodeType;
 
   /** @domName Node.ownerDocument */
   Document get document => JS("Document", "#.ownerDocument", this);
@@ -13058,6 +13634,10 @@
   Node $dom_replaceChild(Node newChild, Node oldChild) native "replaceChild";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName NodeFilter
 class NodeFilter native "*NodeFilter" {
@@ -13097,6 +13677,10 @@
   /** @domName NodeFilter.acceptNode */
   int acceptNode(Node n) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName NodeIterator
 class NodeIterator native "*NodeIterator" {
@@ -13132,8 +13716,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 // TODO(nweiz): when all implementations we target have the same name for the
-// coreimpl implementation of List<E>, extend that rather than wrapping.
+// implementation of List<E>, extend that rather than wrapping.
 class _ListWrapper<E> implements List<E> {
   List _list;
 
@@ -13223,7 +13808,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -13313,6 +13898,10 @@
   Node _item(int index) native "item";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Notation
 class Notation extends Node native "*Notation" {
@@ -13323,6 +13912,10 @@
   /** @domName Notation.systemId */
   final String systemId;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Notification
 class Notification extends EventTarget native "*Notification" {
@@ -13387,6 +13980,10 @@
 
   EventListenerList get show => this['show'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName NotificationCenter
 class NotificationCenter native "*NotificationCenter" {
@@ -13411,20 +14008,36 @@
 
 
 typedef void NotificationPermissionCallback(String permission);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OESElementIndexUint
 class OESElementIndexUint native "*OESElementIndexUint" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OESStandardDerivatives
 class OESStandardDerivatives native "*OESStandardDerivatives" {
 
   static const int FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OESTextureFloat
 class OESTextureFloat native "*OESTextureFloat" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OESVertexArrayObject
 class OESVertexArrayObject native "*OESVertexArrayObject" {
@@ -13443,6 +14056,10 @@
   /** @domName OESVertexArrayObject.isVertexArrayOES */
   bool isVertexArrayOES(WebGLVertexArrayObjectOES arrayObject) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLOListElement
 class OListElement extends Element implements Element native "*HTMLOListElement" {
@@ -13461,6 +14078,10 @@
   /** @domName HTMLOListElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLObjectElement
 class ObjectElement extends Element implements Element native "*HTMLObjectElement" {
@@ -13533,6 +14154,10 @@
   /** @domName HTMLObjectElement.setCustomValidity */
   void setCustomValidity(String error) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OfflineAudioCompletionEvent
 class OfflineAudioCompletionEvent extends Event native "*OfflineAudioCompletionEvent" {
@@ -13540,6 +14165,10 @@
   /** @domName OfflineAudioCompletionEvent.renderedBuffer */
   final AudioBuffer renderedBuffer;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLOptGroupElement
 class OptGroupElement extends Element implements Element native "*HTMLOptGroupElement" {
@@ -13552,6 +14181,10 @@
   /** @domName HTMLOptGroupElement.label */
   String label;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLOptionElement
 class OptionElement extends Element implements Element native "*HTMLOptionElement" {
@@ -13593,6 +14226,10 @@
   /** @domName HTMLOptionElement.value */
   String value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OscillatorNode
 class OscillatorNode extends AudioSourceNode native "*OscillatorNode" {
@@ -13636,6 +14273,10 @@
   /** @domName OscillatorNode.stop */
   void stop(num when) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLOutputElement
 class OutputElement extends Element implements Element native "*HTMLOutputElement" {
@@ -13678,6 +14319,10 @@
   /** @domName HTMLOutputElement.setCustomValidity */
   void setCustomValidity(String error) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName OverflowEvent
 class OverflowEvent extends Event native "*OverflowEvent" {
@@ -13697,6 +14342,10 @@
   /** @domName OverflowEvent.verticalOverflow */
   final bool verticalOverflow;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PagePopupController
 class PagePopupController native "*PagePopupController" {
@@ -13707,6 +14356,10 @@
   /** @domName PagePopupController.setValueAndClosePopup */
   void setValueAndClosePopup(int numberValue, String stringValue) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PageTransitionEvent
 class PageTransitionEvent extends Event native "*PageTransitionEvent" {
@@ -13714,6 +14367,10 @@
   /** @domName PageTransitionEvent.persisted */
   final bool persisted;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PannerNode
 class PannerNode extends AudioNode native "*PannerNode" {
@@ -13769,6 +14426,10 @@
   /** @domName PannerNode.setVelocity */
   void setVelocity(num x, num y, num z) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLParagraphElement
 class ParagraphElement extends Element implements Element native "*HTMLParagraphElement" {
@@ -13778,6 +14439,10 @@
   /** @domName HTMLParagraphElement.align */
   String align;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLParamElement
 class ParamElement extends Element implements Element native "*HTMLParamElement" {
@@ -13796,6 +14461,10 @@
   /** @domName HTMLParamElement.valueType */
   String valueType;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PeerConnection00
 class PeerConnection00 extends EventTarget native "*PeerConnection00" {
@@ -13858,7 +14527,7 @@
   void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "addEventListener";
 
   /** @domName PeerConnection00.addStream */
-  void addStream(MediaStream stream, [mediaStreamHints]) {
+  void addStream(MediaStream stream, [Map mediaStreamHints]) {
     if (?mediaStreamHints) {
       var mediaStreamHints_1 = _convertDartToNative_Dictionary(mediaStreamHints);
       _addStream_1(stream, mediaStreamHints_1);
@@ -13874,7 +14543,7 @@
   void close() native;
 
   /** @domName PeerConnection00.createAnswer */
-  SessionDescription createAnswer(String offer, [mediaHints]) {
+  SessionDescription createAnswer(String offer, [Map mediaHints]) {
     if (?mediaHints) {
       var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints);
       return _createAnswer_1(offer, mediaHints_1);
@@ -13885,7 +14554,7 @@
   SessionDescription _createAnswer_2(offer) native "createAnswer";
 
   /** @domName PeerConnection00.createOffer */
-  SessionDescription createOffer([mediaHints]) {
+  SessionDescription createOffer([Map mediaHints]) {
     if (?mediaHints) {
       var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints);
       return _createOffer_1(mediaHints_1);
@@ -13914,7 +14583,7 @@
   void setRemoteDescription(int action, SessionDescription desc) native;
 
   /** @domName PeerConnection00.startIce */
-  void startIce([iceOptions]) {
+  void startIce([Map iceOptions]) {
     if (?iceOptions) {
       var iceOptions_1 = _convertDartToNative_Dictionary(iceOptions);
       _startIce_1(iceOptions_1);
@@ -13940,6 +14609,10 @@
 
   EventListenerList get stateChange => this['statechange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Performance
 class Performance extends EventTarget native "*Performance" {
@@ -13956,6 +14629,10 @@
   /** @domName Performance.now */
   num now() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PerformanceNavigation
 class PerformanceNavigation native "*PerformanceNavigation" {
@@ -13974,6 +14651,10 @@
   /** @domName PerformanceNavigation.type */
   final int type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PerformanceTiming
 class PerformanceTiming native "*PerformanceTiming" {
@@ -14047,6 +14728,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Point native "*WebKitPoint" {
   factory Point(num x, num y) => _PointFactoryProvider.createPoint(x, y);
 
@@ -14057,6 +14739,10 @@
   num y;
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PopStateEvent
 class PopStateEvent extends Event native "*PopStateEvent" {
@@ -14073,6 +14759,10 @@
 
 
 typedef void PositionCallback(Geoposition position);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName PositionError
 class PositionError native "*PositionError" {
@@ -14097,6 +14787,10 @@
 
 
 typedef void PositionErrorCallback(PositionError error);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLPreElement
 class PreElement extends Element implements Element native "*HTMLPreElement" {
@@ -14109,6 +14803,10 @@
   /** @domName HTMLPreElement.wrap */
   bool wrap;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ProcessingInstruction
 class ProcessingInstruction extends Node native "*ProcessingInstruction" {
@@ -14122,6 +14820,10 @@
   /** @domName ProcessingInstruction.target */
   final String target;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLProgressElement
 class ProgressElement extends Element implements Element native "*HTMLProgressElement" {
@@ -14140,6 +14842,10 @@
   /** @domName HTMLProgressElement.value */
   num value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ProgressEvent
 class ProgressEvent extends Event native "*ProgressEvent" {
@@ -14153,6 +14859,10 @@
   /** @domName ProgressEvent.total */
   final int total;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLQuoteElement
 class QuoteElement extends Element implements Element native "*HTMLQuoteElement" {
@@ -14160,6 +14870,10 @@
   /** @domName HTMLQuoteElement.cite */
   String cite;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RGBColor
 class RGBColor native "*RGBColor" {
@@ -14173,6 +14887,10 @@
   /** @domName RGBColor.red */
   final CSSPrimitiveValue red;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCDataChannel
 class RTCDataChannel extends EventTarget native "*RTCDataChannel" {
@@ -14225,6 +14943,10 @@
 
   EventListenerList get open => this['open'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCDataChannelEvent
 class RTCDataChannelEvent extends Event native "*RTCDataChannelEvent" {
@@ -14240,6 +14962,10 @@
 
 
 typedef void RTCErrorCallback(String errorInformation);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCIceCandidate
 class RTCIceCandidate native "*RTCIceCandidate" {
@@ -14255,6 +14981,10 @@
   /** @domName RTCIceCandidate.sdpMid */
   final String sdpMid;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCIceCandidateEvent
 class RTCIceCandidateEvent extends Event native "*RTCIceCandidateEvent" {
@@ -14262,6 +14992,10 @@
   /** @domName RTCIceCandidateEvent.candidate */
   final RTCIceCandidate candidate;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCPeerConnection
 class RTCPeerConnection extends EventTarget native "*RTCPeerConnection" {
@@ -14304,7 +15038,7 @@
   void addIceCandidate(RTCIceCandidate candidate) native;
 
   /** @domName RTCPeerConnection.addStream */
-  void addStream(MediaStream stream, [mediaConstraints]) {
+  void addStream(MediaStream stream, [Map mediaConstraints]) {
     if (?mediaConstraints) {
       var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
       _addStream_1(stream, mediaConstraints_1);
@@ -14320,7 +15054,7 @@
   void close() native;
 
   /** @domName RTCPeerConnection.createAnswer */
-  void createAnswer(RTCSessionDescriptionCallback successCallback, [failureCallback, mediaConstraints]) {
+  void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallback failureCallback, Map mediaConstraints]) {
     if (?mediaConstraints) {
       var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
       _createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
@@ -14333,7 +15067,7 @@
   void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCallback failureCallback) native "createAnswer";
 
   /** @domName RTCPeerConnection.createDataChannel */
-  RTCDataChannel createDataChannel(String label, [options]) {
+  RTCDataChannel createDataChannel(String label, [Map options]) {
     if (?options) {
       var options_1 = _convertDartToNative_Dictionary(options);
       return _createDataChannel_1(label, options_1);
@@ -14344,7 +15078,7 @@
   RTCDataChannel _createDataChannel_2(label) native "createDataChannel";
 
   /** @domName RTCPeerConnection.createOffer */
-  void createOffer(RTCSessionDescriptionCallback successCallback, [failureCallback, mediaConstraints]) {
+  void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallback failureCallback, Map mediaConstraints]) {
     if (?mediaConstraints) {
       var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
       _createOffer_1(successCallback, failureCallback, mediaConstraints_1);
@@ -14375,7 +15109,7 @@
   void setRemoteDescription(RTCSessionDescription description, [VoidCallback successCallback, RTCErrorCallback failureCallback]) native;
 
   /** @domName RTCPeerConnection.updateIce */
-  void updateIce([configuration, mediaConstraints]) {
+  void updateIce([Map configuration, Map mediaConstraints]) {
     if (?mediaConstraints) {
       var configuration_1 = _convertDartToNative_Dictionary(configuration);
       var mediaConstraints_2 = _convertDartToNative_Dictionary(mediaConstraints);
@@ -14412,6 +15146,10 @@
 
   EventListenerList get stateChange => this['statechange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCSessionDescription
 class RTCSessionDescription native "*RTCSessionDescription" {
@@ -14440,6 +15178,10 @@
 
 
 typedef void RTCStatsCallback(RTCStatsResponse response);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCStatsElement
 class RTCStatsElement native "*RTCStatsElement" {
@@ -14450,6 +15192,10 @@
   /** @domName RTCStatsElement.stat */
   String stat(String name) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCStatsReport
 class RTCStatsReport native "*RTCStatsReport" {
@@ -14460,6 +15206,10 @@
   /** @domName RTCStatsReport.remote */
   final RTCStatsElement remote;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RTCStatsResponse
 class RTCStatsResponse native "*RTCStatsResponse" {
@@ -14467,6 +15217,10 @@
   /** @domName RTCStatsResponse.result */
   List<RTCStatsReport> result() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RadioNodeList
 class RadioNodeList extends NodeList native "*RadioNodeList" {
@@ -14474,6 +15228,10 @@
   /** @domName RadioNodeList.value */
   String value;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Range
 class Range native "*Range" {
@@ -14587,6 +15345,10 @@
   /** @domName Range.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName RangeException
 class RangeException native "*RangeException" {
@@ -14607,6 +15369,10 @@
   /** @domName RangeException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Rect
 class Rect native "*Rect" {
@@ -14631,6 +15397,10 @@
 
 
 typedef void RequestAnimationFrameCallback(num highResTime);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLError
 class SQLError native "*SQLError" {
@@ -14657,6 +15427,10 @@
   /** @domName SQLError.message */
   final String message;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLException
 class SQLException native "*SQLException" {
@@ -14683,6 +15457,10 @@
   /** @domName SQLException.message */
   final String message;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLResultSet
 class SQLResultSet native "*SQLResultSet" {
@@ -14696,6 +15474,10 @@
   /** @domName SQLResultSet.rowsAffected */
   final int rowsAffected;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLResultSetRowList
 class SQLResultSetRowList implements JavaScriptIndexingBehavior, List<Map> native "*SQLResultSetRowList" {
@@ -14717,7 +15499,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Map>(this);
+    return new FixedSizeListIterator<Map>(this);
   }
 
   // From Collection<Map>:
@@ -14808,6 +15590,10 @@
 
 
 typedef void SQLStatementErrorCallback(SQLTransaction transaction, SQLError error);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLTransaction
 class SQLTransaction native "*SQLTransaction" {
@@ -14831,6 +15617,10 @@
 
 
 typedef void SQLTransactionErrorCallback(SQLError error);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SQLTransactionSync
 class SQLTransactionSync native "*SQLTransactionSync" {
@@ -14846,5270 +15636,10 @@
 
 
 typedef void SQLTransactionSyncCallback(SQLTransactionSync transaction);
-
-/// @domName SVGAElement
-class SVGAElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGAElement" {
-
-  /** @domName SVGAElement.target */
-  final SVGAnimatedString target;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGAltGlyphDefElement
-class SVGAltGlyphDefElement extends SVGElement native "*SVGAltGlyphDefElement" {
-}
-
-/// @domName SVGAltGlyphElement
-class SVGAltGlyphElement extends SVGTextPositioningElement implements SVGURIReference native "*SVGAltGlyphElement" {
-
-  /** @domName SVGAltGlyphElement.format */
-  String format;
-
-  /** @domName SVGAltGlyphElement.glyphRef */
-  String glyphRef;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGAltGlyphItemElement
-class SVGAltGlyphItemElement extends SVGElement native "*SVGAltGlyphItemElement" {
-}
-
-/// @domName SVGAngle
-class SVGAngle native "*SVGAngle" {
-
-  static const int SVG_ANGLETYPE_DEG = 2;
-
-  static const int SVG_ANGLETYPE_GRAD = 4;
-
-  static const int SVG_ANGLETYPE_RAD = 3;
-
-  static const int SVG_ANGLETYPE_UNKNOWN = 0;
-
-  static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
-
-  /** @domName SVGAngle.unitType */
-  final int unitType;
-
-  /** @domName SVGAngle.value */
-  num value;
-
-  /** @domName SVGAngle.valueAsString */
-  String valueAsString;
-
-  /** @domName SVGAngle.valueInSpecifiedUnits */
-  num valueInSpecifiedUnits;
-
-  /** @domName SVGAngle.convertToSpecifiedUnits */
-  void convertToSpecifiedUnits(int unitType) native;
-
-  /** @domName SVGAngle.newValueSpecifiedUnits */
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
-}
-
-/// @domName SVGAnimateColorElement
-class SVGAnimateColorElement extends SVGAnimationElement native "*SVGAnimateColorElement" {
-}
-
-/// @domName SVGAnimateElement
-class SVGAnimateElement extends SVGAnimationElement native "*SVGAnimateElement" {
-}
-
-/// @domName SVGAnimateMotionElement
-class SVGAnimateMotionElement extends SVGAnimationElement native "*SVGAnimateMotionElement" {
-}
-
-/// @domName SVGAnimateTransformElement
-class SVGAnimateTransformElement extends SVGAnimationElement native "*SVGAnimateTransformElement" {
-}
-
-/// @domName SVGAnimatedAngle
-class SVGAnimatedAngle native "*SVGAnimatedAngle" {
-
-  /** @domName SVGAnimatedAngle.animVal */
-  final SVGAngle animVal;
-
-  /** @domName SVGAnimatedAngle.baseVal */
-  final SVGAngle baseVal;
-}
-
-/// @domName SVGAnimatedBoolean
-class SVGAnimatedBoolean native "*SVGAnimatedBoolean" {
-
-  /** @domName SVGAnimatedBoolean.animVal */
-  final bool animVal;
-
-  /** @domName SVGAnimatedBoolean.baseVal */
-  bool baseVal;
-}
-
-/// @domName SVGAnimatedEnumeration
-class SVGAnimatedEnumeration native "*SVGAnimatedEnumeration" {
-
-  /** @domName SVGAnimatedEnumeration.animVal */
-  final int animVal;
-
-  /** @domName SVGAnimatedEnumeration.baseVal */
-  int baseVal;
-}
-
-/// @domName SVGAnimatedInteger
-class SVGAnimatedInteger native "*SVGAnimatedInteger" {
-
-  /** @domName SVGAnimatedInteger.animVal */
-  final int animVal;
-
-  /** @domName SVGAnimatedInteger.baseVal */
-  int baseVal;
-}
-
-/// @domName SVGAnimatedLength
-class SVGAnimatedLength native "*SVGAnimatedLength" {
-
-  /** @domName SVGAnimatedLength.animVal */
-  final SVGLength animVal;
-
-  /** @domName SVGAnimatedLength.baseVal */
-  final SVGLength baseVal;
-}
-
-/// @domName SVGAnimatedLengthList
-class SVGAnimatedLengthList implements JavaScriptIndexingBehavior, List<SVGAnimatedLength> native "*SVGAnimatedLengthList" {
-
-  /** @domName SVGAnimatedLengthList.animVal */
-  final SVGLengthList animVal;
-
-  /** @domName SVGAnimatedLengthList.baseVal */
-  final SVGLengthList baseVal;
-
-  SVGAnimatedLength operator[](int index) => JS("SVGAnimatedLength", "#[#]", this, index);
-
-  void operator[]=(int index, SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimatedLength> mixins.
-  // SVGAnimatedLength is the element type.
-
-  // From Iterable<SVGAnimatedLength>:
-
-  Iterator<SVGAnimatedLength> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimatedLength>(this);
-  }
-
-  // From Collection<SVGAnimatedLength>:
-
-  void add(SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimatedLength> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimatedLength element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimatedLength> filter(bool f(SVGAnimatedLength element)) =>
-     _Collections.filter(this, <SVGAnimatedLength>[], f);
-
-  bool every(bool f(SVGAnimatedLength element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimatedLength element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimatedLength>:
-
-  void sort([Comparator<SVGAnimatedLength> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimatedLength element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimatedLength element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimatedLength get last => this[length - 1];
-
-  SVGAnimatedLength removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimatedLength initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimatedLength> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimatedLength>[]);
-
-  // -- end List<SVGAnimatedLength> mixins.
-}
-
-/// @domName SVGAnimatedNumber
-class SVGAnimatedNumber native "*SVGAnimatedNumber" {
-
-  /** @domName SVGAnimatedNumber.animVal */
-  final num animVal;
-
-  /** @domName SVGAnimatedNumber.baseVal */
-  num baseVal;
-}
-
-/// @domName SVGAnimatedNumberList
-class SVGAnimatedNumberList implements JavaScriptIndexingBehavior, List<SVGAnimatedNumber> native "*SVGAnimatedNumberList" {
-
-  /** @domName SVGAnimatedNumberList.animVal */
-  final SVGNumberList animVal;
-
-  /** @domName SVGAnimatedNumberList.baseVal */
-  final SVGNumberList baseVal;
-
-  SVGAnimatedNumber operator[](int index) => JS("SVGAnimatedNumber", "#[#]", this, index);
-
-  void operator[]=(int index, SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimatedNumber> mixins.
-  // SVGAnimatedNumber is the element type.
-
-  // From Iterable<SVGAnimatedNumber>:
-
-  Iterator<SVGAnimatedNumber> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimatedNumber>(this);
-  }
-
-  // From Collection<SVGAnimatedNumber>:
-
-  void add(SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimatedNumber> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimatedNumber element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimatedNumber> filter(bool f(SVGAnimatedNumber element)) =>
-     _Collections.filter(this, <SVGAnimatedNumber>[], f);
-
-  bool every(bool f(SVGAnimatedNumber element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimatedNumber element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimatedNumber>:
-
-  void sort([Comparator<SVGAnimatedNumber> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimatedNumber element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimatedNumber element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimatedNumber get last => this[length - 1];
-
-  SVGAnimatedNumber removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimatedNumber initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimatedNumber> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimatedNumber>[]);
-
-  // -- end List<SVGAnimatedNumber> mixins.
-}
-
-/// @domName SVGAnimatedPreserveAspectRatio
-class SVGAnimatedPreserveAspectRatio native "*SVGAnimatedPreserveAspectRatio" {
-
-  /** @domName SVGAnimatedPreserveAspectRatio.animVal */
-  final SVGPreserveAspectRatio animVal;
-
-  /** @domName SVGAnimatedPreserveAspectRatio.baseVal */
-  final SVGPreserveAspectRatio baseVal;
-}
-
-/// @domName SVGAnimatedRect
-class SVGAnimatedRect native "*SVGAnimatedRect" {
-
-  /** @domName SVGAnimatedRect.animVal */
-  final SVGRect animVal;
-
-  /** @domName SVGAnimatedRect.baseVal */
-  final SVGRect baseVal;
-}
-
-/// @domName SVGAnimatedString
-class SVGAnimatedString native "*SVGAnimatedString" {
-
-  /** @domName SVGAnimatedString.animVal */
-  final String animVal;
-
-  /** @domName SVGAnimatedString.baseVal */
-  String baseVal;
-}
-
-/// @domName SVGAnimatedTransformList
-class SVGAnimatedTransformList implements JavaScriptIndexingBehavior, List<SVGAnimateTransformElement> native "*SVGAnimatedTransformList" {
-
-  /** @domName SVGAnimatedTransformList.animVal */
-  final SVGTransformList animVal;
-
-  /** @domName SVGAnimatedTransformList.baseVal */
-  final SVGTransformList baseVal;
-
-  SVGAnimateTransformElement operator[](int index) => JS("SVGAnimateTransformElement", "#[#]", this, index);
-
-  void operator[]=(int index, SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimateTransformElement> mixins.
-  // SVGAnimateTransformElement is the element type.
-
-  // From Iterable<SVGAnimateTransformElement>:
-
-  Iterator<SVGAnimateTransformElement> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimateTransformElement>(this);
-  }
-
-  // From Collection<SVGAnimateTransformElement>:
-
-  void add(SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimateTransformElement> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimateTransformElement element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimateTransformElement> filter(bool f(SVGAnimateTransformElement element)) =>
-     _Collections.filter(this, <SVGAnimateTransformElement>[], f);
-
-  bool every(bool f(SVGAnimateTransformElement element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimateTransformElement element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimateTransformElement>:
-
-  void sort([Comparator<SVGAnimateTransformElement> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimateTransformElement element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimateTransformElement element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimateTransformElement get last => this[length - 1];
-
-  SVGAnimateTransformElement removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimateTransformElement initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimateTransformElement> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimateTransformElement>[]);
-
-  // -- end List<SVGAnimateTransformElement> mixins.
-}
-
-/// @domName SVGAnimationElement
-class SVGAnimationElement extends SVGElement implements ElementTimeControl, SVGTests, SVGExternalResourcesRequired native "*SVGAnimationElement" {
-
-  /** @domName SVGAnimationElement.targetElement */
-  final SVGElement targetElement;
-
-  /** @domName SVGAnimationElement.getCurrentTime */
-  num getCurrentTime() native;
-
-  /** @domName SVGAnimationElement.getSimpleDuration */
-  num getSimpleDuration() native;
-
-  /** @domName SVGAnimationElement.getStartTime */
-  num getStartTime() native;
-
-  // From ElementTimeControl
-
-  /** @domName ElementTimeControl.beginElement */
-  void beginElement() native;
-
-  /** @domName ElementTimeControl.beginElementAt */
-  void beginElementAt(num offset) native;
-
-  /** @domName ElementTimeControl.endElement */
-  void endElement() native;
-
-  /** @domName ElementTimeControl.endElementAt */
-  void endElementAt(num offset) native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-}
-
-/// @domName SVGCircleElement
-class SVGCircleElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGCircleElement" {
-
-  /** @domName SVGCircleElement.cx */
-  final SVGAnimatedLength cx;
-
-  /** @domName SVGCircleElement.cy */
-  final SVGAnimatedLength cy;
-
-  /** @domName SVGCircleElement.r */
-  final SVGAnimatedLength r;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGClipPathElement
-class SVGClipPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGClipPathElement" {
-
-  /** @domName SVGClipPathElement.clipPathUnits */
-  final SVGAnimatedEnumeration clipPathUnits;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGColor
-class SVGColor extends CSSValue native "*SVGColor" {
-
-  static const int SVG_COLORTYPE_CURRENTCOLOR = 3;
-
-  static const int SVG_COLORTYPE_RGBCOLOR = 1;
-
-  static const int SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
-
-  static const int SVG_COLORTYPE_UNKNOWN = 0;
-
-  /** @domName SVGColor.colorType */
-  final int colorType;
-
-  /** @domName SVGColor.rgbColor */
-  final RGBColor rgbColor;
-
-  /** @domName SVGColor.setColor */
-  void setColor(int colorType, String rgbColor, String iccColor) native;
-
-  /** @domName SVGColor.setRGBColor */
-  void setRGBColor(String rgbColor) native;
-
-  /** @domName SVGColor.setRGBColorICCColor */
-  void setRGBColorICCColor(String rgbColor, String iccColor) native;
-}
-
-/// @domName SVGComponentTransferFunctionElement
-class SVGComponentTransferFunctionElement extends SVGElement native "*SVGComponentTransferFunctionElement" {
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
-
-  /** @domName SVGComponentTransferFunctionElement.amplitude */
-  final SVGAnimatedNumber amplitude;
-
-  /** @domName SVGComponentTransferFunctionElement.exponent */
-  final SVGAnimatedNumber exponent;
-
-  /** @domName SVGComponentTransferFunctionElement.intercept */
-  final SVGAnimatedNumber intercept;
-
-  /** @domName SVGComponentTransferFunctionElement.offset */
-  final SVGAnimatedNumber offset;
-
-  /** @domName SVGComponentTransferFunctionElement.slope */
-  final SVGAnimatedNumber slope;
-
-  /** @domName SVGComponentTransferFunctionElement.tableValues */
-  final SVGAnimatedNumberList tableValues;
-
-  /** @domName SVGComponentTransferFunctionElement.type */
-  final SVGAnimatedEnumeration type;
-}
-
-/// @domName SVGCursorElement
-class SVGCursorElement extends SVGElement implements SVGURIReference, SVGTests, SVGExternalResourcesRequired native "*SVGCursorElement" {
-
-  /** @domName SVGCursorElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGCursorElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGDefsElement
-class SVGDefsElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGDefsElement" {
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGDescElement
-class SVGDescElement extends SVGElement implements SVGLangSpace, SVGStylable native "*SVGDescElement" {
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGDocument
-class SVGDocument extends Document native "*SVGDocument" {
-
-  /** @domName SVGDocument.rootElement */
-  final SVGSVGElement rootElement;
-
-  /** @domName SVGDocument.createEvent */
-  Event $dom_createEvent(String eventType) native "createEvent";
-}
-// 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.
-
-class _AttributeClassSet extends _CssClassSet {
-  _AttributeClassSet(element) : super(element);
-
-  String $dom_className() => _element.attributes['class'];
-
-  void _write(Set s) {
-    _element.attributes['class'] = _formatSet(s);
-  }
-}
-
-class SVGElement extends Element native "*SVGElement" {
-  factory SVGElement.tag(String tag) =>
-      _SVGElementFactoryProvider.createSVGElement_tag(tag);
-  factory SVGElement.svg(String svg) =>
-      _SVGElementFactoryProvider.createSVGElement_svg(svg);
-
-  CssClassSet get classes {
-    if (_cssClassSet == null) {
-      _cssClassSet = new _AttributeClassSet(_ptr);
-    }
-    return _cssClassSet;
-  }
-
-  List<Element> get elements => new _FilteredElementList(this);
-
-  void set elements(Collection<Element> value) {
-    final elements = this.elements;
-    elements.clear();
-    elements.addAll(value);
-  }
-
-  String get outerHTML {
-    final container = new Element.tag("div");
-    final SVGElement cloned = this.clone(true);
-    container.elements.add(cloned);
-    return container.innerHTML;
-  }
-
-  String get innerHTML {
-    final container = new Element.tag("div");
-    final SVGElement cloned = this.clone(true);
-    container.elements.addAll(cloned.elements);
-    return container.innerHTML;
-  }
-
-  void set innerHTML(String svg) {
-    final container = new Element.tag("div");
-    // Wrap the SVG string in <svg> so that SVGElements are created, rather than
-    // HTMLElements.
-    container.innerHTML = '<svg version="1.1">$svg</svg>';
-    this.elements = container.elements[0].elements;
-  }
-
-
-  // Shadowing definition.
-  /** @domName SVGElement.id */
-  String get id => JS("String", "#.id", this);
-
-  /** @domName SVGElement.id */
-  void set id(String value) {
-    JS("void", "#.id = #", this, value);
-  }
-
-  /** @domName SVGElement.ownerSVGElement */
-  final SVGSVGElement ownerSVGElement;
-
-  /** @domName SVGElement.viewportElement */
-  final SVGElement viewportElement;
-
-  /** @domName SVGElement.xmlbase */
-  String xmlbase;
-
-}
-
-/// @domName SVGElementInstance
-class SVGElementInstance extends EventTarget native "*SVGElementInstance" {
-
-  /**
-   * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
-   */
-  SVGElementInstanceEvents get on =>
-    new SVGElementInstanceEvents(this);
-
-  /** @domName SVGElementInstance.childNodes */
-  final List<SVGElementInstance> childNodes;
-
-  /** @domName SVGElementInstance.correspondingElement */
-  final SVGElement correspondingElement;
-
-  /** @domName SVGElementInstance.correspondingUseElement */
-  final SVGUseElement correspondingUseElement;
-
-  /** @domName SVGElementInstance.firstChild */
-  final SVGElementInstance firstChild;
-
-  /** @domName SVGElementInstance.lastChild */
-  final SVGElementInstance lastChild;
-
-  /** @domName SVGElementInstance.nextSibling */
-  final SVGElementInstance nextSibling;
-
-  /** @domName SVGElementInstance.parentNode */
-  final SVGElementInstance parentNode;
-
-  /** @domName SVGElementInstance.previousSibling */
-  final SVGElementInstance previousSibling;
-}
-
-class SVGElementInstanceEvents extends Events {
-  SVGElementInstanceEvents(EventTarget _ptr) : super(_ptr);
-
-  EventListenerList get abort => this['abort'];
-
-  EventListenerList get beforeCopy => this['beforecopy'];
-
-  EventListenerList get beforeCut => this['beforecut'];
-
-  EventListenerList get beforePaste => this['beforepaste'];
-
-  EventListenerList get blur => this['blur'];
-
-  EventListenerList get change => this['change'];
-
-  EventListenerList get click => this['click'];
-
-  EventListenerList get contextMenu => this['contextmenu'];
-
-  EventListenerList get copy => this['copy'];
-
-  EventListenerList get cut => this['cut'];
-
-  EventListenerList get doubleClick => this['dblclick'];
-
-  EventListenerList get drag => this['drag'];
-
-  EventListenerList get dragEnd => this['dragend'];
-
-  EventListenerList get dragEnter => this['dragenter'];
-
-  EventListenerList get dragLeave => this['dragleave'];
-
-  EventListenerList get dragOver => this['dragover'];
-
-  EventListenerList get dragStart => this['dragstart'];
-
-  EventListenerList get drop => this['drop'];
-
-  EventListenerList get error => this['error'];
-
-  EventListenerList get focus => this['focus'];
-
-  EventListenerList get input => this['input'];
-
-  EventListenerList get keyDown => this['keydown'];
-
-  EventListenerList get keyPress => this['keypress'];
-
-  EventListenerList get keyUp => this['keyup'];
-
-  EventListenerList get load => this['load'];
-
-  EventListenerList get mouseDown => this['mousedown'];
-
-  EventListenerList get mouseMove => this['mousemove'];
-
-  EventListenerList get mouseOut => this['mouseout'];
-
-  EventListenerList get mouseOver => this['mouseover'];
-
-  EventListenerList get mouseUp => this['mouseup'];
-
-  EventListenerList get mouseWheel => this['mousewheel'];
-
-  EventListenerList get paste => this['paste'];
-
-  EventListenerList get reset => this['reset'];
-
-  EventListenerList get resize => this['resize'];
-
-  EventListenerList get scroll => this['scroll'];
-
-  EventListenerList get search => this['search'];
-
-  EventListenerList get select => this['select'];
-
-  EventListenerList get selectStart => this['selectstart'];
-
-  EventListenerList get submit => this['submit'];
-
-  EventListenerList get unload => this['unload'];
-}
-
-/// @domName SVGEllipseElement
-class SVGEllipseElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGEllipseElement" {
-
-  /** @domName SVGEllipseElement.cx */
-  final SVGAnimatedLength cx;
-
-  /** @domName SVGEllipseElement.cy */
-  final SVGAnimatedLength cy;
-
-  /** @domName SVGEllipseElement.rx */
-  final SVGAnimatedLength rx;
-
-  /** @domName SVGEllipseElement.ry */
-  final SVGAnimatedLength ry;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGException
-class SVGException native "*SVGException" {
-
-  static const int SVG_INVALID_VALUE_ERR = 1;
-
-  static const int SVG_MATRIX_NOT_INVERTABLE = 2;
-
-  static const int SVG_WRONG_TYPE_ERR = 0;
-
-  /** @domName SVGException.code */
-  final int code;
-
-  /** @domName SVGException.message */
-  final String message;
-
-  /** @domName SVGException.name */
-  final String name;
-
-  /** @domName SVGException.toString */
-  String toString() native;
-}
-/// @domName SVGExternalResourcesRequired
-abstract class SVGExternalResourcesRequired {
-
-  SVGAnimatedBoolean externalResourcesRequired;
-}
-
-/// @domName SVGFEBlendElement
-class SVGFEBlendElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEBlendElement" {
-
-  static const int SVG_FEBLEND_MODE_DARKEN = 4;
-
-  static const int SVG_FEBLEND_MODE_LIGHTEN = 5;
-
-  static const int SVG_FEBLEND_MODE_MULTIPLY = 2;
-
-  static const int SVG_FEBLEND_MODE_NORMAL = 1;
-
-  static const int SVG_FEBLEND_MODE_SCREEN = 3;
-
-  static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
-
-  /** @domName SVGFEBlendElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEBlendElement.in2 */
-  final SVGAnimatedString in2;
-
-  /** @domName SVGFEBlendElement.mode */
-  final SVGAnimatedEnumeration mode;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEColorMatrixElement
-class SVGFEColorMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEColorMatrixElement" {
-
-  static const int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
-
-  static const int SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
-
-  static const int SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
-
-  static const int SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
-
-  static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
-
-  /** @domName SVGFEColorMatrixElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEColorMatrixElement.type */
-  final SVGAnimatedEnumeration type;
-
-  /** @domName SVGFEColorMatrixElement.values */
-  final SVGAnimatedNumberList values;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEComponentTransferElement
-class SVGFEComponentTransferElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEComponentTransferElement" {
-
-  /** @domName SVGFEComponentTransferElement.in1 */
-  final SVGAnimatedString in1;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFECompositeElement
-class SVGFECompositeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFECompositeElement" {
-
-  static const int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_IN = 2;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_OUT = 3;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_OVER = 1;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
-
-  /** @domName SVGFECompositeElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFECompositeElement.in2 */
-  final SVGAnimatedString in2;
-
-  /** @domName SVGFECompositeElement.k1 */
-  final SVGAnimatedNumber k1;
-
-  /** @domName SVGFECompositeElement.k2 */
-  final SVGAnimatedNumber k2;
-
-  /** @domName SVGFECompositeElement.k3 */
-  final SVGAnimatedNumber k3;
-
-  /** @domName SVGFECompositeElement.k4 */
-  final SVGAnimatedNumber k4;
-
-  /** @domName SVGFECompositeElement.operator */
-  final SVGAnimatedEnumeration operator;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEConvolveMatrixElement
-class SVGFEConvolveMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEConvolveMatrixElement" {
-
-  static const int SVG_EDGEMODE_DUPLICATE = 1;
-
-  static const int SVG_EDGEMODE_NONE = 3;
-
-  static const int SVG_EDGEMODE_UNKNOWN = 0;
-
-  static const int SVG_EDGEMODE_WRAP = 2;
-
-  /** @domName SVGFEConvolveMatrixElement.bias */
-  final SVGAnimatedNumber bias;
-
-  /** @domName SVGFEConvolveMatrixElement.divisor */
-  final SVGAnimatedNumber divisor;
-
-  /** @domName SVGFEConvolveMatrixElement.edgeMode */
-  final SVGAnimatedEnumeration edgeMode;
-
-  /** @domName SVGFEConvolveMatrixElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEConvolveMatrixElement.kernelMatrix */
-  final SVGAnimatedNumberList kernelMatrix;
-
-  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthX */
-  final SVGAnimatedNumber kernelUnitLengthX;
-
-  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthY */
-  final SVGAnimatedNumber kernelUnitLengthY;
-
-  /** @domName SVGFEConvolveMatrixElement.orderX */
-  final SVGAnimatedInteger orderX;
-
-  /** @domName SVGFEConvolveMatrixElement.orderY */
-  final SVGAnimatedInteger orderY;
-
-  /** @domName SVGFEConvolveMatrixElement.preserveAlpha */
-  final SVGAnimatedBoolean preserveAlpha;
-
-  /** @domName SVGFEConvolveMatrixElement.targetX */
-  final SVGAnimatedInteger targetX;
-
-  /** @domName SVGFEConvolveMatrixElement.targetY */
-  final SVGAnimatedInteger targetY;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEDiffuseLightingElement
-class SVGFEDiffuseLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDiffuseLightingElement" {
-
-  /** @domName SVGFEDiffuseLightingElement.diffuseConstant */
-  final SVGAnimatedNumber diffuseConstant;
-
-  /** @domName SVGFEDiffuseLightingElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthX */
-  final SVGAnimatedNumber kernelUnitLengthX;
-
-  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthY */
-  final SVGAnimatedNumber kernelUnitLengthY;
-
-  /** @domName SVGFEDiffuseLightingElement.surfaceScale */
-  final SVGAnimatedNumber surfaceScale;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEDisplacementMapElement
-class SVGFEDisplacementMapElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDisplacementMapElement" {
-
-  static const int SVG_CHANNEL_A = 4;
-
-  static const int SVG_CHANNEL_B = 3;
-
-  static const int SVG_CHANNEL_G = 2;
-
-  static const int SVG_CHANNEL_R = 1;
-
-  static const int SVG_CHANNEL_UNKNOWN = 0;
-
-  /** @domName SVGFEDisplacementMapElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEDisplacementMapElement.in2 */
-  final SVGAnimatedString in2;
-
-  /** @domName SVGFEDisplacementMapElement.scale */
-  final SVGAnimatedNumber scale;
-
-  /** @domName SVGFEDisplacementMapElement.xChannelSelector */
-  final SVGAnimatedEnumeration xChannelSelector;
-
-  /** @domName SVGFEDisplacementMapElement.yChannelSelector */
-  final SVGAnimatedEnumeration yChannelSelector;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEDistantLightElement
-class SVGFEDistantLightElement extends SVGElement native "*SVGFEDistantLightElement" {
-
-  /** @domName SVGFEDistantLightElement.azimuth */
-  final SVGAnimatedNumber azimuth;
-
-  /** @domName SVGFEDistantLightElement.elevation */
-  final SVGAnimatedNumber elevation;
-}
-
-/// @domName SVGFEDropShadowElement
-class SVGFEDropShadowElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDropShadowElement" {
-
-  /** @domName SVGFEDropShadowElement.dx */
-  final SVGAnimatedNumber dx;
-
-  /** @domName SVGFEDropShadowElement.dy */
-  final SVGAnimatedNumber dy;
-
-  /** @domName SVGFEDropShadowElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEDropShadowElement.stdDeviationX */
-  final SVGAnimatedNumber stdDeviationX;
-
-  /** @domName SVGFEDropShadowElement.stdDeviationY */
-  final SVGAnimatedNumber stdDeviationY;
-
-  /** @domName SVGFEDropShadowElement.setStdDeviation */
-  void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEFloodElement
-class SVGFEFloodElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEFloodElement" {
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEFuncAElement
-class SVGFEFuncAElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncAElement" {
-}
-
-/// @domName SVGFEFuncBElement
-class SVGFEFuncBElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncBElement" {
-}
-
-/// @domName SVGFEFuncGElement
-class SVGFEFuncGElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncGElement" {
-}
-
-/// @domName SVGFEFuncRElement
-class SVGFEFuncRElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncRElement" {
-}
-
-/// @domName SVGFEGaussianBlurElement
-class SVGFEGaussianBlurElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEGaussianBlurElement" {
-
-  /** @domName SVGFEGaussianBlurElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEGaussianBlurElement.stdDeviationX */
-  final SVGAnimatedNumber stdDeviationX;
-
-  /** @domName SVGFEGaussianBlurElement.stdDeviationY */
-  final SVGAnimatedNumber stdDeviationY;
-
-  /** @domName SVGFEGaussianBlurElement.setStdDeviation */
-  void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEImageElement
-class SVGFEImageElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired native "*SVGFEImageElement" {
-
-  /** @domName SVGFEImageElement.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGFEMergeElement
-class SVGFEMergeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEMergeElement" {
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEMergeNodeElement
-class SVGFEMergeNodeElement extends SVGElement native "*SVGFEMergeNodeElement" {
-
-  /** @domName SVGFEMergeNodeElement.in1 */
-  final SVGAnimatedString in1;
-}
-
-/// @domName SVGFEMorphologyElement
-class SVGFEMorphologyElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEMorphologyElement" {
-
-  static const int SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
-
-  static const int SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
-
-  static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
-
-  /** @domName SVGFEMorphologyElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFEMorphologyElement.operator */
-  final SVGAnimatedEnumeration operator;
-
-  /** @domName SVGFEMorphologyElement.radiusX */
-  final SVGAnimatedNumber radiusX;
-
-  /** @domName SVGFEMorphologyElement.radiusY */
-  final SVGAnimatedNumber radiusY;
-
-  /** @domName SVGFEMorphologyElement.setRadius */
-  void setRadius(num radiusX, num radiusY) native;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEOffsetElement
-class SVGFEOffsetElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEOffsetElement" {
-
-  /** @domName SVGFEOffsetElement.dx */
-  final SVGAnimatedNumber dx;
-
-  /** @domName SVGFEOffsetElement.dy */
-  final SVGAnimatedNumber dy;
-
-  /** @domName SVGFEOffsetElement.in1 */
-  final SVGAnimatedString in1;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFEPointLightElement
-class SVGFEPointLightElement extends SVGElement native "*SVGFEPointLightElement" {
-
-  /** @domName SVGFEPointLightElement.x */
-  final SVGAnimatedNumber x;
-
-  /** @domName SVGFEPointLightElement.y */
-  final SVGAnimatedNumber y;
-
-  /** @domName SVGFEPointLightElement.z */
-  final SVGAnimatedNumber z;
-}
-
-/// @domName SVGFESpecularLightingElement
-class SVGFESpecularLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFESpecularLightingElement" {
-
-  /** @domName SVGFESpecularLightingElement.in1 */
-  final SVGAnimatedString in1;
-
-  /** @domName SVGFESpecularLightingElement.specularConstant */
-  final SVGAnimatedNumber specularConstant;
-
-  /** @domName SVGFESpecularLightingElement.specularExponent */
-  final SVGAnimatedNumber specularExponent;
-
-  /** @domName SVGFESpecularLightingElement.surfaceScale */
-  final SVGAnimatedNumber surfaceScale;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFESpotLightElement
-class SVGFESpotLightElement extends SVGElement native "*SVGFESpotLightElement" {
-
-  /** @domName SVGFESpotLightElement.limitingConeAngle */
-  final SVGAnimatedNumber limitingConeAngle;
-
-  /** @domName SVGFESpotLightElement.pointsAtX */
-  final SVGAnimatedNumber pointsAtX;
-
-  /** @domName SVGFESpotLightElement.pointsAtY */
-  final SVGAnimatedNumber pointsAtY;
-
-  /** @domName SVGFESpotLightElement.pointsAtZ */
-  final SVGAnimatedNumber pointsAtZ;
-
-  /** @domName SVGFESpotLightElement.specularExponent */
-  final SVGAnimatedNumber specularExponent;
-
-  /** @domName SVGFESpotLightElement.x */
-  final SVGAnimatedNumber x;
-
-  /** @domName SVGFESpotLightElement.y */
-  final SVGAnimatedNumber y;
-
-  /** @domName SVGFESpotLightElement.z */
-  final SVGAnimatedNumber z;
-}
-
-/// @domName SVGFETileElement
-class SVGFETileElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFETileElement" {
-
-  /** @domName SVGFETileElement.in1 */
-  final SVGAnimatedString in1;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFETurbulenceElement
-class SVGFETurbulenceElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFETurbulenceElement" {
-
-  static const int SVG_STITCHTYPE_NOSTITCH = 2;
-
-  static const int SVG_STITCHTYPE_STITCH = 1;
-
-  static const int SVG_STITCHTYPE_UNKNOWN = 0;
-
-  static const int SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
-
-  static const int SVG_TURBULENCE_TYPE_TURBULENCE = 2;
-
-  static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
-
-  /** @domName SVGFETurbulenceElement.baseFrequencyX */
-  final SVGAnimatedNumber baseFrequencyX;
-
-  /** @domName SVGFETurbulenceElement.baseFrequencyY */
-  final SVGAnimatedNumber baseFrequencyY;
-
-  /** @domName SVGFETurbulenceElement.numOctaves */
-  final SVGAnimatedInteger numOctaves;
-
-  /** @domName SVGFETurbulenceElement.seed */
-  final SVGAnimatedNumber seed;
-
-  /** @domName SVGFETurbulenceElement.stitchTiles */
-  final SVGAnimatedEnumeration stitchTiles;
-
-  /** @domName SVGFETurbulenceElement.type */
-  final SVGAnimatedEnumeration type;
-
-  // From SVGFilterPrimitiveStandardAttributes
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  final SVGAnimatedString result;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  final SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGFilterElement
-class SVGFilterElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable native "*SVGFilterElement" {
-
-  /** @domName SVGFilterElement.filterResX */
-  final SVGAnimatedInteger filterResX;
-
-  /** @domName SVGFilterElement.filterResY */
-  final SVGAnimatedInteger filterResY;
-
-  /** @domName SVGFilterElement.filterUnits */
-  final SVGAnimatedEnumeration filterUnits;
-
-  /** @domName SVGFilterElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGFilterElement.primitiveUnits */
-  final SVGAnimatedEnumeration primitiveUnits;
-
-  /** @domName SVGFilterElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGFilterElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGFilterElement.y */
-  final SVGAnimatedLength y;
-
-  /** @domName SVGFilterElement.setFilterRes */
-  void setFilterRes(int filterResX, int filterResY) native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-/// @domName SVGFilterPrimitiveStandardAttributes
-abstract class SVGFilterPrimitiveStandardAttributes implements SVGStylable {
-
-  SVGAnimatedLength height;
-
-  SVGAnimatedString result;
-
-  SVGAnimatedLength width;
-
-  SVGAnimatedLength x;
-
-  SVGAnimatedLength y;
-
-  // From SVGStylable
-
-  SVGAnimatedString className;
-
-  CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name);
-}
-/// @domName SVGFitToViewBox
-abstract class SVGFitToViewBox {
-
-  SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  SVGAnimatedRect viewBox;
-}
-
-/// @domName SVGFontElement
-class SVGFontElement extends SVGElement native "*SVGFontElement" {
-}
-
-/// @domName SVGFontFaceElement
-class SVGFontFaceElement extends SVGElement native "*SVGFontFaceElement" {
-}
-
-/// @domName SVGFontFaceFormatElement
-class SVGFontFaceFormatElement extends SVGElement native "*SVGFontFaceFormatElement" {
-}
-
-/// @domName SVGFontFaceNameElement
-class SVGFontFaceNameElement extends SVGElement native "*SVGFontFaceNameElement" {
-}
-
-/// @domName SVGFontFaceSrcElement
-class SVGFontFaceSrcElement extends SVGElement native "*SVGFontFaceSrcElement" {
-}
-
-/// @domName SVGFontFaceUriElement
-class SVGFontFaceUriElement extends SVGElement native "*SVGFontFaceUriElement" {
-}
-
-/// @domName SVGForeignObjectElement
-class SVGForeignObjectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGForeignObjectElement" {
-
-  /** @domName SVGForeignObjectElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGForeignObjectElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGForeignObjectElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGForeignObjectElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGGElement
-class SVGGElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGGElement" {
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGGlyphElement
-class SVGGlyphElement extends SVGElement native "*SVGGlyphElement" {
-}
-
-/// @domName SVGGlyphRefElement
-class SVGGlyphRefElement extends SVGElement implements SVGURIReference, SVGStylable native "*SVGGlyphRefElement" {
-
-  /** @domName SVGGlyphRefElement.dx */
-  num dx;
-
-  /** @domName SVGGlyphRefElement.dy */
-  num dy;
-
-  /** @domName SVGGlyphRefElement.format */
-  String format;
-
-  /** @domName SVGGlyphRefElement.glyphRef */
-  String glyphRef;
-
-  /** @domName SVGGlyphRefElement.x */
-  num x;
-
-  /** @domName SVGGlyphRefElement.y */
-  num y;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGGradientElement
-class SVGGradientElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired, SVGStylable native "*SVGGradientElement" {
-
-  static const int SVG_SPREADMETHOD_PAD = 1;
-
-  static const int SVG_SPREADMETHOD_REFLECT = 2;
-
-  static const int SVG_SPREADMETHOD_REPEAT = 3;
-
-  static const int SVG_SPREADMETHOD_UNKNOWN = 0;
-
-  /** @domName SVGGradientElement.gradientTransform */
-  final SVGAnimatedTransformList gradientTransform;
-
-  /** @domName SVGGradientElement.gradientUnits */
-  final SVGAnimatedEnumeration gradientUnits;
-
-  /** @domName SVGGradientElement.spreadMethod */
-  final SVGAnimatedEnumeration spreadMethod;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGHKernElement
-class SVGHKernElement extends SVGElement native "*SVGHKernElement" {
-}
-
-/// @domName SVGImageElement
-class SVGImageElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGImageElement" {
-
-  /** @domName SVGImageElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGImageElement.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGImageElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGImageElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGImageElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-/// @domName SVGLangSpace
-abstract class SVGLangSpace {
-
-  String xmllang;
-
-  String xmlspace;
-}
-
-/// @domName SVGLength
-class SVGLength native "*SVGLength" {
-
-  static const int SVG_LENGTHTYPE_CM = 6;
-
-  static const int SVG_LENGTHTYPE_EMS = 3;
-
-  static const int SVG_LENGTHTYPE_EXS = 4;
-
-  static const int SVG_LENGTHTYPE_IN = 8;
-
-  static const int SVG_LENGTHTYPE_MM = 7;
-
-  static const int SVG_LENGTHTYPE_NUMBER = 1;
-
-  static const int SVG_LENGTHTYPE_PC = 10;
-
-  static const int SVG_LENGTHTYPE_PERCENTAGE = 2;
-
-  static const int SVG_LENGTHTYPE_PT = 9;
-
-  static const int SVG_LENGTHTYPE_PX = 5;
-
-  static const int SVG_LENGTHTYPE_UNKNOWN = 0;
-
-  /** @domName SVGLength.unitType */
-  final int unitType;
-
-  /** @domName SVGLength.value */
-  num value;
-
-  /** @domName SVGLength.valueAsString */
-  String valueAsString;
-
-  /** @domName SVGLength.valueInSpecifiedUnits */
-  num valueInSpecifiedUnits;
-
-  /** @domName SVGLength.convertToSpecifiedUnits */
-  void convertToSpecifiedUnits(int unitType) native;
-
-  /** @domName SVGLength.newValueSpecifiedUnits */
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
-}
-
-/// @domName SVGLengthList
-class SVGLengthList implements JavaScriptIndexingBehavior, List<SVGLength> native "*SVGLengthList" {
-
-  /** @domName SVGLengthList.numberOfItems */
-  final int numberOfItems;
-
-  SVGLength operator[](int index) => JS("SVGLength", "#[#]", this, index);
-
-  void operator[]=(int index, SVGLength value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGLength> mixins.
-  // SVGLength is the element type.
-
-  // From Iterable<SVGLength>:
-
-  Iterator<SVGLength> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGLength>(this);
-  }
-
-  // From Collection<SVGLength>:
-
-  void add(SVGLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGLength> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGLength element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGLength element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGLength element)) => _Collections.map(this, [], f);
-
-  Collection<SVGLength> filter(bool f(SVGLength element)) =>
-     _Collections.filter(this, <SVGLength>[], f);
-
-  bool every(bool f(SVGLength element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGLength element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGLength>:
-
-  void sort([Comparator<SVGLength> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGLength element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGLength element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGLength get last => this[length - 1];
-
-  SVGLength removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGLength initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGLength> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGLength>[]);
-
-  // -- end List<SVGLength> mixins.
-
-  /** @domName SVGLengthList.appendItem */
-  SVGLength appendItem(SVGLength item) native;
-
-  /** @domName SVGLengthList.clear */
-  void clear() native;
-
-  /** @domName SVGLengthList.getItem */
-  SVGLength getItem(int index) native;
-
-  /** @domName SVGLengthList.initialize */
-  SVGLength initialize(SVGLength item) native;
-
-  /** @domName SVGLengthList.insertItemBefore */
-  SVGLength insertItemBefore(SVGLength item, int index) native;
-
-  /** @domName SVGLengthList.removeItem */
-  SVGLength removeItem(int index) native;
-
-  /** @domName SVGLengthList.replaceItem */
-  SVGLength replaceItem(SVGLength item, int index) native;
-}
-
-/// @domName SVGLineElement
-class SVGLineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGLineElement" {
-
-  /** @domName SVGLineElement.x1 */
-  final SVGAnimatedLength x1;
-
-  /** @domName SVGLineElement.x2 */
-  final SVGAnimatedLength x2;
-
-  /** @domName SVGLineElement.y1 */
-  final SVGAnimatedLength y1;
-
-  /** @domName SVGLineElement.y2 */
-  final SVGAnimatedLength y2;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGLinearGradientElement
-class SVGLinearGradientElement extends SVGGradientElement native "*SVGLinearGradientElement" {
-
-  /** @domName SVGLinearGradientElement.x1 */
-  final SVGAnimatedLength x1;
-
-  /** @domName SVGLinearGradientElement.x2 */
-  final SVGAnimatedLength x2;
-
-  /** @domName SVGLinearGradientElement.y1 */
-  final SVGAnimatedLength y1;
-
-  /** @domName SVGLinearGradientElement.y2 */
-  final SVGAnimatedLength y2;
-}
-/// @domName SVGLocatable
-abstract class SVGLocatable {
-
-  SVGElement farthestViewportElement;
-
-  SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox();
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM();
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM();
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element);
-}
-
-/// @domName SVGMPathElement
-class SVGMPathElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired native "*SVGMPathElement" {
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGMarkerElement
-class SVGMarkerElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable native "*SVGMarkerElement" {
-
-  static const int SVG_MARKERUNITS_STROKEWIDTH = 2;
-
-  static const int SVG_MARKERUNITS_UNKNOWN = 0;
-
-  static const int SVG_MARKERUNITS_USERSPACEONUSE = 1;
-
-  static const int SVG_MARKER_ORIENT_ANGLE = 2;
-
-  static const int SVG_MARKER_ORIENT_AUTO = 1;
-
-  static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
-
-  /** @domName SVGMarkerElement.markerHeight */
-  final SVGAnimatedLength markerHeight;
-
-  /** @domName SVGMarkerElement.markerUnits */
-  final SVGAnimatedEnumeration markerUnits;
-
-  /** @domName SVGMarkerElement.markerWidth */
-  final SVGAnimatedLength markerWidth;
-
-  /** @domName SVGMarkerElement.orientAngle */
-  final SVGAnimatedAngle orientAngle;
-
-  /** @domName SVGMarkerElement.orientType */
-  final SVGAnimatedEnumeration orientType;
-
-  /** @domName SVGMarkerElement.refX */
-  final SVGAnimatedLength refX;
-
-  /** @domName SVGMarkerElement.refY */
-  final SVGAnimatedLength refY;
-
-  /** @domName SVGMarkerElement.setOrientToAngle */
-  void setOrientToAngle(SVGAngle angle) native;
-
-  /** @domName SVGMarkerElement.setOrientToAuto */
-  void setOrientToAuto() native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFitToViewBox
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGFitToViewBox.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGMaskElement
-class SVGMaskElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired native "*SVGMaskElement" {
-
-  /** @domName SVGMaskElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGMaskElement.maskContentUnits */
-  final SVGAnimatedEnumeration maskContentUnits;
-
-  /** @domName SVGMaskElement.maskUnits */
-  final SVGAnimatedEnumeration maskUnits;
-
-  /** @domName SVGMaskElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGMaskElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGMaskElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-}
-
-/// @domName SVGMatrix
-class SVGMatrix native "*SVGMatrix" {
-
-  /** @domName SVGMatrix.a */
-  num a;
-
-  /** @domName SVGMatrix.b */
-  num b;
-
-  /** @domName SVGMatrix.c */
-  num c;
-
-  /** @domName SVGMatrix.d */
-  num d;
-
-  /** @domName SVGMatrix.e */
-  num e;
-
-  /** @domName SVGMatrix.f */
-  num f;
-
-  /** @domName SVGMatrix.flipX */
-  SVGMatrix flipX() native;
-
-  /** @domName SVGMatrix.flipY */
-  SVGMatrix flipY() native;
-
-  /** @domName SVGMatrix.inverse */
-  SVGMatrix inverse() native;
-
-  /** @domName SVGMatrix.multiply */
-  SVGMatrix multiply(SVGMatrix secondMatrix) native;
-
-  /** @domName SVGMatrix.rotate */
-  SVGMatrix rotate(num angle) native;
-
-  /** @domName SVGMatrix.rotateFromVector */
-  SVGMatrix rotateFromVector(num x, num y) native;
-
-  /** @domName SVGMatrix.scale */
-  SVGMatrix scale(num scaleFactor) native;
-
-  /** @domName SVGMatrix.scaleNonUniform */
-  SVGMatrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native;
-
-  /** @domName SVGMatrix.skewX */
-  SVGMatrix skewX(num angle) native;
-
-  /** @domName SVGMatrix.skewY */
-  SVGMatrix skewY(num angle) native;
-
-  /** @domName SVGMatrix.translate */
-  SVGMatrix translate(num x, num y) native;
-}
-
-/// @domName SVGMetadataElement
-class SVGMetadataElement extends SVGElement native "*SVGMetadataElement" {
-}
-
-/// @domName SVGMissingGlyphElement
-class SVGMissingGlyphElement extends SVGElement native "*SVGMissingGlyphElement" {
-}
-
-/// @domName SVGNumber
-class SVGNumber native "*SVGNumber" {
-
-  /** @domName SVGNumber.value */
-  num value;
-}
-
-/// @domName SVGNumberList
-class SVGNumberList implements JavaScriptIndexingBehavior, List<SVGNumber> native "*SVGNumberList" {
-
-  /** @domName SVGNumberList.numberOfItems */
-  final int numberOfItems;
-
-  SVGNumber operator[](int index) => JS("SVGNumber", "#[#]", this, index);
-
-  void operator[]=(int index, SVGNumber value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGNumber> mixins.
-  // SVGNumber is the element type.
-
-  // From Iterable<SVGNumber>:
-
-  Iterator<SVGNumber> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGNumber>(this);
-  }
-
-  // From Collection<SVGNumber>:
-
-  void add(SVGNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGNumber> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGNumber element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGNumber element)) => _Collections.map(this, [], f);
-
-  Collection<SVGNumber> filter(bool f(SVGNumber element)) =>
-     _Collections.filter(this, <SVGNumber>[], f);
-
-  bool every(bool f(SVGNumber element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGNumber element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGNumber>:
-
-  void sort([Comparator<SVGNumber> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGNumber element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGNumber element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGNumber get last => this[length - 1];
-
-  SVGNumber removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGNumber initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGNumber> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGNumber>[]);
-
-  // -- end List<SVGNumber> mixins.
-
-  /** @domName SVGNumberList.appendItem */
-  SVGNumber appendItem(SVGNumber item) native;
-
-  /** @domName SVGNumberList.clear */
-  void clear() native;
-
-  /** @domName SVGNumberList.getItem */
-  SVGNumber getItem(int index) native;
-
-  /** @domName SVGNumberList.initialize */
-  SVGNumber initialize(SVGNumber item) native;
-
-  /** @domName SVGNumberList.insertItemBefore */
-  SVGNumber insertItemBefore(SVGNumber item, int index) native;
-
-  /** @domName SVGNumberList.removeItem */
-  SVGNumber removeItem(int index) native;
-
-  /** @domName SVGNumberList.replaceItem */
-  SVGNumber replaceItem(SVGNumber item, int index) native;
-}
-
-/// @domName SVGPaint
-class SVGPaint extends SVGColor native "*SVGPaint" {
-
-  static const int SVG_PAINTTYPE_CURRENTCOLOR = 102;
-
-  static const int SVG_PAINTTYPE_NONE = 101;
-
-  static const int SVG_PAINTTYPE_RGBCOLOR = 1;
-
-  static const int SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
-
-  static const int SVG_PAINTTYPE_UNKNOWN = 0;
-
-  static const int SVG_PAINTTYPE_URI = 107;
-
-  static const int SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
-
-  static const int SVG_PAINTTYPE_URI_NONE = 103;
-
-  static const int SVG_PAINTTYPE_URI_RGBCOLOR = 105;
-
-  static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
-
-  /** @domName SVGPaint.paintType */
-  final int paintType;
-
-  /** @domName SVGPaint.uri */
-  final String uri;
-
-  /** @domName SVGPaint.setPaint */
-  void setPaint(int paintType, String uri, String rgbColor, String iccColor) native;
-
-  /** @domName SVGPaint.setUri */
-  void setUri(String uri) native;
-}
-
-/// @domName SVGPathElement
-class SVGPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPathElement" {
-
-  /** @domName SVGPathElement.animatedNormalizedPathSegList */
-  final SVGPathSegList animatedNormalizedPathSegList;
-
-  /** @domName SVGPathElement.animatedPathSegList */
-  final SVGPathSegList animatedPathSegList;
-
-  /** @domName SVGPathElement.normalizedPathSegList */
-  final SVGPathSegList normalizedPathSegList;
-
-  /** @domName SVGPathElement.pathLength */
-  final SVGAnimatedNumber pathLength;
-
-  /** @domName SVGPathElement.pathSegList */
-  final SVGPathSegList pathSegList;
-
-  /** @domName SVGPathElement.createSVGPathSegArcAbs */
-  SVGPathSegArcAbs createSVGPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
-
-  /** @domName SVGPathElement.createSVGPathSegArcRel */
-  SVGPathSegArcRel createSVGPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
-
-  /** @domName SVGPathElement.createSVGPathSegClosePath */
-  SVGPathSegClosePath createSVGPathSegClosePath() native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicAbs */
-  SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicRel */
-  SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs */
-  SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel */
-  SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticAbs */
-  SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticRel */
-  SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs */
-  SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(num x, num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel */
-  SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(num x, num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoAbs */
-  SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(num x, num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalAbs */
-  SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(num x) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalRel */
-  SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(num x) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoRel */
-  SVGPathSegLinetoRel createSVGPathSegLinetoRel(num x, num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalAbs */
-  SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalRel */
-  SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegMovetoAbs */
-  SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(num x, num y) native;
-
-  /** @domName SVGPathElement.createSVGPathSegMovetoRel */
-  SVGPathSegMovetoRel createSVGPathSegMovetoRel(num x, num y) native;
-
-  /** @domName SVGPathElement.getPathSegAtLength */
-  int getPathSegAtLength(num distance) native;
-
-  /** @domName SVGPathElement.getPointAtLength */
-  SVGPoint getPointAtLength(num distance) native;
-
-  /** @domName SVGPathElement.getTotalLength */
-  num getTotalLength() native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGPathSeg
-class SVGPathSeg native "*SVGPathSeg" {
-
-  static const int PATHSEG_ARC_ABS = 10;
-
-  static const int PATHSEG_ARC_REL = 11;
-
-  static const int PATHSEG_CLOSEPATH = 1;
-
-  static const int PATHSEG_CURVETO_CUBIC_ABS = 6;
-
-  static const int PATHSEG_CURVETO_CUBIC_REL = 7;
-
-  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
-
-  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_ABS = 8;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_REL = 9;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
-
-  static const int PATHSEG_LINETO_ABS = 4;
-
-  static const int PATHSEG_LINETO_HORIZONTAL_ABS = 12;
-
-  static const int PATHSEG_LINETO_HORIZONTAL_REL = 13;
-
-  static const int PATHSEG_LINETO_REL = 5;
-
-  static const int PATHSEG_LINETO_VERTICAL_ABS = 14;
-
-  static const int PATHSEG_LINETO_VERTICAL_REL = 15;
-
-  static const int PATHSEG_MOVETO_ABS = 2;
-
-  static const int PATHSEG_MOVETO_REL = 3;
-
-  static const int PATHSEG_UNKNOWN = 0;
-
-  /** @domName SVGPathSeg.pathSegType */
-  final int pathSegType;
-
-  /** @domName SVGPathSeg.pathSegTypeAsLetter */
-  final String pathSegTypeAsLetter;
-}
-
-/// @domName SVGPathSegArcAbs
-class SVGPathSegArcAbs extends SVGPathSeg native "*SVGPathSegArcAbs" {
-
-  /** @domName SVGPathSegArcAbs.angle */
-  num angle;
-
-  /** @domName SVGPathSegArcAbs.largeArcFlag */
-  bool largeArcFlag;
-
-  /** @domName SVGPathSegArcAbs.r1 */
-  num r1;
-
-  /** @domName SVGPathSegArcAbs.r2 */
-  num r2;
-
-  /** @domName SVGPathSegArcAbs.sweepFlag */
-  bool sweepFlag;
-
-  /** @domName SVGPathSegArcAbs.x */
-  num x;
-
-  /** @domName SVGPathSegArcAbs.y */
-  num y;
-}
-
-/// @domName SVGPathSegArcRel
-class SVGPathSegArcRel extends SVGPathSeg native "*SVGPathSegArcRel" {
-
-  /** @domName SVGPathSegArcRel.angle */
-  num angle;
-
-  /** @domName SVGPathSegArcRel.largeArcFlag */
-  bool largeArcFlag;
-
-  /** @domName SVGPathSegArcRel.r1 */
-  num r1;
-
-  /** @domName SVGPathSegArcRel.r2 */
-  num r2;
-
-  /** @domName SVGPathSegArcRel.sweepFlag */
-  bool sweepFlag;
-
-  /** @domName SVGPathSegArcRel.x */
-  num x;
-
-  /** @domName SVGPathSegArcRel.y */
-  num y;
-}
-
-/// @domName SVGPathSegClosePath
-class SVGPathSegClosePath extends SVGPathSeg native "*SVGPathSegClosePath" {
-}
-
-/// @domName SVGPathSegCurvetoCubicAbs
-class SVGPathSegCurvetoCubicAbs extends SVGPathSeg native "*SVGPathSegCurvetoCubicAbs" {
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
-  num x1;
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
-  num x2;
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
-  num y1;
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
-  num y2;
-}
-
-/// @domName SVGPathSegCurvetoCubicRel
-class SVGPathSegCurvetoCubicRel extends SVGPathSeg native "*SVGPathSegCurvetoCubicRel" {
-
-  /** @domName SVGPathSegCurvetoCubicRel.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoCubicRel.x1 */
-  num x1;
-
-  /** @domName SVGPathSegCurvetoCubicRel.x2 */
-  num x2;
-
-  /** @domName SVGPathSegCurvetoCubicRel.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoCubicRel.y1 */
-  num y1;
-
-  /** @domName SVGPathSegCurvetoCubicRel.y2 */
-  num y2;
-}
-
-/// @domName SVGPathSegCurvetoCubicSmoothAbs
-class SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg native "*SVGPathSegCurvetoCubicSmoothAbs" {
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
-  num x2;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
-  num y2;
-}
-
-/// @domName SVGPathSegCurvetoCubicSmoothRel
-class SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg native "*SVGPathSegCurvetoCubicSmoothRel" {
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
-  num x2;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
-  num y2;
-}
-
-/// @domName SVGPathSegCurvetoQuadraticAbs
-class SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticAbs" {
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
-  num x1;
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
-  num y1;
-}
-
-/// @domName SVGPathSegCurvetoQuadraticRel
-class SVGPathSegCurvetoQuadraticRel extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticRel" {
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
-  num x1;
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y */
-  num y;
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
-  num y1;
-}
-
-/// @domName SVGPathSegCurvetoQuadraticSmoothAbs
-class SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticSmoothAbs" {
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
-  num y;
-}
-
-/// @domName SVGPathSegCurvetoQuadraticSmoothRel
-class SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticSmoothRel" {
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
-  num x;
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
-  num y;
-}
-
-/// @domName SVGPathSegLinetoAbs
-class SVGPathSegLinetoAbs extends SVGPathSeg native "*SVGPathSegLinetoAbs" {
-
-  /** @domName SVGPathSegLinetoAbs.x */
-  num x;
-
-  /** @domName SVGPathSegLinetoAbs.y */
-  num y;
-}
-
-/// @domName SVGPathSegLinetoHorizontalAbs
-class SVGPathSegLinetoHorizontalAbs extends SVGPathSeg native "*SVGPathSegLinetoHorizontalAbs" {
-
-  /** @domName SVGPathSegLinetoHorizontalAbs.x */
-  num x;
-}
-
-/// @domName SVGPathSegLinetoHorizontalRel
-class SVGPathSegLinetoHorizontalRel extends SVGPathSeg native "*SVGPathSegLinetoHorizontalRel" {
-
-  /** @domName SVGPathSegLinetoHorizontalRel.x */
-  num x;
-}
-
-/// @domName SVGPathSegLinetoRel
-class SVGPathSegLinetoRel extends SVGPathSeg native "*SVGPathSegLinetoRel" {
-
-  /** @domName SVGPathSegLinetoRel.x */
-  num x;
-
-  /** @domName SVGPathSegLinetoRel.y */
-  num y;
-}
-
-/// @domName SVGPathSegLinetoVerticalAbs
-class SVGPathSegLinetoVerticalAbs extends SVGPathSeg native "*SVGPathSegLinetoVerticalAbs" {
-
-  /** @domName SVGPathSegLinetoVerticalAbs.y */
-  num y;
-}
-
-/// @domName SVGPathSegLinetoVerticalRel
-class SVGPathSegLinetoVerticalRel extends SVGPathSeg native "*SVGPathSegLinetoVerticalRel" {
-
-  /** @domName SVGPathSegLinetoVerticalRel.y */
-  num y;
-}
-
-/// @domName SVGPathSegList
-class SVGPathSegList implements JavaScriptIndexingBehavior, List<SVGPathSeg> native "*SVGPathSegList" {
-
-  /** @domName SVGPathSegList.numberOfItems */
-  final int numberOfItems;
-
-  SVGPathSeg operator[](int index) => JS("SVGPathSeg", "#[#]", this, index);
-
-  void operator[]=(int index, SVGPathSeg value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGPathSeg> mixins.
-  // SVGPathSeg is the element type.
-
-  // From Iterable<SVGPathSeg>:
-
-  Iterator<SVGPathSeg> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGPathSeg>(this);
-  }
-
-  // From Collection<SVGPathSeg>:
-
-  void add(SVGPathSeg value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGPathSeg value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGPathSeg> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGPathSeg element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f);
-
-  Collection<SVGPathSeg> filter(bool f(SVGPathSeg element)) =>
-     _Collections.filter(this, <SVGPathSeg>[], f);
-
-  bool every(bool f(SVGPathSeg element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGPathSeg element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGPathSeg>:
-
-  void sort([Comparator<SVGPathSeg> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGPathSeg element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGPathSeg element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGPathSeg get last => this[length - 1];
-
-  SVGPathSeg removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGPathSeg initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGPathSeg> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGPathSeg>[]);
-
-  // -- end List<SVGPathSeg> mixins.
-
-  /** @domName SVGPathSegList.appendItem */
-  SVGPathSeg appendItem(SVGPathSeg newItem) native;
-
-  /** @domName SVGPathSegList.clear */
-  void clear() native;
-
-  /** @domName SVGPathSegList.getItem */
-  SVGPathSeg getItem(int index) native;
-
-  /** @domName SVGPathSegList.initialize */
-  SVGPathSeg initialize(SVGPathSeg newItem) native;
-
-  /** @domName SVGPathSegList.insertItemBefore */
-  SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index) native;
-
-  /** @domName SVGPathSegList.removeItem */
-  SVGPathSeg removeItem(int index) native;
-
-  /** @domName SVGPathSegList.replaceItem */
-  SVGPathSeg replaceItem(SVGPathSeg newItem, int index) native;
-}
-
-/// @domName SVGPathSegMovetoAbs
-class SVGPathSegMovetoAbs extends SVGPathSeg native "*SVGPathSegMovetoAbs" {
-
-  /** @domName SVGPathSegMovetoAbs.x */
-  num x;
-
-  /** @domName SVGPathSegMovetoAbs.y */
-  num y;
-}
-
-/// @domName SVGPathSegMovetoRel
-class SVGPathSegMovetoRel extends SVGPathSeg native "*SVGPathSegMovetoRel" {
-
-  /** @domName SVGPathSegMovetoRel.x */
-  num x;
-
-  /** @domName SVGPathSegMovetoRel.y */
-  num y;
-}
-
-/// @domName SVGPatternElement
-class SVGPatternElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGFitToViewBox, SVGExternalResourcesRequired native "*SVGPatternElement" {
-
-  /** @domName SVGPatternElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGPatternElement.patternContentUnits */
-  final SVGAnimatedEnumeration patternContentUnits;
-
-  /** @domName SVGPatternElement.patternTransform */
-  final SVGAnimatedTransformList patternTransform;
-
-  /** @domName SVGPatternElement.patternUnits */
-  final SVGAnimatedEnumeration patternUnits;
-
-  /** @domName SVGPatternElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGPatternElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGPatternElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFitToViewBox
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGFitToViewBox.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGPoint
-class SVGPoint native "*SVGPoint" {
-
-  /** @domName SVGPoint.x */
-  num x;
-
-  /** @domName SVGPoint.y */
-  num y;
-
-  /** @domName SVGPoint.matrixTransform */
-  SVGPoint matrixTransform(SVGMatrix matrix) native;
-}
-
-/// @domName SVGPointList
-class SVGPointList native "*SVGPointList" {
-
-  /** @domName SVGPointList.numberOfItems */
-  final int numberOfItems;
-
-  /** @domName SVGPointList.appendItem */
-  SVGPoint appendItem(SVGPoint item) native;
-
-  /** @domName SVGPointList.clear */
-  void clear() native;
-
-  /** @domName SVGPointList.getItem */
-  SVGPoint getItem(int index) native;
-
-  /** @domName SVGPointList.initialize */
-  SVGPoint initialize(SVGPoint item) native;
-
-  /** @domName SVGPointList.insertItemBefore */
-  SVGPoint insertItemBefore(SVGPoint item, int index) native;
-
-  /** @domName SVGPointList.removeItem */
-  SVGPoint removeItem(int index) native;
-
-  /** @domName SVGPointList.replaceItem */
-  SVGPoint replaceItem(SVGPoint item, int index) native;
-}
-
-/// @domName SVGPolygonElement
-class SVGPolygonElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPolygonElement" {
-
-  /** @domName SVGPolygonElement.animatedPoints */
-  final SVGPointList animatedPoints;
-
-  /** @domName SVGPolygonElement.points */
-  final SVGPointList points;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGPolylineElement
-class SVGPolylineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPolylineElement" {
-
-  /** @domName SVGPolylineElement.animatedPoints */
-  final SVGPointList animatedPoints;
-
-  /** @domName SVGPolylineElement.points */
-  final SVGPointList points;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGPreserveAspectRatio
-class SVGPreserveAspectRatio native "*SVGPreserveAspectRatio" {
-
-  static const int SVG_MEETORSLICE_MEET = 1;
-
-  static const int SVG_MEETORSLICE_SLICE = 2;
-
-  static const int SVG_MEETORSLICE_UNKNOWN = 0;
-
-  static const int SVG_PRESERVEASPECTRATIO_NONE = 1;
-
-  static const int SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
-
-  /** @domName SVGPreserveAspectRatio.align */
-  int align;
-
-  /** @domName SVGPreserveAspectRatio.meetOrSlice */
-  int meetOrSlice;
-}
-
-/// @domName SVGRadialGradientElement
-class SVGRadialGradientElement extends SVGGradientElement native "*SVGRadialGradientElement" {
-
-  /** @domName SVGRadialGradientElement.cx */
-  final SVGAnimatedLength cx;
-
-  /** @domName SVGRadialGradientElement.cy */
-  final SVGAnimatedLength cy;
-
-  /** @domName SVGRadialGradientElement.fr */
-  final SVGAnimatedLength fr;
-
-  /** @domName SVGRadialGradientElement.fx */
-  final SVGAnimatedLength fx;
-
-  /** @domName SVGRadialGradientElement.fy */
-  final SVGAnimatedLength fy;
-
-  /** @domName SVGRadialGradientElement.r */
-  final SVGAnimatedLength r;
-}
-
-/// @domName SVGRect
-class SVGRect native "*SVGRect" {
-
-  /** @domName SVGRect.height */
-  num height;
-
-  /** @domName SVGRect.width */
-  num width;
-
-  /** @domName SVGRect.x */
-  num x;
-
-  /** @domName SVGRect.y */
-  num y;
-}
-
-/// @domName SVGRectElement
-class SVGRectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGRectElement" {
-
-  /** @domName SVGRectElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGRectElement.rx */
-  final SVGAnimatedLength rx;
-
-  /** @domName SVGRectElement.ry */
-  final SVGAnimatedLength ry;
-
-  /** @domName SVGRectElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGRectElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGRectElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGRenderingIntent
-class SVGRenderingIntent native "*SVGRenderingIntent" {
-
-  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
-
-  static const int RENDERING_INTENT_AUTO = 1;
-
-  static const int RENDERING_INTENT_PERCEPTUAL = 2;
-
-  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
-
-  static const int RENDERING_INTENT_SATURATION = 4;
-
-  static const int RENDERING_INTENT_UNKNOWN = 0;
-}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class SVGSVGElement extends SVGElement implements SVGZoomAndPan, SVGLocatable, SVGLangSpace, SVGTests, SVGStylable, SVGFitToViewBox, SVGExternalResourcesRequired native "*SVGSVGElement" {
-  factory SVGSVGElement() => _SVGSVGElementFactoryProvider.createSVGSVGElement();
-
-
-  /** @domName SVGSVGElement.contentScriptType */
-  String contentScriptType;
-
-  /** @domName SVGSVGElement.contentStyleType */
-  String contentStyleType;
-
-  /** @domName SVGSVGElement.currentScale */
-  num currentScale;
-
-  /** @domName SVGSVGElement.currentTranslate */
-  final SVGPoint currentTranslate;
-
-  /** @domName SVGSVGElement.currentView */
-  final SVGViewSpec currentView;
-
-  /** @domName SVGSVGElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGSVGElement.pixelUnitToMillimeterX */
-  final num pixelUnitToMillimeterX;
-
-  /** @domName SVGSVGElement.pixelUnitToMillimeterY */
-  final num pixelUnitToMillimeterY;
-
-  /** @domName SVGSVGElement.screenPixelToMillimeterX */
-  final num screenPixelToMillimeterX;
-
-  /** @domName SVGSVGElement.screenPixelToMillimeterY */
-  final num screenPixelToMillimeterY;
-
-  /** @domName SVGSVGElement.useCurrentView */
-  final bool useCurrentView;
-
-  /** @domName SVGSVGElement.viewport */
-  final SVGRect viewport;
-
-  /** @domName SVGSVGElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGSVGElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGSVGElement.y */
-  final SVGAnimatedLength y;
-
-  /** @domName SVGSVGElement.animationsPaused */
-  bool animationsPaused() native;
-
-  /** @domName SVGSVGElement.checkEnclosure */
-  bool checkEnclosure(SVGElement element, SVGRect rect) native;
-
-  /** @domName SVGSVGElement.checkIntersection */
-  bool checkIntersection(SVGElement element, SVGRect rect) native;
-
-  /** @domName SVGSVGElement.createSVGAngle */
-  SVGAngle createSVGAngle() native;
-
-  /** @domName SVGSVGElement.createSVGLength */
-  SVGLength createSVGLength() native;
-
-  /** @domName SVGSVGElement.createSVGMatrix */
-  SVGMatrix createSVGMatrix() native;
-
-  /** @domName SVGSVGElement.createSVGNumber */
-  SVGNumber createSVGNumber() native;
-
-  /** @domName SVGSVGElement.createSVGPoint */
-  SVGPoint createSVGPoint() native;
-
-  /** @domName SVGSVGElement.createSVGRect */
-  SVGRect createSVGRect() native;
-
-  /** @domName SVGSVGElement.createSVGTransform */
-  SVGTransform createSVGTransform() native;
-
-  /** @domName SVGSVGElement.createSVGTransformFromMatrix */
-  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native;
-
-  /** @domName SVGSVGElement.deselectAll */
-  void deselectAll() native;
-
-  /** @domName SVGSVGElement.forceRedraw */
-  void forceRedraw() native;
-
-  /** @domName SVGSVGElement.getCurrentTime */
-  num getCurrentTime() native;
-
-  /** @domName SVGSVGElement.getElementById */
-  Element getElementById(String elementId) native;
-
-  /** @domName SVGSVGElement.getEnclosureList */
-  List<Node> getEnclosureList(SVGRect rect, SVGElement referenceElement) native;
-
-  /** @domName SVGSVGElement.getIntersectionList */
-  List<Node> getIntersectionList(SVGRect rect, SVGElement referenceElement) native;
-
-  /** @domName SVGSVGElement.pauseAnimations */
-  void pauseAnimations() native;
-
-  /** @domName SVGSVGElement.setCurrentTime */
-  void setCurrentTime(num seconds) native;
-
-  /** @domName SVGSVGElement.suspendRedraw */
-  int suspendRedraw(int maxWaitMilliseconds) native;
-
-  /** @domName SVGSVGElement.unpauseAnimations */
-  void unpauseAnimations() native;
-
-  /** @domName SVGSVGElement.unsuspendRedraw */
-  void unsuspendRedraw(int suspendHandleId) native;
-
-  /** @domName SVGSVGElement.unsuspendRedrawAll */
-  void unsuspendRedrawAll() native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFitToViewBox
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGFitToViewBox.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGZoomAndPan
-
-  /** @domName SVGZoomAndPan.zoomAndPan */
-  int zoomAndPan;
-
-}
-
-/// @domName SVGScriptElement
-class SVGScriptElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired native "*SVGScriptElement" {
-
-  /** @domName SVGScriptElement.type */
-  String type;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGSetElement
-class SVGSetElement extends SVGAnimationElement native "*SVGSetElement" {
-}
-
-/// @domName SVGStopElement
-class SVGStopElement extends SVGElement implements SVGStylable native "*SVGStopElement" {
-
-  /** @domName SVGStopElement.offset */
-  final SVGAnimatedNumber offset;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGStringList
-class SVGStringList implements JavaScriptIndexingBehavior, List<String> native "*SVGStringList" {
-
-  /** @domName SVGStringList.numberOfItems */
-  final int numberOfItems;
-
-  String operator[](int index) => JS("String", "#[#]", this, index);
-
-  void operator[]=(int index, String value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<String> mixins.
-  // String is the element type.
-
-  // From Iterable<String>:
-
-  Iterator<String> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<String>(this);
-  }
-
-  // From Collection<String>:
-
-  void add(String value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(String value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<String> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(String element) => _Collections.contains(this, element);
-
-  void forEach(void f(String element)) => _Collections.forEach(this, f);
-
-  Collection map(f(String element)) => _Collections.map(this, [], f);
-
-  Collection<String> filter(bool f(String element)) =>
-     _Collections.filter(this, <String>[], f);
-
-  bool every(bool f(String element)) => _Collections.every(this, f);
-
-  bool some(bool f(String element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<String>:
-
-  void sort([Comparator<String> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(String element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(String element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  String get last => this[length - 1];
-
-  String removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [String initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<String> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <String>[]);
-
-  // -- end List<String> mixins.
-
-  /** @domName SVGStringList.appendItem */
-  String appendItem(String item) native;
-
-  /** @domName SVGStringList.clear */
-  void clear() native;
-
-  /** @domName SVGStringList.getItem */
-  String getItem(int index) native;
-
-  /** @domName SVGStringList.initialize */
-  String initialize(String item) native;
-
-  /** @domName SVGStringList.insertItemBefore */
-  String insertItemBefore(String item, int index) native;
-
-  /** @domName SVGStringList.removeItem */
-  String removeItem(int index) native;
-
-  /** @domName SVGStringList.replaceItem */
-  String replaceItem(String item, int index) native;
-}
-/// @domName SVGStylable
-abstract class SVGStylable {
-
-  SVGAnimatedString className;
-
-  CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name);
-}
-
-/// @domName SVGStyleElement
-class SVGStyleElement extends SVGElement implements SVGLangSpace native "*SVGStyleElement" {
-
-  /** @domName SVGStyleElement.disabled */
-  bool disabled;
-
-  /** @domName SVGStyleElement.media */
-  String media;
-
-  // Shadowing definition.
-  /** @domName SVGStyleElement.title */
-  String get title => JS("String", "#.title", this);
-
-  /** @domName SVGStyleElement.title */
-  void set title(String value) {
-    JS("void", "#.title = #", this, value);
-  }
-
-  /** @domName SVGStyleElement.type */
-  String type;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-}
-
-/// @domName SVGSwitchElement
-class SVGSwitchElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGSwitchElement" {
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGSymbolElement
-class SVGSymbolElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable native "*SVGSymbolElement" {
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFitToViewBox
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGFitToViewBox.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGTRefElement
-class SVGTRefElement extends SVGTextPositioningElement implements SVGURIReference native "*SVGTRefElement" {
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGTSpanElement
-class SVGTSpanElement extends SVGTextPositioningElement native "*SVGTSpanElement" {
-}
-/// @domName SVGTests
-abstract class SVGTests {
-
-  SVGStringList requiredExtensions;
-
-  SVGStringList requiredFeatures;
-
-  SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension);
-}
-
-/// @domName SVGTextContentElement
-class SVGTextContentElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired native "*SVGTextContentElement" {
-
-  static const int LENGTHADJUST_SPACING = 1;
-
-  static const int LENGTHADJUST_SPACINGANDGLYPHS = 2;
-
-  static const int LENGTHADJUST_UNKNOWN = 0;
-
-  /** @domName SVGTextContentElement.lengthAdjust */
-  final SVGAnimatedEnumeration lengthAdjust;
-
-  /** @domName SVGTextContentElement.textLength */
-  final SVGAnimatedLength textLength;
-
-  /** @domName SVGTextContentElement.getCharNumAtPosition */
-  int getCharNumAtPosition(SVGPoint point) native;
-
-  /** @domName SVGTextContentElement.getComputedTextLength */
-  num getComputedTextLength() native;
-
-  /** @domName SVGTextContentElement.getEndPositionOfChar */
-  SVGPoint getEndPositionOfChar(int offset) native;
-
-  /** @domName SVGTextContentElement.getExtentOfChar */
-  SVGRect getExtentOfChar(int offset) native;
-
-  /** @domName SVGTextContentElement.getNumberOfChars */
-  int getNumberOfChars() native;
-
-  /** @domName SVGTextContentElement.getRotationOfChar */
-  num getRotationOfChar(int offset) native;
-
-  /** @domName SVGTextContentElement.getStartPositionOfChar */
-  SVGPoint getStartPositionOfChar(int offset) native;
-
-  /** @domName SVGTextContentElement.getSubStringLength */
-  num getSubStringLength(int offset, int length) native;
-
-  /** @domName SVGTextContentElement.selectSubString */
-  void selectSubString(int offset, int length) native;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-}
-
-/// @domName SVGTextElement
-class SVGTextElement extends SVGTextPositioningElement implements SVGTransformable native "*SVGTextElement" {
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-}
-
-/// @domName SVGTextPathElement
-class SVGTextPathElement extends SVGTextContentElement implements SVGURIReference native "*SVGTextPathElement" {
-
-  static const int TEXTPATH_METHODTYPE_ALIGN = 1;
-
-  static const int TEXTPATH_METHODTYPE_STRETCH = 2;
-
-  static const int TEXTPATH_METHODTYPE_UNKNOWN = 0;
-
-  static const int TEXTPATH_SPACINGTYPE_AUTO = 1;
-
-  static const int TEXTPATH_SPACINGTYPE_EXACT = 2;
-
-  static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
-
-  /** @domName SVGTextPathElement.method */
-  final SVGAnimatedEnumeration method;
-
-  /** @domName SVGTextPathElement.spacing */
-  final SVGAnimatedEnumeration spacing;
-
-  /** @domName SVGTextPathElement.startOffset */
-  final SVGAnimatedLength startOffset;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGTextPositioningElement
-class SVGTextPositioningElement extends SVGTextContentElement native "*SVGTextPositioningElement" {
-
-  /** @domName SVGTextPositioningElement.dx */
-  final SVGAnimatedLengthList dx;
-
-  /** @domName SVGTextPositioningElement.dy */
-  final SVGAnimatedLengthList dy;
-
-  /** @domName SVGTextPositioningElement.rotate */
-  final SVGAnimatedNumberList rotate;
-
-  /** @domName SVGTextPositioningElement.x */
-  final SVGAnimatedLengthList x;
-
-  /** @domName SVGTextPositioningElement.y */
-  final SVGAnimatedLengthList y;
-}
-
-/// @domName SVGTitleElement
-class SVGTitleElement extends SVGElement implements SVGLangSpace, SVGStylable native "*SVGTitleElement" {
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-}
-
-/// @domName SVGTransform
-class SVGTransform native "*SVGTransform" {
-
-  static const int SVG_TRANSFORM_MATRIX = 1;
-
-  static const int SVG_TRANSFORM_ROTATE = 4;
-
-  static const int SVG_TRANSFORM_SCALE = 3;
-
-  static const int SVG_TRANSFORM_SKEWX = 5;
-
-  static const int SVG_TRANSFORM_SKEWY = 6;
-
-  static const int SVG_TRANSFORM_TRANSLATE = 2;
-
-  static const int SVG_TRANSFORM_UNKNOWN = 0;
-
-  /** @domName SVGTransform.angle */
-  final num angle;
-
-  /** @domName SVGTransform.matrix */
-  final SVGMatrix matrix;
-
-  /** @domName SVGTransform.type */
-  final int type;
-
-  /** @domName SVGTransform.setMatrix */
-  void setMatrix(SVGMatrix matrix) native;
-
-  /** @domName SVGTransform.setRotate */
-  void setRotate(num angle, num cx, num cy) native;
-
-  /** @domName SVGTransform.setScale */
-  void setScale(num sx, num sy) native;
-
-  /** @domName SVGTransform.setSkewX */
-  void setSkewX(num angle) native;
-
-  /** @domName SVGTransform.setSkewY */
-  void setSkewY(num angle) native;
-
-  /** @domName SVGTransform.setTranslate */
-  void setTranslate(num tx, num ty) native;
-}
-
-/// @domName SVGTransformList
-class SVGTransformList implements JavaScriptIndexingBehavior, List<SVGTransform> native "*SVGTransformList" {
-
-  /** @domName SVGTransformList.numberOfItems */
-  final int numberOfItems;
-
-  SVGTransform operator[](int index) => JS("SVGTransform", "#[#]", this, index);
-
-  void operator[]=(int index, SVGTransform value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGTransform> mixins.
-  // SVGTransform is the element type.
-
-  // From Iterable<SVGTransform>:
-
-  Iterator<SVGTransform> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGTransform>(this);
-  }
-
-  // From Collection<SVGTransform>:
-
-  void add(SVGTransform value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGTransform value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGTransform> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGTransform element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGTransform element)) => _Collections.map(this, [], f);
-
-  Collection<SVGTransform> filter(bool f(SVGTransform element)) =>
-     _Collections.filter(this, <SVGTransform>[], f);
-
-  bool every(bool f(SVGTransform element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGTransform element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGTransform>:
-
-  void sort([Comparator<SVGTransform> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGTransform element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGTransform element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGTransform get last => this[length - 1];
-
-  SVGTransform removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGTransform initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGTransform> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGTransform>[]);
-
-  // -- end List<SVGTransform> mixins.
-
-  /** @domName SVGTransformList.appendItem */
-  SVGTransform appendItem(SVGTransform item) native;
-
-  /** @domName SVGTransformList.clear */
-  void clear() native;
-
-  /** @domName SVGTransformList.consolidate */
-  SVGTransform consolidate() native;
-
-  /** @domName SVGTransformList.createSVGTransformFromMatrix */
-  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native;
-
-  /** @domName SVGTransformList.getItem */
-  SVGTransform getItem(int index) native;
-
-  /** @domName SVGTransformList.initialize */
-  SVGTransform initialize(SVGTransform item) native;
-
-  /** @domName SVGTransformList.insertItemBefore */
-  SVGTransform insertItemBefore(SVGTransform item, int index) native;
-
-  /** @domName SVGTransformList.removeItem */
-  SVGTransform removeItem(int index) native;
-
-  /** @domName SVGTransformList.replaceItem */
-  SVGTransform replaceItem(SVGTransform item, int index) native;
-}
-/// @domName SVGTransformable
-abstract class SVGTransformable implements SVGLocatable {
-
-  SVGAnimatedTransformList transform;
-
-  // From SVGLocatable
-
-  SVGElement farthestViewportElement;
-
-  SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox();
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM();
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM();
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element);
-}
-/// @domName SVGURIReference
-abstract class SVGURIReference {
-
-  SVGAnimatedString href;
-}
-
-/// @domName SVGUnitTypes
-class SVGUnitTypes native "*SVGUnitTypes" {
-
-  static const int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
-
-  static const int SVG_UNIT_TYPE_UNKNOWN = 0;
-
-  static const int SVG_UNIT_TYPE_USERSPACEONUSE = 1;
-}
-
-/// @domName SVGUseElement
-class SVGUseElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGUseElement" {
-
-  /** @domName SVGUseElement.animatedInstanceRoot */
-  final SVGElementInstance animatedInstanceRoot;
-
-  /** @domName SVGUseElement.height */
-  final SVGAnimatedLength height;
-
-  /** @domName SVGUseElement.instanceRoot */
-  final SVGElementInstance instanceRoot;
-
-  /** @domName SVGUseElement.width */
-  final SVGAnimatedLength width;
-
-  /** @domName SVGUseElement.x */
-  final SVGAnimatedLength x;
-
-  /** @domName SVGUseElement.y */
-  final SVGAnimatedLength y;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGLangSpace
-
-  /** @domName SVGLangSpace.xmllang */
-  String xmllang;
-
-  /** @domName SVGLangSpace.xmlspace */
-  String xmlspace;
-
-  // From SVGLocatable
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  final SVGElement farthestViewportElement;
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  final SVGElement nearestViewportElement;
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native;
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native;
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native;
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native;
-
-  // From SVGStylable
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
-
-  // Use implementation from Element.
-  // final CSSStyleDeclaration style;
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native;
-
-  // From SVGTests
-
-  /** @domName SVGTests.requiredExtensions */
-  final SVGStringList requiredExtensions;
-
-  /** @domName SVGTests.requiredFeatures */
-  final SVGStringList requiredFeatures;
-
-  /** @domName SVGTests.systemLanguage */
-  final SVGStringList systemLanguage;
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native;
-
-  // From SVGTransformable
-
-  /** @domName SVGTransformable.transform */
-  final SVGAnimatedTransformList transform;
-
-  // From SVGURIReference
-
-  /** @domName SVGURIReference.href */
-  final SVGAnimatedString href;
-}
-
-/// @domName SVGVKernElement
-class SVGVKernElement extends SVGElement native "*SVGVKernElement" {
-}
-
-/// @domName SVGViewElement
-class SVGViewElement extends SVGElement implements SVGFitToViewBox, SVGZoomAndPan, SVGExternalResourcesRequired native "*SVGViewElement" {
-
-  /** @domName SVGViewElement.viewTarget */
-  final SVGStringList viewTarget;
-
-  // From SVGExternalResourcesRequired
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  final SVGAnimatedBoolean externalResourcesRequired;
-
-  // From SVGFitToViewBox
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGFitToViewBox.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  // From SVGZoomAndPan
-
-  /** @domName SVGZoomAndPan.zoomAndPan */
-  int zoomAndPan;
-}
-
-/// @domName SVGViewSpec
-class SVGViewSpec native "*SVGViewSpec" {
-
-  /** @domName SVGViewSpec.preserveAspectRatio */
-  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
-
-  /** @domName SVGViewSpec.preserveAspectRatioString */
-  final String preserveAspectRatioString;
-
-  /** @domName SVGViewSpec.transform */
-  final SVGTransformList transform;
-
-  /** @domName SVGViewSpec.transformString */
-  final String transformString;
-
-  /** @domName SVGViewSpec.viewBox */
-  final SVGAnimatedRect viewBox;
-
-  /** @domName SVGViewSpec.viewBoxString */
-  final String viewBoxString;
-
-  /** @domName SVGViewSpec.viewTarget */
-  final SVGElement viewTarget;
-
-  /** @domName SVGViewSpec.viewTargetString */
-  final String viewTargetString;
-
-  /** @domName SVGViewSpec.zoomAndPan */
-  int zoomAndPan;
-}
-/// @domName SVGZoomAndPan
-abstract class SVGZoomAndPan {
-
-  static const int SVG_ZOOMANDPAN_DISABLE = 1;
-
-  static const int SVG_ZOOMANDPAN_MAGNIFY = 2;
-
-  static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
-
-  int zoomAndPan;
-}
-
-/// @domName SVGZoomEvent
-class SVGZoomEvent extends UIEvent native "*SVGZoomEvent" {
-
-  /** @domName SVGZoomEvent.newScale */
-  final num newScale;
-
-  /** @domName SVGZoomEvent.newTranslate */
-  final SVGPoint newTranslate;
-
-  /** @domName SVGZoomEvent.previousScale */
-  final num previousScale;
-
-  /** @domName SVGZoomEvent.previousTranslate */
-  final SVGPoint previousTranslate;
-
-  /** @domName SVGZoomEvent.zoomRectScreen */
-  final SVGRect zoomRectScreen;
-}
 
 /// @domName Screen
 class Screen native "*Screen" {
@@ -20138,6 +15668,10 @@
   /** @domName Screen.width */
   final int width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLScriptElement
 class ScriptElement extends Element implements Element native "*HTMLScriptElement" {
@@ -20168,6 +15702,10 @@
   /** @domName HTMLScriptElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ScriptProcessorNode
 class ScriptProcessorNode extends AudioNode implements EventTarget native "*ScriptProcessorNode" {
@@ -20187,6 +15725,10 @@
 
   EventListenerList get audioProcess => this['audioprocess'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ScriptProfile
 class ScriptProfile native "*ScriptProfile" {
@@ -20200,6 +15742,10 @@
   /** @domName ScriptProfile.uid */
   final int uid;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ScriptProfileNode
 class ScriptProfileNode native "*ScriptProfileNode" {
@@ -20235,6 +15781,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class SelectElement extends Element implements Element native "*HTMLSelectElement" {
 
   factory SelectElement() => _Elements.createSelectElement();
@@ -20312,6 +15859,10 @@
     }
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SessionDescription
 class SessionDescription native "*SessionDescription" {
@@ -20324,6 +15875,10 @@
   /** @domName SessionDescription.toSdp */
   String toSdp() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLShadowElement
 class ShadowElement extends Element implements Element native "*HTMLShadowElement" {
@@ -20337,6 +15892,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class ShadowRoot extends DocumentFragment native "*ShadowRoot" {
 
   factory ShadowRoot(Element host) => _ShadowRootFactoryProvider.createShadowRoot(host);
@@ -20371,6 +15927,10 @@
   static bool get supported =>
       JS('bool', '!!(window.ShadowRoot || window.WebKitShadowRoot)');
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SharedWorker
 class SharedWorker extends AbstractWorker native "*SharedWorker" {
@@ -20385,6 +15945,10 @@
   /** @domName SharedWorker.port */
   final MessagePort port;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SharedWorkerContext
 class SharedWorkerContext extends WorkerContext native "*SharedWorkerContext" {
@@ -20404,6 +15968,10 @@
 
   EventListenerList get connect => this['connect'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SourceBuffer
 class SourceBuffer native "*SourceBuffer" {
@@ -20420,6 +15988,10 @@
   /** @domName SourceBuffer.append */
   void append(Uint8Array data) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SourceBufferList
 class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior, List<SourceBuffer> native "*SourceBufferList" {
@@ -20441,7 +16013,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SourceBuffer>(this);
+    return new FixedSizeListIterator<SourceBuffer>(this);
   }
 
   // From Collection<SourceBuffer>:
@@ -20522,6 +16094,10 @@
   /** @domName SourceBufferList.removeEventListener */
   void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "removeEventListener";
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLSourceElement
 class SourceElement extends Element implements Element native "*HTMLSourceElement" {
@@ -20537,12 +16113,20 @@
   /** @domName HTMLSourceElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLSpanElement
 class SpanElement extends Element implements Element native "*HTMLSpanElement" {
 
   factory SpanElement() => _Elements.createSpanElement();
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechGrammar
 class SpeechGrammar native "*SpeechGrammar" {
@@ -20555,6 +16139,10 @@
   /** @domName SpeechGrammar.weight */
   num weight;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechGrammarList
 class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "*SpeechGrammarList" {
@@ -20578,7 +16166,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechGrammar>(this);
+    return new FixedSizeListIterator<SpeechGrammar>(this);
   }
 
   // From Collection<SpeechGrammar>:
@@ -20656,6 +16244,10 @@
   /** @domName SpeechGrammarList.item */
   SpeechGrammar item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechInputEvent
 class SpeechInputEvent extends Event native "*SpeechInputEvent" {
@@ -20663,6 +16255,10 @@
   /** @domName SpeechInputEvent.results */
   final List<SpeechInputResult> results;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechInputResult
 class SpeechInputResult native "*SpeechInputResult" {
@@ -20673,6 +16269,10 @@
   /** @domName SpeechInputResult.utterance */
   final String utterance;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognition
 class SpeechRecognition extends EventTarget native "*SpeechRecognition" {
@@ -20744,6 +16344,10 @@
 
   EventListenerList get start => this['start'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognitionAlternative
 class SpeechRecognitionAlternative native "*SpeechRecognitionAlternative" {
@@ -20754,6 +16358,10 @@
   /** @domName SpeechRecognitionAlternative.transcript */
   final String transcript;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognitionError
 class SpeechRecognitionError extends Event native "*SpeechRecognitionError" {
@@ -20782,6 +16390,10 @@
   /** @domName SpeechRecognitionError.message */
   final String message;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognitionEvent
 class SpeechRecognitionEvent extends Event native "*SpeechRecognitionEvent" {
@@ -20795,6 +16407,10 @@
   /** @domName SpeechRecognitionEvent.resultIndex */
   final int resultIndex;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognitionResult
 class SpeechRecognitionResult native "*SpeechRecognitionResult" {
@@ -20815,6 +16431,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Storage implements Map<String, String>  native "*Storage" {
 
   // TODO(nweiz): update this when maps support lazy iteration
@@ -20883,6 +16500,10 @@
   void $dom_setItem(String key, String data) native "setItem";
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName StorageEvent
 class StorageEvent extends Event native "*StorageEvent" {
@@ -20905,6 +16526,10 @@
   /** @domName StorageEvent.initStorageEvent */
   void initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName StorageInfo
 class StorageInfo native "*StorageInfo" {
@@ -20951,6 +16576,10 @@
 
 
 typedef void StringCallback(String data);
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLStyleElement
 class StyleElement extends Element implements Element native "*HTMLStyleElement" {
@@ -20972,6 +16601,10 @@
   /** @domName HTMLStyleElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName StyleMedia
 class StyleMedia native "*StyleMedia" {
@@ -20982,6 +16615,10 @@
   /** @domName StyleMedia.matchMedium */
   bool matchMedium(String mediaquery) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName StyleSheet
 class StyleSheet native "*StyleSheet" {
@@ -21007,6 +16644,10 @@
   /** @domName StyleSheet.type */
   final String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTableCaptionElement
 class TableCaptionElement extends Element implements Element native "*HTMLTableCaptionElement" {
@@ -21016,6 +16657,10 @@
   /** @domName HTMLTableCaptionElement.align */
   String align;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTableCellElement
 class TableCellElement extends Element implements Element native "*HTMLTableCellElement" {
@@ -21067,6 +16712,10 @@
   /** @domName HTMLTableCellElement.width */
   String width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTableColElement
 class TableColElement extends Element implements Element native "*HTMLTableColElement" {
@@ -21095,6 +16744,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class TableElement extends Element implements Element native "*HTMLTableElement" {
 
   factory TableElement() => _Elements.createTableElement();
@@ -21177,6 +16827,10 @@
 
   Element _createTBody() native 'createTBody';
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTableRowElement
 class TableRowElement extends Element implements Element native "*HTMLTableRowElement" {
@@ -21213,6 +16867,10 @@
   /** @domName HTMLTableRowElement.insertCell */
   Element insertCell(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTableSectionElement
 class TableSectionElement extends Element implements Element native "*HTMLTableSectionElement" {
@@ -21244,6 +16902,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Text extends CharacterData native "*Text" {
   factory Text(String data) => _TextFactoryProvider.createText(data);
 
@@ -21257,6 +16916,10 @@
   Text splitText(int offset) native;
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTextAreaElement
 class TextAreaElement extends Element implements Element native "*HTMLTextAreaElement" {
@@ -21347,6 +17010,10 @@
   /** @domName HTMLTextAreaElement.setSelectionRange */
   void setSelectionRange(int start, int end, [String direction]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextEvent
 class TextEvent extends UIEvent native "*TextEvent" {
@@ -21357,6 +17024,10 @@
   /** @domName TextEvent.initTextEvent */
   void initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, LocalWindow viewArg, String dataArg) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextMetrics
 class TextMetrics native "*TextMetrics" {
@@ -21364,6 +17035,10 @@
   /** @domName TextMetrics.width */
   final num width;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextTrack
 class TextTrack extends EventTarget native "*TextTrack" {
@@ -21413,6 +17088,10 @@
 
   EventListenerList get cueChange => this['cuechange'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextTrackCue
 class TextTrackCue extends EventTarget native "*TextTrackCue" {
@@ -21481,6 +17160,10 @@
 
   EventListenerList get exit => this['exit'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextTrackCueList
 class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior native "*TextTrackCueList" {
@@ -21502,7 +17185,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<TextTrackCue>(this);
+    return new FixedSizeListIterator<TextTrackCue>(this);
   }
 
   // From Collection<TextTrackCue>:
@@ -21577,6 +17260,10 @@
   /** @domName TextTrackCueList.item */
   TextTrackCue item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TextTrackList
 class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, List<TextTrack> native "*TextTrackList" {
@@ -21604,7 +17291,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<TextTrack>(this);
+    return new FixedSizeListIterator<TextTrack>(this);
   }
 
   // From Collection<TextTrack>:
@@ -21691,6 +17378,10 @@
 
   EventListenerList get addTrack => this['addtrack'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TimeRanges
 class TimeRanges native "*TimeRanges" {
@@ -21712,12 +17403,20 @@
 
 
 typedef void TimeoutHandler();
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTitleElement
 class TitleElement extends Element implements Element native "*HTMLTitleElement" {
 
   factory TitleElement() => _Elements.createTitleElement();
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Touch
 class Touch native "*Touch" {
@@ -21745,7 +17444,7 @@
 
   /** @domName Touch.target */
   EventTarget get target => _convertNativeToDart_EventTarget(this._target);
-  EventTarget get _target => JS("EventTarget", "#.target", this);
+  dynamic get _target => JS("dynamic", "#.target", this);
 
   /** @domName Touch.webkitForce */
   final num webkitForce;
@@ -21759,6 +17458,10 @@
   /** @domName Touch.webkitRotationAngle */
   final num webkitRotationAngle;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TouchEvent
 class TouchEvent extends UIEvent native "*TouchEvent" {
@@ -21787,6 +17490,10 @@
   /** @domName TouchEvent.initTouchEvent */
   void initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, LocalWindow view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TouchList
 class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*TouchList" {
@@ -21808,7 +17515,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Touch>(this);
+    return new FixedSizeListIterator<Touch>(this);
   }
 
   // From Collection<Touch>:
@@ -21880,6 +17587,10 @@
   /** @domName TouchList.item */
   Touch item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLTrackElement
 class TrackElement extends Element implements Element native "*HTMLTrackElement" {
@@ -21920,6 +17631,10 @@
   /** @domName HTMLTrackElement.track */
   final TextTrack track;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TrackEvent
 class TrackEvent extends Event native "*TrackEvent" {
@@ -21927,6 +17642,10 @@
   /** @domName TrackEvent.track */
   final Object track;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitTransitionEvent
 class TransitionEvent extends Event native "*WebKitTransitionEvent" {
@@ -21937,6 +17656,10 @@
   /** @domName WebKitTransitionEvent.propertyName */
   final String propertyName;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName TreeWalker
 class TreeWalker native "*TreeWalker" {
@@ -21977,6 +17700,10 @@
   /** @domName TreeWalker.previousSibling */
   Node previousSibling() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName UIEvent
 class UIEvent extends Event native "*UIEvent" {
@@ -22004,7 +17731,7 @@
 
   /** @domName UIEvent.view */
   Window get view => _convertNativeToDart_Window(this._view);
-  Window get _view => JS("Window", "#.view", this);
+  dynamic get _view => JS("dynamic", "#.view", this);
 
   /** @domName UIEvent.which */
   final int which;
@@ -22012,6 +17739,10 @@
   /** @domName UIEvent.initUIEvent */
   void initUIEvent(String type, bool canBubble, bool cancelable, LocalWindow view, int detail) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLUListElement
 class UListElement extends Element implements Element native "*HTMLUListElement" {
@@ -22024,6 +17755,10 @@
   /** @domName HTMLUListElement.type */
   String type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Uint16Array
 class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint16Array" {
@@ -22054,7 +17789,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -22129,6 +17864,10 @@
   /** @domName Uint16Array.subarray */
   Uint16Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Uint32Array
 class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint32Array" {
@@ -22159,7 +17898,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -22234,6 +17973,10 @@
   /** @domName Uint32Array.subarray */
   Uint32Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Uint8Array
 class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint8Array" {
@@ -22264,7 +18007,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -22339,6 +18082,10 @@
   /** @domName Uint8Array.subarray */
   Uint8Array subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Uint8ClampedArray
 class Uint8ClampedArray extends Uint8Array native "*Uint8ClampedArray" {
@@ -22361,6 +18108,10 @@
   /** @domName Uint8ClampedArray.subarray */
   Uint8ClampedArray subarray(int start, [int end]) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLUnknownElement
 class UnknownElement extends Element implements Element native "*HTMLUnknownElement" {
@@ -22369,6 +18120,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Url native "*URL" {
 
   static String createObjectUrl(blob_OR_source_OR_stream) =>
@@ -22381,6 +18133,10 @@
          '(window.URL || window.webkitURL).revokeObjectURL(#)', objectUrl);
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ValidityState
 class ValidityState native "*ValidityState" {
@@ -22412,6 +18168,10 @@
   /** @domName ValidityState.valueMissing */
   final bool valueMissing;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName HTMLVideoElement
 class VideoElement extends MediaElement native "*HTMLVideoElement" {
@@ -22465,6 +18225,10 @@
 
 
 typedef void VoidCallback();
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WaveShaperNode
 class WaveShaperNode extends AudioNode native "*WaveShaperNode" {
@@ -22472,10 +18236,18 @@
   /** @domName WaveShaperNode.curve */
   Float32Array curve;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WaveTable
 class WaveTable native "*WaveTable" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLActiveInfo
 class WebGLActiveInfo native "*WebGLActiveInfo" {
@@ -22489,10 +18261,18 @@
   /** @domName WebGLActiveInfo.type */
   final int type;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLBuffer
 class WebGLBuffer native "*WebGLBuffer" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLCompressedTextureS3TC
 class WebGLCompressedTextureS3TC native "*WebGLCompressedTextureS3TC" {
@@ -22505,6 +18285,10 @@
 
   static const int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLContextAttributes
 class WebGLContextAttributes native "*WebGLContextAttributes" {
@@ -22527,6 +18311,10 @@
   /** @domName WebGLContextAttributes.stencil */
   bool stencil;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLContextEvent
 class WebGLContextEvent extends Event native "*WebGLContextEvent" {
@@ -22534,6 +18322,10 @@
   /** @domName WebGLContextEvent.statusMessage */
   final String statusMessage;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLDebugRendererInfo
 class WebGLDebugRendererInfo native "*WebGLDebugRendererInfo" {
@@ -22542,6 +18334,10 @@
 
   static const int UNMASKED_VENDOR_WEBGL = 0x9245;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLDebugShaders
 class WebGLDebugShaders native "*WebGLDebugShaders" {
@@ -22549,16 +18345,28 @@
   /** @domName WebGLDebugShaders.getTranslatedShaderSource */
   String getTranslatedShaderSource(WebGLShader shader) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLDepthTexture
 class WebGLDepthTexture native "*WebGLDepthTexture" {
 
   static const int UNSIGNED_INT_24_8_WEBGL = 0x84FA;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLFramebuffer
 class WebGLFramebuffer native "*WebGLFramebuffer" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLLoseContext
 class WebGLLoseContext native "*WebGLLoseContext" {
@@ -22569,14 +18377,26 @@
   /** @domName WebGLLoseContext.restoreContext */
   void restoreContext() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLProgram
 class WebGLProgram native "*WebGLProgram" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLRenderbuffer
 class WebGLRenderbuffer native "*WebGLRenderbuffer" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLRenderingContext
 class WebGLRenderingContext extends CanvasRenderingContext native "*WebGLRenderingContext" {
@@ -23484,15 +19304,12 @@
   void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
 
   /** @domName WebGLRenderingContext.texImage2D */
-  void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [format, type, pixels]) {
-    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
-        (format is int || format == null) &&
-        (type is int || type == null) &&
-        (pixels is ArrayBufferView || pixels == null)) {
+  void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]) {
+    if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && (border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null))) {
       _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
       return;
     }
-    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
+    if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) &&
         !?format &&
         !?type &&
         !?pixels) {
@@ -23500,21 +19317,21 @@
       _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, pixels_1);
       return;
     }
-    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
+    if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) &&
         !?format &&
         !?type &&
         !?pixels) {
       _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
-    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
+    if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && (border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) &&
         !?format &&
         !?type &&
         !?pixels) {
       _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
       return;
     }
-    if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
+    if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && (border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) &&
         !?format &&
         !?type &&
         !?pixels) {
@@ -23523,7 +19340,7 @@
     }
     throw const Exception("Incorrect number or type of arguments");
   }
-  void _texImage2D_1(target, level, internalformat, width, height, int border, int format, int type, ArrayBufferView pixels) native "texImage2D";
+  void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, ArrayBufferView pixels) native "texImage2D";
   void _texImage2D_2(target, level, internalformat, format, type, pixels) native "texImage2D";
   void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native "texImage2D";
   void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native "texImage2D";
@@ -23536,33 +19353,31 @@
   void texParameteri(int target, int pname, int param) native;
 
   /** @domName WebGLRenderingContext.texSubImage2D */
-  void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [type, pixels]) {
-    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
-        (type is int || type == null) &&
-        (pixels is ArrayBufferView || pixels == null)) {
+  void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]) {
+    if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && (canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null))) {
       _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
       return;
     }
-    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
+    if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) &&
         !?type &&
         !?pixels) {
       var pixels_1 = _convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_pixels_OR_video);
       _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, pixels_1);
       return;
     }
-    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
+    if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) &&
         !?type &&
         !?pixels) {
       _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
-    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
+    if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && (canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) &&
         !?type &&
         !?pixels) {
       _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
       return;
     }
-    if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
+    if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && (canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) &&
         !?type &&
         !?pixels) {
       _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
@@ -23570,7 +19385,7 @@
     }
     throw const Exception("Incorrect number or type of arguments");
   }
-  void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, int type, ArrayBufferView pixels) native "texSubImage2D";
+  void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, ArrayBufferView pixels) native "texSubImage2D";
   void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native "texSubImage2D";
   void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native "texSubImage2D";
   void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native "texSubImage2D";
@@ -23669,10 +19484,18 @@
   /** @domName WebGLRenderingContext.viewport */
   void viewport(int x, int y, int width, int height) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLShader
 class WebGLShader native "*WebGLShader" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLShaderPrecisionFormat
 class WebGLShaderPrecisionFormat native "*WebGLShaderPrecisionFormat" {
@@ -23686,18 +19509,34 @@
   /** @domName WebGLShaderPrecisionFormat.rangeMin */
   final int rangeMin;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLTexture
 class WebGLTexture native "*WebGLTexture" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLUniformLocation
 class WebGLUniformLocation native "*WebGLUniformLocation" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebGLVertexArrayObjectOES
 class WebGLVertexArrayObjectOES native "*WebGLVertexArrayObjectOES" {
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitCSSFilterValue
 class WebKitCSSFilterValue extends _CSSValueList native "*WebKitCSSFilterValue" {
@@ -23729,6 +19568,10 @@
   /** @domName WebKitCSSFilterValue.operationType */
   final int operationType;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitNamedFlow
 class WebKitNamedFlow extends EventTarget native "*WebKitNamedFlow" {
@@ -23766,6 +19609,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class WebSocket extends EventTarget native "*WebSocket" {
   factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url);
 
@@ -23836,6 +19680,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class WheelEvent extends MouseEvent native "*WheelEvent" {
 
   /** @domName WheelEvent.webkitDirectionInvertedFromDevice */
@@ -23918,6 +19763,10 @@
   int get _deltaMode => JS('int', '#.deltaMode', this);
 
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName Worker
 class Worker extends AbstractWorker native "*Worker" {
@@ -23931,7 +19780,7 @@
     new WorkerEvents(this);
 
   /** @domName Worker.postMessage */
-  void postMessage(/*SerializedScriptValue*/ message, [messagePorts]) {
+  void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) {
     if (?messagePorts) {
       var message_1 = _convertDartToNative_SerializedScriptValue(message);
       _postMessage_1(message_1, messagePorts);
@@ -23953,6 +19802,10 @@
 
   EventListenerList get message => this['message'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WorkerContext
 class WorkerContext extends EventTarget native "*WorkerContext" {
@@ -24036,6 +19889,10 @@
 
   EventListenerList get error => this['error'];
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WorkerLocation
 class WorkerLocation native "*WorkerLocation" {
@@ -24067,6 +19924,10 @@
   /** @domName WorkerLocation.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WorkerNavigator
 class WorkerNavigator native "*WorkerNavigator" {
@@ -24086,6 +19947,10 @@
   /** @domName WorkerNavigator.userAgent */
   final String userAgent;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XMLSerializer
 class XMLSerializer native "*XMLSerializer" {
@@ -24095,6 +19960,10 @@
   /** @domName XMLSerializer.serializeToString */
   String serializeToString(Node node) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XPathEvaluator
 class XPathEvaluator native "*XPathEvaluator" {
@@ -24110,6 +19979,10 @@
   /** @domName XPathEvaluator.evaluate */
   XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XPathException
 class XPathException native "*XPathException" {
@@ -24130,6 +20003,10 @@
   /** @domName XPathException.toString */
   String toString() native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XPathExpression
 class XPathExpression native "*XPathExpression" {
@@ -24137,6 +20014,10 @@
   /** @domName XPathExpression.evaluate */
   XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XPathNSResolver
 class XPathNSResolver native "*XPathNSResolver" {
@@ -24144,6 +20025,10 @@
   /** @domName XPathNSResolver.lookupNamespaceURI */
   String lookupNamespaceURI(String prefix) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XPathResult
 class XPathResult native "*XPathResult" {
@@ -24195,6 +20080,10 @@
   /** @domName XPathResult.snapshotItem */
   Node snapshotItem(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName XSLTProcessor
 class XSLTProcessor native "*XSLTProcessor" {
@@ -24229,6 +20118,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _ArrayBufferFactoryProvider {
   static ArrayBuffer createArrayBuffer(int length) =>
       JS('ArrayBuffer', 'new ArrayBuffer(#)', length);
@@ -24237,6 +20127,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _AudioElementFactoryProvider {
   static AudioElement createAudioElement([String src = null]) {
     if (src == null) return JS('AudioElement', 'new Audio()');
@@ -24247,6 +20138,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _BlobFactoryProvider {
   static Blob createBlob([List blobParts = null, String type, String endings]) {
     // TODO: validate that blobParts is a JS Array and convert if not.
@@ -24271,10 +20163,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _CSSMatrixFactoryProvider {
   static CSSMatrix createCSSMatrix([String cssValue = '']) =>
       JS('CSSMatrix', 'new WebKitCSSMatrix(#)', cssValue);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSRuleList
 class _CSSRuleList implements JavaScriptIndexingBehavior, List<CSSRule> native "*CSSRuleList" {
@@ -24296,7 +20193,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<CSSRule>(this);
+    return new FixedSizeListIterator<CSSRule>(this);
   }
 
   // From Collection<CSSRule>:
@@ -24368,6 +20265,10 @@
   /** @domName CSSRuleList.item */
   CSSRule item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName CSSValueList
 class _CSSValueList extends CSSValue implements List<CSSValue>, JavaScriptIndexingBehavior native "*CSSValueList" {
@@ -24389,7 +20290,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<CSSValue>(this);
+    return new FixedSizeListIterator<CSSValue>(this);
   }
 
   // From Collection<CSSValue>:
@@ -24461,6 +20362,10 @@
   /** @domName CSSValueList.item */
   CSSValue item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName ClientRectList
 class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> native "*ClientRectList" {
@@ -24482,7 +20387,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<ClientRect>(this);
+    return new FixedSizeListIterator<ClientRect>(this);
   }
 
   // From Collection<ClientRect>:
@@ -24558,10 +20463,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _DOMParserFactoryProvider {
   static DOMParser createDOMParser() =>
       JS('DOMParser', 'new DOMParser()' );
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName DOMStringList
 class _DOMStringList implements JavaScriptIndexingBehavior, List<String> native "*DOMStringList" {
@@ -24583,7 +20493,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<String>(this);
+    return new FixedSizeListIterator<String>(this);
   }
 
   // From Collection<String>:
@@ -24662,6 +20572,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _DataViewFactoryProvider {
   static DataView createDataView(
       ArrayBuffer buffer, [int byteOffset = null, int byteLength = null]) {
@@ -24979,6 +20890,10 @@
     return _e;
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EntryArray
 class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*EntryArray" {
@@ -25000,7 +20915,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Entry>(this);
+    return new FixedSizeListIterator<Entry>(this);
   }
 
   // From Collection<Entry>:
@@ -25072,6 +20987,10 @@
   /** @domName EntryArray.item */
   Entry item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName EntryArraySync
 class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> native "*EntryArraySync" {
@@ -25093,7 +21012,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<EntrySync>(this);
+    return new FixedSizeListIterator<EntrySync>(this);
   }
 
   // From Collection<EntrySync>:
@@ -25169,10 +21088,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _EventSourceFactoryProvider {
   static EventSource createEventSource(String scriptUrl) =>
       JS('EventSource', 'new EventSource(#)', scriptUrl);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName FileList
 class _FileList implements JavaScriptIndexingBehavior, List<File> native "*FileList" {
@@ -25194,7 +21118,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<File>(this);
+    return new FixedSizeListIterator<File>(this);
   }
 
   // From Collection<File>:
@@ -25270,6 +21194,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FileReaderFactoryProvider {
   static FileReader createFileReader() =>
       JS('FileReader', 'new FileReader()' );
@@ -25278,6 +21203,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FileReaderSyncFactoryProvider {
   static FileReaderSync createFileReaderSync() =>
       JS('FileReaderSync', 'new FileReaderSync()' );
@@ -25286,12 +21212,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FormDataFactoryProvider {
   static FormData createFormData([FormElement form = null]) {
     if (form == null) return JS('FormData', 'new FormData()');
     return JS('FormData', 'new FormData(#)', form);
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName GamepadList
 class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "*GamepadList" {
@@ -25313,7 +21244,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Gamepad>(this);
+    return new FixedSizeListIterator<Gamepad>(this);
   }
 
   // From Collection<Gamepad>:
@@ -25389,6 +21320,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _HttpRequestFactoryProvider {
   static HttpRequest createHttpRequest() =>
       JS('HttpRequest', 'new XMLHttpRequest()');
@@ -25405,6 +21337,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _IceCandidateFactoryProvider {
   static IceCandidate createIceCandidate(String label, String candidateLine) =>
       JS('IceCandidate', 'new IceCandidate(#,#)', label, candidateLine);
@@ -25413,6 +21346,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaControllerFactoryProvider {
   static MediaController createMediaController() =>
       JS('MediaController', 'new MediaController()' );
@@ -25421,6 +21355,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaSourceFactoryProvider {
   static MediaSource createMediaSource() =>
       JS('MediaSource', 'new MediaSource()' );
@@ -25429,10 +21364,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaStreamFactoryProvider {
   static MediaStream createMediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks) =>
       JS('MediaStream', 'new MediaStream(#,#)', audioTracks, videoTracks);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName MediaStreamList
 class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream> native "*MediaStreamList" {
@@ -25454,7 +21394,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<MediaStream>(this);
+    return new FixedSizeListIterator<MediaStream>(this);
   }
 
   // From Collection<MediaStream>:
@@ -25530,6 +21470,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MessageChannelFactoryProvider {
   static MessageChannel createMessageChannel() =>
       JS('MessageChannel', 'new MessageChannel()' );
@@ -25538,8 +21479,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MutationObserverFactoryProvider {
-  static MutationObserver createMutationObserver(MutationCallback callback) native '''
+  static MutationObserver createMutationObserver(MutationCallback callback) {
+
+    // This is a hack to cause MutationRecord to appear to be instantiated.
+    //
+    // MutationCallback has a parameter type List<MutationRecord>.  From this we
+    // infer a list is created in the browser, but not the element type, because
+    // other native fields and methods return plain List which is too general
+    // and would imply creating anything.  This statement is a work-around.
+    JS('MutationRecord','0');
+
+    return _createMutationObserver(callback);
+  }
+
+  static MutationObserver _createMutationObserver(MutationCallback callback) native '''
     var constructor =
         window.MutationObserver || window.WebKitMutationObserver ||
         window.MozMutationObserver;
@@ -25560,6 +21515,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _NotificationFactoryProvider {
   static Notification createNotification(String title, [Map options]) =>
       JS('Notification', 'new Notification(#,#)', title, options);
@@ -25568,6 +21524,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _OptionElementFactoryProvider {
   static OptionElement createOptionElement(
       [String data, String value, bool defaultSelected, bool selected]) {
@@ -25592,6 +21549,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _PeerConnection00FactoryProvider {
   static PeerConnection00 createPeerConnection00(String serverConfiguration, IceCallback iceCallback) =>
       JS('PeerConnection00', 'new PeerConnection00(#,#)', serverConfiguration, iceCallback);
@@ -25600,6 +21558,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCIceCandidateFactoryProvider {
   static RTCIceCandidate createRTCIceCandidate(Map dictionary) =>
       JS('RTCIceCandidate', 'new RTCIceCandidate(#)', dictionary);
@@ -25608,6 +21567,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCPeerConnectionFactoryProvider {
   static RTCPeerConnection createRTCPeerConnection(Map rtcIceServers, [Map mediaConstraints]) =>
       JS('RTCPeerConnection', 'new RTCPeerConnection(#,#)', rtcIceServers, mediaConstraints);
@@ -25616,107 +21576,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCSessionDescriptionFactoryProvider {
   static RTCSessionDescription createRTCSessionDescription(Map dictionary) =>
       JS('RTCSessionDescription', 'new RTCSessionDescription(#)', dictionary);
 }
-
-/// @domName SVGElementInstanceList
-class _SVGElementInstanceList implements JavaScriptIndexingBehavior, List<SVGElementInstance> native "*SVGElementInstanceList" {
-
-  /** @domName SVGElementInstanceList.length */
-  final int length;
-
-  SVGElementInstance operator[](int index) => JS("SVGElementInstance", "#[#]", this, index);
-
-  void operator[]=(int index, SVGElementInstance value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGElementInstance> mixins.
-  // SVGElementInstance is the element type.
-
-  // From Iterable<SVGElementInstance>:
-
-  Iterator<SVGElementInstance> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGElementInstance>(this);
-  }
-
-  // From Collection<SVGElementInstance>:
-
-  void add(SVGElementInstance value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGElementInstance value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGElementInstance> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGElementInstance element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f);
-
-  Collection<SVGElementInstance> filter(bool f(SVGElementInstance element)) =>
-     _Collections.filter(this, <SVGElementInstance>[], f);
-
-  bool every(bool f(SVGElementInstance element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGElementInstance element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGElementInstance>:
-
-  void sort([Comparator<SVGElementInstance> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGElementInstance element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGElementInstance element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGElementInstance get last => this[length - 1];
-
-  SVGElementInstance removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGElementInstance initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGElementInstance> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
-
-  // -- end List<SVGElementInstance> mixins.
-
-  /** @domName SVGElementInstanceList.item */
-  SVGElementInstance item(int index) native;
-}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SessionDescriptionFactoryProvider {
   static SessionDescription createSessionDescription(String sdp) =>
       JS('SessionDescription', 'new SessionDescription(#)', sdp);
@@ -25725,6 +21594,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _ShadowRootFactoryProvider {
   static ShadowRoot createShadowRoot(Element host) =>
       JS('ShadowRoot',
@@ -25734,6 +21604,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SharedWorkerFactoryProvider {
   static SharedWorker createSharedWorker(String scriptURL, [String name]) {
     if (name == null) return JS('SharedWorker', 'new SharedWorker(#)', scriptURL);
@@ -25744,6 +21615,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechGrammarFactoryProvider {
   static SpeechGrammar createSpeechGrammar() =>
       JS('SpeechGrammar', 'new SpeechGrammar()' );
@@ -25752,10 +21624,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechGrammarListFactoryProvider {
   static SpeechGrammarList createSpeechGrammarList() =>
       JS('SpeechGrammarList', 'new SpeechGrammarList()' );
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechInputResultList
 class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechInputResult> native "*SpeechInputResultList" {
@@ -25777,7 +21654,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechInputResult>(this);
+    return new FixedSizeListIterator<SpeechInputResult>(this);
   }
 
   // From Collection<SpeechInputResult>:
@@ -25853,10 +21730,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechRecognitionFactoryProvider {
   static SpeechRecognition createSpeechRecognition() =>
       JS('SpeechRecognition', 'new SpeechRecognition()' );
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName SpeechRecognitionResultList
 class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<SpeechRecognitionResult> native "*SpeechRecognitionResultList" {
@@ -25878,7 +21760,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechRecognitionResult>(this);
+    return new FixedSizeListIterator<SpeechRecognitionResult>(this);
   }
 
   // From Collection<SpeechRecognitionResult>:
@@ -25950,6 +21832,10 @@
   /** @domName SpeechRecognitionResultList.item */
   SpeechRecognitionResult item(int index) native;
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName StyleSheetList
 class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> native "*StyleSheetList" {
@@ -25971,7 +21857,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<StyleSheet>(this);
+    return new FixedSizeListIterator<StyleSheet>(this);
   }
 
   // From Collection<StyleSheet>:
@@ -26047,6 +21933,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _TextTrackCueFactoryProvider {
   static TextTrackCue createTextTrackCue(
       String id, num startTime, num endTime, String text,
@@ -26066,6 +21953,10 @@
                   id, startTime, endTime, text, settings, pauseOnExit);
   }
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 
 /// @domName WebKitAnimationList
 class _WebKitAnimationList implements JavaScriptIndexingBehavior, List<Animation> native "*WebKitAnimationList" {
@@ -26087,7 +21978,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Animation>(this);
+    return new FixedSizeListIterator<Animation>(this);
   }
 
   // From Collection<Animation>:
@@ -26163,6 +22054,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _WorkerFactoryProvider {
   static Worker createWorker(String scriptUrl) =>
       JS('Worker', 'new Worker(#)', scriptUrl);
@@ -26171,6 +22063,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XMLSerializerFactoryProvider {
   static XMLSerializer createXMLSerializer() =>
       JS('XMLSerializer', 'new XMLSerializer()' );
@@ -26179,6 +22072,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XPathEvaluatorFactoryProvider {
   static XPathEvaluator createXPathEvaluator() =>
       JS('XPathEvaluator', 'new XPathEvaluator()' );
@@ -26187,6 +22081,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XSLTProcessorFactoryProvider {
   static XSLTProcessor createXSLTProcessor() =>
       JS('XSLTProcessor', 'new XSLTProcessor()' );
@@ -26195,6 +22090,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.
 
+
 abstract class Window {
   // Fields.
   Location get location;
@@ -26221,15 +22117,280 @@
   void forward();
   void go(int distance);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+abstract class CssClassSet implements Set<String> {
+
+  String toString() {
+    return Strings.join(new List.from(readClasses()), ' ');
+  }
+
+  /**
+   * Adds the class [token] to the element if it is not on it, removes it if it
+   * is.
+   */
+  bool toggle(String value) {
+    Set<String> s = readClasses();
+    bool result = false;
+    if (s.contains(value)) {
+      s.remove(value);
+    } else {
+      s.add(value);
+      result = true;
+    }
+    writeClasses(s);
+    return result;
+  }
+
+  /**
+   * Returns [:true:] if classes cannot be added or removed from this
+   * [:CssClassSet:].
+   */
+  bool get frozen => false;
+
+  // interface Iterable - BEGIN
+  Iterator<String> iterator() => readClasses().iterator();
+  // interface Iterable - END
+
+  // interface Collection - BEGIN
+  void forEach(void f(String element)) {
+    readClasses().forEach(f);
+  }
+
+  Collection map(f(String element)) => readClasses().map(f);
+
+  Collection<String> filter(bool f(String element)) => readClasses().filter(f);
+
+  bool every(bool f(String element)) => readClasses().every(f);
+
+  bool some(bool f(String element)) => readClasses().some(f);
+
+  bool get isEmpty => readClasses().isEmpty;
+
+  int get length =>readClasses().length;
+  // interface Collection - END
+
+  // interface Set - BEGIN
+  bool contains(String value) => readClasses().contains(value);
+
+  void add(String value) {
+    // TODO - figure out if we need to do any validation here
+    // or if the browser natively does enough
+    _modify((s) => s.add(value));
+  }
+
+  bool remove(String value) {
+    Set<String> s = readClasses();
+    bool result = s.remove(value);
+    writeClasses(s);
+    return result;
+  }
+
+  void addAll(Collection<String> collection) {
+    // TODO - see comment above about validation
+    _modify((s) => s.addAll(collection));
+  }
+
+  void removeAll(Collection<String> collection) {
+    _modify((s) => s.removeAll(collection));
+  }
+
+  bool isSubsetOf(Collection<String> collection) =>
+    readClasses().isSubsetOf(collection);
+
+  bool containsAll(Collection<String> collection) =>
+    readClasses().containsAll(collection);
+
+  Set<String> intersection(Collection<String> other) =>
+    readClasses().intersection(other);
+
+  void clear() {
+    _modify((s) => s.clear());
+  }
+  // interface Set - END
+
+  /**
+   * Helper method used to modify the set of css classes on this element.
+   *
+   *   f - callback with:
+   *      s - a Set of all the css class name currently on this element.
+   *
+   *   After f returns, the modified set is written to the
+   *       className property of this element.
+   */
+  void _modify( f(Set<String> s)) {
+    Set<String> s = readClasses();
+    f(s);
+    writeClasses(s);
+  }
+
+  /**
+   * Read the class names from the Element class property,
+   * and put them into a set (duplicates are discarded).
+   * This is intended to be overridden by specific implementations.
+   */
+  Set<String> readClasses();
+
+  /**
+   * Join all the elements of a set into one string and write
+   * back to the element.
+   * This is intended to be overridden by specific implementations.
+   */
+  void writeClasses(Set<String> s);
+}
 // 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.
 
+
+/**
+ * Utils for device detection.
+ */
+class _Device {
+  /**
+   * Gets the browser's user agent. Using this function allows tests to inject
+   * the user agent.
+   * Returns the user agent.
+   */
+  static String get userAgent => window.navigator.userAgent;
+
+  /**
+   * Determines if the current device is running Opera.
+   */
+  static bool get isOpera => userAgent.contains("Opera", 0);
+
+  /**
+   * Determines if the current device is running Internet Explorer.
+   */
+  static bool get isIE => !isOpera && userAgent.contains("MSIE", 0);
+
+  /**
+   * Determines if the current device is running Firefox.
+   */
+  static bool get isFirefox => userAgent.contains("Firefox", 0);
+
+  /**
+   * Determines if the current device is running WebKit.
+   */
+  static bool get isWebKit => !isOpera && userAgent.contains("WebKit", 0);
+}
+// 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.
+
+
 typedef void EventListener(Event event);
+// 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.
+
+
+class FilteredElementList implements List {
+  final Node _node;
+  final List<Node> _childNodes;
+
+  FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
+
+  // We can't memoize this, since it's possible that children will be messed
+  // with externally to this class.
+  //
+  // TODO(nweiz): Do we really need to copy the list to make the types work out?
+  List<Element> get _filtered =>
+    new List.from(_childNodes.filter((n) => n is Element));
+
+  void forEach(void f(Element element)) {
+    _filtered.forEach(f);
+  }
+
+  void operator []=(int index, Element value) {
+    this[index].replaceWith(value);
+  }
+
+  void set length(int newLength) {
+    final len = this.length;
+    if (newLength >= len) {
+      return;
+    } else if (newLength < 0) {
+      throw new ArgumentError("Invalid list length");
+    }
+
+    removeRange(newLength - 1, len - newLength);
+  }
+
+  void add(Element value) {
+    _childNodes.add(value);
+  }
+
+  void addAll(Collection<Element> collection) {
+    collection.forEach(add);
+  }
+
+  void addLast(Element value) {
+    add(value);
+  }
+
+  bool contains(Element element) {
+    return element is Element && _childNodes.contains(element);
+  }
+
+  void sort([Comparator<Element> compare = Comparable.compare]) {
+    throw new UnsupportedError('TODO(jacobr): should we impl?');
+  }
+
+  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
+    throw new UnimplementedError();
+  }
+
+  void removeRange(int start, int rangeLength) {
+    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
+  }
+
+  void insertRange(int start, int rangeLength, [initialValue = null]) {
+    throw new UnimplementedError();
+  }
+
+  void clear() {
+    // Currently, ElementList#clear clears even non-element nodes, so we follow
+    // that behavior.
+    _childNodes.clear();
+  }
+
+  Element removeLast() {
+    final result = this.last;
+    if (result != null) {
+      result.remove();
+    }
+    return result;
+  }
+
+  Collection map(f(Element element)) => _filtered.map(f);
+  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
+  bool every(bool f(Element element)) => _filtered.every(f);
+  bool some(bool f(Element element)) => _filtered.some(f);
+  bool get isEmpty => _filtered.isEmpty;
+  int get length => _filtered.length;
+  Element operator [](int index) => _filtered[index];
+  Iterator<Element> iterator() => _filtered.iterator();
+  List<Element> getRange(int start, int rangeLength) =>
+    _filtered.getRange(start, rangeLength);
+  int indexOf(Element element, [int start = 0]) =>
+    _filtered.indexOf(element, start);
+
+  int lastIndexOf(Element element, [int start = null]) {
+    if (start == null) start = length - 1;
+    return _filtered.lastIndexOf(element, start);
+  }
+
+  Element get last => _filtered.last;
+}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 /**
  * Defines the keycode values for keys that are returned by 
  * KeyboardEvent.keyCode.
@@ -26242,190 +22403,191 @@
   // These constant names were borrowed from Closure's Keycode enumeration
   // class.
   // http://closure-library.googlecode.com/svn/docs/closure_goog_events_keycodes.js.source.html  
-  static final int WIN_KEY_FF_LINUX = 0;
-  static final int MAC_ENTER = 3;
-  static final int BACKSPACE = 8;
-  static final int TAB = 9;
+  static const int WIN_KEY_FF_LINUX = 0;
+  static const int MAC_ENTER = 3;
+  static const int BACKSPACE = 8;
+  static const int TAB = 9;
   /** NUM_CENTER is also NUMLOCK for FF and Safari on Mac. */
-  static final int NUM_CENTER = 12;
-  static final int ENTER = 13;
-  static final int SHIFT = 16;
-  static final int CTRL = 17;
-  static final int ALT = 18;
-  static final int PAUSE = 19;
-  static final int CAPS_LOCK = 20;
-  static final int ESC = 27;
-  static final int SPACE = 32;
-  static final int PAGE_UP = 33;
-  static final int PAGE_DOWN = 34;
-  static final int END = 35;
-  static final int HOME = 36;
-  static final int LEFT = 37;
-  static final int UP = 38;
-  static final int RIGHT = 39;
-  static final int DOWN = 40;
-  static final int NUM_NORTH_EAST = 33;
-  static final int NUM_SOUTH_EAST = 34;
-  static final int NUM_SOUTH_WEST = 35;
-  static final int NUM_NORTH_WEST = 36;
-  static final int NUM_WEST = 37;
-  static final int NUM_NORTH = 38;
-  static final int NUM_EAST = 39;
-  static final int NUM_SOUTH = 40;
-  static final int PRINT_SCREEN = 44;
-  static final int INSERT = 45;
-  static final int NUM_INSERT = 45;
-  static final int DELETE = 46;
-  static final int NUM_DELETE = 46;
-  static final int ZERO = 48;
-  static final int ONE = 49;
-  static final int TWO = 50;
-  static final int THREE = 51;
-  static final int FOUR = 52;
-  static final int FIVE = 53;
-  static final int SIX = 54;
-  static final int SEVEN = 55;
-  static final int EIGHT = 56;
-  static final int NINE = 57;
-  static final int FF_SEMICOLON = 59;
-  static final int FF_EQUALS = 61;
+  static const int NUM_CENTER = 12;
+  static const int ENTER = 13;
+  static const int SHIFT = 16;
+  static const int CTRL = 17;
+  static const int ALT = 18;
+  static const int PAUSE = 19;
+  static const int CAPS_LOCK = 20;
+  static const int ESC = 27;
+  static const int SPACE = 32;
+  static const int PAGE_UP = 33;
+  static const int PAGE_DOWN = 34;
+  static const int END = 35;
+  static const int HOME = 36;
+  static const int LEFT = 37;
+  static const int UP = 38;
+  static const int RIGHT = 39;
+  static const int DOWN = 40;
+  static const int NUM_NORTH_EAST = 33;
+  static const int NUM_SOUTH_EAST = 34;
+  static const int NUM_SOUTH_WEST = 35;
+  static const int NUM_NORTH_WEST = 36;
+  static const int NUM_WEST = 37;
+  static const int NUM_NORTH = 38;
+  static const int NUM_EAST = 39;
+  static const int NUM_SOUTH = 40;
+  static const int PRINT_SCREEN = 44;
+  static const int INSERT = 45;
+  static const int NUM_INSERT = 45;
+  static const int DELETE = 46;
+  static const int NUM_DELETE = 46;
+  static const int ZERO = 48;
+  static const int ONE = 49;
+  static const int TWO = 50;
+  static const int THREE = 51;
+  static const int FOUR = 52;
+  static const int FIVE = 53;
+  static const int SIX = 54;
+  static const int SEVEN = 55;
+  static const int EIGHT = 56;
+  static const int NINE = 57;
+  static const int FF_SEMICOLON = 59;
+  static const int FF_EQUALS = 61;
   /**
    * CAUTION: The question mark is for US-keyboard layouts. It varies
    * for other locales and keyboard layouts.
    */
-  static final int QUESTION_MARK = 63;
-  static final int A = 65;
-  static final int B = 66;
-  static final int C = 67;
-  static final int D = 68;
-  static final int E = 69;
-  static final int F = 70;
-  static final int G = 71;
-  static final int H = 72;
-  static final int I = 73;
-  static final int J = 74;
-  static final int K = 75;
-  static final int L = 76;
-  static final int M = 77;
-  static final int N = 78;
-  static final int O = 79;
-  static final int P = 80;
-  static final int Q = 81;
-  static final int R = 82;
-  static final int S = 83;
-  static final int T = 84;
-  static final int U = 85;
-  static final int V = 86;
-  static final int W = 87;
-  static final int X = 88;
-  static final int Y = 89;
-  static final int Z = 90;
-  static final int META = 91;
-  static final int WIN_KEY_LEFT = 91;
-  static final int WIN_KEY_RIGHT = 92;
-  static final int CONTEXT_MENU = 93;
-  static final int NUM_ZERO = 96;
-  static final int NUM_ONE = 97;
-  static final int NUM_TWO = 98;
-  static final int NUM_THREE = 99;
-  static final int NUM_FOUR = 100;
-  static final int NUM_FIVE = 101;
-  static final int NUM_SIX = 102;
-  static final int NUM_SEVEN = 103;
-  static final int NUM_EIGHT = 104;
-  static final int NUM_NINE = 105;
-  static final int NUM_MULTIPLY = 106;
-  static final int NUM_PLUS = 107;
-  static final int NUM_MINUS = 109;
-  static final int NUM_PERIOD = 110;
-  static final int NUM_DIVISION = 111;
-  static final int F1 = 112;
-  static final int F2 = 113;
-  static final int F3 = 114;
-  static final int F4 = 115;
-  static final int F5 = 116;
-  static final int F6 = 117;
-  static final int F7 = 118;
-  static final int F8 = 119;
-  static final int F9 = 120;
-  static final int F10 = 121;
-  static final int F11 = 122;
-  static final int F12 = 123;
-  static final int NUMLOCK = 144;
-  static final int SCROLL_LOCK = 145;
+  static const int QUESTION_MARK = 63;
+  static const int A = 65;
+  static const int B = 66;
+  static const int C = 67;
+  static const int D = 68;
+  static const int E = 69;
+  static const int F = 70;
+  static const int G = 71;
+  static const int H = 72;
+  static const int I = 73;
+  static const int J = 74;
+  static const int K = 75;
+  static const int L = 76;
+  static const int M = 77;
+  static const int N = 78;
+  static const int O = 79;
+  static const int P = 80;
+  static const int Q = 81;
+  static const int R = 82;
+  static const int S = 83;
+  static const int T = 84;
+  static const int U = 85;
+  static const int V = 86;
+  static const int W = 87;
+  static const int X = 88;
+  static const int Y = 89;
+  static const int Z = 90;
+  static const int META = 91;
+  static const int WIN_KEY_LEFT = 91;
+  static const int WIN_KEY_RIGHT = 92;
+  static const int CONTEXT_MENU = 93;
+  static const int NUM_ZERO = 96;
+  static const int NUM_ONE = 97;
+  static const int NUM_TWO = 98;
+  static const int NUM_THREE = 99;
+  static const int NUM_FOUR = 100;
+  static const int NUM_FIVE = 101;
+  static const int NUM_SIX = 102;
+  static const int NUM_SEVEN = 103;
+  static const int NUM_EIGHT = 104;
+  static const int NUM_NINE = 105;
+  static const int NUM_MULTIPLY = 106;
+  static const int NUM_PLUS = 107;
+  static const int NUM_MINUS = 109;
+  static const int NUM_PERIOD = 110;
+  static const int NUM_DIVISION = 111;
+  static const int F1 = 112;
+  static const int F2 = 113;
+  static const int F3 = 114;
+  static const int F4 = 115;
+  static const int F5 = 116;
+  static const int F6 = 117;
+  static const int F7 = 118;
+  static const int F8 = 119;
+  static const int F9 = 120;
+  static const int F10 = 121;
+  static const int F11 = 122;
+  static const int F12 = 123;
+  static const int NUMLOCK = 144;
+  static const int SCROLL_LOCK = 145;
 
   // OS-specific media keys like volume controls and browser controls.
-  static final int FIRST_MEDIA_KEY = 166;
-  static final int LAST_MEDIA_KEY = 183;
+  static const int FIRST_MEDIA_KEY = 166;
+  static const int LAST_MEDIA_KEY = 183;
 
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SEMICOLON = 186;
+  static const int SEMICOLON = 186;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int DASH = 189;
+  static const int DASH = 189;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int EQUALS = 187;
+  static const int EQUALS = 187;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int COMMA = 188;
+  static const int COMMA = 188;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int PERIOD = 190;
+  static const int PERIOD = 190;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SLASH = 191;
+  static const int SLASH = 191;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int APOSTROPHE = 192;
+  static const int APOSTROPHE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int TILDE = 192;
+  static const int TILDE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SINGLE_QUOTE = 222;
+  static const int SINGLE_QUOTE = 222;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int OPEN_SQUARE_BRACKET = 219;
+  static const int OPEN_SQUARE_BRACKET = 219;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int BACKSLASH = 220;
+  static const int BACKSLASH = 220;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int CLOSE_SQUARE_BRACKET = 221;
-  static final int WIN_KEY = 224;
-  static final int MAC_FF_META = 224;
-  static final int WIN_IME = 229;
+  static const int CLOSE_SQUARE_BRACKET = 221;
+  static const int WIN_KEY = 224;
+  static const int MAC_FF_META = 224;
+  static const int WIN_IME = 229;
 }
 // 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.
 
+
 /**
  * Defines the standard key locations returned by
  * KeyboardEvent.getKeyLocation.
@@ -26471,6 +22633,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 /**
  * Defines the standard keyboard identifier names for keys that are returned
  * by KeyEvent.getKeyboardIdentifier when the key does not have a direct
@@ -26964,6 +23127,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.
 
+
 /**
  * Contains the set of standard values returned by HTMLDocument.getReadyState.
  */
@@ -26988,6 +23152,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.
 
+
 // TODO(antonm): support not DOM isolates too.
 class _Timer implements Timer {
   final canceller;
@@ -27016,6 +23181,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.
 
+
 /**
  * The [Collections] class implements static methods useful when
  * writing a class that implements [Collection] and the [iterator]
@@ -27075,6 +23241,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _HttpRequestUtils {
 
   // Helper for factory HttpRequest.get
@@ -27103,6 +23270,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.
 
+
 _serialize(var message) {
   return new _JsSerializer().traverse(message);
 }
@@ -27303,6 +23471,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.
 
+
 typedef Object ComputeValue();
 
 class _MeasurementRequest<T> {
@@ -27504,6 +23673,7 @@
 
 // Patch file for the dart:isolate library.
 
+
 /********************************************************
   Inserted from lib/isolate/serialization.dart
  ********************************************************/
@@ -27548,11 +23718,11 @@
     return visitObject(x);
   }
 
-  abstract visitPrimitive(x);
-  abstract visitList(List x);
-  abstract visitMap(Map x);
-  abstract visitSendPort(SendPort x);
-  abstract visitSendPortSync(SendPortSync x);
+  visitPrimitive(x);
+  visitList(List x);
+  visitMap(Map x);
+  visitSendPort(SendPort x);
+  visitSendPortSync(SendPortSync x);
 
   visitObject(Object x) {
     // TODO(floitsch): make this a real exception. (which one)?
@@ -27703,7 +23873,7 @@
     return result;
   }
 
-  abstract deserializeSendPort(List x);
+  deserializeSendPort(List x);
 
   deserializeObject(List x) {
     // TODO(floitsch): Use real exception (which one?).
@@ -27715,6 +23885,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _CustomEventFactoryProvider {
   static CustomEvent createCustomEvent(String type, [bool canBubble = true,
       bool cancelable = true, Object detail = null]) {
@@ -27782,10 +23953,10 @@
   //   return fragment;
   // }
 
-  static DocumentFragment createDocumentFragment_svg(String svg) {
+  static DocumentFragment createDocumentFragment_svg(String svgContent) {
     final fragment = new DocumentFragment();
-    final e = new SVGSVGElement();
-    e.innerHTML = svg;
+    final e = new svg.SVGSVGElement();
+    e.innerHTML = svgContent;
 
     // Copy list first since we don't want liveness during iteration.
     final List nodes = new List.from(e.nodes);
@@ -27793,40 +23964,6 @@
     return fragment;
   }
 }
-
-class _SVGElementFactoryProvider {
-  static SVGElement createSVGElement_tag(String tag) {
-    final Element temp =
-      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
-    return temp;
-  }
-
-  static SVGElement createSVGElement_svg(String svg) {
-    Element parentTag;
-    final match = _START_TAG_REGEXP.firstMatch(svg);
-    if (match != null && match.group(1).toLowerCase() == 'svg') {
-      parentTag = new Element.tag('div');
-    } else {
-      parentTag = new SVGSVGElement();
-    }
-
-    parentTag.innerHTML = svg;
-    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
-
-    throw new ArgumentError(
-        'SVG had ${parentTag.elements.length} '
-        'top-level elements but 1 expected');
-  }
-}
-
-class _SVGSVGElementFactoryProvider {
-  static SVGSVGElement createSVGSVGElement() {
-    final el = new SVGElement.tag("svg");
-    // The SVG spec requires the version attribute to match the spec version
-    el.attributes['version'] = "1.1";
-    return el;
-  }
-}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
@@ -27855,6 +23992,7 @@
 // We omit an unwrapper for Window as no methods take a non-local
 // window as a parameter.
 
+
 Window _convertNativeToDart_Window(win) {
   return _DOMWindowCrossFrame._createSafe(win);
 }
@@ -27890,6 +24028,15 @@
 }
 
 ImageData _convertNativeToDart_ImageData(nativeImageData) {
+
+  // None of the native getters that return ImageData have the type ImageData
+  // since that is incorrect for FireFox (which returns a plain Object).  So we
+  // need something that tells the compiler that the ImageData class has been
+  // instantiated.
+  // TODO(sra): Remove this when all the ImageData returning APIs have been
+  // annotated as returning the union ImageData + Object.
+  JS('ImageData', '0');
+
   if (nativeImageData is ImageData) return nativeImageData;
 
   // On Firefox the above test fails because imagedata is a plain object.
@@ -27905,7 +24052,7 @@
 // with native names.
 _convertDartToNative_ImageData(ImageData imageData) {
   if (imageData is _TypedImageData) {
-    return JS('Object', '{data: #, height: #, width: #}',
+    return JS('', '{data: #, height: #, width: #}',
         imageData.data, imageData.height, imageData.width);
   }
   return imageData;
@@ -28255,6 +24402,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.
 
+
 // TODO(vsm): Unify with Dartium version.
 class _DOMWindowCrossFrame implements Window {
   // Private window.  Note, this is a window in another frame, so it
@@ -28358,6 +24506,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _AudioContextFactoryProvider {
 
   static AudioContext createAudioContext() {
@@ -28384,6 +24533,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _IDBKeyRangeFactoryProvider {
 
   static IDBKeyRange createIDBKeyRange_only(/*IDBKey*/ value) =>
@@ -28451,39 +24601,54 @@
 
   // String hash;
   String get hash => _get(_ptr, 'hash');
-  void set hash(String value) => _set(_ptr, 'hash', value);
+  void set hash(String value) {
+    _set(_ptr, 'hash', value);
+  }
 
   // String host;
   String get host => _get(_ptr, 'host');
-  void set host(String value) => _set(_ptr, 'host', value);
+  void set host(String value) {
+    _set(_ptr, 'host', value);
+  }
 
   // String hostname;
   String get hostname => _get(_ptr, 'hostname');
-  void set hostname(String value) => _set(_ptr, 'hostname', value);
+  void set hostname(String value) {
+    _set(_ptr, 'hostname', value);
+  }
 
   // String href;
   String get href => _get(_ptr, 'href');
-  void set href(String value) => _set(_ptr, 'href', value);
+  void set href(String value) {
+    _set(_ptr, 'href', value);
+  }
 
   // final String origin;
   String get origin => _get(_ptr, 'origin');
 
   // String pathname;
   String get pathname => _get(_ptr, 'pathname');
-  void set pathname(String value) => _set(_ptr, 'pathname', value);
+  void set pathname(String value) {
+    _set(_ptr, 'pathname', value);
+  }
 
   // String port;
   String get port => _get(_ptr, 'port');
-  void set port(String value) => _set(_ptr, 'port', value);
+  void set port(String value) {
+    _set(_ptr, 'port', value);
+  }
 
   // String protocol;
   String get protocol => _get(_ptr, 'protocol');
-  void set protocol(String value) => _set(_ptr, 'protocol', value);
+  void set protocol(String value) {
+    _set(_ptr, 'protocol', value);
+  }
 
   // String search;
   String get search => _get(_ptr, 'search');
-  void set search(String value) => _set(_ptr, 'search', value);
-
+  void set search(String value) {
+    _set(_ptr, 'search', value);
+  }
 
   void assign(String url) => JS('void', '#.assign(#)', _ptr, url);
 
@@ -28501,6 +24666,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.
 
+
 /**
  * Checks to see if the mutation observer API is supported on the current
  * platform.
@@ -28511,6 +24677,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _TypedArrayFactoryProvider {
 
   static Float32Array createFloat32Array(int length) => _F32(length);
@@ -28660,6 +24827,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.
 
+
 // TODO(rnystrom): add a way to supress public classes from DartDoc output.
 // TODO(jacobr): we can remove this class now that we are using the $dom_
 // convention for deprecated methods rather than truly private methods.
@@ -28674,48 +24842,15 @@
     target.$dom_removeEventListener(type, listener, useCapture);
   }
 
-}// 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.
-
-/**
- * Utils for device detection.
- */
-class _Device {
-  /**
-   * Gets the browser's user agent. Using this function allows tests to inject
-   * the user agent.
-   * Returns the user agent.
-   */
-  static String get userAgent => window.navigator.userAgent;
-
-  /**
-   * Determines if the current device is running Opera.
-   */
-  static bool get isOpera => userAgent.contains("Opera", 0);
-
-  /**
-   * Determines if the current device is running Internet Explorer.
-   */
-  static bool get isIE => !isOpera && userAgent.contains("MSIE", 0);
-
-  /**
-   * Determines if the current device is running Firefox.
-   */
-  static bool get isFirefox => userAgent.contains("Firefox", 0);
-
-  /**
-   * Determines if the current device is running WebKit.
-   */
-  static bool get isWebKit => !isOpera && userAgent.contains("WebKit", 0);
 }
 // 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.
 
+
 // Iterator for arrays with fixed size.
-class _FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
-  _FixedSizeListIterator(List<T> array)
+class FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
+  FixedSizeListIterator(List<T> array)
       : super(array),
         _length = array.length;
 
@@ -28746,6 +24881,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _Lists {
 
   /**
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 1cfc879..c025901 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -3,6 +3,7 @@
 import 'dart:isolate';
 import 'dart:json';
 import 'dart:nativewrappers';
+import 'dart:svg' as svg;
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
@@ -16,25 +17,24 @@
 
 
 
-// FIXME (blois): Rename to _window (ditto __document).
-LocalWindow __window;
+LocalWindow _window;
 
 LocalWindow get window {
-  if (__window != null) {
-    return __window;
+  if (_window != null) {
+    return _window;
   }
-  __window = _Utils.window();
-  return __window;
+  _window = _Utils.window();
+  return _window;
 }
 
-Document __document;
+HtmlDocument _document;
 
-Document get document {
-  if (__document != null) {
-    return __document;
+HtmlDocument get document {
+  if (_document != null) {
+    return _document;
   }
-  __document = window.document;
-  return __document;
+  _document = window.document;
+  return _document;
 }
 
 
@@ -65,6 +65,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AbstractWorker
 class AbstractWorker extends EventTarget {
   AbstractWorker.internal(): super.internal();
@@ -100,6 +101,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AnalyserNode
 class AnalyserNode extends AudioNode {
   AnalyserNode.internal(): super.internal();
@@ -159,6 +161,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLAnchorElement
 class AnchorElement extends _Element_Merged {
 
@@ -337,6 +340,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitAnimation
 class Animation extends NativeFieldWrapperClass1 {
   Animation.internal();
@@ -408,6 +412,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitAnimationEvent
 class AnimationEvent extends Event {
   AnimationEvent.internal(): super.internal();
@@ -427,6 +432,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLAppletElement
 class AppletElement extends _Element_Merged {
   AppletElement.internal(): super.internal();
@@ -526,6 +532,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLAreaElement
 class AreaElement extends _Element_Merged {
 
@@ -623,6 +630,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ArrayBuffer
 class ArrayBuffer extends NativeFieldWrapperClass1 {
 
@@ -655,6 +663,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ArrayBufferView
 class ArrayBufferView extends NativeFieldWrapperClass1 {
   ArrayBufferView.internal();
@@ -678,6 +687,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Attr
 class Attr extends Node {
   Attr.internal(): super.internal();
@@ -713,6 +723,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioBuffer
 class AudioBuffer extends NativeFieldWrapperClass1 {
   AudioBuffer.internal();
@@ -760,6 +771,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioBufferSourceNode
 class AudioBufferSourceNode extends AudioSourceNode {
   AudioBufferSourceNode.internal(): super.internal();
@@ -845,6 +857,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class AudioContext extends EventTarget {
   factory AudioContext() => _AudioContextFactoryProvider.createAudioContext();
   AudioContext.internal(): super.internal();
@@ -1029,6 +1042,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioDestinationNode
 class AudioDestinationNode extends AudioNode {
   AudioDestinationNode.internal(): super.internal();
@@ -1044,6 +1058,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLAudioElement
 class AudioElement extends MediaElement {
 
@@ -1062,6 +1077,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioGain
 class AudioGain extends AudioParam {
   AudioGain.internal(): super.internal();
@@ -1073,6 +1089,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioListener
 class AudioListener extends NativeFieldWrapperClass1 {
   AudioListener.internal();
@@ -1112,6 +1129,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioNode
 class AudioNode extends NativeFieldWrapperClass1 {
   AudioNode.internal();
@@ -1159,6 +1177,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioParam
 class AudioParam extends NativeFieldWrapperClass1 {
   AudioParam.internal();
@@ -1222,6 +1241,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioProcessingEvent
 class AudioProcessingEvent extends Event {
   AudioProcessingEvent.internal(): super.internal();
@@ -1241,6 +1261,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName AudioSourceNode
 class AudioSourceNode extends AudioNode {
   AudioSourceNode.internal(): super.internal();
@@ -1252,6 +1273,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLBRElement
 class BRElement extends _Element_Merged {
 
@@ -1273,6 +1295,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName BarInfo
 class BarInfo extends NativeFieldWrapperClass1 {
   BarInfo.internal();
@@ -1288,6 +1311,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLBaseElement
 class BaseElement extends _Element_Merged {
 
@@ -1317,6 +1341,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLBaseFontElement
 class BaseFontElement extends _Element_Merged {
   BaseFontElement.internal(): super.internal();
@@ -1352,6 +1377,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName BatteryManager
 class BatteryManager extends EventTarget {
   BatteryManager.internal(): super.internal();
@@ -1409,6 +1435,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName BeforeLoadEvent
 class BeforeLoadEvent extends Event {
   BeforeLoadEvent.internal(): super.internal();
@@ -1424,6 +1451,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName BiquadFilterNode
 class BiquadFilterNode extends AudioNode {
   BiquadFilterNode.internal(): super.internal();
@@ -1475,6 +1503,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Blob
 class Blob extends NativeFieldWrapperClass1 {
 
@@ -1533,6 +1562,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLBodyElement
 class BodyElement extends _Element_Merged {
 
@@ -1622,6 +1652,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLButtonElement
 class ButtonElement extends _Element_Merged {
 
@@ -1743,6 +1774,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CDATASection
 class CDATASection extends Text {
   CDATASection.internal(): super.internal();
@@ -1754,6 +1786,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSCharsetRule
 class CSSCharsetRule extends CSSRule {
   CSSCharsetRule.internal(): super.internal();
@@ -1773,6 +1806,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSFontFaceRule
 class CSSFontFaceRule extends CSSRule {
   CSSFontFaceRule.internal(): super.internal();
@@ -1788,6 +1822,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSImportRule
 class CSSImportRule extends CSSRule {
   CSSImportRule.internal(): super.internal();
@@ -1811,6 +1846,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitCSSKeyframeRule
 class CSSKeyframeRule extends CSSRule {
   CSSKeyframeRule.internal(): super.internal();
@@ -1834,6 +1870,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitCSSKeyframesRule
 class CSSKeyframesRule extends CSSRule {
   CSSKeyframesRule.internal(): super.internal();
@@ -1869,6 +1906,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitCSSMatrix
 class CSSMatrix extends NativeFieldWrapperClass1 {
 
@@ -2103,6 +2141,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSMediaRule
 class CSSMediaRule extends CSSRule {
   CSSMediaRule.internal(): super.internal();
@@ -2130,6 +2169,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSPageRule
 class CSSPageRule extends CSSRule {
   CSSPageRule.internal(): super.internal();
@@ -2153,6 +2193,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSPrimitiveValue
 class CSSPrimitiveValue extends CSSValue {
   CSSPrimitiveValue.internal(): super.internal();
@@ -2254,6 +2295,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSRule
 class CSSRule extends NativeFieldWrapperClass1 {
   CSSRule.internal();
@@ -2301,6 +2343,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.
 
+
 String _cachedBrowserPrefix;
 
 String get _browserPrefix {
@@ -5150,6 +5193,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSStyleRule
 class CSSStyleRule extends CSSRule {
   CSSStyleRule.internal(): super.internal();
@@ -5173,6 +5217,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSStyleSheet
 class CSSStyleSheet extends StyleSheet {
   CSSStyleSheet.internal(): super.internal();
@@ -5223,6 +5268,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitCSSTransformValue
 class CSSTransformValue extends _CSSValueList {
   CSSTransformValue.internal(): super.internal();
@@ -5280,6 +5326,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSUnknownRule
 class CSSUnknownRule extends CSSRule {
   CSSUnknownRule.internal(): super.internal();
@@ -5291,6 +5338,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSValue
 class CSSValue extends NativeFieldWrapperClass1 {
   CSSValue.internal();
@@ -5320,6 +5368,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class CanvasElement extends _Element_Merged {
 
   factory CanvasElement({int width, int height}) {
@@ -5366,6 +5415,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CanvasGradient
 class CanvasGradient extends NativeFieldWrapperClass1 {
   CanvasGradient.internal();
@@ -5381,6 +5431,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CanvasPattern
 class CanvasPattern extends NativeFieldWrapperClass1 {
   CanvasPattern.internal();
@@ -5392,6 +5443,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CanvasRenderingContext
 class CanvasRenderingContext extends NativeFieldWrapperClass1 {
   CanvasRenderingContext.internal();
@@ -5405,6 +5457,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class CanvasRenderingContext2D extends CanvasRenderingContext {
   CanvasRenderingContext2D.internal(): super.internal();
 
@@ -6091,6 +6144,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ChannelMergerNode
 class ChannelMergerNode extends AudioNode {
   ChannelMergerNode.internal(): super.internal();
@@ -6102,6 +6156,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ChannelSplitterNode
 class ChannelSplitterNode extends AudioNode {
   ChannelSplitterNode.internal(): super.internal();
@@ -6113,6 +6168,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CharacterData
 class CharacterData extends Node {
   CharacterData.internal(): super.internal();
@@ -6160,6 +6216,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ClientRect
 class ClientRect extends NativeFieldWrapperClass1 {
   ClientRect.internal();
@@ -6195,6 +6252,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Clipboard
 class Clipboard extends NativeFieldWrapperClass1 {
   Clipboard.internal();
@@ -6250,6 +6308,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CloseEvent
 class CloseEvent extends Event {
   CloseEvent.internal(): super.internal();
@@ -6273,6 +6332,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Comment
 class Comment extends CharacterData {
   Comment.internal(): super.internal();
@@ -6284,6 +6344,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CompositionEvent
 class CompositionEvent extends UIEvent {
   CompositionEvent.internal(): super.internal();
@@ -6303,6 +6364,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Console
 class Console extends NativeFieldWrapperClass1 {
   Console.internal();
@@ -6398,6 +6460,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLContentElement
 class ContentElement extends _Element_Merged {
 
@@ -6431,6 +6494,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ConvolverNode
 class ConvolverNode extends AudioNode {
   ConvolverNode.internal(): super.internal();
@@ -6458,6 +6522,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Coordinates
 class Coordinates extends NativeFieldWrapperClass1 {
   Coordinates.internal();
@@ -6497,6 +6562,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Counter
 class Counter extends NativeFieldWrapperClass1 {
   Counter.internal();
@@ -6520,6 +6586,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Crypto
 class Crypto extends NativeFieldWrapperClass1 {
   Crypto.internal();
@@ -6535,6 +6602,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class CustomEvent extends Event {
   factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true,
       Object detail]) => _CustomEventFactoryProvider.createCustomEvent(
@@ -6556,6 +6624,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLDListElement
 class DListElement extends _Element_Merged {
 
@@ -6577,6 +6646,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMApplicationCache
 class DOMApplicationCache extends EventTarget {
   DOMApplicationCache.internal(): super.internal();
@@ -6654,6 +6724,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMError
 class DOMError extends NativeFieldWrapperClass1 {
   DOMError.internal();
@@ -6669,6 +6740,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMException
 class DOMException extends NativeFieldWrapperClass1 {
   DOMException.internal();
@@ -6746,6 +6818,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMFileSystem
 class DOMFileSystem extends NativeFieldWrapperClass1 {
   DOMFileSystem.internal();
@@ -6765,6 +6838,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMFileSystemSync
 class DOMFileSystemSync extends NativeFieldWrapperClass1 {
   DOMFileSystemSync.internal();
@@ -6784,6 +6858,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMImplementation
 class DOMImplementation extends NativeFieldWrapperClass1 {
   DOMImplementation.internal();
@@ -6802,7 +6877,7 @@
 
 
   /** @domName DOMImplementation.createHTMLDocument */
-  Document createHTMLDocument(String title) native "DOMImplementation_createHTMLDocument_Callback";
+  HtmlDocument createHTMLDocument(String title) native "DOMImplementation_createHTMLDocument_Callback";
 
 
   /** @domName DOMImplementation.hasFeature */
@@ -6815,6 +6890,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MimeType
 class DOMMimeType extends NativeFieldWrapperClass1 {
   DOMMimeType.internal();
@@ -6842,6 +6918,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MimeTypeArray
 class DOMMimeTypeArray extends NativeFieldWrapperClass1 implements List<DOMMimeType> {
   DOMMimeTypeArray.internal();
@@ -6864,7 +6941,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<DOMMimeType>(this);
+    return new FixedSizeListIterator<DOMMimeType>(this);
   }
 
   // From Collection<DOMMimeType>:
@@ -6948,6 +7025,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMParser
 class DOMParser extends NativeFieldWrapperClass1 {
 
@@ -6965,6 +7043,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Plugin
 class DOMPlugin extends NativeFieldWrapperClass1 {
   DOMPlugin.internal();
@@ -7000,6 +7079,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PluginArray
 class DOMPluginArray extends NativeFieldWrapperClass1 implements List<DOMPlugin> {
   DOMPluginArray.internal();
@@ -7022,7 +7102,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<DOMPlugin>(this);
+    return new FixedSizeListIterator<DOMPlugin>(this);
   }
 
   // From Collection<DOMPlugin>:
@@ -7110,6 +7190,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Selection
 class DOMSelection extends NativeFieldWrapperClass1 {
   DOMSelection.internal();
@@ -7225,6 +7306,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMSettableTokenList
 class DOMSettableTokenList extends DOMTokenList {
   DOMSettableTokenList.internal(): super.internal();
@@ -7244,6 +7326,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMStringMap
 class DOMStringMap extends NativeFieldWrapperClass1 {
   DOMStringMap.internal();
@@ -7255,6 +7338,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMTokenList
 class DOMTokenList extends NativeFieldWrapperClass1 {
   DOMTokenList.internal();
@@ -7297,6 +7381,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLDataListElement
 class DataListElement extends _Element_Merged {
 
@@ -7314,6 +7399,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DataTransferItem
 class DataTransferItem extends NativeFieldWrapperClass1 {
   DataTransferItem.internal();
@@ -7345,6 +7431,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DataTransferItemList
 class DataTransferItemList extends NativeFieldWrapperClass1 {
   DataTransferItemList.internal();
@@ -7388,6 +7475,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DataView
 class DataView extends ArrayBufferView {
 
@@ -7611,6 +7699,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Database
 class Database extends NativeFieldWrapperClass1 {
   Database.internal();
@@ -7646,6 +7735,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DatabaseSync
 class DatabaseSync extends NativeFieldWrapperClass1 {
   DatabaseSync.internal();
@@ -7677,6 +7767,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DedicatedWorkerContext
 class DedicatedWorkerContext extends WorkerContext {
   DedicatedWorkerContext.internal(): super.internal();
@@ -7704,6 +7795,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DelayNode
 class DelayNode extends AudioNode {
   DelayNode.internal(): super.internal();
@@ -7719,6 +7811,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLDetailsElement
 class DetailsElement extends _Element_Merged {
 
@@ -7740,6 +7833,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DeviceMotionEvent
 class DeviceMotionEvent extends Event {
   DeviceMotionEvent.internal(): super.internal();
@@ -7755,6 +7849,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DeviceOrientationEvent
 class DeviceOrientationEvent extends Event {
   DeviceOrientationEvent.internal(): super.internal();
@@ -7786,6 +7881,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLDirectoryElement
 class DirectoryElement extends _Element_Merged {
   DirectoryElement.internal(): super.internal();
@@ -7805,6 +7901,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DirectoryEntry
 class DirectoryEntry extends Entry {
   DirectoryEntry.internal(): super.internal();
@@ -7832,6 +7929,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DirectoryEntrySync
 class DirectoryEntrySync extends EntrySync {
   DirectoryEntrySync.internal(): super.internal();
@@ -7859,6 +7957,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DirectoryReader
 class DirectoryReader extends NativeFieldWrapperClass1 {
   DirectoryReader.internal();
@@ -7874,6 +7973,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DirectoryReaderSync
 class DirectoryReaderSync extends NativeFieldWrapperClass1 {
   DirectoryReaderSync.internal();
@@ -7889,26 +7989,20 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLDivElement
 class DivElement extends _Element_Merged {
 
   factory DivElement() => _Elements.createDivElement();
   DivElement.internal(): super.internal();
 
-
-  /** @domName HTMLDivElement.align */
-  String get align native "HTMLDivElement_align_Getter";
-
-
-  /** @domName HTMLDivElement.align */
-  void set align(String value) native "HTMLDivElement_align_Setter";
-
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for 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 Document extends Node
+
+class Document extends Node 
 {
 
   Document.internal(): super.internal();
@@ -7921,11 +8015,11 @@
 
 
   /** @domName Document.body */
-  Element get body native "Document_body_Getter";
+  Element get $dom_body native "Document_body_Getter";
 
 
   /** @domName Document.body */
-  void set body(Element value) native "Document_body_Setter";
+  void set $dom_body(Element value) native "Document_body_Setter";
 
 
   /** @domName Document.charset */
@@ -7957,7 +8051,7 @@
 
 
   /** @domName Document.head */
-  HeadElement get head native "Document_head_Getter";
+  HeadElement get $dom_head native "Document_head_Getter";
 
 
   /** @domName Document.implementation */
@@ -7965,7 +8059,7 @@
 
 
   /** @domName Document.lastModified */
-  String get lastModified native "Document_lastModified_Getter";
+  String get $dom_lastModified native "Document_lastModified_Getter";
 
 
   /** @domName Document.preferredStylesheetSet */
@@ -7977,7 +8071,7 @@
 
 
   /** @domName Document.referrer */
-  String get referrer native "Document_referrer_Getter";
+  String get $dom_referrer native "Document_referrer_Getter";
 
 
   /** @domName Document.selectedStylesheetSet */
@@ -7989,51 +8083,43 @@
 
 
   /** @domName Document.styleSheets */
-  List<StyleSheet> get styleSheets native "Document_styleSheets_Getter";
+  List<StyleSheet> get $dom_styleSheets native "Document_styleSheets_Getter";
 
 
   /** @domName Document.title */
-  String get title native "Document_title_Getter";
+  String get $dom_title native "Document_title_Getter";
 
 
   /** @domName Document.title */
-  void set title(String value) native "Document_title_Setter";
-
-
-  /** @domName Document.webkitCurrentFullScreenElement */
-  Element get webkitCurrentFullScreenElement native "Document_webkitCurrentFullScreenElement_Getter";
-
-
-  /** @domName Document.webkitFullScreenKeyboardInputAllowed */
-  bool get webkitFullScreenKeyboardInputAllowed native "Document_webkitFullScreenKeyboardInputAllowed_Getter";
+  void set $dom_title(String value) native "Document_title_Setter";
 
 
   /** @domName Document.webkitFullscreenElement */
-  Element get webkitFullscreenElement native "Document_webkitFullscreenElement_Getter";
+  Element get $dom_webkitFullscreenElement native "Document_webkitFullscreenElement_Getter";
 
 
   /** @domName Document.webkitFullscreenEnabled */
-  bool get webkitFullscreenEnabled native "Document_webkitFullscreenEnabled_Getter";
+  bool get $dom_webkitFullscreenEnabled native "Document_webkitFullscreenEnabled_Getter";
 
 
   /** @domName Document.webkitHidden */
-  bool get webkitHidden native "Document_webkitHidden_Getter";
+  bool get $dom_webkitHidden native "Document_webkitHidden_Getter";
 
 
   /** @domName Document.webkitIsFullScreen */
-  bool get webkitIsFullScreen native "Document_webkitIsFullScreen_Getter";
+  bool get $dom_webkitIsFullScreen native "Document_webkitIsFullScreen_Getter";
 
 
   /** @domName Document.webkitPointerLockElement */
-  Element get webkitPointerLockElement native "Document_webkitPointerLockElement_Getter";
+  Element get $dom_webkitPointerLockElement native "Document_webkitPointerLockElement_Getter";
 
 
   /** @domName Document.webkitVisibilityState */
-  String get webkitVisibilityState native "Document_webkitVisibilityState_Getter";
+  String get $dom_webkitVisibilityState native "Document_webkitVisibilityState_Getter";
 
 
   /** @domName Document.caretRangeFromPoint */
-  Range caretRangeFromPoint(int x, int y) native "Document_caretRangeFromPoint_Callback";
+  Range $dom_caretRangeFromPoint(int x, int y) native "Document_caretRangeFromPoint_Callback";
 
 
   /** @domName Document.createCDATASection */
@@ -8073,7 +8159,7 @@
 
 
   /** @domName Document.elementFromPoint */
-  Element elementFromPoint(int x, int y) native "Document_elementFromPoint_Callback";
+  Element $dom_elementFromPoint(int x, int y) native "Document_elementFromPoint_Callback";
 
 
   /** @domName Document.execCommand */
@@ -8129,32 +8215,29 @@
 
 
   /** @domName Document.webkitCancelFullScreen */
-  void webkitCancelFullScreen() native "Document_webkitCancelFullScreen_Callback";
+  void $dom_webkitCancelFullScreen() native "Document_webkitCancelFullScreen_Callback";
 
 
   /** @domName Document.webkitExitFullscreen */
-  void webkitExitFullscreen() native "Document_webkitExitFullscreen_Callback";
+  void $dom_webkitExitFullscreen() native "Document_webkitExitFullscreen_Callback";
 
 
   /** @domName Document.webkitExitPointerLock */
-  void webkitExitPointerLock() native "Document_webkitExitPointerLock_Callback";
-
-  /** @domName HTMLDocument.activeElement */
-  Element get activeElement;
+  void $dom_webkitExitPointerLock() native "Document_webkitExitPointerLock_Callback";
 
   // TODO(jacobr): implement all Element methods not on Document.
 
   Element query(String selectors) {
     // It is fine for our RegExp to detect element id query selectors to have
     // false negatives but not false positives.
-    if (const RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
+    if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
       return $dom_getElementById(selectors.substring(1));
     }
     return $dom_querySelector(selectors);
   }
 
   List<Element> queryAll(String selectors) {
-    if (const RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
+    if (new RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByName(
           selectors.substring(7,selectors.length - 2));
       int len = mutableMatches.length;
@@ -8163,7 +8246,7 @@
         copyOfMatches[i] = mutableMatches[i];
       }
       return new _FrozenElementList._wrap(copyOfMatches);
-    } else if (const RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
+    } else if (new RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByTagName(selectors);
       int len = mutableMatches.length;
       final copyOfMatches = new List<Element>(len);
@@ -8282,128 +8365,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class _FilteredElementList implements List {
-  final Node _node;
-  final List<Node> _childNodes;
-
-  _FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
-
-  // We can't memoize this, since it's possible that children will be messed
-  // with externally to this class.
-  //
-  // TODO(nweiz): Do we really need to copy the list to make the types work out?
-  List<Element> get _filtered =>
-    new List.from(_childNodes.filter((n) => n is Element));
-
-  void forEach(void f(Element element)) {
-    _filtered.forEach(f);
-  }
-
-  void operator []=(int index, Element value) {
-    this[index].replaceWith(value);
-  }
-
-  void set length(int newLength) {
-    final len = this.length;
-    if (newLength >= len) {
-      return;
-    } else if (newLength < 0) {
-      throw new ArgumentError("Invalid list length");
-    }
-
-    removeRange(newLength - 1, len - newLength);
-  }
-
-  void add(Element value) {
-    _childNodes.add(value);
-  }
-
-  void addAll(Collection<Element> collection) {
-    collection.forEach(add);
-  }
-
-  void addLast(Element value) {
-    add(value);
-  }
-
-  bool contains(Element element) {
-    return element is Element && _childNodes.contains(element);
-  }
-
-  void sort([Comparator<Element> compare = Comparable.compare]) {
-    throw new UnsupportedError('TODO(jacobr): should we impl?');
-  }
-
-  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
-    throw new UnimplementedError();
-  }
-
-  void removeRange(int start, int rangeLength) {
-    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
-  }
-
-  void insertRange(int start, int rangeLength, [initialValue = null]) {
-    throw new UnimplementedError();
-  }
-
-  void clear() {
-    // Currently, ElementList#clear clears even non-element nodes, so we follow
-    // that behavior.
-    _childNodes.clear();
-  }
-
-  Element removeLast() {
-    final result = this.last;
-    if (result != null) {
-      result.remove();
-    }
-    return result;
-  }
-
-  Collection map(f(Element element)) => _filtered.map(f);
-  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
-  bool every(bool f(Element element)) => _filtered.every(f);
-  bool some(bool f(Element element)) => _filtered.some(f);
-  bool get isEmpty => _filtered.isEmpty;
-  int get length => _filtered.length;
-  Element operator [](int index) => _filtered[index];
-  Iterator<Element> iterator() => _filtered.iterator();
-  List<Element> getRange(int start, int rangeLength) =>
-    _filtered.getRange(start, rangeLength);
-  int indexOf(Element element, [int start = 0]) =>
-    _filtered.indexOf(element, start);
-
-  int lastIndexOf(Element element, [int start = null]) {
-    if (start == null) start = length - 1;
-    return _filtered.lastIndexOf(element, start);
-  }
-
-  Element get last => _filtered.last;
-}
 
 Future<CSSStyleDeclaration> _emptyStyleFuture() {
   return _createMeasurementFuture(() => new Element.tag('div').style,
                                   new Completer<CSSStyleDeclaration>());
 }
 
-class EmptyElementRect implements ElementRect {
-  final ClientRect client = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect offset = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect scroll = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect bounding = const _SimpleClientRect(0, 0, 0, 0);
-  final List<ClientRect> clientRects = const <ClientRect>[];
-
-  const EmptyElementRect();
-}
-
-class _FrozenCssClassSet extends _CssClassSet {
-  _FrozenCssClassSet() : super(null);
-
-  void _write(Set s) {
+class _FrozenCssClassSet extends CssClassSet {
+  void writeClasses(Set s) {
     throw new UnsupportedError(
         'frozen class set cannot be modified');
   }
-  Set<String> _read() => new Set<String>();
+  Set<String> readClasses() => new Set<String>();
 
   bool get frozen => true;
 }
@@ -8414,14 +8387,14 @@
   factory DocumentFragment.html(String html) =>
       _DocumentFragmentFactoryProvider.createDocumentFragment_html(html);
 
-  factory DocumentFragment.svg(String svg) =>
-      new _DocumentFragmentFactoryProvider.createDocumentFragment_svg(svg);
+  factory DocumentFragment.svg(String svgContent) =>
+      new _DocumentFragmentFactoryProvider.createDocumentFragment_svg(svgContent);
 
   List<Element> _elements;
 
   List<Element> get elements {
     if (_elements == null) {
-      _elements = new _FilteredElementList(this);
+      _elements = new FilteredElementList(this);
     }
     return _elements;
   }
@@ -8492,15 +8465,10 @@
     this.insertAdjacentText('beforeend', text);
   }
 
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(() => const EmptyElementRect(),
-                                    new Completer<ElementRect>());
-  }
-
   // If we can come up with a semi-reasonable default value for an Element
   // getter, we'll use it. In general, these return the same values as an
   // element that has no parent.
@@ -8668,6 +8636,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DocumentType
 class DocumentType extends Node {
   DocumentType.internal(): super.internal();
@@ -8707,6 +8676,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DynamicsCompressorNode
 class DynamicsCompressorNode extends AudioNode {
   DynamicsCompressorNode.internal(): super.internal();
@@ -8742,6 +8712,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EXTTextureFilterAnisotropic
 class EXTTextureFilterAnisotropic extends NativeFieldWrapperClass1 {
   EXTTextureFilterAnisotropic.internal();
@@ -8755,6 +8726,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.
 
+
 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
 // functionality.
 class _ChildrenElementList implements List {
@@ -9223,136 +9195,17 @@
   String _strip(String key) => key.substring(5);
 }
 
-abstract class CssClassSet implements Set<String> {
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String token);
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen;
-}
-
-class _CssClassSet extends CssClassSet {
+class _ElementCssClassSet extends CssClassSet {
 
   final Element _element;
 
-  _CssClassSet(this._element);
+  _ElementCssClassSet(this._element);
 
-  String toString() => _formatSet(_read());
+  Set<String> readClasses() {
+    var s = new Set<String>();
+    var classname = _element.$dom_className;
 
-  // interface Iterable - BEGIN
-  Iterator<String> iterator() => _read().iterator();
-  // interface Iterable - END
-
-  // interface Collection - BEGIN
-  void forEach(void f(String element)) {
-    _read().forEach(f);
-  }
-
-  Collection map(f(String element)) => _read().map(f);
-
-  Collection<String> filter(bool f(String element)) => _read().filter(f);
-
-  bool every(bool f(String element)) => _read().every(f);
-
-  bool some(bool f(String element)) => _read().some(f);
-
-  bool get isEmpty => _read().isEmpty;
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen => false;
-
-  int get length =>_read().length;
-
-  // interface Collection - END
-
-  // interface Set - BEGIN
-  bool contains(String value) => _read().contains(value);
-
-  void add(String value) {
-    // TODO - figure out if we need to do any validation here
-    // or if the browser natively does enough
-    _modify((s) => s.add(value));
-  }
-
-  bool remove(String value) {
-    Set<String> s = _read();
-    bool result = s.remove(value);
-    _write(s);
-    return result;
-  }
-
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String value) {
-    Set<String> s = _read();
-    bool result = false;
-    if (s.contains(value)) {
-      s.remove(value);
-    } else {
-      s.add(value);
-      result = true;
-    }
-    _write(s);
-    return result;
-  }
-
-  void addAll(Collection<String> collection) {
-    // TODO - see comment above about validation
-    _modify((s) => s.addAll(collection));
-  }
-
-  void removeAll(Collection<String> collection) {
-    _modify((s) => s.removeAll(collection));
-  }
-
-  bool isSubsetOf(Collection<String> collection) =>
-    _read().isSubsetOf(collection);
-
-  bool containsAll(Collection<String> collection) =>
-    _read().containsAll(collection);
-
-  Set<String> intersection(Collection<String> other) =>
-    _read().intersection(other);
-
-  void clear() {
-    _modify((s) => s.clear());
-  }
-  // interface Set - END
-
-  /**
-   * Helper method used to modify the set of css classes on this element.
-   *
-   *   f - callback with:
-   *      s - a Set of all the css class name currently on this element.
-   *
-   *   After f returns, the modified set is written to the
-   *       className property of this element.
-   */
-  void _modify( f(Set<String> s)) {
-    Set<String> s = _read();
-    f(s);
-    _write(s);
-  }
-
-  /**
-   * Read the class names from the Element class property,
-   * and put them into a set (duplicates are discarded).
-   */
-  Set<String> _read() {
-    // TODO(mattsh) simplify this once split can take regex.
-    Set<String> s = new Set<String>();
-    for (String name in _classname().split(' ')) {
+    for (String name in classname.split(' ')) {
       String trimmed = name.trim();
       if (!trimmed.isEmpty) {
         s.add(trimmed);
@@ -9361,24 +9214,9 @@
     return s;
   }
 
-  /**
-   * Read the class names as a space-separated string. This is meant to be
-   * overridden by subclasses.
-   */
-  String _classname() => _element.$dom_className;
-
-  /**
-   * Join all the elements of a set into one string and write
-   * back to the element.
-   */
-  void _write(Set s) {
-    _element.$dom_className = _formatSet(s);
-  }
-
-  String _formatSet(Set<String> s) {
-    // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605
+  void writeClasses(Set<String> s) {
     List list = new List.from(s);
-    return Strings.join(list, ' ');
+    _element.$dom_className = Strings.join(list, ' ');
   }
 }
 
@@ -9400,53 +9238,6 @@
   String toString() => "($left, $top, $width, $height)";
 }
 
-// TODO(jacobr): we cannot currently be lazy about calculating the client
-// rects as we must perform all measurement queries at a safe point to avoid
-// triggering unneeded layouts.
-/**
- * All your element measurement needs in one place.
- * @domName none
- */
-class ElementRect {
-  // Relative to offsetParent.
-  final ClientRect client;
-  final ClientRect offset;
-  final ClientRect scroll;
-
-  // TODO(jacobr): should we move these outside of ElementRect to avoid the
-  // overhead of computing them every time even though they are rarely used.
-  final ClientRect _boundingClientRect;
-  final _ClientRectList _clientRects;
-
-  ElementRect(Element element) :
-    client = new _SimpleClientRect(element.clientLeft,
-                                  element.clientTop,
-                                  element.clientWidth,
-                                  element.clientHeight),
-    offset = new _SimpleClientRect(element.offsetLeft,
-                                  element.offsetTop,
-                                  element.offsetWidth,
-                                  element.offsetHeight),
-    scroll = new _SimpleClientRect(element.scrollLeft,
-                                  element.scrollTop,
-                                  element.scrollWidth,
-                                  element.scrollHeight),
-    _boundingClientRect = element.getBoundingClientRect(),
-    _clientRects = element.getClientRects();
-
-  // In global coords.
-  ClientRect get bounding => _boundingClientRect;
-
-  // In global coords.
-  List<ClientRect> get clientRects {
-    final out = new List(_clientRects.length);
-    for (num i = 0; i < _clientRects.length; i++) {
-      out[i] = _clientRects.item(i);
-    }
-    return out;
-  }
-}
-
 class Element extends Node implements ElementTraversal {
 
   factory Element.html(String html) =>
@@ -9486,7 +9277,7 @@
     new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
 
   /** @domName className, classList */
-  CssClassSet get classes => new _CssClassSet(this);
+  CssClassSet get classes => new _ElementCssClassSet(this);
 
   void set classes(Collection<String> value) {
     CssClassSet classSet = classes;
@@ -9505,17 +9296,6 @@
     }
   }
 
-  /**
-   * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
-   * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
-   * scrollHeight, scrollWidth, scrollTop, scrollLeft
-   */
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(
-        () => new ElementRect(this),
-        new Completer<ElementRect>());
-  }
-
   /** @domName Window.getComputedStyle */
   Future<CSSStyleDeclaration> get computedStyle {
      // TODO(jacobr): last param should be null, see b/5045788
@@ -9540,7 +9320,7 @@
    * Parses the specified text as HTML and adds the resulting node after the
    * last child of this.
    */
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
@@ -9581,6 +9361,63 @@
   ElementEvents get on =>
     new ElementEvents(this);
 
+  /** @domName HTMLElement.children */
+  HTMLCollection get $dom_children;
+
+  /** @domName HTMLElement.contentEditable */
+  String contentEditable;
+
+  /** @domName HTMLElement.dir */
+  String dir;
+
+  /** @domName HTMLElement.draggable */
+  bool draggable;
+
+  /** @domName HTMLElement.hidden */
+  bool hidden;
+
+  /** @domName HTMLElement.id */
+  String id;
+
+  /** @domName HTMLElement.innerHTML */
+  String innerHTML;
+
+  /** @domName HTMLElement.isContentEditable */
+  bool get isContentEditable;
+
+  /** @domName HTMLElement.lang */
+  String lang;
+
+  /** @domName HTMLElement.outerHTML */
+  String get outerHTML;
+
+  /** @domName HTMLElement.spellcheck */
+  bool spellcheck;
+
+  /** @domName HTMLElement.tabIndex */
+  int tabIndex;
+
+  /** @domName HTMLElement.title */
+  String title;
+
+  /** @domName HTMLElement.translate */
+  bool translate;
+
+  /** @domName HTMLElement.webkitdropzone */
+  String webkitdropzone;
+
+  /** @domName HTMLElement.click */
+  void click();
+
+  /** @domName HTMLElement.insertAdjacentElement */
+  Element insertAdjacentElement(String where, Element element);
+
+  /** @domName HTMLElement.insertAdjacentHTML */
+  void insertAdjacentHTML(String where, String html);
+
+  /** @domName HTMLElement.insertAdjacentText */
+  void insertAdjacentText(String where, String text);
+
   static const int ALLOW_KEYBOARD_INPUT = 1;
 
 
@@ -9775,69 +9612,12 @@
   /** @domName Element.webkitRequestPointerLock */
   void webkitRequestPointerLock() native "Element_webkitRequestPointerLock_Callback";
 
-  /** @domName HTMLElement.children */
-  HTMLCollection get $dom_children;
-
-  /** @domName HTMLElement.contentEditable */
-  String contentEditable;
-
-  /** @domName HTMLElement.dir */
-  String dir;
-
-  /** @domName HTMLElement.draggable */
-  bool draggable;
-
-  /** @domName HTMLElement.hidden */
-  bool hidden;
-
-  /** @domName HTMLElement.id */
-  String id;
-
-  /** @domName HTMLElement.innerHTML */
-  String innerHTML;
-
-  /** @domName HTMLElement.isContentEditable */
-  bool get isContentEditable;
-
-  /** @domName HTMLElement.lang */
-  String lang;
-
-  /** @domName HTMLElement.outerHTML */
-  String get outerHTML;
-
-  /** @domName HTMLElement.spellcheck */
-  bool spellcheck;
-
-  /** @domName HTMLElement.tabIndex */
-  int tabIndex;
-
-  /** @domName HTMLElement.title */
-  String title;
-
-  /** @domName HTMLElement.translate */
-  bool translate;
-
-  /** @domName HTMLElement.webkitdropzone */
-  String webkitdropzone;
-
-  /** @domName HTMLElement.click */
-  void click();
-
-  /** @domName HTMLElement.insertAdjacentElement */
-  Element insertAdjacentElement(String where, Element element);
-
-  /** @domName HTMLElement.insertAdjacentHTML */
-  void insertAdjacentHTML(String where, String html);
-
-  /** @domName HTMLElement.insertAdjacentText */
-  void insertAdjacentText(String where, String text);
-
 }
 
 // Temporary dispatch hook to support WebComponents.
 Function dynamicUnknownElementDispatcher;
 
-final _START_TAG_REGEXP = const RegExp('<(\\w+)');
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
 class _ElementFactoryProvider {
   static final _CUSTOM_PARENT_TAG_MAP = const {
     'body' : 'html',
@@ -9999,6 +9779,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ElementTimeControl
 class ElementTimeControl extends NativeFieldWrapperClass1 {
   ElementTimeControl.internal();
@@ -10026,6 +9807,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ElementTraversal
 class ElementTraversal extends NativeFieldWrapperClass1 {
   ElementTraversal.internal();
@@ -10057,6 +9839,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLEmbedElement
 class EmbedElement extends _Element_Merged {
 
@@ -10118,6 +9901,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EntityReference
 class EntityReference extends Node {
   EntityReference.internal(): super.internal();
@@ -10137,6 +9921,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Entry
 class Entry extends NativeFieldWrapperClass1 {
   Entry.internal();
@@ -10224,6 +10009,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EntrySync
 class EntrySync extends NativeFieldWrapperClass1 {
   EntrySync.internal();
@@ -10287,6 +10073,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ErrorEvent
 class ErrorEvent extends Event {
   ErrorEvent.internal(): super.internal();
@@ -10310,6 +10097,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Event extends NativeFieldWrapperClass1 {
   // In JS, canBubble and cancelable are technically required parameters to
   // init*Event. In practice, though, if they aren't provided they simply
@@ -10402,10 +10190,6 @@
   void set returnValue(bool value) native "Event_returnValue_Setter";
 
 
-  /** @domName Event.srcElement */
-  EventTarget get srcElement native "Event_srcElement_Getter";
-
-
   /** @domName Event.target */
   EventTarget get target native "Event_target_Getter";
 
@@ -10440,6 +10224,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EventException
 class EventException extends NativeFieldWrapperClass1 {
   EventException.internal();
@@ -10471,6 +10256,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EventSource
 class EventSource extends EventTarget {
 
@@ -10532,6 +10318,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Events {
   /* Raw event target. */
   final EventTarget _ptr;
@@ -10603,6 +10390,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLFieldSetElement
 class FieldSetElement extends _Element_Merged {
 
@@ -10664,6 +10452,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName File
 class File extends Blob {
   File.internal(): super.internal();
@@ -10695,6 +10484,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileEntry
 class FileEntry extends Entry {
   FileEntry.internal(): super.internal();
@@ -10714,6 +10504,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileEntrySync
 class FileEntrySync extends EntrySync {
   FileEntrySync.internal(): super.internal();
@@ -10733,6 +10524,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileError
 class FileError extends NativeFieldWrapperClass1 {
   FileError.internal();
@@ -10772,6 +10564,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileException
 class FileException extends NativeFieldWrapperClass1 {
   FileException.internal();
@@ -10823,6 +10616,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileReader
 class FileReader extends EventTarget {
 
@@ -10920,6 +10714,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileReaderSync
 class FileReaderSync extends NativeFieldWrapperClass1 {
 
@@ -10968,6 +10763,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileWriter
 class FileWriter extends EventTarget {
   FileWriter.internal(): super.internal();
@@ -11059,6 +10855,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileWriterSync
 class FileWriterSync extends NativeFieldWrapperClass1 {
   FileWriterSync.internal();
@@ -11090,6 +10887,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Float32Array
 class Float32Array extends ArrayBufferView implements List<num> {
 
@@ -11125,7 +10923,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<num>(this);
+    return new FixedSizeListIterator<num>(this);
   }
 
   // From Collection<num>:
@@ -11220,6 +11018,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Float64Array
 class Float64Array extends ArrayBufferView implements List<num> {
 
@@ -11255,7 +11054,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<num>(this);
+    return new FixedSizeListIterator<num>(this);
   }
 
   // From Collection<num>:
@@ -11350,6 +11149,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLFontElement
 class FontElement extends _Element_Merged {
   FontElement.internal(): super.internal();
@@ -11385,6 +11185,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FormData
 class FormData extends NativeFieldWrapperClass1 {
 
@@ -11407,6 +11208,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLFormElement
 class FormElement extends _Element_Merged {
 
@@ -11508,6 +11310,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLFrameElement
 class FrameElement extends _Element_Merged {
   FrameElement.internal(): super.internal();
@@ -11603,6 +11406,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLFrameSetElement
 class FrameSetElement extends _Element_Merged {
   FrameSetElement.internal(): super.internal();
@@ -11666,6 +11470,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName GainNode
 class GainNode extends AudioNode {
   GainNode.internal(): super.internal();
@@ -11681,6 +11486,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Gamepad
 class Gamepad extends NativeFieldWrapperClass1 {
   Gamepad.internal();
@@ -11712,6 +11518,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Geolocation
 class Geolocation extends NativeFieldWrapperClass1 {
   Geolocation.internal();
@@ -11735,6 +11542,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Geoposition
 class Geoposition extends NativeFieldWrapperClass1 {
   Geoposition.internal();
@@ -11754,6 +11562,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLHRElement
 class HRElement extends _Element_Merged {
 
@@ -11799,6 +11608,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLAllCollection
 class HTMLAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
   HTMLAllCollection.internal();
@@ -11821,7 +11631,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -11909,6 +11719,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLCollection
 class HTMLCollection extends NativeFieldWrapperClass1 implements List<Node> {
   HTMLCollection.internal();
@@ -11931,7 +11742,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -12015,6 +11826,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLOptionsCollection
 class HTMLOptionsCollection extends HTMLCollection {
   HTMLOptionsCollection.internal(): super.internal();
@@ -12050,6 +11862,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HashChangeEvent
 class HashChangeEvent extends Event {
   HashChangeEvent.internal(): super.internal();
@@ -12073,6 +11886,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLHeadElement
 class HeadElement extends _Element_Merged {
 
@@ -12094,6 +11908,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLHeadingElement
 class HeadingElement extends _Element_Merged {
 
@@ -12125,6 +11940,93 @@
 
 // WARNING: Do not edit - generated code.
 
+
+class HtmlDocument extends Document {
+  HtmlDocument.internal(): super.internal();
+
+
+  /** @domName HTMLDocument.activeElement */
+  Element get activeElement native "HTMLDocument_activeElement_Getter";
+
+  /** @domName Document.body */
+  BodyElement get body => document.$dom_body;
+
+  /** @domName Document.body */
+  void set body(BodyElement value) {
+    document.$dom_body = value;
+  }
+
+  /** @domName Document.caretRangeFromPoint */
+  Range caretRangeFromPoint(int x, int y) {
+    return document.$dom_caretRangeFromPoint(x, y);
+  }
+
+  /** @domName Document.elementFromPoint */
+  Element elementFromPoint(int x, int y) {
+    return document.$dom_elementFromPoint(x, y);
+  }
+
+  /** @domName Document.head */
+  HeadElement get head => document.$dom_head;
+
+  /** @domName Document.lastModified */
+  String get lastModified => document.$dom_lastModified;
+
+  /** @domName Document.referrer */
+  String get referrer => document.$dom_referrer;
+
+  /** @domName Document.styleSheets */
+  List<StyleSheet> get styleSheets => document.$dom_styleSheets;
+
+  /** @domName Document.title */
+  String get title => document.$dom_title;
+
+  /** @domName Document.title */
+  void set title(String value) {
+    document.$dom_title = value;
+  }
+
+  /** @domName Document.webkitCancelFullScreen */
+  void webkitCancelFullScreen() {
+    document.$dom_webkitCancelFullScreen();
+  }
+
+  /** @domName Document.webkitExitFullscreen */
+  void webkitExitFullscreen() {
+    document.$dom_webkitExitFullscreen();
+  }
+
+  /** @domName Document.webkitExitPointerLock */
+  void webkitExitPointerLock() {
+    document.$dom_webkitExitPointerLock();
+  }
+
+  /** @domName Document.webkitFullscreenElement */
+  Element get webkitFullscreenElement => document.$dom_webkitFullscreenElement;
+
+  /** @domName Document.webkitFullscreenEnabled */
+  bool get webkitFullscreenEnabled => document.$dom_webkitFullscreenEnabled;
+
+  /** @domName Document.webkitHidden */
+  bool get webkitHidden => document.$dom_webkitHidden;
+
+  /** @domName Document.webkitIsFullScreen */
+  bool get webkitIsFullScreen => document.$dom_webkitIsFullScreen;
+
+  /** @domName Document.webkitPointerLockElement */
+  Element get webkitPointerLockElement =>
+      document.$dom_webkitPointerLockElement;
+
+  /** @domName Document.webkitVisibilityState */
+  String get webkitVisibilityState => document.$dom_webkitVisibilityState;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
 /// @domName HTMLHtmlElement
 class HtmlElement extends _Element_Merged {
 
@@ -12136,6 +12038,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class HttpRequest extends EventTarget {
   factory HttpRequest.get(String url, onSuccess(HttpRequest request)) =>
       _HttpRequestFactoryProvider.createHttpRequest_get(url, onSuccess);
@@ -12272,6 +12175,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XMLHttpRequestException
 class HttpRequestException extends NativeFieldWrapperClass1 {
   HttpRequestException.internal();
@@ -12303,6 +12207,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XMLHttpRequestProgressEvent
 class HttpRequestProgressEvent extends ProgressEvent {
   HttpRequestProgressEvent.internal(): super.internal();
@@ -12322,6 +12227,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XMLHttpRequestUpload
 class HttpRequestUpload extends EventTarget {
   HttpRequestUpload.internal(): super.internal();
@@ -12367,6 +12273,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBAny
 class IDBAny extends NativeFieldWrapperClass1 {
   IDBAny.internal();
@@ -12378,6 +12285,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBCursor
 class IDBCursor extends NativeFieldWrapperClass1 {
   IDBCursor.internal();
@@ -12441,6 +12349,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBCursorWithValue
 class IDBCursorWithValue extends IDBCursor {
   IDBCursorWithValue.internal(): super.internal();
@@ -12456,6 +12365,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBDatabase
 class IDBDatabase extends EventTarget {
   IDBDatabase.internal(): super.internal();
@@ -12548,6 +12458,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBDatabaseException
 class IDBDatabaseException extends NativeFieldWrapperClass1 {
   IDBDatabaseException.internal();
@@ -12601,6 +12512,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBFactory
 class IDBFactory extends NativeFieldWrapperClass1 {
   IDBFactory.internal();
@@ -12639,6 +12551,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBIndex
 class IDBIndex extends NativeFieldWrapperClass1 {
   IDBIndex.internal();
@@ -12803,6 +12716,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBKey
 class IDBKey extends NativeFieldWrapperClass1 {
   IDBKey.internal();
@@ -12812,6 +12726,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class IDBKeyRange extends NativeFieldWrapperClass1 {
   /**
    * @domName IDBKeyRange.only
@@ -12920,6 +12835,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBObjectStore
 class IDBObjectStore extends NativeFieldWrapperClass1 {
   IDBObjectStore.internal();
@@ -13105,6 +13021,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBOpenDBRequest
 class IDBOpenDBRequest extends IDBRequest implements EventTarget {
   IDBOpenDBRequest.internal(): super.internal();
@@ -13130,6 +13047,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBRequest
 class IDBRequest extends EventTarget {
   IDBRequest.internal(): super.internal();
@@ -13195,6 +13113,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBTransaction
 class IDBTransaction extends EventTarget {
   IDBTransaction.internal(): super.internal();
@@ -13260,6 +13179,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBVersionChangeEvent
 class IDBUpgradeNeededEvent extends Event {
   IDBUpgradeNeededEvent.internal(): super.internal();
@@ -13279,6 +13199,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBVersionChangeEvent
 class IDBVersionChangeEvent extends Event {
   IDBVersionChangeEvent.internal(): super.internal();
@@ -13294,6 +13215,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IDBVersionChangeRequest
 class IDBVersionChangeRequest extends IDBRequest implements EventTarget {
   IDBVersionChangeRequest.internal(): super.internal();
@@ -13317,6 +13239,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLIFrameElement
 class IFrameElement extends _Element_Merged {
 
@@ -13438,6 +13361,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName IceCandidate
 class IceCandidate extends NativeFieldWrapperClass1 {
 
@@ -13459,6 +13383,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ImageData
 class ImageData extends NativeFieldWrapperClass1 {
   ImageData.internal();
@@ -13482,6 +13407,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLImageElement
 class ImageElement extends _Element_Merged {
 
@@ -13638,6 +13564,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLInputElement
 class InputElement extends _Element_Merged {
 
@@ -14108,6 +14035,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Int16Array
 class Int16Array extends ArrayBufferView implements List<int> {
 
@@ -14143,7 +14071,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -14238,6 +14166,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Int32Array
 class Int32Array extends ArrayBufferView implements List<int> {
 
@@ -14273,7 +14202,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -14368,6 +14297,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Int8Array
 class Int8Array extends ArrayBufferView implements List<int> {
 
@@ -14403,7 +14333,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -14498,6 +14428,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName JavaScriptCallFrame
 class JavaScriptCallFrame extends NativeFieldWrapperClass1 {
   JavaScriptCallFrame.internal();
@@ -14563,6 +14494,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName KeyboardEvent
 class KeyboardEvent extends UIEvent {
   KeyboardEvent.internal(): super.internal();
@@ -14606,6 +14538,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLKeygenElement
 class KeygenElement extends _Element_Merged {
 
@@ -14691,6 +14624,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLLIElement
 class LIElement extends _Element_Merged {
 
@@ -14720,6 +14654,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLLabelElement
 class LabelElement extends _Element_Merged {
 
@@ -14749,6 +14684,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLLegendElement
 class LegendElement extends _Element_Merged {
 
@@ -14774,6 +14710,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLLinkElement
 class LinkElement extends _Element_Merged {
 
@@ -14871,6 +14808,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName History
 class LocalHistory extends NativeFieldWrapperClass1 implements History {
   LocalHistory.internal();
@@ -14910,6 +14848,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Location
 class LocalLocation extends NativeFieldWrapperClass1 implements Location {
   LocalLocation.internal();
@@ -15009,6 +14948,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName LocalMediaStream
 class LocalMediaStream extends MediaStream implements EventTarget {
   LocalMediaStream.internal(): super.internal();
@@ -15022,6 +14962,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class LocalWindow extends EventTarget implements Window {
 
   /**
@@ -15069,10 +15010,6 @@
   DOMApplicationCache get applicationCache native "DOMWindow_applicationCache_Getter";
 
 
-  /** @domName DOMWindow.clientInformation */
-  Navigator get clientInformation native "DOMWindow_clientInformation_Getter";
-
-
   /** @domName DOMWindow.closed */
   bool get closed native "DOMWindow_closed_Getter";
 
@@ -15377,10 +15314,6 @@
   void print() native "DOMWindow_print_Callback";
 
 
-  /** @domName DOMWindow.prompt */
-  String prompt(String message, String defaultValue) native "DOMWindow_prompt_Callback";
-
-
   /** @domName DOMWindow.releaseEvents */
   void releaseEvents() native "DOMWindow_releaseEvents_Callback";
 
@@ -15609,6 +15542,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMapElement
 class MapElement extends _Element_Merged {
 
@@ -15634,6 +15568,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMarqueeElement
 class MarqueeElement extends _Element_Merged {
   MarqueeElement.internal(): super.internal();
@@ -15741,6 +15676,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaController
 class MediaController extends EventTarget {
 
@@ -15834,6 +15770,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMediaElement
 class MediaElement extends _Element_Merged {
   MediaElement.internal(): super.internal();
@@ -16185,6 +16122,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaElementAudioSourceNode
 class MediaElementAudioSourceNode extends AudioSourceNode {
   MediaElementAudioSourceNode.internal(): super.internal();
@@ -16200,6 +16138,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaError
 class MediaError extends NativeFieldWrapperClass1 {
   MediaError.internal();
@@ -16225,6 +16164,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaKeyError
 class MediaKeyError extends NativeFieldWrapperClass1 {
   MediaKeyError.internal();
@@ -16252,6 +16192,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaKeyEvent
 class MediaKeyEvent extends Event {
   MediaKeyEvent.internal(): super.internal();
@@ -16291,6 +16232,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaList
 class MediaList extends NativeFieldWrapperClass1 {
   MediaList.internal();
@@ -16326,6 +16268,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaQueryList
 class MediaQueryList extends NativeFieldWrapperClass1 {
   MediaQueryList.internal();
@@ -16353,6 +16296,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaQueryListListener
 class MediaQueryListListener extends NativeFieldWrapperClass1 {
   MediaQueryListListener.internal();
@@ -16368,6 +16312,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaSource
 class MediaSource extends EventTarget {
 
@@ -16425,6 +16370,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStream
 class MediaStream extends EventTarget {
 
@@ -16482,6 +16428,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamAudioSourceNode
 class MediaStreamAudioSourceNode extends AudioSourceNode {
   MediaStreamAudioSourceNode.internal(): super.internal();
@@ -16497,6 +16444,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamEvent
 class MediaStreamEvent extends Event {
   MediaStreamEvent.internal(): super.internal();
@@ -16512,6 +16460,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamTrack
 class MediaStreamTrack extends EventTarget {
   MediaStreamTrack.internal(): super.internal();
@@ -16577,6 +16526,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamTrackEvent
 class MediaStreamTrackEvent extends Event {
   MediaStreamTrackEvent.internal(): super.internal();
@@ -16592,6 +16542,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamTrackList
 class MediaStreamTrackList extends EventTarget {
   MediaStreamTrackList.internal(): super.internal();
@@ -16645,6 +16596,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MemoryInfo
 class MemoryInfo extends NativeFieldWrapperClass1 {
   MemoryInfo.internal();
@@ -16668,6 +16620,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMenuElement
 class MenuElement extends _Element_Merged {
 
@@ -16689,6 +16642,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MessageChannel
 class MessageChannel extends NativeFieldWrapperClass1 {
 
@@ -16710,6 +16664,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MessageEvent
 class MessageEvent extends Event {
   MessageEvent.internal(): super.internal();
@@ -16749,6 +16704,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MessagePort
 class MessagePort extends EventTarget {
   MessagePort.internal(): super.internal();
@@ -16796,6 +16752,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMetaElement
 class MetaElement extends _Element_Merged {
   MetaElement.internal(): super.internal();
@@ -16839,6 +16796,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Metadata
 class Metadata extends NativeFieldWrapperClass1 {
   Metadata.internal();
@@ -16866,6 +16824,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLMeterElement
 class MeterElement extends _Element_Merged {
 
@@ -16931,6 +16890,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLModElement
 class ModElement extends _Element_Merged {
   ModElement.internal(): super.internal();
@@ -16958,6 +16918,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class MouseEvent extends UIEvent {
   factory MouseEvent(String type, Window view, int detail, int screenX,
       int screenY, int clientX, int clientY, int button, [bool canBubble = true,
@@ -17066,6 +17027,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MutationEvent
 class MutationEvent extends Event {
   MutationEvent.internal(): super.internal();
@@ -17105,6 +17067,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class MutationObserver extends NativeFieldWrapperClass1 {
 
   factory MutationObserver(MutationCallback callback) => _MutationObserverFactoryProvider.createMutationObserver(callback);
@@ -17190,6 +17153,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MutationRecord
 class MutationRecord extends NativeFieldWrapperClass1 {
   MutationRecord.internal();
@@ -17237,6 +17201,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName NamedNodeMap
 class NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
   NamedNodeMap.internal();
@@ -17259,7 +17224,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -17363,6 +17328,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Navigator
 class Navigator extends NativeFieldWrapperClass1 {
   Navigator.internal();
@@ -17454,6 +17420,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName NavigatorUserMediaError
 class NavigatorUserMediaError extends NativeFieldWrapperClass1 {
   NavigatorUserMediaError.internal();
@@ -17485,6 +17452,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.
 
+
 /**
  * Lazy implementation of the child nodes of an element that does not request
  * the actual child nodes of an element until strictly necessary greatly
@@ -17690,7 +17658,7 @@
 
 
   /** @domName Node.nodeType */
-  int get $dom_nodeType native "Node_nodeType_Getter";
+  int get nodeType native "Node_nodeType_Getter";
 
 
   /** @domName Node.ownerDocument */
@@ -17759,6 +17727,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName NodeFilter
 class NodeFilter extends NativeFieldWrapperClass1 {
   NodeFilter.internal();
@@ -17806,6 +17775,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName NodeIterator
 class NodeIterator extends NativeFieldWrapperClass1 {
   NodeIterator.internal();
@@ -17851,8 +17821,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 // TODO(nweiz): when all implementations we target have the same name for the
-// coreimpl implementation of List<E>, extend that rather than wrapping.
+// implementation of List<E>, extend that rather than wrapping.
 class _ListWrapper<E> implements List<E> {
   List _list;
 
@@ -17942,7 +17913,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
@@ -18041,6 +18012,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Notation
 class Notation extends Node {
   Notation.internal(): super.internal();
@@ -18060,6 +18032,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Notification
 class Notification extends EventTarget {
 
@@ -18154,6 +18127,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName NotificationCenter
 class NotificationCenter extends NativeFieldWrapperClass1 {
   NotificationCenter.internal();
@@ -18189,6 +18163,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OESElementIndexUint
 class OESElementIndexUint extends NativeFieldWrapperClass1 {
   OESElementIndexUint.internal();
@@ -18200,6 +18175,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OESStandardDerivatives
 class OESStandardDerivatives extends NativeFieldWrapperClass1 {
   OESStandardDerivatives.internal();
@@ -18213,6 +18189,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OESTextureFloat
 class OESTextureFloat extends NativeFieldWrapperClass1 {
   OESTextureFloat.internal();
@@ -18224,6 +18201,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OESVertexArrayObject
 class OESVertexArrayObject extends NativeFieldWrapperClass1 {
   OESVertexArrayObject.internal();
@@ -18253,6 +18231,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLOListElement
 class OListElement extends _Element_Merged {
 
@@ -18298,6 +18277,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLObjectElement
 class ObjectElement extends _Element_Merged {
 
@@ -18463,6 +18443,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OfflineAudioCompletionEvent
 class OfflineAudioCompletionEvent extends Event {
   OfflineAudioCompletionEvent.internal(): super.internal();
@@ -18478,6 +18459,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLOptGroupElement
 class OptGroupElement extends _Element_Merged {
 
@@ -18507,6 +18489,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLOptionElement
 class OptionElement extends _Element_Merged {
 
@@ -18582,6 +18565,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OscillatorNode
 class OscillatorNode extends AudioSourceNode {
   OscillatorNode.internal(): super.internal();
@@ -18643,6 +18627,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLOutputElement
 class OutputElement extends _Element_Merged {
 
@@ -18720,6 +18705,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName OverflowEvent
 class OverflowEvent extends Event {
   OverflowEvent.internal(): super.internal();
@@ -18749,6 +18735,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PagePopupController
 class PagePopupController extends NativeFieldWrapperClass1 {
   PagePopupController.internal();
@@ -18768,6 +18755,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PageTransitionEvent
 class PageTransitionEvent extends Event {
   PageTransitionEvent.internal(): super.internal();
@@ -18783,6 +18771,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PannerNode
 class PannerNode extends AudioNode {
   PannerNode.internal(): super.internal();
@@ -18890,6 +18879,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLParagraphElement
 class ParagraphElement extends _Element_Merged {
 
@@ -18911,6 +18901,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLParamElement
 class ParamElement extends _Element_Merged {
 
@@ -18956,6 +18947,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PeerConnection00
 class PeerConnection00 extends EventTarget {
 
@@ -19089,6 +19081,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Performance
 class Performance extends EventTarget {
   Performance.internal(): super.internal();
@@ -19116,6 +19109,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PerformanceNavigation
 class PerformanceNavigation extends NativeFieldWrapperClass1 {
   PerformanceNavigation.internal();
@@ -19143,6 +19137,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PerformanceTiming
 class PerformanceTiming extends NativeFieldWrapperClass1 {
   PerformanceTiming.internal();
@@ -19238,6 +19233,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Point extends NativeFieldWrapperClass1 {
   factory Point(num x, num y) => _PointFactoryProvider.createPoint(x, y);
   Point.internal();
@@ -19265,6 +19261,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PopStateEvent
 class PopStateEvent extends Event {
   PopStateEvent.internal(): super.internal();
@@ -19288,6 +19285,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName PositionError
 class PositionError extends NativeFieldWrapperClass1 {
   PositionError.internal();
@@ -19321,6 +19319,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLPreElement
 class PreElement extends _Element_Merged {
 
@@ -19350,6 +19349,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ProcessingInstruction
 class ProcessingInstruction extends Node {
   ProcessingInstruction.internal(): super.internal();
@@ -19377,6 +19377,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLProgressElement
 class ProgressElement extends _Element_Merged {
 
@@ -19414,6 +19415,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ProgressEvent
 class ProgressEvent extends Event {
   ProgressEvent.internal(): super.internal();
@@ -19437,6 +19439,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLQuoteElement
 class QuoteElement extends _Element_Merged {
   QuoteElement.internal(): super.internal();
@@ -19456,6 +19459,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RGBColor
 class RGBColor extends NativeFieldWrapperClass1 {
   RGBColor.internal();
@@ -19479,6 +19483,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCDataChannel
 class RTCDataChannel extends EventTarget {
   RTCDataChannel.internal(): super.internal();
@@ -19584,6 +19589,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCDataChannelEvent
 class RTCDataChannelEvent extends Event {
   RTCDataChannelEvent.internal(): super.internal();
@@ -19607,6 +19613,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCIceCandidate
 class RTCIceCandidate extends NativeFieldWrapperClass1 {
 
@@ -19632,6 +19639,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCIceCandidateEvent
 class RTCIceCandidateEvent extends Event {
   RTCIceCandidateEvent.internal(): super.internal();
@@ -19647,6 +19655,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCPeerConnection
 class RTCPeerConnection extends EventTarget {
 
@@ -19769,6 +19778,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCSessionDescription
 class RTCSessionDescription extends NativeFieldWrapperClass1 {
 
@@ -19814,6 +19824,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCStatsElement
 class RTCStatsElement extends NativeFieldWrapperClass1 {
   RTCStatsElement.internal();
@@ -19833,6 +19844,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCStatsReport
 class RTCStatsReport extends NativeFieldWrapperClass1 {
   RTCStatsReport.internal();
@@ -19852,6 +19864,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RTCStatsResponse
 class RTCStatsResponse extends NativeFieldWrapperClass1 {
   RTCStatsResponse.internal();
@@ -19867,6 +19880,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RadioNodeList
 class RadioNodeList extends NodeList {
   RadioNodeList.internal(): super.internal();
@@ -19886,6 +19900,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Range
 class Range extends NativeFieldWrapperClass1 {
   Range.internal();
@@ -20037,6 +20052,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName RangeException
 class RangeException extends NativeFieldWrapperClass1 {
   RangeException.internal();
@@ -20068,6 +20084,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Rect
 class Rect extends NativeFieldWrapperClass1 {
   Rect.internal();
@@ -20103,6 +20120,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLError
 class SQLError extends NativeFieldWrapperClass1 {
   SQLError.internal();
@@ -20138,6 +20156,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLException
 class SQLException extends NativeFieldWrapperClass1 {
   SQLException.internal();
@@ -20173,6 +20192,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLResultSet
 class SQLResultSet extends NativeFieldWrapperClass1 {
   SQLResultSet.internal();
@@ -20196,6 +20216,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLResultSetRowList
 class SQLResultSetRowList extends NativeFieldWrapperClass1 implements List<Map> {
   SQLResultSetRowList.internal();
@@ -20218,7 +20239,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Map>(this);
+    return new FixedSizeListIterator<Map>(this);
   }
 
   // From Collection<Map>:
@@ -20314,6 +20335,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLTransaction
 class SQLTransaction extends NativeFieldWrapperClass1 {
   SQLTransaction.internal();
@@ -20345,6 +20367,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SQLTransactionSync
 class SQLTransactionSync extends NativeFieldWrapperClass1 {
   SQLTransactionSync.internal();
@@ -20368,7650 +20391,6 @@
 
 // WARNING: Do not edit - generated code.
 
-/// @domName SVGAElement
-class SVGAElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
-  SVGAElement.internal(): super.internal();
-
-
-  /** @domName SVGAElement.target */
-  SVGAnimatedString get target native "SVGAElement_target_Getter";
-
-
-  /** @domName SVGAElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGAElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGAElement.xmllang */
-  String get xmllang native "SVGAElement_xmllang_Getter";
-
-
-  /** @domName SVGAElement.xmllang */
-  void set xmllang(String value) native "SVGAElement_xmllang_Setter";
-
-
-  /** @domName SVGAElement.xmlspace */
-  String get xmlspace native "SVGAElement_xmlspace_Getter";
-
-
-  /** @domName SVGAElement.xmlspace */
-  void set xmlspace(String value) native "SVGAElement_xmlspace_Setter";
-
-
-  /** @domName SVGAElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGAElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGAElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGAElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGAElement.getBBox */
-  SVGRect getBBox() native "SVGAElement_getBBox_Callback";
-
-
-  /** @domName SVGAElement.getCTM */
-  SVGMatrix getCTM() native "SVGAElement_getCTM_Callback";
-
-
-  /** @domName SVGAElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGAElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGAElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGAElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGAElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGAElement_className_Getter";
-
-
-  /** @domName SVGAElement.style */
-  CSSStyleDeclaration get style native "SVGAElement_style_Getter";
-
-
-  /** @domName SVGAElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGAElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGAElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGAElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGAElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGAElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGAElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGAElement_systemLanguage_Getter";
-
-
-  /** @domName SVGAElement.hasExtension */
-  bool hasExtension(String extension) native "SVGAElement_hasExtension_Callback";
-
-
-  /** @domName SVGAElement.transform */
-  SVGAnimatedTransformList get transform native "SVGAElement_transform_Getter";
-
-
-  /** @domName SVGAElement.href */
-  SVGAnimatedString get href native "SVGAElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAltGlyphDefElement
-class SVGAltGlyphDefElement extends SVGElement {
-  SVGAltGlyphDefElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAltGlyphElement
-class SVGAltGlyphElement extends SVGTextPositioningElement implements SVGURIReference {
-  SVGAltGlyphElement.internal(): super.internal();
-
-
-  /** @domName SVGAltGlyphElement.format */
-  String get format native "SVGAltGlyphElement_format_Getter";
-
-
-  /** @domName SVGAltGlyphElement.format */
-  void set format(String value) native "SVGAltGlyphElement_format_Setter";
-
-
-  /** @domName SVGAltGlyphElement.glyphRef */
-  String get glyphRef native "SVGAltGlyphElement_glyphRef_Getter";
-
-
-  /** @domName SVGAltGlyphElement.glyphRef */
-  void set glyphRef(String value) native "SVGAltGlyphElement_glyphRef_Setter";
-
-
-  /** @domName SVGAltGlyphElement.href */
-  SVGAnimatedString get href native "SVGAltGlyphElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAltGlyphItemElement
-class SVGAltGlyphItemElement extends SVGElement {
-  SVGAltGlyphItemElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAngle
-class SVGAngle extends NativeFieldWrapperClass1 {
-  SVGAngle.internal();
-
-  static const int SVG_ANGLETYPE_DEG = 2;
-
-  static const int SVG_ANGLETYPE_GRAD = 4;
-
-  static const int SVG_ANGLETYPE_RAD = 3;
-
-  static const int SVG_ANGLETYPE_UNKNOWN = 0;
-
-  static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
-
-
-  /** @domName SVGAngle.unitType */
-  int get unitType native "SVGAngle_unitType_Getter";
-
-
-  /** @domName SVGAngle.value */
-  num get value native "SVGAngle_value_Getter";
-
-
-  /** @domName SVGAngle.value */
-  void set value(num value) native "SVGAngle_value_Setter";
-
-
-  /** @domName SVGAngle.valueAsString */
-  String get valueAsString native "SVGAngle_valueAsString_Getter";
-
-
-  /** @domName SVGAngle.valueAsString */
-  void set valueAsString(String value) native "SVGAngle_valueAsString_Setter";
-
-
-  /** @domName SVGAngle.valueInSpecifiedUnits */
-  num get valueInSpecifiedUnits native "SVGAngle_valueInSpecifiedUnits_Getter";
-
-
-  /** @domName SVGAngle.valueInSpecifiedUnits */
-  void set valueInSpecifiedUnits(num value) native "SVGAngle_valueInSpecifiedUnits_Setter";
-
-
-  /** @domName SVGAngle.convertToSpecifiedUnits */
-  void convertToSpecifiedUnits(int unitType) native "SVGAngle_convertToSpecifiedUnits_Callback";
-
-
-  /** @domName SVGAngle.newValueSpecifiedUnits */
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGAngle_newValueSpecifiedUnits_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimateColorElement
-class SVGAnimateColorElement extends SVGAnimationElement {
-  SVGAnimateColorElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimateElement
-class SVGAnimateElement extends SVGAnimationElement {
-  SVGAnimateElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimateMotionElement
-class SVGAnimateMotionElement extends SVGAnimationElement {
-  SVGAnimateMotionElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimateTransformElement
-class SVGAnimateTransformElement extends SVGAnimationElement {
-  SVGAnimateTransformElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedAngle
-class SVGAnimatedAngle extends NativeFieldWrapperClass1 {
-  SVGAnimatedAngle.internal();
-
-
-  /** @domName SVGAnimatedAngle.animVal */
-  SVGAngle get animVal native "SVGAnimatedAngle_animVal_Getter";
-
-
-  /** @domName SVGAnimatedAngle.baseVal */
-  SVGAngle get baseVal native "SVGAnimatedAngle_baseVal_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedBoolean
-class SVGAnimatedBoolean extends NativeFieldWrapperClass1 {
-  SVGAnimatedBoolean.internal();
-
-
-  /** @domName SVGAnimatedBoolean.animVal */
-  bool get animVal native "SVGAnimatedBoolean_animVal_Getter";
-
-
-  /** @domName SVGAnimatedBoolean.baseVal */
-  bool get baseVal native "SVGAnimatedBoolean_baseVal_Getter";
-
-
-  /** @domName SVGAnimatedBoolean.baseVal */
-  void set baseVal(bool value) native "SVGAnimatedBoolean_baseVal_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedEnumeration
-class SVGAnimatedEnumeration extends NativeFieldWrapperClass1 {
-  SVGAnimatedEnumeration.internal();
-
-
-  /** @domName SVGAnimatedEnumeration.animVal */
-  int get animVal native "SVGAnimatedEnumeration_animVal_Getter";
-
-
-  /** @domName SVGAnimatedEnumeration.baseVal */
-  int get baseVal native "SVGAnimatedEnumeration_baseVal_Getter";
-
-
-  /** @domName SVGAnimatedEnumeration.baseVal */
-  void set baseVal(int value) native "SVGAnimatedEnumeration_baseVal_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedInteger
-class SVGAnimatedInteger extends NativeFieldWrapperClass1 {
-  SVGAnimatedInteger.internal();
-
-
-  /** @domName SVGAnimatedInteger.animVal */
-  int get animVal native "SVGAnimatedInteger_animVal_Getter";
-
-
-  /** @domName SVGAnimatedInteger.baseVal */
-  int get baseVal native "SVGAnimatedInteger_baseVal_Getter";
-
-
-  /** @domName SVGAnimatedInteger.baseVal */
-  void set baseVal(int value) native "SVGAnimatedInteger_baseVal_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedLength
-class SVGAnimatedLength extends NativeFieldWrapperClass1 {
-  SVGAnimatedLength.internal();
-
-
-  /** @domName SVGAnimatedLength.animVal */
-  SVGLength get animVal native "SVGAnimatedLength_animVal_Getter";
-
-
-  /** @domName SVGAnimatedLength.baseVal */
-  SVGLength get baseVal native "SVGAnimatedLength_baseVal_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedLengthList
-class SVGAnimatedLengthList extends NativeFieldWrapperClass1 implements List<SVGAnimatedLength> {
-  SVGAnimatedLengthList.internal();
-
-
-  /** @domName SVGAnimatedLengthList.animVal */
-  SVGLengthList get animVal native "SVGAnimatedLengthList_animVal_Getter";
-
-
-  /** @domName SVGAnimatedLengthList.baseVal */
-  SVGLengthList get baseVal native "SVGAnimatedLengthList_baseVal_Getter";
-
-  SVGAnimatedLength operator[](int index) native "SVGAnimatedLengthList_item_Callback";
-
-  void operator[]=(int index, SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimatedLength> mixins.
-  // SVGAnimatedLength is the element type.
-
-  // From Iterable<SVGAnimatedLength>:
-
-  Iterator<SVGAnimatedLength> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimatedLength>(this);
-  }
-
-  // From Collection<SVGAnimatedLength>:
-
-  void add(SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimatedLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimatedLength> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimatedLength element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimatedLength> filter(bool f(SVGAnimatedLength element)) =>
-     _Collections.filter(this, <SVGAnimatedLength>[], f);
-
-  bool every(bool f(SVGAnimatedLength element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimatedLength element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimatedLength>:
-
-  void sort([Comparator<SVGAnimatedLength> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimatedLength element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimatedLength element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimatedLength get last => this[length - 1];
-
-  SVGAnimatedLength removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimatedLength initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimatedLength> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimatedLength>[]);
-
-  // -- end List<SVGAnimatedLength> mixins.
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedNumber
-class SVGAnimatedNumber extends NativeFieldWrapperClass1 {
-  SVGAnimatedNumber.internal();
-
-
-  /** @domName SVGAnimatedNumber.animVal */
-  num get animVal native "SVGAnimatedNumber_animVal_Getter";
-
-
-  /** @domName SVGAnimatedNumber.baseVal */
-  num get baseVal native "SVGAnimatedNumber_baseVal_Getter";
-
-
-  /** @domName SVGAnimatedNumber.baseVal */
-  void set baseVal(num value) native "SVGAnimatedNumber_baseVal_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedNumberList
-class SVGAnimatedNumberList extends NativeFieldWrapperClass1 implements List<SVGAnimatedNumber> {
-  SVGAnimatedNumberList.internal();
-
-
-  /** @domName SVGAnimatedNumberList.animVal */
-  SVGNumberList get animVal native "SVGAnimatedNumberList_animVal_Getter";
-
-
-  /** @domName SVGAnimatedNumberList.baseVal */
-  SVGNumberList get baseVal native "SVGAnimatedNumberList_baseVal_Getter";
-
-  SVGAnimatedNumber operator[](int index) native "SVGAnimatedNumberList_item_Callback";
-
-  void operator[]=(int index, SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimatedNumber> mixins.
-  // SVGAnimatedNumber is the element type.
-
-  // From Iterable<SVGAnimatedNumber>:
-
-  Iterator<SVGAnimatedNumber> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimatedNumber>(this);
-  }
-
-  // From Collection<SVGAnimatedNumber>:
-
-  void add(SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimatedNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimatedNumber> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimatedNumber element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimatedNumber> filter(bool f(SVGAnimatedNumber element)) =>
-     _Collections.filter(this, <SVGAnimatedNumber>[], f);
-
-  bool every(bool f(SVGAnimatedNumber element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimatedNumber element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimatedNumber>:
-
-  void sort([Comparator<SVGAnimatedNumber> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimatedNumber element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimatedNumber element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimatedNumber get last => this[length - 1];
-
-  SVGAnimatedNumber removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimatedNumber initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimatedNumber> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimatedNumber>[]);
-
-  // -- end List<SVGAnimatedNumber> mixins.
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedPreserveAspectRatio
-class SVGAnimatedPreserveAspectRatio extends NativeFieldWrapperClass1 {
-  SVGAnimatedPreserveAspectRatio.internal();
-
-
-  /** @domName SVGAnimatedPreserveAspectRatio.animVal */
-  SVGPreserveAspectRatio get animVal native "SVGAnimatedPreserveAspectRatio_animVal_Getter";
-
-
-  /** @domName SVGAnimatedPreserveAspectRatio.baseVal */
-  SVGPreserveAspectRatio get baseVal native "SVGAnimatedPreserveAspectRatio_baseVal_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedRect
-class SVGAnimatedRect extends NativeFieldWrapperClass1 {
-  SVGAnimatedRect.internal();
-
-
-  /** @domName SVGAnimatedRect.animVal */
-  SVGRect get animVal native "SVGAnimatedRect_animVal_Getter";
-
-
-  /** @domName SVGAnimatedRect.baseVal */
-  SVGRect get baseVal native "SVGAnimatedRect_baseVal_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedString
-class SVGAnimatedString extends NativeFieldWrapperClass1 {
-  SVGAnimatedString.internal();
-
-
-  /** @domName SVGAnimatedString.animVal */
-  String get animVal native "SVGAnimatedString_animVal_Getter";
-
-
-  /** @domName SVGAnimatedString.baseVal */
-  String get baseVal native "SVGAnimatedString_baseVal_Getter";
-
-
-  /** @domName SVGAnimatedString.baseVal */
-  void set baseVal(String value) native "SVGAnimatedString_baseVal_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimatedTransformList
-class SVGAnimatedTransformList extends NativeFieldWrapperClass1 implements List<SVGAnimateTransformElement> {
-  SVGAnimatedTransformList.internal();
-
-
-  /** @domName SVGAnimatedTransformList.animVal */
-  SVGTransformList get animVal native "SVGAnimatedTransformList_animVal_Getter";
-
-
-  /** @domName SVGAnimatedTransformList.baseVal */
-  SVGTransformList get baseVal native "SVGAnimatedTransformList_baseVal_Getter";
-
-  SVGAnimateTransformElement operator[](int index) native "SVGAnimatedTransformList_item_Callback";
-
-  void operator[]=(int index, SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGAnimateTransformElement> mixins.
-  // SVGAnimateTransformElement is the element type.
-
-  // From Iterable<SVGAnimateTransformElement>:
-
-  Iterator<SVGAnimateTransformElement> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGAnimateTransformElement>(this);
-  }
-
-  // From Collection<SVGAnimateTransformElement>:
-
-  void add(SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGAnimateTransformElement value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGAnimateTransformElement> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGAnimateTransformElement element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f);
-
-  Collection<SVGAnimateTransformElement> filter(bool f(SVGAnimateTransformElement element)) =>
-     _Collections.filter(this, <SVGAnimateTransformElement>[], f);
-
-  bool every(bool f(SVGAnimateTransformElement element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGAnimateTransformElement element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGAnimateTransformElement>:
-
-  void sort([Comparator<SVGAnimateTransformElement> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGAnimateTransformElement element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGAnimateTransformElement element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGAnimateTransformElement get last => this[length - 1];
-
-  SVGAnimateTransformElement removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGAnimateTransformElement initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGAnimateTransformElement> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGAnimateTransformElement>[]);
-
-  // -- end List<SVGAnimateTransformElement> mixins.
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGAnimationElement
-class SVGAnimationElement extends SVGElement implements ElementTimeControl, SVGTests, SVGExternalResourcesRequired {
-  SVGAnimationElement.internal(): super.internal();
-
-
-  /** @domName SVGAnimationElement.targetElement */
-  SVGElement get targetElement native "SVGAnimationElement_targetElement_Getter";
-
-
-  /** @domName SVGAnimationElement.getCurrentTime */
-  num getCurrentTime() native "SVGAnimationElement_getCurrentTime_Callback";
-
-
-  /** @domName SVGAnimationElement.getSimpleDuration */
-  num getSimpleDuration() native "SVGAnimationElement_getSimpleDuration_Callback";
-
-
-  /** @domName SVGAnimationElement.getStartTime */
-  num getStartTime() native "SVGAnimationElement_getStartTime_Callback";
-
-
-  /** @domName SVGAnimationElement.beginElement */
-  void beginElement() native "SVGAnimationElement_beginElement_Callback";
-
-
-  /** @domName SVGAnimationElement.beginElementAt */
-  void beginElementAt(num offset) native "SVGAnimationElement_beginElementAt_Callback";
-
-
-  /** @domName SVGAnimationElement.endElement */
-  void endElement() native "SVGAnimationElement_endElement_Callback";
-
-
-  /** @domName SVGAnimationElement.endElementAt */
-  void endElementAt(num offset) native "SVGAnimationElement_endElementAt_Callback";
-
-
-  /** @domName SVGAnimationElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGAnimationElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGAnimationElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGAnimationElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGAnimationElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGAnimationElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGAnimationElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGAnimationElement_systemLanguage_Getter";
-
-
-  /** @domName SVGAnimationElement.hasExtension */
-  bool hasExtension(String extension) native "SVGAnimationElement_hasExtension_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGCircleElement
-class SVGCircleElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGCircleElement.internal(): super.internal();
-
-
-  /** @domName SVGCircleElement.cx */
-  SVGAnimatedLength get cx native "SVGCircleElement_cx_Getter";
-
-
-  /** @domName SVGCircleElement.cy */
-  SVGAnimatedLength get cy native "SVGCircleElement_cy_Getter";
-
-
-  /** @domName SVGCircleElement.r */
-  SVGAnimatedLength get r native "SVGCircleElement_r_Getter";
-
-
-  /** @domName SVGCircleElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGCircleElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGCircleElement.xmllang */
-  String get xmllang native "SVGCircleElement_xmllang_Getter";
-
-
-  /** @domName SVGCircleElement.xmllang */
-  void set xmllang(String value) native "SVGCircleElement_xmllang_Setter";
-
-
-  /** @domName SVGCircleElement.xmlspace */
-  String get xmlspace native "SVGCircleElement_xmlspace_Getter";
-
-
-  /** @domName SVGCircleElement.xmlspace */
-  void set xmlspace(String value) native "SVGCircleElement_xmlspace_Setter";
-
-
-  /** @domName SVGCircleElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGCircleElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGCircleElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGCircleElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGCircleElement.getBBox */
-  SVGRect getBBox() native "SVGCircleElement_getBBox_Callback";
-
-
-  /** @domName SVGCircleElement.getCTM */
-  SVGMatrix getCTM() native "SVGCircleElement_getCTM_Callback";
-
-
-  /** @domName SVGCircleElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGCircleElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGCircleElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGCircleElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGCircleElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGCircleElement_className_Getter";
-
-
-  /** @domName SVGCircleElement.style */
-  CSSStyleDeclaration get style native "SVGCircleElement_style_Getter";
-
-
-  /** @domName SVGCircleElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGCircleElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGCircleElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGCircleElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGCircleElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGCircleElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGCircleElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGCircleElement_systemLanguage_Getter";
-
-
-  /** @domName SVGCircleElement.hasExtension */
-  bool hasExtension(String extension) native "SVGCircleElement_hasExtension_Callback";
-
-
-  /** @domName SVGCircleElement.transform */
-  SVGAnimatedTransformList get transform native "SVGCircleElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGClipPathElement
-class SVGClipPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGClipPathElement.internal(): super.internal();
-
-
-  /** @domName SVGClipPathElement.clipPathUnits */
-  SVGAnimatedEnumeration get clipPathUnits native "SVGClipPathElement_clipPathUnits_Getter";
-
-
-  /** @domName SVGClipPathElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGClipPathElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGClipPathElement.xmllang */
-  String get xmllang native "SVGClipPathElement_xmllang_Getter";
-
-
-  /** @domName SVGClipPathElement.xmllang */
-  void set xmllang(String value) native "SVGClipPathElement_xmllang_Setter";
-
-
-  /** @domName SVGClipPathElement.xmlspace */
-  String get xmlspace native "SVGClipPathElement_xmlspace_Getter";
-
-
-  /** @domName SVGClipPathElement.xmlspace */
-  void set xmlspace(String value) native "SVGClipPathElement_xmlspace_Setter";
-
-
-  /** @domName SVGClipPathElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGClipPathElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGClipPathElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGClipPathElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGClipPathElement.getBBox */
-  SVGRect getBBox() native "SVGClipPathElement_getBBox_Callback";
-
-
-  /** @domName SVGClipPathElement.getCTM */
-  SVGMatrix getCTM() native "SVGClipPathElement_getCTM_Callback";
-
-
-  /** @domName SVGClipPathElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGClipPathElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGClipPathElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGClipPathElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGClipPathElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGClipPathElement_className_Getter";
-
-
-  /** @domName SVGClipPathElement.style */
-  CSSStyleDeclaration get style native "SVGClipPathElement_style_Getter";
-
-
-  /** @domName SVGClipPathElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGClipPathElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGClipPathElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGClipPathElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGClipPathElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGClipPathElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGClipPathElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGClipPathElement_systemLanguage_Getter";
-
-
-  /** @domName SVGClipPathElement.hasExtension */
-  bool hasExtension(String extension) native "SVGClipPathElement_hasExtension_Callback";
-
-
-  /** @domName SVGClipPathElement.transform */
-  SVGAnimatedTransformList get transform native "SVGClipPathElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGColor
-class SVGColor extends CSSValue {
-  SVGColor.internal(): super.internal();
-
-  static const int SVG_COLORTYPE_CURRENTCOLOR = 3;
-
-  static const int SVG_COLORTYPE_RGBCOLOR = 1;
-
-  static const int SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
-
-  static const int SVG_COLORTYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGColor.colorType */
-  int get colorType native "SVGColor_colorType_Getter";
-
-
-  /** @domName SVGColor.rgbColor */
-  RGBColor get rgbColor native "SVGColor_rgbColor_Getter";
-
-
-  /** @domName SVGColor.setColor */
-  void setColor(int colorType, String rgbColor, String iccColor) native "SVGColor_setColor_Callback";
-
-
-  /** @domName SVGColor.setRGBColor */
-  void setRGBColor(String rgbColor) native "SVGColor_setRGBColor_Callback";
-
-
-  /** @domName SVGColor.setRGBColorICCColor */
-  void setRGBColorICCColor(String rgbColor, String iccColor) native "SVGColor_setRGBColorICCColor_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGComponentTransferFunctionElement
-class SVGComponentTransferFunctionElement extends SVGElement {
-  SVGComponentTransferFunctionElement.internal(): super.internal();
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
-
-  static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGComponentTransferFunctionElement.amplitude */
-  SVGAnimatedNumber get amplitude native "SVGComponentTransferFunctionElement_amplitude_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.exponent */
-  SVGAnimatedNumber get exponent native "SVGComponentTransferFunctionElement_exponent_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.intercept */
-  SVGAnimatedNumber get intercept native "SVGComponentTransferFunctionElement_intercept_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.offset */
-  SVGAnimatedNumber get offset native "SVGComponentTransferFunctionElement_offset_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.slope */
-  SVGAnimatedNumber get slope native "SVGComponentTransferFunctionElement_slope_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.tableValues */
-  SVGAnimatedNumberList get tableValues native "SVGComponentTransferFunctionElement_tableValues_Getter";
-
-
-  /** @domName SVGComponentTransferFunctionElement.type */
-  SVGAnimatedEnumeration get type native "SVGComponentTransferFunctionElement_type_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGCursorElement
-class SVGCursorElement extends SVGElement implements SVGURIReference, SVGTests, SVGExternalResourcesRequired {
-  SVGCursorElement.internal(): super.internal();
-
-
-  /** @domName SVGCursorElement.x */
-  SVGAnimatedLength get x native "SVGCursorElement_x_Getter";
-
-
-  /** @domName SVGCursorElement.y */
-  SVGAnimatedLength get y native "SVGCursorElement_y_Getter";
-
-
-  /** @domName SVGCursorElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGCursorElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGCursorElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGCursorElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGCursorElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGCursorElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGCursorElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGCursorElement_systemLanguage_Getter";
-
-
-  /** @domName SVGCursorElement.hasExtension */
-  bool hasExtension(String extension) native "SVGCursorElement_hasExtension_Callback";
-
-
-  /** @domName SVGCursorElement.href */
-  SVGAnimatedString get href native "SVGCursorElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGDefsElement
-class SVGDefsElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGDefsElement.internal(): super.internal();
-
-
-  /** @domName SVGDefsElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGDefsElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGDefsElement.xmllang */
-  String get xmllang native "SVGDefsElement_xmllang_Getter";
-
-
-  /** @domName SVGDefsElement.xmllang */
-  void set xmllang(String value) native "SVGDefsElement_xmllang_Setter";
-
-
-  /** @domName SVGDefsElement.xmlspace */
-  String get xmlspace native "SVGDefsElement_xmlspace_Getter";
-
-
-  /** @domName SVGDefsElement.xmlspace */
-  void set xmlspace(String value) native "SVGDefsElement_xmlspace_Setter";
-
-
-  /** @domName SVGDefsElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGDefsElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGDefsElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGDefsElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGDefsElement.getBBox */
-  SVGRect getBBox() native "SVGDefsElement_getBBox_Callback";
-
-
-  /** @domName SVGDefsElement.getCTM */
-  SVGMatrix getCTM() native "SVGDefsElement_getCTM_Callback";
-
-
-  /** @domName SVGDefsElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGDefsElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGDefsElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGDefsElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGDefsElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGDefsElement_className_Getter";
-
-
-  /** @domName SVGDefsElement.style */
-  CSSStyleDeclaration get style native "SVGDefsElement_style_Getter";
-
-
-  /** @domName SVGDefsElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGDefsElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGDefsElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGDefsElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGDefsElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGDefsElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGDefsElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGDefsElement_systemLanguage_Getter";
-
-
-  /** @domName SVGDefsElement.hasExtension */
-  bool hasExtension(String extension) native "SVGDefsElement_hasExtension_Callback";
-
-
-  /** @domName SVGDefsElement.transform */
-  SVGAnimatedTransformList get transform native "SVGDefsElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGDescElement
-class SVGDescElement extends SVGElement implements SVGLangSpace, SVGStylable {
-  SVGDescElement.internal(): super.internal();
-
-
-  /** @domName SVGDescElement.xmllang */
-  String get xmllang native "SVGDescElement_xmllang_Getter";
-
-
-  /** @domName SVGDescElement.xmllang */
-  void set xmllang(String value) native "SVGDescElement_xmllang_Setter";
-
-
-  /** @domName SVGDescElement.xmlspace */
-  String get xmlspace native "SVGDescElement_xmlspace_Getter";
-
-
-  /** @domName SVGDescElement.xmlspace */
-  void set xmlspace(String value) native "SVGDescElement_xmlspace_Setter";
-
-
-  /** @domName SVGDescElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGDescElement_className_Getter";
-
-
-  /** @domName SVGDescElement.style */
-  CSSStyleDeclaration get style native "SVGDescElement_style_Getter";
-
-
-  /** @domName SVGDescElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGDescElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGDocument
-class SVGDocument extends Document {
-  SVGDocument.internal(): super.internal();
-
-
-  /** @domName SVGDocument.rootElement */
-  SVGSVGElement get rootElement native "SVGDocument_rootElement_Getter";
-
-
-  /** @domName SVGDocument.createEvent */
-  Event $dom_createEvent(String eventType) native "SVGDocument_createEvent_Callback";
-
-}
-// 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.
-
-class _AttributeClassSet extends _CssClassSet {
-  _AttributeClassSet(element) : super(element);
-
-  String $dom_className() => _element.attributes['class'];
-
-  void _write(Set s) {
-    _element.attributes['class'] = _formatSet(s);
-  }
-}
-
-class SVGElement extends Element {
-  factory SVGElement.tag(String tag) =>
-      _SVGElementFactoryProvider.createSVGElement_tag(tag);
-  factory SVGElement.svg(String svg) =>
-      _SVGElementFactoryProvider.createSVGElement_svg(svg);
-
-  CssClassSet get classes {
-    if (_cssClassSet == null) {
-      _cssClassSet = new _AttributeClassSet(_ptr);
-    }
-    return _cssClassSet;
-  }
-
-  List<Element> get elements => new _FilteredElementList(this);
-
-  void set elements(Collection<Element> value) {
-    final elements = this.elements;
-    elements.clear();
-    elements.addAll(value);
-  }
-
-  String get outerHTML {
-    final container = new Element.tag("div");
-    final SVGElement cloned = this.clone(true);
-    container.elements.add(cloned);
-    return container.innerHTML;
-  }
-
-  String get innerHTML {
-    final container = new Element.tag("div");
-    final SVGElement cloned = this.clone(true);
-    container.elements.addAll(cloned.elements);
-    return container.innerHTML;
-  }
-
-  void set innerHTML(String svg) {
-    final container = new Element.tag("div");
-    // Wrap the SVG string in <svg> so that SVGElements are created, rather than
-    // HTMLElements.
-    container.innerHTML = '<svg version="1.1">$svg</svg>';
-    this.elements = container.elements[0].elements;
-  }
-
-  SVGElement.internal(): super.internal();
-
-
-  /** @domName SVGElement.id */
-  String get id native "SVGElement_id_Getter";
-
-
-  /** @domName SVGElement.id */
-  void set id(String value) native "SVGElement_id_Setter";
-
-
-  /** @domName SVGElement.ownerSVGElement */
-  SVGSVGElement get ownerSVGElement native "SVGElement_ownerSVGElement_Getter";
-
-
-  /** @domName SVGElement.viewportElement */
-  SVGElement get viewportElement native "SVGElement_viewportElement_Getter";
-
-
-  /** @domName SVGElement.xmlbase */
-  String get xmlbase native "SVGElement_xmlbase_Getter";
-
-
-  /** @domName SVGElement.xmlbase */
-  void set xmlbase(String value) native "SVGElement_xmlbase_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGElementInstance
-class SVGElementInstance extends EventTarget {
-  SVGElementInstance.internal(): super.internal();
-
-  /**
-   * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
-   */
-  SVGElementInstanceEvents get on =>
-    new SVGElementInstanceEvents(this);
-
-
-  /** @domName SVGElementInstance.childNodes */
-  List<SVGElementInstance> get childNodes native "SVGElementInstance_childNodes_Getter";
-
-
-  /** @domName SVGElementInstance.correspondingElement */
-  SVGElement get correspondingElement native "SVGElementInstance_correspondingElement_Getter";
-
-
-  /** @domName SVGElementInstance.correspondingUseElement */
-  SVGUseElement get correspondingUseElement native "SVGElementInstance_correspondingUseElement_Getter";
-
-
-  /** @domName SVGElementInstance.firstChild */
-  SVGElementInstance get firstChild native "SVGElementInstance_firstChild_Getter";
-
-
-  /** @domName SVGElementInstance.lastChild */
-  SVGElementInstance get lastChild native "SVGElementInstance_lastChild_Getter";
-
-
-  /** @domName SVGElementInstance.nextSibling */
-  SVGElementInstance get nextSibling native "SVGElementInstance_nextSibling_Getter";
-
-
-  /** @domName SVGElementInstance.parentNode */
-  SVGElementInstance get parentNode native "SVGElementInstance_parentNode_Getter";
-
-
-  /** @domName SVGElementInstance.previousSibling */
-  SVGElementInstance get previousSibling native "SVGElementInstance_previousSibling_Getter";
-
-}
-
-class SVGElementInstanceEvents extends Events {
-  SVGElementInstanceEvents(EventTarget _ptr) : super(_ptr);
-
-  EventListenerList get abort => this['abort'];
-
-  EventListenerList get beforeCopy => this['beforecopy'];
-
-  EventListenerList get beforeCut => this['beforecut'];
-
-  EventListenerList get beforePaste => this['beforepaste'];
-
-  EventListenerList get blur => this['blur'];
-
-  EventListenerList get change => this['change'];
-
-  EventListenerList get click => this['click'];
-
-  EventListenerList get contextMenu => this['contextmenu'];
-
-  EventListenerList get copy => this['copy'];
-
-  EventListenerList get cut => this['cut'];
-
-  EventListenerList get doubleClick => this['dblclick'];
-
-  EventListenerList get drag => this['drag'];
-
-  EventListenerList get dragEnd => this['dragend'];
-
-  EventListenerList get dragEnter => this['dragenter'];
-
-  EventListenerList get dragLeave => this['dragleave'];
-
-  EventListenerList get dragOver => this['dragover'];
-
-  EventListenerList get dragStart => this['dragstart'];
-
-  EventListenerList get drop => this['drop'];
-
-  EventListenerList get error => this['error'];
-
-  EventListenerList get focus => this['focus'];
-
-  EventListenerList get input => this['input'];
-
-  EventListenerList get keyDown => this['keydown'];
-
-  EventListenerList get keyPress => this['keypress'];
-
-  EventListenerList get keyUp => this['keyup'];
-
-  EventListenerList get load => this['load'];
-
-  EventListenerList get mouseDown => this['mousedown'];
-
-  EventListenerList get mouseMove => this['mousemove'];
-
-  EventListenerList get mouseOut => this['mouseout'];
-
-  EventListenerList get mouseOver => this['mouseover'];
-
-  EventListenerList get mouseUp => this['mouseup'];
-
-  EventListenerList get mouseWheel => this['mousewheel'];
-
-  EventListenerList get paste => this['paste'];
-
-  EventListenerList get reset => this['reset'];
-
-  EventListenerList get resize => this['resize'];
-
-  EventListenerList get scroll => this['scroll'];
-
-  EventListenerList get search => this['search'];
-
-  EventListenerList get select => this['select'];
-
-  EventListenerList get selectStart => this['selectstart'];
-
-  EventListenerList get submit => this['submit'];
-
-  EventListenerList get unload => this['unload'];
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGEllipseElement
-class SVGEllipseElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGEllipseElement.internal(): super.internal();
-
-
-  /** @domName SVGEllipseElement.cx */
-  SVGAnimatedLength get cx native "SVGEllipseElement_cx_Getter";
-
-
-  /** @domName SVGEllipseElement.cy */
-  SVGAnimatedLength get cy native "SVGEllipseElement_cy_Getter";
-
-
-  /** @domName SVGEllipseElement.rx */
-  SVGAnimatedLength get rx native "SVGEllipseElement_rx_Getter";
-
-
-  /** @domName SVGEllipseElement.ry */
-  SVGAnimatedLength get ry native "SVGEllipseElement_ry_Getter";
-
-
-  /** @domName SVGEllipseElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGEllipseElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGEllipseElement.xmllang */
-  String get xmllang native "SVGEllipseElement_xmllang_Getter";
-
-
-  /** @domName SVGEllipseElement.xmllang */
-  void set xmllang(String value) native "SVGEllipseElement_xmllang_Setter";
-
-
-  /** @domName SVGEllipseElement.xmlspace */
-  String get xmlspace native "SVGEllipseElement_xmlspace_Getter";
-
-
-  /** @domName SVGEllipseElement.xmlspace */
-  void set xmlspace(String value) native "SVGEllipseElement_xmlspace_Setter";
-
-
-  /** @domName SVGEllipseElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGEllipseElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGEllipseElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGEllipseElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGEllipseElement.getBBox */
-  SVGRect getBBox() native "SVGEllipseElement_getBBox_Callback";
-
-
-  /** @domName SVGEllipseElement.getCTM */
-  SVGMatrix getCTM() native "SVGEllipseElement_getCTM_Callback";
-
-
-  /** @domName SVGEllipseElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGEllipseElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGEllipseElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGEllipseElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGEllipseElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGEllipseElement_className_Getter";
-
-
-  /** @domName SVGEllipseElement.style */
-  CSSStyleDeclaration get style native "SVGEllipseElement_style_Getter";
-
-
-  /** @domName SVGEllipseElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGEllipseElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGEllipseElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGEllipseElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGEllipseElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGEllipseElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGEllipseElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGEllipseElement_systemLanguage_Getter";
-
-
-  /** @domName SVGEllipseElement.hasExtension */
-  bool hasExtension(String extension) native "SVGEllipseElement_hasExtension_Callback";
-
-
-  /** @domName SVGEllipseElement.transform */
-  SVGAnimatedTransformList get transform native "SVGEllipseElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGException
-class SVGException extends NativeFieldWrapperClass1 {
-  SVGException.internal();
-
-  static const int SVG_INVALID_VALUE_ERR = 1;
-
-  static const int SVG_MATRIX_NOT_INVERTABLE = 2;
-
-  static const int SVG_WRONG_TYPE_ERR = 0;
-
-
-  /** @domName SVGException.code */
-  int get code native "SVGException_code_Getter";
-
-
-  /** @domName SVGException.message */
-  String get message native "SVGException_message_Getter";
-
-
-  /** @domName SVGException.name */
-  String get name native "SVGException_name_Getter";
-
-
-  /** @domName SVGException.toString */
-  String toString() native "SVGException_toString_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGExternalResourcesRequired
-class SVGExternalResourcesRequired extends NativeFieldWrapperClass1 {
-  SVGExternalResourcesRequired.internal();
-
-
-  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGExternalResourcesRequired_externalResourcesRequired_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEBlendElement
-class SVGFEBlendElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEBlendElement.internal(): super.internal();
-
-  static const int SVG_FEBLEND_MODE_DARKEN = 4;
-
-  static const int SVG_FEBLEND_MODE_LIGHTEN = 5;
-
-  static const int SVG_FEBLEND_MODE_MULTIPLY = 2;
-
-  static const int SVG_FEBLEND_MODE_NORMAL = 1;
-
-  static const int SVG_FEBLEND_MODE_SCREEN = 3;
-
-  static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
-
-
-  /** @domName SVGFEBlendElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEBlendElement_in1_Getter";
-
-
-  /** @domName SVGFEBlendElement.in2 */
-  SVGAnimatedString get in2 native "SVGFEBlendElement_in2_Getter";
-
-
-  /** @domName SVGFEBlendElement.mode */
-  SVGAnimatedEnumeration get mode native "SVGFEBlendElement_mode_Getter";
-
-
-  /** @domName SVGFEBlendElement.height */
-  SVGAnimatedLength get height native "SVGFEBlendElement_height_Getter";
-
-
-  /** @domName SVGFEBlendElement.result */
-  SVGAnimatedString get result native "SVGFEBlendElement_result_Getter";
-
-
-  /** @domName SVGFEBlendElement.width */
-  SVGAnimatedLength get width native "SVGFEBlendElement_width_Getter";
-
-
-  /** @domName SVGFEBlendElement.x */
-  SVGAnimatedLength get x native "SVGFEBlendElement_x_Getter";
-
-
-  /** @domName SVGFEBlendElement.y */
-  SVGAnimatedLength get y native "SVGFEBlendElement_y_Getter";
-
-
-  /** @domName SVGFEBlendElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEBlendElement_className_Getter";
-
-
-  /** @domName SVGFEBlendElement.style */
-  CSSStyleDeclaration get style native "SVGFEBlendElement_style_Getter";
-
-
-  /** @domName SVGFEBlendElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEBlendElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEColorMatrixElement
-class SVGFEColorMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEColorMatrixElement.internal(): super.internal();
-
-  static const int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
-
-  static const int SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
-
-  static const int SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
-
-  static const int SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
-
-  static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGFEColorMatrixElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEColorMatrixElement_in1_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.type */
-  SVGAnimatedEnumeration get type native "SVGFEColorMatrixElement_type_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.values */
-  SVGAnimatedNumberList get values native "SVGFEColorMatrixElement_values_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.height */
-  SVGAnimatedLength get height native "SVGFEColorMatrixElement_height_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.result */
-  SVGAnimatedString get result native "SVGFEColorMatrixElement_result_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.width */
-  SVGAnimatedLength get width native "SVGFEColorMatrixElement_width_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.x */
-  SVGAnimatedLength get x native "SVGFEColorMatrixElement_x_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.y */
-  SVGAnimatedLength get y native "SVGFEColorMatrixElement_y_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEColorMatrixElement_className_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.style */
-  CSSStyleDeclaration get style native "SVGFEColorMatrixElement_style_Getter";
-
-
-  /** @domName SVGFEColorMatrixElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEColorMatrixElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEComponentTransferElement
-class SVGFEComponentTransferElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEComponentTransferElement.internal(): super.internal();
-
-
-  /** @domName SVGFEComponentTransferElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEComponentTransferElement_in1_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.height */
-  SVGAnimatedLength get height native "SVGFEComponentTransferElement_height_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.result */
-  SVGAnimatedString get result native "SVGFEComponentTransferElement_result_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.width */
-  SVGAnimatedLength get width native "SVGFEComponentTransferElement_width_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.x */
-  SVGAnimatedLength get x native "SVGFEComponentTransferElement_x_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.y */
-  SVGAnimatedLength get y native "SVGFEComponentTransferElement_y_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEComponentTransferElement_className_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.style */
-  CSSStyleDeclaration get style native "SVGFEComponentTransferElement_style_Getter";
-
-
-  /** @domName SVGFEComponentTransferElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEComponentTransferElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFECompositeElement
-class SVGFECompositeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFECompositeElement.internal(): super.internal();
-
-  static const int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_IN = 2;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_OUT = 3;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_OVER = 1;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
-
-  static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
-
-
-  /** @domName SVGFECompositeElement.in1 */
-  SVGAnimatedString get in1 native "SVGFECompositeElement_in1_Getter";
-
-
-  /** @domName SVGFECompositeElement.in2 */
-  SVGAnimatedString get in2 native "SVGFECompositeElement_in2_Getter";
-
-
-  /** @domName SVGFECompositeElement.k1 */
-  SVGAnimatedNumber get k1 native "SVGFECompositeElement_k1_Getter";
-
-
-  /** @domName SVGFECompositeElement.k2 */
-  SVGAnimatedNumber get k2 native "SVGFECompositeElement_k2_Getter";
-
-
-  /** @domName SVGFECompositeElement.k3 */
-  SVGAnimatedNumber get k3 native "SVGFECompositeElement_k3_Getter";
-
-
-  /** @domName SVGFECompositeElement.k4 */
-  SVGAnimatedNumber get k4 native "SVGFECompositeElement_k4_Getter";
-
-
-  /** @domName SVGFECompositeElement.operator */
-  SVGAnimatedEnumeration get operator native "SVGFECompositeElement_operator_Getter";
-
-
-  /** @domName SVGFECompositeElement.height */
-  SVGAnimatedLength get height native "SVGFECompositeElement_height_Getter";
-
-
-  /** @domName SVGFECompositeElement.result */
-  SVGAnimatedString get result native "SVGFECompositeElement_result_Getter";
-
-
-  /** @domName SVGFECompositeElement.width */
-  SVGAnimatedLength get width native "SVGFECompositeElement_width_Getter";
-
-
-  /** @domName SVGFECompositeElement.x */
-  SVGAnimatedLength get x native "SVGFECompositeElement_x_Getter";
-
-
-  /** @domName SVGFECompositeElement.y */
-  SVGAnimatedLength get y native "SVGFECompositeElement_y_Getter";
-
-
-  /** @domName SVGFECompositeElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFECompositeElement_className_Getter";
-
-
-  /** @domName SVGFECompositeElement.style */
-  CSSStyleDeclaration get style native "SVGFECompositeElement_style_Getter";
-
-
-  /** @domName SVGFECompositeElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFECompositeElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEConvolveMatrixElement
-class SVGFEConvolveMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEConvolveMatrixElement.internal(): super.internal();
-
-  static const int SVG_EDGEMODE_DUPLICATE = 1;
-
-  static const int SVG_EDGEMODE_NONE = 3;
-
-  static const int SVG_EDGEMODE_UNKNOWN = 0;
-
-  static const int SVG_EDGEMODE_WRAP = 2;
-
-
-  /** @domName SVGFEConvolveMatrixElement.bias */
-  SVGAnimatedNumber get bias native "SVGFEConvolveMatrixElement_bias_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.divisor */
-  SVGAnimatedNumber get divisor native "SVGFEConvolveMatrixElement_divisor_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.edgeMode */
-  SVGAnimatedEnumeration get edgeMode native "SVGFEConvolveMatrixElement_edgeMode_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEConvolveMatrixElement_in1_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.kernelMatrix */
-  SVGAnimatedNumberList get kernelMatrix native "SVGFEConvolveMatrixElement_kernelMatrix_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthX */
-  SVGAnimatedNumber get kernelUnitLengthX native "SVGFEConvolveMatrixElement_kernelUnitLengthX_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthY */
-  SVGAnimatedNumber get kernelUnitLengthY native "SVGFEConvolveMatrixElement_kernelUnitLengthY_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.orderX */
-  SVGAnimatedInteger get orderX native "SVGFEConvolveMatrixElement_orderX_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.orderY */
-  SVGAnimatedInteger get orderY native "SVGFEConvolveMatrixElement_orderY_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.preserveAlpha */
-  SVGAnimatedBoolean get preserveAlpha native "SVGFEConvolveMatrixElement_preserveAlpha_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.targetX */
-  SVGAnimatedInteger get targetX native "SVGFEConvolveMatrixElement_targetX_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.targetY */
-  SVGAnimatedInteger get targetY native "SVGFEConvolveMatrixElement_targetY_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.height */
-  SVGAnimatedLength get height native "SVGFEConvolveMatrixElement_height_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.result */
-  SVGAnimatedString get result native "SVGFEConvolveMatrixElement_result_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.width */
-  SVGAnimatedLength get width native "SVGFEConvolveMatrixElement_width_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.x */
-  SVGAnimatedLength get x native "SVGFEConvolveMatrixElement_x_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.y */
-  SVGAnimatedLength get y native "SVGFEConvolveMatrixElement_y_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEConvolveMatrixElement_className_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.style */
-  CSSStyleDeclaration get style native "SVGFEConvolveMatrixElement_style_Getter";
-
-
-  /** @domName SVGFEConvolveMatrixElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEConvolveMatrixElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEDiffuseLightingElement
-class SVGFEDiffuseLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEDiffuseLightingElement.internal(): super.internal();
-
-
-  /** @domName SVGFEDiffuseLightingElement.diffuseConstant */
-  SVGAnimatedNumber get diffuseConstant native "SVGFEDiffuseLightingElement_diffuseConstant_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEDiffuseLightingElement_in1_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthX */
-  SVGAnimatedNumber get kernelUnitLengthX native "SVGFEDiffuseLightingElement_kernelUnitLengthX_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthY */
-  SVGAnimatedNumber get kernelUnitLengthY native "SVGFEDiffuseLightingElement_kernelUnitLengthY_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.surfaceScale */
-  SVGAnimatedNumber get surfaceScale native "SVGFEDiffuseLightingElement_surfaceScale_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.height */
-  SVGAnimatedLength get height native "SVGFEDiffuseLightingElement_height_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.result */
-  SVGAnimatedString get result native "SVGFEDiffuseLightingElement_result_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.width */
-  SVGAnimatedLength get width native "SVGFEDiffuseLightingElement_width_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.x */
-  SVGAnimatedLength get x native "SVGFEDiffuseLightingElement_x_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.y */
-  SVGAnimatedLength get y native "SVGFEDiffuseLightingElement_y_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEDiffuseLightingElement_className_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.style */
-  CSSStyleDeclaration get style native "SVGFEDiffuseLightingElement_style_Getter";
-
-
-  /** @domName SVGFEDiffuseLightingElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEDiffuseLightingElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEDisplacementMapElement
-class SVGFEDisplacementMapElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEDisplacementMapElement.internal(): super.internal();
-
-  static const int SVG_CHANNEL_A = 4;
-
-  static const int SVG_CHANNEL_B = 3;
-
-  static const int SVG_CHANNEL_G = 2;
-
-  static const int SVG_CHANNEL_R = 1;
-
-  static const int SVG_CHANNEL_UNKNOWN = 0;
-
-
-  /** @domName SVGFEDisplacementMapElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEDisplacementMapElement_in1_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.in2 */
-  SVGAnimatedString get in2 native "SVGFEDisplacementMapElement_in2_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.scale */
-  SVGAnimatedNumber get scale native "SVGFEDisplacementMapElement_scale_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.xChannelSelector */
-  SVGAnimatedEnumeration get xChannelSelector native "SVGFEDisplacementMapElement_xChannelSelector_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.yChannelSelector */
-  SVGAnimatedEnumeration get yChannelSelector native "SVGFEDisplacementMapElement_yChannelSelector_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.height */
-  SVGAnimatedLength get height native "SVGFEDisplacementMapElement_height_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.result */
-  SVGAnimatedString get result native "SVGFEDisplacementMapElement_result_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.width */
-  SVGAnimatedLength get width native "SVGFEDisplacementMapElement_width_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.x */
-  SVGAnimatedLength get x native "SVGFEDisplacementMapElement_x_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.y */
-  SVGAnimatedLength get y native "SVGFEDisplacementMapElement_y_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEDisplacementMapElement_className_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.style */
-  CSSStyleDeclaration get style native "SVGFEDisplacementMapElement_style_Getter";
-
-
-  /** @domName SVGFEDisplacementMapElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEDisplacementMapElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEDistantLightElement
-class SVGFEDistantLightElement extends SVGElement {
-  SVGFEDistantLightElement.internal(): super.internal();
-
-
-  /** @domName SVGFEDistantLightElement.azimuth */
-  SVGAnimatedNumber get azimuth native "SVGFEDistantLightElement_azimuth_Getter";
-
-
-  /** @domName SVGFEDistantLightElement.elevation */
-  SVGAnimatedNumber get elevation native "SVGFEDistantLightElement_elevation_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEDropShadowElement
-class SVGFEDropShadowElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEDropShadowElement.internal(): super.internal();
-
-
-  /** @domName SVGFEDropShadowElement.dx */
-  SVGAnimatedNumber get dx native "SVGFEDropShadowElement_dx_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.dy */
-  SVGAnimatedNumber get dy native "SVGFEDropShadowElement_dy_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEDropShadowElement_in1_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.stdDeviationX */
-  SVGAnimatedNumber get stdDeviationX native "SVGFEDropShadowElement_stdDeviationX_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.stdDeviationY */
-  SVGAnimatedNumber get stdDeviationY native "SVGFEDropShadowElement_stdDeviationY_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.setStdDeviation */
-  void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEDropShadowElement_setStdDeviation_Callback";
-
-
-  /** @domName SVGFEDropShadowElement.height */
-  SVGAnimatedLength get height native "SVGFEDropShadowElement_height_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.result */
-  SVGAnimatedString get result native "SVGFEDropShadowElement_result_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.width */
-  SVGAnimatedLength get width native "SVGFEDropShadowElement_width_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.x */
-  SVGAnimatedLength get x native "SVGFEDropShadowElement_x_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.y */
-  SVGAnimatedLength get y native "SVGFEDropShadowElement_y_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEDropShadowElement_className_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.style */
-  CSSStyleDeclaration get style native "SVGFEDropShadowElement_style_Getter";
-
-
-  /** @domName SVGFEDropShadowElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEDropShadowElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEFloodElement
-class SVGFEFloodElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEFloodElement.internal(): super.internal();
-
-
-  /** @domName SVGFEFloodElement.height */
-  SVGAnimatedLength get height native "SVGFEFloodElement_height_Getter";
-
-
-  /** @domName SVGFEFloodElement.result */
-  SVGAnimatedString get result native "SVGFEFloodElement_result_Getter";
-
-
-  /** @domName SVGFEFloodElement.width */
-  SVGAnimatedLength get width native "SVGFEFloodElement_width_Getter";
-
-
-  /** @domName SVGFEFloodElement.x */
-  SVGAnimatedLength get x native "SVGFEFloodElement_x_Getter";
-
-
-  /** @domName SVGFEFloodElement.y */
-  SVGAnimatedLength get y native "SVGFEFloodElement_y_Getter";
-
-
-  /** @domName SVGFEFloodElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEFloodElement_className_Getter";
-
-
-  /** @domName SVGFEFloodElement.style */
-  CSSStyleDeclaration get style native "SVGFEFloodElement_style_Getter";
-
-
-  /** @domName SVGFEFloodElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEFloodElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEFuncAElement
-class SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
-  SVGFEFuncAElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEFuncBElement
-class SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
-  SVGFEFuncBElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEFuncGElement
-class SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
-  SVGFEFuncGElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEFuncRElement
-class SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
-  SVGFEFuncRElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEGaussianBlurElement
-class SVGFEGaussianBlurElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEGaussianBlurElement.internal(): super.internal();
-
-
-  /** @domName SVGFEGaussianBlurElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEGaussianBlurElement_in1_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.stdDeviationX */
-  SVGAnimatedNumber get stdDeviationX native "SVGFEGaussianBlurElement_stdDeviationX_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.stdDeviationY */
-  SVGAnimatedNumber get stdDeviationY native "SVGFEGaussianBlurElement_stdDeviationY_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.setStdDeviation */
-  void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEGaussianBlurElement_setStdDeviation_Callback";
-
-
-  /** @domName SVGFEGaussianBlurElement.height */
-  SVGAnimatedLength get height native "SVGFEGaussianBlurElement_height_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.result */
-  SVGAnimatedString get result native "SVGFEGaussianBlurElement_result_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.width */
-  SVGAnimatedLength get width native "SVGFEGaussianBlurElement_width_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.x */
-  SVGAnimatedLength get x native "SVGFEGaussianBlurElement_x_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.y */
-  SVGAnimatedLength get y native "SVGFEGaussianBlurElement_y_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEGaussianBlurElement_className_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.style */
-  CSSStyleDeclaration get style native "SVGFEGaussianBlurElement_style_Getter";
-
-
-  /** @domName SVGFEGaussianBlurElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEGaussianBlurElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEImageElement
-class SVGFEImageElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired {
-  SVGFEImageElement.internal(): super.internal();
-
-
-  /** @domName SVGFEImageElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFEImageElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGFEImageElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGFEImageElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGFEImageElement.height */
-  SVGAnimatedLength get height native "SVGFEImageElement_height_Getter";
-
-
-  /** @domName SVGFEImageElement.result */
-  SVGAnimatedString get result native "SVGFEImageElement_result_Getter";
-
-
-  /** @domName SVGFEImageElement.width */
-  SVGAnimatedLength get width native "SVGFEImageElement_width_Getter";
-
-
-  /** @domName SVGFEImageElement.x */
-  SVGAnimatedLength get x native "SVGFEImageElement_x_Getter";
-
-
-  /** @domName SVGFEImageElement.y */
-  SVGAnimatedLength get y native "SVGFEImageElement_y_Getter";
-
-
-  /** @domName SVGFEImageElement.xmllang */
-  String get xmllang native "SVGFEImageElement_xmllang_Getter";
-
-
-  /** @domName SVGFEImageElement.xmllang */
-  void set xmllang(String value) native "SVGFEImageElement_xmllang_Setter";
-
-
-  /** @domName SVGFEImageElement.xmlspace */
-  String get xmlspace native "SVGFEImageElement_xmlspace_Getter";
-
-
-  /** @domName SVGFEImageElement.xmlspace */
-  void set xmlspace(String value) native "SVGFEImageElement_xmlspace_Setter";
-
-
-  /** @domName SVGFEImageElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEImageElement_className_Getter";
-
-
-  /** @domName SVGFEImageElement.style */
-  CSSStyleDeclaration get style native "SVGFEImageElement_style_Getter";
-
-
-  /** @domName SVGFEImageElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEImageElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGFEImageElement.href */
-  SVGAnimatedString get href native "SVGFEImageElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEMergeElement
-class SVGFEMergeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEMergeElement.internal(): super.internal();
-
-
-  /** @domName SVGFEMergeElement.height */
-  SVGAnimatedLength get height native "SVGFEMergeElement_height_Getter";
-
-
-  /** @domName SVGFEMergeElement.result */
-  SVGAnimatedString get result native "SVGFEMergeElement_result_Getter";
-
-
-  /** @domName SVGFEMergeElement.width */
-  SVGAnimatedLength get width native "SVGFEMergeElement_width_Getter";
-
-
-  /** @domName SVGFEMergeElement.x */
-  SVGAnimatedLength get x native "SVGFEMergeElement_x_Getter";
-
-
-  /** @domName SVGFEMergeElement.y */
-  SVGAnimatedLength get y native "SVGFEMergeElement_y_Getter";
-
-
-  /** @domName SVGFEMergeElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEMergeElement_className_Getter";
-
-
-  /** @domName SVGFEMergeElement.style */
-  CSSStyleDeclaration get style native "SVGFEMergeElement_style_Getter";
-
-
-  /** @domName SVGFEMergeElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEMergeElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEMergeNodeElement
-class SVGFEMergeNodeElement extends SVGElement {
-  SVGFEMergeNodeElement.internal(): super.internal();
-
-
-  /** @domName SVGFEMergeNodeElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEMergeNodeElement_in1_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEMorphologyElement
-class SVGFEMorphologyElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEMorphologyElement.internal(): super.internal();
-
-  static const int SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
-
-  static const int SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
-
-  static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
-
-
-  /** @domName SVGFEMorphologyElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEMorphologyElement_in1_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.operator */
-  SVGAnimatedEnumeration get operator native "SVGFEMorphologyElement_operator_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.radiusX */
-  SVGAnimatedNumber get radiusX native "SVGFEMorphologyElement_radiusX_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.radiusY */
-  SVGAnimatedNumber get radiusY native "SVGFEMorphologyElement_radiusY_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.setRadius */
-  void setRadius(num radiusX, num radiusY) native "SVGFEMorphologyElement_setRadius_Callback";
-
-
-  /** @domName SVGFEMorphologyElement.height */
-  SVGAnimatedLength get height native "SVGFEMorphologyElement_height_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.result */
-  SVGAnimatedString get result native "SVGFEMorphologyElement_result_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.width */
-  SVGAnimatedLength get width native "SVGFEMorphologyElement_width_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.x */
-  SVGAnimatedLength get x native "SVGFEMorphologyElement_x_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.y */
-  SVGAnimatedLength get y native "SVGFEMorphologyElement_y_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEMorphologyElement_className_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.style */
-  CSSStyleDeclaration get style native "SVGFEMorphologyElement_style_Getter";
-
-
-  /** @domName SVGFEMorphologyElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEMorphologyElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEOffsetElement
-class SVGFEOffsetElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFEOffsetElement.internal(): super.internal();
-
-
-  /** @domName SVGFEOffsetElement.dx */
-  SVGAnimatedNumber get dx native "SVGFEOffsetElement_dx_Getter";
-
-
-  /** @domName SVGFEOffsetElement.dy */
-  SVGAnimatedNumber get dy native "SVGFEOffsetElement_dy_Getter";
-
-
-  /** @domName SVGFEOffsetElement.in1 */
-  SVGAnimatedString get in1 native "SVGFEOffsetElement_in1_Getter";
-
-
-  /** @domName SVGFEOffsetElement.height */
-  SVGAnimatedLength get height native "SVGFEOffsetElement_height_Getter";
-
-
-  /** @domName SVGFEOffsetElement.result */
-  SVGAnimatedString get result native "SVGFEOffsetElement_result_Getter";
-
-
-  /** @domName SVGFEOffsetElement.width */
-  SVGAnimatedLength get width native "SVGFEOffsetElement_width_Getter";
-
-
-  /** @domName SVGFEOffsetElement.x */
-  SVGAnimatedLength get x native "SVGFEOffsetElement_x_Getter";
-
-
-  /** @domName SVGFEOffsetElement.y */
-  SVGAnimatedLength get y native "SVGFEOffsetElement_y_Getter";
-
-
-  /** @domName SVGFEOffsetElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFEOffsetElement_className_Getter";
-
-
-  /** @domName SVGFEOffsetElement.style */
-  CSSStyleDeclaration get style native "SVGFEOffsetElement_style_Getter";
-
-
-  /** @domName SVGFEOffsetElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFEOffsetElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFEPointLightElement
-class SVGFEPointLightElement extends SVGElement {
-  SVGFEPointLightElement.internal(): super.internal();
-
-
-  /** @domName SVGFEPointLightElement.x */
-  SVGAnimatedNumber get x native "SVGFEPointLightElement_x_Getter";
-
-
-  /** @domName SVGFEPointLightElement.y */
-  SVGAnimatedNumber get y native "SVGFEPointLightElement_y_Getter";
-
-
-  /** @domName SVGFEPointLightElement.z */
-  SVGAnimatedNumber get z native "SVGFEPointLightElement_z_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFESpecularLightingElement
-class SVGFESpecularLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFESpecularLightingElement.internal(): super.internal();
-
-
-  /** @domName SVGFESpecularLightingElement.in1 */
-  SVGAnimatedString get in1 native "SVGFESpecularLightingElement_in1_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.specularConstant */
-  SVGAnimatedNumber get specularConstant native "SVGFESpecularLightingElement_specularConstant_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.specularExponent */
-  SVGAnimatedNumber get specularExponent native "SVGFESpecularLightingElement_specularExponent_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.surfaceScale */
-  SVGAnimatedNumber get surfaceScale native "SVGFESpecularLightingElement_surfaceScale_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.height */
-  SVGAnimatedLength get height native "SVGFESpecularLightingElement_height_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.result */
-  SVGAnimatedString get result native "SVGFESpecularLightingElement_result_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.width */
-  SVGAnimatedLength get width native "SVGFESpecularLightingElement_width_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.x */
-  SVGAnimatedLength get x native "SVGFESpecularLightingElement_x_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.y */
-  SVGAnimatedLength get y native "SVGFESpecularLightingElement_y_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFESpecularLightingElement_className_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.style */
-  CSSStyleDeclaration get style native "SVGFESpecularLightingElement_style_Getter";
-
-
-  /** @domName SVGFESpecularLightingElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFESpecularLightingElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFESpotLightElement
-class SVGFESpotLightElement extends SVGElement {
-  SVGFESpotLightElement.internal(): super.internal();
-
-
-  /** @domName SVGFESpotLightElement.limitingConeAngle */
-  SVGAnimatedNumber get limitingConeAngle native "SVGFESpotLightElement_limitingConeAngle_Getter";
-
-
-  /** @domName SVGFESpotLightElement.pointsAtX */
-  SVGAnimatedNumber get pointsAtX native "SVGFESpotLightElement_pointsAtX_Getter";
-
-
-  /** @domName SVGFESpotLightElement.pointsAtY */
-  SVGAnimatedNumber get pointsAtY native "SVGFESpotLightElement_pointsAtY_Getter";
-
-
-  /** @domName SVGFESpotLightElement.pointsAtZ */
-  SVGAnimatedNumber get pointsAtZ native "SVGFESpotLightElement_pointsAtZ_Getter";
-
-
-  /** @domName SVGFESpotLightElement.specularExponent */
-  SVGAnimatedNumber get specularExponent native "SVGFESpotLightElement_specularExponent_Getter";
-
-
-  /** @domName SVGFESpotLightElement.x */
-  SVGAnimatedNumber get x native "SVGFESpotLightElement_x_Getter";
-
-
-  /** @domName SVGFESpotLightElement.y */
-  SVGAnimatedNumber get y native "SVGFESpotLightElement_y_Getter";
-
-
-  /** @domName SVGFESpotLightElement.z */
-  SVGAnimatedNumber get z native "SVGFESpotLightElement_z_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFETileElement
-class SVGFETileElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFETileElement.internal(): super.internal();
-
-
-  /** @domName SVGFETileElement.in1 */
-  SVGAnimatedString get in1 native "SVGFETileElement_in1_Getter";
-
-
-  /** @domName SVGFETileElement.height */
-  SVGAnimatedLength get height native "SVGFETileElement_height_Getter";
-
-
-  /** @domName SVGFETileElement.result */
-  SVGAnimatedString get result native "SVGFETileElement_result_Getter";
-
-
-  /** @domName SVGFETileElement.width */
-  SVGAnimatedLength get width native "SVGFETileElement_width_Getter";
-
-
-  /** @domName SVGFETileElement.x */
-  SVGAnimatedLength get x native "SVGFETileElement_x_Getter";
-
-
-  /** @domName SVGFETileElement.y */
-  SVGAnimatedLength get y native "SVGFETileElement_y_Getter";
-
-
-  /** @domName SVGFETileElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFETileElement_className_Getter";
-
-
-  /** @domName SVGFETileElement.style */
-  CSSStyleDeclaration get style native "SVGFETileElement_style_Getter";
-
-
-  /** @domName SVGFETileElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFETileElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFETurbulenceElement
-class SVGFETurbulenceElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
-  SVGFETurbulenceElement.internal(): super.internal();
-
-  static const int SVG_STITCHTYPE_NOSTITCH = 2;
-
-  static const int SVG_STITCHTYPE_STITCH = 1;
-
-  static const int SVG_STITCHTYPE_UNKNOWN = 0;
-
-  static const int SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
-
-  static const int SVG_TURBULENCE_TYPE_TURBULENCE = 2;
-
-  static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGFETurbulenceElement.baseFrequencyX */
-  SVGAnimatedNumber get baseFrequencyX native "SVGFETurbulenceElement_baseFrequencyX_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.baseFrequencyY */
-  SVGAnimatedNumber get baseFrequencyY native "SVGFETurbulenceElement_baseFrequencyY_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.numOctaves */
-  SVGAnimatedInteger get numOctaves native "SVGFETurbulenceElement_numOctaves_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.seed */
-  SVGAnimatedNumber get seed native "SVGFETurbulenceElement_seed_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.stitchTiles */
-  SVGAnimatedEnumeration get stitchTiles native "SVGFETurbulenceElement_stitchTiles_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.type */
-  SVGAnimatedEnumeration get type native "SVGFETurbulenceElement_type_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.height */
-  SVGAnimatedLength get height native "SVGFETurbulenceElement_height_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.result */
-  SVGAnimatedString get result native "SVGFETurbulenceElement_result_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.width */
-  SVGAnimatedLength get width native "SVGFETurbulenceElement_width_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.x */
-  SVGAnimatedLength get x native "SVGFETurbulenceElement_x_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.y */
-  SVGAnimatedLength get y native "SVGFETurbulenceElement_y_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFETurbulenceElement_className_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.style */
-  CSSStyleDeclaration get style native "SVGFETurbulenceElement_style_Getter";
-
-
-  /** @domName SVGFETurbulenceElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFETurbulenceElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFilterElement
-class SVGFilterElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable {
-  SVGFilterElement.internal(): super.internal();
-
-
-  /** @domName SVGFilterElement.filterResX */
-  SVGAnimatedInteger get filterResX native "SVGFilterElement_filterResX_Getter";
-
-
-  /** @domName SVGFilterElement.filterResY */
-  SVGAnimatedInteger get filterResY native "SVGFilterElement_filterResY_Getter";
-
-
-  /** @domName SVGFilterElement.filterUnits */
-  SVGAnimatedEnumeration get filterUnits native "SVGFilterElement_filterUnits_Getter";
-
-
-  /** @domName SVGFilterElement.height */
-  SVGAnimatedLength get height native "SVGFilterElement_height_Getter";
-
-
-  /** @domName SVGFilterElement.primitiveUnits */
-  SVGAnimatedEnumeration get primitiveUnits native "SVGFilterElement_primitiveUnits_Getter";
-
-
-  /** @domName SVGFilterElement.width */
-  SVGAnimatedLength get width native "SVGFilterElement_width_Getter";
-
-
-  /** @domName SVGFilterElement.x */
-  SVGAnimatedLength get x native "SVGFilterElement_x_Getter";
-
-
-  /** @domName SVGFilterElement.y */
-  SVGAnimatedLength get y native "SVGFilterElement_y_Getter";
-
-
-  /** @domName SVGFilterElement.setFilterRes */
-  void setFilterRes(int filterResX, int filterResY) native "SVGFilterElement_setFilterRes_Callback";
-
-
-  /** @domName SVGFilterElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGFilterElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGFilterElement.xmllang */
-  String get xmllang native "SVGFilterElement_xmllang_Getter";
-
-
-  /** @domName SVGFilterElement.xmllang */
-  void set xmllang(String value) native "SVGFilterElement_xmllang_Setter";
-
-
-  /** @domName SVGFilterElement.xmlspace */
-  String get xmlspace native "SVGFilterElement_xmlspace_Getter";
-
-
-  /** @domName SVGFilterElement.xmlspace */
-  void set xmlspace(String value) native "SVGFilterElement_xmlspace_Setter";
-
-
-  /** @domName SVGFilterElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFilterElement_className_Getter";
-
-
-  /** @domName SVGFilterElement.style */
-  CSSStyleDeclaration get style native "SVGFilterElement_style_Getter";
-
-
-  /** @domName SVGFilterElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFilterElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGFilterElement.href */
-  SVGAnimatedString get href native "SVGFilterElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFilterPrimitiveStandardAttributes
-class SVGFilterPrimitiveStandardAttributes extends NativeFieldWrapperClass1 implements SVGStylable {
-  SVGFilterPrimitiveStandardAttributes.internal();
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.height */
-  SVGAnimatedLength get height native "SVGFilterPrimitiveStandardAttributes_height_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.result */
-  SVGAnimatedString get result native "SVGFilterPrimitiveStandardAttributes_result_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.width */
-  SVGAnimatedLength get width native "SVGFilterPrimitiveStandardAttributes_width_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.x */
-  SVGAnimatedLength get x native "SVGFilterPrimitiveStandardAttributes_x_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.y */
-  SVGAnimatedLength get y native "SVGFilterPrimitiveStandardAttributes_y_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGFilterPrimitiveStandardAttributes_className_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.style */
-  CSSStyleDeclaration get style native "SVGFilterPrimitiveStandardAttributes_style_Getter";
-
-
-  /** @domName SVGFilterPrimitiveStandardAttributes.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGFilterPrimitiveStandardAttributes_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFitToViewBox
-class SVGFitToViewBox extends NativeFieldWrapperClass1 {
-  SVGFitToViewBox.internal();
-
-
-  /** @domName SVGFitToViewBox.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFitToViewBox_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGFitToViewBox.viewBox */
-  SVGAnimatedRect get viewBox native "SVGFitToViewBox_viewBox_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontElement
-class SVGFontElement extends SVGElement {
-  SVGFontElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontFaceElement
-class SVGFontFaceElement extends SVGElement {
-  SVGFontFaceElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontFaceFormatElement
-class SVGFontFaceFormatElement extends SVGElement {
-  SVGFontFaceFormatElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontFaceNameElement
-class SVGFontFaceNameElement extends SVGElement {
-  SVGFontFaceNameElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontFaceSrcElement
-class SVGFontFaceSrcElement extends SVGElement {
-  SVGFontFaceSrcElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGFontFaceUriElement
-class SVGFontFaceUriElement extends SVGElement {
-  SVGFontFaceUriElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGForeignObjectElement
-class SVGForeignObjectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGForeignObjectElement.internal(): super.internal();
-
-
-  /** @domName SVGForeignObjectElement.height */
-  SVGAnimatedLength get height native "SVGForeignObjectElement_height_Getter";
-
-
-  /** @domName SVGForeignObjectElement.width */
-  SVGAnimatedLength get width native "SVGForeignObjectElement_width_Getter";
-
-
-  /** @domName SVGForeignObjectElement.x */
-  SVGAnimatedLength get x native "SVGForeignObjectElement_x_Getter";
-
-
-  /** @domName SVGForeignObjectElement.y */
-  SVGAnimatedLength get y native "SVGForeignObjectElement_y_Getter";
-
-
-  /** @domName SVGForeignObjectElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGForeignObjectElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGForeignObjectElement.xmllang */
-  String get xmllang native "SVGForeignObjectElement_xmllang_Getter";
-
-
-  /** @domName SVGForeignObjectElement.xmllang */
-  void set xmllang(String value) native "SVGForeignObjectElement_xmllang_Setter";
-
-
-  /** @domName SVGForeignObjectElement.xmlspace */
-  String get xmlspace native "SVGForeignObjectElement_xmlspace_Getter";
-
-
-  /** @domName SVGForeignObjectElement.xmlspace */
-  void set xmlspace(String value) native "SVGForeignObjectElement_xmlspace_Setter";
-
-
-  /** @domName SVGForeignObjectElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGForeignObjectElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGForeignObjectElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGForeignObjectElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGForeignObjectElement.getBBox */
-  SVGRect getBBox() native "SVGForeignObjectElement_getBBox_Callback";
-
-
-  /** @domName SVGForeignObjectElement.getCTM */
-  SVGMatrix getCTM() native "SVGForeignObjectElement_getCTM_Callback";
-
-
-  /** @domName SVGForeignObjectElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGForeignObjectElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGForeignObjectElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGForeignObjectElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGForeignObjectElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGForeignObjectElement_className_Getter";
-
-
-  /** @domName SVGForeignObjectElement.style */
-  CSSStyleDeclaration get style native "SVGForeignObjectElement_style_Getter";
-
-
-  /** @domName SVGForeignObjectElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGForeignObjectElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGForeignObjectElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGForeignObjectElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGForeignObjectElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGForeignObjectElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGForeignObjectElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGForeignObjectElement_systemLanguage_Getter";
-
-
-  /** @domName SVGForeignObjectElement.hasExtension */
-  bool hasExtension(String extension) native "SVGForeignObjectElement_hasExtension_Callback";
-
-
-  /** @domName SVGForeignObjectElement.transform */
-  SVGAnimatedTransformList get transform native "SVGForeignObjectElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGGElement
-class SVGGElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGGElement.internal(): super.internal();
-
-
-  /** @domName SVGGElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGGElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGGElement.xmllang */
-  String get xmllang native "SVGGElement_xmllang_Getter";
-
-
-  /** @domName SVGGElement.xmllang */
-  void set xmllang(String value) native "SVGGElement_xmllang_Setter";
-
-
-  /** @domName SVGGElement.xmlspace */
-  String get xmlspace native "SVGGElement_xmlspace_Getter";
-
-
-  /** @domName SVGGElement.xmlspace */
-  void set xmlspace(String value) native "SVGGElement_xmlspace_Setter";
-
-
-  /** @domName SVGGElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGGElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGGElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGGElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGGElement.getBBox */
-  SVGRect getBBox() native "SVGGElement_getBBox_Callback";
-
-
-  /** @domName SVGGElement.getCTM */
-  SVGMatrix getCTM() native "SVGGElement_getCTM_Callback";
-
-
-  /** @domName SVGGElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGGElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGGElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGGElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGGElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGGElement_className_Getter";
-
-
-  /** @domName SVGGElement.style */
-  CSSStyleDeclaration get style native "SVGGElement_style_Getter";
-
-
-  /** @domName SVGGElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGGElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGGElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGGElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGGElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGGElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGGElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGGElement_systemLanguage_Getter";
-
-
-  /** @domName SVGGElement.hasExtension */
-  bool hasExtension(String extension) native "SVGGElement_hasExtension_Callback";
-
-
-  /** @domName SVGGElement.transform */
-  SVGAnimatedTransformList get transform native "SVGGElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGGlyphElement
-class SVGGlyphElement extends SVGElement {
-  SVGGlyphElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGGlyphRefElement
-class SVGGlyphRefElement extends SVGElement implements SVGURIReference, SVGStylable {
-  SVGGlyphRefElement.internal(): super.internal();
-
-
-  /** @domName SVGGlyphRefElement.dx */
-  num get dx native "SVGGlyphRefElement_dx_Getter";
-
-
-  /** @domName SVGGlyphRefElement.dx */
-  void set dx(num value) native "SVGGlyphRefElement_dx_Setter";
-
-
-  /** @domName SVGGlyphRefElement.dy */
-  num get dy native "SVGGlyphRefElement_dy_Getter";
-
-
-  /** @domName SVGGlyphRefElement.dy */
-  void set dy(num value) native "SVGGlyphRefElement_dy_Setter";
-
-
-  /** @domName SVGGlyphRefElement.format */
-  String get format native "SVGGlyphRefElement_format_Getter";
-
-
-  /** @domName SVGGlyphRefElement.format */
-  void set format(String value) native "SVGGlyphRefElement_format_Setter";
-
-
-  /** @domName SVGGlyphRefElement.glyphRef */
-  String get glyphRef native "SVGGlyphRefElement_glyphRef_Getter";
-
-
-  /** @domName SVGGlyphRefElement.glyphRef */
-  void set glyphRef(String value) native "SVGGlyphRefElement_glyphRef_Setter";
-
-
-  /** @domName SVGGlyphRefElement.x */
-  num get x native "SVGGlyphRefElement_x_Getter";
-
-
-  /** @domName SVGGlyphRefElement.x */
-  void set x(num value) native "SVGGlyphRefElement_x_Setter";
-
-
-  /** @domName SVGGlyphRefElement.y */
-  num get y native "SVGGlyphRefElement_y_Getter";
-
-
-  /** @domName SVGGlyphRefElement.y */
-  void set y(num value) native "SVGGlyphRefElement_y_Setter";
-
-
-  /** @domName SVGGlyphRefElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGGlyphRefElement_className_Getter";
-
-
-  /** @domName SVGGlyphRefElement.style */
-  CSSStyleDeclaration get style native "SVGGlyphRefElement_style_Getter";
-
-
-  /** @domName SVGGlyphRefElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGGlyphRefElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGGlyphRefElement.href */
-  SVGAnimatedString get href native "SVGGlyphRefElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGGradientElement
-class SVGGradientElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired, SVGStylable {
-  SVGGradientElement.internal(): super.internal();
-
-  static const int SVG_SPREADMETHOD_PAD = 1;
-
-  static const int SVG_SPREADMETHOD_REFLECT = 2;
-
-  static const int SVG_SPREADMETHOD_REPEAT = 3;
-
-  static const int SVG_SPREADMETHOD_UNKNOWN = 0;
-
-
-  /** @domName SVGGradientElement.gradientTransform */
-  SVGAnimatedTransformList get gradientTransform native "SVGGradientElement_gradientTransform_Getter";
-
-
-  /** @domName SVGGradientElement.gradientUnits */
-  SVGAnimatedEnumeration get gradientUnits native "SVGGradientElement_gradientUnits_Getter";
-
-
-  /** @domName SVGGradientElement.spreadMethod */
-  SVGAnimatedEnumeration get spreadMethod native "SVGGradientElement_spreadMethod_Getter";
-
-
-  /** @domName SVGGradientElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGGradientElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGGradientElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGGradientElement_className_Getter";
-
-
-  /** @domName SVGGradientElement.style */
-  CSSStyleDeclaration get style native "SVGGradientElement_style_Getter";
-
-
-  /** @domName SVGGradientElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGGradientElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGGradientElement.href */
-  SVGAnimatedString get href native "SVGGradientElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGHKernElement
-class SVGHKernElement extends SVGElement {
-  SVGHKernElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGImageElement
-class SVGImageElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
-  SVGImageElement.internal(): super.internal();
-
-
-  /** @domName SVGImageElement.height */
-  SVGAnimatedLength get height native "SVGImageElement_height_Getter";
-
-
-  /** @domName SVGImageElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGImageElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGImageElement.width */
-  SVGAnimatedLength get width native "SVGImageElement_width_Getter";
-
-
-  /** @domName SVGImageElement.x */
-  SVGAnimatedLength get x native "SVGImageElement_x_Getter";
-
-
-  /** @domName SVGImageElement.y */
-  SVGAnimatedLength get y native "SVGImageElement_y_Getter";
-
-
-  /** @domName SVGImageElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGImageElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGImageElement.xmllang */
-  String get xmllang native "SVGImageElement_xmllang_Getter";
-
-
-  /** @domName SVGImageElement.xmllang */
-  void set xmllang(String value) native "SVGImageElement_xmllang_Setter";
-
-
-  /** @domName SVGImageElement.xmlspace */
-  String get xmlspace native "SVGImageElement_xmlspace_Getter";
-
-
-  /** @domName SVGImageElement.xmlspace */
-  void set xmlspace(String value) native "SVGImageElement_xmlspace_Setter";
-
-
-  /** @domName SVGImageElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGImageElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGImageElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGImageElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGImageElement.getBBox */
-  SVGRect getBBox() native "SVGImageElement_getBBox_Callback";
-
-
-  /** @domName SVGImageElement.getCTM */
-  SVGMatrix getCTM() native "SVGImageElement_getCTM_Callback";
-
-
-  /** @domName SVGImageElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGImageElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGImageElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGImageElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGImageElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGImageElement_className_Getter";
-
-
-  /** @domName SVGImageElement.style */
-  CSSStyleDeclaration get style native "SVGImageElement_style_Getter";
-
-
-  /** @domName SVGImageElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGImageElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGImageElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGImageElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGImageElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGImageElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGImageElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGImageElement_systemLanguage_Getter";
-
-
-  /** @domName SVGImageElement.hasExtension */
-  bool hasExtension(String extension) native "SVGImageElement_hasExtension_Callback";
-
-
-  /** @domName SVGImageElement.transform */
-  SVGAnimatedTransformList get transform native "SVGImageElement_transform_Getter";
-
-
-  /** @domName SVGImageElement.href */
-  SVGAnimatedString get href native "SVGImageElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLangSpace
-class SVGLangSpace extends NativeFieldWrapperClass1 {
-  SVGLangSpace.internal();
-
-
-  /** @domName SVGLangSpace.xmllang */
-  String get xmllang native "SVGLangSpace_xmllang_Getter";
-
-
-  /** @domName SVGLangSpace.xmllang */
-  void set xmllang(String value) native "SVGLangSpace_xmllang_Setter";
-
-
-  /** @domName SVGLangSpace.xmlspace */
-  String get xmlspace native "SVGLangSpace_xmlspace_Getter";
-
-
-  /** @domName SVGLangSpace.xmlspace */
-  void set xmlspace(String value) native "SVGLangSpace_xmlspace_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLength
-class SVGLength extends NativeFieldWrapperClass1 {
-  SVGLength.internal();
-
-  static const int SVG_LENGTHTYPE_CM = 6;
-
-  static const int SVG_LENGTHTYPE_EMS = 3;
-
-  static const int SVG_LENGTHTYPE_EXS = 4;
-
-  static const int SVG_LENGTHTYPE_IN = 8;
-
-  static const int SVG_LENGTHTYPE_MM = 7;
-
-  static const int SVG_LENGTHTYPE_NUMBER = 1;
-
-  static const int SVG_LENGTHTYPE_PC = 10;
-
-  static const int SVG_LENGTHTYPE_PERCENTAGE = 2;
-
-  static const int SVG_LENGTHTYPE_PT = 9;
-
-  static const int SVG_LENGTHTYPE_PX = 5;
-
-  static const int SVG_LENGTHTYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGLength.unitType */
-  int get unitType native "SVGLength_unitType_Getter";
-
-
-  /** @domName SVGLength.value */
-  num get value native "SVGLength_value_Getter";
-
-
-  /** @domName SVGLength.value */
-  void set value(num value) native "SVGLength_value_Setter";
-
-
-  /** @domName SVGLength.valueAsString */
-  String get valueAsString native "SVGLength_valueAsString_Getter";
-
-
-  /** @domName SVGLength.valueAsString */
-  void set valueAsString(String value) native "SVGLength_valueAsString_Setter";
-
-
-  /** @domName SVGLength.valueInSpecifiedUnits */
-  num get valueInSpecifiedUnits native "SVGLength_valueInSpecifiedUnits_Getter";
-
-
-  /** @domName SVGLength.valueInSpecifiedUnits */
-  void set valueInSpecifiedUnits(num value) native "SVGLength_valueInSpecifiedUnits_Setter";
-
-
-  /** @domName SVGLength.convertToSpecifiedUnits */
-  void convertToSpecifiedUnits(int unitType) native "SVGLength_convertToSpecifiedUnits_Callback";
-
-
-  /** @domName SVGLength.newValueSpecifiedUnits */
-  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGLength_newValueSpecifiedUnits_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLengthList
-class SVGLengthList extends NativeFieldWrapperClass1 implements List<SVGLength> {
-  SVGLengthList.internal();
-
-
-  /** @domName SVGLengthList.numberOfItems */
-  int get numberOfItems native "SVGLengthList_numberOfItems_Getter";
-
-  SVGLength operator[](int index) native "SVGLengthList_item_Callback";
-
-  void operator[]=(int index, SVGLength value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGLength> mixins.
-  // SVGLength is the element type.
-
-  // From Iterable<SVGLength>:
-
-  Iterator<SVGLength> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGLength>(this);
-  }
-
-  // From Collection<SVGLength>:
-
-  void add(SVGLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGLength value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGLength> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGLength element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGLength element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGLength element)) => _Collections.map(this, [], f);
-
-  Collection<SVGLength> filter(bool f(SVGLength element)) =>
-     _Collections.filter(this, <SVGLength>[], f);
-
-  bool every(bool f(SVGLength element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGLength element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGLength>:
-
-  void sort([Comparator<SVGLength> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGLength element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGLength element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGLength get last => this[length - 1];
-
-  SVGLength removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGLength initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGLength> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGLength>[]);
-
-  // -- end List<SVGLength> mixins.
-
-
-  /** @domName SVGLengthList.appendItem */
-  SVGLength appendItem(SVGLength item) native "SVGLengthList_appendItem_Callback";
-
-
-  /** @domName SVGLengthList.clear */
-  void clear() native "SVGLengthList_clear_Callback";
-
-
-  /** @domName SVGLengthList.getItem */
-  SVGLength getItem(int index) native "SVGLengthList_getItem_Callback";
-
-
-  /** @domName SVGLengthList.initialize */
-  SVGLength initialize(SVGLength item) native "SVGLengthList_initialize_Callback";
-
-
-  /** @domName SVGLengthList.insertItemBefore */
-  SVGLength insertItemBefore(SVGLength item, int index) native "SVGLengthList_insertItemBefore_Callback";
-
-
-  /** @domName SVGLengthList.removeItem */
-  SVGLength removeItem(int index) native "SVGLengthList_removeItem_Callback";
-
-
-  /** @domName SVGLengthList.replaceItem */
-  SVGLength replaceItem(SVGLength item, int index) native "SVGLengthList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLineElement
-class SVGLineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGLineElement.internal(): super.internal();
-
-
-  /** @domName SVGLineElement.x1 */
-  SVGAnimatedLength get x1 native "SVGLineElement_x1_Getter";
-
-
-  /** @domName SVGLineElement.x2 */
-  SVGAnimatedLength get x2 native "SVGLineElement_x2_Getter";
-
-
-  /** @domName SVGLineElement.y1 */
-  SVGAnimatedLength get y1 native "SVGLineElement_y1_Getter";
-
-
-  /** @domName SVGLineElement.y2 */
-  SVGAnimatedLength get y2 native "SVGLineElement_y2_Getter";
-
-
-  /** @domName SVGLineElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGLineElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGLineElement.xmllang */
-  String get xmllang native "SVGLineElement_xmllang_Getter";
-
-
-  /** @domName SVGLineElement.xmllang */
-  void set xmllang(String value) native "SVGLineElement_xmllang_Setter";
-
-
-  /** @domName SVGLineElement.xmlspace */
-  String get xmlspace native "SVGLineElement_xmlspace_Getter";
-
-
-  /** @domName SVGLineElement.xmlspace */
-  void set xmlspace(String value) native "SVGLineElement_xmlspace_Setter";
-
-
-  /** @domName SVGLineElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGLineElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGLineElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGLineElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGLineElement.getBBox */
-  SVGRect getBBox() native "SVGLineElement_getBBox_Callback";
-
-
-  /** @domName SVGLineElement.getCTM */
-  SVGMatrix getCTM() native "SVGLineElement_getCTM_Callback";
-
-
-  /** @domName SVGLineElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGLineElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGLineElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGLineElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGLineElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGLineElement_className_Getter";
-
-
-  /** @domName SVGLineElement.style */
-  CSSStyleDeclaration get style native "SVGLineElement_style_Getter";
-
-
-  /** @domName SVGLineElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGLineElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGLineElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGLineElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGLineElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGLineElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGLineElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGLineElement_systemLanguage_Getter";
-
-
-  /** @domName SVGLineElement.hasExtension */
-  bool hasExtension(String extension) native "SVGLineElement_hasExtension_Callback";
-
-
-  /** @domName SVGLineElement.transform */
-  SVGAnimatedTransformList get transform native "SVGLineElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLinearGradientElement
-class SVGLinearGradientElement extends SVGGradientElement {
-  SVGLinearGradientElement.internal(): super.internal();
-
-
-  /** @domName SVGLinearGradientElement.x1 */
-  SVGAnimatedLength get x1 native "SVGLinearGradientElement_x1_Getter";
-
-
-  /** @domName SVGLinearGradientElement.x2 */
-  SVGAnimatedLength get x2 native "SVGLinearGradientElement_x2_Getter";
-
-
-  /** @domName SVGLinearGradientElement.y1 */
-  SVGAnimatedLength get y1 native "SVGLinearGradientElement_y1_Getter";
-
-
-  /** @domName SVGLinearGradientElement.y2 */
-  SVGAnimatedLength get y2 native "SVGLinearGradientElement_y2_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGLocatable
-class SVGLocatable extends NativeFieldWrapperClass1 {
-  SVGLocatable.internal();
-
-
-  /** @domName SVGLocatable.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGLocatable_farthestViewportElement_Getter";
-
-
-  /** @domName SVGLocatable.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGLocatable_nearestViewportElement_Getter";
-
-
-  /** @domName SVGLocatable.getBBox */
-  SVGRect getBBox() native "SVGLocatable_getBBox_Callback";
-
-
-  /** @domName SVGLocatable.getCTM */
-  SVGMatrix getCTM() native "SVGLocatable_getCTM_Callback";
-
-
-  /** @domName SVGLocatable.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGLocatable_getScreenCTM_Callback";
-
-
-  /** @domName SVGLocatable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGLocatable_getTransformToElement_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMPathElement
-class SVGMPathElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired {
-  SVGMPathElement.internal(): super.internal();
-
-
-  /** @domName SVGMPathElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGMPathElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGMPathElement.href */
-  SVGAnimatedString get href native "SVGMPathElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMarkerElement
-class SVGMarkerElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable {
-  SVGMarkerElement.internal(): super.internal();
-
-  static const int SVG_MARKERUNITS_STROKEWIDTH = 2;
-
-  static const int SVG_MARKERUNITS_UNKNOWN = 0;
-
-  static const int SVG_MARKERUNITS_USERSPACEONUSE = 1;
-
-  static const int SVG_MARKER_ORIENT_ANGLE = 2;
-
-  static const int SVG_MARKER_ORIENT_AUTO = 1;
-
-  static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
-
-
-  /** @domName SVGMarkerElement.markerHeight */
-  SVGAnimatedLength get markerHeight native "SVGMarkerElement_markerHeight_Getter";
-
-
-  /** @domName SVGMarkerElement.markerUnits */
-  SVGAnimatedEnumeration get markerUnits native "SVGMarkerElement_markerUnits_Getter";
-
-
-  /** @domName SVGMarkerElement.markerWidth */
-  SVGAnimatedLength get markerWidth native "SVGMarkerElement_markerWidth_Getter";
-
-
-  /** @domName SVGMarkerElement.orientAngle */
-  SVGAnimatedAngle get orientAngle native "SVGMarkerElement_orientAngle_Getter";
-
-
-  /** @domName SVGMarkerElement.orientType */
-  SVGAnimatedEnumeration get orientType native "SVGMarkerElement_orientType_Getter";
-
-
-  /** @domName SVGMarkerElement.refX */
-  SVGAnimatedLength get refX native "SVGMarkerElement_refX_Getter";
-
-
-  /** @domName SVGMarkerElement.refY */
-  SVGAnimatedLength get refY native "SVGMarkerElement_refY_Getter";
-
-
-  /** @domName SVGMarkerElement.setOrientToAngle */
-  void setOrientToAngle(SVGAngle angle) native "SVGMarkerElement_setOrientToAngle_Callback";
-
-
-  /** @domName SVGMarkerElement.setOrientToAuto */
-  void setOrientToAuto() native "SVGMarkerElement_setOrientToAuto_Callback";
-
-
-  /** @domName SVGMarkerElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGMarkerElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGMarkerElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGMarkerElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGMarkerElement.viewBox */
-  SVGAnimatedRect get viewBox native "SVGMarkerElement_viewBox_Getter";
-
-
-  /** @domName SVGMarkerElement.xmllang */
-  String get xmllang native "SVGMarkerElement_xmllang_Getter";
-
-
-  /** @domName SVGMarkerElement.xmllang */
-  void set xmllang(String value) native "SVGMarkerElement_xmllang_Setter";
-
-
-  /** @domName SVGMarkerElement.xmlspace */
-  String get xmlspace native "SVGMarkerElement_xmlspace_Getter";
-
-
-  /** @domName SVGMarkerElement.xmlspace */
-  void set xmlspace(String value) native "SVGMarkerElement_xmlspace_Setter";
-
-
-  /** @domName SVGMarkerElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGMarkerElement_className_Getter";
-
-
-  /** @domName SVGMarkerElement.style */
-  CSSStyleDeclaration get style native "SVGMarkerElement_style_Getter";
-
-
-  /** @domName SVGMarkerElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGMarkerElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMaskElement
-class SVGMaskElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired {
-  SVGMaskElement.internal(): super.internal();
-
-
-  /** @domName SVGMaskElement.height */
-  SVGAnimatedLength get height native "SVGMaskElement_height_Getter";
-
-
-  /** @domName SVGMaskElement.maskContentUnits */
-  SVGAnimatedEnumeration get maskContentUnits native "SVGMaskElement_maskContentUnits_Getter";
-
-
-  /** @domName SVGMaskElement.maskUnits */
-  SVGAnimatedEnumeration get maskUnits native "SVGMaskElement_maskUnits_Getter";
-
-
-  /** @domName SVGMaskElement.width */
-  SVGAnimatedLength get width native "SVGMaskElement_width_Getter";
-
-
-  /** @domName SVGMaskElement.x */
-  SVGAnimatedLength get x native "SVGMaskElement_x_Getter";
-
-
-  /** @domName SVGMaskElement.y */
-  SVGAnimatedLength get y native "SVGMaskElement_y_Getter";
-
-
-  /** @domName SVGMaskElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGMaskElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGMaskElement.xmllang */
-  String get xmllang native "SVGMaskElement_xmllang_Getter";
-
-
-  /** @domName SVGMaskElement.xmllang */
-  void set xmllang(String value) native "SVGMaskElement_xmllang_Setter";
-
-
-  /** @domName SVGMaskElement.xmlspace */
-  String get xmlspace native "SVGMaskElement_xmlspace_Getter";
-
-
-  /** @domName SVGMaskElement.xmlspace */
-  void set xmlspace(String value) native "SVGMaskElement_xmlspace_Setter";
-
-
-  /** @domName SVGMaskElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGMaskElement_className_Getter";
-
-
-  /** @domName SVGMaskElement.style */
-  CSSStyleDeclaration get style native "SVGMaskElement_style_Getter";
-
-
-  /** @domName SVGMaskElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGMaskElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGMaskElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGMaskElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGMaskElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGMaskElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGMaskElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGMaskElement_systemLanguage_Getter";
-
-
-  /** @domName SVGMaskElement.hasExtension */
-  bool hasExtension(String extension) native "SVGMaskElement_hasExtension_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMatrix
-class SVGMatrix extends NativeFieldWrapperClass1 {
-  SVGMatrix.internal();
-
-
-  /** @domName SVGMatrix.a */
-  num get a native "SVGMatrix_a_Getter";
-
-
-  /** @domName SVGMatrix.a */
-  void set a(num value) native "SVGMatrix_a_Setter";
-
-
-  /** @domName SVGMatrix.b */
-  num get b native "SVGMatrix_b_Getter";
-
-
-  /** @domName SVGMatrix.b */
-  void set b(num value) native "SVGMatrix_b_Setter";
-
-
-  /** @domName SVGMatrix.c */
-  num get c native "SVGMatrix_c_Getter";
-
-
-  /** @domName SVGMatrix.c */
-  void set c(num value) native "SVGMatrix_c_Setter";
-
-
-  /** @domName SVGMatrix.d */
-  num get d native "SVGMatrix_d_Getter";
-
-
-  /** @domName SVGMatrix.d */
-  void set d(num value) native "SVGMatrix_d_Setter";
-
-
-  /** @domName SVGMatrix.e */
-  num get e native "SVGMatrix_e_Getter";
-
-
-  /** @domName SVGMatrix.e */
-  void set e(num value) native "SVGMatrix_e_Setter";
-
-
-  /** @domName SVGMatrix.f */
-  num get f native "SVGMatrix_f_Getter";
-
-
-  /** @domName SVGMatrix.f */
-  void set f(num value) native "SVGMatrix_f_Setter";
-
-
-  /** @domName SVGMatrix.flipX */
-  SVGMatrix flipX() native "SVGMatrix_flipX_Callback";
-
-
-  /** @domName SVGMatrix.flipY */
-  SVGMatrix flipY() native "SVGMatrix_flipY_Callback";
-
-
-  /** @domName SVGMatrix.inverse */
-  SVGMatrix inverse() native "SVGMatrix_inverse_Callback";
-
-
-  /** @domName SVGMatrix.multiply */
-  SVGMatrix multiply(SVGMatrix secondMatrix) native "SVGMatrix_multiply_Callback";
-
-
-  /** @domName SVGMatrix.rotate */
-  SVGMatrix rotate(num angle) native "SVGMatrix_rotate_Callback";
-
-
-  /** @domName SVGMatrix.rotateFromVector */
-  SVGMatrix rotateFromVector(num x, num y) native "SVGMatrix_rotateFromVector_Callback";
-
-
-  /** @domName SVGMatrix.scale */
-  SVGMatrix scale(num scaleFactor) native "SVGMatrix_scale_Callback";
-
-
-  /** @domName SVGMatrix.scaleNonUniform */
-  SVGMatrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native "SVGMatrix_scaleNonUniform_Callback";
-
-
-  /** @domName SVGMatrix.skewX */
-  SVGMatrix skewX(num angle) native "SVGMatrix_skewX_Callback";
-
-
-  /** @domName SVGMatrix.skewY */
-  SVGMatrix skewY(num angle) native "SVGMatrix_skewY_Callback";
-
-
-  /** @domName SVGMatrix.translate */
-  SVGMatrix translate(num x, num y) native "SVGMatrix_translate_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMetadataElement
-class SVGMetadataElement extends SVGElement {
-  SVGMetadataElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGMissingGlyphElement
-class SVGMissingGlyphElement extends SVGElement {
-  SVGMissingGlyphElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGNumber
-class SVGNumber extends NativeFieldWrapperClass1 {
-  SVGNumber.internal();
-
-
-  /** @domName SVGNumber.value */
-  num get value native "SVGNumber_value_Getter";
-
-
-  /** @domName SVGNumber.value */
-  void set value(num value) native "SVGNumber_value_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGNumberList
-class SVGNumberList extends NativeFieldWrapperClass1 implements List<SVGNumber> {
-  SVGNumberList.internal();
-
-
-  /** @domName SVGNumberList.numberOfItems */
-  int get numberOfItems native "SVGNumberList_numberOfItems_Getter";
-
-  SVGNumber operator[](int index) native "SVGNumberList_item_Callback";
-
-  void operator[]=(int index, SVGNumber value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGNumber> mixins.
-  // SVGNumber is the element type.
-
-  // From Iterable<SVGNumber>:
-
-  Iterator<SVGNumber> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGNumber>(this);
-  }
-
-  // From Collection<SVGNumber>:
-
-  void add(SVGNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGNumber value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGNumber> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGNumber element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGNumber element)) => _Collections.map(this, [], f);
-
-  Collection<SVGNumber> filter(bool f(SVGNumber element)) =>
-     _Collections.filter(this, <SVGNumber>[], f);
-
-  bool every(bool f(SVGNumber element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGNumber element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGNumber>:
-
-  void sort([Comparator<SVGNumber> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGNumber element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGNumber element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGNumber get last => this[length - 1];
-
-  SVGNumber removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGNumber initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGNumber> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGNumber>[]);
-
-  // -- end List<SVGNumber> mixins.
-
-
-  /** @domName SVGNumberList.appendItem */
-  SVGNumber appendItem(SVGNumber item) native "SVGNumberList_appendItem_Callback";
-
-
-  /** @domName SVGNumberList.clear */
-  void clear() native "SVGNumberList_clear_Callback";
-
-
-  /** @domName SVGNumberList.getItem */
-  SVGNumber getItem(int index) native "SVGNumberList_getItem_Callback";
-
-
-  /** @domName SVGNumberList.initialize */
-  SVGNumber initialize(SVGNumber item) native "SVGNumberList_initialize_Callback";
-
-
-  /** @domName SVGNumberList.insertItemBefore */
-  SVGNumber insertItemBefore(SVGNumber item, int index) native "SVGNumberList_insertItemBefore_Callback";
-
-
-  /** @domName SVGNumberList.removeItem */
-  SVGNumber removeItem(int index) native "SVGNumberList_removeItem_Callback";
-
-
-  /** @domName SVGNumberList.replaceItem */
-  SVGNumber replaceItem(SVGNumber item, int index) native "SVGNumberList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPaint
-class SVGPaint extends SVGColor {
-  SVGPaint.internal(): super.internal();
-
-  static const int SVG_PAINTTYPE_CURRENTCOLOR = 102;
-
-  static const int SVG_PAINTTYPE_NONE = 101;
-
-  static const int SVG_PAINTTYPE_RGBCOLOR = 1;
-
-  static const int SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
-
-  static const int SVG_PAINTTYPE_UNKNOWN = 0;
-
-  static const int SVG_PAINTTYPE_URI = 107;
-
-  static const int SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
-
-  static const int SVG_PAINTTYPE_URI_NONE = 103;
-
-  static const int SVG_PAINTTYPE_URI_RGBCOLOR = 105;
-
-  static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
-
-
-  /** @domName SVGPaint.paintType */
-  int get paintType native "SVGPaint_paintType_Getter";
-
-
-  /** @domName SVGPaint.uri */
-  String get uri native "SVGPaint_uri_Getter";
-
-
-  /** @domName SVGPaint.setPaint */
-  void setPaint(int paintType, String uri, String rgbColor, String iccColor) native "SVGPaint_setPaint_Callback";
-
-
-  /** @domName SVGPaint.setUri */
-  void setUri(String uri) native "SVGPaint_setUri_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathElement
-class SVGPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGPathElement.internal(): super.internal();
-
-
-  /** @domName SVGPathElement.animatedNormalizedPathSegList */
-  SVGPathSegList get animatedNormalizedPathSegList native "SVGPathElement_animatedNormalizedPathSegList_Getter";
-
-
-  /** @domName SVGPathElement.animatedPathSegList */
-  SVGPathSegList get animatedPathSegList native "SVGPathElement_animatedPathSegList_Getter";
-
-
-  /** @domName SVGPathElement.normalizedPathSegList */
-  SVGPathSegList get normalizedPathSegList native "SVGPathElement_normalizedPathSegList_Getter";
-
-
-  /** @domName SVGPathElement.pathLength */
-  SVGAnimatedNumber get pathLength native "SVGPathElement_pathLength_Getter";
-
-
-  /** @domName SVGPathElement.pathSegList */
-  SVGPathSegList get pathSegList native "SVGPathElement_pathSegList_Getter";
-
-
-  /** @domName SVGPathElement.createSVGPathSegArcAbs */
-  SVGPathSegArcAbs createSVGPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegArcRel */
-  SVGPathSegArcRel createSVGPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegClosePath */
-  SVGPathSegClosePath createSVGPathSegClosePath() native "SVGPathElement_createSVGPathSegClosePath_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicAbs */
-  SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicRel */
-  SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs */
-  SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel */
-  SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticAbs */
-  SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticRel */
-  SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs */
-  SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel */
-  SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoAbs */
-  SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegLinetoAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalAbs */
-  SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalRel */
-  SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoRel */
-  SVGPathSegLinetoRel createSVGPathSegLinetoRel(num x, num y) native "SVGPathElement_createSVGPathSegLinetoRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalAbs */
-  SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalRel */
-  SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalRel_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegMovetoAbs */
-  SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegMovetoAbs_Callback";
-
-
-  /** @domName SVGPathElement.createSVGPathSegMovetoRel */
-  SVGPathSegMovetoRel createSVGPathSegMovetoRel(num x, num y) native "SVGPathElement_createSVGPathSegMovetoRel_Callback";
-
-
-  /** @domName SVGPathElement.getPathSegAtLength */
-  int getPathSegAtLength(num distance) native "SVGPathElement_getPathSegAtLength_Callback";
-
-
-  /** @domName SVGPathElement.getPointAtLength */
-  SVGPoint getPointAtLength(num distance) native "SVGPathElement_getPointAtLength_Callback";
-
-
-  /** @domName SVGPathElement.getTotalLength */
-  num getTotalLength() native "SVGPathElement_getTotalLength_Callback";
-
-
-  /** @domName SVGPathElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGPathElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGPathElement.xmllang */
-  String get xmllang native "SVGPathElement_xmllang_Getter";
-
-
-  /** @domName SVGPathElement.xmllang */
-  void set xmllang(String value) native "SVGPathElement_xmllang_Setter";
-
-
-  /** @domName SVGPathElement.xmlspace */
-  String get xmlspace native "SVGPathElement_xmlspace_Getter";
-
-
-  /** @domName SVGPathElement.xmlspace */
-  void set xmlspace(String value) native "SVGPathElement_xmlspace_Setter";
-
-
-  /** @domName SVGPathElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGPathElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGPathElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGPathElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGPathElement.getBBox */
-  SVGRect getBBox() native "SVGPathElement_getBBox_Callback";
-
-
-  /** @domName SVGPathElement.getCTM */
-  SVGMatrix getCTM() native "SVGPathElement_getCTM_Callback";
-
-
-  /** @domName SVGPathElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGPathElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGPathElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGPathElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGPathElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGPathElement_className_Getter";
-
-
-  /** @domName SVGPathElement.style */
-  CSSStyleDeclaration get style native "SVGPathElement_style_Getter";
-
-
-  /** @domName SVGPathElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGPathElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGPathElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGPathElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGPathElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGPathElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGPathElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGPathElement_systemLanguage_Getter";
-
-
-  /** @domName SVGPathElement.hasExtension */
-  bool hasExtension(String extension) native "SVGPathElement_hasExtension_Callback";
-
-
-  /** @domName SVGPathElement.transform */
-  SVGAnimatedTransformList get transform native "SVGPathElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSeg
-class SVGPathSeg extends NativeFieldWrapperClass1 {
-  SVGPathSeg.internal();
-
-  static const int PATHSEG_ARC_ABS = 10;
-
-  static const int PATHSEG_ARC_REL = 11;
-
-  static const int PATHSEG_CLOSEPATH = 1;
-
-  static const int PATHSEG_CURVETO_CUBIC_ABS = 6;
-
-  static const int PATHSEG_CURVETO_CUBIC_REL = 7;
-
-  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
-
-  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_ABS = 8;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_REL = 9;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
-
-  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
-
-  static const int PATHSEG_LINETO_ABS = 4;
-
-  static const int PATHSEG_LINETO_HORIZONTAL_ABS = 12;
-
-  static const int PATHSEG_LINETO_HORIZONTAL_REL = 13;
-
-  static const int PATHSEG_LINETO_REL = 5;
-
-  static const int PATHSEG_LINETO_VERTICAL_ABS = 14;
-
-  static const int PATHSEG_LINETO_VERTICAL_REL = 15;
-
-  static const int PATHSEG_MOVETO_ABS = 2;
-
-  static const int PATHSEG_MOVETO_REL = 3;
-
-  static const int PATHSEG_UNKNOWN = 0;
-
-
-  /** @domName SVGPathSeg.pathSegType */
-  int get pathSegType native "SVGPathSeg_pathSegType_Getter";
-
-
-  /** @domName SVGPathSeg.pathSegTypeAsLetter */
-  String get pathSegTypeAsLetter native "SVGPathSeg_pathSegTypeAsLetter_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegArcAbs
-class SVGPathSegArcAbs extends SVGPathSeg {
-  SVGPathSegArcAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegArcAbs.angle */
-  num get angle native "SVGPathSegArcAbs_angle_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.angle */
-  void set angle(num value) native "SVGPathSegArcAbs_angle_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.largeArcFlag */
-  bool get largeArcFlag native "SVGPathSegArcAbs_largeArcFlag_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.largeArcFlag */
-  void set largeArcFlag(bool value) native "SVGPathSegArcAbs_largeArcFlag_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.r1 */
-  num get r1 native "SVGPathSegArcAbs_r1_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.r1 */
-  void set r1(num value) native "SVGPathSegArcAbs_r1_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.r2 */
-  num get r2 native "SVGPathSegArcAbs_r2_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.r2 */
-  void set r2(num value) native "SVGPathSegArcAbs_r2_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.sweepFlag */
-  bool get sweepFlag native "SVGPathSegArcAbs_sweepFlag_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.sweepFlag */
-  void set sweepFlag(bool value) native "SVGPathSegArcAbs_sweepFlag_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.x */
-  num get x native "SVGPathSegArcAbs_x_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.x */
-  void set x(num value) native "SVGPathSegArcAbs_x_Setter";
-
-
-  /** @domName SVGPathSegArcAbs.y */
-  num get y native "SVGPathSegArcAbs_y_Getter";
-
-
-  /** @domName SVGPathSegArcAbs.y */
-  void set y(num value) native "SVGPathSegArcAbs_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegArcRel
-class SVGPathSegArcRel extends SVGPathSeg {
-  SVGPathSegArcRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegArcRel.angle */
-  num get angle native "SVGPathSegArcRel_angle_Getter";
-
-
-  /** @domName SVGPathSegArcRel.angle */
-  void set angle(num value) native "SVGPathSegArcRel_angle_Setter";
-
-
-  /** @domName SVGPathSegArcRel.largeArcFlag */
-  bool get largeArcFlag native "SVGPathSegArcRel_largeArcFlag_Getter";
-
-
-  /** @domName SVGPathSegArcRel.largeArcFlag */
-  void set largeArcFlag(bool value) native "SVGPathSegArcRel_largeArcFlag_Setter";
-
-
-  /** @domName SVGPathSegArcRel.r1 */
-  num get r1 native "SVGPathSegArcRel_r1_Getter";
-
-
-  /** @domName SVGPathSegArcRel.r1 */
-  void set r1(num value) native "SVGPathSegArcRel_r1_Setter";
-
-
-  /** @domName SVGPathSegArcRel.r2 */
-  num get r2 native "SVGPathSegArcRel_r2_Getter";
-
-
-  /** @domName SVGPathSegArcRel.r2 */
-  void set r2(num value) native "SVGPathSegArcRel_r2_Setter";
-
-
-  /** @domName SVGPathSegArcRel.sweepFlag */
-  bool get sweepFlag native "SVGPathSegArcRel_sweepFlag_Getter";
-
-
-  /** @domName SVGPathSegArcRel.sweepFlag */
-  void set sweepFlag(bool value) native "SVGPathSegArcRel_sweepFlag_Setter";
-
-
-  /** @domName SVGPathSegArcRel.x */
-  num get x native "SVGPathSegArcRel_x_Getter";
-
-
-  /** @domName SVGPathSegArcRel.x */
-  void set x(num value) native "SVGPathSegArcRel_x_Setter";
-
-
-  /** @domName SVGPathSegArcRel.y */
-  num get y native "SVGPathSegArcRel_y_Getter";
-
-
-  /** @domName SVGPathSegArcRel.y */
-  void set y(num value) native "SVGPathSegArcRel_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegClosePath
-class SVGPathSegClosePath extends SVGPathSeg {
-  SVGPathSegClosePath.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoCubicAbs
-class SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
-  SVGPathSegCurvetoCubicAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x */
-  num get x native "SVGPathSegCurvetoCubicAbs_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x */
-  void set x(num value) native "SVGPathSegCurvetoCubicAbs_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
-  num get x1 native "SVGPathSegCurvetoCubicAbs_x1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
-  void set x1(num value) native "SVGPathSegCurvetoCubicAbs_x1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
-  num get x2 native "SVGPathSegCurvetoCubicAbs_x2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
-  void set x2(num value) native "SVGPathSegCurvetoCubicAbs_x2_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y */
-  num get y native "SVGPathSegCurvetoCubicAbs_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y */
-  void set y(num value) native "SVGPathSegCurvetoCubicAbs_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
-  num get y1 native "SVGPathSegCurvetoCubicAbs_y1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
-  void set y1(num value) native "SVGPathSegCurvetoCubicAbs_y1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
-  num get y2 native "SVGPathSegCurvetoCubicAbs_y2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
-  void set y2(num value) native "SVGPathSegCurvetoCubicAbs_y2_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoCubicRel
-class SVGPathSegCurvetoCubicRel extends SVGPathSeg {
-  SVGPathSegCurvetoCubicRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x */
-  num get x native "SVGPathSegCurvetoCubicRel_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x */
-  void set x(num value) native "SVGPathSegCurvetoCubicRel_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x1 */
-  num get x1 native "SVGPathSegCurvetoCubicRel_x1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x1 */
-  void set x1(num value) native "SVGPathSegCurvetoCubicRel_x1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x2 */
-  num get x2 native "SVGPathSegCurvetoCubicRel_x2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.x2 */
-  void set x2(num value) native "SVGPathSegCurvetoCubicRel_x2_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y */
-  num get y native "SVGPathSegCurvetoCubicRel_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y */
-  void set y(num value) native "SVGPathSegCurvetoCubicRel_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y1 */
-  num get y1 native "SVGPathSegCurvetoCubicRel_y1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y1 */
-  void set y1(num value) native "SVGPathSegCurvetoCubicRel_y1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y2 */
-  num get y2 native "SVGPathSegCurvetoCubicRel_y2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicRel.y2 */
-  void set y2(num value) native "SVGPathSegCurvetoCubicRel_y2_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoCubicSmoothAbs
-class SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
-  SVGPathSegCurvetoCubicSmoothAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
-  num get x native "SVGPathSegCurvetoCubicSmoothAbs_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
-  void set x(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
-  num get x2 native "SVGPathSegCurvetoCubicSmoothAbs_x2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
-  void set x2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x2_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
-  num get y native "SVGPathSegCurvetoCubicSmoothAbs_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
-  void set y(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
-  num get y2 native "SVGPathSegCurvetoCubicSmoothAbs_y2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
-  void set y2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y2_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoCubicSmoothRel
-class SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
-  SVGPathSegCurvetoCubicSmoothRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
-  num get x native "SVGPathSegCurvetoCubicSmoothRel_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
-  void set x(num value) native "SVGPathSegCurvetoCubicSmoothRel_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
-  num get x2 native "SVGPathSegCurvetoCubicSmoothRel_x2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
-  void set x2(num value) native "SVGPathSegCurvetoCubicSmoothRel_x2_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
-  num get y native "SVGPathSegCurvetoCubicSmoothRel_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
-  void set y(num value) native "SVGPathSegCurvetoCubicSmoothRel_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
-  num get y2 native "SVGPathSegCurvetoCubicSmoothRel_y2_Getter";
-
-
-  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
-  void set y2(num value) native "SVGPathSegCurvetoCubicSmoothRel_y2_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoQuadraticAbs
-class SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
-  SVGPathSegCurvetoQuadraticAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
-  num get x native "SVGPathSegCurvetoQuadraticAbs_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
-  void set x(num value) native "SVGPathSegCurvetoQuadraticAbs_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
-  num get x1 native "SVGPathSegCurvetoQuadraticAbs_x1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
-  void set x1(num value) native "SVGPathSegCurvetoQuadraticAbs_x1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
-  num get y native "SVGPathSegCurvetoQuadraticAbs_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
-  void set y(num value) native "SVGPathSegCurvetoQuadraticAbs_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
-  num get y1 native "SVGPathSegCurvetoQuadraticAbs_y1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
-  void set y1(num value) native "SVGPathSegCurvetoQuadraticAbs_y1_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoQuadraticRel
-class SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
-  SVGPathSegCurvetoQuadraticRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x */
-  num get x native "SVGPathSegCurvetoQuadraticRel_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x */
-  void set x(num value) native "SVGPathSegCurvetoQuadraticRel_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
-  num get x1 native "SVGPathSegCurvetoQuadraticRel_x1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
-  void set x1(num value) native "SVGPathSegCurvetoQuadraticRel_x1_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y */
-  num get y native "SVGPathSegCurvetoQuadraticRel_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y */
-  void set y(num value) native "SVGPathSegCurvetoQuadraticRel_y_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
-  num get y1 native "SVGPathSegCurvetoQuadraticRel_y1_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
-  void set y1(num value) native "SVGPathSegCurvetoQuadraticRel_y1_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoQuadraticSmoothAbs
-class SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
-  SVGPathSegCurvetoQuadraticSmoothAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
-  num get x native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
-  void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
-  num get y native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
-  void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegCurvetoQuadraticSmoothRel
-class SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
-  SVGPathSegCurvetoQuadraticSmoothRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
-  num get x native "SVGPathSegCurvetoQuadraticSmoothRel_x_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
-  void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_x_Setter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
-  num get y native "SVGPathSegCurvetoQuadraticSmoothRel_y_Getter";
-
-
-  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
-  void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoAbs
-class SVGPathSegLinetoAbs extends SVGPathSeg {
-  SVGPathSegLinetoAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoAbs.x */
-  num get x native "SVGPathSegLinetoAbs_x_Getter";
-
-
-  /** @domName SVGPathSegLinetoAbs.x */
-  void set x(num value) native "SVGPathSegLinetoAbs_x_Setter";
-
-
-  /** @domName SVGPathSegLinetoAbs.y */
-  num get y native "SVGPathSegLinetoAbs_y_Getter";
-
-
-  /** @domName SVGPathSegLinetoAbs.y */
-  void set y(num value) native "SVGPathSegLinetoAbs_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoHorizontalAbs
-class SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
-  SVGPathSegLinetoHorizontalAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoHorizontalAbs.x */
-  num get x native "SVGPathSegLinetoHorizontalAbs_x_Getter";
-
-
-  /** @domName SVGPathSegLinetoHorizontalAbs.x */
-  void set x(num value) native "SVGPathSegLinetoHorizontalAbs_x_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoHorizontalRel
-class SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
-  SVGPathSegLinetoHorizontalRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoHorizontalRel.x */
-  num get x native "SVGPathSegLinetoHorizontalRel_x_Getter";
-
-
-  /** @domName SVGPathSegLinetoHorizontalRel.x */
-  void set x(num value) native "SVGPathSegLinetoHorizontalRel_x_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoRel
-class SVGPathSegLinetoRel extends SVGPathSeg {
-  SVGPathSegLinetoRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoRel.x */
-  num get x native "SVGPathSegLinetoRel_x_Getter";
-
-
-  /** @domName SVGPathSegLinetoRel.x */
-  void set x(num value) native "SVGPathSegLinetoRel_x_Setter";
-
-
-  /** @domName SVGPathSegLinetoRel.y */
-  num get y native "SVGPathSegLinetoRel_y_Getter";
-
-
-  /** @domName SVGPathSegLinetoRel.y */
-  void set y(num value) native "SVGPathSegLinetoRel_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoVerticalAbs
-class SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
-  SVGPathSegLinetoVerticalAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoVerticalAbs.y */
-  num get y native "SVGPathSegLinetoVerticalAbs_y_Getter";
-
-
-  /** @domName SVGPathSegLinetoVerticalAbs.y */
-  void set y(num value) native "SVGPathSegLinetoVerticalAbs_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegLinetoVerticalRel
-class SVGPathSegLinetoVerticalRel extends SVGPathSeg {
-  SVGPathSegLinetoVerticalRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegLinetoVerticalRel.y */
-  num get y native "SVGPathSegLinetoVerticalRel_y_Getter";
-
-
-  /** @domName SVGPathSegLinetoVerticalRel.y */
-  void set y(num value) native "SVGPathSegLinetoVerticalRel_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegList
-class SVGPathSegList extends NativeFieldWrapperClass1 implements List<SVGPathSeg> {
-  SVGPathSegList.internal();
-
-
-  /** @domName SVGPathSegList.numberOfItems */
-  int get numberOfItems native "SVGPathSegList_numberOfItems_Getter";
-
-  SVGPathSeg operator[](int index) native "SVGPathSegList_item_Callback";
-
-  void operator[]=(int index, SVGPathSeg value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGPathSeg> mixins.
-  // SVGPathSeg is the element type.
-
-  // From Iterable<SVGPathSeg>:
-
-  Iterator<SVGPathSeg> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGPathSeg>(this);
-  }
-
-  // From Collection<SVGPathSeg>:
-
-  void add(SVGPathSeg value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGPathSeg value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGPathSeg> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGPathSeg element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f);
-
-  Collection<SVGPathSeg> filter(bool f(SVGPathSeg element)) =>
-     _Collections.filter(this, <SVGPathSeg>[], f);
-
-  bool every(bool f(SVGPathSeg element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGPathSeg element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGPathSeg>:
-
-  void sort([Comparator<SVGPathSeg> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGPathSeg element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGPathSeg element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGPathSeg get last => this[length - 1];
-
-  SVGPathSeg removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGPathSeg initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGPathSeg> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGPathSeg>[]);
-
-  // -- end List<SVGPathSeg> mixins.
-
-
-  /** @domName SVGPathSegList.appendItem */
-  SVGPathSeg appendItem(SVGPathSeg newItem) native "SVGPathSegList_appendItem_Callback";
-
-
-  /** @domName SVGPathSegList.clear */
-  void clear() native "SVGPathSegList_clear_Callback";
-
-
-  /** @domName SVGPathSegList.getItem */
-  SVGPathSeg getItem(int index) native "SVGPathSegList_getItem_Callback";
-
-
-  /** @domName SVGPathSegList.initialize */
-  SVGPathSeg initialize(SVGPathSeg newItem) native "SVGPathSegList_initialize_Callback";
-
-
-  /** @domName SVGPathSegList.insertItemBefore */
-  SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index) native "SVGPathSegList_insertItemBefore_Callback";
-
-
-  /** @domName SVGPathSegList.removeItem */
-  SVGPathSeg removeItem(int index) native "SVGPathSegList_removeItem_Callback";
-
-
-  /** @domName SVGPathSegList.replaceItem */
-  SVGPathSeg replaceItem(SVGPathSeg newItem, int index) native "SVGPathSegList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegMovetoAbs
-class SVGPathSegMovetoAbs extends SVGPathSeg {
-  SVGPathSegMovetoAbs.internal(): super.internal();
-
-
-  /** @domName SVGPathSegMovetoAbs.x */
-  num get x native "SVGPathSegMovetoAbs_x_Getter";
-
-
-  /** @domName SVGPathSegMovetoAbs.x */
-  void set x(num value) native "SVGPathSegMovetoAbs_x_Setter";
-
-
-  /** @domName SVGPathSegMovetoAbs.y */
-  num get y native "SVGPathSegMovetoAbs_y_Getter";
-
-
-  /** @domName SVGPathSegMovetoAbs.y */
-  void set y(num value) native "SVGPathSegMovetoAbs_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPathSegMovetoRel
-class SVGPathSegMovetoRel extends SVGPathSeg {
-  SVGPathSegMovetoRel.internal(): super.internal();
-
-
-  /** @domName SVGPathSegMovetoRel.x */
-  num get x native "SVGPathSegMovetoRel_x_Getter";
-
-
-  /** @domName SVGPathSegMovetoRel.x */
-  void set x(num value) native "SVGPathSegMovetoRel_x_Setter";
-
-
-  /** @domName SVGPathSegMovetoRel.y */
-  num get y native "SVGPathSegMovetoRel_y_Getter";
-
-
-  /** @domName SVGPathSegMovetoRel.y */
-  void set y(num value) native "SVGPathSegMovetoRel_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPatternElement
-class SVGPatternElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGFitToViewBox, SVGExternalResourcesRequired {
-  SVGPatternElement.internal(): super.internal();
-
-
-  /** @domName SVGPatternElement.height */
-  SVGAnimatedLength get height native "SVGPatternElement_height_Getter";
-
-
-  /** @domName SVGPatternElement.patternContentUnits */
-  SVGAnimatedEnumeration get patternContentUnits native "SVGPatternElement_patternContentUnits_Getter";
-
-
-  /** @domName SVGPatternElement.patternTransform */
-  SVGAnimatedTransformList get patternTransform native "SVGPatternElement_patternTransform_Getter";
-
-
-  /** @domName SVGPatternElement.patternUnits */
-  SVGAnimatedEnumeration get patternUnits native "SVGPatternElement_patternUnits_Getter";
-
-
-  /** @domName SVGPatternElement.width */
-  SVGAnimatedLength get width native "SVGPatternElement_width_Getter";
-
-
-  /** @domName SVGPatternElement.x */
-  SVGAnimatedLength get x native "SVGPatternElement_x_Getter";
-
-
-  /** @domName SVGPatternElement.y */
-  SVGAnimatedLength get y native "SVGPatternElement_y_Getter";
-
-
-  /** @domName SVGPatternElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGPatternElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGPatternElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGPatternElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGPatternElement.viewBox */
-  SVGAnimatedRect get viewBox native "SVGPatternElement_viewBox_Getter";
-
-
-  /** @domName SVGPatternElement.xmllang */
-  String get xmllang native "SVGPatternElement_xmllang_Getter";
-
-
-  /** @domName SVGPatternElement.xmllang */
-  void set xmllang(String value) native "SVGPatternElement_xmllang_Setter";
-
-
-  /** @domName SVGPatternElement.xmlspace */
-  String get xmlspace native "SVGPatternElement_xmlspace_Getter";
-
-
-  /** @domName SVGPatternElement.xmlspace */
-  void set xmlspace(String value) native "SVGPatternElement_xmlspace_Setter";
-
-
-  /** @domName SVGPatternElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGPatternElement_className_Getter";
-
-
-  /** @domName SVGPatternElement.style */
-  CSSStyleDeclaration get style native "SVGPatternElement_style_Getter";
-
-
-  /** @domName SVGPatternElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGPatternElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGPatternElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGPatternElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGPatternElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGPatternElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGPatternElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGPatternElement_systemLanguage_Getter";
-
-
-  /** @domName SVGPatternElement.hasExtension */
-  bool hasExtension(String extension) native "SVGPatternElement_hasExtension_Callback";
-
-
-  /** @domName SVGPatternElement.href */
-  SVGAnimatedString get href native "SVGPatternElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPoint
-class SVGPoint extends NativeFieldWrapperClass1 {
-  SVGPoint.internal();
-
-
-  /** @domName SVGPoint.x */
-  num get x native "SVGPoint_x_Getter";
-
-
-  /** @domName SVGPoint.x */
-  void set x(num value) native "SVGPoint_x_Setter";
-
-
-  /** @domName SVGPoint.y */
-  num get y native "SVGPoint_y_Getter";
-
-
-  /** @domName SVGPoint.y */
-  void set y(num value) native "SVGPoint_y_Setter";
-
-
-  /** @domName SVGPoint.matrixTransform */
-  SVGPoint matrixTransform(SVGMatrix matrix) native "SVGPoint_matrixTransform_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPointList
-class SVGPointList extends NativeFieldWrapperClass1 {
-  SVGPointList.internal();
-
-
-  /** @domName SVGPointList.numberOfItems */
-  int get numberOfItems native "SVGPointList_numberOfItems_Getter";
-
-
-  /** @domName SVGPointList.appendItem */
-  SVGPoint appendItem(SVGPoint item) native "SVGPointList_appendItem_Callback";
-
-
-  /** @domName SVGPointList.clear */
-  void clear() native "SVGPointList_clear_Callback";
-
-
-  /** @domName SVGPointList.getItem */
-  SVGPoint getItem(int index) native "SVGPointList_getItem_Callback";
-
-
-  /** @domName SVGPointList.initialize */
-  SVGPoint initialize(SVGPoint item) native "SVGPointList_initialize_Callback";
-
-
-  /** @domName SVGPointList.insertItemBefore */
-  SVGPoint insertItemBefore(SVGPoint item, int index) native "SVGPointList_insertItemBefore_Callback";
-
-
-  /** @domName SVGPointList.removeItem */
-  SVGPoint removeItem(int index) native "SVGPointList_removeItem_Callback";
-
-
-  /** @domName SVGPointList.replaceItem */
-  SVGPoint replaceItem(SVGPoint item, int index) native "SVGPointList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPolygonElement
-class SVGPolygonElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGPolygonElement.internal(): super.internal();
-
-
-  /** @domName SVGPolygonElement.animatedPoints */
-  SVGPointList get animatedPoints native "SVGPolygonElement_animatedPoints_Getter";
-
-
-  /** @domName SVGPolygonElement.points */
-  SVGPointList get points native "SVGPolygonElement_points_Getter";
-
-
-  /** @domName SVGPolygonElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGPolygonElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGPolygonElement.xmllang */
-  String get xmllang native "SVGPolygonElement_xmllang_Getter";
-
-
-  /** @domName SVGPolygonElement.xmllang */
-  void set xmllang(String value) native "SVGPolygonElement_xmllang_Setter";
-
-
-  /** @domName SVGPolygonElement.xmlspace */
-  String get xmlspace native "SVGPolygonElement_xmlspace_Getter";
-
-
-  /** @domName SVGPolygonElement.xmlspace */
-  void set xmlspace(String value) native "SVGPolygonElement_xmlspace_Setter";
-
-
-  /** @domName SVGPolygonElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGPolygonElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGPolygonElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGPolygonElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGPolygonElement.getBBox */
-  SVGRect getBBox() native "SVGPolygonElement_getBBox_Callback";
-
-
-  /** @domName SVGPolygonElement.getCTM */
-  SVGMatrix getCTM() native "SVGPolygonElement_getCTM_Callback";
-
-
-  /** @domName SVGPolygonElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGPolygonElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGPolygonElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGPolygonElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGPolygonElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGPolygonElement_className_Getter";
-
-
-  /** @domName SVGPolygonElement.style */
-  CSSStyleDeclaration get style native "SVGPolygonElement_style_Getter";
-
-
-  /** @domName SVGPolygonElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGPolygonElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGPolygonElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGPolygonElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGPolygonElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGPolygonElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGPolygonElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGPolygonElement_systemLanguage_Getter";
-
-
-  /** @domName SVGPolygonElement.hasExtension */
-  bool hasExtension(String extension) native "SVGPolygonElement_hasExtension_Callback";
-
-
-  /** @domName SVGPolygonElement.transform */
-  SVGAnimatedTransformList get transform native "SVGPolygonElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPolylineElement
-class SVGPolylineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGPolylineElement.internal(): super.internal();
-
-
-  /** @domName SVGPolylineElement.animatedPoints */
-  SVGPointList get animatedPoints native "SVGPolylineElement_animatedPoints_Getter";
-
-
-  /** @domName SVGPolylineElement.points */
-  SVGPointList get points native "SVGPolylineElement_points_Getter";
-
-
-  /** @domName SVGPolylineElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGPolylineElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGPolylineElement.xmllang */
-  String get xmllang native "SVGPolylineElement_xmllang_Getter";
-
-
-  /** @domName SVGPolylineElement.xmllang */
-  void set xmllang(String value) native "SVGPolylineElement_xmllang_Setter";
-
-
-  /** @domName SVGPolylineElement.xmlspace */
-  String get xmlspace native "SVGPolylineElement_xmlspace_Getter";
-
-
-  /** @domName SVGPolylineElement.xmlspace */
-  void set xmlspace(String value) native "SVGPolylineElement_xmlspace_Setter";
-
-
-  /** @domName SVGPolylineElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGPolylineElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGPolylineElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGPolylineElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGPolylineElement.getBBox */
-  SVGRect getBBox() native "SVGPolylineElement_getBBox_Callback";
-
-
-  /** @domName SVGPolylineElement.getCTM */
-  SVGMatrix getCTM() native "SVGPolylineElement_getCTM_Callback";
-
-
-  /** @domName SVGPolylineElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGPolylineElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGPolylineElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGPolylineElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGPolylineElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGPolylineElement_className_Getter";
-
-
-  /** @domName SVGPolylineElement.style */
-  CSSStyleDeclaration get style native "SVGPolylineElement_style_Getter";
-
-
-  /** @domName SVGPolylineElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGPolylineElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGPolylineElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGPolylineElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGPolylineElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGPolylineElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGPolylineElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGPolylineElement_systemLanguage_Getter";
-
-
-  /** @domName SVGPolylineElement.hasExtension */
-  bool hasExtension(String extension) native "SVGPolylineElement_hasExtension_Callback";
-
-
-  /** @domName SVGPolylineElement.transform */
-  SVGAnimatedTransformList get transform native "SVGPolylineElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGPreserveAspectRatio
-class SVGPreserveAspectRatio extends NativeFieldWrapperClass1 {
-  SVGPreserveAspectRatio.internal();
-
-  static const int SVG_MEETORSLICE_MEET = 1;
-
-  static const int SVG_MEETORSLICE_SLICE = 2;
-
-  static const int SVG_MEETORSLICE_UNKNOWN = 0;
-
-  static const int SVG_PRESERVEASPECTRATIO_NONE = 1;
-
-  static const int SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
-
-  static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
-
-
-  /** @domName SVGPreserveAspectRatio.align */
-  int get align native "SVGPreserveAspectRatio_align_Getter";
-
-
-  /** @domName SVGPreserveAspectRatio.align */
-  void set align(int value) native "SVGPreserveAspectRatio_align_Setter";
-
-
-  /** @domName SVGPreserveAspectRatio.meetOrSlice */
-  int get meetOrSlice native "SVGPreserveAspectRatio_meetOrSlice_Getter";
-
-
-  /** @domName SVGPreserveAspectRatio.meetOrSlice */
-  void set meetOrSlice(int value) native "SVGPreserveAspectRatio_meetOrSlice_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGRadialGradientElement
-class SVGRadialGradientElement extends SVGGradientElement {
-  SVGRadialGradientElement.internal(): super.internal();
-
-
-  /** @domName SVGRadialGradientElement.cx */
-  SVGAnimatedLength get cx native "SVGRadialGradientElement_cx_Getter";
-
-
-  /** @domName SVGRadialGradientElement.cy */
-  SVGAnimatedLength get cy native "SVGRadialGradientElement_cy_Getter";
-
-
-  /** @domName SVGRadialGradientElement.fr */
-  SVGAnimatedLength get fr native "SVGRadialGradientElement_fr_Getter";
-
-
-  /** @domName SVGRadialGradientElement.fx */
-  SVGAnimatedLength get fx native "SVGRadialGradientElement_fx_Getter";
-
-
-  /** @domName SVGRadialGradientElement.fy */
-  SVGAnimatedLength get fy native "SVGRadialGradientElement_fy_Getter";
-
-
-  /** @domName SVGRadialGradientElement.r */
-  SVGAnimatedLength get r native "SVGRadialGradientElement_r_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGRect
-class SVGRect extends NativeFieldWrapperClass1 {
-  SVGRect.internal();
-
-
-  /** @domName SVGRect.height */
-  num get height native "SVGRect_height_Getter";
-
-
-  /** @domName SVGRect.height */
-  void set height(num value) native "SVGRect_height_Setter";
-
-
-  /** @domName SVGRect.width */
-  num get width native "SVGRect_width_Getter";
-
-
-  /** @domName SVGRect.width */
-  void set width(num value) native "SVGRect_width_Setter";
-
-
-  /** @domName SVGRect.x */
-  num get x native "SVGRect_x_Getter";
-
-
-  /** @domName SVGRect.x */
-  void set x(num value) native "SVGRect_x_Setter";
-
-
-  /** @domName SVGRect.y */
-  num get y native "SVGRect_y_Getter";
-
-
-  /** @domName SVGRect.y */
-  void set y(num value) native "SVGRect_y_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGRectElement
-class SVGRectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGRectElement.internal(): super.internal();
-
-
-  /** @domName SVGRectElement.height */
-  SVGAnimatedLength get height native "SVGRectElement_height_Getter";
-
-
-  /** @domName SVGRectElement.rx */
-  SVGAnimatedLength get rx native "SVGRectElement_rx_Getter";
-
-
-  /** @domName SVGRectElement.ry */
-  SVGAnimatedLength get ry native "SVGRectElement_ry_Getter";
-
-
-  /** @domName SVGRectElement.width */
-  SVGAnimatedLength get width native "SVGRectElement_width_Getter";
-
-
-  /** @domName SVGRectElement.x */
-  SVGAnimatedLength get x native "SVGRectElement_x_Getter";
-
-
-  /** @domName SVGRectElement.y */
-  SVGAnimatedLength get y native "SVGRectElement_y_Getter";
-
-
-  /** @domName SVGRectElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGRectElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGRectElement.xmllang */
-  String get xmllang native "SVGRectElement_xmllang_Getter";
-
-
-  /** @domName SVGRectElement.xmllang */
-  void set xmllang(String value) native "SVGRectElement_xmllang_Setter";
-
-
-  /** @domName SVGRectElement.xmlspace */
-  String get xmlspace native "SVGRectElement_xmlspace_Getter";
-
-
-  /** @domName SVGRectElement.xmlspace */
-  void set xmlspace(String value) native "SVGRectElement_xmlspace_Setter";
-
-
-  /** @domName SVGRectElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGRectElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGRectElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGRectElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGRectElement.getBBox */
-  SVGRect getBBox() native "SVGRectElement_getBBox_Callback";
-
-
-  /** @domName SVGRectElement.getCTM */
-  SVGMatrix getCTM() native "SVGRectElement_getCTM_Callback";
-
-
-  /** @domName SVGRectElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGRectElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGRectElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGRectElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGRectElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGRectElement_className_Getter";
-
-
-  /** @domName SVGRectElement.style */
-  CSSStyleDeclaration get style native "SVGRectElement_style_Getter";
-
-
-  /** @domName SVGRectElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGRectElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGRectElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGRectElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGRectElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGRectElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGRectElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGRectElement_systemLanguage_Getter";
-
-
-  /** @domName SVGRectElement.hasExtension */
-  bool hasExtension(String extension) native "SVGRectElement_hasExtension_Callback";
-
-
-  /** @domName SVGRectElement.transform */
-  SVGAnimatedTransformList get transform native "SVGRectElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGRenderingIntent
-class SVGRenderingIntent extends NativeFieldWrapperClass1 {
-  SVGRenderingIntent.internal();
-
-  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
-
-  static const int RENDERING_INTENT_AUTO = 1;
-
-  static const int RENDERING_INTENT_PERCEPTUAL = 2;
-
-  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
-
-  static const int RENDERING_INTENT_SATURATION = 4;
-
-  static const int RENDERING_INTENT_UNKNOWN = 0;
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-class SVGSVGElement extends SVGElement implements SVGZoomAndPan, SVGLocatable, SVGLangSpace, SVGTests, SVGStylable, SVGFitToViewBox, SVGExternalResourcesRequired {
-  factory SVGSVGElement() => _SVGSVGElementFactoryProvider.createSVGSVGElement();
-
-  SVGSVGElement.internal(): super.internal();
-
-
-  /** @domName SVGSVGElement.contentScriptType */
-  String get contentScriptType native "SVGSVGElement_contentScriptType_Getter";
-
-
-  /** @domName SVGSVGElement.contentScriptType */
-  void set contentScriptType(String value) native "SVGSVGElement_contentScriptType_Setter";
-
-
-  /** @domName SVGSVGElement.contentStyleType */
-  String get contentStyleType native "SVGSVGElement_contentStyleType_Getter";
-
-
-  /** @domName SVGSVGElement.contentStyleType */
-  void set contentStyleType(String value) native "SVGSVGElement_contentStyleType_Setter";
-
-
-  /** @domName SVGSVGElement.currentScale */
-  num get currentScale native "SVGSVGElement_currentScale_Getter";
-
-
-  /** @domName SVGSVGElement.currentScale */
-  void set currentScale(num value) native "SVGSVGElement_currentScale_Setter";
-
-
-  /** @domName SVGSVGElement.currentTranslate */
-  SVGPoint get currentTranslate native "SVGSVGElement_currentTranslate_Getter";
-
-
-  /** @domName SVGSVGElement.currentView */
-  SVGViewSpec get currentView native "SVGSVGElement_currentView_Getter";
-
-
-  /** @domName SVGSVGElement.height */
-  SVGAnimatedLength get height native "SVGSVGElement_height_Getter";
-
-
-  /** @domName SVGSVGElement.pixelUnitToMillimeterX */
-  num get pixelUnitToMillimeterX native "SVGSVGElement_pixelUnitToMillimeterX_Getter";
-
-
-  /** @domName SVGSVGElement.pixelUnitToMillimeterY */
-  num get pixelUnitToMillimeterY native "SVGSVGElement_pixelUnitToMillimeterY_Getter";
-
-
-  /** @domName SVGSVGElement.screenPixelToMillimeterX */
-  num get screenPixelToMillimeterX native "SVGSVGElement_screenPixelToMillimeterX_Getter";
-
-
-  /** @domName SVGSVGElement.screenPixelToMillimeterY */
-  num get screenPixelToMillimeterY native "SVGSVGElement_screenPixelToMillimeterY_Getter";
-
-
-  /** @domName SVGSVGElement.useCurrentView */
-  bool get useCurrentView native "SVGSVGElement_useCurrentView_Getter";
-
-
-  /** @domName SVGSVGElement.viewport */
-  SVGRect get viewport native "SVGSVGElement_viewport_Getter";
-
-
-  /** @domName SVGSVGElement.width */
-  SVGAnimatedLength get width native "SVGSVGElement_width_Getter";
-
-
-  /** @domName SVGSVGElement.x */
-  SVGAnimatedLength get x native "SVGSVGElement_x_Getter";
-
-
-  /** @domName SVGSVGElement.y */
-  SVGAnimatedLength get y native "SVGSVGElement_y_Getter";
-
-
-  /** @domName SVGSVGElement.animationsPaused */
-  bool animationsPaused() native "SVGSVGElement_animationsPaused_Callback";
-
-
-  /** @domName SVGSVGElement.checkEnclosure */
-  bool checkEnclosure(SVGElement element, SVGRect rect) native "SVGSVGElement_checkEnclosure_Callback";
-
-
-  /** @domName SVGSVGElement.checkIntersection */
-  bool checkIntersection(SVGElement element, SVGRect rect) native "SVGSVGElement_checkIntersection_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGAngle */
-  SVGAngle createSVGAngle() native "SVGSVGElement_createSVGAngle_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGLength */
-  SVGLength createSVGLength() native "SVGSVGElement_createSVGLength_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGMatrix */
-  SVGMatrix createSVGMatrix() native "SVGSVGElement_createSVGMatrix_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGNumber */
-  SVGNumber createSVGNumber() native "SVGSVGElement_createSVGNumber_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGPoint */
-  SVGPoint createSVGPoint() native "SVGSVGElement_createSVGPoint_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGRect */
-  SVGRect createSVGRect() native "SVGSVGElement_createSVGRect_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGTransform */
-  SVGTransform createSVGTransform() native "SVGSVGElement_createSVGTransform_Callback";
-
-
-  /** @domName SVGSVGElement.createSVGTransformFromMatrix */
-  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native "SVGSVGElement_createSVGTransformFromMatrix_Callback";
-
-
-  /** @domName SVGSVGElement.deselectAll */
-  void deselectAll() native "SVGSVGElement_deselectAll_Callback";
-
-
-  /** @domName SVGSVGElement.forceRedraw */
-  void forceRedraw() native "SVGSVGElement_forceRedraw_Callback";
-
-
-  /** @domName SVGSVGElement.getCurrentTime */
-  num getCurrentTime() native "SVGSVGElement_getCurrentTime_Callback";
-
-
-  /** @domName SVGSVGElement.getElementById */
-  Element getElementById(String elementId) native "SVGSVGElement_getElementById_Callback";
-
-
-  /** @domName SVGSVGElement.getEnclosureList */
-  List<Node> getEnclosureList(SVGRect rect, SVGElement referenceElement) native "SVGSVGElement_getEnclosureList_Callback";
-
-
-  /** @domName SVGSVGElement.getIntersectionList */
-  List<Node> getIntersectionList(SVGRect rect, SVGElement referenceElement) native "SVGSVGElement_getIntersectionList_Callback";
-
-
-  /** @domName SVGSVGElement.pauseAnimations */
-  void pauseAnimations() native "SVGSVGElement_pauseAnimations_Callback";
-
-
-  /** @domName SVGSVGElement.setCurrentTime */
-  void setCurrentTime(num seconds) native "SVGSVGElement_setCurrentTime_Callback";
-
-
-  /** @domName SVGSVGElement.suspendRedraw */
-  int suspendRedraw(int maxWaitMilliseconds) native "SVGSVGElement_suspendRedraw_Callback";
-
-
-  /** @domName SVGSVGElement.unpauseAnimations */
-  void unpauseAnimations() native "SVGSVGElement_unpauseAnimations_Callback";
-
-
-  /** @domName SVGSVGElement.unsuspendRedraw */
-  void unsuspendRedraw(int suspendHandleId) native "SVGSVGElement_unsuspendRedraw_Callback";
-
-
-  /** @domName SVGSVGElement.unsuspendRedrawAll */
-  void unsuspendRedrawAll() native "SVGSVGElement_unsuspendRedrawAll_Callback";
-
-
-  /** @domName SVGSVGElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGSVGElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGSVGElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSVGElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGSVGElement.viewBox */
-  SVGAnimatedRect get viewBox native "SVGSVGElement_viewBox_Getter";
-
-
-  /** @domName SVGSVGElement.xmllang */
-  String get xmllang native "SVGSVGElement_xmllang_Getter";
-
-
-  /** @domName SVGSVGElement.xmllang */
-  void set xmllang(String value) native "SVGSVGElement_xmllang_Setter";
-
-
-  /** @domName SVGSVGElement.xmlspace */
-  String get xmlspace native "SVGSVGElement_xmlspace_Getter";
-
-
-  /** @domName SVGSVGElement.xmlspace */
-  void set xmlspace(String value) native "SVGSVGElement_xmlspace_Setter";
-
-
-  /** @domName SVGSVGElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGSVGElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGSVGElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGSVGElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGSVGElement.getBBox */
-  SVGRect getBBox() native "SVGSVGElement_getBBox_Callback";
-
-
-  /** @domName SVGSVGElement.getCTM */
-  SVGMatrix getCTM() native "SVGSVGElement_getCTM_Callback";
-
-
-  /** @domName SVGSVGElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGSVGElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGSVGElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGSVGElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGSVGElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGSVGElement_className_Getter";
-
-
-  /** @domName SVGSVGElement.style */
-  CSSStyleDeclaration get style native "SVGSVGElement_style_Getter";
-
-
-  /** @domName SVGSVGElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGSVGElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGSVGElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGSVGElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGSVGElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGSVGElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGSVGElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGSVGElement_systemLanguage_Getter";
-
-
-  /** @domName SVGSVGElement.hasExtension */
-  bool hasExtension(String extension) native "SVGSVGElement_hasExtension_Callback";
-
-
-  /** @domName SVGSVGElement.zoomAndPan */
-  int get zoomAndPan native "SVGSVGElement_zoomAndPan_Getter";
-
-
-  /** @domName SVGSVGElement.zoomAndPan */
-  void set zoomAndPan(int value) native "SVGSVGElement_zoomAndPan_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGScriptElement
-class SVGScriptElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired {
-  SVGScriptElement.internal(): super.internal();
-
-
-  /** @domName SVGScriptElement.type */
-  String get type native "SVGScriptElement_type_Getter";
-
-
-  /** @domName SVGScriptElement.type */
-  void set type(String value) native "SVGScriptElement_type_Setter";
-
-
-  /** @domName SVGScriptElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGScriptElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGScriptElement.href */
-  SVGAnimatedString get href native "SVGScriptElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGSetElement
-class SVGSetElement extends SVGAnimationElement {
-  SVGSetElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGStopElement
-class SVGStopElement extends SVGElement implements SVGStylable {
-  SVGStopElement.internal(): super.internal();
-
-
-  /** @domName SVGStopElement.offset */
-  SVGAnimatedNumber get offset native "SVGStopElement_offset_Getter";
-
-
-  /** @domName SVGStopElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGStopElement_className_Getter";
-
-
-  /** @domName SVGStopElement.style */
-  CSSStyleDeclaration get style native "SVGStopElement_style_Getter";
-
-
-  /** @domName SVGStopElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGStopElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGStringList
-class SVGStringList extends NativeFieldWrapperClass1 implements List<String> {
-  SVGStringList.internal();
-
-
-  /** @domName SVGStringList.numberOfItems */
-  int get numberOfItems native "SVGStringList_numberOfItems_Getter";
-
-  String operator[](int index) native "SVGStringList_item_Callback";
-
-  void operator[]=(int index, String value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<String> mixins.
-  // String is the element type.
-
-  // From Iterable<String>:
-
-  Iterator<String> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<String>(this);
-  }
-
-  // From Collection<String>:
-
-  void add(String value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(String value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<String> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(String element) => _Collections.contains(this, element);
-
-  void forEach(void f(String element)) => _Collections.forEach(this, f);
-
-  Collection map(f(String element)) => _Collections.map(this, [], f);
-
-  Collection<String> filter(bool f(String element)) =>
-     _Collections.filter(this, <String>[], f);
-
-  bool every(bool f(String element)) => _Collections.every(this, f);
-
-  bool some(bool f(String element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<String>:
-
-  void sort([Comparator<String> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(String element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(String element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  String get last => this[length - 1];
-
-  String removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [String initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<String> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <String>[]);
-
-  // -- end List<String> mixins.
-
-
-  /** @domName SVGStringList.appendItem */
-  String appendItem(String item) native "SVGStringList_appendItem_Callback";
-
-
-  /** @domName SVGStringList.clear */
-  void clear() native "SVGStringList_clear_Callback";
-
-
-  /** @domName SVGStringList.getItem */
-  String getItem(int index) native "SVGStringList_getItem_Callback";
-
-
-  /** @domName SVGStringList.initialize */
-  String initialize(String item) native "SVGStringList_initialize_Callback";
-
-
-  /** @domName SVGStringList.insertItemBefore */
-  String insertItemBefore(String item, int index) native "SVGStringList_insertItemBefore_Callback";
-
-
-  /** @domName SVGStringList.removeItem */
-  String removeItem(int index) native "SVGStringList_removeItem_Callback";
-
-
-  /** @domName SVGStringList.replaceItem */
-  String replaceItem(String item, int index) native "SVGStringList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGStylable
-class SVGStylable extends NativeFieldWrapperClass1 {
-  SVGStylable.internal();
-
-
-  /** @domName SVGStylable.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGStylable_className_Getter";
-
-
-  /** @domName SVGStylable.style */
-  CSSStyleDeclaration get style native "SVGStylable_style_Getter";
-
-
-  /** @domName SVGStylable.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGStylable_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGStyleElement
-class SVGStyleElement extends SVGElement implements SVGLangSpace {
-  SVGStyleElement.internal(): super.internal();
-
-
-  /** @domName SVGStyleElement.disabled */
-  bool get disabled native "SVGStyleElement_disabled_Getter";
-
-
-  /** @domName SVGStyleElement.disabled */
-  void set disabled(bool value) native "SVGStyleElement_disabled_Setter";
-
-
-  /** @domName SVGStyleElement.media */
-  String get media native "SVGStyleElement_media_Getter";
-
-
-  /** @domName SVGStyleElement.media */
-  void set media(String value) native "SVGStyleElement_media_Setter";
-
-
-  /** @domName SVGStyleElement.title */
-  String get title native "SVGStyleElement_title_Getter";
-
-
-  /** @domName SVGStyleElement.title */
-  void set title(String value) native "SVGStyleElement_title_Setter";
-
-
-  /** @domName SVGStyleElement.type */
-  String get type native "SVGStyleElement_type_Getter";
-
-
-  /** @domName SVGStyleElement.type */
-  void set type(String value) native "SVGStyleElement_type_Setter";
-
-
-  /** @domName SVGStyleElement.xmllang */
-  String get xmllang native "SVGStyleElement_xmllang_Getter";
-
-
-  /** @domName SVGStyleElement.xmllang */
-  void set xmllang(String value) native "SVGStyleElement_xmllang_Setter";
-
-
-  /** @domName SVGStyleElement.xmlspace */
-  String get xmlspace native "SVGStyleElement_xmlspace_Getter";
-
-
-  /** @domName SVGStyleElement.xmlspace */
-  void set xmlspace(String value) native "SVGStyleElement_xmlspace_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGSwitchElement
-class SVGSwitchElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
-  SVGSwitchElement.internal(): super.internal();
-
-
-  /** @domName SVGSwitchElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGSwitchElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGSwitchElement.xmllang */
-  String get xmllang native "SVGSwitchElement_xmllang_Getter";
-
-
-  /** @domName SVGSwitchElement.xmllang */
-  void set xmllang(String value) native "SVGSwitchElement_xmllang_Setter";
-
-
-  /** @domName SVGSwitchElement.xmlspace */
-  String get xmlspace native "SVGSwitchElement_xmlspace_Getter";
-
-
-  /** @domName SVGSwitchElement.xmlspace */
-  void set xmlspace(String value) native "SVGSwitchElement_xmlspace_Setter";
-
-
-  /** @domName SVGSwitchElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGSwitchElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGSwitchElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGSwitchElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGSwitchElement.getBBox */
-  SVGRect getBBox() native "SVGSwitchElement_getBBox_Callback";
-
-
-  /** @domName SVGSwitchElement.getCTM */
-  SVGMatrix getCTM() native "SVGSwitchElement_getCTM_Callback";
-
-
-  /** @domName SVGSwitchElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGSwitchElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGSwitchElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGSwitchElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGSwitchElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGSwitchElement_className_Getter";
-
-
-  /** @domName SVGSwitchElement.style */
-  CSSStyleDeclaration get style native "SVGSwitchElement_style_Getter";
-
-
-  /** @domName SVGSwitchElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGSwitchElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGSwitchElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGSwitchElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGSwitchElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGSwitchElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGSwitchElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGSwitchElement_systemLanguage_Getter";
-
-
-  /** @domName SVGSwitchElement.hasExtension */
-  bool hasExtension(String extension) native "SVGSwitchElement_hasExtension_Callback";
-
-
-  /** @domName SVGSwitchElement.transform */
-  SVGAnimatedTransformList get transform native "SVGSwitchElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGSymbolElement
-class SVGSymbolElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable {
-  SVGSymbolElement.internal(): super.internal();
-
-
-  /** @domName SVGSymbolElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGSymbolElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGSymbolElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSymbolElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGSymbolElement.viewBox */
-  SVGAnimatedRect get viewBox native "SVGSymbolElement_viewBox_Getter";
-
-
-  /** @domName SVGSymbolElement.xmllang */
-  String get xmllang native "SVGSymbolElement_xmllang_Getter";
-
-
-  /** @domName SVGSymbolElement.xmllang */
-  void set xmllang(String value) native "SVGSymbolElement_xmllang_Setter";
-
-
-  /** @domName SVGSymbolElement.xmlspace */
-  String get xmlspace native "SVGSymbolElement_xmlspace_Getter";
-
-
-  /** @domName SVGSymbolElement.xmlspace */
-  void set xmlspace(String value) native "SVGSymbolElement_xmlspace_Setter";
-
-
-  /** @domName SVGSymbolElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGSymbolElement_className_Getter";
-
-
-  /** @domName SVGSymbolElement.style */
-  CSSStyleDeclaration get style native "SVGSymbolElement_style_Getter";
-
-
-  /** @domName SVGSymbolElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGSymbolElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTRefElement
-class SVGTRefElement extends SVGTextPositioningElement implements SVGURIReference {
-  SVGTRefElement.internal(): super.internal();
-
-
-  /** @domName SVGTRefElement.href */
-  SVGAnimatedString get href native "SVGTRefElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTSpanElement
-class SVGTSpanElement extends SVGTextPositioningElement {
-  SVGTSpanElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTests
-class SVGTests extends NativeFieldWrapperClass1 {
-  SVGTests.internal();
-
-
-  /** @domName SVGTests.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGTests_requiredExtensions_Getter";
-
-
-  /** @domName SVGTests.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGTests_requiredFeatures_Getter";
-
-
-  /** @domName SVGTests.systemLanguage */
-  SVGStringList get systemLanguage native "SVGTests_systemLanguage_Getter";
-
-
-  /** @domName SVGTests.hasExtension */
-  bool hasExtension(String extension) native "SVGTests_hasExtension_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTextContentElement
-class SVGTextContentElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired {
-  SVGTextContentElement.internal(): super.internal();
-
-  static const int LENGTHADJUST_SPACING = 1;
-
-  static const int LENGTHADJUST_SPACINGANDGLYPHS = 2;
-
-  static const int LENGTHADJUST_UNKNOWN = 0;
-
-
-  /** @domName SVGTextContentElement.lengthAdjust */
-  SVGAnimatedEnumeration get lengthAdjust native "SVGTextContentElement_lengthAdjust_Getter";
-
-
-  /** @domName SVGTextContentElement.textLength */
-  SVGAnimatedLength get textLength native "SVGTextContentElement_textLength_Getter";
-
-
-  /** @domName SVGTextContentElement.getCharNumAtPosition */
-  int getCharNumAtPosition(SVGPoint point) native "SVGTextContentElement_getCharNumAtPosition_Callback";
-
-
-  /** @domName SVGTextContentElement.getComputedTextLength */
-  num getComputedTextLength() native "SVGTextContentElement_getComputedTextLength_Callback";
-
-
-  /** @domName SVGTextContentElement.getEndPositionOfChar */
-  SVGPoint getEndPositionOfChar(int offset) native "SVGTextContentElement_getEndPositionOfChar_Callback";
-
-
-  /** @domName SVGTextContentElement.getExtentOfChar */
-  SVGRect getExtentOfChar(int offset) native "SVGTextContentElement_getExtentOfChar_Callback";
-
-
-  /** @domName SVGTextContentElement.getNumberOfChars */
-  int getNumberOfChars() native "SVGTextContentElement_getNumberOfChars_Callback";
-
-
-  /** @domName SVGTextContentElement.getRotationOfChar */
-  num getRotationOfChar(int offset) native "SVGTextContentElement_getRotationOfChar_Callback";
-
-
-  /** @domName SVGTextContentElement.getStartPositionOfChar */
-  SVGPoint getStartPositionOfChar(int offset) native "SVGTextContentElement_getStartPositionOfChar_Callback";
-
-
-  /** @domName SVGTextContentElement.getSubStringLength */
-  num getSubStringLength(int offset, int length) native "SVGTextContentElement_getSubStringLength_Callback";
-
-
-  /** @domName SVGTextContentElement.selectSubString */
-  void selectSubString(int offset, int length) native "SVGTextContentElement_selectSubString_Callback";
-
-
-  /** @domName SVGTextContentElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGTextContentElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGTextContentElement.xmllang */
-  String get xmllang native "SVGTextContentElement_xmllang_Getter";
-
-
-  /** @domName SVGTextContentElement.xmllang */
-  void set xmllang(String value) native "SVGTextContentElement_xmllang_Setter";
-
-
-  /** @domName SVGTextContentElement.xmlspace */
-  String get xmlspace native "SVGTextContentElement_xmlspace_Getter";
-
-
-  /** @domName SVGTextContentElement.xmlspace */
-  void set xmlspace(String value) native "SVGTextContentElement_xmlspace_Setter";
-
-
-  /** @domName SVGTextContentElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGTextContentElement_className_Getter";
-
-
-  /** @domName SVGTextContentElement.style */
-  CSSStyleDeclaration get style native "SVGTextContentElement_style_Getter";
-
-
-  /** @domName SVGTextContentElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGTextContentElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGTextContentElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGTextContentElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGTextContentElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGTextContentElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGTextContentElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGTextContentElement_systemLanguage_Getter";
-
-
-  /** @domName SVGTextContentElement.hasExtension */
-  bool hasExtension(String extension) native "SVGTextContentElement_hasExtension_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTextElement
-class SVGTextElement extends SVGTextPositioningElement implements SVGTransformable {
-  SVGTextElement.internal(): super.internal();
-
-
-  /** @domName SVGTextElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGTextElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGTextElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGTextElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGTextElement.getBBox */
-  SVGRect getBBox() native "SVGTextElement_getBBox_Callback";
-
-
-  /** @domName SVGTextElement.getCTM */
-  SVGMatrix getCTM() native "SVGTextElement_getCTM_Callback";
-
-
-  /** @domName SVGTextElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGTextElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGTextElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGTextElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGTextElement.transform */
-  SVGAnimatedTransformList get transform native "SVGTextElement_transform_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTextPathElement
-class SVGTextPathElement extends SVGTextContentElement implements SVGURIReference {
-  SVGTextPathElement.internal(): super.internal();
-
-  static const int TEXTPATH_METHODTYPE_ALIGN = 1;
-
-  static const int TEXTPATH_METHODTYPE_STRETCH = 2;
-
-  static const int TEXTPATH_METHODTYPE_UNKNOWN = 0;
-
-  static const int TEXTPATH_SPACINGTYPE_AUTO = 1;
-
-  static const int TEXTPATH_SPACINGTYPE_EXACT = 2;
-
-  static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
-
-
-  /** @domName SVGTextPathElement.method */
-  SVGAnimatedEnumeration get method native "SVGTextPathElement_method_Getter";
-
-
-  /** @domName SVGTextPathElement.spacing */
-  SVGAnimatedEnumeration get spacing native "SVGTextPathElement_spacing_Getter";
-
-
-  /** @domName SVGTextPathElement.startOffset */
-  SVGAnimatedLength get startOffset native "SVGTextPathElement_startOffset_Getter";
-
-
-  /** @domName SVGTextPathElement.href */
-  SVGAnimatedString get href native "SVGTextPathElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTextPositioningElement
-class SVGTextPositioningElement extends SVGTextContentElement {
-  SVGTextPositioningElement.internal(): super.internal();
-
-
-  /** @domName SVGTextPositioningElement.dx */
-  SVGAnimatedLengthList get dx native "SVGTextPositioningElement_dx_Getter";
-
-
-  /** @domName SVGTextPositioningElement.dy */
-  SVGAnimatedLengthList get dy native "SVGTextPositioningElement_dy_Getter";
-
-
-  /** @domName SVGTextPositioningElement.rotate */
-  SVGAnimatedNumberList get rotate native "SVGTextPositioningElement_rotate_Getter";
-
-
-  /** @domName SVGTextPositioningElement.x */
-  SVGAnimatedLengthList get x native "SVGTextPositioningElement_x_Getter";
-
-
-  /** @domName SVGTextPositioningElement.y */
-  SVGAnimatedLengthList get y native "SVGTextPositioningElement_y_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTitleElement
-class SVGTitleElement extends SVGElement implements SVGLangSpace, SVGStylable {
-  SVGTitleElement.internal(): super.internal();
-
-
-  /** @domName SVGTitleElement.xmllang */
-  String get xmllang native "SVGTitleElement_xmllang_Getter";
-
-
-  /** @domName SVGTitleElement.xmllang */
-  void set xmllang(String value) native "SVGTitleElement_xmllang_Setter";
-
-
-  /** @domName SVGTitleElement.xmlspace */
-  String get xmlspace native "SVGTitleElement_xmlspace_Getter";
-
-
-  /** @domName SVGTitleElement.xmlspace */
-  void set xmlspace(String value) native "SVGTitleElement_xmlspace_Setter";
-
-
-  /** @domName SVGTitleElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGTitleElement_className_Getter";
-
-
-  /** @domName SVGTitleElement.style */
-  CSSStyleDeclaration get style native "SVGTitleElement_style_Getter";
-
-
-  /** @domName SVGTitleElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGTitleElement_getPresentationAttribute_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTransform
-class SVGTransform extends NativeFieldWrapperClass1 {
-  SVGTransform.internal();
-
-  static const int SVG_TRANSFORM_MATRIX = 1;
-
-  static const int SVG_TRANSFORM_ROTATE = 4;
-
-  static const int SVG_TRANSFORM_SCALE = 3;
-
-  static const int SVG_TRANSFORM_SKEWX = 5;
-
-  static const int SVG_TRANSFORM_SKEWY = 6;
-
-  static const int SVG_TRANSFORM_TRANSLATE = 2;
-
-  static const int SVG_TRANSFORM_UNKNOWN = 0;
-
-
-  /** @domName SVGTransform.angle */
-  num get angle native "SVGTransform_angle_Getter";
-
-
-  /** @domName SVGTransform.matrix */
-  SVGMatrix get matrix native "SVGTransform_matrix_Getter";
-
-
-  /** @domName SVGTransform.type */
-  int get type native "SVGTransform_type_Getter";
-
-
-  /** @domName SVGTransform.setMatrix */
-  void setMatrix(SVGMatrix matrix) native "SVGTransform_setMatrix_Callback";
-
-
-  /** @domName SVGTransform.setRotate */
-  void setRotate(num angle, num cx, num cy) native "SVGTransform_setRotate_Callback";
-
-
-  /** @domName SVGTransform.setScale */
-  void setScale(num sx, num sy) native "SVGTransform_setScale_Callback";
-
-
-  /** @domName SVGTransform.setSkewX */
-  void setSkewX(num angle) native "SVGTransform_setSkewX_Callback";
-
-
-  /** @domName SVGTransform.setSkewY */
-  void setSkewY(num angle) native "SVGTransform_setSkewY_Callback";
-
-
-  /** @domName SVGTransform.setTranslate */
-  void setTranslate(num tx, num ty) native "SVGTransform_setTranslate_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTransformList
-class SVGTransformList extends NativeFieldWrapperClass1 implements List<SVGTransform> {
-  SVGTransformList.internal();
-
-
-  /** @domName SVGTransformList.numberOfItems */
-  int get numberOfItems native "SVGTransformList_numberOfItems_Getter";
-
-  SVGTransform operator[](int index) native "SVGTransformList_item_Callback";
-
-  void operator[]=(int index, SVGTransform value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGTransform> mixins.
-  // SVGTransform is the element type.
-
-  // From Iterable<SVGTransform>:
-
-  Iterator<SVGTransform> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGTransform>(this);
-  }
-
-  // From Collection<SVGTransform>:
-
-  void add(SVGTransform value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGTransform value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGTransform> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGTransform element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGTransform element)) => _Collections.map(this, [], f);
-
-  Collection<SVGTransform> filter(bool f(SVGTransform element)) =>
-     _Collections.filter(this, <SVGTransform>[], f);
-
-  bool every(bool f(SVGTransform element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGTransform element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGTransform>:
-
-  void sort([Comparator<SVGTransform> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGTransform element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGTransform element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGTransform get last => this[length - 1];
-
-  SVGTransform removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGTransform initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGTransform> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGTransform>[]);
-
-  // -- end List<SVGTransform> mixins.
-
-
-  /** @domName SVGTransformList.appendItem */
-  SVGTransform appendItem(SVGTransform item) native "SVGTransformList_appendItem_Callback";
-
-
-  /** @domName SVGTransformList.clear */
-  void clear() native "SVGTransformList_clear_Callback";
-
-
-  /** @domName SVGTransformList.consolidate */
-  SVGTransform consolidate() native "SVGTransformList_consolidate_Callback";
-
-
-  /** @domName SVGTransformList.createSVGTransformFromMatrix */
-  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native "SVGTransformList_createSVGTransformFromMatrix_Callback";
-
-
-  /** @domName SVGTransformList.getItem */
-  SVGTransform getItem(int index) native "SVGTransformList_getItem_Callback";
-
-
-  /** @domName SVGTransformList.initialize */
-  SVGTransform initialize(SVGTransform item) native "SVGTransformList_initialize_Callback";
-
-
-  /** @domName SVGTransformList.insertItemBefore */
-  SVGTransform insertItemBefore(SVGTransform item, int index) native "SVGTransformList_insertItemBefore_Callback";
-
-
-  /** @domName SVGTransformList.removeItem */
-  SVGTransform removeItem(int index) native "SVGTransformList_removeItem_Callback";
-
-
-  /** @domName SVGTransformList.replaceItem */
-  SVGTransform replaceItem(SVGTransform item, int index) native "SVGTransformList_replaceItem_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGTransformable
-class SVGTransformable extends NativeFieldWrapperClass1 implements SVGLocatable {
-  SVGTransformable.internal();
-
-
-  /** @domName SVGTransformable.transform */
-  SVGAnimatedTransformList get transform native "SVGTransformable_transform_Getter";
-
-
-  /** @domName SVGTransformable.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGTransformable_farthestViewportElement_Getter";
-
-
-  /** @domName SVGTransformable.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGTransformable_nearestViewportElement_Getter";
-
-
-  /** @domName SVGTransformable.getBBox */
-  SVGRect getBBox() native "SVGTransformable_getBBox_Callback";
-
-
-  /** @domName SVGTransformable.getCTM */
-  SVGMatrix getCTM() native "SVGTransformable_getCTM_Callback";
-
-
-  /** @domName SVGTransformable.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGTransformable_getScreenCTM_Callback";
-
-
-  /** @domName SVGTransformable.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGTransformable_getTransformToElement_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGURIReference
-class SVGURIReference extends NativeFieldWrapperClass1 {
-  SVGURIReference.internal();
-
-
-  /** @domName SVGURIReference.href */
-  SVGAnimatedString get href native "SVGURIReference_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGUnitTypes
-class SVGUnitTypes extends NativeFieldWrapperClass1 {
-  SVGUnitTypes.internal();
-
-  static const int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
-
-  static const int SVG_UNIT_TYPE_UNKNOWN = 0;
-
-  static const int SVG_UNIT_TYPE_USERSPACEONUSE = 1;
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGUseElement
-class SVGUseElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
-  SVGUseElement.internal(): super.internal();
-
-
-  /** @domName SVGUseElement.animatedInstanceRoot */
-  SVGElementInstance get animatedInstanceRoot native "SVGUseElement_animatedInstanceRoot_Getter";
-
-
-  /** @domName SVGUseElement.height */
-  SVGAnimatedLength get height native "SVGUseElement_height_Getter";
-
-
-  /** @domName SVGUseElement.instanceRoot */
-  SVGElementInstance get instanceRoot native "SVGUseElement_instanceRoot_Getter";
-
-
-  /** @domName SVGUseElement.width */
-  SVGAnimatedLength get width native "SVGUseElement_width_Getter";
-
-
-  /** @domName SVGUseElement.x */
-  SVGAnimatedLength get x native "SVGUseElement_x_Getter";
-
-
-  /** @domName SVGUseElement.y */
-  SVGAnimatedLength get y native "SVGUseElement_y_Getter";
-
-
-  /** @domName SVGUseElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGUseElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGUseElement.xmllang */
-  String get xmllang native "SVGUseElement_xmllang_Getter";
-
-
-  /** @domName SVGUseElement.xmllang */
-  void set xmllang(String value) native "SVGUseElement_xmllang_Setter";
-
-
-  /** @domName SVGUseElement.xmlspace */
-  String get xmlspace native "SVGUseElement_xmlspace_Getter";
-
-
-  /** @domName SVGUseElement.xmlspace */
-  void set xmlspace(String value) native "SVGUseElement_xmlspace_Setter";
-
-
-  /** @domName SVGUseElement.farthestViewportElement */
-  SVGElement get farthestViewportElement native "SVGUseElement_farthestViewportElement_Getter";
-
-
-  /** @domName SVGUseElement.nearestViewportElement */
-  SVGElement get nearestViewportElement native "SVGUseElement_nearestViewportElement_Getter";
-
-
-  /** @domName SVGUseElement.getBBox */
-  SVGRect getBBox() native "SVGUseElement_getBBox_Callback";
-
-
-  /** @domName SVGUseElement.getCTM */
-  SVGMatrix getCTM() native "SVGUseElement_getCTM_Callback";
-
-
-  /** @domName SVGUseElement.getScreenCTM */
-  SVGMatrix getScreenCTM() native "SVGUseElement_getScreenCTM_Callback";
-
-
-  /** @domName SVGUseElement.getTransformToElement */
-  SVGMatrix getTransformToElement(SVGElement element) native "SVGUseElement_getTransformToElement_Callback";
-
-
-  /** @domName SVGUseElement.className */
-  SVGAnimatedString get $dom_svgClassName native "SVGUseElement_className_Getter";
-
-
-  /** @domName SVGUseElement.style */
-  CSSStyleDeclaration get style native "SVGUseElement_style_Getter";
-
-
-  /** @domName SVGUseElement.getPresentationAttribute */
-  CSSValue getPresentationAttribute(String name) native "SVGUseElement_getPresentationAttribute_Callback";
-
-
-  /** @domName SVGUseElement.requiredExtensions */
-  SVGStringList get requiredExtensions native "SVGUseElement_requiredExtensions_Getter";
-
-
-  /** @domName SVGUseElement.requiredFeatures */
-  SVGStringList get requiredFeatures native "SVGUseElement_requiredFeatures_Getter";
-
-
-  /** @domName SVGUseElement.systemLanguage */
-  SVGStringList get systemLanguage native "SVGUseElement_systemLanguage_Getter";
-
-
-  /** @domName SVGUseElement.hasExtension */
-  bool hasExtension(String extension) native "SVGUseElement_hasExtension_Callback";
-
-
-  /** @domName SVGUseElement.transform */
-  SVGAnimatedTransformList get transform native "SVGUseElement_transform_Getter";
-
-
-  /** @domName SVGUseElement.href */
-  SVGAnimatedString get href native "SVGUseElement_href_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGVKernElement
-class SVGVKernElement extends SVGElement {
-  SVGVKernElement.internal(): super.internal();
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGViewElement
-class SVGViewElement extends SVGElement implements SVGFitToViewBox, SVGZoomAndPan, SVGExternalResourcesRequired {
-  SVGViewElement.internal(): super.internal();
-
-
-  /** @domName SVGViewElement.viewTarget */
-  SVGStringList get viewTarget native "SVGViewElement_viewTarget_Getter";
-
-
-  /** @domName SVGViewElement.externalResourcesRequired */
-  SVGAnimatedBoolean get externalResourcesRequired native "SVGViewElement_externalResourcesRequired_Getter";
-
-
-  /** @domName SVGViewElement.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewElement_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGViewElement.viewBox */
-  SVGAnimatedRect get viewBox native "SVGViewElement_viewBox_Getter";
-
-
-  /** @domName SVGViewElement.zoomAndPan */
-  int get zoomAndPan native "SVGViewElement_zoomAndPan_Getter";
-
-
-  /** @domName SVGViewElement.zoomAndPan */
-  void set zoomAndPan(int value) native "SVGViewElement_zoomAndPan_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGViewSpec
-class SVGViewSpec extends NativeFieldWrapperClass1 {
-  SVGViewSpec.internal();
-
-
-  /** @domName SVGViewSpec.preserveAspectRatio */
-  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewSpec_preserveAspectRatio_Getter";
-
-
-  /** @domName SVGViewSpec.preserveAspectRatioString */
-  String get preserveAspectRatioString native "SVGViewSpec_preserveAspectRatioString_Getter";
-
-
-  /** @domName SVGViewSpec.transform */
-  SVGTransformList get transform native "SVGViewSpec_transform_Getter";
-
-
-  /** @domName SVGViewSpec.transformString */
-  String get transformString native "SVGViewSpec_transformString_Getter";
-
-
-  /** @domName SVGViewSpec.viewBox */
-  SVGAnimatedRect get viewBox native "SVGViewSpec_viewBox_Getter";
-
-
-  /** @domName SVGViewSpec.viewBoxString */
-  String get viewBoxString native "SVGViewSpec_viewBoxString_Getter";
-
-
-  /** @domName SVGViewSpec.viewTarget */
-  SVGElement get viewTarget native "SVGViewSpec_viewTarget_Getter";
-
-
-  /** @domName SVGViewSpec.viewTargetString */
-  String get viewTargetString native "SVGViewSpec_viewTargetString_Getter";
-
-
-  /** @domName SVGViewSpec.zoomAndPan */
-  int get zoomAndPan native "SVGViewSpec_zoomAndPan_Getter";
-
-
-  /** @domName SVGViewSpec.zoomAndPan */
-  void set zoomAndPan(int value) native "SVGViewSpec_zoomAndPan_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGZoomAndPan
-class SVGZoomAndPan extends NativeFieldWrapperClass1 {
-  SVGZoomAndPan.internal();
-
-  static const int SVG_ZOOMANDPAN_DISABLE = 1;
-
-  static const int SVG_ZOOMANDPAN_MAGNIFY = 2;
-
-  static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
-
-
-  /** @domName SVGZoomAndPan.zoomAndPan */
-  int get zoomAndPan native "SVGZoomAndPan_zoomAndPan_Getter";
-
-
-  /** @domName SVGZoomAndPan.zoomAndPan */
-  void set zoomAndPan(int value) native "SVGZoomAndPan_zoomAndPan_Setter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGZoomEvent
-class SVGZoomEvent extends UIEvent {
-  SVGZoomEvent.internal(): super.internal();
-
-
-  /** @domName SVGZoomEvent.newScale */
-  num get newScale native "SVGZoomEvent_newScale_Getter";
-
-
-  /** @domName SVGZoomEvent.newTranslate */
-  SVGPoint get newTranslate native "SVGZoomEvent_newTranslate_Getter";
-
-
-  /** @domName SVGZoomEvent.previousScale */
-  num get previousScale native "SVGZoomEvent_previousScale_Getter";
-
-
-  /** @domName SVGZoomEvent.previousTranslate */
-  SVGPoint get previousTranslate native "SVGZoomEvent_previousTranslate_Getter";
-
-
-  /** @domName SVGZoomEvent.zoomRectScreen */
-  SVGRect get zoomRectScreen native "SVGZoomEvent_zoomRectScreen_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
 
 /// @domName Screen
 class Screen extends NativeFieldWrapperClass1 {
@@ -28056,6 +20435,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLScriptElement
 class ScriptElement extends _Element_Merged {
 
@@ -28133,6 +20513,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ScriptProcessorNode
 class ScriptProcessorNode extends AudioNode implements EventTarget {
   ScriptProcessorNode.internal(): super.internal();
@@ -28160,6 +20541,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ScriptProfile
 class ScriptProfile extends NativeFieldWrapperClass1 {
   ScriptProfile.internal();
@@ -28183,6 +20565,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ScriptProfileNode
 class ScriptProfileNode extends NativeFieldWrapperClass1 {
   ScriptProfileNode.internal();
@@ -28230,6 +20613,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLSelectElement
 class SelectElement extends _Element_Merged {
 
@@ -28363,6 +20747,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SessionDescription
 class SessionDescription extends NativeFieldWrapperClass1 {
 
@@ -28384,6 +20769,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLShadowElement
 class ShadowElement extends _Element_Merged {
   ShadowElement.internal(): super.internal();
@@ -28403,6 +20789,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class ShadowRoot extends DocumentFragment {
 
   factory ShadowRoot(Element host) => _ShadowRootFactoryProvider.createShadowRoot(host);
@@ -28464,6 +20851,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SharedWorker
 class SharedWorker extends AbstractWorker {
 
@@ -28486,6 +20874,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SharedWorkerContext
 class SharedWorkerContext extends WorkerContext {
   SharedWorkerContext.internal(): super.internal();
@@ -28513,6 +20902,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SourceBuffer
 class SourceBuffer extends NativeFieldWrapperClass1 {
   SourceBuffer.internal();
@@ -28544,6 +20934,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SourceBufferList
 class SourceBufferList extends EventTarget implements List<SourceBuffer> {
   SourceBufferList.internal(): super.internal();
@@ -28566,7 +20957,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SourceBuffer>(this);
+    return new FixedSizeListIterator<SourceBuffer>(this);
   }
 
   // From Collection<SourceBuffer>:
@@ -28658,6 +21049,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLSourceElement
 class SourceElement extends _Element_Merged {
 
@@ -28695,6 +21087,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLSpanElement
 class SpanElement extends _Element_Merged {
 
@@ -28708,6 +21101,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechGrammar
 class SpeechGrammar extends NativeFieldWrapperClass1 {
 
@@ -28737,6 +21131,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechGrammarList
 class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechGrammar> {
 
@@ -28761,7 +21156,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechGrammar>(this);
+    return new FixedSizeListIterator<SpeechGrammar>(this);
   }
 
   // From Collection<SpeechGrammar>:
@@ -28873,6 +21268,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechInputEvent
 class SpeechInputEvent extends Event {
   SpeechInputEvent.internal(): super.internal();
@@ -28888,6 +21284,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechInputResult
 class SpeechInputResult extends NativeFieldWrapperClass1 {
   SpeechInputResult.internal();
@@ -28907,6 +21304,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognition
 class SpeechRecognition extends EventTarget {
 
@@ -29016,6 +21414,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognitionAlternative
 class SpeechRecognitionAlternative extends NativeFieldWrapperClass1 {
   SpeechRecognitionAlternative.internal();
@@ -29035,6 +21434,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognitionError
 class SpeechRecognitionError extends Event {
   SpeechRecognitionError.internal(): super.internal();
@@ -29072,6 +21472,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognitionEvent
 class SpeechRecognitionEvent extends Event {
   SpeechRecognitionEvent.internal(): super.internal();
@@ -29095,6 +21496,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognitionResult
 class SpeechRecognitionResult extends NativeFieldWrapperClass1 {
   SpeechRecognitionResult.internal();
@@ -29120,6 +21522,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class Storage extends NativeFieldWrapperClass1 implements Map<String, String>  {
 
   // TODO(nweiz): update this when maps support lazy iteration
@@ -29201,6 +21604,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName StorageEvent
 class StorageEvent extends Event {
   StorageEvent.internal(): super.internal();
@@ -29236,6 +21640,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName StorageInfo
 class StorageInfo extends NativeFieldWrapperClass1 {
   StorageInfo.internal();
@@ -29291,6 +21696,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLStyleElement
 class StyleElement extends _Element_Merged {
 
@@ -29340,6 +21746,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName StyleMedia
 class StyleMedia extends NativeFieldWrapperClass1 {
   StyleMedia.internal();
@@ -29359,6 +21766,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName StyleSheet
 class StyleSheet extends NativeFieldWrapperClass1 {
   StyleSheet.internal();
@@ -29402,6 +21810,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableCaptionElement
 class TableCaptionElement extends _Element_Merged {
 
@@ -29423,6 +21832,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableCellElement
 class TableCellElement extends _Element_Merged {
 
@@ -29552,6 +21962,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableColElement
 class TableColElement extends _Element_Merged {
 
@@ -29613,6 +22024,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableElement
 class TableElement extends _Element_Merged {
 
@@ -29766,6 +22178,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableRowElement
 class TableRowElement extends _Element_Merged {
 
@@ -29839,6 +22252,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTableSectionElement
 class TableSectionElement extends _Element_Merged {
   TableSectionElement.internal(): super.internal();
@@ -29894,6 +22308,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class Text extends CharacterData {
   factory Text(String data) => _TextFactoryProvider.createText(data);
   Text.internal(): super.internal();
@@ -29917,6 +22332,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTextAreaElement
 class TextAreaElement extends _Element_Merged {
 
@@ -30134,6 +22550,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextEvent
 class TextEvent extends UIEvent {
   TextEvent.internal(): super.internal();
@@ -30153,6 +22570,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextMetrics
 class TextMetrics extends NativeFieldWrapperClass1 {
   TextMetrics.internal();
@@ -30168,6 +22586,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextTrack
 class TextTrack extends EventTarget {
   TextTrack.internal(): super.internal();
@@ -30239,6 +22658,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextTrackCue
 class TextTrackCue extends EventTarget {
 
@@ -30374,6 +22794,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextTrackCueList
 class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrackCue> {
   TextTrackCueList.internal();
@@ -30396,7 +22817,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<TextTrackCue>(this);
+    return new FixedSizeListIterator<TextTrackCue>(this);
   }
 
   // From Collection<TextTrackCue>:
@@ -30480,6 +22901,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TextTrackList
 class TextTrackList extends EventTarget implements List<TextTrack> {
   TextTrackList.internal(): super.internal();
@@ -30508,7 +22930,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<TextTrack>(this);
+    return new FixedSizeListIterator<TextTrack>(this);
   }
 
   // From Collection<TextTrack>:
@@ -30606,6 +23028,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TimeRanges
 class TimeRanges extends NativeFieldWrapperClass1 {
   TimeRanges.internal();
@@ -30637,6 +23060,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTitleElement
 class TitleElement extends _Element_Merged {
 
@@ -30650,6 +23074,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Touch
 class Touch extends NativeFieldWrapperClass1 {
   Touch.internal();
@@ -30709,6 +23134,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TouchEvent
 class TouchEvent extends UIEvent {
   TouchEvent.internal(): super.internal();
@@ -30752,6 +23178,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TouchList
 class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
   TouchList.internal();
@@ -30774,7 +23201,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Touch>(this);
+    return new FixedSizeListIterator<Touch>(this);
   }
 
   // From Collection<Touch>:
@@ -30854,6 +23281,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLTrackElement
 class TrackElement extends _Element_Merged {
 
@@ -30923,6 +23351,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TrackEvent
 class TrackEvent extends Event {
   TrackEvent.internal(): super.internal();
@@ -30938,6 +23367,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitTransitionEvent
 class TransitionEvent extends Event {
   TransitionEvent.internal(): super.internal();
@@ -30957,6 +23387,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName TreeWalker
 class TreeWalker extends NativeFieldWrapperClass1 {
   TreeWalker.internal();
@@ -31020,6 +23451,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName UIEvent
 class UIEvent extends Event {
   UIEvent.internal(): super.internal();
@@ -31071,6 +23503,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLUListElement
 class UListElement extends _Element_Merged {
 
@@ -31100,6 +23533,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Uint16Array
 class Uint16Array extends ArrayBufferView implements List<int> {
 
@@ -31135,7 +23569,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -31230,6 +23664,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Uint32Array
 class Uint32Array extends ArrayBufferView implements List<int> {
 
@@ -31265,7 +23700,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -31360,6 +23795,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Uint8Array
 class Uint8Array extends ArrayBufferView implements List<int> {
 
@@ -31395,7 +23831,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<int>(this);
+    return new FixedSizeListIterator<int>(this);
   }
 
   // From Collection<int>:
@@ -31490,6 +23926,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Uint8ClampedArray
 class Uint8ClampedArray extends Uint8Array {
 
@@ -31541,6 +23978,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLUnknownElement
 class UnknownElement extends _Element_Merged {
   UnknownElement.internal(): super.internal();
@@ -31552,6 +23990,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName URL
 class Url extends NativeFieldWrapperClass1 {
   Url.internal();
@@ -31592,6 +24031,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ValidityState
 class ValidityState extends NativeFieldWrapperClass1 {
   ValidityState.internal();
@@ -31639,6 +24079,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName HTMLVideoElement
 class VideoElement extends MediaElement {
 
@@ -31724,6 +24165,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WaveShaperNode
 class WaveShaperNode extends AudioNode {
   WaveShaperNode.internal(): super.internal();
@@ -31743,6 +24185,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WaveTable
 class WaveTable extends NativeFieldWrapperClass1 {
   WaveTable.internal();
@@ -31754,6 +24197,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLActiveInfo
 class WebGLActiveInfo extends NativeFieldWrapperClass1 {
   WebGLActiveInfo.internal();
@@ -31777,6 +24221,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLBuffer
 class WebGLBuffer extends NativeFieldWrapperClass1 {
   WebGLBuffer.internal();
@@ -31788,6 +24233,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLCompressedTextureS3TC
 class WebGLCompressedTextureS3TC extends NativeFieldWrapperClass1 {
   WebGLCompressedTextureS3TC.internal();
@@ -31807,6 +24253,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLContextAttributes
 class WebGLContextAttributes extends NativeFieldWrapperClass1 {
   WebGLContextAttributes.internal();
@@ -31866,6 +24313,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLContextEvent
 class WebGLContextEvent extends Event {
   WebGLContextEvent.internal(): super.internal();
@@ -31881,6 +24329,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLDebugRendererInfo
 class WebGLDebugRendererInfo extends NativeFieldWrapperClass1 {
   WebGLDebugRendererInfo.internal();
@@ -31896,6 +24345,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLDebugShaders
 class WebGLDebugShaders extends NativeFieldWrapperClass1 {
   WebGLDebugShaders.internal();
@@ -31911,6 +24361,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLDepthTexture
 class WebGLDepthTexture extends NativeFieldWrapperClass1 {
   WebGLDepthTexture.internal();
@@ -31924,6 +24375,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLFramebuffer
 class WebGLFramebuffer extends NativeFieldWrapperClass1 {
   WebGLFramebuffer.internal();
@@ -31935,6 +24387,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLLoseContext
 class WebGLLoseContext extends NativeFieldWrapperClass1 {
   WebGLLoseContext.internal();
@@ -31954,6 +24407,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLProgram
 class WebGLProgram extends NativeFieldWrapperClass1 {
   WebGLProgram.internal();
@@ -31965,6 +24419,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLRenderbuffer
 class WebGLRenderbuffer extends NativeFieldWrapperClass1 {
   WebGLRenderbuffer.internal();
@@ -31976,6 +24431,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLRenderingContext
 class WebGLRenderingContext extends CanvasRenderingContext {
   WebGLRenderingContext.internal(): super.internal();
@@ -33253,6 +25709,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLShader
 class WebGLShader extends NativeFieldWrapperClass1 {
   WebGLShader.internal();
@@ -33264,6 +25721,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLShaderPrecisionFormat
 class WebGLShaderPrecisionFormat extends NativeFieldWrapperClass1 {
   WebGLShaderPrecisionFormat.internal();
@@ -33287,6 +25745,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLTexture
 class WebGLTexture extends NativeFieldWrapperClass1 {
   WebGLTexture.internal();
@@ -33298,6 +25757,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLUniformLocation
 class WebGLUniformLocation extends NativeFieldWrapperClass1 {
   WebGLUniformLocation.internal();
@@ -33309,6 +25769,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebGLVertexArrayObjectOES
 class WebGLVertexArrayObjectOES extends NativeFieldWrapperClass1 {
   WebGLVertexArrayObjectOES.internal();
@@ -33320,6 +25781,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitCSSFilterValue
 class WebKitCSSFilterValue extends _CSSValueList {
   WebKitCSSFilterValue.internal(): super.internal();
@@ -33359,6 +25821,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitNamedFlow
 class WebKitNamedFlow extends EventTarget {
   WebKitNamedFlow.internal(): super.internal();
@@ -33406,6 +25869,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 class WebSocket extends EventTarget {
   factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url);
   WebSocket.internal(): super.internal();
@@ -33513,6 +25977,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class WheelEvent extends MouseEvent {
   WheelEvent.internal(): super.internal();
 
@@ -33547,6 +26012,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName Worker
 class Worker extends AbstractWorker {
 
@@ -33580,6 +26046,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WorkerContext
 class WorkerContext extends EventTarget {
   WorkerContext.internal(): super.internal();
@@ -33691,6 +26158,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WorkerLocation
 class WorkerLocation extends NativeFieldWrapperClass1 {
   WorkerLocation.internal();
@@ -33738,6 +26206,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WorkerNavigator
 class WorkerNavigator extends NativeFieldWrapperClass1 {
   WorkerNavigator.internal();
@@ -33769,6 +26238,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XMLSerializer
 class XMLSerializer extends NativeFieldWrapperClass1 {
 
@@ -33786,6 +26256,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XPathEvaluator
 class XPathEvaluator extends NativeFieldWrapperClass1 {
 
@@ -33811,6 +26282,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XPathException
 class XPathException extends NativeFieldWrapperClass1 {
   XPathException.internal();
@@ -33842,6 +26314,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XPathExpression
 class XPathExpression extends NativeFieldWrapperClass1 {
   XPathExpression.internal();
@@ -33857,6 +26330,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XPathNSResolver
 class XPathNSResolver extends NativeFieldWrapperClass1 {
   XPathNSResolver.internal();
@@ -33872,6 +26346,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XPathResult
 class XPathResult extends NativeFieldWrapperClass1 {
   XPathResult.internal();
@@ -33939,6 +26414,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName XSLTProcessor
 class XSLTProcessor extends NativeFieldWrapperClass1 {
 
@@ -33982,6 +26458,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _ArrayBufferFactoryProvider {
   static ArrayBuffer createArrayBuffer(int length) native "ArrayBuffer_constructor_Callback";
 }
@@ -33989,6 +26466,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _AudioElementFactoryProvider {
   static AudioElement createAudioElement([String src]) native "HTMLAudioElement_constructor_Callback";
 }
@@ -33996,6 +26474,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _BlobFactoryProvider {
   static Blob createBlob(List blobParts, [String type, String endings]) native "Blob_constructor_Callback";
 }
@@ -34003,6 +26482,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _CSSMatrixFactoryProvider {
   static CSSMatrix createCSSMatrix([String cssValue]) native "WebKitCSSMatrix_constructor_Callback";
 }
@@ -34012,6 +26492,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSRuleList
 class _CSSRuleList extends NativeFieldWrapperClass1 implements List<CSSRule> {
   _CSSRuleList.internal();
@@ -34034,7 +26515,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<CSSRule>(this);
+    return new FixedSizeListIterator<CSSRule>(this);
   }
 
   // From Collection<CSSRule>:
@@ -34114,6 +26595,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName CSSValueList
 class _CSSValueList extends CSSValue implements List<CSSValue> {
   _CSSValueList.internal(): super.internal();
@@ -34136,7 +26618,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<CSSValue>(this);
+    return new FixedSizeListIterator<CSSValue>(this);
   }
 
   // From Collection<CSSValue>:
@@ -34216,6 +26698,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName ClientRectList
 class _ClientRectList extends NativeFieldWrapperClass1 implements List<ClientRect> {
   _ClientRectList.internal();
@@ -34238,7 +26721,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<ClientRect>(this);
+    return new FixedSizeListIterator<ClientRect>(this);
   }
 
   // From Collection<ClientRect>:
@@ -34316,6 +26799,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _DOMParserFactoryProvider {
   static DOMParser createDOMParser() native "DOMParser_constructor_Callback";
 }
@@ -34325,6 +26809,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName DOMStringList
 class _DOMStringList extends NativeFieldWrapperClass1 implements List<String> {
   _DOMStringList.internal();
@@ -34347,7 +26832,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<String>(this);
+    return new FixedSizeListIterator<String>(this);
   }
 
   // From Collection<String>:
@@ -34429,6 +26914,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _DataViewFactoryProvider {
   static DataView createDataView(ArrayBuffer buffer, [int byteOffset, int byteLength]) native "DataView_constructor_Callback";
 }
@@ -34438,20 +26924,6 @@
 
 // WARNING: Do not edit - generated code.
 
-/// @domName HTMLDocument
-class _Document_Merged extends Document {
-  _Document_Merged.internal(): super.internal();
-
-
-  /** @domName HTMLDocument.activeElement */
-  Element get activeElement native "HTMLDocument_activeElement_Getter";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
 
 /// @domName HTMLElement
 class _Element_Merged extends Element {
@@ -34893,6 +27365,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EntryArray
 class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
   _EntryArray.internal();
@@ -34915,7 +27388,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Entry>(this);
+    return new FixedSizeListIterator<Entry>(this);
   }
 
   // From Collection<Entry>:
@@ -34995,6 +27468,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName EntryArraySync
 class _EntryArraySync extends NativeFieldWrapperClass1 implements List<EntrySync> {
   _EntryArraySync.internal();
@@ -35017,7 +27491,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<EntrySync>(this);
+    return new FixedSizeListIterator<EntrySync>(this);
   }
 
   // From Collection<EntrySync>:
@@ -35095,6 +27569,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _EventSourceFactoryProvider {
   static EventSource createEventSource(String scriptUrl) native "EventSource_constructor_Callback";
 }
@@ -35104,6 +27579,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName FileList
 class _FileList extends NativeFieldWrapperClass1 implements List<File> {
   _FileList.internal();
@@ -35126,7 +27602,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<File>(this);
+    return new FixedSizeListIterator<File>(this);
   }
 
   // From Collection<File>:
@@ -35204,6 +27680,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FileReaderFactoryProvider {
   static FileReader createFileReader() native "FileReader_constructor_Callback";
 }
@@ -35211,6 +27688,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FileReaderSyncFactoryProvider {
   static FileReaderSync createFileReaderSync() native "FileReaderSync_constructor_Callback";
 }
@@ -35218,6 +27696,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _FormDataFactoryProvider {
   static FormData createFormData([FormElement form]) native "DOMFormData_constructor_Callback";
 }
@@ -35227,6 +27706,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName GamepadList
 class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
   _GamepadList.internal();
@@ -35249,7 +27729,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Gamepad>(this);
+    return new FixedSizeListIterator<Gamepad>(this);
   }
 
   // From Collection<Gamepad>:
@@ -35327,6 +27807,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _HttpRequestFactoryProvider {
   static HttpRequest createHttpRequest() => _createHttpRequest();
   static HttpRequest _createHttpRequest() native "XMLHttpRequest_constructor_Callback";
@@ -35343,6 +27824,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _IceCandidateFactoryProvider {
   static IceCandidate createIceCandidate(String label, String candidateLine) native "IceCandidate_constructor_Callback";
 }
@@ -35350,6 +27832,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaControllerFactoryProvider {
   static MediaController createMediaController() native "MediaController_constructor_Callback";
 }
@@ -35357,6 +27840,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaSourceFactoryProvider {
   static MediaSource createMediaSource() native "MediaSource_constructor_Callback";
 }
@@ -35364,6 +27848,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MediaStreamFactoryProvider {
   static MediaStream createMediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks) native "MediaStream_constructor_Callback";
 }
@@ -35373,6 +27858,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName MediaStreamList
 class _MediaStreamList extends NativeFieldWrapperClass1 implements List<MediaStream> {
   _MediaStreamList.internal();
@@ -35395,7 +27881,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<MediaStream>(this);
+    return new FixedSizeListIterator<MediaStream>(this);
   }
 
   // From Collection<MediaStream>:
@@ -35473,6 +27959,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MessageChannelFactoryProvider {
   static MessageChannel createMessageChannel() native "MessageChannel_constructor_Callback";
 }
@@ -35480,6 +27967,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _MutationObserverFactoryProvider {
   static MutationObserver createMutationObserver(MutationCallback callback) native "MutationObserver_constructor_Callback";
 }
@@ -35487,6 +27975,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _NotificationFactoryProvider {
   static Notification createNotification(String title, [Map options]) native "Notification_constructor_Callback";
 }
@@ -35494,6 +27983,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _OptionElementFactoryProvider {
   static OptionElement createOptionElement([String data, String value, bool defaultSelected, bool selected]) native "HTMLOptionElement_constructor_Callback";
 }
@@ -35501,6 +27991,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _PeerConnection00FactoryProvider {
   static PeerConnection00 createPeerConnection00(String serverConfiguration, IceCallback iceCallback) native "PeerConnection00_constructor_Callback";
 }
@@ -35508,6 +27999,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCIceCandidateFactoryProvider {
   static RTCIceCandidate createRTCIceCandidate(Map dictionary) native "RTCIceCandidate_constructor_Callback";
 }
@@ -35515,6 +28007,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCPeerConnectionFactoryProvider {
   static RTCPeerConnection createRTCPeerConnection(Map rtcIceServers, [Map mediaConstraints]) native "RTCPeerConnection_constructor_Callback";
 }
@@ -35522,6 +28015,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _RTCSessionDescriptionFactoryProvider {
   static RTCSessionDescription createRTCSessionDescription(Map dictionary) native "RTCSessionDescription_constructor_Callback";
 }
@@ -35529,107 +28023,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// WARNING: Do not edit - generated code.
-
-/// @domName SVGElementInstanceList
-class _SVGElementInstanceList extends NativeFieldWrapperClass1 implements List<SVGElementInstance> {
-  _SVGElementInstanceList.internal();
-
-
-  /** @domName SVGElementInstanceList.length */
-  int get length native "SVGElementInstanceList_length_Getter";
-
-  SVGElementInstance operator[](int index) native "SVGElementInstanceList_item_Callback";
-
-  void operator[]=(int index, SVGElementInstance value) {
-    throw new UnsupportedError("Cannot assign element of immutable List.");
-  }
-  // -- start List<SVGElementInstance> mixins.
-  // SVGElementInstance is the element type.
-
-  // From Iterable<SVGElementInstance>:
-
-  Iterator<SVGElementInstance> iterator() {
-    // Note: NodeLists are not fixed size. And most probably length shouldn't
-    // be cached in both iterator _and_ forEach method. For now caching it
-    // for consistency.
-    return new _FixedSizeListIterator<SVGElementInstance>(this);
-  }
-
-  // From Collection<SVGElementInstance>:
-
-  void add(SVGElementInstance value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addLast(SVGElementInstance value) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  void addAll(Collection<SVGElementInstance> collection) {
-    throw new UnsupportedError("Cannot add to immutable List.");
-  }
-
-  bool contains(SVGElementInstance element) => _Collections.contains(this, element);
-
-  void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f);
-
-  Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f);
-
-  Collection<SVGElementInstance> filter(bool f(SVGElementInstance element)) =>
-     _Collections.filter(this, <SVGElementInstance>[], f);
-
-  bool every(bool f(SVGElementInstance element)) => _Collections.every(this, f);
-
-  bool some(bool f(SVGElementInstance element)) => _Collections.some(this, f);
-
-  bool get isEmpty => this.length == 0;
-
-  // From List<SVGElementInstance>:
-
-  void sort([Comparator<SVGElementInstance> compare = Comparable.compare]) {
-    throw new UnsupportedError("Cannot sort immutable List.");
-  }
-
-  int indexOf(SVGElementInstance element, [int start = 0]) =>
-      _Lists.indexOf(this, element, start, this.length);
-
-  int lastIndexOf(SVGElementInstance element, [int start]) {
-    if (start == null) start = length - 1;
-    return _Lists.lastIndexOf(this, element, start);
-  }
-
-  SVGElementInstance get last => this[length - 1];
-
-  SVGElementInstance removeLast() {
-    throw new UnsupportedError("Cannot removeLast on immutable List.");
-  }
-
-  void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
-    throw new UnsupportedError("Cannot setRange on immutable List.");
-  }
-
-  void removeRange(int start, int rangeLength) {
-    throw new UnsupportedError("Cannot removeRange on immutable List.");
-  }
-
-  void insertRange(int start, int rangeLength, [SVGElementInstance initialValue]) {
-    throw new UnsupportedError("Cannot insertRange on immutable List.");
-  }
-
-  List<SVGElementInstance> getRange(int start, int rangeLength) =>
-      _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
-
-  // -- end List<SVGElementInstance> mixins.
-
-
-  /** @domName SVGElementInstanceList.item */
-  SVGElementInstance item(int index) native "SVGElementInstanceList_item_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for 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 _SessionDescriptionFactoryProvider {
   static SessionDescription createSessionDescription(String sdp) native "SessionDescription_constructor_Callback";
@@ -35638,6 +28031,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _ShadowRootFactoryProvider {
   static ShadowRoot createShadowRoot(Element host) native "ShadowRoot_constructor_Callback";
 }
@@ -35645,6 +28039,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SharedWorkerFactoryProvider {
   static SharedWorker createSharedWorker(String scriptURL, [String name]) native "SharedWorker_constructor_Callback";
 }
@@ -35652,6 +28047,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechGrammarFactoryProvider {
   static SpeechGrammar createSpeechGrammar() native "SpeechGrammar_constructor_Callback";
 }
@@ -35659,6 +28055,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechGrammarListFactoryProvider {
   static SpeechGrammarList createSpeechGrammarList() native "SpeechGrammarList_constructor_Callback";
 }
@@ -35668,6 +28065,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechInputResultList
 class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<SpeechInputResult> {
   _SpeechInputResultList.internal();
@@ -35690,7 +28088,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechInputResult>(this);
+    return new FixedSizeListIterator<SpeechInputResult>(this);
   }
 
   // From Collection<SpeechInputResult>:
@@ -35768,6 +28166,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _SpeechRecognitionFactoryProvider {
   static SpeechRecognition createSpeechRecognition() native "SpeechRecognition_constructor_Callback";
 }
@@ -35777,6 +28176,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName SpeechRecognitionResultList
 class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements List<SpeechRecognitionResult> {
   _SpeechRecognitionResultList.internal();
@@ -35799,7 +28199,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<SpeechRecognitionResult>(this);
+    return new FixedSizeListIterator<SpeechRecognitionResult>(this);
   }
 
   // From Collection<SpeechRecognitionResult>:
@@ -35879,6 +28279,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName StyleSheetList
 class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleSheet> {
   _StyleSheetList.internal();
@@ -35901,7 +28302,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<StyleSheet>(this);
+    return new FixedSizeListIterator<StyleSheet>(this);
   }
 
   // From Collection<StyleSheet>:
@@ -35979,6 +28380,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _TextTrackCueFactoryProvider {
   static TextTrackCue createTextTrackCue(num startTime, num endTime, String text) native "TextTrackCue_constructor_Callback";
 }
@@ -35988,6 +28390,7 @@
 
 // WARNING: Do not edit - generated code.
 
+
 /// @domName WebKitAnimationList
 class _WebKitAnimationList extends NativeFieldWrapperClass1 implements List<Animation> {
   _WebKitAnimationList.internal();
@@ -36010,7 +28413,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Animation>(this);
+    return new FixedSizeListIterator<Animation>(this);
   }
 
   // From Collection<Animation>:
@@ -36088,6 +28491,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _WorkerFactoryProvider {
   static Worker createWorker(String scriptUrl) native "Worker_constructor_Callback";
 }
@@ -36095,6 +28499,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XMLSerializerFactoryProvider {
   static XMLSerializer createXMLSerializer() native "XMLSerializer_constructor_Callback";
 }
@@ -36102,6 +28507,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XPathEvaluatorFactoryProvider {
   static XPathEvaluator createXPathEvaluator() native "XPathEvaluator_constructor_Callback";
 }
@@ -36109,6 +28515,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _XSLTProcessorFactoryProvider {
   static XSLTProcessor createXSLTProcessor() native "XSLTProcessor_constructor_Callback";
 }
@@ -36116,6 +28523,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.
 
+
 abstract class Window {
   // Fields.
   Location get location;
@@ -36142,15 +28550,244 @@
   void forward();
   void go(int distance);
 }
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+abstract class CssClassSet implements Set<String> {
+
+  String toString() {
+    return Strings.join(new List.from(readClasses()), ' ');
+  }
+
+  /**
+   * Adds the class [token] to the element if it is not on it, removes it if it
+   * is.
+   */
+  bool toggle(String value) {
+    Set<String> s = readClasses();
+    bool result = false;
+    if (s.contains(value)) {
+      s.remove(value);
+    } else {
+      s.add(value);
+      result = true;
+    }
+    writeClasses(s);
+    return result;
+  }
+
+  /**
+   * Returns [:true:] if classes cannot be added or removed from this
+   * [:CssClassSet:].
+   */
+  bool get frozen => false;
+
+  // interface Iterable - BEGIN
+  Iterator<String> iterator() => readClasses().iterator();
+  // interface Iterable - END
+
+  // interface Collection - BEGIN
+  void forEach(void f(String element)) {
+    readClasses().forEach(f);
+  }
+
+  Collection map(f(String element)) => readClasses().map(f);
+
+  Collection<String> filter(bool f(String element)) => readClasses().filter(f);
+
+  bool every(bool f(String element)) => readClasses().every(f);
+
+  bool some(bool f(String element)) => readClasses().some(f);
+
+  bool get isEmpty => readClasses().isEmpty;
+
+  int get length =>readClasses().length;
+  // interface Collection - END
+
+  // interface Set - BEGIN
+  bool contains(String value) => readClasses().contains(value);
+
+  void add(String value) {
+    // TODO - figure out if we need to do any validation here
+    // or if the browser natively does enough
+    _modify((s) => s.add(value));
+  }
+
+  bool remove(String value) {
+    Set<String> s = readClasses();
+    bool result = s.remove(value);
+    writeClasses(s);
+    return result;
+  }
+
+  void addAll(Collection<String> collection) {
+    // TODO - see comment above about validation
+    _modify((s) => s.addAll(collection));
+  }
+
+  void removeAll(Collection<String> collection) {
+    _modify((s) => s.removeAll(collection));
+  }
+
+  bool isSubsetOf(Collection<String> collection) =>
+    readClasses().isSubsetOf(collection);
+
+  bool containsAll(Collection<String> collection) =>
+    readClasses().containsAll(collection);
+
+  Set<String> intersection(Collection<String> other) =>
+    readClasses().intersection(other);
+
+  void clear() {
+    _modify((s) => s.clear());
+  }
+  // interface Set - END
+
+  /**
+   * Helper method used to modify the set of css classes on this element.
+   *
+   *   f - callback with:
+   *      s - a Set of all the css class name currently on this element.
+   *
+   *   After f returns, the modified set is written to the
+   *       className property of this element.
+   */
+  void _modify( f(Set<String> s)) {
+    Set<String> s = readClasses();
+    f(s);
+    writeClasses(s);
+  }
+
+  /**
+   * Read the class names from the Element class property,
+   * and put them into a set (duplicates are discarded).
+   * This is intended to be overridden by specific implementations.
+   */
+  Set<String> readClasses();
+
+  /**
+   * Join all the elements of a set into one string and write
+   * back to the element.
+   * This is intended to be overridden by specific implementations.
+   */
+  void writeClasses(Set<String> s);
+}
 // 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.
 
+
 typedef void EventListener(Event event);
+// 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.
+
+
+class FilteredElementList implements List {
+  final Node _node;
+  final List<Node> _childNodes;
+
+  FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
+
+  // We can't memoize this, since it's possible that children will be messed
+  // with externally to this class.
+  //
+  // TODO(nweiz): Do we really need to copy the list to make the types work out?
+  List<Element> get _filtered =>
+    new List.from(_childNodes.filter((n) => n is Element));
+
+  void forEach(void f(Element element)) {
+    _filtered.forEach(f);
+  }
+
+  void operator []=(int index, Element value) {
+    this[index].replaceWith(value);
+  }
+
+  void set length(int newLength) {
+    final len = this.length;
+    if (newLength >= len) {
+      return;
+    } else if (newLength < 0) {
+      throw new ArgumentError("Invalid list length");
+    }
+
+    removeRange(newLength - 1, len - newLength);
+  }
+
+  void add(Element value) {
+    _childNodes.add(value);
+  }
+
+  void addAll(Collection<Element> collection) {
+    collection.forEach(add);
+  }
+
+  void addLast(Element value) {
+    add(value);
+  }
+
+  bool contains(Element element) {
+    return element is Element && _childNodes.contains(element);
+  }
+
+  void sort([Comparator<Element> compare = Comparable.compare]) {
+    throw new UnsupportedError('TODO(jacobr): should we impl?');
+  }
+
+  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
+    throw new UnimplementedError();
+  }
+
+  void removeRange(int start, int rangeLength) {
+    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
+  }
+
+  void insertRange(int start, int rangeLength, [initialValue = null]) {
+    throw new UnimplementedError();
+  }
+
+  void clear() {
+    // Currently, ElementList#clear clears even non-element nodes, so we follow
+    // that behavior.
+    _childNodes.clear();
+  }
+
+  Element removeLast() {
+    final result = this.last;
+    if (result != null) {
+      result.remove();
+    }
+    return result;
+  }
+
+  Collection map(f(Element element)) => _filtered.map(f);
+  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
+  bool every(bool f(Element element)) => _filtered.every(f);
+  bool some(bool f(Element element)) => _filtered.some(f);
+  bool get isEmpty => _filtered.isEmpty;
+  int get length => _filtered.length;
+  Element operator [](int index) => _filtered[index];
+  Iterator<Element> iterator() => _filtered.iterator();
+  List<Element> getRange(int start, int rangeLength) =>
+    _filtered.getRange(start, rangeLength);
+  int indexOf(Element element, [int start = 0]) =>
+    _filtered.indexOf(element, start);
+
+  int lastIndexOf(Element element, [int start = null]) {
+    if (start == null) start = length - 1;
+    return _filtered.lastIndexOf(element, start);
+  }
+
+  Element get last => _filtered.last;
+}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 /**
  * Defines the keycode values for keys that are returned by 
  * KeyboardEvent.keyCode.
@@ -36163,190 +28800,191 @@
   // These constant names were borrowed from Closure's Keycode enumeration
   // class.
   // http://closure-library.googlecode.com/svn/docs/closure_goog_events_keycodes.js.source.html  
-  static final int WIN_KEY_FF_LINUX = 0;
-  static final int MAC_ENTER = 3;
-  static final int BACKSPACE = 8;
-  static final int TAB = 9;
+  static const int WIN_KEY_FF_LINUX = 0;
+  static const int MAC_ENTER = 3;
+  static const int BACKSPACE = 8;
+  static const int TAB = 9;
   /** NUM_CENTER is also NUMLOCK for FF and Safari on Mac. */
-  static final int NUM_CENTER = 12;
-  static final int ENTER = 13;
-  static final int SHIFT = 16;
-  static final int CTRL = 17;
-  static final int ALT = 18;
-  static final int PAUSE = 19;
-  static final int CAPS_LOCK = 20;
-  static final int ESC = 27;
-  static final int SPACE = 32;
-  static final int PAGE_UP = 33;
-  static final int PAGE_DOWN = 34;
-  static final int END = 35;
-  static final int HOME = 36;
-  static final int LEFT = 37;
-  static final int UP = 38;
-  static final int RIGHT = 39;
-  static final int DOWN = 40;
-  static final int NUM_NORTH_EAST = 33;
-  static final int NUM_SOUTH_EAST = 34;
-  static final int NUM_SOUTH_WEST = 35;
-  static final int NUM_NORTH_WEST = 36;
-  static final int NUM_WEST = 37;
-  static final int NUM_NORTH = 38;
-  static final int NUM_EAST = 39;
-  static final int NUM_SOUTH = 40;
-  static final int PRINT_SCREEN = 44;
-  static final int INSERT = 45;
-  static final int NUM_INSERT = 45;
-  static final int DELETE = 46;
-  static final int NUM_DELETE = 46;
-  static final int ZERO = 48;
-  static final int ONE = 49;
-  static final int TWO = 50;
-  static final int THREE = 51;
-  static final int FOUR = 52;
-  static final int FIVE = 53;
-  static final int SIX = 54;
-  static final int SEVEN = 55;
-  static final int EIGHT = 56;
-  static final int NINE = 57;
-  static final int FF_SEMICOLON = 59;
-  static final int FF_EQUALS = 61;
+  static const int NUM_CENTER = 12;
+  static const int ENTER = 13;
+  static const int SHIFT = 16;
+  static const int CTRL = 17;
+  static const int ALT = 18;
+  static const int PAUSE = 19;
+  static const int CAPS_LOCK = 20;
+  static const int ESC = 27;
+  static const int SPACE = 32;
+  static const int PAGE_UP = 33;
+  static const int PAGE_DOWN = 34;
+  static const int END = 35;
+  static const int HOME = 36;
+  static const int LEFT = 37;
+  static const int UP = 38;
+  static const int RIGHT = 39;
+  static const int DOWN = 40;
+  static const int NUM_NORTH_EAST = 33;
+  static const int NUM_SOUTH_EAST = 34;
+  static const int NUM_SOUTH_WEST = 35;
+  static const int NUM_NORTH_WEST = 36;
+  static const int NUM_WEST = 37;
+  static const int NUM_NORTH = 38;
+  static const int NUM_EAST = 39;
+  static const int NUM_SOUTH = 40;
+  static const int PRINT_SCREEN = 44;
+  static const int INSERT = 45;
+  static const int NUM_INSERT = 45;
+  static const int DELETE = 46;
+  static const int NUM_DELETE = 46;
+  static const int ZERO = 48;
+  static const int ONE = 49;
+  static const int TWO = 50;
+  static const int THREE = 51;
+  static const int FOUR = 52;
+  static const int FIVE = 53;
+  static const int SIX = 54;
+  static const int SEVEN = 55;
+  static const int EIGHT = 56;
+  static const int NINE = 57;
+  static const int FF_SEMICOLON = 59;
+  static const int FF_EQUALS = 61;
   /**
    * CAUTION: The question mark is for US-keyboard layouts. It varies
    * for other locales and keyboard layouts.
    */
-  static final int QUESTION_MARK = 63;
-  static final int A = 65;
-  static final int B = 66;
-  static final int C = 67;
-  static final int D = 68;
-  static final int E = 69;
-  static final int F = 70;
-  static final int G = 71;
-  static final int H = 72;
-  static final int I = 73;
-  static final int J = 74;
-  static final int K = 75;
-  static final int L = 76;
-  static final int M = 77;
-  static final int N = 78;
-  static final int O = 79;
-  static final int P = 80;
-  static final int Q = 81;
-  static final int R = 82;
-  static final int S = 83;
-  static final int T = 84;
-  static final int U = 85;
-  static final int V = 86;
-  static final int W = 87;
-  static final int X = 88;
-  static final int Y = 89;
-  static final int Z = 90;
-  static final int META = 91;
-  static final int WIN_KEY_LEFT = 91;
-  static final int WIN_KEY_RIGHT = 92;
-  static final int CONTEXT_MENU = 93;
-  static final int NUM_ZERO = 96;
-  static final int NUM_ONE = 97;
-  static final int NUM_TWO = 98;
-  static final int NUM_THREE = 99;
-  static final int NUM_FOUR = 100;
-  static final int NUM_FIVE = 101;
-  static final int NUM_SIX = 102;
-  static final int NUM_SEVEN = 103;
-  static final int NUM_EIGHT = 104;
-  static final int NUM_NINE = 105;
-  static final int NUM_MULTIPLY = 106;
-  static final int NUM_PLUS = 107;
-  static final int NUM_MINUS = 109;
-  static final int NUM_PERIOD = 110;
-  static final int NUM_DIVISION = 111;
-  static final int F1 = 112;
-  static final int F2 = 113;
-  static final int F3 = 114;
-  static final int F4 = 115;
-  static final int F5 = 116;
-  static final int F6 = 117;
-  static final int F7 = 118;
-  static final int F8 = 119;
-  static final int F9 = 120;
-  static final int F10 = 121;
-  static final int F11 = 122;
-  static final int F12 = 123;
-  static final int NUMLOCK = 144;
-  static final int SCROLL_LOCK = 145;
+  static const int QUESTION_MARK = 63;
+  static const int A = 65;
+  static const int B = 66;
+  static const int C = 67;
+  static const int D = 68;
+  static const int E = 69;
+  static const int F = 70;
+  static const int G = 71;
+  static const int H = 72;
+  static const int I = 73;
+  static const int J = 74;
+  static const int K = 75;
+  static const int L = 76;
+  static const int M = 77;
+  static const int N = 78;
+  static const int O = 79;
+  static const int P = 80;
+  static const int Q = 81;
+  static const int R = 82;
+  static const int S = 83;
+  static const int T = 84;
+  static const int U = 85;
+  static const int V = 86;
+  static const int W = 87;
+  static const int X = 88;
+  static const int Y = 89;
+  static const int Z = 90;
+  static const int META = 91;
+  static const int WIN_KEY_LEFT = 91;
+  static const int WIN_KEY_RIGHT = 92;
+  static const int CONTEXT_MENU = 93;
+  static const int NUM_ZERO = 96;
+  static const int NUM_ONE = 97;
+  static const int NUM_TWO = 98;
+  static const int NUM_THREE = 99;
+  static const int NUM_FOUR = 100;
+  static const int NUM_FIVE = 101;
+  static const int NUM_SIX = 102;
+  static const int NUM_SEVEN = 103;
+  static const int NUM_EIGHT = 104;
+  static const int NUM_NINE = 105;
+  static const int NUM_MULTIPLY = 106;
+  static const int NUM_PLUS = 107;
+  static const int NUM_MINUS = 109;
+  static const int NUM_PERIOD = 110;
+  static const int NUM_DIVISION = 111;
+  static const int F1 = 112;
+  static const int F2 = 113;
+  static const int F3 = 114;
+  static const int F4 = 115;
+  static const int F5 = 116;
+  static const int F6 = 117;
+  static const int F7 = 118;
+  static const int F8 = 119;
+  static const int F9 = 120;
+  static const int F10 = 121;
+  static const int F11 = 122;
+  static const int F12 = 123;
+  static const int NUMLOCK = 144;
+  static const int SCROLL_LOCK = 145;
 
   // OS-specific media keys like volume controls and browser controls.
-  static final int FIRST_MEDIA_KEY = 166;
-  static final int LAST_MEDIA_KEY = 183;
+  static const int FIRST_MEDIA_KEY = 166;
+  static const int LAST_MEDIA_KEY = 183;
 
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SEMICOLON = 186;
+  static const int SEMICOLON = 186;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int DASH = 189;
+  static const int DASH = 189;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int EQUALS = 187;
+  static const int EQUALS = 187;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int COMMA = 188;
+  static const int COMMA = 188;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int PERIOD = 190;
+  static const int PERIOD = 190;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SLASH = 191;
+  static const int SLASH = 191;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int APOSTROPHE = 192;
+  static const int APOSTROPHE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int TILDE = 192;
+  static const int TILDE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SINGLE_QUOTE = 222;
+  static const int SINGLE_QUOTE = 222;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int OPEN_SQUARE_BRACKET = 219;
+  static const int OPEN_SQUARE_BRACKET = 219;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int BACKSLASH = 220;
+  static const int BACKSLASH = 220;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int CLOSE_SQUARE_BRACKET = 221;
-  static final int WIN_KEY = 224;
-  static final int MAC_FF_META = 224;
-  static final int WIN_IME = 229;
+  static const int CLOSE_SQUARE_BRACKET = 221;
+  static const int WIN_KEY = 224;
+  static const int MAC_FF_META = 224;
+  static const int WIN_IME = 229;
 }
 // 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.
 
+
 /**
  * Defines the standard key locations returned by
  * KeyboardEvent.getKeyLocation.
@@ -36392,6 +29030,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 /**
  * Defines the standard keyboard identifier names for keys that are returned
  * by KeyEvent.getKeyboardIdentifier when the key does not have a direct
@@ -36885,6 +29524,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.
 
+
 /**
  * Contains the set of standard values returned by HTMLDocument.getReadyState.
  */
@@ -36909,6 +29549,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.
 
+
 // TODO(antonm): support not DOM isolates too.
 class _Timer implements Timer {
   final canceller;
@@ -36937,6 +29578,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.
 
+
 /**
  * The [Collections] class implements static methods useful when
  * writing a class that implements [Collection] and the [iterator]
@@ -36996,6 +29638,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _HttpRequestUtils {
 
   // Helper for factory HttpRequest.get
@@ -37024,6 +29667,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _CustomEventFactoryProvider {
   static CustomEvent createCustomEvent(String type, [bool canBubble = true,
       bool cancelable = true, Object detail = null]) {
@@ -37091,10 +29735,10 @@
   //   return fragment;
   // }
 
-  static DocumentFragment createDocumentFragment_svg(String svg) {
+  static DocumentFragment createDocumentFragment_svg(String svgContent) {
     final fragment = new DocumentFragment();
-    final e = new SVGSVGElement();
-    e.innerHTML = svg;
+    final e = new svg.SVGSVGElement();
+    e.innerHTML = svgContent;
 
     // Copy list first since we don't want liveness during iteration.
     final List nodes = new List.from(e.nodes);
@@ -37102,44 +29746,11 @@
     return fragment;
   }
 }
-
-class _SVGElementFactoryProvider {
-  static SVGElement createSVGElement_tag(String tag) {
-    final Element temp =
-      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
-    return temp;
-  }
-
-  static SVGElement createSVGElement_svg(String svg) {
-    Element parentTag;
-    final match = _START_TAG_REGEXP.firstMatch(svg);
-    if (match != null && match.group(1).toLowerCase() == 'svg') {
-      parentTag = new Element.tag('div');
-    } else {
-      parentTag = new SVGSVGElement();
-    }
-
-    parentTag.innerHTML = svg;
-    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
-
-    throw new ArgumentError(
-        'SVG had ${parentTag.elements.length} '
-        'top-level elements but 1 expected');
-  }
-}
-
-class _SVGSVGElementFactoryProvider {
-  static SVGSVGElement createSVGSVGElement() {
-    final el = new SVGElement.tag("svg");
-    // The SVG spec requires the version attribute to match the spec version
-    el.attributes['version'] = "1.1";
-    return el;
-  }
-}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for 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 _AudioContextFactoryProvider {
   static AudioContext createAudioContext() => _createAudioContext();
   static _createAudioContext([int numberOfChannels,
@@ -37225,9 +29836,9 @@
   static _U32(arg0, [arg1, arg2]) native "Uint32Array_constructor_Callback";
 
   static Uint8ClampedArray createUint8ClampedArray(int length) => _U8C(length);
-  static Uint8ClampedArray createUint8ClampedArrayUint8ClampedArray_fromList(
+  static Uint8ClampedArray createUint8ClampedArray_fromList(
       List<num> list) => _U8C(ensureNative(list));
-  static Uint8ClampedArray createUint8ClampedArrayUint8ClampedArray_fromBuffer(
+  static Uint8ClampedArray createUint8ClampedArray_fromBuffer(
       ArrayBuffer buffer, [int byteOffset = 0, int length]) =>
       _U8C(buffer, byteOffset, length);
   static _U8C(arg0, [arg1, arg2]) native "Uint8ClampedArray_constructor_Callback";
@@ -37252,6 +29863,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.
 
+
 /**
  * Utils for device detection.
  */
@@ -37287,6 +29899,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.
 
+
 _serialize(var message) {
   return new _JsSerializer().traverse(message);
 }
@@ -37487,6 +30100,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.
 
+
 typedef Object ComputeValue();
 
 class _MeasurementRequest<T> {
@@ -37688,6 +30302,7 @@
 
 // Patch file for the dart:isolate library.
 
+
 /********************************************************
   Inserted from lib/isolate/serialization.dart
  ********************************************************/
@@ -37732,11 +30347,11 @@
     return visitObject(x);
   }
 
-  abstract visitPrimitive(x);
-  abstract visitList(List x);
-  abstract visitMap(Map x);
-  abstract visitSendPort(SendPort x);
-  abstract visitSendPortSync(SendPortSync x);
+  visitPrimitive(x);
+  visitList(List x);
+  visitMap(Map x);
+  visitSendPort(SendPort x);
+  visitSendPortSync(SendPortSync x);
 
   visitObject(Object x) {
     // TODO(floitsch): make this a real exception. (which one)?
@@ -37887,7 +30502,7 @@
     return result;
   }
 
-  abstract deserializeSendPort(List x);
+  deserializeSendPort(List x);
 
   deserializeObject(List x) {
     // TODO(floitsch): Use real exception (which one?).
@@ -37899,6 +30514,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.
 
+
 /**
  * Checks to see if the mutation observer API is supported on the current
  * platform.
@@ -37910,6 +30526,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.
 
+
 // TODO(rnystrom): add a way to supress public classes from DartDoc output.
 // TODO(jacobr): we can remove this class now that we are using the $dom_
 // convention for deprecated methods rather than truly private methods.
@@ -37924,13 +30541,15 @@
     target.$dom_removeEventListener(type, listener, useCapture);
   }
 
-}// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+}
+// 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.
 
+
 // Iterator for arrays with fixed size.
-class _FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
-  _FixedSizeListIterator(List<T> array)
+class FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
+  FixedSizeListIterator(List<T> array)
       : super(array),
         _length = array.length;
 
@@ -37961,6 +30580,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _Lists {
 
   /**
@@ -38028,6 +30648,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.
 
+
 // This API is exploratory.
 spawnDomFunction(Function topLevelFunction) => _Utils.spawnDomFunctionImpl(topLevelFunction);
 
@@ -38057,6 +30678,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+
 class _Utils {
   static List convertToList(List list) {
     // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
diff --git a/sdk/lib/html/dartium/nativewrappers.dart b/sdk/lib/html/dartium/nativewrappers.dart
index 44ab39e..1837d2b 100644
--- a/sdk/lib/html/dartium/nativewrappers.dart
+++ b/sdk/lib/html/dartium/nativewrappers.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('nativewrappers');
+library nativewrappers;
 
 class NativeFieldWrapperClass1 {
 }
diff --git a/sdk/lib/html/idl/dart/dart.idl b/sdk/lib/html/idl/dart/dart.idl
index 9fa23a0..1c97468 100644
--- a/sdk/lib/html/idl/dart/dart.idl
+++ b/sdk/lib/html/idl/dart/dart.idl
@@ -36,7 +36,6 @@
   interface HTMLCanvasElement {
     [Suppressed] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] in DOMString type) raises(DOMException);
     [Custom] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] in DOMString type, [Optional] in float quality) raises(DOMException);
-
   };
 
   [Supplemental]
@@ -47,6 +46,9 @@
   [Supplemental]
   interface HTMLSelectElement {
     [Suppressed] void add([Optional=DefaultIsUndefined] in HTMLElement element, [Optional=DefaultIsUndefined] in HTMLElement before);
+    [Suppressed, Custom] void remove();
+    [Custom] void remove(in long index);
+    [Custom] void remove(in HTMLOptionElement option);
   };
 
   [Supplemental]
diff --git a/sdk/lib/html/scripts/dartdomgenerator.py b/sdk/lib/html/scripts/dartdomgenerator.py
index 68b4a25..18cba86 100755
--- a/sdk/lib/html/scripts/dartdomgenerator.py
+++ b/sdk/lib/html/scripts/dartdomgenerator.py
@@ -19,7 +19,7 @@
 from htmleventgenerator import HtmlEventGenerator
 from htmlrenamer import HtmlRenamer
 from systemhtml import DartLibraryEmitter, Dart2JSBackend,\
-                       HtmlDartInterfaceGenerator
+                       HtmlDartInterfaceGenerator, DartLibrary, DartLibraries
 from systemnative import CPPLibraryEmitter, DartiumBackend
 from templateloader import TemplateLoader
 
@@ -70,12 +70,12 @@
   renamer = HtmlRenamer(webkit_database)
   type_registry = TypeRegistry(webkit_database, renamer)
 
-  def RunGenerator(dart_library_template, dart_output_dir, dart_library_path,
+  def RunGenerator(dart_libraries, dart_output_dir,
                    template_loader, backend_factory):
     options = GeneratorOptions(
         template_loader, webkit_database, type_registry, renamer)
     dart_library_emitter = DartLibraryEmitter(
-        emitters, dart_library_template, dart_output_dir)
+        emitters, dart_output_dir, dart_libraries)
     event_generator = HtmlEventGenerator(webkit_database, template_loader)
 
     def generate_interface(interface):
@@ -85,7 +85,7 @@
       interface_generator.Generate()
 
     generator.Generate(webkit_database, common_database, generate_interface)
-    dart_library_emitter.EmitLibrary(dart_library_path, auxiliary_dir)
+    dart_library_emitter.EmitLibraries(auxiliary_dir)
 
   if dart2js_output_dir:
     template_paths = ['html/dart2js', 'html/impl', 'html/interface', '']
@@ -97,12 +97,12 @@
     backend_factory = lambda interface:\
         Dart2JSBackend(interface, backend_options)
 
-    dart_library_template = template_loader.Load('html_dart2js.darttemplate')
     dart_output_dir = os.path.join(dart2js_output_dir, 'dart')
-    dart_library_path = os.path.join(dart2js_output_dir, 'html_dart2js.dart')
+    dart_libraries = DartLibraries(
+        template_loader, 'dart2js', dart2js_output_dir)
 
-    RunGenerator(dart_library_template, dart_output_dir, dart_library_path,
-                 template_loader, backend_factory)
+    RunGenerator(dart_libraries, dart_output_dir,
+        template_loader, backend_factory)
 
   if dartium_output_dir:
     template_paths = ['html/dartium', 'html/impl', 'html/interface', '']
@@ -116,11 +116,11 @@
     backend_factory = lambda interface:\
         DartiumBackend(interface, cpp_library_emitter, backend_options)
 
-    dart_library_template = template_loader.Load('html_dartium.darttemplate')
     dart_output_dir = os.path.join(dartium_output_dir, 'dart')
-    dart_library_path = os.path.join(dartium_output_dir, 'html_dartium.dart')
+    dart_libraries = DartLibraries(
+        template_loader, 'dartium', dartium_output_dir)
 
-    RunGenerator(dart_library_template, dart_output_dir, dart_library_path,
+    RunGenerator(dart_libraries, dart_output_dir,
                  template_loader, backend_factory)
     cpp_library_emitter.EmitDerivedSources(
         template_loader.Load('cpp_derived_sources.template'),
@@ -186,13 +186,17 @@
   GenerateFromDatabase(database, dart2js_output_dir, dartium_output_dir)
 
   if 'htmldart2js' in systems:
-    _logger.info('Copy html_dart2js to dart2js/')
+    _logger.info('Generating dart2js single files.')
     GenerateSingleFile(os.path.join(dart2js_output_dir, 'html_dart2js.dart'),
                        '../dart2js')
+    GenerateSingleFile(os.path.join(dart2js_output_dir, 'svg_dart2js.dart'),
+        '../../svg/dart2js')
   if 'htmldartium' in systems:
-    _logger.info('Copy html_dartium to dartium/')
+    _logger.info('Generating dartium single files.')
     GenerateSingleFile(os.path.join(dartium_output_dir, 'html_dartium.dart'),
                        '../dartium')
+    GenerateSingleFile(os.path.join(dartium_output_dir, 'svg_dartium.dart'),
+        '../../svg/dartium')
 
 if __name__ == '__main__':
   sys.exit(main())
diff --git a/sdk/lib/html/scripts/generator.py b/sdk/lib/html/scripts/generator.py
index 610e058..89913d2 100644
--- a/sdk/lib/html/scripts/generator.py
+++ b/sdk/lib/html/scripts/generator.py
@@ -401,17 +401,6 @@
       if param_info.is_optional:
         EmitOptionalParameterInvocation(index)
 
-
-  def CopyAndWidenDefaultParameters(self):
-    """Returns equivalent OperationInfo, but default parameters are dynamic."""
-    info = copy.copy(self)
-    info.param_infos = [param.Copy() for param in self.param_infos]
-    for param in info.param_infos:
-      if param.is_optional:
-        param.type_id = None
-    return info
-
-
 def ConstantOutputOrder(a, b):
   """Canonical output ordering for constants."""
   if a.id < b.id: return -1
@@ -477,13 +466,13 @@
     # as well.  Note, there are no functions that take a non-local Window
     # as a parameter / setter.
     'DOMWindow get':
-      Conversion('_convertNativeToDart_Window', 'Window', 'Window'),
+      Conversion('_convertNativeToDart_Window', 'dynamic', 'Window'),
     'EventTarget get':
-      Conversion('_convertNativeToDart_EventTarget', 'EventTarget',
+      Conversion('_convertNativeToDart_EventTarget', 'dynamic',
                  'EventTarget'),
     'EventTarget set':
       Conversion('_convertDartToNative_EventTarget', 'EventTarget',
-                 'EventTarget'),
+                 'dynamic'),
 
     'IDBKey get':
       Conversion('_convertNativeToDart_IDBKey', 'dynamic', 'dynamic'),
@@ -955,12 +944,10 @@
     'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'),
     'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>'),
     'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True),
-    'Document': TypeData(clazz='Interface', merged_interface='HTMLDocument'),
     'Element': TypeData(clazz='Interface', merged_interface='HTMLElement',
         custom_to_dart=True),
     'EventListener': TypeData(clazz='Interface', custom_to_native=True),
     'EventTarget': TypeData(clazz='Interface', custom_to_native=True),
-    'HTMLDocument': TypeData(clazz='Interface', merged_into='Document'),
     'HTMLElement': TypeData(clazz='Interface', merged_into='Element',
         custom_to_dart=True),
     'IDBAny': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native=True),
diff --git a/sdk/lib/html/scripts/htmldartgenerator.py b/sdk/lib/html/scripts/htmldartgenerator.py
index a199963..0dd7ab7 100644
--- a/sdk/lib/html/scripts/htmldartgenerator.py
+++ b/sdk/lib/html/scripts/htmldartgenerator.py
@@ -6,23 +6,170 @@
 """This module provides shared functionality for the system to generate
 dart:html APIs from the IDL database."""
 
-from generator import DartDomNameOfAttribute
+from generator import AnalyzeOperation, ConstantOutputOrder, \
+    DartDomNameOfAttribute, FindMatchingAttribute, IsDartCollectionType, \
+    IsPureInterface
+
+# Types that are accessible cross-frame in a limited fashion.
+# In these cases, the base type (e.g., Window) provides restricted access
+# while the subtype (e.g., LocalWindow) provides full access to the
+# corresponding objects if there are from the same frame.
+_secure_base_types = {
+  'LocalWindow': 'Window',
+  'LocalLocation': 'Location',
+  'LocalHistory': 'History',
+}
 
 class HtmlDartGenerator(object):
   def __init__(self, interface, options):
+    self._database = options.database
     self._interface = interface
+    self._type_registry = options.type_registry
+    self._interface_type_info = self._type_registry.TypeInfo(self._interface.id)
+    self._renamer = options.renamer
 
   def EmitAttributeDocumentation(self, attribute):
+    """ Emits the MDN dartdoc comment for an attribute.
+    """
     dom_name = DartDomNameOfAttribute(attribute)
     self._members_emitter.Emit('\n  /** @domName $DOMINTERFACE.$DOMNAME */',
         DOMINTERFACE=attribute.doc_js_interface_name,
         DOMNAME=dom_name)
 
   def EmitOperationDocumentation(self, operation):
+    """ Emits the MDN dartdoc comment for an operation.
+    """
     self._members_emitter.Emit('\n  /** @domName $DOMINTERFACE.$DOMNAME */',
         DOMINTERFACE=operation.overloads[0].doc_js_interface_name,
         DOMNAME=operation.name)
 
+  def EmitEventGetter(self, events_class_name):
+    self._members_emitter.Emit(
+        '\n  /**'
+        '\n   * @domName EventTarget.addEventListener, '
+        'EventTarget.removeEventListener, EventTarget.dispatchEvent'
+        '\n   */'
+        '\n  $TYPE get on =>\n    new $TYPE(this);\n',
+        TYPE=events_class_name)
+
+  def AddMembers(self, interface, declare_only=False):
+    for const in sorted(interface.constants, ConstantOutputOrder):
+      self.AddConstant(const)
+
+    for attr in sorted(interface.attributes, ConstantOutputOrder):
+      if attr.type.id != 'EventListener':
+        self.AddAttribute(attr, declare_only)
+
+    # The implementation should define an indexer if the interface directly
+    # extends List.
+    element_type = None
+    requires_indexer = False
+    if self._interface_type_info.list_item_type():
+      self.AddIndexer(self._interface_type_info.list_item_type())
+    else:
+      for parent in self._database.Hierarchy(self._interface):
+        if parent == self._interface:
+          continue
+        parent_type_info = self._type_registry.TypeInfo(parent.id)
+        if parent_type_info.list_item_type():
+          self.AmendIndexer(parent_type_info.list_item_type())
+          break
+
+    # Group overloaded operations by id.
+    operationsById = {}
+    for operation in interface.operations:
+      if operation.id not in operationsById:
+        operationsById[operation.id] = []
+      operationsById[operation.id].append(operation)
+
+    # Generate operations.
+    for id in sorted(operationsById.keys()):
+      operations = operationsById[id]
+      info = AnalyzeOperation(interface, operations)
+      self.AddOperation(info, declare_only)
+
+  def AddSecondaryMembers(self, interface):
+    # With multiple inheritance, attributes and operations of non-first
+    # interfaces need to be added.  Sometimes the attribute or operation is
+    # defined in the current interface as well as a parent.  In that case we
+    # avoid making a duplicate definition and pray that the signatures match.
+    secondary_parents = self._TransitiveSecondaryParents(interface)
+    for parent_interface in sorted(secondary_parents):
+      if isinstance(parent_interface, str):
+        continue
+      for attr in sorted(parent_interface.attributes, ConstantOutputOrder):
+        if not FindMatchingAttribute(interface, attr):
+          self.SecondaryContext(parent_interface)
+          self.AddAttribute(attr)
+
+      # Group overloaded operations by id.
+      operationsById = {}
+      for operation in parent_interface.operations:
+        if operation.id not in operationsById:
+          operationsById[operation.id] = []
+        operationsById[operation.id].append(operation)
+
+      # Generate operations.
+      for id in sorted(operationsById.keys()):
+        if not any(op.id == id for op in interface.operations):
+          operations = operationsById[id]
+          info = AnalyzeOperation(interface, operations)
+          self.SecondaryContext(parent_interface)
+          self.AddOperation(info)
+
+  def AddAttribute(self, attribute, declare_only=False):
+    """ Adds an attribute to the generated class.
+    Arguments:
+      attribute - The attribute which is to be added.
+      declare_only- True if the attribute should be declared as an abstract
+        member and not include invocation code.
+    """
+    dom_name = DartDomNameOfAttribute(attribute)
+    attr_name = self._renamer.RenameMember(
+      self._interface.id, attribute, dom_name, 'get:')
+    if not attr_name or self._IsPrivate(attr_name):
+      return
+
+    html_setter_name = self._renamer.RenameMember(
+        self._interface.id, attribute, dom_name, 'set:')
+    read_only = (attribute.is_read_only or 'Replaceable' in attribute.ext_attrs
+                 or not html_setter_name)
+
+    # We don't yet handle inconsistent renames of the getter and setter yet.
+    assert(not html_setter_name or attr_name == html_setter_name)
+
+    if declare_only:
+      self.DeclareAttribute(attribute,
+          self.SecureOutputType(attribute.type.id), attr_name, read_only)
+    else:
+      self.EmitAttribute(attribute, attr_name, read_only)
+
+  def AddOperation(self, info, declare_only=False):
+    """ Adds an operation to the generated class.
+    Arguments:
+      info - The operation info of the operation to be added.
+      declare_only- True if the operation should be declared as an abstract
+        member and not include invocation code.
+    """
+    # FIXME: When we pass in operations[0] below, we're assuming all
+    # overloaded operations have the same security attributes.  This
+    # is currently true, but we should consider filtering earlier or
+    # merging the relevant data into info itself.
+    method_name = self._renamer.RenameMember(self._interface.id,
+                                             info.operations[0],
+                                             info.name)
+    if not method_name:
+      if info.name == 'item':
+        # FIXME: item should be renamed to operator[], not removed.
+        self.EmitOperation(info, '_item')
+      return
+
+    if declare_only:
+      self.DeclareOperation(info,
+          self.SecureOutputType(info.type_name), method_name)
+    else:
+      self.EmitOperation(info, method_name)
+
   def AdditionalImplementedInterfaces(self):
     # TODO: Include all implemented interfaces, including other Lists.
     implements = []
@@ -37,6 +184,13 @@
 
   def AddConstructors(self, constructors, factory_provider, class_name,
       base_class):
+    """ Adds all of the constructors.
+    Arguments:
+      constructors - List of the constructors to be added.
+      factory_provider - Name of the factory provider for this class.
+      class_name - The name of this class.
+      base_class - The name of the base class which this extends.
+    """
     for constructor_info in constructors:
       self._AddConstructor(constructor_info, factory_provider)
 
@@ -55,7 +209,8 @@
           '  factory $CTOR.fromList(List<$TYPE> list) =>\n'
           '    $FACTORY.create$(CTOR)_fromList(list);\n'
           '\n'
-          '  factory $CTOR.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => \n'
+          '  factory $CTOR.fromBuffer(ArrayBuffer buffer, '
+              '[int byteOffset, int length]) => \n'
           '    $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n',
         CTOR=self._interface.id,
         TYPE=self._DartType(typed_array_type),
@@ -65,8 +220,9 @@
       constructor_info.GenerateFactoryInvocation(
           self._DartType, self._members_emitter, factory_provider)
 
-  def DeclareAttribute(self, attribute, type_name, html_name, read_only):
-    # Declares an attribute but does not include the code to invoke it.
+  def DeclareAttribute(self, attribute, type_name, attr_name, read_only):
+    """ Declares an attribute but does not include the code to invoke it.
+    """
     self.EmitAttributeDocumentation(attribute)
     if read_only:
       template = '\n  $TYPE get $NAME;\n'
@@ -74,15 +230,74 @@
       template = '\n  $TYPE $NAME;\n'
 
     self._members_emitter.Emit(template,
-        NAME=html_name,
+        NAME=attr_name,
         TYPE=type_name)
 
-  def DeclareOperation(self, operation, type_name, html_name):
-    # Declares an operation but does not include the code to invoke it.
+  def DeclareOperation(self, operation, return_type_name, method_name):
+    """ Declares an operation but does not include the code to invoke it.
+    Arguments:
+      operation - The operation to be declared.
+      return_type_name - The name of the return type.
+      method_name - The name of the method.
+    """
     self.EmitOperationDocumentation(operation)
     self._members_emitter.Emit(
              '\n'
              '  $TYPE $NAME($PARAMS);\n',
-             TYPE=type_name,
-             NAME=html_name,
+             TYPE=return_type_name,
+             NAME=method_name,
              PARAMS=operation.ParametersDeclaration(self._DartType))
+
+  def SecureOutputType(self, type_name, is_dart_type=False):
+    """ Converts the type name to the secure type name for return types.
+    """
+    if is_dart_type:
+      dart_name = type_name
+    else:
+      dart_name = self._DartType(type_name)
+    # We only need to secure Window.  Only local History and Location are 
+    # returned in generated code.
+    assert(dart_name != 'History' and dart_name != 'Location')
+    if dart_name == 'LocalWindow':
+      return _secure_base_types[dart_name]
+    return dart_name
+
+  def SecureBaseName(self, type_name):
+    if type_name in _secure_base_types:
+      return _secure_base_types[type_name]
+
+  def _TransitiveSecondaryParents(self, interface):
+    """Returns a list of all non-primary parents.
+
+    The list contains the interface objects for interfaces defined in the
+    database, and the name for undefined interfaces.
+    """
+    def walk(parents):
+      for parent in parents:
+        parent_name = parent.type.id
+        if parent_name == 'EventTarget':
+          # Currently EventTarget is implemented as a mixin, not a proper
+          # super interface---ignore its members.
+          continue
+        if IsDartCollectionType(parent_name):
+          result.append(parent_name)
+          continue
+        if self._database.HasInterface(parent_name):
+          parent_interface = self._database.GetInterface(parent_name)
+          result.append(parent_interface)
+          walk(parent_interface.parents)
+
+    result = []
+    if interface.parents:
+      parent = interface.parents[0]
+      if IsPureInterface(parent.type.id):
+        walk(interface.parents)
+      else:
+        walk(interface.parents[1:])
+    return result
+
+  def _DartType(self, type_name):
+    return self._type_registry.DartType(type_name)
+
+  def _IsPrivate(self, name):
+    return name.startswith('_')
diff --git a/sdk/lib/html/scripts/htmleventgenerator.py b/sdk/lib/html/scripts/htmleventgenerator.py
index 6584502..c36a892 100644
--- a/sdk/lib/html/scripts/htmleventgenerator.py
+++ b/sdk/lib/html/scripts/htmleventgenerator.py
@@ -195,7 +195,7 @@
     self._template_loader = template_loader
 
   def ProcessInterface(self, interface, html_interface_name, custom_events,
-                       events_interface_emitter, events_implementation_emitter):
+                       events_implementation_emitter):
     events = set([attr for attr in interface.attributes
                   if attr.type.id == 'EventListener'])
     if not events and interface.id not in _html_explicit_event_classes:
@@ -203,10 +203,10 @@
 
     self._event_classes.add(interface.id)
     events_class_name = html_interface_name + 'Events'
-    parent_events_interface = self._GetParentEventsInterface(interface)
+    parent_events_class_name = self._GetParentEventsClassName(interface)
 
     if not events:
-      return parent_events_interface
+      return parent_events_class_name
 
     template_file = 'impl_%s.darttemplate' % events_class_name
     template = (self._template_loader.TryLoad(template_file) or
@@ -219,7 +219,7 @@
     implementation_events_members = events_implementation_emitter.Emit(
         template,
         CLASSNAME=events_class_name,
-        SUPER='%s' % parent_events_interface)
+        SUPER='%s' % parent_events_class_name)
 
     dom_event_names = set()
     for event in events:
@@ -245,18 +245,18 @@
     return events_class_name
 
   # TODO(jacobr): this isn't quite right....
-  def _GetParentEventsInterface(self, interface):
+  def _GetParentEventsClassName(self, interface):
     # Ugly hack as we don't specify that Document and DocumentFragment inherit
     # from Element in our IDL.
     if interface.id == 'Document' or interface.id == 'DocumentFragment':
       return 'ElementEvents'
 
-    parent_events_interface = 'Events'
+    parent_events_class_name = 'Events'
     interfaces_with_events = set()
     for parent in self._database.Hierarchy(interface):
       if parent != interface and parent.id in self._event_classes:
-        parent_events_interface = parent.id + 'Events'
+        parent_events_class_name = parent.id + 'Events'
         interfaces_with_events.add(parent)
     if len(interfaces_with_events) > 1:
       raise Exception('Only one parent event class allowed ' + interface.id)
-    return parent_events_interface
+    return parent_events_class_name
diff --git a/sdk/lib/html/scripts/htmlrenamer.py b/sdk/lib/html/scripts/htmlrenamer.py
index b3552ae..c513e49 100644
--- a/sdk/lib/html/scripts/htmlrenamer.py
+++ b/sdk/lib/html/scripts/htmlrenamer.py
@@ -9,6 +9,7 @@
     'DOMURL': 'Url',
     'DOMWindow': 'LocalWindow',
     'History': 'LocalHistory',
+    'HTMLDocument' : 'HtmlDocument',
     'Location': 'LocalLocation',
     'WebKitAnimation': 'Animation',
     'WebKitAnimationEvent': 'AnimationEvent',
@@ -37,14 +38,34 @@
   'Document.createEvent',
   'Document.createTextNode',
   'Document.createTouchList',
-  'DocumentFragment.querySelector',
-  'DocumentFragment.querySelectorAll',
   'Document.getElementById',
   'Document.getElementsByClassName',
   'Document.getElementsByName',
   'Document.getElementsByTagName',
   'Document.querySelector',
   'Document.querySelectorAll',
+
+  # Moved to HTMLDocument.
+  'Document.body',
+  'Document.caretRangeFromPoint',
+  'Document.elementFromPoint',
+  'Document.head',
+  'Document.lastModified',
+  'Document.referrer',
+  'Document.styleSheets',
+  'Document.title',
+  'Document.webkitCancelFullScreen',
+  'Document.webkitExitFullscreen',
+  'Document.webkitExitPointerLock',
+  'Document.webkitFullscreenElement',
+  'Document.webkitFullscreenEnabled',
+  'Document.webkitHidden',
+  'Document.webkitIsFullScreen',
+  'Document.webkitPointerLockElement',
+  'Document.webkitVisibilityState',
+
+  'DocumentFragment.querySelector',
+  'DocumentFragment.querySelectorAll',
   'Element.childElementCount',
   'Element.children',
   'Element.className',
@@ -69,7 +90,6 @@
   'Node.childNodes',
   'Node.firstChild',
   'Node.lastChild',
-  "Node.nodeType",
   'Node.removeChild',
   'Node.replaceChild',
   'ShadowRoot.getElementById',
@@ -122,6 +142,8 @@
 #    "DOMImplementation.*",
     "CanvasRenderingContext2D.setFillColor",
     "CanvasRenderingContext2D.setStrokeColor",
+    "DivElement.align",
+    'Document.applets',
     "Document.get:forms",
 #    "Document.get:selectedStylesheetSet",
 #    "Document.set:selectedStylesheetSet",
@@ -134,6 +156,7 @@
     "Document.get:width",
     "Element.getElementsByTagNameNS",
     "Document.get:compatMode",
+    'Document.images',
     "Document.importNode",
     "Document.evaluate",
     "Document.get:images",
@@ -161,6 +184,8 @@
     "Document.xmlVersion",
     "Document.get:anchors",
     "Document.getElementsByTagNameNS",
+    'Document.webkitCurrentFullScreenElement',
+    'Document.webkitFullScreenKeyboardInputAllowed',
     "DocumentType.*",
     "Element.hasAttributeNS",
     "Element.getAttributeNS",
@@ -171,6 +196,7 @@
     "Element.setAttributeNodeNS",
     "Element.getAttributeNodeNS",
     "Element.setAttributeNS",
+    "Event.srcElement",
     "BodyElement.text",
     "AnchorElement.text",
     "OptionElement.text",
@@ -260,8 +286,10 @@
     "Node.lookupPrefix",
     "Node.get:PROCESSING_INSTRUCTION_NODE",
     'ShadowRoot.getElementsByTagNameNS',
+    "LocalWindow.clientInformation",
     "LocalWindow.get:frames",
     "LocalWindow.get:length",
+    "LocalWindow.prompt",
     "LocalWindow.webkitCancelRequestAnimationFrame",
     "WheelEvent.wheelDelta",
     ])
@@ -271,12 +299,12 @@
     self._database = database
 
   def RenameInterface(self, interface):
-    if interface.id.startswith('HTML'):
+    if interface.id in html_interface_renames:
+      return html_interface_renames[interface.id]
+    elif interface.id.startswith('HTML'):
       if any(interface.id in ['Element', 'Document']
              for interface in self._database.Hierarchy(interface)):
         return interface.id[len('HTML'):]
-    elif interface.id in html_interface_renames:
-      return html_interface_renames[interface.id]
     return interface.id
 
   def RenameMember(self, interface_name, member_node, member, member_prefix=''):
@@ -309,3 +337,8 @@
       member_name = html_interface_name + '.' + member_prefix + member
       if member_name in candidates:
         return member_name
+
+  def GetLibraryName(self, interface):
+    if interface.id.startswith('SVG'):
+      return 'svg'
+    return 'html'
diff --git a/sdk/lib/html/scripts/systemhtml.py b/sdk/lib/html/scripts/systemhtml.py
index 1fb093010..dbdb4cc 100644
--- a/sdk/lib/html/scripts/systemhtml.py
+++ b/sdk/lib/html/scripts/systemhtml.py
@@ -48,27 +48,6 @@
 # constructor creation.
 _static_classes = set(['Url'])
 
-# Types that are accessible cross-frame in a limited fashion.
-# In these cases, the base type (e.g., Window) provides restricted access
-# while the subtype (e.g., LocalWindow) provides full access to the
-# corresponding objects if there are from the same frame.
-_secure_base_types = {
-  'LocalWindow': 'Window',
-  'LocalLocation': 'Location',
-  'LocalHistory': 'History',
-}
-
-def SecureOutputType(generator, type_name, is_dart_type=False):
-  if is_dart_type:
-    dart_name = type_name
-  else:
-    dart_name = generator._DartType(type_name)
-  # We only need to secure Window.  Only local History and Location are returned
-  # in generated code.
-  if dart_name == 'LocalWindow':
-    return _secure_base_types[dart_name]
-  return dart_name
-
 # Information for generating element constructors.
 #
 # TODO(sra): maybe remove all the argument complexity and use cascades.
@@ -214,11 +193,13 @@
     self._database = options.database
     self._template_loader = options.templates
     self._type_registry = options.type_registry
+    self._options = options
     self._library_emitter = library_emitter
     self._event_generator = event_generator
     self._interface = interface
     self._backend = backend
     self._interface_type_info = self._type_registry.TypeInfo(self._interface.id)
+    self._library_name = self._renamer.GetLibraryName(self._interface)
 
   def Generate(self):
     if 'Callback' in self._interface.ext_attrs:
@@ -231,7 +212,8 @@
     handlers = [operation for operation in self._interface.operations
                 if operation.id == 'handleEvent']
     info = AnalyzeOperation(self._interface, handlers)
-    code = self._library_emitter.FileEmitter(self._interface.id)
+    code = self._library_emitter.FileEmitter(self._interface.id,
+        self._library_name)
     code.Emit(self._template_loader.Load('callback.darttemplate'))
     code.Emit('typedef void $NAME($PARAMS);\n',
               NAME=self._interface.id,
@@ -241,32 +223,6 @@
   def GenerateInterface(self):
     interface_name = self._interface_type_info.interface_name()
 
-    # TODO: this is just tossing the interface, need to skip it completely.
-    interface_emitter = emitter.Emitter()
-
-    template_file = 'interface_%s.darttemplate' % interface_name
-    interface_template = (self._template_loader.TryLoad(template_file) or
-                          self._template_loader.Load('interface.darttemplate'))
-
-    implements = []
-    for parent in self._interface.parents:
-      parent_type_info = self._type_registry.TypeInfo(parent.type.id)
-      implements.append(parent_type_info.interface_name())
-
-    if self._interface_type_info.list_item_type():
-      item_type_info = self._type_registry.TypeInfo(
-          self._interface_type_info.list_item_type())
-      implements.append('List<%s>' % item_type_info.dart_type())
-
-    if interface_name in _secure_base_types:
-      implements.append(_secure_base_types[interface_name])
-
-    comment = ' extends'
-    implements_str = ''
-    if implements:
-      implements_str += ' implements ' + ', '.join(implements)
-      comment = ','
-
     factory_provider = None
     if interface_name in interface_factories:
       factory_provider = interface_factories[interface_name]
@@ -280,7 +236,7 @@
       constructors.append(constructor_info)
       factory_provider = '_' + interface_name + 'FactoryProvider'
       factory_provider_emitter = self._library_emitter.FileEmitter(
-          '_%sFactoryProvider' % interface_name)
+          '_%sFactoryProvider' % interface_name, self._library_name)
       self._backend.EmitFactoryProvider(
           constructor_info, factory_provider, factory_provider_emitter)
 
@@ -289,7 +245,8 @@
       template = self._template_loader.Load(
           'factoryprovider_Elements.darttemplate')
       EmitHtmlElementFactoryConstructors(
-          self._library_emitter.FileEmitter('_Elements', template),
+          self._library_emitter.FileEmitter('_Elements', self._library_name,
+              template),
           infos,
           self._interface.id,
           self._interface_type_info.implementation_name(),
@@ -302,14 +259,6 @@
       else:
         factory_provider = info.factory_provider_name
 
-    # TODO(vsm): Add appropriate package / namespace syntax.
-    (self._type_comment_emitter,
-     self._members_emitter,
-     self._top_level_emitter) = interface_emitter.Emit(
-         interface_template + '$!TOP_LEVEL',
-         ID='_I%s' % interface_name,
-         EXTENDS=implements_str)
-
     implementation_emitter = self._ImplementationEmitter()
 
     base_type_info = None
@@ -333,8 +282,9 @@
       if parent_type_info != base_type_info:
         implements.append(parent_type_info.interface_name())
 
-    if interface_name in _secure_base_types:
-      implements.append(_secure_base_types[interface_name])
+    secure_base_name = self._backend.SecureBaseName(interface_name)
+    if secure_base_name:
+      implements.append(secure_base_name)
 
     implements_str = ''
     if implements:
@@ -342,6 +292,7 @@
 
     self._implementation_members_emitter = implementation_emitter.Emit(
         self._backend.ImplementationTemplate(),
+        LIBRARYNAME=self._library_name,
         CLASSNAME=self._interface_type_info.implementation_name(),
         EXTENDS=' extends %s' % base_class if base_class else '',
         IMPLEMENTS=implements_str,
@@ -349,291 +300,37 @@
         NATIVESPEC=self._backend.NativeSpec())
     self._backend.StartInterface(self._implementation_members_emitter)
 
-    for constructor_info in constructors:
-      constructor_info.GenerateFactoryInvocation(
-          self._DartType, self._members_emitter, factory_provider)
-
     self._backend.AddConstructors(constructors, factory_provider,
         self._interface_type_info.implementation_name(),
         base_class)
 
-    typed_array_type = None
-    for interface in self._database.Hierarchy(self._interface):
-      type_info = self._type_registry.TypeInfo(interface.id)
-      if type_info.is_typed_array():
-        typed_array_type = type_info.list_item_type()
-        break
-    if typed_array_type:
-      self._members_emitter.Emit(
-          '\n'
-          '  factory $CTOR(int length) =>\n'
-          '    $FACTORY.create$(CTOR)(length);\n'
-          '\n'
-          '  factory $CTOR.fromList(List<$TYPE> list) =>\n'
-          '    $FACTORY.create$(CTOR)_fromList(list);\n'
-          '\n'
-          '  factory $CTOR.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => \n'
-          '    $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n',
-        CTOR=self._interface.id,
-        TYPE=self._DartType(typed_array_type),
-        FACTORY=factory_provider)
-
-    events_interface = self._event_generator.ProcessInterface(
+    events_class_name = self._event_generator.ProcessInterface(
         self._interface, interface_name,
         self._backend.CustomJSMembers(),
-        interface_emitter, implementation_emitter)
-    if events_interface:
-      self._EmitEventGetter(events_interface, events_interface)
+        implementation_emitter)
+    if events_class_name:
+      self._backend.EmitEventGetter(events_class_name)
 
-    old_backend = self._backend
-    if not self._backend.ImplementsMergedMembers():
-      self._backend = HtmlGeneratorDummyBackend()
     merged_interface = self._interface_type_info.merged_interface()
     if merged_interface:
-      self.AddMembers(self._database.GetInterface(merged_interface))
-    self._backend = old_backend
+      self._backend.AddMembers(self._database.GetInterface(merged_interface),
+        not self._backend.ImplementsMergedMembers())
 
-    self.AddMembers(self._interface)
-    if merged_interface and not self._backend.ImplementsMergedMembers():
-      self.AddMembers(self._database.GetInterface(merged_interface), True)
-
-    self.AddSecondaryMembers(self._interface)
+    self._backend.AddMembers(self._interface)
+    self._backend.AddSecondaryMembers(self._interface)
     self._backend.FinishInterface()
 
-  def AddMembers(self, interface, declare_only=False):
-    for const in sorted(interface.constants, ConstantOutputOrder):
-      self.AddConstant(const)
-
-    for attr in sorted(interface.attributes, ConstantOutputOrder):
-      if attr.type.id != 'EventListener':
-        self.AddAttribute(attr, False, declare_only)
-
-    # The implementation should define an indexer if the interface directly
-    # extends List.
-    element_type = None
-    requires_indexer = False
-    if self._interface_type_info.list_item_type():
-      self.AddIndexer(self._interface_type_info.list_item_type())
-    else:
-      for parent in self._database.Hierarchy(self._interface):
-        if parent == self._interface:
-          continue
-        parent_type_info = self._type_registry.TypeInfo(parent.id)
-        if parent_type_info.list_item_type():
-          self.AmendIndexer(parent_type_info.list_item_type())
-          break
-
-    # Group overloaded operations by id
-    operationsById = {}
-    for operation in interface.operations:
-      if operation.id not in operationsById:
-        operationsById[operation.id] = []
-      operationsById[operation.id].append(operation)
-
-    # Generate operations
-    for id in sorted(operationsById.keys()):
-      operations = operationsById[id]
-      info = AnalyzeOperation(interface, operations)
-      self.AddOperation(info, False, declare_only)
-
-  def AddSecondaryMembers(self, interface):
-    # With multiple inheritance, attributes and operations of non-first
-    # interfaces need to be added.  Sometimes the attribute or operation is
-    # defined in the current interface as well as a parent.  In that case we
-    # avoid making a duplicate definition and pray that the signatures match.
-    secondary_parents = self._TransitiveSecondaryParents(interface)
-    for parent_interface in sorted(secondary_parents):
-      if isinstance(parent_interface, str):  # IsDartCollectionType(parent_interface)
-        continue
-      for attr in sorted(parent_interface.attributes, ConstantOutputOrder):
-        if not FindMatchingAttribute(interface, attr):
-          self.AddSecondaryAttribute(parent_interface, attr)
-
-      # Group overloaded operations by id
-      operationsById = {}
-      for operation in parent_interface.operations:
-        if operation.id not in operationsById:
-          operationsById[operation.id] = []
-        operationsById[operation.id].append(operation)
-
-      # Generate operations
-      for id in sorted(operationsById.keys()):
-        if not any(op.id == id for op in interface.operations):
-          operations = operationsById[id]
-          info = AnalyzeOperation(interface, operations)
-          self.AddSecondaryOperation(parent_interface, info)
-
-  def AddIndexer(self, element_type):
-    self._backend.AddIndexer(element_type)
-
-  def AmendIndexer(self, element_type):
-    self._backend.AmendIndexer(element_type)
-
-  def AddAttribute(self, attribute, is_secondary=False, declare_only=False):
-    dom_name = DartDomNameOfAttribute(attribute)
-    html_name = self._renamer.RenameMember(
-      self._interface.id, attribute, dom_name, 'get:')
-    if not html_name or self._IsPrivate(html_name):
-      return
-
-
-    html_setter_name = self._renamer.RenameMember(
-        self._interface.id, attribute, dom_name, 'set:')
-    read_only = (attribute.is_read_only or 'Replaceable' in attribute.ext_attrs
-                 or not html_setter_name)
-
-    # We don't yet handle inconsistent renames of the getter and setter yet.
-    assert(not html_setter_name or html_name == html_setter_name)
-
-    if not is_secondary:
-      self._members_emitter.Emit('\n  /** @domName $DOMINTERFACE.$DOMNAME */',
-          DOMINTERFACE=attribute.doc_js_interface_name,
-          DOMNAME=dom_name)
-      if read_only:
-        template = '\n  $TYPE get $NAME;\n'
-      else:
-        template = '\n  $TYPE $NAME;\n'
-
-      self._members_emitter.Emit(template,
-                                 NAME=html_name,
-                                 TYPE=SecureOutputType(self, attribute.type.id))
-
-    if declare_only:
-      self._backend.DeclareAttribute(attribute,
-          SecureOutputType(self, attribute.type.id), html_name, read_only)
-    else:
-      self._backend.AddAttribute(attribute, html_name, read_only)
-
-  def AddSecondaryAttribute(self, interface, attribute):
-    self._backend.SecondaryContext(interface)
-    self.AddAttribute(attribute, True)
-
-  def AddOperation(self, info, skip_declaration=False, declare_only=False):
-    """
-    Arguments:
-      operations - contains the overloads, one or more operations with the same
-        name.
-    """
-    # FIXME: When we pass in operations[0] below, we're assuming all
-    # overloaded operations have the same security attributes.  This
-    # is currently true, but we should consider filtering earlier or
-    # merging the relevant data into info itself.
-    html_name = self._renamer.RenameMember(self._interface.id,
-                                           info.operations[0],
-                                           info.name)
-    if not html_name:
-      if info.name == 'item':
-        # FIXME: item should be renamed to operator[], not removed.
-        self._backend.AddOperation(info, '_item')
-      return
-
-    if not self._IsPrivate(html_name) and not skip_declaration:
-      self._members_emitter.Emit('\n  /** @domName $DOMINTERFACE.$DOMNAME */',
-          DOMINTERFACE=info.overloads[0].doc_js_interface_name,
-          DOMNAME=info.name)
-
-      if info.IsStatic():
-        # FIXME: provide a type.
-        self._members_emitter.Emit(
-            '\n'
-            '  static final $NAME = $IMPL_CLASS_NAME.$NAME;\n',
-            IMPL_CLASS_NAME=self._interface_type_info.implementation_name(),
-            NAME=html_name)
-      else:
-        self._members_emitter.Emit(
-             '\n'
-             '  $TYPE $NAME($PARAMS);\n',
-             TYPE=SecureOutputType(self, info.type_name),
-             NAME=html_name,
-             PARAMS=info.ParametersDeclaration(self._DartType))
-    if declare_only:
-      self._backend.DeclareOperation(info,
-          SecureOutputType(self, info.type_name), html_name)
-    else:
-      self._backend.AddOperation(info, html_name)
-
-  def AddSecondaryOperation(self, interface, info):
-    self._backend.SecondaryContext(interface)
-    self.AddOperation(info)
-
-  def AddConstant(self, constant):
-    type = TypeOrNothing(self._DartType(constant.type.id), constant.type.id)
-    self._members_emitter.Emit('\n  static const $TYPE$NAME = $VALUE;\n',
-                               NAME=constant.id,
-                               TYPE=type,
-                               VALUE=constant.value)
-
-    self._backend.AddConstant(constant)
-
   def _ImplementationEmitter(self):
     basename = self._interface_type_info.implementation_name()
     if (self._interface_type_info.merged_into() and
         self._backend.ImplementsMergedMembers()):
       # Merged members are implemented in target interface implementation.
       return emitter.Emitter()
-    return self._library_emitter.FileEmitter(basename)
-
-  def _EmitEventGetter(self, events_interface, events_class):
-    self._members_emitter.Emit(
-        '\n  /**'
-        '\n   * @domName EventTarget.addEventListener, '
-        'EventTarget.removeEventListener, EventTarget.dispatchEvent'
-        '\n   */'
-        '\n  $TYPE get on;\n',
-        TYPE=events_interface)
-
-    self._implementation_members_emitter.Emit(
-        '\n  /**'
-        '\n   * @domName EventTarget.addEventListener, '
-        'EventTarget.removeEventListener, EventTarget.dispatchEvent'
-        '\n   */'
-        '\n  $TYPE get on =>\n    new $TYPE(this);\n',
-        TYPE=events_class)
-
-  def _TransitiveSecondaryParents(self, interface):
-    """Returns a list of all non-primary parents.
-
-    The list contains the interface objects for interfaces defined in the
-    database, and the name for undefined interfaces.
-    """
-    def walk(parents):
-      for parent in parents:
-        parent_name = parent.type.id
-        if parent_name == 'EventTarget':
-          # Currently EventTarget is implemented as a mixin, not a proper
-          # super interface---ignore its members.
-          continue
-        if IsDartCollectionType(parent_name):
-          result.append(parent_name)
-          continue
-        if self._database.HasInterface(parent_name):
-          parent_interface = self._database.GetInterface(parent_name)
-          result.append(parent_interface)
-          walk(parent_interface.parents)
-
-    result = []
-    if interface.parents:
-      parent = interface.parents[0]
-      if IsPureInterface(parent.type.id):
-        walk(interface.parents)
-      else:
-        walk(interface.parents[1:])
-    return result
+    return self._library_emitter.FileEmitter(basename, self._library_name)
 
   def _DartType(self, type_name):
     return self._type_registry.DartType(type_name)
 
-  def _IsPrivate(self, name):
-    return name.startswith('_')
-
-
-class HtmlGeneratorDummyBackend(object):
-  def AddAttribute(self, attribute, html_name, read_only):
-    pass
-
-  def AddOperation(self, info, html_name):
-    pass
-
 
 # ------------------------------------------------------------------------------
 
@@ -733,7 +430,7 @@
     self._members_emitter.Emit(
         '\n'
         '  $TYPE operator[](int index) => JS("$TYPE", "#[#]", this, index);\n',
-        TYPE=self._NarrowOutputType(element_type))
+        TYPE=self.SecureOutputType(element_type))
 
     if 'CustomIndexedSetter' in self._interface.ext_attrs:
       self._members_emitter.Emit(
@@ -763,7 +460,7 @@
           {'DEFINE_CONTAINS': not has_contains})
       self._members_emitter.Emit(template, E=self._DartType(element_type))
 
-  def AddAttribute(self, attribute, html_name, read_only):
+  def EmitAttribute(self, attribute, html_name, read_only):
     if self._HasCustomImplementation(attribute.id):
       return
 
@@ -794,7 +491,7 @@
               '  // final $TYPE $NAME;\n',
               SUPER=super_attribute_interface,
               NAME=DartDomNameOfAttribute(attribute),
-              TYPE=self._NarrowOutputType(attribute.type.id))
+              TYPE=self.SecureOutputType(attribute.type.id))
           return
       self._members_emitter.Emit('\n  // Shadowing definition.')
       self._AddAttributeUsingProperties(attribute, html_name, read_only)
@@ -807,7 +504,7 @@
       self._AddAttributeUsingProperties(attribute, html_name, read_only)
       return
 
-    output_type = self._NarrowOutputType(attribute.type.id)
+    output_type = self.SecureOutputType(attribute.type.id)
     input_type = self._NarrowInputType(attribute.type.id)
     self.EmitAttributeDocumentation(attribute)
     if not read_only:
@@ -833,7 +530,7 @@
         '\n  $TYPE $NAME;'
         '\n',
         NAME=DartDomNameOfAttribute(attribute),
-        TYPE=self._NarrowOutputType(attribute.type.id))
+        TYPE=self.SecureOutputType(attribute.type.id))
 
   def _AddRenamingGetter(self, attr, html_name):
     self.EmitAttributeDocumentation(attr)
@@ -841,7 +538,7 @@
     conversion = self._OutputConversion(attr.type.id, attr.id)
     if conversion:
       return self._AddConvertingGetter(attr, html_name, conversion)
-    return_type = self._NarrowOutputType(attr.type.id)
+    return_type = self.SecureOutputType(attr.type.id)
     self._members_emitter.Emit(
         # TODO(sra): Use metadata to provide native name.
         '\n  $TYPE get $HTML_NAME => JS("$TYPE", "#.$NAME", this);'
@@ -898,7 +595,7 @@
   def AmendIndexer(self, element_type):
     pass
 
-  def AddOperation(self, info, html_name):
+  def EmitOperation(self, info, html_name):
     """
     Arguments:
       info: An OperationInfo object.
@@ -919,7 +616,7 @@
   def _AddDirectNativeOperation(self, info, html_name):
     # Do we need a native body?
     if html_name != info.declared_name:
-      return_type = self._NarrowOutputType(info.type_name)
+      return_type = self.SecureOutputType(info.type_name)
 
       operation_emitter = self._members_emitter.Emit('$!SCOPE',
           MODIFIERS='static ' if info.IsStatic() else '',
@@ -937,14 +634,13 @@
           '\n'
           '  $MODIFIERS$TYPE $NAME($PARAMS) native;\n',
           MODIFIERS='static ' if info.IsStatic() else '',
-          TYPE=self._NarrowOutputType(info.type_name),
+          TYPE=self.SecureOutputType(info.type_name),
           NAME=info.name,
           PARAMS=info.ParametersDeclaration(self._NarrowInputType))
 
   def _AddOperationWithConversions(self, info, html_name):
     # Assert all operations have same return type.
     assert len(set([op.type.id for op in info.operations])) == 1
-    info = info.CopyAndWidenDefaultParameters()
     output_conversion = self._OutputConversion(info.type_name,
                                                info.declared_name)
     if output_conversion:
@@ -1012,14 +708,15 @@
           arguments.append(parameter_names[position])
           param_type = self._NarrowInputType(arg.type.id)
           # Verified by argument checking on entry to the dispatcher.
-          verified_type = InputType(info.param_infos[position].type_id)
 
-        # The native method does not need an argument type if we know the type.
-        # But we do need the native methods to have correct function types, so
-        # be conservative.
-        if param_type == verified_type:
-          if param_type in ['String', 'num', 'int', 'double', 'bool', 'Object']:
-            param_type = 'dynamic'
+          verified_type = InputType(info.param_infos[position].type_id)
+          # The native method does not need an argument type if we know the type.
+          # But we do need the native methods to have correct function types, so
+          # be conservative.
+          if param_type == verified_type:
+            if param_type in ['String', 'num', 'int', 'double', 'bool', 'Object']:
+              param_type = 'dynamic'
+
         target_parameters.append(
             '%s%s' % (TypeOrNothing(param_type), param_name))
 
@@ -1053,8 +750,9 @@
         if test_type in ['dynamic', 'Object']:
           checks.append('?%s' % parameter_name)
         elif test_type != parameter_types[i]:
-          checks.append('(%s is %s || %s == null)' % (
-              parameter_name, test_type, parameter_name))
+          checks.append('(?%s && (%s is %s || %s == null))' % (
+              parameter_name, parameter_name, test_type, parameter_name))
+
       checks.extend(['!?%s' % name for name in parameter_names[argument_count:]])
       # There can be multiple presence checks.  We need them all since a later
       # optional argument could have been passed by name, leaving 'holes'.
@@ -1084,7 +782,7 @@
     self._members_emitter.Emit(
         '\n'
         '  $TYPE $NAME($PARAMS);\n',
-        TYPE=self._NarrowOutputType(info.type_name),
+        TYPE=self.SecureOutputType(info.type_name),
         NAME=info.name,
         PARAMS=info.ParametersDeclaration(self._NarrowInputType))
 
@@ -1130,9 +828,6 @@
   def _NarrowInputType(self, type_name):
     return self._NarrowToImplementationType(type_name)
 
-  def _NarrowOutputType(self, type_name):
-    return SecureOutputType(self, type_name)
-
   def _FindShadowedAttribute(self, attr):
     """Returns (attribute, superinterface) or (None, None)."""
     def FindInParent(interface):
@@ -1175,32 +870,66 @@
 # ------------------------------------------------------------------------------
 
 class DartLibraryEmitter():
-  def __init__(self, multiemitter, template, dart_sources_dir):
+  def __init__(self, multiemitter, dart_sources_dir, dart_libraries):
     self._multiemitter = multiemitter
-    self._template = template
     self._dart_sources_dir = dart_sources_dir
     self._path_to_emitter = {}
+    self._dart_libraries = dart_libraries
 
-  def FileEmitter(self, basename, template=None):
+  def FileEmitter(self, basename, library_name, template=None):
     path = os.path.join(self._dart_sources_dir, '%s.dart' % basename)
     if not path in self._path_to_emitter:
       emitter = self._multiemitter.FileEmitter(path)
       if not template is None:
         emitter = emitter.Emit(template)
       self._path_to_emitter[path] = emitter
+
+      self._dart_libraries.AddFile(basename, library_name, path)
     return self._path_to_emitter[path]
 
-  def EmitLibrary(self, library_file_path, auxiliary_dir):
+  def EmitLibraries(self, auxiliary_dir):
+    self._dart_libraries.Emit(self._multiemitter, auxiliary_dir)
+
+# ------------------------------------------------------------------------------
+class DartLibrary():
+  def __init__(self, name, template_loader, library_type, output_dir):
+    self._template = template_loader.Load(
+        '%s_%s.darttemplate' % (name, library_type))
+    self._dart_path = os.path.join(
+        output_dir, '%s_%s.dart' % (name, library_type))
+    self._paths = []
+
+  def AddFile(self, path):
+    self._paths.append(path)
+
+  def Emit(self, emitter, auxiliary_dir):
     def massage_path(path):
       # The most robust way to emit path separators is to use / always.
       return path.replace('\\', '/')
 
-    library_emitter = self._multiemitter.FileEmitter(library_file_path)
-    library_file_dir = os.path.dirname(library_file_path)
+    library_emitter = emitter.FileEmitter(self._dart_path)
+    library_file_dir = os.path.dirname(self._dart_path)
     auxiliary_dir = os.path.relpath(auxiliary_dir, library_file_dir)
     imports_emitter = library_emitter.Emit(
         self._template, AUXILIARY_DIR=massage_path(auxiliary_dir))
-    for path in sorted(self._path_to_emitter.keys()):
+
+    for path in sorted(self._paths):
       relpath = os.path.relpath(path, library_file_dir)
       imports_emitter.Emit(
           "part '$PATH';\n", PATH=massage_path(relpath))
+
+# ------------------------------------------------------------------------------
+
+class DartLibraries():
+  def __init__(self, template_loader, library_type, output_dir):
+    self._libraries = {
+      'svg': DartLibrary('svg', template_loader, library_type, output_dir),
+      'html': DartLibrary('html', template_loader, library_type, output_dir),
+    }
+
+  def AddFile(self, basename, library_name, path):
+    self._libraries[library_name].AddFile(path)
+
+  def Emit(self, emitter, auxiliary_dir):
+    for lib in self._libraries.values():
+      lib.Emit(emitter, auxiliary_dir)
diff --git a/sdk/lib/html/scripts/systemnative.py b/sdk/lib/html/scripts/systemnative.py
index 7155f29..09e0208 100644
--- a/sdk/lib/html/scripts/systemnative.py
+++ b/sdk/lib/html/scripts/systemnative.py
@@ -9,7 +9,6 @@
 import emitter
 import os
 from generator import *
-from systemhtml import SecureOutputType
 from htmldartgenerator import *
 
 class DartiumBackend(HtmlDartGenerator):
@@ -232,7 +231,8 @@
         INCLUDES=self._GenerateCPPIncludes(self._cpp_impl_includes),
         CALLBACKS=self._cpp_definitions_emitter.Fragments(),
         RESOLVER=self._cpp_resolver_emitter.Fragments(),
-        DART_IMPLEMENTATION_CLASS=self._interface_type_info.implementation_name())
+        DART_IMPLEMENTATION_CLASS=self._interface_type_info.implementation_name(),
+        DART_IMPLEMENTATION_LIBRARY='dart:%s' % self._renamer.GetLibraryName(self._interface))
 
   def _GenerateCPPHeader(self):
     to_native_emitter = emitter.Emitter()
@@ -287,14 +287,15 @@
         TO_NATIVE=to_native_emitter.Fragments(),
         TO_DART=to_dart_emitter.Fragments())
 
-  def AddAttribute(self, attribute, html_name, read_only):
+  def EmitAttribute(self, attribute, html_name, read_only):
     self._AddGetter(attribute, html_name)
     if not read_only:
       self._AddSetter(attribute, html_name)
 
   def _AddGetter(self, attr, html_name):
     type_info = self._TypeInfo(attr.type.id)
-    dart_declaration = '%s get %s' % (SecureOutputType(self, attr.type.id), html_name)
+    dart_declaration = '%s get %s' % (
+        self.SecureOutputType(attr.type.id), html_name)
     is_custom = 'Custom' in attr.ext_attrs or 'CustomGetter' in attr.ext_attrs
     cpp_callback_name = self._GenerateNativeBinding(attr.id, 1,
         dart_declaration, 'Getter', is_custom)
@@ -385,7 +386,8 @@
       self._members_emitter.Emit(
           '\n'
           '  $TYPE operator[](int index) native "$(INTERFACE)_item_Callback";\n',
-          TYPE=SecureOutputType(self, element_type), INTERFACE=self._interface.id)
+          TYPE=self.SecureOutputType(element_type),
+          INTERFACE=self._interface.id)
 
     if self._HasNativeIndexSetter():
       self._EmitNativeIndexSetter(dart_element_type)
@@ -435,7 +437,8 @@
         'NumericIndexedGetter' in ext_attrs)
 
   def _EmitNativeIndexGetter(self, element_type):
-    dart_declaration = '%s operator[](int index)' % SecureOutputType(self, element_type, True)
+    dart_declaration = '%s operator[](int index)' % \
+        self.SecureOutputType(element_type, True)
     self._GenerateNativeBinding('numericIndexGetter', 2, dart_declaration,
         'Callback', True)
 
@@ -447,7 +450,7 @@
     self._GenerateNativeBinding('numericIndexSetter', 3, dart_declaration,
         'Callback', True)
 
-  def AddOperation(self, info, html_name):
+  def EmitOperation(self, info, html_name):
     """
     Arguments:
       info: An OperationInfo object.
@@ -461,7 +464,7 @@
 
     dart_declaration = '%s%s %s(%s)' % (
         'static ' if info.IsStatic() else '',
-        SecureOutputType(self, info.type_name),
+        self.SecureOutputType(info.type_name),
         html_name,
         info.ParametersDeclaration(
             (lambda x: 'dynamic') if needs_dispatcher else self._DartType))
@@ -513,7 +516,8 @@
 
       dart_declaration = '%s%s _%s(%s)' % (
           'static ' if operation.is_static else '',
-          SecureOutputType(self, operation.type.id), overload_name, argument_list)
+          self.SecureOutputType(operation.type.id),
+          overload_name, argument_list)
       cpp_callback_name = self._GenerateNativeBinding(
           overload_name, (0 if operation.is_static else 1) + argument_count,
           dart_declaration, 'Callback', False)
diff --git a/sdk/lib/html/src/CrossFrameTypes.dart b/sdk/lib/html/src/CrossFrameTypes.dart
index 3804789..68597f0 100644
--- a/sdk/lib/html/src/CrossFrameTypes.dart
+++ b/sdk/lib/html/src/CrossFrameTypes.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 abstract class Window {
   // Fields.
   Location get location;
diff --git a/sdk/lib/html/src/CssClassSet.dart b/sdk/lib/html/src/CssClassSet.dart
new file mode 100644
index 0000000..01b7f95
--- /dev/null
+++ b/sdk/lib/html/src/CssClassSet.dart
@@ -0,0 +1,125 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 html;
+
+abstract class CssClassSet implements Set<String> {
+
+  String toString() {
+    return Strings.join(new List.from(readClasses()), ' ');
+  }
+
+  /**
+   * Adds the class [token] to the element if it is not on it, removes it if it
+   * is.
+   */
+  bool toggle(String value) {
+    Set<String> s = readClasses();
+    bool result = false;
+    if (s.contains(value)) {
+      s.remove(value);
+    } else {
+      s.add(value);
+      result = true;
+    }
+    writeClasses(s);
+    return result;
+  }
+
+  /**
+   * Returns [:true:] if classes cannot be added or removed from this
+   * [:CssClassSet:].
+   */
+  bool get frozen => false;
+
+  // interface Iterable - BEGIN
+  Iterator<String> iterator() => readClasses().iterator();
+  // interface Iterable - END
+
+  // interface Collection - BEGIN
+  void forEach(void f(String element)) {
+    readClasses().forEach(f);
+  }
+
+  Collection map(f(String element)) => readClasses().map(f);
+
+  Collection<String> filter(bool f(String element)) => readClasses().filter(f);
+
+  bool every(bool f(String element)) => readClasses().every(f);
+
+  bool some(bool f(String element)) => readClasses().some(f);
+
+  bool get isEmpty => readClasses().isEmpty;
+
+  int get length =>readClasses().length;
+  // interface Collection - END
+
+  // interface Set - BEGIN
+  bool contains(String value) => readClasses().contains(value);
+
+  void add(String value) {
+    // TODO - figure out if we need to do any validation here
+    // or if the browser natively does enough
+    _modify((s) => s.add(value));
+  }
+
+  bool remove(String value) {
+    Set<String> s = readClasses();
+    bool result = s.remove(value);
+    writeClasses(s);
+    return result;
+  }
+
+  void addAll(Collection<String> collection) {
+    // TODO - see comment above about validation
+    _modify((s) => s.addAll(collection));
+  }
+
+  void removeAll(Collection<String> collection) {
+    _modify((s) => s.removeAll(collection));
+  }
+
+  bool isSubsetOf(Collection<String> collection) =>
+    readClasses().isSubsetOf(collection);
+
+  bool containsAll(Collection<String> collection) =>
+    readClasses().containsAll(collection);
+
+  Set<String> intersection(Collection<String> other) =>
+    readClasses().intersection(other);
+
+  void clear() {
+    _modify((s) => s.clear());
+  }
+  // interface Set - END
+
+  /**
+   * Helper method used to modify the set of css classes on this element.
+   *
+   *   f - callback with:
+   *      s - a Set of all the css class name currently on this element.
+   *
+   *   After f returns, the modified set is written to the
+   *       className property of this element.
+   */
+  void _modify( f(Set<String> s)) {
+    Set<String> s = readClasses();
+    f(s);
+    writeClasses(s);
+  }
+
+  /**
+   * Read the class names from the Element class property,
+   * and put them into a set (duplicates are discarded).
+   * This is intended to be overridden by specific implementations.
+   */
+  Set<String> readClasses();
+
+  /**
+   * Join all the elements of a set into one string and write
+   * back to the element.
+   * This is intended to be overridden by specific implementations.
+   */
+  void writeClasses(Set<String> s);
+}
diff --git a/sdk/lib/html/src/Device.dart b/sdk/lib/html/src/Device.dart
index bc7976f..34dba8a 100644
--- a/sdk/lib/html/src/Device.dart
+++ b/sdk/lib/html/src/Device.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Utils for device detection.
  */
diff --git a/sdk/lib/html/src/EventListener.dart b/sdk/lib/html/src/EventListener.dart
index e0093e2..2c9f2b4 100644
--- a/sdk/lib/html/src/EventListener.dart
+++ b/sdk/lib/html/src/EventListener.dart
@@ -2,4 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 typedef void EventListener(Event event);
diff --git a/sdk/lib/html/src/FilteredElementList.dart b/sdk/lib/html/src/FilteredElementList.dart
new file mode 100644
index 0000000..86a5787
--- /dev/null
+++ b/sdk/lib/html/src/FilteredElementList.dart
@@ -0,0 +1,104 @@
+// 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.
+
+part of html;
+
+class FilteredElementList implements List {
+  final Node _node;
+  final List<Node> _childNodes;
+
+  FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
+
+  // We can't memoize this, since it's possible that children will be messed
+  // with externally to this class.
+  //
+  // TODO(nweiz): Do we really need to copy the list to make the types work out?
+  List<Element> get _filtered =>
+    new List.from(_childNodes.filter((n) => n is Element));
+
+  void forEach(void f(Element element)) {
+    _filtered.forEach(f);
+  }
+
+  void operator []=(int index, Element value) {
+    this[index].replaceWith(value);
+  }
+
+  void set length(int newLength) {
+    final len = this.length;
+    if (newLength >= len) {
+      return;
+    } else if (newLength < 0) {
+      throw new ArgumentError("Invalid list length");
+    }
+
+    removeRange(newLength - 1, len - newLength);
+  }
+
+  void add(Element value) {
+    _childNodes.add(value);
+  }
+
+  void addAll(Collection<Element> collection) {
+    collection.forEach(add);
+  }
+
+  void addLast(Element value) {
+    add(value);
+  }
+
+  bool contains(Element element) {
+    return element is Element && _childNodes.contains(element);
+  }
+
+  void sort([Comparator<Element> compare = Comparable.compare]) {
+    throw new UnsupportedError('TODO(jacobr): should we impl?');
+  }
+
+  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
+    throw new UnimplementedError();
+  }
+
+  void removeRange(int start, int rangeLength) {
+    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
+  }
+
+  void insertRange(int start, int rangeLength, [initialValue = null]) {
+    throw new UnimplementedError();
+  }
+
+  void clear() {
+    // Currently, ElementList#clear clears even non-element nodes, so we follow
+    // that behavior.
+    _childNodes.clear();
+  }
+
+  Element removeLast() {
+    final result = this.last;
+    if (result != null) {
+      result.remove();
+    }
+    return result;
+  }
+
+  Collection map(f(Element element)) => _filtered.map(f);
+  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
+  bool every(bool f(Element element)) => _filtered.every(f);
+  bool some(bool f(Element element)) => _filtered.some(f);
+  bool get isEmpty => _filtered.isEmpty;
+  int get length => _filtered.length;
+  Element operator [](int index) => _filtered[index];
+  Iterator<Element> iterator() => _filtered.iterator();
+  List<Element> getRange(int start, int rangeLength) =>
+    _filtered.getRange(start, rangeLength);
+  int indexOf(Element element, [int start = 0]) =>
+    _filtered.indexOf(element, start);
+
+  int lastIndexOf(Element element, [int start = null]) {
+    if (start == null) start = length - 1;
+    return _filtered.lastIndexOf(element, start);
+  }
+
+  Element get last => _filtered.last;
+}
diff --git a/sdk/lib/html/src/Isolates.dart b/sdk/lib/html/src/Isolates.dart
index 7fc0277..fe0ea4b 100644
--- a/sdk/lib/html/src/Isolates.dart
+++ b/sdk/lib/html/src/Isolates.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 _serialize(var message) {
   return new _JsSerializer().traverse(message);
 }
diff --git a/sdk/lib/html/src/KeyCode.dart b/sdk/lib/html/src/KeyCode.dart
index 54771b7..4faa53d 100644
--- a/sdk/lib/html/src/KeyCode.dart
+++ b/sdk/lib/html/src/KeyCode.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Defines the keycode values for keys that are returned by 
  * KeyboardEvent.keyCode.
@@ -14,183 +16,183 @@
   // These constant names were borrowed from Closure's Keycode enumeration
   // class.
   // http://closure-library.googlecode.com/svn/docs/closure_goog_events_keycodes.js.source.html  
-  static final int WIN_KEY_FF_LINUX = 0;
-  static final int MAC_ENTER = 3;
-  static final int BACKSPACE = 8;
-  static final int TAB = 9;
+  static const int WIN_KEY_FF_LINUX = 0;
+  static const int MAC_ENTER = 3;
+  static const int BACKSPACE = 8;
+  static const int TAB = 9;
   /** NUM_CENTER is also NUMLOCK for FF and Safari on Mac. */
-  static final int NUM_CENTER = 12;
-  static final int ENTER = 13;
-  static final int SHIFT = 16;
-  static final int CTRL = 17;
-  static final int ALT = 18;
-  static final int PAUSE = 19;
-  static final int CAPS_LOCK = 20;
-  static final int ESC = 27;
-  static final int SPACE = 32;
-  static final int PAGE_UP = 33;
-  static final int PAGE_DOWN = 34;
-  static final int END = 35;
-  static final int HOME = 36;
-  static final int LEFT = 37;
-  static final int UP = 38;
-  static final int RIGHT = 39;
-  static final int DOWN = 40;
-  static final int NUM_NORTH_EAST = 33;
-  static final int NUM_SOUTH_EAST = 34;
-  static final int NUM_SOUTH_WEST = 35;
-  static final int NUM_NORTH_WEST = 36;
-  static final int NUM_WEST = 37;
-  static final int NUM_NORTH = 38;
-  static final int NUM_EAST = 39;
-  static final int NUM_SOUTH = 40;
-  static final int PRINT_SCREEN = 44;
-  static final int INSERT = 45;
-  static final int NUM_INSERT = 45;
-  static final int DELETE = 46;
-  static final int NUM_DELETE = 46;
-  static final int ZERO = 48;
-  static final int ONE = 49;
-  static final int TWO = 50;
-  static final int THREE = 51;
-  static final int FOUR = 52;
-  static final int FIVE = 53;
-  static final int SIX = 54;
-  static final int SEVEN = 55;
-  static final int EIGHT = 56;
-  static final int NINE = 57;
-  static final int FF_SEMICOLON = 59;
-  static final int FF_EQUALS = 61;
+  static const int NUM_CENTER = 12;
+  static const int ENTER = 13;
+  static const int SHIFT = 16;
+  static const int CTRL = 17;
+  static const int ALT = 18;
+  static const int PAUSE = 19;
+  static const int CAPS_LOCK = 20;
+  static const int ESC = 27;
+  static const int SPACE = 32;
+  static const int PAGE_UP = 33;
+  static const int PAGE_DOWN = 34;
+  static const int END = 35;
+  static const int HOME = 36;
+  static const int LEFT = 37;
+  static const int UP = 38;
+  static const int RIGHT = 39;
+  static const int DOWN = 40;
+  static const int NUM_NORTH_EAST = 33;
+  static const int NUM_SOUTH_EAST = 34;
+  static const int NUM_SOUTH_WEST = 35;
+  static const int NUM_NORTH_WEST = 36;
+  static const int NUM_WEST = 37;
+  static const int NUM_NORTH = 38;
+  static const int NUM_EAST = 39;
+  static const int NUM_SOUTH = 40;
+  static const int PRINT_SCREEN = 44;
+  static const int INSERT = 45;
+  static const int NUM_INSERT = 45;
+  static const int DELETE = 46;
+  static const int NUM_DELETE = 46;
+  static const int ZERO = 48;
+  static const int ONE = 49;
+  static const int TWO = 50;
+  static const int THREE = 51;
+  static const int FOUR = 52;
+  static const int FIVE = 53;
+  static const int SIX = 54;
+  static const int SEVEN = 55;
+  static const int EIGHT = 56;
+  static const int NINE = 57;
+  static const int FF_SEMICOLON = 59;
+  static const int FF_EQUALS = 61;
   /**
    * CAUTION: The question mark is for US-keyboard layouts. It varies
    * for other locales and keyboard layouts.
    */
-  static final int QUESTION_MARK = 63;
-  static final int A = 65;
-  static final int B = 66;
-  static final int C = 67;
-  static final int D = 68;
-  static final int E = 69;
-  static final int F = 70;
-  static final int G = 71;
-  static final int H = 72;
-  static final int I = 73;
-  static final int J = 74;
-  static final int K = 75;
-  static final int L = 76;
-  static final int M = 77;
-  static final int N = 78;
-  static final int O = 79;
-  static final int P = 80;
-  static final int Q = 81;
-  static final int R = 82;
-  static final int S = 83;
-  static final int T = 84;
-  static final int U = 85;
-  static final int V = 86;
-  static final int W = 87;
-  static final int X = 88;
-  static final int Y = 89;
-  static final int Z = 90;
-  static final int META = 91;
-  static final int WIN_KEY_LEFT = 91;
-  static final int WIN_KEY_RIGHT = 92;
-  static final int CONTEXT_MENU = 93;
-  static final int NUM_ZERO = 96;
-  static final int NUM_ONE = 97;
-  static final int NUM_TWO = 98;
-  static final int NUM_THREE = 99;
-  static final int NUM_FOUR = 100;
-  static final int NUM_FIVE = 101;
-  static final int NUM_SIX = 102;
-  static final int NUM_SEVEN = 103;
-  static final int NUM_EIGHT = 104;
-  static final int NUM_NINE = 105;
-  static final int NUM_MULTIPLY = 106;
-  static final int NUM_PLUS = 107;
-  static final int NUM_MINUS = 109;
-  static final int NUM_PERIOD = 110;
-  static final int NUM_DIVISION = 111;
-  static final int F1 = 112;
-  static final int F2 = 113;
-  static final int F3 = 114;
-  static final int F4 = 115;
-  static final int F5 = 116;
-  static final int F6 = 117;
-  static final int F7 = 118;
-  static final int F8 = 119;
-  static final int F9 = 120;
-  static final int F10 = 121;
-  static final int F11 = 122;
-  static final int F12 = 123;
-  static final int NUMLOCK = 144;
-  static final int SCROLL_LOCK = 145;
+  static const int QUESTION_MARK = 63;
+  static const int A = 65;
+  static const int B = 66;
+  static const int C = 67;
+  static const int D = 68;
+  static const int E = 69;
+  static const int F = 70;
+  static const int G = 71;
+  static const int H = 72;
+  static const int I = 73;
+  static const int J = 74;
+  static const int K = 75;
+  static const int L = 76;
+  static const int M = 77;
+  static const int N = 78;
+  static const int O = 79;
+  static const int P = 80;
+  static const int Q = 81;
+  static const int R = 82;
+  static const int S = 83;
+  static const int T = 84;
+  static const int U = 85;
+  static const int V = 86;
+  static const int W = 87;
+  static const int X = 88;
+  static const int Y = 89;
+  static const int Z = 90;
+  static const int META = 91;
+  static const int WIN_KEY_LEFT = 91;
+  static const int WIN_KEY_RIGHT = 92;
+  static const int CONTEXT_MENU = 93;
+  static const int NUM_ZERO = 96;
+  static const int NUM_ONE = 97;
+  static const int NUM_TWO = 98;
+  static const int NUM_THREE = 99;
+  static const int NUM_FOUR = 100;
+  static const int NUM_FIVE = 101;
+  static const int NUM_SIX = 102;
+  static const int NUM_SEVEN = 103;
+  static const int NUM_EIGHT = 104;
+  static const int NUM_NINE = 105;
+  static const int NUM_MULTIPLY = 106;
+  static const int NUM_PLUS = 107;
+  static const int NUM_MINUS = 109;
+  static const int NUM_PERIOD = 110;
+  static const int NUM_DIVISION = 111;
+  static const int F1 = 112;
+  static const int F2 = 113;
+  static const int F3 = 114;
+  static const int F4 = 115;
+  static const int F5 = 116;
+  static const int F6 = 117;
+  static const int F7 = 118;
+  static const int F8 = 119;
+  static const int F9 = 120;
+  static const int F10 = 121;
+  static const int F11 = 122;
+  static const int F12 = 123;
+  static const int NUMLOCK = 144;
+  static const int SCROLL_LOCK = 145;
 
   // OS-specific media keys like volume controls and browser controls.
-  static final int FIRST_MEDIA_KEY = 166;
-  static final int LAST_MEDIA_KEY = 183;
+  static const int FIRST_MEDIA_KEY = 166;
+  static const int LAST_MEDIA_KEY = 183;
 
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SEMICOLON = 186;
+  static const int SEMICOLON = 186;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int DASH = 189;
+  static const int DASH = 189;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int EQUALS = 187;
+  static const int EQUALS = 187;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int COMMA = 188;
+  static const int COMMA = 188;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int PERIOD = 190;
+  static const int PERIOD = 190;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SLASH = 191;
+  static const int SLASH = 191;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int APOSTROPHE = 192;
+  static const int APOSTROPHE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int TILDE = 192;
+  static const int TILDE = 192;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int SINGLE_QUOTE = 222;
+  static const int SINGLE_QUOTE = 222;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int OPEN_SQUARE_BRACKET = 219;
+  static const int OPEN_SQUARE_BRACKET = 219;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int BACKSLASH = 220;
+  static const int BACKSLASH = 220;
   /**
    * CAUTION: This constant requires localization for other locales and keyboard
    * layouts.
    */
-  static final int CLOSE_SQUARE_BRACKET = 221;
-  static final int WIN_KEY = 224;
-  static final int MAC_FF_META = 224;
-  static final int WIN_IME = 229;
+  static const int CLOSE_SQUARE_BRACKET = 221;
+  static const int WIN_KEY = 224;
+  static const int MAC_FF_META = 224;
+  static const int WIN_IME = 229;
 }
diff --git a/sdk/lib/html/src/KeyLocation.dart b/sdk/lib/html/src/KeyLocation.dart
index 899e5af..33d2887 100644
--- a/sdk/lib/html/src/KeyLocation.dart
+++ b/sdk/lib/html/src/KeyLocation.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Defines the standard key locations returned by
  * KeyboardEvent.getKeyLocation.
diff --git a/sdk/lib/html/src/KeyName.dart b/sdk/lib/html/src/KeyName.dart
index ee96ceb..402cdc2 100644
--- a/sdk/lib/html/src/KeyName.dart
+++ b/sdk/lib/html/src/KeyName.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Defines the standard keyboard identifier names for keys that are returned
  * by KeyEvent.getKeyboardIdentifier when the key does not have a direct
diff --git a/sdk/lib/html/src/Measurement.dart b/sdk/lib/html/src/Measurement.dart
index 4374226..7b72c93 100644
--- a/sdk/lib/html/src/Measurement.dart
+++ b/sdk/lib/html/src/Measurement.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 typedef Object ComputeValue();
 
 class _MeasurementRequest<T> {
diff --git a/sdk/lib/html/src/ReadyState.dart b/sdk/lib/html/src/ReadyState.dart
index 0f45dd7..37c3fdb 100644
--- a/sdk/lib/html/src/ReadyState.dart
+++ b/sdk/lib/html/src/ReadyState.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Contains the set of standard values returned by HTMLDocument.getReadyState.
  */
diff --git a/sdk/lib/html/src/Serialization.dart b/sdk/lib/html/src/Serialization.dart
index 9771c40..7ffaaaf 100644
--- a/sdk/lib/html/src/Serialization.dart
+++ b/sdk/lib/html/src/Serialization.dart
@@ -4,6 +4,8 @@
 
 // Patch file for the dart:isolate library.
 
+part of html;
+
 /********************************************************
   Inserted from lib/isolate/serialization.dart
  ********************************************************/
@@ -48,11 +50,11 @@
     return visitObject(x);
   }
 
-  abstract visitPrimitive(x);
-  abstract visitList(List x);
-  abstract visitMap(Map x);
-  abstract visitSendPort(SendPort x);
-  abstract visitSendPortSync(SendPortSync x);
+  visitPrimitive(x);
+  visitList(List x);
+  visitMap(Map x);
+  visitSendPort(SendPort x);
+  visitSendPortSync(SendPortSync x);
 
   visitObject(Object x) {
     // TODO(floitsch): make this a real exception. (which one)?
@@ -203,7 +205,7 @@
     return result;
   }
 
-  abstract deserializeSendPort(List x);
+  deserializeSendPort(List x);
 
   deserializeObject(List x) {
     // TODO(floitsch): Use real exception (which one?).
diff --git a/sdk/lib/html/src/Timer.dart b/sdk/lib/html/src/Timer.dart
index 35ceac2..91ad281 100644
--- a/sdk/lib/html/src/Timer.dart
+++ b/sdk/lib/html/src/Timer.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // TODO(antonm): support not DOM isolates too.
 class _Timer implements Timer {
   final canceller;
diff --git a/sdk/lib/html/src/_Collections.dart b/sdk/lib/html/src/_Collections.dart
index eb97494..4bd77cd 100644
--- a/sdk/lib/html/src/_Collections.dart
+++ b/sdk/lib/html/src/_Collections.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * The [Collections] class implements static methods useful when
  * writing a class that implements [Collection] and the [iterator]
diff --git a/sdk/lib/html/src/_HttpRequestUtils.dart b/sdk/lib/html/src/_HttpRequestUtils.dart
index 736d401..36a46ec 100644
--- a/sdk/lib/html/src/_HttpRequestUtils.dart
+++ b/sdk/lib/html/src/_HttpRequestUtils.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _HttpRequestUtils {
 
   // Helper for factory HttpRequest.get
diff --git a/sdk/lib/html/src/_ListIterators.dart b/sdk/lib/html/src/_ListIterators.dart
index 4dd7745..9812718 100644
--- a/sdk/lib/html/src/_ListIterators.dart
+++ b/sdk/lib/html/src/_ListIterators.dart
@@ -2,9 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // Iterator for arrays with fixed size.
-class _FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
-  _FixedSizeListIterator(List<T> array)
+class FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
+  FixedSizeListIterator(List<T> array)
       : super(array),
         _length = array.length;
 
diff --git a/sdk/lib/html/src/_Lists.dart b/sdk/lib/html/src/_Lists.dart
index 75d7905..ee26c91 100644
--- a/sdk/lib/html/src/_Lists.dart
+++ b/sdk/lib/html/src/_Lists.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _Lists {
 
   /**
diff --git a/sdk/lib/html/src/_Testing.dart b/sdk/lib/html/src/_Testing.dart
index 2917141..7b15688 100644
--- a/sdk/lib/html/src/_Testing.dart
+++ b/sdk/lib/html/src/_Testing.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // TODO(rnystrom): add a way to supress public classes from DartDoc output.
 // TODO(jacobr): we can remove this class now that we are using the $dom_
 // convention for deprecated methods rather than truly private methods.
@@ -16,4 +18,4 @@
     target.$dom_removeEventListener(type, listener, useCapture);
   }
 
-}
\ No newline at end of file
+}
diff --git a/sdk/lib/html/src/dart2js_Conversions.dart b/sdk/lib/html/src/dart2js_Conversions.dart
index b5daaf3..ab0b851 100644
--- a/sdk/lib/html/src/dart2js_Conversions.dart
+++ b/sdk/lib/html/src/dart2js_Conversions.dart
@@ -26,6 +26,8 @@
 // We omit an unwrapper for Window as no methods take a non-local
 // window as a parameter.
 
+part of html;
+
 Window _convertNativeToDart_Window(win) {
   return _DOMWindowCrossFrame._createSafe(win);
 }
@@ -61,6 +63,15 @@
 }
 
 ImageData _convertNativeToDart_ImageData(nativeImageData) {
+
+  // None of the native getters that return ImageData have the type ImageData
+  // since that is incorrect for FireFox (which returns a plain Object).  So we
+  // need something that tells the compiler that the ImageData class has been
+  // instantiated.
+  // TODO(sra): Remove this when all the ImageData returning APIs have been
+  // annotated as returning the union ImageData + Object.
+  JS('ImageData', '0');
+
   if (nativeImageData is ImageData) return nativeImageData;
 
   // On Firefox the above test fails because imagedata is a plain object.
@@ -76,7 +87,7 @@
 // with native names.
 _convertDartToNative_ImageData(ImageData imageData) {
   if (imageData is _TypedImageData) {
-    return JS('Object', '{data: #, height: #, width: #}',
+    return JS('', '{data: #, height: #, width: #}',
         imageData.data, imageData.height, imageData.width);
   }
   return imageData;
diff --git a/sdk/lib/html/src/dart2js_DOMImplementation.dart b/sdk/lib/html/src/dart2js_DOMImplementation.dart
index aca0758..43be003 100644
--- a/sdk/lib/html/src/dart2js_DOMImplementation.dart
+++ b/sdk/lib/html/src/dart2js_DOMImplementation.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // TODO(vsm): Unify with Dartium version.
 class _DOMWindowCrossFrame implements Window {
   // Private window.  Note, this is a window in another frame, so it
diff --git a/sdk/lib/html/src/dart2js_FactoryProviders.dart b/sdk/lib/html/src/dart2js_FactoryProviders.dart
index 51e0f12..a28e592 100644
--- a/sdk/lib/html/src/dart2js_FactoryProviders.dart
+++ b/sdk/lib/html/src/dart2js_FactoryProviders.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _AudioContextFactoryProvider {
 
   static AudioContext createAudioContext() {
diff --git a/sdk/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart b/sdk/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
index d962f6d..83e1906 100644
--- a/sdk/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
+++ b/sdk/lib/html/src/dart2js_IDBKeyRangeFactoryProvider.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _IDBKeyRangeFactoryProvider {
 
   static IDBKeyRange createIDBKeyRange_only(/*IDBKey*/ value) =>
diff --git a/sdk/lib/html/src/dart2js_LocationWrapper.dart b/sdk/lib/html/src/dart2js_LocationWrapper.dart
index 6401a6d..d0c9539 100644
--- a/sdk/lib/html/src/dart2js_LocationWrapper.dart
+++ b/sdk/lib/html/src/dart2js_LocationWrapper.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.
 
+part of html;
 
 // On Firefox 11, the object obtained from 'window.location' is very strange.
 // It can't be monkey-patched and seems immune to putting methods on
@@ -20,39 +21,54 @@
 
   // String hash;
   String get hash => _get(_ptr, 'hash');
-  void set hash(String value) => _set(_ptr, 'hash', value);
+  void set hash(String value) {
+    _set(_ptr, 'hash', value);
+  }
 
   // String host;
   String get host => _get(_ptr, 'host');
-  void set host(String value) => _set(_ptr, 'host', value);
+  void set host(String value) {
+    _set(_ptr, 'host', value);
+  }
 
   // String hostname;
   String get hostname => _get(_ptr, 'hostname');
-  void set hostname(String value) => _set(_ptr, 'hostname', value);
+  void set hostname(String value) {
+    _set(_ptr, 'hostname', value);
+  }
 
   // String href;
   String get href => _get(_ptr, 'href');
-  void set href(String value) => _set(_ptr, 'href', value);
+  void set href(String value) {
+    _set(_ptr, 'href', value);
+  }
 
   // final String origin;
   String get origin => _get(_ptr, 'origin');
 
   // String pathname;
   String get pathname => _get(_ptr, 'pathname');
-  void set pathname(String value) => _set(_ptr, 'pathname', value);
+  void set pathname(String value) {
+    _set(_ptr, 'pathname', value);
+  }
 
   // String port;
   String get port => _get(_ptr, 'port');
-  void set port(String value) => _set(_ptr, 'port', value);
+  void set port(String value) {
+    _set(_ptr, 'port', value);
+  }
 
   // String protocol;
   String get protocol => _get(_ptr, 'protocol');
-  void set protocol(String value) => _set(_ptr, 'protocol', value);
+  void set protocol(String value) {
+    _set(_ptr, 'protocol', value);
+  }
 
   // String search;
   String get search => _get(_ptr, 'search');
-  void set search(String value) => _set(_ptr, 'search', value);
-
+  void set search(String value) {
+    _set(_ptr, 'search', value);
+  }
 
   void assign(String url) => JS('void', '#.assign(#)', _ptr, url);
 
diff --git a/sdk/lib/html/src/dart2js_MutationObserverSupported.dart b/sdk/lib/html/src/dart2js_MutationObserverSupported.dart
index 2157df7..87fe26b 100644
--- a/sdk/lib/html/src/dart2js_MutationObserverSupported.dart
+++ b/sdk/lib/html/src/dart2js_MutationObserverSupported.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Checks to see if the mutation observer API is supported on the current
  * platform.
diff --git a/sdk/lib/html/src/dart2js_TypedArrayFactoryProvider.dart b/sdk/lib/html/src/dart2js_TypedArrayFactoryProvider.dart
index 185a91e..af103a1 100644
--- a/sdk/lib/html/src/dart2js_TypedArrayFactoryProvider.dart
+++ b/sdk/lib/html/src/dart2js_TypedArrayFactoryProvider.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _TypedArrayFactoryProvider {
 
   static Float32Array createFloat32Array(int length) => _F32(length);
diff --git a/sdk/lib/html/src/dartium_FactoryProviders.dart b/sdk/lib/html/src/dartium_FactoryProviders.dart
index 0678689..d270c89 100644
--- a/sdk/lib/html/src/dartium_FactoryProviders.dart
+++ b/sdk/lib/html/src/dartium_FactoryProviders.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _AudioContextFactoryProvider {
   static AudioContext createAudioContext() => _createAudioContext();
   static _createAudioContext([int numberOfChannels,
@@ -87,9 +89,9 @@
   static _U32(arg0, [arg1, arg2]) native "Uint32Array_constructor_Callback";
 
   static Uint8ClampedArray createUint8ClampedArray(int length) => _U8C(length);
-  static Uint8ClampedArray createUint8ClampedArrayUint8ClampedArray_fromList(
+  static Uint8ClampedArray createUint8ClampedArray_fromList(
       List<num> list) => _U8C(ensureNative(list));
-  static Uint8ClampedArray createUint8ClampedArrayUint8ClampedArray_fromBuffer(
+  static Uint8ClampedArray createUint8ClampedArray_fromBuffer(
       ArrayBuffer buffer, [int byteOffset = 0, int length]) =>
       _U8C(buffer, byteOffset, length);
   static _U8C(arg0, [arg1, arg2]) native "Uint8ClampedArray_constructor_Callback";
diff --git a/sdk/lib/html/src/dartium_MutationObserverSupported.dart b/sdk/lib/html/src/dartium_MutationObserverSupported.dart
index 8d194de..be94537 100644
--- a/sdk/lib/html/src/dartium_MutationObserverSupported.dart
+++ b/sdk/lib/html/src/dartium_MutationObserverSupported.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Checks to see if the mutation observer API is supported on the current
  * platform.
diff --git a/sdk/lib/html/src/native_DOMImplementation.dart b/sdk/lib/html/src/native_DOMImplementation.dart
index 206ec0f..3d3689c 100644
--- a/sdk/lib/html/src/native_DOMImplementation.dart
+++ b/sdk/lib/html/src/native_DOMImplementation.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _Utils {
   static List convertToList(List list) {
     // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
diff --git a/sdk/lib/html/src/native_DOMPublic.dart b/sdk/lib/html/src/native_DOMPublic.dart
index e06633f..3d224713 100644
--- a/sdk/lib/html/src/native_DOMPublic.dart
+++ b/sdk/lib/html/src/native_DOMPublic.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // This API is exploratory.
 spawnDomFunction(Function topLevelFunction) => _Utils.spawnDomFunctionImpl(topLevelFunction);
 
diff --git a/sdk/lib/html/src/shared_FactoryProviders.dart b/sdk/lib/html/src/shared_FactoryProviders.dart
index 045b43c..428a60d 100644
--- a/sdk/lib/html/src/shared_FactoryProviders.dart
+++ b/sdk/lib/html/src/shared_FactoryProviders.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class _CustomEventFactoryProvider {
   static CustomEvent createCustomEvent(String type, [bool canBubble = true,
       bool cancelable = true, Object detail = null]) {
@@ -69,10 +71,10 @@
   //   return fragment;
   // }
 
-  static DocumentFragment createDocumentFragment_svg(String svg) {
+  static DocumentFragment createDocumentFragment_svg(String svgContent) {
     final fragment = new DocumentFragment();
-    final e = new SVGSVGElement();
-    e.innerHTML = svg;
+    final e = new svg.SVGSVGElement();
+    e.innerHTML = svgContent;
 
     // Copy list first since we don't want liveness during iteration.
     final List nodes = new List.from(e.nodes);
@@ -80,37 +82,3 @@
     return fragment;
   }
 }
-
-class _SVGElementFactoryProvider {
-  static SVGElement createSVGElement_tag(String tag) {
-    final Element temp =
-      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
-    return temp;
-  }
-
-  static SVGElement createSVGElement_svg(String svg) {
-    Element parentTag;
-    final match = _START_TAG_REGEXP.firstMatch(svg);
-    if (match != null && match.group(1).toLowerCase() == 'svg') {
-      parentTag = new Element.tag('div');
-    } else {
-      parentTag = new SVGSVGElement();
-    }
-
-    parentTag.innerHTML = svg;
-    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
-
-    throw new ArgumentError(
-        'SVG had ${parentTag.elements.length} '
-        'top-level elements but 1 expected');
-  }
-}
-
-class _SVGSVGElementFactoryProvider {
-  static SVGSVGElement createSVGSVGElement() {
-    final el = new SVGElement.tag("svg");
-    // The SVG spec requires the version attribute to match the spec version
-    el.attributes['version'] = "1.1";
-    return el;
-  }
-}
diff --git a/sdk/lib/html/src/shared_SVGFactoryProviders.dart b/sdk/lib/html/src/shared_SVGFactoryProviders.dart
new file mode 100644
index 0000000..833f7e8
--- /dev/null
+++ b/sdk/lib/html/src/shared_SVGFactoryProviders.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 svg;
+
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
+
+class _SVGElementFactoryProvider {
+  static SVGElement createSVGElement_tag(String tag) {
+    final Element temp =
+      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
+    return temp;
+  }
+
+  static SVGElement createSVGElement_svg(String svg) {
+    Element parentTag;
+    final match = _START_TAG_REGEXP.firstMatch(svg);
+    if (match != null && match.group(1).toLowerCase() == 'svg') {
+      parentTag = new Element.tag('div');
+    } else {
+      parentTag = new SVGSVGElement();
+    }
+
+    parentTag.innerHTML = svg;
+    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
+
+    throw new ArgumentError(
+        'SVG had ${parentTag.elements.length} '
+        'top-level elements but 1 expected');
+  }
+}
+
+class _SVGSVGElementFactoryProvider {
+  static SVGSVGElement createSVGSVGElement() {
+    final el = new SVGElement.tag("svg");
+    // The SVG spec requires the version attribute to match the spec version
+    el.attributes['version'] = "1.1";
+    return el;
+  }
+}
diff --git a/sdk/lib/html/templates/dart2js_impl.darttemplate b/sdk/lib/html/templates/dart2js_impl.darttemplate
index adf1cf1..aa72fd2 100644
--- a/sdk/lib/html/templates/dart2js_impl.darttemplate
+++ b/sdk/lib/html/templates/dart2js_impl.darttemplate
@@ -1,3 +1,8 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of $LIBRARYNAME;
 
 /// @domName $DOMNAME
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider.darttemplate
index bf8743d..9a44cbc 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static $CONSTRUCTOR create$(CONSTRUCTOR)($PARAMETERS) =>
       JS('$CONSTRUCTOR', 'new $NAMED_CONSTRUCTOR($ARGUMENTS_PATTERN)'$PRE_ARGUMENTS_COMMA $ARGUMENTS);
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_AudioElement.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_AudioElement.darttemplate
index be657c3..25dda96 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_AudioElement.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_AudioElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static AudioElement createAudioElement([String src = null]) {
     if (src == null) return JS('AudioElement', 'new Audio()');
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
index 886b77c..51f20d4 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_Blob.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static Blob createBlob([List blobParts = null, String type, String endings]) {
     // TODO: validate that blobParts is a JS Array and convert if not.
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_CSSMatrix.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_CSSMatrix.darttemplate
index 261bd5c..90adc44 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_CSSMatrix.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_CSSMatrix.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static CSSMatrix createCSSMatrix([String cssValue = '']) =>
       JS('CSSMatrix', 'new WebKitCSSMatrix(#)', cssValue);
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
index d903761..fb75e50 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static DataView createDataView(
       ArrayBuffer buffer, [int byteOffset = null, int byteLength = null]) {
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_FormData.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_FormData.darttemplate
index b0e5c3a..2e5d2cd 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_FormData.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_FormData.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static FormData createFormData([FormElement form = null]) {
     if (form == null) return JS('FormData', 'new FormData()');
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_HttpRequest.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_HttpRequest.darttemplate
index aae0b21..c1acc88 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_HttpRequest.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_HttpRequest.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static HttpRequest createHttpRequest() =>
       JS('HttpRequest', 'new XMLHttpRequest()');
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate
index 83ff8c9..d92979b 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate
@@ -2,8 +2,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
-  static $CONSTRUCTOR create$(CONSTRUCTOR)(MutationCallback callback) native '''
+  static $CONSTRUCTOR create$(CONSTRUCTOR)(MutationCallback callback) {
+
+    // This is a hack to cause MutationRecord to appear to be instantiated.
+    //
+    // MutationCallback has a parameter type List<MutationRecord>.  From this we
+    // infer a list is created in the browser, but not the element type, because
+    // other native fields and methods return plain List which is too general
+    // and would imply creating anything.  This statement is a work-around.
+    JS('MutationRecord','0');
+
+    return _create$(CONSTRUCTOR)(callback);
+  }
+
+  static $CONSTRUCTOR _create$(CONSTRUCTOR)(MutationCallback callback) native '''
     var constructor =
         window.MutationObserver || window.WebKitMutationObserver ||
         window.MozMutationObserver;
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_OptionElement.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_OptionElement.darttemplate
index 22769d8..eef4e6d 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_OptionElement.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_OptionElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static OptionElement createOptionElement(
       [String data, String value, bool defaultSelected, bool selected]) {
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
index 7d82ab5..804c247 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static ShadowRoot createShadowRoot(Element host) =>
       JS('ShadowRoot',
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
index bb3dcea..9d5d745 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_SharedWorker.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static SharedWorker createSharedWorker(String scriptURL, [String name]) {
     if (name == null) return JS('SharedWorker', 'new SharedWorker(#)', scriptURL);
diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
index 41b068d..f1e5a8d 100644
--- a/sdk/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_TextTrackCue.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static TextTrackCue createTextTrackCue(
       String id, num startTime, num endTime, String text,
diff --git a/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate b/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate
index cfd1e67..b2de0d3 100644
--- a/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/html_dart2js.darttemplate
@@ -9,11 +9,15 @@
 
 import 'dart:isolate';
 import 'dart:json';
+import 'dart:svg' as svg;
 
 $!GENERATED_DART_FILES
 
 part '$AUXILIARY_DIR/CrossFrameTypes.dart';
+part '$AUXILIARY_DIR/CssClassSet.dart';
+part '$AUXILIARY_DIR/Device.dart';
 part '$AUXILIARY_DIR/EventListener.dart';
+part '$AUXILIARY_DIR/FilteredElementList.dart';
 part '$AUXILIARY_DIR/KeyCode.dart';
 part '$AUXILIARY_DIR/KeyLocation.dart';
 part '$AUXILIARY_DIR/KeyName.dart';
@@ -33,14 +37,13 @@
 part '$AUXILIARY_DIR/dart2js_MutationObserverSupported.dart';
 part '$AUXILIARY_DIR/dart2js_TypedArrayFactoryProvider.dart';
 part '$AUXILIARY_DIR/_Testing.dart';
-part '$AUXILIARY_DIR/Device.dart';
 part '$AUXILIARY_DIR/_ListIterators.dart';
 part '$AUXILIARY_DIR/_Lists.dart';
 
 
 LocalWindow get window => JS('LocalWindow', 'window');
 
-Document get document => JS('Document', 'document');
+HtmlDocument get document => JS('Document', 'document');
 
 Element query(String selector) => document.query(selector);
 List<Element> queryAll(String selector) => document.queryAll(selector);
diff --git a/sdk/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
index c12866a..fc2081d 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 
   // TODO(efortuna): Remove these methods when Chrome stable also uses start
diff --git a/sdk/lib/html/templates/html/dart2js/impl_Console.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_Console.darttemplate
index 751c4ce..afa4b5b 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_Console.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_Console.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME
     // Console is sometimes a singleton bag-of-properties without a prototype.
     native "=(typeof console == 'undefined' ? {} : console)" {
diff --git a/sdk/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
index 1f33377..6ca992f 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME extends $SUPER {
   $CLASSNAME(EventTarget _ptr) : super(_ptr);
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate
index 0082f70..c40b2bb 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 
   IDBTransaction transaction(storeName_OR_storeNames, String mode) {
diff --git a/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
index 117e0b7..8f095cb 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
 
   Document get document => JS('Document', '#.document', this);
@@ -46,7 +48,7 @@
     }
   }
 
-  var _location_wrapper;  // Cached wrapped Location object.
+  _LocationWrapper _location_wrapper;  // Cached wrapped Location object.
 
   // Native getter and setter to access raw Location object.
   Location get _location => JS('Location', '#.location', this);
diff --git a/sdk/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
index cda9bda..4386d4c 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(String type, Window view, int detail, int screenX,
       int screenY, int clientX, int clientY, int button, [bool canBubble = true,
diff --git a/sdk/lib/html/templates/html/dart2js/impl_SelectElement.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_SelectElement.darttemplate
index f9072fa..10b2673 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_SelectElement.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_SelectElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 
diff --git a/sdk/lib/html/templates/html/dart2js/impl_TableElement.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_TableElement.darttemplate
index aa8e769..af3eed4 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_TableElement.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_TableElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 
diff --git a/sdk/lib/html/templates/html/dart2js/impl_Url.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_Url.darttemplate
index 66a735c..74019c5e 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_Url.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_Url.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 
   static String createObjectUrl(blob_OR_source_OR_stream) =>
diff --git a/sdk/lib/html/templates/html/dart2js/svg_dart2js.darttemplate b/sdk/lib/html/templates/html/dart2js/svg_dart2js.darttemplate
new file mode 100644
index 0000000..e5d0088
--- /dev/null
+++ b/sdk/lib/html/templates/html/dart2js/svg_dart2js.darttemplate
@@ -0,0 +1,10 @@
+// DO NOT EDIT
+// Auto-generated dart:svg library.
+
+library svg;
+
+import 'dart:html';
+
+part '$AUXILIARY_DIR/shared_SVGFactoryProviders.dart';
+
+$!GENERATED_DART_FILES
diff --git a/sdk/lib/html/templates/html/dartium/cpp_header.template b/sdk/lib/html/templates/html/dartium/cpp_header.template
index 3c1cb5c..bbe5835 100644
--- a/sdk/lib/html/templates/html/dartium/cpp_header.template
+++ b/sdk/lib/html/templates/html/dartium/cpp_header.template
@@ -15,6 +15,7 @@
 
 struct Dart$INTERFACE {
     static const char* const dartImplementationClassName;
+    static const char* const dartImplementationLibraryName;
     typedef $WEBCORE_CLASS_NAME NativeType;
     static const bool isNode = $IS_NODE;
     static const bool isActive = $IS_ACTIVE;
diff --git a/sdk/lib/html/templates/html/dartium/cpp_implementation.template b/sdk/lib/html/templates/html/dartium/cpp_implementation.template
index 0cd8401..d06cb8d 100644
--- a/sdk/lib/html/templates/html/dartium/cpp_implementation.template
+++ b/sdk/lib/html/templates/html/dartium/cpp_implementation.template
@@ -23,5 +23,6 @@
 }
 
 const char* const Dart$(INTERFACE)::dartImplementationClassName = "$DART_IMPLEMENTATION_CLASS";
+const char* const Dart$(INTERFACE)::dartImplementationLibraryName = "$DART_IMPLEMENTATION_LIBRARY";
 
 }
diff --git a/sdk/lib/html/templates/html/dartium/dart_implementation.darttemplate b/sdk/lib/html/templates/html/dartium/dart_implementation.darttemplate
index bbecfdb..015ae9f 100644
--- a/sdk/lib/html/templates/html/dartium/dart_implementation.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/dart_implementation.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 /// @domName $DOMNAME
 class $CLASSNAME$EXTENDS$IMPLEMENTS {
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/dartium/factoryprovider.darttemplate b/sdk/lib/html/templates/html/dartium/factoryprovider.darttemplate
index d36e7f4..16f3515 100644
--- a/sdk/lib/html/templates/html/dartium/factoryprovider.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/factoryprovider.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static $INTERFACE create$INTERFACE($PARAMETERS) native "$NATIVE_NAME";
 }
diff --git a/sdk/lib/html/templates/html/dartium/factoryprovider_HttpRequest.darttemplate b/sdk/lib/html/templates/html/dartium/factoryprovider_HttpRequest.darttemplate
index 43c4429..b97cf21 100644
--- a/sdk/lib/html/templates/html/dartium/factoryprovider_HttpRequest.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/factoryprovider_HttpRequest.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $FACTORYPROVIDER {
   static $INTERFACE create$INTERFACE($PARAMETERS) => _create$INTERFACE($ARGUMENTS);
   static $INTERFACE _create$INTERFACE($PARAMETERS) native "$NATIVE_NAME";
diff --git a/sdk/lib/html/templates/html/dartium/html_dartium.darttemplate b/sdk/lib/html/templates/html/dartium/html_dartium.darttemplate
index eb16636..b357f74 100644
--- a/sdk/lib/html/templates/html/dartium/html_dartium.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/html_dartium.darttemplate
@@ -10,11 +10,14 @@
 import 'dart:isolate';
 import 'dart:json';
 import 'dart:nativewrappers';
+import 'dart:svg' as svg;
 
 $!GENERATED_DART_FILES
 
 part '$AUXILIARY_DIR/CrossFrameTypes.dart';
+part '$AUXILIARY_DIR/CssClassSet.dart';
 part '$AUXILIARY_DIR/EventListener.dart';
+part '$AUXILIARY_DIR/FilteredElementList.dart';
 part '$AUXILIARY_DIR/KeyCode.dart';
 part '$AUXILIARY_DIR/KeyLocation.dart';
 part '$AUXILIARY_DIR/KeyName.dart';
@@ -36,25 +39,24 @@
 part '$AUXILIARY_DIR/native_DOMPublic.dart';
 part '$AUXILIARY_DIR/native_DOMImplementation.dart';
 
-// FIXME (blois): Rename to _window (ditto __document).
-LocalWindow __window;
+LocalWindow _window;
 
 LocalWindow get window {
-  if (__window != null) {
-    return __window;
+  if (_window != null) {
+    return _window;
   }
-  __window = _Utils.window();
-  return __window;
+  _window = _Utils.window();
+  return _window;
 }
 
-Document __document;
+HtmlDocument _document;
 
-Document get document {
-  if (__document != null) {
-    return __document;
+HtmlDocument get document {
+  if (_document != null) {
+    return _document;
   }
-  __document = window.document;
-  return __document;
+  _document = window.document;
+  return _document;
 }
 
 
diff --git a/sdk/lib/html/templates/html/dartium/impl_LocalWindow.darttemplate b/sdk/lib/html/templates/html/dartium/impl_LocalWindow.darttemplate
index 0ce4dcf..6cedf2d 100644
--- a/sdk/lib/html/templates/html/dartium/impl_LocalWindow.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/impl_LocalWindow.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 
   /**
diff --git a/sdk/lib/html/templates/html/dartium/impl_MouseEvent.darttemplate b/sdk/lib/html/templates/html/dartium/impl_MouseEvent.darttemplate
index 7be8ca8..9042195 100644
--- a/sdk/lib/html/templates/html/dartium/impl_MouseEvent.darttemplate
+++ b/sdk/lib/html/templates/html/dartium/impl_MouseEvent.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(String type, Window view, int detail, int screenX,
       int screenY, int clientX, int clientY, int button, [bool canBubble = true,
diff --git a/sdk/lib/html/templates/html/dartium/svg_dartium.darttemplate b/sdk/lib/html/templates/html/dartium/svg_dartium.darttemplate
new file mode 100644
index 0000000..51aa884
--- /dev/null
+++ b/sdk/lib/html/templates/html/dartium/svg_dartium.darttemplate
@@ -0,0 +1,11 @@
+// DO NOT EDIT
+// Auto-generated dart:svg library.
+
+library svg;
+
+import 'dart:html';
+import 'dart:nativewrappers';
+
+part '$AUXILIARY_DIR/shared_SVGFactoryProviders.dart';
+
+$!GENERATED_DART_FILES
diff --git a/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate b/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
index 3813d0e..b648c9c 100644
--- a/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_AudioContext.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME();
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/sdk/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index adb8b73..de9e208 100644
--- a/sdk/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 String _cachedBrowserPrefix;
 
 String get _browserPrefix {
diff --git a/sdk/lib/html/templates/html/impl/impl_CanvasElement.darttemplate b/sdk/lib/html/templates/html/impl/impl_CanvasElement.darttemplate
index dba7b01..5264681 100644
--- a/sdk/lib/html/templates/html/impl/impl_CanvasElement.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_CanvasElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 
diff --git a/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate b/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
index 1198d89..1466cea 100644
--- a/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 
diff --git a/sdk/lib/html/templates/html/impl/impl_CustomEvent.darttemplate b/sdk/lib/html/templates/html/impl/impl_CustomEvent.darttemplate
index d76c038..7c84852 100644
--- a/sdk/lib/html/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_CustomEvent.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true,
       Object detail]) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(
diff --git a/sdk/lib/html/templates/html/impl/impl_Document.darttemplate b/sdk/lib/html/templates/html/impl/impl_Document.darttemplate
index 5469b16..3e7824d 100644
--- a/sdk/lib/html/templates/html/impl/impl_Document.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Document.darttemplate
@@ -2,10 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class $CLASSNAME extends Node
-$if DART2JS
-    native "*HTMLDocument"
-$endif
+part of html;
+
+class $CLASSNAME extends Node $NATIVESPEC
 {
 
 $!MEMBERS
@@ -14,14 +13,14 @@
   Element query(String selectors) {
     // It is fine for our RegExp to detect element id query selectors to have
     // false negatives but not false positives.
-    if (const RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
+    if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
       return $dom_getElementById(selectors.substring(1));
     }
     return $dom_querySelector(selectors);
   }
 
   List<Element> queryAll(String selectors) {
-    if (const RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
+    if (new RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByName(
           selectors.substring(7,selectors.length - 2));
       int len = mutableMatches.length;
@@ -30,7 +29,7 @@
         copyOfMatches[i] = mutableMatches[i];
       }
       return new _FrozenElementList._wrap(copyOfMatches);
-    } else if (const RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
+    } else if (new RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
       final mutableMatches = $dom_getElementsByTagName(selectors);
       int len = mutableMatches.length;
       final copyOfMatches = new List<Element>(len);
diff --git a/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate b/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
index d9e967d..c32a8fb 100644
--- a/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -2,128 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class _FilteredElementList implements List {
-  final Node _node;
-  final List<Node> _childNodes;
-
-  _FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
-
-  // We can't memoize this, since it's possible that children will be messed
-  // with externally to this class.
-  //
-  // TODO(nweiz): Do we really need to copy the list to make the types work out?
-  List<Element> get _filtered =>
-    new List.from(_childNodes.filter((n) => n is Element));
-
-  void forEach(void f(Element element)) {
-    _filtered.forEach(f);
-  }
-
-  void operator []=(int index, Element value) {
-    this[index].replaceWith(value);
-  }
-
-  void set length(int newLength) {
-    final len = this.length;
-    if (newLength >= len) {
-      return;
-    } else if (newLength < 0) {
-      throw new ArgumentError("Invalid list length");
-    }
-
-    removeRange(newLength - 1, len - newLength);
-  }
-
-  void add(Element value) {
-    _childNodes.add(value);
-  }
-
-  void addAll(Collection<Element> collection) {
-    collection.forEach(add);
-  }
-
-  void addLast(Element value) {
-    add(value);
-  }
-
-  bool contains(Element element) {
-    return element is Element && _childNodes.contains(element);
-  }
-
-  void sort([Comparator<Element> compare = Comparable.compare]) {
-    throw new UnsupportedError('TODO(jacobr): should we impl?');
-  }
-
-  void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
-    throw new UnimplementedError();
-  }
-
-  void removeRange(int start, int rangeLength) {
-    _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
-  }
-
-  void insertRange(int start, int rangeLength, [initialValue = null]) {
-    throw new UnimplementedError();
-  }
-
-  void clear() {
-    // Currently, ElementList#clear clears even non-element nodes, so we follow
-    // that behavior.
-    _childNodes.clear();
-  }
-
-  Element removeLast() {
-    final result = this.last;
-    if (result != null) {
-      result.remove();
-    }
-    return result;
-  }
-
-  Collection map(f(Element element)) => _filtered.map(f);
-  Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
-  bool every(bool f(Element element)) => _filtered.every(f);
-  bool some(bool f(Element element)) => _filtered.some(f);
-  bool get isEmpty => _filtered.isEmpty;
-  int get length => _filtered.length;
-  Element operator [](int index) => _filtered[index];
-  Iterator<Element> iterator() => _filtered.iterator();
-  List<Element> getRange(int start, int rangeLength) =>
-    _filtered.getRange(start, rangeLength);
-  int indexOf(Element element, [int start = 0]) =>
-    _filtered.indexOf(element, start);
-
-  int lastIndexOf(Element element, [int start = null]) {
-    if (start == null) start = length - 1;
-    return _filtered.lastIndexOf(element, start);
-  }
-
-  Element get last => _filtered.last;
-}
+part of html;
 
 Future<CSSStyleDeclaration> _emptyStyleFuture() {
   return _createMeasurementFuture(() => new Element.tag('div').style,
                                   new Completer<CSSStyleDeclaration>());
 }
 
-class EmptyElementRect implements ElementRect {
-  final ClientRect client = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect offset = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect scroll = const _SimpleClientRect(0, 0, 0, 0);
-  final ClientRect bounding = const _SimpleClientRect(0, 0, 0, 0);
-  final List<ClientRect> clientRects = const <ClientRect>[];
-
-  const EmptyElementRect();
-}
-
-class _FrozenCssClassSet extends _CssClassSet {
-  _FrozenCssClassSet() : super(null);
-
-  void _write(Set s) {
+class _FrozenCssClassSet extends CssClassSet {
+  void writeClasses(Set s) {
     throw new UnsupportedError(
         'frozen class set cannot be modified');
   }
-  Set<String> _read() => new Set<String>();
+  Set<String> readClasses() => new Set<String>();
 
   bool get frozen => true;
 }
@@ -134,14 +25,14 @@
   factory $CLASSNAME.html(String html) =>
       _$(CLASSNAME)FactoryProvider.createDocumentFragment_html(html);
 
-  factory $CLASSNAME.svg(String svg) =>
-      new _$(CLASSNAME)FactoryProvider.createDocumentFragment_svg(svg);
+  factory $CLASSNAME.svg(String svgContent) =>
+      new _$(CLASSNAME)FactoryProvider.createDocumentFragment_svg(svgContent);
 
   List<Element> _elements;
 
   List<Element> get elements {
     if (_elements == null) {
-      _elements = new _FilteredElementList(this);
+      _elements = new FilteredElementList(this);
     }
     return _elements;
   }
@@ -212,15 +103,10 @@
     this.insertAdjacentText('beforeend', text);
   }
 
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(() => const EmptyElementRect(),
-                                    new Completer<ElementRect>());
-  }
-
   // If we can come up with a semi-reasonable default value for an Element
   // getter, we'll use it. In general, these return the same values as an
   // element that has no parent.
diff --git a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
index f5c05f8..34d2d95 100644
--- a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
 // functionality.
 class _ChildrenElementList implements List {
@@ -470,136 +472,17 @@
   String _strip(String key) => key.substring(5);
 }
 
-abstract class CssClassSet implements Set<String> {
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String token);
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen;
-}
-
-class _CssClassSet extends CssClassSet {
+class _ElementCssClassSet extends CssClassSet {
 
   final Element _element;
 
-  _CssClassSet(this._element);
+  _ElementCssClassSet(this._element);
 
-  String toString() => _formatSet(_read());
+  Set<String> readClasses() {
+    var s = new Set<String>();
+    var classname = _element.$dom_className;
 
-  // interface Iterable - BEGIN
-  Iterator<String> iterator() => _read().iterator();
-  // interface Iterable - END
-
-  // interface Collection - BEGIN
-  void forEach(void f(String element)) {
-    _read().forEach(f);
-  }
-
-  Collection map(f(String element)) => _read().map(f);
-
-  Collection<String> filter(bool f(String element)) => _read().filter(f);
-
-  bool every(bool f(String element)) => _read().every(f);
-
-  bool some(bool f(String element)) => _read().some(f);
-
-  bool get isEmpty => _read().isEmpty;
-
-  /**
-   * Returns [:true:] if classes cannot be added or removed from this
-   * [:CssClassSet:].
-   */
-  bool get frozen => false;
-
-  int get length =>_read().length;
-
-  // interface Collection - END
-
-  // interface Set - BEGIN
-  bool contains(String value) => _read().contains(value);
-
-  void add(String value) {
-    // TODO - figure out if we need to do any validation here
-    // or if the browser natively does enough
-    _modify((s) => s.add(value));
-  }
-
-  bool remove(String value) {
-    Set<String> s = _read();
-    bool result = s.remove(value);
-    _write(s);
-    return result;
-  }
-
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String value) {
-    Set<String> s = _read();
-    bool result = false;
-    if (s.contains(value)) {
-      s.remove(value);
-    } else {
-      s.add(value);
-      result = true;
-    }
-    _write(s);
-    return result;
-  }
-
-  void addAll(Collection<String> collection) {
-    // TODO - see comment above about validation
-    _modify((s) => s.addAll(collection));
-  }
-
-  void removeAll(Collection<String> collection) {
-    _modify((s) => s.removeAll(collection));
-  }
-
-  bool isSubsetOf(Collection<String> collection) =>
-    _read().isSubsetOf(collection);
-
-  bool containsAll(Collection<String> collection) =>
-    _read().containsAll(collection);
-
-  Set<String> intersection(Collection<String> other) =>
-    _read().intersection(other);
-
-  void clear() {
-    _modify((s) => s.clear());
-  }
-  // interface Set - END
-
-  /**
-   * Helper method used to modify the set of css classes on this element.
-   *
-   *   f - callback with:
-   *      s - a Set of all the css class name currently on this element.
-   *
-   *   After f returns, the modified set is written to the
-   *       className property of this element.
-   */
-  void _modify( f(Set<String> s)) {
-    Set<String> s = _read();
-    f(s);
-    _write(s);
-  }
-
-  /**
-   * Read the class names from the Element class property,
-   * and put them into a set (duplicates are discarded).
-   */
-  Set<String> _read() {
-    // TODO(mattsh) simplify this once split can take regex.
-    Set<String> s = new Set<String>();
-    for (String name in _classname().split(' ')) {
+    for (String name in classname.split(' ')) {
       String trimmed = name.trim();
       if (!trimmed.isEmpty) {
         s.add(trimmed);
@@ -608,24 +491,9 @@
     return s;
   }
 
-  /**
-   * Read the class names as a space-separated string. This is meant to be
-   * overridden by subclasses.
-   */
-  String _classname() => _element.$dom_className;
-
-  /**
-   * Join all the elements of a set into one string and write
-   * back to the element.
-   */
-  void _write(Set s) {
-    _element.$dom_className = _formatSet(s);
-  }
-
-  String _formatSet(Set<String> s) {
-    // TODO(mattsh) should be able to pass Set to String.joins http:/b/5398605
+  void writeClasses(Set<String> s) {
     List list = new List.from(s);
-    return Strings.join(list, ' ');
+    _element.$dom_className = Strings.join(list, ' ');
   }
 }
 
@@ -647,53 +515,6 @@
   String toString() => "($left, $top, $width, $height)";
 }
 
-// TODO(jacobr): we cannot currently be lazy about calculating the client
-// rects as we must perform all measurement queries at a safe point to avoid
-// triggering unneeded layouts.
-/**
- * All your element measurement needs in one place.
- * @domName none
- */
-class ElementRect {
-  // Relative to offsetParent.
-  final ClientRect client;
-  final ClientRect offset;
-  final ClientRect scroll;
-
-  // TODO(jacobr): should we move these outside of ElementRect to avoid the
-  // overhead of computing them every time even though they are rarely used.
-  final ClientRect _boundingClientRect;
-  final _ClientRectList _clientRects;
-
-  ElementRect(Element element) :
-    client = new _SimpleClientRect(element.clientLeft,
-                                  element.clientTop,
-                                  element.clientWidth,
-                                  element.clientHeight),
-    offset = new _SimpleClientRect(element.offsetLeft,
-                                  element.offsetTop,
-                                  element.offsetWidth,
-                                  element.offsetHeight),
-    scroll = new _SimpleClientRect(element.scrollLeft,
-                                  element.scrollTop,
-                                  element.scrollWidth,
-                                  element.scrollHeight),
-    _boundingClientRect = element.getBoundingClientRect(),
-    _clientRects = element.getClientRects();
-
-  // In global coords.
-  ClientRect get bounding => _boundingClientRect;
-
-  // In global coords.
-  List<ClientRect> get clientRects {
-    final out = new List(_clientRects.length);
-    for (num i = 0; i < _clientRects.length; i++) {
-      out[i] = _clientRects.item(i);
-    }
-    return out;
-  }
-}
-
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 
   factory $CLASSNAME.html(String html) =>
@@ -733,7 +554,7 @@
     new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
 
   /** @domName className, classList */
-  CssClassSet get classes => new _CssClassSet(this);
+  CssClassSet get classes => new _ElementCssClassSet(this);
 
   void set classes(Collection<String> value) {
     CssClassSet classSet = classes;
@@ -752,17 +573,6 @@
     }
   }
 
-  /**
-   * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
-   * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
-   * scrollHeight, scrollWidth, scrollTop, scrollLeft
-   */
-  Future<ElementRect> get rect {
-    return _createMeasurementFuture(
-        () => new ElementRect(this),
-        new Completer<ElementRect>());
-  }
-
   /** @domName Window.getComputedStyle */
   Future<CSSStyleDeclaration> get computedStyle {
      // TODO(jacobr): last param should be null, see b/5045788
@@ -787,7 +597,7 @@
    * Parses the specified text as HTML and adds the resulting node after the
    * last child of this.
    */
-  void addHTML(String text) {
+  void addHtml(String text) {
     this.insertAdjacentHTML('beforeend', text);
   }
 
@@ -889,7 +699,7 @@
 // Temporary dispatch hook to support WebComponents.
 Function dynamicUnknownElementDispatcher;
 
-final _START_TAG_REGEXP = const RegExp('<(\\w+)');
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
 class _ElementFactoryProvider {
   static final _CUSTOM_PARENT_TAG_MAP = const {
     'body' : 'html',
diff --git a/sdk/lib/html/templates/html/impl/impl_Event.darttemplate b/sdk/lib/html/templates/html/impl/impl_Event.darttemplate
index 55d6039..deead54 100644
--- a/sdk/lib/html/templates/html/impl/impl_Event.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Event.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   // In JS, canBubble and cancelable are technically required parameters to
   // init*Event. In practice, though, if they aren't provided they simply
diff --git a/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate b/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
index cc89779..da4a6c2 100644
--- a/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class Events {
   /* Raw event target. */
   final EventTarget _ptr;
diff --git a/sdk/lib/html/templates/html/impl/impl_HtmlDocument.darttemplate b/sdk/lib/html/templates/html/impl/impl_HtmlDocument.darttemplate
new file mode 100644
index 0000000..a4b8033
--- /dev/null
+++ b/sdk/lib/html/templates/html/impl/impl_HtmlDocument.darttemplate
@@ -0,0 +1,82 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$!MEMBERS
+  /** @domName Document.body */
+  BodyElement get body => document.$dom_body;
+
+  /** @domName Document.body */
+  void set body(BodyElement value) {
+    document.$dom_body = value;
+  }
+
+  /** @domName Document.caretRangeFromPoint */
+  Range caretRangeFromPoint(int x, int y) {
+    return document.$dom_caretRangeFromPoint(x, y);
+  }
+
+  /** @domName Document.elementFromPoint */
+  Element elementFromPoint(int x, int y) {
+    return document.$dom_elementFromPoint(x, y);
+  }
+
+  /** @domName Document.head */
+  HeadElement get head => document.$dom_head;
+
+  /** @domName Document.lastModified */
+  String get lastModified => document.$dom_lastModified;
+
+  /** @domName Document.referrer */
+  String get referrer => document.$dom_referrer;
+
+  /** @domName Document.styleSheets */
+  List<StyleSheet> get styleSheets => document.$dom_styleSheets;
+
+  /** @domName Document.title */
+  String get title => document.$dom_title;
+
+  /** @domName Document.title */
+  void set title(String value) {
+    document.$dom_title = value;
+  }
+
+  /** @domName Document.webkitCancelFullScreen */
+  void webkitCancelFullScreen() {
+    document.$dom_webkitCancelFullScreen();
+  }
+
+  /** @domName Document.webkitExitFullscreen */
+  void webkitExitFullscreen() {
+    document.$dom_webkitExitFullscreen();
+  }
+
+  /** @domName Document.webkitExitPointerLock */
+  void webkitExitPointerLock() {
+    document.$dom_webkitExitPointerLock();
+  }
+
+  /** @domName Document.webkitFullscreenElement */
+  Element get webkitFullscreenElement => document.$dom_webkitFullscreenElement;
+
+  /** @domName Document.webkitFullscreenEnabled */
+  bool get webkitFullscreenEnabled => document.$dom_webkitFullscreenEnabled;
+
+  /** @domName Document.webkitHidden */
+  bool get webkitHidden => document.$dom_webkitHidden;
+
+  /** @domName Document.webkitIsFullScreen */
+  bool get webkitIsFullScreen => document.$dom_webkitIsFullScreen;
+
+  /** @domName Document.webkitPointerLockElement */
+  Element get webkitPointerLockElement =>
+      document.$dom_webkitPointerLockElement;
+
+  /** @domName Document.webkitVisibilityState */
+  String get webkitVisibilityState => document.$dom_webkitVisibilityState;
+}
diff --git a/sdk/lib/html/templates/html/impl/impl_HttpRequest.darttemplate b/sdk/lib/html/templates/html/impl/impl_HttpRequest.darttemplate
index cfc265e..6ec0f16 100644
--- a/sdk/lib/html/templates/html/impl/impl_HttpRequest.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_HttpRequest.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME.get(String url, onSuccess($CLASSNAME request)) =>
       _$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_get(url, onSuccess);
diff --git a/sdk/lib/html/templates/html/impl/impl_IDBKeyRange.darttemplate b/sdk/lib/html/templates/html/impl/impl_IDBKeyRange.darttemplate
index 3267cc9..2b60eba 100644
--- a/sdk/lib/html/templates/html/impl/impl_IDBKeyRange.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_IDBKeyRange.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   /**
    * @domName IDBKeyRange.only
diff --git a/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate b/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
index 3bca460..2bfbd2e 100644
--- a/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
   void observe(Node target,
diff --git a/sdk/lib/html/templates/html/impl/impl_Node.darttemplate b/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
index 48fab99..e15cb46 100644
--- a/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Node.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 /**
  * Lazy implementation of the child nodes of an element that does not request
  * the actual child nodes of an element until strictly necessary greatly
diff --git a/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate b/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
index e21a044..95bbddc 100644
--- a/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_NodeList.darttemplate
@@ -2,8 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 // TODO(nweiz): when all implementations we target have the same name for the
-// coreimpl implementation of List<E>, extend that rather than wrapping.
+// implementation of List<E>, extend that rather than wrapping.
 class _ListWrapper<E> implements List<E> {
   List _list;
 
@@ -93,7 +95,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<Node>(this);
+    return new FixedSizeListIterator<Node>(this);
   }
 
   // From Collection<Node>:
diff --git a/sdk/lib/html/templates/html/impl/impl_Point.darttemplate b/sdk/lib/html/templates/html/impl/impl_Point.darttemplate
index cc3451e..1ce9455 100644
--- a/sdk/lib/html/templates/html/impl/impl_Point.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Point.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(num x, num y) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(x, y);
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate b/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate
index 10fe7cc..077a8077 100644
--- a/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate
@@ -2,13 +2,32 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-class _AttributeClassSet extends _CssClassSet {
-  _AttributeClassSet(element) : super(element);
+part of svg;
 
-  String $dom_className() => _element.attributes['class'];
+class _AttributeClassSet extends CssClassSet {
+  final Element _element;
 
-  void _write(Set s) {
-    _element.attributes['class'] = _formatSet(s);
+  _AttributeClassSet(this._element);
+
+  Set<String> readClasses() {
+    var classname = _element.attributes['class'];
+
+    Set<String> s = new Set<String>();
+    if (classname == null) {
+      return s;
+    }
+    for (String name in classname.split(' ')) {
+      String trimmed = name.trim();
+      if (!trimmed.isEmpty) {
+        s.add(trimmed);
+      }
+    }
+    return s;
+  }
+
+  void writeClasses(Set s) {
+    List list = new List.from(s);
+    _element.attributes['class'] = Strings.join(list, ' ');
   }
 }
 
@@ -18,14 +37,15 @@
   factory $CLASSNAME.svg(String svg) =>
       _$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_svg(svg);
 
+  _AttributeClassSet _cssClassSet;
   CssClassSet get classes {
     if (_cssClassSet == null) {
-      _cssClassSet = new _AttributeClassSet(_ptr);
+      _cssClassSet = new _AttributeClassSet(this);
     }
     return _cssClassSet;
   }
 
-  List<Element> get elements => new _FilteredElementList(this);
+  List<Element> get elements => new FilteredElementList(this);
 
   void set elements(Collection<Element> value) {
     final elements = this.elements;
diff --git a/sdk/lib/html/templates/html/impl/impl_SVGSVGElement.darttemplate b/sdk/lib/html/templates/html/impl/impl_SVGSVGElement.darttemplate
index c9a30ba..c1a8204 100644
--- a/sdk/lib/html/templates/html/impl/impl_SVGSVGElement.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_SVGSVGElement.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of svg;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createSVGSVGElement();
 
diff --git a/sdk/lib/html/templates/html/impl/impl_ShadowRoot.darttemplate b/sdk/lib/html/templates/html/impl/impl_ShadowRoot.darttemplate
index 32c953a..50f732b 100644
--- a/sdk/lib/html/templates/html/impl/impl_ShadowRoot.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_ShadowRoot.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 $if DART2JS
diff --git a/sdk/lib/html/templates/html/impl/impl_Storage.darttemplate b/sdk/lib/html/templates/html/impl/impl_Storage.darttemplate
index f44d8d0..73dea1e 100644
--- a/sdk/lib/html/templates/html/impl/impl_Storage.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Storage.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS implements Map<String, String> $NATIVESPEC {
 
   // TODO(nweiz): update this when maps support lazy iteration
diff --git a/sdk/lib/html/templates/html/impl/impl_Text.darttemplate b/sdk/lib/html/templates/html/impl/impl_Text.darttemplate
index 615b530..6f8560f 100644
--- a/sdk/lib/html/templates/html/impl/impl_Text.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Text.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(String data) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(data);
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/impl/impl_WebSocket.darttemplate b/sdk/lib/html/templates/html/impl/impl_WebSocket.darttemplate
index 2c2ef59..564c30f 100644
--- a/sdk/lib/html/templates/html/impl/impl_WebSocket.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_WebSocket.darttemplate
@@ -4,6 +4,8 @@
 
 // WARNING: Do not edit - generated code.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
   factory $CLASSNAME(String url) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(url);
 $!MEMBERS
diff --git a/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate b/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
index 466b79a..c0fad3f 100644
--- a/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of html;
+
 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
 $!MEMBERS
 
diff --git a/sdk/lib/html/templates/html/impl/pure_interface.darttemplate b/sdk/lib/html/templates/html/impl/pure_interface.darttemplate
index 5f0e58c..139e82f 100644
--- a/sdk/lib/html/templates/html/impl/pure_interface.darttemplate
+++ b/sdk/lib/html/templates/html/impl/pure_interface.darttemplate
@@ -1,3 +1,9 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of $LIBRARYNAME;
+
 /// @domName $DOMNAME
 abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
 $!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface.darttemplate b/sdk/lib/html/templates/html/interface/interface.darttemplate
deleted file mode 100644
index d890d53..0000000
--- a/sdk/lib/html/templates/html/interface/interface.darttemplate
+++ /dev/null
@@ -1,9 +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.
-
-// WARNING: Do not edit - generated code.
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_AudioContext.darttemplate b/sdk/lib/html/templates/html/interface/interface_AudioContext.darttemplate
deleted file mode 100644
index 3d2ab5b..0000000
--- a/sdk/lib/html/templates/html/interface/interface_AudioContext.darttemplate
+++ /dev/null
@@ -1,12 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-  factory $ID() => _$(ID)FactoryProvider.create$ID();
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_CSSStyleDeclaration.darttemplate b/sdk/lib/html/templates/html/interface/interface_CSSStyleDeclaration.darttemplate
deleted file mode 100644
index 721738d..0000000
--- a/sdk/lib/html/templates/html/interface/interface_CSSStyleDeclaration.darttemplate
+++ /dev/null
@@ -1,1860 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS  {
-  factory $ID() => _$(ID)FactoryProvider.create$ID();
-  factory $ID.css(String css) => _$(ID)FactoryProvider.create$(ID)_css(css);
-
-$!MEMBERS
-
-  /** Gets the value of "animation" */
-  String get animation;
-
-  /** Sets the value of "animation" */
-  void set animation(var value);
-
-  /** Gets the value of "animation-delay" */
-  String get animationDelay;
-
-  /** Sets the value of "animation-delay" */
-  void set animationDelay(var value);
-
-  /** Gets the value of "animation-direction" */
-  String get animationDirection;
-
-  /** Sets the value of "animation-direction" */
-  void set animationDirection(var value);
-
-  /** Gets the value of "animation-duration" */
-  String get animationDuration;
-
-  /** Sets the value of "animation-duration" */
-  void set animationDuration(var value);
-
-  /** Gets the value of "animation-fill-mode" */
-  String get animationFillMode;
-
-  /** Sets the value of "animation-fill-mode" */
-  void set animationFillMode(var value);
-
-  /** Gets the value of "animation-iteration-count" */
-  String get animationIterationCount;
-
-  /** Sets the value of "animation-iteration-count" */
-  void set animationIterationCount(var value);
-
-  /** Gets the value of "animation-name" */
-  String get animationName;
-
-  /** Sets the value of "animation-name" */
-  void set animationName(var value);
-
-  /** Gets the value of "animation-play-state" */
-  String get animationPlayState;
-
-  /** Sets the value of "animation-play-state" */
-  void set animationPlayState(var value);
-
-  /** Gets the value of "animation-timing-function" */
-  String get animationTimingFunction;
-
-  /** Sets the value of "animation-timing-function" */
-  void set animationTimingFunction(var value);
-
-  /** Gets the value of "appearance" */
-  String get appearance;
-
-  /** Sets the value of "appearance" */
-  void set appearance(var value);
-
-  /** Gets the value of "backface-visibility" */
-  String get backfaceVisibility;
-
-  /** Sets the value of "backface-visibility" */
-  void set backfaceVisibility(var value);
-
-  /** Gets the value of "background" */
-  String get background;
-
-  /** Sets the value of "background" */
-  void set background(var value);
-
-  /** Gets the value of "background-attachment" */
-  String get backgroundAttachment;
-
-  /** Sets the value of "background-attachment" */
-  void set backgroundAttachment(var value);
-
-  /** Gets the value of "background-clip" */
-  String get backgroundClip;
-
-  /** Sets the value of "background-clip" */
-  void set backgroundClip(var value);
-
-  /** Gets the value of "background-color" */
-  String get backgroundColor;
-
-  /** Sets the value of "background-color" */
-  void set backgroundColor(var value);
-
-  /** Gets the value of "background-composite" */
-  String get backgroundComposite;
-
-  /** Sets the value of "background-composite" */
-  void set backgroundComposite(var value);
-
-  /** Gets the value of "background-image" */
-  String get backgroundImage;
-
-  /** Sets the value of "background-image" */
-  void set backgroundImage(var value);
-
-  /** Gets the value of "background-origin" */
-  String get backgroundOrigin;
-
-  /** Sets the value of "background-origin" */
-  void set backgroundOrigin(var value);
-
-  /** Gets the value of "background-position" */
-  String get backgroundPosition;
-
-  /** Sets the value of "background-position" */
-  void set backgroundPosition(var value);
-
-  /** Gets the value of "background-position-x" */
-  String get backgroundPositionX;
-
-  /** Sets the value of "background-position-x" */
-  void set backgroundPositionX(var value);
-
-  /** Gets the value of "background-position-y" */
-  String get backgroundPositionY;
-
-  /** Sets the value of "background-position-y" */
-  void set backgroundPositionY(var value);
-
-  /** Gets the value of "background-repeat" */
-  String get backgroundRepeat;
-
-  /** Sets the value of "background-repeat" */
-  void set backgroundRepeat(var value);
-
-  /** Gets the value of "background-repeat-x" */
-  String get backgroundRepeatX;
-
-  /** Sets the value of "background-repeat-x" */
-  void set backgroundRepeatX(var value);
-
-  /** Gets the value of "background-repeat-y" */
-  String get backgroundRepeatY;
-
-  /** Sets the value of "background-repeat-y" */
-  void set backgroundRepeatY(var value);
-
-  /** Gets the value of "background-size" */
-  String get backgroundSize;
-
-  /** Sets the value of "background-size" */
-  void set backgroundSize(var value);
-
-  /** Gets the value of "border" */
-  String get border;
-
-  /** Sets the value of "border" */
-  void set border(var value);
-
-  /** Gets the value of "border-after" */
-  String get borderAfter;
-
-  /** Sets the value of "border-after" */
-  void set borderAfter(var value);
-
-  /** Gets the value of "border-after-color" */
-  String get borderAfterColor;
-
-  /** Sets the value of "border-after-color" */
-  void set borderAfterColor(var value);
-
-  /** Gets the value of "border-after-style" */
-  String get borderAfterStyle;
-
-  /** Sets the value of "border-after-style" */
-  void set borderAfterStyle(var value);
-
-  /** Gets the value of "border-after-width" */
-  String get borderAfterWidth;
-
-  /** Sets the value of "border-after-width" */
-  void set borderAfterWidth(var value);
-
-  /** Gets the value of "border-before" */
-  String get borderBefore;
-
-  /** Sets the value of "border-before" */
-  void set borderBefore(var value);
-
-  /** Gets the value of "border-before-color" */
-  String get borderBeforeColor;
-
-  /** Sets the value of "border-before-color" */
-  void set borderBeforeColor(var value);
-
-  /** Gets the value of "border-before-style" */
-  String get borderBeforeStyle;
-
-  /** Sets the value of "border-before-style" */
-  void set borderBeforeStyle(var value);
-
-  /** Gets the value of "border-before-width" */
-  String get borderBeforeWidth;
-
-  /** Sets the value of "border-before-width" */
-  void set borderBeforeWidth(var value);
-
-  /** Gets the value of "border-bottom" */
-  String get borderBottom;
-
-  /** Sets the value of "border-bottom" */
-  void set borderBottom(var value);
-
-  /** Gets the value of "border-bottom-color" */
-  String get borderBottomColor;
-
-  /** Sets the value of "border-bottom-color" */
-  void set borderBottomColor(var value);
-
-  /** Gets the value of "border-bottom-left-radius" */
-  String get borderBottomLeftRadius;
-
-  /** Sets the value of "border-bottom-left-radius" */
-  void set borderBottomLeftRadius(var value);
-
-  /** Gets the value of "border-bottom-right-radius" */
-  String get borderBottomRightRadius;
-
-  /** Sets the value of "border-bottom-right-radius" */
-  void set borderBottomRightRadius(var value);
-
-  /** Gets the value of "border-bottom-style" */
-  String get borderBottomStyle;
-
-  /** Sets the value of "border-bottom-style" */
-  void set borderBottomStyle(var value);
-
-  /** Gets the value of "border-bottom-width" */
-  String get borderBottomWidth;
-
-  /** Sets the value of "border-bottom-width" */
-  void set borderBottomWidth(var value);
-
-  /** Gets the value of "border-collapse" */
-  String get borderCollapse;
-
-  /** Sets the value of "border-collapse" */
-  void set borderCollapse(var value);
-
-  /** Gets the value of "border-color" */
-  String get borderColor;
-
-  /** Sets the value of "border-color" */
-  void set borderColor(var value);
-
-  /** Gets the value of "border-end" */
-  String get borderEnd;
-
-  /** Sets the value of "border-end" */
-  void set borderEnd(var value);
-
-  /** Gets the value of "border-end-color" */
-  String get borderEndColor;
-
-  /** Sets the value of "border-end-color" */
-  void set borderEndColor(var value);
-
-  /** Gets the value of "border-end-style" */
-  String get borderEndStyle;
-
-  /** Sets the value of "border-end-style" */
-  void set borderEndStyle(var value);
-
-  /** Gets the value of "border-end-width" */
-  String get borderEndWidth;
-
-  /** Sets the value of "border-end-width" */
-  void set borderEndWidth(var value);
-
-  /** Gets the value of "border-fit" */
-  String get borderFit;
-
-  /** Sets the value of "border-fit" */
-  void set borderFit(var value);
-
-  /** Gets the value of "border-horizontal-spacing" */
-  String get borderHorizontalSpacing;
-
-  /** Sets the value of "border-horizontal-spacing" */
-  void set borderHorizontalSpacing(var value);
-
-  /** Gets the value of "border-image" */
-  String get borderImage;
-
-  /** Sets the value of "border-image" */
-  void set borderImage(var value);
-
-  /** Gets the value of "border-image-outset" */
-  String get borderImageOutset;
-
-  /** Sets the value of "border-image-outset" */
-  void set borderImageOutset(var value);
-
-  /** Gets the value of "border-image-repeat" */
-  String get borderImageRepeat;
-
-  /** Sets the value of "border-image-repeat" */
-  void set borderImageRepeat(var value);
-
-  /** Gets the value of "border-image-slice" */
-  String get borderImageSlice;
-
-  /** Sets the value of "border-image-slice" */
-  void set borderImageSlice(var value);
-
-  /** Gets the value of "border-image-source" */
-  String get borderImageSource;
-
-  /** Sets the value of "border-image-source" */
-  void set borderImageSource(var value);
-
-  /** Gets the value of "border-image-width" */
-  String get borderImageWidth;
-
-  /** Sets the value of "border-image-width" */
-  void set borderImageWidth(var value);
-
-  /** Gets the value of "border-left" */
-  String get borderLeft;
-
-  /** Sets the value of "border-left" */
-  void set borderLeft(var value);
-
-  /** Gets the value of "border-left-color" */
-  String get borderLeftColor;
-
-  /** Sets the value of "border-left-color" */
-  void set borderLeftColor(var value);
-
-  /** Gets the value of "border-left-style" */
-  String get borderLeftStyle;
-
-  /** Sets the value of "border-left-style" */
-  void set borderLeftStyle(var value);
-
-  /** Gets the value of "border-left-width" */
-  String get borderLeftWidth;
-
-  /** Sets the value of "border-left-width" */
-  void set borderLeftWidth(var value);
-
-  /** Gets the value of "border-radius" */
-  String get borderRadius;
-
-  /** Sets the value of "border-radius" */
-  void set borderRadius(var value);
-
-  /** Gets the value of "border-right" */
-  String get borderRight;
-
-  /** Sets the value of "border-right" */
-  void set borderRight(var value);
-
-  /** Gets the value of "border-right-color" */
-  String get borderRightColor;
-
-  /** Sets the value of "border-right-color" */
-  void set borderRightColor(var value);
-
-  /** Gets the value of "border-right-style" */
-  String get borderRightStyle;
-
-  /** Sets the value of "border-right-style" */
-  void set borderRightStyle(var value);
-
-  /** Gets the value of "border-right-width" */
-  String get borderRightWidth;
-
-  /** Sets the value of "border-right-width" */
-  void set borderRightWidth(var value);
-
-  /** Gets the value of "border-spacing" */
-  String get borderSpacing;
-
-  /** Sets the value of "border-spacing" */
-  void set borderSpacing(var value);
-
-  /** Gets the value of "border-start" */
-  String get borderStart;
-
-  /** Sets the value of "border-start" */
-  void set borderStart(var value);
-
-  /** Gets the value of "border-start-color" */
-  String get borderStartColor;
-
-  /** Sets the value of "border-start-color" */
-  void set borderStartColor(var value);
-
-  /** Gets the value of "border-start-style" */
-  String get borderStartStyle;
-
-  /** Sets the value of "border-start-style" */
-  void set borderStartStyle(var value);
-
-  /** Gets the value of "border-start-width" */
-  String get borderStartWidth;
-
-  /** Sets the value of "border-start-width" */
-  void set borderStartWidth(var value);
-
-  /** Gets the value of "border-style" */
-  String get borderStyle;
-
-  /** Sets the value of "border-style" */
-  void set borderStyle(var value);
-
-  /** Gets the value of "border-top" */
-  String get borderTop;
-
-  /** Sets the value of "border-top" */
-  void set borderTop(var value);
-
-  /** Gets the value of "border-top-color" */
-  String get borderTopColor;
-
-  /** Sets the value of "border-top-color" */
-  void set borderTopColor(var value);
-
-  /** Gets the value of "border-top-left-radius" */
-  String get borderTopLeftRadius;
-
-  /** Sets the value of "border-top-left-radius" */
-  void set borderTopLeftRadius(var value);
-
-  /** Gets the value of "border-top-right-radius" */
-  String get borderTopRightRadius;
-
-  /** Sets the value of "border-top-right-radius" */
-  void set borderTopRightRadius(var value);
-
-  /** Gets the value of "border-top-style" */
-  String get borderTopStyle;
-
-  /** Sets the value of "border-top-style" */
-  void set borderTopStyle(var value);
-
-  /** Gets the value of "border-top-width" */
-  String get borderTopWidth;
-
-  /** Sets the value of "border-top-width" */
-  void set borderTopWidth(var value);
-
-  /** Gets the value of "border-vertical-spacing" */
-  String get borderVerticalSpacing;
-
-  /** Sets the value of "border-vertical-spacing" */
-  void set borderVerticalSpacing(var value);
-
-  /** Gets the value of "border-width" */
-  String get borderWidth;
-
-  /** Sets the value of "border-width" */
-  void set borderWidth(var value);
-
-  /** Gets the value of "bottom" */
-  String get bottom;
-
-  /** Sets the value of "bottom" */
-  void set bottom(var value);
-
-  /** Gets the value of "box-align" */
-  String get boxAlign;
-
-  /** Sets the value of "box-align" */
-  void set boxAlign(var value);
-
-  /** Gets the value of "box-direction" */
-  String get boxDirection;
-
-  /** Sets the value of "box-direction" */
-  void set boxDirection(var value);
-
-  /** Gets the value of "box-flex" */
-  String get boxFlex;
-
-  /** Sets the value of "box-flex" */
-  void set boxFlex(var value);
-
-  /** Gets the value of "box-flex-group" */
-  String get boxFlexGroup;
-
-  /** Sets the value of "box-flex-group" */
-  void set boxFlexGroup(var value);
-
-  /** Gets the value of "box-lines" */
-  String get boxLines;
-
-  /** Sets the value of "box-lines" */
-  void set boxLines(var value);
-
-  /** Gets the value of "box-ordinal-group" */
-  String get boxOrdinalGroup;
-
-  /** Sets the value of "box-ordinal-group" */
-  void set boxOrdinalGroup(var value);
-
-  /** Gets the value of "box-orient" */
-  String get boxOrient;
-
-  /** Sets the value of "box-orient" */
-  void set boxOrient(var value);
-
-  /** Gets the value of "box-pack" */
-  String get boxPack;
-
-  /** Sets the value of "box-pack" */
-  void set boxPack(var value);
-
-  /** Gets the value of "box-reflect" */
-  String get boxReflect;
-
-  /** Sets the value of "box-reflect" */
-  void set boxReflect(var value);
-
-  /** Gets the value of "box-shadow" */
-  String get boxShadow;
-
-  /** Sets the value of "box-shadow" */
-  void set boxShadow(var value);
-
-  /** Gets the value of "box-sizing" */
-  String get boxSizing;
-
-  /** Sets the value of "box-sizing" */
-  void set boxSizing(var value);
-
-  /** Gets the value of "caption-side" */
-  String get captionSide;
-
-  /** Sets the value of "caption-side" */
-  void set captionSide(var value);
-
-  /** Gets the value of "clear" */
-  String get clear;
-
-  /** Sets the value of "clear" */
-  void set clear(var value);
-
-  /** Gets the value of "clip" */
-  String get clip;
-
-  /** Sets the value of "clip" */
-  void set clip(var value);
-
-  /** Gets the value of "color" */
-  String get color;
-
-  /** Sets the value of "color" */
-  void set color(var value);
-
-  /** Gets the value of "color-correction" */
-  String get colorCorrection;
-
-  /** Sets the value of "color-correction" */
-  void set colorCorrection(var value);
-
-  /** Gets the value of "column-break-after" */
-  String get columnBreakAfter;
-
-  /** Sets the value of "column-break-after" */
-  void set columnBreakAfter(var value);
-
-  /** Gets the value of "column-break-before" */
-  String get columnBreakBefore;
-
-  /** Sets the value of "column-break-before" */
-  void set columnBreakBefore(var value);
-
-  /** Gets the value of "column-break-inside" */
-  String get columnBreakInside;
-
-  /** Sets the value of "column-break-inside" */
-  void set columnBreakInside(var value);
-
-  /** Gets the value of "column-count" */
-  String get columnCount;
-
-  /** Sets the value of "column-count" */
-  void set columnCount(var value);
-
-  /** Gets the value of "column-gap" */
-  String get columnGap;
-
-  /** Sets the value of "column-gap" */
-  void set columnGap(var value);
-
-  /** Gets the value of "column-rule" */
-  String get columnRule;
-
-  /** Sets the value of "column-rule" */
-  void set columnRule(var value);
-
-  /** Gets the value of "column-rule-color" */
-  String get columnRuleColor;
-
-  /** Sets the value of "column-rule-color" */
-  void set columnRuleColor(var value);
-
-  /** Gets the value of "column-rule-style" */
-  String get columnRuleStyle;
-
-  /** Sets the value of "column-rule-style" */
-  void set columnRuleStyle(var value);
-
-  /** Gets the value of "column-rule-width" */
-  String get columnRuleWidth;
-
-  /** Sets the value of "column-rule-width" */
-  void set columnRuleWidth(var value);
-
-  /** Gets the value of "column-span" */
-  String get columnSpan;
-
-  /** Sets the value of "column-span" */
-  void set columnSpan(var value);
-
-  /** Gets the value of "column-width" */
-  String get columnWidth;
-
-  /** Sets the value of "column-width" */
-  void set columnWidth(var value);
-
-  /** Gets the value of "columns" */
-  String get columns;
-
-  /** Sets the value of "columns" */
-  void set columns(var value);
-
-  /** Gets the value of "content" */
-  String get content;
-
-  /** Sets the value of "content" */
-  void set content(var value);
-
-  /** Gets the value of "counter-increment" */
-  String get counterIncrement;
-
-  /** Sets the value of "counter-increment" */
-  void set counterIncrement(var value);
-
-  /** Gets the value of "counter-reset" */
-  String get counterReset;
-
-  /** Sets the value of "counter-reset" */
-  void set counterReset(var value);
-
-  /** Gets the value of "cursor" */
-  String get cursor;
-
-  /** Sets the value of "cursor" */
-  void set cursor(var value);
-
-  /** Gets the value of "direction" */
-  String get direction;
-
-  /** Sets the value of "direction" */
-  void set direction(var value);
-
-  /** Gets the value of "display" */
-  String get display;
-
-  /** Sets the value of "display" */
-  void set display(var value);
-
-  /** Gets the value of "empty-cells" */
-  String get emptyCells;
-
-  /** Sets the value of "empty-cells" */
-  void set emptyCells(var value);
-
-  /** Gets the value of "filter" */
-  String get filter;
-
-  /** Sets the value of "filter" */
-  void set filter(var value);
-
-  /** Gets the value of "flex-align" */
-  String get flexAlign;
-
-  /** Sets the value of "flex-align" */
-  void set flexAlign(var value);
-
-  /** Gets the value of "flex-flow" */
-  String get flexFlow;
-
-  /** Sets the value of "flex-flow" */
-  void set flexFlow(var value);
-
-  /** Gets the value of "flex-order" */
-  String get flexOrder;
-
-  /** Sets the value of "flex-order" */
-  void set flexOrder(var value);
-
-  /** Gets the value of "flex-pack" */
-  String get flexPack;
-
-  /** Sets the value of "flex-pack" */
-  void set flexPack(var value);
-
-  /** Gets the value of "float" */
-  String get float;
-
-  /** Sets the value of "float" */
-  void set float(var value);
-
-  /** Gets the value of "flow-from" */
-  String get flowFrom;
-
-  /** Sets the value of "flow-from" */
-  void set flowFrom(var value);
-
-  /** Gets the value of "flow-into" */
-  String get flowInto;
-
-  /** Sets the value of "flow-into" */
-  void set flowInto(var value);
-
-  /** Gets the value of "font" */
-  String get font;
-
-  /** Sets the value of "font" */
-  void set font(var value);
-
-  /** Gets the value of "font-family" */
-  String get fontFamily;
-
-  /** Sets the value of "font-family" */
-  void set fontFamily(var value);
-
-  /** Gets the value of "font-feature-settings" */
-  String get fontFeatureSettings;
-
-  /** Sets the value of "font-feature-settings" */
-  void set fontFeatureSettings(var value);
-
-  /** Gets the value of "font-size" */
-  String get fontSize;
-
-  /** Sets the value of "font-size" */
-  void set fontSize(var value);
-
-  /** Gets the value of "font-size-delta" */
-  String get fontSizeDelta;
-
-  /** Sets the value of "font-size-delta" */
-  void set fontSizeDelta(var value);
-
-  /** Gets the value of "font-smoothing" */
-  String get fontSmoothing;
-
-  /** Sets the value of "font-smoothing" */
-  void set fontSmoothing(var value);
-
-  /** Gets the value of "font-stretch" */
-  String get fontStretch;
-
-  /** Sets the value of "font-stretch" */
-  void set fontStretch(var value);
-
-  /** Gets the value of "font-style" */
-  String get fontStyle;
-
-  /** Sets the value of "font-style" */
-  void set fontStyle(var value);
-
-  /** Gets the value of "font-variant" */
-  String get fontVariant;
-
-  /** Sets the value of "font-variant" */
-  void set fontVariant(var value);
-
-  /** Gets the value of "font-weight" */
-  String get fontWeight;
-
-  /** Sets the value of "font-weight" */
-  void set fontWeight(var value);
-
-  /** @domName CSSStyleDeclaration.getPropertyValue. */
-  String getPropertyValue(String propertyName);
-
-  /** Gets the value of "height" */
-  String get height;
-
-  /** Sets the value of "height" */
-  void set height(var value);
-
-  /** Gets the value of "highlight" */
-  String get highlight;
-
-  /** Sets the value of "highlight" */
-  void set highlight(var value);
-
-  /** Gets the value of "hyphenate-character" */
-  String get hyphenateCharacter;
-
-  /** Sets the value of "hyphenate-character" */
-  void set hyphenateCharacter(var value);
-
-  /** Gets the value of "hyphenate-limit-after" */
-  String get hyphenateLimitAfter;
-
-  /** Sets the value of "hyphenate-limit-after" */
-  void set hyphenateLimitAfter(var value);
-
-  /** Gets the value of "hyphenate-limit-before" */
-  String get hyphenateLimitBefore;
-
-  /** Sets the value of "hyphenate-limit-before" */
-  void set hyphenateLimitBefore(var value);
-
-  /** Gets the value of "hyphenate-limit-lines" */
-  String get hyphenateLimitLines;
-
-  /** Sets the value of "hyphenate-limit-lines" */
-  void set hyphenateLimitLines(var value);
-
-  /** Gets the value of "hyphens" */
-  String get hyphens;
-
-  /** Sets the value of "hyphens" */
-  void set hyphens(var value);
-
-  /** Gets the value of "image-rendering" */
-  String get imageRendering;
-
-  /** Sets the value of "image-rendering" */
-  void set imageRendering(var value);
-
-  /** Gets the value of "left" */
-  String get left;
-
-  /** Sets the value of "left" */
-  void set left(var value);
-
-  /** Gets the value of "letter-spacing" */
-  String get letterSpacing;
-
-  /** Sets the value of "letter-spacing" */
-  void set letterSpacing(var value);
-
-  /** Gets the value of "line-box-contain" */
-  String get lineBoxContain;
-
-  /** Sets the value of "line-box-contain" */
-  void set lineBoxContain(var value);
-
-  /** Gets the value of "line-break" */
-  String get lineBreak;
-
-  /** Sets the value of "line-break" */
-  void set lineBreak(var value);
-
-  /** Gets the value of "line-clamp" */
-  String get lineClamp;
-
-  /** Sets the value of "line-clamp" */
-  void set lineClamp(var value);
-
-  /** Gets the value of "line-height" */
-  String get lineHeight;
-
-  /** Sets the value of "line-height" */
-  void set lineHeight(var value);
-
-  /** Gets the value of "list-style" */
-  String get listStyle;
-
-  /** Sets the value of "list-style" */
-  void set listStyle(var value);
-
-  /** Gets the value of "list-style-image" */
-  String get listStyleImage;
-
-  /** Sets the value of "list-style-image" */
-  void set listStyleImage(var value);
-
-  /** Gets the value of "list-style-position" */
-  String get listStylePosition;
-
-  /** Sets the value of "list-style-position" */
-  void set listStylePosition(var value);
-
-  /** Gets the value of "list-style-type" */
-  String get listStyleType;
-
-  /** Sets the value of "list-style-type" */
-  void set listStyleType(var value);
-
-  /** Gets the value of "locale" */
-  String get locale;
-
-  /** Sets the value of "locale" */
-  void set locale(var value);
-
-  /** Gets the value of "logical-height" */
-  String get logicalHeight;
-
-  /** Sets the value of "logical-height" */
-  void set logicalHeight(var value);
-
-  /** Gets the value of "logical-width" */
-  String get logicalWidth;
-
-  /** Sets the value of "logical-width" */
-  void set logicalWidth(var value);
-
-  /** Gets the value of "margin" */
-  String get margin;
-
-  /** Sets the value of "margin" */
-  void set margin(var value);
-
-  /** Gets the value of "margin-after" */
-  String get marginAfter;
-
-  /** Sets the value of "margin-after" */
-  void set marginAfter(var value);
-
-  /** Gets the value of "margin-after-collapse" */
-  String get marginAfterCollapse;
-
-  /** Sets the value of "margin-after-collapse" */
-  void set marginAfterCollapse(var value);
-
-  /** Gets the value of "margin-before" */
-  String get marginBefore;
-
-  /** Sets the value of "margin-before" */
-  void set marginBefore(var value);
-
-  /** Gets the value of "margin-before-collapse" */
-  String get marginBeforeCollapse;
-
-  /** Sets the value of "margin-before-collapse" */
-  void set marginBeforeCollapse(var value);
-
-  /** Gets the value of "margin-bottom" */
-  String get marginBottom;
-
-  /** Sets the value of "margin-bottom" */
-  void set marginBottom(var value);
-
-  /** Gets the value of "margin-bottom-collapse" */
-  String get marginBottomCollapse;
-
-  /** Sets the value of "margin-bottom-collapse" */
-  void set marginBottomCollapse(var value);
-
-  /** Gets the value of "margin-collapse" */
-  String get marginCollapse;
-
-  /** Sets the value of "margin-collapse" */
-  void set marginCollapse(var value);
-
-  /** Gets the value of "margin-end" */
-  String get marginEnd;
-
-  /** Sets the value of "margin-end" */
-  void set marginEnd(var value);
-
-  /** Gets the value of "margin-left" */
-  String get marginLeft;
-
-  /** Sets the value of "margin-left" */
-  void set marginLeft(var value);
-
-  /** Gets the value of "margin-right" */
-  String get marginRight;
-
-  /** Sets the value of "margin-right" */
-  void set marginRight(var value);
-
-  /** Gets the value of "margin-start" */
-  String get marginStart;
-
-  /** Sets the value of "margin-start" */
-  void set marginStart(var value);
-
-  /** Gets the value of "margin-top" */
-  String get marginTop;
-
-  /** Sets the value of "margin-top" */
-  void set marginTop(var value);
-
-  /** Gets the value of "margin-top-collapse" */
-  String get marginTopCollapse;
-
-  /** Sets the value of "margin-top-collapse" */
-  void set marginTopCollapse(var value);
-
-  /** Gets the value of "marquee" */
-  String get marquee;
-
-  /** Sets the value of "marquee" */
-  void set marquee(var value);
-
-  /** Gets the value of "marquee-direction" */
-  String get marqueeDirection;
-
-  /** Sets the value of "marquee-direction" */
-  void set marqueeDirection(var value);
-
-  /** Gets the value of "marquee-increment" */
-  String get marqueeIncrement;
-
-  /** Sets the value of "marquee-increment" */
-  void set marqueeIncrement(var value);
-
-  /** Gets the value of "marquee-repetition" */
-  String get marqueeRepetition;
-
-  /** Sets the value of "marquee-repetition" */
-  void set marqueeRepetition(var value);
-
-  /** Gets the value of "marquee-speed" */
-  String get marqueeSpeed;
-
-  /** Sets the value of "marquee-speed" */
-  void set marqueeSpeed(var value);
-
-  /** Gets the value of "marquee-style" */
-  String get marqueeStyle;
-
-  /** Sets the value of "marquee-style" */
-  void set marqueeStyle(var value);
-
-  /** Gets the value of "mask" */
-  String get mask;
-
-  /** Sets the value of "mask" */
-  void set mask(var value);
-
-  /** Gets the value of "mask-attachment" */
-  String get maskAttachment;
-
-  /** Sets the value of "mask-attachment" */
-  void set maskAttachment(var value);
-
-  /** Gets the value of "mask-box-image" */
-  String get maskBoxImage;
-
-  /** Sets the value of "mask-box-image" */
-  void set maskBoxImage(var value);
-
-  /** Gets the value of "mask-box-image-outset" */
-  String get maskBoxImageOutset;
-
-  /** Sets the value of "mask-box-image-outset" */
-  void set maskBoxImageOutset(var value);
-
-  /** Gets the value of "mask-box-image-repeat" */
-  String get maskBoxImageRepeat;
-
-  /** Sets the value of "mask-box-image-repeat" */
-  void set maskBoxImageRepeat(var value);
-
-  /** Gets the value of "mask-box-image-slice" */
-  String get maskBoxImageSlice;
-
-  /** Sets the value of "mask-box-image-slice" */
-  void set maskBoxImageSlice(var value);
-
-  /** Gets the value of "mask-box-image-source" */
-  String get maskBoxImageSource;
-
-  /** Sets the value of "mask-box-image-source" */
-  void set maskBoxImageSource(var value);
-
-  /** Gets the value of "mask-box-image-width" */
-  String get maskBoxImageWidth;
-
-  /** Sets the value of "mask-box-image-width" */
-  void set maskBoxImageWidth(var value);
-
-  /** Gets the value of "mask-clip" */
-  String get maskClip;
-
-  /** Sets the value of "mask-clip" */
-  void set maskClip(var value);
-
-  /** Gets the value of "mask-composite" */
-  String get maskComposite;
-
-  /** Sets the value of "mask-composite" */
-  void set maskComposite(var value);
-
-  /** Gets the value of "mask-image" */
-  String get maskImage;
-
-  /** Sets the value of "mask-image" */
-  void set maskImage(var value);
-
-  /** Gets the value of "mask-origin" */
-  String get maskOrigin;
-
-  /** Sets the value of "mask-origin" */
-  void set maskOrigin(var value);
-
-  /** Gets the value of "mask-position" */
-  String get maskPosition;
-
-  /** Sets the value of "mask-position" */
-  void set maskPosition(var value);
-
-  /** Gets the value of "mask-position-x" */
-  String get maskPositionX;
-
-  /** Sets the value of "mask-position-x" */
-  void set maskPositionX(var value);
-
-  /** Gets the value of "mask-position-y" */
-  String get maskPositionY;
-
-  /** Sets the value of "mask-position-y" */
-  void set maskPositionY(var value);
-
-  /** Gets the value of "mask-repeat" */
-  String get maskRepeat;
-
-  /** Sets the value of "mask-repeat" */
-  void set maskRepeat(var value);
-
-  /** Gets the value of "mask-repeat-x" */
-  String get maskRepeatX;
-
-  /** Sets the value of "mask-repeat-x" */
-  void set maskRepeatX(var value);
-
-  /** Gets the value of "mask-repeat-y" */
-  String get maskRepeatY;
-
-  /** Sets the value of "mask-repeat-y" */
-  void set maskRepeatY(var value);
-
-  /** Gets the value of "mask-size" */
-  String get maskSize;
-
-  /** Sets the value of "mask-size" */
-  void set maskSize(var value);
-
-  /** Gets the value of "match-nearest-mail-blockquote-color" */
-  String get matchNearestMailBlockquoteColor;
-
-  /** Sets the value of "match-nearest-mail-blockquote-color" */
-  void set matchNearestMailBlockquoteColor(var value);
-
-  /** Gets the value of "max-height" */
-  String get maxHeight;
-
-  /** Sets the value of "max-height" */
-  void set maxHeight(var value);
-
-  /** Gets the value of "max-logical-height" */
-  String get maxLogicalHeight;
-
-  /** Sets the value of "max-logical-height" */
-  void set maxLogicalHeight(var value);
-
-  /** Gets the value of "max-logical-width" */
-  String get maxLogicalWidth;
-
-  /** Sets the value of "max-logical-width" */
-  void set maxLogicalWidth(var value);
-
-  /** Gets the value of "max-width" */
-  String get maxWidth;
-
-  /** Sets the value of "max-width" */
-  void set maxWidth(var value);
-
-  /** Gets the value of "min-height" */
-  String get minHeight;
-
-  /** Sets the value of "min-height" */
-  void set minHeight(var value);
-
-  /** Gets the value of "min-logical-height" */
-  String get minLogicalHeight;
-
-  /** Sets the value of "min-logical-height" */
-  void set minLogicalHeight(var value);
-
-  /** Gets the value of "min-logical-width" */
-  String get minLogicalWidth;
-
-  /** Sets the value of "min-logical-width" */
-  void set minLogicalWidth(var value);
-
-  /** Gets the value of "min-width" */
-  String get minWidth;
-
-  /** Sets the value of "min-width" */
-  void set minWidth(var value);
-
-  /** Gets the value of "nbsp-mode" */
-  String get nbspMode;
-
-  /** Sets the value of "nbsp-mode" */
-  void set nbspMode(var value);
-
-  /** Gets the value of "opacity" */
-  String get opacity;
-
-  /** Sets the value of "opacity" */
-  void set opacity(var value);
-
-  /** Gets the value of "orphans" */
-  String get orphans;
-
-  /** Sets the value of "orphans" */
-  void set orphans(var value);
-
-  /** Gets the value of "outline" */
-  String get outline;
-
-  /** Sets the value of "outline" */
-  void set outline(var value);
-
-  /** Gets the value of "outline-color" */
-  String get outlineColor;
-
-  /** Sets the value of "outline-color" */
-  void set outlineColor(var value);
-
-  /** Gets the value of "outline-offset" */
-  String get outlineOffset;
-
-  /** Sets the value of "outline-offset" */
-  void set outlineOffset(var value);
-
-  /** Gets the value of "outline-style" */
-  String get outlineStyle;
-
-  /** Sets the value of "outline-style" */
-  void set outlineStyle(var value);
-
-  /** Gets the value of "outline-width" */
-  String get outlineWidth;
-
-  /** Sets the value of "outline-width" */
-  void set outlineWidth(var value);
-
-  /** Gets the value of "overflow" */
-  String get overflow;
-
-  /** Sets the value of "overflow" */
-  void set overflow(var value);
-
-  /** Gets the value of "overflow-x" */
-  String get overflowX;
-
-  /** Sets the value of "overflow-x" */
-  void set overflowX(var value);
-
-  /** Gets the value of "overflow-y" */
-  String get overflowY;
-
-  /** Sets the value of "overflow-y" */
-  void set overflowY(var value);
-
-  /** Gets the value of "padding" */
-  String get padding;
-
-  /** Sets the value of "padding" */
-  void set padding(var value);
-
-  /** Gets the value of "padding-after" */
-  String get paddingAfter;
-
-  /** Sets the value of "padding-after" */
-  void set paddingAfter(var value);
-
-  /** Gets the value of "padding-before" */
-  String get paddingBefore;
-
-  /** Sets the value of "padding-before" */
-  void set paddingBefore(var value);
-
-  /** Gets the value of "padding-bottom" */
-  String get paddingBottom;
-
-  /** Sets the value of "padding-bottom" */
-  void set paddingBottom(var value);
-
-  /** Gets the value of "padding-end" */
-  String get paddingEnd;
-
-  /** Sets the value of "padding-end" */
-  void set paddingEnd(var value);
-
-  /** Gets the value of "padding-left" */
-  String get paddingLeft;
-
-  /** Sets the value of "padding-left" */
-  void set paddingLeft(var value);
-
-  /** Gets the value of "padding-right" */
-  String get paddingRight;
-
-  /** Sets the value of "padding-right" */
-  void set paddingRight(var value);
-
-  /** Gets the value of "padding-start" */
-  String get paddingStart;
-
-  /** Sets the value of "padding-start" */
-  void set paddingStart(var value);
-
-  /** Gets the value of "padding-top" */
-  String get paddingTop;
-
-  /** Sets the value of "padding-top" */
-  void set paddingTop(var value);
-
-  /** Gets the value of "page" */
-  String get page;
-
-  /** Sets the value of "page" */
-  void set page(var value);
-
-  /** Gets the value of "page-break-after" */
-  String get pageBreakAfter;
-
-  /** Sets the value of "page-break-after" */
-  void set pageBreakAfter(var value);
-
-  /** Gets the value of "page-break-before" */
-  String get pageBreakBefore;
-
-  /** Sets the value of "page-break-before" */
-  void set pageBreakBefore(var value);
-
-  /** Gets the value of "page-break-inside" */
-  String get pageBreakInside;
-
-  /** Sets the value of "page-break-inside" */
-  void set pageBreakInside(var value);
-
-  /** Gets the value of "perspective" */
-  String get perspective;
-
-  /** Sets the value of "perspective" */
-  void set perspective(var value);
-
-  /** Gets the value of "perspective-origin" */
-  String get perspectiveOrigin;
-
-  /** Sets the value of "perspective-origin" */
-  void set perspectiveOrigin(var value);
-
-  /** Gets the value of "perspective-origin-x" */
-  String get perspectiveOriginX;
-
-  /** Sets the value of "perspective-origin-x" */
-  void set perspectiveOriginX(var value);
-
-  /** Gets the value of "perspective-origin-y" */
-  String get perspectiveOriginY;
-
-  /** Sets the value of "perspective-origin-y" */
-  void set perspectiveOriginY(var value);
-
-  /** Gets the value of "pointer-events" */
-  String get pointerEvents;
-
-  /** Sets the value of "pointer-events" */
-  void set pointerEvents(var value);
-
-  /** Gets the value of "position" */
-  String get position;
-
-  /** Sets the value of "position" */
-  void set position(var value);
-
-  /** Gets the value of "quotes" */
-  String get quotes;
-
-  /** Sets the value of "quotes" */
-  void set quotes(var value);
-
-  /** Gets the value of "region-break-after" */
-  String get regionBreakAfter;
-
-  /** Sets the value of "region-break-after" */
-  void set regionBreakAfter(var value);
-
-  /** Gets the value of "region-break-before" */
-  String get regionBreakBefore;
-
-  /** Sets the value of "region-break-before" */
-  void set regionBreakBefore(var value);
-
-  /** Gets the value of "region-break-inside" */
-  String get regionBreakInside;
-
-  /** Sets the value of "region-break-inside" */
-  void set regionBreakInside(var value);
-
-  /** Gets the value of "region-overflow" */
-  String get regionOverflow;
-
-  /** Sets the value of "region-overflow" */
-  void set regionOverflow(var value);
-
-  /** Gets the value of "resize" */
-  String get resize;
-
-  /** Sets the value of "resize" */
-  void set resize(var value);
-
-  /** Gets the value of "right" */
-  String get right;
-
-  /** Sets the value of "right" */
-  void set right(var value);
-
-  /** Gets the value of "rtl-ordering" */
-  String get rtlOrdering;
-
-  /** Sets the value of "rtl-ordering" */
-  void set rtlOrdering(var value);
-
-  /** Gets the value of "size" */
-  String get size;
-
-  /** Sets the value of "size" */
-  void set size(var value);
-
-  /** Gets the value of "speak" */
-  String get speak;
-
-  /** Sets the value of "speak" */
-  void set speak(var value);
-
-  /** Gets the value of "src" */
-  String get src;
-
-  /** Sets the value of "src" */
-  void set src(var value);
-
-  /** Gets the value of "table-layout" */
-  String get tableLayout;
-
-  /** Sets the value of "table-layout" */
-  void set tableLayout(var value);
-
-  /** Gets the value of "tap-highlight-color" */
-  String get tapHighlightColor;
-
-  /** Sets the value of "tap-highlight-color" */
-  void set tapHighlightColor(var value);
-
-  /** Gets the value of "text-align" */
-  String get textAlign;
-
-  /** Sets the value of "text-align" */
-  void set textAlign(var value);
-
-  /** Gets the value of "text-combine" */
-  String get textCombine;
-
-  /** Sets the value of "text-combine" */
-  void set textCombine(var value);
-
-  /** Gets the value of "text-decoration" */
-  String get textDecoration;
-
-  /** Sets the value of "text-decoration" */
-  void set textDecoration(var value);
-
-  /** Gets the value of "text-decorations-in-effect" */
-  String get textDecorationsInEffect;
-
-  /** Sets the value of "text-decorations-in-effect" */
-  void set textDecorationsInEffect(var value);
-
-  /** Gets the value of "text-emphasis" */
-  String get textEmphasis;
-
-  /** Sets the value of "text-emphasis" */
-  void set textEmphasis(var value);
-
-  /** Gets the value of "text-emphasis-color" */
-  String get textEmphasisColor;
-
-  /** Sets the value of "text-emphasis-color" */
-  void set textEmphasisColor(var value);
-
-  /** Gets the value of "text-emphasis-position" */
-  String get textEmphasisPosition;
-
-  /** Sets the value of "text-emphasis-position" */
-  void set textEmphasisPosition(var value);
-
-  /** Gets the value of "text-emphasis-style" */
-  String get textEmphasisStyle;
-
-  /** Sets the value of "text-emphasis-style" */
-  void set textEmphasisStyle(var value);
-
-  /** Gets the value of "text-fill-color" */
-  String get textFillColor;
-
-  /** Sets the value of "text-fill-color" */
-  void set textFillColor(var value);
-
-  /** Gets the value of "text-indent" */
-  String get textIndent;
-
-  /** Sets the value of "text-indent" */
-  void set textIndent(var value);
-
-  /** Gets the value of "text-line-through" */
-  String get textLineThrough;
-
-  /** Sets the value of "text-line-through" */
-  void set textLineThrough(var value);
-
-  /** Gets the value of "text-line-through-color" */
-  String get textLineThroughColor;
-
-  /** Sets the value of "text-line-through-color" */
-  void set textLineThroughColor(var value);
-
-  /** Gets the value of "text-line-through-mode" */
-  String get textLineThroughMode;
-
-  /** Sets the value of "text-line-through-mode" */
-  void set textLineThroughMode(var value);
-
-  /** Gets the value of "text-line-through-style" */
-  String get textLineThroughStyle;
-
-  /** Sets the value of "text-line-through-style" */
-  void set textLineThroughStyle(var value);
-
-  /** Gets the value of "text-line-through-width" */
-  String get textLineThroughWidth;
-
-  /** Sets the value of "text-line-through-width" */
-  void set textLineThroughWidth(var value);
-
-  /** Gets the value of "text-orientation" */
-  String get textOrientation;
-
-  /** Sets the value of "text-orientation" */
-  void set textOrientation(var value);
-
-  /** Gets the value of "text-overflow" */
-  String get textOverflow;
-
-  /** Sets the value of "text-overflow" */
-  void set textOverflow(var value);
-
-  /** Gets the value of "text-overline" */
-  String get textOverline;
-
-  /** Sets the value of "text-overline" */
-  void set textOverline(var value);
-
-  /** Gets the value of "text-overline-color" */
-  String get textOverlineColor;
-
-  /** Sets the value of "text-overline-color" */
-  void set textOverlineColor(var value);
-
-  /** Gets the value of "text-overline-mode" */
-  String get textOverlineMode;
-
-  /** Sets the value of "text-overline-mode" */
-  void set textOverlineMode(var value);
-
-  /** Gets the value of "text-overline-style" */
-  String get textOverlineStyle;
-
-  /** Sets the value of "text-overline-style" */
-  void set textOverlineStyle(var value);
-
-  /** Gets the value of "text-overline-width" */
-  String get textOverlineWidth;
-
-  /** Sets the value of "text-overline-width" */
-  void set textOverlineWidth(var value);
-
-  /** Gets the value of "text-rendering" */
-  String get textRendering;
-
-  /** Sets the value of "text-rendering" */
-  void set textRendering(var value);
-
-  /** Gets the value of "text-security" */
-  String get textSecurity;
-
-  /** Sets the value of "text-security" */
-  void set textSecurity(var value);
-
-  /** Gets the value of "text-shadow" */
-  String get textShadow;
-
-  /** Sets the value of "text-shadow" */
-  void set textShadow(var value);
-
-  /** Gets the value of "text-size-adjust" */
-  String get textSizeAdjust;
-
-  /** Sets the value of "text-size-adjust" */
-  void set textSizeAdjust(var value);
-
-  /** Gets the value of "text-stroke" */
-  String get textStroke;
-
-  /** Sets the value of "text-stroke" */
-  void set textStroke(var value);
-
-  /** Gets the value of "text-stroke-color" */
-  String get textStrokeColor;
-
-  /** Sets the value of "text-stroke-color" */
-  void set textStrokeColor(var value);
-
-  /** Gets the value of "text-stroke-width" */
-  String get textStrokeWidth;
-
-  /** Sets the value of "text-stroke-width" */
-  void set textStrokeWidth(var value);
-
-  /** Gets the value of "text-transform" */
-  String get textTransform;
-
-  /** Sets the value of "text-transform" */
-  void set textTransform(var value);
-
-  /** Gets the value of "text-underline" */
-  String get textUnderline;
-
-  /** Sets the value of "text-underline" */
-  void set textUnderline(var value);
-
-  /** Gets the value of "text-underline-color" */
-  String get textUnderlineColor;
-
-  /** Sets the value of "text-underline-color" */
-  void set textUnderlineColor(var value);
-
-  /** Gets the value of "text-underline-mode" */
-  String get textUnderlineMode;
-
-  /** Sets the value of "text-underline-mode" */
-  void set textUnderlineMode(var value);
-
-  /** Gets the value of "text-underline-style" */
-  String get textUnderlineStyle;
-
-  /** Sets the value of "text-underline-style" */
-  void set textUnderlineStyle(var value);
-
-  /** Gets the value of "text-underline-width" */
-  String get textUnderlineWidth;
-
-  /** Sets the value of "text-underline-width" */
-  void set textUnderlineWidth(var value);
-
-  /** Gets the value of "top" */
-  String get top;
-
-  /** Sets the value of "top" */
-  void set top(var value);
-
-  /** Gets the value of "transform" */
-  String get transform;
-
-  /** Sets the value of "transform" */
-  void set transform(var value);
-
-  /** Gets the value of "transform-origin" */
-  String get transformOrigin;
-
-  /** Sets the value of "transform-origin" */
-  void set transformOrigin(var value);
-
-  /** Gets the value of "transform-origin-x" */
-  String get transformOriginX;
-
-  /** Sets the value of "transform-origin-x" */
-  void set transformOriginX(var value);
-
-  /** Gets the value of "transform-origin-y" */
-  String get transformOriginY;
-
-  /** Sets the value of "transform-origin-y" */
-  void set transformOriginY(var value);
-
-  /** Gets the value of "transform-origin-z" */
-  String get transformOriginZ;
-
-  /** Sets the value of "transform-origin-z" */
-  void set transformOriginZ(var value);
-
-  /** Gets the value of "transform-style" */
-  String get transformStyle;
-
-  /** Sets the value of "transform-style" */
-  void set transformStyle(var value);
-
-  /** Gets the value of "transition" */
-  String get transition;
-
-  /** Sets the value of "transition" */
-  void set transition(var value);
-
-  /** Gets the value of "transition-delay" */
-  String get transitionDelay;
-
-  /** Sets the value of "transition-delay" */
-  void set transitionDelay(var value);
-
-  /** Gets the value of "transition-duration" */
-  String get transitionDuration;
-
-  /** Sets the value of "transition-duration" */
-  void set transitionDuration(var value);
-
-  /** Gets the value of "transition-property" */
-  String get transitionProperty;
-
-  /** Sets the value of "transition-property" */
-  void set transitionProperty(var value);
-
-  /** Gets the value of "transition-timing-function" */
-  String get transitionTimingFunction;
-
-  /** Sets the value of "transition-timing-function" */
-  void set transitionTimingFunction(var value);
-
-  /** Gets the value of "unicode-bidi" */
-  String get unicodeBidi;
-
-  /** Sets the value of "unicode-bidi" */
-  void set unicodeBidi(var value);
-
-  /** Gets the value of "unicode-range" */
-  String get unicodeRange;
-
-  /** Sets the value of "unicode-range" */
-  void set unicodeRange(var value);
-
-  /** Gets the value of "user-drag" */
-  String get userDrag;
-
-  /** Sets the value of "user-drag" */
-  void set userDrag(var value);
-
-  /** Gets the value of "user-modify" */
-  String get userModify;
-
-  /** Sets the value of "user-modify" */
-  void set userModify(var value);
-
-  /** Gets the value of "user-select" */
-  String get userSelect;
-
-  /** Sets the value of "user-select" */
-  void set userSelect(var value);
-
-  /** Gets the value of "vertical-align" */
-  String get verticalAlign;
-
-  /** Sets the value of "vertical-align" */
-  void set verticalAlign(var value);
-
-  /** Gets the value of "visibility" */
-  String get visibility;
-
-  /** Sets the value of "visibility" */
-  void set visibility(var value);
-
-  /** Gets the value of "white-space" */
-  String get whiteSpace;
-
-  /** Sets the value of "white-space" */
-  void set whiteSpace(var value);
-
-  /** Gets the value of "widows" */
-  String get widows;
-
-  /** Sets the value of "widows" */
-  void set widows(var value);
-
-  /** Gets the value of "width" */
-  String get width;
-
-  /** Sets the value of "width" */
-  void set width(var value);
-
-  /** Gets the value of "word-break" */
-  String get wordBreak;
-
-  /** Sets the value of "word-break" */
-  void set wordBreak(var value);
-
-  /** Gets the value of "word-spacing" */
-  String get wordSpacing;
-
-  /** Sets the value of "word-spacing" */
-  void set wordSpacing(var value);
-
-  /** Gets the value of "word-wrap" */
-  String get wordWrap;
-
-  /** Sets the value of "word-wrap" */
-  void set wordWrap(var value);
-
-  /** Gets the value of "wrap-shape" */
-  String get wrapShape;
-
-  /** Sets the value of "wrap-shape" */
-  void set wrapShape(var value);
-
-  /** Gets the value of "writing-mode" */
-  String get writingMode;
-
-  /** Sets the value of "writing-mode" */
-  void set writingMode(var value);
-
-  /** Gets the value of "z-index" */
-  String get zIndex;
-
-  /** Sets the value of "z-index" */
-  void set zIndex(var value);
-
-  /** Gets the value of "zoom" */
-  String get zoom;
-
-  /** Sets the value of "zoom" */
-  void set zoom(var value);
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_CanvasElement.darttemplate b/sdk/lib/html/templates/html/interface/interface_CanvasElement.darttemplate
deleted file mode 100644
index 811a81a..0000000
--- a/sdk/lib/html/templates/html/interface/interface_CanvasElement.darttemplate
+++ /dev/null
@@ -1,13 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS
-  final CanvasRenderingContext2D context2d;
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_CanvasRenderingContext2D.darttemplate b/sdk/lib/html/templates/html/interface/interface_CanvasRenderingContext2D.darttemplate
deleted file mode 100644
index ae98fb4..0000000
--- a/sdk/lib/html/templates/html/interface/interface_CanvasRenderingContext2D.darttemplate
+++ /dev/null
@@ -1,40 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS
-
-  /**
-   * Sets the color used inside shapes.
-   * [r], [g], [b] are 0-255, [a] is 0-1.
-   */
-  void setFillColorRgb(int r, int g, int b, [num a]);
-
-  /**
-   * Sets the color used inside shapes.
-   * [h] is in degrees, 0-360.
-   * [s], [l] are in percent, 0-100.
-   * [a] is 0-1.
-   */
-  void setFillColorHsl(int h, num s, num l, [num a]);
-
-  /**
-   * Sets the color used for stroking shapes.
-   * [r], [g], [b] are 0-255, [a] is 0-1.
-   */
-  void setStrokeColorRgb(int r, int g, int b, [num a]);
-
-  /**
-   * Sets the color used for stroking shapes.
-   * [h] is in degrees, 0-360.
-   * [s], [l] are in percent, 0-100.
-   * [a] is 0-1.
-   */
-  void setStrokeColorHsl(int h, num s, num l, [num a]);
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_CustomEvent.darttemplate b/sdk/lib/html/templates/html/interface/interface_CustomEvent.darttemplate
deleted file mode 100644
index e7d801f..0000000
--- a/sdk/lib/html/templates/html/interface/interface_CustomEvent.darttemplate
+++ /dev/null
@@ -1,16 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  factory $ID(String type, [bool canBubble = true, bool cancelable = true,
-      Object detail = null]) => _$(ID)FactoryProvider.create$ID(type, canBubble,
-      cancelable, detail);
-
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_DocumentFragment.darttemplate b/sdk/lib/html/templates/html/interface/interface_DocumentFragment.darttemplate
deleted file mode 100644
index 66af3d0..0000000
--- a/sdk/lib/html/templates/html/interface/interface_DocumentFragment.darttemplate
+++ /dev/null
@@ -1,25 +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 html;
-
-$!COMMENT
-abstract class _IDocumentFragment extends Element {
-
-  factory _IDocumentFragment() => _$(ID)FactoryProvider.createDocumentFragment();
-
-  factory _IDocumentFragment.html(String html) =>
-      _$(ID)FactoryProvider.createDocumentFragment_html(html);
-
-  // TODO(nweiz): enable this when XML is ported
-  // /** WARNING: Currently this doesn't work on Dartium (issue 649). */
-  // DocumentFragment.xml(String xml);
-
-  factory DocumentFragment.svg(String svg) =>
-      new _$(ID)FactoryProvider.createDocumentFragment_svg(svg);
-
-  DocumentFragment clone(bool deep);
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_Element.darttemplate b/sdk/lib/html/templates/html/interface/interface_Element.darttemplate
deleted file mode 100644
index bb5e01b..0000000
--- a/sdk/lib/html/templates/html/interface/interface_Element.darttemplate
+++ /dev/null
@@ -1,118 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-/**
- * All your attribute manipulation needs in one place.
- * Extends the regular Map interface by automatically coercing non-string
- * values to strings.
- */
-abstract class AttributeMap implements Map<String, String> {
-  void operator []=(String key, value);
-}
-
-/**
- * All your element measurement needs in one place
- */
-abstract class ElementRect {
-  // Relative to offsetParent
-  ClientRect get client;
-  ClientRect get offset;
-  ClientRect get scroll;
-  // In global coords
-  ClientRect get bounding;
-  // In global coords
-  List<ClientRect> get clientRects;
-}
-
-abstract class NodeSelector {
-  Element query(String selectors);
-  List<Element> queryAll(String selectors);
-}
-
-abstract class CSSClassSet implements Set<String> {
-  /**
-   * Adds the class [token] to the element if it is not on it, removes it if it
-   * is.
-   */
-  bool toggle(String token);
-
-  /**
-   * Returns [:true:] classes cannot be added or removed from this
-   * [:CSSClassSet:].
-   */
-  bool get frozen;
-}
-
-$!COMMENT
-abstract class _IElement implements _INode, NodeSelector {
-  factory Element.html(String html) =>
-      _$(ID)FactoryProvider.createElement_html(html);
-  factory Element.tag(String tag) =>
-      _$(ID)FactoryProvider.createElement_tag(tag);
-
-  AttributeMap get attributes;
-  void set attributes(Map<String, String> value);
-
-  /**
-   * @domName childElementCount, firstElementChild, lastElementChild,
-   *   children, Node.nodes.add
-   */
-  List<Element> get elements;
-
-  void set elements(Collection<Element> value);
-
-  /** @domName className, classList */
-  CSSClassSet get classes;
-
-  void set classes(Collection<String> value);
-
-  AttributeMap get dataAttributes;
-  void set dataAttributes(Map<String, String> value);
-
-  /**
-   * Adds the specified text as a text node after the last child of this.
-   */
-  void addText(String text);
-
-  /**
-   * Parses the specified text as HTML and adds the resulting node after the
-   * last child of this.
-   */
-  void addHTML(String html);
-
-  /**
-   * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
-   * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
-   * scrollHeight, scrollWidth, scrollTop, scrollLeft
-   */
-  Future<ElementRect> get rect;
-
-  /** @domName Window.getComputedStyle */
-  Future<CSSStyleDeclaration> get computedStyle;
-
-  /** @domName Window.getComputedStyle */
-  Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement);
-
-  Element clone(bool deep);
-
-  Element get parent;
-
-  /**
-   * Experimental support for [web components][wc]. This field stores a
-   * reference to the component implementation. It was inspired by Mozilla's
-   * [x-tags][] project. Please note: in the future it may be possible to
-   * `extend Element` from your class, in which case this field will be
-   * deprecated and will simply return this [Element] object.
-   *
-   * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html
-   * [x-tags]: http://x-tags.org/
-   */
-  var xtag;
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_Event.darttemplate b/sdk/lib/html/templates/html/interface/interface_Event.darttemplate
deleted file mode 100644
index 141f0d6..0000000
--- a/sdk/lib/html/templates/html/interface/interface_Event.darttemplate
+++ /dev/null
@@ -1,20 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  // In JS, canBubble and cancelable are technically required parameters to
-  // init*Event. In practice, though, if they aren't provided they simply
-  // default to false (since that's Boolean(undefined)).
-  //
-  // Contrary to JS, we default canBubble and cancelable to true, since that's
-  // what people want most of the time anyway.
-  factory $ID(String type, [bool canBubble = true, bool cancelable = true]) =>
-      _$(ID)FactoryProvider.create$ID(type, canBubble, cancelable);
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_EventTarget.darttemplate b/sdk/lib/html/templates/html/interface/interface_EventTarget.darttemplate
deleted file mode 100644
index 4ef6cb6..0000000
--- a/sdk/lib/html/templates/html/interface/interface_EventTarget.darttemplate
+++ /dev/null
@@ -1,27 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-abstract class _IEventListenerList {
-  EventListenerList add(EventListener handler, [bool useCapture]);
-
-  EventListenerList remove(EventListener handler, [bool useCapture]);
-
-  bool dispatch(Event evt);
-}
-
-abstract class _IEvents {
-  EventListenerList operator [](String type);
-}
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  /** @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent */
-  abstract Events get on;
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_HttpRequest.darttemplate b/sdk/lib/html/templates/html/interface/interface_HttpRequest.darttemplate
deleted file mode 100644
index 5faa590..0000000
--- a/sdk/lib/html/templates/html/interface/interface_HttpRequest.darttemplate
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-  factory $ID.get(String url, onSuccess($ID request)) =>
-      _$(ID)FactoryProvider.create$(ID)_get(url, onSuccess);
-
-  factory $ID.getWithCredentials(String url, onSuccess($ID request)) =>
-      _$(ID)FactoryProvider.create$(ID)_getWithCredentials(url, onSuccess);
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_IDBKeyRange.darttemplate b/sdk/lib/html/templates/html/interface/interface_IDBKeyRange.darttemplate
deleted file mode 100644
index f19d5d8..0000000
--- a/sdk/lib/html/templates/html/interface/interface_IDBKeyRange.darttemplate
+++ /dev/null
@@ -1,38 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  /**
-   * @domName IDBKeyRange.only
-   */
-  factory IDBKeyRange.only(/*IDBKey*/ value) =>
-      _IDBKeyRangeFactoryProvider.create$(ID)_only(value);
-
-  /**
-   * @domName IDBKeyRange.lowerBound
-   */
-  factory IDBKeyRange.lowerBound(/*IDBKey*/ bound, [bool open = false]) =>
-      _IDBKeyRangeFactoryProvider.create$(ID)_lowerBound(bound, open);
-
-  /**
-   * @domName IDBKeyRange.upperBound
-   */
-  factory IDBKeyRange.upperBound(/*IDBKey*/ bound, [bool open = false]) =>
-      _IDBKeyRangeFactoryProvider.create$(ID)_upperBound(bound, open);
-
-  /**
-   * @domName IDBKeyRange.bound
-   */
-  factory IDBKeyRange.bound(/*IDBKey*/ lower, /*IDBKey*/ upper,
-                            [bool lowerOpen = false, bool upperOpen = false]) =>
-      _IDBKeyRangeFactoryProvider.create$(ID)_bound(
-          lower, upper, lowerOpen, upperOpen);
-
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_LocalWindow.darttemplate b/sdk/lib/html/templates/html/interface/interface_LocalWindow.darttemplate
deleted file mode 100644
index a079d72..0000000
--- a/sdk/lib/html/templates/html/interface/interface_LocalWindow.darttemplate
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  /**
-   * Register a [port] on this window under the given [name].  This
-   * port may be retrieved by any isolate (or JavaScript script)
-   * running in this window.
-   */
-  void registerPort(String name, SendPortSync port);
-
-  /**
-   * Lookup a port by its [name].  Return null if no port is
-   * registered under [name].
-   */
-  SendPortSync lookupPort(String name);
-
-  /**
-   * Executes a [callback] after the next batch of browser layout measurements
-   * has completed or would have completed if any browser layout measurements
-   * had been scheduled.
-   */
-  void requestLayoutFrame(TimeoutHandler callback);
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_MouseEvent.darttemplate b/sdk/lib/html/templates/html/interface/interface_MouseEvent.darttemplate
deleted file mode 100644
index 1ca65f9..0000000
--- a/sdk/lib/html/templates/html/interface/interface_MouseEvent.darttemplate
+++ /dev/null
@@ -1,23 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  factory $ID(String type, Window view, int detail, int screenX, int screenY,
-      int clientX, int clientY, int button, [bool canBubble = true,
-      bool cancelable = true, bool ctrlKey = false, bool altKey = false,
-      bool shiftKey = false, bool metaKey = false,
-      EventTarget relatedTarget = null]) =>
-      _$(ID)FactoryProvider.create$ID(
-          type, view, detail, screenX, screenY,
-          clientX, clientY, button, canBubble, cancelable,
-          ctrlKey, altKey, shiftKey, metaKey,
-          relatedTarget);
-
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_MutationObserver.darttemplate b/sdk/lib/html/templates/html/interface/interface_MutationObserver.darttemplate
deleted file mode 100644
index 328196d..0000000
--- a/sdk/lib/html/templates/html/interface/interface_MutationObserver.darttemplate
+++ /dev/null
@@ -1,21 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS
-  void observe(Node target,
-               {Map options,
-                bool childList,
-                bool attributes,
-                bool characterData,
-                bool subtree,
-                bool attributeOldValue,
-                bool characterDataOldValue,
-                List<String> attributeFilter});
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_Node.darttemplate b/sdk/lib/html/templates/html/interface/interface_Node.darttemplate
deleted file mode 100644
index 81d091a..0000000
--- a/sdk/lib/html/templates/html/interface/interface_Node.darttemplate
+++ /dev/null
@@ -1,28 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-  List<Node> get nodes;
-
-  void set nodes(Collection<Node> value);
-
-  /**
-   * Replaces this node with another node.
-   * @domName Node.replaceChild
-   */
-  Node replaceWith(Node otherNode);
-
-  /**
-   * Removes this node from the DOM.
-   * @domName Node.removeChild
-   */
-  void remove();
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_NodeList.darttemplate b/sdk/lib/html/templates/html/interface/interface_NodeList.darttemplate
deleted file mode 100644
index 357b14f..0000000
--- a/sdk/lib/html/templates/html/interface/interface_NodeList.darttemplate
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  List<Node> filter(bool f(Node element));
-
-  List<Node> getRange(int start, int length);
-
-  Node get first;
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_NodeSelector.darttemplate b/sdk/lib/html/templates/html/interface/interface_NodeSelector.darttemplate
deleted file mode 100644
index 3777034..0000000
--- a/sdk/lib/html/templates/html/interface/interface_NodeSelector.darttemplate
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  // TODO(nweiz): add this back once DocumentFragment is ported.
-  // List<Element> queryAll(String selectors);
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_Point.darttemplate b/sdk/lib/html/templates/html/interface/interface_Point.darttemplate
deleted file mode 100644
index 9dfcb49..0000000
--- a/sdk/lib/html/templates/html/interface/interface_Point.darttemplate
+++ /dev/null
@@ -1,13 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  factory $ID(num x, num y) => _$(ID)FactoryProvider.create$ID(x, y);
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_SVGElement.darttemplate b/sdk/lib/html/templates/html/interface/interface_SVGElement.darttemplate
deleted file mode 100644
index 620c9d0..0000000
--- a/sdk/lib/html/templates/html/interface/interface_SVGElement.darttemplate
+++ /dev/null
@@ -1,18 +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 html;
-
-$!COMMENT
-abstract class _ISVGElement implements _IElement {
-
-  factory SVGElement.tag(String tag) =>
-      _$(ID)FactoryProvider.create$(ID)_tag(tag);
-  factory SVGElement.svg(String svg) =>
-      _$(ID)FactoryProvider.create$(ID)_svg(svg);
-
-  SVGElement clone(bool deep);
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_SVGSVGElement.darttemplate b/sdk/lib/html/templates/html/interface/interface_SVGSVGElement.darttemplate
deleted file mode 100644
index 692955b..0000000
--- a/sdk/lib/html/templates/html/interface/interface_SVGSVGElement.darttemplate
+++ /dev/null
@@ -1,11 +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 html;
-
-$!COMMENT
-abstract class _ISVGSVGElement extends _ISVGElement implements _ISVGTests, _ISVGLangSpace, _ISVGExternalResourcesRequired, _ISVGStylable, _ISVGLocatable, _ISVGFitToViewBox, _ISVGZoomAndPan {
-
-$!MEMBERS
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_ShadowRoot.darttemplate b/sdk/lib/html/templates/html/interface/interface_ShadowRoot.darttemplate
deleted file mode 100644
index a1d32df..0000000
--- a/sdk/lib/html/templates/html/interface/interface_ShadowRoot.darttemplate
+++ /dev/null
@@ -1,13 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS
-  static bool get supported => $(ID).supported;
-}
diff --git a/sdk/lib/html/templates/html/interface/interface_Text.darttemplate b/sdk/lib/html/templates/html/interface/interface_Text.darttemplate
deleted file mode 100644
index 838c7cd..0000000
--- a/sdk/lib/html/templates/html/interface/interface_Text.darttemplate
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  factory $ID(String data) => _$(ID)FactoryProvider.create$ID(data);
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_WebSocket.darttemplate b/sdk/lib/html/templates/html/interface/interface_WebSocket.darttemplate
deleted file mode 100644
index 0fae1e3..0000000
--- a/sdk/lib/html/templates/html/interface/interface_WebSocket.darttemplate
+++ /dev/null
@@ -1,13 +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.
-
-// WARNING: Do not edit - generated code.
-
-part of html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-
-  factory $ID(String url) => _$(ID)FactoryProvider.create$ID(url);
-$!MEMBERS}
diff --git a/sdk/lib/html/templates/html/interface/interface_WheelEvent.darttemplate b/sdk/lib/html/templates/html/interface/interface_WheelEvent.darttemplate
deleted file mode 100644
index f4232db..0000000
--- a/sdk/lib/html/templates/html/interface/interface_WheelEvent.darttemplate
+++ /dev/null
@@ -1,19 +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 html;
-
-$!COMMENT
-abstract class $ID$EXTENDS {
-$!MEMBERS
-
-  /** @domName WheelEvent.deltaX */
-  abstract num get deltaX;
-
-  /** @domName WheelEvent.deltaY */
-  abstract num get deltaY;
-
-  /** @domName WheelEvent.deltaMode */
-  abstract int get deltaMode;
-}
diff --git a/sdk/lib/html/templates/immutable_list_mixin.darttemplate b/sdk/lib/html/templates/immutable_list_mixin.darttemplate
index 74d5a4e..b6a4b8b 100644
--- a/sdk/lib/html/templates/immutable_list_mixin.darttemplate
+++ b/sdk/lib/html/templates/immutable_list_mixin.darttemplate
@@ -7,7 +7,7 @@
     // Note: NodeLists are not fixed size. And most probably length shouldn't
     // be cached in both iterator _and_ forEach method. For now caching it
     // for consistency.
-    return new _FixedSizeListIterator<$E>(this);
+    return new FixedSizeListIterator<$E>(this);
   }
 
   // From Collection<$E>:
diff --git a/sdk/lib/io/chunked_stream.dart b/sdk/lib/io/chunked_stream.dart
index 77b7cd6..e908175 100644
--- a/sdk/lib/io/chunked_stream.dart
+++ b/sdk/lib/io/chunked_stream.dart
@@ -51,7 +51,7 @@
 
   void _onData() {
     _readData();
-    if (_bufferList.length >= _chunkSize && _clientDataHandler !== null) {
+    if (_bufferList.length >= _chunkSize && _clientDataHandler != null) {
       _clientDataHandler();
     }
     _checkScheduleCallback();
@@ -60,14 +60,14 @@
 
   void _readData() {
     List<int> data = _input.read();
-    if (data !== null) {
+    if (data != null) {
       _bufferList.add(data);
     }
   }
 
   void _onClosed() {
     _inputClosed = true;
-    if (_bufferList.length == 0 && _clientCloseHandler !== null) {
+    if (_bufferList.length == 0 && _clientCloseHandler != null) {
       _clientCloseHandler();
       _closed = true;
     } else {
@@ -76,7 +76,7 @@
   }
 
   void _checkInstallDataHandler() {
-    if (_clientDataHandler === null) {
+    if (_clientDataHandler == null) {
       _input.onData = null;
     } else {
       if (_bufferList.length < _chunkSize && !_inputClosed) {
@@ -92,7 +92,7 @@
     // the event loop.
     void issueDataCallback(Timer timer) {
       _scheduledDataCallback = null;
-      if (_clientDataHandler !== null) {
+      if (_clientDataHandler != null) {
         _clientDataHandler();
         _checkScheduleCallback();
       }
@@ -101,7 +101,7 @@
     void issueCloseCallback(Timer timer) {
       _scheduledCloseCallback = null;
       if (!_closed) {
-        if (_clientCloseHandler !== null) _clientCloseHandler();
+        if (_clientCloseHandler != null) _clientCloseHandler();
         _closed = true;
       }
     }
@@ -109,7 +109,7 @@
     // Schedule data callback if enough data in buffer.
     if ((_bufferList.length >= _chunkSize ||
          (_bufferList.length > 0 && _inputClosed)) &&
-        _clientDataHandler !== null &&
+        _clientDataHandler != null &&
         _scheduledDataCallback == null) {
       _scheduledDataCallback = new Timer(0, issueDataCallback);
     }
diff --git a/sdk/lib/io/common.dart b/sdk/lib/io/common.dart
index 687d2ed..5a39a46 100644
--- a/sdk/lib/io/common.dart
+++ b/sdk/lib/io/common.dart
@@ -68,7 +68,9 @@
 // benefit that it is faster to access from the C code as well.
 _BufferAndOffset _ensureFastAndSerializableBuffer(
     List buffer, int offset, int bytes) {
-  if (buffer is Uint8List || _BufferUtils._isBuiltinList(buffer)) {
+  if (buffer is Uint8List ||
+      buffer is Int8List ||
+      _BufferUtils._isBuiltinList(buffer)) {
     return new _BufferAndOffset(buffer, offset);
   }
   var newBuffer = new Uint8List(bytes);
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 43ff45b..97fc18c 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -184,19 +184,19 @@
   List<int> readAsBytesSync();
 
   /**
-   * Read the entire file contents as text using the given
+   * Read the entire file contents as a string using the given
    * [encoding].
    *
    * Returns a [:Future<String>:] that completes with the string once
    * the file contents has been read.
    */
-  Future<String> readAsText([Encoding encoding = Encoding.UTF_8]);
+  Future<String> readAsString([Encoding encoding = Encoding.UTF_8]);
 
   /**
-   * Synchronously read the entire file contents as text using the
+   * Synchronously read the entire file contents as a string using the
    * given [encoding].
    */
-  String readAsTextSync([Encoding encoding = Encoding.UTF_8]);
+  String readAsStringSync([Encoding encoding = Encoding.UTF_8]);
 
   /**
    * Read the entire file contents as lines of text using the give
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index 05126a8..27bace9 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -249,10 +249,10 @@
   void _processPendingOperations() {
     _pendingOperations.forEach((buffer) {
       if (buffer is _PendingOperation) {
-        if (buffer === _PendingOperation.CLOSE) {
+        if (identical(buffer, _PendingOperation.CLOSE)) {
           close();
         } else {
-          assert(buffer === _PendingOperation.FLUSH);
+          assert(identical(buffer, _PendingOperation.FLUSH));
           flush();
         }
       } else {
@@ -609,7 +609,7 @@
     return result;
   }
 
-  Future<String> readAsText([Encoding encoding = Encoding.UTF_8]) {
+  Future<String> readAsString([Encoding encoding = Encoding.UTF_8]) {
     _ensureFileService();
     return readAsBytes().transform((bytes) {
       if (bytes.length == 0) return "";
@@ -619,7 +619,7 @@
     });
   }
 
-  String readAsTextSync([Encoding encoding = Encoding.UTF_8]) {
+  String readAsStringSync([Encoding encoding = Encoding.UTF_8]) {
     var decoder = _StringDecoders.decoder(encoding);
     List<int> bytes = readAsBytesSync();
     if (bytes.length == 0) return "";
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
new file mode 100644
index 0000000..55a9a89
--- /dev/null
+++ b/sdk/lib/io/http_headers.dart
@@ -0,0 +1,628 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 _HttpHeaders implements HttpHeaders {
+  _HttpHeaders() : _headers = new Map<String, List<String>>();
+
+  List<String> operator[](String name) {
+    name = name.toLowerCase();
+    return _headers[name];
+  }
+
+  String value(String name) {
+    name = name.toLowerCase();
+    List<String> values = _headers[name];
+    if (values == null) return null;
+    if (values.length > 1) {
+      throw new HttpException("More than one value for header $name");
+    }
+    return values[0];
+  }
+
+  void add(String name, Object value) {
+    _checkMutable();
+    if (value is List) {
+      for (int i = 0; i < value.length; i++) {
+        _add(name, value[i]);
+      }
+    } else {
+      _add(name, value);
+    }
+  }
+
+  void set(String name, Object value) {
+    name = name.toLowerCase();
+    _checkMutable();
+    removeAll(name);
+    add(name, value);
+  }
+
+  void remove(String name, Object value) {
+    _checkMutable();
+    name = name.toLowerCase();
+    List<String> values = _headers[name];
+    if (values != null) {
+      int index = values.indexOf(value);
+      if (index != -1) {
+        values.removeRange(index, 1);
+      }
+    }
+  }
+
+  void removeAll(String name) {
+    _checkMutable();
+    name = name.toLowerCase();
+    _headers.remove(name);
+  }
+
+  void forEach(void f(String name, List<String> values)) {
+    _headers.forEach(f);
+  }
+
+  void noFolding(String name) {
+    if (_noFoldingHeaders == null) _noFoldingHeaders = new List<String>();
+    _noFoldingHeaders.add(name);
+  }
+
+  String get host => _host;
+
+  void set host(String host) {
+    _checkMutable();
+    _host = host;
+    _updateHostHeader();
+  }
+
+  int get port => _port;
+
+  void set port(int port) {
+    _checkMutable();
+    _port = port;
+    _updateHostHeader();
+  }
+
+  Date get ifModifiedSince {
+    List<String> values = _headers["if-modified-since"];
+    if (values != null) {
+      try {
+        return _HttpUtils.parseDate(values[0]);
+      } on Exception catch (e) {
+        return null;
+      }
+    }
+    return null;
+  }
+
+  void set ifModifiedSince(Date ifModifiedSince) {
+    _checkMutable();
+    // Format "ifModifiedSince" header with date in Greenwich Mean Time (GMT).
+    String formatted = _HttpUtils.formatDate(ifModifiedSince.toUtc());
+    _set("if-modified-since", formatted);
+  }
+
+  Date get date {
+    List<String> values = _headers["date"];
+    if (values != null) {
+      try {
+        return _HttpUtils.parseDate(values[0]);
+      } on Exception catch (e) {
+        return null;
+      }
+    }
+    return null;
+  }
+
+  void set date(Date date) {
+    _checkMutable();
+    // Format "Date" header with date in Greenwich Mean Time (GMT).
+    String formatted = _HttpUtils.formatDate(date.toUtc());
+    _set("date", formatted);
+  }
+
+  Date get expires {
+    List<String> values = _headers["expires"];
+    if (values != null) {
+      try {
+        return _HttpUtils.parseDate(values[0]);
+      } on Exception catch (e) {
+        return null;
+      }
+    }
+    return null;
+  }
+
+  void set expires(Date expires) {
+    _checkMutable();
+    // Format "Expires" header with date in Greenwich Mean Time (GMT).
+    String formatted = _HttpUtils.formatDate(expires.toUtc());
+    _set("expires", formatted);
+  }
+
+  ContentType get contentType {
+    var values = _headers["content-type"];
+    if (values != null) {
+      return new ContentType.fromString(values[0]);
+    } else {
+      return new ContentType();
+    }
+  }
+
+  void set contentType(ContentType contentType) {
+    _checkMutable();
+    _set("content-type", contentType.toString());
+  }
+
+  void _add(String name, Object value) {
+    var lowerCaseName = name.toLowerCase();
+    // TODO(sgjesse): Add immutable state throw HttpException is immutable.
+    if (lowerCaseName == "date") {
+      if (value is Date) {
+        date = value;
+      } else if (value is String) {
+        _set("date", value);
+      } else {
+        throw new HttpException("Unexpected type for header named $name");
+      }
+    } else if (lowerCaseName == "expires") {
+      if (value is Date) {
+        expires = value;
+      } else if (value is String) {
+        _set("expires", value);
+      } else {
+        throw new HttpException("Unexpected type for header named $name");
+      }
+    } else if (lowerCaseName == "if-modified-since") {
+      if (value is Date) {
+        ifModifiedSince = value;
+      } else if (value is String) {
+        _set("if-modified-since", value);
+      } else {
+        throw new HttpException("Unexpected type for header named $name");
+      }
+    } else if (lowerCaseName == "host") {
+      int pos = value.indexOf(":");
+      if (pos == -1) {
+        _host = value;
+        _port = HttpClient.DEFAULT_HTTP_PORT;
+      } else {
+        if (pos > 0) {
+          _host = value.substring(0, pos);
+        } else {
+          _host = null;
+        }
+        if (pos + 1 == value.length) {
+          _port = HttpClient.DEFAULT_HTTP_PORT;
+        } else {
+          try {
+            _port = parseInt(value.substring(pos + 1));
+          } on FormatException catch (e) {
+            _port = null;
+          }
+        }
+      }
+      _set("host", value);
+    } else if (lowerCaseName == "content-type") {
+      _set("content-type", value);
+    } else {
+      name = lowerCaseName;
+      List<String> values = _headers[name];
+      if (values == null) {
+        values = new List<String>();
+        _headers[name] = values;
+      }
+      if (value is Date) {
+        values.add(_HttpUtils.formatDate(value));
+      } else {
+        values.add(value.toString());
+      }
+    }
+  }
+
+  void _set(String name, String value) {
+    name = name.toLowerCase();
+    List<String> values = new List<String>();
+    _headers[name] = values;
+    values.add(value);
+  }
+
+  _checkMutable() {
+    if (!_mutable) throw new HttpException("HTTP headers are not mutable");
+  }
+
+  _updateHostHeader() {
+    bool defaultPort = _port == null || _port == HttpClient.DEFAULT_HTTP_PORT;
+    String portPart = defaultPort ? "" : ":$_port";
+    _set("host", "$host$portPart");
+  }
+
+  _foldHeader(String name) {
+    if (name == "set-cookie" ||
+        (_noFoldingHeaders != null &&
+         _noFoldingHeaders.indexOf(name) != -1)) {
+      return false;
+    }
+    return true;
+  }
+
+  _write(_HttpConnectionBase connection) {
+    final COLONSP = const [_CharCode.COLON, _CharCode.SP];
+    final COMMASP = const [_CharCode.COMMA, _CharCode.SP];
+    final CRLF = const [_CharCode.CR, _CharCode.LF];
+
+    var bufferSize = 16 * 1024;
+    var buffer = new Uint8List(bufferSize);
+    var bufferPos = 0;
+
+    void writeBuffer() {
+      connection._writeFrom(buffer, 0, bufferPos);
+      bufferPos = 0;
+    }
+
+    // Format headers.
+    _headers.forEach((String name, List<String> values) {
+      bool fold = _foldHeader(name);
+      List<int> nameData;
+      nameData = name.charCodes;
+      int nameDataLen = nameData.length;
+      if (nameDataLen + 2 > bufferSize - bufferPos) writeBuffer();
+      buffer.setRange(bufferPos, nameDataLen, nameData);
+      bufferPos += nameDataLen;
+      buffer[bufferPos++] = _CharCode.COLON;
+      buffer[bufferPos++] = _CharCode.SP;
+      for (int i = 0; i < values.length; i++) {
+        List<int> data = values[i].charCodes;
+        int dataLen = data.length;
+        // Worst case here is writing the name, value and 6 additional bytes.
+        if (nameDataLen + dataLen + 6 > bufferSize - bufferPos) writeBuffer();
+        if (i > 0) {
+          if (fold) {
+            buffer[bufferPos++] = _CharCode.COMMA;
+            buffer[bufferPos++] = _CharCode.SP;
+          } else {
+            buffer[bufferPos++] = _CharCode.CR;
+            buffer[bufferPos++] = _CharCode.LF;
+            buffer.setRange(bufferPos, nameDataLen, nameData);
+            bufferPos += nameDataLen;
+            buffer[bufferPos++] = _CharCode.COLON;
+            buffer[bufferPos++] = _CharCode.SP;
+          }
+        }
+        buffer.setRange(bufferPos, dataLen, data);
+        bufferPos += dataLen;
+      }
+      buffer[bufferPos++] = _CharCode.CR;
+      buffer[bufferPos++] = _CharCode.LF;
+    });
+    writeBuffer();
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    _headers.forEach((String name, List<String> values) {
+      sb.add(name);
+      sb.add(": ");
+      bool fold = _foldHeader(name);
+      for (int i = 0; i < values.length; i++) {
+        if (i > 0) {
+          if (fold) {
+            sb.add(", ");
+          } else {
+            sb.add("\n");
+            sb.add(name);
+            sb.add(": ");
+          }
+        }
+        sb.add(values[i]);
+      }
+      sb.add("\n");
+    });
+    return sb.toString();
+  }
+
+  bool _mutable = true;  // Are the headers currently mutable?
+  Map<String, List<String>> _headers;
+  List<String> _noFoldingHeaders;
+
+  String _host;
+  int _port;
+}
+
+
+class _HeaderValue implements HeaderValue {
+  _HeaderValue([String this.value = ""]);
+
+  _HeaderValue.fromString(String value, {this.parameterSeparator: ";"}) {
+    // Parse the string.
+    _parse(value);
+  }
+
+  Map<String, String> get parameters {
+    if (_parameters == null) _parameters = new Map<String, String>();
+    return _parameters;
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.add(value);
+    if (parameters != null && parameters.length > 0) {
+      _parameters.forEach((String name, String value) {
+        sb.add("; ");
+        sb.add(name);
+        sb.add("=");
+        sb.add(value);
+      });
+    }
+    return sb.toString();
+  }
+
+  void _parse(String s) {
+    int index = 0;
+
+    bool done() => index == s.length;
+
+    void skipWS() {
+      while (!done()) {
+        if (s[index] != " " && s[index] != "\t") return;
+        index++;
+      }
+    }
+
+    String parseValue() {
+      int start = index;
+      while (!done()) {
+        if (s[index] == " " ||
+            s[index] == "\t" ||
+            s[index] == parameterSeparator) break;
+        index++;
+      }
+      return s.substring(start, index).toLowerCase();
+    }
+
+    void expect(String expected) {
+      if (done() || s[index] != expected) {
+        throw new HttpException("Failed to parse header value");
+      }
+      index++;
+    }
+
+    void maybeExpect(String expected) {
+      if (s[index] == expected) index++;
+    }
+
+    void parseParameters() {
+      _parameters = new Map<String, String>();
+
+      String parseParameterName() {
+        int start = index;
+        while (!done()) {
+          if (s[index] == " " || s[index] == "\t" || s[index] == "=") break;
+          index++;
+        }
+        return s.substring(start, index).toLowerCase();
+      }
+
+      String parseParameterValue() {
+        if (s[index] == "\"") {
+          // Parse quoted value.
+          StringBuffer sb = new StringBuffer();
+          index++;
+          while (!done()) {
+            if (s[index] == "\\") {
+              if (index + 1 == s.length) {
+                throw new HttpException("Failed to parse header value");
+              }
+              index++;
+            } else if (s[index] == "\"") {
+              index++;
+              break;
+            }
+            sb.add(s[index]);
+            index++;
+          }
+          return sb.toString();
+        } else {
+          // Parse non-quoted value.
+          return parseValue();
+        }
+      }
+
+      while (!done()) {
+        skipWS();
+        if (done()) return;
+        String name = parseParameterName();
+        skipWS();
+        expect("=");
+        skipWS();
+        String value = parseParameterValue();
+        _parameters[name] = value;
+        skipWS();
+        if (done()) return;
+        expect(parameterSeparator);
+      }
+    }
+
+    skipWS();
+    value = parseValue();
+    skipWS();
+    if (done()) return;
+    maybeExpect(parameterSeparator);
+    parseParameters();
+  }
+
+  String value;
+  String parameterSeparator;
+  Map<String, String> _parameters;
+}
+
+
+class _ContentType extends _HeaderValue implements ContentType {
+  _ContentType(String primaryType, String subType)
+      : _primaryType = primaryType, _subType = subType, super("");
+
+  _ContentType.fromString(String value) : super.fromString(value);
+
+  String get value => "$_primaryType/$_subType";
+
+  void set value(String s) {
+    int index = s.indexOf("/");
+    if (index == -1 || index == (s.length - 1)) {
+      primaryType = s.trim().toLowerCase();
+      subType = "";
+    } else {
+      primaryType = s.substring(0, index).trim().toLowerCase();
+      subType = s.substring(index + 1).trim().toLowerCase();
+    }
+  }
+
+  String get primaryType => _primaryType;
+
+  void set primaryType(String s) {
+    _primaryType = s;
+  }
+
+  String get subType => _subType;
+
+  void set subType(String s) {
+    _subType = s;
+  }
+
+  String get charset => parameters["charset"];
+
+  void set charset(String s) {
+    parameters["charset"] = s;
+  }
+
+  String _primaryType = "";
+  String _subType = "";
+}
+
+
+class _Cookie implements Cookie {
+  _Cookie([String this.name, String this.value]);
+
+  _Cookie.fromSetCookieValue(String value) {
+    // Parse the Set-Cookie header value.
+    _parseSetCookieValue(value);
+  }
+
+  // Parse a Set-Cookie header value according to the rules in RFC 6265.
+  void _parseSetCookieValue(String s) {
+    int index = 0;
+
+    bool done() => index == s.length;
+
+    String parseName() {
+      int start = index;
+      while (!done()) {
+        if (s[index] == "=") break;
+        index++;
+      }
+      return s.substring(start, index).trim().toLowerCase();
+    }
+
+    String parseValue() {
+      int start = index;
+      while (!done()) {
+        if (s[index] == ";") break;
+        index++;
+      }
+      return s.substring(start, index).trim().toLowerCase();
+    }
+
+    void expect(String expected) {
+      if (done()) throw new HttpException("Failed to parse header value [$s]");
+      if (s[index] != expected) {
+        throw new HttpException("Failed to parse header value [$s]");
+      }
+      index++;
+    }
+
+    void parseAttributes() {
+      String parseAttributeName() {
+        int start = index;
+        while (!done()) {
+          if (s[index] == "=" || s[index] == ";") break;
+          index++;
+        }
+        return s.substring(start, index).trim().toLowerCase();
+      }
+
+      String parseAttributeValue() {
+        int start = index;
+        while (!done()) {
+          if (s[index] == ";") break;
+          index++;
+        }
+        return s.substring(start, index).trim().toLowerCase();
+      }
+
+      while (!done()) {
+        String name = parseAttributeName();
+        String value = "";
+        if (!done() && s[index] == "=") {
+          index++;  // Skip the = character.
+          value = parseAttributeValue();
+        }
+        if (name == "expires") {
+          expires = _HttpUtils.parseCookieDate(value);
+        } else if (name == "max-age") {
+          maxAge = parseInt(value);
+        } else if (name == "domain") {
+          domain = value;
+        } else if (name == "path") {
+          path = value;
+        } else if (name == "httponly") {
+          httpOnly = true;
+        } else if (name == "secure") {
+          secure = true;
+        }
+        if (!done()) index++;  // Skip the ; character
+      }
+    }
+
+    name = parseName();
+    if (done() || name.length == 0) {
+      throw new HttpException("Failed to parse header value [$s]");
+    }
+    index++;  // Skip the = character.
+    value = parseValue();
+    if (done()) return;
+    index++;  // Skip the ; character.
+    parseAttributes();
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.add(name);
+    sb.add("=");
+    sb.add(value);
+    if (expires != null) {
+      sb.add("; Expires=");
+      sb.add(_HttpUtils.formatDate(expires));
+    }
+    if (maxAge != null) {
+      sb.add("; Max-Age=");
+      sb.add(maxAge);
+    }
+    if (domain != null) {
+      sb.add("; Domain=");
+      sb.add(domain);
+    }
+    if (path != null) {
+      sb.add("; Path=");
+      sb.add(path);
+    }
+    if (secure) sb.add("; Secure");
+    if (httpOnly) sb.add("; HttpOnly");
+    return sb.toString();
+  }
+
+  String name;
+  String value;
+  Date expires;
+  int maxAge;
+  String domain;
+  String path;
+  bool httpOnly = false;
+  bool secure = false;
+}
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 440b635..fc69108 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -2,620 +2,86 @@
 // for 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 _HttpHeaders implements HttpHeaders {
-  _HttpHeaders() : _headers = new Map<String, List<String>>();
+// The close queue handles graceful closing of HTTP connections. When
+// a connection is added to the queue it will enter a wait state
+// waiting for all data written and possibly socket shutdown from
+// peer.
+class _CloseQueue {
+  _CloseQueue() : _q = new Set<_HttpConnectionBase>();
 
-  List<String> operator[](String name) {
-    name = name.toLowerCase();
-    return _headers[name];
-  }
-
-  String value(String name) {
-    name = name.toLowerCase();
-    List<String> values = _headers[name];
-    if (values == null) return null;
-    if (values.length > 1) {
-      throw new HttpException("More than one value for header $name");
+  void add(_HttpConnectionBase connection) {
+    void closeIfDone() {
+      // We only check for write closed here. This means that we are
+      // not waiting for the client to half-close the socket before
+      // fully closing the socket.
+      if (!connection._isWriteClosed) return;
+      _q.remove(connection);
+      connection._socket.close();
+      if (connection.onClosed != null) connection.onClosed();
     }
-    return values[0];
-  }
 
-  void add(String name, Object value) {
-    _checkMutable();
-    if (value is List) {
-      for (int i = 0; i < value.length; i++) {
-        _add(name, value[i]);
-      }
+    // If the connection is already fully closed don't insert it into the queue.
+    if (connection._isFullyClosed) {
+      connection._socket.close();
+      if (connection.onClosed != null) connection.onClosed();
+      return;
+    }
+
+    _q.add(connection);
+
+    // If output stream is not closed for writing close it now and
+    // wait for callback when closed.
+    if (!connection._isWriteClosed) {
+      connection._socket.outputStream.close();
+      connection._socket.outputStream.onClosed = () {
+        connection._state |= _HttpConnectionBase.WRITE_CLOSED;
+        closeIfDone();
+      };
     } else {
-      _add(name, value);
+      connection._socket.outputStream.onClosed = () { assert(false); };
     }
-  }
 
-  void set(String name, Object value) {
-    name = name.toLowerCase();
-    _checkMutable();
-    removeAll(name);
-    add(name, value);
-  }
-
-  void remove(String name, Object value) {
-    _checkMutable();
-    name = name.toLowerCase();
-    List<String> values = _headers[name];
-    if (values != null) {
-      int index = values.indexOf(value);
-      if (index != -1) {
-        values.removeRange(index, 1);
-      }
-    }
-  }
-
-  void removeAll(String name) {
-    _checkMutable();
-    name = name.toLowerCase();
-    _headers.remove(name);
-  }
-
-  void forEach(void f(String name, List<String> values)) {
-    _headers.forEach(f);
-  }
-
-  void noFolding(String name) {
-    if (_noFoldingHeaders == null) _noFoldingHeaders = new List<String>();
-    _noFoldingHeaders.add(name);
-  }
-
-  String get host => _host;
-
-  void set host(String host) {
-    _checkMutable();
-    _host = host;
-    _updateHostHeader();
-  }
-
-  int get port => _port;
-
-  void set port(int port) {
-    _checkMutable();
-    _port = port;
-    _updateHostHeader();
-  }
-
-  Date get ifModifiedSince {
-    List<String> values = _headers["if-modified-since"];
-    if (values != null) {
-      try {
-        return _HttpUtils.parseDate(values[0]);
-      } on Exception catch (e) {
-        return null;
-      }
-    }
-    return null;
-  }
-
-  void set ifModifiedSince(Date ifModifiedSince) {
-    _checkMutable();
-    // Format "ifModifiedSince" header with date in Greenwich Mean Time (GMT).
-    String formatted = _HttpUtils.formatDate(ifModifiedSince.toUtc());
-    _set("if-modified-since", formatted);
-  }
-
-  Date get date {
-    List<String> values = _headers["date"];
-    if (values != null) {
-      try {
-        return _HttpUtils.parseDate(values[0]);
-      } on Exception catch (e) {
-        return null;
-      }
-    }
-    return null;
-  }
-
-  void set date(Date date) {
-    _checkMutable();
-    // Format "Date" header with date in Greenwich Mean Time (GMT).
-    String formatted = _HttpUtils.formatDate(date.toUtc());
-    _set("date", formatted);
-  }
-
-  Date get expires {
-    List<String> values = _headers["expires"];
-    if (values != null) {
-      try {
-        return _HttpUtils.parseDate(values[0]);
-      } on Exception catch (e) {
-        return null;
-      }
-    }
-    return null;
-  }
-
-  void set expires(Date expires) {
-    _checkMutable();
-    // Format "Expires" header with date in Greenwich Mean Time (GMT).
-    String formatted = _HttpUtils.formatDate(expires.toUtc());
-    _set("expires", formatted);
-  }
-
-  ContentType get contentType {
-    var values = _headers["content-type"];
-    if (values != null) {
-      return new ContentType.fromString(values[0]);
+    // If socket is not closed for reading wait for callback.
+    if (!connection._isReadClosed) {
+      connection._socket.onClosed = () {
+        connection._state |= _HttpConnectionBase.READ_CLOSED;
+        // This is a nop, as we are not using the read closed
+        // information for anything. For both server and client
+        // connections the inbound message have been read to
+        // completion when the socket enters the close queue.
+      };
     } else {
-      return new ContentType();
+      connection._socket.onClosed = () { assert(false); };
     }
+
+    // Ignore any data on a socket in the close queue.
+    connection._socket.onData = connection._socket.read;
+
+    // If an error occurs immediately close the socket.
+    connection._socket.onError = (e) {
+      connection._state |= _HttpConnectionBase.WRITE_CLOSED;
+      closeIfDone();
+    };
   }
 
-  void set contentType(ContentType contentType) {
-    _checkMutable();
-    _set("content-type", contentType.toString());
-  }
-
-  void _add(String name, Object value) {
-    // TODO(sgjesse): Add immutable state throw HttpException is immutable.
-    if (name.toLowerCase() == "date") {
-      if (value is Date) {
-        date = value;
-      } else if (value is String) {
-        _set("date", value);
-      } else {
-        throw new HttpException("Unexpected type for header named $name");
-      }
-    } else if (name.toLowerCase() == "expires") {
-      if (value is Date) {
-        expires = value;
-      } else if (value is String) {
-        _set("expires", value);
-      } else {
-        throw new HttpException("Unexpected type for header named $name");
-      }
-    } else if (name.toLowerCase() == "if-modified-since") {
-      if (value is Date) {
-        ifModifiedSince = value;
-      } else if (value is String) {
-        _set("if-modified-since", value);
-      } else {
-        throw new HttpException("Unexpected type for header named $name");
-      }
-    } else if (name.toLowerCase() == "host") {
-      int pos = value.indexOf(":");
-      if (pos == -1) {
-        _host = value;
-        _port = HttpClient.DEFAULT_HTTP_PORT;
-      } else {
-        if (pos > 0) {
-          _host = value.substring(0, pos);
-        } else {
-          _host = null;
-        }
-        if (pos + 1 == value.length) {
-          _port = HttpClient.DEFAULT_HTTP_PORT;
-        } else {
-          try {
-            _port = parseInt(value.substring(pos + 1));
-          } on FormatException catch (e) {
-            _port = null;
-          }
-        }
-        _set("host", value);
-      }
-    } else if (name.toLowerCase() == "content-type") {
-      _set("content-type", value);
-    } else {
-      name = name.toLowerCase();
-      List<String> values = _headers[name];
-      if (values == null) {
-        values = new List<String>();
-        _headers[name] = values;
-      }
-      if (value is Date) {
-        values.add(_HttpUtils.formatDate(value));
-      } else {
-        values.add(value.toString());
-      }
-    }
-  }
-
-  void _set(String name, String value) {
-    name = name.toLowerCase();
-    List<String> values = new List<String>();
-    _headers[name] = values;
-    values.add(value);
-  }
-
-  _checkMutable() {
-    if (!_mutable) throw new HttpException("HTTP headers are not mutable");
-  }
-
-  _updateHostHeader() {
-    bool defaultPort = _port == null || _port == HttpClient.DEFAULT_HTTP_PORT;
-    String portPart = defaultPort ? "" : ":$_port";
-    _set("host", "$host$portPart");
-  }
-
-  _foldHeader(String name) {
-    if (name == "set-cookie" ||
-        (_noFoldingHeaders != null &&
-         _noFoldingHeaders.indexOf(name) != -1)) {
-      return false;
-    }
-    return true;
-  }
-
-  _write(_HttpConnectionBase connection) {
-    final COLONSP = const [_CharCode.COLON, _CharCode.SP];
-    final COMMASP = const [_CharCode.COMMA, _CharCode.SP];
-    final CRLF = const [_CharCode.CR, _CharCode.LF];
-
-    // Format headers.
-    _headers.forEach((String name, List<String> values) {
-      bool fold = _foldHeader(name);
-      List<int> data;
-      data = name.charCodes;
-      connection._write(data);
-      connection._write(COLONSP);
-      for (int i = 0; i < values.length; i++) {
-        if (i > 0) {
-          if (fold) {
-            connection._write(COMMASP);
-          } else {
-            connection._write(CRLF);
-            data = name.charCodes;
-            connection._write(data);
-            connection._write(COLONSP);
-          }
-        }
-        data = values[i].charCodes;
-        connection._write(data);
-      }
-      connection._write(CRLF);
+  void shutdown() {
+    _q.forEach((_HttpConnectionBase connection) {
+      connection._socket.close();
     });
   }
 
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    _headers.forEach((String name, List<String> values) {
-      sb.add(name);
-      sb.add(": ");
-      bool fold = _foldHeader(name);
-      for (int i = 0; i < values.length; i++) {
-        if (i > 0) {
-          if (fold) {
-            sb.add(", ");
-          } else {
-            sb.add("\n");
-            sb.add(name);
-            sb.add(": ");
-          }
-        }
-        sb.add(values[i]);
-      }
-      sb.add("\n");
-    });
-    return sb.toString();
-  }
-
-  bool _mutable = true;  // Are the headers currently mutable?
-  Map<String, List<String>> _headers;
-  List<String> _noFoldingHeaders;
-
-  String _host;
-  int _port;
-}
-
-
-class _HeaderValue implements HeaderValue {
-  _HeaderValue([String this.value = ""]);
-
-  _HeaderValue.fromString(String value, {this.parameterSeparator: ";"}) {
-    // Parse the string.
-    _parse(value);
-  }
-
-  Map<String, String> get parameters {
-    if (_parameters == null) _parameters = new Map<String, String>();
-    return _parameters;
-  }
-
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.add(value);
-    if (parameters != null && parameters.length > 0) {
-      _parameters.forEach((String name, String value) {
-        sb.add("; ");
-        sb.add(name);
-        sb.add("=");
-        sb.add(value);
-      });
-    }
-    return sb.toString();
-  }
-
-  void _parse(String s) {
-    int index = 0;
-
-    bool done() => index == s.length;
-
-    void skipWS() {
-      while (!done()) {
-        if (s[index] != " " && s[index] != "\t") return;
-        index++;
-      }
-    }
-
-    String parseValue() {
-      int start = index;
-      while (!done()) {
-        if (s[index] == " " ||
-            s[index] == "\t" ||
-            s[index] == parameterSeparator) break;
-        index++;
-      }
-      return s.substring(start, index).toLowerCase();
-    }
-
-    void expect(String expected) {
-      if (done() || s[index] != expected) {
-        throw new HttpException("Failed to parse header value");
-      }
-      index++;
-    }
-
-    void maybeExpect(String expected) {
-      if (s[index] == expected) index++;
-    }
-
-    void parseParameters() {
-      _parameters = new Map<String, String>();
-
-      String parseParameterName() {
-        int start = index;
-        while (!done()) {
-          if (s[index] == " " || s[index] == "\t" || s[index] == "=") break;
-          index++;
-        }
-        return s.substring(start, index).toLowerCase();
-      }
-
-      String parseParameterValue() {
-        if (s[index] == "\"") {
-          // Parse quoted value.
-          StringBuffer sb = new StringBuffer();
-          index++;
-          while (!done()) {
-            if (s[index] == "\\") {
-              if (index + 1 == s.length) {
-                throw new HttpException("Failed to parse header value");
-              }
-              index++;
-            } else if (s[index] == "\"") {
-              index++;
-              break;
-            }
-            sb.add(s[index]);
-            index++;
-          }
-          return sb.toString();
-        } else {
-          // Parse non-quoted value.
-          return parseValue();
-        }
-      }
-
-      while (!done()) {
-        skipWS();
-        if (done()) return;
-        String name = parseParameterName();
-        skipWS();
-        expect("=");
-        skipWS();
-        String value = parseParameterValue();
-        _parameters[name] = value;
-        skipWS();
-        if (done()) return;
-        expect(parameterSeparator);
-      }
-    }
-
-    skipWS();
-    value = parseValue();
-    skipWS();
-    if (done()) return;
-    maybeExpect(parameterSeparator);
-    parseParameters();
-  }
-
-  String value;
-  String parameterSeparator;
-  Map<String, String> _parameters;
-}
-
-
-class _ContentType extends _HeaderValue implements ContentType {
-  _ContentType(String primaryType, String subType)
-      : _primaryType = primaryType, _subType = subType, super("");
-
-  _ContentType.fromString(String value) : super.fromString(value);
-
-  String get value => "$_primaryType/$_subType";
-
-  void set value(String s) {
-    int index = s.indexOf("/");
-    if (index == -1 || index == (s.length - 1)) {
-      primaryType = s.trim().toLowerCase();
-      subType = "";
-    } else {
-      primaryType = s.substring(0, index).trim().toLowerCase();
-      subType = s.substring(index + 1).trim().toLowerCase();
-    }
-  }
-
-  String get primaryType => _primaryType;
-
-  void set primaryType(String s) {
-    _primaryType = s;
-  }
-
-  String get subType => _subType;
-
-  void set subType(String s) {
-    _subType = s;
-  }
-
-  String get charset => parameters["charset"];
-
-  void set charset(String s) {
-    parameters["charset"] = s;
-  }
-
-  String _primaryType = "";
-  String _subType = "";
-}
-
-
-class _Cookie implements Cookie {
-  _Cookie([String this.name, String this.value]);
-
-  _Cookie.fromSetCookieValue(String value) {
-    // Parse the Set-Cookie header value.
-    _parseSetCookieValue(value);
-  }
-
-  // Parse a Set-Cookie header value according to the rules in RFC 6265.
-  void _parseSetCookieValue(String s) {
-    int index = 0;
-
-    bool done() => index == s.length;
-
-    String parseName() {
-      int start = index;
-      while (!done()) {
-        if (s[index] == "=") break;
-        index++;
-      }
-      return s.substring(start, index).trim().toLowerCase();
-    }
-
-    String parseValue() {
-      int start = index;
-      while (!done()) {
-        if (s[index] == ";") break;
-        index++;
-      }
-      return s.substring(start, index).trim().toLowerCase();
-    }
-
-    void expect(String expected) {
-      if (done()) throw new HttpException("Failed to parse header value [$s]");
-      if (s[index] != expected) {
-        throw new HttpException("Failed to parse header value [$s]");
-      }
-      index++;
-    }
-
-    void parseAttributes() {
-      String parseAttributeName() {
-        int start = index;
-        while (!done()) {
-          if (s[index] == "=" || s[index] == ";") break;
-          index++;
-        }
-        return s.substring(start, index).trim().toLowerCase();
-      }
-
-      String parseAttributeValue() {
-        int start = index;
-        while (!done()) {
-          if (s[index] == ";") break;
-          index++;
-        }
-        return s.substring(start, index).trim().toLowerCase();
-      }
-
-      while (!done()) {
-        String name = parseAttributeName();
-        String value = "";
-        if (!done() && s[index] == "=") {
-          index++;  // Skip the = character.
-          value = parseAttributeValue();
-        }
-        if (name == "expires") {
-          expires = _HttpUtils.parseCookieDate(value);
-        } else if (name == "max-age") {
-          maxAge = parseInt(value);
-        } else if (name == "domain") {
-          domain = value;
-        } else if (name == "path") {
-          path = value;
-        } else if (name == "httponly") {
-          httpOnly = true;
-        } else if (name == "secure") {
-          secure = true;
-        }
-        if (!done()) index++;  // Skip the ; character
-      }
-    }
-
-    name = parseName();
-    if (done() || name.length == 0) {
-      throw new HttpException("Failed to parse header value [$s]");
-    }
-    index++;  // Skip the = character.
-    value = parseValue();
-    if (done()) return;
-    index++;  // Skip the ; character.
-    parseAttributes();
-  }
-
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.add(name);
-    sb.add("=");
-    sb.add(value);
-    if (expires != null) {
-      sb.add("; Expires=");
-      sb.add(_HttpUtils.formatDate(expires));
-    }
-    if (maxAge != null) {
-      sb.add("; Max-Age=");
-      sb.add(maxAge);
-    }
-    if (domain != null) {
-      sb.add("; Domain=");
-      sb.add(domain);
-    }
-    if (path != null) {
-      sb.add("; Path=");
-      sb.add(path);
-    }
-    if (secure) sb.add("; Secure");
-    if (httpOnly) sb.add("; HttpOnly");
-    return sb.toString();
-  }
-
-  String name;
-  String value;
-  Date expires;
-  int maxAge;
-  String domain;
-  String path;
-  bool httpOnly = false;
-  bool secure = false;
+  final Set<_HttpConnectionBase> _q;
 }
 
 
 class _HttpRequestResponseBase {
-  final int START = 0;
-  final int HEADER_SENT = 1;
-  final int DONE = 2;
-  final int UPGRADED = 3;
+  static const int START = 0;
+  static const int HEADER_SENT = 1;
+  static const int DONE = 2;
+  static const int UPGRADED = 3;
 
   _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection)
-      : _headers = new _HttpHeaders() {
-    _state = START;
-    _headResponse = false;
-  }
+      : _state = START, _headResponse = false;
 
   int get contentLength => _contentLength;
   HttpHeaders get headers => _headers;
@@ -696,14 +162,6 @@
       }
       assert(_headResponse || _bodyBytesWritten == _contentLength);
     }
-    // If we are done writing the response, and either the client has
-    // closed or the connection is not persistent, we can close. Also
-    // if using HTTP 1.0 and the content length was not known we must
-    // close to indicate end of body.
-    if (!persistentConnection || _httpConnection._closing ||
-        (_protocolVersion == "1.0" && _contentLength < 0)) {
-      _httpConnection._close();
-    }
     return allWritten;
   }
 
@@ -855,7 +313,6 @@
   InputStream get inputStream {
     if (_inputStream == null) {
       _inputStream = new _HttpInputStream(this);
-      _inputStream._streamMarkedClosed = _dataEndCalled;
     }
     return _inputStream;
   }
@@ -872,17 +329,14 @@
     return _session = sessionManager.createSession(init);
   }
 
-  void _onRequestStart(String method, String uri, String version) {
+  void _onRequestReceived(String method,
+                          String uri,
+                          String version,
+                          _HttpHeaders headers) {
     _method = method;
     _uri = uri;
     _parseRequestUri(uri);
-  }
-
-  void _onHeaderReceived(String name, String value) {
-    _headers.add(name, value);
-  }
-
-  void _onHeadersComplete() {
+    _headers = headers;
     if (_httpConnection._server._sessionManagerInstance != null) {
       // Map to session if exists.
       var sessionId = cookies.reduce(null, (last, cookie) {
@@ -913,8 +367,11 @@
   }
 
   void _onDataEnd() {
-    if (_inputStream != null) _inputStream._closeReceived();
-    _dataEndCalled = true;
+    if (_inputStream != null) {
+      _inputStream._closeReceived();
+    } else {
+      inputStream._streamMarkedClosed = true;
+    }
   }
 
   // Escaped characters in uri are expected to have been parsed.
@@ -957,7 +414,6 @@
   Map<String, String> _queryParameters;
   _HttpInputStream _inputStream;
   _BufferList _buffer;
-  bool _dataEndCalled = false;
   Function _streamErrorHandler;
   _HttpSession _session;
 }
@@ -967,10 +423,14 @@
 class _HttpResponse extends _HttpRequestResponseBase implements HttpResponse {
   _HttpResponse(_HttpConnection httpConnection)
       : super(httpConnection),
-        _statusCode = HttpStatus.OK;
+        _statusCode = HttpStatus.OK {
+    _headers = new _HttpHeaders();
+  }
 
   void set contentLength(int contentLength) {
-    if (_state >= HEADER_SENT) throw new HttpException("Header already sent");
+    if (_state >= _HttpRequestResponseBase.HEADER_SENT) {
+      throw new HttpException("Header already sent");
+    }
     _contentLength = contentLength;
   }
 
@@ -992,7 +452,9 @@
   }
 
   OutputStream get outputStream {
-    if (_state >= DONE) throw new HttpException("Response closed");
+    if (_state >= _HttpRequestResponseBase.DONE) {
+      throw new HttpException("Response closed");
+    }
     if (_outputStream == null) {
       _outputStream = new _HttpOutputStream(this);
     }
@@ -1000,29 +462,20 @@
   }
 
   DetachedSocket detachSocket() {
-    if (_state >= DONE) throw new HttpException("Response closed");
+    if (_state >= _HttpRequestResponseBase.DONE) {
+      throw new HttpException("Response closed");
+    }
     // Ensure that headers are written.
-    if (_state == START) {
+    if (_state == _HttpRequestResponseBase.START) {
       _writeHeader();
     }
-    _state = UPGRADED;
+    _state = _HttpRequestResponseBase.UPGRADED;
     // Ensure that any trailing data is written.
     _writeDone();
     // Indicate to the connection that the response handling is done.
     return _httpConnection._detachSocket();
   }
 
-  void _responseEnd() {
-    _ensureHeadersSent();
-    _state = DONE;
-    // Stop tracking no pending write events.
-    _httpConnection._onNoPendingWrites = null;
-    // Ensure that any trailing data is written.
-    _writeDone();
-    // Indicate to the connection that the response handling is done.
-    _httpConnection._responseDone();
-  }
-
   // Delegate functions for the HttpOutputStream implementation.
   bool _streamWrite(List<int> buffer, bool copyBuffer) {
     if (_done) throw new HttpException("Response closed");
@@ -1039,11 +492,18 @@
   }
 
   void _streamClose() {
-    _responseEnd();
+    _ensureHeadersSent();
+    _state = _HttpRequestResponseBase.DONE;
+    // Stop tracking no pending write events.
+    _httpConnection._onNoPendingWrites = null;
+    // Ensure that any trailing data is written.
+    _writeDone();
+    // Indicate to the connection that the response handling is done.
+    _httpConnection._responseClosed();
   }
 
   void _streamSetNoPendingWriteHandler(callback()) {
-    if (_state != DONE) {
+    if (_state != _HttpRequestResponseBase.DONE) {
       _httpConnection._onNoPendingWrites = callback;
     }
   }
@@ -1162,7 +622,7 @@
 
     // Write headers.
     bool allWritten = _writeHeaders();
-    _state = HEADER_SENT;
+    _state = _HttpRequestResponseBase.HEADER_SENT;
     return allWritten;
   }
 
@@ -1256,32 +716,49 @@
 
 
 abstract class _HttpConnectionBase {
-  _HttpConnectionBase() : _httpParser = new _HttpParser(),
-                          hashCode = _nextHashCode {
+  static const int IDLE = 0;
+  static const int ACTIVE = 1;
+  static const int REQUEST_DONE = 2;
+  static const int RESPONSE_DONE = 4;
+  static const int ALL_DONE = REQUEST_DONE | RESPONSE_DONE;
+  static const int READ_CLOSED = 8;
+  static const int WRITE_CLOSED = 16;
+  static const int FULLY_CLOSED = READ_CLOSED | WRITE_CLOSED;
+
+  _HttpConnectionBase() : hashCode = _nextHashCode {
     _nextHashCode = (_nextHashCode + 1) & 0xFFFFFFF;
   }
 
+  bool get _isRequestDone => (_state & REQUEST_DONE) == REQUEST_DONE;
+  bool get _isResponseDone => (_state & RESPONSE_DONE) == RESPONSE_DONE;
+  bool get _isAllDone => (_state & ALL_DONE) == ALL_DONE;
+  bool get _isReadClosed => (_state & READ_CLOSED) == READ_CLOSED;
+  bool get _isWriteClosed => (_state & WRITE_CLOSED) == WRITE_CLOSED;
+  bool get _isFullyClosed => (_state & FULLY_CLOSED) == FULLY_CLOSED;
+
   void _connectionEstablished(Socket socket) {
     _socket = socket;
-    // Register handler for socket events.
-    _socket.onData = _onData;
-    _socket.onClosed = _onClosed;
-    _socket.onError = _onError;
+    // Register handlers for socket events. All socket events are
+    // passed to the HTTP parser.
+    _socket.onData = () {
+      List<int> buffer = _socket.read();
+      if (buffer != null) {
+        _httpParser.streamData(buffer);
+      }
+    };
+    _socket.onClosed = _httpParser.streamDone;
+    _socket.onError = _httpParser.streamError;
     // Ignore errors in the socket output stream as this is getting
     // the same errors as the socket itself.
     _socket.outputStream.onError = (e) => null;
   }
 
   bool _write(List<int> data, [bool copyBuffer = false]) {
-    if (!_error && !_closing) {
-      return _socket.outputStream.write(data, copyBuffer);
-    }
+    return _socket.outputStream.write(data, copyBuffer);
   }
 
   bool _writeFrom(List<int> buffer, [int offset, int len]) {
-    if (!_error && !_closing) {
-      return _socket.outputStream.writeFrom(buffer, offset, len);
-    }
+    return _socket.outputStream.writeFrom(buffer, offset, len);
   }
 
   bool _flush() {
@@ -1289,42 +766,13 @@
   }
 
   bool _close() {
-    _closing = true;
     _socket.outputStream.close();
   }
 
   bool _destroy() {
-    _closing = true;
     _socket.close();
   }
 
-  void _onData() {
-    int available = _socket.available();
-    if (available == 0) {
-      return;
-    }
-
-    List<int> buffer = new Uint8List(available);
-    int bytesRead = _socket.readList(buffer, 0, available);
-    if (bytesRead > 0) {
-      _httpParser.writeList(buffer, 0, bytesRead);
-    }
-  }
-
-  void _onClosed() {
-    _closing = true;
-    _onConnectionClosed(null);
-  }
-
-  void _onError(e) {
-    // If an error occurs, make sure to close the socket if one is associated.
-    _error = true;
-    if (_socket != null) {
-      _socket.close();
-    }
-    _onConnectionClosed(e);
-  }
-
   DetachedSocket _detachSocket() {
     _socket.onData = null;
     _socket.onClosed = null;
@@ -1337,7 +785,7 @@
   }
 
   HttpConnectionInfo get connectionInfo {
-    if (_socket == null || _closing || _error) return null;
+    if (_socket == null) return null;
     try {
       _HttpConnectionInfo info = new _HttpConnectionInfo();
       info.remoteHost = _socket.remoteHost;
@@ -1348,21 +796,18 @@
     return null;
   }
 
-  void _onConnectionClosed(e);
-  void _responseDone();
-
   void set _onNoPendingWrites(void callback()) {
-    if (!_error) {
-      _socket.outputStream.onNoPendingWrites = callback;
-    }
+    _socket.outputStream.onNoPendingWrites = callback;
   }
 
+  int _state = IDLE;
+
   Socket _socket;
-  bool _closing = false;  // Is the socket closed by the client?
-  bool _error = false;  // Is the socket closed due to an error?
   _HttpParser _httpParser;
 
+  // Callbacks.
   Function onDetach;
+  Function onClosed;
 
   // Hash code for HTTP connection. Currently this is just a counter.
   final int hashCode;
@@ -1373,82 +818,46 @@
 // HTTP server connection over a socket.
 class _HttpConnection extends _HttpConnectionBase {
   _HttpConnection(HttpServer this._server) {
+    _httpParser = new _HttpParser.requestParser();
     // Register HTTP parser callbacks.
-    _httpParser.requestStart =
-      (method, uri, version) => _onRequestStart(method, uri, version);
-    _httpParser.responseStart =
-      (statusCode, reasonPhrase, version) =>
-      _onResponseStart(statusCode, reasonPhrase, version);
-    _httpParser.headerReceived =
-        (name, value) => _onHeaderReceived(name, value);
-    _httpParser.headersComplete = () => _onHeadersComplete();
-    _httpParser.dataReceived = (data) => _onDataReceived(data);
-    _httpParser.dataEnd = (close) => _onDataEnd(close);
-    _httpParser.error = (e) => _onError(e);
+    _httpParser.requestStart = _onRequestReceived;
+    _httpParser.dataReceived = _onDataReceived;
+    _httpParser.dataEnd = _onDataEnd;
+    _httpParser.error = _onError;
+    _httpParser.closed = _onClosed;
+    _httpParser.responseStart = (statusCode, reasonPhrase, version) {
+      assert(false);
+    };
   }
 
-  void _onConnectionClosed(e) {
-    // Don't report errors when HTTP parser is in idle state. Clients
-    // can close the connection and cause a connection reset by peer
-    // error which is OK.
-    if (e != null && !_httpParser.isIdle) {
-      onError(e);
-      // Propagate the error to the streams.
-      if (_request != null && _request._streamErrorHandler != null) {
-        _request._streamErrorHandler(e);
-      }
-      if (_response != null && _response._streamErrorHandler != null) {
-        _response._streamErrorHandler(e);
-      }
-    }
-
-    // If currently not processing any request close the socket when
-    // we are done writing the response.
-    if (_httpParser.isIdle) {
-      // If the httpParser is idle and we get an error from the
-      // connection we deal with that as a closed connection and not
-      // as an error. When the client disappears we get a connection
-      // reset by peer and that is OK.
-      if (e != null) {
-        onClosed();
-      } else {
-        _socket.outputStream.onClosed = () {
-          _destroy();
-          onClosed();
-        };
-        // If the client closes and we are done writing the response
-        // the connection should be closed.
-        if (_response == null) _close();
-      }
-    } else {
-      // Processing a request.
-      if (e == null) {
-        // Indicate connection close to the HTTP parser.
-        _httpParser.connectionClosed();
-      }
-    }
+  void _onClosed() {
+    _state |= _HttpConnectionBase.READ_CLOSED;
   }
 
-  void _onRequestStart(String method, String uri, String version) {
+  void _onError(e) {
+    onError(e);
+    // Propagate the error to the streams.
+    if (_request != null && _request._streamErrorHandler != null) {
+      _request._streamErrorHandler(e);
+    }
+    if (_response != null && _response._streamErrorHandler != null) {
+      _response._streamErrorHandler(e);
+    }
+    if (_socket != null) _socket.close();
+  }
+
+  void _onRequestReceived(String method,
+                          String uri,
+                          String version,
+                          _HttpHeaders headers) {
+    _state = _HttpConnectionBase.ACTIVE;
     // Create new request and response objects for this request.
     _request = new _HttpRequest(this);
     _response = new _HttpResponse(this);
-    _request._onRequestStart(method, uri, version);
+    _request._onRequestReceived(method, uri, version, headers);
     _request._protocolVersion = version;
     _response._protocolVersion = version;
     _response._headResponse = method == "HEAD";
-  }
-
-  void _onResponseStart(int statusCode, String reasonPhrase, String version) {
-    // TODO(sgjesse): Error handling.
-  }
-
-  void _onHeaderReceived(String name, String value) {
-    _request._onHeaderReceived(name, value);
-  }
-
-  void _onHeadersComplete() {
-    _request._onHeadersComplete();
     _response.persistentConnection = _httpParser.persistentConnection;
     if (onRequestReceived != null) {
       onRequestReceived(_request, _response);
@@ -1459,20 +868,34 @@
     _request._onDataReceived(data);
   }
 
-  void _onDataEnd(bool close) {
-    _request._onDataEnd();
+  void _checkDone() {
+    if (_isAllDone) {
+      // If we are done writing the response, and either the client
+      // has closed or the connection is not persistent, we must
+      // close. Also if using HTTP 1.0 and the content length was not
+      // known we must close to indicate end of body.
+      bool close =
+          !_response.persistentConnection ||
+          (_response._protocolVersion == "1.0" && _response._contentLength < 0);
+      _request = null;
+      _response = null;
+      if (_isReadClosed || close) {
+        _server._closeQueue.add(this);
+      } else {
+        _state = _HttpConnectionBase.IDLE;
+      }
+    }
   }
 
-  void _responseDone() {
-    // If the connection is closing then close the output stream to
-    // fully close the socket.
-    if (_closing) {
-      _socket.outputStream.onClosed = () {
-        _socket.close();
-        onClosed();
-      };
-    }
-    _response = null;
+  void _onDataEnd(bool close) {
+    _request._onDataEnd();
+    _state |= _HttpConnectionBase.REQUEST_DONE;
+    _checkDone();
+  }
+
+  void _responseClosed() {
+    _state |= _HttpConnectionBase.RESPONSE_DONE;
+    _checkDone();
   }
 
   HttpServer _server;
@@ -1481,7 +904,6 @@
 
   // Callbacks.
   Function onRequestReceived;
-  Function onClosed;
   Function onError;
 }
 
@@ -1496,7 +918,8 @@
 // managed by the server and as requests are received the request.
 class _HttpServer implements HttpServer {
   _HttpServer() : _connections = new Set<_HttpConnection>(),
-                  _handlers = new List<_RequestHandlerRegistration>();
+                  _handlers = new List<_RequestHandlerRegistration>(),
+                  _closeQueue = new _CloseQueue();
 
   void listen(String host, int port, {int backlog: 128}) {
     listenOn(new ServerSocket(host, port, backlog));
@@ -1537,6 +960,7 @@
   }
 
   void close() {
+    _closeQueue.shutdown();
     if (_sessionManagerInstance != null) {
       _sessionManagerInstance.close();
       _sessionManagerInstance = null;
@@ -1552,7 +976,7 @@
   }
 
   int get port {
-    if (_server === null) {
+    if (_server == null) {
       throw new HttpException("The HttpServer is not listening on a port.");
     }
     return _server.port;
@@ -1607,6 +1031,7 @@
   List<_RequestHandlerRegistration> _handlers;
   Object _defaultHandler;
   Function _onError;
+  _CloseQueue _closeQueue;
   _HttpSessionManager _sessionManagerInstance;
 }
 
@@ -1617,6 +1042,7 @@
                      Uri this._uri,
                      _HttpClientConnection connection)
       : super(connection) {
+    _headers = new _HttpHeaders();
     _connection = connection;
     // Default GET and HEAD requests to have no content.
     if (_method == "GET" || _method == "HEAD") {
@@ -1625,7 +1051,9 @@
   }
 
   void set contentLength(int contentLength) {
-    if (_state >= HEADER_SENT) throw new HttpException("Header already sent");
+    if (_state >= _HttpRequestResponseBase.HEADER_SENT) {
+      throw new HttpException("Header already sent");
+    }
     _contentLength = contentLength;
   }
 
@@ -1659,16 +1087,16 @@
 
   void _streamClose() {
     _ensureHeadersSent();
-    _state = DONE;
+    _state = _HttpRequestResponseBase.DONE;
     // Stop tracking no pending write events.
     _httpConnection._onNoPendingWrites = null;
     // Ensure that any trailing data is written.
     _writeDone();
-    _connection._requestDone();
+    _connection._requestClosed();
   }
 
   void _streamSetNoPendingWriteHandler(callback()) {
-    if (_state != DONE) {
+    if (_state != _HttpRequestResponseBase.DONE) {
       _httpConnection._onNoPendingWrites = callback;
     }
   }
@@ -1732,7 +1160,7 @@
 
     // Write headers.
     _writeHeaders();
-    _state = HEADER_SENT;
+    _state = _HttpRequestResponseBase.HEADER_SENT;
   }
 
   String _method;
@@ -1775,22 +1203,54 @@
   InputStream get inputStream {
     if (_inputStream == null) {
       _inputStream = new _HttpInputStream(this);
-      _inputStream._streamMarkedClosed = _dataEndCalled;
     }
     return _inputStream;
   }
 
-  void _onRequestStart(String method, String uri, String version) {
-    // TODO(sgjesse): Error handling
-  }
-
-  void _onResponseStart(int statusCode, String reasonPhrase, String version) {
+  void _onResponseReceived(int statusCode,
+                           String reasonPhrase,
+                           String version,
+                           _HttpHeaders headers) {
     _statusCode = statusCode;
     _reasonPhrase = reasonPhrase;
-  }
+    _headers = headers;
+    // Get parsed content length.
+    _contentLength = _httpConnection._httpParser.contentLength;
 
-  void _onHeaderReceived(String name, String value) {
-    _headers.add(name, value);
+    // Prepare for receiving data.
+    _headers._mutable = false;
+    _buffer = new _BufferList();
+
+    if (isRedirect && _connection.followRedirects) {
+      if (_connection._redirects == null ||
+          _connection._redirects.length < _connection.maxRedirects) {
+        // Check the location header.
+        List<String> location = headers[HttpHeaders.LOCATION];
+        if (location == null || location.length > 1) {
+           throw new RedirectException("Invalid redirect",
+                                       _connection._redirects);
+        }
+        // Check for redirect loop
+        if (_connection._redirects != null) {
+          Uri redirectUrl = new Uri.fromString(location[0]);
+          for (int i = 0; i < _connection._redirects.length; i++) {
+            if (_connection._redirects[i].location.toString() ==
+                redirectUrl.toString()) {
+              throw new RedirectLoopException(_connection._redirects);
+            }
+          }
+        }
+        // Drain body and redirect.
+        inputStream.onData = inputStream.read;
+        _connection.redirect();
+      } else {
+        throw new RedirectLimitExceededException(_connection._redirects);
+      }
+    } else if (statusCode == HttpStatus.UNAUTHORIZED) {
+      _handleUnauthorized();
+    } else if (_connection._onResponse != null) {
+      _connection._onResponse(this);
+    }
   }
 
   void _handleUnauthorized() {
@@ -1866,55 +1326,17 @@
     }
   }
 
-  void _onHeadersComplete() {
-    // Get parsed content length.
-    _contentLength = _httpConnection._httpParser.contentLength;
-
-    // Prepare for receiving data.
-    _headers._mutable = false;
-    _buffer = new _BufferList();
-
-    if (isRedirect && _connection.followRedirects) {
-      if (_connection._redirects == null ||
-          _connection._redirects.length < _connection.maxRedirects) {
-        // Check the location header.
-        List<String> location = headers[HttpHeaders.LOCATION];
-        if (location == null || location.length > 1) {
-           throw new RedirectException("Invalid redirect",
-                                       _connection._redirects);
-        }
-        // Check for redirect loop
-        if (_connection._redirects != null) {
-          Uri redirectUrl = new Uri.fromString(location[0]);
-          for (int i = 0; i < _connection._redirects.length; i++) {
-            if (_connection._redirects[i].location.toString() ==
-                redirectUrl.toString()) {
-              throw new RedirectLoopException(_connection._redirects);
-            }
-          }
-        }
-        // Drain body and redirect.
-        inputStream.onData = inputStream.read;
-        _connection.redirect();
-      } else {
-        throw new RedirectLimitExceededException(_connection._redirects);
-      }
-    } else if (statusCode == HttpStatus.UNAUTHORIZED) {
-      _handleUnauthorized();
-    } else if (_connection._onResponse != null) {
-      _connection._onResponse(this);
-    }
-  }
-
   void _onDataReceived(List<int> data) {
     _buffer.add(data);
     if (_inputStream != null) _inputStream._dataReceived();
   }
 
   void _onDataEnd() {
-    _connection._responseDone();
-    if (_inputStream != null) _inputStream._closeReceived();
-    _dataEndCalled = true;
+    if (_inputStream != null) {
+      _inputStream._closeReceived();
+    } else {
+      inputStream._streamMarkedClosed = true;
+    }
   }
 
   // Delegate functions for the HttpInputStream implementation.
@@ -1942,7 +1364,6 @@
   _HttpClientConnection _connection;
   _HttpInputStream _inputStream;
   _BufferList _buffer;
-  bool _dataEndCalled = false;
 
   Function _streamErrorHandler;
 }
@@ -1950,64 +1371,52 @@
 
 class _HttpClientConnection
     extends _HttpConnectionBase implements HttpClientConnection {
-  static const int NONE = 0;
-  static const int REQUEST_DONE = 1;
-  static const int RESPONSE_DONE = 2;
-  static const int ALL_DONE = REQUEST_DONE | RESPONSE_DONE;
 
-  _HttpClientConnection(_HttpClient this._client);
+  _HttpClientConnection(_HttpClient this._client) {
+    _httpParser = new _HttpParser.responseParser();
+  }
 
   void _connectionEstablished(_SocketConnection socketConn) {
     super._connectionEstablished(socketConn._socket);
     _socketConn = socketConn;
     // Register HTTP parser callbacks.
-    _httpParser.requestStart =
-      (method, uri, version) => _onRequestStart(method, uri, version);
-    _httpParser.responseStart =
-      (statusCode, reasonPhrase, version) =>
-      _onResponseStart(statusCode, reasonPhrase, version);
-    _httpParser.headerReceived =
-        (name, value) => _onHeaderReceived(name, value);
-    _httpParser.headersComplete = () => _onHeadersComplete();
-    _httpParser.dataReceived = (data) => _onDataReceived(data);
-    _httpParser.dataEnd = (closed) => _onDataEnd(closed);
-    _httpParser.error = (e) => _onError(e);
+    _httpParser.responseStart = _onResponseReceived;
+    _httpParser.dataReceived = _onDataReceived;
+    _httpParser.dataEnd = _onDataEnd;
+    _httpParser.error = _onError;
+    _httpParser.closed = _onClosed;
+    _httpParser.requestStart = (method, uri, version) { assert(false); };
+    _state = _HttpConnectionBase.ACTIVE;
   }
 
-  bool get _isRequestDone => (_state & REQUEST_DONE) == REQUEST_DONE;
-  bool get _isResponseDone => (_state & RESPONSE_DONE) == RESPONSE_DONE;
-  bool get _isAllDone => (_state & ALL_DONE) == ALL_DONE;
-
   void _checkSocketDone() {
     if (_isAllDone) {
-      if (!_closing) {
+      // If we are done writing the response, and either the server
+      // has closed or the connection is not persistent, we must
+      // close.
+      if (_isReadClosed || !_response.persistentConnection) {
+        this.onClosed = () {
+          _client._closedSocketConnection(_socketConn);
+        };
+        _client._closeQueue.add(this);
+      } else {
         _client._returnSocketConnection(_socketConn);
-      }
-      _socket = null;
-      _socketConn = null;
-      assert(_pendingRedirect == null || _pendingRetry == null);
-      if (_pendingRedirect != null) {
-        _doRedirect(_pendingRedirect);
-        _pendingRedirect = null;
-      } else if (_pendingRetry != null) {
-        _doRetry(_pendingRetry);
-        _pendingRetry = null;
+        _socket = null;
+        _socketConn = null;
+        assert(_pendingRedirect == null || _pendingRetry == null);
+        if (_pendingRedirect != null) {
+          _doRedirect(_pendingRedirect);
+          _pendingRedirect = null;
+        } else if (_pendingRetry != null) {
+          _doRetry(_pendingRetry);
+          _pendingRetry = null;
+        }
       }
     }
   }
 
-  void _requestDone() {
-    _state |= REQUEST_DONE;
-    _checkSocketDone();
-  }
-
-  void _responseDone() {
-    if (_closing) {
-      if (_socket != null) {
-        _socket.close();
-      }
-    }
-    _state |= RESPONSE_DONE;
+  void _requestClosed() {
+    _state |= _HttpConnectionBase.REQUEST_DONE;
     _checkSocketDone();
   }
 
@@ -2024,44 +1433,31 @@
     return _detachSocket();
   }
 
-  void _onConnectionClosed(e) {
+  void _onClosed() {
+    _state |= _HttpConnectionBase.READ_CLOSED;
+  }
+
+  void _onError(e) {
     // Socket is closed either due to an error or due to normal socket close.
-    if (e != null) {
-      if (_onErrorCallback != null) {
-        _onErrorCallback(e);
-      } else {
-        throw e;
-      }
-    }
-    _closing = true;
-    if (e != null) {
-      // Propagate the error to the streams.
-      if (_response != null && _response._streamErrorHandler != null) {
-        _response._streamErrorHandler(e);
-      }
-      _responseDone();
+    if (_onErrorCallback != null) {
+      _onErrorCallback(e);
     } else {
-      // If there was no socket error the socket was closed
-      // normally. Indicate closing to the HTTP Parser as there might
-      // still be an HTTP error.
-      _httpParser.connectionClosed();
+      throw e;
+    }
+    // Propagate the error to the streams.
+    if (_response != null && _response._streamErrorHandler != null) {
+       _response._streamErrorHandler(e);
+    }
+    if (_socketConn != null) {
+      _client._closeSocketConnection(_socketConn);
     }
   }
 
-  void _onRequestStart(String method, String uri, String version) {
-    // TODO(sgjesse): Error handling.
-  }
-
-  void _onResponseStart(int statusCode, String reasonPhrase, String version) {
-    _response._onResponseStart(statusCode, reasonPhrase, version);
-  }
-
-  void _onHeaderReceived(String name, String value) {
-    _response._onHeaderReceived(name, value);
-  }
-
-  void _onHeadersComplete() {
-    _response._onHeadersComplete();
+  void _onResponseReceived(int statusCode,
+                           String reasonPhrase,
+                           String version,
+                           _HttpHeaders headers) {
+    _response._onResponseReceived(statusCode, reasonPhrase, version, headers);
   }
 
   void _onDataReceived(List<int> data) {
@@ -2069,8 +1465,9 @@
   }
 
   void _onDataEnd(bool close) {
-    if (close) _closing = true;
     _response._onDataEnd();
+    _state |= _HttpConnectionBase.RESPONSE_DONE;
+    _checkSocketDone();
   }
 
   void set onRequest(void handler(HttpClientRequest request)) {
@@ -2091,7 +1488,7 @@
     _response = null;
 
     // Retry the URL using the same connection instance.
-    _state = NONE;
+    _state = _HttpConnectionBase.IDLE;
     _client._openUrl(retry.method, retry.location, this);
   }
 
@@ -2135,8 +1532,6 @@
     }
   }
 
-  int _state = NONE;
-
   List<RedirectInfo> get redirects => _redirects;
 
   Function _onRequest;
@@ -2176,6 +1571,13 @@
     _returnTime = new Date.now();
   }
 
+  void _close() {
+    _socket.onData = null;
+    _socket.onClosed = null;
+    _socket.onError = null;
+    _socket.close();
+  }
+
   Duration _idleTime(Date now) => now.difference(_returnTime);
 
   int get hashCode => _socket.hashCode;
@@ -2245,6 +1647,7 @@
 
   _HttpClient() : _openSockets = new Map(),
                   _activeSockets = new Set(),
+                  _closeQueue = new _CloseQueue(),
                   credentials = new List<_Credentials>(),
                   _shutdown = false;
 
@@ -2303,15 +1706,16 @@
   set findProxy(String f(Uri uri)) => _findProxy = f;
 
   void shutdown() {
-     _openSockets.forEach((String key, Queue<_SocketConnection> connections) {
-       while (!connections.isEmpty) {
-         _SocketConnection socketConn = connections.removeFirst();
-         socketConn._socket.close();
-       }
-     });
-     _activeSockets.forEach((_SocketConnection socketConn) {
-       socketConn._socket.close();
-     });
+    _closeQueue.shutdown();
+    _openSockets.forEach((String key, Queue<_SocketConnection> connections) {
+      while (!connections.isEmpty) {
+        _SocketConnection socketConn = connections.removeFirst();
+        socketConn._socket.close();
+      }
+    });
+    _activeSockets.forEach((_SocketConnection socketConn) {
+      socketConn._socket.close();
+    });
     if (_evictionTimer != null) _cancelEvictionTimer();
      _shutdown = true;
   }
@@ -2333,7 +1737,8 @@
     void _establishConnection(String host,
                               int port,
                               _ProxyConfiguration proxyConfiguration,
-                              int proxyIndex) {
+                              int proxyIndex,
+                              bool reusedConnection) {
 
       void _connectionOpened(_SocketConnection socketConn,
                              _HttpClientConnection connection,
@@ -2357,7 +1762,9 @@
             cr.authorize(request);
           }
         }
-        if (connection._onRequest != null) {
+        // A reused connection is indicating either redirect or retry
+        // where the onRequest callback should not be issued again.
+        if (connection._onRequest != null && !reusedConnection) {
           connection._onRequest(request);
         } else {
           request.outputStream.close();
@@ -2391,7 +1798,8 @@
           proxyIndex++;
           if (proxyIndex < proxyConfiguration.proxies.length) {
             // Try the next proxy in the list.
-            _establishConnection(host, port, proxyConfiguration, proxyIndex);
+            _establishConnection(
+                host, port, proxyConfiguration, proxyIndex, false);
           } else {
             // Report the error through the HttpClientConnection object to
             // the client.
@@ -2426,8 +1834,11 @@
     int port = url.port == 0 ? HttpClient.DEFAULT_HTTP_PORT : url.port;
 
     // Create a new connection object if we are not re-using an existing one.
+    var reusedConnection = false;
     if (connection == null) {
       connection = new _HttpClientConnection(this);
+    } else {
+      reusedConnection = true;
     }
     connection.onDetach = () => _activeSockets.remove(connection._socketConn);
 
@@ -2440,7 +1851,7 @@
     }
 
     // Establish the connection starting with the first proxy configured.
-    _establishConnection(host, port, proxyConfiguration, 0);
+    _establishConnection(host, port, proxyConfiguration, 0, reusedConnection);
 
     return connection;
   }
@@ -2470,7 +1881,7 @@
         Date now = new Date.now();
         List<String> emptyKeys = new List<String>();
         _openSockets.forEach(
-            void _(String key, Queue<_SocketConnection> connections) {
+            (String key, Queue<_SocketConnection> connections) {
               // As returned connections are added at the head of the
               // list remove from the tail.
               while (!connections.isEmpty) {
@@ -2500,6 +1911,15 @@
     sockets.addFirst(socketConn);
   }
 
+  void _closeSocketConnection(_SocketConnection socketConn) {
+    socketConn._close();
+    _activeSockets.remove(socketConn);
+  }
+
+  void _closedSocketConnection(_SocketConnection socketConn) {
+    _activeSockets.remove(socketConn);
+  }
+
   _Credentials _findCredentials(Uri url, [_AuthenticationScheme scheme]) {
     // Look for credentials.
     _Credentials cr =
@@ -2524,6 +1944,7 @@
   Function _onOpen;
   Map<String, Queue<_SocketConnection>> _openSockets;
   Set<_SocketConnection> _activeSockets;
+  _CloseQueue _closeQueue;
   List<_Credentials> credentials;
   Timer _evictionTimer;
   Function _findProxy;
diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart
index 61e0a64..c4e966e 100644
--- a/sdk/lib/io/http_parser.dart
+++ b/sdk/lib/io/http_parser.dart
@@ -99,10 +99,9 @@
  *
  *   [:requestStart:]
  *   [:responseStart:]
- *   [:headerReceived:]
- *   [:headersComplete:]
  *   [:dataReceived:]
  *   [:dataEnd:]
+ *   [:closed:]
  *   [:error:]
  *
  * If an HTTP parser error occours it is possible to get an exception
@@ -112,7 +111,7 @@
  * The connection upgrades (e.g. switching from HTTP/1.1 to the
  * WebSocket protocol) is handled in a special way. If connection
  * upgrade is specified in the headers, then on the callback to
- * [:headersComplete:] the [:upgrade:] property on the [:HttpParser:]
+ * [:responseStart:] the [:upgrade:] property on the [:HttpParser:]
  * object will be [:true:] indicating that from now on the protocol is
  * not HTTP anymore and no more callbacks will happen, that is
  * [:dataReceived:] and [:dataEnd:] are not called in this case as
@@ -124,7 +123,12 @@
  * upgraded to.
  */
 class _HttpParser {
-  _HttpParser() {
+  _HttpParser.requestParser() {
+    _requestParser = true;
+    _reset();
+  }
+  _HttpParser.responseParser() {
+    _requestParser = false;
     _reset();
   }
 
@@ -164,7 +168,10 @@
               if (!_isTokenChar(byte)) {
                 throw new HttpParserException("Invalid request method");
               }
-              _method_or_status_code.addCharCode(byte);
+              _method_or_status_code.add(byte);
+              if (!_requestParser) {
+                throw new HttpParserException("Invalid response line");
+              }
               _state = _State.REQUEST_LINE_METHOD;
             }
             break;
@@ -179,17 +186,23 @@
               // HTTP/ parsed. As method is a token this cannot be a
               // method anymore.
               _httpVersionIndex++;
+              if (_requestParser) {
+                throw new HttpParserException("Invalid request line");
+              }
               _state = _State.RESPONSE_HTTP_VERSION;
             } else {
               // Did not parse HTTP version. Expect method instead.
               for (int i = 0; i < _httpVersionIndex; i++) {
-                _method_or_status_code.addCharCode(_Const.HTTP[i]);
+                _method_or_status_code.add(_Const.HTTP[i]);
               }
               if (byte == _CharCode.SP) {
                 _state = _State.REQUEST_LINE_URI;
               } else {
-                _method_or_status_code.addCharCode(byte);
+                _method_or_status_code.add(byte);
                 _httpVersion = _HttpVersion.UNDETERMINED;
+                if (!_requestParser) {
+                  throw new HttpParserException("Invalid response line");
+                }
                 _state = _State.REQUEST_LINE_METHOD;
               }
             }
@@ -228,7 +241,7 @@
               if (_Const.SEPARATORS_AND_CR_LF.indexOf(byte) != -1) {
                 throw new HttpParserException("Invalid request method");
               }
-              _method_or_status_code.addCharCode(byte);
+              _method_or_status_code.add(byte);
             }
             break;
 
@@ -243,7 +256,7 @@
               if (byte == _CharCode.CR || byte == _CharCode.LF) {
                 throw new HttpParserException("Invalid request URI");
               }
-              _uri_or_reason_phrase.addCharCode(byte);
+              _uri_or_reason_phrase.add(byte);
             }
             break;
 
@@ -274,13 +287,6 @@
           case _State.REQUEST_LINE_ENDING:
             _expect(byte, _CharCode.LF);
             _messageType = _MessageType.REQUEST;
-            if (requestStart != null) {
-              requestStart(_method_or_status_code.toString(),
-                           _uri_or_reason_phrase.toString(),
-                           version);
-            }
-            _method_or_status_code.clear();
-            _uri_or_reason_phrase.clear();
             _state = _State.HEADER_START;
             break;
 
@@ -294,7 +300,7 @@
               if (byte < 0x30 && 0x39 < byte) {
                 throw new HttpParserException("Invalid response status code");
               } else {
-                _method_or_status_code.addCharCode(byte);
+                _method_or_status_code.add(byte);
               }
             }
             break;
@@ -309,28 +315,21 @@
               if (byte == _CharCode.CR || byte == _CharCode.LF) {
                 throw new HttpParserException("Invalid response reason phrase");
               }
-              _uri_or_reason_phrase.addCharCode(byte);
+              _uri_or_reason_phrase.add(byte);
             }
             break;
 
           case _State.RESPONSE_LINE_ENDING:
             _expect(byte, _CharCode.LF);
             _messageType == _MessageType.RESPONSE;
-            int statusCode = parseInt(_method_or_status_code.toString());
-            if (statusCode < 100 || statusCode > 599) {
+             _statusCode = parseInt(new String.fromCharCodes(_method_or_status_code));
+            if (_statusCode < 100 || _statusCode > 599) {
               throw new HttpParserException("Invalid response status code");
             } else {
               // Check whether this response will never have a body.
               _noMessageBody =
-                  statusCode <= 199 || statusCode == 204 || statusCode == 304;
+                  _statusCode <= 199 || _statusCode == 204 || _statusCode == 304;
             }
-            if (responseStart != null) {
-              responseStart(statusCode,
-                            _uri_or_reason_phrase.toString(),
-                            version);
-            }
-            _method_or_status_code.clear();
-            _uri_or_reason_phrase.clear();
             _state = _State.HEADER_START;
             break;
 
@@ -339,7 +338,7 @@
               _state = _State.HEADER_ENDING;
             } else {
               // Start of new header field.
-              _headerField.addCharCode(_toLowerCase(byte));
+              _headerField.add(_toLowerCase(byte));
               _state = _State.HEADER_FIELD;
             }
             break;
@@ -351,7 +350,7 @@
               if (!_isTokenChar(byte)) {
                 throw new HttpParserException("Invalid header field name");
               }
-              _headerField.addCharCode(_toLowerCase(byte));
+              _headerField.add(_toLowerCase(byte));
             }
             break;
 
@@ -360,7 +359,7 @@
               _state = _State.HEADER_VALUE_FOLDING_OR_ENDING;
             } else if (byte != _CharCode.SP && byte != _CharCode.HT) {
               // Start of new header value.
-              _headerValue.addCharCode(byte);
+              _headerValue.add(byte);
               _state = _State.HEADER_VALUE;
             }
             break;
@@ -369,7 +368,7 @@
             if (byte == _CharCode.CR) {
               _state = _State.HEADER_VALUE_FOLDING_OR_ENDING;
             } else {
-              _headerValue.addCharCode(byte);
+              _headerValue.add(byte);
             }
             break;
 
@@ -382,8 +381,8 @@
             if (byte == _CharCode.SP || byte == _CharCode.HT) {
               _state = _State.HEADER_VALUE_START;
             } else {
-              String headerField = _headerField.toString();
-              String headerValue =_headerValue.toString();
+              String headerField = new String.fromCharCodes(_headerField);
+              String headerValue = new String.fromCharCodes(_headerValue);
               bool reportHeader = true;
               if (headerField == "content-length" && !_chunked) {
                 // Ignore the Content-Length header if Transfer-Encoding
@@ -400,9 +399,8 @@
                   } else if (token == "upgrade") {
                     _connectionUpgrade = true;
                   }
-                  if (headerReceived != null) {
-                    headerReceived(headerField, token);
-                  }
+                  _headers.add(headerField, token);
+
                 }
                 reportHeader = false;
               } else if (headerField == "transfer-encoding" &&
@@ -412,8 +410,8 @@
                 _chunked = true;
                 _contentLength = -1;
               }
-              if (reportHeader && headerReceived != null) {
-                headerReceived(headerField, headerValue);
+              if (reportHeader) {
+                _headers.add(headerField, headerValue);
               }
               _headerField.clear();
               _headerValue.clear();
@@ -422,7 +420,7 @@
                 _state = _State.HEADER_ENDING;
               } else {
                 // Start of new header field.
-                _headerField.addCharCode(_toLowerCase(byte));
+                _headerField.add(_toLowerCase(byte));
                 _state = _State.HEADER_FIELD;
               }
             }
@@ -440,9 +438,23 @@
             }
             if (_connectionUpgrade) {
               _state = _State.UPGRADED;
-              if (headersComplete != null) headersComplete();
+            }
+            if (_requestParser) {
+              requestStart(new String.fromCharCodes(_method_or_status_code),
+                           new String.fromCharCodes(_uri_or_reason_phrase),
+                           version,
+                           _headers);
             } else {
-              if (headersComplete != null) headersComplete();
+              responseStart(_statusCode,
+                            new String.fromCharCodes(_uri_or_reason_phrase),
+                            version,
+                            _headers);
+            }
+            _method_or_status_code.clear();
+            _uri_or_reason_phrase.clear();
+            if (!_connectionUpgrade) {
+              _method_or_status_code.clear();
+              _uri_or_reason_phrase.clear();
               if (_chunked) {
                 _state = _State.CHUNK_SIZE;
                 _remainingContent = 0;
@@ -525,7 +537,7 @@
               data.setRange(0, _remainingContent, _buffer, _index);
             }
 
-            if (dataReceived != null) dataReceived(data);
+            dataReceived(data);
             if (_remainingContent != null) {
               _remainingContent -= data.length;
             }
@@ -552,14 +564,8 @@
         }
       }
     } catch (e) {
-      // Report the error through the error callback if any. Otherwise
-      // throw the error.
-      if (error != null) {
-        error(e);
-        _state = _State.FAILURE;
-      } else {
-        throw e;
-      }
+      _state = _State.FAILURE;
+      error(e);
     }
 
     // If all data is parsed or not needed due to failure there is no
@@ -567,47 +573,62 @@
     if (_state != _State.UPGRADED) _releaseBuffer();
   }
 
-  void writeList(List<int> buffer, int offset, int count) {
+  void streamData(List<int> buffer) {
     assert(_buffer == null);
     _buffer = buffer;
-    _index = offset;
-    _lastIndex = offset + count;
+    _index = 0;
+    _lastIndex = buffer.length;
     _parse();
   }
 
-  void connectionClosed() {
+  void streamDone() {
+    // If the connection is idle the HTTP stream is closed.
+    if (_state == _State.START) {
+      if (_requestParser) {
+        closed();
+      } else {
+        error(
+            new HttpParserException(
+                "Connection closed before full header was received"));
+      }
+      return;
+    }
+
     if (_state < _State.FIRST_BODY_STATE) {
       _state = _State.FAILURE;
       // Report the error through the error callback if any. Otherwise
       // throw the error.
-      var e = new HttpParserException(
-          "Connection closed before full header was received");
-      if (error != null) {
-        error(e);
-        return;
-      }
-      throw e;
+      error(
+          new HttpParserException(
+              "Connection closed before full header was received"));
+      return;
     }
 
     if (!_chunked && _contentLength == -1) {
-      if (_state != _State.START) {
-        if (dataEnd != null) dataEnd(true);
-      }
+      dataEnd(true);
       _state = _State.CLOSED;
+      closed();
     } else {
       _state = _State.FAILURE;
       // Report the error through the error callback if any. Otherwise
       // throw the error.
-      var e = new HttpParserException(
-          "Connection closed before full body was received");
-      if (error != null) {
-        error(e);
-        return;
-      }
-      throw e;
+      error(
+          new HttpParserException(
+              "Connection closed before full body was received"));
     }
   }
 
+  void streamError(e) {
+    // Don't report errors when HTTP parser is in idle state. Clients
+    // can close the connection and cause a connection reset by peer
+    // error which is OK.
+    if (_state == _State.START) {
+      closed();
+      return;
+    }
+    error(e);
+  }
+
   String get version {
     switch (_httpVersion) {
       case _HttpVersion.HTTP10:
@@ -625,8 +646,6 @@
 
   void set responseToMethod(String method) { _responseToMethod = method; }
 
-  bool get isIdle => _state == _State.START;
-
   List<int> readUnparsedData() {
     if (_buffer == null) return [];
     if (_index == _lastIndex) return [];
@@ -636,18 +655,16 @@
   }
 
   void _bodyEnd() {
-    if (dataEnd != null) {
-      dataEnd(_messageType == _MessageType.RESPONSE && !_persistentConnection);
-    }
+    dataEnd(_messageType == _MessageType.RESPONSE && !_persistentConnection);
   }
 
   _reset() {
     _state = _State.START;
     _messageType = _MessageType.UNDETERMINED;
-    _headerField = new StringBuffer();
-    _headerValue = new StringBuffer();
-    _method_or_status_code = new StringBuffer();
-    _uri_or_reason_phrase = new StringBuffer();
+    _headerField = new List();
+    _headerValue = new List();
+    _method_or_status_code = new List();
+    _uri_or_reason_phrase = new List();
 
     _httpVersion = _HttpVersion.UNDETERMINED;
     _contentLength = -1;
@@ -658,6 +675,8 @@
     _noMessageBody = false;
     _responseToMethod = null;
     _remainingContent = null;
+
+    _headers = new _HttpHeaders();
   }
 
   _releaseBuffer() {
@@ -717,13 +736,15 @@
   int _index;
   int _lastIndex;
 
+  bool _requestParser;
   int _state;
   int _httpVersionIndex;
   int _messageType;
-  StringBuffer _method_or_status_code;
-  StringBuffer _uri_or_reason_phrase;
-  StringBuffer _headerField;
-  StringBuffer _headerValue;
+  int _statusCode;
+  List _method_or_status_code;
+  List _uri_or_reason_phrase;
+  List _headerField;
+  List _headerValue;
 
   int _httpVersion;
   int _contentLength;
@@ -735,14 +756,15 @@
   String _responseToMethod;  // Indicates the method used for the request.
   int _remainingContent;
 
+  _HttpHeaders _headers = new _HttpHeaders();
+
   // Callbacks.
   Function requestStart;
   Function responseStart;
-  Function headerReceived;
-  Function headersComplete;
   Function dataReceived;
   Function dataEnd;
   Function error;
+  Function closed;
 }
 
 
diff --git a/sdk/lib/io/http_session.dart b/sdk/lib/io/http_session.dart
index d214613..d23f642 100644
--- a/sdk/lib/io/http_session.dart
+++ b/sdk/lib/io/http_session.dart
@@ -23,7 +23,7 @@
     _sessionManager._bumpToEnd(this);
   }
 
-  Dynamic data;
+  dynamic data;
 
   Date get lastSeen => _lastSeen;
 
diff --git a/sdk/lib/io/http_utils.dart b/sdk/lib/io/http_utils.dart
index 668ba66..d1161f8 100644
--- a/sdk/lib/io/http_utils.dart
+++ b/sdk/lib/io/http_utils.dart
@@ -262,7 +262,7 @@
 
     bool isDelimiter(String s) {
       int char = s.charCodeAt(0);
-      if (char === 0x09) return true;
+      if (char == 0x09) return true;
       if (char >= 0x20 && char <= 0x2F) return true;
       if (char >= 0x3B && char <= 0x40) return true;
       if (char >= 0x5B && char <= 0x60) return true;
@@ -315,21 +315,21 @@
 
     for (var token in tokens) {
       if (token.length < 1) continue;
-      if (timeStr === null && token.length >= 5 && isDigit(token[0]) &&
+      if (timeStr == null && token.length >= 5 && isDigit(token[0]) &&
           (token[1] == ":" || (isDigit(token[1]) && token[2] == ":"))) {
         timeStr = token;
-      } else if (dayOfMonthStr === null && isDigit(token[0])) {
+      } else if (dayOfMonthStr == null && isDigit(token[0])) {
         dayOfMonthStr = token;
-      } else if (monthStr === null && getMonth(token) >= 0) {
+      } else if (monthStr == null && getMonth(token) >= 0) {
         monthStr = token;
-      } else if (yearStr === null && token.length >= 2 &&
+      } else if (yearStr == null && token.length >= 2 &&
                  isDigit(token[0]) && isDigit(token[1])) {
         yearStr = token;
       }
     }
 
-    if (timeStr === null || dayOfMonthStr === null ||
-        monthStr === null || yearStr === null) {
+    if (timeStr == null || dayOfMonthStr == null ||
+        monthStr == null || yearStr == null) {
       error();
     }
 
@@ -344,7 +344,7 @@
     int month = getMonth(monthStr) + 1;
 
     var timeList = timeStr.split(":");
-    if (timeList.length !== 3) error();
+    if (timeList.length != 3) error();
     int hour = toInt(timeList[0]);
     int minute = toInt(timeList[1]);
     int second = toInt(timeList[2]);
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index 92f044b..82e84b4 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -49,5 +49,6 @@
 #source('stream_util.dart');
 #source('string_stream.dart');
 #source('timer_impl.dart');
+#source('tls_socket.dart');
 #source('websocket.dart');
 #source('websocket_impl.dart');
diff --git a/sdk/lib/io/iolib_sources.gypi b/sdk/lib/io/iolib_sources.gypi
index 55a9bcf..2f5fa01 100644
--- a/sdk/lib/io/iolib_sources.gypi
+++ b/sdk/lib/io/iolib_sources.gypi
@@ -14,6 +14,7 @@
     'file.dart',
     'file_impl.dart',
     'http.dart',
+    'http_headers.dart',
     'http_impl.dart',
     'http_parser.dart',
     'http_session.dart',
@@ -34,6 +35,7 @@
     'stream_util.dart',
     'string_stream.dart',
     'timer_impl.dart',
+    'tls_socket.dart',
     'websocket.dart',
     'websocket_impl.dart',
   ],
diff --git a/sdk/lib/io/list_stream_impl.dart b/sdk/lib/io/list_stream_impl.dart
index 5bcc41a..824fa24 100644
--- a/sdk/lib/io/list_stream_impl.dart
+++ b/sdk/lib/io/list_stream_impl.dart
@@ -116,7 +116,7 @@
 
     void issueCloseCallback(Timer timer) {
       _scheduledCloseCallback = null;
-      if (_clientCloseHandler !== null) _clientCloseHandler();
+      if (_clientCloseHandler != null) _clientCloseHandler();
     }
 
     // Schedule no pending callback if there is a callback set as this
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index 8d6d9f2..f2062df 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -214,8 +214,25 @@
 
 
 class ProcessException implements Exception {
-  const ProcessException([String this.message = "", int this.errorCode = 0]);
-  String toString() => "ProcessException: $message ($errorCode)";
+  const ProcessException(String this.executable,
+                         List<String> this.arguments,
+                         [String this.message = "",
+                          int this.errorCode = 0]);
+  String toString() {
+    var msg = (message == null) ? 'OS error code: $errorCode' : message;
+    var args = Strings.join(arguments, ' ');
+    return "ProcessException: $msg\n  Command: $executable $args";
+  }
+
+  /**
+   * Contains the executable provided for the process.
+   */
+  final String executable;
+
+  /**
+   * Contains the arguments provided for the process.
+   */
+  final List<String> arguments;
 
   /**
    * Contains the system message for the process exception if any.
diff --git a/sdk/lib/io/socket_stream_impl.dart b/sdk/lib/io/socket_stream_impl.dart
index c8799b1..a824ffd 100644
--- a/sdk/lib/io/socket_stream_impl.dart
+++ b/sdk/lib/io/socket_stream_impl.dart
@@ -14,7 +14,7 @@
 
   int readInto(List<int> buffer, [int offset = 0, int len]) {
     if (_closed) return null;
-    if (len === null) len = buffer.length;
+    if (len == null) len = buffer.length;
     if (offset < 0) throw new StreamException("Illegal offset $offset");
     if (len < 0) throw new StreamException("Illegal length $len");
     return _socket.readList(buffer, offset, len);
@@ -49,7 +49,7 @@
 
   void _onClosed() {
     _closed = true;
-    if (_clientCloseHandler !== null) {
+    if (_clientCloseHandler != null) {
       _clientCloseHandler();
     }
   }
diff --git a/sdk/lib/io/stream_util.dart b/sdk/lib/io/stream_util.dart
index 1500181..f111a64 100644
--- a/sdk/lib/io/stream_util.dart
+++ b/sdk/lib/io/stream_util.dart
@@ -12,7 +12,7 @@
       _checkScheduleCallbacks();
       return null;
     }
-    if (len !== null) {
+    if (len != null) {
       if (len <= 0) {
         throw new StreamException("Illegal length $len");
       } else if (bytesToRead > len) {
@@ -24,7 +24,7 @@
 
   int readInto(List<int> buffer, [int offset = 0, int len]) {
     if (_closeCallbackCalled || _scheduledCloseCallback != null) return 0;
-    if (len === null) len = buffer.length;
+    if (len == null) len = buffer.length;
     if (offset < 0) throw new StreamException("Illegal offset $offset");
     if (len < 0) throw new StreamException("Illegal length $len");
     int bytesToRead = min(len, available());
@@ -71,7 +71,7 @@
     // More data has been received asynchronously. Perform the data
     // handler callback now.
     _cancelScheduledDataCallback();
-    if (_clientDataHandler !== null) {
+    if (_clientDataHandler != null) {
       _clientDataHandler();
     }
     _checkScheduleCallbacks();
@@ -83,7 +83,7 @@
     _streamMarkedClosed = true;
     if (available() == 0) {
       _closeCallbackCalled = true;
-      if (_clientCloseHandler !== null) _clientCloseHandler();
+      if (_clientCloseHandler != null) _clientCloseHandler();
     } else {
       _checkScheduleCallbacks();
     }
@@ -99,7 +99,7 @@
   void _checkScheduleCallbacks() {
     void issueDataCallback(Timer timer) {
       _scheduledDataCallback = null;
-      if (_clientDataHandler !== null) {
+      if (_clientDataHandler != null) {
         _clientDataHandler();
         _checkScheduleCallbacks();
       }
@@ -108,7 +108,7 @@
     void issueCloseCallback(Timer timer) {
       _scheduledCloseCallback = null;
       _closeCallbackCalled = true;
-      if (_clientCloseHandler !== null) _clientCloseHandler();
+      if (_clientCloseHandler != null) _clientCloseHandler();
     }
 
     // Schedule data callback if there is more data to read. Schedule
@@ -154,7 +154,7 @@
 
   pipeDataHandler = () {
     List<int> data;
-    while ((data = input.read()) !== null) {
+    while ((data = input.read()) != null) {
       if (!output.write(data)) {
         input.onData = null;
         output.onNoPendingWrites = pipeNoPendingWriteHandler;
@@ -165,7 +165,7 @@
 
   pipeCloseHandler = () {
     if (close) output.close();
-    if (_inputCloseHandler !== null) {
+    if (_inputCloseHandler != null) {
       _inputCloseHandler();
     }
   };
diff --git a/sdk/lib/io/string_stream.dart b/sdk/lib/io/string_stream.dart
index 8f99c66..c168153 100644
--- a/sdk/lib/io/string_stream.dart
+++ b/sdk/lib/io/string_stream.dart
@@ -424,10 +424,10 @@
 
   void _onData() {
     _readData();
-    if (!_decoder.isEmpty && _clientDataHandler !== null) {
+    if (!_decoder.isEmpty && _clientDataHandler != null) {
       _clientDataHandler();
     }
-    if (_decoder.lineBreaks > 0 && _clientLineHandler !== null) {
+    if (_decoder.lineBreaks > 0 && _clientLineHandler != null) {
       _clientLineHandler();
     }
     _checkScheduleCallback();
@@ -445,23 +445,23 @@
 
   void _readData() {
     List<int> data = _input.read();
-    if (data !== null) {
+    if (data != null) {
       _decoder.write(data);
     }
   }
 
   void _checkInstallDataHandler() {
     if (_inputClosed ||
-        (_clientDataHandler === null && _clientLineHandler === null)) {
+        (_clientDataHandler == null && _clientLineHandler == null)) {
       _input.onData = null;
-    } else if (_clientDataHandler !== null) {
+    } else if (_clientDataHandler != null) {
       if (_decoder.isEmpty) {
         _input.onData = _onData;
       } else {
         _input.onData = null;
       }
     } else {
-      assert(_clientLineHandler !== null);
+      assert(_clientLineHandler != null);
       if (_decoder.lineBreaks == 0) {
         _input.onData = _onData;
       } else {
@@ -475,7 +475,7 @@
   void _checkScheduleCallback() {
     void issueDataCallback(Timer timer) {
       _scheduledDataCallback = null;
-      if (_clientDataHandler !== null) {
+      if (_clientDataHandler != null) {
         _clientDataHandler();
         _checkScheduleCallback();
       }
@@ -483,7 +483,7 @@
 
     void issueLineCallback(Timer timer) {
       _scheduledLineCallback = null;
-      if (_clientLineHandler !== null) {
+      if (_clientLineHandler != null) {
         _clientLineHandler();
         _checkScheduleCallback();
       }
@@ -492,7 +492,7 @@
     void issueCloseCallback(Timer timer) {
       _scheduledCloseCallback = null;
       if (!_closed) {
-        if (_clientCloseHandler !== null) _clientCloseHandler();
+        if (_clientCloseHandler != null) _clientCloseHandler();
         _closed = true;
       }
     }
diff --git a/sdk/lib/io/timer_impl.dart b/sdk/lib/io/timer_impl.dart
index d82c69c..2e78eba 100644
--- a/sdk/lib/io/timer_impl.dart
+++ b/sdk/lib/io/timer_impl.dart
@@ -13,7 +13,7 @@
                            int milliSeconds,
                            bool repeating) {
     _EventHandler._start();
-    if (_timers === null) {
+    if (_timers == null) {
       _timers = new DoubleLinkedQueue<_Timer>();
     }
     Timer timer = new _Timer._internal();
@@ -51,8 +51,8 @@
     DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
     DoubleLinkedQueueEntry<_Timer> first = _timers.firstEntry();
 
-     while (entry !== null) {
-      if (entry.element === this) {
+     while (entry != null) {
+      if (identical(entry.element, this)) {
         entry.remove();
         if (first.element == this) {
           entry = _timers.firstEntry();
@@ -72,10 +72,10 @@
   // earliest timer in the list.  Timers with the same wakeup time are enqueued
   // in order and notified in FIFO order.
   void _addTimerToList() {
-    if (_callback !== null) {
+    if (_callback != null) {
 
       DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
-      while (entry !== null) {
+      while (entry != null) {
         if (_wakeupTime < entry.element._wakeupTime) {
           entry.prepend(this);
           return;
@@ -95,15 +95,15 @@
       return;
     }
 
-    if (_timers.firstEntry() === null) {
+    if (_timers.firstEntry() == null) {
       // No pending timers: Close the receive port and let the event handler
       // know.
-      if (_receivePort !== null) {
+      if (_receivePort != null) {
         _EventHandler._sendData(null, _receivePort, _NO_TIMER);
         _shutdownTimerHandler();
       }
     } else {
-      if (_receivePort === null) {
+      if (_receivePort == null) {
         // Create a receive port and register a message handler for the timer
         // events.
         _createTimerHandler();
@@ -126,7 +126,7 @@
       // Collect all pending timers.
       DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
       var pending_timers = new List();
-      while (entry !== null) {
+      while (entry != null) {
         _Timer timer = entry.element;
         if (timer._wakeupTime <= currentTime) {
           entry.remove();
@@ -160,7 +160,7 @@
       _notifyEventHandler();
     }
 
-    if(_receivePort === null) {
+    if(_receivePort == null) {
       _receivePort = new ReceivePort();
       _receivePort.receive((var message, ignored) {
         _handleTimeout();
diff --git a/sdk/lib/io/tls_socket.dart b/sdk/lib/io/tls_socket.dart
new file mode 100644
index 0000000..44551b5
--- /dev/null
+++ b/sdk/lib/io/tls_socket.dart
@@ -0,0 +1,373 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * TlsSocket provides a secure (SSL or TLS) client connection to a server.
+ * The certificate provided by the server is checked
+ * using the certificate database provided in setCertificateDatabase.
+ */
+abstract class TlsSocket implements Socket {
+  /**
+   * Constructs a new secure socket and connect it to the given
+   * host on the given port. The returned socket is not yet connected
+   * but ready for registration of callbacks.
+   */
+  factory TlsSocket(String host, int port) => new _TlsSocket(host, port);
+
+  /**
+   * Initializes the TLS library with the path to a certificate database
+   * containing root certificates for verifying certificate paths on
+   * client connections, and server certificates to provide on server
+   * connections.
+   */
+  external static void setCertificateDatabase(String pkcertDirectory);
+}
+
+
+class _TlsSocket implements TlsSocket {
+  // Status states
+  static final int NOT_CONNECTED = 200;
+  static final int HANDSHAKE = 201;
+  static final int CONNECTED = 202;
+  static final int CLOSED = 203;
+
+  // Buffer identifiers.
+  // These must agree with those in the native C++ implementation.
+  static final int READ_PLAINTEXT = 0;
+  static final int WRITE_PLAINTEXT = 1;
+  static final int READ_ENCRYPTED = 2;
+  static final int WRITE_ENCRYPTED = 3;
+  static final int NUM_BUFFERS = 4;
+
+  int _count = 0;
+  // Constructs a new secure client socket.
+  _TlsSocket(String host, int port)
+      : _host = host,
+        _port = port,
+        _socket = new Socket(host, port),
+        _tlsFilter = new _TlsFilter() {
+    _socket.onConnect = _tlsConnectHandler;
+    _socket.onData = _tlsDataHandler;
+    _socket.onClosed = _tlsCloseHandler;
+    _tlsFilter.init();
+    _tlsFilter.registerHandshakeCompleteCallback(_tlsHandshakeCompleteHandler);
+  }
+
+  InputStream get inputStream {
+    // TODO(6701): Implement stream interfaces on TlsSocket.
+    throw new UnimplementedError("TlsSocket.inputStream not implemented yet");
+  }
+
+  int get port => _socket.port;
+
+  String get remoteHost => _socket.remoteHost;
+
+  int get remotePort => _socket.remotePort;
+
+  void set onClosed(void callback()) {
+    _socketCloseHandler = callback;
+  }
+
+  void set onConnect(void callback()) {
+    _socketConnectHandler = callback;
+  }
+
+  void set onData(void callback()) {
+    _socketDataHandler = callback;
+  }
+
+  void set onWrite(void callback()) {
+    _socketWriteHandler = callback;
+    // Reset the one-shot onWrite handler.
+    _socket.onWrite = _tlsWriteHandler;
+  }
+
+  OutputStream get outputStream {
+    // TODO(6701): Implement stream interfaces on TlsSocket.
+    throw new UnimplementedError("TlsSocket.inputStream not implemented yet");
+  }
+
+  int available() {
+    throw new UnimplementedError("TlsSocket.available not implemented yet");
+  }
+
+  void close([bool halfClose]) {
+    _socket.close(halfClose);
+  }
+
+  List<int> read([int len]) {
+    var buffer = _tlsFilter.buffers[READ_PLAINTEXT];
+    _readEncryptedData();
+    int toRead = buffer.length;
+    if (len != null) {
+      if (len is! int || len < 0) {
+        throw new ArgumentError(
+            "Invalid len parameter in TlsSocket.read (len: $len)");
+      }
+      if (len < toRead) {
+        toRead = len;
+      }
+    }
+    List<int> result = buffer.data.getRange(buffer.start, toRead);
+    buffer.advanceStart(toRead);
+    _setHandlersAfterRead();
+    return result;
+  }
+
+  int readList(List<int> data, int offset, int bytes) {
+    if (offset < 0 || bytes < 0 || offset + bytes > data.length) {
+      throw new ArgumentError(
+          "Invalid offset or bytes in TlsSocket.readList");
+    }
+
+    int bytesRead = 0;
+    var buffer = _tlsFilter.buffers[READ_PLAINTEXT];
+    // TODO(whesse): Currently this fails if the if is turned into a while loop.
+    // Fix it so that it can loop and read more than one buffer's worth of data.
+    if (bytes > bytesRead) {
+      _readEncryptedData();
+      if (buffer.length > 0) {
+        int toRead = min(bytes - bytesRead, buffer.length);
+        data.setRange(offset, toRead, buffer.data, buffer.start);
+        buffer.advanceStart(toRead);
+        bytesRead += toRead;
+        offset += toRead;
+      }
+    }
+
+    _setHandlersAfterRead();
+    return bytesRead;
+  }
+
+  // Write the data to the socket, and flush it as much as possible
+  // until it would block.  If the write would block, _writeEncryptedData sets
+  // up handlers to flush the pipeline when possible.
+  int writeList(List<int> data, int offset, int bytes) {
+    var buffer = _tlsFilter.buffers[WRITE_PLAINTEXT];
+    if (bytes > buffer.free) {
+      bytes = buffer.free;
+    }
+    if (bytes > 0) {
+      buffer.data.setRange(buffer.start + buffer.length, bytes, data, offset);
+      buffer.length += bytes;
+    }
+    _writeEncryptedData();  // Tries to flush all pipeline stages.
+    return bytes;
+  }
+
+  void _tlsConnectHandler() {
+    _connectPending = true;
+    _tlsFilter.connect(_host, _port);
+    _status = HANDSHAKE;
+    _tlsHandshake();
+  }
+
+  void _tlsWriteHandler() {
+    if (_status == HANDSHAKE) {
+      _tlsHandshake();
+    } else if (_status == CONNECTED) {
+      if (_socketWriteHandler != null) {
+        _socketWriteHandler();
+      }
+    }
+  }
+
+  void _tlsDataHandler() {
+    if (_status == HANDSHAKE) {
+      _tlsHandshake();
+    } else {
+      _writeEncryptedData();  // TODO(whesse): Removing this causes a failure.
+      _readEncryptedData();
+      var buffer = _tlsFilter.buffers[READ_PLAINTEXT];
+      if (_filterEmpty) {
+        if (_fireCloseEventPending) {
+          _fireCloseEvent();
+        }
+      } else {  // Filter is not empty.
+        if (scheduledDataEvent != null) {
+          scheduledDataEvent.cancel();
+          scheduledDataEvent = null;
+        }
+        if (_socketDataHandler != null) {
+          _socketDataHandler();
+        }
+      }
+    }
+  }
+
+  void _tlsCloseHandler() {
+    _socketClosed = true;
+    _status = CLOSED;
+    _socket.close();
+    if (_filterEmpty) {
+      _fireCloseEvent();
+    } else {
+      _fireCloseEventPending = true;
+    }
+  }
+
+  void _tlsHandshake() {
+      _readEncryptedData();
+      _tlsFilter.handshake();
+      _writeEncryptedData();
+      if (_tlsFilter.buffers[WRITE_ENCRYPTED].length > 0) {
+        _socket.onWrite = _tlsWriteHandler;
+      }
+  }
+
+  void _tlsHandshakeCompleteHandler() {
+    _status = CONNECTED;
+    if (_connectPending && _socketConnectHandler != null) {
+      _connectPending = false;
+      _socketConnectHandler();
+    }
+  }
+
+  void _fireCloseEvent() {
+    _fireCloseEventPending = false;
+    _tlsFilter.destroy();
+    _tlsFilter = null;
+    if (scheduledDataEvent != null) {
+      scheduledDataEvent.cancel();
+    }
+    if (_socketCloseHandler != null) {
+      _socketCloseHandler();
+    }
+  }
+
+  void _readEncryptedData() {
+    // Read from the socket, and push it through the filter as far as
+    // possible.
+    var encrypted = _tlsFilter.buffers[READ_ENCRYPTED];
+    var plaintext = _tlsFilter.buffers[READ_PLAINTEXT];
+    bool progress = true;
+    while (progress) {
+      progress = false;
+      // Do not try to read plaintext from the filter while handshaking.
+      if ((_status == CONNECTED || _status == CLOSED) && plaintext.free > 0) {
+        int bytes = _tlsFilter.processBuffer(READ_PLAINTEXT);
+        if (bytes > 0) {
+          plaintext.length += bytes;
+          progress = true;
+        }
+      }
+      if (encrypted.length > 0) {
+        int bytes = _tlsFilter.processBuffer(READ_ENCRYPTED);
+        if (bytes > 0) {
+          encrypted.advanceStart(bytes);
+          progress = true;
+        }
+      }
+      if (!_socketClosed) {
+        int bytes = _socket.readList(encrypted.data,
+                                     encrypted.start + encrypted.length,
+                                     encrypted.free);
+        if (bytes > 0) {
+          encrypted.length += bytes;
+          progress = true;
+        }
+      }
+    }
+    // TODO(whesse): This can be incorrect if there is a partial
+    // encrypted block stuck in the tlsFilter, and no other data.
+    // Fix this - we do need to know when the filter is empty.
+    _filterEmpty = (plaintext.length == 0);
+  }
+
+  void _writeEncryptedData() {
+    // Write from the filter to the socket.
+    var buffer = _tlsFilter.buffers[WRITE_ENCRYPTED];
+    while (true) {
+      if (buffer.length > 0) {
+        int bytes = _socket.writeList(buffer.data, buffer.start, buffer.length);
+        if (bytes == 0) {
+          // The socket has blocked while we have data to write.
+          // We must be notified when it becomes unblocked.
+          _socket.onWrite = _tlsWriteHandler;
+          break;
+        }
+        buffer.advanceStart(bytes);
+      } else {
+        var plaintext = _tlsFilter.buffers[WRITE_PLAINTEXT];
+        if (plaintext.length > 0) {
+           int plaintext_bytes = _tlsFilter.processBuffer(WRITE_PLAINTEXT);
+           plaintext.advanceStart(plaintext_bytes);
+        }
+        int bytes = _tlsFilter.processBuffer(WRITE_ENCRYPTED);
+        if (bytes <= 0) break;
+        buffer.length += bytes;
+      }
+    }
+  }
+
+  /* After a read, the onData handler is enabled to fire again.
+   * We may also have a close event waiting for the TlsFilter to empty.
+   */
+  void _setHandlersAfterRead() {
+    // If the filter is empty, then we are guaranteed an event when it
+    // becomes unblocked.
+    // Otherwise, schedule a _tlsDataHandler call since there may data
+    // available, and this read call enables the data event.
+    if (!_filterEmpty && scheduledDataEvent == null) {
+      scheduledDataEvent = new Timer(0, (_) => _tlsDataHandler());
+    } else if (_filterEmpty && scheduledDataEvent != null) {
+        scheduledDataEvent.cancel();
+        scheduledDataEvent = null;
+    }
+    if (_filterEmpty && _fireCloseEventPending) {
+        _fireCloseEvent();
+    }
+  }
+
+  // _TlsSocket cannot extend _Socket and use _Socket's factory constructor.
+  Socket _socket;
+  String _host;
+  int _port;
+
+  var _status = NOT_CONNECTED;
+  bool _socketClosed = false;
+  bool _filterEmpty = false;
+  bool _connectPending = false;
+  bool _fireCloseEventPending = false;
+  Function _socketConnectHandler;
+  Function _socketWriteHandler;
+  Function _socketDataHandler;
+  Function _socketCloseHandler;
+  Timer scheduledDataEvent;
+
+  _TlsFilter _tlsFilter;
+}
+
+
+class _TlsExternalBuffer {
+  static final int SIZE = 8 * 1024;
+  _TlsExternalBuffer() : start = 0, length = 0;
+
+  // TODO(whesse): Consider making this a circular buffer.  Only if it helps.
+  void advanceStart(int numBytes) {
+    start += numBytes;
+    length -= numBytes;
+    if (length == 0) {
+      start = 0;
+    }
+  }
+
+  int get free => SIZE - (start + length);
+
+  List data;  // This will be a ExternalByteArray, backed by C allocated data.
+  int start;
+  int length;
+}
+
+
+abstract class _TlsFilter {
+  external factory _TlsFilter();
+
+  void connect(String hostName, int port);
+  void destroy();
+  void handshake();
+  void init();
+  int processBuffer(int bufferIndex);
+  void registerHandshakeCompleteCallback(Function handshakeCompleteHandler);
+}
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index dfeb2ec..1d0eb286 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -88,7 +88,7 @@
                 throw new WebSocketException("Protocol error");
               }
               _currentMessageType = _WebSocketMessageType.TEXT;
-              if (onMessageStart !== null) {
+              if (onMessageStart != null) {
                 onMessageStart(_WebSocketMessageType.TEXT);
               }
               break;
@@ -98,7 +98,7 @@
                 throw new WebSocketException("Protocol error");
               }
               _currentMessageType = _WebSocketMessageType.BINARY;
-              if (onMessageStart !== null) {
+              if (onMessageStart != null) {
                 onMessageStart(_WebSocketMessageType.BINARY);
               }
               break;
@@ -192,7 +192,7 @@
 
                 case _WebSocketMessageType.TEXT:
                 case _WebSocketMessageType.BINARY:
-                  if (onMessageData !== null) {
+                  if (onMessageData != null) {
                     onMessageData(buffer, index, payload);
                   }
                   index += payload;
@@ -215,7 +215,7 @@
         index++;
       }
     } catch (e) {
-      if (onClosed !== null) onClosed(WebSocketStatus.PROTOCOL_ERROR,
+      if (onClosed != null) onClosed(WebSocketStatus.PROTOCOL_ERROR,
                                       "Protocol error");
       _state = FAILURE;
     }
@@ -226,7 +226,7 @@
    */
   void closed() {
     if (_state == START || _state == CLOSED || _state == FAILURE) return;
-    if (onClosed !== null) onClosed(WebSocketStatus.ABNORMAL_CLOSURE,
+    if (onClosed != null) onClosed(WebSocketStatus.ABNORMAL_CLOSURE,
                                     "Connection closed unexpectedly");
     _state = CLOSED;
   }
@@ -253,14 +253,14 @@
       if (_isControlFrame()) {
         switch (_opcode) {
           case _WebSocketOpcode.CLOSE:
-            if (onClosed !== null) onClosed(1005, "");
+            if (onClosed != null) onClosed(1005, "");
             _state = CLOSED;
             break;
           case _WebSocketOpcode.PING:
-            if (onPing !== null) onPing(null);
+            if (onPing != null) onPing(null);
             break;
           case _WebSocketOpcode.PONG:
-            if (onPong !== null) onPong(null);
+            if (onPong != null) onPong(null);
             break;
         }
         _prepareForNextFrame();
@@ -274,7 +274,7 @@
 
   void _messageFrameEnd() {
     if (_fin) {
-      if (onMessageEnd !== null) onMessageEnd();
+      if (onMessageEnd != null) onMessageEnd();
       _currentMessageType = _WebSocketMessageType.NONE;
     }
     _prepareForNextFrame();
@@ -300,16 +300,16 @@
             reason = decoder.decoded();
           }
         }
-        if (onClosed !== null) onClosed(status, reason);
+        if (onClosed != null) onClosed(status, reason);
         _state = CLOSED;
         break;
 
       case _WebSocketOpcode.PING:
-        if (onPing !== null) onPing(_controlPayload);
+        if (onPing != null) onPing(_controlPayload);
         break;
 
       case _WebSocketOpcode.PONG:
-        if (onPong !== null) onPong(_controlPayload);
+        if (onPong != null) onPong(_controlPayload);
         break;
     }
     _prepareForNextFrame();
@@ -372,7 +372,7 @@
     processor.onPing = _onWebSocketPing;
     processor.onPong = _onWebSocketPong;
     processor.onClosed = _onWebSocketClosed;
-    if (unparsedData !== null) {
+    if (unparsedData != null) {
       processor.update(unparsedData, 0, unparsedData.length);
     }
     _socket.onData = () {
@@ -386,9 +386,9 @@
       if (_closeSent) {
         // Got socket close in response to close frame. Don't treat
         // that as an error.
-        if (_closeTimer !== null) _closeTimer.cancel();
+        if (_closeTimer != null) _closeTimer.cancel();
       } else {
-        if (_onClosed !== null) _onClosed(WebSocketStatus.ABNORMAL_CLOSURE,
+        if (_onClosed != null) _onClosed(WebSocketStatus.ABNORMAL_CLOSURE,
                                           "Unexpected close");
       }
       _socket.close();
@@ -409,7 +409,7 @@
     }
     List<int> data;
     int opcode;
-    if (message !== null) {
+    if (message != null) {
       if (message is String) {
         opcode = _WebSocketOpcode.TEXT;
         data = _StringEncoders.encoder(Encoding.UTF_8).encodeString(message);
@@ -435,11 +435,11 @@
 
     if (_closeSent) return;
     List<int> data;
-    if (status !== null) {
+    if (status != null) {
       data = new List<int>();
       data.add((status >> 8) & 0xFF);
       data.add(status & 0xFF);
-      if (reason !== null) {
+      if (reason != null) {
         data.addAll(
            _StringEncoders.encoder(Encoding.UTF_8).encodeString(reason));
       }
@@ -451,7 +451,7 @@
       // does not take too long.
       _socket.outputStream.close();
       _socket.outputStream.onClosed = () {
-        if (_closeTimer !== null) _closeTimer.cancel();
+        if (_closeTimer != null) _closeTimer.cancel();
         _socket.close();
       };
       _closeTimer = new Timer(5000, (t) {
@@ -489,7 +489,7 @@
   }
 
   _onWebSocketMessageEnd() {
-    if (_onMessage !== null) {
+    if (_onMessage != null) {
       if (_currentMessageType == _WebSocketMessageType.TEXT) {
         _onMessage(_decoder.decoded());
       } else {
@@ -510,10 +510,10 @@
 
   _onWebSocketClosed(int status, String reason) {
     _closeReceived = true;
-    if (_onClosed !== null) _onClosed(status, reason);
+    if (_onClosed != null) _onClosed(status, reason);
     if (_closeSent) {
       // Got close frame in response to close frame. Now close the socket.
-      if (_closeTimer !== null) _closeTimer.cancel();
+      if (_closeTimer != null) _closeTimer.cancel();
       _socket.close();
     } else {
       if (status != WebSocketStatus.NO_STATUS_RECEIVED) {
@@ -554,7 +554,7 @@
     }
     assert(index == headerSize);
     _socket.outputStream.write(header);
-    if (data !== null) {
+    if (data != null) {
       _socket.outputStream.write(data);
     }
   }
@@ -607,7 +607,7 @@
     // Upgrade the connection and get the underlying socket.
     WebSocketConnection conn =
         new _WebSocketConnection(response.detachSocket());
-    if (_onOpen !== null) _onOpen(conn);
+    if (_onOpen != null) _onOpen(conn);
   }
 
   void set onOpen(callback(WebSocketConnection connection)) {
@@ -652,7 +652,7 @@
     _conn.onRequest = _onHttpClientRequest;
     _conn.onResponse = _onHttpClientResponse;
     _conn.onError = (e) {
-      if (_onClosed !== null) {
+      if (_onClosed != null) {
         _onClosed(WebSocketStatus.ABNORMAL_CLOSURE, "$e");
       }
     };
@@ -674,7 +674,7 @@
   }
 
   void _onHttpClientRequest(HttpClientRequest request) {
-    if (_onRequest !== null) {
+    if (_onRequest != null) {
       _onRequest(request);
     }
     // Setup the initial handshake.
@@ -688,7 +688,7 @@
 
   void _onHttpClientResponse(HttpClientResponse response) {
     if (response.statusCode != HttpStatus.SWITCHING_PROTOCOLS) {
-      if (_onNoUpgrade !== null) {
+      if (_onNoUpgrade != null) {
         _onNoUpgrade(response);
       } else {
         _conn.detachSocket().socket.close();
@@ -706,7 +706,7 @@
     // Connection upgrade successful.
     DetachedSocket detached = _conn.detachSocket();
     _socketConnected(detached.socket);
-    if (_onOpen !== null) _onOpen();
+    if (_onOpen != null) _onOpen();
     _startProcessing(detached.unparsedData);
   }
 
@@ -795,21 +795,21 @@
       client.shutdown();
       client = null;
       _readyState = WebSocket.OPEN;
-      if (_onopen !== null) _onopen();
+      if (_onopen != null) _onopen();
     };
     _wsconn.onMessage = (message) {
-      if (_onmessage !== null) {
+      if (_onmessage != null) {
         _onmessage(new _WebSocketMessageEvent(message));
       }
     };
     _wsconn.onClosed = (status, reason) {
       _readyState = WebSocket.CLOSED;
-      if (_onclose !== null) {
+      if (_onclose != null) {
         _onclose(new _WebSocketCloseEvent(true, status, reason));
       }
     };
     _wsconn.onNoUpgrade = (response) {
-      if (_onclose !== null) {
+      if (_onclose != null) {
         _onclose(
             new _WebSocketCloseEvent(true,
                                      WebSocketStatus.ABNORMAL_CLOSURE,
diff --git a/sdk/lib/isolate/base.dart b/sdk/lib/isolate/base.dart
index d61c35c..e43e3bb 100644
--- a/sdk/lib/isolate/base.dart
+++ b/sdk/lib/isolate/base.dart
@@ -105,13 +105,13 @@
  *
  * A [ReceivePort] may have many [SendPort]s.
  */
-interface ReceivePort default _ReceivePortFactory {
+abstract class ReceivePort {
 
   /**
    * Opens a long-lived port for receiving messages. The returned port
    * must be explicitly closed through [ReceivePort.close].
    */
-  ReceivePort();
+  external factory ReceivePort();
 
   /**
    * Sets up a callback function for receiving pending or future
@@ -142,7 +142,3 @@
   callSync(var message);
 
 }
-
-class _ReceivePortFactory {
-  external factory ReceivePort();
-}
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 9a0fe0f..303cec4 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -154,7 +154,7 @@
    * Is this declaration top-level?
    *
    * This is defined to be equivalent to:
-   *    [:mirror.owner !== null && mirror.owner is LibraryMirror:]
+   *    [:mirror.owner != null && mirror.owner is LibraryMirror:]
    */
   bool get isTopLevel;
 
diff --git a/sdk/lib/scalarlist/byte_arrays.dart b/sdk/lib/scalarlist/byte_arrays.dart
index 8789ec4..a4d5515 100644
--- a/sdk/lib/scalarlist/byte_arrays.dart
+++ b/sdk/lib/scalarlist/byte_arrays.dart
@@ -15,9 +15,9 @@
  * For example this code fragment determine what 64-bit signed integer
  * is represented by the bytes of a 64-bit floating point number:
  *
- *    var ba = new ByteArray(8);
- *    ba.setFloat64(0, 3.14159265358979323846);
- *    int huh = ba.getInt64(0);
+ *     var ba = new Uint8List(8).asByteArray();
+ *     ba.setFloat64(0, 3.14159265358979323846);
+ *     int huh = ba.getInt64(0);
  */
 abstract class ByteArray {
   /**
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
new file mode 100644
index 0000000..ef6935a
--- /dev/null
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -0,0 +1,6037 @@
+library svg;
+
+import 'dart:html';
+// DO NOT EDIT
+// Auto-generated dart:svg library.
+
+
+
+
+
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
+
+class _SVGElementFactoryProvider {
+  static SVGElement createSVGElement_tag(String tag) {
+    final Element temp =
+      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
+    return temp;
+  }
+
+  static SVGElement createSVGElement_svg(String svg) {
+    Element parentTag;
+    final match = _START_TAG_REGEXP.firstMatch(svg);
+    if (match != null && match.group(1).toLowerCase() == 'svg') {
+      parentTag = new Element.tag('div');
+    } else {
+      parentTag = new SVGSVGElement();
+    }
+
+    parentTag.innerHTML = svg;
+    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
+
+    throw new ArgumentError(
+        'SVG had ${parentTag.elements.length} '
+        'top-level elements but 1 expected');
+  }
+}
+
+class _SVGSVGElementFactoryProvider {
+  static SVGSVGElement createSVGSVGElement() {
+    final el = new SVGElement.tag("svg");
+    // The SVG spec requires the version attribute to match the spec version
+    el.attributes['version'] = "1.1";
+    return el;
+  }
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAElement
+class SVGAElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGAElement" {
+
+  /** @domName SVGAElement.target */
+  final SVGAnimatedString target;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAltGlyphDefElement
+class SVGAltGlyphDefElement extends SVGElement native "*SVGAltGlyphDefElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAltGlyphElement
+class SVGAltGlyphElement extends SVGTextPositioningElement implements SVGURIReference native "*SVGAltGlyphElement" {
+
+  /** @domName SVGAltGlyphElement.format */
+  String format;
+
+  /** @domName SVGAltGlyphElement.glyphRef */
+  String glyphRef;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAltGlyphItemElement
+class SVGAltGlyphItemElement extends SVGElement native "*SVGAltGlyphItemElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAngle
+class SVGAngle native "*SVGAngle" {
+
+  static const int SVG_ANGLETYPE_DEG = 2;
+
+  static const int SVG_ANGLETYPE_GRAD = 4;
+
+  static const int SVG_ANGLETYPE_RAD = 3;
+
+  static const int SVG_ANGLETYPE_UNKNOWN = 0;
+
+  static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
+
+  /** @domName SVGAngle.unitType */
+  final int unitType;
+
+  /** @domName SVGAngle.value */
+  num value;
+
+  /** @domName SVGAngle.valueAsString */
+  String valueAsString;
+
+  /** @domName SVGAngle.valueInSpecifiedUnits */
+  num valueInSpecifiedUnits;
+
+  /** @domName SVGAngle.convertToSpecifiedUnits */
+  void convertToSpecifiedUnits(int unitType) native;
+
+  /** @domName SVGAngle.newValueSpecifiedUnits */
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimateColorElement
+class SVGAnimateColorElement extends SVGAnimationElement native "*SVGAnimateColorElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimateElement
+class SVGAnimateElement extends SVGAnimationElement native "*SVGAnimateElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimateMotionElement
+class SVGAnimateMotionElement extends SVGAnimationElement native "*SVGAnimateMotionElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimateTransformElement
+class SVGAnimateTransformElement extends SVGAnimationElement native "*SVGAnimateTransformElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedAngle
+class SVGAnimatedAngle native "*SVGAnimatedAngle" {
+
+  /** @domName SVGAnimatedAngle.animVal */
+  final SVGAngle animVal;
+
+  /** @domName SVGAnimatedAngle.baseVal */
+  final SVGAngle baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedBoolean
+class SVGAnimatedBoolean native "*SVGAnimatedBoolean" {
+
+  /** @domName SVGAnimatedBoolean.animVal */
+  final bool animVal;
+
+  /** @domName SVGAnimatedBoolean.baseVal */
+  bool baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedEnumeration
+class SVGAnimatedEnumeration native "*SVGAnimatedEnumeration" {
+
+  /** @domName SVGAnimatedEnumeration.animVal */
+  final int animVal;
+
+  /** @domName SVGAnimatedEnumeration.baseVal */
+  int baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedInteger
+class SVGAnimatedInteger native "*SVGAnimatedInteger" {
+
+  /** @domName SVGAnimatedInteger.animVal */
+  final int animVal;
+
+  /** @domName SVGAnimatedInteger.baseVal */
+  int baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedLength
+class SVGAnimatedLength native "*SVGAnimatedLength" {
+
+  /** @domName SVGAnimatedLength.animVal */
+  final SVGLength animVal;
+
+  /** @domName SVGAnimatedLength.baseVal */
+  final SVGLength baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedLengthList
+class SVGAnimatedLengthList implements JavaScriptIndexingBehavior, List<SVGAnimatedLength> native "*SVGAnimatedLengthList" {
+
+  /** @domName SVGAnimatedLengthList.animVal */
+  final SVGLengthList animVal;
+
+  /** @domName SVGAnimatedLengthList.baseVal */
+  final SVGLengthList baseVal;
+
+  SVGAnimatedLength operator[](int index) => JS("SVGAnimatedLength", "#[#]", this, index);
+
+  void operator[]=(int index, SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimatedLength> mixins.
+  // SVGAnimatedLength is the element type.
+
+  // From Iterable<SVGAnimatedLength>:
+
+  Iterator<SVGAnimatedLength> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimatedLength>(this);
+  }
+
+  // From Collection<SVGAnimatedLength>:
+
+  void add(SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimatedLength> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimatedLength element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimatedLength> filter(bool f(SVGAnimatedLength element)) =>
+     _Collections.filter(this, <SVGAnimatedLength>[], f);
+
+  bool every(bool f(SVGAnimatedLength element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimatedLength element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimatedLength>:
+
+  void sort([Comparator<SVGAnimatedLength> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimatedLength element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimatedLength element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimatedLength get last => this[length - 1];
+
+  SVGAnimatedLength removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimatedLength initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimatedLength> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimatedLength>[]);
+
+  // -- end List<SVGAnimatedLength> mixins.
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedNumber
+class SVGAnimatedNumber native "*SVGAnimatedNumber" {
+
+  /** @domName SVGAnimatedNumber.animVal */
+  final num animVal;
+
+  /** @domName SVGAnimatedNumber.baseVal */
+  num baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedNumberList
+class SVGAnimatedNumberList implements JavaScriptIndexingBehavior, List<SVGAnimatedNumber> native "*SVGAnimatedNumberList" {
+
+  /** @domName SVGAnimatedNumberList.animVal */
+  final SVGNumberList animVal;
+
+  /** @domName SVGAnimatedNumberList.baseVal */
+  final SVGNumberList baseVal;
+
+  SVGAnimatedNumber operator[](int index) => JS("SVGAnimatedNumber", "#[#]", this, index);
+
+  void operator[]=(int index, SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimatedNumber> mixins.
+  // SVGAnimatedNumber is the element type.
+
+  // From Iterable<SVGAnimatedNumber>:
+
+  Iterator<SVGAnimatedNumber> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimatedNumber>(this);
+  }
+
+  // From Collection<SVGAnimatedNumber>:
+
+  void add(SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimatedNumber> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimatedNumber element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimatedNumber> filter(bool f(SVGAnimatedNumber element)) =>
+     _Collections.filter(this, <SVGAnimatedNumber>[], f);
+
+  bool every(bool f(SVGAnimatedNumber element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimatedNumber element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimatedNumber>:
+
+  void sort([Comparator<SVGAnimatedNumber> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimatedNumber element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimatedNumber element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimatedNumber get last => this[length - 1];
+
+  SVGAnimatedNumber removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimatedNumber initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimatedNumber> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimatedNumber>[]);
+
+  // -- end List<SVGAnimatedNumber> mixins.
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedPreserveAspectRatio
+class SVGAnimatedPreserveAspectRatio native "*SVGAnimatedPreserveAspectRatio" {
+
+  /** @domName SVGAnimatedPreserveAspectRatio.animVal */
+  final SVGPreserveAspectRatio animVal;
+
+  /** @domName SVGAnimatedPreserveAspectRatio.baseVal */
+  final SVGPreserveAspectRatio baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedRect
+class SVGAnimatedRect native "*SVGAnimatedRect" {
+
+  /** @domName SVGAnimatedRect.animVal */
+  final SVGRect animVal;
+
+  /** @domName SVGAnimatedRect.baseVal */
+  final SVGRect baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedString
+class SVGAnimatedString native "*SVGAnimatedString" {
+
+  /** @domName SVGAnimatedString.animVal */
+  final String animVal;
+
+  /** @domName SVGAnimatedString.baseVal */
+  String baseVal;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimatedTransformList
+class SVGAnimatedTransformList implements JavaScriptIndexingBehavior, List<SVGAnimateTransformElement> native "*SVGAnimatedTransformList" {
+
+  /** @domName SVGAnimatedTransformList.animVal */
+  final SVGTransformList animVal;
+
+  /** @domName SVGAnimatedTransformList.baseVal */
+  final SVGTransformList baseVal;
+
+  SVGAnimateTransformElement operator[](int index) => JS("SVGAnimateTransformElement", "#[#]", this, index);
+
+  void operator[]=(int index, SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimateTransformElement> mixins.
+  // SVGAnimateTransformElement is the element type.
+
+  // From Iterable<SVGAnimateTransformElement>:
+
+  Iterator<SVGAnimateTransformElement> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimateTransformElement>(this);
+  }
+
+  // From Collection<SVGAnimateTransformElement>:
+
+  void add(SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimateTransformElement> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimateTransformElement element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimateTransformElement> filter(bool f(SVGAnimateTransformElement element)) =>
+     _Collections.filter(this, <SVGAnimateTransformElement>[], f);
+
+  bool every(bool f(SVGAnimateTransformElement element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimateTransformElement element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimateTransformElement>:
+
+  void sort([Comparator<SVGAnimateTransformElement> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimateTransformElement element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimateTransformElement element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimateTransformElement get last => this[length - 1];
+
+  SVGAnimateTransformElement removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimateTransformElement initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimateTransformElement> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimateTransformElement>[]);
+
+  // -- end List<SVGAnimateTransformElement> mixins.
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGAnimationElement
+class SVGAnimationElement extends SVGElement implements ElementTimeControl, SVGTests, SVGExternalResourcesRequired native "*SVGAnimationElement" {
+
+  /** @domName SVGAnimationElement.targetElement */
+  final SVGElement targetElement;
+
+  /** @domName SVGAnimationElement.getCurrentTime */
+  num getCurrentTime() native;
+
+  /** @domName SVGAnimationElement.getSimpleDuration */
+  num getSimpleDuration() native;
+
+  /** @domName SVGAnimationElement.getStartTime */
+  num getStartTime() native;
+
+  // From ElementTimeControl
+
+  /** @domName ElementTimeControl.beginElement */
+  void beginElement() native;
+
+  /** @domName ElementTimeControl.beginElementAt */
+  void beginElementAt(num offset) native;
+
+  /** @domName ElementTimeControl.endElement */
+  void endElement() native;
+
+  /** @domName ElementTimeControl.endElementAt */
+  void endElementAt(num offset) native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGCircleElement
+class SVGCircleElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGCircleElement" {
+
+  /** @domName SVGCircleElement.cx */
+  final SVGAnimatedLength cx;
+
+  /** @domName SVGCircleElement.cy */
+  final SVGAnimatedLength cy;
+
+  /** @domName SVGCircleElement.r */
+  final SVGAnimatedLength r;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGClipPathElement
+class SVGClipPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGClipPathElement" {
+
+  /** @domName SVGClipPathElement.clipPathUnits */
+  final SVGAnimatedEnumeration clipPathUnits;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGColor
+class SVGColor extends CSSValue native "*SVGColor" {
+
+  static const int SVG_COLORTYPE_CURRENTCOLOR = 3;
+
+  static const int SVG_COLORTYPE_RGBCOLOR = 1;
+
+  static const int SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
+
+  static const int SVG_COLORTYPE_UNKNOWN = 0;
+
+  /** @domName SVGColor.colorType */
+  final int colorType;
+
+  /** @domName SVGColor.rgbColor */
+  final RGBColor rgbColor;
+
+  /** @domName SVGColor.setColor */
+  void setColor(int colorType, String rgbColor, String iccColor) native;
+
+  /** @domName SVGColor.setRGBColor */
+  void setRGBColor(String rgbColor) native;
+
+  /** @domName SVGColor.setRGBColorICCColor */
+  void setRGBColorICCColor(String rgbColor, String iccColor) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGComponentTransferFunctionElement
+class SVGComponentTransferFunctionElement extends SVGElement native "*SVGComponentTransferFunctionElement" {
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+
+  /** @domName SVGComponentTransferFunctionElement.amplitude */
+  final SVGAnimatedNumber amplitude;
+
+  /** @domName SVGComponentTransferFunctionElement.exponent */
+  final SVGAnimatedNumber exponent;
+
+  /** @domName SVGComponentTransferFunctionElement.intercept */
+  final SVGAnimatedNumber intercept;
+
+  /** @domName SVGComponentTransferFunctionElement.offset */
+  final SVGAnimatedNumber offset;
+
+  /** @domName SVGComponentTransferFunctionElement.slope */
+  final SVGAnimatedNumber slope;
+
+  /** @domName SVGComponentTransferFunctionElement.tableValues */
+  final SVGAnimatedNumberList tableValues;
+
+  /** @domName SVGComponentTransferFunctionElement.type */
+  final SVGAnimatedEnumeration type;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGCursorElement
+class SVGCursorElement extends SVGElement implements SVGURIReference, SVGTests, SVGExternalResourcesRequired native "*SVGCursorElement" {
+
+  /** @domName SVGCursorElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGCursorElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGDefsElement
+class SVGDefsElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGDefsElement" {
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGDescElement
+class SVGDescElement extends SVGElement implements SVGLangSpace, SVGStylable native "*SVGDescElement" {
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGDocument
+class SVGDocument extends Document native "*SVGDocument" {
+
+  /** @domName SVGDocument.rootElement */
+  final SVGSVGElement rootElement;
+
+  /** @domName SVGDocument.createEvent */
+  Event $dom_createEvent(String eventType) native "createEvent";
+}
+// 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.
+
+
+class _AttributeClassSet extends CssClassSet {
+  final Element _element;
+
+  _AttributeClassSet(this._element);
+
+  Set<String> readClasses() {
+    var classname = _element.attributes['class'];
+
+    Set<String> s = new Set<String>();
+    if (classname == null) {
+      return s;
+    }
+    for (String name in classname.split(' ')) {
+      String trimmed = name.trim();
+      if (!trimmed.isEmpty) {
+        s.add(trimmed);
+      }
+    }
+    return s;
+  }
+
+  void writeClasses(Set s) {
+    List list = new List.from(s);
+    _element.attributes['class'] = Strings.join(list, ' ');
+  }
+}
+
+class SVGElement extends Element native "*SVGElement" {
+  factory SVGElement.tag(String tag) =>
+      _SVGElementFactoryProvider.createSVGElement_tag(tag);
+  factory SVGElement.svg(String svg) =>
+      _SVGElementFactoryProvider.createSVGElement_svg(svg);
+
+  _AttributeClassSet _cssClassSet;
+  CssClassSet get classes {
+    if (_cssClassSet == null) {
+      _cssClassSet = new _AttributeClassSet(this);
+    }
+    return _cssClassSet;
+  }
+
+  List<Element> get elements => new FilteredElementList(this);
+
+  void set elements(Collection<Element> value) {
+    final elements = this.elements;
+    elements.clear();
+    elements.addAll(value);
+  }
+
+  String get outerHTML {
+    final container = new Element.tag("div");
+    final SVGElement cloned = this.clone(true);
+    container.elements.add(cloned);
+    return container.innerHTML;
+  }
+
+  String get innerHTML {
+    final container = new Element.tag("div");
+    final SVGElement cloned = this.clone(true);
+    container.elements.addAll(cloned.elements);
+    return container.innerHTML;
+  }
+
+  void set innerHTML(String svg) {
+    final container = new Element.tag("div");
+    // Wrap the SVG string in <svg> so that SVGElements are created, rather than
+    // HTMLElements.
+    container.innerHTML = '<svg version="1.1">$svg</svg>';
+    this.elements = container.elements[0].elements;
+  }
+
+
+  // Shadowing definition.
+  /** @domName SVGElement.id */
+  String get id => JS("String", "#.id", this);
+
+  /** @domName SVGElement.id */
+  void set id(String value) {
+    JS("void", "#.id = #", this, value);
+  }
+
+  /** @domName SVGElement.ownerSVGElement */
+  final SVGSVGElement ownerSVGElement;
+
+  /** @domName SVGElement.viewportElement */
+  final SVGElement viewportElement;
+
+  /** @domName SVGElement.xmlbase */
+  String xmlbase;
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGElementInstance
+class SVGElementInstance extends EventTarget native "*SVGElementInstance" {
+
+  /**
+   * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
+   */
+  SVGElementInstanceEvents get on =>
+    new SVGElementInstanceEvents(this);
+
+  /** @domName SVGElementInstance.childNodes */
+  final List<SVGElementInstance> childNodes;
+
+  /** @domName SVGElementInstance.correspondingElement */
+  final SVGElement correspondingElement;
+
+  /** @domName SVGElementInstance.correspondingUseElement */
+  final SVGUseElement correspondingUseElement;
+
+  /** @domName SVGElementInstance.firstChild */
+  final SVGElementInstance firstChild;
+
+  /** @domName SVGElementInstance.lastChild */
+  final SVGElementInstance lastChild;
+
+  /** @domName SVGElementInstance.nextSibling */
+  final SVGElementInstance nextSibling;
+
+  /** @domName SVGElementInstance.parentNode */
+  final SVGElementInstance parentNode;
+
+  /** @domName SVGElementInstance.previousSibling */
+  final SVGElementInstance previousSibling;
+}
+
+class SVGElementInstanceEvents extends Events {
+  SVGElementInstanceEvents(EventTarget _ptr) : super(_ptr);
+
+  EventListenerList get abort => this['abort'];
+
+  EventListenerList get beforeCopy => this['beforecopy'];
+
+  EventListenerList get beforeCut => this['beforecut'];
+
+  EventListenerList get beforePaste => this['beforepaste'];
+
+  EventListenerList get blur => this['blur'];
+
+  EventListenerList get change => this['change'];
+
+  EventListenerList get click => this['click'];
+
+  EventListenerList get contextMenu => this['contextmenu'];
+
+  EventListenerList get copy => this['copy'];
+
+  EventListenerList get cut => this['cut'];
+
+  EventListenerList get doubleClick => this['dblclick'];
+
+  EventListenerList get drag => this['drag'];
+
+  EventListenerList get dragEnd => this['dragend'];
+
+  EventListenerList get dragEnter => this['dragenter'];
+
+  EventListenerList get dragLeave => this['dragleave'];
+
+  EventListenerList get dragOver => this['dragover'];
+
+  EventListenerList get dragStart => this['dragstart'];
+
+  EventListenerList get drop => this['drop'];
+
+  EventListenerList get error => this['error'];
+
+  EventListenerList get focus => this['focus'];
+
+  EventListenerList get input => this['input'];
+
+  EventListenerList get keyDown => this['keydown'];
+
+  EventListenerList get keyPress => this['keypress'];
+
+  EventListenerList get keyUp => this['keyup'];
+
+  EventListenerList get load => this['load'];
+
+  EventListenerList get mouseDown => this['mousedown'];
+
+  EventListenerList get mouseMove => this['mousemove'];
+
+  EventListenerList get mouseOut => this['mouseout'];
+
+  EventListenerList get mouseOver => this['mouseover'];
+
+  EventListenerList get mouseUp => this['mouseup'];
+
+  EventListenerList get mouseWheel => this['mousewheel'];
+
+  EventListenerList get paste => this['paste'];
+
+  EventListenerList get reset => this['reset'];
+
+  EventListenerList get resize => this['resize'];
+
+  EventListenerList get scroll => this['scroll'];
+
+  EventListenerList get search => this['search'];
+
+  EventListenerList get select => this['select'];
+
+  EventListenerList get selectStart => this['selectstart'];
+
+  EventListenerList get submit => this['submit'];
+
+  EventListenerList get unload => this['unload'];
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGEllipseElement
+class SVGEllipseElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGEllipseElement" {
+
+  /** @domName SVGEllipseElement.cx */
+  final SVGAnimatedLength cx;
+
+  /** @domName SVGEllipseElement.cy */
+  final SVGAnimatedLength cy;
+
+  /** @domName SVGEllipseElement.rx */
+  final SVGAnimatedLength rx;
+
+  /** @domName SVGEllipseElement.ry */
+  final SVGAnimatedLength ry;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGException
+class SVGException native "*SVGException" {
+
+  static const int SVG_INVALID_VALUE_ERR = 1;
+
+  static const int SVG_MATRIX_NOT_INVERTABLE = 2;
+
+  static const int SVG_WRONG_TYPE_ERR = 0;
+
+  /** @domName SVGException.code */
+  final int code;
+
+  /** @domName SVGException.message */
+  final String message;
+
+  /** @domName SVGException.name */
+  final String name;
+
+  /** @domName SVGException.toString */
+  String toString() native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGExternalResourcesRequired
+abstract class SVGExternalResourcesRequired {
+
+  SVGAnimatedBoolean externalResourcesRequired;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEBlendElement
+class SVGFEBlendElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEBlendElement" {
+
+  static const int SVG_FEBLEND_MODE_DARKEN = 4;
+
+  static const int SVG_FEBLEND_MODE_LIGHTEN = 5;
+
+  static const int SVG_FEBLEND_MODE_MULTIPLY = 2;
+
+  static const int SVG_FEBLEND_MODE_NORMAL = 1;
+
+  static const int SVG_FEBLEND_MODE_SCREEN = 3;
+
+  static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
+
+  /** @domName SVGFEBlendElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEBlendElement.in2 */
+  final SVGAnimatedString in2;
+
+  /** @domName SVGFEBlendElement.mode */
+  final SVGAnimatedEnumeration mode;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEColorMatrixElement
+class SVGFEColorMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEColorMatrixElement" {
+
+  static const int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
+
+  static const int SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
+
+  static const int SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
+
+  static const int SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
+
+  static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
+
+  /** @domName SVGFEColorMatrixElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEColorMatrixElement.type */
+  final SVGAnimatedEnumeration type;
+
+  /** @domName SVGFEColorMatrixElement.values */
+  final SVGAnimatedNumberList values;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEComponentTransferElement
+class SVGFEComponentTransferElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEComponentTransferElement" {
+
+  /** @domName SVGFEComponentTransferElement.in1 */
+  final SVGAnimatedString in1;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFECompositeElement
+class SVGFECompositeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFECompositeElement" {
+
+  static const int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_IN = 2;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_OUT = 3;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_OVER = 1;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
+
+  /** @domName SVGFECompositeElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFECompositeElement.in2 */
+  final SVGAnimatedString in2;
+
+  /** @domName SVGFECompositeElement.k1 */
+  final SVGAnimatedNumber k1;
+
+  /** @domName SVGFECompositeElement.k2 */
+  final SVGAnimatedNumber k2;
+
+  /** @domName SVGFECompositeElement.k3 */
+  final SVGAnimatedNumber k3;
+
+  /** @domName SVGFECompositeElement.k4 */
+  final SVGAnimatedNumber k4;
+
+  /** @domName SVGFECompositeElement.operator */
+  final SVGAnimatedEnumeration operator;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEConvolveMatrixElement
+class SVGFEConvolveMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEConvolveMatrixElement" {
+
+  static const int SVG_EDGEMODE_DUPLICATE = 1;
+
+  static const int SVG_EDGEMODE_NONE = 3;
+
+  static const int SVG_EDGEMODE_UNKNOWN = 0;
+
+  static const int SVG_EDGEMODE_WRAP = 2;
+
+  /** @domName SVGFEConvolveMatrixElement.bias */
+  final SVGAnimatedNumber bias;
+
+  /** @domName SVGFEConvolveMatrixElement.divisor */
+  final SVGAnimatedNumber divisor;
+
+  /** @domName SVGFEConvolveMatrixElement.edgeMode */
+  final SVGAnimatedEnumeration edgeMode;
+
+  /** @domName SVGFEConvolveMatrixElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEConvolveMatrixElement.kernelMatrix */
+  final SVGAnimatedNumberList kernelMatrix;
+
+  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthX */
+  final SVGAnimatedNumber kernelUnitLengthX;
+
+  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthY */
+  final SVGAnimatedNumber kernelUnitLengthY;
+
+  /** @domName SVGFEConvolveMatrixElement.orderX */
+  final SVGAnimatedInteger orderX;
+
+  /** @domName SVGFEConvolveMatrixElement.orderY */
+  final SVGAnimatedInteger orderY;
+
+  /** @domName SVGFEConvolveMatrixElement.preserveAlpha */
+  final SVGAnimatedBoolean preserveAlpha;
+
+  /** @domName SVGFEConvolveMatrixElement.targetX */
+  final SVGAnimatedInteger targetX;
+
+  /** @domName SVGFEConvolveMatrixElement.targetY */
+  final SVGAnimatedInteger targetY;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEDiffuseLightingElement
+class SVGFEDiffuseLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDiffuseLightingElement" {
+
+  /** @domName SVGFEDiffuseLightingElement.diffuseConstant */
+  final SVGAnimatedNumber diffuseConstant;
+
+  /** @domName SVGFEDiffuseLightingElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthX */
+  final SVGAnimatedNumber kernelUnitLengthX;
+
+  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthY */
+  final SVGAnimatedNumber kernelUnitLengthY;
+
+  /** @domName SVGFEDiffuseLightingElement.surfaceScale */
+  final SVGAnimatedNumber surfaceScale;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEDisplacementMapElement
+class SVGFEDisplacementMapElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDisplacementMapElement" {
+
+  static const int SVG_CHANNEL_A = 4;
+
+  static const int SVG_CHANNEL_B = 3;
+
+  static const int SVG_CHANNEL_G = 2;
+
+  static const int SVG_CHANNEL_R = 1;
+
+  static const int SVG_CHANNEL_UNKNOWN = 0;
+
+  /** @domName SVGFEDisplacementMapElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEDisplacementMapElement.in2 */
+  final SVGAnimatedString in2;
+
+  /** @domName SVGFEDisplacementMapElement.scale */
+  final SVGAnimatedNumber scale;
+
+  /** @domName SVGFEDisplacementMapElement.xChannelSelector */
+  final SVGAnimatedEnumeration xChannelSelector;
+
+  /** @domName SVGFEDisplacementMapElement.yChannelSelector */
+  final SVGAnimatedEnumeration yChannelSelector;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEDistantLightElement
+class SVGFEDistantLightElement extends SVGElement native "*SVGFEDistantLightElement" {
+
+  /** @domName SVGFEDistantLightElement.azimuth */
+  final SVGAnimatedNumber azimuth;
+
+  /** @domName SVGFEDistantLightElement.elevation */
+  final SVGAnimatedNumber elevation;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEDropShadowElement
+class SVGFEDropShadowElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEDropShadowElement" {
+
+  /** @domName SVGFEDropShadowElement.dx */
+  final SVGAnimatedNumber dx;
+
+  /** @domName SVGFEDropShadowElement.dy */
+  final SVGAnimatedNumber dy;
+
+  /** @domName SVGFEDropShadowElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEDropShadowElement.stdDeviationX */
+  final SVGAnimatedNumber stdDeviationX;
+
+  /** @domName SVGFEDropShadowElement.stdDeviationY */
+  final SVGAnimatedNumber stdDeviationY;
+
+  /** @domName SVGFEDropShadowElement.setStdDeviation */
+  void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEFloodElement
+class SVGFEFloodElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEFloodElement" {
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEFuncAElement
+class SVGFEFuncAElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncAElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEFuncBElement
+class SVGFEFuncBElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncBElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEFuncGElement
+class SVGFEFuncGElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncGElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEFuncRElement
+class SVGFEFuncRElement extends SVGComponentTransferFunctionElement native "*SVGFEFuncRElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEGaussianBlurElement
+class SVGFEGaussianBlurElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEGaussianBlurElement" {
+
+  /** @domName SVGFEGaussianBlurElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEGaussianBlurElement.stdDeviationX */
+  final SVGAnimatedNumber stdDeviationX;
+
+  /** @domName SVGFEGaussianBlurElement.stdDeviationY */
+  final SVGAnimatedNumber stdDeviationY;
+
+  /** @domName SVGFEGaussianBlurElement.setStdDeviation */
+  void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEImageElement
+class SVGFEImageElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired native "*SVGFEImageElement" {
+
+  /** @domName SVGFEImageElement.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEMergeElement
+class SVGFEMergeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEMergeElement" {
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEMergeNodeElement
+class SVGFEMergeNodeElement extends SVGElement native "*SVGFEMergeNodeElement" {
+
+  /** @domName SVGFEMergeNodeElement.in1 */
+  final SVGAnimatedString in1;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEMorphologyElement
+class SVGFEMorphologyElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEMorphologyElement" {
+
+  static const int SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+  static const int SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+
+  static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+
+  /** @domName SVGFEMorphologyElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFEMorphologyElement.operator */
+  final SVGAnimatedEnumeration operator;
+
+  /** @domName SVGFEMorphologyElement.radiusX */
+  final SVGAnimatedNumber radiusX;
+
+  /** @domName SVGFEMorphologyElement.radiusY */
+  final SVGAnimatedNumber radiusY;
+
+  /** @domName SVGFEMorphologyElement.setRadius */
+  void setRadius(num radiusX, num radiusY) native;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEOffsetElement
+class SVGFEOffsetElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFEOffsetElement" {
+
+  /** @domName SVGFEOffsetElement.dx */
+  final SVGAnimatedNumber dx;
+
+  /** @domName SVGFEOffsetElement.dy */
+  final SVGAnimatedNumber dy;
+
+  /** @domName SVGFEOffsetElement.in1 */
+  final SVGAnimatedString in1;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFEPointLightElement
+class SVGFEPointLightElement extends SVGElement native "*SVGFEPointLightElement" {
+
+  /** @domName SVGFEPointLightElement.x */
+  final SVGAnimatedNumber x;
+
+  /** @domName SVGFEPointLightElement.y */
+  final SVGAnimatedNumber y;
+
+  /** @domName SVGFEPointLightElement.z */
+  final SVGAnimatedNumber z;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFESpecularLightingElement
+class SVGFESpecularLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFESpecularLightingElement" {
+
+  /** @domName SVGFESpecularLightingElement.in1 */
+  final SVGAnimatedString in1;
+
+  /** @domName SVGFESpecularLightingElement.specularConstant */
+  final SVGAnimatedNumber specularConstant;
+
+  /** @domName SVGFESpecularLightingElement.specularExponent */
+  final SVGAnimatedNumber specularExponent;
+
+  /** @domName SVGFESpecularLightingElement.surfaceScale */
+  final SVGAnimatedNumber surfaceScale;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFESpotLightElement
+class SVGFESpotLightElement extends SVGElement native "*SVGFESpotLightElement" {
+
+  /** @domName SVGFESpotLightElement.limitingConeAngle */
+  final SVGAnimatedNumber limitingConeAngle;
+
+  /** @domName SVGFESpotLightElement.pointsAtX */
+  final SVGAnimatedNumber pointsAtX;
+
+  /** @domName SVGFESpotLightElement.pointsAtY */
+  final SVGAnimatedNumber pointsAtY;
+
+  /** @domName SVGFESpotLightElement.pointsAtZ */
+  final SVGAnimatedNumber pointsAtZ;
+
+  /** @domName SVGFESpotLightElement.specularExponent */
+  final SVGAnimatedNumber specularExponent;
+
+  /** @domName SVGFESpotLightElement.x */
+  final SVGAnimatedNumber x;
+
+  /** @domName SVGFESpotLightElement.y */
+  final SVGAnimatedNumber y;
+
+  /** @domName SVGFESpotLightElement.z */
+  final SVGAnimatedNumber z;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFETileElement
+class SVGFETileElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFETileElement" {
+
+  /** @domName SVGFETileElement.in1 */
+  final SVGAnimatedString in1;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFETurbulenceElement
+class SVGFETurbulenceElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes native "*SVGFETurbulenceElement" {
+
+  static const int SVG_STITCHTYPE_NOSTITCH = 2;
+
+  static const int SVG_STITCHTYPE_STITCH = 1;
+
+  static const int SVG_STITCHTYPE_UNKNOWN = 0;
+
+  static const int SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
+
+  static const int SVG_TURBULENCE_TYPE_TURBULENCE = 2;
+
+  static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
+
+  /** @domName SVGFETurbulenceElement.baseFrequencyX */
+  final SVGAnimatedNumber baseFrequencyX;
+
+  /** @domName SVGFETurbulenceElement.baseFrequencyY */
+  final SVGAnimatedNumber baseFrequencyY;
+
+  /** @domName SVGFETurbulenceElement.numOctaves */
+  final SVGAnimatedInteger numOctaves;
+
+  /** @domName SVGFETurbulenceElement.seed */
+  final SVGAnimatedNumber seed;
+
+  /** @domName SVGFETurbulenceElement.stitchTiles */
+  final SVGAnimatedEnumeration stitchTiles;
+
+  /** @domName SVGFETurbulenceElement.type */
+  final SVGAnimatedEnumeration type;
+
+  // From SVGFilterPrimitiveStandardAttributes
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  final SVGAnimatedString result;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  final SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFilterElement
+class SVGFilterElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable native "*SVGFilterElement" {
+
+  /** @domName SVGFilterElement.filterResX */
+  final SVGAnimatedInteger filterResX;
+
+  /** @domName SVGFilterElement.filterResY */
+  final SVGAnimatedInteger filterResY;
+
+  /** @domName SVGFilterElement.filterUnits */
+  final SVGAnimatedEnumeration filterUnits;
+
+  /** @domName SVGFilterElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGFilterElement.primitiveUnits */
+  final SVGAnimatedEnumeration primitiveUnits;
+
+  /** @domName SVGFilterElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGFilterElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGFilterElement.y */
+  final SVGAnimatedLength y;
+
+  /** @domName SVGFilterElement.setFilterRes */
+  void setFilterRes(int filterResX, int filterResY) native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFilterPrimitiveStandardAttributes
+abstract class SVGFilterPrimitiveStandardAttributes implements SVGStylable {
+
+  SVGAnimatedLength height;
+
+  SVGAnimatedString result;
+
+  SVGAnimatedLength width;
+
+  SVGAnimatedLength x;
+
+  SVGAnimatedLength y;
+
+  // From SVGStylable
+
+  SVGAnimatedString className;
+
+  CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name);
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFitToViewBox
+abstract class SVGFitToViewBox {
+
+  SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  SVGAnimatedRect viewBox;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontElement
+class SVGFontElement extends SVGElement native "*SVGFontElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontFaceElement
+class SVGFontFaceElement extends SVGElement native "*SVGFontFaceElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontFaceFormatElement
+class SVGFontFaceFormatElement extends SVGElement native "*SVGFontFaceFormatElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontFaceNameElement
+class SVGFontFaceNameElement extends SVGElement native "*SVGFontFaceNameElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontFaceSrcElement
+class SVGFontFaceSrcElement extends SVGElement native "*SVGFontFaceSrcElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGFontFaceUriElement
+class SVGFontFaceUriElement extends SVGElement native "*SVGFontFaceUriElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGForeignObjectElement
+class SVGForeignObjectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGForeignObjectElement" {
+
+  /** @domName SVGForeignObjectElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGForeignObjectElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGForeignObjectElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGForeignObjectElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGGElement
+class SVGGElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGGElement" {
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGGlyphElement
+class SVGGlyphElement extends SVGElement native "*SVGGlyphElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGGlyphRefElement
+class SVGGlyphRefElement extends SVGElement implements SVGURIReference, SVGStylable native "*SVGGlyphRefElement" {
+
+  /** @domName SVGGlyphRefElement.dx */
+  num dx;
+
+  /** @domName SVGGlyphRefElement.dy */
+  num dy;
+
+  /** @domName SVGGlyphRefElement.format */
+  String format;
+
+  /** @domName SVGGlyphRefElement.glyphRef */
+  String glyphRef;
+
+  /** @domName SVGGlyphRefElement.x */
+  num x;
+
+  /** @domName SVGGlyphRefElement.y */
+  num y;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGGradientElement
+class SVGGradientElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired, SVGStylable native "*SVGGradientElement" {
+
+  static const int SVG_SPREADMETHOD_PAD = 1;
+
+  static const int SVG_SPREADMETHOD_REFLECT = 2;
+
+  static const int SVG_SPREADMETHOD_REPEAT = 3;
+
+  static const int SVG_SPREADMETHOD_UNKNOWN = 0;
+
+  /** @domName SVGGradientElement.gradientTransform */
+  final SVGAnimatedTransformList gradientTransform;
+
+  /** @domName SVGGradientElement.gradientUnits */
+  final SVGAnimatedEnumeration gradientUnits;
+
+  /** @domName SVGGradientElement.spreadMethod */
+  final SVGAnimatedEnumeration spreadMethod;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGHKernElement
+class SVGHKernElement extends SVGElement native "*SVGHKernElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGImageElement
+class SVGImageElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGImageElement" {
+
+  /** @domName SVGImageElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGImageElement.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGImageElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGImageElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGImageElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLangSpace
+abstract class SVGLangSpace {
+
+  String xmllang;
+
+  String xmlspace;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLength
+class SVGLength native "*SVGLength" {
+
+  static const int SVG_LENGTHTYPE_CM = 6;
+
+  static const int SVG_LENGTHTYPE_EMS = 3;
+
+  static const int SVG_LENGTHTYPE_EXS = 4;
+
+  static const int SVG_LENGTHTYPE_IN = 8;
+
+  static const int SVG_LENGTHTYPE_MM = 7;
+
+  static const int SVG_LENGTHTYPE_NUMBER = 1;
+
+  static const int SVG_LENGTHTYPE_PC = 10;
+
+  static const int SVG_LENGTHTYPE_PERCENTAGE = 2;
+
+  static const int SVG_LENGTHTYPE_PT = 9;
+
+  static const int SVG_LENGTHTYPE_PX = 5;
+
+  static const int SVG_LENGTHTYPE_UNKNOWN = 0;
+
+  /** @domName SVGLength.unitType */
+  final int unitType;
+
+  /** @domName SVGLength.value */
+  num value;
+
+  /** @domName SVGLength.valueAsString */
+  String valueAsString;
+
+  /** @domName SVGLength.valueInSpecifiedUnits */
+  num valueInSpecifiedUnits;
+
+  /** @domName SVGLength.convertToSpecifiedUnits */
+  void convertToSpecifiedUnits(int unitType) native;
+
+  /** @domName SVGLength.newValueSpecifiedUnits */
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLengthList
+class SVGLengthList implements JavaScriptIndexingBehavior, List<SVGLength> native "*SVGLengthList" {
+
+  /** @domName SVGLengthList.numberOfItems */
+  final int numberOfItems;
+
+  SVGLength operator[](int index) => JS("SVGLength", "#[#]", this, index);
+
+  void operator[]=(int index, SVGLength value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGLength> mixins.
+  // SVGLength is the element type.
+
+  // From Iterable<SVGLength>:
+
+  Iterator<SVGLength> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGLength>(this);
+  }
+
+  // From Collection<SVGLength>:
+
+  void add(SVGLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGLength> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGLength element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGLength element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGLength element)) => _Collections.map(this, [], f);
+
+  Collection<SVGLength> filter(bool f(SVGLength element)) =>
+     _Collections.filter(this, <SVGLength>[], f);
+
+  bool every(bool f(SVGLength element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGLength element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGLength>:
+
+  void sort([Comparator<SVGLength> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGLength element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGLength element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGLength get last => this[length - 1];
+
+  SVGLength removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGLength initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGLength> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGLength>[]);
+
+  // -- end List<SVGLength> mixins.
+
+  /** @domName SVGLengthList.appendItem */
+  SVGLength appendItem(SVGLength item) native;
+
+  /** @domName SVGLengthList.clear */
+  void clear() native;
+
+  /** @domName SVGLengthList.getItem */
+  SVGLength getItem(int index) native;
+
+  /** @domName SVGLengthList.initialize */
+  SVGLength initialize(SVGLength item) native;
+
+  /** @domName SVGLengthList.insertItemBefore */
+  SVGLength insertItemBefore(SVGLength item, int index) native;
+
+  /** @domName SVGLengthList.removeItem */
+  SVGLength removeItem(int index) native;
+
+  /** @domName SVGLengthList.replaceItem */
+  SVGLength replaceItem(SVGLength item, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLineElement
+class SVGLineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGLineElement" {
+
+  /** @domName SVGLineElement.x1 */
+  final SVGAnimatedLength x1;
+
+  /** @domName SVGLineElement.x2 */
+  final SVGAnimatedLength x2;
+
+  /** @domName SVGLineElement.y1 */
+  final SVGAnimatedLength y1;
+
+  /** @domName SVGLineElement.y2 */
+  final SVGAnimatedLength y2;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLinearGradientElement
+class SVGLinearGradientElement extends SVGGradientElement native "*SVGLinearGradientElement" {
+
+  /** @domName SVGLinearGradientElement.x1 */
+  final SVGAnimatedLength x1;
+
+  /** @domName SVGLinearGradientElement.x2 */
+  final SVGAnimatedLength x2;
+
+  /** @domName SVGLinearGradientElement.y1 */
+  final SVGAnimatedLength y1;
+
+  /** @domName SVGLinearGradientElement.y2 */
+  final SVGAnimatedLength y2;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGLocatable
+abstract class SVGLocatable {
+
+  SVGElement farthestViewportElement;
+
+  SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox();
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM();
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM();
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element);
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMPathElement
+class SVGMPathElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired native "*SVGMPathElement" {
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMarkerElement
+class SVGMarkerElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable native "*SVGMarkerElement" {
+
+  static const int SVG_MARKERUNITS_STROKEWIDTH = 2;
+
+  static const int SVG_MARKERUNITS_UNKNOWN = 0;
+
+  static const int SVG_MARKERUNITS_USERSPACEONUSE = 1;
+
+  static const int SVG_MARKER_ORIENT_ANGLE = 2;
+
+  static const int SVG_MARKER_ORIENT_AUTO = 1;
+
+  static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
+
+  /** @domName SVGMarkerElement.markerHeight */
+  final SVGAnimatedLength markerHeight;
+
+  /** @domName SVGMarkerElement.markerUnits */
+  final SVGAnimatedEnumeration markerUnits;
+
+  /** @domName SVGMarkerElement.markerWidth */
+  final SVGAnimatedLength markerWidth;
+
+  /** @domName SVGMarkerElement.orientAngle */
+  final SVGAnimatedAngle orientAngle;
+
+  /** @domName SVGMarkerElement.orientType */
+  final SVGAnimatedEnumeration orientType;
+
+  /** @domName SVGMarkerElement.refX */
+  final SVGAnimatedLength refX;
+
+  /** @domName SVGMarkerElement.refY */
+  final SVGAnimatedLength refY;
+
+  /** @domName SVGMarkerElement.setOrientToAngle */
+  void setOrientToAngle(SVGAngle angle) native;
+
+  /** @domName SVGMarkerElement.setOrientToAuto */
+  void setOrientToAuto() native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFitToViewBox
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGFitToViewBox.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMaskElement
+class SVGMaskElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired native "*SVGMaskElement" {
+
+  /** @domName SVGMaskElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGMaskElement.maskContentUnits */
+  final SVGAnimatedEnumeration maskContentUnits;
+
+  /** @domName SVGMaskElement.maskUnits */
+  final SVGAnimatedEnumeration maskUnits;
+
+  /** @domName SVGMaskElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGMaskElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGMaskElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMatrix
+class SVGMatrix native "*SVGMatrix" {
+
+  /** @domName SVGMatrix.a */
+  num a;
+
+  /** @domName SVGMatrix.b */
+  num b;
+
+  /** @domName SVGMatrix.c */
+  num c;
+
+  /** @domName SVGMatrix.d */
+  num d;
+
+  /** @domName SVGMatrix.e */
+  num e;
+
+  /** @domName SVGMatrix.f */
+  num f;
+
+  /** @domName SVGMatrix.flipX */
+  SVGMatrix flipX() native;
+
+  /** @domName SVGMatrix.flipY */
+  SVGMatrix flipY() native;
+
+  /** @domName SVGMatrix.inverse */
+  SVGMatrix inverse() native;
+
+  /** @domName SVGMatrix.multiply */
+  SVGMatrix multiply(SVGMatrix secondMatrix) native;
+
+  /** @domName SVGMatrix.rotate */
+  SVGMatrix rotate(num angle) native;
+
+  /** @domName SVGMatrix.rotateFromVector */
+  SVGMatrix rotateFromVector(num x, num y) native;
+
+  /** @domName SVGMatrix.scale */
+  SVGMatrix scale(num scaleFactor) native;
+
+  /** @domName SVGMatrix.scaleNonUniform */
+  SVGMatrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native;
+
+  /** @domName SVGMatrix.skewX */
+  SVGMatrix skewX(num angle) native;
+
+  /** @domName SVGMatrix.skewY */
+  SVGMatrix skewY(num angle) native;
+
+  /** @domName SVGMatrix.translate */
+  SVGMatrix translate(num x, num y) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMetadataElement
+class SVGMetadataElement extends SVGElement native "*SVGMetadataElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGMissingGlyphElement
+class SVGMissingGlyphElement extends SVGElement native "*SVGMissingGlyphElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGNumber
+class SVGNumber native "*SVGNumber" {
+
+  /** @domName SVGNumber.value */
+  num value;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGNumberList
+class SVGNumberList implements JavaScriptIndexingBehavior, List<SVGNumber> native "*SVGNumberList" {
+
+  /** @domName SVGNumberList.numberOfItems */
+  final int numberOfItems;
+
+  SVGNumber operator[](int index) => JS("SVGNumber", "#[#]", this, index);
+
+  void operator[]=(int index, SVGNumber value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGNumber> mixins.
+  // SVGNumber is the element type.
+
+  // From Iterable<SVGNumber>:
+
+  Iterator<SVGNumber> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGNumber>(this);
+  }
+
+  // From Collection<SVGNumber>:
+
+  void add(SVGNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGNumber> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGNumber element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGNumber element)) => _Collections.map(this, [], f);
+
+  Collection<SVGNumber> filter(bool f(SVGNumber element)) =>
+     _Collections.filter(this, <SVGNumber>[], f);
+
+  bool every(bool f(SVGNumber element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGNumber element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGNumber>:
+
+  void sort([Comparator<SVGNumber> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGNumber element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGNumber element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGNumber get last => this[length - 1];
+
+  SVGNumber removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGNumber initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGNumber> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGNumber>[]);
+
+  // -- end List<SVGNumber> mixins.
+
+  /** @domName SVGNumberList.appendItem */
+  SVGNumber appendItem(SVGNumber item) native;
+
+  /** @domName SVGNumberList.clear */
+  void clear() native;
+
+  /** @domName SVGNumberList.getItem */
+  SVGNumber getItem(int index) native;
+
+  /** @domName SVGNumberList.initialize */
+  SVGNumber initialize(SVGNumber item) native;
+
+  /** @domName SVGNumberList.insertItemBefore */
+  SVGNumber insertItemBefore(SVGNumber item, int index) native;
+
+  /** @domName SVGNumberList.removeItem */
+  SVGNumber removeItem(int index) native;
+
+  /** @domName SVGNumberList.replaceItem */
+  SVGNumber replaceItem(SVGNumber item, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPaint
+class SVGPaint extends SVGColor native "*SVGPaint" {
+
+  static const int SVG_PAINTTYPE_CURRENTCOLOR = 102;
+
+  static const int SVG_PAINTTYPE_NONE = 101;
+
+  static const int SVG_PAINTTYPE_RGBCOLOR = 1;
+
+  static const int SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
+
+  static const int SVG_PAINTTYPE_UNKNOWN = 0;
+
+  static const int SVG_PAINTTYPE_URI = 107;
+
+  static const int SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
+
+  static const int SVG_PAINTTYPE_URI_NONE = 103;
+
+  static const int SVG_PAINTTYPE_URI_RGBCOLOR = 105;
+
+  static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
+
+  /** @domName SVGPaint.paintType */
+  final int paintType;
+
+  /** @domName SVGPaint.uri */
+  final String uri;
+
+  /** @domName SVGPaint.setPaint */
+  void setPaint(int paintType, String uri, String rgbColor, String iccColor) native;
+
+  /** @domName SVGPaint.setUri */
+  void setUri(String uri) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathElement
+class SVGPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPathElement" {
+
+  /** @domName SVGPathElement.animatedNormalizedPathSegList */
+  final SVGPathSegList animatedNormalizedPathSegList;
+
+  /** @domName SVGPathElement.animatedPathSegList */
+  final SVGPathSegList animatedPathSegList;
+
+  /** @domName SVGPathElement.normalizedPathSegList */
+  final SVGPathSegList normalizedPathSegList;
+
+  /** @domName SVGPathElement.pathLength */
+  final SVGAnimatedNumber pathLength;
+
+  /** @domName SVGPathElement.pathSegList */
+  final SVGPathSegList pathSegList;
+
+  /** @domName SVGPathElement.createSVGPathSegArcAbs */
+  SVGPathSegArcAbs createSVGPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
+
+  /** @domName SVGPathElement.createSVGPathSegArcRel */
+  SVGPathSegArcRel createSVGPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
+
+  /** @domName SVGPathElement.createSVGPathSegClosePath */
+  SVGPathSegClosePath createSVGPathSegClosePath() native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicAbs */
+  SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicRel */
+  SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs */
+  SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel */
+  SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticAbs */
+  SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticRel */
+  SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs */
+  SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(num x, num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel */
+  SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(num x, num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoAbs */
+  SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(num x, num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalAbs */
+  SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(num x) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalRel */
+  SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(num x) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoRel */
+  SVGPathSegLinetoRel createSVGPathSegLinetoRel(num x, num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalAbs */
+  SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalRel */
+  SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegMovetoAbs */
+  SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(num x, num y) native;
+
+  /** @domName SVGPathElement.createSVGPathSegMovetoRel */
+  SVGPathSegMovetoRel createSVGPathSegMovetoRel(num x, num y) native;
+
+  /** @domName SVGPathElement.getPathSegAtLength */
+  int getPathSegAtLength(num distance) native;
+
+  /** @domName SVGPathElement.getPointAtLength */
+  SVGPoint getPointAtLength(num distance) native;
+
+  /** @domName SVGPathElement.getTotalLength */
+  num getTotalLength() native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSeg
+class SVGPathSeg native "*SVGPathSeg" {
+
+  static const int PATHSEG_ARC_ABS = 10;
+
+  static const int PATHSEG_ARC_REL = 11;
+
+  static const int PATHSEG_CLOSEPATH = 1;
+
+  static const int PATHSEG_CURVETO_CUBIC_ABS = 6;
+
+  static const int PATHSEG_CURVETO_CUBIC_REL = 7;
+
+  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
+
+  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_ABS = 8;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_REL = 9;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+
+  static const int PATHSEG_LINETO_ABS = 4;
+
+  static const int PATHSEG_LINETO_HORIZONTAL_ABS = 12;
+
+  static const int PATHSEG_LINETO_HORIZONTAL_REL = 13;
+
+  static const int PATHSEG_LINETO_REL = 5;
+
+  static const int PATHSEG_LINETO_VERTICAL_ABS = 14;
+
+  static const int PATHSEG_LINETO_VERTICAL_REL = 15;
+
+  static const int PATHSEG_MOVETO_ABS = 2;
+
+  static const int PATHSEG_MOVETO_REL = 3;
+
+  static const int PATHSEG_UNKNOWN = 0;
+
+  /** @domName SVGPathSeg.pathSegType */
+  final int pathSegType;
+
+  /** @domName SVGPathSeg.pathSegTypeAsLetter */
+  final String pathSegTypeAsLetter;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegArcAbs
+class SVGPathSegArcAbs extends SVGPathSeg native "*SVGPathSegArcAbs" {
+
+  /** @domName SVGPathSegArcAbs.angle */
+  num angle;
+
+  /** @domName SVGPathSegArcAbs.largeArcFlag */
+  bool largeArcFlag;
+
+  /** @domName SVGPathSegArcAbs.r1 */
+  num r1;
+
+  /** @domName SVGPathSegArcAbs.r2 */
+  num r2;
+
+  /** @domName SVGPathSegArcAbs.sweepFlag */
+  bool sweepFlag;
+
+  /** @domName SVGPathSegArcAbs.x */
+  num x;
+
+  /** @domName SVGPathSegArcAbs.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegArcRel
+class SVGPathSegArcRel extends SVGPathSeg native "*SVGPathSegArcRel" {
+
+  /** @domName SVGPathSegArcRel.angle */
+  num angle;
+
+  /** @domName SVGPathSegArcRel.largeArcFlag */
+  bool largeArcFlag;
+
+  /** @domName SVGPathSegArcRel.r1 */
+  num r1;
+
+  /** @domName SVGPathSegArcRel.r2 */
+  num r2;
+
+  /** @domName SVGPathSegArcRel.sweepFlag */
+  bool sweepFlag;
+
+  /** @domName SVGPathSegArcRel.x */
+  num x;
+
+  /** @domName SVGPathSegArcRel.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegClosePath
+class SVGPathSegClosePath extends SVGPathSeg native "*SVGPathSegClosePath" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoCubicAbs
+class SVGPathSegCurvetoCubicAbs extends SVGPathSeg native "*SVGPathSegCurvetoCubicAbs" {
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
+  num x1;
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
+  num x2;
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
+  num y1;
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
+  num y2;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoCubicRel
+class SVGPathSegCurvetoCubicRel extends SVGPathSeg native "*SVGPathSegCurvetoCubicRel" {
+
+  /** @domName SVGPathSegCurvetoCubicRel.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoCubicRel.x1 */
+  num x1;
+
+  /** @domName SVGPathSegCurvetoCubicRel.x2 */
+  num x2;
+
+  /** @domName SVGPathSegCurvetoCubicRel.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoCubicRel.y1 */
+  num y1;
+
+  /** @domName SVGPathSegCurvetoCubicRel.y2 */
+  num y2;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoCubicSmoothAbs
+class SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg native "*SVGPathSegCurvetoCubicSmoothAbs" {
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
+  num x2;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
+  num y2;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoCubicSmoothRel
+class SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg native "*SVGPathSegCurvetoCubicSmoothRel" {
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
+  num x2;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
+  num y2;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoQuadraticAbs
+class SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticAbs" {
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
+  num x1;
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
+  num y1;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoQuadraticRel
+class SVGPathSegCurvetoQuadraticRel extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticRel" {
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
+  num x1;
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y */
+  num y;
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
+  num y1;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoQuadraticSmoothAbs
+class SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticSmoothAbs" {
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegCurvetoQuadraticSmoothRel
+class SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg native "*SVGPathSegCurvetoQuadraticSmoothRel" {
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
+  num x;
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoAbs
+class SVGPathSegLinetoAbs extends SVGPathSeg native "*SVGPathSegLinetoAbs" {
+
+  /** @domName SVGPathSegLinetoAbs.x */
+  num x;
+
+  /** @domName SVGPathSegLinetoAbs.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoHorizontalAbs
+class SVGPathSegLinetoHorizontalAbs extends SVGPathSeg native "*SVGPathSegLinetoHorizontalAbs" {
+
+  /** @domName SVGPathSegLinetoHorizontalAbs.x */
+  num x;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoHorizontalRel
+class SVGPathSegLinetoHorizontalRel extends SVGPathSeg native "*SVGPathSegLinetoHorizontalRel" {
+
+  /** @domName SVGPathSegLinetoHorizontalRel.x */
+  num x;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoRel
+class SVGPathSegLinetoRel extends SVGPathSeg native "*SVGPathSegLinetoRel" {
+
+  /** @domName SVGPathSegLinetoRel.x */
+  num x;
+
+  /** @domName SVGPathSegLinetoRel.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoVerticalAbs
+class SVGPathSegLinetoVerticalAbs extends SVGPathSeg native "*SVGPathSegLinetoVerticalAbs" {
+
+  /** @domName SVGPathSegLinetoVerticalAbs.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegLinetoVerticalRel
+class SVGPathSegLinetoVerticalRel extends SVGPathSeg native "*SVGPathSegLinetoVerticalRel" {
+
+  /** @domName SVGPathSegLinetoVerticalRel.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegList
+class SVGPathSegList implements JavaScriptIndexingBehavior, List<SVGPathSeg> native "*SVGPathSegList" {
+
+  /** @domName SVGPathSegList.numberOfItems */
+  final int numberOfItems;
+
+  SVGPathSeg operator[](int index) => JS("SVGPathSeg", "#[#]", this, index);
+
+  void operator[]=(int index, SVGPathSeg value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGPathSeg> mixins.
+  // SVGPathSeg is the element type.
+
+  // From Iterable<SVGPathSeg>:
+
+  Iterator<SVGPathSeg> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGPathSeg>(this);
+  }
+
+  // From Collection<SVGPathSeg>:
+
+  void add(SVGPathSeg value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGPathSeg value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGPathSeg> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGPathSeg element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f);
+
+  Collection<SVGPathSeg> filter(bool f(SVGPathSeg element)) =>
+     _Collections.filter(this, <SVGPathSeg>[], f);
+
+  bool every(bool f(SVGPathSeg element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGPathSeg element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGPathSeg>:
+
+  void sort([Comparator<SVGPathSeg> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGPathSeg element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGPathSeg element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGPathSeg get last => this[length - 1];
+
+  SVGPathSeg removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGPathSeg initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGPathSeg> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGPathSeg>[]);
+
+  // -- end List<SVGPathSeg> mixins.
+
+  /** @domName SVGPathSegList.appendItem */
+  SVGPathSeg appendItem(SVGPathSeg newItem) native;
+
+  /** @domName SVGPathSegList.clear */
+  void clear() native;
+
+  /** @domName SVGPathSegList.getItem */
+  SVGPathSeg getItem(int index) native;
+
+  /** @domName SVGPathSegList.initialize */
+  SVGPathSeg initialize(SVGPathSeg newItem) native;
+
+  /** @domName SVGPathSegList.insertItemBefore */
+  SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index) native;
+
+  /** @domName SVGPathSegList.removeItem */
+  SVGPathSeg removeItem(int index) native;
+
+  /** @domName SVGPathSegList.replaceItem */
+  SVGPathSeg replaceItem(SVGPathSeg newItem, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegMovetoAbs
+class SVGPathSegMovetoAbs extends SVGPathSeg native "*SVGPathSegMovetoAbs" {
+
+  /** @domName SVGPathSegMovetoAbs.x */
+  num x;
+
+  /** @domName SVGPathSegMovetoAbs.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPathSegMovetoRel
+class SVGPathSegMovetoRel extends SVGPathSeg native "*SVGPathSegMovetoRel" {
+
+  /** @domName SVGPathSegMovetoRel.x */
+  num x;
+
+  /** @domName SVGPathSegMovetoRel.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPatternElement
+class SVGPatternElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGFitToViewBox, SVGExternalResourcesRequired native "*SVGPatternElement" {
+
+  /** @domName SVGPatternElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGPatternElement.patternContentUnits */
+  final SVGAnimatedEnumeration patternContentUnits;
+
+  /** @domName SVGPatternElement.patternTransform */
+  final SVGAnimatedTransformList patternTransform;
+
+  /** @domName SVGPatternElement.patternUnits */
+  final SVGAnimatedEnumeration patternUnits;
+
+  /** @domName SVGPatternElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGPatternElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGPatternElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFitToViewBox
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGFitToViewBox.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPoint
+class SVGPoint native "*SVGPoint" {
+
+  /** @domName SVGPoint.x */
+  num x;
+
+  /** @domName SVGPoint.y */
+  num y;
+
+  /** @domName SVGPoint.matrixTransform */
+  SVGPoint matrixTransform(SVGMatrix matrix) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPointList
+class SVGPointList native "*SVGPointList" {
+
+  /** @domName SVGPointList.numberOfItems */
+  final int numberOfItems;
+
+  /** @domName SVGPointList.appendItem */
+  SVGPoint appendItem(SVGPoint item) native;
+
+  /** @domName SVGPointList.clear */
+  void clear() native;
+
+  /** @domName SVGPointList.getItem */
+  SVGPoint getItem(int index) native;
+
+  /** @domName SVGPointList.initialize */
+  SVGPoint initialize(SVGPoint item) native;
+
+  /** @domName SVGPointList.insertItemBefore */
+  SVGPoint insertItemBefore(SVGPoint item, int index) native;
+
+  /** @domName SVGPointList.removeItem */
+  SVGPoint removeItem(int index) native;
+
+  /** @domName SVGPointList.replaceItem */
+  SVGPoint replaceItem(SVGPoint item, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPolygonElement
+class SVGPolygonElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPolygonElement" {
+
+  /** @domName SVGPolygonElement.animatedPoints */
+  final SVGPointList animatedPoints;
+
+  /** @domName SVGPolygonElement.points */
+  final SVGPointList points;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPolylineElement
+class SVGPolylineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGPolylineElement" {
+
+  /** @domName SVGPolylineElement.animatedPoints */
+  final SVGPointList animatedPoints;
+
+  /** @domName SVGPolylineElement.points */
+  final SVGPointList points;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGPreserveAspectRatio
+class SVGPreserveAspectRatio native "*SVGPreserveAspectRatio" {
+
+  static const int SVG_MEETORSLICE_MEET = 1;
+
+  static const int SVG_MEETORSLICE_SLICE = 2;
+
+  static const int SVG_MEETORSLICE_UNKNOWN = 0;
+
+  static const int SVG_PRESERVEASPECTRATIO_NONE = 1;
+
+  static const int SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
+
+  /** @domName SVGPreserveAspectRatio.align */
+  int align;
+
+  /** @domName SVGPreserveAspectRatio.meetOrSlice */
+  int meetOrSlice;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGRadialGradientElement
+class SVGRadialGradientElement extends SVGGradientElement native "*SVGRadialGradientElement" {
+
+  /** @domName SVGRadialGradientElement.cx */
+  final SVGAnimatedLength cx;
+
+  /** @domName SVGRadialGradientElement.cy */
+  final SVGAnimatedLength cy;
+
+  /** @domName SVGRadialGradientElement.fr */
+  final SVGAnimatedLength fr;
+
+  /** @domName SVGRadialGradientElement.fx */
+  final SVGAnimatedLength fx;
+
+  /** @domName SVGRadialGradientElement.fy */
+  final SVGAnimatedLength fy;
+
+  /** @domName SVGRadialGradientElement.r */
+  final SVGAnimatedLength r;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGRect
+class SVGRect native "*SVGRect" {
+
+  /** @domName SVGRect.height */
+  num height;
+
+  /** @domName SVGRect.width */
+  num width;
+
+  /** @domName SVGRect.x */
+  num x;
+
+  /** @domName SVGRect.y */
+  num y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGRectElement
+class SVGRectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGRectElement" {
+
+  /** @domName SVGRectElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGRectElement.rx */
+  final SVGAnimatedLength rx;
+
+  /** @domName SVGRectElement.ry */
+  final SVGAnimatedLength ry;
+
+  /** @domName SVGRectElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGRectElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGRectElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGRenderingIntent
+class SVGRenderingIntent native "*SVGRenderingIntent" {
+
+  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
+
+  static const int RENDERING_INTENT_AUTO = 1;
+
+  static const int RENDERING_INTENT_PERCEPTUAL = 2;
+
+  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
+
+  static const int RENDERING_INTENT_SATURATION = 4;
+
+  static const int RENDERING_INTENT_UNKNOWN = 0;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+class SVGSVGElement extends SVGElement implements SVGZoomAndPan, SVGLocatable, SVGLangSpace, SVGTests, SVGStylable, SVGFitToViewBox, SVGExternalResourcesRequired native "*SVGSVGElement" {
+  factory SVGSVGElement() => _SVGSVGElementFactoryProvider.createSVGSVGElement();
+
+
+  /** @domName SVGSVGElement.contentScriptType */
+  String contentScriptType;
+
+  /** @domName SVGSVGElement.contentStyleType */
+  String contentStyleType;
+
+  /** @domName SVGSVGElement.currentScale */
+  num currentScale;
+
+  /** @domName SVGSVGElement.currentTranslate */
+  final SVGPoint currentTranslate;
+
+  /** @domName SVGSVGElement.currentView */
+  final SVGViewSpec currentView;
+
+  /** @domName SVGSVGElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGSVGElement.pixelUnitToMillimeterX */
+  final num pixelUnitToMillimeterX;
+
+  /** @domName SVGSVGElement.pixelUnitToMillimeterY */
+  final num pixelUnitToMillimeterY;
+
+  /** @domName SVGSVGElement.screenPixelToMillimeterX */
+  final num screenPixelToMillimeterX;
+
+  /** @domName SVGSVGElement.screenPixelToMillimeterY */
+  final num screenPixelToMillimeterY;
+
+  /** @domName SVGSVGElement.useCurrentView */
+  final bool useCurrentView;
+
+  /** @domName SVGSVGElement.viewport */
+  final SVGRect viewport;
+
+  /** @domName SVGSVGElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGSVGElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGSVGElement.y */
+  final SVGAnimatedLength y;
+
+  /** @domName SVGSVGElement.animationsPaused */
+  bool animationsPaused() native;
+
+  /** @domName SVGSVGElement.checkEnclosure */
+  bool checkEnclosure(SVGElement element, SVGRect rect) native;
+
+  /** @domName SVGSVGElement.checkIntersection */
+  bool checkIntersection(SVGElement element, SVGRect rect) native;
+
+  /** @domName SVGSVGElement.createSVGAngle */
+  SVGAngle createSVGAngle() native;
+
+  /** @domName SVGSVGElement.createSVGLength */
+  SVGLength createSVGLength() native;
+
+  /** @domName SVGSVGElement.createSVGMatrix */
+  SVGMatrix createSVGMatrix() native;
+
+  /** @domName SVGSVGElement.createSVGNumber */
+  SVGNumber createSVGNumber() native;
+
+  /** @domName SVGSVGElement.createSVGPoint */
+  SVGPoint createSVGPoint() native;
+
+  /** @domName SVGSVGElement.createSVGRect */
+  SVGRect createSVGRect() native;
+
+  /** @domName SVGSVGElement.createSVGTransform */
+  SVGTransform createSVGTransform() native;
+
+  /** @domName SVGSVGElement.createSVGTransformFromMatrix */
+  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native;
+
+  /** @domName SVGSVGElement.deselectAll */
+  void deselectAll() native;
+
+  /** @domName SVGSVGElement.forceRedraw */
+  void forceRedraw() native;
+
+  /** @domName SVGSVGElement.getCurrentTime */
+  num getCurrentTime() native;
+
+  /** @domName SVGSVGElement.getElementById */
+  Element getElementById(String elementId) native;
+
+  /** @domName SVGSVGElement.getEnclosureList */
+  List<Node> getEnclosureList(SVGRect rect, SVGElement referenceElement) native;
+
+  /** @domName SVGSVGElement.getIntersectionList */
+  List<Node> getIntersectionList(SVGRect rect, SVGElement referenceElement) native;
+
+  /** @domName SVGSVGElement.pauseAnimations */
+  void pauseAnimations() native;
+
+  /** @domName SVGSVGElement.setCurrentTime */
+  void setCurrentTime(num seconds) native;
+
+  /** @domName SVGSVGElement.suspendRedraw */
+  int suspendRedraw(int maxWaitMilliseconds) native;
+
+  /** @domName SVGSVGElement.unpauseAnimations */
+  void unpauseAnimations() native;
+
+  /** @domName SVGSVGElement.unsuspendRedraw */
+  void unsuspendRedraw(int suspendHandleId) native;
+
+  /** @domName SVGSVGElement.unsuspendRedrawAll */
+  void unsuspendRedrawAll() native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFitToViewBox
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGFitToViewBox.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGZoomAndPan
+
+  /** @domName SVGZoomAndPan.zoomAndPan */
+  int zoomAndPan;
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGScriptElement
+class SVGScriptElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired native "*SVGScriptElement" {
+
+  /** @domName SVGScriptElement.type */
+  String type;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGSetElement
+class SVGSetElement extends SVGAnimationElement native "*SVGSetElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGStopElement
+class SVGStopElement extends SVGElement implements SVGStylable native "*SVGStopElement" {
+
+  /** @domName SVGStopElement.offset */
+  final SVGAnimatedNumber offset;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGStringList
+class SVGStringList implements JavaScriptIndexingBehavior, List<String> native "*SVGStringList" {
+
+  /** @domName SVGStringList.numberOfItems */
+  final int numberOfItems;
+
+  String operator[](int index) => JS("String", "#[#]", this, index);
+
+  void operator[]=(int index, String value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<String> mixins.
+  // String is the element type.
+
+  // From Iterable<String>:
+
+  Iterator<String> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<String>(this);
+  }
+
+  // From Collection<String>:
+
+  void add(String value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(String value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<String> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(String element) => _Collections.contains(this, element);
+
+  void forEach(void f(String element)) => _Collections.forEach(this, f);
+
+  Collection map(f(String element)) => _Collections.map(this, [], f);
+
+  Collection<String> filter(bool f(String element)) =>
+     _Collections.filter(this, <String>[], f);
+
+  bool every(bool f(String element)) => _Collections.every(this, f);
+
+  bool some(bool f(String element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<String>:
+
+  void sort([Comparator<String> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(String element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(String element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  String get last => this[length - 1];
+
+  String removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [String initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<String> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <String>[]);
+
+  // -- end List<String> mixins.
+
+  /** @domName SVGStringList.appendItem */
+  String appendItem(String item) native;
+
+  /** @domName SVGStringList.clear */
+  void clear() native;
+
+  /** @domName SVGStringList.getItem */
+  String getItem(int index) native;
+
+  /** @domName SVGStringList.initialize */
+  String initialize(String item) native;
+
+  /** @domName SVGStringList.insertItemBefore */
+  String insertItemBefore(String item, int index) native;
+
+  /** @domName SVGStringList.removeItem */
+  String removeItem(int index) native;
+
+  /** @domName SVGStringList.replaceItem */
+  String replaceItem(String item, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGStylable
+abstract class SVGStylable {
+
+  SVGAnimatedString className;
+
+  CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name);
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGStyleElement
+class SVGStyleElement extends SVGElement implements SVGLangSpace native "*SVGStyleElement" {
+
+  /** @domName SVGStyleElement.disabled */
+  bool disabled;
+
+  /** @domName SVGStyleElement.media */
+  String media;
+
+  // Shadowing definition.
+  /** @domName SVGStyleElement.title */
+  String get title => JS("String", "#.title", this);
+
+  /** @domName SVGStyleElement.title */
+  void set title(String value) {
+    JS("void", "#.title = #", this, value);
+  }
+
+  /** @domName SVGStyleElement.type */
+  String type;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGSwitchElement
+class SVGSwitchElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired native "*SVGSwitchElement" {
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGSymbolElement
+class SVGSymbolElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable native "*SVGSymbolElement" {
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFitToViewBox
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGFitToViewBox.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTRefElement
+class SVGTRefElement extends SVGTextPositioningElement implements SVGURIReference native "*SVGTRefElement" {
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTSpanElement
+class SVGTSpanElement extends SVGTextPositioningElement native "*SVGTSpanElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTests
+abstract class SVGTests {
+
+  SVGStringList requiredExtensions;
+
+  SVGStringList requiredFeatures;
+
+  SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension);
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTextContentElement
+class SVGTextContentElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired native "*SVGTextContentElement" {
+
+  static const int LENGTHADJUST_SPACING = 1;
+
+  static const int LENGTHADJUST_SPACINGANDGLYPHS = 2;
+
+  static const int LENGTHADJUST_UNKNOWN = 0;
+
+  /** @domName SVGTextContentElement.lengthAdjust */
+  final SVGAnimatedEnumeration lengthAdjust;
+
+  /** @domName SVGTextContentElement.textLength */
+  final SVGAnimatedLength textLength;
+
+  /** @domName SVGTextContentElement.getCharNumAtPosition */
+  int getCharNumAtPosition(SVGPoint point) native;
+
+  /** @domName SVGTextContentElement.getComputedTextLength */
+  num getComputedTextLength() native;
+
+  /** @domName SVGTextContentElement.getEndPositionOfChar */
+  SVGPoint getEndPositionOfChar(int offset) native;
+
+  /** @domName SVGTextContentElement.getExtentOfChar */
+  SVGRect getExtentOfChar(int offset) native;
+
+  /** @domName SVGTextContentElement.getNumberOfChars */
+  int getNumberOfChars() native;
+
+  /** @domName SVGTextContentElement.getRotationOfChar */
+  num getRotationOfChar(int offset) native;
+
+  /** @domName SVGTextContentElement.getStartPositionOfChar */
+  SVGPoint getStartPositionOfChar(int offset) native;
+
+  /** @domName SVGTextContentElement.getSubStringLength */
+  num getSubStringLength(int offset, int length) native;
+
+  /** @domName SVGTextContentElement.selectSubString */
+  void selectSubString(int offset, int length) native;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTextElement
+class SVGTextElement extends SVGTextPositioningElement implements SVGTransformable native "*SVGTextElement" {
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTextPathElement
+class SVGTextPathElement extends SVGTextContentElement implements SVGURIReference native "*SVGTextPathElement" {
+
+  static const int TEXTPATH_METHODTYPE_ALIGN = 1;
+
+  static const int TEXTPATH_METHODTYPE_STRETCH = 2;
+
+  static const int TEXTPATH_METHODTYPE_UNKNOWN = 0;
+
+  static const int TEXTPATH_SPACINGTYPE_AUTO = 1;
+
+  static const int TEXTPATH_SPACINGTYPE_EXACT = 2;
+
+  static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+
+  /** @domName SVGTextPathElement.method */
+  final SVGAnimatedEnumeration method;
+
+  /** @domName SVGTextPathElement.spacing */
+  final SVGAnimatedEnumeration spacing;
+
+  /** @domName SVGTextPathElement.startOffset */
+  final SVGAnimatedLength startOffset;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTextPositioningElement
+class SVGTextPositioningElement extends SVGTextContentElement native "*SVGTextPositioningElement" {
+
+  /** @domName SVGTextPositioningElement.dx */
+  final SVGAnimatedLengthList dx;
+
+  /** @domName SVGTextPositioningElement.dy */
+  final SVGAnimatedLengthList dy;
+
+  /** @domName SVGTextPositioningElement.rotate */
+  final SVGAnimatedNumberList rotate;
+
+  /** @domName SVGTextPositioningElement.x */
+  final SVGAnimatedLengthList x;
+
+  /** @domName SVGTextPositioningElement.y */
+  final SVGAnimatedLengthList y;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTitleElement
+class SVGTitleElement extends SVGElement implements SVGLangSpace, SVGStylable native "*SVGTitleElement" {
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTransform
+class SVGTransform native "*SVGTransform" {
+
+  static const int SVG_TRANSFORM_MATRIX = 1;
+
+  static const int SVG_TRANSFORM_ROTATE = 4;
+
+  static const int SVG_TRANSFORM_SCALE = 3;
+
+  static const int SVG_TRANSFORM_SKEWX = 5;
+
+  static const int SVG_TRANSFORM_SKEWY = 6;
+
+  static const int SVG_TRANSFORM_TRANSLATE = 2;
+
+  static const int SVG_TRANSFORM_UNKNOWN = 0;
+
+  /** @domName SVGTransform.angle */
+  final num angle;
+
+  /** @domName SVGTransform.matrix */
+  final SVGMatrix matrix;
+
+  /** @domName SVGTransform.type */
+  final int type;
+
+  /** @domName SVGTransform.setMatrix */
+  void setMatrix(SVGMatrix matrix) native;
+
+  /** @domName SVGTransform.setRotate */
+  void setRotate(num angle, num cx, num cy) native;
+
+  /** @domName SVGTransform.setScale */
+  void setScale(num sx, num sy) native;
+
+  /** @domName SVGTransform.setSkewX */
+  void setSkewX(num angle) native;
+
+  /** @domName SVGTransform.setSkewY */
+  void setSkewY(num angle) native;
+
+  /** @domName SVGTransform.setTranslate */
+  void setTranslate(num tx, num ty) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTransformList
+class SVGTransformList implements JavaScriptIndexingBehavior, List<SVGTransform> native "*SVGTransformList" {
+
+  /** @domName SVGTransformList.numberOfItems */
+  final int numberOfItems;
+
+  SVGTransform operator[](int index) => JS("SVGTransform", "#[#]", this, index);
+
+  void operator[]=(int index, SVGTransform value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGTransform> mixins.
+  // SVGTransform is the element type.
+
+  // From Iterable<SVGTransform>:
+
+  Iterator<SVGTransform> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGTransform>(this);
+  }
+
+  // From Collection<SVGTransform>:
+
+  void add(SVGTransform value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGTransform value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGTransform> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGTransform element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGTransform element)) => _Collections.map(this, [], f);
+
+  Collection<SVGTransform> filter(bool f(SVGTransform element)) =>
+     _Collections.filter(this, <SVGTransform>[], f);
+
+  bool every(bool f(SVGTransform element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGTransform element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGTransform>:
+
+  void sort([Comparator<SVGTransform> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGTransform element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGTransform element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGTransform get last => this[length - 1];
+
+  SVGTransform removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGTransform initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGTransform> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGTransform>[]);
+
+  // -- end List<SVGTransform> mixins.
+
+  /** @domName SVGTransformList.appendItem */
+  SVGTransform appendItem(SVGTransform item) native;
+
+  /** @domName SVGTransformList.clear */
+  void clear() native;
+
+  /** @domName SVGTransformList.consolidate */
+  SVGTransform consolidate() native;
+
+  /** @domName SVGTransformList.createSVGTransformFromMatrix */
+  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native;
+
+  /** @domName SVGTransformList.getItem */
+  SVGTransform getItem(int index) native;
+
+  /** @domName SVGTransformList.initialize */
+  SVGTransform initialize(SVGTransform item) native;
+
+  /** @domName SVGTransformList.insertItemBefore */
+  SVGTransform insertItemBefore(SVGTransform item, int index) native;
+
+  /** @domName SVGTransformList.removeItem */
+  SVGTransform removeItem(int index) native;
+
+  /** @domName SVGTransformList.replaceItem */
+  SVGTransform replaceItem(SVGTransform item, int index) native;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGTransformable
+abstract class SVGTransformable implements SVGLocatable {
+
+  SVGAnimatedTransformList transform;
+
+  // From SVGLocatable
+
+  SVGElement farthestViewportElement;
+
+  SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox();
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM();
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM();
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element);
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGURIReference
+abstract class SVGURIReference {
+
+  SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGUnitTypes
+class SVGUnitTypes native "*SVGUnitTypes" {
+
+  static const int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+
+  static const int SVG_UNIT_TYPE_UNKNOWN = 0;
+
+  static const int SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGUseElement
+class SVGUseElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable native "*SVGUseElement" {
+
+  /** @domName SVGUseElement.animatedInstanceRoot */
+  final SVGElementInstance animatedInstanceRoot;
+
+  /** @domName SVGUseElement.height */
+  final SVGAnimatedLength height;
+
+  /** @domName SVGUseElement.instanceRoot */
+  final SVGElementInstance instanceRoot;
+
+  /** @domName SVGUseElement.width */
+  final SVGAnimatedLength width;
+
+  /** @domName SVGUseElement.x */
+  final SVGAnimatedLength x;
+
+  /** @domName SVGUseElement.y */
+  final SVGAnimatedLength y;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGLangSpace
+
+  /** @domName SVGLangSpace.xmllang */
+  String xmllang;
+
+  /** @domName SVGLangSpace.xmlspace */
+  String xmlspace;
+
+  // From SVGLocatable
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  final SVGElement farthestViewportElement;
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  final SVGElement nearestViewportElement;
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native;
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native;
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native;
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native;
+
+  // From SVGStylable
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName => JS("SVGAnimatedString", "#.className", this);
+
+  // Use implementation from Element.
+  // final CSSStyleDeclaration style;
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native;
+
+  // From SVGTests
+
+  /** @domName SVGTests.requiredExtensions */
+  final SVGStringList requiredExtensions;
+
+  /** @domName SVGTests.requiredFeatures */
+  final SVGStringList requiredFeatures;
+
+  /** @domName SVGTests.systemLanguage */
+  final SVGStringList systemLanguage;
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native;
+
+  // From SVGTransformable
+
+  /** @domName SVGTransformable.transform */
+  final SVGAnimatedTransformList transform;
+
+  // From SVGURIReference
+
+  /** @domName SVGURIReference.href */
+  final SVGAnimatedString href;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGVKernElement
+class SVGVKernElement extends SVGElement native "*SVGVKernElement" {
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGViewElement
+class SVGViewElement extends SVGElement implements SVGFitToViewBox, SVGZoomAndPan, SVGExternalResourcesRequired native "*SVGViewElement" {
+
+  /** @domName SVGViewElement.viewTarget */
+  final SVGStringList viewTarget;
+
+  // From SVGExternalResourcesRequired
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  final SVGAnimatedBoolean externalResourcesRequired;
+
+  // From SVGFitToViewBox
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGFitToViewBox.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  // From SVGZoomAndPan
+
+  /** @domName SVGZoomAndPan.zoomAndPan */
+  int zoomAndPan;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGViewSpec
+class SVGViewSpec native "*SVGViewSpec" {
+
+  /** @domName SVGViewSpec.preserveAspectRatio */
+  final SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+
+  /** @domName SVGViewSpec.preserveAspectRatioString */
+  final String preserveAspectRatioString;
+
+  /** @domName SVGViewSpec.transform */
+  final SVGTransformList transform;
+
+  /** @domName SVGViewSpec.transformString */
+  final String transformString;
+
+  /** @domName SVGViewSpec.viewBox */
+  final SVGAnimatedRect viewBox;
+
+  /** @domName SVGViewSpec.viewBoxString */
+  final String viewBoxString;
+
+  /** @domName SVGViewSpec.viewTarget */
+  final SVGElement viewTarget;
+
+  /** @domName SVGViewSpec.viewTargetString */
+  final String viewTargetString;
+
+  /** @domName SVGViewSpec.zoomAndPan */
+  int zoomAndPan;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGZoomAndPan
+abstract class SVGZoomAndPan {
+
+  static const int SVG_ZOOMANDPAN_DISABLE = 1;
+
+  static const int SVG_ZOOMANDPAN_MAGNIFY = 2;
+
+  static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
+
+  int zoomAndPan;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGZoomEvent
+class SVGZoomEvent extends UIEvent native "*SVGZoomEvent" {
+
+  /** @domName SVGZoomEvent.newScale */
+  final num newScale;
+
+  /** @domName SVGZoomEvent.newTranslate */
+  final SVGPoint newTranslate;
+
+  /** @domName SVGZoomEvent.previousScale */
+  final num previousScale;
+
+  /** @domName SVGZoomEvent.previousTranslate */
+  final SVGPoint previousTranslate;
+
+  /** @domName SVGZoomEvent.zoomRectScreen */
+  final SVGRect zoomRectScreen;
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/// @domName SVGElementInstanceList
+class _SVGElementInstanceList implements JavaScriptIndexingBehavior, List<SVGElementInstance> native "*SVGElementInstanceList" {
+
+  /** @domName SVGElementInstanceList.length */
+  final int length;
+
+  SVGElementInstance operator[](int index) => JS("SVGElementInstance", "#[#]", this, index);
+
+  void operator[]=(int index, SVGElementInstance value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGElementInstance> mixins.
+  // SVGElementInstance is the element type.
+
+  // From Iterable<SVGElementInstance>:
+
+  Iterator<SVGElementInstance> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGElementInstance>(this);
+  }
+
+  // From Collection<SVGElementInstance>:
+
+  void add(SVGElementInstance value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGElementInstance value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGElementInstance> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGElementInstance element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f);
+
+  Collection<SVGElementInstance> filter(bool f(SVGElementInstance element)) =>
+     _Collections.filter(this, <SVGElementInstance>[], f);
+
+  bool every(bool f(SVGElementInstance element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGElementInstance element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGElementInstance>:
+
+  void sort([Comparator<SVGElementInstance> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGElementInstance element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGElementInstance element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGElementInstance get last => this[length - 1];
+
+  SVGElementInstance removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGElementInstance initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGElementInstance> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
+
+  // -- end List<SVGElementInstance> mixins.
+
+  /** @domName SVGElementInstanceList.item */
+  SVGElementInstance item(int index) native;
+}
diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart
new file mode 100644
index 0000000..f372945
--- /dev/null
+++ b/sdk/lib/svg/dartium/svg_dartium.dart
@@ -0,0 +1,7968 @@
+library svg;
+
+import 'dart:html';
+import 'dart:nativewrappers';
+// DO NOT EDIT
+// Auto-generated dart:svg library.
+
+
+
+
+
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+final _START_TAG_REGEXP = new RegExp('<(\\w+)');
+
+class _SVGElementFactoryProvider {
+  static SVGElement createSVGElement_tag(String tag) {
+    final Element temp =
+      document.$dom_createElementNS("http://www.w3.org/2000/svg", tag);
+    return temp;
+  }
+
+  static SVGElement createSVGElement_svg(String svg) {
+    Element parentTag;
+    final match = _START_TAG_REGEXP.firstMatch(svg);
+    if (match != null && match.group(1).toLowerCase() == 'svg') {
+      parentTag = new Element.tag('div');
+    } else {
+      parentTag = new SVGSVGElement();
+    }
+
+    parentTag.innerHTML = svg;
+    if (parentTag.elements.length == 1) return parentTag.elements.removeLast();
+
+    throw new ArgumentError(
+        'SVG had ${parentTag.elements.length} '
+        'top-level elements but 1 expected');
+  }
+}
+
+class _SVGSVGElementFactoryProvider {
+  static SVGSVGElement createSVGSVGElement() {
+    final el = new SVGElement.tag("svg");
+    // The SVG spec requires the version attribute to match the spec version
+    el.attributes['version'] = "1.1";
+    return el;
+  }
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAElement
+class SVGAElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
+  SVGAElement.internal(): super.internal();
+
+
+  /** @domName SVGAElement.target */
+  SVGAnimatedString get target native "SVGAElement_target_Getter";
+
+
+  /** @domName SVGAElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGAElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGAElement.xmllang */
+  String get xmllang native "SVGAElement_xmllang_Getter";
+
+
+  /** @domName SVGAElement.xmllang */
+  void set xmllang(String value) native "SVGAElement_xmllang_Setter";
+
+
+  /** @domName SVGAElement.xmlspace */
+  String get xmlspace native "SVGAElement_xmlspace_Getter";
+
+
+  /** @domName SVGAElement.xmlspace */
+  void set xmlspace(String value) native "SVGAElement_xmlspace_Setter";
+
+
+  /** @domName SVGAElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGAElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGAElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGAElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGAElement.getBBox */
+  SVGRect getBBox() native "SVGAElement_getBBox_Callback";
+
+
+  /** @domName SVGAElement.getCTM */
+  SVGMatrix getCTM() native "SVGAElement_getCTM_Callback";
+
+
+  /** @domName SVGAElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGAElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGAElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGAElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGAElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGAElement_className_Getter";
+
+
+  /** @domName SVGAElement.style */
+  CSSStyleDeclaration get style native "SVGAElement_style_Getter";
+
+
+  /** @domName SVGAElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGAElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGAElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGAElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGAElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGAElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGAElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGAElement_systemLanguage_Getter";
+
+
+  /** @domName SVGAElement.hasExtension */
+  bool hasExtension(String extension) native "SVGAElement_hasExtension_Callback";
+
+
+  /** @domName SVGAElement.transform */
+  SVGAnimatedTransformList get transform native "SVGAElement_transform_Getter";
+
+
+  /** @domName SVGAElement.href */
+  SVGAnimatedString get href native "SVGAElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAltGlyphDefElement
+class SVGAltGlyphDefElement extends SVGElement {
+  SVGAltGlyphDefElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAltGlyphElement
+class SVGAltGlyphElement extends SVGTextPositioningElement implements SVGURIReference {
+  SVGAltGlyphElement.internal(): super.internal();
+
+
+  /** @domName SVGAltGlyphElement.format */
+  String get format native "SVGAltGlyphElement_format_Getter";
+
+
+  /** @domName SVGAltGlyphElement.format */
+  void set format(String value) native "SVGAltGlyphElement_format_Setter";
+
+
+  /** @domName SVGAltGlyphElement.glyphRef */
+  String get glyphRef native "SVGAltGlyphElement_glyphRef_Getter";
+
+
+  /** @domName SVGAltGlyphElement.glyphRef */
+  void set glyphRef(String value) native "SVGAltGlyphElement_glyphRef_Setter";
+
+
+  /** @domName SVGAltGlyphElement.href */
+  SVGAnimatedString get href native "SVGAltGlyphElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAltGlyphItemElement
+class SVGAltGlyphItemElement extends SVGElement {
+  SVGAltGlyphItemElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAngle
+class SVGAngle extends NativeFieldWrapperClass1 {
+  SVGAngle.internal();
+
+  static const int SVG_ANGLETYPE_DEG = 2;
+
+  static const int SVG_ANGLETYPE_GRAD = 4;
+
+  static const int SVG_ANGLETYPE_RAD = 3;
+
+  static const int SVG_ANGLETYPE_UNKNOWN = 0;
+
+  static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
+
+
+  /** @domName SVGAngle.unitType */
+  int get unitType native "SVGAngle_unitType_Getter";
+
+
+  /** @domName SVGAngle.value */
+  num get value native "SVGAngle_value_Getter";
+
+
+  /** @domName SVGAngle.value */
+  void set value(num value) native "SVGAngle_value_Setter";
+
+
+  /** @domName SVGAngle.valueAsString */
+  String get valueAsString native "SVGAngle_valueAsString_Getter";
+
+
+  /** @domName SVGAngle.valueAsString */
+  void set valueAsString(String value) native "SVGAngle_valueAsString_Setter";
+
+
+  /** @domName SVGAngle.valueInSpecifiedUnits */
+  num get valueInSpecifiedUnits native "SVGAngle_valueInSpecifiedUnits_Getter";
+
+
+  /** @domName SVGAngle.valueInSpecifiedUnits */
+  void set valueInSpecifiedUnits(num value) native "SVGAngle_valueInSpecifiedUnits_Setter";
+
+
+  /** @domName SVGAngle.convertToSpecifiedUnits */
+  void convertToSpecifiedUnits(int unitType) native "SVGAngle_convertToSpecifiedUnits_Callback";
+
+
+  /** @domName SVGAngle.newValueSpecifiedUnits */
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGAngle_newValueSpecifiedUnits_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimateColorElement
+class SVGAnimateColorElement extends SVGAnimationElement {
+  SVGAnimateColorElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimateElement
+class SVGAnimateElement extends SVGAnimationElement {
+  SVGAnimateElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimateMotionElement
+class SVGAnimateMotionElement extends SVGAnimationElement {
+  SVGAnimateMotionElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimateTransformElement
+class SVGAnimateTransformElement extends SVGAnimationElement {
+  SVGAnimateTransformElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedAngle
+class SVGAnimatedAngle extends NativeFieldWrapperClass1 {
+  SVGAnimatedAngle.internal();
+
+
+  /** @domName SVGAnimatedAngle.animVal */
+  SVGAngle get animVal native "SVGAnimatedAngle_animVal_Getter";
+
+
+  /** @domName SVGAnimatedAngle.baseVal */
+  SVGAngle get baseVal native "SVGAnimatedAngle_baseVal_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedBoolean
+class SVGAnimatedBoolean extends NativeFieldWrapperClass1 {
+  SVGAnimatedBoolean.internal();
+
+
+  /** @domName SVGAnimatedBoolean.animVal */
+  bool get animVal native "SVGAnimatedBoolean_animVal_Getter";
+
+
+  /** @domName SVGAnimatedBoolean.baseVal */
+  bool get baseVal native "SVGAnimatedBoolean_baseVal_Getter";
+
+
+  /** @domName SVGAnimatedBoolean.baseVal */
+  void set baseVal(bool value) native "SVGAnimatedBoolean_baseVal_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedEnumeration
+class SVGAnimatedEnumeration extends NativeFieldWrapperClass1 {
+  SVGAnimatedEnumeration.internal();
+
+
+  /** @domName SVGAnimatedEnumeration.animVal */
+  int get animVal native "SVGAnimatedEnumeration_animVal_Getter";
+
+
+  /** @domName SVGAnimatedEnumeration.baseVal */
+  int get baseVal native "SVGAnimatedEnumeration_baseVal_Getter";
+
+
+  /** @domName SVGAnimatedEnumeration.baseVal */
+  void set baseVal(int value) native "SVGAnimatedEnumeration_baseVal_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedInteger
+class SVGAnimatedInteger extends NativeFieldWrapperClass1 {
+  SVGAnimatedInteger.internal();
+
+
+  /** @domName SVGAnimatedInteger.animVal */
+  int get animVal native "SVGAnimatedInteger_animVal_Getter";
+
+
+  /** @domName SVGAnimatedInteger.baseVal */
+  int get baseVal native "SVGAnimatedInteger_baseVal_Getter";
+
+
+  /** @domName SVGAnimatedInteger.baseVal */
+  void set baseVal(int value) native "SVGAnimatedInteger_baseVal_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedLength
+class SVGAnimatedLength extends NativeFieldWrapperClass1 {
+  SVGAnimatedLength.internal();
+
+
+  /** @domName SVGAnimatedLength.animVal */
+  SVGLength get animVal native "SVGAnimatedLength_animVal_Getter";
+
+
+  /** @domName SVGAnimatedLength.baseVal */
+  SVGLength get baseVal native "SVGAnimatedLength_baseVal_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedLengthList
+class SVGAnimatedLengthList extends NativeFieldWrapperClass1 implements List<SVGAnimatedLength> {
+  SVGAnimatedLengthList.internal();
+
+
+  /** @domName SVGAnimatedLengthList.animVal */
+  SVGLengthList get animVal native "SVGAnimatedLengthList_animVal_Getter";
+
+
+  /** @domName SVGAnimatedLengthList.baseVal */
+  SVGLengthList get baseVal native "SVGAnimatedLengthList_baseVal_Getter";
+
+  SVGAnimatedLength operator[](int index) native "SVGAnimatedLengthList_item_Callback";
+
+  void operator[]=(int index, SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimatedLength> mixins.
+  // SVGAnimatedLength is the element type.
+
+  // From Iterable<SVGAnimatedLength>:
+
+  Iterator<SVGAnimatedLength> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimatedLength>(this);
+  }
+
+  // From Collection<SVGAnimatedLength>:
+
+  void add(SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimatedLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimatedLength> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimatedLength element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimatedLength> filter(bool f(SVGAnimatedLength element)) =>
+     _Collections.filter(this, <SVGAnimatedLength>[], f);
+
+  bool every(bool f(SVGAnimatedLength element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimatedLength element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimatedLength>:
+
+  void sort([Comparator<SVGAnimatedLength> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimatedLength element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimatedLength element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimatedLength get last => this[length - 1];
+
+  SVGAnimatedLength removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimatedLength initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimatedLength> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimatedLength>[]);
+
+  // -- end List<SVGAnimatedLength> mixins.
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedNumber
+class SVGAnimatedNumber extends NativeFieldWrapperClass1 {
+  SVGAnimatedNumber.internal();
+
+
+  /** @domName SVGAnimatedNumber.animVal */
+  num get animVal native "SVGAnimatedNumber_animVal_Getter";
+
+
+  /** @domName SVGAnimatedNumber.baseVal */
+  num get baseVal native "SVGAnimatedNumber_baseVal_Getter";
+
+
+  /** @domName SVGAnimatedNumber.baseVal */
+  void set baseVal(num value) native "SVGAnimatedNumber_baseVal_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedNumberList
+class SVGAnimatedNumberList extends NativeFieldWrapperClass1 implements List<SVGAnimatedNumber> {
+  SVGAnimatedNumberList.internal();
+
+
+  /** @domName SVGAnimatedNumberList.animVal */
+  SVGNumberList get animVal native "SVGAnimatedNumberList_animVal_Getter";
+
+
+  /** @domName SVGAnimatedNumberList.baseVal */
+  SVGNumberList get baseVal native "SVGAnimatedNumberList_baseVal_Getter";
+
+  SVGAnimatedNumber operator[](int index) native "SVGAnimatedNumberList_item_Callback";
+
+  void operator[]=(int index, SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimatedNumber> mixins.
+  // SVGAnimatedNumber is the element type.
+
+  // From Iterable<SVGAnimatedNumber>:
+
+  Iterator<SVGAnimatedNumber> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimatedNumber>(this);
+  }
+
+  // From Collection<SVGAnimatedNumber>:
+
+  void add(SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimatedNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimatedNumber> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimatedNumber element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimatedNumber> filter(bool f(SVGAnimatedNumber element)) =>
+     _Collections.filter(this, <SVGAnimatedNumber>[], f);
+
+  bool every(bool f(SVGAnimatedNumber element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimatedNumber element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimatedNumber>:
+
+  void sort([Comparator<SVGAnimatedNumber> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimatedNumber element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimatedNumber element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimatedNumber get last => this[length - 1];
+
+  SVGAnimatedNumber removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimatedNumber initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimatedNumber> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimatedNumber>[]);
+
+  // -- end List<SVGAnimatedNumber> mixins.
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedPreserveAspectRatio
+class SVGAnimatedPreserveAspectRatio extends NativeFieldWrapperClass1 {
+  SVGAnimatedPreserveAspectRatio.internal();
+
+
+  /** @domName SVGAnimatedPreserveAspectRatio.animVal */
+  SVGPreserveAspectRatio get animVal native "SVGAnimatedPreserveAspectRatio_animVal_Getter";
+
+
+  /** @domName SVGAnimatedPreserveAspectRatio.baseVal */
+  SVGPreserveAspectRatio get baseVal native "SVGAnimatedPreserveAspectRatio_baseVal_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedRect
+class SVGAnimatedRect extends NativeFieldWrapperClass1 {
+  SVGAnimatedRect.internal();
+
+
+  /** @domName SVGAnimatedRect.animVal */
+  SVGRect get animVal native "SVGAnimatedRect_animVal_Getter";
+
+
+  /** @domName SVGAnimatedRect.baseVal */
+  SVGRect get baseVal native "SVGAnimatedRect_baseVal_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedString
+class SVGAnimatedString extends NativeFieldWrapperClass1 {
+  SVGAnimatedString.internal();
+
+
+  /** @domName SVGAnimatedString.animVal */
+  String get animVal native "SVGAnimatedString_animVal_Getter";
+
+
+  /** @domName SVGAnimatedString.baseVal */
+  String get baseVal native "SVGAnimatedString_baseVal_Getter";
+
+
+  /** @domName SVGAnimatedString.baseVal */
+  void set baseVal(String value) native "SVGAnimatedString_baseVal_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimatedTransformList
+class SVGAnimatedTransformList extends NativeFieldWrapperClass1 implements List<SVGAnimateTransformElement> {
+  SVGAnimatedTransformList.internal();
+
+
+  /** @domName SVGAnimatedTransformList.animVal */
+  SVGTransformList get animVal native "SVGAnimatedTransformList_animVal_Getter";
+
+
+  /** @domName SVGAnimatedTransformList.baseVal */
+  SVGTransformList get baseVal native "SVGAnimatedTransformList_baseVal_Getter";
+
+  SVGAnimateTransformElement operator[](int index) native "SVGAnimatedTransformList_item_Callback";
+
+  void operator[]=(int index, SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGAnimateTransformElement> mixins.
+  // SVGAnimateTransformElement is the element type.
+
+  // From Iterable<SVGAnimateTransformElement>:
+
+  Iterator<SVGAnimateTransformElement> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGAnimateTransformElement>(this);
+  }
+
+  // From Collection<SVGAnimateTransformElement>:
+
+  void add(SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGAnimateTransformElement value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGAnimateTransformElement> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGAnimateTransformElement element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f);
+
+  Collection<SVGAnimateTransformElement> filter(bool f(SVGAnimateTransformElement element)) =>
+     _Collections.filter(this, <SVGAnimateTransformElement>[], f);
+
+  bool every(bool f(SVGAnimateTransformElement element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGAnimateTransformElement element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGAnimateTransformElement>:
+
+  void sort([Comparator<SVGAnimateTransformElement> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGAnimateTransformElement element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGAnimateTransformElement element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGAnimateTransformElement get last => this[length - 1];
+
+  SVGAnimateTransformElement removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGAnimateTransformElement initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGAnimateTransformElement> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGAnimateTransformElement>[]);
+
+  // -- end List<SVGAnimateTransformElement> mixins.
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGAnimationElement
+class SVGAnimationElement extends SVGElement implements ElementTimeControl, SVGTests, SVGExternalResourcesRequired {
+  SVGAnimationElement.internal(): super.internal();
+
+
+  /** @domName SVGAnimationElement.targetElement */
+  SVGElement get targetElement native "SVGAnimationElement_targetElement_Getter";
+
+
+  /** @domName SVGAnimationElement.getCurrentTime */
+  num getCurrentTime() native "SVGAnimationElement_getCurrentTime_Callback";
+
+
+  /** @domName SVGAnimationElement.getSimpleDuration */
+  num getSimpleDuration() native "SVGAnimationElement_getSimpleDuration_Callback";
+
+
+  /** @domName SVGAnimationElement.getStartTime */
+  num getStartTime() native "SVGAnimationElement_getStartTime_Callback";
+
+
+  /** @domName SVGAnimationElement.beginElement */
+  void beginElement() native "SVGAnimationElement_beginElement_Callback";
+
+
+  /** @domName SVGAnimationElement.beginElementAt */
+  void beginElementAt(num offset) native "SVGAnimationElement_beginElementAt_Callback";
+
+
+  /** @domName SVGAnimationElement.endElement */
+  void endElement() native "SVGAnimationElement_endElement_Callback";
+
+
+  /** @domName SVGAnimationElement.endElementAt */
+  void endElementAt(num offset) native "SVGAnimationElement_endElementAt_Callback";
+
+
+  /** @domName SVGAnimationElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGAnimationElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGAnimationElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGAnimationElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGAnimationElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGAnimationElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGAnimationElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGAnimationElement_systemLanguage_Getter";
+
+
+  /** @domName SVGAnimationElement.hasExtension */
+  bool hasExtension(String extension) native "SVGAnimationElement_hasExtension_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGCircleElement
+class SVGCircleElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGCircleElement.internal(): super.internal();
+
+
+  /** @domName SVGCircleElement.cx */
+  SVGAnimatedLength get cx native "SVGCircleElement_cx_Getter";
+
+
+  /** @domName SVGCircleElement.cy */
+  SVGAnimatedLength get cy native "SVGCircleElement_cy_Getter";
+
+
+  /** @domName SVGCircleElement.r */
+  SVGAnimatedLength get r native "SVGCircleElement_r_Getter";
+
+
+  /** @domName SVGCircleElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGCircleElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGCircleElement.xmllang */
+  String get xmllang native "SVGCircleElement_xmllang_Getter";
+
+
+  /** @domName SVGCircleElement.xmllang */
+  void set xmllang(String value) native "SVGCircleElement_xmllang_Setter";
+
+
+  /** @domName SVGCircleElement.xmlspace */
+  String get xmlspace native "SVGCircleElement_xmlspace_Getter";
+
+
+  /** @domName SVGCircleElement.xmlspace */
+  void set xmlspace(String value) native "SVGCircleElement_xmlspace_Setter";
+
+
+  /** @domName SVGCircleElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGCircleElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGCircleElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGCircleElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGCircleElement.getBBox */
+  SVGRect getBBox() native "SVGCircleElement_getBBox_Callback";
+
+
+  /** @domName SVGCircleElement.getCTM */
+  SVGMatrix getCTM() native "SVGCircleElement_getCTM_Callback";
+
+
+  /** @domName SVGCircleElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGCircleElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGCircleElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGCircleElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGCircleElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGCircleElement_className_Getter";
+
+
+  /** @domName SVGCircleElement.style */
+  CSSStyleDeclaration get style native "SVGCircleElement_style_Getter";
+
+
+  /** @domName SVGCircleElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGCircleElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGCircleElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGCircleElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGCircleElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGCircleElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGCircleElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGCircleElement_systemLanguage_Getter";
+
+
+  /** @domName SVGCircleElement.hasExtension */
+  bool hasExtension(String extension) native "SVGCircleElement_hasExtension_Callback";
+
+
+  /** @domName SVGCircleElement.transform */
+  SVGAnimatedTransformList get transform native "SVGCircleElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGClipPathElement
+class SVGClipPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGClipPathElement.internal(): super.internal();
+
+
+  /** @domName SVGClipPathElement.clipPathUnits */
+  SVGAnimatedEnumeration get clipPathUnits native "SVGClipPathElement_clipPathUnits_Getter";
+
+
+  /** @domName SVGClipPathElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGClipPathElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGClipPathElement.xmllang */
+  String get xmllang native "SVGClipPathElement_xmllang_Getter";
+
+
+  /** @domName SVGClipPathElement.xmllang */
+  void set xmllang(String value) native "SVGClipPathElement_xmllang_Setter";
+
+
+  /** @domName SVGClipPathElement.xmlspace */
+  String get xmlspace native "SVGClipPathElement_xmlspace_Getter";
+
+
+  /** @domName SVGClipPathElement.xmlspace */
+  void set xmlspace(String value) native "SVGClipPathElement_xmlspace_Setter";
+
+
+  /** @domName SVGClipPathElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGClipPathElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGClipPathElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGClipPathElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGClipPathElement.getBBox */
+  SVGRect getBBox() native "SVGClipPathElement_getBBox_Callback";
+
+
+  /** @domName SVGClipPathElement.getCTM */
+  SVGMatrix getCTM() native "SVGClipPathElement_getCTM_Callback";
+
+
+  /** @domName SVGClipPathElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGClipPathElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGClipPathElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGClipPathElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGClipPathElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGClipPathElement_className_Getter";
+
+
+  /** @domName SVGClipPathElement.style */
+  CSSStyleDeclaration get style native "SVGClipPathElement_style_Getter";
+
+
+  /** @domName SVGClipPathElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGClipPathElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGClipPathElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGClipPathElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGClipPathElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGClipPathElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGClipPathElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGClipPathElement_systemLanguage_Getter";
+
+
+  /** @domName SVGClipPathElement.hasExtension */
+  bool hasExtension(String extension) native "SVGClipPathElement_hasExtension_Callback";
+
+
+  /** @domName SVGClipPathElement.transform */
+  SVGAnimatedTransformList get transform native "SVGClipPathElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGColor
+class SVGColor extends CSSValue {
+  SVGColor.internal(): super.internal();
+
+  static const int SVG_COLORTYPE_CURRENTCOLOR = 3;
+
+  static const int SVG_COLORTYPE_RGBCOLOR = 1;
+
+  static const int SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
+
+  static const int SVG_COLORTYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGColor.colorType */
+  int get colorType native "SVGColor_colorType_Getter";
+
+
+  /** @domName SVGColor.rgbColor */
+  RGBColor get rgbColor native "SVGColor_rgbColor_Getter";
+
+
+  /** @domName SVGColor.setColor */
+  void setColor(int colorType, String rgbColor, String iccColor) native "SVGColor_setColor_Callback";
+
+
+  /** @domName SVGColor.setRGBColor */
+  void setRGBColor(String rgbColor) native "SVGColor_setRGBColor_Callback";
+
+
+  /** @domName SVGColor.setRGBColorICCColor */
+  void setRGBColorICCColor(String rgbColor, String iccColor) native "SVGColor_setRGBColorICCColor_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGComponentTransferFunctionElement
+class SVGComponentTransferFunctionElement extends SVGElement {
+  SVGComponentTransferFunctionElement.internal(): super.internal();
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+
+  static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGComponentTransferFunctionElement.amplitude */
+  SVGAnimatedNumber get amplitude native "SVGComponentTransferFunctionElement_amplitude_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.exponent */
+  SVGAnimatedNumber get exponent native "SVGComponentTransferFunctionElement_exponent_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.intercept */
+  SVGAnimatedNumber get intercept native "SVGComponentTransferFunctionElement_intercept_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.offset */
+  SVGAnimatedNumber get offset native "SVGComponentTransferFunctionElement_offset_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.slope */
+  SVGAnimatedNumber get slope native "SVGComponentTransferFunctionElement_slope_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.tableValues */
+  SVGAnimatedNumberList get tableValues native "SVGComponentTransferFunctionElement_tableValues_Getter";
+
+
+  /** @domName SVGComponentTransferFunctionElement.type */
+  SVGAnimatedEnumeration get type native "SVGComponentTransferFunctionElement_type_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGCursorElement
+class SVGCursorElement extends SVGElement implements SVGURIReference, SVGTests, SVGExternalResourcesRequired {
+  SVGCursorElement.internal(): super.internal();
+
+
+  /** @domName SVGCursorElement.x */
+  SVGAnimatedLength get x native "SVGCursorElement_x_Getter";
+
+
+  /** @domName SVGCursorElement.y */
+  SVGAnimatedLength get y native "SVGCursorElement_y_Getter";
+
+
+  /** @domName SVGCursorElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGCursorElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGCursorElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGCursorElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGCursorElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGCursorElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGCursorElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGCursorElement_systemLanguage_Getter";
+
+
+  /** @domName SVGCursorElement.hasExtension */
+  bool hasExtension(String extension) native "SVGCursorElement_hasExtension_Callback";
+
+
+  /** @domName SVGCursorElement.href */
+  SVGAnimatedString get href native "SVGCursorElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGDefsElement
+class SVGDefsElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGDefsElement.internal(): super.internal();
+
+
+  /** @domName SVGDefsElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGDefsElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGDefsElement.xmllang */
+  String get xmllang native "SVGDefsElement_xmllang_Getter";
+
+
+  /** @domName SVGDefsElement.xmllang */
+  void set xmllang(String value) native "SVGDefsElement_xmllang_Setter";
+
+
+  /** @domName SVGDefsElement.xmlspace */
+  String get xmlspace native "SVGDefsElement_xmlspace_Getter";
+
+
+  /** @domName SVGDefsElement.xmlspace */
+  void set xmlspace(String value) native "SVGDefsElement_xmlspace_Setter";
+
+
+  /** @domName SVGDefsElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGDefsElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGDefsElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGDefsElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGDefsElement.getBBox */
+  SVGRect getBBox() native "SVGDefsElement_getBBox_Callback";
+
+
+  /** @domName SVGDefsElement.getCTM */
+  SVGMatrix getCTM() native "SVGDefsElement_getCTM_Callback";
+
+
+  /** @domName SVGDefsElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGDefsElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGDefsElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGDefsElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGDefsElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGDefsElement_className_Getter";
+
+
+  /** @domName SVGDefsElement.style */
+  CSSStyleDeclaration get style native "SVGDefsElement_style_Getter";
+
+
+  /** @domName SVGDefsElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGDefsElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGDefsElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGDefsElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGDefsElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGDefsElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGDefsElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGDefsElement_systemLanguage_Getter";
+
+
+  /** @domName SVGDefsElement.hasExtension */
+  bool hasExtension(String extension) native "SVGDefsElement_hasExtension_Callback";
+
+
+  /** @domName SVGDefsElement.transform */
+  SVGAnimatedTransformList get transform native "SVGDefsElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGDescElement
+class SVGDescElement extends SVGElement implements SVGLangSpace, SVGStylable {
+  SVGDescElement.internal(): super.internal();
+
+
+  /** @domName SVGDescElement.xmllang */
+  String get xmllang native "SVGDescElement_xmllang_Getter";
+
+
+  /** @domName SVGDescElement.xmllang */
+  void set xmllang(String value) native "SVGDescElement_xmllang_Setter";
+
+
+  /** @domName SVGDescElement.xmlspace */
+  String get xmlspace native "SVGDescElement_xmlspace_Getter";
+
+
+  /** @domName SVGDescElement.xmlspace */
+  void set xmlspace(String value) native "SVGDescElement_xmlspace_Setter";
+
+
+  /** @domName SVGDescElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGDescElement_className_Getter";
+
+
+  /** @domName SVGDescElement.style */
+  CSSStyleDeclaration get style native "SVGDescElement_style_Getter";
+
+
+  /** @domName SVGDescElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGDescElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGDocument
+class SVGDocument extends Document {
+  SVGDocument.internal(): super.internal();
+
+
+  /** @domName SVGDocument.rootElement */
+  SVGSVGElement get rootElement native "SVGDocument_rootElement_Getter";
+
+
+  /** @domName SVGDocument.createEvent */
+  Event $dom_createEvent(String eventType) native "SVGDocument_createEvent_Callback";
+
+}
+// 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.
+
+
+class _AttributeClassSet extends CssClassSet {
+  final Element _element;
+
+  _AttributeClassSet(this._element);
+
+  Set<String> readClasses() {
+    var classname = _element.attributes['class'];
+
+    Set<String> s = new Set<String>();
+    if (classname == null) {
+      return s;
+    }
+    for (String name in classname.split(' ')) {
+      String trimmed = name.trim();
+      if (!trimmed.isEmpty) {
+        s.add(trimmed);
+      }
+    }
+    return s;
+  }
+
+  void writeClasses(Set s) {
+    List list = new List.from(s);
+    _element.attributes['class'] = Strings.join(list, ' ');
+  }
+}
+
+class SVGElement extends Element {
+  factory SVGElement.tag(String tag) =>
+      _SVGElementFactoryProvider.createSVGElement_tag(tag);
+  factory SVGElement.svg(String svg) =>
+      _SVGElementFactoryProvider.createSVGElement_svg(svg);
+
+  _AttributeClassSet _cssClassSet;
+  CssClassSet get classes {
+    if (_cssClassSet == null) {
+      _cssClassSet = new _AttributeClassSet(this);
+    }
+    return _cssClassSet;
+  }
+
+  List<Element> get elements => new FilteredElementList(this);
+
+  void set elements(Collection<Element> value) {
+    final elements = this.elements;
+    elements.clear();
+    elements.addAll(value);
+  }
+
+  String get outerHTML {
+    final container = new Element.tag("div");
+    final SVGElement cloned = this.clone(true);
+    container.elements.add(cloned);
+    return container.innerHTML;
+  }
+
+  String get innerHTML {
+    final container = new Element.tag("div");
+    final SVGElement cloned = this.clone(true);
+    container.elements.addAll(cloned.elements);
+    return container.innerHTML;
+  }
+
+  void set innerHTML(String svg) {
+    final container = new Element.tag("div");
+    // Wrap the SVG string in <svg> so that SVGElements are created, rather than
+    // HTMLElements.
+    container.innerHTML = '<svg version="1.1">$svg</svg>';
+    this.elements = container.elements[0].elements;
+  }
+
+  SVGElement.internal(): super.internal();
+
+
+  /** @domName SVGElement.id */
+  String get id native "SVGElement_id_Getter";
+
+
+  /** @domName SVGElement.id */
+  void set id(String value) native "SVGElement_id_Setter";
+
+
+  /** @domName SVGElement.ownerSVGElement */
+  SVGSVGElement get ownerSVGElement native "SVGElement_ownerSVGElement_Getter";
+
+
+  /** @domName SVGElement.viewportElement */
+  SVGElement get viewportElement native "SVGElement_viewportElement_Getter";
+
+
+  /** @domName SVGElement.xmlbase */
+  String get xmlbase native "SVGElement_xmlbase_Getter";
+
+
+  /** @domName SVGElement.xmlbase */
+  void set xmlbase(String value) native "SVGElement_xmlbase_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGElementInstance
+class SVGElementInstance extends EventTarget {
+  SVGElementInstance.internal(): super.internal();
+
+  /**
+   * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
+   */
+  SVGElementInstanceEvents get on =>
+    new SVGElementInstanceEvents(this);
+
+
+  /** @domName SVGElementInstance.childNodes */
+  List<SVGElementInstance> get childNodes native "SVGElementInstance_childNodes_Getter";
+
+
+  /** @domName SVGElementInstance.correspondingElement */
+  SVGElement get correspondingElement native "SVGElementInstance_correspondingElement_Getter";
+
+
+  /** @domName SVGElementInstance.correspondingUseElement */
+  SVGUseElement get correspondingUseElement native "SVGElementInstance_correspondingUseElement_Getter";
+
+
+  /** @domName SVGElementInstance.firstChild */
+  SVGElementInstance get firstChild native "SVGElementInstance_firstChild_Getter";
+
+
+  /** @domName SVGElementInstance.lastChild */
+  SVGElementInstance get lastChild native "SVGElementInstance_lastChild_Getter";
+
+
+  /** @domName SVGElementInstance.nextSibling */
+  SVGElementInstance get nextSibling native "SVGElementInstance_nextSibling_Getter";
+
+
+  /** @domName SVGElementInstance.parentNode */
+  SVGElementInstance get parentNode native "SVGElementInstance_parentNode_Getter";
+
+
+  /** @domName SVGElementInstance.previousSibling */
+  SVGElementInstance get previousSibling native "SVGElementInstance_previousSibling_Getter";
+
+}
+
+class SVGElementInstanceEvents extends Events {
+  SVGElementInstanceEvents(EventTarget _ptr) : super(_ptr);
+
+  EventListenerList get abort => this['abort'];
+
+  EventListenerList get beforeCopy => this['beforecopy'];
+
+  EventListenerList get beforeCut => this['beforecut'];
+
+  EventListenerList get beforePaste => this['beforepaste'];
+
+  EventListenerList get blur => this['blur'];
+
+  EventListenerList get change => this['change'];
+
+  EventListenerList get click => this['click'];
+
+  EventListenerList get contextMenu => this['contextmenu'];
+
+  EventListenerList get copy => this['copy'];
+
+  EventListenerList get cut => this['cut'];
+
+  EventListenerList get doubleClick => this['dblclick'];
+
+  EventListenerList get drag => this['drag'];
+
+  EventListenerList get dragEnd => this['dragend'];
+
+  EventListenerList get dragEnter => this['dragenter'];
+
+  EventListenerList get dragLeave => this['dragleave'];
+
+  EventListenerList get dragOver => this['dragover'];
+
+  EventListenerList get dragStart => this['dragstart'];
+
+  EventListenerList get drop => this['drop'];
+
+  EventListenerList get error => this['error'];
+
+  EventListenerList get focus => this['focus'];
+
+  EventListenerList get input => this['input'];
+
+  EventListenerList get keyDown => this['keydown'];
+
+  EventListenerList get keyPress => this['keypress'];
+
+  EventListenerList get keyUp => this['keyup'];
+
+  EventListenerList get load => this['load'];
+
+  EventListenerList get mouseDown => this['mousedown'];
+
+  EventListenerList get mouseMove => this['mousemove'];
+
+  EventListenerList get mouseOut => this['mouseout'];
+
+  EventListenerList get mouseOver => this['mouseover'];
+
+  EventListenerList get mouseUp => this['mouseup'];
+
+  EventListenerList get mouseWheel => this['mousewheel'];
+
+  EventListenerList get paste => this['paste'];
+
+  EventListenerList get reset => this['reset'];
+
+  EventListenerList get resize => this['resize'];
+
+  EventListenerList get scroll => this['scroll'];
+
+  EventListenerList get search => this['search'];
+
+  EventListenerList get select => this['select'];
+
+  EventListenerList get selectStart => this['selectstart'];
+
+  EventListenerList get submit => this['submit'];
+
+  EventListenerList get unload => this['unload'];
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGEllipseElement
+class SVGEllipseElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGEllipseElement.internal(): super.internal();
+
+
+  /** @domName SVGEllipseElement.cx */
+  SVGAnimatedLength get cx native "SVGEllipseElement_cx_Getter";
+
+
+  /** @domName SVGEllipseElement.cy */
+  SVGAnimatedLength get cy native "SVGEllipseElement_cy_Getter";
+
+
+  /** @domName SVGEllipseElement.rx */
+  SVGAnimatedLength get rx native "SVGEllipseElement_rx_Getter";
+
+
+  /** @domName SVGEllipseElement.ry */
+  SVGAnimatedLength get ry native "SVGEllipseElement_ry_Getter";
+
+
+  /** @domName SVGEllipseElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGEllipseElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGEllipseElement.xmllang */
+  String get xmllang native "SVGEllipseElement_xmllang_Getter";
+
+
+  /** @domName SVGEllipseElement.xmllang */
+  void set xmllang(String value) native "SVGEllipseElement_xmllang_Setter";
+
+
+  /** @domName SVGEllipseElement.xmlspace */
+  String get xmlspace native "SVGEllipseElement_xmlspace_Getter";
+
+
+  /** @domName SVGEllipseElement.xmlspace */
+  void set xmlspace(String value) native "SVGEllipseElement_xmlspace_Setter";
+
+
+  /** @domName SVGEllipseElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGEllipseElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGEllipseElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGEllipseElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGEllipseElement.getBBox */
+  SVGRect getBBox() native "SVGEllipseElement_getBBox_Callback";
+
+
+  /** @domName SVGEllipseElement.getCTM */
+  SVGMatrix getCTM() native "SVGEllipseElement_getCTM_Callback";
+
+
+  /** @domName SVGEllipseElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGEllipseElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGEllipseElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGEllipseElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGEllipseElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGEllipseElement_className_Getter";
+
+
+  /** @domName SVGEllipseElement.style */
+  CSSStyleDeclaration get style native "SVGEllipseElement_style_Getter";
+
+
+  /** @domName SVGEllipseElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGEllipseElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGEllipseElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGEllipseElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGEllipseElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGEllipseElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGEllipseElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGEllipseElement_systemLanguage_Getter";
+
+
+  /** @domName SVGEllipseElement.hasExtension */
+  bool hasExtension(String extension) native "SVGEllipseElement_hasExtension_Callback";
+
+
+  /** @domName SVGEllipseElement.transform */
+  SVGAnimatedTransformList get transform native "SVGEllipseElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGException
+class SVGException extends NativeFieldWrapperClass1 {
+  SVGException.internal();
+
+  static const int SVG_INVALID_VALUE_ERR = 1;
+
+  static const int SVG_MATRIX_NOT_INVERTABLE = 2;
+
+  static const int SVG_WRONG_TYPE_ERR = 0;
+
+
+  /** @domName SVGException.code */
+  int get code native "SVGException_code_Getter";
+
+
+  /** @domName SVGException.message */
+  String get message native "SVGException_message_Getter";
+
+
+  /** @domName SVGException.name */
+  String get name native "SVGException_name_Getter";
+
+
+  /** @domName SVGException.toString */
+  String toString() native "SVGException_toString_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGExternalResourcesRequired
+class SVGExternalResourcesRequired extends NativeFieldWrapperClass1 {
+  SVGExternalResourcesRequired.internal();
+
+
+  /** @domName SVGExternalResourcesRequired.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGExternalResourcesRequired_externalResourcesRequired_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEBlendElement
+class SVGFEBlendElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEBlendElement.internal(): super.internal();
+
+  static const int SVG_FEBLEND_MODE_DARKEN = 4;
+
+  static const int SVG_FEBLEND_MODE_LIGHTEN = 5;
+
+  static const int SVG_FEBLEND_MODE_MULTIPLY = 2;
+
+  static const int SVG_FEBLEND_MODE_NORMAL = 1;
+
+  static const int SVG_FEBLEND_MODE_SCREEN = 3;
+
+  static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
+
+
+  /** @domName SVGFEBlendElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEBlendElement_in1_Getter";
+
+
+  /** @domName SVGFEBlendElement.in2 */
+  SVGAnimatedString get in2 native "SVGFEBlendElement_in2_Getter";
+
+
+  /** @domName SVGFEBlendElement.mode */
+  SVGAnimatedEnumeration get mode native "SVGFEBlendElement_mode_Getter";
+
+
+  /** @domName SVGFEBlendElement.height */
+  SVGAnimatedLength get height native "SVGFEBlendElement_height_Getter";
+
+
+  /** @domName SVGFEBlendElement.result */
+  SVGAnimatedString get result native "SVGFEBlendElement_result_Getter";
+
+
+  /** @domName SVGFEBlendElement.width */
+  SVGAnimatedLength get width native "SVGFEBlendElement_width_Getter";
+
+
+  /** @domName SVGFEBlendElement.x */
+  SVGAnimatedLength get x native "SVGFEBlendElement_x_Getter";
+
+
+  /** @domName SVGFEBlendElement.y */
+  SVGAnimatedLength get y native "SVGFEBlendElement_y_Getter";
+
+
+  /** @domName SVGFEBlendElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEBlendElement_className_Getter";
+
+
+  /** @domName SVGFEBlendElement.style */
+  CSSStyleDeclaration get style native "SVGFEBlendElement_style_Getter";
+
+
+  /** @domName SVGFEBlendElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEBlendElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEColorMatrixElement
+class SVGFEColorMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEColorMatrixElement.internal(): super.internal();
+
+  static const int SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
+
+  static const int SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
+
+  static const int SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
+
+  static const int SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
+
+  static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGFEColorMatrixElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEColorMatrixElement_in1_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.type */
+  SVGAnimatedEnumeration get type native "SVGFEColorMatrixElement_type_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.values */
+  SVGAnimatedNumberList get values native "SVGFEColorMatrixElement_values_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.height */
+  SVGAnimatedLength get height native "SVGFEColorMatrixElement_height_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.result */
+  SVGAnimatedString get result native "SVGFEColorMatrixElement_result_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.width */
+  SVGAnimatedLength get width native "SVGFEColorMatrixElement_width_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.x */
+  SVGAnimatedLength get x native "SVGFEColorMatrixElement_x_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.y */
+  SVGAnimatedLength get y native "SVGFEColorMatrixElement_y_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEColorMatrixElement_className_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.style */
+  CSSStyleDeclaration get style native "SVGFEColorMatrixElement_style_Getter";
+
+
+  /** @domName SVGFEColorMatrixElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEColorMatrixElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEComponentTransferElement
+class SVGFEComponentTransferElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEComponentTransferElement.internal(): super.internal();
+
+
+  /** @domName SVGFEComponentTransferElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEComponentTransferElement_in1_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.height */
+  SVGAnimatedLength get height native "SVGFEComponentTransferElement_height_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.result */
+  SVGAnimatedString get result native "SVGFEComponentTransferElement_result_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.width */
+  SVGAnimatedLength get width native "SVGFEComponentTransferElement_width_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.x */
+  SVGAnimatedLength get x native "SVGFEComponentTransferElement_x_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.y */
+  SVGAnimatedLength get y native "SVGFEComponentTransferElement_y_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEComponentTransferElement_className_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.style */
+  CSSStyleDeclaration get style native "SVGFEComponentTransferElement_style_Getter";
+
+
+  /** @domName SVGFEComponentTransferElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEComponentTransferElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFECompositeElement
+class SVGFECompositeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFECompositeElement.internal(): super.internal();
+
+  static const int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_IN = 2;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_OUT = 3;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_OVER = 1;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
+
+  static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
+
+
+  /** @domName SVGFECompositeElement.in1 */
+  SVGAnimatedString get in1 native "SVGFECompositeElement_in1_Getter";
+
+
+  /** @domName SVGFECompositeElement.in2 */
+  SVGAnimatedString get in2 native "SVGFECompositeElement_in2_Getter";
+
+
+  /** @domName SVGFECompositeElement.k1 */
+  SVGAnimatedNumber get k1 native "SVGFECompositeElement_k1_Getter";
+
+
+  /** @domName SVGFECompositeElement.k2 */
+  SVGAnimatedNumber get k2 native "SVGFECompositeElement_k2_Getter";
+
+
+  /** @domName SVGFECompositeElement.k3 */
+  SVGAnimatedNumber get k3 native "SVGFECompositeElement_k3_Getter";
+
+
+  /** @domName SVGFECompositeElement.k4 */
+  SVGAnimatedNumber get k4 native "SVGFECompositeElement_k4_Getter";
+
+
+  /** @domName SVGFECompositeElement.operator */
+  SVGAnimatedEnumeration get operator native "SVGFECompositeElement_operator_Getter";
+
+
+  /** @domName SVGFECompositeElement.height */
+  SVGAnimatedLength get height native "SVGFECompositeElement_height_Getter";
+
+
+  /** @domName SVGFECompositeElement.result */
+  SVGAnimatedString get result native "SVGFECompositeElement_result_Getter";
+
+
+  /** @domName SVGFECompositeElement.width */
+  SVGAnimatedLength get width native "SVGFECompositeElement_width_Getter";
+
+
+  /** @domName SVGFECompositeElement.x */
+  SVGAnimatedLength get x native "SVGFECompositeElement_x_Getter";
+
+
+  /** @domName SVGFECompositeElement.y */
+  SVGAnimatedLength get y native "SVGFECompositeElement_y_Getter";
+
+
+  /** @domName SVGFECompositeElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFECompositeElement_className_Getter";
+
+
+  /** @domName SVGFECompositeElement.style */
+  CSSStyleDeclaration get style native "SVGFECompositeElement_style_Getter";
+
+
+  /** @domName SVGFECompositeElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFECompositeElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEConvolveMatrixElement
+class SVGFEConvolveMatrixElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEConvolveMatrixElement.internal(): super.internal();
+
+  static const int SVG_EDGEMODE_DUPLICATE = 1;
+
+  static const int SVG_EDGEMODE_NONE = 3;
+
+  static const int SVG_EDGEMODE_UNKNOWN = 0;
+
+  static const int SVG_EDGEMODE_WRAP = 2;
+
+
+  /** @domName SVGFEConvolveMatrixElement.bias */
+  SVGAnimatedNumber get bias native "SVGFEConvolveMatrixElement_bias_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.divisor */
+  SVGAnimatedNumber get divisor native "SVGFEConvolveMatrixElement_divisor_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.edgeMode */
+  SVGAnimatedEnumeration get edgeMode native "SVGFEConvolveMatrixElement_edgeMode_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEConvolveMatrixElement_in1_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.kernelMatrix */
+  SVGAnimatedNumberList get kernelMatrix native "SVGFEConvolveMatrixElement_kernelMatrix_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthX */
+  SVGAnimatedNumber get kernelUnitLengthX native "SVGFEConvolveMatrixElement_kernelUnitLengthX_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.kernelUnitLengthY */
+  SVGAnimatedNumber get kernelUnitLengthY native "SVGFEConvolveMatrixElement_kernelUnitLengthY_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.orderX */
+  SVGAnimatedInteger get orderX native "SVGFEConvolveMatrixElement_orderX_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.orderY */
+  SVGAnimatedInteger get orderY native "SVGFEConvolveMatrixElement_orderY_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.preserveAlpha */
+  SVGAnimatedBoolean get preserveAlpha native "SVGFEConvolveMatrixElement_preserveAlpha_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.targetX */
+  SVGAnimatedInteger get targetX native "SVGFEConvolveMatrixElement_targetX_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.targetY */
+  SVGAnimatedInteger get targetY native "SVGFEConvolveMatrixElement_targetY_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.height */
+  SVGAnimatedLength get height native "SVGFEConvolveMatrixElement_height_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.result */
+  SVGAnimatedString get result native "SVGFEConvolveMatrixElement_result_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.width */
+  SVGAnimatedLength get width native "SVGFEConvolveMatrixElement_width_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.x */
+  SVGAnimatedLength get x native "SVGFEConvolveMatrixElement_x_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.y */
+  SVGAnimatedLength get y native "SVGFEConvolveMatrixElement_y_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEConvolveMatrixElement_className_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.style */
+  CSSStyleDeclaration get style native "SVGFEConvolveMatrixElement_style_Getter";
+
+
+  /** @domName SVGFEConvolveMatrixElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEConvolveMatrixElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEDiffuseLightingElement
+class SVGFEDiffuseLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEDiffuseLightingElement.internal(): super.internal();
+
+
+  /** @domName SVGFEDiffuseLightingElement.diffuseConstant */
+  SVGAnimatedNumber get diffuseConstant native "SVGFEDiffuseLightingElement_diffuseConstant_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEDiffuseLightingElement_in1_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthX */
+  SVGAnimatedNumber get kernelUnitLengthX native "SVGFEDiffuseLightingElement_kernelUnitLengthX_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.kernelUnitLengthY */
+  SVGAnimatedNumber get kernelUnitLengthY native "SVGFEDiffuseLightingElement_kernelUnitLengthY_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.surfaceScale */
+  SVGAnimatedNumber get surfaceScale native "SVGFEDiffuseLightingElement_surfaceScale_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.height */
+  SVGAnimatedLength get height native "SVGFEDiffuseLightingElement_height_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.result */
+  SVGAnimatedString get result native "SVGFEDiffuseLightingElement_result_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.width */
+  SVGAnimatedLength get width native "SVGFEDiffuseLightingElement_width_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.x */
+  SVGAnimatedLength get x native "SVGFEDiffuseLightingElement_x_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.y */
+  SVGAnimatedLength get y native "SVGFEDiffuseLightingElement_y_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEDiffuseLightingElement_className_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.style */
+  CSSStyleDeclaration get style native "SVGFEDiffuseLightingElement_style_Getter";
+
+
+  /** @domName SVGFEDiffuseLightingElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEDiffuseLightingElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEDisplacementMapElement
+class SVGFEDisplacementMapElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEDisplacementMapElement.internal(): super.internal();
+
+  static const int SVG_CHANNEL_A = 4;
+
+  static const int SVG_CHANNEL_B = 3;
+
+  static const int SVG_CHANNEL_G = 2;
+
+  static const int SVG_CHANNEL_R = 1;
+
+  static const int SVG_CHANNEL_UNKNOWN = 0;
+
+
+  /** @domName SVGFEDisplacementMapElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEDisplacementMapElement_in1_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.in2 */
+  SVGAnimatedString get in2 native "SVGFEDisplacementMapElement_in2_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.scale */
+  SVGAnimatedNumber get scale native "SVGFEDisplacementMapElement_scale_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.xChannelSelector */
+  SVGAnimatedEnumeration get xChannelSelector native "SVGFEDisplacementMapElement_xChannelSelector_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.yChannelSelector */
+  SVGAnimatedEnumeration get yChannelSelector native "SVGFEDisplacementMapElement_yChannelSelector_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.height */
+  SVGAnimatedLength get height native "SVGFEDisplacementMapElement_height_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.result */
+  SVGAnimatedString get result native "SVGFEDisplacementMapElement_result_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.width */
+  SVGAnimatedLength get width native "SVGFEDisplacementMapElement_width_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.x */
+  SVGAnimatedLength get x native "SVGFEDisplacementMapElement_x_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.y */
+  SVGAnimatedLength get y native "SVGFEDisplacementMapElement_y_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEDisplacementMapElement_className_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.style */
+  CSSStyleDeclaration get style native "SVGFEDisplacementMapElement_style_Getter";
+
+
+  /** @domName SVGFEDisplacementMapElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEDisplacementMapElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEDistantLightElement
+class SVGFEDistantLightElement extends SVGElement {
+  SVGFEDistantLightElement.internal(): super.internal();
+
+
+  /** @domName SVGFEDistantLightElement.azimuth */
+  SVGAnimatedNumber get azimuth native "SVGFEDistantLightElement_azimuth_Getter";
+
+
+  /** @domName SVGFEDistantLightElement.elevation */
+  SVGAnimatedNumber get elevation native "SVGFEDistantLightElement_elevation_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEDropShadowElement
+class SVGFEDropShadowElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEDropShadowElement.internal(): super.internal();
+
+
+  /** @domName SVGFEDropShadowElement.dx */
+  SVGAnimatedNumber get dx native "SVGFEDropShadowElement_dx_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.dy */
+  SVGAnimatedNumber get dy native "SVGFEDropShadowElement_dy_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEDropShadowElement_in1_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.stdDeviationX */
+  SVGAnimatedNumber get stdDeviationX native "SVGFEDropShadowElement_stdDeviationX_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.stdDeviationY */
+  SVGAnimatedNumber get stdDeviationY native "SVGFEDropShadowElement_stdDeviationY_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.setStdDeviation */
+  void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEDropShadowElement_setStdDeviation_Callback";
+
+
+  /** @domName SVGFEDropShadowElement.height */
+  SVGAnimatedLength get height native "SVGFEDropShadowElement_height_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.result */
+  SVGAnimatedString get result native "SVGFEDropShadowElement_result_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.width */
+  SVGAnimatedLength get width native "SVGFEDropShadowElement_width_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.x */
+  SVGAnimatedLength get x native "SVGFEDropShadowElement_x_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.y */
+  SVGAnimatedLength get y native "SVGFEDropShadowElement_y_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEDropShadowElement_className_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.style */
+  CSSStyleDeclaration get style native "SVGFEDropShadowElement_style_Getter";
+
+
+  /** @domName SVGFEDropShadowElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEDropShadowElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEFloodElement
+class SVGFEFloodElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEFloodElement.internal(): super.internal();
+
+
+  /** @domName SVGFEFloodElement.height */
+  SVGAnimatedLength get height native "SVGFEFloodElement_height_Getter";
+
+
+  /** @domName SVGFEFloodElement.result */
+  SVGAnimatedString get result native "SVGFEFloodElement_result_Getter";
+
+
+  /** @domName SVGFEFloodElement.width */
+  SVGAnimatedLength get width native "SVGFEFloodElement_width_Getter";
+
+
+  /** @domName SVGFEFloodElement.x */
+  SVGAnimatedLength get x native "SVGFEFloodElement_x_Getter";
+
+
+  /** @domName SVGFEFloodElement.y */
+  SVGAnimatedLength get y native "SVGFEFloodElement_y_Getter";
+
+
+  /** @domName SVGFEFloodElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEFloodElement_className_Getter";
+
+
+  /** @domName SVGFEFloodElement.style */
+  CSSStyleDeclaration get style native "SVGFEFloodElement_style_Getter";
+
+
+  /** @domName SVGFEFloodElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEFloodElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEFuncAElement
+class SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+  SVGFEFuncAElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEFuncBElement
+class SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+  SVGFEFuncBElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEFuncGElement
+class SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+  SVGFEFuncGElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEFuncRElement
+class SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+  SVGFEFuncRElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEGaussianBlurElement
+class SVGFEGaussianBlurElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEGaussianBlurElement.internal(): super.internal();
+
+
+  /** @domName SVGFEGaussianBlurElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEGaussianBlurElement_in1_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.stdDeviationX */
+  SVGAnimatedNumber get stdDeviationX native "SVGFEGaussianBlurElement_stdDeviationX_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.stdDeviationY */
+  SVGAnimatedNumber get stdDeviationY native "SVGFEGaussianBlurElement_stdDeviationY_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.setStdDeviation */
+  void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEGaussianBlurElement_setStdDeviation_Callback";
+
+
+  /** @domName SVGFEGaussianBlurElement.height */
+  SVGAnimatedLength get height native "SVGFEGaussianBlurElement_height_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.result */
+  SVGAnimatedString get result native "SVGFEGaussianBlurElement_result_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.width */
+  SVGAnimatedLength get width native "SVGFEGaussianBlurElement_width_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.x */
+  SVGAnimatedLength get x native "SVGFEGaussianBlurElement_x_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.y */
+  SVGAnimatedLength get y native "SVGFEGaussianBlurElement_y_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEGaussianBlurElement_className_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.style */
+  CSSStyleDeclaration get style native "SVGFEGaussianBlurElement_style_Getter";
+
+
+  /** @domName SVGFEGaussianBlurElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEGaussianBlurElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEImageElement
+class SVGFEImageElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired {
+  SVGFEImageElement.internal(): super.internal();
+
+
+  /** @domName SVGFEImageElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFEImageElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGFEImageElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGFEImageElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGFEImageElement.height */
+  SVGAnimatedLength get height native "SVGFEImageElement_height_Getter";
+
+
+  /** @domName SVGFEImageElement.result */
+  SVGAnimatedString get result native "SVGFEImageElement_result_Getter";
+
+
+  /** @domName SVGFEImageElement.width */
+  SVGAnimatedLength get width native "SVGFEImageElement_width_Getter";
+
+
+  /** @domName SVGFEImageElement.x */
+  SVGAnimatedLength get x native "SVGFEImageElement_x_Getter";
+
+
+  /** @domName SVGFEImageElement.y */
+  SVGAnimatedLength get y native "SVGFEImageElement_y_Getter";
+
+
+  /** @domName SVGFEImageElement.xmllang */
+  String get xmllang native "SVGFEImageElement_xmllang_Getter";
+
+
+  /** @domName SVGFEImageElement.xmllang */
+  void set xmllang(String value) native "SVGFEImageElement_xmllang_Setter";
+
+
+  /** @domName SVGFEImageElement.xmlspace */
+  String get xmlspace native "SVGFEImageElement_xmlspace_Getter";
+
+
+  /** @domName SVGFEImageElement.xmlspace */
+  void set xmlspace(String value) native "SVGFEImageElement_xmlspace_Setter";
+
+
+  /** @domName SVGFEImageElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEImageElement_className_Getter";
+
+
+  /** @domName SVGFEImageElement.style */
+  CSSStyleDeclaration get style native "SVGFEImageElement_style_Getter";
+
+
+  /** @domName SVGFEImageElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEImageElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGFEImageElement.href */
+  SVGAnimatedString get href native "SVGFEImageElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEMergeElement
+class SVGFEMergeElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEMergeElement.internal(): super.internal();
+
+
+  /** @domName SVGFEMergeElement.height */
+  SVGAnimatedLength get height native "SVGFEMergeElement_height_Getter";
+
+
+  /** @domName SVGFEMergeElement.result */
+  SVGAnimatedString get result native "SVGFEMergeElement_result_Getter";
+
+
+  /** @domName SVGFEMergeElement.width */
+  SVGAnimatedLength get width native "SVGFEMergeElement_width_Getter";
+
+
+  /** @domName SVGFEMergeElement.x */
+  SVGAnimatedLength get x native "SVGFEMergeElement_x_Getter";
+
+
+  /** @domName SVGFEMergeElement.y */
+  SVGAnimatedLength get y native "SVGFEMergeElement_y_Getter";
+
+
+  /** @domName SVGFEMergeElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEMergeElement_className_Getter";
+
+
+  /** @domName SVGFEMergeElement.style */
+  CSSStyleDeclaration get style native "SVGFEMergeElement_style_Getter";
+
+
+  /** @domName SVGFEMergeElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEMergeElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEMergeNodeElement
+class SVGFEMergeNodeElement extends SVGElement {
+  SVGFEMergeNodeElement.internal(): super.internal();
+
+
+  /** @domName SVGFEMergeNodeElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEMergeNodeElement_in1_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEMorphologyElement
+class SVGFEMorphologyElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEMorphologyElement.internal(): super.internal();
+
+  static const int SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+  static const int SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+
+  static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+
+
+  /** @domName SVGFEMorphologyElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEMorphologyElement_in1_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.operator */
+  SVGAnimatedEnumeration get operator native "SVGFEMorphologyElement_operator_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.radiusX */
+  SVGAnimatedNumber get radiusX native "SVGFEMorphologyElement_radiusX_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.radiusY */
+  SVGAnimatedNumber get radiusY native "SVGFEMorphologyElement_radiusY_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.setRadius */
+  void setRadius(num radiusX, num radiusY) native "SVGFEMorphologyElement_setRadius_Callback";
+
+
+  /** @domName SVGFEMorphologyElement.height */
+  SVGAnimatedLength get height native "SVGFEMorphologyElement_height_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.result */
+  SVGAnimatedString get result native "SVGFEMorphologyElement_result_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.width */
+  SVGAnimatedLength get width native "SVGFEMorphologyElement_width_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.x */
+  SVGAnimatedLength get x native "SVGFEMorphologyElement_x_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.y */
+  SVGAnimatedLength get y native "SVGFEMorphologyElement_y_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEMorphologyElement_className_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.style */
+  CSSStyleDeclaration get style native "SVGFEMorphologyElement_style_Getter";
+
+
+  /** @domName SVGFEMorphologyElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEMorphologyElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEOffsetElement
+class SVGFEOffsetElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFEOffsetElement.internal(): super.internal();
+
+
+  /** @domName SVGFEOffsetElement.dx */
+  SVGAnimatedNumber get dx native "SVGFEOffsetElement_dx_Getter";
+
+
+  /** @domName SVGFEOffsetElement.dy */
+  SVGAnimatedNumber get dy native "SVGFEOffsetElement_dy_Getter";
+
+
+  /** @domName SVGFEOffsetElement.in1 */
+  SVGAnimatedString get in1 native "SVGFEOffsetElement_in1_Getter";
+
+
+  /** @domName SVGFEOffsetElement.height */
+  SVGAnimatedLength get height native "SVGFEOffsetElement_height_Getter";
+
+
+  /** @domName SVGFEOffsetElement.result */
+  SVGAnimatedString get result native "SVGFEOffsetElement_result_Getter";
+
+
+  /** @domName SVGFEOffsetElement.width */
+  SVGAnimatedLength get width native "SVGFEOffsetElement_width_Getter";
+
+
+  /** @domName SVGFEOffsetElement.x */
+  SVGAnimatedLength get x native "SVGFEOffsetElement_x_Getter";
+
+
+  /** @domName SVGFEOffsetElement.y */
+  SVGAnimatedLength get y native "SVGFEOffsetElement_y_Getter";
+
+
+  /** @domName SVGFEOffsetElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFEOffsetElement_className_Getter";
+
+
+  /** @domName SVGFEOffsetElement.style */
+  CSSStyleDeclaration get style native "SVGFEOffsetElement_style_Getter";
+
+
+  /** @domName SVGFEOffsetElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFEOffsetElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFEPointLightElement
+class SVGFEPointLightElement extends SVGElement {
+  SVGFEPointLightElement.internal(): super.internal();
+
+
+  /** @domName SVGFEPointLightElement.x */
+  SVGAnimatedNumber get x native "SVGFEPointLightElement_x_Getter";
+
+
+  /** @domName SVGFEPointLightElement.y */
+  SVGAnimatedNumber get y native "SVGFEPointLightElement_y_Getter";
+
+
+  /** @domName SVGFEPointLightElement.z */
+  SVGAnimatedNumber get z native "SVGFEPointLightElement_z_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFESpecularLightingElement
+class SVGFESpecularLightingElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFESpecularLightingElement.internal(): super.internal();
+
+
+  /** @domName SVGFESpecularLightingElement.in1 */
+  SVGAnimatedString get in1 native "SVGFESpecularLightingElement_in1_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.specularConstant */
+  SVGAnimatedNumber get specularConstant native "SVGFESpecularLightingElement_specularConstant_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.specularExponent */
+  SVGAnimatedNumber get specularExponent native "SVGFESpecularLightingElement_specularExponent_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.surfaceScale */
+  SVGAnimatedNumber get surfaceScale native "SVGFESpecularLightingElement_surfaceScale_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.height */
+  SVGAnimatedLength get height native "SVGFESpecularLightingElement_height_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.result */
+  SVGAnimatedString get result native "SVGFESpecularLightingElement_result_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.width */
+  SVGAnimatedLength get width native "SVGFESpecularLightingElement_width_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.x */
+  SVGAnimatedLength get x native "SVGFESpecularLightingElement_x_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.y */
+  SVGAnimatedLength get y native "SVGFESpecularLightingElement_y_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFESpecularLightingElement_className_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.style */
+  CSSStyleDeclaration get style native "SVGFESpecularLightingElement_style_Getter";
+
+
+  /** @domName SVGFESpecularLightingElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFESpecularLightingElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFESpotLightElement
+class SVGFESpotLightElement extends SVGElement {
+  SVGFESpotLightElement.internal(): super.internal();
+
+
+  /** @domName SVGFESpotLightElement.limitingConeAngle */
+  SVGAnimatedNumber get limitingConeAngle native "SVGFESpotLightElement_limitingConeAngle_Getter";
+
+
+  /** @domName SVGFESpotLightElement.pointsAtX */
+  SVGAnimatedNumber get pointsAtX native "SVGFESpotLightElement_pointsAtX_Getter";
+
+
+  /** @domName SVGFESpotLightElement.pointsAtY */
+  SVGAnimatedNumber get pointsAtY native "SVGFESpotLightElement_pointsAtY_Getter";
+
+
+  /** @domName SVGFESpotLightElement.pointsAtZ */
+  SVGAnimatedNumber get pointsAtZ native "SVGFESpotLightElement_pointsAtZ_Getter";
+
+
+  /** @domName SVGFESpotLightElement.specularExponent */
+  SVGAnimatedNumber get specularExponent native "SVGFESpotLightElement_specularExponent_Getter";
+
+
+  /** @domName SVGFESpotLightElement.x */
+  SVGAnimatedNumber get x native "SVGFESpotLightElement_x_Getter";
+
+
+  /** @domName SVGFESpotLightElement.y */
+  SVGAnimatedNumber get y native "SVGFESpotLightElement_y_Getter";
+
+
+  /** @domName SVGFESpotLightElement.z */
+  SVGAnimatedNumber get z native "SVGFESpotLightElement_z_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFETileElement
+class SVGFETileElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFETileElement.internal(): super.internal();
+
+
+  /** @domName SVGFETileElement.in1 */
+  SVGAnimatedString get in1 native "SVGFETileElement_in1_Getter";
+
+
+  /** @domName SVGFETileElement.height */
+  SVGAnimatedLength get height native "SVGFETileElement_height_Getter";
+
+
+  /** @domName SVGFETileElement.result */
+  SVGAnimatedString get result native "SVGFETileElement_result_Getter";
+
+
+  /** @domName SVGFETileElement.width */
+  SVGAnimatedLength get width native "SVGFETileElement_width_Getter";
+
+
+  /** @domName SVGFETileElement.x */
+  SVGAnimatedLength get x native "SVGFETileElement_x_Getter";
+
+
+  /** @domName SVGFETileElement.y */
+  SVGAnimatedLength get y native "SVGFETileElement_y_Getter";
+
+
+  /** @domName SVGFETileElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFETileElement_className_Getter";
+
+
+  /** @domName SVGFETileElement.style */
+  CSSStyleDeclaration get style native "SVGFETileElement_style_Getter";
+
+
+  /** @domName SVGFETileElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFETileElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFETurbulenceElement
+class SVGFETurbulenceElement extends SVGElement implements SVGFilterPrimitiveStandardAttributes {
+  SVGFETurbulenceElement.internal(): super.internal();
+
+  static const int SVG_STITCHTYPE_NOSTITCH = 2;
+
+  static const int SVG_STITCHTYPE_STITCH = 1;
+
+  static const int SVG_STITCHTYPE_UNKNOWN = 0;
+
+  static const int SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
+
+  static const int SVG_TURBULENCE_TYPE_TURBULENCE = 2;
+
+  static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGFETurbulenceElement.baseFrequencyX */
+  SVGAnimatedNumber get baseFrequencyX native "SVGFETurbulenceElement_baseFrequencyX_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.baseFrequencyY */
+  SVGAnimatedNumber get baseFrequencyY native "SVGFETurbulenceElement_baseFrequencyY_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.numOctaves */
+  SVGAnimatedInteger get numOctaves native "SVGFETurbulenceElement_numOctaves_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.seed */
+  SVGAnimatedNumber get seed native "SVGFETurbulenceElement_seed_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.stitchTiles */
+  SVGAnimatedEnumeration get stitchTiles native "SVGFETurbulenceElement_stitchTiles_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.type */
+  SVGAnimatedEnumeration get type native "SVGFETurbulenceElement_type_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.height */
+  SVGAnimatedLength get height native "SVGFETurbulenceElement_height_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.result */
+  SVGAnimatedString get result native "SVGFETurbulenceElement_result_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.width */
+  SVGAnimatedLength get width native "SVGFETurbulenceElement_width_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.x */
+  SVGAnimatedLength get x native "SVGFETurbulenceElement_x_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.y */
+  SVGAnimatedLength get y native "SVGFETurbulenceElement_y_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFETurbulenceElement_className_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.style */
+  CSSStyleDeclaration get style native "SVGFETurbulenceElement_style_Getter";
+
+
+  /** @domName SVGFETurbulenceElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFETurbulenceElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFilterElement
+class SVGFilterElement extends SVGElement implements SVGURIReference, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable {
+  SVGFilterElement.internal(): super.internal();
+
+
+  /** @domName SVGFilterElement.filterResX */
+  SVGAnimatedInteger get filterResX native "SVGFilterElement_filterResX_Getter";
+
+
+  /** @domName SVGFilterElement.filterResY */
+  SVGAnimatedInteger get filterResY native "SVGFilterElement_filterResY_Getter";
+
+
+  /** @domName SVGFilterElement.filterUnits */
+  SVGAnimatedEnumeration get filterUnits native "SVGFilterElement_filterUnits_Getter";
+
+
+  /** @domName SVGFilterElement.height */
+  SVGAnimatedLength get height native "SVGFilterElement_height_Getter";
+
+
+  /** @domName SVGFilterElement.primitiveUnits */
+  SVGAnimatedEnumeration get primitiveUnits native "SVGFilterElement_primitiveUnits_Getter";
+
+
+  /** @domName SVGFilterElement.width */
+  SVGAnimatedLength get width native "SVGFilterElement_width_Getter";
+
+
+  /** @domName SVGFilterElement.x */
+  SVGAnimatedLength get x native "SVGFilterElement_x_Getter";
+
+
+  /** @domName SVGFilterElement.y */
+  SVGAnimatedLength get y native "SVGFilterElement_y_Getter";
+
+
+  /** @domName SVGFilterElement.setFilterRes */
+  void setFilterRes(int filterResX, int filterResY) native "SVGFilterElement_setFilterRes_Callback";
+
+
+  /** @domName SVGFilterElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGFilterElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGFilterElement.xmllang */
+  String get xmllang native "SVGFilterElement_xmllang_Getter";
+
+
+  /** @domName SVGFilterElement.xmllang */
+  void set xmllang(String value) native "SVGFilterElement_xmllang_Setter";
+
+
+  /** @domName SVGFilterElement.xmlspace */
+  String get xmlspace native "SVGFilterElement_xmlspace_Getter";
+
+
+  /** @domName SVGFilterElement.xmlspace */
+  void set xmlspace(String value) native "SVGFilterElement_xmlspace_Setter";
+
+
+  /** @domName SVGFilterElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFilterElement_className_Getter";
+
+
+  /** @domName SVGFilterElement.style */
+  CSSStyleDeclaration get style native "SVGFilterElement_style_Getter";
+
+
+  /** @domName SVGFilterElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFilterElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGFilterElement.href */
+  SVGAnimatedString get href native "SVGFilterElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFilterPrimitiveStandardAttributes
+class SVGFilterPrimitiveStandardAttributes extends NativeFieldWrapperClass1 implements SVGStylable {
+  SVGFilterPrimitiveStandardAttributes.internal();
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.height */
+  SVGAnimatedLength get height native "SVGFilterPrimitiveStandardAttributes_height_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.result */
+  SVGAnimatedString get result native "SVGFilterPrimitiveStandardAttributes_result_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.width */
+  SVGAnimatedLength get width native "SVGFilterPrimitiveStandardAttributes_width_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.x */
+  SVGAnimatedLength get x native "SVGFilterPrimitiveStandardAttributes_x_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.y */
+  SVGAnimatedLength get y native "SVGFilterPrimitiveStandardAttributes_y_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGFilterPrimitiveStandardAttributes_className_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.style */
+  CSSStyleDeclaration get style native "SVGFilterPrimitiveStandardAttributes_style_Getter";
+
+
+  /** @domName SVGFilterPrimitiveStandardAttributes.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGFilterPrimitiveStandardAttributes_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFitToViewBox
+class SVGFitToViewBox extends NativeFieldWrapperClass1 {
+  SVGFitToViewBox.internal();
+
+
+  /** @domName SVGFitToViewBox.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFitToViewBox_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGFitToViewBox.viewBox */
+  SVGAnimatedRect get viewBox native "SVGFitToViewBox_viewBox_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontElement
+class SVGFontElement extends SVGElement {
+  SVGFontElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontFaceElement
+class SVGFontFaceElement extends SVGElement {
+  SVGFontFaceElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontFaceFormatElement
+class SVGFontFaceFormatElement extends SVGElement {
+  SVGFontFaceFormatElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontFaceNameElement
+class SVGFontFaceNameElement extends SVGElement {
+  SVGFontFaceNameElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontFaceSrcElement
+class SVGFontFaceSrcElement extends SVGElement {
+  SVGFontFaceSrcElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGFontFaceUriElement
+class SVGFontFaceUriElement extends SVGElement {
+  SVGFontFaceUriElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGForeignObjectElement
+class SVGForeignObjectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGForeignObjectElement.internal(): super.internal();
+
+
+  /** @domName SVGForeignObjectElement.height */
+  SVGAnimatedLength get height native "SVGForeignObjectElement_height_Getter";
+
+
+  /** @domName SVGForeignObjectElement.width */
+  SVGAnimatedLength get width native "SVGForeignObjectElement_width_Getter";
+
+
+  /** @domName SVGForeignObjectElement.x */
+  SVGAnimatedLength get x native "SVGForeignObjectElement_x_Getter";
+
+
+  /** @domName SVGForeignObjectElement.y */
+  SVGAnimatedLength get y native "SVGForeignObjectElement_y_Getter";
+
+
+  /** @domName SVGForeignObjectElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGForeignObjectElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGForeignObjectElement.xmllang */
+  String get xmllang native "SVGForeignObjectElement_xmllang_Getter";
+
+
+  /** @domName SVGForeignObjectElement.xmllang */
+  void set xmllang(String value) native "SVGForeignObjectElement_xmllang_Setter";
+
+
+  /** @domName SVGForeignObjectElement.xmlspace */
+  String get xmlspace native "SVGForeignObjectElement_xmlspace_Getter";
+
+
+  /** @domName SVGForeignObjectElement.xmlspace */
+  void set xmlspace(String value) native "SVGForeignObjectElement_xmlspace_Setter";
+
+
+  /** @domName SVGForeignObjectElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGForeignObjectElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGForeignObjectElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGForeignObjectElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGForeignObjectElement.getBBox */
+  SVGRect getBBox() native "SVGForeignObjectElement_getBBox_Callback";
+
+
+  /** @domName SVGForeignObjectElement.getCTM */
+  SVGMatrix getCTM() native "SVGForeignObjectElement_getCTM_Callback";
+
+
+  /** @domName SVGForeignObjectElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGForeignObjectElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGForeignObjectElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGForeignObjectElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGForeignObjectElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGForeignObjectElement_className_Getter";
+
+
+  /** @domName SVGForeignObjectElement.style */
+  CSSStyleDeclaration get style native "SVGForeignObjectElement_style_Getter";
+
+
+  /** @domName SVGForeignObjectElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGForeignObjectElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGForeignObjectElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGForeignObjectElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGForeignObjectElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGForeignObjectElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGForeignObjectElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGForeignObjectElement_systemLanguage_Getter";
+
+
+  /** @domName SVGForeignObjectElement.hasExtension */
+  bool hasExtension(String extension) native "SVGForeignObjectElement_hasExtension_Callback";
+
+
+  /** @domName SVGForeignObjectElement.transform */
+  SVGAnimatedTransformList get transform native "SVGForeignObjectElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGGElement
+class SVGGElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGGElement.internal(): super.internal();
+
+
+  /** @domName SVGGElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGGElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGGElement.xmllang */
+  String get xmllang native "SVGGElement_xmllang_Getter";
+
+
+  /** @domName SVGGElement.xmllang */
+  void set xmllang(String value) native "SVGGElement_xmllang_Setter";
+
+
+  /** @domName SVGGElement.xmlspace */
+  String get xmlspace native "SVGGElement_xmlspace_Getter";
+
+
+  /** @domName SVGGElement.xmlspace */
+  void set xmlspace(String value) native "SVGGElement_xmlspace_Setter";
+
+
+  /** @domName SVGGElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGGElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGGElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGGElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGGElement.getBBox */
+  SVGRect getBBox() native "SVGGElement_getBBox_Callback";
+
+
+  /** @domName SVGGElement.getCTM */
+  SVGMatrix getCTM() native "SVGGElement_getCTM_Callback";
+
+
+  /** @domName SVGGElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGGElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGGElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGGElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGGElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGGElement_className_Getter";
+
+
+  /** @domName SVGGElement.style */
+  CSSStyleDeclaration get style native "SVGGElement_style_Getter";
+
+
+  /** @domName SVGGElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGGElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGGElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGGElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGGElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGGElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGGElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGGElement_systemLanguage_Getter";
+
+
+  /** @domName SVGGElement.hasExtension */
+  bool hasExtension(String extension) native "SVGGElement_hasExtension_Callback";
+
+
+  /** @domName SVGGElement.transform */
+  SVGAnimatedTransformList get transform native "SVGGElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGGlyphElement
+class SVGGlyphElement extends SVGElement {
+  SVGGlyphElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGGlyphRefElement
+class SVGGlyphRefElement extends SVGElement implements SVGURIReference, SVGStylable {
+  SVGGlyphRefElement.internal(): super.internal();
+
+
+  /** @domName SVGGlyphRefElement.dx */
+  num get dx native "SVGGlyphRefElement_dx_Getter";
+
+
+  /** @domName SVGGlyphRefElement.dx */
+  void set dx(num value) native "SVGGlyphRefElement_dx_Setter";
+
+
+  /** @domName SVGGlyphRefElement.dy */
+  num get dy native "SVGGlyphRefElement_dy_Getter";
+
+
+  /** @domName SVGGlyphRefElement.dy */
+  void set dy(num value) native "SVGGlyphRefElement_dy_Setter";
+
+
+  /** @domName SVGGlyphRefElement.format */
+  String get format native "SVGGlyphRefElement_format_Getter";
+
+
+  /** @domName SVGGlyphRefElement.format */
+  void set format(String value) native "SVGGlyphRefElement_format_Setter";
+
+
+  /** @domName SVGGlyphRefElement.glyphRef */
+  String get glyphRef native "SVGGlyphRefElement_glyphRef_Getter";
+
+
+  /** @domName SVGGlyphRefElement.glyphRef */
+  void set glyphRef(String value) native "SVGGlyphRefElement_glyphRef_Setter";
+
+
+  /** @domName SVGGlyphRefElement.x */
+  num get x native "SVGGlyphRefElement_x_Getter";
+
+
+  /** @domName SVGGlyphRefElement.x */
+  void set x(num value) native "SVGGlyphRefElement_x_Setter";
+
+
+  /** @domName SVGGlyphRefElement.y */
+  num get y native "SVGGlyphRefElement_y_Getter";
+
+
+  /** @domName SVGGlyphRefElement.y */
+  void set y(num value) native "SVGGlyphRefElement_y_Setter";
+
+
+  /** @domName SVGGlyphRefElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGGlyphRefElement_className_Getter";
+
+
+  /** @domName SVGGlyphRefElement.style */
+  CSSStyleDeclaration get style native "SVGGlyphRefElement_style_Getter";
+
+
+  /** @domName SVGGlyphRefElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGGlyphRefElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGGlyphRefElement.href */
+  SVGAnimatedString get href native "SVGGlyphRefElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGGradientElement
+class SVGGradientElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired, SVGStylable {
+  SVGGradientElement.internal(): super.internal();
+
+  static const int SVG_SPREADMETHOD_PAD = 1;
+
+  static const int SVG_SPREADMETHOD_REFLECT = 2;
+
+  static const int SVG_SPREADMETHOD_REPEAT = 3;
+
+  static const int SVG_SPREADMETHOD_UNKNOWN = 0;
+
+
+  /** @domName SVGGradientElement.gradientTransform */
+  SVGAnimatedTransformList get gradientTransform native "SVGGradientElement_gradientTransform_Getter";
+
+
+  /** @domName SVGGradientElement.gradientUnits */
+  SVGAnimatedEnumeration get gradientUnits native "SVGGradientElement_gradientUnits_Getter";
+
+
+  /** @domName SVGGradientElement.spreadMethod */
+  SVGAnimatedEnumeration get spreadMethod native "SVGGradientElement_spreadMethod_Getter";
+
+
+  /** @domName SVGGradientElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGGradientElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGGradientElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGGradientElement_className_Getter";
+
+
+  /** @domName SVGGradientElement.style */
+  CSSStyleDeclaration get style native "SVGGradientElement_style_Getter";
+
+
+  /** @domName SVGGradientElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGGradientElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGGradientElement.href */
+  SVGAnimatedString get href native "SVGGradientElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGHKernElement
+class SVGHKernElement extends SVGElement {
+  SVGHKernElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGImageElement
+class SVGImageElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
+  SVGImageElement.internal(): super.internal();
+
+
+  /** @domName SVGImageElement.height */
+  SVGAnimatedLength get height native "SVGImageElement_height_Getter";
+
+
+  /** @domName SVGImageElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGImageElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGImageElement.width */
+  SVGAnimatedLength get width native "SVGImageElement_width_Getter";
+
+
+  /** @domName SVGImageElement.x */
+  SVGAnimatedLength get x native "SVGImageElement_x_Getter";
+
+
+  /** @domName SVGImageElement.y */
+  SVGAnimatedLength get y native "SVGImageElement_y_Getter";
+
+
+  /** @domName SVGImageElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGImageElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGImageElement.xmllang */
+  String get xmllang native "SVGImageElement_xmllang_Getter";
+
+
+  /** @domName SVGImageElement.xmllang */
+  void set xmllang(String value) native "SVGImageElement_xmllang_Setter";
+
+
+  /** @domName SVGImageElement.xmlspace */
+  String get xmlspace native "SVGImageElement_xmlspace_Getter";
+
+
+  /** @domName SVGImageElement.xmlspace */
+  void set xmlspace(String value) native "SVGImageElement_xmlspace_Setter";
+
+
+  /** @domName SVGImageElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGImageElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGImageElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGImageElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGImageElement.getBBox */
+  SVGRect getBBox() native "SVGImageElement_getBBox_Callback";
+
+
+  /** @domName SVGImageElement.getCTM */
+  SVGMatrix getCTM() native "SVGImageElement_getCTM_Callback";
+
+
+  /** @domName SVGImageElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGImageElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGImageElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGImageElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGImageElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGImageElement_className_Getter";
+
+
+  /** @domName SVGImageElement.style */
+  CSSStyleDeclaration get style native "SVGImageElement_style_Getter";
+
+
+  /** @domName SVGImageElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGImageElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGImageElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGImageElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGImageElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGImageElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGImageElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGImageElement_systemLanguage_Getter";
+
+
+  /** @domName SVGImageElement.hasExtension */
+  bool hasExtension(String extension) native "SVGImageElement_hasExtension_Callback";
+
+
+  /** @domName SVGImageElement.transform */
+  SVGAnimatedTransformList get transform native "SVGImageElement_transform_Getter";
+
+
+  /** @domName SVGImageElement.href */
+  SVGAnimatedString get href native "SVGImageElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLangSpace
+class SVGLangSpace extends NativeFieldWrapperClass1 {
+  SVGLangSpace.internal();
+
+
+  /** @domName SVGLangSpace.xmllang */
+  String get xmllang native "SVGLangSpace_xmllang_Getter";
+
+
+  /** @domName SVGLangSpace.xmllang */
+  void set xmllang(String value) native "SVGLangSpace_xmllang_Setter";
+
+
+  /** @domName SVGLangSpace.xmlspace */
+  String get xmlspace native "SVGLangSpace_xmlspace_Getter";
+
+
+  /** @domName SVGLangSpace.xmlspace */
+  void set xmlspace(String value) native "SVGLangSpace_xmlspace_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLength
+class SVGLength extends NativeFieldWrapperClass1 {
+  SVGLength.internal();
+
+  static const int SVG_LENGTHTYPE_CM = 6;
+
+  static const int SVG_LENGTHTYPE_EMS = 3;
+
+  static const int SVG_LENGTHTYPE_EXS = 4;
+
+  static const int SVG_LENGTHTYPE_IN = 8;
+
+  static const int SVG_LENGTHTYPE_MM = 7;
+
+  static const int SVG_LENGTHTYPE_NUMBER = 1;
+
+  static const int SVG_LENGTHTYPE_PC = 10;
+
+  static const int SVG_LENGTHTYPE_PERCENTAGE = 2;
+
+  static const int SVG_LENGTHTYPE_PT = 9;
+
+  static const int SVG_LENGTHTYPE_PX = 5;
+
+  static const int SVG_LENGTHTYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGLength.unitType */
+  int get unitType native "SVGLength_unitType_Getter";
+
+
+  /** @domName SVGLength.value */
+  num get value native "SVGLength_value_Getter";
+
+
+  /** @domName SVGLength.value */
+  void set value(num value) native "SVGLength_value_Setter";
+
+
+  /** @domName SVGLength.valueAsString */
+  String get valueAsString native "SVGLength_valueAsString_Getter";
+
+
+  /** @domName SVGLength.valueAsString */
+  void set valueAsString(String value) native "SVGLength_valueAsString_Setter";
+
+
+  /** @domName SVGLength.valueInSpecifiedUnits */
+  num get valueInSpecifiedUnits native "SVGLength_valueInSpecifiedUnits_Getter";
+
+
+  /** @domName SVGLength.valueInSpecifiedUnits */
+  void set valueInSpecifiedUnits(num value) native "SVGLength_valueInSpecifiedUnits_Setter";
+
+
+  /** @domName SVGLength.convertToSpecifiedUnits */
+  void convertToSpecifiedUnits(int unitType) native "SVGLength_convertToSpecifiedUnits_Callback";
+
+
+  /** @domName SVGLength.newValueSpecifiedUnits */
+  void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGLength_newValueSpecifiedUnits_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLengthList
+class SVGLengthList extends NativeFieldWrapperClass1 implements List<SVGLength> {
+  SVGLengthList.internal();
+
+
+  /** @domName SVGLengthList.numberOfItems */
+  int get numberOfItems native "SVGLengthList_numberOfItems_Getter";
+
+  SVGLength operator[](int index) native "SVGLengthList_item_Callback";
+
+  void operator[]=(int index, SVGLength value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGLength> mixins.
+  // SVGLength is the element type.
+
+  // From Iterable<SVGLength>:
+
+  Iterator<SVGLength> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGLength>(this);
+  }
+
+  // From Collection<SVGLength>:
+
+  void add(SVGLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGLength value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGLength> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGLength element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGLength element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGLength element)) => _Collections.map(this, [], f);
+
+  Collection<SVGLength> filter(bool f(SVGLength element)) =>
+     _Collections.filter(this, <SVGLength>[], f);
+
+  bool every(bool f(SVGLength element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGLength element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGLength>:
+
+  void sort([Comparator<SVGLength> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGLength element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGLength element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGLength get last => this[length - 1];
+
+  SVGLength removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGLength initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGLength> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGLength>[]);
+
+  // -- end List<SVGLength> mixins.
+
+
+  /** @domName SVGLengthList.appendItem */
+  SVGLength appendItem(SVGLength item) native "SVGLengthList_appendItem_Callback";
+
+
+  /** @domName SVGLengthList.clear */
+  void clear() native "SVGLengthList_clear_Callback";
+
+
+  /** @domName SVGLengthList.getItem */
+  SVGLength getItem(int index) native "SVGLengthList_getItem_Callback";
+
+
+  /** @domName SVGLengthList.initialize */
+  SVGLength initialize(SVGLength item) native "SVGLengthList_initialize_Callback";
+
+
+  /** @domName SVGLengthList.insertItemBefore */
+  SVGLength insertItemBefore(SVGLength item, int index) native "SVGLengthList_insertItemBefore_Callback";
+
+
+  /** @domName SVGLengthList.removeItem */
+  SVGLength removeItem(int index) native "SVGLengthList_removeItem_Callback";
+
+
+  /** @domName SVGLengthList.replaceItem */
+  SVGLength replaceItem(SVGLength item, int index) native "SVGLengthList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLineElement
+class SVGLineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGLineElement.internal(): super.internal();
+
+
+  /** @domName SVGLineElement.x1 */
+  SVGAnimatedLength get x1 native "SVGLineElement_x1_Getter";
+
+
+  /** @domName SVGLineElement.x2 */
+  SVGAnimatedLength get x2 native "SVGLineElement_x2_Getter";
+
+
+  /** @domName SVGLineElement.y1 */
+  SVGAnimatedLength get y1 native "SVGLineElement_y1_Getter";
+
+
+  /** @domName SVGLineElement.y2 */
+  SVGAnimatedLength get y2 native "SVGLineElement_y2_Getter";
+
+
+  /** @domName SVGLineElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGLineElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGLineElement.xmllang */
+  String get xmllang native "SVGLineElement_xmllang_Getter";
+
+
+  /** @domName SVGLineElement.xmllang */
+  void set xmllang(String value) native "SVGLineElement_xmllang_Setter";
+
+
+  /** @domName SVGLineElement.xmlspace */
+  String get xmlspace native "SVGLineElement_xmlspace_Getter";
+
+
+  /** @domName SVGLineElement.xmlspace */
+  void set xmlspace(String value) native "SVGLineElement_xmlspace_Setter";
+
+
+  /** @domName SVGLineElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGLineElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGLineElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGLineElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGLineElement.getBBox */
+  SVGRect getBBox() native "SVGLineElement_getBBox_Callback";
+
+
+  /** @domName SVGLineElement.getCTM */
+  SVGMatrix getCTM() native "SVGLineElement_getCTM_Callback";
+
+
+  /** @domName SVGLineElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGLineElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGLineElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGLineElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGLineElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGLineElement_className_Getter";
+
+
+  /** @domName SVGLineElement.style */
+  CSSStyleDeclaration get style native "SVGLineElement_style_Getter";
+
+
+  /** @domName SVGLineElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGLineElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGLineElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGLineElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGLineElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGLineElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGLineElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGLineElement_systemLanguage_Getter";
+
+
+  /** @domName SVGLineElement.hasExtension */
+  bool hasExtension(String extension) native "SVGLineElement_hasExtension_Callback";
+
+
+  /** @domName SVGLineElement.transform */
+  SVGAnimatedTransformList get transform native "SVGLineElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLinearGradientElement
+class SVGLinearGradientElement extends SVGGradientElement {
+  SVGLinearGradientElement.internal(): super.internal();
+
+
+  /** @domName SVGLinearGradientElement.x1 */
+  SVGAnimatedLength get x1 native "SVGLinearGradientElement_x1_Getter";
+
+
+  /** @domName SVGLinearGradientElement.x2 */
+  SVGAnimatedLength get x2 native "SVGLinearGradientElement_x2_Getter";
+
+
+  /** @domName SVGLinearGradientElement.y1 */
+  SVGAnimatedLength get y1 native "SVGLinearGradientElement_y1_Getter";
+
+
+  /** @domName SVGLinearGradientElement.y2 */
+  SVGAnimatedLength get y2 native "SVGLinearGradientElement_y2_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGLocatable
+class SVGLocatable extends NativeFieldWrapperClass1 {
+  SVGLocatable.internal();
+
+
+  /** @domName SVGLocatable.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGLocatable_farthestViewportElement_Getter";
+
+
+  /** @domName SVGLocatable.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGLocatable_nearestViewportElement_Getter";
+
+
+  /** @domName SVGLocatable.getBBox */
+  SVGRect getBBox() native "SVGLocatable_getBBox_Callback";
+
+
+  /** @domName SVGLocatable.getCTM */
+  SVGMatrix getCTM() native "SVGLocatable_getCTM_Callback";
+
+
+  /** @domName SVGLocatable.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGLocatable_getScreenCTM_Callback";
+
+
+  /** @domName SVGLocatable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGLocatable_getTransformToElement_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMPathElement
+class SVGMPathElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired {
+  SVGMPathElement.internal(): super.internal();
+
+
+  /** @domName SVGMPathElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGMPathElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGMPathElement.href */
+  SVGAnimatedString get href native "SVGMPathElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMarkerElement
+class SVGMarkerElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable {
+  SVGMarkerElement.internal(): super.internal();
+
+  static const int SVG_MARKERUNITS_STROKEWIDTH = 2;
+
+  static const int SVG_MARKERUNITS_UNKNOWN = 0;
+
+  static const int SVG_MARKERUNITS_USERSPACEONUSE = 1;
+
+  static const int SVG_MARKER_ORIENT_ANGLE = 2;
+
+  static const int SVG_MARKER_ORIENT_AUTO = 1;
+
+  static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
+
+
+  /** @domName SVGMarkerElement.markerHeight */
+  SVGAnimatedLength get markerHeight native "SVGMarkerElement_markerHeight_Getter";
+
+
+  /** @domName SVGMarkerElement.markerUnits */
+  SVGAnimatedEnumeration get markerUnits native "SVGMarkerElement_markerUnits_Getter";
+
+
+  /** @domName SVGMarkerElement.markerWidth */
+  SVGAnimatedLength get markerWidth native "SVGMarkerElement_markerWidth_Getter";
+
+
+  /** @domName SVGMarkerElement.orientAngle */
+  SVGAnimatedAngle get orientAngle native "SVGMarkerElement_orientAngle_Getter";
+
+
+  /** @domName SVGMarkerElement.orientType */
+  SVGAnimatedEnumeration get orientType native "SVGMarkerElement_orientType_Getter";
+
+
+  /** @domName SVGMarkerElement.refX */
+  SVGAnimatedLength get refX native "SVGMarkerElement_refX_Getter";
+
+
+  /** @domName SVGMarkerElement.refY */
+  SVGAnimatedLength get refY native "SVGMarkerElement_refY_Getter";
+
+
+  /** @domName SVGMarkerElement.setOrientToAngle */
+  void setOrientToAngle(SVGAngle angle) native "SVGMarkerElement_setOrientToAngle_Callback";
+
+
+  /** @domName SVGMarkerElement.setOrientToAuto */
+  void setOrientToAuto() native "SVGMarkerElement_setOrientToAuto_Callback";
+
+
+  /** @domName SVGMarkerElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGMarkerElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGMarkerElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGMarkerElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGMarkerElement.viewBox */
+  SVGAnimatedRect get viewBox native "SVGMarkerElement_viewBox_Getter";
+
+
+  /** @domName SVGMarkerElement.xmllang */
+  String get xmllang native "SVGMarkerElement_xmllang_Getter";
+
+
+  /** @domName SVGMarkerElement.xmllang */
+  void set xmllang(String value) native "SVGMarkerElement_xmllang_Setter";
+
+
+  /** @domName SVGMarkerElement.xmlspace */
+  String get xmlspace native "SVGMarkerElement_xmlspace_Getter";
+
+
+  /** @domName SVGMarkerElement.xmlspace */
+  void set xmlspace(String value) native "SVGMarkerElement_xmlspace_Setter";
+
+
+  /** @domName SVGMarkerElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGMarkerElement_className_Getter";
+
+
+  /** @domName SVGMarkerElement.style */
+  CSSStyleDeclaration get style native "SVGMarkerElement_style_Getter";
+
+
+  /** @domName SVGMarkerElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGMarkerElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMaskElement
+class SVGMaskElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired {
+  SVGMaskElement.internal(): super.internal();
+
+
+  /** @domName SVGMaskElement.height */
+  SVGAnimatedLength get height native "SVGMaskElement_height_Getter";
+
+
+  /** @domName SVGMaskElement.maskContentUnits */
+  SVGAnimatedEnumeration get maskContentUnits native "SVGMaskElement_maskContentUnits_Getter";
+
+
+  /** @domName SVGMaskElement.maskUnits */
+  SVGAnimatedEnumeration get maskUnits native "SVGMaskElement_maskUnits_Getter";
+
+
+  /** @domName SVGMaskElement.width */
+  SVGAnimatedLength get width native "SVGMaskElement_width_Getter";
+
+
+  /** @domName SVGMaskElement.x */
+  SVGAnimatedLength get x native "SVGMaskElement_x_Getter";
+
+
+  /** @domName SVGMaskElement.y */
+  SVGAnimatedLength get y native "SVGMaskElement_y_Getter";
+
+
+  /** @domName SVGMaskElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGMaskElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGMaskElement.xmllang */
+  String get xmllang native "SVGMaskElement_xmllang_Getter";
+
+
+  /** @domName SVGMaskElement.xmllang */
+  void set xmllang(String value) native "SVGMaskElement_xmllang_Setter";
+
+
+  /** @domName SVGMaskElement.xmlspace */
+  String get xmlspace native "SVGMaskElement_xmlspace_Getter";
+
+
+  /** @domName SVGMaskElement.xmlspace */
+  void set xmlspace(String value) native "SVGMaskElement_xmlspace_Setter";
+
+
+  /** @domName SVGMaskElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGMaskElement_className_Getter";
+
+
+  /** @domName SVGMaskElement.style */
+  CSSStyleDeclaration get style native "SVGMaskElement_style_Getter";
+
+
+  /** @domName SVGMaskElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGMaskElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGMaskElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGMaskElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGMaskElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGMaskElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGMaskElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGMaskElement_systemLanguage_Getter";
+
+
+  /** @domName SVGMaskElement.hasExtension */
+  bool hasExtension(String extension) native "SVGMaskElement_hasExtension_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMatrix
+class SVGMatrix extends NativeFieldWrapperClass1 {
+  SVGMatrix.internal();
+
+
+  /** @domName SVGMatrix.a */
+  num get a native "SVGMatrix_a_Getter";
+
+
+  /** @domName SVGMatrix.a */
+  void set a(num value) native "SVGMatrix_a_Setter";
+
+
+  /** @domName SVGMatrix.b */
+  num get b native "SVGMatrix_b_Getter";
+
+
+  /** @domName SVGMatrix.b */
+  void set b(num value) native "SVGMatrix_b_Setter";
+
+
+  /** @domName SVGMatrix.c */
+  num get c native "SVGMatrix_c_Getter";
+
+
+  /** @domName SVGMatrix.c */
+  void set c(num value) native "SVGMatrix_c_Setter";
+
+
+  /** @domName SVGMatrix.d */
+  num get d native "SVGMatrix_d_Getter";
+
+
+  /** @domName SVGMatrix.d */
+  void set d(num value) native "SVGMatrix_d_Setter";
+
+
+  /** @domName SVGMatrix.e */
+  num get e native "SVGMatrix_e_Getter";
+
+
+  /** @domName SVGMatrix.e */
+  void set e(num value) native "SVGMatrix_e_Setter";
+
+
+  /** @domName SVGMatrix.f */
+  num get f native "SVGMatrix_f_Getter";
+
+
+  /** @domName SVGMatrix.f */
+  void set f(num value) native "SVGMatrix_f_Setter";
+
+
+  /** @domName SVGMatrix.flipX */
+  SVGMatrix flipX() native "SVGMatrix_flipX_Callback";
+
+
+  /** @domName SVGMatrix.flipY */
+  SVGMatrix flipY() native "SVGMatrix_flipY_Callback";
+
+
+  /** @domName SVGMatrix.inverse */
+  SVGMatrix inverse() native "SVGMatrix_inverse_Callback";
+
+
+  /** @domName SVGMatrix.multiply */
+  SVGMatrix multiply(SVGMatrix secondMatrix) native "SVGMatrix_multiply_Callback";
+
+
+  /** @domName SVGMatrix.rotate */
+  SVGMatrix rotate(num angle) native "SVGMatrix_rotate_Callback";
+
+
+  /** @domName SVGMatrix.rotateFromVector */
+  SVGMatrix rotateFromVector(num x, num y) native "SVGMatrix_rotateFromVector_Callback";
+
+
+  /** @domName SVGMatrix.scale */
+  SVGMatrix scale(num scaleFactor) native "SVGMatrix_scale_Callback";
+
+
+  /** @domName SVGMatrix.scaleNonUniform */
+  SVGMatrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native "SVGMatrix_scaleNonUniform_Callback";
+
+
+  /** @domName SVGMatrix.skewX */
+  SVGMatrix skewX(num angle) native "SVGMatrix_skewX_Callback";
+
+
+  /** @domName SVGMatrix.skewY */
+  SVGMatrix skewY(num angle) native "SVGMatrix_skewY_Callback";
+
+
+  /** @domName SVGMatrix.translate */
+  SVGMatrix translate(num x, num y) native "SVGMatrix_translate_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMetadataElement
+class SVGMetadataElement extends SVGElement {
+  SVGMetadataElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGMissingGlyphElement
+class SVGMissingGlyphElement extends SVGElement {
+  SVGMissingGlyphElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGNumber
+class SVGNumber extends NativeFieldWrapperClass1 {
+  SVGNumber.internal();
+
+
+  /** @domName SVGNumber.value */
+  num get value native "SVGNumber_value_Getter";
+
+
+  /** @domName SVGNumber.value */
+  void set value(num value) native "SVGNumber_value_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGNumberList
+class SVGNumberList extends NativeFieldWrapperClass1 implements List<SVGNumber> {
+  SVGNumberList.internal();
+
+
+  /** @domName SVGNumberList.numberOfItems */
+  int get numberOfItems native "SVGNumberList_numberOfItems_Getter";
+
+  SVGNumber operator[](int index) native "SVGNumberList_item_Callback";
+
+  void operator[]=(int index, SVGNumber value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGNumber> mixins.
+  // SVGNumber is the element type.
+
+  // From Iterable<SVGNumber>:
+
+  Iterator<SVGNumber> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGNumber>(this);
+  }
+
+  // From Collection<SVGNumber>:
+
+  void add(SVGNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGNumber value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGNumber> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGNumber element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGNumber element)) => _Collections.map(this, [], f);
+
+  Collection<SVGNumber> filter(bool f(SVGNumber element)) =>
+     _Collections.filter(this, <SVGNumber>[], f);
+
+  bool every(bool f(SVGNumber element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGNumber element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGNumber>:
+
+  void sort([Comparator<SVGNumber> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGNumber element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGNumber element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGNumber get last => this[length - 1];
+
+  SVGNumber removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGNumber initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGNumber> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGNumber>[]);
+
+  // -- end List<SVGNumber> mixins.
+
+
+  /** @domName SVGNumberList.appendItem */
+  SVGNumber appendItem(SVGNumber item) native "SVGNumberList_appendItem_Callback";
+
+
+  /** @domName SVGNumberList.clear */
+  void clear() native "SVGNumberList_clear_Callback";
+
+
+  /** @domName SVGNumberList.getItem */
+  SVGNumber getItem(int index) native "SVGNumberList_getItem_Callback";
+
+
+  /** @domName SVGNumberList.initialize */
+  SVGNumber initialize(SVGNumber item) native "SVGNumberList_initialize_Callback";
+
+
+  /** @domName SVGNumberList.insertItemBefore */
+  SVGNumber insertItemBefore(SVGNumber item, int index) native "SVGNumberList_insertItemBefore_Callback";
+
+
+  /** @domName SVGNumberList.removeItem */
+  SVGNumber removeItem(int index) native "SVGNumberList_removeItem_Callback";
+
+
+  /** @domName SVGNumberList.replaceItem */
+  SVGNumber replaceItem(SVGNumber item, int index) native "SVGNumberList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPaint
+class SVGPaint extends SVGColor {
+  SVGPaint.internal(): super.internal();
+
+  static const int SVG_PAINTTYPE_CURRENTCOLOR = 102;
+
+  static const int SVG_PAINTTYPE_NONE = 101;
+
+  static const int SVG_PAINTTYPE_RGBCOLOR = 1;
+
+  static const int SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
+
+  static const int SVG_PAINTTYPE_UNKNOWN = 0;
+
+  static const int SVG_PAINTTYPE_URI = 107;
+
+  static const int SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
+
+  static const int SVG_PAINTTYPE_URI_NONE = 103;
+
+  static const int SVG_PAINTTYPE_URI_RGBCOLOR = 105;
+
+  static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
+
+
+  /** @domName SVGPaint.paintType */
+  int get paintType native "SVGPaint_paintType_Getter";
+
+
+  /** @domName SVGPaint.uri */
+  String get uri native "SVGPaint_uri_Getter";
+
+
+  /** @domName SVGPaint.setPaint */
+  void setPaint(int paintType, String uri, String rgbColor, String iccColor) native "SVGPaint_setPaint_Callback";
+
+
+  /** @domName SVGPaint.setUri */
+  void setUri(String uri) native "SVGPaint_setUri_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathElement
+class SVGPathElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGPathElement.internal(): super.internal();
+
+
+  /** @domName SVGPathElement.animatedNormalizedPathSegList */
+  SVGPathSegList get animatedNormalizedPathSegList native "SVGPathElement_animatedNormalizedPathSegList_Getter";
+
+
+  /** @domName SVGPathElement.animatedPathSegList */
+  SVGPathSegList get animatedPathSegList native "SVGPathElement_animatedPathSegList_Getter";
+
+
+  /** @domName SVGPathElement.normalizedPathSegList */
+  SVGPathSegList get normalizedPathSegList native "SVGPathElement_normalizedPathSegList_Getter";
+
+
+  /** @domName SVGPathElement.pathLength */
+  SVGAnimatedNumber get pathLength native "SVGPathElement_pathLength_Getter";
+
+
+  /** @domName SVGPathElement.pathSegList */
+  SVGPathSegList get pathSegList native "SVGPathElement_pathSegList_Getter";
+
+
+  /** @domName SVGPathElement.createSVGPathSegArcAbs */
+  SVGPathSegArcAbs createSVGPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegArcRel */
+  SVGPathSegArcRel createSVGPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegClosePath */
+  SVGPathSegClosePath createSVGPathSegClosePath() native "SVGPathElement_createSVGPathSegClosePath_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicAbs */
+  SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicRel */
+  SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs */
+  SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel */
+  SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticAbs */
+  SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticRel */
+  SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs */
+  SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel */
+  SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoAbs */
+  SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegLinetoAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalAbs */
+  SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoHorizontalRel */
+  SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoRel */
+  SVGPathSegLinetoRel createSVGPathSegLinetoRel(num x, num y) native "SVGPathElement_createSVGPathSegLinetoRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalAbs */
+  SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegLinetoVerticalRel */
+  SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalRel_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegMovetoAbs */
+  SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegMovetoAbs_Callback";
+
+
+  /** @domName SVGPathElement.createSVGPathSegMovetoRel */
+  SVGPathSegMovetoRel createSVGPathSegMovetoRel(num x, num y) native "SVGPathElement_createSVGPathSegMovetoRel_Callback";
+
+
+  /** @domName SVGPathElement.getPathSegAtLength */
+  int getPathSegAtLength(num distance) native "SVGPathElement_getPathSegAtLength_Callback";
+
+
+  /** @domName SVGPathElement.getPointAtLength */
+  SVGPoint getPointAtLength(num distance) native "SVGPathElement_getPointAtLength_Callback";
+
+
+  /** @domName SVGPathElement.getTotalLength */
+  num getTotalLength() native "SVGPathElement_getTotalLength_Callback";
+
+
+  /** @domName SVGPathElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGPathElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGPathElement.xmllang */
+  String get xmllang native "SVGPathElement_xmllang_Getter";
+
+
+  /** @domName SVGPathElement.xmllang */
+  void set xmllang(String value) native "SVGPathElement_xmllang_Setter";
+
+
+  /** @domName SVGPathElement.xmlspace */
+  String get xmlspace native "SVGPathElement_xmlspace_Getter";
+
+
+  /** @domName SVGPathElement.xmlspace */
+  void set xmlspace(String value) native "SVGPathElement_xmlspace_Setter";
+
+
+  /** @domName SVGPathElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGPathElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGPathElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGPathElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGPathElement.getBBox */
+  SVGRect getBBox() native "SVGPathElement_getBBox_Callback";
+
+
+  /** @domName SVGPathElement.getCTM */
+  SVGMatrix getCTM() native "SVGPathElement_getCTM_Callback";
+
+
+  /** @domName SVGPathElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGPathElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGPathElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGPathElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGPathElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGPathElement_className_Getter";
+
+
+  /** @domName SVGPathElement.style */
+  CSSStyleDeclaration get style native "SVGPathElement_style_Getter";
+
+
+  /** @domName SVGPathElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGPathElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGPathElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGPathElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGPathElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGPathElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGPathElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGPathElement_systemLanguage_Getter";
+
+
+  /** @domName SVGPathElement.hasExtension */
+  bool hasExtension(String extension) native "SVGPathElement_hasExtension_Callback";
+
+
+  /** @domName SVGPathElement.transform */
+  SVGAnimatedTransformList get transform native "SVGPathElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSeg
+class SVGPathSeg extends NativeFieldWrapperClass1 {
+  SVGPathSeg.internal();
+
+  static const int PATHSEG_ARC_ABS = 10;
+
+  static const int PATHSEG_ARC_REL = 11;
+
+  static const int PATHSEG_CLOSEPATH = 1;
+
+  static const int PATHSEG_CURVETO_CUBIC_ABS = 6;
+
+  static const int PATHSEG_CURVETO_CUBIC_REL = 7;
+
+  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
+
+  static const int PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_ABS = 8;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_REL = 9;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+
+  static const int PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+
+  static const int PATHSEG_LINETO_ABS = 4;
+
+  static const int PATHSEG_LINETO_HORIZONTAL_ABS = 12;
+
+  static const int PATHSEG_LINETO_HORIZONTAL_REL = 13;
+
+  static const int PATHSEG_LINETO_REL = 5;
+
+  static const int PATHSEG_LINETO_VERTICAL_ABS = 14;
+
+  static const int PATHSEG_LINETO_VERTICAL_REL = 15;
+
+  static const int PATHSEG_MOVETO_ABS = 2;
+
+  static const int PATHSEG_MOVETO_REL = 3;
+
+  static const int PATHSEG_UNKNOWN = 0;
+
+
+  /** @domName SVGPathSeg.pathSegType */
+  int get pathSegType native "SVGPathSeg_pathSegType_Getter";
+
+
+  /** @domName SVGPathSeg.pathSegTypeAsLetter */
+  String get pathSegTypeAsLetter native "SVGPathSeg_pathSegTypeAsLetter_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegArcAbs
+class SVGPathSegArcAbs extends SVGPathSeg {
+  SVGPathSegArcAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegArcAbs.angle */
+  num get angle native "SVGPathSegArcAbs_angle_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.angle */
+  void set angle(num value) native "SVGPathSegArcAbs_angle_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.largeArcFlag */
+  bool get largeArcFlag native "SVGPathSegArcAbs_largeArcFlag_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.largeArcFlag */
+  void set largeArcFlag(bool value) native "SVGPathSegArcAbs_largeArcFlag_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.r1 */
+  num get r1 native "SVGPathSegArcAbs_r1_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.r1 */
+  void set r1(num value) native "SVGPathSegArcAbs_r1_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.r2 */
+  num get r2 native "SVGPathSegArcAbs_r2_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.r2 */
+  void set r2(num value) native "SVGPathSegArcAbs_r2_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.sweepFlag */
+  bool get sweepFlag native "SVGPathSegArcAbs_sweepFlag_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.sweepFlag */
+  void set sweepFlag(bool value) native "SVGPathSegArcAbs_sweepFlag_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.x */
+  num get x native "SVGPathSegArcAbs_x_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.x */
+  void set x(num value) native "SVGPathSegArcAbs_x_Setter";
+
+
+  /** @domName SVGPathSegArcAbs.y */
+  num get y native "SVGPathSegArcAbs_y_Getter";
+
+
+  /** @domName SVGPathSegArcAbs.y */
+  void set y(num value) native "SVGPathSegArcAbs_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegArcRel
+class SVGPathSegArcRel extends SVGPathSeg {
+  SVGPathSegArcRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegArcRel.angle */
+  num get angle native "SVGPathSegArcRel_angle_Getter";
+
+
+  /** @domName SVGPathSegArcRel.angle */
+  void set angle(num value) native "SVGPathSegArcRel_angle_Setter";
+
+
+  /** @domName SVGPathSegArcRel.largeArcFlag */
+  bool get largeArcFlag native "SVGPathSegArcRel_largeArcFlag_Getter";
+
+
+  /** @domName SVGPathSegArcRel.largeArcFlag */
+  void set largeArcFlag(bool value) native "SVGPathSegArcRel_largeArcFlag_Setter";
+
+
+  /** @domName SVGPathSegArcRel.r1 */
+  num get r1 native "SVGPathSegArcRel_r1_Getter";
+
+
+  /** @domName SVGPathSegArcRel.r1 */
+  void set r1(num value) native "SVGPathSegArcRel_r1_Setter";
+
+
+  /** @domName SVGPathSegArcRel.r2 */
+  num get r2 native "SVGPathSegArcRel_r2_Getter";
+
+
+  /** @domName SVGPathSegArcRel.r2 */
+  void set r2(num value) native "SVGPathSegArcRel_r2_Setter";
+
+
+  /** @domName SVGPathSegArcRel.sweepFlag */
+  bool get sweepFlag native "SVGPathSegArcRel_sweepFlag_Getter";
+
+
+  /** @domName SVGPathSegArcRel.sweepFlag */
+  void set sweepFlag(bool value) native "SVGPathSegArcRel_sweepFlag_Setter";
+
+
+  /** @domName SVGPathSegArcRel.x */
+  num get x native "SVGPathSegArcRel_x_Getter";
+
+
+  /** @domName SVGPathSegArcRel.x */
+  void set x(num value) native "SVGPathSegArcRel_x_Setter";
+
+
+  /** @domName SVGPathSegArcRel.y */
+  num get y native "SVGPathSegArcRel_y_Getter";
+
+
+  /** @domName SVGPathSegArcRel.y */
+  void set y(num value) native "SVGPathSegArcRel_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegClosePath
+class SVGPathSegClosePath extends SVGPathSeg {
+  SVGPathSegClosePath.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoCubicAbs
+class SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+  SVGPathSegCurvetoCubicAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x */
+  num get x native "SVGPathSegCurvetoCubicAbs_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x */
+  void set x(num value) native "SVGPathSegCurvetoCubicAbs_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
+  num get x1 native "SVGPathSegCurvetoCubicAbs_x1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x1 */
+  void set x1(num value) native "SVGPathSegCurvetoCubicAbs_x1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
+  num get x2 native "SVGPathSegCurvetoCubicAbs_x2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.x2 */
+  void set x2(num value) native "SVGPathSegCurvetoCubicAbs_x2_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y */
+  num get y native "SVGPathSegCurvetoCubicAbs_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y */
+  void set y(num value) native "SVGPathSegCurvetoCubicAbs_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
+  num get y1 native "SVGPathSegCurvetoCubicAbs_y1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y1 */
+  void set y1(num value) native "SVGPathSegCurvetoCubicAbs_y1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
+  num get y2 native "SVGPathSegCurvetoCubicAbs_y2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicAbs.y2 */
+  void set y2(num value) native "SVGPathSegCurvetoCubicAbs_y2_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoCubicRel
+class SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+  SVGPathSegCurvetoCubicRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x */
+  num get x native "SVGPathSegCurvetoCubicRel_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x */
+  void set x(num value) native "SVGPathSegCurvetoCubicRel_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x1 */
+  num get x1 native "SVGPathSegCurvetoCubicRel_x1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x1 */
+  void set x1(num value) native "SVGPathSegCurvetoCubicRel_x1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x2 */
+  num get x2 native "SVGPathSegCurvetoCubicRel_x2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.x2 */
+  void set x2(num value) native "SVGPathSegCurvetoCubicRel_x2_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y */
+  num get y native "SVGPathSegCurvetoCubicRel_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y */
+  void set y(num value) native "SVGPathSegCurvetoCubicRel_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y1 */
+  num get y1 native "SVGPathSegCurvetoCubicRel_y1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y1 */
+  void set y1(num value) native "SVGPathSegCurvetoCubicRel_y1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y2 */
+  num get y2 native "SVGPathSegCurvetoCubicRel_y2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicRel.y2 */
+  void set y2(num value) native "SVGPathSegCurvetoCubicRel_y2_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoCubicSmoothAbs
+class SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+  SVGPathSegCurvetoCubicSmoothAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
+  num get x native "SVGPathSegCurvetoCubicSmoothAbs_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x */
+  void set x(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
+  num get x2 native "SVGPathSegCurvetoCubicSmoothAbs_x2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.x2 */
+  void set x2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x2_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
+  num get y native "SVGPathSegCurvetoCubicSmoothAbs_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y */
+  void set y(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
+  num get y2 native "SVGPathSegCurvetoCubicSmoothAbs_y2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothAbs.y2 */
+  void set y2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y2_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoCubicSmoothRel
+class SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+  SVGPathSegCurvetoCubicSmoothRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
+  num get x native "SVGPathSegCurvetoCubicSmoothRel_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x */
+  void set x(num value) native "SVGPathSegCurvetoCubicSmoothRel_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
+  num get x2 native "SVGPathSegCurvetoCubicSmoothRel_x2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.x2 */
+  void set x2(num value) native "SVGPathSegCurvetoCubicSmoothRel_x2_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
+  num get y native "SVGPathSegCurvetoCubicSmoothRel_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y */
+  void set y(num value) native "SVGPathSegCurvetoCubicSmoothRel_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
+  num get y2 native "SVGPathSegCurvetoCubicSmoothRel_y2_Getter";
+
+
+  /** @domName SVGPathSegCurvetoCubicSmoothRel.y2 */
+  void set y2(num value) native "SVGPathSegCurvetoCubicSmoothRel_y2_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoQuadraticAbs
+class SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+  SVGPathSegCurvetoQuadraticAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
+  num get x native "SVGPathSegCurvetoQuadraticAbs_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x */
+  void set x(num value) native "SVGPathSegCurvetoQuadraticAbs_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
+  num get x1 native "SVGPathSegCurvetoQuadraticAbs_x1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.x1 */
+  void set x1(num value) native "SVGPathSegCurvetoQuadraticAbs_x1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
+  num get y native "SVGPathSegCurvetoQuadraticAbs_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y */
+  void set y(num value) native "SVGPathSegCurvetoQuadraticAbs_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
+  num get y1 native "SVGPathSegCurvetoQuadraticAbs_y1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticAbs.y1 */
+  void set y1(num value) native "SVGPathSegCurvetoQuadraticAbs_y1_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoQuadraticRel
+class SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+  SVGPathSegCurvetoQuadraticRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x */
+  num get x native "SVGPathSegCurvetoQuadraticRel_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x */
+  void set x(num value) native "SVGPathSegCurvetoQuadraticRel_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
+  num get x1 native "SVGPathSegCurvetoQuadraticRel_x1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.x1 */
+  void set x1(num value) native "SVGPathSegCurvetoQuadraticRel_x1_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y */
+  num get y native "SVGPathSegCurvetoQuadraticRel_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y */
+  void set y(num value) native "SVGPathSegCurvetoQuadraticRel_y_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
+  num get y1 native "SVGPathSegCurvetoQuadraticRel_y1_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticRel.y1 */
+  void set y1(num value) native "SVGPathSegCurvetoQuadraticRel_y1_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoQuadraticSmoothAbs
+class SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+  SVGPathSegCurvetoQuadraticSmoothAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
+  num get x native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.x */
+  void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
+  num get y native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothAbs.y */
+  void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegCurvetoQuadraticSmoothRel
+class SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+  SVGPathSegCurvetoQuadraticSmoothRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
+  num get x native "SVGPathSegCurvetoQuadraticSmoothRel_x_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.x */
+  void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_x_Setter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
+  num get y native "SVGPathSegCurvetoQuadraticSmoothRel_y_Getter";
+
+
+  /** @domName SVGPathSegCurvetoQuadraticSmoothRel.y */
+  void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoAbs
+class SVGPathSegLinetoAbs extends SVGPathSeg {
+  SVGPathSegLinetoAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoAbs.x */
+  num get x native "SVGPathSegLinetoAbs_x_Getter";
+
+
+  /** @domName SVGPathSegLinetoAbs.x */
+  void set x(num value) native "SVGPathSegLinetoAbs_x_Setter";
+
+
+  /** @domName SVGPathSegLinetoAbs.y */
+  num get y native "SVGPathSegLinetoAbs_y_Getter";
+
+
+  /** @domName SVGPathSegLinetoAbs.y */
+  void set y(num value) native "SVGPathSegLinetoAbs_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoHorizontalAbs
+class SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+  SVGPathSegLinetoHorizontalAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoHorizontalAbs.x */
+  num get x native "SVGPathSegLinetoHorizontalAbs_x_Getter";
+
+
+  /** @domName SVGPathSegLinetoHorizontalAbs.x */
+  void set x(num value) native "SVGPathSegLinetoHorizontalAbs_x_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoHorizontalRel
+class SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+  SVGPathSegLinetoHorizontalRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoHorizontalRel.x */
+  num get x native "SVGPathSegLinetoHorizontalRel_x_Getter";
+
+
+  /** @domName SVGPathSegLinetoHorizontalRel.x */
+  void set x(num value) native "SVGPathSegLinetoHorizontalRel_x_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoRel
+class SVGPathSegLinetoRel extends SVGPathSeg {
+  SVGPathSegLinetoRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoRel.x */
+  num get x native "SVGPathSegLinetoRel_x_Getter";
+
+
+  /** @domName SVGPathSegLinetoRel.x */
+  void set x(num value) native "SVGPathSegLinetoRel_x_Setter";
+
+
+  /** @domName SVGPathSegLinetoRel.y */
+  num get y native "SVGPathSegLinetoRel_y_Getter";
+
+
+  /** @domName SVGPathSegLinetoRel.y */
+  void set y(num value) native "SVGPathSegLinetoRel_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoVerticalAbs
+class SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+  SVGPathSegLinetoVerticalAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoVerticalAbs.y */
+  num get y native "SVGPathSegLinetoVerticalAbs_y_Getter";
+
+
+  /** @domName SVGPathSegLinetoVerticalAbs.y */
+  void set y(num value) native "SVGPathSegLinetoVerticalAbs_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegLinetoVerticalRel
+class SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+  SVGPathSegLinetoVerticalRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegLinetoVerticalRel.y */
+  num get y native "SVGPathSegLinetoVerticalRel_y_Getter";
+
+
+  /** @domName SVGPathSegLinetoVerticalRel.y */
+  void set y(num value) native "SVGPathSegLinetoVerticalRel_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegList
+class SVGPathSegList extends NativeFieldWrapperClass1 implements List<SVGPathSeg> {
+  SVGPathSegList.internal();
+
+
+  /** @domName SVGPathSegList.numberOfItems */
+  int get numberOfItems native "SVGPathSegList_numberOfItems_Getter";
+
+  SVGPathSeg operator[](int index) native "SVGPathSegList_item_Callback";
+
+  void operator[]=(int index, SVGPathSeg value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGPathSeg> mixins.
+  // SVGPathSeg is the element type.
+
+  // From Iterable<SVGPathSeg>:
+
+  Iterator<SVGPathSeg> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGPathSeg>(this);
+  }
+
+  // From Collection<SVGPathSeg>:
+
+  void add(SVGPathSeg value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGPathSeg value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGPathSeg> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGPathSeg element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f);
+
+  Collection<SVGPathSeg> filter(bool f(SVGPathSeg element)) =>
+     _Collections.filter(this, <SVGPathSeg>[], f);
+
+  bool every(bool f(SVGPathSeg element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGPathSeg element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGPathSeg>:
+
+  void sort([Comparator<SVGPathSeg> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGPathSeg element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGPathSeg element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGPathSeg get last => this[length - 1];
+
+  SVGPathSeg removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGPathSeg initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGPathSeg> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGPathSeg>[]);
+
+  // -- end List<SVGPathSeg> mixins.
+
+
+  /** @domName SVGPathSegList.appendItem */
+  SVGPathSeg appendItem(SVGPathSeg newItem) native "SVGPathSegList_appendItem_Callback";
+
+
+  /** @domName SVGPathSegList.clear */
+  void clear() native "SVGPathSegList_clear_Callback";
+
+
+  /** @domName SVGPathSegList.getItem */
+  SVGPathSeg getItem(int index) native "SVGPathSegList_getItem_Callback";
+
+
+  /** @domName SVGPathSegList.initialize */
+  SVGPathSeg initialize(SVGPathSeg newItem) native "SVGPathSegList_initialize_Callback";
+
+
+  /** @domName SVGPathSegList.insertItemBefore */
+  SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index) native "SVGPathSegList_insertItemBefore_Callback";
+
+
+  /** @domName SVGPathSegList.removeItem */
+  SVGPathSeg removeItem(int index) native "SVGPathSegList_removeItem_Callback";
+
+
+  /** @domName SVGPathSegList.replaceItem */
+  SVGPathSeg replaceItem(SVGPathSeg newItem, int index) native "SVGPathSegList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegMovetoAbs
+class SVGPathSegMovetoAbs extends SVGPathSeg {
+  SVGPathSegMovetoAbs.internal(): super.internal();
+
+
+  /** @domName SVGPathSegMovetoAbs.x */
+  num get x native "SVGPathSegMovetoAbs_x_Getter";
+
+
+  /** @domName SVGPathSegMovetoAbs.x */
+  void set x(num value) native "SVGPathSegMovetoAbs_x_Setter";
+
+
+  /** @domName SVGPathSegMovetoAbs.y */
+  num get y native "SVGPathSegMovetoAbs_y_Getter";
+
+
+  /** @domName SVGPathSegMovetoAbs.y */
+  void set y(num value) native "SVGPathSegMovetoAbs_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPathSegMovetoRel
+class SVGPathSegMovetoRel extends SVGPathSeg {
+  SVGPathSegMovetoRel.internal(): super.internal();
+
+
+  /** @domName SVGPathSegMovetoRel.x */
+  num get x native "SVGPathSegMovetoRel_x_Getter";
+
+
+  /** @domName SVGPathSegMovetoRel.x */
+  void set x(num value) native "SVGPathSegMovetoRel_x_Setter";
+
+
+  /** @domName SVGPathSegMovetoRel.y */
+  num get y native "SVGPathSegMovetoRel_y_Getter";
+
+
+  /** @domName SVGPathSegMovetoRel.y */
+  void set y(num value) native "SVGPathSegMovetoRel_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPatternElement
+class SVGPatternElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGFitToViewBox, SVGExternalResourcesRequired {
+  SVGPatternElement.internal(): super.internal();
+
+
+  /** @domName SVGPatternElement.height */
+  SVGAnimatedLength get height native "SVGPatternElement_height_Getter";
+
+
+  /** @domName SVGPatternElement.patternContentUnits */
+  SVGAnimatedEnumeration get patternContentUnits native "SVGPatternElement_patternContentUnits_Getter";
+
+
+  /** @domName SVGPatternElement.patternTransform */
+  SVGAnimatedTransformList get patternTransform native "SVGPatternElement_patternTransform_Getter";
+
+
+  /** @domName SVGPatternElement.patternUnits */
+  SVGAnimatedEnumeration get patternUnits native "SVGPatternElement_patternUnits_Getter";
+
+
+  /** @domName SVGPatternElement.width */
+  SVGAnimatedLength get width native "SVGPatternElement_width_Getter";
+
+
+  /** @domName SVGPatternElement.x */
+  SVGAnimatedLength get x native "SVGPatternElement_x_Getter";
+
+
+  /** @domName SVGPatternElement.y */
+  SVGAnimatedLength get y native "SVGPatternElement_y_Getter";
+
+
+  /** @domName SVGPatternElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGPatternElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGPatternElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGPatternElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGPatternElement.viewBox */
+  SVGAnimatedRect get viewBox native "SVGPatternElement_viewBox_Getter";
+
+
+  /** @domName SVGPatternElement.xmllang */
+  String get xmllang native "SVGPatternElement_xmllang_Getter";
+
+
+  /** @domName SVGPatternElement.xmllang */
+  void set xmllang(String value) native "SVGPatternElement_xmllang_Setter";
+
+
+  /** @domName SVGPatternElement.xmlspace */
+  String get xmlspace native "SVGPatternElement_xmlspace_Getter";
+
+
+  /** @domName SVGPatternElement.xmlspace */
+  void set xmlspace(String value) native "SVGPatternElement_xmlspace_Setter";
+
+
+  /** @domName SVGPatternElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGPatternElement_className_Getter";
+
+
+  /** @domName SVGPatternElement.style */
+  CSSStyleDeclaration get style native "SVGPatternElement_style_Getter";
+
+
+  /** @domName SVGPatternElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGPatternElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGPatternElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGPatternElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGPatternElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGPatternElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGPatternElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGPatternElement_systemLanguage_Getter";
+
+
+  /** @domName SVGPatternElement.hasExtension */
+  bool hasExtension(String extension) native "SVGPatternElement_hasExtension_Callback";
+
+
+  /** @domName SVGPatternElement.href */
+  SVGAnimatedString get href native "SVGPatternElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPoint
+class SVGPoint extends NativeFieldWrapperClass1 {
+  SVGPoint.internal();
+
+
+  /** @domName SVGPoint.x */
+  num get x native "SVGPoint_x_Getter";
+
+
+  /** @domName SVGPoint.x */
+  void set x(num value) native "SVGPoint_x_Setter";
+
+
+  /** @domName SVGPoint.y */
+  num get y native "SVGPoint_y_Getter";
+
+
+  /** @domName SVGPoint.y */
+  void set y(num value) native "SVGPoint_y_Setter";
+
+
+  /** @domName SVGPoint.matrixTransform */
+  SVGPoint matrixTransform(SVGMatrix matrix) native "SVGPoint_matrixTransform_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPointList
+class SVGPointList extends NativeFieldWrapperClass1 {
+  SVGPointList.internal();
+
+
+  /** @domName SVGPointList.numberOfItems */
+  int get numberOfItems native "SVGPointList_numberOfItems_Getter";
+
+
+  /** @domName SVGPointList.appendItem */
+  SVGPoint appendItem(SVGPoint item) native "SVGPointList_appendItem_Callback";
+
+
+  /** @domName SVGPointList.clear */
+  void clear() native "SVGPointList_clear_Callback";
+
+
+  /** @domName SVGPointList.getItem */
+  SVGPoint getItem(int index) native "SVGPointList_getItem_Callback";
+
+
+  /** @domName SVGPointList.initialize */
+  SVGPoint initialize(SVGPoint item) native "SVGPointList_initialize_Callback";
+
+
+  /** @domName SVGPointList.insertItemBefore */
+  SVGPoint insertItemBefore(SVGPoint item, int index) native "SVGPointList_insertItemBefore_Callback";
+
+
+  /** @domName SVGPointList.removeItem */
+  SVGPoint removeItem(int index) native "SVGPointList_removeItem_Callback";
+
+
+  /** @domName SVGPointList.replaceItem */
+  SVGPoint replaceItem(SVGPoint item, int index) native "SVGPointList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPolygonElement
+class SVGPolygonElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGPolygonElement.internal(): super.internal();
+
+
+  /** @domName SVGPolygonElement.animatedPoints */
+  SVGPointList get animatedPoints native "SVGPolygonElement_animatedPoints_Getter";
+
+
+  /** @domName SVGPolygonElement.points */
+  SVGPointList get points native "SVGPolygonElement_points_Getter";
+
+
+  /** @domName SVGPolygonElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGPolygonElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGPolygonElement.xmllang */
+  String get xmllang native "SVGPolygonElement_xmllang_Getter";
+
+
+  /** @domName SVGPolygonElement.xmllang */
+  void set xmllang(String value) native "SVGPolygonElement_xmllang_Setter";
+
+
+  /** @domName SVGPolygonElement.xmlspace */
+  String get xmlspace native "SVGPolygonElement_xmlspace_Getter";
+
+
+  /** @domName SVGPolygonElement.xmlspace */
+  void set xmlspace(String value) native "SVGPolygonElement_xmlspace_Setter";
+
+
+  /** @domName SVGPolygonElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGPolygonElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGPolygonElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGPolygonElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGPolygonElement.getBBox */
+  SVGRect getBBox() native "SVGPolygonElement_getBBox_Callback";
+
+
+  /** @domName SVGPolygonElement.getCTM */
+  SVGMatrix getCTM() native "SVGPolygonElement_getCTM_Callback";
+
+
+  /** @domName SVGPolygonElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGPolygonElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGPolygonElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGPolygonElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGPolygonElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGPolygonElement_className_Getter";
+
+
+  /** @domName SVGPolygonElement.style */
+  CSSStyleDeclaration get style native "SVGPolygonElement_style_Getter";
+
+
+  /** @domName SVGPolygonElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGPolygonElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGPolygonElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGPolygonElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGPolygonElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGPolygonElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGPolygonElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGPolygonElement_systemLanguage_Getter";
+
+
+  /** @domName SVGPolygonElement.hasExtension */
+  bool hasExtension(String extension) native "SVGPolygonElement_hasExtension_Callback";
+
+
+  /** @domName SVGPolygonElement.transform */
+  SVGAnimatedTransformList get transform native "SVGPolygonElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPolylineElement
+class SVGPolylineElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGPolylineElement.internal(): super.internal();
+
+
+  /** @domName SVGPolylineElement.animatedPoints */
+  SVGPointList get animatedPoints native "SVGPolylineElement_animatedPoints_Getter";
+
+
+  /** @domName SVGPolylineElement.points */
+  SVGPointList get points native "SVGPolylineElement_points_Getter";
+
+
+  /** @domName SVGPolylineElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGPolylineElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGPolylineElement.xmllang */
+  String get xmllang native "SVGPolylineElement_xmllang_Getter";
+
+
+  /** @domName SVGPolylineElement.xmllang */
+  void set xmllang(String value) native "SVGPolylineElement_xmllang_Setter";
+
+
+  /** @domName SVGPolylineElement.xmlspace */
+  String get xmlspace native "SVGPolylineElement_xmlspace_Getter";
+
+
+  /** @domName SVGPolylineElement.xmlspace */
+  void set xmlspace(String value) native "SVGPolylineElement_xmlspace_Setter";
+
+
+  /** @domName SVGPolylineElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGPolylineElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGPolylineElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGPolylineElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGPolylineElement.getBBox */
+  SVGRect getBBox() native "SVGPolylineElement_getBBox_Callback";
+
+
+  /** @domName SVGPolylineElement.getCTM */
+  SVGMatrix getCTM() native "SVGPolylineElement_getCTM_Callback";
+
+
+  /** @domName SVGPolylineElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGPolylineElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGPolylineElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGPolylineElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGPolylineElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGPolylineElement_className_Getter";
+
+
+  /** @domName SVGPolylineElement.style */
+  CSSStyleDeclaration get style native "SVGPolylineElement_style_Getter";
+
+
+  /** @domName SVGPolylineElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGPolylineElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGPolylineElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGPolylineElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGPolylineElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGPolylineElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGPolylineElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGPolylineElement_systemLanguage_Getter";
+
+
+  /** @domName SVGPolylineElement.hasExtension */
+  bool hasExtension(String extension) native "SVGPolylineElement_hasExtension_Callback";
+
+
+  /** @domName SVGPolylineElement.transform */
+  SVGAnimatedTransformList get transform native "SVGPolylineElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGPreserveAspectRatio
+class SVGPreserveAspectRatio extends NativeFieldWrapperClass1 {
+  SVGPreserveAspectRatio.internal();
+
+  static const int SVG_MEETORSLICE_MEET = 1;
+
+  static const int SVG_MEETORSLICE_SLICE = 2;
+
+  static const int SVG_MEETORSLICE_UNKNOWN = 0;
+
+  static const int SVG_PRESERVEASPECTRATIO_NONE = 1;
+
+  static const int SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
+
+  static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
+
+
+  /** @domName SVGPreserveAspectRatio.align */
+  int get align native "SVGPreserveAspectRatio_align_Getter";
+
+
+  /** @domName SVGPreserveAspectRatio.align */
+  void set align(int value) native "SVGPreserveAspectRatio_align_Setter";
+
+
+  /** @domName SVGPreserveAspectRatio.meetOrSlice */
+  int get meetOrSlice native "SVGPreserveAspectRatio_meetOrSlice_Getter";
+
+
+  /** @domName SVGPreserveAspectRatio.meetOrSlice */
+  void set meetOrSlice(int value) native "SVGPreserveAspectRatio_meetOrSlice_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGRadialGradientElement
+class SVGRadialGradientElement extends SVGGradientElement {
+  SVGRadialGradientElement.internal(): super.internal();
+
+
+  /** @domName SVGRadialGradientElement.cx */
+  SVGAnimatedLength get cx native "SVGRadialGradientElement_cx_Getter";
+
+
+  /** @domName SVGRadialGradientElement.cy */
+  SVGAnimatedLength get cy native "SVGRadialGradientElement_cy_Getter";
+
+
+  /** @domName SVGRadialGradientElement.fr */
+  SVGAnimatedLength get fr native "SVGRadialGradientElement_fr_Getter";
+
+
+  /** @domName SVGRadialGradientElement.fx */
+  SVGAnimatedLength get fx native "SVGRadialGradientElement_fx_Getter";
+
+
+  /** @domName SVGRadialGradientElement.fy */
+  SVGAnimatedLength get fy native "SVGRadialGradientElement_fy_Getter";
+
+
+  /** @domName SVGRadialGradientElement.r */
+  SVGAnimatedLength get r native "SVGRadialGradientElement_r_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGRect
+class SVGRect extends NativeFieldWrapperClass1 {
+  SVGRect.internal();
+
+
+  /** @domName SVGRect.height */
+  num get height native "SVGRect_height_Getter";
+
+
+  /** @domName SVGRect.height */
+  void set height(num value) native "SVGRect_height_Setter";
+
+
+  /** @domName SVGRect.width */
+  num get width native "SVGRect_width_Getter";
+
+
+  /** @domName SVGRect.width */
+  void set width(num value) native "SVGRect_width_Setter";
+
+
+  /** @domName SVGRect.x */
+  num get x native "SVGRect_x_Getter";
+
+
+  /** @domName SVGRect.x */
+  void set x(num value) native "SVGRect_x_Setter";
+
+
+  /** @domName SVGRect.y */
+  num get y native "SVGRect_y_Getter";
+
+
+  /** @domName SVGRect.y */
+  void set y(num value) native "SVGRect_y_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGRectElement
+class SVGRectElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGRectElement.internal(): super.internal();
+
+
+  /** @domName SVGRectElement.height */
+  SVGAnimatedLength get height native "SVGRectElement_height_Getter";
+
+
+  /** @domName SVGRectElement.rx */
+  SVGAnimatedLength get rx native "SVGRectElement_rx_Getter";
+
+
+  /** @domName SVGRectElement.ry */
+  SVGAnimatedLength get ry native "SVGRectElement_ry_Getter";
+
+
+  /** @domName SVGRectElement.width */
+  SVGAnimatedLength get width native "SVGRectElement_width_Getter";
+
+
+  /** @domName SVGRectElement.x */
+  SVGAnimatedLength get x native "SVGRectElement_x_Getter";
+
+
+  /** @domName SVGRectElement.y */
+  SVGAnimatedLength get y native "SVGRectElement_y_Getter";
+
+
+  /** @domName SVGRectElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGRectElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGRectElement.xmllang */
+  String get xmllang native "SVGRectElement_xmllang_Getter";
+
+
+  /** @domName SVGRectElement.xmllang */
+  void set xmllang(String value) native "SVGRectElement_xmllang_Setter";
+
+
+  /** @domName SVGRectElement.xmlspace */
+  String get xmlspace native "SVGRectElement_xmlspace_Getter";
+
+
+  /** @domName SVGRectElement.xmlspace */
+  void set xmlspace(String value) native "SVGRectElement_xmlspace_Setter";
+
+
+  /** @domName SVGRectElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGRectElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGRectElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGRectElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGRectElement.getBBox */
+  SVGRect getBBox() native "SVGRectElement_getBBox_Callback";
+
+
+  /** @domName SVGRectElement.getCTM */
+  SVGMatrix getCTM() native "SVGRectElement_getCTM_Callback";
+
+
+  /** @domName SVGRectElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGRectElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGRectElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGRectElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGRectElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGRectElement_className_Getter";
+
+
+  /** @domName SVGRectElement.style */
+  CSSStyleDeclaration get style native "SVGRectElement_style_Getter";
+
+
+  /** @domName SVGRectElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGRectElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGRectElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGRectElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGRectElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGRectElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGRectElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGRectElement_systemLanguage_Getter";
+
+
+  /** @domName SVGRectElement.hasExtension */
+  bool hasExtension(String extension) native "SVGRectElement_hasExtension_Callback";
+
+
+  /** @domName SVGRectElement.transform */
+  SVGAnimatedTransformList get transform native "SVGRectElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGRenderingIntent
+class SVGRenderingIntent extends NativeFieldWrapperClass1 {
+  SVGRenderingIntent.internal();
+
+  static const int RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
+
+  static const int RENDERING_INTENT_AUTO = 1;
+
+  static const int RENDERING_INTENT_PERCEPTUAL = 2;
+
+  static const int RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
+
+  static const int RENDERING_INTENT_SATURATION = 4;
+
+  static const int RENDERING_INTENT_UNKNOWN = 0;
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+class SVGSVGElement extends SVGElement implements SVGZoomAndPan, SVGLocatable, SVGLangSpace, SVGTests, SVGStylable, SVGFitToViewBox, SVGExternalResourcesRequired {
+  factory SVGSVGElement() => _SVGSVGElementFactoryProvider.createSVGSVGElement();
+
+  SVGSVGElement.internal(): super.internal();
+
+
+  /** @domName SVGSVGElement.contentScriptType */
+  String get contentScriptType native "SVGSVGElement_contentScriptType_Getter";
+
+
+  /** @domName SVGSVGElement.contentScriptType */
+  void set contentScriptType(String value) native "SVGSVGElement_contentScriptType_Setter";
+
+
+  /** @domName SVGSVGElement.contentStyleType */
+  String get contentStyleType native "SVGSVGElement_contentStyleType_Getter";
+
+
+  /** @domName SVGSVGElement.contentStyleType */
+  void set contentStyleType(String value) native "SVGSVGElement_contentStyleType_Setter";
+
+
+  /** @domName SVGSVGElement.currentScale */
+  num get currentScale native "SVGSVGElement_currentScale_Getter";
+
+
+  /** @domName SVGSVGElement.currentScale */
+  void set currentScale(num value) native "SVGSVGElement_currentScale_Setter";
+
+
+  /** @domName SVGSVGElement.currentTranslate */
+  SVGPoint get currentTranslate native "SVGSVGElement_currentTranslate_Getter";
+
+
+  /** @domName SVGSVGElement.currentView */
+  SVGViewSpec get currentView native "SVGSVGElement_currentView_Getter";
+
+
+  /** @domName SVGSVGElement.height */
+  SVGAnimatedLength get height native "SVGSVGElement_height_Getter";
+
+
+  /** @domName SVGSVGElement.pixelUnitToMillimeterX */
+  num get pixelUnitToMillimeterX native "SVGSVGElement_pixelUnitToMillimeterX_Getter";
+
+
+  /** @domName SVGSVGElement.pixelUnitToMillimeterY */
+  num get pixelUnitToMillimeterY native "SVGSVGElement_pixelUnitToMillimeterY_Getter";
+
+
+  /** @domName SVGSVGElement.screenPixelToMillimeterX */
+  num get screenPixelToMillimeterX native "SVGSVGElement_screenPixelToMillimeterX_Getter";
+
+
+  /** @domName SVGSVGElement.screenPixelToMillimeterY */
+  num get screenPixelToMillimeterY native "SVGSVGElement_screenPixelToMillimeterY_Getter";
+
+
+  /** @domName SVGSVGElement.useCurrentView */
+  bool get useCurrentView native "SVGSVGElement_useCurrentView_Getter";
+
+
+  /** @domName SVGSVGElement.viewport */
+  SVGRect get viewport native "SVGSVGElement_viewport_Getter";
+
+
+  /** @domName SVGSVGElement.width */
+  SVGAnimatedLength get width native "SVGSVGElement_width_Getter";
+
+
+  /** @domName SVGSVGElement.x */
+  SVGAnimatedLength get x native "SVGSVGElement_x_Getter";
+
+
+  /** @domName SVGSVGElement.y */
+  SVGAnimatedLength get y native "SVGSVGElement_y_Getter";
+
+
+  /** @domName SVGSVGElement.animationsPaused */
+  bool animationsPaused() native "SVGSVGElement_animationsPaused_Callback";
+
+
+  /** @domName SVGSVGElement.checkEnclosure */
+  bool checkEnclosure(SVGElement element, SVGRect rect) native "SVGSVGElement_checkEnclosure_Callback";
+
+
+  /** @domName SVGSVGElement.checkIntersection */
+  bool checkIntersection(SVGElement element, SVGRect rect) native "SVGSVGElement_checkIntersection_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGAngle */
+  SVGAngle createSVGAngle() native "SVGSVGElement_createSVGAngle_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGLength */
+  SVGLength createSVGLength() native "SVGSVGElement_createSVGLength_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGMatrix */
+  SVGMatrix createSVGMatrix() native "SVGSVGElement_createSVGMatrix_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGNumber */
+  SVGNumber createSVGNumber() native "SVGSVGElement_createSVGNumber_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGPoint */
+  SVGPoint createSVGPoint() native "SVGSVGElement_createSVGPoint_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGRect */
+  SVGRect createSVGRect() native "SVGSVGElement_createSVGRect_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGTransform */
+  SVGTransform createSVGTransform() native "SVGSVGElement_createSVGTransform_Callback";
+
+
+  /** @domName SVGSVGElement.createSVGTransformFromMatrix */
+  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native "SVGSVGElement_createSVGTransformFromMatrix_Callback";
+
+
+  /** @domName SVGSVGElement.deselectAll */
+  void deselectAll() native "SVGSVGElement_deselectAll_Callback";
+
+
+  /** @domName SVGSVGElement.forceRedraw */
+  void forceRedraw() native "SVGSVGElement_forceRedraw_Callback";
+
+
+  /** @domName SVGSVGElement.getCurrentTime */
+  num getCurrentTime() native "SVGSVGElement_getCurrentTime_Callback";
+
+
+  /** @domName SVGSVGElement.getElementById */
+  Element getElementById(String elementId) native "SVGSVGElement_getElementById_Callback";
+
+
+  /** @domName SVGSVGElement.getEnclosureList */
+  List<Node> getEnclosureList(SVGRect rect, SVGElement referenceElement) native "SVGSVGElement_getEnclosureList_Callback";
+
+
+  /** @domName SVGSVGElement.getIntersectionList */
+  List<Node> getIntersectionList(SVGRect rect, SVGElement referenceElement) native "SVGSVGElement_getIntersectionList_Callback";
+
+
+  /** @domName SVGSVGElement.pauseAnimations */
+  void pauseAnimations() native "SVGSVGElement_pauseAnimations_Callback";
+
+
+  /** @domName SVGSVGElement.setCurrentTime */
+  void setCurrentTime(num seconds) native "SVGSVGElement_setCurrentTime_Callback";
+
+
+  /** @domName SVGSVGElement.suspendRedraw */
+  int suspendRedraw(int maxWaitMilliseconds) native "SVGSVGElement_suspendRedraw_Callback";
+
+
+  /** @domName SVGSVGElement.unpauseAnimations */
+  void unpauseAnimations() native "SVGSVGElement_unpauseAnimations_Callback";
+
+
+  /** @domName SVGSVGElement.unsuspendRedraw */
+  void unsuspendRedraw(int suspendHandleId) native "SVGSVGElement_unsuspendRedraw_Callback";
+
+
+  /** @domName SVGSVGElement.unsuspendRedrawAll */
+  void unsuspendRedrawAll() native "SVGSVGElement_unsuspendRedrawAll_Callback";
+
+
+  /** @domName SVGSVGElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGSVGElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGSVGElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSVGElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGSVGElement.viewBox */
+  SVGAnimatedRect get viewBox native "SVGSVGElement_viewBox_Getter";
+
+
+  /** @domName SVGSVGElement.xmllang */
+  String get xmllang native "SVGSVGElement_xmllang_Getter";
+
+
+  /** @domName SVGSVGElement.xmllang */
+  void set xmllang(String value) native "SVGSVGElement_xmllang_Setter";
+
+
+  /** @domName SVGSVGElement.xmlspace */
+  String get xmlspace native "SVGSVGElement_xmlspace_Getter";
+
+
+  /** @domName SVGSVGElement.xmlspace */
+  void set xmlspace(String value) native "SVGSVGElement_xmlspace_Setter";
+
+
+  /** @domName SVGSVGElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGSVGElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGSVGElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGSVGElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGSVGElement.getBBox */
+  SVGRect getBBox() native "SVGSVGElement_getBBox_Callback";
+
+
+  /** @domName SVGSVGElement.getCTM */
+  SVGMatrix getCTM() native "SVGSVGElement_getCTM_Callback";
+
+
+  /** @domName SVGSVGElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGSVGElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGSVGElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGSVGElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGSVGElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGSVGElement_className_Getter";
+
+
+  /** @domName SVGSVGElement.style */
+  CSSStyleDeclaration get style native "SVGSVGElement_style_Getter";
+
+
+  /** @domName SVGSVGElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGSVGElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGSVGElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGSVGElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGSVGElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGSVGElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGSVGElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGSVGElement_systemLanguage_Getter";
+
+
+  /** @domName SVGSVGElement.hasExtension */
+  bool hasExtension(String extension) native "SVGSVGElement_hasExtension_Callback";
+
+
+  /** @domName SVGSVGElement.zoomAndPan */
+  int get zoomAndPan native "SVGSVGElement_zoomAndPan_Getter";
+
+
+  /** @domName SVGSVGElement.zoomAndPan */
+  void set zoomAndPan(int value) native "SVGSVGElement_zoomAndPan_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGScriptElement
+class SVGScriptElement extends SVGElement implements SVGURIReference, SVGExternalResourcesRequired {
+  SVGScriptElement.internal(): super.internal();
+
+
+  /** @domName SVGScriptElement.type */
+  String get type native "SVGScriptElement_type_Getter";
+
+
+  /** @domName SVGScriptElement.type */
+  void set type(String value) native "SVGScriptElement_type_Setter";
+
+
+  /** @domName SVGScriptElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGScriptElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGScriptElement.href */
+  SVGAnimatedString get href native "SVGScriptElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGSetElement
+class SVGSetElement extends SVGAnimationElement {
+  SVGSetElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGStopElement
+class SVGStopElement extends SVGElement implements SVGStylable {
+  SVGStopElement.internal(): super.internal();
+
+
+  /** @domName SVGStopElement.offset */
+  SVGAnimatedNumber get offset native "SVGStopElement_offset_Getter";
+
+
+  /** @domName SVGStopElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGStopElement_className_Getter";
+
+
+  /** @domName SVGStopElement.style */
+  CSSStyleDeclaration get style native "SVGStopElement_style_Getter";
+
+
+  /** @domName SVGStopElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGStopElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGStringList
+class SVGStringList extends NativeFieldWrapperClass1 implements List<String> {
+  SVGStringList.internal();
+
+
+  /** @domName SVGStringList.numberOfItems */
+  int get numberOfItems native "SVGStringList_numberOfItems_Getter";
+
+  String operator[](int index) native "SVGStringList_item_Callback";
+
+  void operator[]=(int index, String value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<String> mixins.
+  // String is the element type.
+
+  // From Iterable<String>:
+
+  Iterator<String> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<String>(this);
+  }
+
+  // From Collection<String>:
+
+  void add(String value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(String value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<String> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(String element) => _Collections.contains(this, element);
+
+  void forEach(void f(String element)) => _Collections.forEach(this, f);
+
+  Collection map(f(String element)) => _Collections.map(this, [], f);
+
+  Collection<String> filter(bool f(String element)) =>
+     _Collections.filter(this, <String>[], f);
+
+  bool every(bool f(String element)) => _Collections.every(this, f);
+
+  bool some(bool f(String element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<String>:
+
+  void sort([Comparator<String> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(String element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(String element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  String get last => this[length - 1];
+
+  String removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [String initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<String> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <String>[]);
+
+  // -- end List<String> mixins.
+
+
+  /** @domName SVGStringList.appendItem */
+  String appendItem(String item) native "SVGStringList_appendItem_Callback";
+
+
+  /** @domName SVGStringList.clear */
+  void clear() native "SVGStringList_clear_Callback";
+
+
+  /** @domName SVGStringList.getItem */
+  String getItem(int index) native "SVGStringList_getItem_Callback";
+
+
+  /** @domName SVGStringList.initialize */
+  String initialize(String item) native "SVGStringList_initialize_Callback";
+
+
+  /** @domName SVGStringList.insertItemBefore */
+  String insertItemBefore(String item, int index) native "SVGStringList_insertItemBefore_Callback";
+
+
+  /** @domName SVGStringList.removeItem */
+  String removeItem(int index) native "SVGStringList_removeItem_Callback";
+
+
+  /** @domName SVGStringList.replaceItem */
+  String replaceItem(String item, int index) native "SVGStringList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGStylable
+class SVGStylable extends NativeFieldWrapperClass1 {
+  SVGStylable.internal();
+
+
+  /** @domName SVGStylable.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGStylable_className_Getter";
+
+
+  /** @domName SVGStylable.style */
+  CSSStyleDeclaration get style native "SVGStylable_style_Getter";
+
+
+  /** @domName SVGStylable.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGStylable_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGStyleElement
+class SVGStyleElement extends SVGElement implements SVGLangSpace {
+  SVGStyleElement.internal(): super.internal();
+
+
+  /** @domName SVGStyleElement.disabled */
+  bool get disabled native "SVGStyleElement_disabled_Getter";
+
+
+  /** @domName SVGStyleElement.disabled */
+  void set disabled(bool value) native "SVGStyleElement_disabled_Setter";
+
+
+  /** @domName SVGStyleElement.media */
+  String get media native "SVGStyleElement_media_Getter";
+
+
+  /** @domName SVGStyleElement.media */
+  void set media(String value) native "SVGStyleElement_media_Setter";
+
+
+  /** @domName SVGStyleElement.title */
+  String get title native "SVGStyleElement_title_Getter";
+
+
+  /** @domName SVGStyleElement.title */
+  void set title(String value) native "SVGStyleElement_title_Setter";
+
+
+  /** @domName SVGStyleElement.type */
+  String get type native "SVGStyleElement_type_Getter";
+
+
+  /** @domName SVGStyleElement.type */
+  void set type(String value) native "SVGStyleElement_type_Setter";
+
+
+  /** @domName SVGStyleElement.xmllang */
+  String get xmllang native "SVGStyleElement_xmllang_Getter";
+
+
+  /** @domName SVGStyleElement.xmllang */
+  void set xmllang(String value) native "SVGStyleElement_xmllang_Setter";
+
+
+  /** @domName SVGStyleElement.xmlspace */
+  String get xmlspace native "SVGStyleElement_xmlspace_Getter";
+
+
+  /** @domName SVGStyleElement.xmlspace */
+  void set xmlspace(String value) native "SVGStyleElement_xmlspace_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGSwitchElement
+class SVGSwitchElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGTransformable, SVGExternalResourcesRequired {
+  SVGSwitchElement.internal(): super.internal();
+
+
+  /** @domName SVGSwitchElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGSwitchElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGSwitchElement.xmllang */
+  String get xmllang native "SVGSwitchElement_xmllang_Getter";
+
+
+  /** @domName SVGSwitchElement.xmllang */
+  void set xmllang(String value) native "SVGSwitchElement_xmllang_Setter";
+
+
+  /** @domName SVGSwitchElement.xmlspace */
+  String get xmlspace native "SVGSwitchElement_xmlspace_Getter";
+
+
+  /** @domName SVGSwitchElement.xmlspace */
+  void set xmlspace(String value) native "SVGSwitchElement_xmlspace_Setter";
+
+
+  /** @domName SVGSwitchElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGSwitchElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGSwitchElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGSwitchElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGSwitchElement.getBBox */
+  SVGRect getBBox() native "SVGSwitchElement_getBBox_Callback";
+
+
+  /** @domName SVGSwitchElement.getCTM */
+  SVGMatrix getCTM() native "SVGSwitchElement_getCTM_Callback";
+
+
+  /** @domName SVGSwitchElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGSwitchElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGSwitchElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGSwitchElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGSwitchElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGSwitchElement_className_Getter";
+
+
+  /** @domName SVGSwitchElement.style */
+  CSSStyleDeclaration get style native "SVGSwitchElement_style_Getter";
+
+
+  /** @domName SVGSwitchElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGSwitchElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGSwitchElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGSwitchElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGSwitchElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGSwitchElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGSwitchElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGSwitchElement_systemLanguage_Getter";
+
+
+  /** @domName SVGSwitchElement.hasExtension */
+  bool hasExtension(String extension) native "SVGSwitchElement_hasExtension_Callback";
+
+
+  /** @domName SVGSwitchElement.transform */
+  SVGAnimatedTransformList get transform native "SVGSwitchElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGSymbolElement
+class SVGSymbolElement extends SVGElement implements SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired, SVGStylable {
+  SVGSymbolElement.internal(): super.internal();
+
+
+  /** @domName SVGSymbolElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGSymbolElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGSymbolElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSymbolElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGSymbolElement.viewBox */
+  SVGAnimatedRect get viewBox native "SVGSymbolElement_viewBox_Getter";
+
+
+  /** @domName SVGSymbolElement.xmllang */
+  String get xmllang native "SVGSymbolElement_xmllang_Getter";
+
+
+  /** @domName SVGSymbolElement.xmllang */
+  void set xmllang(String value) native "SVGSymbolElement_xmllang_Setter";
+
+
+  /** @domName SVGSymbolElement.xmlspace */
+  String get xmlspace native "SVGSymbolElement_xmlspace_Getter";
+
+
+  /** @domName SVGSymbolElement.xmlspace */
+  void set xmlspace(String value) native "SVGSymbolElement_xmlspace_Setter";
+
+
+  /** @domName SVGSymbolElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGSymbolElement_className_Getter";
+
+
+  /** @domName SVGSymbolElement.style */
+  CSSStyleDeclaration get style native "SVGSymbolElement_style_Getter";
+
+
+  /** @domName SVGSymbolElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGSymbolElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTRefElement
+class SVGTRefElement extends SVGTextPositioningElement implements SVGURIReference {
+  SVGTRefElement.internal(): super.internal();
+
+
+  /** @domName SVGTRefElement.href */
+  SVGAnimatedString get href native "SVGTRefElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTSpanElement
+class SVGTSpanElement extends SVGTextPositioningElement {
+  SVGTSpanElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTests
+class SVGTests extends NativeFieldWrapperClass1 {
+  SVGTests.internal();
+
+
+  /** @domName SVGTests.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGTests_requiredExtensions_Getter";
+
+
+  /** @domName SVGTests.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGTests_requiredFeatures_Getter";
+
+
+  /** @domName SVGTests.systemLanguage */
+  SVGStringList get systemLanguage native "SVGTests_systemLanguage_Getter";
+
+
+  /** @domName SVGTests.hasExtension */
+  bool hasExtension(String extension) native "SVGTests_hasExtension_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTextContentElement
+class SVGTextContentElement extends SVGElement implements SVGLangSpace, SVGStylable, SVGTests, SVGExternalResourcesRequired {
+  SVGTextContentElement.internal(): super.internal();
+
+  static const int LENGTHADJUST_SPACING = 1;
+
+  static const int LENGTHADJUST_SPACINGANDGLYPHS = 2;
+
+  static const int LENGTHADJUST_UNKNOWN = 0;
+
+
+  /** @domName SVGTextContentElement.lengthAdjust */
+  SVGAnimatedEnumeration get lengthAdjust native "SVGTextContentElement_lengthAdjust_Getter";
+
+
+  /** @domName SVGTextContentElement.textLength */
+  SVGAnimatedLength get textLength native "SVGTextContentElement_textLength_Getter";
+
+
+  /** @domName SVGTextContentElement.getCharNumAtPosition */
+  int getCharNumAtPosition(SVGPoint point) native "SVGTextContentElement_getCharNumAtPosition_Callback";
+
+
+  /** @domName SVGTextContentElement.getComputedTextLength */
+  num getComputedTextLength() native "SVGTextContentElement_getComputedTextLength_Callback";
+
+
+  /** @domName SVGTextContentElement.getEndPositionOfChar */
+  SVGPoint getEndPositionOfChar(int offset) native "SVGTextContentElement_getEndPositionOfChar_Callback";
+
+
+  /** @domName SVGTextContentElement.getExtentOfChar */
+  SVGRect getExtentOfChar(int offset) native "SVGTextContentElement_getExtentOfChar_Callback";
+
+
+  /** @domName SVGTextContentElement.getNumberOfChars */
+  int getNumberOfChars() native "SVGTextContentElement_getNumberOfChars_Callback";
+
+
+  /** @domName SVGTextContentElement.getRotationOfChar */
+  num getRotationOfChar(int offset) native "SVGTextContentElement_getRotationOfChar_Callback";
+
+
+  /** @domName SVGTextContentElement.getStartPositionOfChar */
+  SVGPoint getStartPositionOfChar(int offset) native "SVGTextContentElement_getStartPositionOfChar_Callback";
+
+
+  /** @domName SVGTextContentElement.getSubStringLength */
+  num getSubStringLength(int offset, int length) native "SVGTextContentElement_getSubStringLength_Callback";
+
+
+  /** @domName SVGTextContentElement.selectSubString */
+  void selectSubString(int offset, int length) native "SVGTextContentElement_selectSubString_Callback";
+
+
+  /** @domName SVGTextContentElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGTextContentElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGTextContentElement.xmllang */
+  String get xmllang native "SVGTextContentElement_xmllang_Getter";
+
+
+  /** @domName SVGTextContentElement.xmllang */
+  void set xmllang(String value) native "SVGTextContentElement_xmllang_Setter";
+
+
+  /** @domName SVGTextContentElement.xmlspace */
+  String get xmlspace native "SVGTextContentElement_xmlspace_Getter";
+
+
+  /** @domName SVGTextContentElement.xmlspace */
+  void set xmlspace(String value) native "SVGTextContentElement_xmlspace_Setter";
+
+
+  /** @domName SVGTextContentElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGTextContentElement_className_Getter";
+
+
+  /** @domName SVGTextContentElement.style */
+  CSSStyleDeclaration get style native "SVGTextContentElement_style_Getter";
+
+
+  /** @domName SVGTextContentElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGTextContentElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGTextContentElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGTextContentElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGTextContentElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGTextContentElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGTextContentElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGTextContentElement_systemLanguage_Getter";
+
+
+  /** @domName SVGTextContentElement.hasExtension */
+  bool hasExtension(String extension) native "SVGTextContentElement_hasExtension_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTextElement
+class SVGTextElement extends SVGTextPositioningElement implements SVGTransformable {
+  SVGTextElement.internal(): super.internal();
+
+
+  /** @domName SVGTextElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGTextElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGTextElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGTextElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGTextElement.getBBox */
+  SVGRect getBBox() native "SVGTextElement_getBBox_Callback";
+
+
+  /** @domName SVGTextElement.getCTM */
+  SVGMatrix getCTM() native "SVGTextElement_getCTM_Callback";
+
+
+  /** @domName SVGTextElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGTextElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGTextElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGTextElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGTextElement.transform */
+  SVGAnimatedTransformList get transform native "SVGTextElement_transform_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTextPathElement
+class SVGTextPathElement extends SVGTextContentElement implements SVGURIReference {
+  SVGTextPathElement.internal(): super.internal();
+
+  static const int TEXTPATH_METHODTYPE_ALIGN = 1;
+
+  static const int TEXTPATH_METHODTYPE_STRETCH = 2;
+
+  static const int TEXTPATH_METHODTYPE_UNKNOWN = 0;
+
+  static const int TEXTPATH_SPACINGTYPE_AUTO = 1;
+
+  static const int TEXTPATH_SPACINGTYPE_EXACT = 2;
+
+  static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+
+
+  /** @domName SVGTextPathElement.method */
+  SVGAnimatedEnumeration get method native "SVGTextPathElement_method_Getter";
+
+
+  /** @domName SVGTextPathElement.spacing */
+  SVGAnimatedEnumeration get spacing native "SVGTextPathElement_spacing_Getter";
+
+
+  /** @domName SVGTextPathElement.startOffset */
+  SVGAnimatedLength get startOffset native "SVGTextPathElement_startOffset_Getter";
+
+
+  /** @domName SVGTextPathElement.href */
+  SVGAnimatedString get href native "SVGTextPathElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTextPositioningElement
+class SVGTextPositioningElement extends SVGTextContentElement {
+  SVGTextPositioningElement.internal(): super.internal();
+
+
+  /** @domName SVGTextPositioningElement.dx */
+  SVGAnimatedLengthList get dx native "SVGTextPositioningElement_dx_Getter";
+
+
+  /** @domName SVGTextPositioningElement.dy */
+  SVGAnimatedLengthList get dy native "SVGTextPositioningElement_dy_Getter";
+
+
+  /** @domName SVGTextPositioningElement.rotate */
+  SVGAnimatedNumberList get rotate native "SVGTextPositioningElement_rotate_Getter";
+
+
+  /** @domName SVGTextPositioningElement.x */
+  SVGAnimatedLengthList get x native "SVGTextPositioningElement_x_Getter";
+
+
+  /** @domName SVGTextPositioningElement.y */
+  SVGAnimatedLengthList get y native "SVGTextPositioningElement_y_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTitleElement
+class SVGTitleElement extends SVGElement implements SVGLangSpace, SVGStylable {
+  SVGTitleElement.internal(): super.internal();
+
+
+  /** @domName SVGTitleElement.xmllang */
+  String get xmllang native "SVGTitleElement_xmllang_Getter";
+
+
+  /** @domName SVGTitleElement.xmllang */
+  void set xmllang(String value) native "SVGTitleElement_xmllang_Setter";
+
+
+  /** @domName SVGTitleElement.xmlspace */
+  String get xmlspace native "SVGTitleElement_xmlspace_Getter";
+
+
+  /** @domName SVGTitleElement.xmlspace */
+  void set xmlspace(String value) native "SVGTitleElement_xmlspace_Setter";
+
+
+  /** @domName SVGTitleElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGTitleElement_className_Getter";
+
+
+  /** @domName SVGTitleElement.style */
+  CSSStyleDeclaration get style native "SVGTitleElement_style_Getter";
+
+
+  /** @domName SVGTitleElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGTitleElement_getPresentationAttribute_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTransform
+class SVGTransform extends NativeFieldWrapperClass1 {
+  SVGTransform.internal();
+
+  static const int SVG_TRANSFORM_MATRIX = 1;
+
+  static const int SVG_TRANSFORM_ROTATE = 4;
+
+  static const int SVG_TRANSFORM_SCALE = 3;
+
+  static const int SVG_TRANSFORM_SKEWX = 5;
+
+  static const int SVG_TRANSFORM_SKEWY = 6;
+
+  static const int SVG_TRANSFORM_TRANSLATE = 2;
+
+  static const int SVG_TRANSFORM_UNKNOWN = 0;
+
+
+  /** @domName SVGTransform.angle */
+  num get angle native "SVGTransform_angle_Getter";
+
+
+  /** @domName SVGTransform.matrix */
+  SVGMatrix get matrix native "SVGTransform_matrix_Getter";
+
+
+  /** @domName SVGTransform.type */
+  int get type native "SVGTransform_type_Getter";
+
+
+  /** @domName SVGTransform.setMatrix */
+  void setMatrix(SVGMatrix matrix) native "SVGTransform_setMatrix_Callback";
+
+
+  /** @domName SVGTransform.setRotate */
+  void setRotate(num angle, num cx, num cy) native "SVGTransform_setRotate_Callback";
+
+
+  /** @domName SVGTransform.setScale */
+  void setScale(num sx, num sy) native "SVGTransform_setScale_Callback";
+
+
+  /** @domName SVGTransform.setSkewX */
+  void setSkewX(num angle) native "SVGTransform_setSkewX_Callback";
+
+
+  /** @domName SVGTransform.setSkewY */
+  void setSkewY(num angle) native "SVGTransform_setSkewY_Callback";
+
+
+  /** @domName SVGTransform.setTranslate */
+  void setTranslate(num tx, num ty) native "SVGTransform_setTranslate_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTransformList
+class SVGTransformList extends NativeFieldWrapperClass1 implements List<SVGTransform> {
+  SVGTransformList.internal();
+
+
+  /** @domName SVGTransformList.numberOfItems */
+  int get numberOfItems native "SVGTransformList_numberOfItems_Getter";
+
+  SVGTransform operator[](int index) native "SVGTransformList_item_Callback";
+
+  void operator[]=(int index, SVGTransform value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGTransform> mixins.
+  // SVGTransform is the element type.
+
+  // From Iterable<SVGTransform>:
+
+  Iterator<SVGTransform> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGTransform>(this);
+  }
+
+  // From Collection<SVGTransform>:
+
+  void add(SVGTransform value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGTransform value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGTransform> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGTransform element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGTransform element)) => _Collections.map(this, [], f);
+
+  Collection<SVGTransform> filter(bool f(SVGTransform element)) =>
+     _Collections.filter(this, <SVGTransform>[], f);
+
+  bool every(bool f(SVGTransform element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGTransform element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGTransform>:
+
+  void sort([Comparator<SVGTransform> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGTransform element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGTransform element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGTransform get last => this[length - 1];
+
+  SVGTransform removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGTransform initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGTransform> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGTransform>[]);
+
+  // -- end List<SVGTransform> mixins.
+
+
+  /** @domName SVGTransformList.appendItem */
+  SVGTransform appendItem(SVGTransform item) native "SVGTransformList_appendItem_Callback";
+
+
+  /** @domName SVGTransformList.clear */
+  void clear() native "SVGTransformList_clear_Callback";
+
+
+  /** @domName SVGTransformList.consolidate */
+  SVGTransform consolidate() native "SVGTransformList_consolidate_Callback";
+
+
+  /** @domName SVGTransformList.createSVGTransformFromMatrix */
+  SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix) native "SVGTransformList_createSVGTransformFromMatrix_Callback";
+
+
+  /** @domName SVGTransformList.getItem */
+  SVGTransform getItem(int index) native "SVGTransformList_getItem_Callback";
+
+
+  /** @domName SVGTransformList.initialize */
+  SVGTransform initialize(SVGTransform item) native "SVGTransformList_initialize_Callback";
+
+
+  /** @domName SVGTransformList.insertItemBefore */
+  SVGTransform insertItemBefore(SVGTransform item, int index) native "SVGTransformList_insertItemBefore_Callback";
+
+
+  /** @domName SVGTransformList.removeItem */
+  SVGTransform removeItem(int index) native "SVGTransformList_removeItem_Callback";
+
+
+  /** @domName SVGTransformList.replaceItem */
+  SVGTransform replaceItem(SVGTransform item, int index) native "SVGTransformList_replaceItem_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGTransformable
+class SVGTransformable extends NativeFieldWrapperClass1 implements SVGLocatable {
+  SVGTransformable.internal();
+
+
+  /** @domName SVGTransformable.transform */
+  SVGAnimatedTransformList get transform native "SVGTransformable_transform_Getter";
+
+
+  /** @domName SVGTransformable.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGTransformable_farthestViewportElement_Getter";
+
+
+  /** @domName SVGTransformable.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGTransformable_nearestViewportElement_Getter";
+
+
+  /** @domName SVGTransformable.getBBox */
+  SVGRect getBBox() native "SVGTransformable_getBBox_Callback";
+
+
+  /** @domName SVGTransformable.getCTM */
+  SVGMatrix getCTM() native "SVGTransformable_getCTM_Callback";
+
+
+  /** @domName SVGTransformable.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGTransformable_getScreenCTM_Callback";
+
+
+  /** @domName SVGTransformable.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGTransformable_getTransformToElement_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGURIReference
+class SVGURIReference extends NativeFieldWrapperClass1 {
+  SVGURIReference.internal();
+
+
+  /** @domName SVGURIReference.href */
+  SVGAnimatedString get href native "SVGURIReference_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGUnitTypes
+class SVGUnitTypes extends NativeFieldWrapperClass1 {
+  SVGUnitTypes.internal();
+
+  static const int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+
+  static const int SVG_UNIT_TYPE_UNKNOWN = 0;
+
+  static const int SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGUseElement
+class SVGUseElement extends SVGElement implements SVGLangSpace, SVGTests, SVGStylable, SVGURIReference, SVGExternalResourcesRequired, SVGTransformable {
+  SVGUseElement.internal(): super.internal();
+
+
+  /** @domName SVGUseElement.animatedInstanceRoot */
+  SVGElementInstance get animatedInstanceRoot native "SVGUseElement_animatedInstanceRoot_Getter";
+
+
+  /** @domName SVGUseElement.height */
+  SVGAnimatedLength get height native "SVGUseElement_height_Getter";
+
+
+  /** @domName SVGUseElement.instanceRoot */
+  SVGElementInstance get instanceRoot native "SVGUseElement_instanceRoot_Getter";
+
+
+  /** @domName SVGUseElement.width */
+  SVGAnimatedLength get width native "SVGUseElement_width_Getter";
+
+
+  /** @domName SVGUseElement.x */
+  SVGAnimatedLength get x native "SVGUseElement_x_Getter";
+
+
+  /** @domName SVGUseElement.y */
+  SVGAnimatedLength get y native "SVGUseElement_y_Getter";
+
+
+  /** @domName SVGUseElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGUseElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGUseElement.xmllang */
+  String get xmllang native "SVGUseElement_xmllang_Getter";
+
+
+  /** @domName SVGUseElement.xmllang */
+  void set xmllang(String value) native "SVGUseElement_xmllang_Setter";
+
+
+  /** @domName SVGUseElement.xmlspace */
+  String get xmlspace native "SVGUseElement_xmlspace_Getter";
+
+
+  /** @domName SVGUseElement.xmlspace */
+  void set xmlspace(String value) native "SVGUseElement_xmlspace_Setter";
+
+
+  /** @domName SVGUseElement.farthestViewportElement */
+  SVGElement get farthestViewportElement native "SVGUseElement_farthestViewportElement_Getter";
+
+
+  /** @domName SVGUseElement.nearestViewportElement */
+  SVGElement get nearestViewportElement native "SVGUseElement_nearestViewportElement_Getter";
+
+
+  /** @domName SVGUseElement.getBBox */
+  SVGRect getBBox() native "SVGUseElement_getBBox_Callback";
+
+
+  /** @domName SVGUseElement.getCTM */
+  SVGMatrix getCTM() native "SVGUseElement_getCTM_Callback";
+
+
+  /** @domName SVGUseElement.getScreenCTM */
+  SVGMatrix getScreenCTM() native "SVGUseElement_getScreenCTM_Callback";
+
+
+  /** @domName SVGUseElement.getTransformToElement */
+  SVGMatrix getTransformToElement(SVGElement element) native "SVGUseElement_getTransformToElement_Callback";
+
+
+  /** @domName SVGUseElement.className */
+  SVGAnimatedString get $dom_svgClassName native "SVGUseElement_className_Getter";
+
+
+  /** @domName SVGUseElement.style */
+  CSSStyleDeclaration get style native "SVGUseElement_style_Getter";
+
+
+  /** @domName SVGUseElement.getPresentationAttribute */
+  CSSValue getPresentationAttribute(String name) native "SVGUseElement_getPresentationAttribute_Callback";
+
+
+  /** @domName SVGUseElement.requiredExtensions */
+  SVGStringList get requiredExtensions native "SVGUseElement_requiredExtensions_Getter";
+
+
+  /** @domName SVGUseElement.requiredFeatures */
+  SVGStringList get requiredFeatures native "SVGUseElement_requiredFeatures_Getter";
+
+
+  /** @domName SVGUseElement.systemLanguage */
+  SVGStringList get systemLanguage native "SVGUseElement_systemLanguage_Getter";
+
+
+  /** @domName SVGUseElement.hasExtension */
+  bool hasExtension(String extension) native "SVGUseElement_hasExtension_Callback";
+
+
+  /** @domName SVGUseElement.transform */
+  SVGAnimatedTransformList get transform native "SVGUseElement_transform_Getter";
+
+
+  /** @domName SVGUseElement.href */
+  SVGAnimatedString get href native "SVGUseElement_href_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGVKernElement
+class SVGVKernElement extends SVGElement {
+  SVGVKernElement.internal(): super.internal();
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGViewElement
+class SVGViewElement extends SVGElement implements SVGFitToViewBox, SVGZoomAndPan, SVGExternalResourcesRequired {
+  SVGViewElement.internal(): super.internal();
+
+
+  /** @domName SVGViewElement.viewTarget */
+  SVGStringList get viewTarget native "SVGViewElement_viewTarget_Getter";
+
+
+  /** @domName SVGViewElement.externalResourcesRequired */
+  SVGAnimatedBoolean get externalResourcesRequired native "SVGViewElement_externalResourcesRequired_Getter";
+
+
+  /** @domName SVGViewElement.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewElement_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGViewElement.viewBox */
+  SVGAnimatedRect get viewBox native "SVGViewElement_viewBox_Getter";
+
+
+  /** @domName SVGViewElement.zoomAndPan */
+  int get zoomAndPan native "SVGViewElement_zoomAndPan_Getter";
+
+
+  /** @domName SVGViewElement.zoomAndPan */
+  void set zoomAndPan(int value) native "SVGViewElement_zoomAndPan_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGViewSpec
+class SVGViewSpec extends NativeFieldWrapperClass1 {
+  SVGViewSpec.internal();
+
+
+  /** @domName SVGViewSpec.preserveAspectRatio */
+  SVGAnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewSpec_preserveAspectRatio_Getter";
+
+
+  /** @domName SVGViewSpec.preserveAspectRatioString */
+  String get preserveAspectRatioString native "SVGViewSpec_preserveAspectRatioString_Getter";
+
+
+  /** @domName SVGViewSpec.transform */
+  SVGTransformList get transform native "SVGViewSpec_transform_Getter";
+
+
+  /** @domName SVGViewSpec.transformString */
+  String get transformString native "SVGViewSpec_transformString_Getter";
+
+
+  /** @domName SVGViewSpec.viewBox */
+  SVGAnimatedRect get viewBox native "SVGViewSpec_viewBox_Getter";
+
+
+  /** @domName SVGViewSpec.viewBoxString */
+  String get viewBoxString native "SVGViewSpec_viewBoxString_Getter";
+
+
+  /** @domName SVGViewSpec.viewTarget */
+  SVGElement get viewTarget native "SVGViewSpec_viewTarget_Getter";
+
+
+  /** @domName SVGViewSpec.viewTargetString */
+  String get viewTargetString native "SVGViewSpec_viewTargetString_Getter";
+
+
+  /** @domName SVGViewSpec.zoomAndPan */
+  int get zoomAndPan native "SVGViewSpec_zoomAndPan_Getter";
+
+
+  /** @domName SVGViewSpec.zoomAndPan */
+  void set zoomAndPan(int value) native "SVGViewSpec_zoomAndPan_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGZoomAndPan
+class SVGZoomAndPan extends NativeFieldWrapperClass1 {
+  SVGZoomAndPan.internal();
+
+  static const int SVG_ZOOMANDPAN_DISABLE = 1;
+
+  static const int SVG_ZOOMANDPAN_MAGNIFY = 2;
+
+  static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
+
+
+  /** @domName SVGZoomAndPan.zoomAndPan */
+  int get zoomAndPan native "SVGZoomAndPan_zoomAndPan_Getter";
+
+
+  /** @domName SVGZoomAndPan.zoomAndPan */
+  void set zoomAndPan(int value) native "SVGZoomAndPan_zoomAndPan_Setter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGZoomEvent
+class SVGZoomEvent extends UIEvent {
+  SVGZoomEvent.internal(): super.internal();
+
+
+  /** @domName SVGZoomEvent.newScale */
+  num get newScale native "SVGZoomEvent_newScale_Getter";
+
+
+  /** @domName SVGZoomEvent.newTranslate */
+  SVGPoint get newTranslate native "SVGZoomEvent_newTranslate_Getter";
+
+
+  /** @domName SVGZoomEvent.previousScale */
+  num get previousScale native "SVGZoomEvent_previousScale_Getter";
+
+
+  /** @domName SVGZoomEvent.previousTranslate */
+  SVGPoint get previousTranslate native "SVGZoomEvent_previousTranslate_Getter";
+
+
+  /** @domName SVGZoomEvent.zoomRectScreen */
+  SVGRect get zoomRectScreen native "SVGZoomEvent_zoomRectScreen_Getter";
+
+}
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName SVGElementInstanceList
+class _SVGElementInstanceList extends NativeFieldWrapperClass1 implements List<SVGElementInstance> {
+  _SVGElementInstanceList.internal();
+
+
+  /** @domName SVGElementInstanceList.length */
+  int get length native "SVGElementInstanceList_length_Getter";
+
+  SVGElementInstance operator[](int index) native "SVGElementInstanceList_item_Callback";
+
+  void operator[]=(int index, SVGElementInstance value) {
+    throw new UnsupportedError("Cannot assign element of immutable List.");
+  }
+  // -- start List<SVGElementInstance> mixins.
+  // SVGElementInstance is the element type.
+
+  // From Iterable<SVGElementInstance>:
+
+  Iterator<SVGElementInstance> iterator() {
+    // Note: NodeLists are not fixed size. And most probably length shouldn't
+    // be cached in both iterator _and_ forEach method. For now caching it
+    // for consistency.
+    return new FixedSizeListIterator<SVGElementInstance>(this);
+  }
+
+  // From Collection<SVGElementInstance>:
+
+  void add(SVGElementInstance value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addLast(SVGElementInstance value) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  void addAll(Collection<SVGElementInstance> collection) {
+    throw new UnsupportedError("Cannot add to immutable List.");
+  }
+
+  bool contains(SVGElementInstance element) => _Collections.contains(this, element);
+
+  void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f);
+
+  Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f);
+
+  Collection<SVGElementInstance> filter(bool f(SVGElementInstance element)) =>
+     _Collections.filter(this, <SVGElementInstance>[], f);
+
+  bool every(bool f(SVGElementInstance element)) => _Collections.every(this, f);
+
+  bool some(bool f(SVGElementInstance element)) => _Collections.some(this, f);
+
+  bool get isEmpty => this.length == 0;
+
+  // From List<SVGElementInstance>:
+
+  void sort([Comparator<SVGElementInstance> compare = Comparable.compare]) {
+    throw new UnsupportedError("Cannot sort immutable List.");
+  }
+
+  int indexOf(SVGElementInstance element, [int start = 0]) =>
+      _Lists.indexOf(this, element, start, this.length);
+
+  int lastIndexOf(SVGElementInstance element, [int start]) {
+    if (start == null) start = length - 1;
+    return _Lists.lastIndexOf(this, element, start);
+  }
+
+  SVGElementInstance get last => this[length - 1];
+
+  SVGElementInstance removeLast() {
+    throw new UnsupportedError("Cannot removeLast on immutable List.");
+  }
+
+  void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
+    throw new UnsupportedError("Cannot setRange on immutable List.");
+  }
+
+  void removeRange(int start, int rangeLength) {
+    throw new UnsupportedError("Cannot removeRange on immutable List.");
+  }
+
+  void insertRange(int start, int rangeLength, [SVGElementInstance initialValue]) {
+    throw new UnsupportedError("Cannot insertRange on immutable List.");
+  }
+
+  List<SVGElementInstance> getRange(int start, int rangeLength) =>
+      _Lists.getRange(this, start, rangeLength, <SVGElementInstance>[]);
+
+  // -- end List<SVGElementInstance> mixins.
+
+
+  /** @domName SVGElementInstanceList.item */
+  SVGElementInstance item(int index) native "SVGElementInstanceList_item_Callback";
+
+}
diff --git a/sdk/lib/uri/uri.dart b/sdk/lib/uri/uri.dart
index 79d8563..9f1d73b 100644
--- a/sdk/lib/uri/uri.dart
+++ b/sdk/lib/uri/uri.dart
@@ -56,7 +56,7 @@
   }
 
   // NOTE: This code was ported from: closure-library/closure/goog/uri/utils.js
-  static const RegExp _splitRe = const RegExp(
+  static final RegExp _splitRe = new RegExp(
       '^'
       '(?:'
         '([^:/?#.]+)'                   // scheme - ignore special characters
diff --git a/tests/benchmark_smoke/benchmark_base.dart b/tests/benchmark_smoke/benchmark_base.dart
index 41a3729..e2699cd 100644
--- a/tests/benchmark_smoke/benchmark_base.dart
+++ b/tests/benchmark_smoke/benchmark_base.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of benchmark_lib;
+
 /** Accessors for our Singleton variables. */
 BenchmarkSuite get BENCHMARK_SUITE {
   if (BenchmarkSuite._ONLY == null) {
diff --git a/tests/benchmark_smoke/benchmark_lib.dart b/tests/benchmark_smoke/benchmark_lib.dart
index 0a4c2e5..8fb84cb 100644
--- a/tests/benchmark_smoke/benchmark_lib.dart
+++ b/tests/benchmark_smoke/benchmark_lib.dart
@@ -2,13 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("benchmark_lib");
+library benchmark_lib;
 
-#import('dart:coreimpl');
-#import('dart:json');
-#import('dart:html');
-#import('dart:math', prefix: 'Math');
+import 'dart:json';
+import 'dart:html';
+import 'dart:math' as Math;
 
-#import('smoketest_lib.dart');
-#source('benchmark_base.dart');
+import 'smoketest_lib.dart';
+part 'benchmark_base.dart';
 
diff --git a/tests/benchmark_smoke/smoketest_lib.dart b/tests/benchmark_smoke/smoketest_lib.dart
index cc272b8..4934847 100644
--- a/tests/benchmark_smoke/smoketest_lib.dart
+++ b/tests/benchmark_smoke/smoketest_lib.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('smoketest_lib');
+library smoketest_lib;
 
-#import("benchmark_lib.dart");
-#import("dart:html");
+import 'benchmark_lib.dart';
+import 'dart:html';
 
 /** 
  * This is a sample no-op benchmark to ensure that dart2js has not dramatically
diff --git a/tests/co19/co19-compiler.status b/tests/co19/co19-compiler.status
index c8264bb..b88fcc3 100644
--- a/tests/co19/co19-compiler.status
+++ b/tests/co19/co19-compiler.status
@@ -363,7 +363,11 @@
 LibTest/core/TypeError/toString_A01_t01: Fail, OK
 LibTest/core/TypeError/url_A01_t01: Fail, OK
 
+Language/07_Classes/6_Constructors/2_Factories_A03_t01: Fail, OK # co19 issue 307
 
+LibTest/core/RegExp/RegExp_A01_t04: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t01: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t03: Fail, OK # co19 issue 314
 
 Language/10_Expressions/30_Type_Cast_A01_t04: Fail, OK # the expected error is not specified
 Language/13_Libraries_and_Scripts/13_Libraries_and_Scripts_A05_t03: Fail, OK # contains syntax error
@@ -472,6 +476,27 @@
 Language/03_Overview/2_Privacy_A01_t18: Fail, OK
 Language/03_Overview/2_Privacy_A01_t08: Fail, OK
 
+LibTest/core/List/getRange_A04_t01: Fail, OK # co19 issue 290
+LibTest/core/List/insertRange_A06_t01: Fail, OK # co19 issue 290
+LibTest/core/List/last_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/length_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/List_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscripted_assignment_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/removeLast_A01_t02: Fail, OK # co19 issue 290
+LibTest/core/List/removeRange_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t02: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t02: Fail, OK # co19 issue 290
+LibTest/core/Match/group_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/groups_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/charCodeAt_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/contains_A01_t02: Fail, OK # co19 issue 290
+LibTest/core/String/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/substring_A02_t01: Fail, OK # co19 issue 290
+
 
 [ $runtime == drt && ($compiler == none || $compiler == frog) ]
 *: Skip
diff --git a/tests/co19/co19-dart2dart.status b/tests/co19/co19-dart2dart.status
index f5e2d1d..8d33d10 100644
--- a/tests/co19/co19-dart2dart.status
+++ b/tests/co19/co19-dart2dart.status
@@ -3,6 +3,11 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dart2dart ]
+# Factory redirection:
+Language/07_Classes/07_Classes_A03_t01: Fail, Pass # http://dartbug.com/6634 Passes in conservative renaming mode.
+Language/11_Expressions/11_Instance_Creation/1_New_A12_t02: Fail, Pass # http://dartbug.com/6634 Passes in conservative renaming mode.
+Language/11_Expressions/11_Instance_Creation/1_New_A12_t01: Fail, Pass # http://dartbug.com/6634 Passes in conservative renaming mode.
+
 # Calling unresolved class constructor:
 Language/03_Overview/2_Privacy_A01_t19: Fail
 Language/03_Overview/2_Privacy_A01_t20: Fail
@@ -12,179 +17,13 @@
 Language/11_Expressions/11_Instance_Creation/1_New_A06_t06: Fail
 
 # Renaming type from platform library:
-Language/09_Generics/09_Generics_A02_t01: Fail
-Language/14_Types/4_Interface_Types_A10_t03: Fail
-
-
-Language/07_Classes/07_Classes_A03_t01: Fail, Pass # http://dartbug.com/6603 fails in minified, TRIAGE
-Language/11_Expressions/11_Instance_Creation/1_New_A12_t02: Fail, Pass # http://dartbug.com/6603 fails in minified, TRIAGE
-Language/12_Statements/10_Try_A06_t01: Fail, Pass # Fails in minified, TRIAGE
-Language/11_Expressions/11_Instance_Creation/1_New_A12_t01: Fail, Pass # Fails in minified, TRIAGE
-
-Language/03_Overview/1_Scoping_A02_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t06: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t07: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t08: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t09: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t10: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t11: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t12: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t13: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t14: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A05_t15: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t06: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t07: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t08: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t10: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A08_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/05_Variables_A08_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/07_Classes/1_Instance_Methods_A06_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/07_Classes/6_Constructors/2_Factories_A05_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/07_Classes/6_Constructors/2_Factories_A05_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/07_Classes/6_Constructors/2_Factories_A05_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/07_Classes/6_Constructors/2_Factories_A05_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/01_Constants_A03_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/01_Constants_A20_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/01_Constants_A20_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A04_t09: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A05_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A05_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A05_t12: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A06_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A06_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/30_Identifier_Reference_A08_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/31_Type_Test_A01_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/31_Type_Test_A01_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/31_Type_Test_A04_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A01_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A03_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A03_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A05_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A05_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/11_Expressions/32_Type_Cast_A05_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/03_Variable_Declaration_A04_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/03_Variable_Declaration_A04_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/03_Variable_Declaration_A04_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/03_Variable_Declaration_A04_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/03_Variable_Declaration_A04_t06: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/04_Local_Function_Declaration_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/04_Local_Function_Declaration_A02_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/06_For_A01_t11: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/06_For_A01_t12: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A01_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A02_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A02_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A02_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A03_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A03_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/09_Switch_A06_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/10_Try_A07_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/10_Try_A11_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/11_Return_A05_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/11_Return_A05_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/11_Return_A05_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/12_Labels_A01_t03: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/12_Labels_A03_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/14_Continue_A02_t12: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/12_Statements/14_Continue_A02_t13: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t16: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t17: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t18: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t19: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t28: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A03_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A03_t22: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A03_t42: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A03_t62: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t07: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t15: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t16: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t02: Fail # Inherited from dart2js
-Language/13_Libraries_and_Scripts/2_Exports_A04_t04: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t05: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t06: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/3_Parts_A03_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/4_Scripts_A01_t16: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/core/Date/Date.fromMillisecondsSinceEpoch_A03_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/core/Queue/Queue.from_A01_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/core/Set/Set.from_A01_t02: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/Random/nextDouble_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/exp_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/parseDouble_A02_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/pow_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/pow_A11_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/pow_A13_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/sin_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-LibTest/math/tan_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure.
-
-LibTest/isolate/isolate_api/port_A01_t01: Skip # Times out.
-
-LibTest/core/String/String_class_A02_t01: Fail, OK # co19 issue 284
-LibTest/core/String/charCodeAt_A01_t01: Fail, OK # co19 issue 284
-LibTest/core/String/charCodes_A01_t01: Fail, OK # co19 issue 284
-
-LibTest/isolate/SendPort/send_A02_t02: Fail, OK # co19 issue 293
-LibTest/isolate/SendPort/send_A02_t03: Fail, OK # co19 issue 293
-LibTest/isolate/SendPort/send_A02_t04: Fail, OK # co19 issue 293
-LibTest/core/LinkedHashMap/LinkedHashMap_class_A01_t01: Fail, OK # co19 issue 293
-LibTest/core/Map/getKeys_A01_t01: Fail, OK # co19 issue 293
-LibTest/core/Map/getKeys_A01_t02: Fail, OK # co19 issue 293
-LibTest/core/Map/getValues_A01_t02: Fail, OK # co19 issue 293
-LibTest/core/Map/getValues_A01_t01: Fail, OK # co19 issue 293
-
-LibTest/core/Stopwatch/Stopwatch_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/elapsed_A01_t03: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/elapsed_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/elapsed_A01_t02: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/elapsedInUs_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/elapsedInMs_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/start_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/start_A01_t02: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/start_A01_t03: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/stop_A01_t01: Fail, OK # co19 issue 297
-LibTest/core/Stopwatch/frequency_A01_t01: Fail, OK # co19 issue 297
-
-
-LibTest/core/Match/operator_subscript_A01_t01: Fail, OK # co19 issue 294
-LibTest/core/RegExp/firstMatch_A01_t01: Fail, OK # co19 issue 294
-LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A02_t01: Fail, OK # co19 issue 294
-LibTest/core/RegExp/Pattern_semantics/firstMatch_Term_A03_t01: Fail, OK # co19 issue 294
-
-LibTest/core/Map/getValues_A01_t02: Fail, OK # co19 issue 287
-
-LibTest/core/Queue/first_A02_t01: Fail, OK # co19 issue 291
-LibTest/core/Queue/last_A02_t01: Fail, OK # co19 issue 291
-
-LibTest/isolate/isolate_api/port_A01_t01: Skip # Times out.
-
-LibTest/isolate/ReceivePort/receive_A01_t02: Fail, OK # co19 issue 276
-
-LibTest/core/List/iterator_next_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/Queue/iterator_next_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/Queue/first_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/Queue/removeLast_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/Queue/last_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/Queue/removeFirst_A02_t01: Fail, OK # co19 issue 288
-LibTest/core/NoMoreElementsException/NoMoreElementsException_A01_t01: Fail, OK # co19 issue 288
-LibTest/core/NoMoreElementsException/toString_A01_t01: Fail, OK # co19 issue 288
-LibTest/core/EmptyQueueException/EmptyQueueException_A01_t01: Fail, OK # co19 issue 288
-LibTest/core/EmptyQueueException/toString_A01_t01: Fail, OK # co19 issue 288
+Language/09_Generics/09_Generics_A02_t01: Fail # http://dartbug.com/6633
+Language/14_Types/4_Interface_Types_A10_t03: Fail # http://dartbug.com/6633
 
 Language/03_Overview/1_Scoping_A01_t39: Fail # http://dartbug.com/5519
 Language/03_Overview/1_Scoping_A01_t40: Fail # http://dartbug.com/5519
 Language/03_Overview/1_Scoping_A01_t41: Fail # http://dartbug.com/5519
+Language/03_Overview/1_Scoping_A02_t05: Fail # Inherited from dart2js
 Language/03_Overview/1_Scoping_A02_t06: Fail # inherited from dart2js
 Language/03_Overview/1_Scoping_A02_t07: Fail # inherited from dart2js
 Language/03_Overview/1_Scoping_A02_t12: Fail # inherited from dart2js
@@ -200,6 +39,31 @@
 Language/05_Variables/05_Variables_A04_t01: Fail # http://dartbug.com/5519
 Language/05_Variables/05_Variables_A05_t01: Fail # http://dartbug.com/5519
 Language/05_Variables/05_Variables_A05_t02: Fail # http://dartbug.com/5519
+Language/05_Variables/05_Variables_A05_t04: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t05: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t06: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t07: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t08: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t09: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t10: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t11: Fail # Inherited from VM (assignment to final variable does not throw NSME).
+Language/05_Variables/05_Variables_A05_t12: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A05_t13: Fail # Inherited from VM (assignment to final variable does not throw NSME).
+Language/05_Variables/05_Variables_A05_t14: Fail # Inherited from VM (assignment to final variable does not throw NSME).
+Language/05_Variables/05_Variables_A05_t15: Fail # Inherited from VM (assignment to final variable does not throw NSME).
+Language/05_Variables/05_Variables_A07_t01: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t02: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t03: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t04: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t05: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t06: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t07: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t08: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A07_t10: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A08_t01: Fail # Inherited from dart2js
+Language/05_Variables/05_Variables_A08_t02: Fail # Inherited from dart2js
+Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t02: Fail # Inherited from VM (circular initialization?).
+Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t05: Fail # Inherited from dart2js
 Language/06_Functions/06_Functions_A01_t22: Fail # inherited from VM
 Language/06_Functions/06_Functions_A01_t31: Fail # http://dartbug.com/5519
 Language/06_Functions/1_Function_Declaration_A01_t01: Fail # http://dartbug.com/5519
@@ -232,6 +96,7 @@
 Language/06_Functions/2_Formal_Parameters_A03_t05: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters_A03_t06: Fail # http://dartbug.com/5519
 Language/06_Functions/4_External_Functions_A01_t01: Fail # inherited from VM
+Language/07_Classes/6_Constructors/2_Factories_A01_t05: Fail # Inherited from dartjs
 Language/07_Classes/07_Classes_A02_t02: Fail # http://dartbug.com/5519
 Language/07_Classes/07_Classes_A02_t04: Fail # http://dartbug.com/5519
 Language/07_Classes/07_Classes_A02_t11: Fail # http://dartbug.com/5519
@@ -274,6 +139,7 @@
 Language/07_Classes/1_Instance_Methods_A02_t01: Fail # http://dartbug.com/5519
 Language/07_Classes/1_Instance_Methods_A02_t02: Fail # http://dartbug.com/5519
 Language/07_Classes/1_Instance_Methods_A02_t05: Fail # http://dartbug.com/5519
+Language/07_Classes/1_Instance_Methods_A06_t01: Fail # Inherited from dart2js
 Language/07_Classes/2_Getters_A01_t03: Fail # inherited from VM
 Language/07_Classes/2_Getters_A01_t04: Fail # http://dartbug.com/5519
 Language/07_Classes/2_Getters_A01_t05: Fail # inherited from VM
@@ -301,7 +167,12 @@
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A03_t05: Fail # http://dartbug.com/5519
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: Fail # http://dartbug.com/5519
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A15_t07: Fail # inherited from VM
+Language/07_Classes/6_Constructors/1_Generative_Constructors_A16_t07: Fail # http://dartbug.com/6242
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A21_t01: Fail # http://dartbug.com/5519
+Language/07_Classes/6_Constructors/2_Factories_A05_t01: Fail # Inherited from dart2js
+Language/07_Classes/6_Constructors/2_Factories_A05_t02: Fail # Inherited from dart2js
+Language/07_Classes/6_Constructors/2_Factories_A05_t03: Fail # Inherited from dart2js
+Language/07_Classes/6_Constructors/2_Factories_A05_t04: Fail # Inherited from dart2js
 Language/07_Classes/6_Constructors/2_Factories_A07_t01: Fail # inherited from VM
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A02_t01: Fail # http://dartbug.com/5519
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A02_t03: Fail # http://dartbug.com/5519
@@ -315,6 +186,7 @@
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t03: Fail # inherited from VM
 Language/07_Classes/6_Constructors_A01_t01: Fail # inherited from VM
 Language/07_Classes/6_Constructors_A02_t01: Fail # http://dartbug.com/5519
+Language/11_Expressions/01_Constants_A03_t01: Fail # Inherited from dart2js
 Language/11_Expressions/01_Constants_A03_t02: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A03_t03: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A03_t04: Fail # http://dartbug.com/5519
@@ -337,8 +209,8 @@
 Language/11_Expressions/01_Constants_A13_t03: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A13_t04: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A13_t05: Fail # http://dartbug.com/5519
-Language/11_Expressions/01_Constants_A14_t01: Fail # inherited from dart2js
 Language/11_Expressions/01_Constants_A14_t01: Fail # inherited from VM
+Language/11_Expressions/01_Constants_A14_t01: Fail # inherited from dart2js
 Language/11_Expressions/01_Constants_A15_t06: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A15_t07: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A15_t08: Fail # http://dartbug.com/5519
@@ -364,6 +236,8 @@
 Language/11_Expressions/01_Constants_A17_t03: Crash # inherited from VM
 Language/11_Expressions/01_Constants_A17_t03: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A19_t04: Fail # http://dartbug.com/5519
+Language/11_Expressions/01_Constants_A20_t01: Fail # http://dartbug.com/5810
+Language/11_Expressions/01_Constants_A20_t02: Fail # http://dartbug.com/5810
 Language/11_Expressions/05_Strings/1_String_Interpolation_A01_t06: Fail # Inherited from dart2js
 Language/11_Expressions/05_Strings/1_String_Interpolation_A01_t09: Fail, OK # co19 issue 210
 Language/11_Expressions/05_Strings/1_String_Interpolation_A03_t02: Fail # inherited from VM
@@ -380,6 +254,7 @@
 Language/11_Expressions/07_Maps_A02_t02: Fail # http://dartbug.com/5519
 Language/11_Expressions/08_Throw_A01_t01: Fail # inherited from dart2js
 Language/11_Expressions/08_Throw_A05_t01: Fail # inherited from dart2js
+Language/11_Expressions/11_Instance_Creation/1_New_A01_t04: Fail, OK # co19 issue 241
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t03: Fail # inherited from dart2js
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t05: Fail # inherited from dart2js
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t06: Fail # inherited from dart2js
@@ -417,22 +292,24 @@
 Language/11_Expressions/19_Conditional_A01_t14: Fail # Inherited from dart2js
 Language/11_Expressions/19_Conditional_A01_t15: Fail # Inherited from dart2js
 Language/11_Expressions/20_Logical_Boolean_Expressions_A01_t14: Fail # Inherited from dart2js
+Language/11_Expressions/20_Logical_Boolean_Expressions_A01_t15: Fail, OK # co19 issue 241
 Language/11_Expressions/21_Bitwise_Expressions_A01_t16: Fail # Inherited from dart2js
 Language/11_Expressions/21_Bitwise_Expressions_A01_t17: Fail # Inherited from dart2js
+Language/11_Expressions/22_Equality_A01_t01: Fail # inherited from VM
+Language/11_Expressions/22_Equality_A01_t15: Fail # http://dartbug.com/5519
+Language/11_Expressions/22_Equality_A01_t16: Fail # http://dartbug.com/5519
+Language/11_Expressions/22_Equality_A01_t19: Fail # http://dartbug.com/5519
+Language/11_Expressions/22_Equality_A01_t20: Fail, OK # co19 issue 241
+Language/11_Expressions/22_Equality_A01_t23: Fail # Inherited from dart2js
+Language/11_Expressions/22_Equality_A01_t24: Fail # Inherited from dart2js
+Language/11_Expressions/22_Equality_A02_t03: Fail # inherited from VM
+Language/11_Expressions/22_Equality_A05_t01: Fail # inherited from VM
 Language/11_Expressions/23_Relational_Expressions_A01_t10: Fail # http://dartbug.com/5519
 Language/11_Expressions/23_Relational_Expressions_A01_t11: Fail # http://dartbug.com/5519
 Language/11_Expressions/23_Relational_Expressions_A01_t12: Fail # http://dartbug.com/5519
 Language/11_Expressions/23_Relational_Expressions_A01_t13: Fail # http://dartbug.com/5519
 Language/11_Expressions/23_Relational_Expressions_A01_t22: Fail # Inherited from dart2js
 Language/11_Expressions/23_Relational_Expressions_A01_t23: Fail # Inherited from dart2js
-Language/11_Expressions/22_Equality_A01_t01: Fail # inherited from VM
-Language/11_Expressions/22_Equality_A01_t15: Fail # http://dartbug.com/5519
-Language/11_Expressions/22_Equality_A01_t16: Fail # http://dartbug.com/5519
-Language/11_Expressions/22_Equality_A01_t19: Fail # http://dartbug.com/5519
-Language/11_Expressions/22_Equality_A01_t23: Fail # Inherited from dart2js
-Language/11_Expressions/22_Equality_A01_t24: Fail # Inherited from dart2js
-Language/11_Expressions/22_Equality_A02_t03: Fail # inherited from VM
-Language/11_Expressions/22_Equality_A05_t01: Fail # inherited from VM
 Language/11_Expressions/24_Shift_A01_t13: Fail # Inherited from dart2js
 Language/11_Expressions/24_Shift_A01_t14: Fail # Inherited from dart2js
 Language/11_Expressions/25_Additive_Expressions_A01_t13: Fail # Inherited from dart2js
@@ -451,8 +328,69 @@
 Language/11_Expressions/28_Postfix_Expressions_A01_t05: Fail # Inherited from dart2js
 Language/11_Expressions/29_Assignable_Expressions_A01_t08: Fail # Inherited from dart2js
 Language/11_Expressions/30_Identifier_Reference_A02_t01: Fail # Pseudo keyword "abstract".
+Language/11_Expressions/30_Identifier_Reference_A04_t09: Fail # Inherited from dart2js
+Language/11_Expressions/30_Identifier_Reference_A05_t01: Fail # Inherited from dart2js
+Language/11_Expressions/30_Identifier_Reference_A05_t04: Fail # Inherited from dart2js
+Language/11_Expressions/30_Identifier_Reference_A05_t12: Fail # Inherited from dart2js
+Language/11_Expressions/30_Identifier_Reference_A06_t01: Fail # Inherited from VM (error returning class name).
+Language/11_Expressions/30_Identifier_Reference_A06_t02: Fail # Inherited from VM (error returning typedef).
 Language/11_Expressions/30_Identifier_Reference_A07_t01: Fail # http://dartbug.com/5519
+Language/11_Expressions/30_Identifier_Reference_A08_t02: Fail # Inhertited from VM.
+Language/11_Expressions/31_Type_Test_A01_t02: Fail # Inherited from dart2js
+Language/11_Expressions/31_Type_Test_A01_t04: Fail # Inherited from dart2js
+Language/11_Expressions/31_Type_Test_A04_t01: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A01_t04: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A03_t01: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A03_t02: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A05_t01: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A05_t02: Fail # Inherited from dart2js
+Language/11_Expressions/32_Type_Cast_A05_t04: Fail # Inherited from dart2js
 Language/12_Statements/03_Variable_Declaration_A04_t01: Fail # http://dartbug.com/5519
+Language/12_Statements/03_Variable_Declaration_A04_t02: Fail # Inherited from dart2js
+Language/12_Statements/03_Variable_Declaration_A04_t03: Fail # Inherited from dart2js
+Language/12_Statements/03_Variable_Declaration_A04_t04: Fail # Inherited from dart2js
+Language/12_Statements/03_Variable_Declaration_A04_t05: Fail # Inherited from dart2js
+Language/12_Statements/03_Variable_Declaration_A04_t06: Fail # Inherited from dart2js
+Language/12_Statements/04_Local_Function_Declaration_A01_t01: Fail # Inherited from dart2js
+Language/12_Statements/04_Local_Function_Declaration_A02_t02: Fail # Inherited from dart2js
+Language/12_Statements/06_For_A01_t11: Fail # Inherited from dart2js
+Language/12_Statements/06_For_A01_t12: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A01_t02: Fail # Inherited from VM (switch case with several labels).
+Language/12_Statements/09_Switch_A02_t01: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A02_t02: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A02_t03: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A03_t01: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A03_t02: Fail # Inherited from dart2js
+Language/12_Statements/09_Switch_A06_t02: Fail # Inherited from VM (does not throw NSME).
+Language/12_Statements/10_Try_A06_t01: Fail, Pass # Passes in conservative renaming mode. Test depends on function names.
+Language/12_Statements/10_Try_A07_t03: Fail # Test depends on out file name.
+Language/12_Statements/10_Try_A11_t01: Fail # Inherited from VM.
+Language/12_Statements/11_Return_A05_t01: Fail # Inherited from dart2js
+Language/12_Statements/11_Return_A05_t02: Fail # Inherited from dart2js
+Language/12_Statements/11_Return_A05_t03: Fail # Inherited from dart2js
+Language/12_Statements/12_Labels_A01_t03: Fail # Inherited from VM (Multiple labels fail).
+Language/12_Statements/12_Labels_A03_t04: Fail # Inherited from dart2js
+Language/12_Statements/14_Continue_A02_t12: Fail # Inherited from dart2js
+Language/12_Statements/14_Continue_A02_t13: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t01: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t02: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t16: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t17: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t18: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A02_t19: Fail # Inherited from VM (does not throw NSME).
+Language/13_Libraries_and_Scripts/1_Imports_A02_t28: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A03_t02: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A03_t22: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A03_t42: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/1_Imports_A03_t62: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A01_t07: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A01_t15: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A01_t16: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A04_t04: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A04_t05: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/2_Exports_A04_t06: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/3_Parts_A03_t02: Fail # Inherited from dart2js
+Language/13_Libraries_and_Scripts/4_Scripts_A01_t16: Fail # Inherited from dart2js
 Language/13_Libraries_and_Scripts/4_Scripts_A03_t01: Fail # http://dartbug.com/5519
 Language/13_Libraries_and_Scripts/4_Scripts_A03_t03: Fail # http://dartbug.com/5519
 Language/14_Types/2_Dynamic_Type_System_A02_t01: Fail # inherited from VM
@@ -467,15 +405,35 @@
 Language/14_Types/5_Function_Types_A02_t01: Fail # inherited from VM
 Language/15_Reference/1_Lexical_Rules/1_Reserved_Words_A40_t04: Fail # inherited from dart2js
 Language/15_Reference/1_Lexical_Rules_A02_t06: Fail # inherited from dart2js
+LibTest/core/Date/Date.fromMillisecondsSinceEpoch_A03_t01: Fail # Inherited from dart2js
 LibTest/core/Date/Date.fromString_A03_t01: Fail, OK # Issue co19 - 121
 LibTest/core/Date/toString_A02_t01: Fail, OK # inherited from VM
 LibTest/core/Date/year_A01_t01: Fail, OK # inherited from VM
-LibTest/core/double/toRadixString_A01_t01: Fail # inherited from VM
-LibTest/core/int/operator_left_shift_A01_t02: Fail, OK # co19 issue 129
-LibTest/core/int/toRadixString_A01_t01: Fail # inherited from VM
+LibTest/core/EmptyQueueException/EmptyQueueException_A01_t01: Fail, OK # co19 issue 288
+LibTest/core/EmptyQueueException/toString_A01_t01: Fail, OK # co19 issue 288
+LibTest/core/LinkedHashMap/LinkedHashMap_class_A01_t01: Fail, OK # co19 issue 293
+LibTest/core/List/iterator_next_A02_t01: Fail, OK # co19 issue 288
+LibTest/core/Map/getKeys_A01_t01: Fail, OK # co19 issue 293
+LibTest/core/Map/getKeys_A01_t02: Fail, OK # co19 issue 293
+LibTest/core/Map/getValues_A01_t01: Fail, OK # co19 issue 293
+LibTest/core/Map/getValues_A01_t02: Fail, OK # co19 issue 287
+LibTest/core/Map/getValues_A01_t02: Fail, OK # co19 issue 293
 LibTest/core/Match/operator_subscript_A01_t01: Fail # inherited from VM
-LibTest/core/RegExp/firstMatch_A01_t01: Fail # inherited from VM
+LibTest/core/Match/operator_subscript_A01_t01: Fail, OK # co19 issue 294
+LibTest/core/NoMoreElementsException/NoMoreElementsException_A01_t01: Fail, OK # co19 issue 288
+LibTest/core/NoMoreElementsException/toString_A01_t01: Fail, OK # co19 issue 288
+LibTest/core/NoSuchMethodError/NoSuchMethodError_A01_t01: Fail, OK # co19 issue 300
+LibTest/core/NoSuchMethodError/toString_A01_t01: Fail, OK # co19 issue 300
+LibTest/core/Queue/Queue.from_A01_t02: Fail # Inherited from dart2js
+LibTest/core/Queue/first_A02_t01: Fail, OK # co19 issue 288
+LibTest/core/Queue/first_A02_t01: Fail, OK # co19 issue 291
+LibTest/core/Queue/iterator_next_A02_t01: Fail, OK # co19 issue 288
+LibTest/core/Queue/last_A02_t01: Fail, OK # co19 issue 288
+LibTest/core/Queue/last_A02_t01: Fail, OK # co19 issue 291
+LibTest/core/Queue/removeFirst_A02_t01: Fail, OK # co19 issue 288
+LibTest/core/Queue/removeLast_A02_t01: Fail, OK # co19 issue 288
 LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A02_t01: Fail # inherited from VM
+LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A02_t01: Fail, OK # co19 issue 294
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A03_t01: Fail # inherited from VM
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A04_t01: Fail # inherited from VM
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: Fail
@@ -484,25 +442,79 @@
 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t05: Fail
 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t06: Fail
 LibTest/core/RegExp/Pattern_semantics/firstMatch_Term_A03_t01: Fail # inherited from VM
+LibTest/core/RegExp/Pattern_semantics/firstMatch_Term_A03_t01: Fail, OK # co19 issue 294
+LibTest/core/RegExp/firstMatch_A01_t01: Fail, OK # co19 issue 294
+LibTest/core/Set/Set.from_A01_t02: Fail # Inherited from dart2js
+LibTest/core/Stopwatch/Stopwatch_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/elapsedInMs_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/elapsedInUs_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/elapsed_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/elapsed_A01_t02: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/elapsed_A01_t03: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/frequency_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/start_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/start_A01_t02: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/start_A01_t03: Fail, OK # co19 issue 297
+LibTest/core/Stopwatch/stop_A01_t01: Fail, OK # co19 issue 297
+LibTest/core/String/String_class_A02_t01: Fail, OK # co19 issue 284
+LibTest/core/String/charCodeAt_A01_t01: Fail, OK # co19 issue 284
+LibTest/core/String/charCodes_A01_t01: Fail, OK # co19 issue 284
 LibTest/core/String/contains_A01_t02: Fail # inherited from VM
+LibTest/core/double/toRadixString_A01_t01: Fail # inherited from VM
+LibTest/core/int/operator_left_shift_A01_t02: Fail, OK # co19 issue 129
+LibTest/core/int/toRadixString_A01_t01: Fail # inherited from VM
+LibTest/isolate/ReceivePort/receive_A01_t02: Fail, OK # co19 issue 276
+LibTest/isolate/SendPort/send_A02_t02: Fail, OK # co19 issue 293
+LibTest/isolate/SendPort/send_A02_t03: Fail, OK # co19 issue 293
+LibTest/isolate/SendPort/send_A02_t04: Fail, OK # co19 issue 293
+LibTest/isolate/isolate_api/port_A01_t01: Skip # Times out.
+
 LibTest/isolate/isolate_api/spawnUri_A01_t01: Fail, OK # Problems with the test: encoded file name
 LibTest/isolate/isolate_api/spawnUri_A01_t02: Fail, OK # Problems with the test: encoded file name
 LibTest/isolate/isolate_api/spawnUri_A01_t03: Fail, OK # Problems with the test: encoded file name
 LibTest/isolate/isolate_api/spawnUri_A01_t04: Fail, OK # Problems with the test: encoded file name
 LibTest/isolate/isolate_api/spawnUri_A01_t05: Fail, OK # Problems with the test: encoded file name
-LibTest/isolate/ReceivePort/receive_A01_t02: Fail # inherited from VM
+LibTest/math/Random/nextDouble_A01_t01: Fail # Inherited from VM.
+LibTest/math/exp_A01_t01: Fail # Issue co19 - 44
+LibTest/math/parseDouble_A02_t01: Fail # Inherited from VM.
+LibTest/math/pow_A01_t01: Fail # Inherited from VM.
+LibTest/math/pow_A11_t01: Fail # Inherited from VM.
+LibTest/math/pow_A13_t01: Fail # Inherited from VM.
+LibTest/math/sin_A01_t01: Fail # Inherited from VM.
+LibTest/math/tan_A01_t01: Fail # Issue co19 - 44
 
-# Partially implemented redirecting constructors makes this fail.
-Language/07_Classes/6_Constructors/2_Factories_A01_t05: Fail
+Language/07_Classes/07_Classes_A01_t20: Fail # http://dartbug.com/6687
+Language/07_Classes/07_Classes_A02_t34: Fail # http://dartbug.com/6687
+Language/07_Classes/07_Classes_A03_t10: Fail # http://dartbug.com/6687
 
-Language/07_Classes/6_Constructors/1_Generative_Constructors_A16_t07: Fail # http://dartbug.com/6242
+LibTest/core/RegExp/RegExp_A01_t04: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t01: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t03: Fail, OK # co19 issue 314
 
-Language/11_Expressions/11_Instance_Creation/1_New_A01_t04: Fail, OK # co19 issue 241
-Language/11_Expressions/20_Logical_Boolean_Expressions_A01_t15: Fail, OK # co19 issue 241
-Language/11_Expressions/22_Equality_A01_t20: Fail, OK # co19 issue 241
+LibTest/core/NotImplementedException/NotImplementedException_A01_t01: Fail, OK # co19 issue 315
+LibTest/core/NotImplementedException/toString_A01_t01: Fail, OK # co19 issue 315
 
-LibTest/core/NoSuchMethodError/NoSuchMethodError_A01_t01: Fail, OK # co19 issue 300
-LibTest/core/NoSuchMethodError/toString_A01_t01: Fail, OK # co19 issue 300
+LibTest/core/IndexOutOfRangeException/IndexOutOfRangeException_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/IndexOutOfRangeException/toString_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/getRange_A04_t01: Fail, OK # co19 issue 290
+LibTest/core/List/insertRange_A06_t01: Fail, OK # co19 issue 290
+LibTest/core/List/last_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/length_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/List_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscripted_assignment_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/removeLast_A01_t02: Fail, OK # co19 issue 290
+LibTest/core/List/removeRange_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t02: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t02: Fail, OK # co19 issue 290
+LibTest/core/Match/group_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/groups_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/charCodeAt_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/substring_A02_t01: Fail, OK # co19 issue 290
 
 [ $compiler == dart2dart && $system == windows ]
 LibTest/core/double/operator_remainder_A01_t04: Fail # Result is NaN
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 8493286..3675613 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -33,7 +33,6 @@
 Language/05_Variables/05_Variables_A08_t01: Fail # TODO(ahe): Please triage this failure.
 Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t05: Fail # TODO(ahe): Please triage this failure.
 Language/06_Functions/06_Functions_A01_t22: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/07_Classes_A03_t01: Fail # TODO(ahe): Please triage this failure.
 Language/07_Classes/07_Classes_A03_t07: Fail # TODO(ahe): Please triage this failure.
 Language/07_Classes/1_Instance_Methods_A06_t01: Fail # TODO(ahe): Please triage this failure.
 Language/07_Classes/6_Constructors/2_Factories_A05_t01: Fail # TODO(ahe): Please triage this failure.
@@ -56,7 +55,6 @@
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t05: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t06: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t07: Fail # TODO(ahe): Please triage this failure.
-Language/11_Expressions/11_Instance_Creation/1_New_A14_t01: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/11_Instance_Creation/2_Const_A01_t02: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/17_Getter_Invocation_A02_t01: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/18_Assignment_A05_t02: Fail # TODO(ahe): Please triage this failure.
@@ -134,8 +132,6 @@
 Language/13_Libraries_and_Scripts/2_Exports_A01_t07: Fail # TODO(ahe): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A01_t15: Fail # TODO(ahe): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A01_t16: Fail # TODO(ahe): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t01: Fail # TODO(ahe): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t02: Fail # Missing check for duplicate exports.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t04: Fail # TODO(ahe): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t05: Fail # TODO(ahe): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t06: Fail # TODO(ahe): Please triage this failure.
@@ -412,12 +408,39 @@
 Language/03_Overview/2_Privacy_A01_t09: Fail, OK # co19 issue 198
 Language/03_Overview/2_Privacy_A01_t10: Fail, OK # co19 issue 198
 
-LibTest/core/String/hashCode_A01_t01: Fail, OK # co19 issue 273
-LibTest/core/int/hashCode_A01_t01: Fail, OK # co19 issue 273
+LibTest/core/int/hashCode_A01_t01: Fail, OK # co19 issue 308
 
 LibTest/core/NoSuchMethodError/NoSuchMethodError_A01_t01: Fail, OK # co19 issue 300
 LibTest/core/NoSuchMethodError/toString_A01_t01: Fail, OK # co19 issue 300
 
+LibTest/core/String/contains_A01_t01: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t03: Fail, OK # co19 issue 314
+
+LibTest/core/NotImplementedException/NotImplementedException_A01_t01: Fail, OK # co19 issue 315
+LibTest/core/NotImplementedException/toString_A01_t01: Fail, OK # co19 issue 315
+
+LibTest/core/IndexOutOfRangeException/IndexOutOfRangeException_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/IndexOutOfRangeException/toString_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/getRange_A04_t01: Fail, OK # co19 issue 290
+LibTest/core/List/insertRange_A06_t01: Fail, OK # co19 issue 290
+LibTest/core/List/last_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/length_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/List_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscripted_assignment_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/removeLast_A01_t02: Fail, OK # co19 issue 290
+LibTest/core/List/removeRange_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t02: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t02: Fail, OK # co19 issue 290
+LibTest/core/Match/group_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/groups_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/charCodeAt_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/substring_A02_t01: Fail, OK # co19 issue 290
+
 [ $compiler == dart2js && $jscl ]
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A04_t01: Fail, Pass # issue 3333
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A03_t01: Fail, Pass # issue 3333
@@ -652,6 +675,10 @@
 
 Language/13_Libraries_and_Scripts/13_Libraries_and_Scripts_A05_t02: Fail # http://dartbug.com/5713
 
+Language/07_Classes/07_Classes_A01_t20: Fail # http://dartbug.com/6687
+Language/07_Classes/07_Classes_A02_t34: Fail # http://dartbug.com/6687
+Language/07_Classes/07_Classes_A03_t10: Fail # http://dartbug.com/6687
+
 
 #
 # Unexpected runtime errors.
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index e27cb1b..068e299 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -165,23 +165,16 @@
 Language/12_Statements/12_Labels_A01_t03: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/13_Libraries_and_Scripts_A03_t01: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/13_Libraries_and_Scripts_A05_t04: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A01_t53: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A01_t54: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t01: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/1_Imports_A02_t02: Fail # TODO(vm-team): Please triage this failure.
+Language/13_Libraries_and_Scripts/1_Imports_A02_t01: Fail, OK # co 19 issue 313
+Language/13_Libraries_and_Scripts/1_Imports_A02_t02: Fail, OK # co 19 issue 313
 Language/13_Libraries_and_Scripts/1_Imports_A02_t16: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/1_Imports_A02_t17: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/1_Imports_A02_t18: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/1_Imports_A02_t19: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t04: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t05: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t07: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t15: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t16: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t01: Fail # TODO(vm-team): Please triage this failure.
+Language/13_Libraries_and_Scripts/2_Exports_A01_t15: Fail, OK # co19 issue 311.
+Language/13_Libraries_and_Scripts/2_Exports_A01_t16: Fail, OK # co19 issue 312.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t02: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t03: Fail # TODO(vm-team): Please triage this failure.
-Language/13_Libraries_and_Scripts/2_Exports_A04_t04: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t05: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/2_Exports_A04_t06: Fail # TODO(vm-team): Please triage this failure.
 Language/13_Libraries_and_Scripts/4_Scripts_A01_t16: Fail # TODO(vm-team): Please triage this failure.
@@ -293,6 +286,32 @@
 # New failures
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: Fail
 
+LibTest/core/NotImplementedException/NotImplementedException_A01_t01: Fail, OK # co19 issue 315
+LibTest/core/NotImplementedException/toString_A01_t01: Fail, OK # co19 issue 315
+
+LibTest/core/IndexOutOfRangeException/IndexOutOfRangeException_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/IndexOutOfRangeException/toString_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/getRange_A04_t01: Fail, OK # co19 issue 290
+LibTest/core/List/insertRange_A06_t01: Fail, OK # co19 issue 290
+LibTest/core/List/last_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/length_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/List_A01_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/operator_subscripted_assignment_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/removeLast_A01_t02: Fail, OK # co19 issue 290
+LibTest/core/List/removeRange_A05_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A02_t02: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t01: Fail, OK # co19 issue 290
+LibTest/core/List/setRange_A03_t02: Fail, OK # co19 issue 290
+LibTest/core/Match/group_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/groups_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/Match/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/charCodeAt_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/operator_subscript_A02_t01: Fail, OK # co19 issue 290
+LibTest/core/String/substring_A02_t01: Fail, OK # co19 issue 290
+
+
 [ $compiler == none && $runtime == vm ]
 LibTest/core/Date/Date.fromString_A03_t01: Fail # Issue co19 - 121
 LibTest/core/Match/operator_subscript_A01_t01: Fail
@@ -371,6 +390,9 @@
 Language/11_Expressions/07_Maps_A07_t03: Fail, OK # co19 issue 287
 Language/11_Expressions/07_Maps_A04_t02: Fail, OK # co19 issue 287
 
+LibTest/core/RegExp/RegExp_A01_t04: Fail, OK # co19 issue 314
+LibTest/core/String/contains_A01_t01: Fail, OK # co19 issue 314
+
 LibTest/core/Map/getValues_A01_t02: Fail, OK # co19 issue 287
 
 [ $compiler == none && $runtime == vm ]
diff --git a/tests/co19/test_config.dart b/tests/co19/test_config.dart
index d4ce67a..dc0c92f 100644
--- a/tests/co19/test_config.dart
+++ b/tests/co19/test_config.dart
@@ -4,11 +4,11 @@
 
 #library("co19_test_config");
 
-#import("dart:io");
-#import("../../tools/testing/dart/test_suite.dart");
+#import('dart:io');
+#import('../../tools/testing/dart/test_suite.dart');
 
 class Co19TestSuite extends StandardTestSuite {
-  RegExp _testRegExp = const RegExp(r"t[0-9]{2}.dart$");
+  RegExp _testRegExp = new RegExp(r"t[0-9]{2}.dart$");
 
   Co19TestSuite(Map configuration)
       : super(configuration,
@@ -20,5 +20,5 @@
                "tests/co19/co19-dart2js.status"]);
 
   bool isTestFile(String filename) => _testRegExp.hasMatch(filename);
-  bool listRecursively() => true;
+  bool get listRecursively => true;
 }
diff --git a/tests/compiler/dart2js/analyze_all_test.dart b/tests/compiler/dart2js/analyze_all_test.dart
new file mode 100644
index 0000000..f172ada
--- /dev/null
+++ b/tests/compiler/dart2js/analyze_all_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. 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:uri';
+
+import 'compiler_helper.dart';
+
+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
+       show MessageKind;
+
+const String SOURCE = """
+class Foo {
+  // Deliberately not const to ensure compile error.
+  Foo(_);
+}
+
+@Bar()
+class Bar {
+  const Bar();
+}
+
+@Foo('x')
+typedef void VoidFunction();
+
+@Foo('y')
+class MyClass {}
+
+main() {
+}
+""";
+
+main() {
+  Uri uri = new Uri('test:code');
+  var compiler = compilerFor(SOURCE, uri, analyzeAll: false);
+  compiler.runCompiler(uri);
+  Expect.isFalse(compiler.compilationFailed);
+  print(compiler.warnings);
+  Expect.isTrue(compiler.warnings.isEmpty, 'unexpected warnings');
+  Expect.isTrue(compiler.errors.isEmpty, 'unexpected errors');
+  compiler = compilerFor(SOURCE, uri, analyzeAll: true);
+  compiler.runCompiler(uri);
+  Expect.isTrue(compiler.compilationFailed);
+  Expect.isTrue(compiler.warnings.isEmpty, 'unexpected warnings');
+  Expect.equals(2, compiler.errors.length,
+                'expected exactly two errors, but got ${compiler.errors}');
+
+  Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST,
+                compiler.errors[0].message.kind);
+  Expect.equals("Foo", compiler.errors[0].node.toString());
+
+  Expect.equals(MessageKind.CONSTRUCTOR_IS_NOT_CONST,
+                compiler.errors[1].message.kind);
+  Expect.equals("Foo", compiler.errors[1].node.toString());
+}
diff --git a/tests/compiler/dart2js/array_static_intercept_test.dart b/tests/compiler/dart2js/array_static_intercept_test.dart
index 815d92d..d75efea 100644
--- a/tests/compiler/dart2js/array_static_intercept_test.dart
+++ b/tests/compiler/dart2js/array_static_intercept_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(a) {
diff --git a/tests/compiler/dart2js/begin_end_token_test.dart b/tests/compiler/dart2js/begin_end_token_test.dart
index d58a63b..b5af596 100644
--- a/tests/compiler/dart2js/begin_end_token_test.dart
+++ b/tests/compiler/dart2js/begin_end_token_test.dart
@@ -25,7 +25,7 @@
 
 Node testExpression(String text, [String alternate]) {
   var node = parseStatement('$text;').expression;
-  testNode(node, alternate === null ? text : alternate, text);
+  testNode(node, alternate == null ? text : alternate, text);
   return node;
 }
 
diff --git a/tests/compiler/dart2js/boolified_operator_test.dart b/tests/compiler/dart2js/boolified_operator_test.dart
index 07ddbd2..1758146 100644
--- a/tests/compiler/dart2js/boolified_operator_test.dart
+++ b/tests/compiler/dart2js/boolified_operator_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("boolified_operator_test.dart");
-#import("compiler_helper.dart");
+library boolified_operator_test;
+import 'compiler_helper.dart';
 
 const String TEST_EQUAL = r"""
 foo(param0, param1) {
@@ -47,7 +47,7 @@
 """;
 
 main() {
-  RegExp regexp = const RegExp('=== true');
+  RegExp regexp = new RegExp('=== true');
 
   String generated = compile(TEST_EQUAL, entry: 'foo');
   Expect.isFalse(generated.contains('=== true'));
diff --git a/tests/compiler/dart2js/boolify_test.dart b/tests/compiler/dart2js/boolify_test.dart
index 8e90efe..a1db3bb 100644
--- a/tests/compiler/dart2js/boolify_test.dart
+++ b/tests/compiler/dart2js/boolify_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("boolified_operator_test.dart");
-#import("compiler_helper.dart");
+library boolified_operator_test;
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 foo() {
diff --git a/tests/compiler/dart2js/builtin_equals_test.dart b/tests/compiler/dart2js/builtin_equals_test.dart
index 0456f7e..39bb56a 100644
--- a/tests/compiler/dart2js/builtin_equals_test.dart
+++ b/tests/compiler/dart2js/builtin_equals_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 foo() {
diff --git a/tests/compiler/dart2js/builtin_interceptor_test.dart b/tests/compiler/dart2js/builtin_interceptor_test.dart
index ae62bf4..f5a9b2f 100644
--- a/tests/compiler/dart2js/builtin_interceptor_test.dart
+++ b/tests/compiler/dart2js/builtin_interceptor_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(String a) {
diff --git a/tests/compiler/dart2js/class_codegen2_test.dart b/tests/compiler/dart2js/class_codegen2_test.dart
index 90a1820..730a59a 100644
--- a/tests/compiler/dart2js/class_codegen2_test.dart
+++ b/tests/compiler/dart2js/class_codegen2_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
-#import("parser_helper.dart");
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
 
 const String TEST_ONE = r"""
 class A { foo() => 499; }
@@ -85,7 +85,7 @@
 main() {
   // At some point Dart2js generated bad object literals with dangling commas:
   // { a: true, }. Make sure this doesn't happen again.
-  RegExp danglingComma = const RegExp(r',[ \n]*}');
+  RegExp danglingComma = new RegExp(r',[ \n]*}');
   String generated = compileAll(TEST_ONE);
   Expect.isFalse(danglingComma.hasMatch(generated));
 
diff --git a/tests/compiler/dart2js/class_codegen_test.dart b/tests/compiler/dart2js/class_codegen_test.dart
index 6d751f0..6f751c7 100644
--- a/tests/compiler/dart2js/class_codegen_test.dart
+++ b/tests/compiler/dart2js/class_codegen_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
-#import("parser_helper.dart");
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
 
 const String TEST_ONE = r"""
 class A { }
diff --git a/tests/compiler/dart2js/class_order_test.dart b/tests/compiler/dart2js/class_order_test.dart
index 2c7aae7..49ca432 100644
--- a/tests/compiler/dart2js/class_order_test.dart
+++ b/tests/compiler/dart2js/class_order_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 class A { foo() => 499; }
@@ -32,7 +32,7 @@
 main() {
   // Make sure that class A, B and C are emitted in that order. For simplicity
   // we just verify that their members are in the correct order.
-  RegExp regexp = const RegExp(r"foo\$0?:(.|\n)*bar\$0:(.|\n)*gee\$0:");
+  RegExp regexp = new RegExp(r"foo\$0?:(.|\n)*bar\$0:(.|\n)*gee\$0:");
 
   String generated = compileAll(TEST_ONE);
   print(generated);
diff --git a/tests/compiler/dart2js/closure_codegen_test.dart b/tests/compiler/dart2js/closure_codegen_test.dart
index fc07210..3f6daf3 100644
--- a/tests/compiler/dart2js/closure_codegen_test.dart
+++ b/tests/compiler/dart2js/closure_codegen_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
-#import("parser_helper.dart");
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
 
 const String TEST_INVOCATION0 = r"""
 main() {
@@ -52,7 +52,7 @@
 // the closure.
 closureBailout() {
   String generated = compileAll(TEST_BAILOUT);
-  RegExp regexp = const RegExp(r'call\$0: function');
+  RegExp regexp = new RegExp(r'call\$0: function');
   Iterator<Match> matches = regexp.allMatches(generated).iterator();
   checkNumberOfMatches(matches, 1);
 }
diff --git a/tests/compiler/dart2js/code_motion_test.dart b/tests/compiler/dart2js/code_motion_test.dart
index 568da95..f06cd05 100644
--- a/tests/compiler/dart2js/code_motion_test.dart
+++ b/tests/compiler/dart2js/code_motion_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(int a, int b, bool param2) {
@@ -19,7 +19,7 @@
 
 main() {
   String generated = compile(TEST_ONE, entry: 'foo');
-  RegExp regexp = const RegExp('a \\+ b');
+  RegExp regexp = new RegExp('a \\+ b');
   Iterator matches = regexp.allMatches(generated).iterator();
   Expect.isTrue(matches.hasNext);
   matches.next();
diff --git a/tests/compiler/dart2js/compiler_helper.dart b/tests/compiler/dart2js/compiler_helper.dart
index b6db836..8ed13ee 100644
--- a/tests/compiler/dart2js/compiler_helper.dart
+++ b/tests/compiler/dart2js/compiler_helper.dart
@@ -21,14 +21,17 @@
 import "parser_helper.dart";
 
 String compile(String code, {String entry: 'main',
+                             String coreSource: DEFAULT_CORELIB,
                              bool enableTypeAssertions: false,
-                             bool minify: false}) {
+                             bool minify: false,
+                             bool analyzeAll: false}) {
   MockCompiler compiler =
       new MockCompiler(enableTypeAssertions: enableTypeAssertions,
+                       coreSource: coreSource,
                        enableMinification: minify);
   compiler.parseScript(code);
   lego.Element element = compiler.mainApp.find(buildSourceString(entry));
-  if (element === null) return null;
+  if (element == null) return null;
   compiler.backend.enqueueHelpers(compiler.enqueuer.resolution);
   compiler.processQueue(compiler.enqueuer.resolution, element);
   var context = new js.JavaScriptItemCompilationContext();
@@ -37,8 +40,8 @@
   return compiler.enqueuer.codegen.lookupCode(element);
 }
 
-MockCompiler compilerFor(String code, Uri uri) {
-  MockCompiler compiler = new MockCompiler();
+MockCompiler compilerFor(String code, Uri uri, {bool analyzeAll: false}) {
+  MockCompiler compiler = new MockCompiler(analyzeAll: analyzeAll);
   compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code);
   return compiler;
 }
diff --git a/tests/compiler/dart2js/compiler_test.dart b/tests/compiler/dart2js/compiler_test.dart
index aa55eba..642f7be 100644
--- a/tests/compiler/dart2js/compiler_test.dart
+++ b/tests/compiler/dart2js/compiler_test.dart
@@ -20,12 +20,12 @@
   setOnWarning(var f) => onWarning = f;
 
   void reportWarning(Node node, var message) {
-    if (onWarning !== null) onWarning(this, node, message);
+    if (onWarning != null) onWarning(this, node, message);
     super.reportWarning(node, message);
   }
 
   void reportError(Node node, var message) {
-    if (onError !== null) onError(this, node, message);
+    if (onError != null) onError(this, node, message);
     super.reportError(node, message);
   }
 }
diff --git a/tests/compiler/dart2js/concrete_type_inference_test.dart b/tests/compiler/dart2js/concrete_type_inference_test.dart
index 9c303165..90c479e 100644
--- a/tests/compiler/dart2js/concrete_type_inference_test.dart
+++ b/tests/compiler/dart2js/concrete_type_inference_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.
 
-#import("dart:uri");
+import 'dart:uri';
 
-#import('compiler_helper.dart');
-#import('parser_helper.dart');
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
 
 void compileAndFind(String code, String name,
                     check(compiler, element)) {
diff --git a/tests/compiler/dart2js/constant_folding_test.dart b/tests/compiler/dart2js/constant_folding_test.dart
index 24b7630..f803b25 100644
--- a/tests/compiler/dart2js/constant_folding_test.dart
+++ b/tests/compiler/dart2js/constant_folding_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test constant folding on numbers.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String NUMBER_FOLDING = """
 void main() {
@@ -32,20 +32,20 @@
 
 main() {
   compileAndMatch(
-      NUMBER_FOLDING, 'main', const RegExp(r"print\(7\)"));
+      NUMBER_FOLDING, 'main', new RegExp(r"print\(7\)"));
   compileAndMatch(
-      NEGATIVE_NUMBER_FOLDING, 'main', const RegExp(r"print\(1\)"));
+      NEGATIVE_NUMBER_FOLDING, 'main', new RegExp(r"print\(1\)"));
 
   String generated = compile(NULL_EQUALS_FOLDING, entry: 'foo');
-  RegExp regexp = const RegExp(r'a == null');
+  RegExp regexp = new RegExp(r'a == null');
   Expect.isTrue(regexp.hasMatch(generated));
 
-  regexp = const RegExp(r'null == b');
+  regexp = new RegExp(r'null == b');
   Expect.isTrue(regexp.hasMatch(generated));
 
-  regexp = const RegExp(r'4 === c');
+  regexp = new RegExp(r'4 === c');
   Expect.isTrue(regexp.hasMatch(generated));
 
-  regexp = const RegExp("'foo' === d");
+  regexp = new RegExp("'foo' === d");
   Expect.isTrue(regexp.hasMatch(generated));
 }
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index c520581..a8db3d5 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -354,34 +354,40 @@
         var x;
         A(this.x);
         get y => x;
+        get z => y;
       }
       main() {
         var a = new A(42);
         var foo = a.x;
         var bar = a.y;
-        foo; bar;
+        var baz = a.z;
+        foo; bar; baz;
       }
       """;
   AnalysisResult result = analyze(source);
   result.checkNodeHasType('foo', [result.int]);
   result.checkNodeHasType('bar', [result.int]);
+  result.checkNodeHasType('baz', [result.int]);
 }
 
 testSetters() {
   final String source = r"""
       class A {
         var x;
-        A(this.x);
-        set y(a) { x = a; }
+        var w;
+        A(this.x, this.w);
+        set y(a) { x = a; z = a; }
+        set z(a) { w = a; }
       }
       main() {
-        var a = new A(42);
+        var a = new A(42, 42);
         a.x = 'abc';
         a.y = true;
       }
       """;
   AnalysisResult result = analyze(source);
   result.checkFieldHasType('A', 'x', [result.int, result.string, result.bool]);
+  result.checkFieldHasType('A', 'w', [result.int, result.bool]);
 }
 
 testNamedParameters() {
@@ -521,6 +527,67 @@
   result.checkNodeHasType('y', [result.string]);
 }
 
+testCompoundOperators1() {
+  final String source = r"""
+      class A {
+        operator +(x) => "foo";
+      }
+      main() {
+        var x1 = 1; x1++;
+        var x2 = 1; ++x2;
+        var x3 = new A(); x3++;
+        var x4 = new A(); ++x4;
+
+        x1; x2; x3; x4;
+      }
+      """;
+  AnalysisResult result = analyze(source);
+  result.checkNodeHasType('x1', [result.int]);
+  result.checkNodeHasType('x2', [result.int]);
+  result.checkNodeHasType('x3', [result.string]);
+  result.checkNodeHasType('x4', [result.string]);
+}
+
+
+testCompoundOperators2() {
+  final String source = r"""
+    class A {
+      var xx;
+      var witness1;
+      var witness2;
+
+      A(this.xx);
+      get x { witness1 = "foo"; return xx; }
+      set x(y) { witness2 = "foo"; xx = y; }
+    }
+    main () {
+      var a = new A(1);
+      a.x++;
+    }
+    """;
+  AnalysisResult result = analyze(source);
+  result.checkFieldHasType('A', 'xx', [result.int]);
+  // TODO(polux): the two following results should be {null, string}, see
+  // fieldInitialization().
+  result.checkFieldHasType('A', 'witness1', [result.string]);
+  result.checkFieldHasType('A', 'witness2', [result.string]);
+}
+
+testFieldInitialization() {
+  final String source = r"""
+    class A {
+      var x;
+      var y = 1;
+    }
+    main () {
+      new A();
+    }
+    """;
+  AnalysisResult result = analyze(source);
+  result.checkFieldHasType('A', 'x', [result.nullType]);
+  result.checkFieldHasType('A', 'y', [result.int]);
+}
+
 void main() {
   testLiterals();
   testRedefinition();
@@ -544,4 +611,7 @@
   // testNoReturn(); // right now we infer the empty type instead of null
   testArithmeticOperators();
   testOperators();
+  testCompoundOperators1();
+  testCompoundOperators2();
+  // testFieldInitialization(); // TODO(polux)
 }
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index b082495..dba4037 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -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.
 
+identity_test: Fail # Issue 6638
 constant_folding_string_test: Fail
 pretty_parameter_test: Fail # TODO(floitsch): investigate.
 tree_shaking_test: Fail # Issue 4811
@@ -9,6 +10,8 @@
 # Minification of locals temporarily disabled due to issue 5808
 minify_many_locals_test: Fail
 
+[ $checked ]
+field_type_inferer_test: Slow, Pass # Issue 6658.
 
 [ $jscl || $runtime == drt || $runtime == dartium || $runtime == ff || $runtime == firefox || $runtime == chrome || $runtime == safari || $runtime == ie9 || $runtime == opera ]
 *: Skip # dart2js uses #import('dart:io'); and it is not self-hosted (yet).
diff --git a/tests/compiler/dart2js/dart_backend_test.dart b/tests/compiler/dart2js/dart_backend_test.dart
index ce5702b..026e015 100644
--- a/tests/compiler/dart2js/dart_backend_test.dart
+++ b/tests/compiler/dart2js/dart_backend_test.dart
@@ -12,13 +12,13 @@
 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';
 
 const coreLib = r'''
-#library('corelib');
+library corelib;
 class Object {}
 interface bool {}
 interface num {}
 interface int extends num {}
 interface double extends num {}
-interface String {}
+abstract class String {}
 interface Function {}
 interface List {}
 interface Map {}
@@ -34,14 +34,14 @@
 ''';
 
 const ioLib = r'''
-#library('io');
+library io;
 class Platform {
   static int operatingSystem;
 }
 ''';
 
 const htmlLib = r'''
-#library('html');
+library html;
 Window __window;
 Window get window => __window;
 abstract class Window {
@@ -53,14 +53,14 @@
 ''';
 
 const helperLib = r'''
-#library('js_helper');
+library js_helper;
 class JSInvocationMirror {}
 ''';
 
 testDart2Dart(String src, {void continuation(String s), bool minify: false,
     bool stripTypes: false}) {
   // If continuation is not provided, check that source string remains the same.
-  if (continuation === null) {
+  if (continuation == null) {
     continuation = (s) { Expect.equals(src, s); };
   }
   testDart2DartWithLibrary(src, '', continuation: continuation, minify: minify,
@@ -93,7 +93,7 @@
   }
 
   handler(uri, begin, end, message, kind) {
-    if (kind === Diagnostic.ERROR || kind === Diagnostic.CRASH) {
+    if (identical(kind, Diagnostic.ERROR) || identical(kind, Diagnostic.CRASH)) {
       Expect.fail('$uri: $begin-$end: $message [$kind]');
     }
   }
@@ -183,7 +183,7 @@
   // everything is renamed correctly in conflicting class names and global
   // functions.
   var librarySrc = '''
-#library("mylib.dart");
+library mylib;
 
 globalfoo() {}
 var globalVar;
@@ -198,7 +198,7 @@
 }
 ''';
   var mainSrc = '''
-#import("mylib.dart", prefix: "mylib");
+import 'mylib.dart' as mylib;
 
 globalfoo() {}
 var globalVar;
@@ -258,7 +258,7 @@
   // Various Send-s to current library and external library. Nothing should be
   // renamed here, only library prefixes must be cut.
   var librarySrc = '''
-#library("mylib.dart");
+library mylib;
 
 globalfoo() {}
 
@@ -271,7 +271,7 @@
 }
 ''';
   var mainSrc = '''
-#import("mylib.dart", prefix: "mylib");
+import 'mylib.dart' as mylib;
 
 myglobalfoo() {}
 
@@ -315,7 +315,7 @@
 
 testConflictLibraryClassRename() {
   var librarySrc = '''
-#library('mylib');
+library mylib;
 
 topfoo() {}
 
@@ -324,7 +324,7 @@
 }
 ''';
   var mainSrc = '''
-#import('mylib.dart', prefix: 'mylib');
+import 'mylib.dart' as mylib;
 
 
 topfoo() {var x = 5;}
@@ -380,13 +380,13 @@
 
 testLibraryGetSet() {
   var librarySrc = '''
-#library('mylib');
+library mylib;
 
 get topgetset => 5;
 set topgetset(arg) {}
 ''';
   var mainSrc = '''
-#import('mylib.dart', prefix: 'mylib');
+import 'mylib.dart' as mylib;
 
 get topgetset => 6;
 set topgetset(arg) {}
@@ -478,14 +478,14 @@
   // if we have a class and type variable with the same name, they
   // both should be renamed.
   var librarySrc = '''
-#library('mylib');
+library mylib;
 typedef void MyFunction<T extends num>(T arg);
 class T {}
 class B<T> {}
 class A<T> extends B<T> { T f; }
 ''';
   var mainSrc = '''
-#import('mylib.dart', prefix: 'mylib');
+import 'mylib.dart' as mylib;
 typedef void MyFunction<T extends num>(T arg);
 class T {}
 class B<T> {}
@@ -518,14 +518,14 @@
 
 testClassTypeArgumentBound() {
   var librarySrc = '''
-#library('mylib');
+library mylib;
 
 interface I {}
 class A<T extends I> {}
 
 ''';
   var mainSrc = '''
-#import('mylib.dart', prefix: 'mylib');
+import 'mylib.dart' as mylib;
 
 interface I {}
 class A<T extends I> {}
@@ -547,11 +547,11 @@
 
 testDoubleMains() {
   var librarySrc = '''
-#library('mylib');
+library mylib;
 main() {}
 ''';
   var mainSrc = '''
-#import('mylib.dart', prefix: 'mylib');
+import 'mylib.dart' as mylib;
 main() {
   mylib.main();
 }
@@ -565,7 +565,7 @@
 
 testStaticAccessIoLib() {
   var src = '''
-#import('dart:io');
+import 'dart:io';
 
 main() {
   Platform.operatingSystem;
@@ -658,7 +658,7 @@
 
 testPlatformLibraryMemberNamesAreFixed() {
   var src = '''
-#import('dart:html');
+import 'dart:html';
 
 class A {
   static String get userAgent => window.navigator.userAgent;
diff --git a/tests/compiler/dart2js/dead_phi_eliminator_test.dart b/tests/compiler/dart2js/dead_phi_eliminator_test.dart
index 5e2114a..8ba3387 100644
--- a/tests/compiler/dart2js/dead_phi_eliminator_test.dart
+++ b/tests/compiler/dart2js/dead_phi_eliminator_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 void foo(bar) {
@@ -17,6 +17,6 @@
 
 main() {
   String generated = compile(TEST_ONE, entry: 'foo');
-  RegExp regexp = const RegExp("toBeRemoved");
+  RegExp regexp = new RegExp("toBeRemoved");
   Expect.isTrue(!regexp.hasMatch(generated));
 }
diff --git a/tests/compiler/dart2js/field_codegen_test.dart b/tests/compiler/dart2js/field_codegen_test.dart
index 80ca722..948b4cd 100644
--- a/tests/compiler/dart2js/field_codegen_test.dart
+++ b/tests/compiler/dart2js/field_codegen_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
-#import("parser_helper.dart");
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
 
 const String TEST_NULL0 = r"""
 class A { static var x; }
diff --git a/tests/compiler/dart2js/find_my_name_test.dart b/tests/compiler/dart2js/find_my_name_test.dart
index 1961b3f..605524f 100644
--- a/tests/compiler/dart2js/find_my_name_test.dart
+++ b/tests/compiler/dart2js/find_my_name_test.dart
@@ -18,7 +18,6 @@
   ClassElement foo = parseUnit(code, compiler, compiler.mainApp).head;
   foo.parseNode(compiler);
   for (Element e in foo.localMembers) {
-    // TODO(ahe): Should test for e.name.slowToString() instead.
-    Expect.equals(code.indexOf('operator+'), e.position().charOffset);
+    Expect.equals(code.indexOf(e.name.slowToString()), e.position().charOffset);
   }
 }
diff --git a/tests/compiler/dart2js/generate_at_use_site_test.dart b/tests/compiler/dart2js/generate_at_use_site_test.dart
index bee6445..d0955cb 100644
--- a/tests/compiler/dart2js/generate_at_use_site_test.dart
+++ b/tests/compiler/dart2js/generate_at_use_site_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String FIB = r"""
 fib(n) {
diff --git a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
index f6fd7f5..b263439 100644
--- a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
+++ b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
@@ -4,9 +4,9 @@
 // Test that dart2js gvns dynamic getters that don't have side
 // effects.
 
-#import('compiler_helper.dart');
-#import('parser_helper.dart');
-#import('dart:uri');
+import 'compiler_helper.dart';
+import 'parser_helper.dart';
+import 'dart:uri';
 
 const String TEST = r"""
 class A {
@@ -26,7 +26,7 @@
   var compiler = compilerFor(TEST, uri);
   compiler.runCompiler(uri);
   String generated = compiler.assembledCode;
-  RegExp regexp = const RegExp(r"get\$foo");
+  RegExp regexp = new RegExp(r"get\$foo");
   Iterator matches = regexp.allMatches(generated).iterator();
   checkNumberOfMatches(matches, 1);
   var cls = findElement(compiler, 'A');
diff --git a/tests/compiler/dart2js/gvn_test.dart b/tests/compiler/dart2js/gvn_test.dart
index ec06ea6..edc6c82 100644
--- a/tests/compiler/dart2js/gvn_test.dart
+++ b/tests/compiler/dart2js/gvn_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 void foo(bar) {
@@ -15,7 +15,7 @@
 
 main() {
   String generated = compile(TEST_ONE, entry: 'foo');
-  RegExp regexp = const RegExp(r"1 \+ [a-z]+");
+  RegExp regexp = new RegExp(r"1 \+ [a-z]+");
   Iterator matches = regexp.allMatches(generated).iterator();
   Expect.isTrue(matches.hasNext);
   matches.next();
diff --git a/tests/compiler/dart2js/identity_test.dart b/tests/compiler/dart2js/identity_test.dart
index 348c1bf..2b72fe5 100644
--- a/tests/compiler/dart2js/identity_test.dart
+++ b/tests/compiler/dart2js/identity_test.dart
@@ -2,14 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 class A {}
 bool foo(bar) {
   var x = new A();
   var y = new A();
-  return x === y;
+  return identical(x, y);
 }
 """;
 
@@ -17,11 +17,11 @@
   String generated = compile(TEST_ONE, entry: 'foo');
 
   // Check that no boolify code is generated.
-  RegExp regexp = const RegExp("=== true");
+  RegExp regexp = new RegExp("=== true");
   Iterator matches = regexp.allMatches(generated).iterator();
   Expect.isFalse(matches.hasNext);
 
-  regexp = const RegExp("===");
+  regexp = new RegExp("===");
   matches = regexp.allMatches(generated).iterator();
   Expect.isTrue(matches.hasNext);
   matches.next();
diff --git a/tests/compiler/dart2js/inverse_operator_test.dart b/tests/compiler/dart2js/inverse_operator_test.dart
index 2b48242..6bf6ca6 100644
--- a/tests/compiler/dart2js/inverse_operator_test.dart
+++ b/tests/compiler/dart2js/inverse_operator_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String MAIN = r"""
 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
diff --git a/tests/compiler/dart2js/is_inference2_test.dart b/tests/compiler/dart2js/is_inference2_test.dart
index 00016a9..36e39ba 100644
--- a/tests/compiler/dart2js/is_inference2_test.dart
+++ b/tests/compiler/dart2js/is_inference2_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_IF_BOOL_FIRST_INSTRUCTION = r"""
 negate(x) {
diff --git a/tests/compiler/dart2js/is_inference_test.dart b/tests/compiler/dart2js/is_inference_test.dart
index 7ac6f02..e282a86 100644
--- a/tests/compiler/dart2js/is_inference_test.dart
+++ b/tests/compiler/dart2js/is_inference_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_IF = r"""
 test(param) {
diff --git a/tests/compiler/dart2js/literal_list_test.dart b/tests/compiler/dart2js/literal_list_test.dart
index 08b72d0..105790e 100644
--- a/tests/compiler/dart2js/literal_list_test.dart
+++ b/tests/compiler/dart2js/literal_list_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo() {
diff --git a/tests/compiler/dart2js/loop_test.dart b/tests/compiler/dart2js/loop_test.dart
index ed5db3a..ee49975 100644
--- a/tests/compiler/dart2js/loop_test.dart
+++ b/tests/compiler/dart2js/loop_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(a) {
diff --git a/tests/compiler/dart2js/metadata_test.dart b/tests/compiler/dart2js/metadata_test.dart
index df35845..79a0595 100644
--- a/tests/compiler/dart2js/metadata_test.dart
+++ b/tests/compiler/dart2js/metadata_test.dart
@@ -44,7 +44,8 @@
     MetadataAnnotation annotation2 = element.metadata.tail.head;
     annotation1.ensureResolved(compiler);
     annotation2.ensureResolved(compiler);
-    Expect.isTrue(annotation1 !== annotation2, 'expected unique instances');
+    Expect.isFalse(identical(annotation1, annotation2),
+                   'expected unique instances');
     Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
     Constant value1 = annotation1.value;
     Constant value2 = annotation2.value;
@@ -97,7 +98,8 @@
     MetadataAnnotation annotation2 = element.metadata.tail.head;
     annotation1.ensureResolved(compiler);
     annotation2.ensureResolved(compiler);
-    Expect.isTrue(annotation1 !== annotation2, 'expected unique instances');
+    Expect.isFalse(identical(annotation1, annotation2),
+                   'expected unique instances');
     Expect.notEquals(annotation1, annotation2, 'expected unequal instances');
     Constant value1 = annotation1.value;
     Constant value2 = annotation2.value;
diff --git a/tests/compiler/dart2js/minify_many_locals_test.dart b/tests/compiler/dart2js/minify_many_locals_test.dart
index e25b249..bdc22aa 100644
--- a/tests/compiler/dart2js/minify_many_locals_test.dart
+++ b/tests/compiler/dart2js/minify_many_locals_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 main() {
   var buffer = new StringBuffer();
@@ -17,24 +17,24 @@
   }
   buffer.add("2000; return i; }");
   var generated = compile(buffer.toString(), 'foo', minify: true);
-  RegExp re = const RegExp(r"\(a,b,c");
+  RegExp re = new RegExp(r"\(a,b,c");
   Expect.isTrue(re.hasMatch(generated));
 
-  re = const RegExp(r"x,y,z,A,B,C");
+  re = new RegExp(r"x,y,z,A,B,C");
   Expect.isTrue(re.hasMatch(generated));
   
-  re = const RegExp(r"Y,Z,a0,a1,a2,a3,a4,a5,a6");
+  re = new RegExp(r"Y,Z,a0,a1,a2,a3,a4,a5,a6");
   Expect.isTrue(re.hasMatch(generated));
 
-  re = const RegExp(r"g8,g9,h0,h1");
+  re = new RegExp(r"g8,g9,h0,h1");
   Expect.isTrue(re.hasMatch(generated));
 
-  re = const RegExp(r"Z8,Z9,aa0,aa1,aa2");
+  re = new RegExp(r"Z8,Z9,aa0,aa1,aa2");
   Expect.isTrue(re.hasMatch(generated));
 
-  re = const RegExp(r"aa9,ab0,ab1");
+  re = new RegExp(r"aa9,ab0,ab1");
   Expect.isTrue(re.hasMatch(generated));
 
-  re = const RegExp(r"aZ9,ba0,ba1");
+  re = new RegExp(r"aZ9,ba0,ba1");
   Expect.isTrue(re.hasMatch(generated));
 }
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 38ddd79..0d327af 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -66,8 +66,7 @@
   class Object {}
   class Type {}
   class Function {}
-  interface List default ListImplementation { List([length]);}
-  class ListImplementation { factory List([length]) => null; }
+  class List {}
   abstract class Map {}
   class Closure {}
   class Null {}
@@ -85,17 +84,21 @@
                 String interceptorsSource: DEFAULT_INTERCEPTORSLIB,
                 bool enableTypeAssertions: false,
                 bool enableMinification: false,
-                bool enableConcreteTypeInference: false})
+                bool enableConcreteTypeInference: false,
+                bool analyzeAll: false})
       : warnings = [], errors = [],
         sourceFiles = new Map<String, SourceFile>(),
         super(enableTypeAssertions: enableTypeAssertions,
               enableMinification: enableMinification,
-              enableConcreteTypeInference: enableConcreteTypeInference) {
+              enableConcreteTypeInference: enableConcreteTypeInference,
+              analyzeAll: analyzeAll) {
     coreLibrary = createLibrary("core", coreSource);
     // We need to set the assert method to avoid calls with a 'null'
     // target being interpreted as a call to assert.
     jsHelperLibrary = createLibrary("helper", helperSource);
     importHelperLibrary(coreLibrary);
+    libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null);
+
     assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
     interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
 
@@ -135,7 +138,7 @@
 
   void reportMessage(SourceSpan span, var message, api.Diagnostic kind) {
     var diagnostic = new WarningMessage(null, message.message);
-    if (kind === api.Diagnostic.ERROR) {
+    if (kind == api.Diagnostic.ERROR) {
       errors.add(diagnostic);
     } else {
       warnings.add(diagnostic);
@@ -183,7 +186,7 @@
   }
 
   parseScript(String text, [LibraryElement library]) {
-    if (library === null) library = mainApp;
+    if (library == null) library = mainApp;
     parseUnit(text, this, library);
   }
 
@@ -204,7 +207,7 @@
 
   Script readScript(Uri uri, [ScriptTag node]) {
     SourceFile sourceFile = sourceFiles[uri.toString()];
-    if (sourceFile === null) throw new ArgumentError(uri);
+    if (sourceFile == null) throw new ArgumentError(uri);
     return new Script(uri, sourceFile);
   }
 }
diff --git a/tests/compiler/dart2js/no_constructor_body_test.dart b/tests/compiler/dart2js/no_constructor_body_test.dart
index 3588e0d..ea1a6b2 100644
--- a/tests/compiler/dart2js/no_constructor_body_test.dart
+++ b/tests/compiler/dart2js/no_constructor_body_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 class A {
diff --git a/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart b/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart
index 598c28a..b5e2674 100644
--- a/tests/compiler/dart2js/no_duplicate_constructor_body2_test.dart
+++ b/tests/compiler/dart2js/no_duplicate_constructor_body2_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String CODE = """
 var x = 0;
diff --git a/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart b/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart
index 23464d6..8e4eae6 100644
--- a/tests/compiler/dart2js/no_duplicate_constructor_body_test.dart
+++ b/tests/compiler/dart2js/no_duplicate_constructor_body_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String CODE = """
 class A {
diff --git a/tests/compiler/dart2js/no_duplicate_stub_test.dart b/tests/compiler/dart2js/no_duplicate_stub_test.dart
index 5777470..fa0fe59 100644
--- a/tests/compiler/dart2js/no_duplicate_stub_test.dart
+++ b/tests/compiler/dart2js/no_duplicate_stub_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 class A {
diff --git a/tests/compiler/dart2js/null_type_test.dart b/tests/compiler/dart2js/null_type_test.dart
index ba9f596..0abc65f 100644
--- a/tests/compiler/dart2js/null_type_test.dart
+++ b/tests/compiler/dart2js/null_type_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo() {
diff --git a/tests/compiler/dart2js/parameter_phi_elimination_test.dart b/tests/compiler/dart2js/parameter_phi_elimination_test.dart
index 2fbb34b..6268037 100644
--- a/tests/compiler/dart2js/parameter_phi_elimination_test.dart
+++ b/tests/compiler/dart2js/parameter_phi_elimination_test.dart
@@ -6,7 +6,7 @@
 
 // VMOptions=--enable_asserts
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String SOURCE = r"""
 bool baz(int a, int b) {
diff --git a/tests/compiler/dart2js/pretty_parameter_test.dart b/tests/compiler/dart2js/pretty_parameter_test.dart
index ed4caee..03f199f 100644
--- a/tests/compiler/dart2js/pretty_parameter_test.dart
+++ b/tests/compiler/dart2js/pretty_parameter_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String FOO = r"""
 void foo(var a, var b) {
@@ -70,41 +70,41 @@
 main() {
   String generated = compile(FOO, entry: 'foo');
   // TODO(ngeoffray): Use 'contains' when frog supports it.
-  RegExp regexp = const RegExp(r"function\(a, b\) {");
+  RegExp regexp = new RegExp(r"function\(a, b\) {");
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(BAR, entry: 'bar');
-  regexp = const RegExp(r"function\(eval\$, \$\$eval\) {");
+  regexp = new RegExp(r"function\(eval\$, \$\$eval\) {");
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(PARAMETER_AND_TEMP, entry: 'bar');
-  regexp = const RegExp(r"print\(t0\)");
+  regexp = new RegExp(r"print\(t0\)");
   Expect.isTrue(regexp.hasMatch(generated));
   // Check that the second 't0' got another name.
-  regexp = const RegExp(r"print\(t0_0\)");
+  regexp = new RegExp(r"print\(t0_0\)");
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(NO_LOCAL, entry: 'foo');
-  regexp = const RegExp("return baz");
+  regexp = new RegExp("return baz");
   Expect.isTrue(regexp.hasMatch(generated));
-  regexp = const RegExp(r"baz = 2");
+  regexp = new RegExp(r"baz = 2");
   Expect.isTrue(regexp.hasMatch(generated));
-  regexp = const RegExp(r"baz = 3");
+  regexp = new RegExp(r"baz = 3");
   Expect.isTrue(regexp.hasMatch(generated));
-  regexp = const RegExp("bar === true");
+  regexp = new RegExp("bar === true");
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(MULTIPLE_PHIS_ONE_LOCAL, entry: 'foo');
-  regexp = const RegExp(r"var a = 2;");
+  regexp = new RegExp(r"var a = 2;");
   Expect.isTrue(regexp.hasMatch(generated));
 
-  regexp = const RegExp(r"a = 2;");
+  regexp = new RegExp(r"a = 2;");
   Iterator matches = regexp.allMatches(generated).iterator();
   Expect.isTrue(matches.hasNext);
   matches.next();
   Expect.isFalse(matches.hasNext);
 
   generated = compile(PARAMETER_INIT, entry: 'foo');
-  regexp = const RegExp("var result = start;");
+  regexp = new RegExp("var result = start;");
   Expect.isTrue(regexp.hasMatch(generated));
 }
diff --git a/tests/compiler/dart2js/redundant_phi_eliminator_test.dart b/tests/compiler/dart2js/redundant_phi_eliminator_test.dart
index 0dac7ba..63d8b8b 100644
--- a/tests/compiler/dart2js/redundant_phi_eliminator_test.dart
+++ b/tests/compiler/dart2js/redundant_phi_eliminator_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 void foo(bar) {
@@ -28,12 +28,12 @@
 
 main() {
   String generated = compile(TEST_ONE, entry: 'foo');
-  RegExp regexp = const RegExp("toBeRemoved");
+  RegExp regexp = new RegExp("toBeRemoved");
   Expect.isTrue(!regexp.hasMatch(generated));
 
   generated = compile(TEST_TWO, entry: 'foo');
-  regexp = const RegExp("toBeRemoved");
+  regexp = new RegExp("toBeRemoved");
   Expect.isTrue(!regexp.hasMatch(generated));
-  regexp = const RegExp("temp");
+  regexp = new RegExp("temp");
   Expect.isTrue(!regexp.hasMatch(generated));
 }
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 5d193b9..42ae534 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -157,7 +157,7 @@
 
   Send superCall = node.body.asReturn().expression;
   FunctionElement called = mapping[superCall];
-  Expect.isTrue(called !== null);
+  Expect.isNotNull(called);
   Expect.equals(fooA, called);
 }
 
@@ -521,8 +521,8 @@
   compiler.parseScript("class A {} foo() { print(new A()); }");
   ClassElement aElement = compiler.mainApp.find(buildSourceString('A'));
   FunctionElement fooElement = compiler.mainApp.find(buildSourceString('foo'));
-  Expect.isTrue(aElement !== null);
-  Expect.isTrue(fooElement !== null);
+  Expect.isNotNull(aElement);
+  Expect.isNotNull(fooElement);
 
   fooElement.parseNode(compiler);
   compiler.resolver.resolve(fooElement);
@@ -569,7 +569,7 @@
   ClassElement classElement =
       compiler.mainApp.find(buildSourceString(className));
   Element element;
-  if (constructor !== '') {
+  if (constructor != '') {
     element = classElement.lookupConstructor(
         new Selector.callConstructor(buildSourceString(constructor),
                                      classElement.getLibrary()));
@@ -604,8 +604,8 @@
                 compiler.errors[0].message.kind);
 
   compiler = new MockCompiler();
-  compiler.parseScript("""interface A extends B {}
-                          interface B extends A {}
+  compiler.parseScript("""abstract class A extends B {}
+                          abstract class B extends A {}
                           class C implements A {}
                           main() { return new C(); }""");
   mainElement = compiler.mainApp.find(MAIN);
diff --git a/tests/compiler/dart2js/rewrite_better_user_test.dart b/tests/compiler/dart2js/rewrite_better_user_test.dart
index e310472..756c77f 100644
--- a/tests/compiler/dart2js/rewrite_better_user_test.dart
+++ b/tests/compiler/dart2js/rewrite_better_user_test.dart
@@ -4,7 +4,7 @@
 // Test that we get rid of duplicate type guards on a field when that
 // field is being gvn'ed.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 class A {
@@ -26,7 +26,7 @@
 
 main() {
   String generated = compileAll(TEST);
-  RegExp regexp = const RegExp('foo\\\$0\\\$bailout');
+  RegExp regexp = new RegExp('foo\\\$0\\\$bailout');
   Iterator matches = regexp.allMatches(generated).iterator();
 
   // We check that there is only one call to the bailout method.
diff --git a/tests/compiler/dart2js/scanner_test.dart b/tests/compiler/dart2js/scanner_test.dart
index 1126853..72401f2 100644
--- a/tests/compiler/dart2js/scanner_test.dart
+++ b/tests/compiler/dart2js/scanner_test.dart
@@ -11,7 +11,7 @@
 
 Token scan(List<int> bytes) => new ByteArrayScanner(bytes).tokenize();
 
-bool isRunningOnJavaScript() => 1 === 1.0;
+bool isRunningOnJavaScript() => identical(1, 1.0);
 
 main() {
   // Google favorite: "Îñţérñåţîöñåļîžåţîờñ".
diff --git a/tests/compiler/dart2js/ssa_phi_codegen_test.dart b/tests/compiler/dart2js/ssa_phi_codegen_test.dart
index 7f02650..7cfdcc2 100644
--- a/tests/compiler/dart2js/ssa_phi_codegen_test.dart
+++ b/tests/compiler/dart2js/ssa_phi_codegen_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 void foo(bar) {
diff --git a/tests/compiler/dart2js/static_closure_test.dart b/tests/compiler/dart2js/static_closure_test.dart
index 42bd12e..75a412e 100644
--- a/tests/compiler/dart2js/static_closure_test.dart
+++ b/tests/compiler/dart2js/static_closure_test.dart
@@ -4,7 +4,7 @@
 
 // Test that static functions are closurized as expected.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 main() {
   String code = compileAll(r'''main() { print(main); }''');
diff --git a/tests/compiler/dart2js/string_escapes_test.dart b/tests/compiler/dart2js/string_escapes_test.dart
index 5b61034..d62dbf6 100644
--- a/tests/compiler/dart2js/string_escapes_test.dart
+++ b/tests/compiler/dart2js/string_escapes_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 // Test that the compiler handles string literals containing line terminators.
 
diff --git a/tests/compiler/dart2js/string_interpolation_test.dart b/tests/compiler/dart2js/string_interpolation_test.dart
index 8dcd391..1fa3a33 100644
--- a/tests/compiler/dart2js/string_interpolation_test.dart
+++ b/tests/compiler/dart2js/string_interpolation_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 main() {
   String code =
diff --git a/tests/compiler/dart2js/tree_shaking_test.dart b/tests/compiler/dart2js/tree_shaking_test.dart
index c917066..1517258 100644
--- a/tests/compiler/dart2js/tree_shaking_test.dart
+++ b/tests/compiler/dart2js/tree_shaking_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('compiler_helper.dart');
+import 'compiler_helper.dart';
 
 const String TEST = r"""
 class A {
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index 61d9286..f76731d 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -124,7 +124,7 @@
     analyze("{ bool b = (1 ${op} false); }", MessageKind.NOT_ASSIGNABLE);
     analyze("{ bool b = (true ${op} 2); }", MessageKind.NOT_ASSIGNABLE);
   }
-  for (final op in ['>', '<', '<=', '>=', '==', '!=', '===', '!==']) {
+  for (final op in ['>', '<', '<=', '>=', '==', '!=']) {
     analyze("{ bool b = 1 ${op} 2; }");
     analyze("{ int i = 1 ${op} 2; }", MessageKind.NOT_ASSIGNABLE);
     analyze("{ int i; bool b = (i = true) ${op} 2; }",
@@ -416,7 +416,7 @@
 }
 
 analyzeTopLevel(String text, [expectedWarnings]) {
-  if (expectedWarnings === null) expectedWarnings = [];
+  if (expectedWarnings == null) expectedWarnings = [];
   if (expectedWarnings is !List) expectedWarnings = [expectedWarnings];
 
   LibraryElement library = mockLibrary(compiler, text);
@@ -437,7 +437,7 @@
 }
 
 analyze(String text, [expectedWarnings]) {
-  if (expectedWarnings === null) expectedWarnings = [];
+  if (expectedWarnings == null) expectedWarnings = [];
   if (expectedWarnings is !List) expectedWarnings = [expectedWarnings];
 
   Token tokens = scan(text);
@@ -456,7 +456,7 @@
 }
 
 analyzeIn(ClassElement classElement, String text, [expectedWarnings]) {
-  if (expectedWarnings === null) expectedWarnings = [];
+  if (expectedWarnings == null) expectedWarnings = [];
   if (expectedWarnings is !List) expectedWarnings = [expectedWarnings];
 
   Token tokens = scan(text);
diff --git a/tests/compiler/dart2js/type_equals_test.dart b/tests/compiler/dart2js/type_equals_test.dart
index 72eef67..3c621a0 100644
--- a/tests/compiler/dart2js/type_equals_test.dart
+++ b/tests/compiler/dart2js/type_equals_test.dart
@@ -18,8 +18,8 @@
   var element2 = clazz.buildScope().lookup(buildSourceString(name2));
   Expect.isNotNull(element1);
   Expect.isNotNull(element2);
-  Expect.isTrue(element1.kind === ElementKind.FUNCTION);
-  Expect.isTrue(element2.kind === ElementKind.FUNCTION);
+  Expect.equals(element1.kind, ElementKind.FUNCTION);
+  Expect.equals(element2.kind, ElementKind.FUNCTION);
   FunctionSignature signature1 = element1.computeSignature(compiler);
   FunctionSignature signature2 = element2.computeSignature(compiler);
 
diff --git a/tests/compiler/dart2js/type_guard_unuser_test.dart b/tests/compiler/dart2js/type_guard_unuser_test.dart
index 5a6ee89..199968f 100644
--- a/tests/compiler/dart2js/type_guard_unuser_test.dart
+++ b/tests/compiler/dart2js/type_guard_unuser_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(a) {
@@ -47,7 +47,7 @@
   Expect.isTrue(generated.contains(r'return a === true ? $.foo(2) : b;'));
 
   generated = compile(TEST_TWO, entry: 'foo');
-  regexp = const RegExp("foo\\(1\\)");
+  regexp = new RegExp("foo\\(1\\)");
   matches = regexp.allMatches(generated).iterator();
   checkNumberOfMatches(matches, 1);
 
diff --git a/tests/compiler/dart2js/type_inference2_test.dart b/tests/compiler/dart2js/type_inference2_test.dart
index 7d87645..a1613ac 100644
--- a/tests/compiler/dart2js/type_inference2_test.dart
+++ b/tests/compiler/dart2js/type_inference2_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 sum(param0, param1) {
diff --git a/tests/compiler/dart2js/type_inference3_test.dart b/tests/compiler/dart2js/type_inference3_test.dart
index 7504761..0cec9cd 100644
--- a/tests/compiler/dart2js/type_inference3_test.dart
+++ b/tests/compiler/dart2js/type_inference3_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 sum(param0, param1) {
diff --git a/tests/compiler/dart2js/type_inference4_test.dart b/tests/compiler/dart2js/type_inference4_test.dart
index 52ac6b4..2ef4404 100644
--- a/tests/compiler/dart2js/type_inference4_test.dart
+++ b/tests/compiler/dart2js/type_inference4_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(j) {
diff --git a/tests/compiler/dart2js/type_inference5_test.dart b/tests/compiler/dart2js/type_inference5_test.dart
index 2382de7..1d9af41 100644
--- a/tests/compiler/dart2js/type_inference5_test.dart
+++ b/tests/compiler/dart2js/type_inference5_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 foo(j) {
@@ -22,7 +22,7 @@
   // Also make sure that we are not just in bailout mode without speculative
   // types by grepping for the integer-bailout check on argument j.
   var argname =
-      const RegExp(r'function(?: [a-z]+)?\(([a-zA-Z0-9_]+)\)').firstMatch(generated)[1];
+      new RegExp(r'function(?: [a-z]+)?\(([a-zA-Z0-9_]+)\)').firstMatch(generated)[1];
   print(argname);
   RegExp regexp = new RegExp(getIntTypeCheck(argname));
   Expect.isTrue(regexp.hasMatch(generated));
diff --git a/tests/compiler/dart2js/type_inference_test.dart b/tests/compiler/dart2js/type_inference_test.dart
index 6958029..f82f15b 100644
--- a/tests/compiler/dart2js/type_inference_test.dart
+++ b/tests/compiler/dart2js/type_inference_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const String TEST_ONE = r"""
 sum(a, b) {
@@ -73,14 +73,14 @@
   RegExp regexp = new RegExp(getNumberTypeCheck('a'));
   Expect.isTrue(!regexp.hasMatch(generated));
 
-  regexp = const RegExp('-a');
+  regexp = new RegExp('-a');
   Expect.isTrue(!regexp.hasMatch(generated));
 
   generated = compile(TEST_TWO_WITH_BAILOUT, entry: 'foo');
   regexp = new RegExp(getNumberTypeCheck('a'));
   Expect.isTrue(regexp.hasMatch(generated));
 
-  regexp = const RegExp('-a');
+  regexp = new RegExp('-a');
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(TEST_THREE, entry: 'foo');
@@ -92,19 +92,19 @@
   Expect.isTrue(regexp.hasMatch(generated));
 
   generated = compile(TEST_FIVE, entry: 'foo');
-  regexp = const RegExp('a.constructor !== Array');
+  regexp = new RegExp('a.constructor !== Array');
   Expect.isTrue(!regexp.hasMatch(generated));
   Expect.isTrue(generated.contains('index'));
   Expect.isTrue(generated.contains('indexSet'));
 
   generated = compile(TEST_FIVE_WITH_BAILOUT, entry: 'foo');
-  regexp = const RegExp('a.constructor !== Array');
+  regexp = new RegExp('a.constructor !== Array');
   Expect.isTrue(regexp.hasMatch(generated));
   Expect.isTrue(!generated.contains('index'));
   Expect.isTrue(!generated.contains('indexSet'));
 
   generated = compile(TEST_SIX, entry: 'foo');
-  regexp = const RegExp('a.constructor !== Array');
+  regexp = new RegExp('a.constructor !== Array');
   Expect.isTrue(regexp.hasMatch(generated));
   Expect.isTrue(!generated.contains('index'));
   Expect.isTrue(!generated.contains('indexSet'));
diff --git a/tests/compiler/dart2js/uri_extras_test.dart b/tests/compiler/dart2js/uri_extras_test.dart
index 65a524a9..199076a 100644
--- a/tests/compiler/dart2js/uri_extras_test.dart
+++ b/tests/compiler/dart2js/uri_extras_test.dart
@@ -9,7 +9,7 @@
 
 void testRelativize() {
   void c(String expected, String base, String path, bool isWindows) {
-    if (isWindows === null) {
+    if (isWindows == null) {
       c(expected, base, path, true);
       c(expected, base, path, false);
       return;
diff --git a/tests/compiler/dart2js/value_range_test.dart b/tests/compiler/dart2js/value_range_test.dart
index 56b012a..3a78bdc 100644
--- a/tests/compiler/dart2js/value_range_test.dart
+++ b/tests/compiler/dart2js/value_range_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("compiler_helper.dart");
+import 'compiler_helper.dart';
 
 const int REMOVED = 0;
 const int ABOVE_ZERO = 1;
@@ -198,8 +198,30 @@
 REMOVED,
 ];
 
+// TODO(ahe): It would probably be better if this test used the real
+// core library sources, as its purpose is to detect failure to
+// optimize fixed-sized arrays.
+const String DEFAULT_CORELIB_WITH_LIST_INTERFACE = r'''
+  print(var obj) {}
+  abstract class num {}
+  abstract class int extends num { }
+  abstract class double extends num { }
+  class bool {}
+  class String {}
+  class Object {}
+  class Type {}
+  class Function {}
+  interface List default ListImplementation { List([length]);}
+  class ListImplementation { factory List([length]) => null; }
+  abstract class Map {}
+  class Closure {}
+  class Null {}
+  class Dynamic_ {}
+  bool identical(Object a, Object b) {}''';
+
 expect(String code, int kind) {
-  String generated = compile(code);
+  String generated =
+      compile(code, coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE);
   switch (kind) {
     case REMOVED:
       Expect.isTrue(!generated.contains('ioore'));
@@ -221,13 +243,13 @@
       break;
 
     case ONE_CHECK:
-      RegExp regexp = const RegExp('ioore');
+      RegExp regexp = new RegExp('ioore');
       Iterator matches = regexp.allMatches(generated).iterator();
       checkNumberOfMatches(matches, 1);
       break;
 
     case ONE_ZERO_CHECK:
-      RegExp regexp = const RegExp('< 0');
+      RegExp regexp = new RegExp('< 0');
       Iterator matches = regexp.allMatches(generated).iterator();
       checkNumberOfMatches(matches, 1);
       break;
diff --git a/tests/compiler/dart2js_extra/bailout_on_break_test.dart b/tests/compiler/dart2js_extra/bailout_on_break_test.dart
index f1e6bee..d73f935 100644
--- a/tests/compiler/dart2js_extra/bailout_on_break_test.dart
+++ b/tests/compiler/dart2js_extra/bailout_on_break_test.dart
@@ -15,7 +15,7 @@
   while (true) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) break;
+    if (e != null) break;
     while (true) use(e);
   }
   // This is what matters: 'c' must have been saved in the
@@ -29,7 +29,7 @@
     while (true) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null) break;
+      if (e != null) break;
     }
     // This is what matters: 'c' must have been saved in the
     // environment.
@@ -44,7 +44,7 @@
     while (true) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null) break L0;
+      if (e != null) break L0;
       while (true) use(e);
     }
   }
@@ -60,11 +60,11 @@
     while (index < 2) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null && index++ == 0) break;
+      if (e != null && index++ == 0) break;
       // This is what matters: 'c' must have been saved in the
       // environment.
       Expect.equals(c, 42);
-      while (e === null) use(e);
+      while (e == null) use(e);
     }
   }
 }
@@ -74,7 +74,7 @@
   do {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) break;
+    if (e != null) break;
     while (true) use(e);
   } while (true);
   // This is what matters: 'c' must have been saved in the
@@ -87,7 +87,7 @@
   for (int i = 0; i < 10; i++) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) break;
+    if (e != null) break;
     while (true) use(e);
   }
   // This is what matters: 'c' must have been saved in the
@@ -100,11 +100,11 @@
   L1: if (c == 42) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e === null) break L1;
+    if (e == null) break L1;
     // This is what matters: 'c' must have been saved in the
     // environment.
     Expect.equals(c, 42);
-    while (e === null) use(e);
+    while (e == null) use(e);
   }
   Expect.equals(c, 42);
 }
@@ -114,9 +114,9 @@
   L1: if (c == 42) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e === null) break L1;
+    if (e == null) break L1;
     Expect.equals(42, e + 1);
-    while (e === null) use(e);
+    while (e == null) use(e);
   }
   Expect.equals(42, c);
 }
diff --git a/tests/compiler/dart2js_extra/bailout_on_continue_test.dart b/tests/compiler/dart2js_extra/bailout_on_continue_test.dart
index 74a247f..917f353 100644
--- a/tests/compiler/dart2js_extra/bailout_on_continue_test.dart
+++ b/tests/compiler/dart2js_extra/bailout_on_continue_test.dart
@@ -16,7 +16,7 @@
   while (index++ != 2) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) continue;
+    if (e != null) continue;
     while (true) use(e);
   }
   // 'c' must have been saved in the environment.
@@ -30,7 +30,7 @@
     while (index++ != 2) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null) continue;
+      if (e != null) continue;
     }
     // 'c' must have been saved in the environment.
     Expect.equals(c, 42);
@@ -45,7 +45,7 @@
     while (true) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null) continue L0;
+      if (e != null) continue L0;
       while (true) use(e);
     }
   }
@@ -60,10 +60,10 @@
     while (index < 2) {
       var e = getNonInt();
       Expect.equals(42, e + 2);
-      if (e !== null && index++ == 0) continue;
+      if (e != null && index++ == 0) continue;
       // 'c' must have been saved in the environment.
       Expect.equals(c, 42);
-      while (e === null) use(e);
+      while (e == null) use(e);
     }
   }
 }
@@ -74,7 +74,7 @@
   do {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) continue;
+    if (e != null) continue;
     while (true) use(e);
   } while (index++ != 2);
   // 'c' must have been saved in the environment.
@@ -86,7 +86,7 @@
   for (int i = 0; i < 10; i++) {
     var e = getNonInt();
     Expect.equals(42, e + 2);
-    if (e !== null) continue;
+    if (e != null) continue;
     while (true) use(e);
   }
   // 'c' must have been saved in the environment.
diff --git a/tests/compiler/dart2js_extra/hash_code_test.dart b/tests/compiler/dart2js_extra/hash_code_test.dart
new file mode 100644
index 0000000..5db341b
--- /dev/null
+++ b/tests/compiler/dart2js_extra/hash_code_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2js specific test to make sure String.hashCode behaves as
+// intended.
+
+main() {
+  Expect.equals(67633152, 'a'.hashCode);
+  Expect.equals(37224448, 'b'.hashCode);
+}
diff --git a/tests/compiler/dart2js_extra/inline_position_crash_test.dart b/tests/compiler/dart2js_extra/inline_position_crash_test.dart
index d3881aa..07039ddd 100644
--- a/tests/compiler/dart2js_extra/inline_position_crash_test.dart
+++ b/tests/compiler/dart2js_extra/inline_position_crash_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.
 
-#source('inline_position_crash_source.dart');
+part 'inline_position_crash_source.dart';
 
 class Sub extends Super {
   Sub() : super();
diff --git a/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart b/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart
index 661dda4..a4b6e4c 100644
--- a/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart
+++ b/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart
@@ -10,10 +10,10 @@
     var s3 = "ab" "cd" "ef" "gh";
     var s4 = "a" "b" "c" "d" "e" "f" "g" "h";
     var s5 = "a" 'b' r"c" r'd' """e""" '''f''' r"""g""" r'''h''';
-    Expect.isTrue(s1 === s2);
-    Expect.isTrue(s1 === s3);
-    Expect.isTrue(s1 === s4);
-    Expect.isTrue(s1 === s5);
+    Expect.isTrue(identical(s1, s2));
+    Expect.isTrue(identical(s1, s3));
+    Expect.isTrue(identical(s1, s4));
+    Expect.isTrue(identical(s1, s5));
   }
   {
     // Separating whitespace isn't necessary for the tokenizer.
@@ -22,18 +22,18 @@
     var s3 = "ab""cd""ef""gh";
     var s4 = "a""b""c""d""e""f""g""h";
     var s5 = "a"'b'r"c"r'd'"""e"""'''f'''r"""g"""r'''h''';
-    Expect.isTrue(s1 === s2);
-    Expect.isTrue(s1 === s3);
-    Expect.isTrue(s1 === s4);
-    Expect.isTrue(s1 === s5);
+    Expect.isTrue(identical(s1, s2));
+    Expect.isTrue(identical(s1, s3));
+    Expect.isTrue(identical(s1, s4));
+    Expect.isTrue(identical(s1, s5));
     // "a""""""b""" should be tokenized as "a" """""b""", aka. "a" '""b'.
-    Expect.isTrue('a""b' === "a""""""b""");
+    Expect.isTrue(identical('a""b', "a""""""b"""));
     // """a""""""""b""" is 'a' '""b'.
-    Expect.isTrue('a""b' === """a""""""""b""");
+    Expect.isTrue(identical('a""b', """a""""""""b"""));
     // Raw strings.
-    Expect.isTrue('ab' === "a"r"b");
-    Expect.isTrue('ab' === r"a""b");
-    Expect.isTrue('ab' === r"a"r"b");
+    Expect.isTrue(identical('ab', "a"r"b"));
+    Expect.isTrue(identical('ab', r"a""b"));
+    Expect.isTrue(identical('ab', r"a"r"b"));
   }
 
   // Newlines are just whitespace.
@@ -41,7 +41,7 @@
   "def"
   "ghi"
   "jkl";
-  Expect.isTrue("abcdefghijkl" === ms1);
+  Expect.isTrue(identical("abcdefghijkl", ms1));
 
   // Works with multiline strings too.
   var ms2 = """abc
@@ -50,7 +50,7 @@
   ghi
   jkl
   """;
-  Expect.isTrue("abc\n  def  ghi\n  jkl\n  " === ms2, "Multiline: $ms2");
+  Expect.isTrue(identical("abc\n  def  ghi\n  jkl\n  ", ms2), "Multiline: $ms2");
 
   // Binds stronger than property access (it's considered one literal).
   Expect.equals(5, "ab" "cde".length, "Associativity");
diff --git a/tests/compiler/dart2js_extra/math_lib_prefix_test.dart b/tests/compiler/dart2js_extra/math_lib_prefix_test.dart
index 2e18f5e..7d8720b 100644
--- a/tests/compiler/dart2js_extra/math_lib_prefix_test.dart
+++ b/tests/compiler/dart2js_extra/math_lib_prefix_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("math_lib_prefix_test");
-#import("dart:math", prefix: "foo");
+library math_lib_prefix_test;
+import 'dart:math' as foo;
 
 main() {
   Expect.equals(2.0, foo.sqrt(4));
diff --git a/tests/compiler/dart2js_extra/math_lib_test.dart b/tests/compiler/dart2js_extra/math_lib_test.dart
index 7887688..aec45b8 100644
--- a/tests/compiler/dart2js_extra/math_lib_test.dart
+++ b/tests/compiler/dart2js_extra/math_lib_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("math_lib_test");
-#import("dart:math");
+library math_lib_test;
+import 'dart:math';
 
 main() {
   Expect.equals(2.0, sqrt(4));
diff --git a/tests/compiler/dart2js_extra/nan_negate_test.dart b/tests/compiler/dart2js_extra/nan_negate_test.dart
index 87519cd..1d86387 100644
--- a/tests/compiler/dart2js_extra/nan_negate_test.dart
+++ b/tests/compiler/dart2js_extra/nan_negate_test.dart
@@ -24,11 +24,11 @@
   Expect.isTrue(n != 0);
   Expect.isTrue(!(n == 0));
 
-  Expect.isFalse(n === 0);
-  Expect.isFalse(!(n !== 0));
+  Expect.isFalse(identical(n, 0));
+  Expect.isFalse(!(!identical(n, 0)));
 
-  Expect.isTrue(n !== 0);
-  Expect.isTrue(!(n === 0));
+  Expect.isTrue(!identical(n, 0));
+  Expect.isTrue(!(identical(n, 0)));
 
   Expect.isFalse(0 >= n);
   Expect.isTrue(!(0 < n));
@@ -48,11 +48,11 @@
   Expect.isTrue(0 != n);
   Expect.isTrue(!(0 == n));
 
-  Expect.isFalse(0 === n);
-  Expect.isFalse(!(0 !== n));
+  Expect.isFalse(identical(0, n));
+  Expect.isFalse(!(!identical(0, n)));
 
-  Expect.isTrue(0 !== n);
-  Expect.isTrue(!(0 === n));
+  Expect.isTrue(!identical(0, n));
+  Expect.isTrue(!(identical(0, n)));
 }
 
 testConstant() {
@@ -74,11 +74,11 @@
   Expect.isTrue(double.NAN != 0);
   Expect.isTrue(!(double.NAN == 0));
 
-  Expect.isFalse(double.NAN === 0);
-  Expect.isFalse(!(double.NAN !== 0));
+  Expect.isFalse(identical(double.NAN, 0));
+  Expect.isFalse(!(!identical(double.NAN, 0)));
 
-  Expect.isTrue(double.NAN !== 0);
-  Expect.isTrue(!(double.NAN === 0));
+  Expect.isTrue(!identical(double.NAN, 0));
+  Expect.isTrue(!(identical(double.NAN, 0)));
 
   Expect.isFalse(0 >= double.NAN);
   Expect.isTrue(!(0 < double.NAN));
@@ -98,11 +98,11 @@
   Expect.isTrue(0 != double.NAN);
   Expect.isTrue(!(0 == double.NAN));
 
-  Expect.isFalse(0 === double.NAN);
-  Expect.isFalse(!(0 !== double.NAN));
+  Expect.isFalse(identical(0, double.NAN));
+  Expect.isFalse(!(!identical(0, double.NAN)));
 
-  Expect.isTrue(0 !== double.NAN);
-  Expect.isTrue(!(0 === double.NAN));
+  Expect.isTrue(!identical(0, double.NAN));
+  Expect.isTrue(!(identical(0, double.NAN)));
 }
 
 main() {
diff --git a/tests/compiler/dart2js_extra/no_such_method_test.dart b/tests/compiler/dart2js_extra/no_such_method_test.dart
index f1047df..0a0ac6b 100644
--- a/tests/compiler/dart2js_extra/no_such_method_test.dart
+++ b/tests/compiler/dart2js_extra/no_such_method_test.dart
@@ -30,23 +30,23 @@
   var info = a.foo();
   Expect.equals('foo', info.name);
   Expect.isTrue(info.args.isEmpty);
-  Expect.isTrue(info.receiver === a);
+  Expect.isTrue(identical(info.receiver, a));
 
   info = a.foo(2);
   Expect.equals('foo', info.name);
   Expect.isTrue(info.args.length == 1);
-  Expect.isTrue(info.args[0] === 2);
-  Expect.isTrue(info.receiver === a);
+  Expect.isTrue(info.args[0] == 2);
+  Expect.isTrue(identical(info.receiver, a));
 
   info = a.bar;
   Expect.equals('bar', info.name);
   Expect.isTrue(info.args.length == 0);
-  Expect.isTrue(info.receiver === a);
+  Expect.isTrue(identical(info.receiver, a));
 
   a.bar = 2;
   info = topLevelInfo;
   Expect.equals('bar', info.name);
   Expect.isTrue(info.args.length == 1);
-  Expect.isTrue(info.args[0] === 2);
-  Expect.isTrue(info.receiver === a);
+  Expect.isTrue(info.args[0] == 2);
+  Expect.isTrue(identical(info.receiver, a));
 }
diff --git a/tests/compiler/dart2js_extra/panda_lib.dart b/tests/compiler/dart2js_extra/panda_lib.dart
index 24bdd88..e56a8ac 100644
--- a/tests/compiler/dart2js_extra/panda_lib.dart
+++ b/tests/compiler/dart2js_extra/panda_lib.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("panda_lib");
+library panda_lib;
 
 class Panda {
   Panda() {
diff --git a/tests/compiler/dart2js_extra/panda_test.dart b/tests/compiler/dart2js_extra/panda_test.dart
index 394c3371..3b39953 100644
--- a/tests/compiler/dart2js_extra/panda_test.dart
+++ b/tests/compiler/dart2js_extra/panda_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("panda_test");
-#import("panda_lib.dart", prefix:"p");
+library panda_test;
+import 'panda_lib.dart' as p;
 
 void main() {
   p.Panda x = new p.Panda();
diff --git a/tests/compiler/dart2js_extra/regress/4434_lib.dart b/tests/compiler/dart2js_extra/regress/4434_lib.dart
index 7639132..a2ac7c4 100644
--- a/tests/compiler/dart2js_extra/regress/4434_lib.dart
+++ b/tests/compiler/dart2js_extra/regress/4434_lib.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("lib_a");
+library lib_a;
 
 class A {
   x(A a) => a._x;
diff --git a/tests/compiler/dart2js_extra/regress/4434_test.dart b/tests/compiler/dart2js_extra/regress/4434_test.dart
index 0fe3294..0f23991 100644
--- a/tests/compiler/dart2js_extra/regress/4434_test.dart
+++ b/tests/compiler/dart2js_extra/regress/4434_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("lib_b");
+library lib_b;
 
-#import("4434_lib.dart");
+import '4434_lib.dart';
 
 class B extends A { }
 
diff --git a/tests/compiler/dart2js_extra/regress/4740_library.dart b/tests/compiler/dart2js_extra/regress/4740_library.dart
index fd51e97..709991f 100644
--- a/tests/compiler/dart2js_extra/regress/4740_library.dart
+++ b/tests/compiler/dart2js_extra/regress/4740_library.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('4740_library');
+library _4740_library;
 
 class Foo {
   Foo._internal();
diff --git a/tests/compiler/dart2js_extra/regress/4740_test.dart b/tests/compiler/dart2js_extra/regress/4740_test.dart
index e2df2c3..f04c711 100644
--- a/tests/compiler/dart2js_extra/regress/4740_test.dart
+++ b/tests/compiler/dart2js_extra/regress/4740_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('4740_library.dart');
+import '4740_library.dart';
 
 main() {
   Expect.throws(() => new Foo._internal(), (e) => e is NoSuchMethodError);
diff --git a/tests/compiler/dart2js_extra/source_mapping_crash_test.dart b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart
index 63b038e..98c6ec9 100644
--- a/tests/compiler/dart2js_extra/source_mapping_crash_test.dart
+++ b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('source_mapping_crash_test');
+library source_mapping_crash_test;
 
-#source('source_mapping_crash_source.dart');
+part 'source_mapping_crash_source.dart';
 
 class Sub extends Super {
   Sub(var x) : super(x.y);
diff --git a/tests/compiler/dart2js_foreign/foreign_test.dart b/tests/compiler/dart2js_foreign/foreign_test.dart
index 3df5343..a23e1e2 100644
--- a/tests/compiler/dart2js_foreign/foreign_test.dart
+++ b/tests/compiler/dart2js_foreign/foreign_test.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 foreign1(var a, var b) {
   return JS("num", r"# + #", a, b);
 }
diff --git a/tests/compiler/dart2js_foreign/native_call_arity1_test.dart b/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
index 61cd7a8..2ae3917 100644
--- a/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
@@ -10,12 +10,14 @@
 // * Named arguments are passed in the correct position, so require preceding
 // arguments to be passed.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native int foo(int x);
 }
 
-@native("*B")
+@Native("*B")
 class B {
   @native int foo([x, y, z]);
 }
@@ -26,7 +28,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.foo = function () { return arguments.length; };
 
diff --git a/tests/compiler/dart2js_foreign/native_call_arity2_test.dart b/tests/compiler/dart2js_foreign/native_call_arity2_test.dart
index 50a71c3..b28e99e 100644
--- a/tests/compiler/dart2js_foreign/native_call_arity2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_call_arity2_test.dart
@@ -5,12 +5,14 @@
 // This is a similar test to NativeCallArity1FrogTest, but makes sure
 // that subclasses also get the right number of arguments.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native int foo([x, y]);
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
   @native int foo([x, y]);
 }
@@ -18,7 +20,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
     child.prototype.__proto__ = parent.prototype;
diff --git a/tests/compiler/dart2js_foreign/native_call_arity3_test.dart b/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
index 2fa0b4e7..fb2e00b 100644
--- a/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
@@ -6,12 +6,14 @@
 // parameters set to null. These parameters should be treated as if they
 // do not have a default value for the native methods.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native int foo(int x);
 }
 
-@native("*B")
+@Native("*B")
 class B {
   @native int foo([x = null, y, z = null]);
 }
@@ -22,7 +24,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.foo = function () { return arguments.length; };
 
diff --git a/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart b/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
index a293d05..f6e169b 100644
--- a/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
@@ -4,13 +4,15 @@
 
 // Test that type checks occur on native methods.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native int foo(int x);
   @native int cmp(A other);
 }
 
-@native("*B")
+@Native("*B")
 class B {
   @native String foo(String x);
   @native int cmp(B other);
@@ -19,7 +21,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.foo = function (x) { return x + 1; };
 A.prototype.cmp = function (x) { return 0; };
diff --git a/tests/compiler/dart2js_foreign/native_checked_fields_test.dart b/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
index f101760..15851b8 100644
--- a/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
+++ b/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
@@ -4,12 +4,14 @@
 
 // Test that type checks occur on assignment to fields of native methods.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   int foo;
 }
 
-@native("*B")
+@Native("*B")
 class B {
   String foo;
 }
@@ -17,7 +19,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function A() {}
 
 function B() {}
diff --git a/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart b/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
index b9d0ff2..170d6e2 100644
--- a/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_test.dart
@@ -4,13 +4,15 @@
 
 // Test that hidden native class names are not used by generated code.
 
-@native("*B")
+import 'native_metadata.dart';
+
+@Native("*B")
 class A {
   get name => 'A';
   static A create() => makeA();
 }
 
-@native("*C")
+@Native("*C")
 class B {
   get name => 'B';
   static B create() => makeB();
@@ -24,7 +26,7 @@
 @native makeA();
 @native makeB();
 
-@native("""
+@Native("""
 // Poison hidden native names 'B' and 'C' to prove the compiler didn't place
 // anthing on the hidden native class.
 B = null;
@@ -32,7 +34,7 @@
 """)
 void setup1();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function B(){}
 function C(){}
diff --git a/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart b/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
index 6cb9903..0aae881 100644
--- a/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
@@ -7,13 +7,15 @@
 // superclass caches the method in the prototype, so shadowing the dispatcher
 // stored on Object.prototype.
 
+import 'native_metadata.dart';
+
 // Version 1: It might be possible to call foo directly.
-@native("*A1")
+@Native("*A1")
 class A1 {
   @native foo();
 }
 
-@native("*B1")
+@Native("*B1")
 class B1 extends A1  {
   @native foo();
 }
@@ -23,12 +25,12 @@
 
 
 // Version 2: foo needs some kind of trampoline.
-@native("*A2")
+@Native("*A2")
 class A2 {
   @native foo([a=99]);
 }
 
-@native("*B2")
+@Native("*B2")
 class B2 extends A2  {
   @native foo([z=1000]);
 }
@@ -36,7 +38,7 @@
 @native makeA2();
 @native makeB2();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_class_inheritance2_test.dart b/tests/compiler/dart2js_foreign/native_class_inheritance2_test.dart
index dadc77c..77f24c3 100644
--- a/tests/compiler/dart2js_foreign/native_class_inheritance2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_inheritance2_test.dart
@@ -7,21 +7,23 @@
 // superclass caches the method in the prototype, so shadowing the dispatcher
 // stored on Object.prototype.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native foo([a=100]);
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
 }
 
-@native("*C")
+@Native("*C")
 class C extends B  {
   @native foo([z=300]);
 }
 
-@native("*D")
+@Native("*D")
 class D extends C  {
 }
 
@@ -30,7 +32,7 @@
 @native makeC();
 @native makeD();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_class_inheritance3_test.dart b/tests/compiler/dart2js_foreign/native_class_inheritance3_test.dart
index cac0815..c3a085f 100644
--- a/tests/compiler/dart2js_foreign/native_class_inheritance3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_inheritance3_test.dart
@@ -6,11 +6,13 @@
 // interferes with subsequent resolving of the method.  This might happen if the
 // noSuchMethod is cached on Object.prototype.
 
-@native("*A1")
+import 'native_metadata.dart';
+
+@Native("*A1")
 class A1 {
 }
 
-@native("*B1")
+@Native("*B1")
 class B1 extends A1  {
 }
 
@@ -18,12 +20,12 @@
 @native makeB1();
 
 
-@native("*A2")
+@Native("*A2")
 class A2 {
   @native foo([a=99]);
 }
 
-@native("*B2")
+@Native("*B2")
 class B2 extends A2  {
 }
 
@@ -32,7 +34,7 @@
 
 @native makeObject();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart b/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
index 0307d8c..b7a8c67 100644
--- a/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
@@ -6,7 +6,9 @@
 // inheritance, the superclass method must not be reached by a call on the
 // subclass.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   var _field;
 
@@ -16,7 +18,7 @@
   int method(int z) => _field + z;
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
   var _field2;
 
@@ -29,7 +31,7 @@
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native(r"""
+@Native(r"""
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
     child.prototype.__proto__ = parent.prototype;
diff --git a/tests/compiler/dart2js_foreign/native_class_is_check1_test.dart b/tests/compiler/dart2js_foreign/native_class_is_check1_test.dart
index c31cd8f..ee73eae 100644
--- a/tests/compiler/dart2js_foreign/native_class_is_check1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_is_check1_test.dart
@@ -4,6 +4,8 @@
 
 // Test for correct simple is-checks on hidden native classes.
 
+import 'native_metadata.dart';
+
 interface I {
   I read();
   write(I x);
@@ -11,7 +13,7 @@
 
 // Native implementation.
 
-@native("*A")
+@Native("*A")
 class A implements I  {
   // The native class accepts only other native instances.
   @native A read();
@@ -20,7 +22,7 @@
 
 @native makeA();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(){}
 A.prototype.read = function() { return this._x; };
diff --git a/tests/compiler/dart2js_foreign/native_class_is_check3_test.dart b/tests/compiler/dart2js_foreign/native_class_is_check3_test.dart
index cae73e7..464e593 100644
--- a/tests/compiler/dart2js_foreign/native_class_is_check3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_is_check3_test.dart
@@ -4,6 +4,8 @@
 
 // Test for correct simple is-checks on hidden native classes.
 
+import 'native_metadata.dart';
+
 interface J {
 }
 
@@ -14,21 +16,21 @@
 
 // Native implementation.
 
-@native("*A")
+@Native("*A")
 class A implements I  {
   // The native class accepts only other native instances.
   @native A read();
   @native write(A x);
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
 }
 
 @native makeA();
 @native makeB();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_class_with_dart_methods_test.dart b/tests/compiler/dart2js_foreign/native_class_with_dart_methods_test.dart
index 21c84fb..963263e 100644
--- a/tests/compiler/dart2js_foreign/native_class_with_dart_methods_test.dart
+++ b/tests/compiler/dart2js_foreign/native_class_with_dart_methods_test.dart
@@ -4,7 +4,9 @@
 
 // Additional Dart code may be 'placed on' hidden native classes.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
 
   var _field;
@@ -17,7 +19,7 @@
 
 @native A makeA() { return new A(); }
 
-@native("""
+@Native("""
 function A() {}
 makeA = function(){return new A;};
 """)
diff --git a/tests/compiler/dart2js_foreign/native_closure_identity_test.dart b/tests/compiler/dart2js_foreign/native_closure_identity_test.dart
index 11fbc3b..1ba6c2f 100644
--- a/tests/compiler/dart2js_foreign/native_closure_identity_test.dart
+++ b/tests/compiler/dart2js_foreign/native_closure_identity_test.dart
@@ -2,9 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 typedef void MyFunctionType();
 
-@native("*A")
+@Native("*A")
 class A {
   @native setClosure(MyFunctionType f);
   @native check(MyFunctionType f);
@@ -13,7 +15,7 @@
 
 @native makeA() { return new A(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.setClosure = function(f) { this.f = f; };
 A.prototype.check = function(f) { return this.f === f; };
diff --git a/tests/compiler/dart2js_foreign/native_exceptions1_test.dart b/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
index bfd945d..40f5b9e 100644
--- a/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
@@ -13,9 +13,10 @@
 // is no place in the Dart language to communicate (3).  So we use the following
 // fake body technique.
 
+import 'native_metadata.dart';
 
 // The exception type.
-@native("*E")
+@Native("*E")
 class E {
   @native E._used();  // Bogus native constructor, called only from fake body.
 
@@ -23,7 +24,7 @@
 }
 
 // Type with exception-throwing methods.
-@native("*A")
+@Native("*A")
 class A {
   @native op(int x) {
     // Fake body calls constructor to mark the exception class (E) as used.
@@ -39,14 +40,14 @@
 
 @native makeA();
 
-@native("""
+@Native("""
 // Ensure we are not relying on global names 'A' and 'E'.
 A = null;
 E = null;
 """)
 void setup1();
 
-@native("""
+@Native("""
 // This code is all inside 'setup2' and so not accesible from the global scope.
 function E(x){ this.code = x; }
 
diff --git a/tests/compiler/dart2js_foreign/native_field_rename_1_test.dart b/tests/compiler/dart2js_foreign/native_field_rename_1_test.dart
index a6766fa..e8ae45c 100644
--- a/tests/compiler/dart2js_foreign/native_field_rename_1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_field_rename_1_test.dart
@@ -6,7 +6,9 @@
 // fields.  However, native fields keep their name.  The implication: a getter
 // for the field must be based on the field's name, not the field's jsname.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   int key;                    //  jsname is 'key'
   int getKey() => key;
@@ -18,9 +20,9 @@
   int getKey() => key;
 }
 
-@native("*X")
+@Native("*X")
 class X {
-  @native('key') int native_key_method();
+  @Native('key') int native_key_method();
   // This should cause B.key to be renamed, but not A.key.
 
   @natve('key') int key();
@@ -30,7 +32,7 @@
 @native X makeX();
 
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(){ this.key = 111; }
 A.prototype.getKey = function(){return this.key;};
diff --git a/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart b/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
index 9499ff6..34eaacb 100644
--- a/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
@@ -6,11 +6,13 @@
 // fields.  However, native fields keep their name.  The implication: a getter
 // for the field must be based on the field's name, not the field's jsname.
 
+import 'native_metadata.dart';
+
 interface I {
   int key;
 }
 
-@native("*A")
+@Native("*A")
 class A implements I  {
   int key;                    //  jsname is 'key'
   int getKey() => key;
@@ -22,18 +24,18 @@
   int getKey() => key;
 }
 
-@native("*X")
+@Native("*X")
 class X {
-  @native('key') int native_key_method();
+  @Native('key') int native_key_method();
   // This should cause B.key to be renamed, but not A.key.
-  @native('key') int key();
+  @Native('key') int key();
 }
 
 @native A makeA();
 @native X makeX();
 
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(){ this.key = 111; }
 A.prototype.getKey = function(){return this.key;};
diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart
index 233521d..fbe7446 100644
--- a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart
+++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib1.dart
@@ -4,9 +4,9 @@
 
 // 'I' is the name of an interface and the name of the native class.
 
-#library('native_library_same_name_used_lib1.dart');
+library native_library_same_name_used_lib1;
 
-#import('native_library_same_name_used_lib2.dart');
+import 'native_library_same_name_used_lib2.dart';
 
 interface I {
   I read();
diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart
index 7eaf6aa..60b9761 100644
--- a/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart
+++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_lib2.dart
@@ -4,11 +4,12 @@
 
 // Native implementation.
 
-#library('lib2');
-#import('native_library_same_name_used_lib1.dart');  // To get interface I.
+library lib2;
+import 'native_library_same_name_used_lib1.dart';  // To get interface I.
+import 'native_metadata.dart';
 
 // Native impl has same name as interface.
-@native("*I")
+@Native("*I")
 class Impl implements I  {
   @native Impl read();
   @native write(Impl x);
diff --git a/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart b/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart
index e3efa23..c3bddda 100644
--- a/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart
+++ b/tests/compiler/dart2js_foreign/native_library_same_name_used_test.dart
@@ -4,10 +4,11 @@
 
 // Test for correct hidden native class when interface has same name.
 
-#library('main');
-#import('native_library_same_name_used_lib1.dart');
+library main;
+import 'native_library_same_name_used_lib1.dart';
+import 'native_metadata.dart';
 
-@native("""
+@Native("""
   // This code is all inside 'setup' and so not accesible from the global scope.
   function I(){}
   I.prototype.read = function() { return this._x; };
diff --git a/tests/compiler/dart2js_foreign/native_literal_class_test.dart b/tests/compiler/dart2js_foreign/native_literal_class_test.dart
index 6358595..86e9fd0 100644
--- a/tests/compiler/dart2js_foreign/native_literal_class_test.dart
+++ b/tests/compiler/dart2js_foreign/native_literal_class_test.dart
@@ -2,12 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("= {log: function() { return 42 } }")
+import 'native_metadata.dart';
+
+@Native("= {log: function() { return 42 } }")
 class A {
   @native void log();
 }
 
-@native("""
+@Native("""
   return A;
 """)
 getA();
diff --git a/sdk/lib/html/templates/html/interface/interface_Storage.darttemplate b/tests/compiler/dart2js_foreign/native_metadata.dart
similarity index 62%
copy from sdk/lib/html/templates/html/interface/interface_Storage.darttemplate
copy to tests/compiler/dart2js_foreign/native_metadata.dart
index 5f0da3d..e3a513f 100644
--- a/sdk/lib/html/templates/html/interface/interface_Storage.darttemplate
+++ b/tests/compiler/dart2js_foreign/native_metadata.dart
@@ -2,9 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of html;
+library native_metadata;
 
-$!COMMENT
-abstract class $ID implements Map<String, String> {
-$!MEMBERS
+class Native {
+  final String info;
+  const Native(this.info);
 }
+
+const Native native = const Native(null);
diff --git a/tests/compiler/dart2js_foreign/native_method_rename1_test.dart b/tests/compiler/dart2js_foreign/native_method_rename1_test.dart
index a23f8b1..485fb5f5 100644
--- a/tests/compiler/dart2js_foreign/native_method_rename1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_method_rename1_test.dart
@@ -4,11 +4,13 @@
 
 // Test the feature where the native string declares the native method's name.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
-  @native('fooA') int foo();
-  @native('barA') int bar();
-  @native('bazA') int baz();
+  @Native('fooA') int foo();
+  @Native('barA') int bar();
+  @Native('bazA') int baz();
 }
 
 @native A makeA();
@@ -18,7 +20,7 @@
   int baz() => 900;
 }
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(){}
 A.prototype.fooA = function(){return 100;};
diff --git a/tests/compiler/dart2js_foreign/native_method_rename2_test.dart b/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
index 895b683..767f61b 100644
--- a/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
@@ -4,22 +4,24 @@
 
 // Test the feature where the native string declares the native method's name.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
-  @native('fooA')
+  @Native('fooA')
   int foo();
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
-  @native('fooB')
+  @Native('fooB')
   int foo();
 }
 
 @native makeA();
 @native makeB();
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_method_rename3_test.dart b/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
index c4ef72a..bceaf9f 100644
--- a/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
@@ -5,15 +5,17 @@
 // Test the feature where the native string declares the native method's name.
 // #3. The name does not get
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
-  @native('fooA')
+  @Native('fooA')
   int foo();
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
-  @native('fooB')
+  @Native('fooB')
   int foo();
   int fooA() => 333;
 }
@@ -27,7 +29,7 @@
 @native makeB();
 
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
diff --git a/tests/compiler/dart2js_foreign/native_method_with_keyword_name_test.dart b/tests/compiler/dart2js_foreign/native_method_with_keyword_name_test.dart
index 2a7e491..6a15512 100644
--- a/tests/compiler/dart2js_foreign/native_method_with_keyword_name_test.dart
+++ b/tests/compiler/dart2js_foreign/native_method_with_keyword_name_test.dart
@@ -4,14 +4,16 @@
 
 // Make sure we can have a native with a name that is a JavaScript keyword.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   @native int delete();
 }
 
 @native A makeA() { return new A(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.delete = function() { return 87; };
 
diff --git a/tests/compiler/dart2js_foreign/native_missing_method1_test.dart b/tests/compiler/dart2js_foreign/native_missing_method1_test.dart
index 1739911..f81b9a8 100644
--- a/tests/compiler/dart2js_foreign/native_missing_method1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_missing_method1_test.dart
@@ -2,13 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
 }
 
 @native makeA();
 
-@native("""
+@Native("""
 function A() {};
 A.prototype.foo = function() { return  42; }
 makeA = function() { return new A; }
diff --git a/tests/compiler/dart2js_foreign/native_missing_method2_test.dart b/tests/compiler/dart2js_foreign/native_missing_method2_test.dart
index 13feebd..fb99986 100644
--- a/tests/compiler/dart2js_foreign/native_missing_method2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_missing_method2_test.dart
@@ -2,13 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
 }
 
 @native makeA();
 
-@native("""
+@Native("""
 function A() {};
 A.prototype.foo = function() { return  42; }
 makeA = function() { return new A; }
diff --git a/tests/compiler/dart2js_foreign/native_named_constructors2_test.dart b/tests/compiler/dart2js_foreign/native_named_constructors2_test.dart
index e7cbaaa..4c6704b 100644
--- a/tests/compiler/dart2js_foreign/native_named_constructors2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_named_constructors2_test.dart
@@ -4,26 +4,27 @@
 
 // Hidden native class wwith named constructors and static methods.
 
+import 'native_metadata.dart';
 
-@native("*A")
+@Native("*A")
 class A {
 
   factory A(int len) => _construct(len);
 
   factory A.fromString(String s)  => _construct(s.length);
 
-  @native(r'return makeA(a+b);')
+  @Native(r'return makeA(a+b);')
   factory A.nativeConstructor(int a, int b);
 
   static A _construct(v) { return makeA(v); }
 
-  @native('return this._x;')
+  @Native('return this._x;')
   foo();
 }
 
 @native makeA(v);
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(arg) { this._x = arg; }
 makeA = function(arg) { return new A(arg); }
diff --git a/tests/compiler/dart2js_foreign/native_named_constructors3_test.dart b/tests/compiler/dart2js_foreign/native_named_constructors3_test.dart
index a0319bc..18bba8e 100644
--- a/tests/compiler/dart2js_foreign/native_named_constructors3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_named_constructors3_test.dart
@@ -5,8 +5,9 @@
 // Hidden native class with factory constructors and NO static methods.
 // Regression test.
 
+import 'native_metadata.dart';
 
-@native("*A")
+@Native("*A")
 class A {
 
   // No static methods in this class.
@@ -15,16 +16,16 @@
 
   factory A.fromString(String s)  => makeA(s.length);
 
-  @native(r'return makeA(a+b);')
+  @Native(r'return makeA(a+b);')
   factory A.nativeConstructor(int a, int b);
 
-  @native('return this._x;')
+  @Native('return this._x;')
   foo();
 }
 
 @native makeA(v);
 
-@native("""
+@Native("""
 // This code is all inside 'setup' and so not accesible from the global scope.
 function A(arg) { this._x = arg; }
 makeA = function(arg) { return new A(arg); }
diff --git a/tests/compiler/dart2js_foreign/native_no_such_method_exception2_test.dart b/tests/compiler/dart2js_foreign/native_no_such_method_exception2_test.dart
index 84740ef..65f9517 100644
--- a/tests/compiler/dart2js_foreign/native_no_such_method_exception2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_no_such_method_exception2_test.dart
@@ -2,11 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
 }
 
-@native("*B")
+@Native("*B")
 class B extends A  {
   @native foo();
 }
@@ -14,7 +16,7 @@
 @native makeA();
 @native makeB();
 
-@native("""
+@Native("""
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
     child.prototype.__proto__ = parent.prototype;
diff --git a/tests/compiler/dart2js_foreign/native_no_such_method_exception3_test.dart b/tests/compiler/dart2js_foreign/native_no_such_method_exception3_test.dart
index 5779fb4..4aadd1b 100644
--- a/tests/compiler/dart2js_foreign/native_no_such_method_exception3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_no_such_method_exception3_test.dart
@@ -2,12 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   bar() => 42;
 }
 
-@native("*B")
+@Native("*B")
 class B {
   foo() => 42;
 }
@@ -19,7 +21,7 @@
 
 @native makeA();
 
-@native("""
+@Native("""
   function A() {}
   makeA = function() { return new A; }
 """)
diff --git a/tests/compiler/dart2js_foreign/native_no_such_method_exception4_test.dart b/tests/compiler/dart2js_foreign/native_no_such_method_exception4_test.dart
index b0eddc7..b68e078 100644
--- a/tests/compiler/dart2js_foreign/native_no_such_method_exception4_test.dart
+++ b/tests/compiler/dart2js_foreign/native_no_such_method_exception4_test.dart
@@ -2,20 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   bar() => 42;
   noSuchMethod(x,y) => "native($x:$y)";
 }
 
-@native("*B")
+@Native("*B")
 class B {
   baz() => 42;
 }
 
 @native makeA();
 
-@native("""
+@Native("""
   function A() {}
   makeA = function() { return new A; }
 """)
diff --git a/tests/compiler/dart2js_foreign/native_no_such_method_exception5_test.dart b/tests/compiler/dart2js_foreign/native_no_such_method_exception5_test.dart
index 5e4b580..abb3961 100644
--- a/tests/compiler/dart2js_foreign/native_no_such_method_exception5_test.dart
+++ b/tests/compiler/dart2js_foreign/native_no_such_method_exception5_test.dart
@@ -2,13 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   bar() => 42;
   noSuchMethod(x,y) => "native($x:$y)";
 }
 
-@native("*B")
+@Native("*B")
 class B {
   baz() => 42;
 }
@@ -20,7 +22,7 @@
 
 @native makeA();
 
-@native("""
+@Native("""
   function A() {}
   makeA = function() { return new A; }
 """)
diff --git a/tests/compiler/dart2js_foreign/native_no_such_method_exception_test.dart b/tests/compiler/dart2js_foreign/native_no_such_method_exception_test.dart
index ca530dd..ee9d30e 100644
--- a/tests/compiler/dart2js_foreign/native_no_such_method_exception_test.dart
+++ b/tests/compiler/dart2js_foreign/native_no_such_method_exception_test.dart
@@ -2,19 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
   bar() => 42;
 }
 
-@native("*B")
+@Native("*B")
 class B {
   foo() => 42;
 }
 
 @native makeA();
 
-@native("""
+@Native("""
   function A() {}
   makeA = function() { return new A; }
 """)
diff --git a/tests/compiler/dart2js_foreign/native_null_closure_test.dart b/tests/compiler/dart2js_foreign/native_null_closure_test.dart
index f2b3489..7762d1c 100644
--- a/tests/compiler/dart2js_foreign/native_null_closure_test.dart
+++ b/tests/compiler/dart2js_foreign/native_null_closure_test.dart
@@ -2,9 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 typedef void MyFunctionType();
 
-@native("*A")
+@Native("*A")
 class A {
   @native setClosure(MyFunctionType f);
   @native check(MyFunctionType f);
@@ -13,7 +15,7 @@
 
 @native makeA() { return new A(); }
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.setClosure = function(f) { this.f = f; };
 A.prototype.check = function(f) { return this.f === f; };
diff --git a/tests/compiler/dart2js_foreign/native_null_test.dart b/tests/compiler/dart2js_foreign/native_null_test.dart
index f22046f..77db080 100644
--- a/tests/compiler/dart2js_foreign/native_null_test.dart
+++ b/tests/compiler/dart2js_foreign/native_null_test.dart
@@ -5,21 +5,23 @@
 // Test that parameters in native methods are not mangled. This test is needed
 // until we change all libraries to using the JS foreign element.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
-  @native("return null;")
+  @Native("return null;")
   returnNull();
-  @native("return undefined;")
+  @Native("return undefined;")
   returnUndefined();
-  @native("return '';")
+  @Native("return '';")
   returnEmptyString();
-  @native("return 0;")
+  @Native("return 0;")
   returnZero();
 }
 
 @native A makeA();
 
-@native("""
+@Native("""
 function A() {}
 makeA = function(){return new A;};
 """)
diff --git a/tests/compiler/dart2js_foreign/native_parameter_names_test.dart b/tests/compiler/dart2js_foreign/native_parameter_names_test.dart
index 7e7b32d..466b226 100644
--- a/tests/compiler/dart2js_foreign/native_parameter_names_test.dart
+++ b/tests/compiler/dart2js_foreign/native_parameter_names_test.dart
@@ -5,17 +5,19 @@
 // Test that parameters in native methods are not mangled. This test is needed
 // until we change all libraries to using the JS foreign element.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
-  @native("return name;")
+  @Native("return name;")
   foo(name);
-  @native("return undefined;")
+  @Native("return undefined;")
   bar(undefined);
 }
 
 @native A makeA();
 
-@native("""
+@Native("""
 function A() {}
 makeA = function(){return new A;};
 """)
diff --git a/tests/compiler/dart2js_foreign/native_property_test.dart b/tests/compiler/dart2js_foreign/native_property_test.dart
index 3434188..4aa85ea 100644
--- a/tests/compiler/dart2js_foreign/native_property_test.dart
+++ b/tests/compiler/dart2js_foreign/native_property_test.dart
@@ -4,14 +4,16 @@
 
 // Properties on hidden native classes.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {
 
   // Setters and getters should be similar to these methods:
-  @native('return this._x;')
+  @Native('return this._x;')
   int getX();
 
-  @native('this._x = value;')
+  @Native('this._x = value;')
   void setX(int value);
 
   @native
@@ -26,17 +28,17 @@
   @native
   set Y(int value);
 
-  @native('return this._z;')
+  @Native('return this._z;')
   int get Z;
 
-  @native('this._z = value;')
+  @Native('this._z = value;')
   set Z(int value);
 }
 
 @native
 A makeA() { return new A(); }
 
-@native("""
+@Native("""
 function A() {}
 
 Object.defineProperty(A.prototype, "X", {
diff --git a/tests/compiler/dart2js_foreign/native_to_string_test.dart b/tests/compiler/dart2js_foreign/native_to_string_test.dart
index 87059b9..959b2ca 100644
--- a/tests/compiler/dart2js_foreign/native_to_string_test.dart
+++ b/tests/compiler/dart2js_foreign/native_to_string_test.dart
@@ -2,11 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@native("*A")
+import 'native_metadata.dart';
+
+@Native("*A")
 class A {}
 @native makeA();
 
-@native("""
+@Native("""
 function A() {}
 makeA = function(){return new A;};
 """)
diff --git a/tests/compiler/dart2js_foreign/native_use_native_name_in_table_test.dart b/tests/compiler/dart2js_foreign/native_use_native_name_in_table_test.dart
index 652f184d..b57e267 100644
--- a/tests/compiler/dart2js_foreign/native_use_native_name_in_table_test.dart
+++ b/tests/compiler/dart2js_foreign/native_use_native_name_in_table_test.dart
@@ -5,19 +5,21 @@
 // Test that we put native names and not Dart names into the dynamic
 // dispatch table.
 
-@native("*NativeA")
+import 'native_metadata.dart';
+
+@Native("*NativeA")
 class A {
   @native foo();
 }
 
-@native("*NativeB")
+@Native("*NativeB")
 class B extends A  {
 }
 
 @native A makeA() { return new A(); }
 @native B makeB() { return new B(); }
 
-@native("""
+@Native("""
 function inherits(child, parent) {
   if (child.prototype.__proto__) {
     child.prototype.__proto__ = parent.prototype;
diff --git a/tests/compiler/dart2js_foreign/native_window1_test.dart b/tests/compiler/dart2js_foreign/native_window1_test.dart
index 7c89237..ecd0b8e 100644
--- a/tests/compiler/dart2js_foreign/native_window1_test.dart
+++ b/tests/compiler/dart2js_foreign/native_window1_test.dart
@@ -2,13 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 interface Window {
   final int document;
 }
 
 // Defining this global object makes Frog eager on optimizing
 // call sites where the receiver is typed 'Window'.
-@native("@*DOMWindow")
+@Native("@*DOMWindow")
 class _DOMWindowJs implements Window  {
   final int document;
 }
diff --git a/tests/compiler/dart2js_foreign/native_window2_test.dart b/tests/compiler/dart2js_foreign/native_window2_test.dart
index a9e1479..414ede5 100644
--- a/tests/compiler/dart2js_foreign/native_window2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_window2_test.dart
@@ -2,13 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 interface Window {
   final int document;
 }
 
 // Defining this global object makes Frog eager on optimizing
 // call sites where the receiver is typed 'Window'.
-@native("@*DOMWindow")
+@Native("@*DOMWindow")
 class _DOMWindowJs implements Window  {
   final int document;
 }
diff --git a/tests/compiler/dart2js_foreign/native_wrapping_function2_test.dart b/tests/compiler/dart2js_foreign/native_wrapping_function2_test.dart
index 9690d89..a123a1f 100644
--- a/tests/compiler/dart2js_foreign/native_wrapping_function2_test.dart
+++ b/tests/compiler/dart2js_foreign/native_wrapping_function2_test.dart
@@ -2,28 +2,30 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 typedef void Callback0();
 typedef void Callback1(arg1);
 typedef void Callback2(arg1, arg2);
 
-@native("*A")
+@Native("*A")
 class A {
-  @native("return closure();")
+  @Native("return closure();")
   foo0(Callback0 closure);
 
-  @native("return closure(arg1);")
+  @Native("return closure(arg1);")
   foo1(Callback1 closure, arg1);
 
-  @native("return closure(arg1, arg2);")
+  @Native("return closure(arg1, arg2);")
   foo2(Callback2 closure, arg1, arg2);
 
-  @native("return closure == (void 0) ? 42 : closure();")
+  @Native("return closure == (void 0) ? 42 : closure();")
   foo3([Callback0 closure]);
 }
 
 @native makeA();
 
-@native("""
+@Native("""
 function A() {}
 makeA = function(){return new A;};
 """)
diff --git a/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart b/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
index ef22da5..e341171 100644
--- a/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
+++ b/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
@@ -2,11 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 typedef void Callback0();
 typedef void Callback1(arg1);
 typedef void Callback2(arg1, arg2);
 
-@native("*A")
+@Native("*A")
 class A {
   @native foo1(Callback1 closure, [arg1 = 0]);
   @native foo2(Callback2 closure, [arg1 = 0, arg2 = 1]);
@@ -14,7 +16,7 @@
 
 @native makeA();
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.foo1 = function(closure, arg1) { return closure(arg1); };
 A.prototype.foo2 = function(closure, arg1, arg2) {
diff --git a/tests/compiler/dart2js_foreign/native_wrapping_function_test.dart b/tests/compiler/dart2js_foreign/native_wrapping_function_test.dart
index b34ee7b..5da4248 100644
--- a/tests/compiler/dart2js_foreign/native_wrapping_function_test.dart
+++ b/tests/compiler/dart2js_foreign/native_wrapping_function_test.dart
@@ -2,11 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'native_metadata.dart';
+
 typedef void Callback0();
 typedef void Callback1(arg1);
 typedef void Callback2(arg1, arg2);
 
-@native("*A")
+@Native("*A")
 class A {
   @native foo0(Callback0 closure);
   @native foo1(Callback1 closure, arg1);
@@ -15,7 +17,7 @@
 
 @native makeA();
 
-@native("""
+@Native("""
 function A() {}
 A.prototype.foo0 = function(closure) { return closure(); };
 A.prototype.foo1 = function(closure, arg1) { return closure(arg1); };
diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
index 3cd6c86..1480dfe 100644
--- a/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_library_same_name_used_frog_test.dart
@@ -4,8 +4,8 @@
 
 // Test for correct hidden native class when interface has same name.
 
-#library('main');
-#import('native_library_same_name_used_lib1.dart');
+library main;
+import 'native_library_same_name_used_lib1.dart';
 
 void setup() native """
   // This code is all inside 'setup' and so not accesible from the global scope.
diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart b/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart
index 4e576c3..3080d4c 100644
--- a/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart
+++ b/tests/compiler/dart2js_native/native_library_same_name_used_lib1.dart
@@ -4,9 +4,9 @@
 
 // 'I' is the name of an interface and the name of the native class.
 
-#library('native_library_same_name_used_lib1.dart');
+library native_library_same_name_used_lib1;
 
-#import('native_library_same_name_used_lib2.dart');
+import 'native_library_same_name_used_lib2.dart';
 
 interface I {
   I read();
diff --git a/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart b/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart
index cef03fb..9f1cfe6 100644
--- a/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart
+++ b/tests/compiler/dart2js_native/native_library_same_name_used_lib2.dart
@@ -4,8 +4,8 @@
 
 // Native implementation.
 
-#library('lib2');
-#import('native_library_same_name_used_lib1.dart');  // To get interface I.
+library lib2;
+import 'native_library_same_name_used_lib1.dart';  // To get interface I.
 
 // Native impl has same name as interface.
 class Impl implements I native "*I" {
diff --git a/tests/corelib/big_integer_vm_test.dart b/tests/corelib/big_integer_vm_test.dart
index 9c7719a..02ee00a 100644
--- a/tests/corelib/big_integer_vm_test.dart
+++ b/tests/corelib/big_integer_vm_test.dart
@@ -4,7 +4,7 @@
 // Testing Bigints.
 // TODO(srdjan): Make sure the numbers are Bigint and not Mint or Smi.
 
-#library("BigIntegerTest.dart");
+library big_integer_test;
 
 class BigIntegerTest {
 
diff --git a/tests/corelib/collection_from_test.dart b/tests/corelib/collection_from_test.dart
index fc4511f..9996a7c 100644
--- a/tests/corelib/collection_from_test.dart
+++ b/tests/corelib/collection_from_test.dart
@@ -24,8 +24,8 @@
     int initialSum = 0;
     int otherSum = 0;
 
-    initial.forEach(void f(e) { initialSum += e; });
-    other.forEach(void f(e) { otherSum += e; });
+    initial.forEach((e) { initialSum += e; });
+    other.forEach((e) { otherSum += e; });
     Expect.equals(4 + 2 + 1, otherSum);
     Expect.equals(otherSum, initialSum);
   }
diff --git a/tests/corelib/collection_to_string_test.dart b/tests/corelib/collection_to_string_test.dart
index 1eb7d3b..268f589 100644
--- a/tests/corelib/collection_to_string_test.dart
+++ b/tests/corelib/collection_to_string_test.dart
@@ -6,8 +6,8 @@
  * Tests for the toString methods on collections and maps.
  */
 
-#library('collection_to_string');
-#import('dart:math', prefix: 'Math');
+library collection_to_string;
+import 'dart:math' as Math;
 
 // TODO(jjb): seed random number generator when API allows it
 
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index a7928d2..356cedf 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -31,9 +31,6 @@
 [ $arch == arm ]
 *: Skip
 
-[ $compiler == dart2js && $checked ]
-*: Skip
-
 [ $compiler == dart2js ]
 math_parse_double_test: Fail # Expect.equals(expected: <78187493520>, actual: <0>)
 math_test: Fail # issue 3333
@@ -68,19 +65,3 @@
 null_test: Fail # inherited from VM
 unicode_test: Fail # inherited from VM
 
-[ $compiler == dartc ]
-# test issue 6324
-list_sort_test: Fail, OK
-sort_test: Fail, OK
-
-# test issue 6512
-big_integer_vm_test: Fail, OK
-collection_to_string_test: Fail, OK
-exception_implementation_test: Fail, OK
-futures_test: Fail, OK
-map_test: Fail, OK
-maps_test: Fail, OK
-queue_test: Fail, OK
-splay_tree_test: Fail, OK
-string_base_vm_test: Fail, OK
-stopwatch_test: Fail, OK
diff --git a/tests/corelib/exception_implementation_test.dart b/tests/corelib/exception_implementation_test.dart
index 60eb28e..d30a392 100644
--- a/tests/corelib/exception_implementation_test.dart
+++ b/tests/corelib/exception_implementation_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.
 
-#library("ExceptionImplementationTest.dart");
+library exception_implementation_test;
 
 main() {
   final msg = 1;
diff --git a/tests/corelib/expando_test.dart b/tests/corelib/expando_test.dart
index 7e006be..318c630 100644
--- a/tests/corelib/expando_test.dart
+++ b/tests/corelib/expando_test.dart
@@ -23,7 +23,7 @@
 
   static visit(object) {
     int count = visits[object];
-    count = (count === null) ? 1 : count + 1;
+    count = (count == null) ? 1 : count + 1;
     visits[object] = count;
   }
 
diff --git a/tests/corelib/futures_test.dart b/tests/corelib/futures_test.dart
index 07ef23a..e5daa1d 100644
--- a/tests/corelib/futures_test.dart
+++ b/tests/corelib/futures_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("FuturesTest");
-#import("dart:isolate");
+library futures_test;
+import 'dart:isolate';
 
 Future testWaitEmpty() {
   List<Future> futures = new List<Future>();
diff --git a/tests/corelib/list_sort_test.dart b/tests/corelib/list_sort_test.dart
index 8b86765..335f201 100644
--- a/tests/corelib/list_sort_test.dart
+++ b/tests/corelib/list_sort_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("ListSortTest.dart");
-#source("sort_helper.dart");
+library list_sort_test;
+import 'sort_helper.dart';
 
 class ListSortTest {
   static void testMain() {
diff --git a/tests/corelib/map_test.dart b/tests/corelib/map_test.dart
index 0f78437..c7735e3 100644
--- a/tests/corelib/map_test.dart
+++ b/tests/corelib/map_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("MapTest.dart");
-#import("dart:collection");
+library map_test;
+import 'dart:collection';
 
 class MapTest {
 
diff --git a/tests/corelib/maps_test.dart b/tests/corelib/maps_test.dart
index 16ef12c..dd521e6 100644
--- a/tests/corelib/maps_test.dart
+++ b/tests/corelib/maps_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("MapsTest.dart");
-#import("dart:collection");
+library maps_test;
+import 'dart:collection';
 
 main() {
   final key1 = "key1";
diff --git a/tests/corelib/queue_test.dart b/tests/corelib/queue_test.dart
index adaa00f..0095f35 100644
--- a/tests/corelib/queue_test.dart
+++ b/tests/corelib/queue_test.dart
@@ -2,8 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("QueueTest.dart");
-#import("dart:coreimpl");
+library queue_test;
 
 class QueueTest {
 
@@ -174,7 +173,7 @@
     DoubleLinkedQueueEntry<int> entry1 = queue1.firstEntry();
     DoubleLinkedQueueEntry<int> entry2 = queue2.firstEntry();
     while (entry1 != null) {
-      Expect.equals(true, entry1 !== entry2);
+      Expect.equals(true, !identical(entry1, entry2));
       entry1 = entry1.nextEntry();
       entry2 = entry2.nextEntry();
     }
diff --git a/tests/corelib/reg_exp1_test.dart b/tests/corelib/reg_exp1_test.dart
index 025068b..7d3557e 100644
--- a/tests/corelib/reg_exp1_test.dart
+++ b/tests/corelib/reg_exp1_test.dart
@@ -5,7 +5,7 @@
 
 class RegExp1Test {
   static testMain() {
-    RegExp exp1 = const RegExp("bar|foo");
+    RegExp exp1 = new RegExp("bar|foo");
     Expect.equals(true, exp1.hasMatch("foo"));
     Expect.equals(true, exp1.hasMatch("bar"));
     Expect.equals(false, exp1.hasMatch("gim"));
@@ -14,7 +14,7 @@
     Expect.equals(false, exp1.multiLine);
     Expect.equals(false, exp1.ignoreCase);
 
-    RegExp exp2 = const RegExp("o+", ignoreCase: true);
+    RegExp exp2 = new RegExp("o+", ignoreCase: true);
     Expect.equals(true, exp2.hasMatch("this looks good"));
     Expect.equals(true, exp2.hasMatch("fOO"));
     Expect.equals(false, exp2.hasMatch("bar"));
diff --git a/tests/corelib/reg_exp4_test.dart b/tests/corelib/reg_exp4_test.dart
index 2daca49..41d8f50 100644
--- a/tests/corelib/reg_exp4_test.dart
+++ b/tests/corelib/reg_exp4_test.dart
@@ -5,7 +5,7 @@
 
 main() {
   try {
-    RegExp ex = const RegExp(null);
+    RegExp ex = new RegExp(null);
     Expect.fail("Expected: NullPointerException got: no exception");
   } on Exception catch (ex) {
     if (!(ex is NullPointerException)) {
@@ -13,7 +13,7 @@
     }
   }
   try {
-    const RegExp(r"^\w+$").hasMatch(null);
+    new RegExp(r"^\w+$").hasMatch(null);
     Expect.fail("Expected: NullPointerException got: no exception");
   } on Exception catch (ex) {
     if (!(ex is NullPointerException)) {
@@ -21,7 +21,7 @@
     }
   }
   try {
-    const RegExp(r"^\w+$").firstMatch(null);
+    new RegExp(r"^\w+$").firstMatch(null);
     Expect.fail("Expected: NullPointerException got: no exception");
   } on Exception catch (ex) {
     if (!(ex is NullPointerException)) {
@@ -29,7 +29,7 @@
     }
   }
   try {
-    const RegExp(r"^\w+$").allMatches(null);
+    new RegExp(r"^\w+$").allMatches(null);
     Expect.fail("Expected: NullPointerException got: no exception");
   } on Exception catch (ex) {
     if (!(ex is NullPointerException)) {
@@ -37,7 +37,7 @@
     }
   }
   try {
-    const RegExp(r"^\w+$").stringMatch(null);
+    new RegExp(r"^\w+$").stringMatch(null);
     Expect.fail("Expected: NullPointerException got: no exception");
   } on Exception catch (ex) {
     if (!(ex is NullPointerException)) {
diff --git a/tests/corelib/set_iterator_test.dart b/tests/corelib/set_iterator_test.dart
index 572f502..08135e4 100644
--- a/tests/corelib/set_iterator_test.dart
+++ b/tests/corelib/set_iterator_test.dart
@@ -137,7 +137,7 @@
       bool foundIt = false;
       for (var x in set) {
         foundIt = true;
-        Expect.equals(true, x === element);
+        Expect.equals(true, identical(x, element));
       }
       Expect.equals(true, foundIt);
     }
diff --git a/tests/corelib/sort_helper.dart b/tests/corelib/sort_helper.dart
index 59dac58..e378097 100644
--- a/tests/corelib/sort_helper.dart
+++ b/tests/corelib/sort_helper.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+library sort_helper;
+
 class SortHelper {
 
   SortHelper(this.sortFunction, this.compareFunction) {}
diff --git a/tests/corelib/sort_test.dart b/tests/corelib/sort_test.dart
index 5f18ecc..a421e2b 100644
--- a/tests/corelib/sort_test.dart
+++ b/tests/corelib/sort_test.dart
@@ -3,9 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Dart test for sort routines.
-#library("SortTest.dart");
-#import("dart:coreimpl");
-#source("sort_helper.dart");
+library sort_test;
+import 'sort_helper.dart';
 
 main() {
   var compare = (a, b) => a.compareTo(b);
diff --git a/tests/corelib/splay_tree_test.dart b/tests/corelib/splay_tree_test.dart
index bb0ae70..337cf8c 100644
--- a/tests/corelib/splay_tree_test.dart
+++ b/tests/corelib/splay_tree_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Dart test for Splaytrees.
-#library("SplayTreeTest.dart");
-#import("dart:collection");
+library splay_tree_test;
+import 'dart:collection';
 
 
 class SplayTreeMapTest {
diff --git a/tests/corelib/stopwatch_test.dart b/tests/corelib/stopwatch_test.dart
index 48141a3..fe37b42 100644
--- a/tests/corelib/stopwatch_test.dart
+++ b/tests/corelib/stopwatch_test.dart
@@ -4,8 +4,8 @@
 
 // Dart test program for testing stopwatch support.
 
-#library('stopwatch_test');
-#import('dart:math');
+library stopwatch_test;
+import 'dart:math';
 
 class StopwatchTest {
   static bool checkTicking(Stopwatch sw) {
diff --git a/tests/corelib/string_base_vm_test.dart b/tests/corelib/string_base_vm_test.dart
index be44250..80ea797 100644
--- a/tests/corelib/string_base_vm_test.dart
+++ b/tests/corelib/string_base_vm_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test program for testing class 'StringBase' (currently VM specific).
 
-#library("StringBaseTest.dart");
+library string_base_test;
 
 class StringBaseTest {
 
diff --git a/tests/corelib/string_split_reg_exp_test.dart b/tests/corelib/string_split_reg_exp_test.dart
index 1fa1e83..bd52cf7 100644
--- a/tests/corelib/string_split_reg_exp_test.dart
+++ b/tests/corelib/string_split_reg_exp_test.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 main() {
-  var list = "a b c".split(const RegExp(" "));
+  var list = "a b c".split(new RegExp(" "));
   Expect.equals(3, list.length);
   Expect.equals("a", list[0]);
   Expect.equals("b", list[1]);
   Expect.equals("c", list[2]);
 
-  list = "adbdc".split(const RegExp("[dz]"));
+  list = "adbdc".split(new RegExp("[dz]"));
   Expect.equals(3, list.length);
   Expect.equals("a", list[0]);
   Expect.equals("b", list[1]);
@@ -38,7 +38,7 @@
   Expect.equals("", list[2]);
   Expect.equals("", list[3]);
 
-  list = "aaa".split(const RegExp(r"a$"));
+  list = "aaa".split(new RegExp(r"a$"));
   Expect.equals(2, list.length);
   Expect.equals("aa", list[0]);
   Expect.equals("", list[1]);
diff --git a/tests/html/documentfragment_test.dart b/tests/html/documentfragment_test.dart
index 6704bd4..71b92c4 100644
--- a/tests/html/documentfragment_test.dart
+++ b/tests/html/documentfragment_test.dart
@@ -299,13 +299,6 @@
 
   test('default values', () {
     var fragment = new DocumentFragment();
-    fragment.rect.then(expectAsync1((ElementRect rect) {
-       expectEmptyRect(rect.client);
-       expectEmptyRect(rect.offset);
-       expectEmptyRect(rect.scroll);
-       expectEmptyRect(rect.bounding);
-       expect(rect.clientRects.isEmpty, isTrue);
-    }));
     expect(fragment.contentEditable, "false");
     expect(fragment.tabIndex, -1);
     expect(fragment.id, "");
diff --git a/tests/html/element_add_test.dart b/tests/html/element_add_test.dart
index 4acbea3..4156ca5 100644
--- a/tests/html/element_add_test.dart
+++ b/tests/html/element_add_test.dart
@@ -18,15 +18,15 @@
   void expectNoSuchMethod(void fn()) =>
     expect(fn, throwsNoSuchMethodError);
 
-  group('addHTML', () {
+  group('addHtml', () {
     test('htmlelement', () {
       var el = new DivElement();
-      el.addHTML('<span></span>');
+      el.addHtml('<span></span>');
       expect(el.elements.length, equals(1));
       var span = el.elements[0];
       expect(span, isSpanElement);
 
-      el.addHTML('<div></div>');
+      el.addHtml('<div></div>');
       expect(el.elements.length, equals(2));
       // Validate that the first item is still first.
       expect(el.elements[0], equals(span));
@@ -35,7 +35,7 @@
 
     test('documentFragment', () {
       var fragment = new DocumentFragment();
-      fragment.addHTML('<span>something</span>');
+      fragment.addHtml('<span>something</span>');
       expect(fragment.elements.length, equals(1));
       expect(fragment.elements[0], isSpanElement);
     });
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart
index 21f9be7..a3e6acd 100644
--- a/tests/html/element_test.dart
+++ b/tests/html/element_test.dart
@@ -4,8 +4,9 @@
 
 library ElementTest;
 import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 expectLargeRect(ClientRect rect) {
   expect(rect.top, 0);
@@ -53,7 +54,7 @@
 }
 
 main() {
-  useHtmlConfiguration();
+  useHtmlIndividualConfiguration();
 
   var isHRElement = predicate((x) => x is HRElement, 'is a HRElement');
   var isBRElement = predicate((x) => x is BRElement, 'is a BRElement');
@@ -81,28 +82,6 @@
     }));
   });
 
-  test('rect', () {
-    final container = new Element.tag("div");
-    container.style.position = 'absolute';
-    container.style.top = '8px';
-    container.style.left = '8px';
-    final element = new Element.tag("div");
-    element.style.width = '200px';
-    element.style.height = '200px';
-    container.elements.add(element);
-    document.body.elements.add(container);
-
-    element.rect.then(expectAsync1((rect) {
-      expectLargeRect(rect.client);
-      expectLargeRect(rect.offset);
-      expectLargeRect(rect.scroll);
-      expect(rect.bounding.left, 8);
-      expect(rect.bounding.top, 8);
-      expect(rect.clientRects.length, greaterThan(0));
-      container.remove();
-    }));
-  });
-
   test('client position synchronous', () {
     final container = new Element.tag("div");
     container.style.position = 'absolute';
@@ -125,6 +104,52 @@
     container.remove();
   });
 
+  group('additionalConstructors', () {
+    test('blockquote', () => testConstructorHelper('blockquote',
+        '<blockquote>foo</blockquote>', 'foo',
+        (element) => element is QuoteElement));
+    test('body', () => testConstructorHelper('body',
+        '<body><div>foo</div></body>', 'foo',
+        (element) => element is BodyElement));
+    test('head', () => testConstructorHelper('head',
+        '<head><script>foo;</script></head>', 'foo;',
+        (element) => element is HeadElement));
+    test('optgroup', () => testConstructorHelper('optgroup',
+        '<optgroup>foo</optgroup>', 'foo',
+        (element) => element is OptGroupElement));
+    test('option', () => testConstructorHelper('option',
+        '<option>foo</option>', 'foo',
+        (element) => element is OptionElement));
+    test('output', () => testConstructorHelper('output',
+        '<output>foo</output>', 'foo',
+        (element) => element is OutputElement));
+    test('progress', () => testConstructorHelper('progress',
+        '<progress>foo</progress>', 'foo',
+        (element) => element is ProgressElement));
+    test('caption', () => testConstructorHelper('caption',
+        '<caption>foo</caption>', 'foo',
+        (element) => element is TableCaptionElement));
+    test('td', () => testConstructorHelper('td', '<td>foo</td>', 'foo',
+        (element) => element is TableCellElement));
+    test('colgroup', () => testConstructorHelper('colgroup',
+        '<colgroup></colgroup>', '',
+        (element) => element is TableColElement));
+    test('col', () => testConstructorHelper('col', '<col></col>', '',
+        (element) => element is TableColElement));
+    test('tr', () => testConstructorHelper('tr',
+        '<tr><td>foo</td></tr>', 'foo',
+        (element) => element is TableRowElement));
+    test('tbody', () => testConstructorHelper('tbody',
+        '<tbody><tr><td>foo</td></tr></tbody>', 'foo',
+        (element) => element is TableSectionElement));
+    test('tfoot', () => testConstructorHelper('tfoot',
+        '<tfoot><tr><td>foo</td></tr></tfoot>', 'foo',
+        (element) => element is TableSectionElement));
+    test('thead', () => testConstructorHelper('thead',
+        '<thead><tr><td>foo</td></tr></thead>', 'foo',
+        (element) => element is TableSectionElement));
+  });
+    
   group('constructors', () {
     test('error', () {
       expect(() => new Element.html('<br/><br/>'), throwsArgumentError);
@@ -146,12 +171,6 @@
         (element) => element is BRElement));
     test('base', () => testConstructorHelper('base', '<base>foo</base>', '',
         (element) => element is BaseElement));
-    test('blockquote', () => testConstructorHelper('blockquote',
-        '<blockquote>foo</blockquote>', 'foo',
-        (element) => element is QuoteElement));
-    test('body', () => testConstructorHelper('body',
-        '<body><div>foo</div></body>', 'foo',
-        (element) => element is BodyElement));
     test('button', () => testConstructorHelper('button',
         '<button>foo</button>', 'foo',
         (element) => element is ButtonElement));
@@ -175,9 +194,6 @@
         (element) => element is FormElement));
     test('hr', () => testConstructorHelper('hr', '<hr>', '',
         (element) => element is HRElement));
-    test('head', () => testConstructorHelper('head',
-        '<head><script>foo;</script></head>', 'foo;',
-        (element) => element is HeadElement));
     test('h1', () => testConstructorHelper('h1', '<h1>foo</h1>', 'foo',
         (element) => element is HeadingElement));
     test('h2', () => testConstructorHelper('h2', '<h2>foo</h2>', 'foo',
@@ -219,24 +235,12 @@
         (element) => element is ModElement));
     test('ol', () => testConstructorHelper('ol', '<ol>foo</ol>', 'foo',
         (element) => element is OListElement));
-    test('optgroup', () => testConstructorHelper('optgroup',
-        '<optgroup>foo</optgroup>', 'foo',
-        (element) => element is OptGroupElement));
-    test('option', () => testConstructorHelper('option',
-        '<option>foo</option>', 'foo',
-        (element) => element is OptionElement));
-    test('output', () => testConstructorHelper('output',
-        '<output>foo</output>', 'foo',
-        (element) => element is OutputElement));
     test('p', () => testConstructorHelper('p', '<p>foo</p>', 'foo',
         (element) => element is ParagraphElement));
     test('param', () => testConstructorHelper('param', '<param>', '',
         (element) => element is ParamElement));
     test('pre', () => testConstructorHelper('pre', '<pre>foo</pre>', 'foo',
         (element) => element is PreElement));
-    test('progress', () => testConstructorHelper('progress',
-        '<progress>foo</progress>', 'foo',
-        (element) => element is ProgressElement));
     test('q', () => testConstructorHelper('q', '<q>foo</q>', 'foo',
         (element) => element is QuoteElement));
     test('script', () => testConstructorHelper('script',
@@ -254,31 +258,9 @@
     test('style', () => testConstructorHelper('style',
         '<style>foo</style>', 'foo',
         (element) => element is StyleElement));
-    test('caption', () => testConstructorHelper('caption',
-        '<caption>foo</caption>', 'foo',
-        (element) => element is TableCaptionElement));
-    test('td', () => testConstructorHelper('td', '<td>foo</td>', 'foo',
-        (element) => element is TableCellElement));
-    test('colgroup', () => testConstructorHelper('colgroup',
-        '<colgroup></colgroup>', '',
-        (element) => element is TableColElement));
-    test('col', () => testConstructorHelper('col', '<col></col>', '',
-        (element) => element is TableColElement));
     test('table', () => testConstructorHelper('table',
         '<table><caption>foo</caption></table>', 'foo',
         (element) => element is TableElement));
-    test('tr', () => testConstructorHelper('tr',
-        '<tr><td>foo</td></tr>', 'foo',
-        (element) => element is TableRowElement));
-    test('tbody', () => testConstructorHelper('tbody',
-        '<tbody><tr><td>foo</td></tr></tbody>', 'foo',
-        (element) => element is TableSectionElement));
-    test('tfoot', () => testConstructorHelper('tfoot',
-        '<tfoot><tr><td>foo</td></tr></tfoot>', 'foo',
-        (element) => element is TableSectionElement));
-    test('thead', () => testConstructorHelper('thead',
-        '<thead><tr><td>foo</td></tr></thead>', 'foo',
-        (element) => element is TableSectionElement));
     test('textarea', () => testConstructorHelper('textarea',
         '<textarea>foo</textarea>', 'foo',
         (element) => element is TextAreaElement));
@@ -301,146 +283,155 @@
     //     '<someunknown>foo</someunknown>', 'foo',
     //     (element) => element is UnknownElement));
   });
+  
+  group('eventListening', () {
+    test('eventListeners', () {
+      final element = new Element.tag('div');
+      final on = element.on;
 
-  test('eventListeners', () {
-    final element = new Element.tag('div');
-    final on = element.on;
-
-    testEventHelper(on.abort, 'abort',
-        (listener) => Testing.addEventListener(
-            element, 'abort', listener, true));
-    testEventHelper(on.beforeCopy, 'beforecopy',
-        (listener) => Testing.addEventListener(
-            element, 'beforecopy', listener, true));
-    testEventHelper(on.beforeCut, 'beforecut',
-        (listener) => Testing.addEventListener(
-            element, 'beforecut', listener, true));
-    testEventHelper(on.beforePaste, 'beforepaste',
-        (listener) => Testing.addEventListener(
-            element, 'beforepaste', listener, true));
-    testEventHelper(on.blur, 'blur',
-        (listener) => Testing.addEventListener(
-            element, 'blur', listener, true));
-    testEventHelper(on.change, 'change',
-        (listener) => Testing.addEventListener(
-            element, 'change', listener, true));
-    testEventHelper(on.click, 'click',
-        (listener) => Testing.addEventListener(
-            element, 'click', listener, true));
-    testEventHelper(on.contextMenu, 'contextmenu',
-        (listener) => Testing.addEventListener(
-            element, 'contextmenu', listener, true));
-    testEventHelper(on.copy, 'copy',
-        (listener) => Testing.addEventListener(
-            element, 'copy', listener, true));
-    testEventHelper(on.cut, 'cut',
-        (listener) => Testing.addEventListener(
-            element, 'cut', listener, true));
-    testEventHelper(on.doubleClick, 'dblclick',
-        (listener) => Testing.addEventListener(
-            element, 'dblclick', listener, true));
-    testEventHelper(on.drag, 'drag',
-        (listener) => Testing.addEventListener(
-            element, 'drag', listener, true));
-    testEventHelper(on.dragEnd, 'dragend',
-        (listener) => Testing.addEventListener(
-            element, 'dragend', listener, true));
-    testEventHelper(on.dragEnter, 'dragenter',
-        (listener) => Testing.addEventListener(
-            element, 'dragenter', listener, true));
-    testEventHelper(on.dragLeave, 'dragleave',
-        (listener) => Testing.addEventListener(
-            element, 'dragleave', listener, true));
-    testEventHelper(on.dragOver, 'dragover',
-        (listener) => Testing.addEventListener(
-            element, 'dragover', listener, true));
-    testEventHelper(on.dragStart, 'dragstart',
-        (listener) => Testing.addEventListener(
-            element, 'dragstart', listener, true));
-    testEventHelper(on.drop, 'drop',
-        (listener) => Testing.addEventListener(
-            element, 'drop', listener, true));
-    testEventHelper(on.error, 'error',
-        (listener) => Testing.addEventListener(
-            element, 'error', listener, true));
-    testEventHelper(on.focus, 'focus',
-        (listener) => Testing.addEventListener(
-            element, 'focus', listener, true));
-    testEventHelper(on.input, 'input',
-        (listener) => Testing.addEventListener(
-            element, 'input', listener, true));
-    testEventHelper(on.invalid, 'invalid',
-        (listener) => Testing.addEventListener(
-            element, 'invalid', listener, true));
-    testEventHelper(on.keyDown, 'keydown',
-        (listener) => Testing.addEventListener(
-            element, 'keydown', listener, true));
-    testEventHelper(on.keyPress, 'keypress',
-        (listener) => Testing.addEventListener(
-            element, 'keypress', listener, true));
-    testEventHelper(on.keyUp, 'keyup',
-        (listener) => Testing.addEventListener(
-            element, 'keyup', listener, true));
-    testEventHelper(on.load, 'load',
-        (listener) => Testing.addEventListener(
-            element, 'load', listener, true));
-    testEventHelper(on.mouseDown, 'mousedown',
-        (listener) => Testing.addEventListener(
-            element, 'mousedown', listener, true));
-    testEventHelper(on.mouseMove, 'mousemove',
-        (listener) => Testing.addEventListener(
-            element, 'mousemove', listener, true));
-    testEventHelper(on.mouseOut, 'mouseout',
-        (listener) => Testing.addEventListener(
-            element, 'mouseout', listener, true));
-    testEventHelper(on.mouseOver, 'mouseover',
-        (listener) => Testing.addEventListener(
-            element, 'mouseover', listener, true));
-    testEventHelper(on.mouseUp, 'mouseup',
-        (listener) => Testing.addEventListener(
-            element, 'mouseup', listener, true));
-    // Browsers have different events that they use, so fire all variants.
-    testMultipleEventHelper(on.mouseWheel,
-        ['mousewheel', 'wheel', 'DOMMouseScroll'],
-        (listener) => Testing.addEventListener(
-            element, 'mousewheel', listener, true));
-    testEventHelper(on.paste, 'paste',
-        (listener) => Testing.addEventListener(
-            element, 'paste', listener, true));
-    testEventHelper(on.reset, 'reset',
-        (listener) => Testing.addEventListener(
-            element, 'reset', listener, true));
-    testEventHelper(on.scroll, 'scroll',
-        (listener) => Testing.addEventListener(
-            element, 'scroll', listener, true));
-    testEventHelper(on.search, 'search',
-        (listener) => Testing.addEventListener(
-            element, 'search', listener, true));
-    testEventHelper(on.select, 'select',
-        (listener) => Testing.addEventListener(
-            element, 'select', listener, true));
-    testEventHelper(on.selectStart, 'selectstart',
-        (listener) => Testing.addEventListener(
-            element, 'selectstart', listener, true));
-    testEventHelper(on.submit, 'submit',
-        (listener) => Testing.addEventListener(
-            element, 'submit', listener, true));
-    testEventHelper(on.touchCancel, 'touchcancel',
-        (listener) => Testing.addEventListener(
-            element, 'touchcancel', listener, true));
-    testEventHelper(on.touchEnd, 'touchend',
-        (listener) => Testing.addEventListener(
-            element, 'touchend', listener, true));
-    testEventHelper(on.touchLeave, 'touchleave');
-    testEventHelper(on.touchMove, 'touchmove',
-        (listener) => Testing.addEventListener(
-            element, 'touchmove', listener, true));
-    testEventHelper(on.touchStart, 'touchstart',
-        (listener) => Testing.addEventListener(
-            element, 'touchstart', listener, true));
+      testEventHelper(on.abort, 'abort',
+          (listener) => Testing.addEventListener(
+              element, 'abort', listener, true));
+      testEventHelper(on.beforeCopy, 'beforecopy',
+          (listener) => Testing.addEventListener(
+              element, 'beforecopy', listener, true));
+      testEventHelper(on.beforeCut, 'beforecut',
+          (listener) => Testing.addEventListener(
+              element, 'beforecut', listener, true));
+      testEventHelper(on.beforePaste, 'beforepaste',
+          (listener) => Testing.addEventListener(
+              element, 'beforepaste', listener, true));
+      testEventHelper(on.blur, 'blur',
+          (listener) => Testing.addEventListener(
+              element, 'blur', listener, true));
+      testEventHelper(on.change, 'change',
+          (listener) => Testing.addEventListener(
+              element, 'change', listener, true));
+      testEventHelper(on.click, 'click',
+          (listener) => Testing.addEventListener(
+              element, 'click', listener, true));
+      testEventHelper(on.contextMenu, 'contextmenu',
+          (listener) => Testing.addEventListener(
+              element, 'contextmenu', listener, true));
+      testEventHelper(on.copy, 'copy',
+          (listener) => Testing.addEventListener(
+              element, 'copy', listener, true));
+      testEventHelper(on.cut, 'cut',
+          (listener) => Testing.addEventListener(
+              element, 'cut', listener, true));
+      testEventHelper(on.doubleClick, 'dblclick',
+          (listener) => Testing.addEventListener(
+              element, 'dblclick', listener, true));
+      testEventHelper(on.drag, 'drag',
+          (listener) => Testing.addEventListener(
+              element, 'drag', listener, true));
+      testEventHelper(on.dragEnd, 'dragend',
+          (listener) => Testing.addEventListener(
+              element, 'dragend', listener, true));
+      testEventHelper(on.dragEnter, 'dragenter',
+          (listener) => Testing.addEventListener(
+              element, 'dragenter', listener, true));
+      testEventHelper(on.dragLeave, 'dragleave',
+          (listener) => Testing.addEventListener(
+              element, 'dragleave', listener, true));
+      testEventHelper(on.dragOver, 'dragover',
+          (listener) => Testing.addEventListener(
+              element, 'dragover', listener, true));
+      testEventHelper(on.dragStart, 'dragstart',
+          (listener) => Testing.addEventListener(
+              element, 'dragstart', listener, true));
+      testEventHelper(on.drop, 'drop',
+          (listener) => Testing.addEventListener(
+              element, 'drop', listener, true));
+      testEventHelper(on.error, 'error',
+          (listener) => Testing.addEventListener(
+              element, 'error', listener, true));
+      testEventHelper(on.focus, 'focus',
+          (listener) => Testing.addEventListener(
+              element, 'focus', listener, true));
+      testEventHelper(on.input, 'input',
+          (listener) => Testing.addEventListener(
+              element, 'input', listener, true));
+      testEventHelper(on.invalid, 'invalid',
+          (listener) => Testing.addEventListener(
+              element, 'invalid', listener, true));
+      testEventHelper(on.keyDown, 'keydown',
+          (listener) => Testing.addEventListener(
+              element, 'keydown', listener, true));
+      testEventHelper(on.keyPress, 'keypress',
+          (listener) => Testing.addEventListener(
+              element, 'keypress', listener, true));
+      testEventHelper(on.keyUp, 'keyup',
+          (listener) => Testing.addEventListener(
+              element, 'keyup', listener, true));
+      testEventHelper(on.load, 'load',
+          (listener) => Testing.addEventListener(
+              element, 'load', listener, true));
+      testEventHelper(on.mouseDown, 'mousedown',
+          (listener) => Testing.addEventListener(
+              element, 'mousedown', listener, true));
+      testEventHelper(on.mouseMove, 'mousemove',
+          (listener) => Testing.addEventListener(
+              element, 'mousemove', listener, true));
+      testEventHelper(on.mouseOut, 'mouseout',
+          (listener) => Testing.addEventListener(
+              element, 'mouseout', listener, true));
+      testEventHelper(on.mouseOver, 'mouseover',
+          (listener) => Testing.addEventListener(
+              element, 'mouseover', listener, true));
+      testEventHelper(on.mouseUp, 'mouseup',
+          (listener) => Testing.addEventListener(
+              element, 'mouseup', listener, true));
+      // Browsers have different events that they use, so fire all variants.
+      testMultipleEventHelper(on.mouseWheel,
+          ['mousewheel', 'wheel', 'DOMMouseScroll'],
+          (listener) => Testing.addEventListener(
+              element, 'mousewheel', listener, true));
+      testEventHelper(on.paste, 'paste',
+          (listener) => Testing.addEventListener(
+              element, 'paste', listener, true));
+      testEventHelper(on.reset, 'reset',
+          (listener) => Testing.addEventListener(
+              element, 'reset', listener, true));
+      testEventHelper(on.scroll, 'scroll',
+          (listener) => Testing.addEventListener(
+              element, 'scroll', listener, true));
+      testEventHelper(on.search, 'search',
+          (listener) => Testing.addEventListener(
+              element, 'search', listener, true));
+      testEventHelper(on.select, 'select',
+          (listener) => Testing.addEventListener(
+              element, 'select', listener, true));
+      testEventHelper(on.selectStart, 'selectstart',
+          (listener) => Testing.addEventListener(
+              element, 'selectstart', listener, true));
+      testEventHelper(on.submit, 'submit',
+          (listener) => Testing.addEventListener(
+              element, 'submit', listener, true));
+      testEventHelper(on.touchCancel, 'touchcancel',
+          (listener) => Testing.addEventListener(
+              element, 'touchcancel', listener, true));
+      testEventHelper(on.touchEnd, 'touchend',
+          (listener) => Testing.addEventListener(
+              element, 'touchend', listener, true));
+      testEventHelper(on.touchLeave, 'touchleave');
+      testEventHelper(on.touchMove, 'touchmove',
+          (listener) => Testing.addEventListener(
+              element, 'touchmove', listener, true));
+      testEventHelper(on.touchStart, 'touchstart',
+          (listener) => Testing.addEventListener(
+              element, 'touchstart', listener, true));
+    });
   });
 
   group('attributes', () {
+      test('coercion', () {
+        final element = new Element.tag('div');
+        element.attributes['foo'] = 42;
+        element.attributes['bar'] = 3.1;
+        expect(element.attributes['foo'], '42');
+        expect(element.attributes['bar'], '3.1');
+      });
       test('manipulation', () {
         final element = new Element.html(
             '''<div class="foo" style="overflow: hidden" data-foo="bar"
@@ -473,14 +464,6 @@
         attributes['style'] = 'width: 300px;';
         expect(attributes.length, 5);
       });
-
-      test('coercion', () {
-        final element = new Element.tag('div');
-        element.attributes['foo'] = 42;
-        element.attributes['bar'] = 3.1;
-        expect(element.attributes['foo'], '42');
-        expect(element.attributes['bar'], '3.1');
-      });
   });
 
   group('elements', () {
diff --git a/tests/html/hidden_dom_1_test.dart b/tests/html/hidden_dom_1_test.dart
index d3208fc..318bf4b 100644
--- a/tests/html/hidden_dom_1_test.dart
+++ b/tests/html/hidden_dom_1_test.dart
@@ -38,7 +38,7 @@
   } catch (e) {
     ex = e;
   }
-  if (ex === null)
+  if (ex == null)
     expect(false, isTrue, reason: 'Action should have thrown exception');
 
   expect(ex, isNoSuchMethodError);
diff --git a/tests/html/html.status b/tests/html/html.status
index d9cfaa7..f49b807 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -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.
 
-window_open_test: Fail, Pass # http://dartbug.com/5151
+window_open_test: Skip # http://dartbug.com/5151
 
 event_test: Skip  # Issue 1996
 webgl_1_test: Skip  # Issue 1495
@@ -12,6 +12,9 @@
 [ $runtime == chrome ]
 contentelement_test: Fail   # Issue 5445: not currently supported on chrome stable.
 
+[ $runtime == chrome || $runtime == drt]
+audiobuffersourcenode_test: Pass, Fail  # AudiobufferSourceNode is flaky on Chrome and Dartium.
+
 [ $compiler == none && ($runtime == drt || $runtime == dartium) ]
 request_animation_frame_test: Skip   # drt hangs; requestAnimationFrame not implemented
 
@@ -61,7 +64,9 @@
 canvasrenderingcontext2d_test: Fail, Pass
 contentelement_test: Fail
 css_test: Fail
-element_test: Fail
+element_test/additionalConstructors: Fail
+element_test/attributes: Fail
+element_test/eventListening: Fail
 element_webkit_test: Fail
 exceptions_test: Fail
 fileapi_test: Fail
@@ -78,11 +83,13 @@
 measurement_test: Fail, Pass
 messageevent_test: Fail
 mutationobserver_test: Fail
-node_test: Fail
 serialized_script_value_test: Fail
 storage_test: Fail, Pass
+svgelement_test/additionalConstructors: Fail
+svgelement_test/elementset: Fail
+svgelement_test/innerHTML: Fail
+svgelement_test/outerHTML: Fail
 svgelement2_test: Fail
-svgelement_test: Fail
 svg_3_test: Fail
 typed_arrays_1_test: Fail
 typed_arrays_arraybuffer_test: Fail
@@ -106,12 +113,8 @@
 typed_arrays_arraybuffer_test: Skip
 typed_arrays_dataview_test: Skip
 typed_arrays_range_checks_test: Fail
-element_test: Fail  # Bug 5693
 element_webkit_test: Fail
 localstorage_test: Fail
-node_test: Fail
-svgelement_test: Fail
-svgelement2_test: Fail
 websql_test: Fail # IE does not support web SQL
 #
 # Investigate and triage the following into bug reports.
@@ -123,6 +126,9 @@
 css_test: Fail
 datalistelement_test: Fail    # ie9 does not have HTMLDataListElement
 dom_constructors_test: Fail
+element_test/additionalConstructors: Fail
+element_test/attributes: Fail
+element_test/eventListening: Fail
 exceptions_test: Fail
 fileapi_test: Fail          # IE does not support filesystem APIs.
 history_test: Fail
@@ -141,6 +147,12 @@
 shadow_dom_test: Fail
 storage_test: Fail
 svg_3_test: Fail
+svgelement_test/additionalConstructors: Fail
+svgelement_test/elementset: Fail
+element_test/eventListening: Fail
+svgelement_test/innerHTML: Fail
+svgelement_test/outerHTML: Fail
+svgelement2_test: Fail
 url_test: Fail              # IE9 does not support createObjectURL (it is supported in IE10)
 websocket_test: Fail
 window_open_test: Skip      # BUG(4016)
@@ -171,7 +183,11 @@
 datalistelement_test: Pass,Fail
 document_test: Fail
 dom_constructors_test: Fail
-element_test: Fail # Bug 5693
+element_test/attributes: Fail, Crash
+element_test/elements: Crash
+element_test/eventListening: Fail
+element_test/_ElementList: Fail, Crash
+element_test/queryAll: Crash
 element_add_test: Fail
 element_constructor_1_test: Fail
 element_webkit_test: Fail
@@ -182,15 +198,21 @@
 node_test: Skip # Issue 6457
 serialized_script_value_test: Fail
 svgelement2_test: Fail
-svgelement_test: Fail
+svgelement_test/constructors: Crash
+svgelement_test/additionalConstructors: Fail
+svgelement_test/elementget: Fail
+svgelement_test/elementset: Fail
+svgelement_test/innerHTML: Crash
+svgelement_test/outerHTML: Fail
+svgelement_test/svg: Fail
 url_test: Fail
 
 [ $runtime == opera && $system == windows ]
-element_test: Skip # Browser is already closed by the time we get results?
 htmlelement_test: Fail, Pass
 
 [ $runtime == opera && $system == macos ]
-element_test: Crash
+html/element_test/constructors: Fail
+
 
 [ $runtime == opera ]
 audiobuffersourcenode_test: Fail
@@ -205,6 +227,10 @@
 cssstyledeclaration_test: Fail
 element_add_test: Fail
 element_constructor_1_test: Fail
+element_test/constructors: Fail
+element_test/elements: Fail
+element_test/eventListening: Crash
+element_test/queryAll: Fail
 element_webkit_test: Fail
 exceptions_test: Fail
 indexeddb_1_test: Fail
@@ -215,7 +241,7 @@
 performance_api_test: Fail
 serialized_script_value_test: Fail
 svg_3_test: Fail
-svgelement_test: Fail
+svgelement_test/additionalConstructors: Fail
 svgelement2_test: Fail
 typed_arrays_1_test: Fail
 typed_arrays_arraybuffer_test: Fail
@@ -246,7 +272,7 @@
 inner_frame_test: Skip
 # Interfaces not implemented: SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable
 svg_3_test: Fail
-svgelement_test: Fail
+svgelement_test/additionalConstructors: Fail
 svgelement2_test: Fail
 transferables_test: Fail   # Issue 3392.
 websql_test: Fail # FF does not support web SQL
diff --git a/tests/html/indexeddb_2_test.dart b/tests/html/indexeddb_2_test.dart
index d10feb2..0054f0e 100644
--- a/tests/html/indexeddb_2_test.dart
+++ b/tests/html/indexeddb_2_test.dart
@@ -98,7 +98,7 @@
   obj3['a'] = 100;
   obj3['b'] = obj3;  // Cycle.
 
-  var obj4 = new SplayTreeMap<String, Dynamic>();  // Different implementation.
+  var obj4 = new SplayTreeMap<String, dynamic>();  // Different implementation.
   obj4['a'] = 100;
   obj4['b'] = 's';
 
diff --git a/tests/html/measurement_test.dart b/tests/html/measurement_test.dart
index 3b83d7d..115757c 100644
--- a/tests/html/measurement_test.dart
+++ b/tests/html/measurement_test.dart
@@ -26,17 +26,13 @@
   });
 
   test('requestLayoutFrame', () {
-    var rect;
     var computedStyle;
     window.requestLayoutFrame(expectAsync0(() {
-      expect(rect.isComplete, isTrue);
-      expect(computedStyle.isComplete, isTrue);
+      expect(computedStyle.isComplete, true);
     }));
 
     final element = document.body;
-    rect = element.rect;
     computedStyle = element.computedStyle;
-    expect(rect.isComplete, isFalse);
     expect(computedStyle.isComplete, isFalse);
   });
 
diff --git a/tests/html/node_test.dart b/tests/html/node_test.dart
index 75237225..7197a42 100644
--- a/tests/html/node_test.dart
+++ b/tests/html/node_test.dart
@@ -4,15 +4,16 @@
 
 library NodeTest;
 import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 Node makeNode() => new Element.tag('div');
 Node makeNodeWithChildren() =>
   new Element.html("<div>Foo<br/><!--baz--></div>");
 
 main() {
-  useHtmlConfiguration();
+  useHtmlIndividualConfiguration();
 
   var isText = predicate((x) => x is Text, 'is a Text');
   var isComment = predicate((x) => x is Comment, 'is a Comment');
diff --git a/tests/html/postmessage_structured_test.dart b/tests/html/postmessage_structured_test.dart
index 31f2a33..f3999c3 100644
--- a/tests/html/postmessage_structured_test.dart
+++ b/tests/html/postmessage_structured_test.dart
@@ -120,7 +120,7 @@
   obj3['a'] = 100;
   obj3['b'] = obj3;  // Cycle.
 
-  var obj4 = new SplayTreeMap<String, Dynamic>();  // Different implementation.
+  var obj4 = new SplayTreeMap<String, dynamic>();  // Different implementation.
   obj4['a'] = 100;
   obj4['b'] = 's';
 
diff --git a/tests/html/shadow_dom_layout_test.dart b/tests/html/shadow_dom_layout_test.dart
index 2358a24..a316a2c 100644
--- a/tests/html/shadow_dom_layout_test.dart
+++ b/tests/html/shadow_dom_layout_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('ShadowDOMTest');
+library ShadowDOMTest;
 
-#import('dart:html');
+import 'dart:html';
 
 // Test that children of a shadow host get distributed properly to the
 // insertion points of a shadow subtree. Output should be three boxes,
diff --git a/tests/html/svg_1_test.dart b/tests/html/svg_1_test.dart
index 97c9ac6..997a361 100644
--- a/tests/html/svg_1_test.dart
+++ b/tests/html/svg_1_test.dart
@@ -2,6 +2,7 @@
 import '../../pkg/unittest/lib/unittest.dart';
 import '../../pkg/unittest/lib/html_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 // Test that SVG is present in dart:html API
 
diff --git a/tests/html/svg_2_test.dart b/tests/html/svg_2_test.dart
index b893a3c..11500d3 100644
--- a/tests/html/svg_2_test.dart
+++ b/tests/html/svg_2_test.dart
@@ -2,6 +2,7 @@
 import '../../pkg/unittest/lib/unittest.dart';
 import '../../pkg/unittest/lib/html_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 // Test that SVG elements explicitly implement the IDL interfaces (is-checks
 // only, see SVGTest3 for behavioural tests).
diff --git a/tests/html/svg_3_test.dart b/tests/html/svg_3_test.dart
index 520b138..b5762d2 100644
--- a/tests/html/svg_3_test.dart
+++ b/tests/html/svg_3_test.dart
@@ -2,6 +2,7 @@
 import '../../pkg/unittest/lib/unittest.dart';
 import '../../pkg/unittest/lib/html_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 // Test that SVG elements have the operations advertised through all the IDL
 // interfaces.  This is a 'duck typing' test, and does not explicitly use 'is'
@@ -12,9 +13,9 @@
   var isString = predicate((x) => x is String, 'is a String');
   var isStringList = predicate((x) => x is List<String>, 'is a List<String>');
   var isSVGMatrix = predicate((x) => x is SVGMatrix, 'is a SVGMatrix');
-  var isSVGAnimatedBoolean = 
+  var isSVGAnimatedBoolean =
       predicate((x) => x is SVGAnimatedBoolean, 'is an SVGAnimatedBoolean');
-  var isSVGAnimatedString = 
+  var isSVGAnimatedString =
       predicate((x) => x is SVGAnimatedString, 'is an SVGAnimatedString');
   var isSVGRect = predicate((x) => x is SVGRect, 'is a SVGRect');
   var isSVGAnimatedTransformList =
diff --git a/tests/html/svgelement2_test.dart b/tests/html/svgelement2_test.dart
index caa85cb..468b61a 100644
--- a/tests/html/svgelement2_test.dart
+++ b/tests/html/svgelement2_test.dart
@@ -5,7 +5,6 @@
 library SVGElement2Test;
 import '../../pkg/unittest/lib/unittest.dart';
 import '../../pkg/unittest/lib/html_config.dart';
-import 'dart:html';
 import 'svgelement_test.dart' as originalTest;
 
 class A {
diff --git a/tests/html/svgelement_test.dart b/tests/html/svgelement_test.dart
index 49bfef6..6787d3c 100644
--- a/tests/html/svgelement_test.dart
+++ b/tests/html/svgelement_test.dart
@@ -4,11 +4,12 @@
 
 library SVGElementTest;
 import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
 import 'dart:html';
+import 'dart:svg';
 
 main() {
-  useHtmlConfiguration();
+  useHtmlIndividualConfiguration();
 
   var isSVGSVGElement =
       predicate((x) => x is SVGSVGElement, 'is a SVGSVGElement');
@@ -33,8 +34,7 @@
           new SVGElement.svg('<$tagName></$tagName>')), isTrue);
     });
   }
-
-  group('constructors', () {
+  group('additionalConstructors', () {
     group('svg', () {
       test('valid', () {
         final svg = """
@@ -61,8 +61,6 @@
             throwsArgumentError);
       });
     });
-
-    testConstructor('a', (e) => e is SVGAElement);
     testConstructor('altGlyphDef', (e) => e is SVGAltGlyphDefElement);
     testConstructor('altGlyph', (e) => e is SVGAltGlyphElement);
     testConstructor('animateColor', (e) => e is SVGAnimateColorElement);
@@ -70,12 +68,7 @@
     // WebKit doesn't recognize animateMotion
     // testConstructor('animateMotion', (e) => e is SVGAnimateMotionElement);
     testConstructor('animateTransform', (e) => e is SVGAnimateTransformElement);
-    testConstructor('circle', (e) => e is SVGCircleElement);
-    testConstructor('clipPath', (e) => e is SVGClipPathElement);
     testConstructor('cursor', (e) => e is SVGCursorElement);
-    testConstructor('defs', (e) => e is SVGDefsElement);
-    testConstructor('desc', (e) => e is SVGDescElement);
-    testConstructor('ellipse', (e) => e is SVGEllipseElement);
     testConstructor('feBlend', (e) => e is SVGFEBlendElement);
     testConstructor('feColorMatrix', (e) => e is SVGFEColorMatrixElement);
     testConstructor('feComponentTransfer',
@@ -111,9 +104,23 @@
     testConstructor('font-face-src', (e) => e is SVGFontFaceSrcElement);
     testConstructor('font-face-uri', (e) => e is SVGFontFaceUriElement);
     testConstructor('foreignObject', (e) => e is SVGForeignObjectElement);
-    testConstructor('g', (e) => e is SVGGElement);
     testConstructor('glyph', (e) => e is SVGGlyphElement);
     testConstructor('glyphRef', (e) => e is SVGGlyphRefElement);
+    testConstructor('metadata', (e) => e is SVGMetadataElement);
+    testConstructor('missing-glyph', (e) => e is SVGMissingGlyphElement);
+    testConstructor('set', (e) => e is SVGSetElement);
+    testConstructor('tref', (e) => e is SVGTRefElement);
+    testConstructor('vkern', (e) => e is SVGVKernElement);
+  });
+
+  group('constructors', () {
+    testConstructor('a', (e) => e is SVGAElement);
+    testConstructor('circle', (e) => e is SVGCircleElement);
+    testConstructor('clipPath', (e) => e is SVGClipPathElement);
+    testConstructor('defs', (e) => e is SVGDefsElement);
+    testConstructor('desc', (e) => e is SVGDescElement);
+    testConstructor('ellipse', (e) => e is SVGEllipseElement);
+    testConstructor('g', (e) => e is SVGGElement);
     // WebKit doesn't recognize hkern
     // testConstructor('hkern', (e) => e is SVGHKernElement);
     testConstructor('image', (e) => e is SVGImageElement);
@@ -123,8 +130,6 @@
     // testConstructor('mpath', (e) => e is SVGMPathElement);
     testConstructor('marker', (e) => e is SVGMarkerElement);
     testConstructor('mask', (e) => e is SVGMaskElement);
-    testConstructor('metadata', (e) => e is SVGMetadataElement);
-    testConstructor('missing-glyph', (e) => e is SVGMissingGlyphElement);
     testConstructor('path', (e) => e is SVGPathElement);
     testConstructor('pattern', (e) => e is SVGPatternElement);
     testConstructor('polygon', (e) => e is SVGPolygonElement);
@@ -132,27 +137,26 @@
     testConstructor('radialGradient', (e) => e is SVGRadialGradientElement);
     testConstructor('rect', (e) => e is SVGRectElement);
     testConstructor('script', (e) => e is SVGScriptElement);
-    testConstructor('set', (e) => e is SVGSetElement);
     testConstructor('stop', (e) => e is SVGStopElement);
     testConstructor('style', (e) => e is SVGStyleElement);
     testConstructor('switch', (e) => e is SVGSwitchElement);
     testConstructor('symbol', (e) => e is SVGSymbolElement);
-    testConstructor('tref', (e) => e is SVGTRefElement);
     testConstructor('tspan', (e) => e is SVGTSpanElement);
     testConstructor('text', (e) => e is SVGTextElement);
     testConstructor('textPath', (e) => e is SVGTextPathElement);
     testConstructor('title', (e) => e is SVGTitleElement);
     testConstructor('use', (e) => e is SVGUseElement);
-    testConstructor('vkern', (e) => e is SVGVKernElement);
     testConstructor('view', (e) => e is SVGViewElement);
   });
 
-  test('outerHTML', () {
-    final el = new SVGSVGElement();
-    el.elements.add(new SVGElement.tag("circle"));
-    el.elements.add(new SVGElement.tag("path"));
-    expect(el.outerHTML,
-        '<svg version="1.1"><circle></circle><path></path></svg>');
+  group('outerHTML', () {
+    test('outerHTML', () {
+      final el = new SVGSVGElement();
+      el.elements.add(new SVGElement.tag("circle"));
+      el.elements.add(new SVGElement.tag("path"));
+      expect(el.outerHTML,
+          '<svg version="1.1"><circle></circle><path></path></svg>');
+    });
   });
 
   group('innerHTML', () {
@@ -172,7 +176,7 @@
     });
   });
 
-  group('elements', () {
+  group('elementget', () {
     test('get', () {
       final el = new SVGElement.svg("""
 <svg version="1.1">
@@ -182,11 +186,25 @@
 </svg>""");
       expect(_nodeStrings(el.elements), ["circle", "path"]);
     });
+  });
 
+  group('elementset', () {
     test('set', () {
       final el = new SVGSVGElement();
       el.elements = [new SVGElement.tag("circle"), new SVGElement.tag("path")];
       expect(el.innerHTML, '<circle></circle><path></path>');
     });
   });
+
+  group('css', () {
+    test('classes', () {
+      var el = new SVGElement.tag("circle");
+      var classes = el.classes;
+      expect(el.classes.length, 0);
+      classes.toggle('foo');
+      expect(el.classes.length, 1);
+      classes.toggle('foo');
+      expect(el.classes.length, 0);
+    });
+  });
 }
diff --git a/tests/html/utils.dart b/tests/html/utils.dart
index 09eeaaa..9be11b0 100644
--- a/tests/html/utils.dart
+++ b/tests/html/utils.dart
@@ -21,14 +21,14 @@
 
     // Cycle or DAG?
     for (int i = 0; i < eItems.length; i++) {
-      if (expected === eItems[i]) {
+      if (identical(expected, eItems[i])) {
         expect(actual, same(aItems[i]),
             reason: message(path, 'missing back or side edge'));
         return;
       }
     }
     for (int i = 0; i < aItems.length; i++) {
-      if (actual === aItems[i]) {
+      if (identical(actual, aItems[i])) {
         expect(expected, same(eItems[i]),
             reason: message(path, 'extra back or side edge'));
         return;
diff --git a/tests/html/xmldocument_2_test.dart b/tests/html/xmldocument_2_test.dart
new file mode 100644
index 0000000..724da88
--- /dev/null
+++ b/tests/html/xmldocument_2_test.dart
@@ -0,0 +1,19 @@
+library XmlDocument2Test;
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_config.dart';
+import 'dart:html';
+
+main() {
+  useHtmlConfiguration();
+  test('Document.query', () {
+    Document doc = new DOMParser().parseFromString(
+    '''<ResultSet>
+         <Row>A</Row>
+         <Row>B</Row>
+         <Row>C</Row>
+       </ResultSet>''','text/xml');
+
+    var rs = doc.query('ResultSet');
+    expect(rs, isNotNull);
+  });
+}
diff --git a/tests/isolate/illegal_msg_test.dart b/tests/isolate/illegal_msg_test.dart
new file mode 100644
index 0000000..51b442c
--- /dev/null
+++ b/tests/isolate/illegal_msg_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 illegal_msg_tests;
+import 'dart:isolate';
+
+funcFoo(x) => x + 2;
+
+echo() {
+  port.receive((msg, reply) {
+    reply.send("echoing ${msg(1)}}");
+  });
+}
+
+main() {
+  var snd = spawnFunction(echo);
+  var caught_exception = false;
+  try {
+    snd.send(funcFoo, port.toSendPort());
+  } catch (e) {
+    caught_exception = true;
+  }
+
+  if (caught_exception) {
+    port.close();
+  } else {
+    port.receive((msg, reply) {
+      print("from worker ${msg}");
+    });
+  }
+  Expect.isTrue(caught_exception);
+}
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index f3a482b..5d7fc3e 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -37,6 +37,8 @@
 
 [ $compiler == dart2js ]
 serialization_test: Fail # Tries to access class TestingOnly declared in isolate_patch.dart
+port_test: Fail # Issue 6608
+illegal_msg_test: Fail # Issue 6750
 
 [ $runtime == safari ]
 cross_isolate_message_test: Skip      # Depends on 32/64 bit Safari. See Issue 1120
diff --git a/tests/isolate/isolate2_negative_test.dart b/tests/isolate/isolate2_negative_test.dart
index 11d66ed..720b825 100644
--- a/tests/isolate/isolate2_negative_test.dart
+++ b/tests/isolate/isolate2_negative_test.dart
@@ -5,8 +5,8 @@
 // Dart test program for testing that exceptions in other isolates bring down
 // the program.
 
-#library('Isolate2NegativeTest');
-#import('dart:isolate');
+library isolate2_negative_test;
+import 'dart:isolate';
 
 void entry() {
   throw "foo";
diff --git a/tests/isolate/isolate_import_negative_test.dart b/tests/isolate/isolate_import_negative_test.dart
index 6ca4695..38199ea 100644
--- a/tests/isolate/isolate_import_negative_test.dart
+++ b/tests/isolate/isolate_import_negative_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.
 
-#library('IsolateImportNegativeTest');
+library IsolateImportNegativeTest;
 // Ommiting the following import is an error:
 // #import('dart:isolate');
 
diff --git a/tests/isolate/mandel_isolate_test.dart b/tests/isolate/mandel_isolate_test.dart
index d849e919..7074ee7 100644
--- a/tests/isolate/mandel_isolate_test.dart
+++ b/tests/isolate/mandel_isolate_test.dart
@@ -39,7 +39,7 @@
   }
 
   void notifyProcessedLine(LineProcessorClient client, int y, List<int> line) {
-    assert(_result[y] === null);
+    assert(_result[y] == null);
     _result[y] = line;
     _lineProcessedBy[y] = client;
 
diff --git a/tests/isolate/serialization_test.dart b/tests/isolate/serialization_test.dart
index 61062fa..c69042d 100644
--- a/tests/isolate/serialization_test.dart
+++ b/tests/isolate/serialization_test.dart
@@ -8,8 +8,8 @@
 // ---------------------------------------------------------------------------
 // Serialization test.
 // ---------------------------------------------------------------------------
-#library('SerializationTest');
-#import('dart:isolate');
+library SerializationTest;
+import 'dart:isolate';
 
 main() {
   // TODO(sigmund): fix once we can disable privacy for testing (bug #1882)
@@ -44,10 +44,10 @@
   var c = [ a, b, a, b, a ];
   var copied = f(c);
   verify(c, copied);
-  Expect.isFalse(c === copied);
-  Expect.isTrue(copied[0] === copied[2]);
-  Expect.isTrue(copied[0] === copied[4]);
-  Expect.isTrue(copied[1] === copied[3]);
+  Expect.isFalse(identical(c, copied));
+  Expect.identical(copied[0], copied[2]);
+  Expect.identical(copied[0], copied[4]);
+  Expect.identical(copied[1], copied[3]);
 }
 
 void copyAndVerify(o, Function f) {
diff --git a/tests/isolate/spawn_function_custom_class_test.dart b/tests/isolate/spawn_function_custom_class_test.dart
index 73f9a1d..78c3042 100644
--- a/tests/isolate/spawn_function_custom_class_test.dart
+++ b/tests/isolate/spawn_function_custom_class_test.dart
@@ -27,7 +27,7 @@
 main() {
   test('message - reply chain', () {
     ReceivePort port = new ReceivePort();
-    port.receive(expectAsync(msg, _) {
+    port.receive((msg, _) {
       port.close();
       expect(msg, equals('re: hi there'));
     });
diff --git a/tests/isolate/spawn_uri_child_isolate.dart b/tests/isolate/spawn_uri_child_isolate.dart
index 8b35530..9e5fc93 100644
--- a/tests/isolate/spawn_uri_child_isolate.dart
+++ b/tests/isolate/spawn_uri_child_isolate.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Child isolate code to be spawned from a URI to this file.
-#library('SpawnUriChildIsolate');
-#import('dart:isolate');
+library SpawnUriChildIsolate;
+import 'dart:isolate';
 
 void main() {
   port.receive((msg, reply) => reply.send('re: $msg'));
diff --git a/tests/language/arithmetic_test.dart b/tests/language/arithmetic_test.dart
index 5fde1ed..4cd7393 100644
--- a/tests/language/arithmetic_test.dart
+++ b/tests/language/arithmetic_test.dart
@@ -55,6 +55,11 @@
       b = -1;
       Expect.equals(1 << i, a ~/ b);
     }
+    for (int i = 0; i < 80; i++) {
+      a = -1 << i;
+      b = -1;
+      Expect.equals(1 << i, a ~/ b);
+    }
     a = 22;
     b = 4.0;
     // Smi & double.
@@ -412,9 +417,18 @@
     Expect.equals(true, (10).hashCode == (10).hashCode);
   }
 
+  static int div(a, b) => a ~/ b;
+
+  static void testSmiDivDeopt() {
+    var a = -0x40000000;
+    var b = -1;
+    for (var i = 0; i < 10; i++) Expect.equals(0x40000000, div(a, b));
+  }
+
   static testMain() {
     for (int i = 0; i < 1500; i++) {
       runOne();
+      testSmiDivDeopt();
     }
   }
 }
diff --git a/tests/language/bailout_test.dart b/tests/language/bailout_test.dart
new file mode 100644
index 0000000..e5e5653
--- /dev/null
+++ b/tests/language/bailout_test.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 a call to a bailout method in dart2js resolves to the
+// right method.
+
+var reachedAfoo = new C();
+
+class A {
+  foo() {
+    // Using '++' makes sure there is a type guard.
+    reachedAfoo++;
+  }
+}
+
+class B extends A {
+  foo() {
+    reachedAfoo++;
+    // Call the Expect method after the type guard.
+    Expect.fail('Should never reach B.foo');
+  }
+
+  bar() {
+    super.foo();
+  }
+}
+
+class C {
+  int value = 0;
+  operator +(val) {
+    value += val;
+    return this;
+  }
+}
+
+main() {
+  // Using a loop makes sure the 'foo' methods will have an optimized
+  // version.
+  while (reachedAfoo.value != 0) {
+    new A().foo();
+    new B().foo();
+  }
+  new B().bar();
+  Expect.equals(1, reachedAfoo.value);
+}
diff --git a/tests/language/bool_test.dart b/tests/language/bool_test.dart
index 8263d0a..6f1e562 100644
--- a/tests/language/bool_test.dart
+++ b/tests/language/bool_test.dart
@@ -9,38 +9,38 @@
   static void testEquality() {
     Expect.equals(true, true);
     Expect.equals(false, false);
-    Expect.equals(true, true === true);
-    Expect.equals(false, true === false);
-    Expect.equals(true, false === false);
-    Expect.equals(false, false === true);
-    Expect.equals(false, true !== true);
-    Expect.equals(true, true !== false);
-    Expect.equals(false, false !== false);
-    Expect.equals(true, false !== true);
-    Expect.equals(true, true == true);
-    Expect.equals(false, true == false);
-    Expect.equals(true, false == false);
-    Expect.equals(false, false == true);
-    Expect.equals(false, true != true);
-    Expect.equals(true, true != false);
-    Expect.equals(false, false != false);
-    Expect.equals(true, false != true);
-    Expect.equals(true, true === (true == true));
-    Expect.equals(true, false === (true == false));
-    Expect.equals(true, true === (false == false));
-    Expect.equals(true, false === (false == true));
-    Expect.equals(false, true !== (true == true));
-    Expect.equals(false, false !== (true == false));
-    Expect.equals(false, true !== (false == false));
-    Expect.equals(false, false !== (false == true));
-    Expect.equals(false, false === (true == true));
-    Expect.equals(false, true === (true == false));
-    Expect.equals(false, false === (false == false));
-    Expect.equals(false, true === (false == true));
-    Expect.equals(true, false !== (true == true));
-    Expect.equals(true, true !== (true == false));
-    Expect.equals(true, false !== (false == false));
-    Expect.equals(true, true !== (false == true));
+    Expect.isTrue(identical(true, true));
+    Expect.isFalse(identical(true, false));
+    Expect.isTrue(identical(false, false));
+    Expect.isFalse(identical(false, true));
+    Expect.isFalse(!identical(true, true));
+    Expect.isTrue(!identical(true, false));
+    Expect.isFalse(!identical(false, false));
+    Expect.isTrue(!identical(false, true));
+    Expect.isTrue(true == true);
+    Expect.isFalse(true == false);
+    Expect.isTrue(false == false);
+    Expect.isFalse(false == true);
+    Expect.isFalse(true != true);
+    Expect.isTrue(true != false);
+    Expect.isFalse(false != false);
+    Expect.isTrue(false != true);
+    Expect.isTrue(identical(true, (true == true)));
+    Expect.isTrue(identical(false, (true == false)));
+    Expect.isTrue(identical(true, (false == false)));
+    Expect.isTrue(identical(false, (false == true)));
+    Expect.isFalse(!identical(true, (true == true)));
+    Expect.isFalse(!identical(false, (true == false)));
+    Expect.isFalse(!identical(true, (false == false)));
+    Expect.isFalse(!identical(false, (false == true)));
+    Expect.isFalse(identical(false, (true == true)));
+    Expect.isFalse(identical(true, (true == false)));
+    Expect.isFalse(identical(false, (false == false)));
+    Expect.isFalse(identical(true, (false == true)));
+    Expect.isTrue(!identical(false, (true == true)));
+    Expect.isTrue(!identical(true, (true == false)));
+    Expect.isTrue(!identical(false, (false == false)));
+    Expect.isTrue(!identical(true, (false == true)));
     // Expect.equals could rely on a broken boolean equality.
     if (true == false) {
       throw "Expect.equals broken";
@@ -48,10 +48,10 @@
     if (false == true) {
       throw "Expect.equals broken";
     }
-    if (true === false) {
+    if (identical(true, false)) {
       throw "Expect.equals broken";
     }
-    if (false === true) {
+    if (identical(false, true)) {
       throw "Expect.equals broken";
     }
     if (true == true) {
@@ -62,11 +62,11 @@
     } else {
       throw "Expect.equals broken";
     }
-    if (true === true) {
+    if (identical(true, true)) {
     } else {
       throw "Expect.equals broken";
     }
-    if (false === false) {
+    if (identical(false, false)) {
     } else {
       throw "Expect.equals broken";
     }
@@ -78,11 +78,11 @@
     } else {
       throw "Expect.equals broken";
     }
-    if (true !== false) {
+    if (!identical(true, false)) {
     } else {
       throw "Expect.equals broken";
     }
-    if (false !== true) {
+    if (!identical(false, true)) {
     } else {
       throw "Expect.equals broken";
     }
@@ -92,10 +92,10 @@
     if (false != false) {
       throw "Expect.equals broken";
     }
-    if (true !== true) {
+    if (!identical(true, true)) {
       throw "Expect.equals broken";
     }
-    if (false !== false) {
+    if (!identical(false, false)) {
       throw "Expect.equals broken";
     }
   }
diff --git a/tests/language/call_through_getter_test.dart b/tests/language/call_through_getter_test.dart
index b5a115d..11a11d7 100644
--- a/tests/language/call_through_getter_test.dart
+++ b/tests/language/call_through_getter_test.dart
@@ -21,7 +21,7 @@
   }
 
   static void testTopLevel() {
-    topLevel = function() {
+    topLevel = () {
       return 2;
     };
     Expect.equals(1, TOP_LEVEL_CONST);
@@ -146,10 +146,10 @@
 
   B() : _order = new StringBuffer("") { }
 
-  get g0 { _mark('g'); return f0() { return _mark('f'); }; }
-  get g1 { _mark('g'); return f1(x) { return _mark('f'); }; }
-  get g2 { _mark('g'); return f2(x, y) { return _mark('f'); }; }
-  get g3 { _mark('g'); return f3(x, y, z) { return _mark('f'); }; }
+  get g0 { _mark('g'); return () { return _mark('f'); }; }
+  get g1 { _mark('g'); return (x) { return _mark('f'); }; }
+  get g2 { _mark('g'); return (x, y) { return _mark('f'); }; }
+  get g3 { _mark('g'); return (x, y, z) { return _mark('f'); }; }
 
   get x { _mark('x'); return 0; }
   get y { _mark('y'); return 1; }
diff --git a/tests/language/canonical_const2_test.dart b/tests/language/canonical_const2_test.dart
index 02fb11e2..3508885 100644
--- a/tests/language/canonical_const2_test.dart
+++ b/tests/language/canonical_const2_test.dart
@@ -5,5 +5,5 @@
 // Check that compile-time constants are correctly canonicalized.
 
 main() {
-  Expect.isTrue(const <num>[1,2] !== const <num>[1.0,2.0]);
+  Expect.isFalse(identical(const <num>[1,2], const <num>[1.0,2.0]));
 }
diff --git a/tests/language/canonical_const_test.dart b/tests/language/canonical_const_test.dart
index c10ce62..4c91baa 100644
--- a/tests/language/canonical_const_test.dart
+++ b/tests/language/canonical_const_test.dart
@@ -8,26 +8,26 @@
   static const B = const C2();
 
   static testMain() {
-    Expect.isTrue(null===null);
-    Expect.isTrue(null!==0);
-    Expect.isTrue(1===1);
-    Expect.isTrue(1!==2);
-    Expect.isTrue(true===true);
-    Expect.isTrue("so"==="so");
-    Expect.isTrue(const Object()===const Object());
-    Expect.isTrue(const Object()!==const C1());
-    Expect.isTrue(const C1()===const C1());
-    Expect.isTrue(A===const C1());
-    Expect.isTrue(const C1()!==const C2());
-    Expect.isTrue(B===const C2());
+    Expect.identical(null, null);
+    Expect.isFalse(identical(null, 0));
+    Expect.identical(1, 1);
+    Expect.isFalse(identical(1, 2));
+    Expect.identical(true, true);
+    Expect.identical("so", "so");
+    Expect.identical(const Object(), const Object());
+    Expect.isFalse(identical(const Object(), const C1()));
+    Expect.identical(const C1(), const C1());
+    Expect.identical(A, const C1());
+    Expect.isFalse(identical(const C1(), const C2()));
+    Expect.identical(B, const C2());
     // TODO(johnlenz): these two values don't currently have the same type
     // Expect.isTrue(const [1,2] === const List[1,2]);
-    Expect.isTrue(const [2,1] !== const[1,2]);
-    Expect.isTrue(const <int>[1,2] === const <int>[1,2]);
-    Expect.isTrue(const <Object>[1,2] === const <Object>[1,2]);
-    Expect.isTrue(const <int>[1,2] !== const <double>[1.0,2.0]);
-    Expect.isTrue(const {"a":1, "b":2} === const {"a":1, "b":2});
-    Expect.isTrue(const {"a":1, "b":2} !== const {"a":2, "b":2});
+    Expect.isFalse(identical(const [2,1], const[1,2]));
+    Expect.identical(const <int>[1,2], const <int>[1,2]);
+    Expect.identical(const <Object>[1,2], const <Object>[1,2]);
+    Expect.isFalse(identical(const <int>[1,2], const <double>[1.0,2.0]));
+    Expect.identical(const {"a":1, "b":2}, const {"a":1, "b":2});
+    Expect.isFalse(identical(const {"a":1, "b":2}, const {"a":2, "b":2}));
   }
 }
 
diff --git a/tests/language/class_literal_test.dart b/tests/language/class_literal_test.dart
index 23cdc6d..fe4b13c 100644
--- a/tests/language/class_literal_test.dart
+++ b/tests/language/class_literal_test.dart
@@ -31,8 +31,8 @@
     foo(Class[0]); /// 17: compile-time error
     foo(Class[0].field); /// 18: compile-time error
     foo(Class[0].method()); /// 19: compile-time error
-    Class === null; /// 20: compile-time error
-    null === Class; /// 21: compile-time error
+    Class == null; /// 20: compile-time error
+    null == Class; /// 21: compile-time error
     Class[0] = 91; /// 22: compile-time error
     Class++; /// 23: compile-time error
     ++Class; /// 24: compile-time error
diff --git a/tests/language/comparison_test.dart b/tests/language/comparison_test.dart
index 84e6463..4a19920 100644
--- a/tests/language/comparison_test.dart
+++ b/tests/language/comparison_test.dart
@@ -5,11 +5,11 @@
 
 class Helper {
   static bool STRICT_EQ(a, b) {
-    return a === b;
+    return identical(a, b);
   }
 
   static bool STRICT_NE(a, b) {
-    return a !== b;
+    return !identical(a, b);
   }
 
   static bool EQ(a, b) {
@@ -47,271 +47,271 @@
   static testMain() {
     var a = new A(0);
     var b = new A(1);
-    Expect.equals(true, Helper.STRICT_EQ(a, a));
-    Expect.equals(false, Helper.STRICT_EQ(a, b));
-    Expect.equals(false, Helper.STRICT_EQ(b, a));
-    Expect.equals(true, Helper.STRICT_EQ(b, b));
+    Expect.isTrue(Helper.STRICT_EQ(a, a));
+    Expect.isFalse(Helper.STRICT_EQ(a, b));
+    Expect.isFalse(Helper.STRICT_EQ(b, a));
+    Expect.isTrue(Helper.STRICT_EQ(b, b));
 
-    Expect.equals(false, Helper.STRICT_NE(a, a));
-    Expect.equals(true, Helper.STRICT_NE(a, b));
-    Expect.equals(true, Helper.STRICT_NE(b, a));
-    Expect.equals(false, Helper.STRICT_NE(b, b));
+    Expect.isFalse(Helper.STRICT_NE(a, a));
+    Expect.isTrue(Helper.STRICT_NE(a, b));
+    Expect.isTrue(Helper.STRICT_NE(b, a));
+    Expect.isFalse(Helper.STRICT_NE(b, b));
 
-    Expect.equals(true, Helper.STRICT_EQ(false, false));
-    Expect.equals(false, Helper.STRICT_EQ(false, true));
-    Expect.equals(false, Helper.STRICT_EQ(true, false));
-    Expect.equals(true, Helper.STRICT_EQ(true, true));
+    Expect.isTrue(Helper.STRICT_EQ(false, false));
+    Expect.isFalse(Helper.STRICT_EQ(false, true));
+    Expect.isFalse(Helper.STRICT_EQ(true, false));
+    Expect.isTrue(Helper.STRICT_EQ(true, true));
 
-    Expect.equals(false, Helper.STRICT_NE(false, false));
-    Expect.equals(true, Helper.STRICT_NE(false, true));
-    Expect.equals(true, Helper.STRICT_NE(true, false));
-    Expect.equals(false, Helper.STRICT_NE(true, true));
+    Expect.isFalse(Helper.STRICT_NE(false, false));
+    Expect.isTrue(Helper.STRICT_NE(false, true));
+    Expect.isTrue(Helper.STRICT_NE(true, false));
+    Expect.isFalse(Helper.STRICT_NE(true, true));
 
-    Expect.equals(true, Helper.STRICT_EQ(false, false));
-    Expect.equals(false, Helper.STRICT_EQ(false, true));
-    Expect.equals(false, Helper.STRICT_EQ(true, false));
-    Expect.equals(true, Helper.STRICT_EQ(true, true));
+    Expect.isTrue(Helper.STRICT_EQ(false, false));
+    Expect.isFalse(Helper.STRICT_EQ(false, true));
+    Expect.isFalse(Helper.STRICT_EQ(true, false));
+    Expect.isTrue(Helper.STRICT_EQ(true, true));
 
-    Expect.equals(false, Helper.STRICT_NE(false, false));
-    Expect.equals(true, Helper.STRICT_NE(false, true));
-    Expect.equals(true, Helper.STRICT_NE(true, false));
-    Expect.equals(false, Helper.STRICT_NE(true, true));
+    Expect.isFalse(Helper.STRICT_NE(false, false));
+    Expect.isTrue(Helper.STRICT_NE(false, true));
+    Expect.isTrue(Helper.STRICT_NE(true, false));
+    Expect.isFalse(Helper.STRICT_NE(true, true));
 
-    Expect.equals(true, Helper.EQ(false, false));
-    Expect.equals(false, Helper.EQ(false, true));
-    Expect.equals(false, Helper.EQ(true, false));
-    Expect.equals(true, Helper.EQ(true, true));
+    Expect.isTrue(Helper.EQ(false, false));
+    Expect.isFalse(Helper.EQ(false, true));
+    Expect.isFalse(Helper.EQ(true, false));
+    Expect.isTrue(Helper.EQ(true, true));
 
-    Expect.equals(false, Helper.NE(false, false));
-    Expect.equals(true, Helper.NE(false, true));
-    Expect.equals(true, Helper.NE(true, false));
-    Expect.equals(false, Helper.NE(true, true));
+    Expect.isFalse(Helper.NE(false, false));
+    Expect.isTrue(Helper.NE(false, true));
+    Expect.isTrue(Helper.NE(true, false));
+    Expect.isFalse(Helper.NE(true, true));
 
-    Expect.equals(true, Helper.STRICT_EQ(-1, -1));
-    Expect.equals(true, Helper.STRICT_EQ(0, 0));
-    Expect.equals(true, Helper.STRICT_EQ(1, 1));
-    Expect.equals(false, Helper.STRICT_EQ(-1, 0));
-    Expect.equals(false, Helper.STRICT_EQ(-1, 1));
-    Expect.equals(false, Helper.STRICT_EQ(0, 1));
+    Expect.isTrue(Helper.STRICT_EQ(-1, -1));
+    Expect.isTrue(Helper.STRICT_EQ(0, 0));
+    Expect.isTrue(Helper.STRICT_EQ(1, 1));
+    Expect.isFalse(Helper.STRICT_EQ(-1, 0));
+    Expect.isFalse(Helper.STRICT_EQ(-1, 1));
+    Expect.isFalse(Helper.STRICT_EQ(0, 1));
 
-    Expect.equals(false, Helper.STRICT_NE(-1, -1));
-    Expect.equals(false, Helper.STRICT_NE(0, 0));
-    Expect.equals(false, Helper.STRICT_NE(1, 1));
-    Expect.equals(true, Helper.STRICT_NE(-1, 0));
-    Expect.equals(true, Helper.STRICT_NE(-1, 1));
-    Expect.equals(true, Helper.STRICT_NE(0, 1));
+    Expect.isFalse(Helper.STRICT_NE(-1, -1));
+    Expect.isFalse(Helper.STRICT_NE(0, 0));
+    Expect.isFalse(Helper.STRICT_NE(1, 1));
+    Expect.isTrue(Helper.STRICT_NE(-1, 0));
+    Expect.isTrue(Helper.STRICT_NE(-1, 1));
+    Expect.isTrue(Helper.STRICT_NE(0, 1));
 
-    Expect.equals(true, Helper.EQ(-1, -1));
-    Expect.equals(true, Helper.EQ(0, 0));
-    Expect.equals(true, Helper.EQ(1, 1));
-    Expect.equals(false, Helper.EQ(-1, 0));
-    Expect.equals(false, Helper.EQ(-1, 1));
-    Expect.equals(false, Helper.EQ(0, 1));
+    Expect.isTrue(Helper.EQ(-1, -1));
+    Expect.isTrue(Helper.EQ(0, 0));
+    Expect.isTrue(Helper.EQ(1, 1));
+    Expect.isFalse(Helper.EQ(-1, 0));
+    Expect.isFalse(Helper.EQ(-1, 1));
+    Expect.isFalse(Helper.EQ(0, 1));
 
-    Expect.equals(false, Helper.NE(-1, -1));
-    Expect.equals(false, Helper.NE(0, 0));
-    Expect.equals(false, Helper.NE(1, 1));
-    Expect.equals(true, Helper.NE(-1, 0));
-    Expect.equals(true, Helper.NE(-1, 1));
-    Expect.equals(true, Helper.NE(0, 1));
+    Expect.isFalse(Helper.NE(-1, -1));
+    Expect.isFalse(Helper.NE(0, 0));
+    Expect.isFalse(Helper.NE(1, 1));
+    Expect.isTrue(Helper.NE(-1, 0));
+    Expect.isTrue(Helper.NE(-1, 1));
+    Expect.isTrue(Helper.NE(0, 1));
 
-    Expect.equals(false, Helper.LT(-1, -1));
-    Expect.equals(false, Helper.LT(0, 0));
-    Expect.equals(false, Helper.LT(1, 1));
-    Expect.equals(true, Helper.LT(-1, 0));
-    Expect.equals(true, Helper.LT(-1, 1));
-    Expect.equals(true, Helper.LT(0, 1));
-    Expect.equals(false, Helper.LT(0, -1));
-    Expect.equals(false, Helper.LT(1, -1));
-    Expect.equals(false, Helper.LT(1, 0));
+    Expect.isFalse(Helper.LT(-1, -1));
+    Expect.isFalse(Helper.LT(0, 0));
+    Expect.isFalse(Helper.LT(1, 1));
+    Expect.isTrue(Helper.LT(-1, 0));
+    Expect.isTrue(Helper.LT(-1, 1));
+    Expect.isTrue(Helper.LT(0, 1));
+    Expect.isFalse(Helper.LT(0, -1));
+    Expect.isFalse(Helper.LT(1, -1));
+    Expect.isFalse(Helper.LT(1, 0));
 
-    Expect.equals(true, Helper.LE(-1, -1));
-    Expect.equals(true, Helper.LE(0, 0));
-    Expect.equals(true, Helper.LE(1, 1));
-    Expect.equals(true, Helper.LE(-1, 0));
-    Expect.equals(true, Helper.LE(-1, 1));
-    Expect.equals(true, Helper.LE(0, 1));
-    Expect.equals(false, Helper.LE(0, -1));
-    Expect.equals(false, Helper.LE(1, -1));
-    Expect.equals(false, Helper.LE(1, 0));
+    Expect.isTrue(Helper.LE(-1, -1));
+    Expect.isTrue(Helper.LE(0, 0));
+    Expect.isTrue(Helper.LE(1, 1));
+    Expect.isTrue(Helper.LE(-1, 0));
+    Expect.isTrue(Helper.LE(-1, 1));
+    Expect.isTrue(Helper.LE(0, 1));
+    Expect.isFalse(Helper.LE(0, -1));
+    Expect.isFalse(Helper.LE(1, -1));
+    Expect.isFalse(Helper.LE(1, 0));
 
-    Expect.equals(false, Helper.GT(-1, -1));
-    Expect.equals(false, Helper.GT(0, 0));
-    Expect.equals(false, Helper.GT(1, 1));
-    Expect.equals(false, Helper.GT(-1, 0));
-    Expect.equals(false, Helper.GT(-1, 1));
-    Expect.equals(false, Helper.GT(0, 1));
-    Expect.equals(true, Helper.GT(0, -1));
-    Expect.equals(true, Helper.GT(1, -1));
-    Expect.equals(true, Helper.GT(1, 0));
+    Expect.isFalse(Helper.GT(-1, -1));
+    Expect.isFalse(Helper.GT(0, 0));
+    Expect.isFalse(Helper.GT(1, 1));
+    Expect.isFalse(Helper.GT(-1, 0));
+    Expect.isFalse(Helper.GT(-1, 1));
+    Expect.isFalse(Helper.GT(0, 1));
+    Expect.isTrue(Helper.GT(0, -1));
+    Expect.isTrue(Helper.GT(1, -1));
+    Expect.isTrue(Helper.GT(1, 0));
 
-    Expect.equals(true, Helper.GE(-1, -1));
-    Expect.equals(true, Helper.GE(0, 0));
-    Expect.equals(true, Helper.GE(1, 1));
-    Expect.equals(false, Helper.GE(-1, 0));
-    Expect.equals(false, Helper.GE(-1, 1));
-    Expect.equals(false, Helper.GE(0, 1));
-    Expect.equals(true, Helper.GE(0, -1));
-    Expect.equals(true, Helper.GE(1, -1));
-    Expect.equals(true, Helper.GE(1, 0));
+    Expect.isTrue(Helper.GE(-1, -1));
+    Expect.isTrue(Helper.GE(0, 0));
+    Expect.isTrue(Helper.GE(1, 1));
+    Expect.isFalse(Helper.GE(-1, 0));
+    Expect.isFalse(Helper.GE(-1, 1));
+    Expect.isFalse(Helper.GE(0, 1));
+    Expect.isTrue(Helper.GE(0, -1));
+    Expect.isTrue(Helper.GE(1, -1));
+    Expect.isTrue(Helper.GE(1, 0));
 
-    Expect.equals(true, Helper.STRICT_EQ(-1.0, -1.0));
-    Expect.equals(true, Helper.STRICT_EQ(0.0, 0.0));
-    Expect.equals(true, Helper.STRICT_EQ(1.0, 1.0));
-    Expect.equals(false, Helper.STRICT_EQ(-1.0, 0.0));
-    Expect.equals(false, Helper.STRICT_EQ(-1.0, 1.0));
-    Expect.equals(false, Helper.STRICT_EQ(0.0, 1.0));
+    Expect.isTrue(Helper.STRICT_EQ(-1.0, -1.0));
+    Expect.isTrue(Helper.STRICT_EQ(0.0, 0.0));
+    Expect.isTrue(Helper.STRICT_EQ(1.0, 1.0));
+    Expect.isFalse(Helper.STRICT_EQ(-1.0, 0.0));
+    Expect.isFalse(Helper.STRICT_EQ(-1.0, 1.0));
+    Expect.isFalse(Helper.STRICT_EQ(0.0, 1.0));
 
-    Expect.equals(false, Helper.STRICT_NE(-1.0, -1.0));
-    Expect.equals(false, Helper.STRICT_NE(0.0, 0.0));
-    Expect.equals(false, Helper.STRICT_NE(1.0, 1.0));
-    Expect.equals(true, Helper.STRICT_NE(-1.0, 0.0));
-    Expect.equals(true, Helper.STRICT_NE(-1.0, 1.0));
-    Expect.equals(true, Helper.STRICT_NE(0.0, 1.0));
+    Expect.isFalse(Helper.STRICT_NE(-1.0, -1.0));
+    Expect.isFalse(Helper.STRICT_NE(0.0, 0.0));
+    Expect.isFalse(Helper.STRICT_NE(1.0, 1.0));
+    Expect.isTrue(Helper.STRICT_NE(-1.0, 0.0));
+    Expect.isTrue(Helper.STRICT_NE(-1.0, 1.0));
+    Expect.isTrue(Helper.STRICT_NE(0.0, 1.0));
 
-    Expect.equals(true, Helper.EQ(-1.0, -1.0));
-    Expect.equals(true, Helper.EQ(0.0, 0.0));
-    Expect.equals(true, Helper.EQ(1.0, 1.0));
-    Expect.equals(false, Helper.EQ(-1.0, 0.0));
-    Expect.equals(false, Helper.EQ(-1.0, 1.0));
-    Expect.equals(false, Helper.EQ(0.0, 1.0));
+    Expect.isTrue(Helper.EQ(-1.0, -1.0));
+    Expect.isTrue(Helper.EQ(0.0, 0.0));
+    Expect.isTrue(Helper.EQ(1.0, 1.0));
+    Expect.isFalse(Helper.EQ(-1.0, 0.0));
+    Expect.isFalse(Helper.EQ(-1.0, 1.0));
+    Expect.isFalse(Helper.EQ(0.0, 1.0));
 
-    Expect.equals(false, Helper.NE(-1.0, -1.0));
-    Expect.equals(false, Helper.NE(0.0, 0.0));
-    Expect.equals(false, Helper.NE(1.0, 1.0));
-    Expect.equals(true, Helper.NE(-1.0, 0.0));
-    Expect.equals(true, Helper.NE(-1.0, 1.0));
-    Expect.equals(true, Helper.NE(0.0, 1.0));
+    Expect.isFalse(Helper.NE(-1.0, -1.0));
+    Expect.isFalse(Helper.NE(0.0, 0.0));
+    Expect.isFalse(Helper.NE(1.0, 1.0));
+    Expect.isTrue(Helper.NE(-1.0, 0.0));
+    Expect.isTrue(Helper.NE(-1.0, 1.0));
+    Expect.isTrue(Helper.NE(0.0, 1.0));
 
-    Expect.equals(false, Helper.LT(-1.0, -1.0));
-    Expect.equals(false, Helper.LT(0.0, 0.0));
-    Expect.equals(false, Helper.LT(1.0, 1.0));
-    Expect.equals(true, Helper.LT(-1.0, 0.0));
-    Expect.equals(true, Helper.LT(-1.0, 1.0));
-    Expect.equals(true, Helper.LT(0.0, 1.0));
-    Expect.equals(false, Helper.LT(0.0, -1.0));
-    Expect.equals(false, Helper.LT(1.0, -1.0));
-    Expect.equals(false, Helper.LT(1.0, 0.0));
+    Expect.isFalse(Helper.LT(-1.0, -1.0));
+    Expect.isFalse(Helper.LT(0.0, 0.0));
+    Expect.isFalse(Helper.LT(1.0, 1.0));
+    Expect.isTrue(Helper.LT(-1.0, 0.0));
+    Expect.isTrue(Helper.LT(-1.0, 1.0));
+    Expect.isTrue(Helper.LT(0.0, 1.0));
+    Expect.isFalse(Helper.LT(0.0, -1.0));
+    Expect.isFalse(Helper.LT(1.0, -1.0));
+    Expect.isFalse(Helper.LT(1.0, 0.0));
 
-    Expect.equals(true, Helper.LE(-1.0, -1.0));
-    Expect.equals(true, Helper.LE(0.0, 0.0));
-    Expect.equals(true, Helper.LE(1.0, 1.0));
-    Expect.equals(true, Helper.LE(-1.0, 0.0));
-    Expect.equals(true, Helper.LE(-1.0, 1.0));
-    Expect.equals(true, Helper.LE(0.0, 1.0));
-    Expect.equals(false, Helper.LE(0.0, -1.0));
-    Expect.equals(false, Helper.LE(1.0, -1.0));
-    Expect.equals(false, Helper.LE(1.0, 0.0));
+    Expect.isTrue(Helper.LE(-1.0, -1.0));
+    Expect.isTrue(Helper.LE(0.0, 0.0));
+    Expect.isTrue(Helper.LE(1.0, 1.0));
+    Expect.isTrue(Helper.LE(-1.0, 0.0));
+    Expect.isTrue(Helper.LE(-1.0, 1.0));
+    Expect.isTrue(Helper.LE(0.0, 1.0));
+    Expect.isFalse(Helper.LE(0.0, -1.0));
+    Expect.isFalse(Helper.LE(1.0, -1.0));
+    Expect.isFalse(Helper.LE(1.0, 0.0));
 
-    Expect.equals(false, Helper.GT(-1.0, -1.0));
-    Expect.equals(false, Helper.GT(0.0, 0.0));
-    Expect.equals(false, Helper.GT(1.0, 1.0));
-    Expect.equals(false, Helper.GT(-1.0, 0.0));
-    Expect.equals(false, Helper.GT(-1.0, 1.0));
-    Expect.equals(false, Helper.GT(0.0, 1.0));
-    Expect.equals(true, Helper.GT(0.0, -1.0));
-    Expect.equals(true, Helper.GT(1.0, -1.0));
-    Expect.equals(true, Helper.GT(1.0, 0.0));
+    Expect.isFalse(Helper.GT(-1.0, -1.0));
+    Expect.isFalse(Helper.GT(0.0, 0.0));
+    Expect.isFalse(Helper.GT(1.0, 1.0));
+    Expect.isFalse(Helper.GT(-1.0, 0.0));
+    Expect.isFalse(Helper.GT(-1.0, 1.0));
+    Expect.isFalse(Helper.GT(0.0, 1.0));
+    Expect.isTrue(Helper.GT(0.0, -1.0));
+    Expect.isTrue(Helper.GT(1.0, -1.0));
+    Expect.isTrue(Helper.GT(1.0, 0.0));
 
-    Expect.equals(true, Helper.GE(-1.0, -1.0));
-    Expect.equals(true, Helper.GE(0.0, 0.0));
-    Expect.equals(true, Helper.GE(1.0, 1.0));
-    Expect.equals(false, Helper.GE(-1.0, 0.0));
-    Expect.equals(false, Helper.GE(-1.0, 1.0));
-    Expect.equals(false, Helper.GE(0.0, 1.0));
-    Expect.equals(true, Helper.GE(0.0, -1.0));
-    Expect.equals(true, Helper.GE(1.0, -1.0));
-    Expect.equals(true, Helper.GE(1.0, 0.0));
+    Expect.isTrue(Helper.GE(-1.0, -1.0));
+    Expect.isTrue(Helper.GE(0.0, 0.0));
+    Expect.isTrue(Helper.GE(1.0, 1.0));
+    Expect.isFalse(Helper.GE(-1.0, 0.0));
+    Expect.isFalse(Helper.GE(-1.0, 1.0));
+    Expect.isFalse(Helper.GE(0.0, 1.0));
+    Expect.isTrue(Helper.GE(0.0, -1.0));
+    Expect.isTrue(Helper.GE(1.0, -1.0));
+    Expect.isTrue(Helper.GE(1.0, 0.0));
 
-    Expect.equals(true, Helper.EQ(null, null));
-    Expect.equals(false, Helper.EQ(null, "Str"));
-    Expect.equals(true, Helper.NE(null, 2));
-    Expect.equals(false, Helper.NE(null, null));
+    Expect.isTrue(Helper.EQ(null, null));
+    Expect.isFalse(Helper.EQ(null, "Str"));
+    Expect.isTrue(Helper.NE(null, 2));
+    Expect.isFalse(Helper.NE(null, null));
 
-    Expect.equals(true, Helper.STRICT_EQ(null, null));
-    Expect.equals(false, Helper.STRICT_EQ(null, "Str"));
-    Expect.equals(true, Helper.STRICT_NE(null, 2));
-    Expect.equals(false, Helper.STRICT_NE(null, null));
+    Expect.isTrue(Helper.STRICT_EQ(null, null));
+    Expect.isFalse(Helper.STRICT_EQ(null, "Str"));
+    Expect.isTrue(Helper.STRICT_NE(null, 2));
+    Expect.isFalse(Helper.STRICT_NE(null, null));
 
-    Expect.equals(false, Helper.GT(1, 1.2));
-    Expect.equals(true, Helper.GT(3, 1.2));
-    Expect.equals(true, Helper.GT(2.0, 1));
-    Expect.equals(false, Helper.GT(3.1, 4));
+    Expect.isFalse(Helper.GT(1, 1.2));
+    Expect.isTrue(Helper.GT(3, 1.2));
+    Expect.isTrue(Helper.GT(2.0, 1));
+    Expect.isFalse(Helper.GT(3.1, 4));
 
-    Expect.equals(false, Helper.GE(1, 1.2));
-    Expect.equals(true, Helper.GE(3, 1.2));
-    Expect.equals(true, Helper.GE(2.0, 1));
-    Expect.equals(false, Helper.GE(3.1, 4));
-    Expect.equals(true, Helper.GE(2.0, 2));
-    Expect.equals(true, Helper.GE(2, 2.0));
+    Expect.isFalse(Helper.GE(1, 1.2));
+    Expect.isTrue(Helper.GE(3, 1.2));
+    Expect.isTrue(Helper.GE(2.0, 1));
+    Expect.isFalse(Helper.GE(3.1, 4));
+    Expect.isTrue(Helper.GE(2.0, 2));
+    Expect.isTrue(Helper.GE(2, 2.0));
 
-    Expect.equals(true, Helper.LT(1, 1.2));
-    Expect.equals(false, Helper.LT(3, 1.2));
-    Expect.equals(false, Helper.LT(2.0, 1));
-    Expect.equals(true, Helper.LT(3.1, 4));
+    Expect.isTrue(Helper.LT(1, 1.2));
+    Expect.isFalse(Helper.LT(3, 1.2));
+    Expect.isFalse(Helper.LT(2.0, 1));
+    Expect.isTrue(Helper.LT(3.1, 4));
 
-    Expect.equals(true, Helper.LE(1, 1.2));
-    Expect.equals(false, Helper.LE(3, 1.2));
-    Expect.equals(false, Helper.LE(2.0, 1));
-    Expect.equals(true, Helper.LE(3.1, 4));
-    Expect.equals(true, Helper.LE(2.0, 2));
-    Expect.equals(true, Helper.LE(2, 2.0));
+    Expect.isTrue(Helper.LE(1, 1.2));
+    Expect.isFalse(Helper.LE(3, 1.2));
+    Expect.isFalse(Helper.LE(2.0, 1));
+    Expect.isTrue(Helper.LE(3.1, 4));
+    Expect.isTrue(Helper.LE(2.0, 2));
+    Expect.isTrue(Helper.LE(2, 2.0));
 
     // Bignums.
-    Expect.equals(true, Helper.LE(0xF00000000005, 0xF00000000006));
-    Expect.equals(true, Helper.LE(0xF00000000005, 0xF00000000005));
-    Expect.equals(false, Helper.LE(0xF00000000006, 0xF00000000005));
-    Expect.equals(true, Helper.LE(12, 0xF00000000005));
-    Expect.equals(true, Helper.LE(12.2, 0xF00000000005));
+    Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000006));
+    Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000005));
+    Expect.isFalse(Helper.LE(0xF00000000006, 0xF00000000005));
+    Expect.isTrue(Helper.LE(12, 0xF00000000005));
+    Expect.isTrue(Helper.LE(12.2, 0xF00000000005));
 
-    Expect.equals(true, Helper.EQ(4294967295, 4.294967295e9));
-    Expect.equals(true, Helper.EQ(4.294967295e9, 4294967295));
-    Expect.equals(false, Helper.EQ(4.294967295e9, 42));
-    Expect.equals(false, Helper.EQ(42, 4.294967295e9));
-    Expect.equals(false, Helper.EQ(4294967295, 42));
-    Expect.equals(false, Helper.EQ(42, 4294967295));
+    Expect.isTrue(Helper.EQ(4294967295, 4.294967295e9));
+    Expect.isTrue(Helper.EQ(4.294967295e9, 4294967295));
+    Expect.isFalse(Helper.EQ(4.294967295e9, 42));
+    Expect.isFalse(Helper.EQ(42, 4.294967295e9));
+    Expect.isFalse(Helper.EQ(4294967295, 42));
+    Expect.isFalse(Helper.EQ(42, 4294967295));
 
     // Fractions & mixed
-    Expect.equals(true, Helper.EQ(1.0, 1));
-    Expect.equals(true, Helper.EQ(1.0, 1));
-    Expect.equals(true, Helper.EQ(1, 1.0));
-    Expect.equals(true, Helper.EQ(1, 1.0));
-    Expect.equals(true, Helper.EQ(1.1, 1.1));
-    Expect.equals(true, Helper.EQ(1.1, 1.1));
-    Expect.equals(true, Helper.EQ(1.1, 1.1));
+    Expect.isTrue(Helper.EQ(1.0, 1));
+    Expect.isTrue(Helper.EQ(1.0, 1));
+    Expect.isTrue(Helper.EQ(1, 1.0));
+    Expect.isTrue(Helper.EQ(1, 1.0));
+    Expect.isTrue(Helper.EQ(1.1, 1.1));
+    Expect.isTrue(Helper.EQ(1.1, 1.1));
+    Expect.isTrue(Helper.EQ(1.1, 1.1));
 
-    Expect.equals(false, Helper.GT(1, 1.2));
-    Expect.equals(true, Helper.GT(1.2, 1));
-    Expect.equals(true, Helper.GT(1.2, 1.1));
-    Expect.equals(true, Helper.GT(1.2, 1.1));
-    Expect.equals(true, Helper.GT(1.2, 1.1));
+    Expect.isFalse(Helper.GT(1, 1.2));
+    Expect.isTrue(Helper.GT(1.2, 1));
+    Expect.isTrue(Helper.GT(1.2, 1.1));
+    Expect.isTrue(Helper.GT(1.2, 1.1));
+    Expect.isTrue(Helper.GT(1.2, 1.1));
 
-    Expect.equals(true, Helper.LT(1, 1.2));
-    Expect.equals(false, Helper.LT(1.2, 1));
-    Expect.equals(false, Helper.LT(1.2, 1.1));
-    Expect.equals(false, Helper.LT(1.2, 1.1));
-    Expect.equals(false, Helper.LT(1.2, 1.1));
+    Expect.isTrue(Helper.LT(1, 1.2));
+    Expect.isFalse(Helper.LT(1.2, 1));
+    Expect.isFalse(Helper.LT(1.2, 1.1));
+    Expect.isFalse(Helper.LT(1.2, 1.1));
+    Expect.isFalse(Helper.LT(1.2, 1.1));
 
-    Expect.equals(false, Helper.GE(1.1, 1.2));
-    Expect.equals(false, Helper.GE(1.1, 1.2));
-    Expect.equals(true, Helper.GE(1.2, 1.2));
-    Expect.equals(true, Helper.GE(1.2, 1.2));
+    Expect.isFalse(Helper.GE(1.1, 1.2));
+    Expect.isFalse(Helper.GE(1.1, 1.2));
+    Expect.isTrue(Helper.GE(1.2, 1.2));
+    Expect.isTrue(Helper.GE(1.2, 1.2));
 
     // With non-number classes.
-    Expect.equals(false, Helper.EQ(1, "eeny"));
-    Expect.equals(false, Helper.EQ("meeny", 1));
-    Expect.equals(false, Helper.EQ(1.1, "miny"));
-    Expect.equals(false, Helper.EQ("moe", 1.1));
-    Expect.equals(false, Helper.EQ(1.1, "catch"));
-    Expect.equals(false, Helper.EQ("the", 1.1));
+    Expect.isFalse(Helper.EQ(1, "eeny"));
+    Expect.isFalse(Helper.EQ("meeny", 1));
+    Expect.isFalse(Helper.EQ(1.1, "miny"));
+    Expect.isFalse(Helper.EQ("moe", 1.1));
+    Expect.isFalse(Helper.EQ(1.1, "catch"));
+    Expect.isFalse(Helper.EQ("the", 1.1));
 
     // With null.
-    Expect.equals(false, Helper.EQ(1, null));
-    Expect.equals(false, Helper.EQ(null, 1));
-    Expect.equals(false, Helper.EQ(1.1, null));
-    Expect.equals(false, Helper.EQ(null, 1.1));
-    Expect.equals(false, Helper.EQ(1.1, null));
-    Expect.equals(false, Helper.EQ(null, 1.1));
+    Expect.isFalse(Helper.EQ(1, null));
+    Expect.isFalse(Helper.EQ(null, 1));
+    Expect.isFalse(Helper.EQ(1.1, null));
+    Expect.isFalse(Helper.EQ(null, 1.1));
+    Expect.isFalse(Helper.EQ(1.1, null));
+    Expect.isFalse(Helper.EQ(null, 1.1));
 
     // TODO(srdjan): Clarify behaviour of greater/less comparisons
     // between numbers and non-numbers.
diff --git a/tests/language/compile_time_constant9_test.dart b/tests/language/compile_time_constant9_test.dart
index a149c43..0b0b082 100644
--- a/tests/language/compile_time_constant9_test.dart
+++ b/tests/language/compile_time_constant9_test.dart
@@ -12,5 +12,5 @@
 }
 
 main() {
-  Expect.isTrue(new A().x === new A().x);
+  Expect.isTrue(identical(new A().x, new A().x));
 }
diff --git a/tests/language/compile_time_constant_a_test.dart b/tests/language/compile_time_constant_a_test.dart
index 1d32b37..2541064 100644
--- a/tests/language/compile_time_constant_a_test.dart
+++ b/tests/language/compile_time_constant_a_test.dart
@@ -73,8 +73,8 @@
   Expect.throws(() => m2.putIfAbsent('z', () => 499), isUnsupportedError);
   Expect.throws(() => m2['a'] = 499, isUnsupportedError);
 
-  Expect.isTrue(m3['m1'] === m1);
-  Expect.isTrue(m3['m2'] === m2);
+  Expect.identical(m3['m1'], m1);
+  Expect.identical(m3['m2'], m2);
 
   Expect.listEquals(['z', 'a', 'm'], m4.keys);
   Expect.listEquals([9, 8, 7], m4.values);
@@ -91,7 +91,7 @@
   Expect.isTrue(m5.containsKey(''));
   Expect.equals(1, m5.length);
 
-  Expect.isTrue(m1 === m6);
+  Expect.identical(m1, m6);
 
   Expect.isTrue(m7.isEmpty);
   Expect.equals(0, m7.length);
diff --git a/tests/language/const_factory_redirection_test.dart b/tests/language/const_factory_redirection_test.dart
new file mode 100644
index 0000000..95c0690
--- /dev/null
+++ b/tests/language/const_factory_redirection_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 factory redirections work for compile-time constants, and
+// that abstract classes can redirect.
+
+abstract class C {
+  const factory C(int x) = D;
+}
+
+class D implements C {
+  final int i;
+  const D(this.i);
+}
+
+main() {
+  const C c = const C(42);
+  D d = c;
+  Expect.equals(42, d.i);
+  d = new C(42);
+  Expect.equals(42, d.i);
+}
diff --git a/tests/language/const_locals_test.dart b/tests/language/const_locals_test.dart
new file mode 100644
index 0000000..4c57168
--- /dev/null
+++ b/tests/language/const_locals_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 of compile time constant local variables.
+
+const N = 8;
+
+class ConstFoo {
+  final x;
+  const ConstFoo(this.x);
+}
+
+main() {
+  const MIN = 2 - 1;
+  const MAX = N * 2;
+  const MASK = (1 << (MAX - MIN + 1)) - 1;  // 65535.
+  Expect.equals(1, MIN);
+  Expect.equals(16, MAX);
+  Expect.equals(65535, MASK);
+  const s = 'MIN = $MIN  MAX = $MAX  MASK = $MASK';
+  Expect.identical(s, 'MIN = $MIN  MAX = $MAX  MASK = $MASK');
+  Expect.equals("MIN = 1  MAX = 16  MASK = 65535", s);
+  var cf1 = const ConstFoo(MASK);
+  var cf2 = const ConstFoo(s);
+  var cf3 = const ConstFoo('MIN = $MIN  MAX = $MAX  MASK = $MASK');
+  Expect.identical(cf2, cf3);
+  Expect.isFalse(identical(cf2, cf1));
+}
+
+
+
diff --git a/tests/language/const_native_factory_test.dart b/tests/language/const_native_factory_test.dart
new file mode 100644
index 0000000..c8b8666
--- /dev/null
+++ b/tests/language/const_native_factory_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 Cake {
+  final name;
+  const Cake(this.name);
+  const factory BakeMeACake() native "Cake_BakeMeACake";  /// 01: compile-time error
+}
+
+main() {
+  var c = const Cake("Sacher");
+}
+
diff --git a/tests/language/const_nested_test.dart b/tests/language/const_nested_test.dart
new file mode 100644
index 0000000..962c1eb
--- /dev/null
+++ b/tests/language/const_nested_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 of compile time constant local variables in outer function levels.
+
+const N = 8;
+
+class ConstFoo {
+  final x;
+  const ConstFoo(this.x);
+}
+
+getClosure() {
+  const MIN = 2 - 1;
+  const MAX = N * 2;
+  const MASK = (1 << (MAX - MIN + 1)) - 1;  // 65535.
+
+  void foo() {
+    Expect.equals(1, MIN);
+    Expect.equals(16, MAX);
+    Expect.equals(65535, MASK);
+    // Refer to compile time constant local variables in outer scope.
+    const s = 'MIN = $MIN  MAX = $MAX  MASK = $MASK';
+    Expect.isTrue(identical(s, 'MIN = $MIN  MAX = $MAX  MASK = $MASK'));
+    Expect.equals("MIN = 1  MAX = 16  MASK = 65535", s);
+    var cf1 = const ConstFoo(MASK);
+    var cf2 = const ConstFoo(s);
+    var cf3 = const ConstFoo('MIN = $MIN  MAX = $MAX  MASK = $MASK');
+    Expect.isTrue(identical(cf2, cf3));
+    Expect.isFalse(identical(cf2, cf1));
+  }
+
+  return foo;
+}
+
+
+main() {
+  var f = getClosure();
+  f();
+}
+
+
+
diff --git a/tests/language/const_string_test.dart b/tests/language/const_string_test.dart
index 720fb37..feecc88 100644
--- a/tests/language/const_string_test.dart
+++ b/tests/language/const_string_test.dart
@@ -6,30 +6,30 @@
 
 main() {
   // Constant comparisons are independent of the quotes used.
-  Expect.isTrue("abcd" === 'abcd');
-  Expect.isTrue('abcd' === "abcd");
-  Expect.isTrue("ab\"cd" === 'ab"cd');
-  Expect.isTrue('ab\'cd' === "ab'cd");
+  Expect.isTrue(identical("abcd", 'abcd'));
+  Expect.isTrue(identical('abcd', "abcd"));
+  Expect.isTrue(identical("ab\"cd", 'ab"cd'));
+  Expect.isTrue(identical('ab\'cd', "ab'cd"));
 
   // String concatenation works even when quotes are different.
-  Expect.isTrue("abcd" === "ab" "cd");
-  Expect.isTrue("abcd" === "ab" 'cd');
-  Expect.isTrue("abcd" === 'ab' 'cd');
-  Expect.isTrue("abcd" === 'ab' "cd");
+  Expect.isTrue(identical("abcd", "ab" "cd"));
+  Expect.isTrue(identical("abcd", "ab" 'cd'));
+  Expect.isTrue(identical("abcd", 'ab' 'cd'));
+  Expect.isTrue(identical("abcd", 'ab' "cd"));
 
   // Or when there are more than 2 contatenations.
-  Expect.isTrue("abcd" === "a" "b" "cd");
-  Expect.isTrue("abcd" === "a" "b" "c" "d");
-  Expect.isTrue('abcd' === 'a' 'b' 'c' 'd');
-  Expect.isTrue("abcd" === "a" "b" 'c' "d");
-  Expect.isTrue("abcd" === 'a' 'b' 'c' 'd');
-  Expect.isTrue("abcd" === 'a' "b" 'c' "d");
+  Expect.isTrue(identical("abcd", "a" "b" "cd"));
+  Expect.isTrue(identical("abcd", "a" "b" "c" "d"));
+  Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd'));
+  Expect.isTrue(identical("abcd", "a" "b" 'c' "d"));
+  Expect.isTrue(identical("abcd", 'a' 'b' 'c' 'd'));
+  Expect.isTrue(identical("abcd", 'a' "b" 'c' "d"));
 
-  Expect.isTrue("a'b'cd" === "a" "'b'" 'c' "d");
-  Expect.isTrue("a\"b\"cd" === "a" '"b"' 'c' "d");
-  Expect.isTrue("a\"b\"cd" === "a" '"b"' 'c' "d");
-  Expect.isTrue("a'b'cd" === 'a' "'b'" 'c' "d");
-  Expect.isTrue('a\'b\'cd' === "a" "'b'" 'c' "d");
-  Expect.isTrue('a"b"cd' === 'a' '"b"' 'c' "d");
-  Expect.isTrue("a\"b\"cd" === 'a' '"b"' 'c' "d");
+  Expect.isTrue(identical("a'b'cd", "a" "'b'" 'c' "d"));
+  Expect.isTrue(identical("a\"b\"cd", "a" '"b"' 'c' "d"));
+  Expect.isTrue(identical("a\"b\"cd", "a" '"b"' 'c' "d"));
+  Expect.isTrue(identical("a'b'cd", 'a' "'b'" 'c' "d"));
+  Expect.isTrue(identical('a\'b\'cd', "a" "'b'" 'c' "d"));
+  Expect.isTrue(identical('a"b"cd', 'a' '"b"' 'c' "d"));
+  Expect.isTrue(identical("a\"b\"cd", 'a' '"b"' 'c' "d"));
 }
diff --git a/tests/language/constant_fold_equals_test.dart b/tests/language/constant_fold_equals_test.dart
index 7cf14e2..b69c1e7 100644
--- a/tests/language/constant_fold_equals_test.dart
+++ b/tests/language/constant_fold_equals_test.dart
@@ -6,9 +6,9 @@
   var a = 'foo';
   for (int i = 0; i < 10; i++) {
     if (i == 0) {
-      Expect.isTrue(a === 'foo');
+      Expect.isTrue(identical(a, 'foo'));
     } else {
-      Expect.isTrue(a === 2);
+      Expect.isTrue(a == 2);
     }
     a = 2;
   }
diff --git a/tests/language/ct_const2_test.dart b/tests/language/ct_const2_test.dart
index 3e3f017..330fe3d 100644
--- a/tests/language/ct_const2_test.dart
+++ b/tests/language/ct_const2_test.dart
@@ -68,8 +68,8 @@
 const BOP7 = false || BOOL_LIT;
 const BOP8 = STRING_LIT == "World!";
 const BOP9 = "Hello" != STRING_LIT;
-const BOP10 = INT_LIT === INT_LIT_REF;
-const BOP11 = BOOL_LIT !== true;
+const BOP10 = INT_LIT == INT_LIT_REF;
+const BOP11 = BOOL_LIT != true;
 
 // Multiple binary expressions
 const BOP20 = 1 * INT_LIT / 3 + INT_LIT + 9;
diff --git a/tests/language/ct_const_test.dart b/tests/language/ct_const_test.dart
index d8117ca..7d3f017 100644
--- a/tests/language/ct_const_test.dart
+++ b/tests/language/ct_const_test.dart
@@ -45,41 +45,41 @@
   static testMain() {
     Expect.equals(0, Point.zero);
     Expect.equals(0, Point.origin.x_);
-    Expect.equals(true, Point.origin === Point.origin2);
+    Expect.equals(true, identical(Point.origin, Point.origin2));
     var p1 = const Point(0, 0);
-    Expect.equals(true, Point.origin === p1);
+    Expect.equals(true, identical(Point.origin, p1));
 
     Expect.equals(false, Point.origin == const Point(1, 1));
-    Expect.equals(false, Point.origin === const Point(1, 1));
+    Expect.equals(false, identical(Point.origin, const Point(1, 1)));
 
     var p2 = new Point(0, getZero());
     Expect.equals(true, Point.origin == p2);  // Point.operator==
 
-    Expect.equals(true, const Point.X(5) === const Point(5, 0));
+    Expect.equals(true, identical(const Point.X(5), const Point(5, 0)));
 
     Line l1 = const Line(Point.origin, const Point(1, 1));
     Line l2 = const Line(const Point(0, 0), const Point(1, 1));
     Line l3 = new Line(const Point(0, 0), const Point(1, 1));
-    Expect.equals(true, l1 === l2);
+    Expect.equals(true, identical(l1, l2));
 
     final evenNumbers = const <int>[2, 2*2, 2*3, 2*4, 2*5];
-    Expect.equals(true, evenNumbers !== const [2, 4, 6, 8, 10]);
+    Expect.equals(true, !identical(evenNumbers, const [2, 4, 6, 8, 10]));
 
     final c11dGermany1 = const {"black": 1, "red": 2, "yellow": 3};
     Expect.equals(true,
-        c11dGermany1 === const {"black": 1, "red": 2, "yellow": 3});
+        identical(c11dGermany1, const {"black": 1, "red": 2, "yellow": 3}));
 
     final c11dGermany2 = const {"black": 1, "red": 2, "yellow": 3};
-    Expect.equals(true, c11dGermany1 === c11dGermany2);
+    Expect.equals(true, identical(c11dGermany1, c11dGermany2));
 
     final c11dBelgium = const {"black": 1, "yellow": 2, "red": 3};
     Expect.equals(false, c11dGermany1 == c11dBelgium);
-    Expect.equals(false, c11dGermany1 === c11dBelgium);
+    Expect.equals(false, identical(c11dGermany1, c11dBelgium));
 
     final c11dItaly = const {"green": 1, "red": 3, "white": 2};
     Expect.equals(true,
-        c11dItaly === const {"green": 1, "red": 3, "white": 2});
-    Expect.equals(true, c11dItaly === Roman.VivaItalia);
+        identical(c11dItaly, const {"green": 1, "red": 3, "white": 2}));
+    Expect.equals(true, identical(c11dItaly, Roman.VivaItalia));
 
     Expect.equals(3, c11dItaly.length);
     Expect.equals(3, c11dItaly.keys.length);
@@ -114,7 +114,7 @@
     Expect.equals(true, caughtException);
     Expect.equals(1, c11dItaly["green"]);
 
-    Expect.equals(true, null === naught);
+    Expect.equals(true, null == naught);
   }
 }
 
diff --git a/sdk/lib/html/templates/html/interface/interface_Document.darttemplate b/tests/language/duplicate_export_negative_test.dart
similarity index 70%
rename from sdk/lib/html/templates/html/interface/interface_Document.darttemplate
rename to tests/language/duplicate_export_negative_test.dart
index ac96d0c..aeee87f 100644
--- a/sdk/lib/html/templates/html/interface/interface_Document.darttemplate
+++ b/tests/language/duplicate_export_negative_test.dart
@@ -2,10 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of html;
+library duplicate_export_negative_test;
 
-$!COMMENT
-abstract class _IDocument extends _IHtmlElement {
+import 'duplicate_import_libd.dart';
 
-$!MEMBERS
-}
+void main() {
+}
\ No newline at end of file
diff --git a/sdk/lib/coreimpl/coreimpl.dart b/tests/language/duplicate_import_liba.dart
similarity index 71%
copy from sdk/lib/coreimpl/coreimpl.dart
copy to tests/language/duplicate_import_liba.dart
index 067ea2f..b8af1a7 100644
--- a/sdk/lib/coreimpl/coreimpl.dart
+++ b/tests/language/duplicate_import_liba.dart
@@ -2,8 +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.
 
-#library("dart:coreimpl");
+library liba;
 
-#import("dart:collection");
+var field;
 
-#source("regexp.dart");
+void method() {}
+
+class Class {}
+
+void methodOrClass() {}
diff --git a/sdk/lib/coreimpl/coreimpl.dart b/tests/language/duplicate_import_libb.dart
similarity index 72%
rename from sdk/lib/coreimpl/coreimpl.dart
rename to tests/language/duplicate_import_libb.dart
index 067ea2f..9b87595f 100644
--- a/sdk/lib/coreimpl/coreimpl.dart
+++ b/tests/language/duplicate_import_libb.dart
@@ -2,8 +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.
 
-#library("dart:coreimpl");
+library libb;
 
-#import("dart:collection");
+var field;
 
-#source("regexp.dart");
+void method() {}
+
+class Class {}
+
+class methodOrClass {}
\ No newline at end of file
diff --git a/sdk/lib/coreimpl/coreimpl.dart b/tests/language/duplicate_import_libc.dart
similarity index 72%
copy from sdk/lib/coreimpl/coreimpl.dart
copy to tests/language/duplicate_import_libc.dart
index 067ea2f..d1f1b41 100644
--- a/sdk/lib/coreimpl/coreimpl.dart
+++ b/tests/language/duplicate_import_libc.dart
@@ -2,8 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("dart:coreimpl");
+library libc;
 
-#import("dart:collection");
+var field;
 
-#source("regexp.dart");
+void method() {}
+
+class Class {}
diff --git a/tests/language/duplicate_import_libd.dart b/tests/language/duplicate_import_libd.dart
new file mode 100644
index 0000000..ccec81e
--- /dev/null
+++ b/tests/language/duplicate_import_libd.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.
+
+library libd;
+
+import 'duplicate_import_liba.dart';
+import 'duplicate_import_libb.dart';
+import 'duplicate_import_libc.dart';
+
+export 'duplicate_import_liba.dart';
+export 'duplicate_import_libb.dart';
+export 'duplicate_import_libc.dart';
diff --git a/tests/language/factory1_test.dart b/tests/language/factory1_test.dart
new file mode 100644
index 0000000..7aee67b
--- /dev/null
+++ b/tests/language/factory1_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 factory generic result types.
+
+class A<T> {
+  A() { }
+  factory A.factory() {
+    return new A<String>();
+  }
+}
+
+class B<T> extends A<T> {
+  B() { }
+  factory B.factory() {
+    return new B<String>();
+  }
+}
+
+
+main() {
+  new A<String>.factory();
+  new A<int>.factory();  /// 00: dynamic type error
+  new B<String>.factory();
+  new B<int>.factory();  /// 01: dynamic type error
+}
diff --git a/tests/language/factory_redirection_test.dart b/tests/language/factory_redirection_test.dart
index 8491bdd..fb3ceb6 100644
--- a/tests/language/factory_redirection_test.dart
+++ b/tests/language/factory_redirection_test.dart
@@ -62,11 +62,12 @@
   new C.test07<int, int>(0);  /// 07: continued
   Expect.isTrue(new A<List>() is A<List>);
   Expect.isTrue(new A<bool>.constant(true).x);
-  Expect.isTrue(new A<List>.factory() is B<Set>);
-  Expect.isTrue(new B<List>.A() is A<List>);
-  Expect.isTrue(new B<bool>.A_constant(true).x);
-  Expect.isTrue(new B<List>.A_factory() is B<Set>);
-  Expect.isTrue(new C<String, num>.A() is A<num>);
-  Expect.isTrue(new C<String, num>.A_factory() is B<Set>);
-  Expect.isTrue(new C<String, bool>.B_constant(true).x);
+  Expect.isTrue(new A<Set>.factory() is B<Set>);
+  Expect.isTrue(new B<List>.A() is A<List>);  /// 08: dynamic type error
+  Expect.isFalse(new B<List>.A() is A<Set>);  /// 09: dynamic type error
+  Expect.isTrue(new B<bool>.A_constant(true).x);  /// 10: dynamic type error
+  Expect.isTrue(new B<List>.A_factory() is B<Set>);  /// 11: dynamic type error
+  Expect.isTrue(new C<String, num>.A() is A<num>);  /// 12: dynamic type error
+  Expect.isTrue(new C<String, num>.A_factory() is B<Set>);  /// 13: dynamic type error
+  Expect.isTrue(new C<String, bool>.B_constant(true).x);  /// 14: dynamic type error
 }
diff --git a/tests/language/factory_type_parameter_test.dart b/tests/language/factory_type_parameter_test.dart
index 6dcff87..fe6b0fa 100644
--- a/tests/language/factory_type_parameter_test.dart
+++ b/tests/language/factory_type_parameter_test.dart
@@ -4,7 +4,7 @@
 
 class A<T> {
   factory A.factory() {
-    return new B<Set>();
+    return new B<T>();
   }
 
   A();
@@ -24,18 +24,18 @@
 
 main() {
   Expect.isTrue(new A<List>() is A<List>);
-  Expect.isTrue(new A<List>.factory() is B<Set>);
+  Expect.isTrue(new A<List>.factory() is B<List>);
 
   // Check that we don't always return true for is checks with
   // generics.
   Expect.isFalse(new A<List>() is A<Set>);
-  Expect.isFalse(new A<List>.factory() is B<List>);
+  Expect.isFalse(new A<List>.factory() is B<Set>);
 
   Expect.isTrue(new A<List>().build() is A<List>);
   Expect.isFalse(new A<List>().build() is A<Set>);
 
-  Expect.isTrue(new A<List>.factory().build() is B<Set>);
-  Expect.isFalse(new A<List>.factory().build() is B<List>);
+  Expect.isTrue(new A<List>.factory().build() is B<List>);
+  Expect.isFalse(new A<List>.factory().build() is B<Set>);
 
   Expect.isTrue(new B<List>().build() is B<List>);
   Expect.isFalse(new B<List>().build() is B<Set>);
diff --git a/tests/language/field_optimization3_test.dart b/tests/language/field_optimization3_test.dart
index b23b0ff..1f11c10 100644
--- a/tests/language/field_optimization3_test.dart
+++ b/tests/language/field_optimization3_test.dart
@@ -18,7 +18,7 @@
   }
   setA(value) { a = value; }
   setB(value) { b = value; }
-  operator >(other) => other === 0.2;
+  operator >(other) => other == 0.2;
 }
 
 main() {
diff --git a/tests/language/finally_test.dart b/tests/language/finally_test.dart
index b388045..d71dab6 100644
--- a/tests/language/finally_test.dart
+++ b/tests/language/finally_test.dart
@@ -11,7 +11,7 @@
 
   foo() {
     bool executedFinally = false;
-    if (i === 42) {
+    if (i == 42) {
       try {
         i = 12;
       } finally {
diff --git a/tests/language/first_class_types_libraries_test.dart b/tests/language/first_class_types_libraries_test.dart
index 521f2fa..db6442f 100644
--- a/tests/language/first_class_types_libraries_test.dart
+++ b/tests/language/first_class_types_libraries_test.dart
@@ -9,13 +9,11 @@
 class C<X> {}
 
 sameType(a, b) {
-  Expect.identical(a.runtimeType, b.runtimeType);
+  Expect.equals(a.runtimeType, b.runtimeType);
 }
 
 differentType(a, b) {
-  print("a: ${a.runtimeType}");
-  print("b: ${b.runtimeType}");
-  Expect.isFalse(identical(a.runtimeType, b.runtimeType));
+  Expect.notEquals(a.runtimeType, b.runtimeType);
 }
 
 main() {
diff --git a/tests/language/first_class_types_literals_test.dart b/tests/language/first_class_types_literals_test.dart
index 9e8093f..df8d6d6 100644
--- a/tests/language/first_class_types_literals_test.dart
+++ b/tests/language/first_class_types_literals_test.dart
@@ -9,31 +9,25 @@
 typedef int Foo(bool b);
 
 sameType(a, b) {
-  Expect.identical(a.runtimeType, b.runtimeType);
-}
-
-differentType(a, b) {
-  print("a: ${a.runtimeType}");
-  print("b: ${b.runtimeType}");
-  Expect.isFalse(a.runtimeType === b.runtimeType);
+  Expect.equals(a.runtimeType, b.runtimeType);
 }
 
 main() {
   // Test type literals.
-  Expect.identical(int, int);
-  Expect.isFalse(int === num);
-  Expect.identical(Foo, Foo);
+  Expect.equals(int, int);
+  Expect.notEquals(int, num);
+  Expect.equals(Foo, Foo);
 
   // Test that class literals return instances of Type.
   Expect.isTrue((D).runtimeType is Type);
 
   // Test that types from runtimeType and literals agree.
-  Expect.identical(int, 1.runtimeType);
-  Expect.identical(C, new C().runtimeType);
-  Expect.identical(D, new D().runtimeType);
+  Expect.equals(int, 1.runtimeType);
+  Expect.equals(C, new C().runtimeType);
+  Expect.equals(D, new D().runtimeType);
 
   // runtimeType on type is idempotent.
-  Expect.identical((D).runtimeType, (D).runtimeType.runtimeType);
+  Expect.equals((D).runtimeType, (D).runtimeType.runtimeType);
 
   // Test that operator calls on class literals go to Type.
   Expect.throws(() => C = 1, (e) => e is NoSuchMethodError);
diff --git a/tests/language/first_class_types_test.dart b/tests/language/first_class_types_test.dart
index 5db1e54..419dbbb 100644
--- a/tests/language/first_class_types_test.dart
+++ b/tests/language/first_class_types_test.dart
@@ -5,13 +5,11 @@
 class C<T> {}
 
 sameType(a, b) {
-  Expect.identical(a.runtimeType, b.runtimeType);
+  Expect.equals(a.runtimeType, b.runtimeType);
 }
 
 differentType(a, b) {
-  print("a: ${a.runtimeType}");
-  print("b: ${b.runtimeType}");
-  Expect.isFalse(a.runtimeType === b.runtimeType);
+  Expect.isFalse(a.runtimeType == b.runtimeType);
 }
 
 main() {
diff --git a/tests/language/function_argument_test.dart b/tests/language/function_argument_test.dart
index 0edeecf..f718965 100644
--- a/tests/language/function_argument_test.dart
+++ b/tests/language/function_argument_test.dart
@@ -10,9 +10,6 @@
 
   static void testMain() {
     Expect.equals(42, testMe(() { return 42; }));
-    Expect.equals(314, testMe(f() { return 314; }));
-    // Test another unnamed function.
-    Expect.equals(99, testMe(() { return 99; }));
   }
 }
 
diff --git a/tests/language/function_literals2_test.dart b/tests/language/function_literals2_test.dart
index e871714..420892b 100644
--- a/tests/language/function_literals2_test.dart
+++ b/tests/language/function_literals2_test.dart
@@ -19,7 +19,7 @@
     h(42);  // make sure it is parsed as a function call
     Expect.equals(20, h(10));
 
-    var a = int _(x) {return x + 2;};
+    var a = (x) {return x + 2;};
     Expect.equals(7, a(5));
 
     Expect.equals(10, apply((k) { return k << 1;}, 5));
diff --git a/tests/language/function_literals_test.dart b/tests/language/function_literals_test.dart
index 0f379e2..2f321ee 100644
--- a/tests/language/function_literals_test.dart
+++ b/tests/language/function_literals_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -43,107 +43,34 @@
 
   void testArrow() {
     checkIntFunction(42, (x) => x, 42);
-    checkIntFunction(42, _(x) => x, 42);
-    checkIntFunction(42, int f(x) => x, 42);
     checkIntFunction(42, (int x) => x, 42);
-    checkIntFunction(42, _(int x) => x, 42);
-    checkIntFunction(42, int f(int x) => x, 42);
   }
 
   void testArrowArrow() {
     checkIntFuncFunction(84, (x) => (y) => x+y, 42);
-    checkIntFuncFunction(84, _(x) => (y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => (y) => x+y, 42);
     checkIntFuncFunction(84, (int x) => (y) => x+y, 42);
-    checkIntFuncFunction(84, _(int x) => (y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => (y) => x+y, 42);
-    checkIntFuncFunction(84, (x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, _(x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, (int x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, _(int x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => f(y) => x+y, 42);
-    checkIntFuncFunction(84, (x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, _(x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, (int x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, _(int x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => int f(y) => x+y, 42);
-    checkIntFuncFunction(84, (int x) => int f(int y) => x+y, 42);
-    checkIntFuncFunction(84, _(int x) => int f(int y) => x+y, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => int f(int y) => x+y, 42);
+    checkIntFuncFunction(84, (x) => (y) => x+y, 42);
+    checkIntFuncFunction(84, (int x) => (y) => x+y, 42);
   }
 
   void testArrowBlock() {
     checkIntFuncFunction(84, (x) => (y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(x) => (y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => (y) { return x+y; }, 42);
     checkIntFuncFunction(84, (int x) => (y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) => (y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => (y) { return x+y; }, 42);
-    checkIntFuncFunction(84, (x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, (int x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, (x) => int f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(x) => int f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) => int f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, (int x) => int f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) => int f(y) { return x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) => int f(y) { return x+y; }, 42);
   }
 
   void testBlock() {
     checkIntFunction(42, (x) { return x; }, 42);
-    checkIntFunction(42, _(x) { return x; }, 42);
-    checkIntFunction(42, int f(x) { return x; }, 42);
     checkIntFunction(42, (int x) { return x; }, 42);
-    checkIntFunction(42, _(int x) { return x; }, 42);
-    checkIntFunction(42, int f(int x) { return x; }, 42);
   }
 
   void testBlockArrow() {
     checkIntFuncFunction(84, (x) { return (y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(x) { return (y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return (y) => x+y; }, 42);
     checkIntFuncFunction(84, (int x) { return (y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) { return (y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return (y) => x+y; }, 42);
-    checkIntFuncFunction(84, (x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, (int x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, (x) { return int f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(x) { return int f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return int f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, (int x) { return int f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, _(int x) { return int f(y) => x+y; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return int f(y) => x+y; }, 42);
   }
 
   void testBlockBlock() {
     checkIntFuncFunction(84, (x) { return (y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(x) { return (y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return (y) { return x+y; }; }, 42);
     checkIntFuncFunction(84, (int x) { return (y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(int x) { return (y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return (y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, (x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, (int x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(int x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, (x) { return int f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(x) { return int f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(x) { return int f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, (int x) { return int f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, _(int x) { return int f(y) { return x+y; }; }, 42);
-    checkIntFuncFunction(84, IntFunc f(int x) { return int f(y) { return x+y; }; }, 42);
   }
 
   void testFunctionRef() {
diff --git a/tests/language/function_syntax_test.dart b/tests/language/function_syntax_test.dart
index 131802f..4fc4ac3 100644
--- a/tests/language/function_syntax_test.dart
+++ b/tests/language/function_syntax_test.dart
@@ -201,17 +201,17 @@
 (a, b)
 */ /// 28: continued
  { return a + b; }, 1, 2));
-    Expect.equals(42, eval0(nb0
+    Expect.equals(42, eval0(
 /* /// 29: compile-time error
 ()
 */ /// 29: continued
  { return 42; }));
-    Expect.equals(87, eval1(nb1
+    Expect.equals(87, eval1(
 /* /// 30: compile-time error
 (a)
 */ /// 30: continued
  { return a; }, 87));
-    Expect.equals(1 + 2, eval2(nb2
+    Expect.equals(1 + 2, eval2(
 /* /// 31: compile-time error
 (a, b)
 */ /// 31: continued
@@ -233,56 +233,22 @@
 (a, b)
 */ /// 34: continued
  => a + b, 1, 2));
-    Expect.equals(42, eval0(na0
+    Expect.equals(42, eval0(
 /* /// 35: compile-time error
 ()
 */ /// 35: continued
  => 42));
-    Expect.equals(87, eval1(na1
+    Expect.equals(87, eval1(
 /* /// 36: compile-time error
 (a)
 */ /// 36: continued
  => a, 87));
-    Expect.equals(1 + 2, eval2(na2
+    Expect.equals(1 + 2, eval2(
 /* /// 37: compile-time error
 (a, b)
 */ /// 37: continued
  => a + b, 1, 2));
 
-    // Return type - braces.
-    Expect.equals(42, eval0(int rb0
-/* /// 38: compile-time error
-()
-*/ /// 38: continued
- { return 42; }));
-    Expect.equals(87, eval1(int rb1
-/* /// 39: compile-time error
-(a)
-*/ /// 39: continued
- { return a; }, 87));
-    Expect.equals(1 + 2, eval2(int rb2
-/* /// 40: compile-time error
-(a, b)
-*/ /// 40: continued
- { return a + b; }, 1, 2));
-
-    // Return type - arrows.
-    Expect.equals(42, eval0(int ra0
-/* /// 41: compile-time error
-()
-*/ /// 41: continued
- => 42));
-    Expect.equals(87, eval1(int ra1
-/* /// 42: compile-time error
-(a)
-*/ /// 42: continued
- => a, 87));
-    Expect.equals(1 + 2, eval2(int ra2
-/* /// 43: compile-time error
-(a, b)
-*/ /// 43: continued
- => a + b, 1, 2));
-
     // Argument types - braces.
     Expect.equals(42, eval0(
 /* /// 44: compile-time error
@@ -299,17 +265,17 @@
 (int a, int b)
 */ /// 46: continued
  { return a + b; }, 1, 2));
-    Expect.equals(42, eval0( ab0
+    Expect.equals(42, eval0(
 /* /// 47: compile-time error
 ()
 */ /// 47: continued
  { return 42; }));
-    Expect.equals(87, eval1(ab1
+    Expect.equals(87, eval1(
 /* /// 48: compile-time error
 (int a)
 */ /// 48: continued
  { return a; }, 87));
-    Expect.equals(1 + 2, eval2(ab2
+    Expect.equals(1 + 2, eval2(
 /* /// 49: compile-time error
 (int a, int b)
 */ /// 49: continued
@@ -331,69 +297,22 @@
 (int a, int b)
 */ /// 52: continued
  => a + b, 1, 2));
-    Expect.equals(42, eval0(aa0
+    Expect.equals(42, eval0(
 /* /// 53: compile-time error
 ()
 */ /// 53: continued
  => 42));
-    Expect.equals(87, eval1(aa1
+    Expect.equals(87, eval1(
 /* /// 54: compile-time error
 (int a)
 */ /// 54: continued
  => a, 87));
-    Expect.equals(1 + 2, eval2(aa2
+    Expect.equals(1 + 2, eval2(
 /* /// 55: compile-time error
 (int a, int b)
 */ /// 55: continued
  => a + b, 1, 2));
 
-    // Fully typed - braces.
-    Expect.equals(87, eval1(int fb1
-/* /// 56: compile-time error
-(int a)
-*/ /// 56: continued
- { return a; }, 87));
-    Expect.equals(1 + 2, eval2(int fb2
-/* /// 57: compile-time error
-(int a, int b)
-*/ /// 57: continued
- { return a + b; }, 1, 2));
-
-    // Fully typed - arrows.
-    Expect.equals(87, eval1(int fa1
-/* /// 58: compile-time error
-(int a)
-*/ /// 58: continued
- => a, 87));
-    Expect.equals(1 + 2, eval2(int fa2
-/* /// 59: compile-time error
-(int a, int b)
-*/ /// 59: continued
- => a + b, 1, 2));
-
-    // Generic types - braces.
-    Expect.equals(42, eval0(List<int> gb0
-/* /// 60: compile-time error
-()
-*/ /// 60: continued
- { return [42]; })[0]);
-    Expect.equals(87, eval1(List<int> gb1
-/* /// 61: compile-time error
-(List<int> a)
-*/ /// 61: continued
- { return a; }, [87])[0]);
-
-    // Generic types - arrows.
-    Expect.equals(42, eval0(List<int> ga0
-/* /// 62: compile-time error
-()
-*/ /// 62: continued
- => [42])[0]);
-    Expect.equals(87, eval1(List<int> ga1
-/* /// 63: compile-time error
-(List<int> a)
-*/ /// 63: continued
- => a, [87])[0]);
   }
 
   static void testPrecedence
@@ -442,8 +361,8 @@
     // Equality.
     expectEvaluatesTo(true, ()=> 1 == 1);
     expectEvaluatesTo(false, ()=> 1 != 1);
-    expectEvaluatesTo(true, ()=> 1 === 1);
-    expectEvaluatesTo(false, ()=> 1 !== 1);
+    expectEvaluatesTo(true, ()=> identical(1, 1));
+    expectEvaluatesTo(false, ()=> !identical(1, 1));
 
     // Relational.
     expectEvaluatesTo(true, ()=> 1 <= 1);
@@ -549,7 +468,7 @@
 ()
 */ /// 69: continued
  {
-    Expect.equals(87, (function
+    Expect.equals(87, (
 /* /// 70: compile-time error
 ()
 */ /// 70: continued
@@ -587,29 +506,29 @@
   C.cb3() : fn = {'x': () { return 48; }}['x'] { }
   C.ca3() : fn = {'x': () => 49}['x'] { }
 
-  C.nb0() : fn = (f() { return 52; }) { }
-  C.na0() : fn = (f() => 53) { }
+  C.nb0() : fn = (() { return 52; }) { }
+  C.na0() : fn = (() => 53) { }
 
-  C.nb1() : fn = wrap(f() { return 54; }) { }
-  C.na1() : fn = wrap(f()=> 55) { }
+  C.nb1() : fn = wrap(() { return 54; }) { }
+  C.na1() : fn = wrap(()=> 55) { }
 
-  C.nb2() : fn = [f() { return 56; }][0] { }
-  C.na2() : fn = [f() => 57][0] { }
+  C.nb2() : fn = [() { return 56; }][0] { }
+  C.na2() : fn = [() => 57][0] { }
 
-  C.nb3() : fn = {'x': f() { return 58; }}['x'] { }
-  C.na3() : fn = {'x': f() => 59}['x'] { }
+  C.nb3() : fn = {'x': () { return 58; }}['x'] { }
+  C.na3() : fn = {'x': () => 59}['x'] { }
 
-  C.rb0() : fn = (int _() { return 62; }) { }
-  C.ra0() : fn = (int _() => 63) { }
+  C.rb0() : fn = (() { return 62; }) { }
+  C.ra0() : fn = (() => 63) { }
 
-  C.rb1() : fn = wrap(int _() { return 64; }) { }
-  C.ra1() : fn = wrap(int _()=> 65) { }
+  C.rb1() : fn = wrap(() { return 64; }) { }
+  C.ra1() : fn = wrap(()=> 65) { }
 
-  C.rb2() : fn = [int _() { return 66; }][0] { }
-  C.ra2() : fn = [int _() => 67][0] { }
+  C.rb2() : fn = [() { return 66; }][0] { }
+  C.ra2() : fn = [() => 67][0] { }
 
-  C.rb3() : fn = {'x': int _() { return 68; }}['x'] { }
-  C.ra3() : fn = {'x': int _() => 69}['x'] { }
+  C.rb3() : fn = {'x': () { return 68; }}['x'] { }
+  C.ra3() : fn = {'x': () => 69}['x'] { }
 
   static wrap
 /* /// 73: compile-time error
diff --git a/tests/language/function_test.dart b/tests/language/function_test.dart
index aa4997e..f917531 100644
--- a/tests/language/function_test.dart
+++ b/tests/language/function_test.dart
@@ -65,7 +65,6 @@
 
   static void testMain() {
     var test = new FunctionTest();
-    test.testRecursiveClosureRef();
     test.testForEach();
     test.testVarOrder1();
     test.testVarOrder2();
@@ -74,7 +73,6 @@
     test.testLexicalClosureRef3();
     test.testLexicalClosureRef4();
     test.testLexicalClosureRef5();
-    test.testFunctionScopes();
     test.testDefaultParametersOrder();
     test.testParametersOrder();
     test.testFunctionDefaults1();
@@ -216,25 +214,6 @@
 
   int tempField;
 
-  // Validate that a closure that calls the private name of a function (for
-  // for recursion) calls the version of function with the bound names.
-  void testRecursiveClosureRef() {
-    tempField = 2;
-    var x = 3;
-    var g = f(a) {
-       tempField++;
-       x++;
-       if (a > 0) {
-         f(--a);
-       }
-    };
-    g(2);
-
-
-    Expect.equals(5, tempField);
-    Expect.equals(6, x);
-  }
-
   void testForEach() {
     List<int> vals = [1,2,3];
     int total = 0;
@@ -244,33 +223,6 @@
     Expect.equals(6, total);
   }
 
-  void testFunctionScopes() {
-    // Function expression. 'recurse' is only defined within the function body.
-    // FAILS:
-    // var factorial0 = function recurse(int x) {
-    //  return (x == 1) ? 1 : (x * recurse(x - 1));
-    // };
-    // TEMP:
-    var factorial0;
-    factorial0 = recurse(int x) {
-      return (x == 1) ? 1 : (x * factorial0(x - 1));
-    };
-    // END TEMP
-
-
-    // Function statement. 'factorial1' is defined in the outer scope.
-    int factorial1(int x) {
-      return (x == 1) ? 1 : (x * factorial1(x - 1));
-    }
-
-    // This would fail to compile if 'recurse' were defined in the outer scope.
-    // Which it shouldn't be.
-    int recurse = 42;
-
-    Expect.equals(6, factorial0(3));
-    Expect.equals(24, factorial0(4));
-  }
-
   void testDefaultParametersOrder() {
     f([a = 1, b = 3]) {
       return a - b;
diff --git a/tests/language/function_type_alias6_test.dart b/tests/language/function_type_alias6_test.dart
index 143d624..15fe9b6 100644
--- a/tests/language/function_type_alias6_test.dart
+++ b/tests/language/function_type_alias6_test.dart
@@ -13,9 +13,9 @@
 }
 
 main() {
-  var f = _(List x) { };
+  var f = (List x) { };
   Expect.isTrue(f is F);
-  var g = _(List<F> x) { };
+  var g = (List<F> x) { };
   Expect.isTrue(g is F);
   var d = new D();
   Expect.isTrue(d.foo is !C);
diff --git a/tests/language/function_type_alias_test.dart b/tests/language/function_type_alias_test.dart
index aca2419..f6188b6 100644
--- a/tests/language/function_type_alias_test.dart
+++ b/tests/language/function_type_alias_test.dart
@@ -68,7 +68,7 @@
     Expect.isTrue(compareStrLenReverse is !CompareInt);
     Expect.isTrue(compareStrLenReverse is CompareString);
 
-    int compareObj(Object a, Object b) { return a === b ? 0 : -1; }
+    int compareObj(Object a, Object b) { return identical(a, b) ? 0 : -1; }
     Expect.isTrue(compareObj is Fun);
     Expect.isTrue(compareObj is IntFun);
     Expect.isTrue(compareObj is !BoolFun);
@@ -77,7 +77,7 @@
     Expect.isTrue(compareObj is !CompareString);
     Expect.equals(-1, test(compareObj, "abcdef", "xyz"));
 
-    CompareInt minus = int _(int a, int b) { return a - b; };
+    CompareInt minus = (int a, int b) { return a - b; };
     Expect.isTrue(minus is Fun);
     Expect.isTrue(compareStrLen is IntFun);
     Expect.isTrue(compareStrLen is !BoolFun);
@@ -96,8 +96,8 @@
 
     Expect.equals(0, bar());
 
-    Function boundsTrue = void _(int arg) { };
-    Function boundsFalse = void _(String arg) { };
+    Function boundsTrue = (int arg) { };
+    Function boundsFalse = (String arg) { };
     Expect.isTrue(boundsTrue is BoundsCheck<num>);
     Expect.isFalse(boundsFalse is BoundsCheck<num>);
   }
diff --git a/tests/language/generic_creation_test.dart b/tests/language/generic_creation_test.dart
index ad71e2c..2a732c3 100644
--- a/tests/language/generic_creation_test.dart
+++ b/tests/language/generic_creation_test.dart
@@ -14,7 +14,7 @@
 class V {}
 class W {}
 
-sameType(a, b) => Expect.identical(a.runtimeType, b.runtimeType);
+sameType(a, b) => Expect.equals(a.runtimeType, b.runtimeType);
 
 main() {
   A a = new A<U, V, W>();
diff --git a/tests/language/generic_syntax_test.dart b/tests/language/generic_syntax_test.dart
index b63e3e6..9c0834e 100644
--- a/tests/language/generic_syntax_test.dart
+++ b/tests/language/generic_syntax_test.dart
@@ -17,7 +17,7 @@
   }
 
   void bar(x) {
-    Expect.equals(null, x());
+    Expect.equals(null, x(null));
   }
 
   test() {
@@ -29,7 +29,7 @@
     var f = 6;
     var g = 7;
     var h = null;
-    bar(A<B, C, D, E, F> g() { return h; });  // 'A<B' starts a generic type.
+    bar((A<B, C, D, E, F> g) { return h; });  // 'A<B' starts a generic type.
     foo(a<b, c, d, e, f> g);  // 'a<b' is a boolean function argument.
   }
 
diff --git a/tests/language/generics_test.dart b/tests/language/generics_test.dart
index 947dd1b..a077b98 100644
--- a/tests/language/generics_test.dart
+++ b/tests/language/generics_test.dart
@@ -20,38 +20,12 @@
     Map<int, int> e;
     GenericsTest<int, GenericsTest<int, int>> f;
 
-    takesVoidMethod(void _(int a) {
-      Expect.equals(2, a);
-    });
-
-    takesGenericMapMethod(Map<int, int> _(int a) {
-      Expect.equals(2, a);
-      return null;
-    });
-
-    takesIntMethod(int _(int a) {
-      Expect.equals(2, a);
-      return 98;
-    });
-
     e = new Map();
     takesMapMethod(e);
     Expect.equals(2, e[0]);
     Map h = new Map<int, int>();
   }
 
-  static void takesVoidMethod(void f(int a)) {
-    f(2);
-  }
-
-  static void takesIntMethod(int f(int a)) {
-    Expect.equals(98, f(2));
-  }
-
-  static void takesGenericMapMethod(Map<int, int> f(int a)) {
-    f(2);
-  }
-
   static void takesMapMethod(Map<int, int> m) {
     m[0] = 2;
   }
diff --git a/tests/language/if_and_test.dart b/tests/language/if_and_test.dart
index 75b5b91..0b0cc84 100644
--- a/tests/language/if_and_test.dart
+++ b/tests/language/if_and_test.dart
@@ -11,7 +11,7 @@
 class A {
   opshr(int n, a2) {
     int res2;
-    bool negative = a2 === 496;
+    bool negative = a2 == 496;
 
     res2 = _shiftRight(a2, n);
     if (negative) {
diff --git a/tests/language/import_core_prefix_test.dart b/tests/language/import_core_prefix_test.dart
index 782fdf1..29c24cc 100644
--- a/tests/language/import_core_prefix_test.dart
+++ b/tests/language/import_core_prefix_test.dart
@@ -6,10 +6,30 @@
 #library("ImportCorePrefixTest.dart");
 #import("dart:core", prefix:"mycore");
 
+class Object {
+}
+
+class Map {
+  Map(this._lat, this._long);
+
+  get isPrimeMeridian => _long == 0;
+
+  var _lat;
+  var _long;
+}
+
+
 void main() {
   var test = new mycore.Map<mycore.int,mycore.String>();
   mycore.bool boolval = false;
   mycore.int variable = 10;
   mycore.num value = 10;
   mycore.dynamic d = null;
+  mycore.print(new mycore.Object());
+  mycore.print(new Object());
+
+  var greenwich = new Map(51, 0);
+  var kpao = new Map(37, -122);
+  mycore.Expect.isTrue(greenwich.isPrimeMeridian);
+  mycore.Expect.isFalse(kpao.isPrimeMeridian);
 }
diff --git a/tests/language/inline_add_constants_to_initial_env.dart b/tests/language/inline_add_constants_to_initial_env.dart
new file mode 100644
index 0000000..7d17507
--- /dev/null
+++ b/tests/language/inline_add_constants_to_initial_env.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 SSA values are correctly numbered after inlining that adds
+// constants to original environment.
+
+h(x, y) => x == y;
+
+g(y, [x0 = 0, x1 = 1, x2 = 2, x3 = 3]) => y + x0 + x1 + x2 + x3;
+
+f(y) => h(y, g(y));
+
+main() {
+  for (var i = 0; i < 1000; i++) f(i);
+}
diff --git a/tests/language/inline_closure_with_constant_arguments.dart b/tests/language/inline_closure_with_constant_arguments.dart
new file mode 100644
index 0000000..0182453
--- /dev/null
+++ b/tests/language/inline_closure_with_constant_arguments.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 inlining of a closure call with constant propagation.
+primeForSmis(bool b) {
+  smi_op(a, b) => a + b;
+  if (b) {
+    return smi_op(1, 2);
+  } else {
+    return smi_op(true, false);
+  }
+}
+
+
+main() {
+  for (var i=0; i<2000; i++) {
+    Expect.equals(3, primeForSmis(true));
+  }
+}
diff --git a/sdk/lib/html/templates/html/interface/interface_Storage.darttemplate b/tests/language/inline_super_part.dart
similarity index 71%
rename from sdk/lib/html/templates/html/interface/interface_Storage.darttemplate
rename to tests/language/inline_super_part.dart
index 5f0da3d..dd583c5 100644
--- a/sdk/lib/html/templates/html/interface/interface_Storage.darttemplate
+++ b/tests/language/inline_super_part.dart
@@ -2,9 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of html;
+part of inline_super_test;
 
-$!COMMENT
-abstract class $ID implements Map<String, String> {
-$!MEMBERS
+class Player extends LivingActor {
+  Player () : super();
 }
diff --git a/tests/language/inline_super_test.dart b/tests/language/inline_super_test.dart
new file mode 100644
index 0000000..9305984
--- /dev/null
+++ b/tests/language/inline_super_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 dart2js issue 6639.
+
+library inline_super_test;
+
+part 'inline_super_part.dart';
+
+// Long comment to ensure source positions in the following code are
+// larger than the part file.  Best way to ensure that is to include
+// the part as a comment:
+//
+// class Player extends LivingActor {
+//   Player (deathCallback) : super(null, deathCallback);
+// }
+
+class Percept {}
+
+class Actor {
+  final percept;
+  Actor(this.percept);
+}
+
+class LivingActor extends Actor {
+  // The bug occurs when inlining the node [:new Percept():] into
+  // [Actor]'s constructor.  When this inlining is being initiated
+  // from [Player], we must take care to ensure that we know that we
+  // are inlining from this location, and not [Player].
+  LivingActor () : super(new Percept());
+}
+
+main() {
+  Expect.isTrue(new Player().percept is Percept);
+}
diff --git a/tests/language/interceptor_test.dart b/tests/language/interceptor_test.dart
new file mode 100644
index 0000000..e79f759
--- /dev/null
+++ b/tests/language/interceptor_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 interceptors (that is, methods in classes implemented as
+// JavaScript primitives) in dart2js work.
+
+class A {
+  charCodeAt(a) => a;
+}
+
+main() {
+  var res = [[], 1, 'foo', new A()];
+  Expect.throws(() => res[0].charCodeAt(1));
+  Expect.throws(() => (res[0].charCodeAt)(1));
+
+  Expect.throws(() => res[1].charCodeAt(1));
+  Expect.throws(() => (res[1].charCodeAt)(1));
+
+  Expect.equals(111, res[2].charCodeAt(1));
+  Expect.equals(111, (res[2].charCodeAt)(1));
+  Expect.throws(() => res[2].charCodeAt(1, 4));
+  Expect.throws(() => res[2].charCodeAt());
+  Expect.throws(() => (res[2].charCodeAt)(1, 4));
+  Expect.throws(() => (res[2].charCodeAt)());
+
+  Expect.equals(1, res[3].charCodeAt(1));
+  Expect.equals(1, (res[3].charCodeAt)(1));
+  Expect.throws(() => res[3].charCodeAt(1, 4));
+  Expect.throws(() => res[3].charCodeAt());
+  Expect.throws(() => (res[3].charCodeAt)(1, 4));
+  Expect.throws(() => (res[3].charCodeAt)());
+}
diff --git a/tests/language/invocation_mirror_test.dart b/tests/language/invocation_mirror_test.dart
index 38e1277..765fe08 100644
--- a/tests/language/invocation_mirror_test.dart
+++ b/tests/language/invocation_mirror_test.dart
@@ -84,15 +84,11 @@
   testInvocationMirror(n.bar(42), 'bar', [42], {});
   testInvocationMirror(n.bar(x: 42), 'bar', [], {"x": 42});
   testInvocationMirror(n.bar(37, x: 42), 'bar', [37], {"x": 42});
-  testInvocationMirror((n.bar)(), 'bar', [], {});
-  testInvocationMirror((n.bar)(42), 'bar', [42]);
-  testInvocationMirror((n.bar)(x: 42), 'bar', [], {"x": 42});
-  testInvocationMirror((n.bar)(37, x: 42), 'bar', [37], {"x": 42});
 
   // Missing operator access.
   testInvocationMirror(n + 4, '+', [4], {});
   testInvocationMirror(n - 4, '-', [4], {});
-  testInvocationMirror(-n, '-', [], {});
+  testInvocationMirror(-n, 'unary-', [], {});
   testInvocationMirror(n[42], '[]', [42], {});
   testInvocationMirror((n..[37] = 42).last, '[]=', [37, 42], {});
 
@@ -152,17 +148,22 @@
   test(Function block) {
     Expect.throws(block, (e) => e is NoSuchMethodError);
   }
-
+  var n = new N();
   var o = new Object();
   test(() => o.bar);
   test(() => o.bar = 42);
   test(() => o.bar());
+  test(() => o + 2);
+  test(() => -o);
+  test(() => o[0]);
+  test(() => o[0] = 42);
+  test(() => o());
   test(() => o.toString = 42);
   test(() => o.toString(42));
   test(() => o.toString(x: 37));
   test(() => o.hashCode = 42);
   test(() => o.hashCode());  // Thrown by int.noSuchMethod.
-  test(() => o());
+  test(n.flif);  // Extracted method has no noSuchMethod.
 }
 
 main() {
diff --git a/tests/language/language.status b/tests/language/language.status
index aa20e9f..ee3775a 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -18,7 +18,7 @@
 [ $compiler == none ]
 part_test: Fail
 part2_test: Fail
-gc_test: Fail # Issue 1487
+gc_test: Pass, Fail # Issue 1487
 pseudo_kw_illegal_test/14: Fail  # Issue 356
 
 # These bugs refer currently ongoing language discussions.
@@ -54,6 +54,7 @@
 no_such_method_test: Fail # issue 3326, 3622.
 
 export_cyclic_test: Fail, Crash # issue 6060
+duplicate_export_negative_test: Fail # issue 6134
 invocation_mirror_indirect_test: Fail # Issue 3326
 
 [ $compiler == none && ($system == macos || $system == linux) && $arch == ia32 && $checked ]
@@ -62,14 +63,8 @@
 [ $compiler == none && $mode == debug ]
 gc_test: Skip  # Takes too long.
 
-
-[ $compiler == none && $checked ]
-redirecting_factory_infinite_steps_test/01: Fail # http://dartbug.com/6596
-
-
 [ $compiler == none && $unchecked ]
 
-
 # Only checked mode reports an error on type assignment
 # problems in compile time constants.
 compile_time_constant_checked_test/02: Fail, OK
@@ -88,11 +83,12 @@
 
 [ $compiler == dartc ]
 redirecting_factory_infinite_steps_test/01: Fail # http://dartbug.com/6560
-redirecting_factory_infinite_steps_test/02: Fail # http://dartbug.com/6560
 implicit_this_test/none: Fail # should not warn about allocating SubAbstract2
 metadata_test: Fail
-bad_override_test/01: Fail
-bad_override_test/02: Fail
+bad_override_test/01: Fail, OK # issue 6578, warning expected on "static" modifier
+bad_override_test/02: Fail, OK # issue 6578, warning expected on "static" modifier
+const_locals_test: Fail
+const_nested_test: Fail
 get_set_syntax_test/none: Fail # does not accept getter/setter with no method body
 application_negative_test: Fail # Runtime only test, rewrite as multitest
 assign_instance_method_negative_test: Fail # Runtime only test, rewrite as multitest
@@ -146,6 +142,7 @@
 getter_no_setter_test/01: Fail # Fails to detect compile-time error.
 getter_no_setter2_test/01: Fail # Fails to detect compile-time error.
 instance_call_wrong_argument_count_negative_test: Fail # Runtime only test, rewrite as multitest
+duplicate_export_negative_test: Fail # Duplicate export not reported.
 # Test expects signature of noSuchMethod to be correct according
 # to specification. Should start working when the library signature
 # changes.
@@ -384,6 +381,7 @@
 *: Skip
 
 [ $compiler == dart2dart ]
+const_factory_redirection_test: Fail # TRIAGE
 redirecting_factory_infinite_steps_test/01: Fail, Pass # TRIAGE: fails in minified mode. http://dartbug.com/6603
 
 many_overridden_no_such_method_test: Fail, Pass # TRIAGE: fails in minified mode
@@ -394,7 +392,6 @@
 
 bad_override_test/01: Fail
 bad_override_test/02: Fail
-
 illegal_invocation_test/01: Fail, OK # Typedef literals are expressions now.
 illegal_invocation_test/04: Fail, OK # Class literals are expressions now.
 illegal_invocation_test/05: Fail, OK # Type variables are expressions now.
@@ -529,8 +526,8 @@
 # Bug in dart2js frontent: does not support this feature.
 switch_label_test: Fail
 # Common with language_dart2js.
-factory_redirection_test/none: Fail # Not implemented.
 factory_redirection_test/0*: Skip # Flaky negative tests, crash, fail, or pass. Not implemented.
+factory_redirection_test/1*: Skip # Flaky negative tests, crash, fail, or pass. Not implemented.
 function_type_alias5_test/00: Fail
 function_type_alias5_test/01: Fail
 function_type_alias5_test/02: Fail
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 3f87fe4..224e0e6 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -56,6 +56,8 @@
 closure_type_test: Fail # does not detect type error in checked mode.
 function_type_test: Fail # does not detect type error in checked mode.
 function_malformed_result_type_test: Fail # does not detect type error in checked mode.
+factory1_test/00: Fail
+factory1_test/01: Fail
 
 type_parameter_test/01: Fail # Issue 4932
 type_parameter_test/02: Fail # Issue 4932
@@ -67,6 +69,13 @@
 [ $compiler == dart2js && $unchecked ]
 assertion_test: Fail
 new_expression_type_args_test/02: Fail # Test does not conform with spec.
+factory_redirection_test/08: Fail
+factory_redirection_test/09: Fail
+factory_redirection_test/10: Fail
+factory_redirection_test/11: Fail
+factory_redirection_test/12: Fail
+factory_redirection_test/13: Fail
+factory_redirection_test/14: Fail
 
 # Only checked mode reports an error on type assignment
 # problems in compile time constants.
@@ -85,18 +94,20 @@
 compile_time_constant_checked3_test/06: Fail, OK
 
 [ $compiler == dart2js ]
-factory_redirection_test/none: fail
-factory_redirection_test/01: fail
-factory_redirection_test/02: fail
-factory_redirection_test/03: fail
-factory_redirection_test/05: fail
-factory_redirection_test/06: fail
+arithmetic_test: Fail # http://dartbug.com/6627
+factory_redirection_test/01: Fail
+factory_redirection_test/02: Crash
+factory_redirection_test/03: Crash
+factory_redirection_test/05: Fail
+factory_redirection_test/07: Fail
 final_variable_assignment_test/01: Fail
 final_variable_assignment_test/02: Fail
 final_variable_assignment_test/03: Fail
 final_variable_assignment_test/04: Fail
 bad_override_test/01: Fail
 bad_override_test/02: Fail
+const_locals_test: Fail
+const_nested_test: Fail
 bad_constructor_test/04: Fail # http://dartbug.com/5519
 bad_constructor_test/05: Fail # http://dartbug.com/5519
 bad_constructor_test/06: Fail # http://dartbug.com/5519
diff --git a/tests/language/list_literal3_test.dart b/tests/language/list_literal3_test.dart
index 497aee4..1d657e3 100644
--- a/tests/language/list_literal3_test.dart
+++ b/tests/language/list_literal3_test.dart
@@ -11,52 +11,34 @@
 
     List<String> joke = const ["knock", "knock"];
     // Elements of canonical lists are canonicalized.
-    Expect.equals(true, joke === canonicalJoke);
-    Expect.equals(true, joke[0] === joke[1]);
-    Expect.equals(true, joke[0] === canonicalJoke[0]);
+    Expect.identical(joke, canonicalJoke);
+    Expect.identical(joke[0], joke[1]);
+    Expect.identical(joke[0], canonicalJoke[0]);
 
     // Lists from literals are immutable.
-    bool caughtException = false;
-    try {
-      joke[0] = "sock";
-    } on UnsupportedError catch (e) {
-      caughtException = true;
-    }
-    Expect.equals(true, caughtException);
-    Expect.equals(true, joke[0] === joke[1]);
+    Expect.throws(() { joke[0] = "sock"; }, (e) => e is UnsupportedError);
+    Expect.identical(joke[0], joke[1]);
 
     // Make sure lists allocated at runtime are mutable and are
     // not canonicalized.
     List<String> lame_joke = ["knock", "knock"];  // Invokes operator new.
-    Expect.equals(true, joke[1] === lame_joke[1]);
+    Expect.identical(joke[1], lame_joke[1]);
     // Operator new creates a mutable list.
-    Expect.equals(false, joke === lame_joke);
+    Expect.equals(false, identical(joke, lame_joke));
     lame_joke[1] = "who";
-    Expect.equals(true, "who" === lame_joke[1]);
+    Expect.identical("who", lame_joke[1]);
 
     // Elements of canonical lists are canonicalized.
     List<List<int>> a = const <List<int>>[ const [1, 2], const [1, 2]];
-    Expect.equals(true, a[0] === a[1]);
-    Expect.equals(true, a[0][0] === a[1][0]);
-    try {
-      caughtException = false;
-      a[0][0] = 42;
-    } on UnsupportedError catch (e) {
-      caughtException = true;
-    }
-    Expect.equals(true, caughtException);
+    Expect.identical(a[0], a[1]);
+    Expect.identical(a[0][0], a[1][0]);
+    Expect.throws(() { a[0][0] = 42; }, (e) => e is UnsupportedError);
 
     List<List<double>> b = const [ const [1.0, 2.0], const [1.0, 2.0]];
-    Expect.equals(true, b[0] === b[1]);
-    Expect.equals(true, b[0][0] === 1.0);
-    Expect.equals(true, b[0][0] === b[1][0]);
-    try {
-      caughtException = false;
-      b[0][0] = 42.0;
-    } on UnsupportedError catch (e) {
-      caughtException = true;
-    }
-    Expect.equals(true, caughtException);
+    Expect.identical(b[0], b[1]);
+    Expect.equals(true, b[0][0] == 1.0);
+    Expect.identical(b[0][0], b[1][0]);
+    Expect.throws(() { b[0][0] = 42.0; }, (e) => e is UnsupportedError);
   }
 }
 
diff --git a/tests/language/list_test.dart b/tests/language/list_test.dart
index 899c178..8ab8870 100644
--- a/tests/language/list_test.dart
+++ b/tests/language/list_test.dart
@@ -45,7 +45,7 @@
     List a = new List(len);
     Expect.equals(true, a is List);
     Expect.equals(len, a.length);
-    a.forEach(f(element) { Expect.equals(null, element); });
+    a.forEach((element) { Expect.equals(null, element); });
     a[1] = 1;
     Expect.equals(1, a[1]);
     Expect.throws(() => a[len], (e) => e is RangeError);
diff --git a/tests/language/local_function2_test.dart b/tests/language/local_function2_test.dart
index 8f584a8..5aaf7f5 100644
--- a/tests/language/local_function2_test.dart
+++ b/tests/language/local_function2_test.dart
@@ -9,7 +9,7 @@
   Parameterized() { }
   T mul3(F f, T t) { return 3*f(t); }
   T test(T t) {
-    return mul3(T _(T t) { return 3*t; }, t);
+    return mul3((T t) { return 3*t; }, t);
   }
 }
 
diff --git a/tests/language/local_function_test.dart b/tests/language/local_function_test.dart
index 6c6ab88..104319f 100644
--- a/tests/language/local_function_test.dart
+++ b/tests/language/local_function_test.dart
@@ -93,14 +93,6 @@
   static void hep(Function f) {
     f();
   }
-  static testSelfReference3(int n) {
-    int i = 0;
-    var yup;  // Not in same scope as yup below.
-    hep(yup() {
-      if (++i < n) hep(yup);
-    });
-    return i;
-  }
   static testNesting(int n) {
     var a = new List(n*n);
     f0() {
@@ -188,13 +180,9 @@
     Expect.equals(320, new LocalFunctionTest().method(10));
     Expect.equals(145, new LocalFunctionTest().testExecute(10));
     Expect.equals(5, testSelfReference1(5));
-    Expect.equals(5, testSelfReference3(5));
     Expect.equals(24*25/2, testNesting(5));
     Expect.equals(true, testClosureCallStatement(7));
-    Expect.equals(99, doThis(10, int _(n) => n * n - 1));
-    Expect.equals(99, doThis(10, int f(n) => n * n - 1));
     Expect.equals(99, doThis(10, (n) => n * n - 1));
-    Expect.equals(99, doThis(10, f(n) => n * n - 1));
     testExceptions();
   }
 }
diff --git a/tests/language/metadata_syntax_test.dart b/tests/language/metadata_syntax_test.dart
new file mode 100644
index 0000000..ed8d22f
--- /dev/null
+++ b/tests/language/metadata_syntax_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 is is an error to use type arguments in metadata without
+// parens.
+
+@Bar()
+@List<String> /// 01: compile-time error
+class Bar {
+  @Bar()
+  @List<String> /// 02: compile-time error
+  const Bar();
+
+  @Bar()
+  @List<String> /// 03: compile-time error
+  final x = '';
+}
+
+main() {
+  Expect.equals('', new Bar().x);
+  Expect.equals('', const Bar().x);
+}
diff --git a/tests/language/operator_negate_and_method_negate_test.dart b/tests/language/operator_negate_and_method_negate_test.dart
new file mode 100644
index 0000000..83a19e4
--- /dev/null
+++ b/tests/language/operator_negate_and_method_negate_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 checks that it is possible to have a method named negate as
+// well as unary- operator.
+
+class Foo {
+  operator-() => 42;
+  negate() => 87;
+}
+
+main() {
+  Expect.equals(42, -new Foo());
+  Expect.equals(87, new Foo().negate());
+}
diff --git a/tests/language/ordered_maps_test.dart b/tests/language/ordered_maps_test.dart
index 7ea8102..ef0e8d9 100644
--- a/tests/language/ordered_maps_test.dart
+++ b/tests/language/ordered_maps_test.dart
@@ -11,7 +11,7 @@
   }
 
   static void testMaps(map1, map2, bool isConst) {
-    Expect.equals(true, map1 !== map2);
+    Expect.isFalse(identical(map1, map2));
 
     var keys = map1.keys;
     Expect.equals(2, keys.length);
diff --git a/tests/language/param2_test.dart b/tests/language/param2_test.dart
index bedb313..fce72ba 100644
--- a/tests/language/param2_test.dart
+++ b/tests/language/param2_test.dart
@@ -50,7 +50,7 @@
 
     v = [4, 5, 7];
     Expect.equals(true, exists(v, (e) => e % 2 == 1));
-    Expect.equals(false, exists(v, f(e) => e == 6));
+    Expect.equals(false, exists(v, (e) => e == 6));
 
     var isZero = (e) => e == 0;
     Expect.equals(false, exists(v, isZero));
diff --git a/tests/language/reg_exp2_test.dart b/tests/language/reg_exp2_test.dart
index 95d377e..489d917 100644
--- a/tests/language/reg_exp2_test.dart
+++ b/tests/language/reg_exp2_test.dart
@@ -23,7 +23,7 @@
 ''';
    String extensions = 'jpg|jpeg|png';
    String tag = findImageTag_(text, extensions);
-   Expect.equals(true, tag !== null);
+   Expect.isNotNull(tag);
  }
 }
 
diff --git a/tests/language/reg_exp_test.dart b/tests/language/reg_exp_test.dart
index 72b4ab0..aa3fe39 100644
--- a/tests/language/reg_exp_test.dart
+++ b/tests/language/reg_exp_test.dart
@@ -5,7 +5,7 @@
 
 class RegExpTest {
   static test1() {
-    RegExp exp = const RegExp("(\\w+)");
+    RegExp exp = new RegExp("(\\w+)");
     String str = "Parse my string";
     List<Match> matches = new List<Match>.from(exp.allMatches(str));
     Expect.equals(3, matches.length);
diff --git a/tests/language/rethrow_test.dart b/tests/language/rethrow_test.dart
index 021a0fc..60c055c 100644
--- a/tests/language/rethrow_test.dart
+++ b/tests/language/rethrow_test.dart
@@ -26,7 +26,7 @@
           throwException();
           Expect.fail("Should have thrown an exception");
         } catch (e) {
-          Expect.equals(true, e === currentException);
+          Expect.equals(true, identical(e, currentException));
           throw;
           Expect.fail("Should have thrown an exception");
         }
@@ -34,7 +34,7 @@
         Expect.fail("Should not have caught OtherException");
       }
     } catch (e) {
-      Expect.equals(true, e === currentException);
+      Expect.equals(true, identical(e, currentException));
     }
   }
 
@@ -44,12 +44,12 @@
         throwException();
         Expect.fail("Should have thrown an exception");
       } catch (e) {
-        Expect.equals(true, e === currentException);
+        Expect.equals(true, identical(e, currentException));
         throw;
         Expect.fail("Should have thrown an exception");
       }
     } catch (e) {
-      Expect.equals(true, e === currentException);
+      Expect.equals(true, identical(e, currentException));
     }
   }
 }
diff --git a/sdk/lib/coreimpl/coreimpl.dart b/tests/language/runtime_type_test.dart
similarity index 68%
copy from sdk/lib/coreimpl/coreimpl.dart
copy to tests/language/runtime_type_test.dart
index 067ea2f..1a3f1c8 100644
--- a/sdk/lib/coreimpl/coreimpl.dart
+++ b/tests/language/runtime_type_test.dart
@@ -2,8 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("dart:coreimpl");
+class A {
+  get className => runtimeType;
+}
 
-#import("dart:collection");
-
-#source("regexp.dart");
+main() {
+  Expect.isTrue(new A().className is Type);
+}
diff --git a/tests/language/scope_variable_test.dart b/tests/language/scope_variable_test.dart
index 7dc2288..86716d0 100644
--- a/tests/language/scope_variable_test.dart
+++ b/tests/language/scope_variable_test.dart
@@ -12,8 +12,8 @@
     {
       var c;
       int d;
-      Expect.equals(true, c === null);
-      Expect.equals(true, d === null);
+      Expect.equals(true, c == null);
+      Expect.equals(true, d == null);
     }
   }
 
@@ -21,7 +21,7 @@
     var a = "Test";
     {
       var a;
-      Expect.equals(true, a === null);
+      Expect.equals(true, a == null);
       a = "a";
       Expect.equals(true, a == "a");
     }
diff --git a/tests/language/setter_no_getter_call_test.dart b/tests/language/setter_no_getter_call_test.dart
index 3427515..c7b467b 100644
--- a/tests/language/setter_no_getter_call_test.dart
+++ b/tests/language/setter_no_getter_call_test.dart
@@ -11,7 +11,7 @@
 
 initialize() {
   print("initializing");
-  topLevelClosure = tlc(x) => x * 2;
+  topLevelClosure = (x) => x * 2;
 }
 
 main() {
diff --git a/tests/language/static_const_field_test.dart b/tests/language/static_const_field_test.dart
index a9ddf73..510f08c 100644
--- a/tests/language/static_const_field_test.dart
+++ b/tests/language/static_const_field_test.dart
@@ -36,12 +36,12 @@
     Expect.equals(15, A.c);
     Expect.equals(8, A.b);
     Expect.equals(5, A.a.n);
-    Expect.equals(true,  8 === A.b);
-    Expect.equals(true,  A.a === A.d);
-    Expect.equals(true,  A.s1 === A.s2);
-    Expect.equals(false, A.s1 === A.s3);
-    Expect.equals(false, A.s1 === A.b);
-    Expect.equals(true,  A.d1 === A.d2);
+    Expect.equals(true, identical(8, A.b));
+    Expect.equals(true, identical(A.a, A.d));
+    Expect.equals(true, identical(A.s1, A.s2));
+    Expect.equals(false, identical(A.s1, A.s3));
+    Expect.equals(false, identical(A.s1, A.b));
+    Expect.equals(true, identical(A.d1, A.d2));
     Expect.equals(true, Spain.SD == "Salvador Dali");
     Expect.equals(true, A.artist2 == "Alberto Giacometti");
     Expect.equals(true, A.architect1 == "Antoni Gaudi");
diff --git a/tests/language/strict_equal_test.dart b/tests/language/strict_equal_test.dart
index 1af0291..1cd00a9 100644
--- a/tests/language/strict_equal_test.dart
+++ b/tests/language/strict_equal_test.dart
@@ -43,26 +43,26 @@
 
 
 test1(a) {
-  return a === 3;
+  return identical(a, 3);
 }
 
 test2(a) {
-  return a !== 3;
+  return !identical(a, 3);
 }
 
 
 test2r(a) {
-  return 3 !== a;
+  return !identical(3, a);
 }
 
 
 test3() {
-  return get5() === 5;
+  return identical(get5(), 5);
 }
 
 
 test4(a) {
-  if (a === 3) {
+  if (identical(a, 3)) {
     return 1;
   } else {
     return 2;
@@ -71,7 +71,7 @@
 
 
 test5(a) {
-  if (a !== 3) {
+  if (!identical(a, 3)) {
     return 1;
   } else {
     return 2;
@@ -80,7 +80,7 @@
 
 
 test6() {
-  if (get5() === 5) {
+  if (identical(get5(), 5)) {
     return 1;
   } else {
     return 2;
@@ -92,12 +92,12 @@
 }
 
 test7() {
-  return null !== null;
+  return null != null;
 }
 
 
 test8() {
-  if (null !== null) {
+  if (null != null) {
     return 1;
   } else {
     return 2;
@@ -106,31 +106,31 @@
 
 
 test9(a) {
-  return a === 0;
+  return identical(a, 0);
 }
 
 
 test9r(a) {
-  return 0 === a;
+  return identical(0, a);
 }
 
 
 test10(a) {
-  return a !== 0;
+  return !identical(a, 0);
 }
 
 test10r(a) {
-  return 0 !== a;
+  return !identical(0, a);
 }
 
 test11(a) {
-  if (a === 0) {
-    Expect.isTrue(0 === a);
-    Expect.isFalse(a !== 0);
-    Expect.isFalse(0 !== a);
+  if (identical(a, 0)) {
+    Expect.isTrue(identical(0, a));
+    Expect.isFalse(!identical(a, 0));
+    Expect.isFalse(!identical(0, a));
   } else {
-    Expect.isFalse(0 === a);
-    Expect.isTrue(a !== 0);
-    Expect.isTrue(0 !== a);
+    Expect.isFalse(identical(0, a));
+    Expect.isTrue(!identical(a, 0));
+    Expect.isTrue(!identical(0, a));
   }
 }
diff --git a/tests/lib/crypto/base64_test.dart b/tests/lib/crypto/base64_test.dart
index 59afc40..fdf24b9 100644
--- a/tests/lib/crypto/base64_test.dart
+++ b/tests/lib/crypto/base64_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-#library('base64_test');
+library base64_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
 // Data from http://tools.ietf.org/html/rfc4648.
 var inputs =
diff --git a/tests/lib/crypto/hmac_md5_test.dart b/tests/lib/crypto/hmac_md5_test.dart
index e8101c6..24753bf 100644
--- a/tests/lib/crypto/hmac_md5_test.dart
+++ b/tests/lib/crypto/hmac_md5_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-#library('hmac_md5_test');
+library hmac_md5_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
 // Data from http://tools.ietf.org/html/rfc2202.
 var hmac_md5_inputs =
diff --git a/tests/lib/crypto/hmac_sha1_test.dart b/tests/lib/crypto/hmac_sha1_test.dart
index 2782d48..1aec85d 100644
--- a/tests/lib/crypto/hmac_sha1_test.dart
+++ b/tests/lib/crypto/hmac_sha1_test.dart
@@ -3,11 +3,11 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-#library('hmac_sha1_test');
+library hmac_sha1_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
-#source('hmac_sha1_test_vectors.dart');
+part 'hmac_sha1_test_vectors.dart';
 
 void testStandardVectors(inputs, keys, macs) {
   for (var i = 0; i < inputs.length; i++) {
diff --git a/tests/lib/crypto/hmac_sha256_test.dart b/tests/lib/crypto/hmac_sha256_test.dart
index a6b2768..8b2deb5 100644
--- a/tests/lib/crypto/hmac_sha256_test.dart
+++ b/tests/lib/crypto/hmac_sha256_test.dart
@@ -3,11 +3,11 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow the test to run on Dartium.
-#library('hmac_sha256_test');
+library hmac_sha256_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
-#source('hmac_sha256_test_vectors.dart');
+part 'hmac_sha256_test_vectors.dart';
 
 void testStandardVectors(inputs, keys, macs) {
   for (var i = 0; i < inputs.length; i++) {
diff --git a/tests/lib/crypto/sha1_long_test_vectors.dart b/tests/lib/crypto/sha1_long_test_vectors.dart
index 424e626..cc0d9e6 100644
--- a/tests/lib/crypto/sha1_long_test_vectors.dart
+++ b/tests/lib/crypto/sha1_long_test_vectors.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of sha1_test;
+
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
diff --git a/tests/lib/crypto/sha1_short_test_vectors.dart b/tests/lib/crypto/sha1_short_test_vectors.dart
index c3697d6..f17e147 100644
--- a/tests/lib/crypto/sha1_short_test_vectors.dart
+++ b/tests/lib/crypto/sha1_short_test_vectors.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of sha1_test;
+
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
diff --git a/tests/lib/crypto/sha1_test.dart b/tests/lib/crypto/sha1_test.dart
index 1985d17..ba3ed4d 100644
--- a/tests/lib/crypto/sha1_test.dart
+++ b/tests/lib/crypto/sha1_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow dartium to run the test.
-#library('sha1_test');
+library sha1_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
-#source('sha1_long_test_vectors.dart');
-#source('sha1_short_test_vectors.dart');
+part 'sha1_long_test_vectors.dart';
+part 'sha1_short_test_vectors.dart';
 
 List<int> createTestArr(int len) {
   var arr = new List<int>(len);
diff --git a/tests/lib/crypto/sha256_long_test_vectors.dart b/tests/lib/crypto/sha256_long_test_vectors.dart
index e67c7a5..40934a7 100644
--- a/tests/lib/crypto/sha256_long_test_vectors.dart
+++ b/tests/lib/crypto/sha256_long_test_vectors.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of sha256_test;
+
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
diff --git a/tests/lib/crypto/sha256_short_test_vectors.dart b/tests/lib/crypto/sha256_short_test_vectors.dart
index 3ad67174..3b48a63 100644
--- a/tests/lib/crypto/sha256_short_test_vectors.dart
+++ b/tests/lib/crypto/sha256_short_test_vectors.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+part of sha256_test;
+
 // Standard test vectors from:
 //   http://csrc.nist.gov/groups/STM/cavp/documents/shs/shabytetestvectors.zip
 
diff --git a/tests/lib/crypto/sha256_test.dart b/tests/lib/crypto/sha256_test.dart
index db4ebe2..44c92b1 100644
--- a/tests/lib/crypto/sha256_test.dart
+++ b/tests/lib/crypto/sha256_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Library tag to allow Dartium to run the tests.
-#library('sha256_test');
+library sha256_test;
 
-#import("dart:crypto");
+import 'dart:crypto';
 
-#source('sha256_long_test_vectors.dart');
-#source('sha256_short_test_vectors.dart');
+part 'sha256_long_test_vectors.dart';
+part 'sha256_short_test_vectors.dart';
 
 List<int> createTestArr(int len) {
   var arr = new List<int>(len);
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index a2732a1..faa8e36 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -18,9 +18,4 @@
 # lib issue 6322
 crypto/hmac_sha1_test: Fail, OK
 crypto/hmac_sha256_test: Fail, OK
-crypto/sha1_test: Fail, OK
-crypto/sha256_test: Fail, OK
 
-# test issue 6512
-crypto/base64_test: Fail, OK
-crypto/hmac_md5_test: Fail, OK
diff --git a/tests/lib/math/coin_test.dart b/tests/lib/math/coin_test.dart
index 3c976ff..181024d 100644
--- a/tests/lib/math/coin_test.dart
+++ b/tests/lib/math/coin_test.dart
@@ -5,9 +5,9 @@
 // Test that a coin toss with Random.nextBool() is fair.
 
 // Library tag to allow Dartium to run the test.
-#library("coin_test");
+library coin_test;
 
-#import("dart:math");
+import 'dart:math';
 
 main() {
   var seed = new Random().nextInt((1<<32) - 1);
diff --git a/tests/lib/math/low_test.dart b/tests/lib/math/low_test.dart
index 40beeb6..cae369f 100644
--- a/tests/lib/math/low_test.dart
+++ b/tests/lib/math/low_test.dart
@@ -6,9 +6,9 @@
 // a power of 2.
 
 // Library tag to allow Dartium to run the test.
-#library("low_test.dart");
+library low_test;
 
-#import("dart:math");
+import 'dart:math';
 
 void main() {
   var n = (2 * (1<<32)) ~/ 3;
diff --git a/tests/lib/math/math2_test.dart b/tests/lib/math/math2_test.dart
index cf71142..a2cc3a1 100644
--- a/tests/lib/math/math2_test.dart
+++ b/tests/lib/math/math2_test.dart
@@ -5,8 +5,8 @@
 // We temporarily test both the new math library and the old Math
 // class. This can easily be simplified once we get rid of the Math
 // class entirely.
-#library('math_test');
-#import('dart:math', prefix: 'math');
+library math_test;
+import 'dart:math' as math;
 
 class MathLibraryTest {
   static void testConstants() {
diff --git a/tests/lib/math/math_parse_double_test.dart b/tests/lib/math/math_parse_double_test.dart
index c44c301..fe2393c 100644
--- a/tests/lib/math/math_parse_double_test.dart
+++ b/tests/lib/math/math_parse_double_test.dart
@@ -5,9 +5,9 @@
 // We temporarily test both the new math library and the old Math
 // class. This can easily be simplified once we get rid of the Math
 // class entirely.
-#library('math_parse_double_test');
+library math_parse_double_test;
 
-#import('dart:math');
+import 'dart:math';
 
 void parseDoubleThrowsFormatException(str) {
   Expect.throws(() => parseDouble(str), (e) => e is FormatException);
diff --git a/tests/lib/math/math_test.dart b/tests/lib/math/math_test.dart
index d56fbaf..9804138 100644
--- a/tests/lib/math/math_test.dart
+++ b/tests/lib/math/math_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("math_test.dart");
-#import("dart:math");
+library math_test;
+import 'dart:math';
 
 class MathTest {
   static void testConstants() {
diff --git a/tests/lib/math/min_max_test.dart b/tests/lib/math/min_max_test.dart
index 06c78dc..42c9730 100644
--- a/tests/lib/math/min_max_test.dart
+++ b/tests/lib/math/min_max_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 // Dart test for testing Math.min and Math.max.
 
-#library('min_max_test');
-#import('dart:math');
+library min_max_test;
+import 'dart:math';
 
 testMin() {
   Expect.equals(0, min(0, 2));
diff --git a/tests/lib/math/pi_test.dart b/tests/lib/math/pi_test.dart
index 0c2cfd8..9b1147b 100644
--- a/tests/lib/math/pi_test.dart
+++ b/tests/lib/math/pi_test.dart
@@ -6,9 +6,9 @@
 // simulation.
 
 // Library tag to allow Dartium to run the test.
-#library("pi_test.dart");
+library pi_test;
 
-#import("dart:math");
+import 'dart:math';
 
 void main() {
   var seed = new Random().nextInt((1<<32) - 1);
diff --git a/tests/standalone/black_listed_test.dart b/tests/standalone/black_listed_test.dart
index 15d3255..224b1fb 100644
--- a/tests/standalone/black_listed_test.dart
+++ b/tests/standalone/black_listed_test.dart
@@ -7,7 +7,6 @@
 // implemented or extended (VM corelib only).
 
 #library("BlackListedTest.dart");
-#import("dart:coreimpl");
 
 class MyBool extends Bool {}  /// 01: compile-time error
 
diff --git a/tests/standalone/float_array_test.dart b/tests/standalone/float_array_test.dart
index bcd52ac..6ac8a03 100644
--- a/tests/standalone/float_array_test.dart
+++ b/tests/standalone/float_array_test.dart
@@ -1,215 +1,215 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file

-// for 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 native float arrays.

-

-// Library tag to be able to run in html test framework.

-#library("FloatArrayTest.dart");

-

-#import('dart:scalarlist');

-

-void testCreateFloat32Array() {

-  Float32List floatArray;

-

-  floatArray = new Float32List(0);

-  Expect.equals(0, floatArray.length);

-

-  floatArray = new Float32List(10);

-  Expect.equals(10, floatArray.length);

-  for (int i = 0; i < 10; i++) {

-    Expect.equals(0.0, floatArray[i]);

-  }

-}

-

-void testSetRange32() {

-  Float32List floatArray = new Float32List(3);

-

-  List<num> list = [10.0, 11.0, 12.0];

-  floatArray.setRange(0, 3, list);

-  for (int i = 0; i < 3; i++) {

-    Expect.equals(10 + i, floatArray[i]);

-  }

-

-  floatArray[0] = 20.0;

-  floatArray[1] = 21.0;

-  floatArray[2] = 22.0;

-  list.setRange(0, 3, floatArray);

-  for (int i = 0; i < 3; i++) {

-    Expect.equals(20 + i, list[i]);

-  }

-

-  // 4.0e40 is larger than the largest representable float.

-  floatArray.setRange(1, 2, const [8.0, 4.0e40]);

-  Expect.equals(20, floatArray[0]);

-  Expect.equals(8, floatArray[1]);

-  Expect.equals(double.INFINITY, floatArray[2]);

-}

-

-void testIndexOutOfRange32() {

-  Float32List floatArray = new Float32List(3);

-  List<num> list = const [0.0, 1.0, 2.0, 3.0];

-

-  Expect.throws(() {

-    floatArray[5] = 2.0;

-  });

-  Expect.throws(() {

-    floatArray.setRange(0, 4, list);

-  });

-

-  Expect.throws(() {

-    floatArray.setRange(3, 1, list);

-  });

-}

-

-void testIndexOf32() {

-  var list = new Float32List(10);

-  for (int i = 0; i < list.length; i++) {

-    list[i] = i + 10.0;

-  }

-  Expect.equals(0, list.indexOf(10));

-  Expect.equals(5, list.indexOf(15));

-  Expect.equals(9, list.indexOf(19));

-  Expect.equals(-1, list.indexOf(20));

-

-  list = new Float32List(10);

-  for (int i = 0; i < list.length; i++) {

-    list[i] = i + 10.0;

-  }

-  Expect.equals(0, list.indexOf(10.0));

-  Expect.equals(5, list.indexOf(15.0));

-  Expect.equals(9, list.indexOf(19.0));

-  Expect.equals(-1, list.indexOf(20.0));

-}

-

-void testBadValues32() {

-  var list = new Float32List(10);

-  list[0] = 2.0;

-  Expect.throws(() {

-    list[0] = 2;

-  });

-  Expect.throws(() {

-    list[0] = "hello";

-  });

-}

-

-void testCreateFloat64Array() {

-  Float64List floatArray;

-

-  floatArray = new Float64List(0);

-  Expect.equals(0, floatArray.length);

-

-  floatArray = new Float64List(10);

-  Expect.equals(10, floatArray.length);

-  for (int i = 0; i < 10; i++) {

-    Expect.equals(0.0, floatArray[i]);

-  }

-}

-

-void testSetRange64() {

-  Float64List floatArray = new Float64List(3);

-

-  List<num> list = [10.0, 11.0, 12.0];

-  floatArray.setRange(0, 3, list);

-  for (int i = 0; i < 3; i++) {

-    Expect.equals(10 + i, floatArray[i]);

-  }

-

-  floatArray[0] = 20.0;

-  floatArray[1] = 21.0;

-  floatArray[2] = 22.0;

-  list.setRange(0, 3, floatArray);

-  for (int i = 0; i < 3; i++) {

-    Expect.equals(20 + i, list[i]);

-  }

-

-  // Unlike Float32Array we can properly represent 4.0e40

-  floatArray.setRange(1, 2, const [8.0, 4.0e40]);

-  Expect.equals(20, floatArray[0]);

-  Expect.equals(8, floatArray[1]);

-  Expect.equals(4.0e40, floatArray[2]);

-}

-

-void testIndexOutOfRange64() {

-  Float64List floatArray = new Float64List(3);

-  List<num> list = const [0.0, 1.0, 2.0, 3.0];

-

-  Expect.throws(() {

-    floatArray[5] = 2.0;

-  });

-  Expect.throws(() {

-    floatArray.setRange(0, 4, list);

-  });

-

-  Expect.throws(() {

-    floatArray.setRange(3, 1, list);

-  });

-}

-

-void testIndexOf64() {

-  var list = new Float64List(10);

-  for (int i = 0; i < list.length; i++) {

-    list[i] = i + 10.0;

-  }

-  Expect.equals(0, list.indexOf(10));

-  Expect.equals(5, list.indexOf(15));

-  Expect.equals(9, list.indexOf(19));

-  Expect.equals(-1, list.indexOf(20));

-

-  list = new Float64List(10);

-  for (int i = 0; i < list.length; i++) {

-    list[i] = i + 10.0;

-  }

-  Expect.equals(0, list.indexOf(10.0));

-  Expect.equals(5, list.indexOf(15.0));

-  Expect.equals(9, list.indexOf(19.0));

-  Expect.equals(-1, list.indexOf(20.0));

-}

-

-void testBadValues64() {

-  var list = new Float64List(10);

-  list[0] = 2.0;

-  Expect.throws(() {

-    list[0] = 2;

-  });

-  Expect.throws(() {

-    list[0] = "hello";

-  });

-}

-

-storeIt32(Float32List a, int index, value) {

-  a[index] = value;

-}

-

-storeIt64(Float64List a, int index, value) {

-  a[index] = value;

-}

-

-main() {

-  var a32 = new Float32List(5);

-  for (int i = 0; i < 2000; i++) {

-    testCreateFloat32Array();

-    testSetRange32();

-    testIndexOutOfRange32();

-    testIndexOf32();

-    storeIt32(a32, 1, 2.0);

-  }

-  var a64 = new Float64List(5);

-  for (int i = 0; i < 2000; i++) {

-    testCreateFloat64Array();

-    testSetRange64();

-    testIndexOutOfRange64();

-    testIndexOf64();

-    storeIt64(a64, 1, 2.0);

-  }

-  // These two take a long time in checked mode.

-  testBadValues32();

-  testBadValues64();

-  // Check optimized (inlined) version of []=

-  Expect.throws(() {

-    storeIt32(a32, 1, 2);

-  });

-  Expect.throws(() {

-    storeIt64(a64, 1, 2);

-  });

-}

+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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 native float arrays.
+
+// Library tag to be able to run in html test framework.
+#library("FloatArrayTest.dart");
+
+#import('dart:scalarlist');
+
+void testCreateFloat32Array() {
+  Float32List floatArray;
+
+  floatArray = new Float32List(0);
+  Expect.equals(0, floatArray.length);
+
+  floatArray = new Float32List(10);
+  Expect.equals(10, floatArray.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0.0, floatArray[i]);
+  }
+}
+
+void testSetRange32() {
+  Float32List floatArray = new Float32List(3);
+
+  List<num> list = [10.0, 11.0, 12.0];
+  floatArray.setRange(0, 3, list);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(10 + i, floatArray[i]);
+  }
+
+  floatArray[0] = 20.0;
+  floatArray[1] = 21.0;
+  floatArray[2] = 22.0;
+  list.setRange(0, 3, floatArray);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(20 + i, list[i]);
+  }
+
+  // 4.0e40 is larger than the largest representable float.
+  floatArray.setRange(1, 2, const [8.0, 4.0e40]);
+  Expect.equals(20, floatArray[0]);
+  Expect.equals(8, floatArray[1]);
+  Expect.equals(double.INFINITY, floatArray[2]);
+}
+
+void testIndexOutOfRange32() {
+  Float32List floatArray = new Float32List(3);
+  List<num> list = const [0.0, 1.0, 2.0, 3.0];
+
+  Expect.throws(() {
+    floatArray[5] = 2.0;
+  });
+  Expect.throws(() {
+    floatArray.setRange(0, 4, list);
+  });
+
+  Expect.throws(() {
+    floatArray.setRange(3, 1, list);
+  });
+}
+
+void testIndexOf32() {
+  var list = new Float32List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10));
+  Expect.equals(5, list.indexOf(15));
+  Expect.equals(9, list.indexOf(19));
+  Expect.equals(-1, list.indexOf(20));
+
+  list = new Float32List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10.0));
+  Expect.equals(5, list.indexOf(15.0));
+  Expect.equals(9, list.indexOf(19.0));
+  Expect.equals(-1, list.indexOf(20.0));
+}
+
+void testBadValues32() {
+  var list = new Float32List(10);
+  list[0] = 2.0;
+  Expect.throws(() {
+    list[0] = 2;
+  });
+  Expect.throws(() {
+    list[0] = "hello";
+  });
+}
+
+void testCreateFloat64Array() {
+  Float64List floatArray;
+
+  floatArray = new Float64List(0);
+  Expect.equals(0, floatArray.length);
+
+  floatArray = new Float64List(10);
+  Expect.equals(10, floatArray.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0.0, floatArray[i]);
+  }
+}
+
+void testSetRange64() {
+  Float64List floatArray = new Float64List(3);
+
+  List<num> list = [10.0, 11.0, 12.0];
+  floatArray.setRange(0, 3, list);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(10 + i, floatArray[i]);
+  }
+
+  floatArray[0] = 20.0;
+  floatArray[1] = 21.0;
+  floatArray[2] = 22.0;
+  list.setRange(0, 3, floatArray);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(20 + i, list[i]);
+  }
+
+  // Unlike Float32Array we can properly represent 4.0e40
+  floatArray.setRange(1, 2, const [8.0, 4.0e40]);
+  Expect.equals(20, floatArray[0]);
+  Expect.equals(8, floatArray[1]);
+  Expect.equals(4.0e40, floatArray[2]);
+}
+
+void testIndexOutOfRange64() {
+  Float64List floatArray = new Float64List(3);
+  List<num> list = const [0.0, 1.0, 2.0, 3.0];
+
+  Expect.throws(() {
+    floatArray[5] = 2.0;
+  });
+  Expect.throws(() {
+    floatArray.setRange(0, 4, list);
+  });
+
+  Expect.throws(() {
+    floatArray.setRange(3, 1, list);
+  });
+}
+
+void testIndexOf64() {
+  var list = new Float64List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10));
+  Expect.equals(5, list.indexOf(15));
+  Expect.equals(9, list.indexOf(19));
+  Expect.equals(-1, list.indexOf(20));
+
+  list = new Float64List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10.0));
+  Expect.equals(5, list.indexOf(15.0));
+  Expect.equals(9, list.indexOf(19.0));
+  Expect.equals(-1, list.indexOf(20.0));
+}
+
+void testBadValues64() {
+  var list = new Float64List(10);
+  list[0] = 2.0;
+  Expect.throws(() {
+    list[0] = 2;
+  });
+  Expect.throws(() {
+    list[0] = "hello";
+  });
+}
+
+storeIt32(Float32List a, int index, value) {
+  a[index] = value;
+}
+
+storeIt64(Float64List a, int index, value) {
+  a[index] = value;
+}
+
+main() {
+  var a32 = new Float32List(5);
+  for (int i = 0; i < 2000; i++) {
+    testCreateFloat32Array();
+    testSetRange32();
+    testIndexOutOfRange32();
+    testIndexOf32();
+    storeIt32(a32, 1, 2.0);
+  }
+  var a64 = new Float64List(5);
+  for (int i = 0; i < 2000; i++) {
+    testCreateFloat64Array();
+    testSetRange64();
+    testIndexOutOfRange64();
+    testIndexOf64();
+    storeIt64(a64, 1, 2.0);
+  }
+  // These two take a long time in checked mode.
+  testBadValues32();
+  testBadValues64();
+  // Check optimized (inlined) version of []=
+  Expect.throws(() {
+    storeIt32(a32, 1, 2);
+  });
+  Expect.throws(() {
+    storeIt64(a64, 1, 2);
+  });
+}
diff --git a/tests/standalone/io/directory_non_ascii_sync_test.dart b/tests/standalone/io/directory_non_ascii_sync_test.dart
new file mode 100644
index 0000000..bbcf4c7
--- /dev/null
+++ b/tests/standalone/io/directory_non_ascii_sync_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+main() {
+  Directory scriptDir = new File(new Options().script).directorySync();
+  var d = new Directory("${scriptDir.path}/æøå");
+  // On MacOS you get the decomposed utf8 form of file and directory
+  // names from the system. Therefore, we have to check for both here.
+  var precomposed = 'æøå';
+  var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
+  Expect.isTrue(d.existsSync());
+  d.createSync();
+  var temp = new Directory('').createTempSync();
+  var temp2 = new Directory("${temp.path}/æøå").createTempSync();
+  Expect.isTrue(temp2.path.contains(precomposed) ||
+                temp2.path.contains(decomposed));
+  temp2.deleteSync();
+  temp.deleteSync(recursive: true);
+}
diff --git a/tests/standalone/io/directory_non_ascii_test.dart b/tests/standalone/io/directory_non_ascii_test.dart
new file mode 100644
index 0000000..c29e9ce
--- /dev/null
+++ b/tests/standalone/io/directory_non_ascii_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:isolate';
+
+main() {
+  var port = new ReceivePort();
+  Directory scriptDir = new File(new Options().script).directorySync();
+  var d = new Directory("${scriptDir.path}/æøå");
+  // On MacOS you get the decomposed utf8 form of file and directory
+  // names from the system. Therefore, we have to check for both here.
+  var precomposed = 'æøå';
+  var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
+  d.exists().then((e) {
+    Expect.isTrue(e);
+    d.create().then((_) {
+      new Directory('').createTemp().then((temp) {
+        new Directory("${temp.path}/æøå").createTemp().then((temp2) {
+          Expect.isTrue(temp2.path.contains(precomposed) ||
+                        temp2.path.contains(decomposed));
+          temp2.delete().then((_) {
+            temp.delete(recursive: true).then((_) {
+              port.close();
+            });
+          });
+        });
+      });
+    });
+  });
+}
diff --git a/tests/standalone/io/echo_server_stream_test.dart b/tests/standalone/io/echo_server_stream_test.dart
index 3368b5c..19ffcca 100644
--- a/tests/standalone/io/echo_server_stream_test.dart
+++ b/tests/standalone/io/echo_server_stream_test.dart
@@ -104,7 +104,7 @@
     }
 
     _socket = new Socket(TestingServer.HOST, _port);
-    if (_socket !== null) {
+    if (_socket != null) {
       _socket.onConnect = connectHandler;
     } else {
       Expect.fail("socket creation failed");
diff --git a/tests/standalone/io/echo_server_test.dart b/tests/standalone/io/echo_server_test.dart
index 9850225..c002971 100644
--- a/tests/standalone/io/echo_server_test.dart
+++ b/tests/standalone/io/echo_server_test.dart
@@ -100,7 +100,7 @@
     }
 
     _socket = new Socket(TestingServer.HOST, _port);
-    if (_socket !== null) {
+    if (_socket != null) {
       _socket.onConnect = connectHandler;
     } else {
       Expect.fail("Socket creation failed");
diff --git a/tests/standalone/io/file_error_test.dart b/tests/standalone/io/file_error_test.dart
index 4a6a309..3c8d084 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -273,12 +273,12 @@
   var file = new File("${temp.path}/nonExistentFile4");
 
   // Non-existing file should throw exception.
-  Expect.throws(() => file.readAsTextSync(),
+  Expect.throws(() => file.readAsStringSync(),
                 (e) => checkOpenNonExistentFileException(e));
 
-  var readAsTextFuture = file.readAsText(Encoding.ASCII);
-  readAsTextFuture.then((data) => Expect.fail("Unreachable code"));
-  readAsTextFuture.handleException((e) {
+  var readAsStringFuture = file.readAsString(Encoding.ASCII);
+  readAsStringFuture.then((data) => Expect.fail("Unreachable code"));
+  readAsStringFuture.handleException((e) {
     checkOpenNonExistentFileException(e);
     p.toSendPort().send(null);
     return true;
diff --git a/tests/standalone/io/file_fuzz_test.dart b/tests/standalone/io/file_fuzz_test.dart
index faed2ef..abb6fc0 100644
--- a/tests/standalone/io/file_fuzz_test.dart
+++ b/tests/standalone/io/file_fuzz_test.dart
@@ -23,12 +23,12 @@
       doItSync(f.fullPathSync);
       doItSync(() => f.openInputStream().onError = (e) => null);
       doItSync(f.readAsBytesSync);
-      doItSync(f.readAsTextSync);
+      doItSync(f.readAsStringSync);
       doItSync(f.readAsLinesSync);
       typeMapping.forEach((k2, v2) {
         doItSync(() => f.openSync(v2));
         doItSync(() => f.openOutputStream(v2).onError = (e) => null);
-        doItSync(() => f.readAsTextSync(v2));
+        doItSync(() => f.readAsStringSync(v2));
         doItSync(() => f.readAsLinesSync(v2));
       });
     });
@@ -50,10 +50,10 @@
       futures.add(doItAsync(f.fullPath));
       futures.add(doItAsync(f.readAsBytes));
       futures.add(doItAsync(f.readAsLines));
-      futures.add(doItAsync(f.readAsText));
+      futures.add(doItAsync(f.readAsString));
       typeMapping.forEach((k2, v2) {
         futures.add(doItAsync(() => f.open(v2)));
-        futures.add(doItAsync(() => f.readAsText(v2)));
+        futures.add(doItAsync(() => f.readAsString(v2)));
         futures.add(doItAsync(() => f.readAsLines(v2)));
       });
     });
diff --git a/tests/standalone/io/file_non_ascii_sync_test.dart b/tests/standalone/io/file_non_ascii_sync_test.dart
new file mode 100644
index 0000000..3a10b93
--- /dev/null
+++ b/tests/standalone/io/file_non_ascii_sync_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+main() {
+  Directory scriptDir = new File(new Options().script).directorySync();
+  var f = new File("${scriptDir.path}/æøå/æøå.dat");
+  // On MacOS you get the decomposed utf8 form of file and directory
+  // names from the system. Therefore, we have to check for both here.
+  var precomposed = 'æøå';
+  var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
+  Expect.isTrue(f.existsSync());
+  f.createSync();
+  var path = f.directorySync().path;
+  Expect.isTrue(f.directorySync().path.endsWith(precomposed) ||
+                f.directorySync().path.endsWith(decomposed));
+  Expect.equals(6, f.lengthSync());
+  f.lastModifiedSync();
+  Expect.isTrue(f.fullPathSync().endsWith('${precomposed}.dat') ||
+                f.fullPathSync().endsWith('${decomposed}.dat'));
+  // The contents of the file is precomposed utf8.
+  Expect.equals(precomposed, f.readAsStringSync());
+}
diff --git a/tests/standalone/io/file_non_ascii_test.dart b/tests/standalone/io/file_non_ascii_test.dart
new file mode 100644
index 0000000..d082080
--- /dev/null
+++ b/tests/standalone/io/file_non_ascii_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:isolate';
+
+main() {
+  var port = new ReceivePort();
+  Directory scriptDir = new File(new Options().script).directorySync();
+  var f = new File("${scriptDir.path}/æøå/æøå.dat");
+  // On MacOS you get the decomposed utf8 form of file and directory
+  // names from the system. Therefore, we have to check for both here.
+  var precomposed = 'æøå';
+  var decomposed = new String.fromCharCodes([47, 230, 248, 97, 778]);
+  f.exists().then((e) {
+    Expect.isTrue(e);
+    f.create().then((_) {
+      f.directory().then((d) {
+        Expect.isTrue(d.path.endsWith(precomposed) ||
+                      d.path.endsWith(decomposed));
+        f.length().then((l) {
+          Expect.equals(6, l);
+          f.lastModified().then((_) {
+            f.fullPath().then((p) {
+              Expect.isTrue(p.endsWith('${precomposed}.dat') ||
+                            p.endsWith('${decomposed}.dat'));
+              f.readAsString().then((contents) {
+                Expect.equals(precomposed, contents);
+                port.close();
+              });
+            });
+          });
+        });
+      });
+    });
+  });
+}
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 2f210f4..2cfd32d 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -1037,24 +1037,24 @@
     });
     var name = getFilename("tests/vm/data/fixed_length_file");
     var f = new File(name);
-    f.readAsText(Encoding.UTF_8).then((text) {
+    f.readAsString(Encoding.UTF_8).then((text) {
       Expect.isTrue(text.endsWith("42 bytes."));
       Expect.equals(42, text.length);
       var name = getDataFilename("tests/standalone/io/read_as_text.dat");
       var f = new File(name);
-      f.readAsText(Encoding.UTF_8).then((text) {
+      f.readAsString(Encoding.UTF_8).then((text) {
         Expect.equals(6, text.length);
         var expected = [955, 120, 46, 32, 120, 10];
         Expect.listEquals(expected, text.charCodes);
-        f.readAsText(Encoding.ISO_8859_1).then((text) {
+        f.readAsString(Encoding.ISO_8859_1).then((text) {
           Expect.equals(7, text.length);
           var expected = [206, 187, 120, 46, 32, 120, 10];
           Expect.listEquals(expected, text.charCodes);
-          var readAsTextFuture = f.readAsText(Encoding.ASCII);
-          readAsTextFuture.then((text) {
+          var readAsStringFuture = f.readAsString(Encoding.ASCII);
+          readAsStringFuture.then((text) {
             Expect.fail("Non-ascii char should cause error");
           });
-          readAsTextFuture.handleException((e) {
+          readAsStringFuture.handleException((e) {
             port.toSendPort().send(1);
             return true;
           });
@@ -1071,7 +1071,7 @@
     });
     var name = getFilename("tests/vm/data/empty_file");
     var f = new File(name);
-    f.readAsText(Encoding.UTF_8).then((text) {
+    f.readAsString(Encoding.UTF_8).then((text) {
       port.toSendPort().send(text.length);
       return true;
     });
@@ -1079,16 +1079,16 @@
 
   static void testReadAsTextSync() {
     var name = getFilename("tests/vm/data/fixed_length_file");
-    var text = new File(name).readAsTextSync();
+    var text = new File(name).readAsStringSync();
     Expect.isTrue(text.endsWith("42 bytes."));
     Expect.equals(42, text.length);
     name = getDataFilename("tests/standalone/io/read_as_text.dat");
-    text = new File(name).readAsTextSync();
+    text = new File(name).readAsStringSync();
     Expect.equals(6, text.length);
     var expected = [955, 120, 46, 32, 120, 10];
     Expect.listEquals(expected, text.charCodes);
-    Expect.throws(() { new File(name).readAsTextSync(Encoding.ASCII); });
-    text = new File(name).readAsTextSync(Encoding.ISO_8859_1);
+    Expect.throws(() { new File(name).readAsStringSync(Encoding.ASCII); });
+    text = new File(name).readAsStringSync(Encoding.ISO_8859_1);
     expected = [206, 187, 120, 46, 32, 120, 10];
     Expect.equals(7, text.length);
     Expect.listEquals(expected, text.charCodes);
@@ -1096,7 +1096,7 @@
 
   static void testReadAsTextSyncEmptyFile() {
     var name = getFilename("tests/vm/data/empty_file");
-    var text = new File(name).readAsTextSync();
+    var text = new File(name).readAsStringSync();
     Expect.equals(0, text.length);
   }
 
@@ -1137,14 +1137,14 @@
     });
     var f = new File('.');
     Expect.throws(f.readAsBytesSync, (e) => e is FileIOException);
-    Expect.throws(f.readAsTextSync, (e) => e is FileIOException);
+    Expect.throws(f.readAsStringSync, (e) => e is FileIOException);
     Expect.throws(f.readAsLinesSync, (e) => e is FileIOException);
     var readAsBytesFuture = f.readAsBytes();
     readAsBytesFuture.then((bytes) => Expect.fail("no bytes expected"));
     readAsBytesFuture.handleException((e) {
-      var readAsTextFuture = f.readAsText(Encoding.UTF_8);
-      readAsTextFuture.then((text) => Expect.fail("no text expected"));
-      readAsTextFuture.handleException((e) {
+      var readAsStringFuture = f.readAsString(Encoding.UTF_8);
+      readAsStringFuture.then((text) => Expect.fail("no text expected"));
+      readAsStringFuture.handleException((e) {
         var readAsLinesFuture = f.readAsLines(Encoding.UTF_8);
         readAsLinesFuture.then((lines) => Expect.fail("no lines expected"));
         readAsLinesFuture.handleException((e) {
@@ -1232,7 +1232,7 @@
                   openedFile.length().then((l) {
                     Expect.equals(4, l);
                     openedFile.close().then((_) {
-                      file.readAsText().then((readBack) {
+                      file.readAsString().then((readBack) {
                         Expect.stringEquals(readBack, '$string$string');
                         file.delete().then((_) {
                           file.exists().then((e) {
@@ -1265,7 +1265,7 @@
     openedFile.writeStringSync(string);
     Expect.equals(4, openedFile.lengthSync());
     openedFile.closeSync();
-    var readBack = file.readAsTextSync();
+    var readBack = file.readAsStringSync();
     Expect.stringEquals(readBack, '$string$string');
     file.deleteSync();
     Expect.isFalse(file.existsSync());
diff --git a/tests/standalone/io/http_connection_close_test.dart b/tests/standalone/io/http_connection_close_test.dart
index b3e8bd7..ac6cedd 100644
--- a/tests/standalone/io/http_connection_close_test.dart
+++ b/tests/standalone/io/http_connection_close_test.dart
@@ -6,7 +6,7 @@
 #import("dart:isolate");
 #import("dart:io");
 
-void testHttp10Close() {
+void testHttp10Close(bool closeRequest) {
   HttpServer server = new HttpServer();
   server.listen("127.0.0.1", 0, backlog: 5);
 
@@ -14,15 +14,16 @@
   socket.onConnect = () {
     List<int> buffer = new List<int>(1024);
     socket.outputStream.writeString("GET / HTTP/1.0\r\n\r\n");
+    if (closeRequest) socket.outputStream.close();
     socket.onData = () => socket.readList(buffer, 0, buffer.length);
     socket.onClosed = () {
-      socket.close(true);
+      if (!closeRequest) socket.close(true);
       server.close();
     };
   };
 }
 
-void testHttp11Close() {
+void testHttp11Close(bool closeRequest) {
   HttpServer server = new HttpServer();
   server.listen("127.0.0.1", 0, backlog: 5);
 
@@ -31,15 +32,18 @@
     List<int> buffer = new List<int>(1024);
     socket.outputStream.writeString(
         "GET / HTTP/1.1\r\nConnection: close\r\n\r\n");
+    if (closeRequest) socket.outputStream.close();
     socket.onData = () => socket.readList(buffer, 0, buffer.length);
     socket.onClosed = () {
-      socket.close(true);
+      if (!closeRequest) socket.close(true);
       server.close();
     };
   };
 }
 
 main() {
-  testHttp10Close();
-  testHttp11Close();
+  testHttp10Close(false);
+  testHttp10Close(true);
+  testHttp11Close(false);
+  testHttp11Close(true);
 }
diff --git a/tests/standalone/io/http_headers_test.dart b/tests/standalone/io/http_headers_test.dart
index 6e81fee..9676fed 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -10,6 +10,7 @@
 part "../../../sdk/lib/io/string_stream.dart";
 part "../../../sdk/lib/io/stream_util.dart";
 part "../../../sdk/lib/io/http.dart";
+part "../../../sdk/lib/io/http_headers.dart";
 part "../../../sdk/lib/io/http_impl.dart";
 part "../../../sdk/lib/io/http_parser.dart";
 part "../../../sdk/lib/io/http_utils.dart";
@@ -172,7 +173,7 @@
   bool myHeader1 = false;
   bool myHeader2 = false;
   int totalValues = 0;
-  headers.forEach(f(String name, List<String> values) {
+  headers.forEach((String name, List<String> values) {
     totalValues += values.length;
     if (name == "my-header-1") {
       myHeader1 = true;
diff --git a/tests/standalone/io/http_parser_test.dart b/tests/standalone/io/http_parser_test.dart
index 1145ec7..72f4d8a 100644
--- a/tests/standalone/io/http_parser_test.dart
+++ b/tests/standalone/io/http_parser_test.dart
@@ -5,6 +5,8 @@
 import 'dart:math';
 import 'dart:scalarlist';
 
+part '../../../sdk/lib/io/http.dart';
+part '../../../sdk/lib/io/http_headers.dart';
 part '../../../sdk/lib/io/http_parser.dart';
 
 class HttpParserTest {
@@ -32,20 +34,18 @@
     String method;
     String uri;
     String version;
-    Map headers;
+    HttpHeaders headers;
     int contentLength;
     int bytesReceived;
 
     void reset() {
-      httpParser = new _HttpParser();
-      httpParser.requestStart = (m, u, v) { method = m; uri = u; version = v; };
-      httpParser.responseStart = (s, r, v) { Expect.fail("Expected request"); };
-      httpParser.headerReceived = (f, v) {
-        Expect.isFalse(headersCompleteCalled);
-        headers[f] = v;
-      };
-      httpParser.headersComplete = () {
-        Expect.isFalse(headersCompleteCalled);
+      httpParser = new _HttpParser.requestParser();
+      httpParser.requestStart = (m, u, v, h) {
+        method = m;
+        uri = u;
+        version = v;
+        headers = h;
+        headersCompleteCalled = true;
         if (!chunked) {
           Expect.equals(expectedContentLength, httpParser.contentLength);
         } else {
@@ -54,12 +54,15 @@
         if (expectedHeaders != null) {
           expectedHeaders.forEach(
               (String name, String value) =>
-                  Expect.equals(value, headers[name]));
+              Expect.equals(value, headers[name][0]));
         }
         Expect.equals(upgrade, httpParser.upgrade);
         Expect.equals(connectionClose, !httpParser.persistentConnection);
         headersCompleteCalled = true;
       };
+      httpParser.responseStart = (s, r, v, h) {
+        Expect.fail("Expected request");
+      };
       httpParser.dataReceived = (List<int> data) {
         Expect.isTrue(headersCompleteCalled);
         bytesReceived += data.length;
@@ -68,12 +71,13 @@
         Expect.isFalse(close);
         dataEndCalled = true;
       };
+      httpParser.closed = () { };
 
       headersCompleteCalled = false;
       dataEndCalled = false;
       method = null;
       uri = null;
-      headers = new Map();
+      headers = null;
       bytesReceived = 0;
     }
 
@@ -86,7 +90,7 @@
         int remaining = requestData.length - pos;
         int writeLength = min(chunkSize, remaining);
         written += writeLength;
-        httpParser.writeList(requestData, pos, writeLength);
+        httpParser.streamData(requestData.getRange(pos, writeLength));
         unparsed = httpParser.readUnparsedData().length;
         if (httpParser.upgrade) {
           unparsed += requestData.length - written;
@@ -121,11 +125,12 @@
     bool errorCalled;
 
     void reset() {
-      httpParser = new _HttpParser();
+      httpParser = new _HttpParser.requestParser();
       httpParser.responseStart = (s, r) { Expect.fail("Expected request"); };
       httpParser.error = (e) {
         errorCalled = true;
       };
+      httpParser.closed = () { };
 
       errorCalled = false;
     }
@@ -138,7 +143,7 @@
            pos += chunkSize) {
         int remaining = requestData.length - pos;
         int writeLength = min(chunkSize, remaining);
-        httpParser.writeList(requestData, pos, writeLength);
+        httpParser.streamData(requestData.getRange(pos, writeLength));
       }
       Expect.isTrue(errorCalled);
     }
@@ -171,26 +176,23 @@
     int statusCode;
     String reasonPhrase;
     String version;
-    Map headers;
+    HttpHeaders headers;
     int contentLength;
     int bytesReceived;
 
     void reset() {
-      httpParser = new _HttpParser();
+      httpParser = new _HttpParser.responseParser();
       if (responseToMethod != null) {
         httpParser.responseToMethod = responseToMethod;
       }
-      httpParser.requestStart = (m, u, v) => Expect.fail("Expected response");
-      httpParser.responseStart = (s, r, v) {
+      httpParser.requestStart = (m, u, v, h) {
+        Expect.fail("Expected response");
+      };
+      httpParser.responseStart = (s, r, v, h) {
         statusCode = s;
         reasonPhrase = r;
         version = v;
-      };
-      httpParser.headerReceived = (f, v) {
-        Expect.isFalse(headersCompleteCalled);
-        headers[f] = v;
-      };
-      httpParser.headersComplete = () {
+        headers = h;
         Expect.isFalse(headersCompleteCalled);
         if (!chunked && !close) {
           Expect.equals(expectedContentLength, httpParser.contentLength);
@@ -199,7 +201,7 @@
         }
         if (expectedHeaders != null) {
           expectedHeaders.forEach((String name, String value) {
-            Expect.equals(value, headers[name]);
+            Expect.equals(value, headers[name][0]);
           });
         }
         Expect.equals(upgrade, httpParser.upgrade);
@@ -213,13 +215,14 @@
         dataEndCalled = true;
         dataEndClose = close;
       };
+      httpParser.closed = () { };
 
       headersCompleteCalled = false;
       dataEndCalled = false;
       dataEndClose = null;
       statusCode = -1;
       reasonPhrase = null;
-      headers = new Map();
+      headers = null;
       bytesReceived = 0;
     }
 
@@ -232,7 +235,7 @@
         int remaining = requestData.length - pos;
         int writeLength = min(chunkSize, remaining);
         written += writeLength;
-        httpParser.writeList(requestData, pos, writeLength);
+        httpParser.streamData(requestData.getRange(pos, writeLength));
         unparsed = httpParser.readUnparsedData().length;
         if (httpParser.upgrade) {
           unparsed += requestData.length - written;
@@ -241,7 +244,7 @@
           Expect.equals(0, unparsed);
         }
       }
-      if (close) httpParser.connectionClosed();
+      if (close) httpParser.streamDone();
       Expect.equals(expectedVersion, version);
       Expect.equals(expectedStatusCode, statusCode);
       Expect.equals(expectedReasonPhrase, reasonPhrase);
@@ -272,9 +275,10 @@
     bool errorCalled;
 
     void reset() {
-      httpParser = new _HttpParser();
+      httpParser = new _HttpParser.responseParser();
       httpParser.requestStart = (m, u) => Expect.fail("Expected response");
       httpParser.error = (e) => errorCalled = true;
+      httpParser.closed = () { };
 
       errorCalled = false;
     }
@@ -287,9 +291,9 @@
            pos += chunkSize) {
         int remaining = requestData.length - pos;
         int writeLength = min(chunkSize, remaining);
-        httpParser.writeList(requestData, pos, writeLength);
+        httpParser.streamData(requestData.getRange(pos, writeLength));
       }
-      if (close) httpParser.connectionClosed();
+      if (close) httpParser.streamDone();
       Expect.isTrue(errorCalled);
     }
 
@@ -321,7 +325,9 @@
     });
 
     request = "GET / HTTP/1.0\r\n\r\n";
-    _testParseRequest(request, "GET", "/", expectedVersion: "1.0", connectionClose: true);
+    _testParseRequest(request, "GET", "/",
+                      expectedVersion: "1.0",
+                      connectionClose: true);
 
     request = "GET / HTTP/1.0\r\nConnection: keep-alive\r\n\r\n";
     _testParseRequest(request, "GET", "/", expectedVersion: "1.0");
@@ -584,7 +590,8 @@
                        expectedContentLength: 10,
                        expectedBytesReceived: 0);
 
-    response = "HTTP/1.1 200 OK\r\nContent-Length: 0\r\nConnection: Close\r\n\r\n";
+    response = "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n"
+               "Connection: Close\r\n\r\n";
     _testParseResponse(response,
                        200,
                        "OK",
@@ -599,8 +606,13 @@
                        expectedVersion: "1.0",
                        connectionClose: true);
 
-    response = "HTTP/1.0 200 OK\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n";
-    _testParseResponse(response, 200, "OK", expectedContentLength: 0, expectedVersion: "1.0");
+    response = "HTTP/1.0 200 OK\r\nContent-Length: 0\r\n"
+               "Connection: Keep-Alive\r\n\r\n";
+    _testParseResponse(response,
+                       200,
+                       "OK",
+                       expectedContentLength: 0,
+                       expectedVersion: "1.0");
 
     response = "HTTP/1.1 204 No Content\r\nContent-Length: 11\r\n\r\n";
     _testParseResponse(response,
diff --git a/tests/standalone/io/http_redirect_test.dart b/tests/standalone/io/http_redirect_test.dart
index c35cb1c..668225e 100644
--- a/tests/standalone/io/http_redirect_test.dart
+++ b/tests/standalone/io/http_redirect_test.dart
@@ -21,6 +21,23 @@
      });
   }
 
+  // Setup simple redirect.
+  server.addRequestHandler(
+     (HttpRequest request) => request.path == "/redirect",
+     (HttpRequest request, HttpResponse response) {
+       response.headers.set(HttpHeaders.LOCATION,
+                            "http://127.0.0.1:${server.port}/location");
+       response.statusCode = HttpStatus.MOVED_PERMANENTLY;
+       response.outputStream.close();
+     }
+  );
+  server.addRequestHandler(
+     (HttpRequest request) => request.path == "/location",
+     (HttpRequest request, HttpResponse response) {
+       response.outputStream.close();
+     }
+  );
+
   // Setup redirect chain.
   int n = 1;
   addRedirectHandler(n++, HttpStatus.MOVED_PERMANENTLY);
@@ -94,6 +111,35 @@
   HttpServer server = setupServer();
   HttpClient client = new HttpClient();
 
+  var requestCount = 0;
+
+  void onRequest(HttpClientRequest request) {
+    requestCount++;
+    request.outputStream.close();
+  }
+
+  void onResponse(HttpClientResponse response) {
+    response.inputStream.onData =
+        () => Expect.fail("Response data not expected");
+    response.inputStream.onClosed = () {
+      Expect.equals(1, requestCount);
+      server.close();
+      client.shutdown();
+    };
+  };
+
+  HttpClientConnection conn =
+      client.getUrl(
+          new Uri.fromString("http://127.0.0.1:${server.port}/redirect"));
+  conn.onRequest = onRequest;
+  conn.onResponse = onResponse;
+  conn.onError = (e) => Expect.fail("Error not expected ($e)");
+}
+
+void testAutoRedirectLimit() {
+  HttpServer server = setupServer();
+  HttpClient client = new HttpClient();
+
   HttpClientConnection conn =
       client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/1"));
   conn.onResponse = (HttpClientResponse response) {
@@ -130,5 +176,6 @@
 main() {
   testManualRedirect();
   testAutoRedirect();
+  testAutoRedirectLimit();
   testRedirectLoop();
 }
diff --git a/tests/standalone/io/http_server_socket_test.dart b/tests/standalone/io/http_server_socket_test.dart
index a7722ca..24c9712 100644
--- a/tests/standalone/io/http_server_socket_test.dart
+++ b/tests/standalone/io/http_server_socket_test.dart
@@ -26,7 +26,7 @@
   }
 
   bool writeFrom(List data, [int offset = 0, int len]) {
-    if (len === null) len = data.length - offset;
+    if (len == null) len = data.length - offset;
     _onData(data.getRange(offset, len));
     return true;
   }
@@ -84,6 +84,18 @@
     }
   }
 
+  List<int> read([int len]) {
+    var result;
+    if (len == null) {
+      result = _data;
+      _data = [];
+    } else {
+      result = new Uint8List(len);
+      readList(result, 0, len);
+    }
+    return result;
+  }
+
   int readList(List<int> buffer, int offset, int count) {
     int max = min(count, _data.length);
     buffer.setRange(offset, max, _data);
diff --git a/tests/standalone/io/pkcert/cert9.db b/tests/standalone/io/pkcert/cert9.db
new file mode 100644
index 0000000..d7ce362
--- /dev/null
+++ b/tests/standalone/io/pkcert/cert9.db
Binary files differ
diff --git a/tests/standalone/io/pkcert/key4.db b/tests/standalone/io/pkcert/key4.db
new file mode 100644
index 0000000..614a210
--- /dev/null
+++ b/tests/standalone/io/pkcert/key4.db
Binary files differ
diff --git a/tests/standalone/io/pkcert/pkcs11.txt b/tests/standalone/io/pkcert/pkcs11.txt
new file mode 100644
index 0000000..3ba2521
--- /dev/null
+++ b/tests/standalone/io/pkcert/pkcs11.txt
@@ -0,0 +1,5 @@
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='dart/runtime/bin/net/pkcert' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' 
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
diff --git a/tests/standalone/io/process_non_ascii_test.dart b/tests/standalone/io/process_non_ascii_test.dart
new file mode 100644
index 0000000..5ea4e3c
--- /dev/null
+++ b/tests/standalone/io/process_non_ascii_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+main() {
+  var scriptDir = new File(new Options().script).directorySync();
+  var executable = new File(new Options().executable).fullPathSync();
+  var options = new ProcessOptions();
+  options.workingDirectory = "${scriptDir.path}/æøå";
+  var script = "${scriptDir.path}/æøå.dart";
+  print(options.workingDirectory);
+  Process.run(executable, [script], options).then((result) {
+    Expect.equals(0, result.exitCode);
+  });
+}
diff --git a/tests/standalone/io/process_stderr_test.dart b/tests/standalone/io/process_stderr_test.dart
index ccf3187..34cc672 100644
--- a/tests/standalone/io/process_stderr_test.dart
+++ b/tests/standalone/io/process_stderr_test.dart
@@ -38,7 +38,7 @@
       received = buffer.length;
       if (received >= dataSize) {
         // We expect an extra character on windows due to carriage return.
-        if (13 === buffer[dataSize - 1] && dataSize + 1 === received) {
+        if (13 == buffer[dataSize - 1] && dataSize + 1 == received) {
           Expect.equals(13, buffer[dataSize - 1]);
           Expect.equals(10, buffer[dataSize]);
           buffer.removeLast();
diff --git a/tests/standalone/io/process_stdout_test.dart b/tests/standalone/io/process_stdout_test.dart
index 048deb3..79b3fed 100644
--- a/tests/standalone/io/process_stdout_test.dart
+++ b/tests/standalone/io/process_stdout_test.dart
@@ -38,7 +38,7 @@
       received = buffer.length;
       if (received >= dataSize) {
         // We expect an extra character on windows due to carriage return.
-        if (13 === buffer[dataSize - 1] && dataSize + 1 === received) {
+        if (13 == buffer[dataSize - 1] && dataSize + 1 == received) {
           Expect.equals(13, buffer[dataSize - 1]);
           Expect.equals(10, buffer[dataSize]);
           buffer.removeLast();
diff --git a/tests/standalone/io/socket_close_test.dart b/tests/standalone/io/socket_close_test.dart
index 5996173..21f4fb7 100644
--- a/tests/standalone/io/socket_close_test.dart
+++ b/tests/standalone/io/socket_close_test.dart
@@ -140,7 +140,7 @@
     }
 
     _socket = new Socket(SocketCloseServer.HOST, _port);
-    Expect.equals(true, _socket !== null);
+    Expect.equals(true, _socket != null);
     _socket.onConnect = connectHandler;
   }
 
@@ -345,7 +345,7 @@
       _iterations = 0;
       _mode = message;
       _server = new ServerSocket(HOST, 0, 10);
-      Expect.equals(true, _server !== null);
+      Expect.equals(true, _server != null);
       _server.onConnection = (connection) {
         var data = new ConnectionData(connection);
         connectionHandler(data);
diff --git a/tests/standalone/io/socket_exception_test.dart b/tests/standalone/io/socket_exception_test.dart
index 46d6c13..6323217 100644
--- a/tests/standalone/io/socket_exception_test.dart
+++ b/tests/standalone/io/socket_exception_test.dart
@@ -17,7 +17,7 @@
     bool wrongExceptionCaught = false;
 
     ServerSocket server = new ServerSocket(HOST, PORT, 10);
-    Expect.equals(true, server !== null);
+    Expect.equals(true, server != null);
     server.close();
     try {
       server.close();
@@ -39,11 +39,11 @@
     bool wrongExceptionCaught = false;
 
     ServerSocket server = new ServerSocket(HOST, PORT, 10);
-    Expect.equals(true, server !== null);
+    Expect.equals(true, server != null);
     int port = server.port;
     Socket client = new Socket(HOST, port);
     client.onConnect = () {
-      Expect.equals(true, client !== null);
+      Expect.equals(true, client != null);
       InputStream input = client.inputStream;
       OutputStream output = client.outputStream;
       client.close();
@@ -120,11 +120,11 @@
     bool wrongExceptionCaught = false;
 
     ServerSocket server = new ServerSocket(HOST, PORT, 10);
-    Expect.equals(true, server !== null);
+    Expect.equals(true, server != null);
     int port = server.port;
     Socket client = new Socket(HOST, port);
     client.onConnect = () {
-      Expect.equals(true, client !== null);
+      Expect.equals(true, client != null);
       try {
         List<int> buffer = new List<int>(10);
         client.readList(buffer, -1, 1);
diff --git a/tests/standalone/io/socket_many_connections_test.dart b/tests/standalone/io/socket_many_connections_test.dart
index fd60d1d..7c3fd6a 100644
--- a/tests/standalone/io/socket_many_connections_test.dart
+++ b/tests/standalone/io/socket_many_connections_test.dart
@@ -35,7 +35,7 @@
 
     for (int i = 0; i < CONNECTIONS; i++) {
       _sockets[i] = new Socket(TestingServer.HOST, _port);
-      if (_sockets[i] !== null) {
+      if (_sockets[i] != null) {
         _sockets[i].onConnect = connectHandler;
       } else {
         Expect.fail("socket creation failed");
diff --git a/tests/standalone/io/socket_stream_close_test.dart b/tests/standalone/io/socket_stream_close_test.dart
index 0c1e47f..ad68f2d 100644
--- a/tests/standalone/io/socket_stream_close_test.dart
+++ b/tests/standalone/io/socket_stream_close_test.dart
@@ -142,7 +142,7 @@
     }
 
     _socket = new Socket(SocketCloseServer.HOST, _port);
-    Expect.equals(true, _socket !== null);
+    Expect.equals(true, _socket != null);
     _socket.onConnect = connectHandler;
   }
 
@@ -369,7 +369,7 @@
       _iterations = 0;
       _mode = message;
       _server = new ServerSocket(HOST, 0, 10);
-      Expect.equals(true, _server !== null);
+      Expect.equals(true, _server != null);
       _server.onConnection = (connection) {
         var data = new ConnectionData(connection);
         connectionHandler(data);
diff --git a/tests/standalone/io/stream_pipe_test.dart b/tests/standalone/io/stream_pipe_test.dart
index 4683794..8775b86 100644
--- a/tests/standalone/io/stream_pipe_test.dart
+++ b/tests/standalone/io/stream_pipe_test.dart
@@ -117,7 +117,7 @@
 
     // Connect to the server.
     _socket = new Socket(TestingServer.HOST, _port);
-    if (_socket !== null) {
+    if (_socket != null) {
       _socket.onConnect = connectHandler;
     } else {
       Expect.fail("socket creation failed");
diff --git a/tests/standalone/io/test_runner_exit_code_script.dart b/tests/standalone/io/test_runner_exit_code_script.dart
index 87807ab..f137022 100644
--- a/tests/standalone/io/test_runner_exit_code_script.dart
+++ b/tests/standalone/io/test_runner_exit_code_script.dart
@@ -16,17 +16,19 @@
     new ProgressIndicator.fromName(progressType, startTime, false);
   // Build a dummy test case.
   var configuration = new TestOptionsParser().parse(['--timeout', '2'])[0];
+  var dummyCommand = new Command("noop", []);
   var testCase = new TestCase('failing_test.dart',
-                              [],
+                              [dummyCommand],
                               configuration,
                               (_) => null,
                               new Set<String>.from(['PASS']));
+
   // Simulate the test.dart use of the progress indicator.
   progress.testAdded();
   progress.allTestsKnown();
   progress.start(testCase);
-  new TestOutput.fromCase(testCase, 1, false, false, [], [],
-                          new Date.now().difference(startTime));
+  new CommandOutput.fromCase(testCase, dummyCommand, 1, false, false, [], [],
+                             new Date.now().difference(startTime));
   progress.done(testCase);
   progress.allDone();
 }
diff --git a/tests/standalone/io/test_runner_test.dart b/tests/standalone/io/test_runner_test.dart
index 909d1a5..044f559 100644
--- a/tests/standalone/io/test_runner_test.dart
+++ b/tests/standalone/io/test_runner_test.dart
@@ -15,7 +15,7 @@
 
   // Used as TestCase.completedCallback.
   static processCompletedTest(TestCase testCase) {
-    TestOutput output = testCase.output;
+    CommandOutput output = testCase.lastCommandOutput;
     print("Test: ${testCase.commands.last.commandLine}");
     if (output.unexpectedOutput) {
       throw "Unexpected output: ${output.result}";
diff --git a/tests/standalone/io/testing_server.dart b/tests/standalone/io/testing_server.dart
index 22356df..62b2404 100644
--- a/tests/standalone/io/testing_server.dart
+++ b/tests/standalone/io/testing_server.dart
@@ -17,7 +17,7 @@
   void dispatch(message, SendPort replyTo) {
     if (message == INIT) {
       _server = new ServerSocket(HOST, 0, 10);
-      Expect.equals(true, _server !== null);
+      Expect.equals(true, _server != null);
       _server.onConnection = onConnection;
       _server.onError = errorHandlerServer;
       replyTo.send(_server.port, null);
diff --git a/tests/standalone/io/tls_socket_test.dart b/tests/standalone/io/tls_socket_test.dart
new file mode 100644
index 0000000..061d93f
--- /dev/null
+++ b/tests/standalone/io/tls_socket_test.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for 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
+// The --short_socket_write option does not work with external server
+// www.google.dk.  Add this to the test when we have secure server sockets.
+// See TODO below.
+
+#import("dart:isolate");
+#import("dart:io");
+
+void main() {
+  var testPkcertDatabase =
+      new Path.fromNative(new Options().script).directoryPath.append('pkcert/');
+  TlsSocket.setCertificateDatabase(testPkcertDatabase.toNativePath());
+  // TODO(3593): Use a Dart HTTPS server for this test using TLS server sockets.
+  // When we use a Dart HTTPS server, allow --short_socket_write. The flag
+  // causes fragmentation of the client hello message, which doesn't seem to
+  // work with www.google.dk.
+  var tls = new TlsSocket("www.google.dk", 443);
+  List<String> chunks = <String>[];
+  tls.onConnect = () {
+    var request_bytes =
+      "GET / HTTP/1.0\r\nHost: www.google.dk\r\n\r\n".charCodes;
+    tls.writeList(request_bytes, 0, 20);
+    tls.writeList(request_bytes, 20, request_bytes.length - 20);
+  };
+  var useReadList;  // Mutually recursive onData callbacks.
+  void useRead() {
+    var data = tls.read();
+    var received = new String.fromCharCodes(data);
+    chunks.add(received);
+    tls.onData = useReadList;
+  }
+  useReadList = () {
+    var buffer = new List(2000);
+    int len = tls.readList(buffer, 0, 2000);
+    var received = new String.fromCharCodes(buffer.getRange(0, len));
+    chunks.add(received);
+    tls.onData = useRead;
+  };
+  tls.onData = useRead;
+  tls.onClosed = () {
+    String fullPage = Strings.concatAll(chunks);
+    Expect.isTrue(fullPage.contains('</body></html>'));
+    tls.close();
+  };
+}
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index 831de7c..5bede0a 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -20,10 +20,10 @@
     var count = 0;
     conn.onMessage = (Object message) => conn.send(message);
     conn.onClosed = (status, reason) {
-      Expect.equals(closeStatus === null
+      Expect.equals(closeStatus == null
                     ? WebSocketStatus.NO_STATUS_RECEIVED
                     : closeStatus, status);
-      Expect.equals(closeReason === null ? "" : closeReason, reason);
+      Expect.equals(closeReason == null ? "" : closeReason, reason);
     };
   };
   server.defaultRequestHandler = wsHandler.onRequest;
@@ -45,7 +45,7 @@
       }
     };
     wsconn.onClosed = (status, reason) {
-      Expect.equals(closeStatus === null
+      Expect.equals(closeStatus == null
                     ? WebSocketStatus.NO_STATUS_RECEIVED
                     : closeStatus, status);
       Expect.equals("", reason);
@@ -83,7 +83,7 @@
       }
     };
     conn.onClosed = (status, reason) {
-      Expect.equals(closeStatus === null
+      Expect.equals(closeStatus == null
                     ? WebSocketStatus.NO_STATUS_RECEIVED
                     : closeStatus, status);
       Expect.equals("", reason);
@@ -102,10 +102,10 @@
     WebSocketClientConnection wsconn = new WebSocketClientConnection(conn);
     wsconn.onMessage = (message) => wsconn.send(message);
     wsconn.onClosed = (status, reason) {
-      Expect.equals(closeStatus === null
+      Expect.equals(closeStatus == null
                     ? WebSocketStatus.NO_STATUS_RECEIVED
                     : closeStatus, status);
-      Expect.equals(closeReason === null ? "" : closeReason, reason);
+      Expect.equals(closeReason == null ? "" : closeReason, reason);
     };
   }
 }
diff --git a/sdk/lib/coreimpl/coreimpl.dart "b/tests/standalone/io/\303\246\303\270\303\245.dart"
similarity index 68%
copy from sdk/lib/coreimpl/coreimpl.dart
copy to "tests/standalone/io/\303\246\303\270\303\245.dart"
index 067ea2f..d03e720 100644
--- a/sdk/lib/coreimpl/coreimpl.dart
+++ "b/tests/standalone/io/\303\246\303\270\303\245.dart"
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("dart:coreimpl");
+import 'dart:io';
 
-#import("dart:collection");
-
-#source("regexp.dart");
+main() {
+  Expect.equals('æøå', new File('æøå.dat').readAsStringSync());
+}
diff --git "a/tests/standalone/io/\303\246\303\270\303\245/\303\246\303\270\303\245.dat" "b/tests/standalone/io/\303\246\303\270\303\245/\303\246\303\270\303\245.dat"
new file mode 100644
index 0000000..5a9c6c8
--- /dev/null
+++ "b/tests/standalone/io/\303\246\303\270\303\245/\303\246\303\270\303\245.dat"
@@ -0,0 +1 @@
+æøå
\ No newline at end of file
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 7008256..0f9c960 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -2,12 +2,12 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-io/http_basic_test: Pass, Timeout  # Issue 6393
-
 out_of_memory_test: Skip # Issue 2345
 
 package/invalid_uri_test: Fail, OK # Fails intentionally
 
+io/tls_socket_test: Pass, Timeout # Issue 6730.
+
 [ $runtime == vm && $checked ]
 # These tests have type errors on purpose.
 io/process_invalid_arguments_test: Fail, OK
@@ -28,6 +28,17 @@
 # of allowed open files ('ulimit -n' says something like 256).
 io/socket_many_connections_test: Skip
 
+# These tests pass on MacOS 10.8.2 but fails on the buildbot machines
+# that are running an earlier version of MacOS. The issue is that the
+# old version of MacOS does not expand the precomposed utf-8 it gets
+# from the VM before comparing it to the decomposed utf-8 used for the
+# file system.
+io/file_non_ascii_sync_test: Pass, Fail
+io/file_non_ascii_test: Pass, Fail
+io/directory_non_ascii_sync_test: Pass, Fail
+io/directory_non_ascii_test: Pass, Fail
+io/process_non_ascii_test: Pass, Fail
+
 [ $runtime == vm && $system == windows ]
 io/file_system_links_test: Skip  # No links on Windows.
 
diff --git a/tests/utils/dummy.dart b/tests/utils/dummy.dart
index 2653073..f7f9c5c 100644
--- a/tests/utils/dummy.dart
+++ b/tests/utils/dummy.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // A dummy library for testing dartdoc name references.
-#library('dummy');
+library dummy;
 
 topLevelMethod() => null;
 
diff --git a/tests/utils/dummy_compiler_test.dart b/tests/utils/dummy_compiler_test.dart
index d0a7797..f7096f1 100644
--- a/tests/utils/dummy_compiler_test.dart
+++ b/tests/utils/dummy_compiler_test.dart
@@ -47,7 +47,7 @@
 }
 
 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
-  if (uri === null) {
+  if (uri == null) {
     print('$kind: $message');
   } else {
     print('$uri:$begin:$end: $kind: $message');
@@ -59,7 +59,7 @@
                         new Uri.fromComponents(scheme: 'lib', path: '/'),
                         new Uri.fromComponents(scheme: 'package', path: '/'),
                         provider, handler).value;
-  if (code === null) {
+  if (code == null) {
     throw 'Compilation failed';
   }
 }
diff --git a/tests/utils/json_test.dart b/tests/utils/json_test.dart
index 682b67d..ebc83e4 100644
--- a/tests/utils/json_test.dart
+++ b/tests/utils/json_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('jsonTest');
+library jsonTest;
 
-#import('dart:json');
+import 'dart:json';
 
 main() {
   testEscaping();
diff --git a/tests/utils/png_layout_test.dart b/tests/utils/png_layout_test.dart
index 54cd85b..fe47cb6 100644
--- a/tests/utils/png_layout_test.dart
+++ b/tests/utils/png_layout_test.dart
@@ -8,9 +8,9 @@
  * test framework that we want to compare the final state of this application
  * against an image file.
  */
-#library("layouttest");
+library layouttest;
 
-#import('dart:html');
+import 'dart:html';
 
 main() {
   var div1Style = _style('blue', 20, 10, 40, 10);
diff --git a/tests/utils/test_utils.dart b/tests/utils/test_utils.dart
index 4380801..40a2e55 100644
--- a/tests/utils/test_utils.dart
+++ b/tests/utils/test_utils.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('test_utils');
+library test_utils;
 
 /**
  * Removes eight spaces of leading indentation from a multiline string.
diff --git a/tests/utils/txt_layout_test.dart b/tests/utils/txt_layout_test.dart
index b61b694..9573117 100644
--- a/tests/utils/txt_layout_test.dart
+++ b/tests/utils/txt_layout_test.dart
@@ -8,9 +8,9 @@
  * test framework that we want to compare the final state of this application
  * against a text file (with a text representation of the DOM tree).
  */
-#library("layouttest");
+library layouttest;
 
-#import('dart:html');
+import 'dart:html';
 
 main() {
   var div1Style = _style('blue', 20, 10, 40, 10);
diff --git a/tests/utils/utf8_test.dart b/tests/utils/utf8_test.dart
index e751dff..541f101 100644
--- a/tests/utils/utf8_test.dart
+++ b/tests/utils/utf8_test.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('Utf8Test');
-#import('dart:utf');
+library utf8_test;
+import 'dart:utf';
 
 String decode(List<int> bytes) => decodeUtf8(bytes);
 
-bool isRunningOnJavaScript() => 1 === 1.0;
+bool isRunningOnJavaScript() => identical(1, 1.0);
 
 main() {
   // Google favorite: "Îñţérñåţîöñåļîžåţîờñ".
diff --git a/tests/utils/utils.status b/tests/utils/utils.status
index e5bbdb6..1ddd3b0 100644
--- a/tests/utils/utils.status
+++ b/tests/utils/utils.status
@@ -27,12 +27,6 @@
 # dart2js issue 6323
 dummy_compiler_test: Fail, OK
 recursive_import_test: Fail, OK
-txt_layout_test: Fail, OK
-png_layout_test: Fail, OK
-
-# test issue 6512
-json_test: Fail, OK
-utf8_test: Fail, OK
 
 
 [ $compiler == dart2dart ]
diff --git a/tools/VERSION b/tools/VERSION
index 1858bc2..6ed35b9 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 2
-BUILD 3
+BUILD 4
 PATCH 0
diff --git a/tools/bots/bot.py b/tools/bots/bot.py
index a57877e..aea443f 100644
--- a/tools/bots/bot.py
+++ b/tools/bots/bot.py
@@ -137,7 +137,7 @@
   os.chdir(DART_PATH)
 
   try:
-    Clobber(build_info.mode)
+    Clobber()
     build_step(build_info)
 
     custom_steps(build_info)
@@ -171,7 +171,7 @@
   return name, True
 
 
-def Clobber(mode):
+def Clobber():
   """
   Clobbers the builder before we do the build, if appropriate.
 
@@ -182,8 +182,7 @@
 
   with BuildStep('Clobber'):
     cmd = [sys.executable,
-           './tools/clean_output_directory.py',
-           '--mode=' + mode]
+           './tools/clean_output_directory.py']
     print 'Clobbering %s' % (' '.join(cmd))
     RunProcess(cmd)
 
diff --git a/tools/build.py b/tools/build.py
index 22ecd55..c3f0449 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 #
@@ -28,7 +28,7 @@
   result.add_option("-v", "--verbose",
       help='Verbose output.',
       default=False, action="store_true")
-  result.add_option("--arch",
+  result.add_option("-a", "--arch",
       help='Target architectures (comma-separated).',
       metavar='[all,ia32,x64,simarm,arm]',
       default=utils.GuessArchitecture())
@@ -256,7 +256,6 @@
                   project_file,
                   '-target',
                   target,
-                  '-parallelizeTargets',
                   '-configuration',
                   build_config,
                   'SYMROOT=%s' % os.path.abspath('xcodebuild')
diff --git a/tools/clean_output_directory.py b/tools/clean_output_directory.py
index b125650..deee240 100755
--- a/tools/clean_output_directory.py
+++ b/tools/clean_output_directory.py
@@ -5,76 +5,13 @@
 # BSD-style license that can be found in the LICENSE file.
 #
 
-import optparse
 import shutil
 import sys
 import utils
 
-HOST_OS = utils.GuessOS()
-
-def BuildOptions():
-  result = optparse.OptionParser()
-  result.add_option("-m", "--mode",
-      help='Build variants (comma-separated).',
-      metavar='[all,debug,release]',
-      default='all')
-  result.add_option("--arch",
-      help='Target architectures (comma-separated).',
-      metavar='[all,ia32,x64,simarm,arm]',
-      default='all')
-  result.add_option("--os",
-    help='Target OSs (comma-separated).',
-    metavar='[all,host,android]',
-    default='all')
-  return result
-
-
-def ProcessOsOption(os):
-  if os == 'host':
-    return HOST_OS
-  return os
-
-
-def ProcessOptions(options):
-  if options.arch == 'all':
-    options.arch = 'ia32,x64'
-  if options.mode == 'all':
-    options.mode = 'release,debug'
-  if options.os == 'all':
-    options.os = 'host,android'
-  options.mode = options.mode.split(',')
-  options.arch = options.arch.split(',')
-  options.os = options.os.split(',')
-  for mode in options.mode:
-    if not mode in ['debug', 'release']:
-      print "Unknown mode %s" % mode
-      return False
-  for arch in options.arch:
-    if not arch in ['ia32', 'x64', 'simarm', 'arm']:
-      print "Unknown arch %s" % arch
-      return False
-  options.os = [ProcessOsOption(os) for os in options.os]
-  for os in options.os:
-    if not os in ['android', 'freebsd', 'linux', 'macos', 'win32']:
-      print "Unknown os %s" % os
-      return False
-  return True
-
 def Main():
-  parser = BuildOptions()
-  (options, args) = parser.parse_args()
-  if not ProcessOptions(options):
-    parser.print_help()
-    return 1
-
-  # Delete the output for the targets for each requested configuration.
-  for mode in options.mode:
-    for arch in options.arch:
-      for target_os in options.os:
-        build_root = utils.GetBuildRoot(
-            HOST_OS, mode=mode, arch=arch, target_os=target_os)
-        print "Deleting %s" % (build_root)
-        shutil.rmtree(build_root, ignore_errors=True)
+  build_root = utils.GetBuildRoot(utils.GuessOS())
+  shutil.rmtree(build_root, ignore_errors=True)
   return 0
 
 if __name__ == '__main__':
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index c42f3e8..a3235e8 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -25,7 +25,6 @@
 # ......_internal/
 # ......collection/
 # ......core/
-# ......coreimpl/
 # ......crypto/
 # ......html/
 # ......io/
@@ -102,23 +101,18 @@
   Copy(src, dest)
 
 
-def CopyDart2Js(build_dir, sdk_root, version):
+def CopyDartScripts(home, build_dir, sdk_root, version):
   if version:
     ReplaceInFiles([os.path.join(sdk_root, 'lib', '_internal', 'compiler',
                                  'implementation', 'compiler.dart')],
                    [(r"BUILD_ID = 'build number could not be determined'",
                      r"BUILD_ID = '%s'" % version)])
-  if utils.GuessOS() == 'win32':
-    dart2js = os.path.join(sdk_root, 'bin', 'dart2js.bat')
-    Copy(os.path.join(build_dir, 'dart2js.bat'), dart2js)
-    dartdoc = os.path.join(sdk_root, 'bin', 'dartdoc.bat')
-    Copy(os.path.join(build_dir, 'dartdoc.bat'), dartdoc)
-  else:
-    dart2js = os.path.join(sdk_root, 'bin', 'dart2js')
-    Copy(os.path.join(build_dir, 'dart2js'), dart2js)
-    dartdoc = os.path.join(sdk_root, 'bin', 'dartdoc')
-    Copy(os.path.join(build_dir, 'dartdoc'), dartdoc)
+  # TODO(dgrove) - add pub once issue 6619 is fixed
+  for executable in ['dart2js', 'dartdoc']:
+    CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
+                    os.path.join(sdk_root, 'bin'))
 
+  if utils.GuessOS() != 'win32':
     # TODO(ahe): Enable for Windows as well.
     subprocess.call([os.path.join(build_dir, 'gen_snapshot'),
                      '--script_snapshot=%s' %
@@ -180,6 +174,7 @@
     copymode(dart_analyzer_src_binary, dart_analyzer_dest_binary)
 
   # Create pub shell script.
+  # TODO(dgrove) - delete this once issue 6619 is fixed
   pub_src_script = join(HOME, 'utils', 'pub', 'sdk', 'pub')
   CopyShellScript(pub_src_script, BIN)
 
@@ -205,9 +200,10 @@
   #
 
   os.makedirs(join(LIB, 'html'))
-  for library in ['_internal', 'collection', 'core', 'coreimpl', 'crypto', 'io',
-                  'isolate', join('html', 'dart2js'), join('html', 'dartium'),
-                  'json', 'math', 'mirrors', 'scalarlist', 'uri', 'utf']:
+  for library in ['_internal', 'collection', 'core', 'crypto', 'io', 'isolate',
+                  join('html', 'dart2js'), join('html', 'dartium'), 'json',
+                  'math', 'mirrors', 'scalarlist', join('svg', 'dart2js'),
+                  join('svg', 'dartium'), 'uri', 'utf']:
     copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library),
              ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh'))
 
@@ -269,23 +265,11 @@
 
   version = utils.GetVersion()
 
-  # Copy dart2js.
-  CopyDart2Js(build_dir, SDK_tmp, version)
-
-  # TODO(dgrove) remove this once we get sdk/bin created
-  if (utils.GuessOS() == 'win32'):
-    ReplaceInFiles([join(SDK_tmp, 'bin', 'dart2js.bat'),
-                    join(SDK_tmp, 'bin', 'dartdoc.bat'),
-                    join(SDK_tmp, 'bin', 'pub.bat')],
-                   [(r'..\\..\\sdk\\lib', r'..\lib')])
-  else:
-    ReplaceInFiles([join(SDK_tmp, 'bin', 'dart2js'),
-                    join(SDK_tmp, 'bin', 'dartdoc'),
-                    join(SDK_tmp, 'bin', 'pub')],
-                   [('../../sdk/lib', '../lib')])
+  # Copy dart2js/dartdoc/pub.
+  CopyDartScripts(HOME, build_dir, SDK_tmp, version)
 
   # Fix up dartdoc.
-  # TODO(dgrove): Remove this once sdk and dart-sdk match.
+  # TODO(dgrove): Remove this once issue 6619 is fixed.
   ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc',
                        'bin', 'dartdoc.dart')],
                  [("../../../../../pkg/args/lib/args.dart",
diff --git a/tools/gyp/all.gypi b/tools/gyp/all.gypi
index 189b0c5..236d48e 100644
--- a/tools/gyp/all.gypi
+++ b/tools/gyp/all.gypi
@@ -11,6 +11,8 @@
     'component': 'static_library',
     'target_arch': 'ia32',
     'v8_location': '<(DEPTH)/third_party/v8',
+    # Flag that tells us whether to build native support for dart:io.
+    'dart_io_support': 1,
   },
   'conditions': [
     [ 'OS=="linux"', {
diff --git a/tools/gyp/common.gypi b/tools/gyp/common.gypi
index 084738f..861efe0 100644
--- a/tools/gyp/common.gypi
+++ b/tools/gyp/common.gypi
@@ -14,6 +14,8 @@
     'component': 'static_library',
     'target_arch': 'ia32',
     'v8_location': '<(DEPTH)/../third_party/v8',
+    # Flag that tells us whether to build native support for dart:io.
+    'dart_io_support': 1,
   },
   'conditions': [
     [ 'OS=="linux"', {
diff --git a/tools/gyp/configurations_xcode.gypi b/tools/gyp/configurations_xcode.gypi
index bdd99df..ce50d18 100644
--- a/tools/gyp/configurations_xcode.gypi
+++ b/tools/gyp/configurations_xcode.gypi
@@ -12,13 +12,22 @@
 # modify runtime/tools/gyp/runtime-configurations.gypi.
 
 {
+  'variables': {
+    # To switch to the LLVM based backend create a ~/.gyp/include.gypi
+    # including:
+    #
+    # {
+    #   'variables': {
+    #     'xcode_gcc_version': 'com.apple.compilers.llvmgcc42',
+    #   }
+    # }
+    'xcode_gcc_version%': '4.2',
+  },
   'target_defaults': {
     'configurations': {
       'Dart_Base': {
         'xcode_settings': {
-          # To switch to the LLVM based backend change the two lines below.
-          #'GCC_VERSION': 'com.apple.compilers.llvmgcc42',
-          'GCC_VERSION': '4.2',
+          'GCC_VERSION': '<(xcode_gcc_version)',
           'GCC_C_LANGUAGE_STANDARD': 'ansi',
           'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
           'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
diff --git a/tools/release/version.dart b/tools/release/version.dart
index 92ca624..7774e47 100644
--- a/tools/release/version.dart
+++ b/tools/release/version.dart
@@ -122,7 +122,7 @@
   int getRevisionFromSvnInfo(String info) {
     if (info == null || info == '') return 0;
     var lines = info.split("\n");
-    RegExp exp = const RegExp(r"Last Changed Rev: (\d*)");
+    RegExp exp = new RegExp(r"Last Changed Rev: (\d*)");
     for (var line in lines) {
       if (exp.hasMatch(line)) {
         String revisionString = (exp.firstMatch(line).group(1));
diff --git a/tools/test-runtime.dart b/tools/test-runtime.dart
index b9663ff..05aac40 100755
--- a/tools/test-runtime.dart
+++ b/tools/test-runtime.dart
@@ -50,7 +50,13 @@
   var verbose = firstConf['verbose'];
   var printTiming = firstConf['time'];
   var listTests = firstConf['list'];
-
+  
+  if (!firstConf['append_flaky_log'])  {
+    var file = new File(TestUtils.flakyFileName());
+    if (file.existsSync()) {
+      file.deleteSync();
+    }
+  }
   // Print the configurations being run by this execution of
   // test.dart. However, don't do it if the silent progress indicator
   // is used. This is only needed because of the junit tests.
diff --git a/tools/test.dart b/tools/test.dart
index 2e4990d..1fa5b0f 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -81,6 +81,13 @@
   var verbose = firstConf['verbose'];
   var printTiming = firstConf['time'];
   var listTests = firstConf['list'];
+  
+  if (!firstConf['append_flaky_log'])  {
+    var file = new File(TestUtils.flakyFileName());
+    if (file.existsSync()) {
+      file.deleteSync();
+    }
+  }
 
   // Print the configurations being run by this execution of
   // test.dart. However, don't do it if the silent progress indicator
diff --git a/tools/testing/dart/drt_updater.dart b/tools/testing/dart/drt_updater.dart
index 6713a88..c048263 100644
--- a/tools/testing/dart/drt_updater.dart
+++ b/tools/testing/dart/drt_updater.dart
@@ -39,7 +39,7 @@
     Path testScriptPath = new Path.fromNative(TestUtils.testScriptPath);
     Path updateScriptPath = testScriptPath.directoryPath.append(script);
     List<String> command = [updateScriptPath.toNativePath()];
-    if (null !== option) {
+    if (null != option) {
       command.add(option);
     }
     return command;
@@ -66,14 +66,14 @@
   String runtime = configuration['runtime'];
   if (runtime == 'drt' && configuration['drt'] == '') {
     // Download the default DumpRenderTree from Google Storage.
-    if (_dumpRenderTreeUpdater === null) {
+    if (_dumpRenderTreeUpdater == null) {
       _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree',
                                                    'get_archive.py', 'drt');
     }
     return _dumpRenderTreeUpdater;
   } else if (runtime == 'dartium' && configuration['dartium'] == '') {
     // Download the default Dartium from Google Storage.
-    if (_dartiumUpdater === null) {
+    if (_dartiumUpdater == null) {
       _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_archive.py',
                                             'dartium');
     }
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 34551db..10ad84a 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -159,7 +159,7 @@
   Path libraryDir = topLibrary.directoryPath;
   // Matches #import( or #source( followed by " or ' followed by anything
   // except dart:, dart-ext: or /, at the beginning of a line.
-  RegExp relativeImportRegExp = const RegExp(
+  RegExp relativeImportRegExp = new RegExp(
       '^#(import|source)[(]["\'](?!(dart:|dart-ext:|/))([^"\']*)["\']');
   while (!toSearch.isEmpty) {
     var thisPass = toSearch;
@@ -188,11 +188,8 @@
   return foundImports;
 }
 
-void DoMultitest(Path filePath,
-                 String outputDir,
-                 Path suiteDir,
-                 CreateTest doTest,
-                 VoidFunction multitestDone) {
+Future doMultitest(Path filePath, String outputDir, Path suiteDir,
+                   CreateTest doTest) {
   // Each new test is a single String value in the Map tests.
   Map<String, String> tests = new Map<String, String>();
   Map<String, Set<String>> outcomes = new Map<String, Set<String>>();
@@ -217,7 +214,7 @@
   }
 
   // Wait until all imports are copied before scheduling test cases.
-  Futures.wait(futureCopies).then((ignored) {
+  return Futures.wait(futureCopies).transform((_) {
     String baseFilename = filePath.filenameWithoutExtension;
     for (String key in tests.keys) {
       final Path multitestFilename =
@@ -241,7 +238,8 @@
              hasFatalTypeErrors: enableFatalTypeErrors,
              multitestOutcome: outcome);
     }
-    multitestDone();
+
+    return null;
   });
 }
 
diff --git a/tools/testing/dart/status_expression.dart b/tools/testing/dart/status_expression.dart
index e49dc6c..f5191fb 100644
--- a/tools/testing/dart/status_expression.dart
+++ b/tools/testing/dart/status_expression.dart
@@ -50,9 +50,9 @@
     : tokens = new List<String>();
 
   //  Tokens are : "(", ")", "$", ",", "&&", "||", "==", and (maximal) \w+.
-  static const testRegexp =
-      const RegExp(r"^([()$\w\s,]|(\&\&)|(\|\|)|(\=\=))+$");
-  static const regexp = const RegExp(r"[()$,]|(\&\&)|(\|\|)|(\=\=)|\w+");
+  static final testRegexp =
+      new RegExp(r"^([()$\w\s,]|(\&\&)|(\|\|)|(\=\=))+$");
+  static final regexp = new RegExp(r"[()$,]|(\&\&)|(\|\|)|(\=\=)|\w+");
 
   List<String> tokenize() {
     if (!testRegexp.hasMatch(expression)) {
@@ -234,7 +234,7 @@
       scanner.advance();
       return value;
     }
-    Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
+    Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
                   "Expected identifier in expression, got ${scanner.current}");
     SetExpression value = new SetConstant(scanner.current);
     scanner.advance();
@@ -278,13 +278,13 @@
     Expect.equals(scanner.current, Token.DOLLAR_SYMBOL,
         "Expected \$ in expression, got ${scanner.current}");
     scanner.advance();
-    Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
+    Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
         "Expected identifier in expression, got ${scanner.current}");
     TermVariable left = new TermVariable(scanner.current);
     scanner.advance();
     if (scanner.current == Token.EQUALS) {
       scanner.advance();
-      Expect.isTrue(const RegExp(r"^\w+$").hasMatch(scanner.current),
+      Expect.isTrue(new RegExp(r"^\w+$").hasMatch(scanner.current),
           "Expected identifier in expression, got ${scanner.current}");
       TermConstant right = new TermConstant(scanner.current);
       scanner.advance();
diff --git a/tools/testing/dart/status_file_parser.dart b/tools/testing/dart/status_file_parser.dart
index c3b70d8..5d3cee6 100644
--- a/tools/testing/dart/status_file_parser.dart
+++ b/tools/testing/dart/status_file_parser.dart
@@ -23,9 +23,9 @@
  */
 const SLOW = "slow";
 
-const RegExp StripComment = const RegExp("^[^#]*");
-const RegExp HeaderPattern = const RegExp(r"^\[([^\]]+)\]");
-const RegExp RulePattern = const RegExp(r"\s*([^: ]*)\s*:(.*)");
+final RegExp StripComment = new RegExp("^[^#]*");
+final RegExp HeaderPattern = new RegExp(r"^\[([^\]]+)\]");
+final RegExp RulePattern = new RegExp(r"\s*([^: ]*)\s*:(.*)");
 
 // TODO(whesse): Implement configuration_info library that contains data
 // structures for test configuration, including Section.
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 97301ea..0b1ee54 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -268,7 +268,15 @@
               ['-n', '--nobatch'],
               [],
               false,
-              'bool')];
+              'bool'),
+          new _TestOptionSpecification(
+              'append_flaky_log',
+              'Do not delete the old flaky log but rather append to it.',
+              ['--append_flaky_log'],
+              [],
+              false,
+              'bool'
+              ),];
   }
 
 
@@ -416,7 +424,7 @@
         validRuntimes = const ['vm', 'drt', 'dartium'];
         break;
     }
-    if (!Contains(config['runtime'], validRuntimes)) {
+    if (!validRuntimes.contains(config['runtime'])) {
       isValid = false;
       print("Warning: combination of ${config['compiler']} and "
           "${config['runtime']} is invalid. Skipping this combination.");
@@ -433,7 +441,7 @@
             "${config['shards']} shards");
     }
     if (config['runtime'] == 'dartium' &&
-        Contains(config['compiler'], const ['none', 'dart2dart']) &&
+        const ['none', 'dart2dart'].contains(config['compiler']) &&
         config['checked']) {
       // TODO(vsm): Set the DART_FLAGS environment appropriately when
       // invoking Selenium to support checked mode.  It's not clear
@@ -544,7 +552,7 @@
     } else {
       // All runtimes eventually go through this path, after expansion.
       var updater = runtimeUpdater(configuration);
-      if (updater !== null) {
+      if (updater != null) {
         updater.update();
       }
     }
@@ -569,9 +577,12 @@
           if (configuration['checked']) {
             timeout *= 2;
           }
-          if (Contains(configuration['runtime'],
-                       const ['ie9', 'ie10', 'ff', 'chrome', 'safari',
-                              'opera'])) {
+
+          const BROWSERS = const [
+            'ie9', 'ie10', 'ff', 'chrome', 'safari', 'opera'
+          ];
+
+          if (BROWSERS.contains(configuration['runtime'])) {
             timeout *= 8; // Allow additional time for browser testing to run.
           }
           break;
@@ -579,7 +590,7 @@
           if (configuration['mode'] == 'debug') {
             timeout *= 2;
           }
-          if (Contains(configuration['runtime'], const ['drt', 'dartium'])) {
+          if (const ['drt', 'dartium'].contains(configuration['runtime'])) {
             timeout *= 4; // Allow additional time for browser testing to run.
           }
           break;
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 44c94c8..68ee945 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -7,6 +7,7 @@
 #import("dart:io");
 #import("test_runner.dart");
 #import("test_suite.dart");
+#import("status_file_parser.dart");
 
 class ProgressIndicator {
   ProgressIndicator(this._startTime, this._printTiming)
@@ -45,7 +46,15 @@
   }
 
   void done(TestCase test) {
-    if (test.output.unexpectedOutput) {
+    if (test.isFlaky && test.lastCommandOutput.result != PASS) {
+      var buf = new StringBuffer();
+      for (var l in _buildFailureOutput(test)) {
+        buf.add("$l\n");
+      }
+      _appendToFlakyFile(buf.toString());
+    }
+
+    if (test.lastCommandOutput.unexpectedOutput) {
       _failedTests++;
       _printFailureOutput(test);
     } else {
@@ -64,16 +73,17 @@
 
   void _printTimingInformation() {
     if (_printTiming) {
+      // TODO: We should take all the commands into account
       Duration d = (new Date.now()).difference(_startTime);
       print('\n--- Total time: ${_timeString(d)} ---');
       _tests.sort((a, b) {
-        Duration aDuration = a.output.time;
-        Duration bDuration = b.output.time;
+        Duration aDuration = a.lastCommandOutput.time;
+        Duration bDuration = b.lastCommandOutput.time;
         return bDuration.inMilliseconds - aDuration.inMilliseconds;
       });
       for (int i = 0; i < 20 && i < _tests.length; i++) {
         var name = _tests[i].displayName;
-        var duration = _tests[i].output.time;
+        var duration = _tests[i].lastCommandOutput.time;
         var configuration = _tests[i].configurationString;
         print('${duration} - $configuration $name');
       }
@@ -120,6 +130,14 @@
   String _header(String header) => header;
 
   void _printFailureOutput(TestCase test) {
+    var failureOutput = _buildFailureOutput(test);
+    for (var line in failureOutput) {
+      print(line);
+    }
+    _failureSummary.addAll(failureOutput);
+  }
+  
+  List<String> _buildFailureOutput(TestCase test) {
     List<String> output = new List<String>();
     output.add('');
     output.add(_header('FAILED: ${test.configurationString}'
@@ -130,9 +148,9 @@
       expected.add('$expectation ');
     }
     output.add(expected.toString());
-    output.add('Actual: ${test.output.result}');
-    if (!test.output.hasTimedOut && test.info != null) {
-      if (test.output.incomplete && !test.info.hasCompileError) {
+    output.add('Actual: ${test.lastCommandOutput.result}');
+    if (!test.lastCommandOutput.hasTimedOut && test.info != null) {
+      if (test.lastCommandOutput.incomplete && !test.info.hasCompileError) {
         output.add('Unexpected compile-time error.');
       } else {
         if (test.info.hasCompileError) {
@@ -143,24 +161,24 @@
         }
       }
     }
-    if (!test.output.diagnostics.isEmpty) {
+    if (!test.lastCommandOutput.diagnostics.isEmpty) {
       String prefix = 'diagnostics:';
-      for (var s in test.output.diagnostics) {
+      for (var s in test.lastCommandOutput.diagnostics) {
         output.add('$prefix ${s}');
         prefix = '   ';
       }
     }
-    if (!test.output.stdout.isEmpty) {
+    if (!test.lastCommandOutput.stdout.isEmpty) {
       output.add('');
       output.add('stdout:');
-      for (var s in test.output.stdout) {
+      for (var s in test.lastCommandOutput.stdout) {
         output.add(s);
       }
     }
-    if (!test.output.stderr.isEmpty) {
+    if (!test.lastCommandOutput.stderr.isEmpty) {
       output.add('');
       output.add('stderr:');
-      for (var s in test.output.stderr) {
+      for (var s in test.lastCommandOutput.stderr) {
         output.add(s);
       }
     }
@@ -170,10 +188,7 @@
           ? "Command line" : "Compilation command");
       output.add('$message: ${c.commandLine}');
     }
-    for (String line in output) {
-      print(line);
-    }
-    _failureSummary.addAll(output);
+    return output;
   }
 
   void _printFailureSummary() {
@@ -196,6 +211,13 @@
     }
   }
 
+  void _appendToFlakyFile(String msg) {
+    var file = new File(TestUtils.flakyFileName());
+    var fd = file.openSync(FileMode.APPEND);
+    fd.writeStringSync(msg);
+    fd.closeSync();
+  }
+
   int get numFailedTests => _failedTests;
 
   int _completedTests() => _passedTests + _failedTests;
@@ -326,7 +348,7 @@
 
   void _printDoneProgress(TestCase test) {
     var status = 'pass';
-    if (test.output.unexpectedOutput) {
+    if (test.lastCommandOutput.unexpectedOutput) {
       status = 'fail';
     }
     print('Done ${test.configurationString} ${test.displayName}: $status');
@@ -344,7 +366,7 @@
 
   void _printDoneProgress(TestCase test) {
     var status = 'pass';
-    if (test.output.unexpectedOutput) {
+    if (test.lastCommandOutput.unexpectedOutput) {
       status = 'fail';
     }
     print('Done ${test.configurationString} ${test.displayName}: $status');
@@ -375,7 +397,7 @@
 
   void _printDoneProgress(TestCase test) {
     var status = 'pass';
-    if (test.output.unexpectedOutput) {
+    if (test.lastCommandOutput.unexpectedOutput) {
       status = 'fail';
     }
     var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
@@ -400,11 +422,11 @@
       : super(startTime, printTiming);
 
   void _printFailureOutput(TestCase test) {
-    String status = '${test.displayName}: ${test.output.result}';
+    String status = '${test.displayName}: ${test.lastCommandOutput.result}';
     List<String> configs =
         statusToConfigs.putIfAbsent(status, () => <String>[]);
     configs.add(test.configurationString);
-    if (test.output.hasTimedOut) {
+    if (test.lastCommandOutput.hasTimedOut) {
       print('\n${test.displayName} timed out on ${test.configurationString}');
     }
   }
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index c270a10..30f5259 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -56,26 +56,27 @@
  * contains static information about the test; actually running the test is
  * performed by [ProcessQueue] using a [RunningProcess] object.
  *
- * The output information is stored in a [TestOutput] instance contained
- * in the TestCase. The TestOutput instance is responsible for evaluating
- * if the test has passed, failed, crashed, or timed out, and the TestCase
- * has information about what the expected result of the test should be.
+ * The output information is stored in a [CommandOutput] instance contained
+ * in TestCase.commandOutputs. The last CommandOutput instance is responsible
+ * for evaluating if the test has passed, failed, crashed, or timed out, and the
+ * TestCase has information about what the expected result of the test should
+ * be.
  *
  * The TestCase has a callback function, [completedHandler], that is run when
  * the test is completed.
  */
 class TestCase {
   /**
-   * A list of commands to execute. Most test cases have a single command. Frog
-   * tests have two commands, one to compilate the source and another to execute
-   * it. Some isolate tests might even have three, if they require compiling
-   * multiple sources that are run in isolation.
+   * A list of commands to execute. Most test cases have a single command. 
+   * Dart2js tests have two commands, one to compile the source and another
+   * to execute it. Some isolate tests might even have three, if they require
+   * compiling multiple sources that are run in isolation.
    */
   List<Command> commands;
+  Map<Command, CommandOutput> commandOutputs = new Map<Command,CommandOutput>();
 
   Map configuration;
   String displayName;
-  TestOutput output;
   bool isNegative;
   Set<String> expectedOutcomes;
   TestCaseEvent completedHandler;
@@ -144,6 +145,15 @@
     }
   }
 
+  CommandOutput get lastCommandOutput {
+    if (commandOutputs.length == 0) {
+      throw new Exception("CommandOutputs is empty, maybe no command was run? ("
+                          "displayName: '$displayName', "
+                          "configurationString: '$configurationString')");
+    }
+    return commandOutputs[commands[commandOutputs.length - 1]];
+  }
+
   int get timeout {
     if (expectedOutcomes.contains(SLOW)) {
       return configuration['timeout'] * SLOW_TIMEOUT_MULTIPLIER;
@@ -167,6 +177,17 @@
   bool get usesWebDriver => TestUtils.usesWebDriver(configuration['runtime']);
 
   void completed() { completedHandler(this); }
+
+  bool get isFlaky {
+      if (expectedOutcomes.contains(SKIP)) {
+        return false;
+      }
+
+      var flags = new Set.from(expectedOutcomes);
+      flags..remove(TIMEOUT)
+           ..remove(SLOW);
+      return flags.contains(PASS) && flags.length > 1;
+  }
 }
 
 
@@ -182,11 +203,25 @@
    */
   int numRetries;
 
+  /**
+   * True if this test is dependent on another test completing before it can
+   * star (for example, we might need to depend on some other test completing
+   * first).
+   */
+  bool waitingForOtherTest;
+  
+  /**
+   * The set of test cases that wish to be notified when this test has
+   * completed.
+   */
+  List<BrowserTestCase> observers;
+
   BrowserTestCase(displayName, commands, configuration, completedHandler,
-      expectedOutcomes, info, isNegative)
+      expectedOutcomes, info, isNegative, [this.waitingForOtherTest = false])
     : super(displayName, commands, configuration, completedHandler,
         expectedOutcomes, isNegative: isNegative, info: info) {
     numRetries = 2; // Allow two retries to compensate for flaky browser tests.
+    observers = [];
   }
 
   List<String> get _lastArguments => commands.last.arguments;
@@ -195,25 +230,47 @@
 
   List<String> get batchTestArguments =>
       _lastArguments.getRange(1, _lastArguments.length - 1);
+
+  /** Add a test case to listen for when this current test has completed. */
+  void addObserver(BrowserTestCase testCase) {
+    observers.add(testCase);
+  }
+
+  /**
+   * Notify all of the test cases that are dependent on this one that they can
+   * proceed.
+   */
+  void notifyObservers() {
+    for (BrowserTestCase testCase in observers) {
+      testCase.waitingForOtherTest = false;
+    }
+  }
 }
 
 
 /**
- * TestOutput records the output of a completed test: the process's exit code,
- * the standard output and standard error, whether the process timed out, and
- * the time the process took to run.  It also contains a pointer to the
+ * CommandOutput records the output of a completed command: the process's exit 
+ * code, the standard output and standard error, whether the process timed out,
+ * and the time the process took to run.  It also contains a pointer to the
  * [TestCase] this is the output of.
  */
-abstract class TestOutput {
-  factory TestOutput.fromCase(TestCase testCase,
-                              int exitCode,
-                              bool incomplete,
-                              bool timedOut,
-                              List<String> stdout,
-                              List<String> stderr,
-                              Duration time) {
-    return new TestOutputImpl.fromCase(
-        testCase, exitCode, incomplete, timedOut, stdout, stderr, time);
+abstract class CommandOutput {
+  factory CommandOutput.fromCase(TestCase testCase,
+                                 Command command,
+                                 int exitCode,
+                                 bool incomplete,
+                                 bool timedOut,
+                                 List<String> stdout,
+                                 List<String> stderr,
+                                 Duration time) {
+    return new CommandOutputImpl.fromCase(testCase, 
+                                          command,
+                                          exitCode,
+                                          incomplete,
+                                          timedOut,
+                                          stdout,
+                                          stderr,
+                                          time);
   }
 
   bool get incomplete;
@@ -241,7 +298,7 @@
   List<String> get diagnostics;
 }
 
-class TestOutputImpl implements TestOutput {
+class CommandOutputImpl implements CommandOutput {
   TestCase testCase;
   int exitCode;
 
@@ -267,34 +324,53 @@
    */
   bool requestRetry = false;
 
-  // Don't call this constructor, call TestOutput.fromCase() to
+  // Don't call this constructor, call CommandOutput.fromCase() to
   // get a new TestOutput instance.
-  TestOutputImpl(TestCase this.testCase,
-                 int this.exitCode,
-                 bool this.incomplete,
-                 bool this.timedOut,
-                 List<String> this.stdout,
-                 List<String> this.stderr,
-                 Duration this.time) {
-    testCase.output = this;
+  CommandOutputImpl(TestCase this.testCase,
+                    Command command,
+                    int this.exitCode,
+                    bool this.incomplete,
+                    bool this.timedOut,
+                    List<String> this.stdout,
+                    List<String> this.stderr,
+                    Duration this.time) {
+    testCase.commandOutputs[command] = this;
     diagnostics = [];
   }
-  factory TestOutputImpl.fromCase(TestCase testCase,
-                                  int exitCode,
-                                  bool incomplete,
-                                  bool timedOut,
-                                  List<String> stdout,
-                                  List<String> stderr,
-                                  Duration time) {
+  factory CommandOutputImpl.fromCase(TestCase testCase,
+                                     Command command,
+                                     int exitCode,
+                                     bool incomplete,
+                                     bool timedOut,
+                                     List<String> stdout,
+                                     List<String> stderr,
+                                     Duration time) {
     if (testCase is BrowserTestCase) {
-      return new BrowserTestOutputImpl(testCase, exitCode, incomplete,
-          timedOut, stdout, stderr, time);
+      return new BrowserCommandOutputImpl(testCase,
+                                          command,
+                                          exitCode, 
+                                          incomplete,
+                                          timedOut,
+                                          stdout,
+                                          stderr,
+                                          time);
     } else if (testCase.configuration['compiler'] == 'dartc') {
-      return new AnalysisTestOutputImpl(testCase, exitCode, timedOut,
-          stdout, stderr, time);
+      return new AnalysisCommandOutputImpl(testCase,
+                                           command,
+                                           exitCode,
+                                           timedOut,
+                                           stdout,
+                                           stderr,
+                                           time);
     }
-    return new TestOutputImpl(testCase, exitCode, incomplete, timedOut,
-        stdout, stderr, time);
+    return new CommandOutputImpl(testCase,
+                                 command,
+                                 exitCode,
+                                 incomplete, 
+                                 timedOut,
+                                 stdout,
+                                 stderr,
+                                 time);
   }
 
   String get result =>
@@ -334,10 +410,24 @@
 
 }
 
-class BrowserTestOutputImpl extends TestOutputImpl {
-  BrowserTestOutputImpl(testCase, exitCode, incomplete,
-                        timedOut, stdout, stderr, time) :
-    super(testCase, exitCode, incomplete, timedOut, stdout, stderr, time);
+class BrowserCommandOutputImpl extends CommandOutputImpl {
+  BrowserCommandOutputImpl(
+      testCase,
+      command,
+      exitCode,
+      incomplete,
+      timedOut,
+      stdout,
+      stderr,
+      time) :
+    super(testCase,
+          command,
+          exitCode,
+          incomplete,
+          timedOut,
+          stdout,
+          stderr,
+          time);
 
   bool get didFail {
     // Browser case:
@@ -380,7 +470,7 @@
 // The static analyzer does not actually execute code, so
 // the criteria for success now depend on the text sent
 // to stderr.
-class AnalysisTestOutputImpl extends TestOutputImpl {
+class AnalysisCommandOutputImpl extends CommandOutputImpl {
   // An error line has 8 fields that look like:
   // ERROR|COMPILER|MISSING_SOURCE|file:/tmp/t.dart|15|1|24|Missing source.
   final int ERROR_LEVEL = 0;
@@ -389,8 +479,14 @@
 
   bool alreadyComputed = false;
   bool failResult;
-  AnalysisTestOutputImpl(testCase, exitCode, timedOut, stdout, stderr, time) :
-    super(testCase, exitCode, false, timedOut, stdout, stderr, time);
+  AnalysisCommandOutputImpl(testCase,
+                            command,
+                            exitCode,
+                            timedOut,
+                            stdout, 
+                            stderr,
+                            time) :
+    super(testCase, command, exitCode, false, timedOut, stdout, stderr, time);
 
   bool get didFail {
     if (!alreadyComputed) {
@@ -543,7 +639,7 @@
  * A RunningProcess actually runs a test, getting the command lines from
  * its [TestCase], starting the test process (and first, a compilation
  * process if the TestCase is a [BrowserTestCase]), creating a timeout
- * timer, and recording the results in a new [TestOutput] object, which it
+ * timer, and recording the results in a new [CommandOutput] object, which it
  * attaches to the TestCase.  The lifetime of the RunningProcess is limited
  * to the time it takes to start the process, run the process, and record
  * the result; there are no pointers to it, so it should be available to
@@ -567,29 +663,25 @@
       [this.allowRetries = false, this.processQueue]);
 
   /**
-   * Called when all commands are executed. [exitCode] is 0 if all command
-   * succeded, otherwise it will have the exit code of the first failing
-   * command.
+   * Called when all commands are executed. 
    */
-  void testComplete(int exitCode, bool incomplete) {
-    new TestOutput.fromCase(testCase, exitCode, incomplete, timedOut, stdout,
-                            stderr, new Date.now().difference(startTime));
+  void testComplete(CommandOutput lastCommandOutput) {
     timeoutTimer.cancel();
-    if (testCase.output.unexpectedOutput
+    if (lastCommandOutput.unexpectedOutput
         && testCase.configuration['verbose'] != null
         && testCase.configuration['verbose']) {
       print(testCase.displayName);
-      for (var line in testCase.output.stderr) print(line);
-      for (var line in testCase.output.stdout) print(line);
+      for (var line in lastCommandOutput.stderr) print(line);
+      for (var line in lastCommandOutput.stdout) print(line);
     }
     if (allowRetries && testCase.usesWebDriver
-        && testCase.output.unexpectedOutput
+        && lastCommandOutput.unexpectedOutput
         && (testCase as BrowserTestCase).numRetries > 0) {
       // Selenium tests can be flaky. Try rerunning.
-      testCase.output.requestRetry = true;
+      lastCommandOutput.requestRetry = true;
     }
-    if (testCase.output.requestRetry) {
-      testCase.output.requestRetry = false;
+    if (lastCommandOutput.requestRetry) {
+      lastCommandOutput.requestRetry = false;
       this.timedOut = false;
       (testCase as BrowserTestCase).numRetries--;
       print("Potential flake. Re-running ${testCase.displayName} "
@@ -608,7 +700,7 @@
    * treats all but the last command as compilation steps. The last command is
    * the actual test and its output is analyzed in [testComplete].
    */
-  void stepExitHandler(int exitCode) {
+  void commandComplete(Command command, int exitCode) {
     process = null;
     int totalSteps = testCase.commands.length;
     String suffix =' (step $currentStep of $totalSteps)';
@@ -616,15 +708,16 @@
       // Non-webdriver test timed out before it could complete. Webdriver tests
       // run their own timeouts by timing from the launch of the browser (which
       // could be delayed).
-      testComplete(0, true);
+      testComplete(createCommandOutput(command, 0, true));
     } else if (currentStep == totalSteps) {
       // Done with all test commands.
-      testComplete(exitCode, false);
+      testComplete(createCommandOutput(command, exitCode, false));
     } else if (exitCode != 0) {
       // One of the steps failed.
       stderr.add('test.dart: Compilation failed$suffix, exit code $exitCode\n');
-      testComplete(exitCode, true);
+      testComplete(createCommandOutput(command, exitCode, true));
     } else {
+      createCommandOutput(command, exitCode, true);
       // One compilation step successfully completed, move on to the
       // next step.
       stderr.add('test.dart: Compilation finished $suffix\n');
@@ -638,11 +731,35 @@
         timeoutTimer.cancel();
         processQueue._getBatchRunner(testCase).startTest(testCase);
       } else {
-        runCommand(testCase.commands[currentStep++], stepExitHandler);
+        runCommand(testCase.commands[currentStep++], commandComplete);
       }
     }
   }
 
+  /**
+   * Called for all executed commands.
+   */
+  CommandOutput createCommandOutput(Command command,
+                                    int exitCode,
+                                    bool incomplete) {
+    var commandOutput = new CommandOutput.fromCase(
+        testCase,
+        command,
+        exitCode,
+        incomplete,
+        timedOut,
+        stdout,
+        stderr,
+        new Date.now().difference(startTime));
+    resetLocalOutputInformation();
+    return commandOutput;
+  }
+
+  void resetLocalOutputInformation() {
+    stdout = new List<String>();
+    stderr = new List<String>();
+  }
+  
   VoidFunction makeReadHandler(StringInputStream source,
                                List<String> destination) {
     void handler () {
@@ -658,18 +775,21 @@
 
   void start() {
     Expect.isFalse(testCase.expectedOutcomes.contains(SKIP));
-    stdout = new List<String>();
-    stderr = new List<String>();
+    resetLocalOutputInformation();
     currentStep = 0;
     startTime = new Date.now();
-    runCommand(testCase.commands[currentStep++], stepExitHandler);
+    runCommand(testCase.commands[currentStep++], commandComplete);
   }
 
-  void runCommand(Command command, void exitHandler(int exitCode)) {
+  void runCommand(Command command, void commandCompleteHandler(Command, int)) {
+    void processExitHandler(int returnCode) {
+      commandCompleteHandler(command, returnCode);
+    }
+    
     Future processFuture = Process.start(command.executable, command.arguments);
     processFuture.then((Process p) {
       process = p;
-      process.onExit = exitHandler;
+      process.onExit = processExitHandler;
       var stdoutStringStream = new StringInputStream(process.stdout);
       var stderrStringStream = new StringInputStream(process.stderr);
       stdoutStringStream.onLine =
@@ -688,7 +808,7 @@
       print("Process error:");
       print("  Command: $command");
       print("  Error: $e");
-      testComplete(-1, false);
+      testComplete(createCommandOutput(command, -1, false));
       return true;
     });
   }
@@ -719,6 +839,7 @@
 }
 
 class BatchRunnerProcess {
+  Command _command;
   String _executable;
   List<String> _batchArguments;
 
@@ -739,6 +860,7 @@
   bool _isWebDriver;
 
   BatchRunnerProcess(TestCase testCase) {
+    _command = testCase.commands.last;
     _executable = testCase.commands.last.executable;
     _batchArguments = testCase.batchRunnerArguments;
     _isWebDriver = testCase.usesWebDriver;
@@ -749,7 +871,8 @@
   void startTest(TestCase testCase) {
     Expect.isNull(_currentTest);
     _currentTest = testCase;
-    if (_process === null) {
+    _command = testCase.commands.last;
+    if (_process == null) {
       // Start process if not yet started.
       _executable = testCase.commands.last.executable;
       _startProcess(() {
@@ -829,10 +952,14 @@
     var exitCode = 0;
     if (outcome == "CRASH") exitCode = -10;
     if (outcome == "FAIL" || outcome == "TIMEOUT") exitCode = 1;
-    new TestOutput.fromCase(_currentTest, exitCode, false,
-                            (outcome == "TIMEOUT"),
-                            _testStdout, _testStderr,
-                            new Date.now().difference(_startTime));
+    new CommandOutput.fromCase(_currentTest,
+                               _command,
+                               exitCode,
+                               false,
+                               (outcome == "TIMEOUT"),
+                               _testStdout,
+                               _testStderr,
+                               new Date.now().difference(_startTime));
     var test = _currentTest;
     _currentTest = null;
     test.completed();
@@ -1076,8 +1203,8 @@
    * True if we are using a browser + platform combination that needs the
    * Selenium server jar.
    */
-  bool get _needsSelenium => Platform.operatingSystem == 'macos' &&
-      browserUsed == 'safari';
+  bool get _needsSelenium => (Platform.operatingSystem == 'macos' &&
+      browserUsed == 'safari') || browserUsed == 'opera';
 
   /** True if the Selenium Server is ready to be used. */
   bool get _isSeleniumAvailable => _seleniumServer != null ||
@@ -1113,7 +1240,7 @@
         stdoutStringStream.onLine = () {
           var line = stdoutStringStream.readLine();
           while (null != line) {
-            var regexp = const RegExp(r".*selenium-server-standalone.*");
+            var regexp = new RegExp(r".*selenium-server-standalone.*");
             if (regexp.hasMatch(line)) {
               _seleniumAlreadyRunning = true;
               resumeTesting();
@@ -1156,8 +1283,8 @@
       if (source.closed) return;  // TODO(whesse): Remove when bug is fixed.
       var line = source.readLine();
       while (null != line) {
-        if (const RegExp(r".*Started.*Server.*").hasMatch(line) ||
-            const RegExp(r"Exception.*Selenium is already running.*").hasMatch(
+        if (new RegExp(r".*Started.*Server.*").hasMatch(line) ||
+            new RegExp(r"Exception.*Selenium is already running.*").hasMatch(
             line)) {
           resumeTesting();
         }
@@ -1179,7 +1306,7 @@
     filePath = '${filePath.substring(0, index)}${pathSep}testing${pathSep}';
     var lister = new Directory(filePath).list();
     lister.onFile = (String file) {
-      if (const RegExp(r"selenium-server-standalone-.*\.jar").hasMatch(file)
+      if (new RegExp(r"selenium-server-standalone-.*\.jar").hasMatch(file)
           && _seleniumServer == null) {
         Future processFuture = Process.start('java', ['-jar', file]);
         processFuture.then((Process server) {
@@ -1249,11 +1376,12 @@
         print(Strings.join(fields, '\t'));
         return;
       }
-      if (test.usesWebDriver && _needsSelenium && !_isSeleniumAvailable) {
-        // The server is not ready to run Selenium tests. Put the test back in
+      if (test.usesWebDriver && _needsSelenium && !_isSeleniumAvailable || (test
+          is BrowserTestCase && test.waitingForOtherTest)) {
+        // The test is not yet ready to run. Put the test back in
         // the queue.  Avoid spin-polling by using a timeout.
         _tests.add(test);
-        new Timer(1000, (timer) {_tryRunTest();});  // Don't lose a process.
+        new Timer(100, (timer) {_tryRunTest();});  // Don't lose a process.
         return;
       }
       if (_verbose) {
@@ -1268,12 +1396,18 @@
       void wrapper(TestCase test_arg) {
         _numProcesses--;
         _progress.done(test_arg);
+        if (test_arg is BrowserTestCase) test_arg.notifyObservers();
         _tryRunTest();
         oldCallback(test_arg);
       };
       test.completedHandler = wrapper;
-      if (test.configuration['compiler'] == 'dartc' &&
-          test.displayName != 'dartc/junit_tests') {
+
+      if ((test.configuration['compiler'] == 'dartc' &&
+           test.displayName != 'dartc/junit_tests') ||
+          (test.commands.length == 1 && test.usesWebDriver &&
+           !test.configuration['noBatch'])) {
+        // Dartc and browser test cases that do not require a precompilation
+        // step, start with the batch runner right away.
         _getBatchRunner(test).startTest(test);
       } else {
         // Once we've actually failed a test, technically, we wouldn't need to
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index cf13237..84fd882 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -40,6 +40,56 @@
 typedef void VoidFunction();
 
 /**
+ * Calls [function] asynchronously. Returns a future that completes with the
+ * result of the function. If the function is `null`, returns a future that
+ * completes immediately with `null`.
+ */
+Future asynchronously(function()) {
+  if (function == null) return new Future.immediate(null);
+
+  var completer = new Completer();
+  new Timer(0, (_) {
+    completer.complete(function());
+  });
+
+  return completer.future;
+}
+
+/** A completer that waits until all added [Future]s complete. */
+// TODO(rnystrom): Copied from web_components. Remove from here when it gets
+// added to dart:core. (See #6626.)
+class FutureGroup {
+  const _FINISHED = -1;
+  int _pending = 0;
+  Completer<List> _completer = new Completer<List>();
+  final List<Future> futures = <Future>[];
+
+  /**
+   * Wait for [task] to complete (assuming this barrier has not already been
+   * marked as completed, otherwise you'll get an exception indicating that a
+   * future has already been completed).
+   */
+  void add(Future task) {
+    if (_pending == _FINISHED) {
+      throw new FutureAlreadyCompleteException();
+    }
+    _pending++;
+    futures.add(task);
+    task.handleException(
+        (e) => _completer.completeException(e, task.stackTrace));
+    task.then((_) {
+      _pending--;
+      if (_pending == 0) {
+        _pending = _FINISHED;
+        _completer.complete(futures);
+      }
+    });
+  }
+
+  Future<List> get future => _completer.future;
+}
+
+/**
  * A TestSuite represents a collection of tests.  It creates a [TestCase]
  * object for each test to be run, and passes the test cases to a callback.
  *
@@ -47,6 +97,129 @@
  * and a status file containing the expected results when these tests are run.
  */
 abstract class TestSuite {
+  final Map configuration;
+  final String suiteName;
+
+  TestSuite(this.configuration, this.suiteName);
+
+  /**
+   * The output directory for this suite's configuration.
+   */
+  String get buildDir {
+    var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release';
+    var arch = configuration['arch'].toUpperCase();
+    return "${TestUtils.outputDir(configuration)}$mode$arch";
+  }
+
+  /**
+   * The path to the compiler for this suite's configuration. Returns `null` if
+   * no compiler should be used.
+   */
+  String get compilerPath {
+    if (configuration['compiler'] == 'none') {
+      return null;  // No separate compiler for dartium tests.
+    }
+    var name = '$buildDir/${compilerName}';
+    if (!(new File(name)).existsSync() && !configuration['list']) {
+      throw "Executable '$name' does not exist";
+    }
+    return name;
+  }
+
+  /**
+   * The name of the compiler for this suite's configuration. Throws an error
+   * if the configuration does not use a compiler.
+   */
+  String get compilerName {
+    switch (configuration['compiler']) {
+      case 'dartc':
+      case 'dart2js':
+      case 'dart2dart':
+        return executableName;
+      default:
+        throw "Unknown compiler for: ${configuration['compiler']}";
+    }
+  }
+
+  /**
+   * The file name of the executable used to run this suite's tests.
+   */
+  String get executableName {
+    String suffix = getExecutableSuffix(configuration['compiler']);
+    switch (configuration['compiler']) {
+      case 'none':
+        return 'dart$suffix';
+      case 'dartc':
+        return 'analyzer/bin/dart_analyzer$suffix';
+      case 'dart2js':
+      case 'dart2dart':
+        var prefix = '';
+        if (configuration['use_sdk']) {
+          prefix = 'dart-sdk/bin/';
+        }
+        if (configuration['host_checked']) {
+          // The script dart2js_developer is not in the SDK.
+          return 'dart2js_developer$suffix';
+        } else {
+          return '${prefix}dart2js$suffix';
+        }
+        break;
+      default:
+        throw "Unknown executable for: ${configuration['compiler']}";
+    }
+  }
+
+  /**
+   * The file name of the d8 executable.
+   */
+  String get d8FileName {
+    var suffix = getExecutableSuffix('d8');
+    var d8 = '$buildDir/d8$suffix';
+    TestUtils.ensureExists(d8, configuration);
+    return d8;
+  }
+
+  String get dartShellFileName {
+    var name = configuration['dart'];
+    if (name == '') {
+      name = '$buildDir/$executableName';
+    }
+    TestUtils.ensureExists(name, configuration);
+    return name;
+  }
+
+  String get jsShellFileName {
+    var executableSuffix = getExecutableSuffix('jsshell');
+    var executable = 'jsshell$executableSuffix';
+    var jsshellDir = '${TestUtils.dartDir()}/tools/testing/bin';
+    return '$jsshellDir/$executable';
+  }
+
+  /**
+   * The file name of the Dart VM executable.
+   */
+  String get vmFileName {
+    var suffix = getExecutableSuffix('vm');
+    var vm = '$buildDir/dart$suffix';
+    TestUtils.ensureExists(vm, configuration);
+    return vm;
+  }
+
+  /**
+   * The file extension (if any) that should be added to the given executable
+   * name for the current platform.
+   */
+  String getExecutableSuffix(String executable) {
+    if (Platform.operatingSystem == 'windows') {
+      if (executable == 'd8' || executable == 'vm' || executable == 'none') {
+        return '.exe';
+      } else {
+        return '.bat';
+      }
+    }
+    return '';
+  }
+
   /**
    * Call the callback function onTest with a [TestCase] argument for each
    * test in the suite.  When all tests have been processed, call [onDone].
@@ -59,10 +232,6 @@
 }
 
 
-// TODO(1030): remove once in the corelib.
-bool Contains(element, collection) => collection.indexOf(element) >= 0;
-
-
 void ccTestLister() {
   port.receive((String runnerPath, SendPort replyTo) {
     Future processFuture = Process.start(runnerPath, ["--list"]);
@@ -113,9 +282,7 @@
  * The executable lists its tests when run with the --list command line flag.
  * Individual tests are run by specifying them on the command line.
  */
-class CCTestSuite implements TestSuite {
-  Map configuration;
-  final String suiteName;
+class CCTestSuite extends TestSuite {
   final String testPrefix;
   String runnerPath;
   final String dartDir;
@@ -125,19 +292,21 @@
   ReceivePort receiveTestName;
   TestExpectations testExpectations;
 
-  CCTestSuite(Map this.configuration,
-              String this.suiteName,
+  CCTestSuite(Map configuration,
+              String suiteName,
               String runnerName,
               List<String> this.statusFilePaths,
               {this.testPrefix: ''})
-      : dartDir = TestUtils.dartDir().toNativePath() {
-    runnerPath = '${TestUtils.buildDir(configuration)}/$runnerName';
+      : super(configuration, suiteName),
+        dartDir = TestUtils.dartDir().toNativePath() {
+    runnerPath = '$buildDir/$runnerName';
   }
 
   void testNameHandler(String testName, ignore) {
     if (testName == "") {
       receiveTestName.close();
-      doDone();
+
+      if (doDone != null) doDone();
     } else {
       // Only run the tests that match the pattern. Use the name
       // "suiteName/testName" for cc tests.
@@ -167,7 +336,7 @@
 
   void forEachTest(TestCaseEvent onTest, Map testCache, [VoidFunction onDone]) {
     doTest = onTest;
-    doDone = () => (onDone != null) ? onDone() : null;
+    doDone = onDone;
 
     var filesRead = 0;
     void statusFileRead() {
@@ -211,33 +380,29 @@
   }
 }
 
-
 /**
  * A standard [TestSuite] implementation that searches for tests in a
  * directory, and creates [TestCase]s that compile and/or run them.
  */
-class StandardTestSuite implements TestSuite {
-  Map configuration;
-  String suiteName;
-  Path suiteDir;
-  List<String> statusFilePaths;
+class StandardTestSuite extends TestSuite {
+  final Path suiteDir;
+  final List<String> statusFilePaths;
   TestCaseEvent doTest;
-  VoidFunction doDone;
-  int activeTestGenerators = 0;
-  bool listingDone = false;
   TestExpectations testExpectations;
   List<TestInformation> cachedTests;
   final Path dartDir;
   Predicate<String> isTestFilePredicate;
-  bool _listRecursive;
+  final bool listRecursively;
 
-  StandardTestSuite(this.configuration,
-                    this.suiteName,
+  StandardTestSuite(Map configuration,
+                    String suiteName,
                     Path suiteDirectory,
                     this.statusFilePaths,
                     {this.isTestFilePredicate,
                     bool recursive: false})
-  : dartDir = TestUtils.dartDir(), _listRecursive = recursive,
+  : super(configuration, suiteName),
+    dartDir = TestUtils.dartDir(),
+    listRecursively = recursive,
     suiteDir = TestUtils.dartDir().join(suiteDirectory);
 
   /**
@@ -289,83 +454,129 @@
     return filename.endsWith("Test.dart");
   }
 
-  bool listRecursively() => _listRecursive;
-
-  String shellPath() => TestUtils.dartShellFileName(configuration);
-
   List<String> additionalOptions(Path filePath) => [];
 
   void forEachTest(TestCaseEvent onTest, Map testCache, [VoidFunction onDone]) {
-    // If DumpRenderTree/Dartium is required, and not yet updated,
-    // wait for update.
+    updateDartium().chain((_) {
+      doTest = onTest;
+
+      return readExpectations();
+    }).chain((expectations) {
+      testExpectations = expectations;
+
+      // Checked if we have already found and generated the tests for
+      // this suite.
+      if (!testCache.containsKey(suiteName)) {
+        cachedTests = testCache[suiteName] = [];
+        return enqueueTests();
+      } else {
+        // We rely on enqueueing completing asynchronously.
+        return asynchronously(() {
+          for (var info in testCache[suiteName]) {
+            enqueueTestCaseFromTestInformation(info);
+          }
+        });
+      }
+    }).then((_) {
+      if (onDone != null) onDone();
+    });
+  }
+
+  /**
+   * If DumpRenderTree/Dartium is required, and not yet updated, waits for
+   * the update then completes. Otherwise completes immediately.
+   */
+  Future updateDartium() {
+    var completer = new Completer();
     var updater = runtimeUpdater(configuration);
-    if (updater !== null && !updater.updated) {
-      Expect.isTrue(updater.isActive);
-      updater.onUpdated.add(() {
-        forEachTest(onTest, testCache, onDone);
-      });
-      return;
+    if (updater == null || updater.updated) {
+      return new Future.immediate(null);
     }
 
-    doTest = onTest;
-    doDone = (onDone != null) ? onDone : (() => null);
+    Expect.isTrue(updater.isActive);
+    updater.onUpdated.add(() => completer.complete(null));
+
+    return completer.future;
+  }
+
+  /**
+   * Reads the status files and completes with the parsed expectations.
+   */
+  Future<TestExpectations> readExpectations() {
+    var completer = new Completer();
+    var expectations = new TestExpectations();
 
     var filesRead = 0;
     void statusFileRead() {
       filesRead++;
       if (filesRead == statusFilePaths.length) {
-        // Checked if we have already found and generated the tests for
-        // this suite.
-        if (!testCache.containsKey(suiteName)) {
-          cachedTests = testCache[suiteName] = [];
-          processDirectory();
-        } else {
-          // We rely on enqueueing completing asynchronously so use a
-          // timer to make it so.
-          void enqueueCachedTests(Timer ignore) {
-            for (var info in testCache[suiteName]) {
-              enqueueTestCaseFromTestInformation(info);
-            }
-            doDone();
-          }
-          new Timer(0, enqueueCachedTests);
-        }
+        completer.complete(expectations);
       }
     }
 
-    // Read test expectations from status files.
-    testExpectations = new TestExpectations();
     for (var statusFilePath in statusFilePaths) {
-      // [forDirectory] adds name_dart2js.status for all tests suites, use it if
-      // it exists, but otherwise skip it and don't fail.
+      // [forDirectory] adds name_dart2js.status for all tests suites. Use it
+      // if it exists, but otherwise skip it and don't fail.
       if (statusFilePath.endsWith('_dart2js.status')) {
-        File file = new File.fromPath(dartDir.append(statusFilePath));
+        var file = new File.fromPath(dartDir.append(statusFilePath));
         if (!file.existsSync()) {
           filesRead++;
           continue;
         }
       }
-      ReadTestExpectationsInto(testExpectations,
+
+      ReadTestExpectationsInto(expectations,
                                dartDir.append(statusFilePath).toNativePath(),
-                               configuration,
-                               statusFileRead);
+                               configuration, statusFileRead);
     }
+
+    return completer.future;
   }
 
-  void processDirectory() {
+  Future enqueueTests() {
     Directory dir = new Directory.fromPath(suiteDir);
-    dir.exists().then((exists) {
+    return dir.exists().chain((exists) {
       if (!exists) {
         print('Directory containing tests not found: $suiteDir');
-        directoryListingDone(false);
+        return new Future.immediate(null);
       } else {
-        var lister = dir.list(recursive: listRecursively());
-        lister.onFile = processFile;
-        lister.onDone = directoryListingDone;
+        var group = new FutureGroup();
+        enqueueDirectory(dir, group);
+        return group.future;
       }
     });
   }
 
+  void enqueueDirectory(Directory dir, FutureGroup group) {
+    var listCompleter = new Completer();
+    group.add(listCompleter.future);
+
+    var lister = dir.list(recursive: listRecursively);
+    lister.onFile = (file) => enqueueFile(file, group);
+    lister.onDone = listCompleter.complete;
+  }
+
+  void enqueueFile(String filename, FutureGroup group) {
+    if (!isTestFile(filename)) return;
+    Path filePath = new Path.fromNative(filename);
+
+    // Only run the tests that match the pattern.
+    RegExp pattern = configuration['selectors'][suiteName];
+    if (!pattern.hasMatch('$filePath')) return;
+    if (filePath.filename.endsWith('test_config.dart')) return;
+
+    var optionsFromFile = readOptionsFromFile(filePath);
+    CreateTest createTestCase = makeTestCaseCreator(optionsFromFile);
+
+    if (optionsFromFile['isMultitest']) {
+      group.add(doMultitest(filePath, buildDir, suiteDir, createTestCase));
+    } else {
+      createTestCase(filePath,
+                     optionsFromFile['hasCompileError'],
+                     optionsFromFile['hasRuntimeError']);
+    }
+  }
+
   void enqueueTestCaseFromTestInformation(TestInformation info) {
     var filePath = info.filePath;
     var optionsFromFile = info.optionsFromFile;
@@ -427,7 +638,21 @@
       enqueueStandardTest(info, testName, expectations);
     } else if (TestUtils.isBrowserRuntime(configuration['runtime'])) {
       bool isWrappingRequired = configuration['compiler'] != 'dart2js';
-      enqueueBrowserTest(info, testName, expectations, isWrappingRequired);
+      if (info.optionsFromFile['isMultiHtmlTest']) {
+        // A browser multi-test has multiple expectations for one test file.
+        // Find all the different sub-test expecations for one entire test file.
+        List<String> subtestNames = info.optionsFromFile['subtestNames'];
+        Map<String, Set<String>> multiHtmlTestExpectations = {};
+        for (String name in subtestNames) {
+          String fullTestName = '$testName/$name';
+          multiHtmlTestExpectations[fullTestName] =
+              testExpectations.expectations(fullTestName);
+        }
+        enqueueBrowserTest(info, testName, multiHtmlTestExpectations,
+            isWrappingRequired);
+      } else {
+        enqueueBrowserTest(info, testName, expectations, isWrappingRequired);
+      }
     } else {
       enqueueStandardTest(info, testName, expectations);
     }
@@ -473,16 +698,14 @@
       args = new List.from(args);
       String tempDir = createOutputDirectory(info.filePath, '');
       args.add('--out=$tempDir/out.js');
-      List<Command> commands = <Command>[new Command(shellPath(), args)];
+      List<Command> commands = <Command>[new Command(dartShellFileName, args)];
       if (info.hasCompileError) {
         // Do not attempt to run the compiled result. A compilation
         // error should be reported by the compilation command.
       } else if (configuration['runtime'] == 'd8') {
-        var d8 = TestUtils.d8FileName(configuration);
-        commands.add(new Command(d8, ['$tempDir/out.js']));
+        commands.add(new Command(d8FileName, ['$tempDir/out.js']));
       } else if (configuration['runtime'] == 'jsshell') {
-        var jsshell = TestUtils.jsshellFileName(configuration);
-        commands.add(new Command(jsshell, ['$tempDir/out.js']));
+        commands.add(new Command(jsShellFileName, ['$tempDir/out.js']));
       }
       return commands;
 
@@ -498,7 +721,7 @@
       String tempDir = createOutputDirectory(info.filePath, '');
       compilerArguments.add('--out=$tempDir/out.dart');
       List<Command> commands =
-          <Command>[new Command(shellPath(), compilerArguments)];
+          <Command>[new Command(dartShellFileName, compilerArguments)];
       if (info.hasCompileError) {
         // Do not attempt to run the compiled result. A compilation
         // error should be reported by the compilation command.
@@ -507,9 +730,7 @@
         var vmArguments = new List.from(vmOptions);
         vmArguments.addAll([
             '--ignore-unrecognized-flags', '$tempDir/out.dart']);
-        commands.add(new Command(
-            TestUtils.vmFileName(configuration),
-            vmArguments));
+        commands.add(new Command(vmFileName, vmArguments));
       } else {
         throw 'Unsupported runtime ${configuration["runtime"]} for dart2dart';
       }
@@ -519,7 +740,7 @@
     case 'dartc':
       var arguments = new List.from(vmOptions);
       arguments.addAll(args);
-      return <Command>[new Command(shellPath(), arguments)];
+      return <Command>[new Command(dartShellFileName, arguments)];
 
     default:
       throw 'Unknown compiler ${configuration["compiler"]}';
@@ -546,32 +767,6 @@
     };
   }
 
-  void processFile(String filename) {
-    if (!isTestFile(filename)) return;
-    Path filePath = new Path.fromNative(filename);
-
-    // Only run the tests that match the pattern.
-    RegExp pattern = configuration['selectors'][suiteName];
-    if (!pattern.hasMatch('$filePath')) return;
-    if (filePath.filename.endsWith('test_config.dart')) return;
-
-    var optionsFromFile = readOptionsFromFile(filePath);
-    CreateTest createTestCase = makeTestCaseCreator(optionsFromFile);
-
-    if (optionsFromFile['isMultitest']) {
-      testGeneratorStarted();
-      DoMultitest(filePath,
-                  TestUtils.buildDir(configuration),
-                  suiteDir,
-                  createTestCase,
-                  testGeneratorDone);
-    } else {
-      createTestCase(filePath,
-                     optionsFromFile['hasCompileError'],
-                     optionsFromFile['hasRuntimeError']);
-    }
-  }
-
   /**
    * The [StandardTestSuite] has support for tests that
    * compile a test from Dart to JavaScript, and then run the resulting
@@ -579,13 +774,15 @@
    * JavaScript version of the test, and copies the appropriate framework
    * files to that directory.  It creates a [BrowserTestCase], which has
    * two sequential steps to be run by the [ProcessQueue] when the test is
-   * executed: a compilation
-   * step and an execution step, both with the appropriate executable and
-   * arguments.
+   * executed: a compilation step and an execution step, both with the
+   * appropriate executable and arguments. The [expectations] object can be
+   * either a Set<String> if the test is a regular test, or a Map<String
+   * subTestName, Set<String>> if we are running a browser multi-test (one
+   * compilation and many browser runs).
    */
   void enqueueBrowserTest(TestInformation info,
                           String testName,
-                          Set<String> expectations,
+                          Object expectations,
                           bool isWrappingRequired) {
     Map optionsFromFile = info.optionsFromFile;
     Path filePath = info.filePath;
@@ -706,51 +903,86 @@
         }
       }
 
+      // Variables for browser multi-tests.
+      List<String> subtestNames = info.optionsFromFile['subtestNames'];
+      TestCase multitestParentTest;
+      int subtestIndex = 0;
       // Construct the command that executes the browser test
-      List<String> args;
-      if (TestUtils.usesWebDriver(runtime)) {
-        args = [dartDir.append('tools/testing/run_selenium.py').toNativePath(),
-            '--browser=$runtime',
-            '--timeout=${configuration["timeout"] - 2}',
-            '--out=$htmlPath'];
-        if (runtime == 'dartium') {
-          args.add('--executable=$dartiumFilename');
+      do {
+        List<String> args = <String>[];
+        String fullHtmlPath = htmlPath.startsWith('http:') ? htmlPath :
+            'file://$htmlPath';
+        if (info.optionsFromFile['isMultiHtmlTest']
+            && subtestNames.length > 0) {
+          fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}';
         }
-      } else {
-        args = [
-            dartDir.append('tools/testing/drt-trampoline.py').toNativePath(),
-            dumpRenderTreeFilename,
-            '--no-timeout'
-        ];
-        if (runtime == 'drt' &&
-            (compiler == 'none' || compiler == 'dart2dart')) {
-          var dartFlags = ['--ignore-unrecognized-flags'];
-          if (configuration["checked"]) {
-            dartFlags.add('--enable_asserts');
-            dartFlags.add("--enable_type_checks");
+        if (TestUtils.usesWebDriver(runtime)) {
+          args = [
+              dartDir.append('tools/testing/run_selenium.py').toNativePath(),
+              '--browser=$runtime',
+              '--timeout=${configuration["timeout"] - 2}',
+              '--out="$fullHtmlPath"'];
+          if (runtime == 'dartium') {
+            args.add('--executable=$dartiumFilename');
           }
-          dartFlags.addAll(vmOptions);
-          args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
+        } else {
+          args = [
+              dartDir.append('tools/testing/drt-trampoline.py').toNativePath(),
+              dumpRenderTreeFilename,
+              '--no-timeout'
+          ];
+          if (runtime == 'drt' &&
+              (compiler == 'none' || compiler == 'dart2dart')) {
+            var dartFlags = ['--ignore-unrecognized-flags'];
+            if (configuration["checked"]) {
+              dartFlags.add('--enable_asserts');
+              dartFlags.add("--enable_type_checks");
+            }
+            dartFlags.addAll(vmOptions);
+            args.add('--dart-flags=${Strings.join(dartFlags, " ")}');
+          }
+          args.add(fullHtmlPath);
+          if (expectedOutput != null) {
+            args.add('--out-expectation=${expectedOutput.toNativePath()}');
+          }
         }
-        args.add(htmlPath);
-        if (expectedOutput != null) {
-          args.add('--out-expectation=${expectedOutput.toNativePath()}');
+        List<Command> commandSet = new List<Command>.from(commands);
+        if (subtestIndex != 0) {
+         commandSet = [];
+         if(TestUtils.usesWebDriver(runtime)) args.add('--force-refresh');
         }
-      }
-      commands.add(new Command('python', args));
+        commandSet.add(new Command('python', args));
 
-      // Create BrowserTestCase and queue it.
-      var testCase = new BrowserTestCase('$suiteName/$testName',
-          commands, configuration, completeHandler, expectations,
-          info, info.hasCompileError || info.hasRuntimeError);
-      doTest(testCase);
+        // Create BrowserTestCase and queue it.
+        String testDisplayName = '$suiteName/$testName';
+        var testCase;
+        if (info.optionsFromFile['isMultiHtmlTest']) {
+          testDisplayName = '$testDisplayName/${subtestNames[subtestIndex]}';
+          testCase = new BrowserTestCase(testDisplayName,
+              commandSet, configuration, completeHandler,
+              expectations['$testName/${subtestNames[subtestIndex]}'],
+              info, info.hasCompileError || info.hasRuntimeError,
+              subtestIndex != 0);
+        } else {
+          testCase = new BrowserTestCase(testDisplayName,
+              commandSet, configuration, completeHandler, expectations,
+              info, info.hasCompileError || info.hasRuntimeError, false);
+        }
+        if (subtestIndex == 0) {
+          multitestParentTest = testCase;
+        } else {
+          multitestParentTest.addObserver(testCase);
+        }
+        doTest(testCase);
+        subtestIndex++;
+      } while(subtestIndex < subtestNames.length);
     }
   }
 
   /** Helper to create a compilation command for a single input file. */
   Command _compileCommand(String inputFile, String outputFile,
       String compiler, String dir, var vmOptions) {
-    String executable = TestUtils.compilerPath(configuration);
+    String executable = compilerPath;
     List<String> args = TestUtils.standardOptions(configuration);
     switch (compiler) {
       case 'dart2js':
@@ -765,7 +997,7 @@
     if (executable.endsWith('.dart')) {
       // Run the compiler script via the Dart VM.
       args.insertRange(0, 1, executable);
-      executable = TestUtils.dartShellFileName(configuration);
+      executable = dartShellFileName;
     }
     return new Command(executable, args);
   }
@@ -793,11 +1025,12 @@
 
     // Create '[build dir]/generated_tests/$compiler-$runtime/$testUniqueName',
     // including any intermediate directories that don't exist.
-    var generatedTestPath = Strings.join(
-        [TestUtils.buildDir(configuration),
-         'generated_tests',
-         "${configuration['compiler']}-${configuration['runtime']}",
-         testUniqueName], '/');
+    var generatedTestPath = Strings.join([
+        buildDir,
+        'generated_tests',
+        "${configuration['compiler']}-${configuration['runtime']}",
+        testUniqueName
+    ], '/');
 
     TestUtils.mkdirRecursive(new Path('.'), new Path(generatedTestPath));
     return new File(generatedTestPath).fullPathSync().replaceAll('\\', '/');
@@ -858,24 +1091,6 @@
     return dartDir.append('client/tests/dartium/chrome').toNativePath();
   }
 
-  void testGeneratorStarted() {
-    ++activeTestGenerators;
-  }
-
-  void testGeneratorDone() {
-    --activeTestGenerators;
-    if (activeTestGenerators == 0 && listingDone) {
-      doDone();
-    }
-  }
-
-  void directoryListingDone(ignore) {
-    listingDone = true;
-    if (activeTestGenerators == 0) {
-      doDone();
-    }
-  }
-
   void completeHandler(TestCase testCase) {
   }
 
@@ -965,24 +1180,26 @@
    * configurations, so it may not use [configuration].
    */
   static Map readOptionsFromFile(Path filePath) {
-    RegExp testOptionsRegExp = const RegExp(r"// VMOptions=(.*)");
-    RegExp dartOptionsRegExp = const RegExp(r"// DartOptions=(.*)");
-    RegExp otherScriptsRegExp = const RegExp(r"// OtherScripts=(.*)");
-    RegExp multiTestRegExp = const RegExp(r"/// [0-9][0-9]:(.*)");
+    RegExp testOptionsRegExp = new RegExp(r"// VMOptions=(.*)");
+    RegExp dartOptionsRegExp = new RegExp(r"// DartOptions=(.*)");
+    RegExp otherScriptsRegExp = new RegExp(r"// OtherScripts=(.*)");
+    RegExp multiTestRegExp = new RegExp(r"/// [0-9][0-9]:(.*)");
+    RegExp multiHtmlTestRegExp =
+        new RegExp(r"useHtmlIndividualConfiguration()");
     RegExp staticTypeRegExp =
-        const RegExp(r"/// ([0-9][0-9]:){0,1}\s*static type warning");
+        new RegExp(r"/// ([0-9][0-9]:){0,1}\s*static type warning");
     RegExp compileTimeRegExp =
-        const RegExp(r"/// ([0-9][0-9]:){0,1}\s*compile-time error");
-    RegExp staticCleanRegExp = const RegExp(r"// @static-clean");
-    RegExp leadingHashRegExp = const RegExp(r"^#", multiLine: true);
-    RegExp isolateStubsRegExp = const RegExp(r"// IsolateStubs=(.*)");
+        new RegExp(r"/// ([0-9][0-9]:){0,1}\s*compile-time error");
+    RegExp staticCleanRegExp = new RegExp(r"// @static-clean");
+    RegExp leadingHashRegExp = new RegExp(r"^#", multiLine: true);
+    RegExp isolateStubsRegExp = new RegExp(r"// IsolateStubs=(.*)");
     // TODO(gram) Clean these up once the old directives are not supported.
     RegExp domImportRegExp =
-        const RegExp(r"^[#]?import.*dart:html", multiLine: true);
+        new RegExp(r"^[#]?import.*dart:html", multiLine: true);
     RegExp libraryDefinitionRegExp =
-        const RegExp(r"^[#]?library[\( ]", multiLine: true);
+        new RegExp(r"^[#]?library[\( ]", multiLine: true);
     RegExp sourceOrImportRegExp =
-        const RegExp("^(#source|#import|part)[ \t]+[\('\"]", multiLine: true);
+        new RegExp("^(#source|#import|part)[ \t]+[\('\"]", multiLine: true);
 
     // Read the entire file into a byte buffer and transform it to a
     // String. This will treat the file as ascii but the only parts
@@ -1035,6 +1252,7 @@
     }
 
     bool isMultitest = multiTestRegExp.hasMatch(contents);
+    bool isMultiHtmlTest = multiHtmlTestRegExp.hasMatch(contents);
     bool containsLeadingHash = leadingHashRegExp.hasMatch(contents);
     Match isolateMatch = isolateStubsRegExp.firstMatch(contents);
     String isolateStubs = isolateMatch != null ? isolateMatch[1] : '';
@@ -1050,6 +1268,20 @@
       numCompileTimeAnnotations++;
     }
 
+    // Note: This is brittle. It's the age-old problem of having a context free
+    // language but the means to easily identify the construct is a regular
+    // expression, aka impossible. Therefore we just make an approximation of
+    // the number of top-level "group(...)" occurrences. This assumes you import
+    // unittest with no prefix and always directly call "group(". It only uses
+    // top-level "groups" so tests running nested groups will be no-ops.
+    RegExp numTests = new RegExp(r"\s*[^/]\s*group\('[^,']*");
+    List<String> subtestNames = [];
+    Iterator matchesIter = numTests.allMatches(contents).iterator();
+    while(matchesIter.hasNext && isMultiHtmlTest) {
+      String fullMatch = matchesIter.next().group(0);
+      subtestNames.add(fullMatch.substring(fullMatch.indexOf("'") + 1));
+    }
+
     return { "vmOptions": result,
              "dartOptions": dartOptions,
              "hasCompileError": hasCompileError,
@@ -1057,6 +1289,8 @@
              "isStaticClean" : isStaticClean,
              "otherScripts": otherScripts,
              "isMultitest": isMultitest,
+             "isMultiHtmlTest": isMultiHtmlTest,
+             "subtestNames": subtestNames,
              "containsLeadingHash": containsLeadingHash,
              "isolateStubs": isolateStubs,
              "containsDomImport": containsDomImport,
@@ -1067,19 +1301,23 @@
   }
 
   List<List<String>> getVmOptions(Map optionsFromFile) {
-    bool needsVmOptions = Contains(configuration['compiler'],
-                                   const ['none', 'dart2dart', 'dartc']) &&
-                          Contains(configuration['runtime'],
-                                   const ['none', 'vm', 'drt', 'dartium']);
+    var COMPILERS = const ['none', 'dart2dart', 'dartc'];
+    var RUNTIMES = const ['none', 'vm', 'drt', 'dartium'];
+    var needsVmOptions = COMPILERS.contains(configuration['compiler']) &&
+                         RUNTIMES.contains(configuration['runtime']);
     if (!needsVmOptions) return [[]];
-    return optionsFromFile['vmOptions'];
+    final vmOptions = optionsFromFile['vmOptions'];
+    if (configuration['compiler'] != 'dart2dart') return vmOptions;
+    // Temporary workaround for race in test suite: tests with different
+    // vm options are still compiled into the same output file which
+    // may lead to reads from empty files.
+    return [vmOptions[0]];
   }
 }
 
 
 class DartcCompilationTestSuite extends StandardTestSuite {
   List<String> _testDirs;
-  int activityCount = 0;
 
   DartcCompilationTestSuite(Map configuration,
                             String suiteName,
@@ -1091,56 +1329,41 @@
               new Path.fromNative(directoryPath),
               expectations);
 
-  void activityStarted() { ++activityCount; }
-
-  void activityCompleted() {
-    if (--activityCount == 0) {
-      directoryListingDone(true);
-    }
-  }
-
-  String shellPath() => TestUtils.compilerPath(configuration);
-
   List<String> additionalOptions(Path filePath) {
     return ['--fatal-warnings', '--fatal-type-errors'];
   }
 
-  void processDirectory() {
-    // Enqueueing the directory listers is an activity.
-    activityStarted();
+  Future enqueueTests() {
+    var group = new FutureGroup();
+
     for (String testDir in _testDirs) {
       Directory dir = new Directory.fromPath(suiteDir.append(testDir));
       if (dir.existsSync()) {
-        activityStarted();
-        var lister = dir.list(recursive: listRecursively());
-        lister.onFile = processFile;
-        lister.onDone = (ignore) => activityCompleted();
+        enqueueDirectory(dir, group);
       }
     }
-    // Completed the enqueueing of listers.
-    activityCompleted();
+
+    return group.future;
   }
 }
 
 
-class JUnitTestSuite implements TestSuite {
-  Map configuration;
-  String suiteName;
+class JUnitTestSuite extends TestSuite {
   String directoryPath;
   String statusFilePath;
   final String dartDir;
-  String buildDir;
   String classPath;
   List<String> testClasses;
   TestCaseEvent doTest;
   VoidFunction doDone;
   TestExpectations testExpectations;
 
-  JUnitTestSuite(Map this.configuration,
-                 String this.suiteName,
+  JUnitTestSuite(Map configuration,
+                 String suiteName,
                  String this.directoryPath,
                  String this.statusFilePath)
-      : dartDir = TestUtils.dartDir().toNativePath();
+      : super(configuration, suiteName),
+        dartDir = TestUtils.dartDir().toNativePath();
 
   bool isTestFile(String filename) => filename.endsWith("Tests.java") &&
       !filename.contains('com/google/dart/compiler/vm') &&
@@ -1150,20 +1373,19 @@
                    Map testCacheIgnored,
                    [VoidFunction onDone]) {
     doTest = onTest;
-    doDone = (onDone != null) ? onDone : (() => null);
+    doDone = onDone;
 
     if (configuration['compiler'] != 'dartc') {
-      // Do nothing.  Asynchronously report that the suite is enqueued.
-      new Timer(0, (timerUnused){ doDone(); });
+      // Do nothing. Asynchronously report that the suite is enqueued.
+      asynchronously(doDone);
       return;
     }
     RegExp pattern = configuration['selectors']['dartc'];
     if (!pattern.hasMatch('junit_tests')) {
-      new Timer(0, (timerUnused){ doDone(); });
+      asynchronously(doDone);
       return;
     }
 
-    buildDir = TestUtils.buildDir(configuration);
     computeClassPath();
     testClasses = <String>[];
     // Do not read the status file.
@@ -1238,7 +1460,6 @@
   }
 }
 
-
 class TestUtils {
   /**
    * The libraries in this directory relies on finding various files
@@ -1280,75 +1501,13 @@
     return completer.future;
   }
 
-  static String executableSuffix(String executable) {
-    if (Platform.operatingSystem == 'windows') {
-      if (executable == 'd8' || executable == 'vm' || executable == 'none') {
-        return '.exe';
-      } else {
-        return '.bat';
-      }
-    }
-    return '';
-  }
-
-  static String executableName(Map configuration) {
-    String suffix = executableSuffix(configuration['compiler']);
-    switch (configuration['compiler']) {
-      case 'none':
-        return 'dart$suffix';
-      case 'dartc':
-        return 'analyzer/bin/dart_analyzer$suffix';
-      case 'dart2js':
-      case 'dart2dart':
-        var prefix = '';
-        if (configuration['use_sdk']) {
-          prefix = 'dart-sdk/bin/';
-        }
-        if (configuration['host_checked']) {
-          // The script dart2js_developer is not in the SDK.
-          return 'dart2js_developer$suffix';
-        } else {
-          return '${prefix}dart2js$suffix';
-        }
-        break;
-      default:
-        throw "Unknown executable for: ${configuration['compiler']}";
-    }
-  }
-
-  static String compilerName(Map configuration) {
-    String suffix = executableSuffix(configuration['compiler']);
-    switch (configuration['compiler']) {
-      case 'dartc':
-      case 'dart2js':
-      case 'dart2dart':
-        return executableName(configuration);
-      default:
-        throw "Unknown compiler for: ${configuration['compiler']}";
-    }
-  }
-
-  static String dartShellFileName(Map configuration) {
-    var name = configuration['dart'];
-    if (name == '') {
-      name = '${buildDir(configuration)}/${executableName(configuration)}';
-    }
-    ensureExists(name, configuration);
-    return name;
-  }
-
-  static String d8FileName(Map configuration) {
-    var suffix = executableSuffix('d8');
-    var d8 = '${buildDir(configuration)}/d8$suffix';
-    ensureExists(d8, configuration);
-    return d8;
-  }
-
-  static String vmFileName(Map configuration) {
-    var suffix = executableSuffix('vm');
-    var vm = '${buildDir(configuration)}/dart$suffix';
-    ensureExists(vm, configuration);
-    return vm;
+  static String flakyFileName() {
+    // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout)
+    // will be written to this file. This is useful for the debugging of
+    // flaky tests.
+    // When running on a built bot, the file can be made visible in the 
+    // waterfall UI.
+    return ".flaky.log";
   }
 
   static void ensureExists(String filename, Map configuration) {
@@ -1357,17 +1516,6 @@
     }
   }
 
-  static String compilerPath(Map configuration) {
-    if (configuration['compiler'] == 'none') {
-      return null;  // No separate compiler for dartium tests.
-    }
-    var name = '${buildDir(configuration)}/${compilerName(configuration)}';
-    if (!(new File(name)).existsSync() && !configuration['list']) {
-      throw "Executable '$name' does not exist";
-    }
-    return name;
-  }
-
   static String outputDir(Map configuration) {
     var result = '';
     var system = configuration['system'];
@@ -1381,12 +1529,6 @@
     return result;
   }
 
-  static String buildDir(Map configuration) {
-    String mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release';
-    String arch = configuration['arch'].toUpperCase();
-    return "${outputDir(configuration)}$mode$arch";
- }
-
   static Path dartDir() {
     File scriptFile = new File(testScriptPath);
     Path scriptPath = new Path.fromNative(scriptFile.fullPathSync());
@@ -1418,27 +1560,24 @@
     return args;
   }
 
-  static String jsshellFileName(Map configuration) {
-    var executableSuffix = executableSuffix('jsshell');
-    var executable = 'jsshell$executableSuffix';
-    var jsshellDir = '${dartDir()}/tools/testing/bin';
-    return '$jsshellDir/$executable';
+  static bool usesWebDriver(String runtime) {
+    const BROWSERS = const [
+      'dartium',
+      'ie9',
+      'ie10',
+      'safari',
+      'opera',
+      'chrome',
+      'ff'
+    ];
+    return BROWSERS.contains(runtime);
   }
 
-  static bool usesWebDriver(String runtime) => Contains(
-      runtime, const <String>['dartium',
-                              'ie9',
-                              'ie10',
-                              'safari',
-                              'opera',
-                              'chrome',
-                              'ff']);
-
   static bool isBrowserRuntime(String runtime) =>
       runtime == 'drt' || TestUtils.usesWebDriver(runtime);
 
   static bool isJsCommandLineRuntime(String runtime) =>
-      Contains(runtime, const <String>['d8', 'jsshell']);
+      const ['d8', 'jsshell'].contains(runtime);
 
 }
 
diff --git a/tools/testing/drt-trampoline.py b/tools/testing/drt-trampoline.py
index 33fc16a..fc27a7d 100644
--- a/tools/testing/drt-trampoline.py
+++ b/tools/testing/drt-trampoline.py
@@ -41,7 +41,7 @@
         raise Exception(
             'Bad file expectation (%s), ' % out_expected_file
             + 'please specify either a .txt or a .png file')
-    elif arg.endswith('.html'):
+    elif '.html' in arg:
       test_file = arg
     else:
       cmd.append(arg)
diff --git a/tools/testing/legpad/legpad.dart b/tools/testing/legpad/legpad.dart
index 0db1ffb..b6acfe7 100644
--- a/tools/testing/legpad/legpad.dart
+++ b/tools/testing/legpad/legpad.dart
@@ -42,7 +42,7 @@
   void diagnosticHandler(uri_lib.Uri uri, int begin, int end,
                                  String message, bool fatal) {
     warnings.add(message);
-    if (uri !== null) {
+    if (uri != null) {
       warnings.add(" ($uri: $begin, $end)");
     }
     if (fatal) {
@@ -72,7 +72,7 @@
     Stopwatch stopwatch = new Stopwatch()..start();
     runLeg();
     int elapsedMillis = stopwatch.elapsedMilliseconds;
-    if (output === null) {
+    if (output == null) {
       output = "throw 'dart2js compilation error';\n";
     }
 
@@ -114,7 +114,7 @@
 
   void setText(String id, String text) {
     html.Element element = html.document.query("#$id");
-    if (element === null) {
+    if (element == null) {
       throw new Exception("Can't find element $id");
     }
     element.innerHTML = htmlEscape(text);
@@ -122,7 +122,7 @@
 
   String getText(String id) {
     html.Element element = html.document.query("#$id");
-    if (element === null) {
+    if (element == null) {
       throw new Exception("Can't find element $id");
     }
     return element.text.trim();
diff --git a/tools/testing/legpad/legpad.py b/tools/testing/legpad/legpad.py
index e7148a8..1a4aa55 100644
--- a/tools/testing/legpad/legpad.py
+++ b/tools/testing/legpad/legpad.py
@@ -124,7 +124,6 @@
 # TODO(mattsh): read this from some config file once ahe/zundel create it
 DART_LIBRARIES = {
     "core": "lib/compiler/implementation/lib/core.dart",
-    "coreimpl": "lib/compiler/implementation/lib/coreimpl.dart",
     "_js_helper": "lib/compiler/implementation/lib/js_helper.dart",
     "_interceptors": "lib/compiler/implementation/lib/interceptors.dart",
     "dom": "lib/dom/frog/dom_frog.dart",
diff --git a/tools/testing/run_selenium.py b/tools/testing/run_selenium.py
index e97963e..8cb0a2f 100755
--- a/tools/testing/run_selenium.py
+++ b/tools/testing/run_selenium.py
@@ -71,15 +71,18 @@
     'dromaeo': dromaeo_test_done
 }
 
-def run_test_in_browser(browser, html_out, timeout, mode):
+def run_test_in_browser(browser, html_out, timeout, mode, refresh):
   """Run the desired test in the browser using Selenium 2.0 WebDriver syntax,
   and wait for the test to complete. This is the newer syntax, that currently
   supports Firefox, Chrome, IE, Opera (and some mobile browsers)."""
 
   if isinstance(browser, selenium.selenium):
-    return run_test_in_browser_selenium_rc(browser, html_out, timeout, mode)
+    return run_test_in_browser_selenium_rc(browser, html_out, timeout, mode,
+        refresh)
 
-  browser.get("file://" + html_out)
+  browser.get(html_out)
+  if refresh:
+    browser.refresh()
   try:
     test_done = CONFIGURATIONS[mode]
     element = WebDriverWait(browser, float(timeout)).until(
@@ -88,11 +91,13 @@
   except selenium.common.exceptions.TimeoutException:
     return TIMEOUT_ERROR_MSG
 
-def run_test_in_browser_selenium_rc(sel, html_out, timeout, mode):
+def run_test_in_browser_selenium_rc(sel, html_out, timeout, mode, refresh):
   """ Run the desired test in the browser using Selenium 1.0 syntax, and wait
   for the test to complete. This is used for Safari, since it is not currently
   supported on Selenium 2.0."""
-  sel.open('file://' + html_out)
+  sel.open(html_out)
+  if refresh:
+    sel.refresh()
   source = sel.get_html_source()
   end_condition = CONFIGURATIONS[mode]
 
@@ -124,12 +129,16 @@
   parser.add_option('--mode', dest = 'mode',
       help = 'The type of test we are running',
       action = 'store', default='correctness')
+  parser.add_option('--force-refresh', dest='refresh',
+      help='Force the browser to refresh before getting results from this test '
+      '(used for browser multitests).', action='store_true', default=False)
   args, _ = parser.parse_args(args=args)
   args.out = args.out.strip('"')
   if args.executable and args.browser != 'dartium':
     print 'Executable path only supported when browser=dartium.'
     sys.exit(1)
-  return args.out, args.browser, args.executable, args.timeout, args.mode
+  return (args.out, args.browser, args.executable, args.timeout, args.mode,
+      args.refresh)
 
 def print_server_error():
   """Provide the user an informative error message if we attempt to connect to
@@ -183,7 +192,7 @@
     if os.path.exists(backup_safari_prefs):
       shutil.copy(backup_safari_prefs,
            '/Library/Preferences/com.apple.Safari.plist')
-    sel = selenium.selenium('localhost', 4444, "*safari", 'file://' + html_out)
+    sel = selenium.selenium('localhost', 4444, "*safari", html_out)
     try:
       sel.start()
       return sel
@@ -283,7 +292,7 @@
         break
 
       (html_out, browser_name, executable_path,
-       timeout, mode) = parse_args(line.split())
+       timeout, mode, refresh) = parse_args(line.split())
 
       # Sanity checks that test.dart is passing flags we can handle.
       if mode != 'correctness':
@@ -299,7 +308,7 @@
         current_browser_name = browser_name
         browser = start_browser(browser_name, executable_path, html_out)
 
-      source = run_test_in_browser(browser, html_out, timeout, mode)
+      source = run_test_in_browser(browser, html_out, timeout, mode, refresh)
 
       # Test is done. Write end token to stderr and flush.
       sys.stderr.write('>>> EOF STDERR\n')
@@ -345,11 +354,11 @@
     return run_batch_tests()
 
   # Run a single test
-  html_out, browser_name, executable_path, timeout, mode = parse_args()
+  html_out, browser_name, executable_path, timeout, mode, refresh = parse_args()
   browser = start_browser(browser_name, executable_path, html_out)
 
   try:
-    output = run_test_in_browser(browser, html_out, timeout, mode)
+    output = run_test_in_browser(browser, html_out, timeout, mode, refresh)
     return report_results(mode, output, browser)
   finally:
     close_browser(browser)
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index 793cd68..742e519 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -33,6 +33,8 @@
   bool generateAppCache = false;
 
   List<String> excludedLibraries = <String>[];
+  List<String> includedLibraries = <String>[];
+
 
   // Parse the command-line arguments.
   for (int i = 0; i < args.length; i++) {
@@ -54,6 +56,8 @@
       default:
         if (arg.startsWith('--exclude-lib=')) {
           excludedLibraries.add(arg.substring('--exclude-lib='.length));
+        } else if (arg.startsWith('--include-lib=')) {
+          includedLibraries.add(arg.substring('--include-lib='.length));
         } else if (arg.startsWith('--out=')) {
           outputDir = new Path.fromNative(arg.substring('--out='.length));
         } else {
@@ -81,7 +85,7 @@
 
   print('Parsing MDN data...');
   final mdnFile = new File.fromPath(doc.scriptDir.append('mdn/database.json'));
-  final mdn = JSON.parse(mdnFile.readAsTextSync());
+  final mdn = JSON.parse(mdnFile.readAsStringSync());
 
   print('Cross-referencing dart:html...');
   HtmlDiff.initialize(libPath);
@@ -108,8 +112,6 @@
     }
   });
 
-  final includedLibraries = <String>[];
-
   var lister = new Directory.fromPath(doc.scriptDir.append('../../pkg')).list();
   lister.onDir = (dirPath) {
     var path = new Path.fromNative(dirPath);
@@ -184,7 +186,7 @@
   }
 
   doc.DocComment getRecordedLibraryComment(LibraryMirror library) {
-    if (doc.displayName(library) == HTML_LIBRARY_NAME) {
+    if (HTML_LIBRARY_NAMES.contains(doc.displayName(library))) {
       return libraryComment;
     }
     return null;
@@ -382,14 +384,14 @@
   doc.DocComment createDocComment(String text,
                                   [ClassMirror inheritedFrom]) {
     String strippedText =
-        text.replaceAll(const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"),
+        text.replaceAll(new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"),
                         '').trim();
     if (strippedText.isEmpty) return null;
     return super.createDocComment(strippedText, inheritedFrom);
   }
 
   doc.DocComment getLibraryComment(LibraryMirror library) {
-    if (doc.displayName(library) == HTML_LIBRARY_NAME) {
+    if (HTML_LIBRARY_NAMES.contains(doc.displayName(library))) {
       return htmldoc.libraryComment;
     }
     return super.getLibraryComment(library);
@@ -411,13 +413,13 @@
                             doc.DocComment fileComment,
                             doc.DocComment handWrittenComment) {
     // Prefer the hand-written comment first.
-    if (handWrittenComment !== null) return handWrittenComment;
+    if (handWrittenComment != null) return handWrittenComment;
 
     // Otherwise, prefer comment from the (possibly generated) Dart file.
-    if (fileComment !== null) return fileComment;
+    if (fileComment != null) return fileComment;
 
     // Finally, fallback on MDN if available.
-    if (mdnComment !== null) {
+    if (mdnComment != null) {
       mdnUrl = mdnComment.mdnUrl;
       return mdnComment;
     }
@@ -469,7 +471,7 @@
     }
 
     var typeString = '';
-    if (doc.displayName(type.library) == HTML_LIBRARY_NAME) {
+    if (HTML_LIBRARY_NAMES.contains(doc.displayName(type.library))) {
       // If it's an HTML type, try to map it to a base DOM type so we can find
       // the MDN docs.
       final domTypes = _diff.htmlTypesToDom[type.qualifiedName];
@@ -503,7 +505,7 @@
   MdnComment includeMdnMemberComment(MemberMirror member) {
     var library = findLibrary(member);
     var memberString = '';
-    if (doc.displayName(library) == HTML_LIBRARY_NAME) {
+    if (HTML_LIBRARY_NAMES.contains(doc.displayName(library))) {
       // If it's an HTML type, try to map it to a DOM type name so we can find
       // the MDN docs.
       final domMembers = _diff.htmlToDom[member.qualifiedName];
diff --git a/utils/apidoc/apidoc.gyp b/utils/apidoc/apidoc.gyp
index 931a11a..abd2961 100644
--- a/utils/apidoc/apidoc.gyp
+++ b/utils/apidoc/apidoc.gyp
@@ -43,9 +43,11 @@
             'apidoc.dart',
             '--out=<(PRODUCT_DIR)/api_docs',
             '--mode=static',
-            '--exclude-lib=webdriver',
-            '--exclude-lib=http',
             '--exclude-lib=dartdoc',
+            '--exclude-lib=http',
+            '--exclude-lib=webdriver',
+            '--include-lib=matcher',
+            '--include-lib=mock',
           ],
           'message': 'Running apidoc: <(_action)',
         },
diff --git a/utils/apidoc/html_diff.dart b/utils/apidoc/html_diff.dart
index 130666d..cc37f9f 100644
--- a/utils/apidoc/html_diff.dart
+++ b/utils/apidoc/html_diff.dart
@@ -8,7 +8,6 @@
  */
 library html_diff;
 
-import 'dart:coreimpl';
 import 'dart:io';
 
 // TODO(rnystrom): Use "package:" URL (#4968).
@@ -19,8 +18,8 @@
 // TODO(amouravski): There is currently magic that looks at dart:* libraries
 // rather than the declared library names. This changed due to recent syntax
 // changes. We should only need to look at the library 'html'.
-const HTML_LIBRARY_NAME = 'dart:html';
-const HTML_DECLARED_NAME = 'html';
+const List<String> HTML_LIBRARY_NAMES = const ['dart:html', 'dart:svg'];
+const List<String> HTML_DECLARED_NAMES = const ['html', 'svg'];
 
 /**
  * A class for computing a many-to-many mapping between the types and
@@ -72,8 +71,11 @@
    * calling [HtmlDiff.run].
    */
   static void initialize(Path libDir) {
-    _compilation = new Compilation.library(<Path>[new Path(HTML_LIBRARY_NAME)],
-                                           libDir);
+    var paths = <Path>[];
+    for (var libraryName in HTML_LIBRARY_NAMES) {
+      paths.add(new Path(libraryName));
+    }
+    _compilation = new Compilation.library(paths, libDir);
     _mirrors = _compilation.mirrors;
   }
 
@@ -96,20 +98,22 @@
    * [HtmlDiff.initialize] should be called.
    */
   void run() {
-    LibraryMirror htmlLib = _mirrors.libraries[HTML_DECLARED_NAME];
-    if (htmlLib === null) {
-      warn('Could not find $HTML_LIBRARY_NAME');
-      return;
-    }
-    for (ClassMirror htmlType in htmlLib.classes.values) {
-      final domTypes = htmlToDomTypes(htmlType);
-      if (domTypes.isEmpty) continue;
+    for (var libraryName in HTML_DECLARED_NAMES) {
+      var library = _mirrors.libraries[libraryName];
+      if (library == null) {
+        warn('Could not find $libraryName');
+        return;
+      }
+      for (ClassMirror type in library.classes.values) {
+        final domTypes = htmlToDomTypes(type);
+        if (domTypes.isEmpty) continue;
 
-      htmlTypesToDom.putIfAbsent(htmlType.qualifiedName,
-          () => new Set()).addAll(domTypes);
+        htmlTypesToDom.putIfAbsent(type.qualifiedName,
+            () => new Set()).addAll(domTypes);
 
-      htmlType.members.forEach(
-          (_, m) => _addMemberDiff(m, domTypes));
+        type.members.forEach(
+            (_, m) => _addMemberDiff(m, domTypes, library.simpleName));
+      }
     }
   }
 
@@ -119,13 +123,14 @@
    * `@domName` type values that correspond to [htmlMember]'s
    * defining type.
    */
-  void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes) {
+  void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes,
+      String libraryName) {
     var domMembers = htmlToDomMembers(htmlMember, domTypes);
     if (htmlMember == null && !domMembers.isEmpty) {
-      warn('$HTML_LIBRARY_NAME member '
+      warn('$libraryName member '
            '${htmlMember.owner.simpleName}.'
            '${htmlMember.simpleName} has no corresponding '
-           '$HTML_LIBRARY_NAME member.');
+           '$libraryName member.');
     }
 
     if (htmlMember == null) return;
@@ -228,7 +233,7 @@
    */
   Map<String, String> _getTags(String comment) {
     if (comment == null) return const <String, String>{};
-    final re = const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
+    final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
     final tags = <String, String>{};
     for (var m in re.allMatches(comment.trim())) {
       tags[m[1]] = m[2];
diff --git a/utils/apidoc/mdn/extract.dart b/utils/apidoc/mdn/extract.dart
index c8d54d2..4a37154 100644
--- a/utils/apidoc/mdn/extract.dart
+++ b/utils/apidoc/mdn/extract.dart
@@ -1,5 +1,5 @@
-#import ("dart:html");
-#import ("dart:json");
+import 'dart:html';
+import 'dart:json';
 
 // Workaround for HTML lib missing feature.
 Range newRange() {
@@ -691,7 +691,7 @@
 }
 
 bool isFirstCharLowerCase(String str) {
-  return const RegExp("^[a-z]").hasMatch(str);
+  return new RegExp("^[a-z]").hasMatch(str);
 }
 
 /**
@@ -943,8 +943,8 @@
 }
 
 bool maybeName(String name) {
-  return const RegExp("^[a-z][a-z0-9A-Z]+\$").hasMatch(name) ||
-      const RegExp("^[A-Z][A-Z_]*\$").hasMatch(name);
+  return new RegExp("^[a-z][a-z0-9A-Z]+\$").hasMatch(name) ||
+      new RegExp("^[A-Z][A-Z_]*\$").hasMatch(name);
 }
 
 // TODO(jacobr): this element is ugly at the moment but will become easier to
@@ -967,7 +967,7 @@
 }
 
 String mozToWebkit(String name) {
-  return name.replaceFirst(const RegExp("^moz"), "webkit");
+  return name.replaceFirst(new RegExp("^moz"), "webkit");
 }
 
 String stripWebkit(String name) {
@@ -1121,10 +1121,10 @@
   }
 
   // Fix up links.
-  const SHORT_LINK = const RegExp(r'^[\w/]+$');
-  const INNER_LINK = const RegExp(r'[Ee]n/(?:[\w/]+/|)([\w#.]+)(?:\(\))?$');
-  const MEMBER_LINK = const RegExp(r'(\w+)[.#](\w+)');
-  const RELATIVE_LINK = const RegExp(r'^(?:../)*/?[Ee][Nn]/(.+)');
+  final SHORT_LINK = new RegExp(r'^[\w/]+$');
+  final INNER_LINK = new RegExp(r'[Ee]n/(?:[\w/]+/|)([\w#.]+)(?:\(\))?$');
+  final MEMBER_LINK = new RegExp(r'(\w+)[.#](\w+)');
+  final RELATIVE_LINK = new RegExp(r'^(?:../)*/?[Ee][Nn]/(.+)');
 
   // - Make relative links absolute.
   // - If we can, take links that point to other MDN pages and retarget them
diff --git a/utils/apidoc/mdn/postProcess.dart b/utils/apidoc/mdn/postProcess.dart
index 5be6f2e..d70cf74 100644
--- a/utils/apidoc/mdn/postProcess.dart
+++ b/utils/apidoc/mdn/postProcess.dart
@@ -4,16 +4,16 @@
  * and obsolete.json (with entries marked obsolete).
  */
 
-#library("postProcess");
+library postProcess;
 
-#import("dart:io");
-#import("dart:json");
-#import("util.dart");
+import 'dart:io';
+import 'dart:json';
+import 'util.dart';
 
 void main() {
   // Database of code documentation.
   Map<String, List> database = JSON.parse(
-      new File('output/database.json').readAsTextSync());
+      new File('output/database.json').readAsStringSync());
   final filteredDb = {};
   final obsolete = [];
   for (String type in database.keys) {
diff --git a/utils/apidoc/mdn/prettyPrint.dart b/utils/apidoc/mdn/prettyPrint.dart
index c770ae5..d0a413c 100644
--- a/utils/apidoc/mdn/prettyPrint.dart
+++ b/utils/apidoc/mdn/prettyPrint.dart
@@ -2,11 +2,11 @@
  * Creates database.html, examples.html, and obsolete.html.
  */
 
-#library("prettyPrint");
+library prettyPrint;
 
-#import("dart:io");
-#import("dart:json");
-#import("util.dart");
+import 'dart:io';
+import 'dart:json';
+import 'util.dart';
 
 String orEmpty(String str) {
   return str == null ? "" : str;
@@ -52,7 +52,7 @@
 void main() {
   // Database of code documentation.
   final Map<String, Map> database = JSON.parse(
-      new File('output/database.filtered.json').readAsTextSync());
+      new File('output/database.filtered.json').readAsStringSync());
 
   // Types we have documentation for.
   matchedTypes = new Set<String>();
diff --git a/utils/apidoc/mdn/util.dart b/utils/apidoc/mdn/util.dart
index d0eab3f..69a4c6c 100644
--- a/utils/apidoc/mdn/util.dart
+++ b/utils/apidoc/mdn/util.dart
@@ -1,7 +1,7 @@
-#library("util");
+library util;
 
-#import("dart:io");
-#import("dart:json");
+import 'dart:io';
+import 'dart:json';
 
 Map<String, Map> _allProps;
 
@@ -9,7 +9,7 @@
   if (_allProps == null) {
     // Database of expected property names for each type in WebKit.
     _allProps = JSON.parse(
-        new File('data/dartIdl.json').readAsTextSync());
+        new File('data/dartIdl.json').readAsStringSync());
   }
   return _allProps;
 }
diff --git a/utils/apidoc/scripts/list_files.dart b/utils/apidoc/scripts/list_files.dart
index 08a5fdf..1a518e2 100644
--- a/utils/apidoc/scripts/list_files.dart
+++ b/utils/apidoc/scripts/list_files.dart
@@ -7,9 +7,9 @@
  * used when building API documentation. Used by gyp to determine when apidocs
  * need to be regenerated (see `apidoc.gyp`).
  */
-#library('list_files');
+library list_files;
 
-#import('dart:io');
+import 'dart:io';
 
 const allowedExtensions = const [
   '.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt'
diff --git a/utils/archive/archive.dart b/utils/archive/archive.dart
index c9677c0..48fab29 100644
--- a/utils/archive/archive.dart
+++ b/utils/archive/archive.dart
@@ -6,10 +6,10 @@
  * The primary library file for the archive library. This is the only file that
  * should be imported by clients.
  */
-#library("archive");
+library archive;
 
-#import("entry.dart", prefix: "entry");
-#import("reader.dart", prefix: "reader");
+import 'entry.dart' as entry;
+import 'reader.dart' as reader;
 
 // TODO(nweiz): Remove this when 3071 is fixed.
 /** An error raised by the archive library. */
diff --git a/utils/archive/entry.dart b/utils/archive/entry.dart
index e65b965..d27bf49 100644
--- a/utils/archive/entry.dart
+++ b/utils/archive/entry.dart
@@ -2,13 +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.
 
-#library("entry");
+library entry;
 
-#import("dart:io");
-#import("archive.dart", prefix: "archive");
-#import("entry_request.dart");
-#import("read_request.dart", prefix: 'read');
-#import("utils.dart");
+import 'dart:io';
+import 'archive.dart' as archive;
+import 'entry_request.dart';
+import 'read_request.dart' as read;
+import 'utils.dart';
 
 /**
  * A single file in an archive.
diff --git a/utils/archive/entry_request.dart b/utils/archive/entry_request.dart
index 97d37a6..5aab778 100644
--- a/utils/archive/entry_request.dart
+++ b/utils/archive/entry_request.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /** The request ids for entry-related messages to send to the C extension. */
-#library("entry_request");
+library entry_request;
 
-#import("read_request.dart", prefix: "read");
+import 'read_request.dart' as read;
 
 final int _first = read.LAST;
 
diff --git a/utils/archive/input_stream.dart b/utils/archive/input_stream.dart
index 5e781d3..a2198e8 100644
--- a/utils/archive/input_stream.dart
+++ b/utils/archive/input_stream.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("input_stream");
+library input_stream;
 
-#import("archive.dart", prefix: "archive");
-#import("entry.dart");
-#import("read_request.dart");
-#import("utils.dart");
+import 'archive.dart' as archive;
+import 'entry.dart';
+import 'read_request.dart';
+import 'utils.dart';
 
 /**
  * A stream of [ArchiveEntry]s being read from an archive.
diff --git a/utils/archive/options.dart b/utils/archive/options.dart
index 58d01f3..0eba560 100644
--- a/utils/archive/options.dart
+++ b/utils/archive/options.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('options');
+library options;
 
 /**
  * An individual option.
diff --git a/utils/archive/read_request.dart b/utils/archive/read_request.dart
index b3e4eb3..33efdbc 100644
--- a/utils/archive/read_request.dart
+++ b/utils/archive/read_request.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /** The request ids for read-related messages to send to the C extension. */
-#library("read_request");
+library read_request;
 
 final int NEW = 0;
 final int SUPPORT_FILTER_ALL = 1;
diff --git a/utils/archive/reader.dart b/utils/archive/reader.dart
index 84bcbb8..04fdddf 100644
--- a/utils/archive/reader.dart
+++ b/utils/archive/reader.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("reader");
+library reader;
 
-#import("input_stream.dart");
-#import("options.dart");
-#import("read_request.dart");
-#import("utils.dart");
+import 'input_stream.dart';
+import 'options.dart';
+import 'read_request.dart';
+import 'utils.dart';
 
 /**
  * A class for extracting and decompressing an archive.
diff --git a/utils/archive/utils.dart b/utils/archive/utils.dart
index c512954..1a0fc38 100644
--- a/utils/archive/utils.dart
+++ b/utils/archive/utils.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("utils");
+library utils;
 
-#import("dart-ext:dart_archive");
-#import("dart:isolate");
-#import("archive.dart", prefix: "archive");
+import 'dart-ext:dart_archive';
+import 'dart:isolate';
+import 'archive.dart' as archive;
 
 /** The cache of the port used to communicate with the C extension. */
 SendPort _port;
diff --git a/utils/compiler/build_helper.dart b/utils/compiler/build_helper.dart
index e7e31d7..fa2ec0c 100644
--- a/utils/compiler/build_helper.dart
+++ b/utils/compiler/build_helper.dart
@@ -36,7 +36,7 @@
       'dart2js-developer',
       dartUri, dartVmUri,
       'sdk/lib/_internal/compiler/implementation/dart2js.dart',
-      ' --enable_checked_mode');
+      r' ${DART_VM_FLAGS:---enable_checked_mode}');
   writeScript(developerUri, developerScript);
 
   List<String> dartdocScript = buildScript(
diff --git a/utils/css/css.dart b/utils/css/css.dart
index 208e8ab..e3c74f6 100644
--- a/utils/css/css.dart
+++ b/utils/css/css.dart
@@ -2,26 +2,26 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('css');
+library css;
 
-#import('dart:math', prefix: 'Math');
-#import("../lib/file_system.dart");
-#import('../lib/file_system_memory.dart');
+import 'dart:math' as Math;
+import '../lib/file_system.dart';
+import '../lib/file_system_memory.dart';
 
-#source('cssoptions.dart');
-#source('source.dart');
-#source('tokenkind.dart');
-#source('token.dart');
-#source('tokenizer_base.dart');
-#source('tokenizer.dart');
-#source('treebase.dart');
-#source('tree.dart');
-#source('cssselectorexception.dart');
-#source('cssworld.dart');
-#source('parser.dart');
-#source('validate.dart');
-#source('generate.dart');
-#source('world.dart');
+part 'cssoptions.dart';
+part 'source.dart';
+part 'tokenkind.dart';
+part 'token.dart';
+part 'tokenizer_base.dart';
+part 'tokenizer.dart';
+part 'treebase.dart';
+part 'tree.dart';
+part 'cssselectorexception.dart';
+part 'cssworld.dart';
+part 'parser.dart';
+part 'validate.dart';
+part 'generate.dart';
+part 'world.dart';
 
 
 void initCssWorld([bool commandLine = true]) {
diff --git a/utils/css/parser.dart b/utils/css/parser.dart
index 1d32300..37d11a5 100644
--- a/utils/css/parser.dart
+++ b/utils/css/parser.dart
@@ -136,7 +136,7 @@
   }
 
   void _error(String message, [SourceSpan location=null]) {
-    if (location === null) {
+    if (location == null) {
       location = _peekToken.span;
     }
 
@@ -152,7 +152,7 @@
   }
 
   void _warning(String message, [SourceSpan location=null]) {
-    if (location === null) {
+    if (location == null) {
       location = _peekToken.span;
     }
 
diff --git a/utils/css/tokenizer_base.dart b/utils/css/tokenizer_base.dart
index df270f4..af666b4 100644
--- a/utils/css/tokenizer_base.dart
+++ b/utils/css/tokenizer_base.dart
@@ -180,7 +180,7 @@
 
   int readHex([int hexLength]) {
     int maxIndex;
-    if (hexLength === null) {
+    if (hexLength == null) {
       maxIndex = _text.length - 1;
     } else {
       // TODO(jimhug): What if this is too long?
@@ -191,7 +191,7 @@
     while (_index < maxIndex) {
       final digit = _hexDigit(_text.charCodeAt(_index));
       if (digit == -1) {
-        if (hexLength === null) {
+        if (hexLength == null) {
           return result;
         } else {
           return -1;
diff --git a/utils/css/tool.dart b/utils/css/tool.dart
index af38b3a..6a96b50 100644
--- a/utils/css/tool.dart
+++ b/utils/css/tool.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('csstool');
+library csstool;
 
-#import('dart:io');
-#import('css.dart');
-#import('../lib/file_system.dart');
-#import('../lib/file_system_vm.dart');
+import 'dart:io';
+import 'css.dart';
+import '../lib/file_system.dart';
+import '../lib/file_system_vm.dart';
 
 
 FileSystem files;
diff --git a/utils/css/uitest.dart b/utils/css/uitest.dart
index 12c6425..87c913a 100644
--- a/utils/css/uitest.dart
+++ b/utils/css/uitest.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import('dart:html');
-#import('css.dart');
-#import('../lib/file_system_memory.dart');
+import 'dart:html';
+import 'css.dart';
+import '../lib/file_system_memory.dart';
 
 void runCss([bool debug = false, bool parseOnly = false]) {
   final Document doc = window.document;
diff --git a/utils/lib/file_system.dart b/utils/lib/file_system.dart
index 32d0b49..7b8da62 100644
--- a/utils/lib/file_system.dart
+++ b/utils/lib/file_system.dart
@@ -5,7 +5,7 @@
 // TODO(terry): Investigate common library for file I/O shared between frog and tools.
 
 /** Abstraction for file systems and utility functions to manipulate paths. */
-#library('file_system');
+library file_system;
 
 /**
  * Abstraction around file system access to work in a variety of different
diff --git a/utils/lib/file_system_memory.dart b/utils/lib/file_system_memory.dart
index c60ea18..f638a41 100644
--- a/utils/lib/file_system_memory.dart
+++ b/utils/lib/file_system_memory.dart
@@ -4,9 +4,9 @@
 
 // TODO(terry): Investigate common library for file I/O shared between frog and tools.
 
-#library('file_system_memory');
+library file_system_memory;
 
-#import('file_system.dart');
+import 'file_system.dart';
 
 /**
  * [FileSystem] implementation a memory buffer.
diff --git a/utils/lib/file_system_vm.dart b/utils/lib/file_system_vm.dart
index 25d634e..12fb712 100644
--- a/utils/lib/file_system_vm.dart
+++ b/utils/lib/file_system_vm.dart
@@ -4,10 +4,10 @@
 
 // TODO(terry): Investigate common library for file I/O shared between frog and tools.
 
-#library('file_system_vm');
-#import('dart:io');
-#import('file_system.dart');
-#import('dart:utf');
+library file_system_vm;
+import 'dart:io';
+import 'file_system.dart';
+import 'dart:utf';
 
 /** File system implementation using the vm api's. */
 class VMFileSystem implements FileSystem {
diff --git a/utils/peg/pegparser.dart b/utils/peg/pegparser.dart
index 59cc47e..dd49d0a 100644
--- a/utils/peg/pegparser.dart
+++ b/utils/peg/pegparser.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('Peg Parser');
+library Peg Parser;
 
 /*
  * The following functions are combinators for building Rules.
@@ -781,7 +781,7 @@
   _match(state, pos) {
     // See if we are still parsing the same input.  Relies on the fact that the
     // input is a string and strings are immutable.
-    if (parseInstance !== state._text) {
+    if (!identical(parseInstance, state._text)) {
       map = new Map<int,Object>();
       parseInstance = state._text;
     }
diff --git a/utils/pub/command_help.dart b/utils/pub/command_help.dart
index 938a50e..7681f37 100644
--- a/utils/pub/command_help.dart
+++ b/utils/pub/command_help.dart
@@ -4,6 +4,9 @@
 
 library command_help;
 
+import 'dart:io' as io;
+import 'exit_codes.dart' as exit_codes;
+import 'io.dart';
 import 'pub.dart';
 
 /** Handles the `help` pub command. */
@@ -16,7 +19,15 @@
     if (commandOptions.rest.isEmpty) {
       printUsage();
     } else {
-      pubCommands[commandOptions.rest[0]].printUsage();
+      var name = commandOptions.rest[0];
+      var command = pubCommands[name];
+      if (command == null) {
+        printError('Could not find a command named "$name".');
+        printError('Run "pub help" to see available commands.');
+        io.exit(exit_codes.USAGE);
+      }
+
+      command.printUsage();
     }
   }
 }
diff --git a/utils/pub/command_version.dart b/utils/pub/command_version.dart
index a11e2db..464d1a2 100644
--- a/utils/pub/command_version.dart
+++ b/utils/pub/command_version.dart
@@ -12,5 +12,7 @@
   String get usage => 'pub version';
   bool get requiresEntrypoint => false;
 
-  Future onRun() => printVersion();
+  Future onRun() {
+    printVersion();
+  }
 }
\ No newline at end of file
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart
index 7a82a63..521f261 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -215,14 +215,16 @@
    */
   Future _linkSecondaryPackageDirs(_) {
     var binDir = join(root.dir, 'bin');
-    var testDir = join(root.dir, 'test');
     var exampleDir = join(root.dir, 'example');
+    var testDir = join(root.dir, 'test');
+    var toolDir = join(root.dir, 'tool');
     var webDir = join(root.dir, 'web');
     return dirExists(binDir).chain((exists) {
       if (!exists) return new Future.immediate(null);
       return _linkSecondaryPackageDir(binDir);
-    }).chain((_) => _linkSecondaryPackageDirsRecursively(testDir))
-      .chain((_) => _linkSecondaryPackageDirsRecursively(exampleDir))
+    }).chain((_) => _linkSecondaryPackageDirsRecursively(exampleDir))
+      .chain((_) => _linkSecondaryPackageDirsRecursively(testDir))
+      .chain((_) => _linkSecondaryPackageDirsRecursively(toolDir))
       .chain((_) => _linkSecondaryPackageDirsRecursively(webDir));
   }
 
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 6327638..2cba5ca 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -148,6 +148,15 @@
    * remote repository. See the manpage for `git clone` for more information.
    */
   Future _clone(String from, String to, {bool mirror: false}) {
+    // TODO(rnystrom): For some mysterious reason, the Windows buildbots do not
+    // have the right working directory when pub spawns git, so the relative
+    // path fails. To work around it, if [from] looks like a relative path then
+    // manually make it absolute here. Should figure out what's really going on.
+    var URL_LIKE = new RegExp(r'^[a-z]+\:');
+    if (!URL_LIKE.hasMatch(from)) {
+      from = getFullPath(from);
+    }
+
     // Git on Windows does not seem to automatically create the destination
     // directory.
     return ensureDir(to).chain((_) {
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index cccedfc17..793c7263 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -19,9 +19,9 @@
 String _gitCommandCache;
 
 /** Gets the current working directory. */
-String get workingDir => new File('.').fullPathSync();
+String get currentWorkingDir => new File('.').fullPathSync();
 
-const Pattern NEWLINE_PATTERN = const RegExp("\r\n?|\n\r?");
+final NEWLINE_PATTERN = new RegExp("\r\n?|\n\r?");
 
 /**
  * Prints the given string to `stderr` on its own line.
@@ -118,7 +118,7 @@
  * a [File].
  */
 Future<String> readTextFile(file) {
-  return new File(_getPath(file)).readAsText(Encoding.UTF_8);
+  return new File(_getPath(file)).readAsString(Encoding.UTF_8);
 }
 
 /**
@@ -318,67 +318,52 @@
 }
 
 /**
- * Creates a new symlink that creates an alias from the package [from] to [to],
- * both of which can be a [String], [File], or [Directory]. Returns a [Future]
- * which completes to the symlink file (i.e. [to]).
- *
- * Unlike [createSymlink], this has heuristics to detect if [from] is using
- * the old or new style of package layout. If it's using the new style, then
- * it will create a symlink to the "lib" directory contained inside that
- * package directory. Otherwise, it just symlinks to the package directory
- * itself.
+ * Creates a new symlink that creates an alias from the `lib` directory of
+ * package [from] to [to], both of which can be a [String], [File], or
+ * [Directory]. Returns a [Future] which completes to the symlink file (i.e.
+ * [to]). If [from] does not have a `lib` directory, this shows a warning if
+ * appropriate and then does nothing.
  */
-// TODO(rnystrom): Remove this when old style packages are no longer supported.
-// See: http://code.google.com/p/dart/issues/detail?id=4964.
 Future<File> createPackageSymlink(String name, from, to,
     {bool isSelfLink: false}) {
-  // If from contains any Dart files at the top level (aside from build.dart)
-  // we assume that means it's an old style package.
-  return listDir(from).chain((contents) {
-    var isOldStyle = contents.some(
-        (file) => file.endsWith('.dart') && basename(file) != 'build.dart');
+  // See if the package has a "lib" directory.
+  from = join(from, 'lib');
+  return dirExists(from).chain((exists) {
+    if (exists) return createSymlink(from, to);
 
-    if (isOldStyle) {
-      if (isSelfLink) {
-        printError('Warning: Package "$name" is using a deprecated layout.');
-        printError('See http://www.dartlang.org/docs/pub-package-manager/'
-            'package-layout.html for details.');
-
-        // Do not create self-links on old style packages.
-        return new Future.immediate(to);
-      } else {
-        return createSymlink(from, to);
-      }
+    // It's OK for the self link (i.e. the root package) to not have a lib
+    // directory since it may just be a leaf application that only has
+    // code in bin or web.
+    if (!isSelfLink) {
+      printError(
+          'Warning: Package "$name" does not have a "lib" directory so you '
+          'will not be able to import any libraries from it.');
     }
 
-    // It's a new style package, so symlink to the 'lib' directory. But only
-    // if the package actually *has* one. Otherwise, we won't create a
-    // symlink at all.
-    from = join(from, 'lib');
-    return dirExists(from).chain((exists) {
-      if (exists) {
-        return createSymlink(from, to);
-      } else {
-        // It's OK for the self link (i.e. the root package) to not have a lib
-        // directory since it may just be a leaf application that only has
-        // code in bin or web.
-        if (!isSelfLink) {
-          printError(
-              'Warning: Package "$name" does not have a "lib" directory.');
-        }
-
-        return new Future.immediate(to);
-      }
-    });
+    return new Future.immediate(to);
   });
 }
 
-/**
- * Given [entry] which may be a [String], [File], or [Directory] relative to
- * the current working directory, returns its full canonicalized path.
- */
-// TODO(rnystrom): Should this be async?
-String getFullPath(entry) => new File(_getPath(entry)).fullPathSync();
+/// Given [entry] which may be a [String], [File], or [Directory] relative to
+/// the current working directory, returns its full canonicalized path.
+String getFullPath(entry) {
+  var path = _getPath(entry);
+
+  // Don't do anything if it's already absolute.
+  if (Platform.operatingSystem == 'windows') {
+    // An absolute path on Windows is either UNC (two leading backslashes),
+    // or a drive letter followed by a colon and a slash.
+    var ABSOLUTE = new RegExp(r'^(\\\\|[a-zA-Z]:[/\\])');
+    if (ABSOLUTE.hasMatch(path)) return path;
+  } else {
+    if (path.startsWith('/')) return path;
+  }
+
+  // Using Path.join here instead of File().fullPathSync() because the former
+  // does not require an actual file to exist at that path.
+  return new Path.fromNative(currentWorkingDir).join(new Path(path))
+      .toNativePath();
+}
 
 // TODO(nweiz): make this configurable
 /**
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index b1dc0cf..4c2f77e 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -59,8 +59,9 @@
   try {
     globalOptions = pubArgParser.parse(new Options().arguments);
   } on FormatException catch (e) {
-    printUsage(description: e.message);
-    return;
+    printError(e.message);
+    printError('Run "pub help" to see available options.');
+    exit(exit_codes.USAGE);
   }
 
   if (globalOptions['version']) {
@@ -95,7 +96,7 @@
   // Select the command.
   var command = pubCommands[globalOptions.rest[0]];
   if (command == null) {
-    printError('Unknown command "${globalOptions.rest[0]}".');
+    printError('Could not find a command named "${globalOptions.rest[0]}".');
     printError('Run "pub help" to see available commands.');
     exit(exit_codes.USAGE);
     return;
@@ -115,9 +116,10 @@
   print('Global options:');
   print(pubArgParser.getUsage());
   print('');
-  print('The commands are:');
 
   // Show the commands sorted.
+  print('Available commands:');
+
   // TODO(rnystrom): A sorted map would be nice.
   int length = 0;
   var names = <String>[];
@@ -150,12 +152,12 @@
   /**
    * A one-line description of this command.
    */
-  abstract String get description;
+  String get description;
 
   /**
    * How to invoke this command (e.g. `"pub install [package]"`).
    */
-  abstract String get usage;
+  String get usage;
 
   /// Whether or not this command requires [entrypoint] to be defined. If false,
   /// Pub won't look for a pubspec and [entrypoint] will be null when the
@@ -176,7 +178,8 @@
     try {
      commandOptions = commandParser.parse(commandArgs);
     } on FormatException catch (e) {
-      this.printUsage(description: e.message);
+      printError(e.message);
+      printError('Use "pub help" for more information.');
       exit(exit_codes.USAGE);
     }
 
@@ -204,7 +207,7 @@
       // TODO(rnystrom): Will eventually need better logic to walk up
       // subdirectories until we hit one that looks package-like. For now, just
       // assume the cwd is it.
-      future = Package.load(null, workingDir, cache.sources)
+      future = Package.load(null, currentWorkingDir, cache.sources)
           .transform((package) => new Entrypoint(package, cache));
     }
 
@@ -226,10 +229,10 @@
     future.handleException((e) {
       if (e is PubspecNotFoundException && e.name == null) {
         e = 'Could not find a file named "pubspec.yaml" in the directory '
-          '$workingDir.';
+          '$currentWorkingDir.';
       } else if (e is PubspecHasNoNameException && e.name == null) {
         e = 'pubspec.yaml is missing the required "name" field (e.g. "name: '
-          '${basename(workingDir)}").';
+          '${basename(currentWorkingDir)}").';
       }
 
       handleError(e, future.stackTrace);
@@ -245,7 +248,7 @@
    * completes when the command is done or fails if the command fails. If the
    * command is synchronous, it may return `null`.
    */
-  abstract Future onRun();
+  Future onRun();
 
   /** Displays usage information for this command. */
   void printUsage([String description]) {
diff --git a/utils/pub/pubspec.dart b/utils/pub/pubspec.dart
index 62a4dc5..20f15a1 100644
--- a/utils/pub/pubspec.dart
+++ b/utils/pub/pubspec.dart
@@ -48,7 +48,6 @@
   factory Pubspec.parse(String contents, SourceRegistry sources) {
     var name = null;
     var version = Version.none;
-    var dependencies = <PackageRef>[];
 
     if (contents.trim() == '') return new Pubspec.empty();
 
@@ -71,67 +70,34 @@
       version = new Version.parse(parsedPubspec['version']);
     }
 
-    if (parsedPubspec.containsKey('dependencies')) {
-      var dependencyEntries = parsedPubspec['dependencies'];
-      if (dependencyEntries is! Map ||
-          dependencyEntries.keys.some((e) => e is! String)) {
-        throw new FormatException(
-            'The pubspec dependencies should be a map of package names, but '
-            'was ${dependencyEntries}.');
-      }
-
-      dependencyEntries.forEach((name, spec) {
-        var description, source;
-        var versionConstraint = new VersionRange();
-        if (spec == null) {
-          description = name;
-          source = sources.defaultSource;
-        } else if (spec is String) {
-          description = name;
-          source = sources.defaultSource;
-          versionConstraint = new VersionConstraint.parse(spec);
-        } else if (spec is Map) {
-          if (spec.containsKey('version')) {
-            versionConstraint = new VersionConstraint.parse(
-                spec.remove('version'));
-          }
-
-          var sourceNames = spec.keys;
-          if (sourceNames.length > 1) {
-            throw new FormatException(
-                'Dependency $name may only have one source: $sourceNames.');
-          }
-
-          var sourceName = only(sourceNames);
-          if (sourceName is! String) {
-            throw new FormatException(
-                'Source name $sourceName should be a string.');
-          }
-
-          source = sources[sourceName];
-          description = spec[sourceName];
-        } else {
-          throw new FormatException(
-              'Dependency specification $spec should be a string or a '
-              'mapping.');
-        }
-
-        source.validateDescription(description, fromLockFile: false);
-
-        dependencies.add(new PackageRef(
-            name, source, versionConstraint, description));
-      });
-    }
+    var dependencies = _parseDependencies(sources,
+        parsedPubspec['dependencies']);
 
     // Even though the pub app itself doesn't use these fields, we validate
     // them here so that users find errors early before they try to upload to
     // the server:
+    // TODO(rnystrom): We should split this validation into separate layers:
+    // 1. Stuff that is required in any pubspec to perform any command. Things
+    //    like "must have a name". That should go here.
+    // 2. Stuff that is required to upload a package. Things like "homepage
+    //    must use a valid scheme". That should go elsewhere. pub upload should
+    //    call it, and we should provide a separate command to show the user,
+    //    and also expose it to the editor in some way.
 
-    if (parsedPubspec.containsKey('homepage') &&
-        parsedPubspec['homepage'] is! String) {
-      throw new FormatException(
-          'The "homepage" field should be a string, but was '
-          '${parsedPubspec["homepage"]}.');
+    if (parsedPubspec.containsKey('homepage')) {
+      var homepage = parsedPubspec['homepage'];
+
+      if (homepage is! String) {
+        throw new FormatException(
+            'The "homepage" field should be a string, but was "$homepage".');
+      }
+
+      var goodScheme = new RegExp(r'^https?:');
+      if (!goodScheme.hasMatch(homepage)) {
+        throw new FormatException(
+            'The "homepage" field should be an "http:" or "https:" URL, but '
+            'was "$homepage".');
+      }
     }
 
     if (parsedPubspec.containsKey('author') &&
@@ -163,3 +129,58 @@
     return new Pubspec(name, version, dependencies);
   }
 }
+
+List<PackageRef> _parseDependencies(SourceRegistry sources, yaml) {
+  var dependencies = <PackageRef>[];
+
+  // Allow an empty dependencies key.
+  if (yaml == null) return dependencies;
+
+  if (yaml is! Map || yaml.keys.some((e) => e is! String)) {
+    throw new FormatException(
+        'The pubspec dependencies should be a map of package names, but '
+        'was ${yaml}.');
+  }
+
+  yaml.forEach((name, spec) {
+    var description, source;
+    var versionConstraint = new VersionRange();
+    if (spec == null) {
+      description = name;
+      source = sources.defaultSource;
+    } else if (spec is String) {
+      description = name;
+      source = sources.defaultSource;
+      versionConstraint = new VersionConstraint.parse(spec);
+    } else if (spec is Map) {
+      if (spec.containsKey('version')) {
+        versionConstraint = new VersionConstraint.parse(spec.remove('version'));
+      }
+
+      var sourceNames = spec.keys;
+      if (sourceNames.length > 1) {
+        throw new FormatException(
+            'Dependency $name may only have one source: $sourceNames.');
+      }
+
+      var sourceName = only(sourceNames);
+      if (sourceName is! String) {
+        throw new FormatException(
+            'Source name $sourceName should be a string.');
+      }
+
+      source = sources[sourceName];
+      description = spec[sourceName];
+    } else {
+      throw new FormatException(
+          'Dependency specification $spec should be a string or a mapping.');
+    }
+
+    source.validateDescription(description, fromLockFile: false);
+
+    dependencies.add(new PackageRef(
+        name, source, versionConstraint, description));
+  });
+
+  return dependencies;
+}
\ No newline at end of file
diff --git a/utils/pub/source.dart b/utils/pub/source.dart
index 0dc6a23..85a6c7b 100644
--- a/utils/pub/source.dart
+++ b/utils/pub/source.dart
@@ -21,7 +21,7 @@
    * The name of the source. Should be lower-case, suitable for use in a
    * filename, and unique accross all sources.
    */
-  abstract String get name;
+  String get name;
 
   /// Whether or not this source is the default source.
   bool get isDefault => systemCache.sources.defaultSource == this;
@@ -34,7 +34,7 @@
    * packages. It doesn't need to be cached if all packages are available
    * locally.
    */
-  abstract bool get shouldCache;
+  bool get shouldCache;
 
   /**
    * The system cache with which this source is registered.
diff --git a/utils/pub/version.dart b/utils/pub/version.dart
index a7b6b3a..b6e8e8f 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -18,7 +18,7 @@
   /** No released version: i.e. "0.0.0". */
   static Version get none => new Version(0, 0, 0);
 
-  static const _PARSE_REGEX = const RegExp(
+  static final _PARSE_REGEX = new RegExp(
       r'^'                                       // Start at beginning.
       r'(\d+).(\d+).(\d+)'                       // Version number.
       r'(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?'   // Pre-release.
@@ -411,7 +411,7 @@
     // unfortunately meaningful in YAML, requiring it to be quoted in a
     // pubspec.
     // See if it's a comparison operator followed by a version, like ">1.2.3".
-    var match = const RegExp(r"^([<>]=?)?(.*)$").firstMatch(text);
+    var match = new RegExp(r"^([<>]=?)?(.*)$").firstMatch(text);
     if (match != null) {
       var comparison = match[1];
       var version = new Version.parse(match[2]);
diff --git a/utils/pub/version_solver.dart b/utils/pub/version_solver.dart
index 5a624df..0b1a46b 100644
--- a/utils/pub/version_solver.dart
+++ b/utils/pub/version_solver.dart
@@ -330,9 +330,9 @@
  * responsibility of subclasses.
  */
 abstract class ChangeConstraint implements WorkItem {
-  abstract Future process(VersionSolver solver);
+  Future process(VersionSolver solver);
 
-  abstract void undo(VersionSolver solver);
+  void undo(VersionSolver solver);
 
   Future _processChange(VersionSolver solver, Dependency oldDependency,
       Dependency newDependency) {
diff --git a/utils/pub/yaml/composer.dart b/utils/pub/yaml/composer.dart
index 9558443..c10e5e8 100644
--- a/utils/pub/yaml/composer.dart
+++ b/utils/pub/yaml/composer.dart
@@ -106,13 +106,13 @@
 
   /** Parses a null scalar. */
   _ScalarNode parseNull(String content) {
-    if (!const RegExp("^(null|Null|NULL|~|)\$").hasMatch(content)) return null;
+    if (!new RegExp("^(null|Null|NULL|~|)\$").hasMatch(content)) return null;
     return new _ScalarNode(_Tag.yaml("null"), value: null);
   }
 
   /** Parses a boolean scalar. */
   _ScalarNode parseBool(String content) {
-    var match = const RegExp("^(?:(true|True|TRUE)|(false|False|FALSE))\$").
+    var match = new RegExp("^(?:(true|True|TRUE)|(false|False|FALSE))\$").
       firstMatch(content);
     if (match == null) return null;
     return new _ScalarNode(_Tag.yaml("bool"), value: match.group(1) != null);
@@ -120,13 +120,13 @@
 
   /** Parses an integer scalar. */
   _ScalarNode parseInt(String content) {
-    var match = const RegExp("^[-+]?[0-9]+\$").firstMatch(content);
+    var match = new RegExp("^[-+]?[0-9]+\$").firstMatch(content);
     if (match != null) {
       return new _ScalarNode(_Tag.yaml("int"),
           value: Math.parseInt(match.group(0)));
     }
 
-    match = const RegExp("^0o([0-7]+)\$").firstMatch(content);
+    match = new RegExp("^0o([0-7]+)\$").firstMatch(content);
     if (match != null) {
       // TODO(nweiz): clean this up when Dart can parse an octal string
       var n = 0;
@@ -137,7 +137,7 @@
       return new _ScalarNode(_Tag.yaml("int"), value: n);
     }
 
-    match = const RegExp("^0x[0-9a-fA-F]+\$").firstMatch(content);
+    match = new RegExp("^0x[0-9a-fA-F]+\$").firstMatch(content);
     if (match != null) {
       return new _ScalarNode(_Tag.yaml("int"),
           value: Math.parseInt(match.group(0)));
@@ -148,7 +148,7 @@
 
   /** Parses a floating-point scalar. */
   _ScalarNode parseFloat(String content) {
-    var match = const RegExp(
+    var match = new RegExp(
         "^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?\$").
       firstMatch(content);
     if (match != null) {
@@ -159,14 +159,14 @@
           value: Math.parseDouble(matchStr));
     }
 
-    match = const RegExp("^([+-]?)\.(inf|Inf|INF)\$").firstMatch(content);
+    match = new RegExp("^([+-]?)\.(inf|Inf|INF)\$").firstMatch(content);
     if (match != null) {
       var infinityStr = match.group(1) == "-" ? "-Infinity" : "Infinity";
       return new _ScalarNode(_Tag.yaml("float"),
           value: Math.parseDouble(infinityStr));
     }
 
-    match = const RegExp("^\.(nan|NaN|NAN)\$").firstMatch(content);
+    match = new RegExp("^\.(nan|NaN|NAN)\$").firstMatch(content);
     if (match != null) {
       return new _ScalarNode(_Tag.yaml("float"),
           value: Math.parseDouble("NaN"));
diff --git a/utils/pub/yaml/constructor.dart b/utils/pub/yaml/constructor.dart
index 8371c94..d52ef6e 100644
--- a/utils/pub/yaml/constructor.dart
+++ b/utils/pub/yaml/constructor.dart
@@ -12,7 +12,7 @@
   _Node root;
 
   /** Map from anchor names to the most recent Dart node with that anchor. */
-  Map<String, Dynamic> anchors;
+  Map<String, dynamic> anchors;
 
   _Constructor(this.root) : this.anchors = {};
 
diff --git a/utils/pub/yaml/deep_equals.dart b/utils/pub/yaml/deep_equals.dart
index 2cb38cc..95c69c7 100644
--- a/utils/pub/yaml/deep_equals.dart
+++ b/utils/pub/yaml/deep_equals.dart
@@ -2,14 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("deep_equals");
+library deep_equals;
 
 /**
  * Returns whether two objects are structurally equivalent. This considers NaN
  * values to be equivalent. It also handles self-referential structures.
  */
 bool deepEquals(obj1, obj2, [List parents1, List parents2]) {
-  if (obj1 === obj2) return true;
+  if (identical(obj1, obj2)) return true;
   if (parents1 == null) {
     parents1 = [];
     parents2 = [];
@@ -17,8 +17,8 @@
 
   // parents1 and parents2 are guaranteed to be the same size.
   for (var i = 0; i < parents1.length; i++) {
-    var loop1 = obj1 === parents1[i];
-    var loop2 = obj2 === parents2[i];
+    var loop1 = identical(obj1, parents1[i]);
+    var loop2 = identical(obj2, parents2[i]);
     // If both structures loop in the same place, they're equal at that point in
     // the structure. If one loops and the other doesn't, they're not equal.
     if (loop1 && loop2) return true;
diff --git a/utils/pub/yaml/model.dart b/utils/pub/yaml/model.dart
index f9dd005..f709536 100644
--- a/utils/pub/yaml/model.dart
+++ b/utils/pub/yaml/model.dart
@@ -146,7 +146,7 @@
       // 20 is the maximum value for this argument, which we use since YAML
       // doesn't specify a maximum.
       return value.toStringAsExponential(20).
-        replaceFirst(const RegExp("0+e"), "e");
+        replaceFirst(new RegExp("0+e"), "e");
     }
 
     if (value is String) {
diff --git a/utils/pub/yaml/yaml.dart b/utils/pub/yaml/yaml.dart
index 01c8a3a..3918743 100644
--- a/utils/pub/yaml/yaml.dart
+++ b/utils/pub/yaml/yaml.dart
@@ -2,18 +2,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("yaml");
+library yaml;
 
-#import('dart:math', prefix: 'Math');
+import 'dart:math' as Math;
 
-#import("deep_equals.dart");
+import 'deep_equals.dart';
 
-#source("yaml_map.dart");
-#source("model.dart");
-#source("parser.dart");
-#source("visitor.dart");
-#source("composer.dart");
-#source("constructor.dart");
+part 'yaml_map.dart';
+part 'model.dart';
+part 'parser.dart';
+part 'visitor.dart';
+part 'composer.dart';
+part 'constructor.dart';
 
 /**
  * Loads a single document from a YAML string. If the string contains more than
diff --git a/utils/pub/yaml/yaml_map.dart b/utils/pub/yaml/yaml_map.dart
index 209e448..0826cee 100644
--- a/utils/pub/yaml/yaml_map.dart
+++ b/utils/pub/yaml/yaml_map.dart
@@ -85,7 +85,7 @@
 int _hashCode(obj, [List parents]) {
   if (parents == null) {
     parents = [];
-  } else if (parents.some((p) => p === obj)) {
+  } else if (parents.some((p) => identical(p, obj))) {
     return -1;
   }
 
diff --git a/utils/template/codegen.dart b/utils/template/codegen.dart
index a622fba..6f566a6 100644
--- a/utils/template/codegen.dart
+++ b/utils/template/codegen.dart
@@ -501,7 +501,7 @@
 
 class ElemCG {
   // List of identifiers and quoted strings (single and double quoted).
-  var identRe = const RegExp(
+  var identRe = new RegExp(
     "\s*('\"\\'\\\"[^'\"\\'\\\"]+'\"\\'\\\"|[_A-Za-z][_A-Za-z0-9]*)");
 
   List<CGBlock> _cgBlocks;
diff --git a/utils/template/parser.dart b/utils/template/parser.dart
index 9d22b6b..120e269 100644
--- a/utils/template/parser.dart
+++ b/utils/template/parser.dart
@@ -152,7 +152,7 @@
   }
 
   void _error(String message, [SourceSpan location=null]) {
-    if (location === null) {
+    if (location == null) {
       location = _peekToken.span;
     }
 
@@ -166,7 +166,7 @@
   }
 
   void _warning(String message, [SourceSpan location=null]) {
-    if (location === null) {
+    if (location == null) {
       location = _peekToken.span;
     }
 
diff --git a/utils/template/template.dart b/utils/template/template.dart
index 6d3ad99..ca2dd12 100644
--- a/utils/template/template.dart
+++ b/utils/template/template.dart
@@ -2,24 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('template');
+library template;
 
-#import('dart:math', prefix: 'Math');
-#import('../css/css.dart', prefix:'css');
-#import('../lib/file_system_memory.dart');
+import 'dart:math' as Math;
+import '../css/css.dart' as css;
+import '../lib/file_system_memory.dart';
 
-#source('tokenkind.dart');
-#source('token.dart');
-#source('source.dart');
-#source('tokenizer_base.dart');
-#source('tokenizer.dart');
-#source('parser.dart');
-#source('codegen.dart');
-#source('tree.dart');
-#source('htmltree.dart');
-#source('utils.dart');
-#source('temploptions.dart');
-#source('world.dart');
+part 'tokenkind.dart';
+part 'token.dart';
+part 'source.dart';
+part 'tokenizer_base.dart';
+part 'tokenizer.dart';
+part 'parser.dart';
+part 'codegen.dart';
+part 'tree.dart';
+part 'htmltree.dart';
+part 'utils.dart';
+part 'temploptions.dart';
+part 'world.dart';
 
 
 void initHtmlWorld([bool commandLine = true]) {
diff --git a/utils/template/tokenizer_base.dart b/utils/template/tokenizer_base.dart
index d8862b9..65b96cd 100644
--- a/utils/template/tokenizer_base.dart
+++ b/utils/template/tokenizer_base.dart
@@ -180,7 +180,7 @@
 
   int readHex([int hexLength]) {
     int maxIndex;
-    if (hexLength === null) {
+    if (hexLength == null) {
       maxIndex = _text.length - 1;
     } else {
       // TODO(jimhug): What if this is too long?
@@ -191,7 +191,7 @@
     while (_index < maxIndex) {
       final digit = _hexDigit(_text.charCodeAt(_index));
       if (digit == -1) {
-        if (hexLength === null) {
+        if (hexLength == null) {
           return result;
         } else {
           return -1;
diff --git a/utils/template/tool.dart b/utils/template/tool.dart
index e949962..97e1ac6 100644
--- a/utils/template/tool.dart
+++ b/utils/template/tool.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library('templatetool');
+library templatetool;
 
-#import('dart:io');
-#import('template.dart');
-#import('../lib/file_system.dart');
-#import('../lib/file_system_vm.dart');
+import 'dart:io';
+import 'template.dart';
+import '../lib/file_system.dart';
+import '../lib/file_system_vm.dart';
 
 
 FileSystem files;
diff --git a/utils/template/uitest.dart b/utils/template/uitest.dart
index fabe162..96fe497 100644
--- a/utils/template/uitest.dart
+++ b/utils/template/uitest.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#import('dart:html');
-#import('template.dart');
-#import('../lib/file_system_memory.dart');
+import 'dart:html';
+import 'template.dart';
+import '../lib/file_system_memory.dart';
 
 String currSampleTemplate;
 
diff --git a/utils/testrunner/layout_test_controller.dart b/utils/testrunner/layout_test_controller.dart
index 8dedf11..986e668 100644
--- a/utils/testrunner/layout_test_controller.dart
+++ b/utils/testrunner/layout_test_controller.dart
@@ -164,7 +164,7 @@
           var expectedFileName =
               '$sourceDir${Platform.pathSeparator}'
               '${label.replaceAll("###", "_")
-                      .replaceAll(const RegExp("[^A-Za-z0-9]"),"_")}.txt';
+                      .replaceAll(new RegExp("[^A-Za-z0-9]"),"_")}.txt';
           var expected = new File(expectedFileName);
           if (regenerate) {
             var ostream = expected.openOutputStream(FileMode.WRITE);
@@ -260,7 +260,7 @@
           var expectedFileName =
               '$sourceDir${Platform.pathSeparator}'
               '${label.replaceAll("###","_").
-                       replaceAll(const RegExp("[^A-Za-z0-9]"),"_")}.png';
+                       replaceAll(new RegExp("[^A-Za-z0-9]"),"_")}.png';
           var expected = new File(expectedFileName);
           if (regenerate) {
             var ostream = expected.openOutputStream(FileMode.WRITE);
diff --git a/utils/tests/css/declaration_test.dart b/utils/tests/css/declaration_test.dart
index 040e6e5..e0aea84 100644
--- a/utils/tests/css/declaration_test.dart
+++ b/utils/tests/css/declaration_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("declaration_tests");
-#import("../../css/css.dart");
+library declaration_tests;
+import '../../css/css.dart';
 
 void main() {
   initCssWorld();
diff --git a/utils/tests/css/expression_test.dart b/utils/tests/css/expression_test.dart
index bf13698..95c79e0 100644
--- a/utils/tests/css/expression_test.dart
+++ b/utils/tests/css/expression_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("expression_tests");
-#import("../../css/css.dart");
+library expression_tests;
+import '../../css/css.dart';
 
 main() {
   initCssWorld();
diff --git a/utils/tests/css/selector_literal_test.dart b/utils/tests/css/selector_literal_test.dart
index 1d88a34..d5f0433 100644
--- a/utils/tests/css/selector_literal_test.dart
+++ b/utils/tests/css/selector_literal_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("selector_literal_tests");
-#import("../../css/css.dart");
+library selector_literal_tests;
+import '../../css/css.dart';
 
 final String ERROR = 'CompilerException: <buffer>:';
 
diff --git a/utils/tests/peg/peg_test.dart b/utils/tests/peg/peg_test.dart
index e2dedb8..c285b01 100644
--- a/utils/tests/peg/peg_test.dart
+++ b/utils/tests/peg/peg_test.dart
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("peg_tests");
-#import('../../peg/pegparser.dart');
+library peg_tests;
+import '../../peg/pegparser.dart';
 
 testParens() {
   Grammar g = new Grammar();
diff --git a/utils/tests/pub/install/git/check_out_and_update_test.dart b/utils/tests/pub/install/git/check_out_and_update_test.dart
index fa632b6..4bcbba6 100644
--- a/utils/tests/pub/install/git/check_out_and_update_test.dart
+++ b/utils/tests/pub/install/git/check_out_and_update_test.dart
@@ -21,7 +21,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(cachePath, [
       dir('git', [
@@ -46,7 +46,7 @@
     ]).scheduleCommit();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     // When we download a new version of the git package, we should re-use the
     // git/cache directory but create a new git/ directory.
diff --git a/utils/tests/pub/install/git/check_out_branch_test.dart b/utils/tests/pub/install/git/check_out_branch_test.dart
index 9c06391..4516f9c 100644
--- a/utils/tests/pub/install/git/check_out_branch_test.dart
+++ b/utils/tests/pub/install/git/check_out_branch_test.dart
@@ -28,7 +28,7 @@
     appDir([{"git": {"url": "../foo.git", "ref": "old"}}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/install/git/check_out_revision_test.dart b/utils/tests/pub/install/git/check_out_revision_test.dart
index 9259682..8ef60f9 100644
--- a/utils/tests/pub/install/git/check_out_revision_test.dart
+++ b/utils/tests/pub/install/git/check_out_revision_test.dart
@@ -28,7 +28,7 @@
     appDir([{"git": {"url": "../foo.git", "ref": commit}}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/install/git/check_out_test.dart b/utils/tests/pub/install/git/check_out_test.dart
index e3d7191..6efa2be 100644
--- a/utils/tests/pub/install/git/check_out_test.dart
+++ b/utils/tests/pub/install/git/check_out_test.dart
@@ -21,7 +21,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(cachePath, [
       dir('git', [
diff --git a/utils/tests/pub/install/git/check_out_transitive_test.dart b/utils/tests/pub/install/git/check_out_transitive_test.dart
index f8327ba..662dbc7 100644
--- a/utils/tests/pub/install/git/check_out_transitive_test.dart
+++ b/utils/tests/pub/install/git/check_out_transitive_test.dart
@@ -26,7 +26,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp("Dependencies installed!\$"));
+        output: new RegExp("Dependencies installed!\$"));
 
     dir(cachePath, [
       dir('git', [
diff --git a/utils/tests/pub/install/git/check_out_twice_test.dart b/utils/tests/pub/install/git/check_out_twice_test.dart
index 2b768e7..ea07651 100644
--- a/utils/tests/pub/install/git/check_out_twice_test.dart
+++ b/utils/tests/pub/install/git/check_out_twice_test.dart
@@ -21,7 +21,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(cachePath, [
       dir('git', [
@@ -42,7 +42,7 @@
     // Verify that nothing breaks if we install a Git revision that's already
     // in the cache.
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     run();
   });
diff --git a/utils/tests/pub/install/git/check_out_with_trailing_slash_test.dart b/utils/tests/pub/install/git/check_out_with_trailing_slash_test.dart
index 1a27e90..5dd7f41 100644
--- a/utils/tests/pub/install/git/check_out_with_trailing_slash_test.dart
+++ b/utils/tests/pub/install/git/check_out_with_trailing_slash_test.dart
@@ -22,7 +22,7 @@
       appDir([{"git": "../foo.git/"}]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          output: const RegExp(r"Dependencies installed!$"));
+          output: new RegExp(r"Dependencies installed!$"));
 
       dir(cachePath, [
         dir('git', [
diff --git a/utils/tests/pub/install/git/dependency_name_match_pubspec_test.dart b/utils/tests/pub/install/git/dependency_name_match_pubspec_test.dart
index c2733be..c8f4648 100644
--- a/utils/tests/pub/install/git/dependency_name_match_pubspec_test.dart
+++ b/utils/tests/pub/install/git/dependency_name_match_pubspec_test.dart
@@ -30,7 +30,7 @@
     // TODO(nweiz): clean up this RegExp when either issue 4706 or 4707 is
     // fixed.
     schedulePub(args: ['install'],
-        error: const RegExp(r'^The name you specified for your dependency, '
+        error: new RegExp(r'^The name you specified for your dependency, '
             '"weirdname", doesn\'t match the name "foo" in its '
             r'pubspec\.'),
         exitCode: 1);
diff --git a/utils/tests/pub/install/git/different_repo_name_test.dart b/utils/tests/pub/install/git/different_repo_name_test.dart
index 2b9013e..e3c2f5c 100644
--- a/utils/tests/pub/install/git/different_repo_name_test.dart
+++ b/utils/tests/pub/install/git/different_repo_name_test.dart
@@ -29,7 +29,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('weirdname', [
diff --git a/utils/tests/pub/install/git/lock_version_test.dart b/utils/tests/pub/install/git/lock_version_test.dart
index 4676ae2..ced05d7 100644
--- a/utils/tests/pub/install/git/lock_version_test.dart
+++ b/utils/tests/pub/install/git/lock_version_test.dart
@@ -22,7 +22,7 @@
 
     // This install should lock the foo.git dependency to the current revision.
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -40,7 +40,7 @@
 
     // This install shouldn't update the foo.git dependency due to the lockfile.
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/install/git/require_pubspec_name_test.dart b/utils/tests/pub/install/git/require_pubspec_name_test.dart
index bde1ee1..e0ea55a 100644
--- a/utils/tests/pub/install/git/require_pubspec_name_test.dart
+++ b/utils/tests/pub/install/git/require_pubspec_name_test.dart
@@ -23,7 +23,7 @@
     // TODO(nweiz): clean up this RegExp when either issue 4706 or 4707 is
     // fixed.
     schedulePub(args: ['install'],
-        error: const RegExp(r'^Package "foo"' "'" 's pubspec.yaml file is '
+        error: new RegExp(r'^Package "foo"' "'" 's pubspec.yaml file is '
             r'missing the required "name" field \(e\.g\. "name: foo"\)\.'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/install/git/require_pubspec_test.dart b/utils/tests/pub/install/git/require_pubspec_test.dart
index 00eb9d2..917a1f5 100644
--- a/utils/tests/pub/install/git/require_pubspec_test.dart
+++ b/utils/tests/pub/install/git/require_pubspec_test.dart
@@ -22,7 +22,7 @@
     // TODO(nweiz): clean up this RegExp when either issue 4706 or 4707 is
     // fixed.
     schedulePub(args: ['install'],
-        error: const RegExp('^Package "foo" doesn\'t have a '
+        error: new RegExp('^Package "foo" doesn\'t have a '
             'pubspec.yaml file.'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/install/git/stay_locked_if_compatible_test.dart b/utils/tests/pub/install/git/stay_locked_if_compatible_test.dart
index c5e2331..59b4d44 100644
--- a/utils/tests/pub/install/git/stay_locked_if_compatible_test.dart
+++ b/utils/tests/pub/install/git/stay_locked_if_compatible_test.dart
@@ -22,7 +22,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -38,7 +38,7 @@
     appDir([{"git": "../foo.git", "version": ">=1.0.0"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/install/git/unlock_if_incompatible_test.dart b/utils/tests/pub/install/git/unlock_if_incompatible_test.dart
index 25476fc..17ddc10 100644
--- a/utils/tests/pub/install/git/unlock_if_incompatible_test.dart
+++ b/utils/tests/pub/install/git/unlock_if_incompatible_test.dart
@@ -21,7 +21,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -37,7 +37,7 @@
     appDir([{"git": "../foo.git", "version": ">=1.0.0"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/install/hosted/check_out_test.dart b/utils/tests/pub/install/hosted/check_out_test.dart
index c738daa..80126c5 100644
--- a/utils/tests/pub/install/hosted/check_out_test.dart
+++ b/utils/tests/pub/install/hosted/check_out_test.dart
@@ -16,7 +16,7 @@
     appDir([dependency("foo", "1.2.3")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp("Dependencies installed!\$"));
+        output: new RegExp("Dependencies installed!\$"));
 
     cacheDir({"foo": "1.2.3"}).scheduleValidate();
     packagesDir({"foo": "1.2.3"}).scheduleValidate();
diff --git a/utils/tests/pub/install/hosted/check_out_transitive_test.dart b/utils/tests/pub/install/hosted/check_out_transitive_test.dart
index 7a2f26a..c449acd 100644
--- a/utils/tests/pub/install/hosted/check_out_transitive_test.dart
+++ b/utils/tests/pub/install/hosted/check_out_transitive_test.dart
@@ -21,7 +21,7 @@
     appDir([dependency("foo", "1.2.3")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp("Dependencies installed!\$"));
+        output: new RegExp("Dependencies installed!\$"));
 
     cacheDir({"foo": "1.2.3", "bar": "2.0.4"}).scheduleValidate();
     packagesDir({"foo": "1.2.3", "bar": "2.0.4"}).scheduleValidate();
diff --git a/utils/tests/pub/install/hosted/do_not_update_on_removed_constraints_test.dart b/utils/tests/pub/install/hosted/do_not_update_on_removed_constraints_test.dart
index a41873c..6277936 100644
--- a/utils/tests/pub/install/hosted/do_not_update_on_removed_constraints_test.dart
+++ b/utils/tests/pub/install/hosted/do_not_update_on_removed_constraints_test.dart
@@ -21,7 +21,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -32,7 +32,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/install/hosted/fail_gracefully_on_missing_package_test.dart b/utils/tests/pub/install/hosted/fail_gracefully_on_missing_package_test.dart
index dae4ce6..aaddfcf 100644
--- a/utils/tests/pub/install/hosted/fail_gracefully_on_missing_package_test.dart
+++ b/utils/tests/pub/install/hosted/fail_gracefully_on_missing_package_test.dart
@@ -16,7 +16,7 @@
     appDir([dependency("foo", "1.2.3")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        error: const RegExp('Could not find package "foo" at '
+        error: new RegExp('Could not find package "foo" at '
                             'http://localhost:'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/install/hosted/fail_gracefully_on_url_resolve_test.dart b/utils/tests/pub/install/hosted/fail_gracefully_on_url_resolve_test.dart
index ffb48496..1cd6300 100644
--- a/utils/tests/pub/install/hosted/fail_gracefully_on_url_resolve_test.dart
+++ b/utils/tests/pub/install/hosted/fail_gracefully_on_url_resolve_test.dart
@@ -26,7 +26,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        error: const RegExp('Could not resolve URL "http://pub.invalid".'),
+        error: new RegExp('Could not resolve URL "http://pub.invalid".'),
         exitCode: 1);
 
     run();
diff --git a/utils/tests/pub/install/hosted/remove_removed_dependency_test.dart b/utils/tests/pub/install/hosted/remove_removed_dependency_test.dart
index add5837..4febc6e 100644
--- a/utils/tests/pub/install/hosted/remove_removed_dependency_test.dart
+++ b/utils/tests/pub/install/hosted/remove_removed_dependency_test.dart
@@ -19,7 +19,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -29,7 +29,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/install/hosted/remove_removed_transitive_dependency_test.dart b/utils/tests/pub/install/hosted/remove_removed_transitive_dependency_test.dart
index 62007fb..2a16d31 100644
--- a/utils/tests/pub/install/hosted/remove_removed_transitive_dependency_test.dart
+++ b/utils/tests/pub/install/hosted/remove_removed_transitive_dependency_test.dart
@@ -24,7 +24,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -36,7 +36,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/install/hosted/resolve_constraints_test.dart b/utils/tests/pub/install/hosted/resolve_constraints_test.dart
index 077f899..2a3f319 100644
--- a/utils/tests/pub/install/hosted/resolve_constraints_test.dart
+++ b/utils/tests/pub/install/hosted/resolve_constraints_test.dart
@@ -22,7 +22,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp("Dependencies installed!\$"));
+        output: new RegExp("Dependencies installed!\$"));
 
     cacheDir({
       "foo": "1.2.3",
diff --git a/utils/tests/pub/install/hosted/stay_locked_if_compatible_test.dart b/utils/tests/pub/install/hosted/stay_locked_if_compatible_test.dart
index 7ac56bf..aa79296 100644
--- a/utils/tests/pub/install/hosted/stay_locked_if_compatible_test.dart
+++ b/utils/tests/pub/install/hosted/stay_locked_if_compatible_test.dart
@@ -17,7 +17,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.0"}).scheduleValidate();
 
@@ -26,7 +26,7 @@
     appDir([dependency("foo", ">=1.0.0")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.0"}).scheduleValidate();
 
diff --git a/utils/tests/pub/install/hosted/stay_locked_if_new_is_satisfied_test.dart b/utils/tests/pub/install/hosted/stay_locked_if_new_is_satisfied_test.dart
index 30b0966..3a580c6 100644
--- a/utils/tests/pub/install/hosted/stay_locked_if_new_is_satisfied_test.dart
+++ b/utils/tests/pub/install/hosted/stay_locked_if_new_is_satisfied_test.dart
@@ -21,7 +21,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -39,7 +39,7 @@
     appDir([dependency("foo"), dependency("newdep")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/install/hosted/stay_locked_test.dart b/utils/tests/pub/install/hosted/stay_locked_test.dart
index c6e4b00..316333c 100644
--- a/utils/tests/pub/install/hosted/stay_locked_test.dart
+++ b/utils/tests/pub/install/hosted/stay_locked_test.dart
@@ -17,7 +17,7 @@
 
     // This install should lock the foo dependency to version 1.0.0.
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.0"}).scheduleValidate();
 
@@ -29,7 +29,7 @@
 
     // This install shouldn't update the foo dependency due to the lockfile.
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.0"}).scheduleValidate();
 
diff --git a/utils/tests/pub/install/hosted/unlock_if_incompatible_test.dart b/utils/tests/pub/install/hosted/unlock_if_incompatible_test.dart
index 3016bf5..89ca81f 100644
--- a/utils/tests/pub/install/hosted/unlock_if_incompatible_test.dart
+++ b/utils/tests/pub/install/hosted/unlock_if_incompatible_test.dart
@@ -17,7 +17,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.0"}).scheduleValidate();
 
@@ -26,7 +26,7 @@
     appDir([dependency("foo", ">1.0.0")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "1.0.1"}).scheduleValidate();
 
diff --git a/utils/tests/pub/install/hosted/unlock_if_new_is_unsatisfied_test.dart b/utils/tests/pub/install/hosted/unlock_if_new_is_unsatisfied_test.dart
index 21bb7cb..ba86a53 100644
--- a/utils/tests/pub/install/hosted/unlock_if_new_is_unsatisfied_test.dart
+++ b/utils/tests/pub/install/hosted/unlock_if_new_is_unsatisfied_test.dart
@@ -22,7 +22,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -42,7 +42,7 @@
     appDir([dependency("foo"), dependency("newdep")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "2.0.0",
diff --git a/utils/tests/pub/install/pub_install_test.dart b/utils/tests/pub/install/pub_install_test.dart
index 4c953b0..4f9dc43 100644
--- a/utils/tests/pub/install/pub_install_test.dart
+++ b/utils/tests/pub/install/pub_install_test.dart
@@ -15,7 +15,7 @@
       dir(appPath, []).scheduleCreate();
 
       schedulePub(args: ['install'],
-          error: const RegExp(r'^Could not find a file named "pubspec\.yaml"'),
+          error: new RegExp(r'^Could not find a file named "pubspec\.yaml"'),
           exitCode: 1);
 
       run();
@@ -27,7 +27,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          error: const RegExp(r'^pubspec.yaml is missing the required "name" '
+          error: new RegExp(r'^pubspec.yaml is missing the required "name" '
               r'field \(e\.g\. "name: myapp"\)\.'),
           exitCode: 1);
 
@@ -44,7 +44,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir("myapp_name", [
@@ -63,7 +63,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       nothing("myapp_name")
@@ -88,9 +88,10 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        error: const RegExp(r'Warning: Package "foo" does not have a "lib" '
-            'directory.'),
-        output: const RegExp(r"Dependencies installed!$"));
+        error: new RegExp(r'Warning: Package "foo" does not have a "lib" '
+            'directory so you will not be able to import any libraries from '
+            'it.'),
+        output: new RegExp(r"Dependencies installed!$"));
 
     run();
   });
@@ -102,7 +103,7 @@
 
     schedulePub(args: ['install'],
         error: '',
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     run();
   });
@@ -118,7 +119,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       nothing('foo'),
@@ -137,7 +138,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          output: const RegExp(r"Dependencies installed!$"));
+          output: new RegExp(r"Dependencies installed!$"));
 
       dir(appPath, [
         dir("test", [
@@ -167,7 +168,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          output: const RegExp(r"Dependencies installed!$"));
+          output: new RegExp(r"Dependencies installed!$"));
 
       dir(appPath, [
         dir("example", [
@@ -189,6 +190,36 @@
       run();
     });
 
+    test('"tool/" and its subdirectories', () {
+      dir(appPath, [
+        appPubspec([]),
+        libDir('foo'),
+        dir("tool", [dir("subtool")])
+      ]).scheduleCreate();
+
+      schedulePub(args: ['install'],
+          output: new RegExp(r"Dependencies installed!$"));
+
+      dir(appPath, [
+        dir("tool", [
+          dir("packages", [
+            dir("myapp", [
+              file('foo.dart', 'main() => "foo";')
+            ])
+          ]),
+          dir("subtool", [
+            dir("packages", [
+              dir("myapp", [
+                file('foo.dart', 'main() => "foo";')
+              ])
+            ])
+          ])
+        ])
+      ]).scheduleValidate();
+
+      run();
+    });
+
     test('"web/" and its subdirectories', () {
       dir(appPath, [
         appPubspec([]),
@@ -197,7 +228,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          output: const RegExp(r"Dependencies installed!$"));
+          output: new RegExp(r"Dependencies installed!$"));
 
       dir(appPath, [
         dir("web", [
@@ -227,7 +258,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['install'],
-          output: const RegExp(r"Dependencies installed!$"));
+          output: new RegExp(r"Dependencies installed!$"));
 
       dir(appPath, [
         dir("bin", [
@@ -242,23 +273,4 @@
       run();
     });
   });
-
-  // TODO(rnystrom): Remove this when old layout support is removed. (#4964)
-  test('shows a warning if the entrypoint uses the old layout', () {
-    // The symlink should use the name in the pubspec, not the name of the
-    // directory.
-    dir(appPath, [
-      pubspec({"name": "myapp_name"}),
-      file("foo.dart", 'main() => "foo";'),
-    ]).scheduleCreate();
-
-    schedulePub(args: ['install'],
-        error: '''
-        Warning: Package "myapp_name" is using a deprecated layout.
-        See http://www.dartlang.org/docs/pub-package-manager/package-layout.html for details.
-        ''',
-        output: const RegExp(r"Dependencies installed!$"));
-
-    run();
-  });
 }
diff --git a/utils/tests/pub/install/sdk/check_out_test.dart b/utils/tests/pub/install/sdk/check_out_test.dart
index 279869f..c99658d 100644
--- a/utils/tests/pub/install/sdk/check_out_test.dart
+++ b/utils/tests/pub/install/sdk/check_out_test.dart
@@ -26,7 +26,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({"foo": "0.0.1234"}).scheduleValidate();
 
diff --git a/utils/tests/pub/install/sdk/check_out_transitive_test.dart b/utils/tests/pub/install/sdk/check_out_transitive_test.dart
index 25c6457..04dd55e 100644
--- a/utils/tests/pub/install/sdk/check_out_transitive_test.dart
+++ b/utils/tests/pub/install/sdk/check_out_transitive_test.dart
@@ -30,7 +30,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       'foo': '0.0.1234',
diff --git a/utils/tests/pub/pub.status b/utils/tests/pub/pub.status
index 86562b7..03af2a0 100644
--- a/utils/tests/pub/pub.status
+++ b/utils/tests/pub/pub.status
@@ -10,8 +10,8 @@
 [ $runtime == drt || $runtime == dartium || $runtime == opera]
 *: Skip
 
-# Git on Windows is cripplingly slow (#5271).
-# Git tests do not work on Windows on buildbots (dartbug.com/6191).
+# Git on Windows is embarrassingly slow.
+# TODO(rnystrom): Get them fast enough to reliably not time out (#5271).
 [ $system == windows ]
-install/git/*: Skip
-update/git/*: Skip
+install/git/*: Slow, Pass, Timeout
+update/git/*: Slow, Pass, Timeout
diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
index a1e1bc7..bc18d9d 100644
--- a/utils/tests/pub/pub_test.dart
+++ b/utils/tests/pub/pub_test.dart
@@ -19,7 +19,7 @@
         --version       Prints the version of Pub
         --[no-]trace    Prints a stack trace when an error occurs
 
-    The commands are:
+    Available commands:
       help      display help information for Pub
       install   install the current package's dependencies
       update    update the current package's dependencies to the latest versions
@@ -45,15 +45,42 @@
   test('running pub with just --version displays version', () =>
       runPub(args: ['--version'], output: VERSION_STRING));
 
-  group('an unknown command', () {
-    test('displays an error message', () {
-      runPub(args: ['quylthulg'],
-          error: '''
-          Unknown command "quylthulg".
-          Run "pub help" to see available commands.
-          ''',
-          exitCode: 64);
-    });
+  test('an unknown command displays an error message', () {
+    runPub(args: ['quylthulg'],
+        error: '''
+        Could not find a command named "quylthulg".
+        Run "pub help" to see available commands.
+        ''',
+        exitCode: 64);
+  });
+
+  test('an unknown option displays an error message', () {
+    runPub(args: ['--blorf'],
+        error: '''
+        Could not find an option named "blorf".
+        Run "pub help" to see available options.
+        ''',
+        exitCode: 64);
+  });
+
+  test('an unknown command option displays an error message', () {
+    // TODO(rnystrom): When pub has command-specific options, a more precise
+    // error message would be good here.
+    runPub(args: ['version', '--blorf'],
+        error: '''
+        Could not find an option named "blorf".
+        Use "pub help" for more information.
+        ''',
+        exitCode: 64);
+  });
+
+  test('an unknown help command displays an error message', () {
+    runPub(args: ['help', 'quylthulg'],
+        error: '''
+        Could not find a command named "quylthulg".
+        Run "pub help" to see available commands.
+        ''',
+        exitCode: 64);
   });
 
   test('displays the current version', () =>
diff --git a/utils/tests/pub/pubspec_test.dart b/utils/tests/pub/pubspec_test.dart
index d93a408..dabb7dd 100644
--- a/utils/tests/pub/pubspec_test.dart
+++ b/utils/tests/pub/pubspec_test.dart
@@ -26,6 +26,11 @@
       var sources = new SourceRegistry();
       sources.register(new MockSource());
 
+      expectFormatError(String pubspec) {
+        expect(() => new Pubspec.parse(pubspec, sources),
+            throwsFormatException);
+      }
+
       test("allows a version constraint for dependencies", () {
         var pubspec = new Pubspec.parse('''
 dependencies:
@@ -41,56 +46,60 @@
         expect(foo.constraint.allows(new Version(3, 4, 5)), isFalse);
       });
 
+      test("allows an empty dependencies map", () {
+        var pubspec = new Pubspec.parse('''
+dependencies:
+''', sources);
+
+        expect(pubspec.dependencies, isEmpty);
+      });
+
       test("throws if the description isn't valid", () {
-        expect(() {
-          new Pubspec.parse('''
+        expectFormatError('''
 dependencies:
   foo:
     mock: bad
-''', sources);
-        }, throwsFormatException);
+''');
       });
 
       test("throws if 'name' is not a string", () {
-        expect(() => new Pubspec.parse('name: [not, a, string]', sources),
-            throwsFormatException);
+        expectFormatError('name: [not, a, string]');
       });
 
       test("throws if 'homepage' is not a string", () {
-        expect(() => new Pubspec.parse('homepage: [not, a, string]', sources),
-            throwsFormatException);
+        expectFormatError('homepage:');
+        expectFormatError('homepage: [not, a, string]');
+      });
+
+      test("throws if 'homepage' doesn't have an HTTP scheme", () {
+        new Pubspec.parse('homepage: http://ok.com', sources);
+        new Pubspec.parse('homepage: https://also-ok.com', sources);
+
+        expectFormatError('ftp://badscheme.com');
+        expectFormatError('javascript:alert("!!!")');
+        expectFormatError('data:image/png;base64,somedata');
+        expectFormatError('homepage: no-scheme.com');
       });
 
       test("throws if 'authors' is not a string or a list of strings", () {
         new Pubspec.parse('authors: ok fine', sources);
         new Pubspec.parse('authors: [also, ok, fine]', sources);
 
-        expect(() => new Pubspec.parse('authors: 123', sources),
-            throwsFormatException);
-
-        expect(() => new Pubspec.parse('authors: {not: {a: string}}', sources),
-            throwsFormatException);
-
-        expect(() => new Pubspec.parse('authors: [ok, {not: ok}]', sources),
-            throwsFormatException);
+        expectFormatError('authors: 123');
+        expectFormatError('authors: {not: {a: string}}');
+        expectFormatError('authors: [ok, {not: ok}]');
       });
 
       test("throws if 'author' is not a string", () {
         new Pubspec.parse('author: ok fine', sources);
 
-        expect(() => new Pubspec.parse('author: 123', sources),
-            throwsFormatException);
-
-        expect(() => new Pubspec.parse('author: {not: {a: string}}', sources),
-            throwsFormatException);
-
-        expect(() => new Pubspec.parse('author: [not, ok]', sources),
-            throwsFormatException);
+        expectFormatError('author: 123');
+        expectFormatError('author: {not: {a: string}}');
+        expectFormatError('author: [not, ok]');
       });
 
       test("throws if both 'author' and 'authors' are present", () {
-        expect(() => new Pubspec.parse('{author: abe, authors: ted}', sources),
-            throwsFormatException);
+        expectFormatError('{author: abe, authors: ted}');
       });
 
       test("allows comment-only files", () {
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart
index 3b45775..3b6a612 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -313,7 +313,6 @@
  */
 DirectoryDescriptor gitPackageRepoCacheDir(String name) {
   return dir(new RegExp("$name${r'-[a-f0-9]+'}"), [
-    dir('branches'),
     dir('hooks'),
     dir('info'),
     dir('objects'),
@@ -409,7 +408,7 @@
   switch (sourceName) {
   case "git":
     var url = description is String ? description : description['url'];
-    return basename(url.replaceFirst(const RegExp(r"(\.git)?/?$"), ""));
+    return basename(url.replaceFirst(new RegExp(r"(\.git)?/?$"), ""));
   case "hosted":
     if (description is String) return description;
     return description['name'];
@@ -720,26 +719,26 @@
    * Creates the file or directory within [dir]. Returns a [Future] that is
    * completed after the creation is done.
    */
-  abstract Future create(dir);
+  Future create(dir);
 
   /**
    * Validates that this descriptor correctly matches the corresponding file
    * system entry within [dir]. Returns a [Future] that completes to `null` if
    * the entry is valid, or throws an error if it failed.
    */
-  abstract Future validate(String dir);
+  Future validate(String dir);
 
   /**
    * Deletes the file or directory within [dir]. Returns a [Future] that is
    * completed after the deletion is done.
    */
-  abstract Future delete(String dir);
+  Future delete(String dir);
 
   /**
    * Loads the file at [path] from within this descriptor. If [path] is empty,
    * loads the contents of the descriptor itself.
    */
-  abstract InputStream load(List<String> path);
+  InputStream load(List<String> path);
 
   /**
    * Schedules the directory to be created before Pub is run with [runPub]. The
diff --git a/utils/tests/pub/update/git/do_not_update_if_unneeded_test.dart b/utils/tests/pub/update/git/do_not_update_if_unneeded_test.dart
index 829a459..3925408 100644
--- a/utils/tests/pub/update/git/do_not_update_if_unneeded_test.dart
+++ b/utils/tests/pub/update/git/do_not_update_if_unneeded_test.dart
@@ -27,7 +27,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -49,7 +49,7 @@
     ]).scheduleCommit();
 
     schedulePub(args: ['update', 'foo'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/update/git/update_locked_test.dart b/utils/tests/pub/update/git/update_locked_test.dart
index 00ae0f8..0d23088 100644
--- a/utils/tests/pub/update/git/update_locked_test.dart
+++ b/utils/tests/pub/update/git/update_locked_test.dart
@@ -26,7 +26,7 @@
     appDir([{"git": "../foo.git"}, {"git": "../bar.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -48,7 +48,7 @@
     ]).scheduleCommit();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/update/git/update_one_locked_test.dart b/utils/tests/pub/update/git/update_one_locked_test.dart
index 1c793c6..c654e85 100644
--- a/utils/tests/pub/update/git/update_one_locked_test.dart
+++ b/utils/tests/pub/update/git/update_one_locked_test.dart
@@ -26,7 +26,7 @@
     appDir([{"git": "../foo.git"}, {"git": "../bar.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -48,7 +48,7 @@
     ]).scheduleCommit();
 
     schedulePub(args: ['update', 'foo'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     dir(packagesPath, [
       dir('foo', [
diff --git a/utils/tests/pub/update/git/update_to_incompatible_pubspec_test.dart b/utils/tests/pub/update/git/update_to_incompatible_pubspec_test.dart
index e6086b5..36c5e7f 100644
--- a/utils/tests/pub/update/git/update_to_incompatible_pubspec_test.dart
+++ b/utils/tests/pub/update/git/update_to_incompatible_pubspec_test.dart
@@ -21,7 +21,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -35,7 +35,7 @@
     ]).scheduleCommit();
 
     schedulePub(args: ['update'],
-        error: const RegExp(r'The name you specified for your dependency, '
+        error: new RegExp(r'The name you specified for your dependency, '
             r'"foo", doesn' "'" r't match the name "zoo" in its pubspec.'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/update/git/update_to_nonexistent_pubspec_test.dart b/utils/tests/pub/update/git/update_to_nonexistent_pubspec_test.dart
index c30157e..b777103 100644
--- a/utils/tests/pub/update/git/update_to_nonexistent_pubspec_test.dart
+++ b/utils/tests/pub/update/git/update_to_nonexistent_pubspec_test.dart
@@ -22,7 +22,7 @@
     appDir([{"git": "../foo.git"}]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     dir(packagesPath, [
       dir('foo', [
@@ -34,7 +34,7 @@
     repo.scheduleGit(['commit', '-m', 'delete']);
 
     schedulePub(args: ['update'],
-        error: const RegExp(r'Package "foo" doesn' "'" r't have a '
+        error: new RegExp(r'Package "foo" doesn' "'" r't have a '
             r'pubspec.yaml file.'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.dart b/utils/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.dart
index 381923e..e9e980a 100644
--- a/utils/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.dart
+++ b/utils/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.dart
@@ -16,7 +16,7 @@
     appDir([dependency("foo", "1.2.3")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        error: const RegExp('Could not find package "foo" at '
+        error: new RegExp('Could not find package "foo" at '
                             'http://localhost:'),
         exitCode: 1);
 
diff --git a/utils/tests/pub/update/hosted/fail_gracefully_on_url_resolve_test.dart b/utils/tests/pub/update/hosted/fail_gracefully_on_url_resolve_test.dart
index c231122..314f41f 100644
--- a/utils/tests/pub/update/hosted/fail_gracefully_on_url_resolve_test.dart
+++ b/utils/tests/pub/update/hosted/fail_gracefully_on_url_resolve_test.dart
@@ -26,7 +26,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        error: const RegExp('Could not resolve URL "http://pub.invalid".'),
+        error: new RegExp('Could not resolve URL "http://pub.invalid".'),
         exitCode: 1);
 
     run();
diff --git a/utils/tests/pub/update/hosted/remove_removed_dependency_test.dart b/utils/tests/pub/update/hosted/remove_removed_dependency_test.dart
index 60fc438..2b53de7 100644
--- a/utils/tests/pub/update/hosted/remove_removed_dependency_test.dart
+++ b/utils/tests/pub/update/hosted/remove_removed_dependency_test.dart
@@ -19,7 +19,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -29,7 +29,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/update/hosted/remove_removed_transitive_dependency_test.dart b/utils/tests/pub/update/hosted/remove_removed_transitive_dependency_test.dart
index 2f98b51..2afc65d 100644
--- a/utils/tests/pub/update/hosted/remove_removed_transitive_dependency_test.dart
+++ b/utils/tests/pub/update/hosted/remove_removed_transitive_dependency_test.dart
@@ -24,7 +24,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -36,7 +36,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/update/hosted/unlock_dependers_test.dart b/utils/tests/pub/update/hosted/unlock_dependers_test.dart
index 64f58cd..6a0d2e0 100644
--- a/utils/tests/pub/update/hosted/unlock_dependers_test.dart
+++ b/utils/tests/pub/update/hosted/unlock_dependers_test.dart
@@ -20,7 +20,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -33,7 +33,7 @@
     ]);
 
     schedulePub(args: ['update', 'bar'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "2.0.0",
diff --git a/utils/tests/pub/update/hosted/unlock_if_necessary_test.dart b/utils/tests/pub/update/hosted/unlock_if_necessary_test.dart
index 4525f82..aae6ca1 100644
--- a/utils/tests/pub/update/hosted/unlock_if_necessary_test.dart
+++ b/utils/tests/pub/update/hosted/unlock_if_necessary_test.dart
@@ -20,7 +20,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['install'],
-        output: const RegExp(r"Dependencies installed!$"));
+        output: new RegExp(r"Dependencies installed!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -33,7 +33,7 @@
     ]);
 
     schedulePub(args: ['update', 'foo'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "2.0.0",
diff --git a/utils/tests/pub/update/hosted/update_removed_constraints_test.dart b/utils/tests/pub/update/hosted/update_removed_constraints_test.dart
index b73347a..911fa34 100644
--- a/utils/tests/pub/update/hosted/update_removed_constraints_test.dart
+++ b/utils/tests/pub/update/hosted/update_removed_constraints_test.dart
@@ -21,7 +21,7 @@
     appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
@@ -32,7 +32,7 @@
     appDir([dependency("foo")]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({
       "foo": "1.0.0",
diff --git a/utils/tests/pub/update/pub_update_test.dart b/utils/tests/pub/update/pub_update_test.dart
index f4900f5..831d2ce 100644
--- a/utils/tests/pub/update/pub_update_test.dart
+++ b/utils/tests/pub/update/pub_update_test.dart
@@ -15,7 +15,7 @@
       dir(appPath, []).scheduleCreate();
 
       schedulePub(args: ['update'],
-          error: const RegExp(r'^Could not find a file named "pubspec.yaml"'),
+          error: new RegExp(r'^Could not find a file named "pubspec.yaml"'),
           exitCode: 1);
 
       run();
@@ -27,7 +27,7 @@
       ]).scheduleCreate();
 
       schedulePub(args: ['update'],
-          error: const RegExp(r'^pubspec.yaml is missing the required "name" '
+          error: new RegExp(r'^pubspec.yaml is missing the required "name" '
               r'field \(e\.g\. "name: myapp"\)\.'),
           exitCode: 1);
 
@@ -44,7 +44,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     dir(packagesPath, [
       dir("myapp_name", [
@@ -63,7 +63,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     dir(packagesPath, [
       nothing("myapp_name")
@@ -88,7 +88,7 @@
     ]).scheduleCreate();
 
     schedulePub(args: ['update'],
-        output: const RegExp(r"Dependencies updated!$"));
+        output: new RegExp(r"Dependencies updated!$"));
 
     packagesDir({"foo": null}).scheduleValidate();
 
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart
index 8bec240..5ea2b75 100644
--- a/utils/tests/pub/version_solver_test.dart
+++ b/utils/tests/pub/version_solver_test.dart
@@ -25,8 +25,8 @@
 final descriptionMismatch = 'description mismatch';
 final couldNotSolve = 'unsolved';
 
-Source source1;
-Source source2;
+MockSource source1;
+MockSource source2;
 Source versionlessSource;
 Source rootSource;
 
diff --git a/utils/tests/string_encoding/dunit.dart b/utils/tests/string_encoding/dunit.dart
index fab1e2d..716acb4 100644
--- a/utils/tests/string_encoding/dunit.dart
+++ b/utils/tests/string_encoding/dunit.dart
@@ -3,7 +3,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("dunit");
+library dunit;
 
 typedef void Test();
 typedef TestResult SynchTest();
diff --git a/utils/tests/string_encoding/run_test.dart b/utils/tests/string_encoding/run_test.dart
index 6fc044d..72ee000 100755
--- a/utils/tests/string_encoding/run_test.dart
+++ b/utils/tests/string_encoding/run_test.dart
@@ -3,13 +3,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.
 
-#library("string_encoding_run_tests");
-#import("dunit.dart");
-#import("unicode_test.dart", prefix: "u");
-#import("unicode_core_test.dart", prefix: "uc");
-#import("utf16_test.dart", prefix: "utf16");
-#import("utf32_test.dart", prefix: "utf32");
-#import("utf8_test.dart", prefix: "utf8");
+library string_encoding_run_tests;
+import 'dunit.dart';
+import 'unicode_test.dart' as u;
+import 'unicode_core_test.dart' as uc;
+import 'utf16_test.dart' as utf16;
+import 'utf32_test.dart' as utf32;
+import 'utf8_test.dart' as utf8;
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/string_encoding/unicode_core_test.dart b/utils/tests/string_encoding/unicode_core_test.dart
index 0161d44..21e7ef3 100755
--- a/utils/tests/string_encoding/unicode_core_test.dart
+++ b/utils/tests/string_encoding/unicode_core_test.dart
@@ -3,9 +3,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("unicode_core_tests");
-#import("dunit.dart");
-#import("../../string_encoding/unicode_core.dart");
+library unicode_core_tests;
+import 'dunit.dart';
+import '../../string_encoding/unicode_core.dart';
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/string_encoding/unicode_test.dart b/utils/tests/string_encoding/unicode_test.dart
index 0024c17..3fb23a6 100755
--- a/utils/tests/string_encoding/unicode_test.dart
+++ b/utils/tests/string_encoding/unicode_test.dart
@@ -3,9 +3,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("unicode_tests");
-#import("dunit.dart");
-#import("../../../lib/utf/utf.dart");
+library unicode_tests;
+import 'dunit.dart';
+import '../../../lib/utf/utf.dart';
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/string_encoding/utf16_test.dart b/utils/tests/string_encoding/utf16_test.dart
index 70d1983..a55f760 100755
--- a/utils/tests/string_encoding/utf16_test.dart
+++ b/utils/tests/string_encoding/utf16_test.dart
@@ -3,10 +3,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("utf16_tests");
-#import("dunit.dart");
-#import("../../string_encoding/unicode_core.dart");
-#import("../../string_encoding/utf16.dart");
+library utf16_tests;
+import 'dunit.dart';
+import '../../string_encoding/unicode_core.dart';
+import '../../string_encoding/utf16.dart';
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/string_encoding/utf32_test.dart b/utils/tests/string_encoding/utf32_test.dart
index cacf23a..7b65824 100755
--- a/utils/tests/string_encoding/utf32_test.dart
+++ b/utils/tests/string_encoding/utf32_test.dart
@@ -3,10 +3,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("utf32_tests");
-#import("dunit.dart");
-#import("../../string_encoding/unicode_core.dart");
-#import("../../string_encoding/utf32.dart");
+library utf32_tests;
+import 'dunit.dart';
+import '../../string_encoding/unicode_core.dart';
+import '../../string_encoding/utf32.dart';
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/string_encoding/utf8_benchmarks.dart b/utils/tests/string_encoding/utf8_benchmarks.dart
index 2c6ceaa..6f03e1b 100755
--- a/utils/tests/string_encoding/utf8_benchmarks.dart
+++ b/utils/tests/string_encoding/utf8_benchmarks.dart
@@ -3,10 +3,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("BenchmarkTests");
-#import("dart:math", prefix: "Math");
-#import("../../../lib/utf/utf.dart", prefix: "SE");
-#source("benchmark_runner.dart");
+library BenchmarkTests;
+import 'dart:math' as Math;
+import '../../../lib/utf/utf.dart' as SE;
+part 'benchmark_runner.dart';
 
 void main() {
 
diff --git a/utils/tests/string_encoding/utf8_test.dart b/utils/tests/string_encoding/utf8_test.dart
index d1869f6..25729d6 100755
--- a/utils/tests/string_encoding/utf8_test.dart
+++ b/utils/tests/string_encoding/utf8_test.dart
@@ -3,9 +3,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#library("utf8_tests");
-#import("dunit.dart");
-#import("../../../lib/utf/utf.dart");
+library utf8_tests;
+import 'dunit.dart';
+import '../../../lib/utf/utf.dart';
 
 void main() {
   TestSuite suite = new TestSuite();
diff --git a/utils/tests/template/real_app.dart b/utils/tests/template/real_app.dart
index c4323bd..f732741 100644
--- a/utils/tests/template/real_app.dart
+++ b/utils/tests/template/real_app.dart
@@ -1,5 +1,5 @@
-#import('dart:html');
-#source('realviews.dart');
+import 'dart:html';
+part 'realviews.dart';
 
 class Division {
   String name;
diff --git a/utils/tests/template/sample.dart b/utils/tests/template/sample.dart
index 93efb96..58884dd 100755
--- a/utils/tests/template/sample.dart
+++ b/utils/tests/template/sample.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('dart:html');
+import 'dart:html';
 
 // Utility functions:
 String safeHTML(String value) {
diff --git a/utils/tests/template/test_complex.dart b/utils/tests/template/test_complex.dart
index 00a9ddf..f0d1c8c 100644
--- a/utils/tests/template/test_complex.dart
+++ b/utils/tests/template/test_complex.dart
@@ -2,9 +2,9 @@
 //
 //       top_searches_css.tmpl
 
-#import('dart:html');
-#source('complex_datamodel.dart');
-#source('top_searches.dart');
+import 'dart:html';
+part 'complex_datamodel.dart';
+part 'top_searches.dart';
 
 void main() {
   List<Person> persons = dataModel;
diff --git a/utils/tests/template/test_complex2.dart b/utils/tests/template/test_complex2.dart
index 03eb72b..50b4b43 100644
--- a/utils/tests/template/test_complex2.dart
+++ b/utils/tests/template/test_complex2.dart
@@ -2,9 +2,9 @@
 //
 //       top_searches2.tmpl
 
-#import('dart:html');
-#source('complex_datamodel.dart');
-#source('top_searches2.dart');
+import 'dart:html';
+part 'complex_datamodel.dart';
+part 'top_searches2.dart';
 
 void main() {
   List<Person> persons = dataModel;
diff --git a/utils/tests/template/test_list.dart b/utils/tests/template/test_list.dart
index 98f0970..7f2f312 100644
--- a/utils/tests/template/test_list.dart
+++ b/utils/tests/template/test_list.dart
@@ -2,8 +2,8 @@
 //
 //       applications.tmpl
 
-#import('dart:html');
-#source('applications.dart');
+import 'dart:html';
+part 'applications.dart';
 
 class Product {
   String name;
diff --git a/utils/tests/template/test_nested.dart b/utils/tests/template/test_nested.dart
index 06f830c..84ec6c7 100644
--- a/utils/tests/template/test_nested.dart
+++ b/utils/tests/template/test_nested.dart
@@ -4,8 +4,8 @@
 //       productview2.tmpl
 
 
-#import('dart:html');
-#source('nestedview.dart');
+import 'dart:html';
+part 'nestedview.dart';
 
 class Person {
   String name;
diff --git a/utils/tests/template/test_simple.dart b/utils/tests/template/test_simple.dart
index 1d42382..8c8ee0d 100755
--- a/utils/tests/template/test_simple.dart
+++ b/utils/tests/template/test_simple.dart
@@ -4,8 +4,8 @@
 //       name_entry2.tmpl
 //       name_entry_css.tmpl
 
-#import('dart:html');
-#source('name_entry.dart');
+import 'dart:html';
+part 'name_entry.dart';
 
 void main() {
   // Simple template.
diff --git a/utils/tests/template/test_with.dart b/utils/tests/template/test_with.dart
index 1943331..5e728ef 100644
--- a/utils/tests/template/test_with.dart
+++ b/utils/tests/template/test_with.dart
@@ -4,8 +4,8 @@
 //       productview2.tmpl
 
 
-#import('dart:html');
-#source('productview.dart');
+import 'dart:html';
+part 'productview.dart';
 
 class Person {
   String name;