Version 0.6.4.0 .

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

git-svn-id: http://dart.googlecode.com/svn/trunk@24918 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkg/analyzer_experimental/lib/src/generated/ast.dart b/pkg/analyzer_experimental/lib/src/generated/ast.dart
index c4b45f4..833edbb 100644
--- a/pkg/analyzer_experimental/lib/src/generated/ast.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/ast.dart
@@ -19,6 +19,11 @@
 abstract class ASTNode {
 
   /**
+   * An empty array of ast nodes.
+   */
+  static List<ASTNode> EMPTY_ARRAY = new List<ASTNode>(0);
+
+  /**
    * The parent of the node, or `null` if the node is the root of an AST structure.
    */
   ASTNode _parent;
@@ -312,6 +317,7 @@
   R visitMethodDeclaration(MethodDeclaration node);
   R visitMethodInvocation(MethodInvocation node);
   R visitNamedExpression(NamedExpression node);
+  R visitNativeClause(NativeClause node);
   R visitNativeFunctionBody(NativeFunctionBody node);
   R visitNullLiteral(NullLiteral node);
   R visitParenthesizedExpression(ParenthesizedExpression node);
@@ -2376,6 +2382,11 @@
   ImplementsClause _implementsClause;
 
   /**
+   * The native clause for the class, or `null` if the class does not have a native clause.
+   */
+  NativeClause _nativeClause;
+
+  /**
    * The left curly bracket.
    */
   Token _leftBracket;
@@ -2493,6 +2504,14 @@
   SimpleIdentifier get name => _name;
 
   /**
+   * Return the native clause for this class, or `null` if the class does not have a native
+   * cluse.
+   *
+   * @return the native clause for this class
+   */
+  NativeClause get nativeClause => _nativeClause;
+
+  /**
    * Return the right curly bracket.
    *
    * @return the right curly bracket
@@ -2569,6 +2588,15 @@
   }
 
   /**
+   * Set the native clause for this class to the given clause.
+   *
+   * @param nativeClause the native clause for this class
+   */
+  void set nativeClause(NativeClause nativeClause2) {
+    this._nativeClause = nativeClause2;
+  }
+
+  /**
    * Set the right curly bracket to the given token.
    *
    * @param rightBracket the right curly bracket
@@ -4714,21 +4742,7 @@
    * @return the token separating the parameter from the default value
    */
   Token get separator => _separator;
-
-  /**
-   * Return `true` if this parameter was declared with the 'const' modifier.
-   *
-   * @return `true` if this parameter was declared with the 'const' modifier
-   */
   bool get isConst => _parameter != null && _parameter.isConst;
-
-  /**
-   * Return `true` if this parameter was declared with the 'final' modifier. Parameters that
-   * are declared with the 'const' modifier will return `false` even though they are
-   * implicitly final.
-   *
-   * @return `true` if this parameter was declared with the 'final' modifier
-   */
   bool get isFinal => _parameter != null && _parameter.isFinal;
 
   /**
@@ -6515,6 +6529,22 @@
    * @return the kind of this parameter
    */
   ParameterKind get kind;
+
+  /**
+   * Return `true` if this parameter was declared with the 'const' modifier.
+   *
+   * @return `true` if this parameter was declared with the 'const' modifier
+   */
+  bool get isConst;
+
+  /**
+   * Return `true` if this parameter was declared with the 'final' modifier. Parameters that
+   * are declared with the 'const' modifier will return `false` even though they are
+   * implicitly final.
+   *
+   * @return `true` if this parameter was declared with the 'final' modifier
+   */
+  bool get isFinal;
 }
 /**
  * Instances of the class `FormalParameterList` represent the formal parameter list of a
@@ -7792,7 +7822,7 @@
   NodeList<TypeName> _interfaces;
 
   /**
-   * Initialize a newly created extends clause.
+   * Initialize a newly created implements clause.
    *
    * @param keyword the token representing the 'implements' keyword
    * @param interfaces the interfaces that are being implemented
@@ -7804,7 +7834,7 @@
   }
 
   /**
-   * Initialize a newly created extends clause.
+   * Initialize a newly created implements clause.
    *
    * @param keyword the token representing the 'implements' keyword
    * @param interfaces the interfaces that are being implemented
@@ -10231,6 +10261,84 @@
   Token get firstTokenAfterCommentAndMetadata => _keyword;
 }
 /**
+ * Instances of the class `NativeClause` represent the "native" clause in an class
+ * declaration.
+ *
+ * <pre>
+ * nativeClause ::=
+ *     'native' [StringLiteral]
+ * </pre>
+ *
+ * @coverage dart.engine.ast
+ */
+class NativeClause extends ASTNode {
+
+  /**
+   * The token representing the 'native' keyword.
+   */
+  Token _keyword;
+
+  /**
+   * The name of the native object that implements the class.
+   */
+  StringLiteral _name;
+
+  /**
+   * Initialize a newly created native clause.
+   *
+   * @param keyword the token representing the 'native' keyword
+   * @param name the name of the native object that implements the class.
+   */
+  NativeClause.full(Token keyword, StringLiteral name) {
+    this._keyword = keyword;
+    this._name = name;
+  }
+
+  /**
+   * Initialize a newly created native clause.
+   *
+   * @param keyword the token representing the 'native' keyword
+   * @param name the name of the native object that implements the class.
+   */
+  NativeClause({Token keyword, StringLiteral name}) : this.full(keyword, name);
+  accept(ASTVisitor visitor) => visitor.visitNativeClause(this);
+  Token get beginToken => _keyword;
+  Token get endToken => _name.endToken;
+
+  /**
+   * Return the token representing the 'native' keyword.
+   *
+   * @return the token representing the 'native' keyword
+   */
+  Token get keyword => _keyword;
+
+  /**
+   * @return the name of the native object that implements the class.
+   */
+  StringLiteral get name => _name;
+
+  /**
+   * Set the token representing the 'native' keyword to the given token.
+   *
+   * @param keyword the token representing the 'native' keyword
+   */
+  void set keyword(Token keyword2) {
+    this._keyword = keyword2;
+  }
+
+  /**
+   * Sets the name of the native object that implements the class.
+   *
+   * @param name the name of the native object that implements the class.
+   */
+  void set name(StringLiteral name2) {
+    this._name = name2;
+  }
+  void visitChildren(ASTVisitor<Object> visitor) {
+    safelyVisitChild(_name, visitor);
+  }
+}
+/**
  * Instances of the class `NativeFunctionBody` represent a function body that consists of a
  * native keyword followed by a string literal.
  *
@@ -10387,22 +10495,6 @@
   NodeList<Annotation> get metadata => _metadata;
 
   /**
-   * Return `true` if this parameter was declared with the 'const' modifier.
-   *
-   * @return `true` if this parameter was declared with the 'const' modifier
-   */
-  bool get isConst;
-
-  /**
-   * Return `true` if this parameter was declared with the 'final' modifier. Parameters that
-   * are declared with the 'const' modifier will return `false` even though they are
-   * implicitly final.
-   *
-   * @return `true` if this parameter was declared with the 'final' modifier
-   */
-  bool get isFinal;
-
-  /**
    * Set the documentation comment associated with this parameter to the given comment
    *
    * @param comment the documentation comment to be associated with this parameter
@@ -15292,6 +15384,7 @@
   R visitMethodInvocation(MethodInvocation node) => visitExpression(node);
   R visitNamedExpression(NamedExpression node) => visitExpression(node);
   R visitNamespaceDirective(NamespaceDirective node) => visitUriBasedDirective(node);
+  R visitNativeClause(NativeClause node) => visitNode(node);
   R visitNativeFunctionBody(NativeFunctionBody node) => visitFunctionBody(node);
   R visitNode(ASTNode node) {
     node.visitChildren(this);
@@ -15715,6 +15808,10 @@
     node.visitChildren(this);
     return null;
   }
+  R visitNativeClause(NativeClause node) {
+    node.visitChildren(this);
+    return null;
+  }
   R visitNativeFunctionBody(NativeFunctionBody node) {
     node.visitChildren(this);
     return null;
@@ -15938,6 +16035,7 @@
   R visitMethodDeclaration(MethodDeclaration node) => null;
   R visitMethodInvocation(MethodInvocation node) => null;
   R visitNamedExpression(NamedExpression node) => null;
+  R visitNativeClause(NativeClause node) => null;
   R visitNativeFunctionBody(NativeFunctionBody node) => null;
   R visitNullLiteral(NullLiteral node) => null;
   R visitParenthesizedExpression(ParenthesizedExpression node) => null;
@@ -16478,6 +16576,11 @@
     visit3(" ", node.expression);
     return null;
   }
+  Object visitNativeClause(NativeClause node) {
+    _writer.print("native ");
+    visit(node.name);
+    return null;
+  }
   Object visitNativeFunctionBody(NativeFunctionBody node) {
     _writer.print("native ");
     visit(node.stringLiteral);
@@ -16914,6 +17017,7 @@
   MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => new MethodDeclaration.full(clone2(node.documentationComment), clone3(node.metadata), node.externalKeyword, node.modifierKeyword, clone2(node.returnType), node.propertyKeyword, node.operatorKeyword, clone2(node.name), clone2(node.parameters), clone2(node.body));
   MethodInvocation visitMethodInvocation(MethodInvocation node) => new MethodInvocation.full(clone2(node.target), node.period, clone2(node.methodName), clone2(node.argumentList));
   NamedExpression visitNamedExpression(NamedExpression node) => new NamedExpression.full(clone2(node.name), clone2(node.expression));
+  ASTNode visitNativeClause(NativeClause node) => new NativeClause.full(node.keyword, clone2(node.name));
   NativeFunctionBody visitNativeFunctionBody(NativeFunctionBody node) => new NativeFunctionBody.full(node.nativeToken, clone2(node.stringLiteral), node.semicolon);
   NullLiteral visitNullLiteral(NullLiteral node) => new NullLiteral.full(node.literal);
   ParenthesizedExpression visitParenthesizedExpression(ParenthesizedExpression node) => new ParenthesizedExpression.full(node.leftParenthesis, clone2(node.expression), node.rightParenthesis);
diff --git a/pkg/analyzer_experimental/lib/src/generated/constant.dart b/pkg/analyzer_experimental/lib/src/generated/constant.dart
index 233a097..bb5a292 100644
--- a/pkg/analyzer_experimental/lib/src/generated/constant.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/constant.dart
@@ -1101,12 +1101,12 @@
   }
   EvaluationResultImpl addToError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl addToValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_NUM;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_NUM;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1133,12 +1133,12 @@
   }
   EvaluationResultImpl bitAndError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl bitAndValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeInt || leftOperand2.isSomeInt) {
-      if (isAnyInt && leftOperand2.isAnyInt) {
-        return RESULT_INT;
-      }
+    if (!isAnyInt || !leftOperand2.isAnyInt) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
     }
+    if (isSomeInt || leftOperand2.isSomeInt) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1157,12 +1157,12 @@
   }
   EvaluationResultImpl bitOrError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl bitOrValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeInt || leftOperand2.isSomeInt) {
-      if (isAnyInt && leftOperand2.isAnyInt) {
-        return RESULT_INT;
-      }
+    if (!isAnyInt || !leftOperand2.isAnyInt) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
     }
+    if (isSomeInt || leftOperand2.isSomeInt) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1181,12 +1181,12 @@
   }
   EvaluationResultImpl bitXorError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl bitXorValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeInt || leftOperand2.isSomeInt) {
-      if (isAnyInt && leftOperand2.isAnyInt) {
-        return RESULT_INT;
-      }
+    if (!isAnyInt || !leftOperand2.isAnyInt) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
     }
+    if (isSomeInt || leftOperand2.isSomeInt) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1213,12 +1213,12 @@
   }
   EvaluationResultImpl divideError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl divideValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_NUM;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_NUM;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1282,12 +1282,12 @@
   EvaluationResultImpl greaterThanError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl greaterThanOrEqualError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl greaterThanOrEqualValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_BOOL;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_BOOL;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1309,12 +1309,12 @@
     return error(node);
   }
   EvaluationResultImpl greaterThanValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_BOOL;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_BOOL;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1337,12 +1337,12 @@
   }
   EvaluationResultImpl integerDivideError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl integerDivideValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_INT;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1372,12 +1372,12 @@
   EvaluationResultImpl lessThanError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl lessThanOrEqualError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl lessThanOrEqualValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_BOOL;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_BOOL;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1399,12 +1399,12 @@
     return error(node);
   }
   EvaluationResultImpl lessThanValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_BOOL;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_BOOL;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1427,12 +1427,12 @@
   }
   EvaluationResultImpl logicalAndError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl logicalAndValid(BinaryExpression node, ValidResult leftOperand) {
-    if (isSomeBool || leftOperand.isSomeBool) {
-      if (isAnyBool && leftOperand.isAnyBool) {
-        return RESULT_BOOL;
-      }
+    if (!isAnyBool || !leftOperand.isAnyBool) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
     }
+    if (isSomeBool || leftOperand.isSomeBool) {
+      return RESULT_BOOL;
+    }
     Object leftValue = leftOperand.value;
     if (leftValue is bool) {
       if (((leftValue as bool))) {
@@ -1458,12 +1458,12 @@
   }
   EvaluationResultImpl minusError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl minusValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_NUM;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_NUM;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1521,12 +1521,12 @@
   }
   EvaluationResultImpl remainderError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl remainderValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_NUM;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_NUM;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1552,12 +1552,12 @@
   }
   EvaluationResultImpl shiftLeftError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl shiftLeftValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeInt || leftOperand2.isSomeInt) {
-      if (isAnyInt && leftOperand2.isAnyInt) {
-        return RESULT_INT;
-      }
+    if (!isAnyInt || !leftOperand2.isAnyInt) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
     }
+    if (isSomeInt || leftOperand2.isSomeInt) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1576,12 +1576,12 @@
   }
   EvaluationResultImpl shiftRightError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl shiftRightValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeInt || leftOperand2.isSomeInt) {
-      if (isAnyInt && leftOperand2.isAnyInt) {
-        return RESULT_INT;
-      }
+    if (!isAnyInt || !leftOperand2.isAnyInt) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_INT);
     }
+    if (isSomeInt || leftOperand2.isSomeInt) {
+      return RESULT_INT;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
@@ -1600,12 +1600,12 @@
   }
   EvaluationResultImpl timesError(BinaryExpression node, ErrorResult leftOperand) => leftOperand;
   EvaluationResultImpl timesValid(BinaryExpression node, ValidResult leftOperand2) {
-    if (isSomeNum || leftOperand2.isSomeNum) {
-      if (isAnyNum && leftOperand2.isAnyNum) {
-        return RESULT_NUM;
-      }
+    if (!isAnyNum || !leftOperand2.isAnyNum) {
       return error2(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
     }
+    if (isSomeNum || leftOperand2.isSomeNum) {
+      return RESULT_NUM;
+    }
     Object leftValue = leftOperand2.value;
     if (leftValue == null) {
       return error(node.leftOperand);
diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
index 9b7daf6..d822866 100644
--- a/pkg/analyzer_experimental/lib/src/generated/element.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
@@ -587,7 +587,32 @@
   static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ALIAS', 22, "function type alias");
   static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23, "type variable");
   static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe>");
-  static final List<ElementKind> values = [CLASS, COMPILATION_UNIT, CONSTRUCTOR, DYNAMIC, EMBEDDED_HTML_SCRIPT, ERROR, EXPORT, EXTERNAL_HTML_SCRIPT, FIELD, FUNCTION, GETTER, HTML, IMPORT, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, NAME, PARAMETER, PREFIX, SETTER, TOP_LEVEL_VARIABLE, FUNCTION_TYPE_ALIAS, TYPE_VARIABLE, UNIVERSE];
+  static final List<ElementKind> values = [
+      CLASS,
+      COMPILATION_UNIT,
+      CONSTRUCTOR,
+      DYNAMIC,
+      EMBEDDED_HTML_SCRIPT,
+      ERROR,
+      EXPORT,
+      EXTERNAL_HTML_SCRIPT,
+      FIELD,
+      FUNCTION,
+      GETTER,
+      HTML,
+      IMPORT,
+      LABEL,
+      LIBRARY,
+      LOCAL_VARIABLE,
+      METHOD,
+      NAME,
+      PARAMETER,
+      PREFIX,
+      SETTER,
+      TOP_LEVEL_VARIABLE,
+      FUNCTION_TYPE_ALIAS,
+      TYPE_VARIABLE,
+      UNIVERSE];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -4300,7 +4325,18 @@
   static final Modifier STATIC = new Modifier('STATIC', 8);
   static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9);
   static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10);
-  static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER, MIXIN, REFERENCES_SUPER, SETTER, STATIC, SYNTHETIC, TYPEDEF];
+  static final List<Modifier> values = [
+      ABSTRACT,
+      CONST,
+      FACTORY,
+      FINAL,
+      GETTER,
+      MIXIN,
+      REFERENCES_SUPER,
+      SETTER,
+      STATIC,
+      SYNTHETIC,
+      TYPEDEF];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -6215,6 +6251,32 @@
     }
     return members;
   }
+  String get displayName {
+    String name = this.name;
+    List<Type2> typeArguments = this.typeArguments;
+    bool allDynamic = true;
+    for (Type2 type in typeArguments) {
+      if (type != null && !type.isDynamic) {
+        allDynamic = false;
+        break;
+      }
+    }
+    if (!allDynamic) {
+      JavaStringBuilder builder = new JavaStringBuilder();
+      builder.append(name);
+      builder.append("<");
+      for (int i = 0; i < typeArguments.length; i++) {
+        if (i != 0) {
+          builder.append(", ");
+        }
+        Type2 typeArg = typeArguments[i];
+        builder.append(typeArg.displayName);
+      }
+      builder.append(">");
+      name = builder.toString();
+    }
+    return name;
+  }
   ClassElement get element => super.element as ClassElement;
   PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember.from(((element as ClassElementImpl)).getGetter(getterName), this);
   List<InterfaceType> get interfaces {
diff --git a/pkg/analyzer_experimental/lib/src/generated/engine.dart b/pkg/analyzer_experimental/lib/src/generated/engine.dart
index dc7cec2..8bc9ce1 100644
--- a/pkg/analyzer_experimental/lib/src/generated/engine.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/engine.dart
@@ -2257,20 +2257,17 @@
     }
   }
   SourceKind computeKindOf(Source source) {
-    {
-      SourceEntry sourceEntry = getSourceEntry(source);
-      if (sourceEntry == null) {
+    SourceEntry sourceEntry = getReadableSourceEntry(source);
+    if (sourceEntry == null) {
+      return SourceKind.UNKNOWN;
+    } else if (sourceEntry is DartEntry) {
+      try {
+        return internalGetDartParseData(source, (sourceEntry as DartEntry), DartEntry.SOURCE_KIND, SourceKind.UNKNOWN);
+      } on AnalysisException catch (exception) {
         return SourceKind.UNKNOWN;
-      } else if (sourceEntry is DartEntry) {
-        DartEntry dartEntry = sourceEntry as DartEntry;
-        CacheState sourceKindState = dartEntry.getState(DartEntry.SOURCE_KIND);
-        if (sourceKindState != CacheState.VALID && sourceKindState != CacheState.ERROR) {
-          internalComputeKindOf(source);
-          sourceEntry = getSourceEntry(source);
-        }
       }
-      return sourceEntry.kind;
     }
+    return sourceEntry.kind;
   }
   LibraryElement computeLibraryElement(Source source) {
     {
@@ -2286,8 +2283,7 @@
           recordResolutionResults(resolver);
         } on AnalysisException catch (exception) {
           DartEntryImpl dartCopy = getDartEntry(source).writableCopy;
-          dartCopy.setState(DartEntry.RESOLVED_UNIT, CacheState.ERROR);
-          dartCopy.setState(DartEntry.ELEMENT, CacheState.ERROR);
+          dartCopy.recordResolutionError();
           _sourceMap[source] = dartCopy;
           AnalysisEngine.instance.logger.logError2("Could not resolve the library ${source.fullName}", exception);
         }
@@ -2296,23 +2292,13 @@
     }
   }
   LineInfo computeLineInfo(Source source) {
-    {
-      SourceEntry sourceEntry = getSourceEntry(source);
-      if (sourceEntry == null) {
-        return null;
-      }
-      LineInfo lineInfo = sourceEntry.getValue(SourceEntry.LINE_INFO);
-      if (lineInfo == null) {
-        if (sourceEntry is HtmlEntry) {
-          parseHtmlUnit(source);
-          lineInfo = getSourceEntry(source).getValue(SourceEntry.LINE_INFO);
-        } else if (sourceEntry is DartEntry) {
-          parseCompilationUnit(source);
-          lineInfo = getSourceEntry(source).getValue(SourceEntry.LINE_INFO);
-        }
-      }
-      return lineInfo;
+    SourceEntry sourceEntry = getReadableSourceEntry(source);
+    if (sourceEntry is HtmlEntry) {
+      return internalGetHtmlParseData(source, SourceEntry.LINE_INFO, null);
+    } else if (sourceEntry is DartEntry) {
+      return internalGetDartParseData2(source, SourceEntry.LINE_INFO, null);
     }
+    return null;
   }
   CompilationUnit computeResolvableCompilationUnit(Source source) {
     {
@@ -2408,9 +2394,6 @@
   SourceKind getKindOf(Source source) {
     SourceEntry sourceEntry = getReadableSourceEntry(source);
     if (sourceEntry == null) {
-      if (AnalysisEngine.isHtmlFileName(source.shortName)) {
-        return SourceKind.HTML;
-      }
       return SourceKind.UNKNOWN;
     }
     return sourceEntry.kind;
@@ -2573,50 +2556,22 @@
     }
   }
   CompilationUnit parseCompilationUnit(Source source) {
-    {
-      accessed(source);
-      DartEntry dartEntry = getDartEntry(source);
-      if (dartEntry == null) {
-        return null;
-      }
-      CompilationUnit unit = dartEntry.anyParsedCompilationUnit;
-      if (unit == null) {
-        DartEntryImpl dartCopy = dartEntry.writableCopy;
-        unit = internalParseCompilationUnit(dartCopy, source);
-        _sourceMap[source] = dartCopy;
-      }
-      return unit;
+    DartEntry dartEntry = getReadableDartEntry(source);
+    if (dartEntry == null) {
+      return null;
     }
-  }
-  HtmlUnit parseHtmlUnit(Source source) {
-    {
-      accessed(source);
-      HtmlEntry htmlEntry = getHtmlEntry(source);
-      if (htmlEntry == null) {
-        return null;
+    CompilationUnit unit = dartEntry.anyParsedCompilationUnit;
+    if (unit == null) {
+      CacheState state = dartEntry.getState(DartEntry.PARSED_UNIT);
+      while (state != CacheState.VALID && state != CacheState.ERROR) {
+        dartEntry = internalParseDart(source);
+        state = dartEntry.getState(DartEntry.PARSED_UNIT);
       }
-      HtmlUnit unit = htmlEntry.getValue(HtmlEntry.PARSED_UNIT);
-      if (unit == null) {
-        try {
-          HtmlParseResult result = new HtmlParser(source).parse(scanHtml(source));
-          unit = result.htmlUnit;
-          HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
-          htmlCopy.setValue(SourceEntry.LINE_INFO, new LineInfo(result.lineStarts));
-          htmlCopy.setValue(HtmlEntry.PARSED_UNIT, unit);
-          htmlCopy.setValue(HtmlEntry.REFERENCED_LIBRARIES, getLibrarySources2(source, unit));
-          _sourceMap[source] = htmlCopy;
-        } on AnalysisException catch (exception) {
-          HtmlEntryImpl htmlCopy = htmlEntry.writableCopy;
-          htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
-          htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.ERROR);
-          htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.ERROR);
-          _sourceMap[source] = htmlCopy;
-          throw exception;
-        }
-      }
-      return unit;
+      unit = dartEntry.anyParsedCompilationUnit;
     }
+    return unit;
   }
+  HtmlUnit parseHtmlUnit(Source source) => internalGetHtmlParseData(source, HtmlEntry.PARSED_UNIT, null);
   List<ChangeNotice> performAnalysisTask() {
     {
       if (!performSingleAnalysisTask() && _pendingNotices.isEmpty) {
@@ -3117,66 +3072,68 @@
   }
 
   /**
-   * Return `true` if the given compilation unit has a part-of directive but no library
-   * directive.
+   * Given a source for a Dart file, return the data represented by the given descriptor that is
+   * associated with that source, or the given default value if the source is not a Dart file. This
+   * method assumes that the data can be produced by parsing the source if it is not already cached.
    *
-   * @param unit the compilation unit being tested
-   * @return `true` if the compilation unit has a part-of directive
+   * @param source the source representing the Dart file
+   * @param dartEntry the cache entry associated with the Dart file
+   * @param descriptor the descriptor representing the data to be returned
+   * @param defaultValue the value to be returned if the source is not a Dart file
+   * @return the requested data about the given source
+   * @throws AnalysisException if data could not be returned because the source could not be parsed
    */
-  bool hasPartOfDirective(CompilationUnit unit) {
-    bool hasPartOf = false;
-    for (Directive directive in unit.directives) {
-      if (directive is PartOfDirective) {
-        hasPartOf = true;
-      } else if (directive is LibraryDirective) {
-        return false;
-      }
+  Object internalGetDartParseData(Source source, DartEntry dartEntry, DataDescriptor descriptor, Object defaultValue) {
+    if (dartEntry == null) {
+      return defaultValue;
     }
-    return hasPartOf;
+    CacheState state = dartEntry.getState(descriptor);
+    while (state != CacheState.ERROR && state != CacheState.VALID) {
+      dartEntry = internalParseDart(source);
+      state = dartEntry.getState(descriptor);
+    }
+    return dartEntry.getValue(descriptor);
   }
 
   /**
-   * Compute the kind of the given source. This method should only be invoked when the kind is not
-   * already known.
+   * Given a source for a Dart file, return the data represented by the given descriptor that is
+   * associated with that source, or the given default value if the source is not a Dart file. This
+   * method assumes that the data can be produced by parsing the source if it is not already cached.
    *
-   * @param source the source for which a kind is to be computed
-   * @return the new source info that was created to represent the source
+   * @param source the source representing the Dart file
+   * @param descriptor the descriptor representing the data to be returned
+   * @param defaultValue the value to be returned if the source is not a Dart file
+   * @return the requested data about the given source
+   * @throws AnalysisException if data could not be returned because the source could not be parsed
    */
-  DartEntry internalComputeKindOf(Source source) {
-    try {
-      accessed(source);
-      RecordingErrorListener errorListener = new RecordingErrorListener();
-      AnalysisContextImpl_ScanResult scanResult = internalScan(source, errorListener);
-      Parser parser = new Parser(source, errorListener);
-      CompilationUnit unit = parser.parseCompilationUnit(scanResult._token);
-      LineInfo lineInfo = new LineInfo(scanResult._lineStarts);
-      List<AnalysisError> errors = errorListener.getErrors2(source);
-      unit.parsingErrors = errors;
-      unit.lineInfo = lineInfo;
-      DartEntryImpl dartCopy = ((_sourceMap[source] as DartEntry)).writableCopy;
-      if (hasPartOfDirective(unit)) {
-        dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.PART);
-      } else {
-        dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.LIBRARY);
-      }
-      dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
-      dartCopy.setValue(DartEntry.PARSED_UNIT, unit);
-      dartCopy.setValue(DartEntry.PARSE_ERRORS, errors);
-      _sourceMap[source] = dartCopy;
-      return dartCopy;
-    } on AnalysisException catch (exception) {
-      DartEntryImpl dartCopy = ((_sourceMap[source] as DartEntry)).writableCopy;
-      dartCopy.setState(DartEntry.SOURCE_KIND, CacheState.ERROR);
-      dartCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
-      dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.ERROR);
-      dartCopy.setState(DartEntry.PARSE_ERRORS, CacheState.ERROR);
-      _sourceMap[source] = dartCopy;
-      return dartCopy;
+  Object internalGetDartParseData2(Source source, DataDescriptor descriptor, Object defaultValue) => internalGetDartParseData(source, getReadableDartEntry(source), descriptor, defaultValue);
+
+  /**
+   * Given a source for an HTML file, return the data represented by the given descriptor that is
+   * associated with that source, or the given default value if the source is not an HTML file. This
+   * method assumes that the data can be produced by parsing the source if it is not already cached.
+   *
+   * @param source the source representing the Dart file
+   * @param descriptor the descriptor representing the data to be returned
+   * @param defaultValue the value to be returned if the source is not a Dart file
+   * @return the requested data about the given source
+   * @throws AnalysisException if data could not be returned because the source could not be parsed
+   */
+  Object internalGetHtmlParseData(Source source, DataDescriptor descriptor, Object defaultValue) {
+    HtmlEntry htmlEntry = getReadableHtmlEntry(source);
+    if (htmlEntry == null) {
+      return defaultValue;
     }
+    CacheState state = htmlEntry.getState(descriptor);
+    while (state != CacheState.ERROR && state != CacheState.VALID) {
+      htmlEntry = internalParseHtml(source);
+      state = htmlEntry.getState(descriptor);
+    }
+    return htmlEntry.getValue(descriptor);
   }
   CompilationUnit internalParseCompilationUnit(DartEntryImpl dartCopy, Source source) {
-    accessed(source);
     try {
+      accessed(source);
       RecordingErrorListener errorListener = new RecordingErrorListener();
       AnalysisContextImpl_ScanResult scanResult = internalScan(source, errorListener);
       Parser parser = new Parser(source, errorListener);
@@ -3230,9 +3187,152 @@
       dartCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
       dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.ERROR);
       dartCopy.setState(DartEntry.PARSE_ERRORS, CacheState.ERROR);
+      dartCopy.setState(DartEntry.EXPORTED_LIBRARIES, CacheState.ERROR);
+      dartCopy.setState(DartEntry.IMPORTED_LIBRARIES, CacheState.ERROR);
+      dartCopy.setState(DartEntry.INCLUDED_PARTS, CacheState.ERROR);
       throw exception;
     }
   }
+
+  /**
+   * Scan and parse the given Dart file, updating the cache as appropriate, and return the updated
+   * cache entry associated with the source.
+   *
+   * @param source the source representing the compilation unit to be parsed
+   * @return the updated cache entry associated with the source
+   * @throws AnalysisException if the source does not represent a Dart compilation unit or if the
+   *           compilation unit cannot be parsed for some reason
+   */
+  DartEntry internalParseDart(Source source) {
+    AnalysisContextImpl_ScanResult scanResult = null;
+    LineInfo lineInfo = null;
+    CompilationUnit unit = null;
+    List<AnalysisError> errors = null;
+    bool hasPartOfDirective = false;
+    bool hasLibraryDirective = false;
+    Set<Source> exportedSources = new Set<Source>();
+    Set<Source> importedSources = new Set<Source>();
+    Set<Source> includedSources = new Set<Source>();
+    AnalysisException thrownException = null;
+    try {
+      RecordingErrorListener errorListener = new RecordingErrorListener();
+      scanResult = internalScan(source, errorListener);
+      Parser parser = new Parser(source, errorListener);
+      unit = parser.parseCompilationUnit(scanResult._token);
+      lineInfo = new LineInfo(scanResult._lineStarts);
+      errors = errorListener.getErrors2(source);
+      for (Directive directive in unit.directives) {
+        if (directive is ExportDirective) {
+          Source exportSource = resolveSource(source, (directive as ExportDirective));
+          if (exportSource != null) {
+            javaSetAdd(exportedSources, exportSource);
+          }
+        } else if (directive is ImportDirective) {
+          Source importSource = resolveSource(source, (directive as ImportDirective));
+          if (importSource != null) {
+            javaSetAdd(importedSources, importSource);
+          }
+        } else if (directive is LibraryDirective) {
+          hasLibraryDirective = true;
+        } else if (directive is PartDirective) {
+          Source partSource = resolveSource(source, (directive as PartDirective));
+          if (partSource != null) {
+            javaSetAdd(includedSources, partSource);
+          }
+        } else if (directive is PartOfDirective) {
+          hasPartOfDirective = true;
+        }
+      }
+      unit.parsingErrors = errors;
+      unit.lineInfo = lineInfo;
+    } on AnalysisException catch (exception) {
+      thrownException = exception;
+    }
+    DartEntryImpl dartCopy = null;
+    {
+      SourceEntry sourceEntry = _sourceMap[source];
+      if (sourceEntry is! DartEntry) {
+        throw new AnalysisException.con1("Internal error: attempting to parse non-Dart file as a Dart file: ${source.fullName}");
+      }
+      accessed(source);
+      int resultTime = scanResult == null ? source.modificationStamp : scanResult.modificationTime;
+      if (sourceEntry.modificationTime == resultTime) {
+        dartCopy = ((sourceEntry as DartEntry)).writableCopy;
+        if (thrownException == null) {
+          dartCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
+          if (hasPartOfDirective && !hasLibraryDirective) {
+            dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.PART);
+          } else {
+            dartCopy.setValue(DartEntry.SOURCE_KIND, SourceKind.LIBRARY);
+          }
+          dartCopy.setValue(DartEntry.PARSED_UNIT, unit);
+          dartCopy.setValue(DartEntry.PARSE_ERRORS, errors);
+          dartCopy.setValue(DartEntry.EXPORTED_LIBRARIES, toArray(exportedSources));
+          dartCopy.setValue(DartEntry.IMPORTED_LIBRARIES, toArray(importedSources));
+          dartCopy.setValue(DartEntry.INCLUDED_PARTS, toArray(includedSources));
+        } else {
+          dartCopy.recordParseError();
+        }
+        _sourceMap[source] = dartCopy;
+      }
+    }
+    if (thrownException != null) {
+      AnalysisEngine.instance.logger.logError2("Could not parse ${source.fullName}", thrownException);
+      throw thrownException;
+    }
+    return dartCopy;
+  }
+
+  /**
+   * Scan and parse the given HTML file, updating the cache as appropriate, and return the updated
+   * cache entry associated with the source.
+   *
+   * @param source the source representing the HTML file to be parsed
+   * @return the updated cache entry associated with the source
+   * @throws AnalysisException if the source does not represent an HTML file or if the file cannot
+   *           be parsed for some reason
+   */
+  HtmlEntry internalParseHtml(Source source) {
+    HtmlParseResult result = null;
+    LineInfo lineInfo = null;
+    AnalysisException thrownException = null;
+    try {
+      result = new HtmlParser(source).parse(scanHtml(source));
+      lineInfo = new LineInfo(result.lineStarts);
+    } on AnalysisException catch (exception) {
+      thrownException = exception;
+    }
+    HtmlEntryImpl htmlCopy = null;
+    {
+      SourceEntry sourceEntry = _sourceMap[source];
+      if (sourceEntry is! HtmlEntry) {
+        throw new AnalysisException.con1("Internal error: attempting to parse non-HTML file as a HTML file: ${source.fullName}");
+      }
+      accessed(source);
+      int resultTime = result == null ? source.modificationStamp : result.modificationTime;
+      if (sourceEntry.modificationTime == resultTime) {
+        htmlCopy = ((sourceEntry as HtmlEntry)).writableCopy;
+        if (thrownException == null) {
+          HtmlUnit unit = result.htmlUnit;
+          htmlCopy.setValue(SourceEntry.LINE_INFO, lineInfo);
+          htmlCopy.setValue(HtmlEntry.PARSED_UNIT, unit);
+          htmlCopy.setValue(HtmlEntry.REFERENCED_LIBRARIES, getLibrarySources2(source, unit));
+        } else {
+          htmlCopy.setState(SourceEntry.LINE_INFO, CacheState.ERROR);
+          htmlCopy.setState(HtmlEntry.PARSED_UNIT, CacheState.ERROR);
+          htmlCopy.setState(HtmlEntry.REFERENCED_LIBRARIES, CacheState.ERROR);
+        }
+        _sourceMap[source] = htmlCopy;
+      }
+    }
+    if (thrownException != null) {
+      AnalysisEngine.instance.logger.logError2("Could not parse ${source.fullName}", thrownException);
+      throw thrownException;
+    }
+    ChangeNoticeImpl notice = getNotice(source);
+    notice.setErrors(htmlCopy.allErrors, lineInfo);
+    return htmlCopy;
+  }
   AnalysisContextImpl_ScanResult internalScan(Source source, AnalysisErrorListener errorListener) {
     AnalysisContextImpl_ScanResult result = new AnalysisContextImpl_ScanResult();
     Source_ContentReceiver receiver = new Source_ContentReceiver_7(source, errorListener, result);
@@ -3578,6 +3678,7 @@
       List<Source> containingLibraries = getLibrariesContaining(source);
       DartEntryImpl dartCopy = ((sourceEntry as DartEntry)).writableCopy;
       dartCopy.modificationTime = source.modificationStamp;
+      dartCopy.setState(DartEntry.ELEMENT, CacheState.INVALID);
       dartCopy.setState(SourceEntry.LINE_INFO, CacheState.INVALID);
       dartCopy.setState(DartEntry.PARSE_ERRORS, CacheState.INVALID);
       dartCopy.setState(DartEntry.PARSED_UNIT, CacheState.INVALID);
diff --git a/pkg/analyzer_experimental/lib/src/generated/error.dart b/pkg/analyzer_experimental/lib/src/generated/error.dart
index 4f94ece..4f53646 100644
--- a/pkg/analyzer_experimental/lib/src/generated/error.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/error.dart
@@ -198,7 +198,7 @@
    * @param arguments the arguments to the error, used to compose the error message
    */
   void reportError2(ErrorCode errorCode, ASTNode node, List<Object> arguments) {
-    _errorListener.onError(new AnalysisError.con2(_source, node.offset, node.length, errorCode, arguments));
+    reportError3(errorCode, node.offset, node.length, arguments);
   }
 
   /**
@@ -221,7 +221,7 @@
    * @param arguments the arguments to the error, used to compose the error message
    */
   void reportError4(ErrorCode errorCode, Token token, List<Object> arguments) {
-    _errorListener.onError(new AnalysisError.con2(_source, token.offset, token.length, errorCode, arguments));
+    reportError3(errorCode, token.offset, token.length, arguments);
   }
 
   /**
@@ -450,7 +450,10 @@
    * @param supertypeName name of the supertype
    */
   static final HintCode DEAD_CODE_ON_CATCH_SUBTYPE = new HintCode('DEAD_CODE_ON_CATCH_SUBTYPE', 2, "Dead code, this on-catch block will never be executed since '%s' is a subtype of '%s'");
-  static final List<HintCode> values = [DEAD_CODE, DEAD_CODE_CATCH_FOLLOWING_CATCH, DEAD_CODE_ON_CATCH_SUBTYPE];
+  static final List<HintCode> values = [
+      DEAD_CODE,
+      DEAD_CODE_CATCH_FOLLOWING_CATCH,
+      DEAD_CODE_ON_CATCH_SUBTYPE];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -548,7 +551,13 @@
    * Syntactic errors are errors produced as a result of input that does not conform to the grammar.
    */
   static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 5, ErrorSeverity.ERROR);
-  static final List<ErrorType> values = [HINT, COMPILE_TIME_ERROR, PUB_SUGGESTION, STATIC_WARNING, STATIC_TYPE_WARNING, SYNTACTIC_ERROR];
+  static final List<ErrorType> values = [
+      HINT,
+      COMPILE_TIME_ERROR,
+      PUB_SUGGESTION,
+      STATIC_WARNING,
+      STATIC_TYPE_WARNING,
+      SYNTACTIC_ERROR];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -626,54 +635,67 @@
   static final CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = new CompileTimeErrorCode('ARGUMENT_DEFINITION_TEST_NON_PARAMETER', 2, "'%s' is not a parameter");
 
   /**
+   * 12.14.2 Binding Actuals to Formals: In checked mode, it is a dynamic type error if
+   * <i>o<sub>i</sub></i> is not <b>null</b> and the actual type of <i>p<sub>i</sub></i> is not a
+   * supertype of the type of <i>o<sub>i</sub></i>, i = 1..m.
+   *
+   * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
+   * uncaught exception being thrown.
+   *
+   * @param requiredCount the maximum number of positional arguments
+   * @param argumentCount the actual number of positional arguments given
+   */
+  static final CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('ARGUMENT_TYPE_NOT_ASSIGNABLE', 3, "The argument type '%s' cannot be assigned to the parameter type '%s'");
+
+  /**
    * 12.30 Identifier Reference: It is a compile-time error to use a built-in identifier other than
    * dynamic as a type annotation.
    */
-  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 3, "The built-in identifier '%s' cannot be as a type");
+  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE', 4, "The built-in identifier '%s' cannot be as a type");
 
   /**
    * 12.30 Identifier Reference: It is a compile-time error if a built-in identifier is used as the
    * declared name of a class, type parameter or type alias.
    */
-  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 4, "The built-in identifier '%s' cannot be used as a type name");
+  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 5, "The built-in identifier '%s' cannot be used as a type name");
 
   /**
    * 12.30 Identifier Reference: It is a compile-time error if a built-in identifier is used as the
    * declared name of a class, type parameter or type alias.
    */
-  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 5, "The built-in identifier '%s' cannot be used as a type alias name");
+  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 6, "The built-in identifier '%s' cannot be used as a type alias name");
 
   /**
    * 12.30 Identifier Reference: It is a compile-time error if a built-in identifier is used as the
    * declared name of a class, type parameter or type alias.
    */
-  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 6, "The built-in identifier '%s' cannot be used as a type variable name");
+  static final CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME = new CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 7, "The built-in identifier '%s' cannot be used as a type variable name");
 
   /**
    * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements the operator
    * <i>==</i>.
    */
-  static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 7, "The switch case expression type '%s' cannot override the == operator");
+  static final CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = new CompileTimeErrorCode('CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS', 8, "The switch case expression type '%s' cannot override the == operator");
 
   /**
    * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
    * an exception.
    */
-  static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 8, "");
+  static final CompileTimeErrorCode COMPILE_TIME_CONSTANT_RAISES_EXCEPTION = new CompileTimeErrorCode('COMPILE_TIME_CONSTANT_RAISES_EXCEPTION', 9, "");
 
   /**
    * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
    * name. This restriction holds regardless of whether the getter is defined explicitly or
    * implicitly, or whether the getter or the method are inherited or not.
    */
-  static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_GETTER_AND_METHOD', 9, "Class '%s' cannot have both getter '%s.%s' and method with the same name");
+  static final CompileTimeErrorCode CONFLICTING_GETTER_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_GETTER_AND_METHOD', 10, "Class '%s' cannot have both getter '%s.%s' and method with the same name");
 
   /**
    * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
    * name. This restriction holds regardless of whether the getter is defined explicitly or
    * implicitly, or whether the getter or the method are inherited or not.
    */
-  static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileTimeErrorCode('CONFLICTING_METHOD_AND_GETTER', 10, "Class '%s' cannot have both method '%s.%s' and getter with the same name");
+  static final CompileTimeErrorCode CONFLICTING_METHOD_AND_GETTER = new CompileTimeErrorCode('CONFLICTING_METHOD_AND_GETTER', 11, "Class '%s' cannot have both method '%s.%s' and getter with the same name");
 
   /**
    * 7.6 Constructors: A constructor name always begins with the name of its immediately enclosing
@@ -681,7 +703,7 @@
    * compile-time error if <i>id</i> is the name of a member declared in the immediately enclosing
    * class.
    */
-  static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 11, "'%s' cannot be used to name a constructor and a field in this class");
+  static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD', 12, "'%s' cannot be used to name a constructor and a field in this class");
 
   /**
    * 7.6 Constructors: A constructor name always begins with the name of its immediately enclosing
@@ -689,13 +711,13 @@
    * compile-time error if <i>id</i> is the name of a member declared in the immediately enclosing
    * class.
    */
-  static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 12, "'%s' cannot be used to name a constructor and a method in this class");
+  static final CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD = new CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', 13, "'%s' cannot be used to name a constructor and a method in this class");
 
   /**
    * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
    * uncaught exception being thrown.
    */
-  static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 13, "'const' constructors cannot throw exceptions");
+  static final CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', 14, "'const' constructors cannot throw exceptions");
 
   /**
    * 7.6.3 Constant Constructors: It is a compile-time error if a constant constructor is declared
@@ -703,7 +725,7 @@
    *
    * The above refers to both locally declared and inherited instance variables.
    */
-  static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 14, "Cannot define the 'const' constructor for a class with non-final fields");
+  static final CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD = new CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD', 15, "Cannot define the 'const' constructor for a class with non-final fields");
 
   /**
    * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not
@@ -716,63 +738,63 @@
    * @param initializerType the name of the type of the initializer expression
    * @param fieldType the name of the type of the field
    */
-  static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 15, "The initializer type '%s' cannot be assigned to the field type '%s'");
+  static final CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = new CompileTimeErrorCode('CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE', 16, "The initializer type '%s' cannot be assigned to the field type '%s'");
 
   /**
    * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
    * constant variable.
    */
-  static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErrorCode('CONST_FORMAL_PARAMETER', 16, "Parameters cannot be 'const'");
+  static final CompileTimeErrorCode CONST_FORMAL_PARAMETER = new CompileTimeErrorCode('CONST_FORMAL_PARAMETER', 17, "Parameters cannot be 'const'");
 
   /**
    * 5 Variables: A constant variable must be initialized to a compile-time constant or a
    * compile-time error occurs.
    */
-  static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 17, "'const' variables must be constant value");
+  static final CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE = new CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE', 18, "'const' variables must be constant value");
 
   /**
    * 7.5 Instance Variables: It is a compile-time error if an instance variable is declared to be
    * constant.
    */
-  static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorCode('CONST_INSTANCE_FIELD', 18, "Only static fields can be declared as 'const'");
+  static final CompileTimeErrorCode CONST_INSTANCE_FIELD = new CompileTimeErrorCode('CONST_INSTANCE_FIELD', 19, "Only static fields can be declared as 'const'");
 
   /**
    * 12.11.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 and e2
    * are constant expressions that evaluate to a boolean value.
    */
-  static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL', 19, "An expression of type 'bool' was expected");
+  static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL', 20, "An expression of type 'bool' was expected");
 
   /**
    * 12.11.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are
    * constant expressions that evaluate to a numeric, string or boolean value or to null.
    */
-  static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 20, "An expression of type 'bool', 'num', 'String' or 'null' was expected");
+  static final CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING = new CompileTimeErrorCode('CONST_EVAL_TYPE_BOOL_NUM_STRING', 21, "An expression of type 'bool', 'num', 'String' or 'null' was expected");
 
   /**
    * 12.11.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 or e1
    * << e2, where e, e1 and e2 are constant expressions that evaluate to an integer value or to
    * null.
    */
-  static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCode('CONST_EVAL_TYPE_INT', 21, "An expression of type 'int' was expected");
+  static final CompileTimeErrorCode CONST_EVAL_TYPE_INT = new CompileTimeErrorCode('CONST_EVAL_TYPE_INT', 22, "An expression of type 'int' was expected");
 
   /**
    * 12.11.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 * e2, e1 / e2, e1 ~/
    * e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are constant
    * expressions that evaluate to a numeric value or to null..
    */
-  static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', 22, "An expression of type 'num' was expected");
+  static final CompileTimeErrorCode CONST_EVAL_TYPE_NUM = new CompileTimeErrorCode('CONST_EVAL_TYPE_NUM', 23, "An expression of type 'num' was expected");
 
   /**
    * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
    * uncaught exception being thrown.
    */
-  static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION', 23, "Evaluation of this constant expression causes exception");
+  static final CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION = new CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION', 24, "Evaluation of this constant expression causes exception");
 
   /**
    * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
    * uncaught exception being thrown.
    */
-  static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErrorCode('CONST_EVAL_THROWS_IDBZE', 24, "Evaluation of this constant expression throws IntegerDivisionByZeroException");
+  static final CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE = new CompileTimeErrorCode('CONST_EVAL_THROWS_IDBZE', 25, "Evaluation of this constant expression throws IntegerDivisionByZeroException");
 
   /**
    * 12.11.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>, &hellip;,
@@ -785,7 +807,7 @@
    * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS
    * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
    */
-  static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 25, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
+  static final CompileTimeErrorCode CONST_WITH_INVALID_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_INVALID_TYPE_PARAMETERS', 26, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
 
   /**
    * 12.11.2 Const: If <i>e</i> is of the form <i>const T(a<sub>1</sub>, &hellip;, a<sub>n</sub>,
@@ -793,13 +815,13 @@
    * compile-time error if the type <i>T</i> does not declare a constant constructor with the same
    * name as the declaration of <i>T</i>.
    */
-  static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorCode('CONST_WITH_NON_CONST', 26, "The constructor being called is not a 'const' constructor");
+  static final CompileTimeErrorCode CONST_WITH_NON_CONST = new CompileTimeErrorCode('CONST_WITH_NON_CONST', 27, "The constructor being called is not a 'const' constructor");
 
   /**
    * 12.11.2 Const: In all of the above cases, it is a compile-time error if <i>a<sub>i</sub>, 1
    * &lt;= i &lt;= n + k</i>, is not a compile-time constant expression.
    */
-  static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 27, "Arguments of a constant creation must be constant expressions");
+  static final CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT = new CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT', 28, "Arguments of a constant creation must be constant expressions");
 
   /**
    * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class accessible in the current
@@ -812,12 +834,12 @@
    *
    * @param name the name of the non-type element
    */
-  static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCode('CONST_WITH_NON_TYPE', 28, "The name '%s' is not a class");
+  static final CompileTimeErrorCode CONST_WITH_NON_TYPE = new CompileTimeErrorCode('CONST_WITH_NON_TYPE', 29, "The name '%s' is not a class");
 
   /**
    * 12.11.2 Const: It is a compile-time error if <i>T</i> includes any type parameters.
    */
-  static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', 29, "The constant creation cannot use a type parameter");
+  static final CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS = new CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS', 30, "The constant creation cannot use a type parameter");
 
   /**
    * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
@@ -826,7 +848,7 @@
    * @param typeName the name of the type
    * @param constructorName the name of the requested constant constructor
    */
-  static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 30, "The class '%s' does not have a constant constructor '%s'");
+  static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR', 31, "The class '%s' does not have a constant constructor '%s'");
 
   /**
    * 12.11.2 Const: It is a compile-time error if <i>T.id</i> is not the name of a constant
@@ -834,19 +856,19 @@
    *
    * @param typeName the name of the type
    */
-  static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 31, "The class '%s' does not have a default constant constructor");
+  static final CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 32, "The class '%s' does not have a default constant constructor");
 
   /**
    * 15.3.1 Typedef: It is a compile-time error if any default values are specified in the signature
    * of a function type alias.
    */
-  static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 32, "Default values aren't allowed in typedefs");
+  static final CompileTimeErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS = new CompileTimeErrorCode('DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS', 33, "Default values aren't allowed in typedefs");
 
   /**
    * 3.1 Scoping: It is a compile-time error if there is more than one entity with the same name
    * declared in the same scope.
    */
-  static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 33, "The default constructor is already defined");
+  static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_DEFAULT', 34, "The default constructor is already defined");
 
   /**
    * 3.1 Scoping: It is a compile-time error if there is more than one entity with the same name
@@ -854,7 +876,7 @@
    *
    * @param duplicateName the name of the duplicate entity
    */
-  static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 34, "The constructor with name '%s' is already defined");
+  static final CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME = new CompileTimeErrorCode('DUPLICATE_CONSTRUCTOR_NAME', 35, "The constructor with name '%s' is already defined");
 
   /**
    * 3.1 Scoping: It is a compile-time error if there is more than one entity with the same name
@@ -867,7 +889,7 @@
    *
    * @param duplicateName the name of the duplicate entity
    */
-  static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorCode('DUPLICATE_DEFINITION', 35, "The name '%s' is already defined");
+  static final CompileTimeErrorCode DUPLICATE_DEFINITION = new CompileTimeErrorCode('DUPLICATE_DEFINITION', 36, "The name '%s' is already defined");
 
   /**
    * 7. Classes: It is a compile-time error if a class has an instance member and a static member
@@ -879,21 +901,21 @@
    * @param name the name of the conflicting members
    * @see #DUPLICATE_DEFINITION
    */
-  static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new CompileTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 36, "The name '%s' is already defined in '%s'");
+  static final CompileTimeErrorCode DUPLICATE_DEFINITION_INHERITANCE = new CompileTimeErrorCode('DUPLICATE_DEFINITION_INHERITANCE', 37, "The name '%s' is already defined in '%s'");
 
   /**
    * 12.14.2 Binding Actuals to Formals: It is a compile-time error if <i>q<sub>i</sub> =
    * q<sub>j</sub></i> for any <i>i != j</i> [where <i>q<sub>i</sub></i> is the label for a named
    * argument].
    */
-  static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', 37, "The argument for the named parameter '%s' was already specified");
+  static final CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT = new CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT', 38, "The argument for the named parameter '%s' was already specified");
 
   /**
    * SDK implementation libraries can be exported only by other SDK libraries.
    *
    * @param uri the uri pointing to a library
    */
-  static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', 38, "The library %s is internal and cannot be exported");
+  static final CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY', 39, "The library %s is internal and cannot be exported");
 
   /**
    * 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is
@@ -901,7 +923,7 @@
    *
    * @param uri the uri pointing to a non-library declaration
    */
-  static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', 39, "The exported library '%s' must not have a part-of directive");
+  static final CompileTimeErrorCode EXPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY', 40, "The exported library '%s' must not have a part-of directive");
 
   /**
    * 7.9 Superclasses: It is a compile-time error if the extends clause of a class <i>C</i> includes
@@ -909,7 +931,7 @@
    *
    * @param typeName the name of the superclass that was not found
    */
-  static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode('EXTENDS_NON_CLASS', 40, "Classes can only extend other classes");
+  static final CompileTimeErrorCode EXTENDS_NON_CLASS = new CompileTimeErrorCode('EXTENDS_NON_CLASS', 41, "Classes can only extend other classes");
 
   /**
    * 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null.
@@ -928,10 +950,11 @@
    * @param typeName the name of the type that cannot be extended
    * @see #IMPLEMENTS_DISALLOWED_CLASS
    */
-  static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', 41, "Classes cannot extend '%s'");
+  static final CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS = new CompileTimeErrorCode('EXTENDS_DISALLOWED_CLASS', 42, "Classes cannot extend '%s'");
 
   /**
-   * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
+   * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</i> or if <i>m &gt;
+   * n</i>.
    *
    * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
    * uncaught exception being thrown.
@@ -939,28 +962,28 @@
    * @param requiredCount the maximum number of positional arguments
    * @param argumentCount the actual number of positional arguments given
    */
-  static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 42, "%d positional arguments expected, but %d found");
+  static final CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS = new CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS', 43, "%d positional arguments expected, but %d found");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
    * error if more than one initializer corresponding to a given instance variable appears in
    * <i>k</i>'s list.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 43, "The field '%s' cannot be initialized twice in the same constructor");
+  static final CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS = new CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS', 44, "The field '%s' cannot be initialized twice in the same constructor");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
    * error if <i>k</i>'s initializer list contains an initializer for a final variable <i>f</i>
    * whose declaration includes an initialization expression.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', 44, "Values cannot be set in the constructor if they are final, and have already been set");
+  static final CompileTimeErrorCode FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION', 45, "Values cannot be set in the constructor if they are final, and have already been set");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
    * error if <i>k</i>'s initializer list contains an initializer for a variable that is initialized
    * by means of an initializing formal of <i>k</i>.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 45, "Fields cannot be initialized in both the parameter list and the initializers");
+  static final CompileTimeErrorCode FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = new CompileTimeErrorCode('FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER', 46, "Fields cannot be initialized in both the parameter list and the initializers");
 
   /**
    * 5 Variables: It is a compile-time error if a final instance variable that has been initialized
@@ -968,7 +991,7 @@
    *
    * @param name the name of the field in question
    */
-  static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', 46, "'%s' is final and was given a value when it was declared, so it cannot be set to a new value");
+  static final CompileTimeErrorCode FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = new CompileTimeErrorCode('FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR', 47, "'%s' is final and was given a value when it was declared, so it cannot be set to a new value");
 
   /**
    * 5 Variables: It is a compile-time error if a final instance variable that has is initialized by
@@ -977,19 +1000,19 @@
    *
    * @param name the name of the field in question
    */
-  static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new CompileTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 47, "'%s' is a final field and so can only be set once");
+  static final CompileTimeErrorCode FINAL_INITIALIZED_MULTIPLE_TIMES = new CompileTimeErrorCode('FINAL_INITIALIZED_MULTIPLE_TIMES', 48, "'%s' is a final field and so can only be set once");
 
   /**
    * 7.6.1 Generative Constructors: It is a compile-time error if an initializing formal is used by
    * a function other than a non-redirecting generative constructor.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 48, "Initializing formal fields cannot be used in factory constructors");
+  static final CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_FACTORY_CONSTRUCTOR', 49, "Initializing formal fields cannot be used in factory constructors");
 
   /**
    * 7.6.1 Generative Constructors: It is a compile-time error if an initializing formal is used by
    * a function other than a non-redirecting generative constructor.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 49, "Initializing formal fields can only be used in constructors");
+  static final CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 50, "Initializing formal fields can only be used in constructors");
 
   /**
    * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
@@ -998,7 +1021,7 @@
    * 7.6.1 Generative Constructors: It is a compile-time error if an initializing formal is used by
    * a function other than a non-redirecting generative constructor.
    */
-  static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 50, "The redirecting constructor cannot have a field initializer");
+  static final CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = new CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', 51, "The redirecting constructor cannot have a field initializer");
 
   /**
    * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
@@ -1006,7 +1029,7 @@
    *
    * @param name the conflicting name of the getter and method
    */
-  static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new CompileTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 51, "'%s' cannot be used to name a getter, there is already a method with the same name");
+  static final CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = new CompileTimeErrorCode('GETTER_AND_METHOD_WITH_SAME_NAME', 52, "'%s' cannot be used to name a getter, there is already a method with the same name");
 
   /**
    * 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null.
@@ -1025,13 +1048,13 @@
    * @param typeName the name of the type that cannot be implemented
    * @see #EXTENDS_DISALLOWED_CLASS
    */
-  static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 52, "Classes cannot implement '%s'");
+  static final CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS = new CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS', 53, "Classes cannot implement '%s'");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the implements clause of a class includes
    * type dynamic.
    */
-  static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCode('IMPLEMENTS_DYNAMIC', 53, "Classes cannot implement 'dynamic'");
+  static final CompileTimeErrorCode IMPLEMENTS_DYNAMIC = new CompileTimeErrorCode('IMPLEMENTS_DYNAMIC', 54, "Classes cannot implement 'dynamic'");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the implements clause of a class <i>C</i>
@@ -1040,7 +1063,7 @@
    *
    * @param typeName the name of the interface that was not found
    */
-  static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', 54, "Classes can only implement other classes");
+  static final CompileTimeErrorCode IMPLEMENTS_NON_CLASS = new CompileTimeErrorCode('IMPLEMENTS_NON_CLASS', 55, "Classes can only implement other classes");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if a type <i>T</i> appears more than once in
@@ -1048,7 +1071,15 @@
    *
    * @param className the name of the class that is implemented more than once
    */
-  static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCode('IMPLEMENTS_REPEATED', 55, "'%s' can only be implemented once");
+  static final CompileTimeErrorCode IMPLEMENTS_REPEATED = new CompileTimeErrorCode('IMPLEMENTS_REPEATED', 56, "'%s' can only be implemented once");
+
+  /**
+   * 7.10 Superinterfaces: It is a compile-time error if the superclass of a class <i>C</i> appears
+   * in the implements clause of <i>C</i>.
+   *
+   * @param className the name of the class that appears in both "extends" and "implements" clauses
+   */
+  static final CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS = new CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS', 57, "'%s' cannot be used in both 'extends' and 'implements' clauses");
 
   /**
    * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the right hand side of
@@ -1060,14 +1091,14 @@
    *
    * @param name the name of the type in question
    */
-  static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 56, "The 'this' expression cannot be implicitly used in initializers");
+  static final CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER = new CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER', 58, "The 'this' expression cannot be implicitly used in initializers");
 
   /**
    * SDK implementation libraries can be imported only by other SDK libraries.
    *
    * @param uri the uri pointing to a library
    */
-  static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY', 57, "The library %s is internal and cannot be imported");
+  static final CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = new CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY', 59, "The library %s is internal and cannot be imported");
 
   /**
    * 14.1 Imports: It is a compile-time error if the compilation unit found at the specified URI is
@@ -1075,7 +1106,7 @@
    *
    * @param uri the uri pointing to a non-library declaration
    */
-  static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', 58, "The imported library '%s' must not have a part-of directive");
+  static final CompileTimeErrorCode IMPORT_OF_NON_LIBRARY = new CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY', 60, "The imported library '%s' must not have a part-of directive");
 
   /**
    * 13.9 Switch: It is a compile-time error if values of the expressions <i>e<sub>k</sub></i> are
@@ -1084,7 +1115,7 @@
    * @param expressionSource the expression source code that is the unexpected type
    * @param expectedType the name of the expected type
    */
-  static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 59, "Case expressions must have the same types, '%s' is not a %s'");
+  static final CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES = new CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES', 61, "Case expressions must have the same types, '%s' is not a %s'");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
@@ -1095,7 +1126,7 @@
    *          immediately enclosing class
    * @see #INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD
    */
-  static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 60, "'%s' is not a variable in the enclosing class");
+  static final CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTANT_FIELD', 62, "'%s' is not a variable in the enclosing class");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
@@ -1106,7 +1137,7 @@
    *          enclosing class
    * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
    */
-  static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', 61, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static");
+  static final CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZER_FOR_STATIC_FIELD', 63, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static");
 
   /**
    * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a
@@ -1118,7 +1149,7 @@
    * @see #INITIALIZING_FORMAL_FOR_STATIC_FIELD
    * @see #INITIALIZER_FOR_NON_EXISTANT_FIELD
    */
-  static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 62, "'%s' is not a variable in the enclosing class");
+  static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD', 64, "'%s' is not a variable in the enclosing class");
 
   /**
    * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a
@@ -1129,38 +1160,40 @@
    *          enclosing class
    * @see #INITIALIZER_FOR_STATIC_FIELD
    */
-  static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 63, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static");
+  static final CompileTimeErrorCode INITIALIZING_FORMAL_FOR_STATIC_FIELD = new CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_STATIC_FIELD', 65, "'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static");
 
   /**
    * 12.30 Identifier Reference: Otherwise, e is equivalent to the property extraction
    * <b>this</b>.<i>id</i>.
    */
-  static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 64, "Instance member cannot be accessed from static method");
+  static final CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC = new CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC', 66, "Instance member cannot be accessed from static method");
 
   /**
    * 11 Metadata: Metadata consists of a series of annotations, each of which begin with the
    * character @, followed by a constant expression that must be either a reference to a
    * compile-time constant variable, or a call to a constant constructor.
    */
-  static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCode('INVALID_ANNOTATION', 65, "Annotation can be only constant variable or constant constructor invocation");
+  static final CompileTimeErrorCode INVALID_ANNOTATION = new CompileTimeErrorCode('INVALID_ANNOTATION', 67, "Annotation can be only constant variable or constant constructor invocation");
 
   /**
    * TODO(brianwilkerson) Remove this when we have decided on how to report errors in compile-time
    * constants. Until then, this acts as a placeholder for more informative errors.
+   *
+   * See TODOs in ConstantVisitor
    */
-  static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode('INVALID_CONSTANT', 66, "");
+  static final CompileTimeErrorCode INVALID_CONSTANT = new CompileTimeErrorCode('INVALID_CONSTANT', 68, "Invalid constant value");
 
   /**
    * 7.6 Constructors: It is a compile-time error if the name of a constructor is not a constructor
    * name.
    */
-  static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', 67, "Invalid constructor name");
+  static final CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME = new CompileTimeErrorCode('INVALID_CONSTRUCTOR_NAME', 69, "Invalid constructor name");
 
   /**
    * 7.6.2 Factories: It is a compile-time error if <i>M</i> is not the name of the immediately
    * enclosing class.
    */
-  static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new CompileTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 68, "The name of the immediately enclosing class expected");
+  static final CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS = new CompileTimeErrorCode('INVALID_FACTORY_NAME_NOT_A_CLASS', 70, "The name of the immediately enclosing class expected");
 
   /**
    * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m1</i> overrides an
@@ -1170,7 +1203,7 @@
    * @param paramCount the number of named parameters in the overridden member
    * @param className the name of the class from the overridden method
    */
-  static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErrorCode('INVALID_OVERRIDE_NAMED', 69, "Missing the named parameter '%s' to match the overridden method from '%s'");
+  static final CompileTimeErrorCode INVALID_OVERRIDE_NAMED = new CompileTimeErrorCode('INVALID_OVERRIDE_NAMED', 71, "Missing the named parameter '%s' to match the overridden method from '%s'");
 
   /**
    * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m1</i> overrides an
@@ -1180,7 +1213,7 @@
    * @param paramCount the number of positional parameters in the overridden member
    * @param className the name of the class from the overridden method
    */
-  static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTimeErrorCode('INVALID_OVERRIDE_POSITIONAL', 70, "Must have at least %d optional parameters to match the overridden method from '%s'");
+  static final CompileTimeErrorCode INVALID_OVERRIDE_POSITIONAL = new CompileTimeErrorCode('INVALID_OVERRIDE_POSITIONAL', 72, "Must have at least %d optional parameters to match the overridden method from '%s'");
 
   /**
    * 7.1 Instance Methods: It is a compile-time error if an instance method <i>m1</i> overrides an
@@ -1190,20 +1223,20 @@
    * @param paramCount the number of required parameters in the overridden member
    * @param className the name of the class from the overridden method
    */
-  static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeErrorCode('INVALID_OVERRIDE_REQUIRED', 71, "Must have at exactly %d required parameters to match the overridden method from '%s'");
+  static final CompileTimeErrorCode INVALID_OVERRIDE_REQUIRED = new CompileTimeErrorCode('INVALID_OVERRIDE_REQUIRED', 73, "Must have at exactly %d required parameters to match the overridden method from '%s'");
 
   /**
    * 12.10 This: It is a compile-time error if this appears in a top-level function or variable
    * initializer, in a factory constructor, or in a static method or variable initializer, or in the
    * initializer of an instance variable.
    */
-  static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS', 72, "Invalid reference to 'this' expression");
+  static final CompileTimeErrorCode INVALID_REFERENCE_TO_THIS = new CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS', 74, "Invalid reference to 'this' expression");
 
   /**
    * 12.7 Maps: It is a compile-time error if the first type argument to a map literal is not
    * String.
    */
-  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 73, "The first type argument to a map literal must be 'String'");
+  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_FOR_KEY = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_FOR_KEY', 75, "The first type argument to a map literal must be 'String'");
 
   /**
    * 12.6 Lists: It is a compile time error if the type argument of a constant list literal includes
@@ -1211,7 +1244,7 @@
    *
    * @name the name of the type parameter
    */
-  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 74, "Constant list literals cannot include a type parameter as a type argument, such as '%s'");
+  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_LIST', 76, "Constant list literals cannot include a type parameter as a type argument, such as '%s'");
 
   /**
    * 12.7 Maps: It is a compile time error if the type arguments of a constant map literal include a
@@ -1219,7 +1252,7 @@
    *
    * @name the name of the type parameter
    */
-  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 75, "Constant map literals cannot include a type parameter as a type argument, such as '%s'");
+  static final CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP = new CompileTimeErrorCode('INVALID_TYPE_ARGUMENT_IN_CONST_MAP', 77, "Constant map literals cannot include a type parameter as a type argument, such as '%s'");
 
   /**
    * 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is
@@ -1234,7 +1267,7 @@
    * @param uri the URI that is invalid
    * @see #URI_DOES_NOT_EXIST
    */
-  static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVALID_URI', 76, "Invalid URI syntax: '%s'");
+  static final CompileTimeErrorCode INVALID_URI = new CompileTimeErrorCode('INVALID_URI', 78, "Invalid URI syntax: '%s'");
 
   /**
    * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</sub></i> exists within
@@ -1245,7 +1278,7 @@
    *
    * @param labelName the name of the unresolvable label
    */
-  static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorCode('LABEL_IN_OUTER_SCOPE', 77, "Cannot reference label '%s' declared in an outer method");
+  static final CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = new CompileTimeErrorCode('LABEL_IN_OUTER_SCOPE', 79, "Cannot reference label '%s' declared in an outer method");
 
   /**
    * 13.13 Break: It is a compile-time error if no such statement <i>s<sub>E</sub></i> exists within
@@ -1256,13 +1289,61 @@
    *
    * @param labelName the name of the unresolvable label
    */
-  static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('LABEL_UNDEFINED', 78, "Cannot reference undefined label '%s'");
+  static final CompileTimeErrorCode LABEL_UNDEFINED = new CompileTimeErrorCode('LABEL_UNDEFINED', 80, "Cannot reference undefined label '%s'");
+
+  /**
+   * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ...
+   * <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
+   * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
+   */
+  static final CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 81, "The element type '%s' cannot be assigned to the list type '%s'");
+
+  /**
+   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</sub></i> :
+   * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
+   * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
+   */
+  static final CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 82, "The element type '%s' cannot be assigned to the map key type '%s'");
+
+  /**
+   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</sub></i> :
+   * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
+   * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
+   */
+  static final CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new CompileTimeErrorCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 83, "The element type '%s' cannot be assigned to the map value type '%s'");
 
   /**
    * 7 Classes: It is a compile time error if a class <i>C</i> declares a member with the same name
    * as <i>C</i>.
    */
-  static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME', 79, "Class members cannot have the same name as the enclosing class");
+  static final CompileTimeErrorCode MEMBER_WITH_CLASS_NAME = new CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME', 84, "Class members cannot have the same name as the enclosing class");
 
   /**
    * 7.2 Getters: It is a compile-time error if a class has both a getter and a method with the same
@@ -1270,17 +1351,17 @@
    *
    * @param name the conflicting name of the getter and method
    */
-  static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new CompileTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 80, "'%s' cannot be used to name a method, there is already a getter with the same name");
+  static final CompileTimeErrorCode METHOD_AND_GETTER_WITH_SAME_NAME = new CompileTimeErrorCode('METHOD_AND_GETTER_WITH_SAME_NAME', 85, "'%s' cannot be used to name a method, there is already a getter with the same name");
 
   /**
    * 12.1 Constants: A constant expression is ... a constant list literal.
    */
-  static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 81, "List literals must be prefixed with 'const' when used as a constant expression");
+  static final CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_LIST_LITERAL', 86, "List literals must be prefixed with 'const' when used as a constant expression");
 
   /**
    * 12.1 Constants: A constant expression is ... a constant map literal.
    */
-  static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', 82, "Map literals must be prefixed with 'const' when used as a constant expression");
+  static final CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL = new CompileTimeErrorCode('MISSING_CONST_IN_MAP_LITERAL', 87, "Map literals must be prefixed with 'const' when used as a constant expression");
 
   /**
    * 9 Mixins: It is a compile-time error if a declared or derived mixin explicitly declares a
@@ -1288,7 +1369,7 @@
    *
    * @param typeName the name of the mixin that is invalid
    */
-  static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTimeErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 83, "The class '%s' cannot be used as a mixin because it declares a constructor");
+  static final CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR = new CompileTimeErrorCode('MIXIN_DECLARES_CONSTRUCTOR', 88, "The class '%s' cannot be used as a mixin because it declares a constructor");
 
   /**
    * 9 Mixins: It is a compile-time error if a mixin is derived from a class whose superclass is not
@@ -1296,55 +1377,43 @@
    *
    * @param typeName the name of the mixin that is invalid
    */
-  static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new CompileTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 84, "The class '%s' cannot be used as a mixin because it extends a class other than Object");
+  static final CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = new CompileTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', 89, "The class '%s' cannot be used as a mixin because it extends a class other than Object");
 
   /**
    * 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not denote a class or mixin
    * available in the immediately enclosing scope.
    */
-  static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCode('MIXIN_OF_NON_CLASS', 85, "Classes can only mixin other classes");
+  static final CompileTimeErrorCode MIXIN_OF_NON_CLASS = new CompileTimeErrorCode('MIXIN_OF_NON_CLASS', 90, "Classes can only mixin other classes");
 
   /**
    * 9 Mixins: It is a compile-time error if a declared or derived mixin refers to super.
    */
-  static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErrorCode('MIXIN_REFERENCES_SUPER', 86, "The class '%s' cannot be used as a mixin because it references 'super'");
+  static final CompileTimeErrorCode MIXIN_REFERENCES_SUPER = new CompileTimeErrorCode('MIXIN_REFERENCES_SUPER', 91, "The class '%s' cannot be used as a mixin because it references 'super'");
 
   /**
    * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not denote a class available
    * in the immediately enclosing scope.
    */
-  static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 87, "Mixin can only be applied to class");
+  static final CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS = new CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS', 92, "Mixin can only be applied to class");
 
   /**
    * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
    * only action is to invoke another generative constructor.
    */
-  static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 88, "Constructor may have at most one 'this' redirection");
+  static final CompileTimeErrorCode MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = new CompileTimeErrorCode('MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS', 93, "Constructor may have at most one 'this' redirection");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Then <i>k</i> may
    * include at most one superinitializer in its initializer list or a compile time error occurs.
    */
-  static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', 89, "Constructor may have at most one 'super' initializer");
-
-  /**
-   * 12.11.1 New: It is a compile time error if <i>S</i> is not a generic type with <i>m</i> type
-   * parameters.
-   *
-   * @param typeName the name of the type being referenced (<i>S</i>)
-   * @param parameterCount the number of type parameters that were declared
-   * @param argumentCount the number of type arguments provided
-   * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS
-   * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
-   */
-  static final CompileTimeErrorCode NEW_WITH_INVALID_TYPE_PARAMETERS = new CompileTimeErrorCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 90, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
+  static final CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS = new CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS', 94, "Constructor may have at most one 'super' initializer");
 
   /**
    * 11 Metadata: Metadata consists of a series of annotations, each of which begin with the
    * character @, followed by a constant expression that must be either a reference to a
    * compile-time constant variable, or a call to a constant constructor.
    */
-  static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 91, "Annotation creation must have arguments");
+  static final CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS = new CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS', 95, "Annotation creation must have arguments");
 
   /**
    * 7.6.1 Generative Constructors: If no superinitializer is provided, an implicit superinitializer
@@ -1354,7 +1423,7 @@
    * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
    * generative constructor named <i>S</i> (respectively <i>S.id</i>)
    */
-  static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 92, "The class '%s' does not have a default constructor");
+  static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT', 96, "The class '%s' does not have a default constructor");
 
   /**
    * 7.6 Constructors: Iff no constructor is specified for a class <i>C</i>, it implicitly has a
@@ -1363,13 +1432,13 @@
    * 7.6.1 Generative constructors. It is a compile-time error if class <i>S</i> does not declare a
    * generative constructor named <i>S</i> (respectively <i>S.id</i>)
    */
-  static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 93, "The class '%s' does not have a default constructor");
+  static final CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT = new CompileTimeErrorCode('NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT', 97, "The class '%s' does not have a default constructor");
 
   /**
    * 13.2 Expression Statements: It is a compile-time error if a non-constant map literal that has
    * no explicit type arguments appears in a place where a statement is expected.
    */
-  static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 94, "A non-constant map literal without type arguments cannot be used as an expression statement");
+  static final CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT = new CompileTimeErrorCode('NON_CONST_MAP_AS_EXPRESSION_STATEMENT', 98, "A non-constant map literal without type arguments cannot be used as an expression statement");
 
   /**
    * 13.9 Switch: Given a switch statement of the form <i>switch (e) { label<sub>11</sub> &hellip;
@@ -1380,44 +1449,44 @@
    * s<sub>n</sub>}</i>, it is a compile-time error if the expressions <i>e<sub>k</sub></i> are not
    * compile-time constants, for all <i>1 &lt;= k &lt;= n</i>.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION', 95, "Case expressions must be constant");
+  static final CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION = new CompileTimeErrorCode('NON_CONSTANT_CASE_EXPRESSION', 99, "Case expressions must be constant");
 
   /**
    * 6.2.2 Optional Formals: It is a compile-time error if the default value of an optional
    * parameter is not a compile-time constant.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', 96, "Default values of an optional parameter must be constant");
+  static final CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE = new CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE', 100, "Default values of an optional parameter must be constant");
 
   /**
    * 12.6 Lists: It is a compile time error if an element of a constant list literal is not a
    * compile-time constant.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', 97, "'const' lists must have all constant values");
+  static final CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT = new CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT', 101, "'const' lists must have all constant values");
 
   /**
    * 12.7 Maps: It is a compile time error if either a key or a value of an entry in a constant map
    * literal is not a compile-time constant.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorCode('NON_CONSTANT_MAP_KEY', 98, "The keys in a map must be constant");
+  static final CompileTimeErrorCode NON_CONSTANT_MAP_KEY = new CompileTimeErrorCode('NON_CONSTANT_MAP_KEY', 102, "The keys in a map must be constant");
 
   /**
    * 12.7 Maps: It is a compile time error if either a key or a value of an entry in a constant map
    * literal is not a compile-time constant.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', 99, "The values in a 'const' map must be constant");
+  static final CompileTimeErrorCode NON_CONSTANT_MAP_VALUE = new CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE', 103, "The values in a 'const' map must be constant");
 
   /**
    * 11 Metadata: Metadata consists of a series of annotations, each of which begin with the
    * character @, followed by a constant expression that must be either a reference to a
    * compile-time constant variable, or a call to a constant constructor.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 100, "Annotation creation can use only 'const' constructor");
+  static final CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR = new CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR', 104, "Annotation creation can use only 'const' constructor");
 
   /**
    * 7.6.3 Constant Constructors: Any expression that appears within the initializer list of a
    * constant constructor must be a potentially constant expression, or a compile-time error occurs.
    */
-  static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 101, "Initializer expressions in constant constructors must be constants");
+  static final CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER = new CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER', 105, "Initializer expressions in constant constructors must be constants");
 
   /**
    * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
@@ -1428,7 +1497,7 @@
    * @param requiredCount the expected number of required arguments
    * @param argumentCount the actual number of positional arguments given
    */
-  static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileTimeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 102, "%d required argument(s) expected, but %d found");
+  static final CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new CompileTimeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 106, "%d required argument(s) expected, but %d found");
 
   /**
    * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears
@@ -1436,17 +1505,17 @@
    * a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i>
    * (respectively <i>S.id</i>)
    */
-  static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', 103, "The generative constructor '%s' expected, but factory found");
+  static final CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR', 107, "The generative constructor '%s' expected, but factory found");
 
   /**
    * 7.9 Superclasses: It is a compile-time error to specify an extends clause for class Object.
    */
-  static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 104, "");
+  static final CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS = new CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS', 108, "");
 
   /**
    * 7.1.1 Operators: It is a compile-time error to declare an optional parameter in an operator.
    */
-  static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 105, "Optional parameters are not allowed when defining an operator");
+  static final CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR = new CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR', 109, "Optional parameters are not allowed when defining an operator");
 
   /**
    * 14.3 Parts: It is a compile time error if the contents of the URI are not a valid part
@@ -1454,25 +1523,25 @@
    *
    * @param uri the uri pointing to a non-library declaration
    */
-  static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode('PART_OF_NON_PART', 106, "The included part '%s' must have a part-of directive");
+  static final CompileTimeErrorCode PART_OF_NON_PART = new CompileTimeErrorCode('PART_OF_NON_PART', 110, "The included part '%s' must have a part-of directive");
 
   /**
    * 14.1 Imports: It is a compile-time error if the current library declares a top-level member
    * named <i>p</i>.
    */
-  static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 107, "The name '%s' is already used as an import prefix and cannot be used to name a top-level element");
+  static final CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = new CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', 111, "The name '%s' is already used as an import prefix and cannot be used to name a top-level element");
 
   /**
    * 6.2.2 Optional Formals: It is a compile-time error if the name of a named optional parameter
    * begins with an '_' character.
    */
-  static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', 108, "Named optional parameters cannot start with an underscore");
+  static final CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = new CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', 112, "Named optional parameters cannot start with an underscore");
 
   /**
    * 12.1 Constants: It is a compile-time error if the value of a compile-time constant expression
    * depends on itself.
    */
-  static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 109, "");
+  static final CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT = new CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT', 113, "");
 
   /**
    * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
@@ -1483,19 +1552,13 @@
    *
    * https://code.google.com/p/dart/issues/detail?id=954
    */
-  static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 110, "Cycle in redirecting generative constructors");
+  static final CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT = new CompileTimeErrorCode('RECURSIVE_CONSTRUCTOR_REDIRECT', 114, "Cycle in redirecting generative constructors");
 
   /**
    * 7.6.2 Factories: It is a compile-time error if a redirecting factory constructor redirects to
    * itself, either directly or indirectly via a sequence of redirections.
    */
-  static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT', 111, "Cycle in redirecting factory constructors");
-
-  /**
-   * 15.3.1 Typedef: It is a compile-time error if a typedef refers to itself via a chain of
-   * references that does not include a class type.
-   */
-  static final CompileTimeErrorCode RECURSIVE_FUNCTION_TYPE_ALIAS = new CompileTimeErrorCode('RECURSIVE_FUNCTION_TYPE_ALIAS', 112, "");
+  static final CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT = new CompileTimeErrorCode('RECURSIVE_FACTORY_REDIRECT', 115, "Cycle in redirecting factory constructors");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a
@@ -1508,7 +1571,7 @@
    * @param className the name of the class that implements itself recursively
    * @param strImplementsPath a string representation of the implements loop
    */
-  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 113, "'%s' cannot be a superinterface of itself: %s");
+  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE', 116, "'%s' cannot be a superinterface of itself: %s");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a
@@ -1520,7 +1583,7 @@
    *
    * @param className the name of the class that implements itself recursively
    */
-  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', 114, "'%s' cannot extend itself");
+  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS', 117, "'%s' cannot extend itself");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the interface of a class <i>C</i> is a
@@ -1532,49 +1595,31 @@
    *
    * @param className the name of the class that implements itself recursively
    */
-  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', 115, "'%s' cannot implement itself");
+  static final CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS = new CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS', 118, "'%s' cannot implement itself");
 
   /**
    * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with the const modifier but
    * <i>k'</i> is not a constant constructor.
    */
-  static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 116, "Constant factory constructor cannot delegate to a non-constant constructor");
+  static final CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR = new CompileTimeErrorCode('REDIRECT_TO_NON_CONST_CONSTRUCTOR', 119, "Constant factory constructor cannot delegate to a non-constant constructor");
 
   /**
    * 13.3 Local Variable Declaration: It is a compile-time error if <i>e</i> refers to the name
    * <i>v</i> or the name <i>v=</i>.
    */
-  static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 117, "The name '%s' cannot be referenced in the initializer of a variable with the same name");
-
-  /**
-   * 16.1.1 Reserved Words: A reserved word may not be used as an identifier; it is a compile-time
-   * error if a reserved word is used where an identifier is expected.
-   */
-  static final CompileTimeErrorCode RESERVED_WORD_AS_IDENTIFIER = new CompileTimeErrorCode('RESERVED_WORD_AS_IDENTIFIER', 118, "");
+  static final CompileTimeErrorCode REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER = new CompileTimeErrorCode('REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER', 120, "The name '%s' cannot be referenced in the initializer of a variable with the same name");
 
   /**
    * 12.8.1 Rethrow: It is a compile-time error if an expression of the form <i>rethrow;</i> is not
    * enclosed within a on-catch clause.
    */
-  static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', 119, "rethrow must be inside of a catch clause");
+  static final CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = new CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH', 121, "rethrow must be inside of a catch clause");
 
   /**
    * 13.11 Return: It is a compile-time error if a return statement of the form <i>return e;</i>
    * appears in a generative constructor.
    */
-  static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 120, "Constructors cannot return a value");
-
-  /**
-   * 6.1 Function Declarations: It is a compile-time error to preface a function declaration with
-   * the built-in identifier static.
-   */
-  static final CompileTimeErrorCode STATIC_TOP_LEVEL_FUNCTION = new CompileTimeErrorCode('STATIC_TOP_LEVEL_FUNCTION', 121, "");
-
-  /**
-   * 5 Variables: It is a compile-time error to preface a top level variable declaration with the
-   * built-in identifier static.
-   */
-  static final CompileTimeErrorCode STATIC_TOP_LEVEL_VARIABLE = new CompileTimeErrorCode('STATIC_TOP_LEVEL_VARIABLE', 122, "");
+  static final CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = new CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR', 122, "Constructors cannot return a value");
 
   /**
    * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
@@ -1646,19 +1691,6 @@
   static final CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = new CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT', 130, "The class '%s' does not have a default generative constructor");
 
   /**
-   * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Each final instance
-   * variable <i>f</i> declared in the immediately enclosing class must have an initializer in
-   * <i>k</i>'s initializer list unless it has already been initialized by one of the following
-   * means:
-   * <ol>
-   * * Initialization at the declaration of <i>f</i>.
-   * * Initialization by means of an initializing formal of <i>k</i>.
-   * </ol>
-   * or a compile-time error occurs.
-   */
-  static final CompileTimeErrorCode UNINITIALIZED_FINAL_FIELD = new CompileTimeErrorCode('UNINITIALIZED_FINAL_FIELD', 131, "");
-
-  /**
    * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
    * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i> ...
    * <i>p<sub>n+k</sub></i>} or a static warning occurs.
@@ -1668,7 +1700,7 @@
    *
    * @param name the name of the requested named parameter
    */
-  static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', 132, "The named parameter '%s' is not defined");
+  static final CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER = new CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER', 131, "The named parameter '%s' is not defined");
 
   /**
    * 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is
@@ -1683,7 +1715,7 @@
    * @param uri the URI pointing to a non-existent file
    * @see #INVALID_URI
    */
-  static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCode('URI_DOES_NOT_EXIST', 133, "Target of URI does not exist: '%s'");
+  static final CompileTimeErrorCode URI_DOES_NOT_EXIST = new CompileTimeErrorCode('URI_DOES_NOT_EXIST', 132, "Target of URI does not exist: '%s'");
 
   /**
    * 14.1 Imports: It is a compile-time error if <i>x</i> is not a compile-time constant, or if
@@ -1695,7 +1727,7 @@
    * 14.5 URIs: It is a compile-time error if the string literal <i>x</i> that describes a URI is
    * not a compile-time constant, or if <i>x</i> involves string interpolation.
    */
-  static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErrorCode('URI_WITH_INTERPOLATION', 134, "URIs cannot use string interpolation");
+  static final CompileTimeErrorCode URI_WITH_INTERPOLATION = new CompileTimeErrorCode('URI_WITH_INTERPOLATION', 133, "URIs cannot use string interpolation");
 
   /**
    * 7.1.1 Operators: It is a compile-time error if the arity of the user-declared operator []= is
@@ -1708,7 +1740,7 @@
    * @param expectedNumberOfParameters the number of parameters expected
    * @param actualNumberOfParameters the number of parameters found in the operator declaration
    */
-  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 135, "Operator '%s' should declare exactly %d parameter(s), but %d found");
+  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR', 134, "Operator '%s' should declare exactly %d parameter(s), but %d found");
 
   /**
    * 7.1.1 Operators: It is a compile time error if the arity of the user-declared operator - is not
@@ -1716,14 +1748,151 @@
    *
    * @param actualNumberOfParameters the number of parameters found in the operator declaration
    */
-  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 136, "Operator '-' should declare 0 or 1 parameter, but %d found");
+  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS', 135, "Operator '-' should declare 0 or 1 parameter, but %d found");
 
   /**
    * 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
    * exactly one required formal parameter <i>p</i>.
    */
-  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 137, "Setters should declare exactly one required parameter");
-  static final List<CompileTimeErrorCode> values = [AMBIGUOUS_EXPORT, AMBIGUOUS_IMPORT, ARGUMENT_DEFINITION_TEST_NON_PARAMETER, BUILT_IN_IDENTIFIER_AS_TYPE, BUILT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, CONFLICTING_GETTER_AND_METHOD, CONFLICTING_METHOD_AND_GETTER, CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, CONST_CONSTRUCTOR_THROWS_EXCEPTION, CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, CONST_FORMAL_PARAMETER, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, CONST_INSTANCE_FIELD, CONST_EVAL_TYPE_BOOL, CONST_EVAL_TYPE_BOOL_NUM_STRING, CONST_EVAL_TYPE_INT, CONST_EVAL_TYPE_NUM, CONST_EVAL_THROWS_EXCEPTION, CONST_EVAL_THROWS_IDBZE, CONST_WITH_INVALID_TYPE_PARAMETERS, CONST_WITH_NON_CONST, CONST_WITH_NON_CONSTANT_ARGUMENT, CONST_WITH_NON_TYPE, CONST_WITH_TYPE_PARAMETERS, CONST_WITH_UNDEFINED_CONSTRUCTOR, CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, DUPLICATE_CONSTRUCTOR_DEFAULT, DUPLICATE_CONSTRUCTOR_NAME, DUPLICATE_DEFINITION, DUPLICATE_DEFINITION_INHERITANCE, DUPLICATE_NAMED_ARGUMENT, EXPORT_INTERNAL_LIBRARY, EXPORT_OF_NON_LIBRARY, EXTENDS_NON_CLASS, EXTENDS_DISALLOWED_CLASS, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, FINAL_INITIALIZED_MULTIPLE_TIMES, FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, GETTER_AND_METHOD_WITH_SAME_NAME, IMPLEMENTS_DISALLOWED_CLASS, IMPLEMENTS_DYNAMIC, IMPLEMENTS_NON_CLASS, IMPLEMENTS_REPEATED, IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, IMPORT_INTERNAL_LIBRARY, IMPORT_OF_NON_LIBRARY, INCONSISTENT_CASE_EXPRESSION_TYPES, INITIALIZER_FOR_NON_EXISTANT_FIELD, INITIALIZER_FOR_STATIC_FIELD, INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD, INITIALIZING_FORMAL_FOR_STATIC_FIELD, INSTANCE_MEMBER_ACCESS_FROM_STATIC, INVALID_ANNOTATION, INVALID_CONSTANT, INVALID_CONSTRUCTOR_NAME, INVALID_FACTORY_NAME_NOT_A_CLASS, INVALID_OVERRIDE_NAMED, INVALID_OVERRIDE_POSITIONAL, INVALID_OVERRIDE_REQUIRED, INVALID_REFERENCE_TO_THIS, INVALID_TYPE_ARGUMENT_FOR_KEY, INVALID_TYPE_ARGUMENT_IN_CONST_LIST, INVALID_TYPE_ARGUMENT_IN_CONST_MAP, INVALID_URI, LABEL_IN_OUTER_SCOPE, LABEL_UNDEFINED, MEMBER_WITH_CLASS_NAME, METHOD_AND_GETTER_WITH_SAME_NAME, MISSING_CONST_IN_LIST_LITERAL, MISSING_CONST_IN_MAP_LITERAL, MIXIN_DECLARES_CONSTRUCTOR, MIXIN_INHERITS_FROM_NOT_OBJECT, MIXIN_OF_NON_CLASS, MIXIN_REFERENCES_SUPER, MIXIN_WITH_NON_CLASS_SUPERCLASS, MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, MULTIPLE_SUPER_INITIALIZERS, NEW_WITH_INVALID_TYPE_PARAMETERS, NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, NON_CONST_MAP_AS_EXPRESSION_STATEMENT, NON_CONSTANT_CASE_EXPRESSION, NON_CONSTANT_DEFAULT_VALUE, NON_CONSTANT_LIST_ELEMENT, NON_CONSTANT_MAP_KEY, NON_CONSTANT_MAP_VALUE, NON_CONSTANT_ANNOTATION_CONSTRUCTOR, NON_CONSTANT_VALUE_IN_INITIALIZER, NOT_ENOUGH_REQUIRED_ARGUMENTS, NON_GENERATIVE_CONSTRUCTOR, OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, OPTIONAL_PARAMETER_IN_OPERATOR, PART_OF_NON_PART, PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, PRIVATE_OPTIONAL_PARAMETER, RECURSIVE_COMPILE_TIME_CONSTANT, RECURSIVE_CONSTRUCTOR_REDIRECT, RECURSIVE_FACTORY_REDIRECT, RECURSIVE_FUNCTION_TYPE_ALIAS, RECURSIVE_INTERFACE_INHERITANCE, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS, REDIRECT_TO_NON_CONST_CONSTRUCTOR, REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER, RESERVED_WORD_AS_IDENTIFIER, RETHROW_OUTSIDE_CATCH, RETURN_IN_GENERATIVE_CONSTRUCTOR, STATIC_TOP_LEVEL_FUNCTION, STATIC_TOP_LEVEL_VARIABLE, SUPER_IN_INVALID_CONTEXT, SUPER_IN_REDIRECTING_CONSTRUCTOR, SUPER_INITIALIZER_IN_OBJECT, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, UNDEFINED_CLASS, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, UNINITIALIZED_FINAL_FIELD, UNDEFINED_NAMED_PARAMETER, URI_DOES_NOT_EXIST, URI_WITH_INTERPOLATION, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER];
+  static final CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER = new CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER', 136, "Setters should declare exactly one required parameter");
+  static final List<CompileTimeErrorCode> values = [
+      AMBIGUOUS_EXPORT,
+      AMBIGUOUS_IMPORT,
+      ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
+      ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      BUILT_IN_IDENTIFIER_AS_TYPE,
+      BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
+      BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
+      BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME,
+      CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
+      COMPILE_TIME_CONSTANT_RAISES_EXCEPTION,
+      CONFLICTING_GETTER_AND_METHOD,
+      CONFLICTING_METHOD_AND_GETTER,
+      CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
+      CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
+      CONST_CONSTRUCTOR_THROWS_EXCEPTION,
+      CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
+      CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
+      CONST_FORMAL_PARAMETER,
+      CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+      CONST_INSTANCE_FIELD,
+      CONST_EVAL_TYPE_BOOL,
+      CONST_EVAL_TYPE_BOOL_NUM_STRING,
+      CONST_EVAL_TYPE_INT,
+      CONST_EVAL_TYPE_NUM,
+      CONST_EVAL_THROWS_EXCEPTION,
+      CONST_EVAL_THROWS_IDBZE,
+      CONST_WITH_INVALID_TYPE_PARAMETERS,
+      CONST_WITH_NON_CONST,
+      CONST_WITH_NON_CONSTANT_ARGUMENT,
+      CONST_WITH_NON_TYPE,
+      CONST_WITH_TYPE_PARAMETERS,
+      CONST_WITH_UNDEFINED_CONSTRUCTOR,
+      CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
+      DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
+      DUPLICATE_CONSTRUCTOR_DEFAULT,
+      DUPLICATE_CONSTRUCTOR_NAME,
+      DUPLICATE_DEFINITION,
+      DUPLICATE_DEFINITION_INHERITANCE,
+      DUPLICATE_NAMED_ARGUMENT,
+      EXPORT_INTERNAL_LIBRARY,
+      EXPORT_OF_NON_LIBRARY,
+      EXTENDS_NON_CLASS,
+      EXTENDS_DISALLOWED_CLASS,
+      EXTRA_POSITIONAL_ARGUMENTS,
+      FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+      FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
+      FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER,
+      FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
+      FINAL_INITIALIZED_MULTIPLE_TIMES,
+      FIELD_INITIALIZER_FACTORY_CONSTRUCTOR,
+      FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+      FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
+      GETTER_AND_METHOD_WITH_SAME_NAME,
+      IMPLEMENTS_DISALLOWED_CLASS,
+      IMPLEMENTS_DYNAMIC,
+      IMPLEMENTS_NON_CLASS,
+      IMPLEMENTS_REPEATED,
+      IMPLEMENTS_SUPER_CLASS,
+      IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
+      IMPORT_INTERNAL_LIBRARY,
+      IMPORT_OF_NON_LIBRARY,
+      INCONSISTENT_CASE_EXPRESSION_TYPES,
+      INITIALIZER_FOR_NON_EXISTANT_FIELD,
+      INITIALIZER_FOR_STATIC_FIELD,
+      INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD,
+      INITIALIZING_FORMAL_FOR_STATIC_FIELD,
+      INSTANCE_MEMBER_ACCESS_FROM_STATIC,
+      INVALID_ANNOTATION,
+      INVALID_CONSTANT,
+      INVALID_CONSTRUCTOR_NAME,
+      INVALID_FACTORY_NAME_NOT_A_CLASS,
+      INVALID_OVERRIDE_NAMED,
+      INVALID_OVERRIDE_POSITIONAL,
+      INVALID_OVERRIDE_REQUIRED,
+      INVALID_REFERENCE_TO_THIS,
+      INVALID_TYPE_ARGUMENT_FOR_KEY,
+      INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
+      INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
+      INVALID_URI,
+      LABEL_IN_OUTER_SCOPE,
+      LABEL_UNDEFINED,
+      LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      MAP_KEY_TYPE_NOT_ASSIGNABLE,
+      MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+      MEMBER_WITH_CLASS_NAME,
+      METHOD_AND_GETTER_WITH_SAME_NAME,
+      MISSING_CONST_IN_LIST_LITERAL,
+      MISSING_CONST_IN_MAP_LITERAL,
+      MIXIN_DECLARES_CONSTRUCTOR,
+      MIXIN_INHERITS_FROM_NOT_OBJECT,
+      MIXIN_OF_NON_CLASS,
+      MIXIN_REFERENCES_SUPER,
+      MIXIN_WITH_NON_CLASS_SUPERCLASS,
+      MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
+      MULTIPLE_SUPER_INITIALIZERS,
+      NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS,
+      NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
+      NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
+      NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
+      NON_CONSTANT_CASE_EXPRESSION,
+      NON_CONSTANT_DEFAULT_VALUE,
+      NON_CONSTANT_LIST_ELEMENT,
+      NON_CONSTANT_MAP_KEY,
+      NON_CONSTANT_MAP_VALUE,
+      NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
+      NON_CONSTANT_VALUE_IN_INITIALIZER,
+      NOT_ENOUGH_REQUIRED_ARGUMENTS,
+      NON_GENERATIVE_CONSTRUCTOR,
+      OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
+      OPTIONAL_PARAMETER_IN_OPERATOR,
+      PART_OF_NON_PART,
+      PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
+      PRIVATE_OPTIONAL_PARAMETER,
+      RECURSIVE_COMPILE_TIME_CONSTANT,
+      RECURSIVE_CONSTRUCTOR_REDIRECT,
+      RECURSIVE_FACTORY_REDIRECT,
+      RECURSIVE_INTERFACE_INHERITANCE,
+      RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
+      RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS,
+      REDIRECT_TO_NON_CONST_CONSTRUCTOR,
+      REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER,
+      RETHROW_OUTSIDE_CATCH,
+      RETURN_IN_GENERATIVE_CONSTRUCTOR,
+      SUPER_IN_INVALID_CONTEXT,
+      SUPER_IN_REDIRECTING_CONSTRUCTOR,
+      SUPER_INITIALIZER_IN_OBJECT,
+      TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
+      TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+      UNDEFINED_CLASS,
+      UNDEFINED_CONSTRUCTOR_IN_INITIALIZER,
+      UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
+      UNDEFINED_NAMED_PARAMETER,
+      URI_DOES_NOT_EXIST,
+      URI_WITH_INTERPOLATION,
+      WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
+      WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
+      WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -1781,7 +1950,10 @@
    * source file should not contain a directive such as `import 'package:foo/../some.dart'`.
    */
   static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSuggestionCode('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not contain '..'");
-  static final List<PubSuggestionCode> values = [FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, PACKAGE_IMPORT_CONTAINS_DOT_DOT];
+  static final List<PubSuggestionCode> values = [
+      FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
+      FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
+      PACKAGE_IMPORT_CONTAINS_DOT_DOT];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -1866,16 +2038,22 @@
   static final StaticWarningCode ASSIGNMENT_TO_FINAL = new StaticWarningCode('ASSIGNMENT_TO_FINAL', 2, "Final variables cannot be assigned a value");
 
   /**
+   * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
+   * warning if <i>T</i> does not have an accessible instance setter named <i>v =</i>.
+   */
+  static final StaticWarningCode ASSIGNMENT_TO_METHOD = new StaticWarningCode('ASSIGNMENT_TO_METHOD', 3, "Methods cannot be assigned a value");
+
+  /**
    * 13.9 Switch: It is a static warning if the last statement of the statement sequence
    * <i>s<sub>k</sub></i> is not a break, continue, return or throw statement.
    */
-  static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCode('CASE_BLOCK_NOT_TERMINATED', 3, "The last statement of the 'case' should be 'break', 'continue', 'return' or 'throw'");
+  static final StaticWarningCode CASE_BLOCK_NOT_TERMINATED = new StaticWarningCode('CASE_BLOCK_NOT_TERMINATED', 4, "The last statement of the 'case' should be 'break', 'continue', 'return' or 'throw'");
 
   /**
    * 12.32 Type Cast: It is a static warning if <i>T</i> does not denote a type available in the
    * current lexical scope.
    */
-  static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_TO_NON_TYPE', 4, "The name '%s' is not a type and cannot be used in an 'as' expression");
+  static final StaticWarningCode CAST_TO_NON_TYPE = new StaticWarningCode('CAST_TO_NON_TYPE', 5, "The name '%s' is not a type and cannot be used in an 'as' expression");
 
   /**
    * 16.1.2 Comments: A token of the form <i>[new c](uri)</i> will be replaced by a link in the
@@ -1884,7 +2062,7 @@
    * <i>L</i>, or if <i>c</i> is not the name of a constructor of a class declared in the exported
    * namespace of <i>L</i>.
    */
-  static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 5, "");
+  static final StaticWarningCode COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE', 6, "");
 
   /**
    * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a link in the
@@ -1892,19 +2070,19 @@
    * of the link will be <i>id</i>. It is a static warning if uri is not the URI of a dart library
    * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace of <i>L</i>.
    */
-  static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 6, "");
+  static final StaticWarningCode COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE = new StaticWarningCode('COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE', 7, "");
 
   /**
    * 16.1.2 Comments: It is a static warning if <i>c</i> does not denote a constructor that
    * available in the scope of the documentation comment.
    */
-  static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 7, "");
+  static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR', 8, "");
 
   /**
    * 16.1.2 Comments: It is a static warning if <i>id</i> does not denote a declaration that
    * available in the scope of the documentation comment.
    */
-  static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 8, "");
+  static final StaticWarningCode COMMENT_REFERENCE_UNDECLARED_IDENTIFIER = new StaticWarningCode('COMMENT_REFERENCE_UNDECLARED_IDENTIFIER', 9, "");
 
   /**
    * 16.1.2 Comments: A token of the form <i>[id](uri)</i> will be replaced by a link in the
@@ -1912,13 +2090,13 @@
    * of the link will be <i>id</i>. It is a static warning if uri is not the URI of a dart library
    * <i>L</i>, or if <i>id</i> is not a name declared in the exported namespace of <i>L</i>.
    */
-  static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticWarningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 9, "");
+  static final StaticWarningCode COMMENT_REFERENCE_URI_NOT_LIBRARY = new StaticWarningCode('COMMENT_REFERENCE_URI_NOT_LIBRARY', 10, "");
 
   /**
    * 7.4 Abstract Instance Members: It is a static warning if an abstract member is declared or
    * inherited in a concrete class.
    */
-  static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new StaticWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 10, "'%s' must have a method body because '%s' is not abstract");
+  static final StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER = new StaticWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER', 11, "'%s' must have a method body because '%s' is not abstract");
 
   /**
    * 7.2 Getters: It is a static warning if a class <i>C</i> declares an instance getter named
@@ -1927,7 +2105,7 @@
    *
    * @param superName the name of the super class declaring a static member
    */
-  static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', 11, "Superclass '%s' declares static member with the same name");
+  static final StaticWarningCode CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER', 12, "Superclass '%s' declares static member with the same name");
 
   /**
    * 7.3 Setters: It is a static warning if a class <i>C</i> declares an instance setter named
@@ -1936,31 +2114,31 @@
    *
    * @param superName the name of the super class declaring a static member
    */
-  static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', 12, "Superclass '%s' declares static member with the same name");
+  static final StaticWarningCode CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER = new StaticWarningCode('CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER', 13, "Superclass '%s' declares static member with the same name");
 
   /**
    * 7.2 Getters: It is a static warning if a class declares a static getter named <i>v</i> and also
    * has a non-static setter named <i>v=</i>.
    */
-  static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 13, "Class '%s' declares non-static setter with the same name");
+  static final StaticWarningCode CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER = new StaticWarningCode('CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER', 14, "Class '%s' declares non-static setter with the same name");
 
   /**
    * 7.3 Setters: It is a static warning if a class declares a static setter named <i>v=</i> and
    * also has a non-static member named <i>v</i>.
    */
-  static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 14, "Class '%s' declares non-static member with the same name");
+  static final StaticWarningCode CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER = new StaticWarningCode('CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER', 15, "Class '%s' declares non-static member with the same name");
 
   /**
    * 12.11.2 Const: Given an instance creation expression of the form <i>const q(a<sub>1</sub>,
    * &hellip; a<sub>n</sub>)</i> it is a static warning if <i>q</i> is the constructor of an
    * abstract class but <i>q</i> is not a factory constructor.
    */
-  static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCode('CONST_WITH_ABSTRACT_CLASS', 15, "Abstract classes cannot be created with a 'const' expression");
+  static final StaticWarningCode CONST_WITH_ABSTRACT_CLASS = new StaticWarningCode('CONST_WITH_ABSTRACT_CLASS', 16, "Abstract classes cannot be created with a 'const' expression");
 
   /**
    * 12.7 Maps: It is a static warning if the values of any two keys in a map literal are equal.
    */
-  static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUAL_KEYS_IN_MAP', 16, "Keys in a map cannot be equal");
+  static final StaticWarningCode EQUAL_KEYS_IN_MAP = new StaticWarningCode('EQUAL_KEYS_IN_MAP', 17, "Keys in a map cannot be equal");
 
   /**
    * 14.2 Exports: It is a static warning to export two different libraries with the same name.
@@ -1969,7 +2147,7 @@
    * @param uri2 the uri pointing to a second library
    * @param name the shared name of the exported libraries
    */
-  static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('EXPORT_DUPLICATED_LIBRARY_NAME', 17, "The exported libraries '%s' and '%s' should not have the same name '%s'");
+  static final StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('EXPORT_DUPLICATED_LIBRARY_NAME', 18, "The exported libraries '%s' and '%s' should not have the same name '%s'");
 
   /**
    * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</i> or if <i>m &gt;
@@ -1979,7 +2157,7 @@
    * @param argumentCount the actual number of positional arguments given
    * @see #NOT_ENOUGH_REQUIRED_ARGUMENTS
    */
-  static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', 18, "%d positional arguments expected, but %d found");
+  static final StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS = new StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS', 19, "%d positional arguments expected, but %d found");
 
   /**
    * 7.6.1 Generative Constructors: Execution of an initializer of the form <b>this</b>.<i>v</i> =
@@ -1996,7 +2174,7 @@
    * @param initializerType the name of the type of the initializer expression
    * @param fieldType the name of the type of the field
    */
-  static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 19, "The initializer type '%s' cannot be assigned to the field type '%s'");
+  static final StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZER_NOT_ASSIGNABLE', 20, "The initializer type '%s' cannot be assigned to the field type '%s'");
 
   /**
    * 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a
@@ -2005,15 +2183,24 @@
    * @param parameterType the name of the type of the field formal parameter
    * @param fieldType the name of the type of the field
    */
-  static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 20, "The parameter type '%s' is incompatable with the field type '%s'");
+  static final StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE = new StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE', 21, "The parameter type '%s' is incompatable with the field type '%s'");
 
   /**
    * 5 Variables: It is a static warning if a library, static or local variable <i>v</i> is final
    * and <i>v</i> is not initialized at its point of declaration.
    *
+   * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> declared in the
+   * immediately enclosing class must have an initializer in <i>k</i>'s initializer list unless it
+   * has already been initialized by one of the following means:
+   *
+   * * Initialization at the declaration of <i>f</i>.
+   * * Initialization by means of an initializing formal of <i>k</i>.
+   *
+   * or a static warning occurs.
+   *
    * @param name the name of the uninitialized final variable
    */
-  static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('FINAL_NOT_INITIALIZED', 21, "The final variable '%s' must be initialized");
+  static final StaticWarningCode FINAL_NOT_INITIALIZED = new StaticWarningCode('FINAL_NOT_INITIALIZED', 22, "The final variable '%s' must be initialized");
 
   /**
    * 14.1 Imports: It is a static warning to import two different libraries with the same name.
@@ -2022,7 +2209,7 @@
    * @param uri2 the uri pointing to a second library
    * @param name the shared name of the imported libraries
    */
-  static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('IMPORT_DUPLICATED_LIBRARY_NAME', 22, "The imported libraries '%s' and '%s' should not have the same name '%s'");
+  static final StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAME = new StaticWarningCode('IMPORT_DUPLICATED_LIBRARY_NAME', 23, "The imported libraries '%s' and '%s' should not have the same name '%s'");
 
   /**
    * 8.1.1 Inheritance and Overriding: However, if there are multiple members <i>m<sub>1</sub>,
@@ -2034,7 +2221,7 @@
    * not all of the <i>m<sub>i</sub></i> are setters, none of the <i>m<sub>i</sub></i> are
    * inherited, and a static warning is issued.
    */
-  static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 23, "'%s' is inherited as a getter and also a method");
+  static final StaticWarningCode INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD = new StaticWarningCode('INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD', 24, "'%s' is inherited as a getter and also a method");
 
   /**
    * 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares an instance method
@@ -2044,12 +2231,7 @@
    * @param memberName the name of the member with the name conflict
    * @param superclassName the name of the enclosing class that has the static member
    */
-  static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', 24, "'%s' collides with a static member in the superclass '%s'");
-
-  /**
-   * 7.6.2 Factories: It is a static warning if <i>M.id</i> is not a constructor name.
-   */
-  static final StaticWarningCode INVALID_FACTORY_NAME = new StaticWarningCode('INVALID_FACTORY_NAME', 25, "");
+  static final StaticWarningCode INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC = new StaticWarningCode('INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC', 25, "'%s' collides with a static member in the superclass '%s'");
 
   /**
    * 7.2 Getters: It is a static warning if a getter <i>m1</i> overrides a getter <i>m2</i> and the
@@ -2138,25 +2320,76 @@
   static final StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE = new StaticWarningCode('INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE', 33, "The parameter type '%s' is not assignable to '%s' as required by the setter it is overriding from '%s'");
 
   /**
-   * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
-   * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;
-   * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type
-   * <i>F</i> of <i>S.m</i> may not be assigned to a function type.
+   * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i> ...
+   * <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and second argument
+   * <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
    */
-  static final StaticWarningCode INVOCATION_OF_NON_FUNCTION = new StaticWarningCode('INVOCATION_OF_NON_FUNCTION', 34, "");
+  static final StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE', 34, "The element type '%s' cannot be assigned to the list type '%s'");
+
+  /**
+   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</sub></i> :
+   * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
+   * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
+   */
+  static final StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('MAP_KEY_TYPE_NOT_ASSIGNABLE', 35, "The element type '%s' cannot be assigned to the map key type '%s'");
+
+  /**
+   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt; [<i>k<sub>1</sub></i> :
+   * <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> : <i>e<sub>n</sub></i>] is evaluated as follows:
+   *
+   * * The operator []= is invoked on <i>m</i> with first argument <i>k<sub>i</sub></i> and second
+   * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
+   *
+   *
+   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
+   * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</sub>, 1 &lt;= i &lt;=
+   * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i>q</i> of <i>f</i>.
+   * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1 &lt;=
+   * j &lt;= m</i>.
+   */
+  static final StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = new StaticWarningCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 36, "The element type '%s' cannot be assigned to the map value type '%s'");
 
   /**
    * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> with argument type
    * <i>T</i> and a getter named <i>v</i> with return type <i>S</i>, and <i>T</i> may not be
    * assigned to <i>S</i>.
    */
-  static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 35, "The parameter type for setter '%s' is %s which is not assignable to its getter (of type %s)");
+  static final StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = new StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 37, "The parameter type for setter '%s' is %s which is not assignable to its getter (of type %s)");
 
   /**
    * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an abstract class and
    * <i>q</i> is not a factory constructor.
    */
-  static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode('NEW_WITH_ABSTRACT_CLASS', 36, "Abstract classes cannot be created with a 'new' expression");
+  static final StaticWarningCode NEW_WITH_ABSTRACT_CLASS = new StaticWarningCode('NEW_WITH_ABSTRACT_CLASS', 38, "Abstract classes cannot be created with a 'new' expression");
+
+  /**
+   * 15.8 Parameterized Types: Any use of a malbounded type gives rise to a static warning.
+   *
+   * @param typeName the name of the type being referenced (<i>S</i>)
+   * @param parameterCount the number of type parameters that were declared
+   * @param argumentCount the number of type arguments provided
+   * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS
+   * @see StaticTypeWarningCode#WRONG_NUMBER_OF_TYPE_ARGUMENTS
+   */
+  static final StaticWarningCode NEW_WITH_INVALID_TYPE_PARAMETERS = new StaticWarningCode('NEW_WITH_INVALID_TYPE_PARAMETERS', 39, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
 
   /**
    * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible in the current scope,
@@ -2164,7 +2397,7 @@
    *
    * @param name the name of the non-type element
    */
-  static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_WITH_NON_TYPE', 37, "The name '%s' is not a class");
+  static final StaticWarningCode NEW_WITH_NON_TYPE = new StaticWarningCode('NEW_WITH_NON_TYPE', 40, "The name '%s' is not a class");
 
   /**
    * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
@@ -2175,7 +2408,7 @@
    * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a static warning if the
    * type <i>T</i> does not declare a constructor with the same name as the declaration of <i>T</i>.
    */
-  static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 38, "The class '%s' does not have a constructor '%s'");
+  static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR', 41, "The class '%s' does not have a constructor '%s'");
 
   /**
    * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the current scope then:
@@ -2186,7 +2419,7 @@
    * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+kM/sub>)</i> it is a static warning if the
    * type <i>T</i> does not declare a constructor with the same name as the declaration of <i>T</i>.
    */
-  static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 39, "The class '%s' does not have a default constructor");
+  static final StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT = new StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT', 42, "The class '%s' does not have a default constructor");
 
   /**
    * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2202,7 +2435,7 @@
    * @param memberName the name of the fourth member
    * @param additionalCount the number of additional missing members that aren't listed
    */
-  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 40, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more");
+  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS', 43, "Missing inherited members: '%s', '%s', '%s', '%s' and %d more");
 
   /**
    * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2217,7 +2450,7 @@
    * @param memberName the name of the third member
    * @param memberName the name of the fourth member
    */
-  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 41, "Missing inherited members: '%s', '%s', '%s' and '%s'");
+  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR', 44, "Missing inherited members: '%s', '%s', '%s' and '%s'");
 
   /**
    * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2229,7 +2462,7 @@
    *
    * @param memberName the name of the member
    */
-  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 42, "Missing inherited member '%s'");
+  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE', 45, "Missing inherited member '%s'");
 
   /**
    * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2243,7 +2476,7 @@
    * @param memberName the name of the second member
    * @param memberName the name of the third member
    */
-  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 43, "Missing inherited members: '%s', '%s' and '%s'");
+  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE', 46, "Missing inherited members: '%s', '%s' and '%s'");
 
   /**
    * 7.9.1 Inheritance and Overriding: It is a static warning if a non-abstract class inherits an
@@ -2256,7 +2489,7 @@
    * @param memberName the name of the first member
    * @param memberName the name of the second member
    */
-  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 44, "Missing inherited members: '%s' and '%s'");
+  static final StaticWarningCode NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO = new StaticWarningCode('NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO', 47, "Missing inherited members: '%s' and '%s'");
 
   /**
    * 13.11 Try: An on-catch clause of the form <i>on T catch (p<sub>1</sub>, p<sub>2</sub>) s</i> or
@@ -2266,18 +2499,18 @@
    *
    * @param name the name of the non-type element
    */
-  static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE', 45, "The name '%s' is not a type and cannot be used in an on-catch clause");
+  static final StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = new StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE', 48, "The name '%s' is not a type and cannot be used in an on-catch clause");
 
   /**
    * 7.1.1 Operators: It is a static warning if the return type of the user-declared operator []= is
    * explicitly declared and not void.
    */
-  static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR', 46, "The return type of the operator []= must be 'void'");
+  static final StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = new StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR', 49, "The return type of the operator []= must be 'void'");
 
   /**
    * 7.3 Setters: It is a static warning if a setter declares a return type other than void.
    */
-  static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningCode('NON_VOID_RETURN_FOR_SETTER', 47, "The return type of the setter must be 'void'");
+  static final StaticWarningCode NON_VOID_RETURN_FOR_SETTER = new StaticWarningCode('NON_VOID_RETURN_FOR_SETTER', 50, "The return type of the setter must be 'void'");
 
   /**
    * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the form <i>id</i> or the
@@ -2291,7 +2524,7 @@
    *
    * @param nonTypeName the name that is not a type
    */
-  static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE', 48, "%s is not a type");
+  static final StaticWarningCode NOT_A_TYPE = new StaticWarningCode('NOT_A_TYPE', 51, "%s is not a type");
 
   /**
    * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; h</i> or if <i>m &gt;
@@ -2301,7 +2534,7 @@
    * @param argumentCount the actual number of positional arguments given
    * @see #EXTRA_POSITIONAL_ARGUMENTS
    */
-  static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarningCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 49, "%d required argument(s) expected, but %d found");
+  static final StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS = new StaticWarningCode('NOT_ENOUGH_REQUIRED_ARGUMENTS', 52, "%d required argument(s) expected, but %d found");
 
   /**
    * 14.3 Parts: It is a static warning if the referenced part declaration <i>p</i> names a library
@@ -2310,7 +2543,7 @@
    * @param expectedLibraryName the name of expected library name
    * @param actualLibraryName the non-matching actual library name from the "part of" declaration
    */
-  static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCode('PART_OF_DIFFERENT_LIBRARY', 50, "Expected this library to be part of '%s', not '%s'");
+  static final StaticWarningCode PART_OF_DIFFERENT_LIBRARY = new StaticWarningCode('PART_OF_DIFFERENT_LIBRARY', 53, "Expected this library to be part of '%s', not '%s'");
 
   /**
    * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> is not a subtype of
@@ -2319,7 +2552,7 @@
    * @param redirectedName the name of the redirected constructor
    * @param redirectingName the name of the redirecting constructor
    */
-  static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 51, "The redirected constructor '%s' has incompatible parameters with '%s'");
+  static final StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_FUNCTION_TYPE', 54, "The redirected constructor '%s' has incompatible parameters with '%s'");
 
   /**
    * 7.6.2 Factories: It is a static warning if the function type of <i>k'</i> is not a subtype of
@@ -2328,21 +2561,21 @@
    * @param redirectedName the name of the redirected constructor return type
    * @param redirectingName the name of the redirecting constructor return type
    */
-  static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 52, "The return type '%s' of the redirected constructor is not a subclass of '%s'");
+  static final StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE = new StaticWarningCode('REDIRECT_TO_INVALID_RETURN_TYPE', 55, "The return type '%s' of the redirected constructor is not a subclass of '%s'");
 
   /**
    * 7.6.2 Factories: It is a static warning if type does not denote a class accessible in the
    * current scope; if type does denote such a class <i>C</i> it is a static warning if the
    * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a constructor of <i>C</i>.
    */
-  static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWarningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 53, "The constructor '%s' could not be found in '%s'");
+  static final StaticWarningCode REDIRECT_TO_MISSING_CONSTRUCTOR = new StaticWarningCode('REDIRECT_TO_MISSING_CONSTRUCTOR', 56, "The constructor '%s' could not be found in '%s'");
 
   /**
    * 7.6.2 Factories: It is a static warning if type does not denote a class accessible in the
    * current scope; if type does denote such a class <i>C</i> it is a static warning if the
    * referenced constructor (be it <i>type</i> or <i>type.id</i>) is not a constructor of <i>C</i>.
    */
-  static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('REDIRECT_TO_NON_CLASS', 54, "The name '%s' is not a type and cannot be used in a redirected constructor");
+  static final StaticWarningCode REDIRECT_TO_NON_CLASS = new StaticWarningCode('REDIRECT_TO_NON_CLASS', 57, "The name '%s' is not a type and cannot be used in a redirected constructor");
 
   /**
    * 13.11 Return: Let <i>f</i> be the function immediately enclosing a return statement of the form
@@ -2352,7 +2585,7 @@
    * * The return type of <i>f</i> may not be assigned to void.
    * </ol>
    */
-  static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('RETURN_WITHOUT_VALUE', 55, "Missing return value after 'return'");
+  static final StaticWarningCode RETURN_WITHOUT_VALUE = new StaticWarningCode('RETURN_WITHOUT_VALUE', 58, "Missing return value after 'return'");
 
   /**
    * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not declare a static method
@@ -2360,19 +2593,19 @@
    *
    * @param memberName the name of the instance member
    */
-  static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 56, "Instance member '%s' cannot be accessed using static access");
+  static final StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = new StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 59, "Instance member '%s' cannot be accessed using static access");
 
   /**
    * 13.9 Switch: It is a static warning if the type of <i>e</i> may not be assigned to the type of
    * <i>e<sub>k</sub></i>.
    */
-  static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWarningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 57, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions");
+  static final StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE = new StaticWarningCode('SWITCH_EXPRESSION_NOT_ASSIGNABLE', 60, "Type '%s' of the switch expression is not assignable to the type '%s' of case expressions");
 
   /**
    * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the
    * current lexical scope.
    */
-  static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYPE_TEST_NON_TYPE', 58, "The name '%s' is not a type and cannot be used in an 'is' expression");
+  static final StaticWarningCode TYPE_TEST_NON_TYPE = new StaticWarningCode('TYPE_TEST_NON_TYPE', 61, "The name '%s' is not a type and cannot be used in an 'is' expression");
 
   /**
    * 10 Generics: However, a type parameter is considered to be a malformed type when referenced by
@@ -2381,7 +2614,7 @@
    * 15.1 Static Types: Any use of a malformed type gives rise to a static warning. A malformed type
    * is then interpreted as dynamic by the static type checker and the runtime.
    */
-  static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 59, "Static members cannot reference type parameters");
+  static final StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = new StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 62, "Static members cannot reference type parameters");
 
   /**
    * 15.1 Static Types: A type <i>T</i> is malformed iff: * <i>T</i> has the form <i>id</i> or the
@@ -2393,7 +2626,7 @@
    *
    * Any use of a malformed type gives rise to a static warning.
    */
-  static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarningCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 60, "");
+  static final StaticWarningCode TYPE_VARIABLE_IN_STATIC_SCOPE = new StaticWarningCode('TYPE_VARIABLE_IN_STATIC_SCOPE', 63, "");
 
   /**
    * 12.15.3 Static Invocation: A static method invocation <i>i</i> has the form
@@ -2403,12 +2636,12 @@
    *
    * @param undefinedClassName the name of the undefined class
    */
-  static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFINED_CLASS', 61, "Undefined class '%s'");
+  static final StaticWarningCode UNDEFINED_CLASS = new StaticWarningCode('UNDEFINED_CLASS', 64, "Undefined class '%s'");
 
   /**
    * Same as [UNDEFINED_CLASS], but to catch using "boolean" instead of "bool".
    */
-  static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode('UNDEFINED_CLASS_BOOLEAN', 62, "Undefined class 'boolean'; did you mean 'bool'?");
+  static final StaticWarningCode UNDEFINED_CLASS_BOOLEAN = new StaticWarningCode('UNDEFINED_CLASS_BOOLEAN', 65, "Undefined class 'boolean'; did you mean 'bool'?");
 
   /**
    * 12.17 Getter Invocation: It is a static warning if there is no class <i>C</i> in the enclosing
@@ -2418,7 +2651,7 @@
    * @param getterName the name of the getter
    * @param enclosingType the name of the enclosing type where the getter is being looked for
    */
-  static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEFINED_GETTER', 63, "There is no such getter '%s' in '%s'");
+  static final StaticWarningCode UNDEFINED_GETTER = new StaticWarningCode('UNDEFINED_GETTER', 66, "There is no such getter '%s' in '%s'");
 
   /**
    * 12.30 Identifier Reference: It is as static warning if an identifier expression of the form
@@ -2426,7 +2659,7 @@
    * setter) or variable initializer and there is no declaration <i>d</i> with name <i>id</i> in the
    * lexical scope enclosing the expression.
    */
-  static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('UNDEFINED_IDENTIFIER', 64, "Undefined name '%s'");
+  static final StaticWarningCode UNDEFINED_IDENTIFIER = new StaticWarningCode('UNDEFINED_IDENTIFIER', 67, "Undefined name '%s'");
 
   /**
    * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
@@ -2435,7 +2668,7 @@
    *
    * @param name the name of the requested named parameter
    */
-  static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCode('UNDEFINED_NAMED_PARAMETER', 65, "The named parameter '%s' is not defined");
+  static final StaticWarningCode UNDEFINED_NAMED_PARAMETER = new StaticWarningCode('UNDEFINED_NAMED_PARAMETER', 68, "The named parameter '%s' is not defined");
 
   /**
    * 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs
@@ -2450,7 +2683,7 @@
    * @param setterName the name of the getter
    * @param enclosingType the name of the enclosing type where the setter is being looked for
    */
-  static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEFINED_SETTER', 66, "There is no such setter '%s' in '%s'");
+  static final StaticWarningCode UNDEFINED_SETTER = new StaticWarningCode('UNDEFINED_SETTER', 69, "There is no such setter '%s' in '%s'");
 
   /**
    * 12.15.3 Static Invocation: It is a static warning if <i>C</i> does not declare a static method
@@ -2459,8 +2692,79 @@
    * @param methodName the name of the method
    * @param enclosingType the name of the enclosing type where the method is being looked for
    */
-  static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticWarningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 67, "There is no such static method '%s' in '%s'");
-  static final List<StaticWarningCode> values = [AMBIGUOUS_IMPORT, ARGUMENT_TYPE_NOT_ASSIGNABLE, ASSIGNMENT_TO_FINAL, CASE_BLOCK_NOT_TERMINATED, CAST_TO_NON_TYPE, COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE, COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE, COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR, COMMENT_REFERENCE_UNDECLARED_IDENTIFIER, COMMENT_REFERENCE_URI_NOT_LIBRARY, CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, CONST_WITH_ABSTRACT_CLASS, EQUAL_KEYS_IN_MAP, EXPORT_DUPLICATED_LIBRARY_NAME, EXTRA_POSITIONAL_ARGUMENTS, FIELD_INITIALIZER_NOT_ASSIGNABLE, FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, FINAL_NOT_INITIALIZED, IMPORT_DUPLICATED_LIBRARY_NAME, INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, INVALID_FACTORY_NAME, INVALID_GETTER_OVERRIDE_RETURN_TYPE, INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, INVALID_METHOD_OVERRIDE_RETURN_TYPE, INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, INVOCATION_OF_NON_FUNCTION, MISMATCHED_GETTER_AND_SETTER_TYPES, NEW_WITH_ABSTRACT_CLASS, NEW_WITH_NON_TYPE, NEW_WITH_UNDEFINED_CONSTRUCTOR, NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, NON_TYPE_IN_CATCH_CLAUSE, NON_VOID_RETURN_FOR_OPERATOR, NON_VOID_RETURN_FOR_SETTER, NOT_A_TYPE, NOT_ENOUGH_REQUIRED_ARGUMENTS, PART_OF_DIFFERENT_LIBRARY, REDIRECT_TO_INVALID_FUNCTION_TYPE, REDIRECT_TO_INVALID_RETURN_TYPE, REDIRECT_TO_MISSING_CONSTRUCTOR, REDIRECT_TO_NON_CLASS, RETURN_WITHOUT_VALUE, STATIC_ACCESS_TO_INSTANCE_MEMBER, SWITCH_EXPRESSION_NOT_ASSIGNABLE, TYPE_TEST_NON_TYPE, TYPE_PARAMETER_REFERENCED_BY_STATIC, TYPE_VARIABLE_IN_STATIC_SCOPE, UNDEFINED_CLASS, UNDEFINED_CLASS_BOOLEAN, UNDEFINED_GETTER, UNDEFINED_IDENTIFIER, UNDEFINED_NAMED_PARAMETER, UNDEFINED_SETTER, UNDEFINED_STATIC_METHOD_OR_GETTER];
+  static final StaticWarningCode UNDEFINED_STATIC_METHOD_OR_GETTER = new StaticWarningCode('UNDEFINED_STATIC_METHOD_OR_GETTER', 70, "There is no such static method '%s' in '%s'");
+  static final List<StaticWarningCode> values = [
+      AMBIGUOUS_IMPORT,
+      ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      ASSIGNMENT_TO_FINAL,
+      ASSIGNMENT_TO_METHOD,
+      CASE_BLOCK_NOT_TERMINATED,
+      CAST_TO_NON_TYPE,
+      COMMENT_REFERENCE_CONSTRUCTOR_NOT_VISIBLE,
+      COMMENT_REFERENCE_IDENTIFIER_NOT_VISIBLE,
+      COMMENT_REFERENCE_UNDECLARED_CONSTRUCTOR,
+      COMMENT_REFERENCE_UNDECLARED_IDENTIFIER,
+      COMMENT_REFERENCE_URI_NOT_LIBRARY,
+      CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
+      CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
+      CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
+      CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
+      CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
+      CONST_WITH_ABSTRACT_CLASS,
+      EQUAL_KEYS_IN_MAP,
+      EXPORT_DUPLICATED_LIBRARY_NAME,
+      EXTRA_POSITIONAL_ARGUMENTS,
+      FIELD_INITIALIZER_NOT_ASSIGNABLE,
+      FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
+      FINAL_NOT_INITIALIZED,
+      IMPORT_DUPLICATED_LIBRARY_NAME,
+      INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD,
+      INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC,
+      INVALID_GETTER_OVERRIDE_RETURN_TYPE,
+      INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE,
+      INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE,
+      INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE,
+      INVALID_METHOD_OVERRIDE_RETURN_TYPE,
+      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
+      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
+      INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
+      LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      MAP_KEY_TYPE_NOT_ASSIGNABLE,
+      MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+      MISMATCHED_GETTER_AND_SETTER_TYPES,
+      NEW_WITH_ABSTRACT_CLASS,
+      NEW_WITH_INVALID_TYPE_PARAMETERS,
+      NEW_WITH_NON_TYPE,
+      NEW_WITH_UNDEFINED_CONSTRUCTOR,
+      NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+      NON_TYPE_IN_CATCH_CLAUSE,
+      NON_VOID_RETURN_FOR_OPERATOR,
+      NON_VOID_RETURN_FOR_SETTER,
+      NOT_A_TYPE,
+      NOT_ENOUGH_REQUIRED_ARGUMENTS,
+      PART_OF_DIFFERENT_LIBRARY,
+      REDIRECT_TO_INVALID_FUNCTION_TYPE,
+      REDIRECT_TO_INVALID_RETURN_TYPE,
+      REDIRECT_TO_MISSING_CONSTRUCTOR,
+      REDIRECT_TO_NON_CLASS,
+      RETURN_WITHOUT_VALUE,
+      STATIC_ACCESS_TO_INSTANCE_MEMBER,
+      SWITCH_EXPRESSION_NOT_ASSIGNABLE,
+      TYPE_TEST_NON_TYPE,
+      TYPE_PARAMETER_REFERENCED_BY_STATIC,
+      TYPE_VARIABLE_IN_STATIC_SCOPE,
+      UNDEFINED_CLASS,
+      UNDEFINED_CLASS_BOOLEAN,
+      UNDEFINED_GETTER,
+      UNDEFINED_IDENTIFIER,
+      UNDEFINED_NAMED_PARAMETER,
+      UNDEFINED_SETTER,
+      UNDEFINED_STATIC_METHOD_OR_GETTER];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -2642,6 +2946,11 @@
    * 12.15.3 Static Invocation: It is a static type warning if the type <i>F</i> of <i>C.m</i> may
    * not be assigned to a function type.
    *
+   * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
+   * <i>super.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;
+   * x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. If <i>S.m</i> exists, it is a static warning if the type
+   * <i>F</i> of <i>S.m</i> may not be assigned to a function type.
+   *
    * @param nonFunctionIdentifier the name of the identifier that is not a function type
    */
   static final StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION = new StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION', 3, "'%s' is not a method");
@@ -2672,12 +2981,6 @@
   static final StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT = new StaticTypeWarningCode('NON_TYPE_AS_TYPE_ARGUMENT', 6, "The name '%s' is not a type and cannot be used as a parameterized type");
 
   /**
-   * 7.6.2 Factories: It is a static type warning if any of the type arguments to <i>k'</i> are not
-   * subtypes of the bounds of the corresponding formal type parameters of type.
-   */
-  static final StaticTypeWarningCode REDIRECT_WITH_INVALID_TYPE_PARAMETERS = new StaticTypeWarningCode('REDIRECT_WITH_INVALID_TYPE_PARAMETERS', 7, "");
-
-  /**
    * 13.11 Return: It is a static type warning if the type of <i>e</i> may not be assigned to the
    * declared return type of the immediately enclosing function.
    *
@@ -2685,7 +2988,7 @@
    * @param expectedReturnType the expected return type as defined by the method
    * @param methodName the name of the method
    */
-  static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarningCode('RETURN_OF_INVALID_TYPE', 8, "The return type '%s' is not a '%s', as defined by the method '%s'");
+  static final StaticTypeWarningCode RETURN_OF_INVALID_TYPE = new StaticTypeWarningCode('RETURN_OF_INVALID_TYPE', 7, "The return type '%s' is not a '%s', as defined by the method '%s'");
 
   /**
    * 12.11 Instance Creation: It is a static type warning if any of the type arguments to a
@@ -2703,11 +3006,14 @@
    * static type warning if <i>A<sub>i</sub></i> is not a subtype of <i>[A<sub>1</sub>, &hellip;,
    * A<sub>n</sub>/T<sub>1</sub>, &hellip;, T<sub>n</sub>]B<sub>i</sub>, 1 &lt;= i &lt;= n</i>.
    *
+   * 7.6.2 Factories: It is a static type warning if any of the type arguments to <i>k'</i> are not
+   * subtypes of the bounds of the corresponding formal type parameters of type.
+   *
    * @param boundedTypeName the name of the type used in the instance creation that should be
    *          limited by the bound as specified in the class declaration
    * @param boundingTypeName the name of the bounding type
    */
-  static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new StaticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 9, "'%s' does not extend '%s'");
+  static final StaticTypeWarningCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS = new StaticTypeWarningCode('TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', 8, "'%s' does not extend '%s'");
 
   /**
    * Specification reference needed. This is equivalent to [UNDEFINED_METHOD], but for
@@ -2715,7 +3021,7 @@
    *
    * @param methodName the name of the method that is undefined
    */
-  static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningCode('UNDEFINED_FUNCTION', 10, "The function '%s' is not defined");
+  static final StaticTypeWarningCode UNDEFINED_FUNCTION = new StaticTypeWarningCode('UNDEFINED_FUNCTION', 9, "The function '%s' is not defined");
 
   /**
    * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is a static type
@@ -2724,7 +3030,7 @@
    * @param getterName the name of the getter
    * @param enclosingType the name of the enclosing type where the getter is being looked for
    */
-  static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCode('UNDEFINED_GETTER', 11, "There is no such getter '%s' in '%s'");
+  static final StaticTypeWarningCode UNDEFINED_GETTER = new StaticTypeWarningCode('UNDEFINED_GETTER', 10, "There is no such getter '%s' in '%s'");
 
   /**
    * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>. It is a static type
@@ -2733,7 +3039,7 @@
    * @param methodName the name of the method that is undefined
    * @param typeName the resolved type name that the method lookup is happening on
    */
-  static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCode('UNDEFINED_METHOD', 12, "The method '%s' is not defined for the class '%s'");
+  static final StaticTypeWarningCode UNDEFINED_METHOD = new StaticTypeWarningCode('UNDEFINED_METHOD', 11, "The method '%s' is not defined for the class '%s'");
 
   /**
    * 12.18 Assignment: Evaluation of an assignment of the form
@@ -2751,7 +3057,7 @@
    * @param operator the name of the operator
    * @param enclosingType the name of the enclosing type where the operator is being looked for
    */
-  static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningCode('UNDEFINED_OPERATOR', 13, "There is no such operator '%s' in '%s'");
+  static final StaticTypeWarningCode UNDEFINED_OPERATOR = new StaticTypeWarningCode('UNDEFINED_OPERATOR', 12, "There is no such operator '%s' in '%s'");
 
   /**
    * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
@@ -2761,7 +3067,7 @@
    * @param enclosingType the name of the enclosing type where the setter is being looked for
    * @see #INACCESSIBLE_SETTER
    */
-  static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCode('UNDEFINED_SETTER', 14, "There is no such setter '%s' in '%s'");
+  static final StaticTypeWarningCode UNDEFINED_SETTER = new StaticTypeWarningCode('UNDEFINED_SETTER', 13, "There is no such setter '%s' in '%s'");
 
   /**
    * 12.15.4 Super Invocation: A super method invocation <i>i</i> has the form
@@ -2772,7 +3078,7 @@
    * @param methodName the name of the method that is undefined
    * @param typeName the resolved type name that the method lookup is happening on
    */
-  static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarningCode('UNDEFINED_SUPER_METHOD', 15, "There is no such method '%s' in '%s'");
+  static final StaticTypeWarningCode UNDEFINED_SUPER_METHOD = new StaticTypeWarningCode('UNDEFINED_SUPER_METHOD', 14, "There is no such method '%s' in '%s'");
 
   /**
    * 15.8 Parameterized Types: It is a static type warning if <i>G</i> is not a generic type with
@@ -2784,8 +3090,24 @@
    * @see CompileTimeErrorCode#CONST_WITH_INVALID_TYPE_PARAMETERS
    * @see CompileTimeErrorCode#NEW_WITH_INVALID_TYPE_PARAMETERS
    */
-  static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new StaticTypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 16, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
-  static final List<StaticTypeWarningCode> values = [INACCESSIBLE_SETTER, INCONSISTENT_METHOD_INHERITANCE, INVALID_ASSIGNMENT, INVOCATION_OF_NON_FUNCTION, NON_BOOL_CONDITION, NON_BOOL_EXPRESSION, NON_TYPE_AS_TYPE_ARGUMENT, REDIRECT_WITH_INVALID_TYPE_PARAMETERS, RETURN_OF_INVALID_TYPE, TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, UNDEFINED_FUNCTION, UNDEFINED_GETTER, UNDEFINED_METHOD, UNDEFINED_OPERATOR, UNDEFINED_SETTER, UNDEFINED_SUPER_METHOD, WRONG_NUMBER_OF_TYPE_ARGUMENTS];
+  static final StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS = new StaticTypeWarningCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS', 15, "The type '%s' is declared with %d type parameters, but %d type arguments were given");
+  static final List<StaticTypeWarningCode> values = [
+      INACCESSIBLE_SETTER,
+      INCONSISTENT_METHOD_INHERITANCE,
+      INVALID_ASSIGNMENT,
+      INVOCATION_OF_NON_FUNCTION,
+      NON_BOOL_CONDITION,
+      NON_BOOL_EXPRESSION,
+      NON_TYPE_AS_TYPE_ARGUMENT,
+      RETURN_OF_INVALID_TYPE,
+      TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
+      UNDEFINED_FUNCTION,
+      UNDEFINED_GETTER,
+      UNDEFINED_METHOD,
+      UNDEFINED_OPERATOR,
+      UNDEFINED_SETTER,
+      UNDEFINED_SUPER_METHOD,
+      WRONG_NUMBER_OF_TYPE_ARGUMENTS];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
diff --git a/pkg/analyzer_experimental/lib/src/generated/html.dart b/pkg/analyzer_experimental/lib/src/generated/html.dart
index 2db1eab..c0e83c9 100644
--- a/pkg/analyzer_experimental/lib/src/generated/html.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/html.dart
@@ -534,7 +534,7 @@
   }
   void scan() {
     bool inBrackets = false;
-    bool passThrough = false;
+    String endPassThrough = null;
     int c = advance();
     while (c >= 0) {
       int start = offset;
@@ -606,7 +606,7 @@
             String tag = _tail.lexeme;
             for (String str in _passThroughElements) {
               if (str == tag) {
-                passThrough = true;
+                endPassThrough = "</${str}>";
                 break;
               }
             }
@@ -616,14 +616,39 @@
         emit2(TokenType.GT, start);
         inBrackets = false;
         c = advance();
-        if (passThrough) {
-          while (c >= 0 && (c != 0x3C || peek() != 0x2F)) {
+        if (endPassThrough != null) {
+          bool endFound = false;
+          int len = endPassThrough.length;
+          int firstC = endPassThrough.codeUnitAt(0);
+          int index = 0;
+          int nextC = firstC;
+          while (c >= 0) {
+            if (c == nextC) {
+              index++;
+              if (index == len) {
+                endFound = true;
+                break;
+              }
+              nextC = endPassThrough.codeUnitAt(index);
+            } else if (c == firstC) {
+              index = 1;
+              nextC = endPassThrough.codeUnitAt(1);
+            } else {
+              index = 0;
+              nextC = firstC;
+            }
             c = recordStartOfLineAndAdvance(c);
           }
           if (start + 1 < offset) {
-            emit3(TokenType.TEXT, start + 1, -1);
+            if (endFound) {
+              emit3(TokenType.TEXT, start + 1, -len);
+              emit2(TokenType.LT_SLASH, offset - len + 1);
+              emit3(TokenType.TAG, offset - len + 3, -1);
+            } else {
+              emit3(TokenType.TEXT, start + 1, -1);
+            }
           }
-          passThrough = false;
+          endPassThrough = null;
         }
       } else if (c == 0x2F && peek() == 0x3E) {
         advance();
@@ -916,7 +941,19 @@
   static final TokenType STRING = new TokenType('STRING', 9, null);
   static final TokenType TAG = new TokenType('TAG', 10, null);
   static final TokenType TEXT = new TokenType('TEXT', 11, null);
-  static final List<TokenType> values = [EOF, EQ, GT, LT_SLASH, LT, SLASH_GT, COMMENT, DECLARATION, DIRECTIVE, STRING, TAG, TEXT];
+  static final List<TokenType> values = [
+      EOF,
+      EQ,
+      GT,
+      LT_SLASH,
+      LT,
+      SLASH_GT,
+      COMMENT,
+      DECLARATION,
+      DIRECTIVE,
+      STRING,
+      TAG,
+      TEXT];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
diff --git a/pkg/analyzer_experimental/lib/src/generated/parser.dart b/pkg/analyzer_experimental/lib/src/generated/parser.dart
index f2d2c16..16b9b5a 100644
--- a/pkg/analyzer_experimental/lib/src/generated/parser.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/parser.dart
@@ -779,7 +779,11 @@
       return true;
     }
     if (matches(Keyword.CONST)) {
-      return !matchesAny(peek(), [TokenType.LT, TokenType.OPEN_CURLY_BRACKET, TokenType.OPEN_SQUARE_BRACKET, TokenType.INDEX]);
+      return !matchesAny(peek(), [
+          TokenType.LT,
+          TokenType.OPEN_CURLY_BRACKET,
+          TokenType.OPEN_SQUARE_BRACKET,
+          TokenType.INDEX]);
     }
     Token token = skipTypeName(_currentToken);
     if (token == null) {
@@ -860,6 +864,25 @@
   }
 
   /**
+   * Return `true` if the given token appears to be the first token of a type name that is
+   * followed by a variable or field formal parameter.
+   *
+   * @param startToken the first token of the sequence being checked
+   * @return `true` if there is a type name and variable starting at the given token
+   */
+  bool isTypedIdentifier(Token startToken) {
+    Token token = skipReturnType(startToken);
+    if (token == null) {
+      return false;
+    } else if (matchesIdentifier2(token)) {
+      return true;
+    } else if (matches3(token, Keyword.THIS) && matches4(token.next, TokenType.PERIOD) && matchesIdentifier2(token.next.next)) {
+      return true;
+    }
+    return false;
+  }
+
+  /**
    * Compare the given tokens to find the token that appears first in the source being parsed. That
    * is, return the left-most of all of the tokens. The arguments are allowed to be `null`.
    * Return the token with the smallest offset, or `null` if there are no arguments or if all
@@ -1504,9 +1527,9 @@
     if (withClause != null && extendsClause == null) {
       reportError8(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []);
     }
+    NativeClause nativeClause = null;
     if (matches2(_NATIVE) && matches4(peek(), TokenType.STRING)) {
-      advance();
-      advance();
+      nativeClause = parseNativeClause();
     }
     Token leftBracket = null;
     List<ClassMember> members = null;
@@ -1520,7 +1543,9 @@
       rightBracket = createSyntheticToken2(TokenType.CLOSE_CURLY_BRACKET);
       reportError7(ParserErrorCode.MISSING_CLASS_BODY, []);
     }
-    return new ClassDeclaration.full(commentAndMetadata.comment, commentAndMetadata.metadata, abstractKeyword, keyword, name, typeParameters, extendsClause, withClause, implementsClause, leftBracket, members, rightBracket);
+    ClassDeclaration classDeclaration = new ClassDeclaration.full(commentAndMetadata.comment, commentAndMetadata.metadata, abstractKeyword, keyword, name, typeParameters, extendsClause, withClause, implementsClause, leftBracket, members, rightBracket);
+    classDeclaration.nativeClause = nativeClause;
+    return classDeclaration;
   }
 
   /**
@@ -1550,7 +1575,10 @@
       } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
         validateModifiersForOperator(modifiers);
         return parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType);
-      } else if (matchesIdentifier() && matchesAny(peek(), [TokenType.OPEN_PAREN, TokenType.OPEN_CURLY_BRACKET, TokenType.FUNCTION])) {
+      } else if (matchesIdentifier() && matchesAny(peek(), [
+          TokenType.OPEN_PAREN,
+          TokenType.OPEN_CURLY_BRACKET,
+          TokenType.FUNCTION])) {
         validateModifiersForGetterOrSetterOrMethod(modifiers);
         return parseMethodDeclaration(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, returnType);
       } else {
@@ -2008,7 +2036,10 @@
       } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
         reportError8(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
         return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType));
-      } else if (matchesIdentifier() && matchesAny(peek(), [TokenType.OPEN_PAREN, TokenType.OPEN_CURLY_BRACKET, TokenType.FUNCTION])) {
+      } else if (matchesIdentifier() && matchesAny(peek(), [
+          TokenType.OPEN_PAREN,
+          TokenType.OPEN_CURLY_BRACKET,
+          TokenType.FUNCTION])) {
         validateModifiersForTopLevelFunction(modifiers);
         return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
       } else {
@@ -2040,7 +2071,7 @@
       return new TopLevelVariableDeclaration.full(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON));
     }
     TypeName returnType = parseReturnType();
-    if (matches(Keyword.GET) || matches(Keyword.SET)) {
+    if ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) {
       validateModifiersForTopLevelFunction(modifiers);
       return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
     } else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
@@ -2060,7 +2091,10 @@
       variables.add(new VariableDeclaration.full(null, null, createSyntheticIdentifier(), null, null));
       return new TopLevelVariableDeclaration.full(commentAndMetadata.comment, commentAndMetadata.metadata, new VariableDeclarationList.full(null, null, null, returnType, variables), semicolon);
     }
-    if (matchesAny(peek(), [TokenType.OPEN_PAREN, TokenType.FUNCTION, TokenType.OPEN_CURLY_BRACKET])) {
+    if (matchesAny(peek(), [
+        TokenType.OPEN_PAREN,
+        TokenType.FUNCTION,
+        TokenType.OPEN_CURLY_BRACKET])) {
       validateModifiersForTopLevelFunction(modifiers);
       return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
     }
@@ -2143,6 +2177,9 @@
       separator = andAdvance;
       redirectedConstructor = parseConstructorName();
       body = new EmptyFunctionBody.full(expect2(TokenType.SEMICOLON));
+      if (factoryKeyword == null) {
+        reportError(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []);
+      }
     } else {
       body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
       if (constKeyword != null && factoryKeyword != null) {
@@ -2517,13 +2554,13 @@
     TypeName type = null;
     if (matches(Keyword.FINAL) || matches(Keyword.CONST)) {
       keyword = andAdvance;
-      if (matchesIdentifier2(peek()) || matches4(peek(), TokenType.LT) || matches3(peek(), Keyword.THIS) || (matches4(peek(), TokenType.PERIOD) && matchesIdentifier2(peek2(2)) && (matchesIdentifier2(peek2(3)) || matches4(peek2(3), TokenType.LT) || matches3(peek2(3), Keyword.THIS)))) {
+      if (isTypedIdentifier(_currentToken)) {
         type = parseTypeName();
       }
     } else if (matches(Keyword.VAR)) {
       keyword = andAdvance;
     } else {
-      if (matchesIdentifier2(peek()) || matches4(peek(), TokenType.LT) || matches3(peek(), Keyword.THIS) || (matches4(peek(), TokenType.PERIOD) && matchesIdentifier2(peek2(2)) && (matchesIdentifier2(peek2(3)) || matches4(peek2(3), TokenType.LT) || matches3(peek2(3), Keyword.THIS)))) {
+      if (isTypedIdentifier(_currentToken)) {
         type = parseReturnType();
       } else if (!optional) {
         reportError7(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
@@ -3229,6 +3266,12 @@
    * @return the list literal that was parsed
    */
   ListLiteral parseListLiteral(Token modifier, TypeArgumentList typeArguments) {
+    if (typeArguments != null) {
+      int num = typeArguments.arguments.length;
+      if (num != 1) {
+        reportError(ParserErrorCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, typeArguments, [num]);
+      }
+    }
     if (matches5(TokenType.INDEX)) {
       BeginToken leftBracket = new BeginToken(TokenType.OPEN_SQUARE_BRACKET, _currentToken.offset);
       Token rightBracket = new Token(TokenType.CLOSE_SQUARE_BRACKET, _currentToken.offset + 1);
@@ -3528,6 +3571,22 @@
   }
 
   /**
+   * Parse a class native clause.
+   *
+   * <pre>
+   * classNativeClause ::=
+   *     'native' name
+   * </pre>
+   *
+   * @return the class native clause that was parsed
+   */
+  NativeClause parseNativeClause() {
+    Token keyword = andAdvance;
+    StringLiteral name = parseStringLiteral();
+    return new NativeClause.full(keyword, name);
+  }
+
+  /**
    * Parse a new expression.
    *
    * <pre>
@@ -3602,7 +3661,10 @@
         return parseVariableDeclarationStatement(commentAndMetadata);
       } else if (identical(keyword, Keyword.VOID)) {
         TypeName returnType = parseReturnType();
-        if (matchesIdentifier() && matchesAny(peek(), [TokenType.OPEN_PAREN, TokenType.OPEN_CURLY_BRACKET, TokenType.FUNCTION])) {
+        if (matchesIdentifier() && matchesAny(peek(), [
+            TokenType.OPEN_PAREN,
+            TokenType.OPEN_CURLY_BRACKET,
+            TokenType.FUNCTION])) {
           return parseFunctionDeclarationStatement2(commentAndMetadata, returnType);
         } else {
           if (matchesIdentifier()) {
@@ -3617,7 +3679,11 @@
           return new EmptyStatement.full(createSyntheticToken2(TokenType.SEMICOLON));
         }
       } else if (identical(keyword, Keyword.CONST)) {
-        if (matchesAny(peek(), [TokenType.LT, TokenType.OPEN_CURLY_BRACKET, TokenType.OPEN_SQUARE_BRACKET, TokenType.INDEX])) {
+        if (matchesAny(peek(), [
+            TokenType.LT,
+            TokenType.OPEN_CURLY_BRACKET,
+            TokenType.OPEN_SQUARE_BRACKET,
+            TokenType.INDEX])) {
           return new ExpressionStatement.full(parseExpression2(), expect2(TokenType.SEMICOLON));
         } else if (matches4(peek(), TokenType.IDENTIFIER)) {
           Token afterType = skipTypeName(peek());
@@ -3692,8 +3758,12 @@
       }
     }
     TypeName type = holder.type;
-    if (type != null && matches3(type.name.beginToken, Keyword.VOID)) {
-      reportError8(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
+    if (type != null) {
+      if (matches3(type.name.beginToken, Keyword.VOID)) {
+        reportError8(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
+      } else if (holder.keyword != null && matches3(holder.keyword, Keyword.VAR)) {
+        reportError8(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []);
+      }
     }
     if (thisKeyword != null) {
       return new FieldFormalParameter.full(commentAndMetadata.comment, commentAndMetadata.metadata, holder.keyword, holder.type, thisKeyword, period, identifier, null);
@@ -4714,6 +4784,9 @@
    * @return the variable declaration list that was parsed
    */
   VariableDeclarationList parseVariableDeclarationList2(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
+    if (type != null && keyword != null && matches3(keyword, Keyword.VAR)) {
+      reportError8(ParserErrorCode.VAR_AND_TYPE, keyword, []);
+    }
     List<VariableDeclaration> variables = new List<VariableDeclaration>();
     variables.add(parseVariableDeclaration());
     while (matches5(TokenType.COMMA)) {
@@ -4941,7 +5014,10 @@
     if (matches4(next, TokenType.CLOSE_PAREN)) {
       return next.next;
     }
-    if (matchesAny(next, [TokenType.AT, TokenType.OPEN_SQUARE_BRACKET, TokenType.OPEN_CURLY_BRACKET]) || matches3(next, Keyword.VOID) || (matchesIdentifier2(next) && (matchesAny(next.next, [TokenType.COMMA, TokenType.CLOSE_PAREN])))) {
+    if (matchesAny(next, [
+        TokenType.AT,
+        TokenType.OPEN_SQUARE_BRACKET,
+        TokenType.OPEN_CURLY_BRACKET]) || matches3(next, Keyword.VOID) || (matchesIdentifier2(next) && (matchesAny(next.next, [TokenType.COMMA, TokenType.CLOSE_PAREN])))) {
       return skipPastMatchingToken(startToken);
     }
     if (matchesIdentifier2(next) && matches4(next.next, TokenType.OPEN_PAREN)) {
@@ -5682,103 +5758,232 @@
   static final ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = new ParserErrorCode.con2('EXPECTED_LIST_OR_MAP_LITERAL', 24, "Expected a list or map literal");
   static final ParserErrorCode EXPECTED_STRING_LITERAL = new ParserErrorCode.con2('EXPECTED_STRING_LITERAL', 25, "Expected a string literal");
   static final ParserErrorCode EXPECTED_TOKEN = new ParserErrorCode.con2('EXPECTED_TOKEN', 26, "Expected to find '%s'");
-  static final ParserErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = new ParserErrorCode.con2('EXPECTED_TWO_MAP_TYPE_ARGUMENTS', 27, "Map literal requires exactly two type arguments or none, but %d found");
-  static final ParserErrorCode EXPECTED_TYPE_NAME = new ParserErrorCode.con2('EXPECTED_TYPE_NAME', 28, "Expected a type name");
-  static final ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new ParserErrorCode.con2('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 29, "Export directives must preceed part directives");
-  static final ParserErrorCode EXTERNAL_AFTER_CONST = new ParserErrorCode.con2('EXTERNAL_AFTER_CONST', 30, "The modifier 'external' should be before the modifier 'const'");
-  static final ParserErrorCode EXTERNAL_AFTER_FACTORY = new ParserErrorCode.con2('EXTERNAL_AFTER_FACTORY', 31, "The modifier 'external' should be before the modifier 'factory'");
-  static final ParserErrorCode EXTERNAL_AFTER_STATIC = new ParserErrorCode.con2('EXTERNAL_AFTER_STATIC', 32, "The modifier 'external' should be before the modifier 'static'");
-  static final ParserErrorCode EXTERNAL_CLASS = new ParserErrorCode.con2('EXTERNAL_CLASS', 33, "Classes cannot be declared to be 'external'");
-  static final ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_CONSTRUCTOR_WITH_BODY', 34, "External constructors cannot have a body");
-  static final ParserErrorCode EXTERNAL_FIELD = new ParserErrorCode.con2('EXTERNAL_FIELD', 35, "Fields cannot be declared to be 'external'");
-  static final ParserErrorCode EXTERNAL_GETTER_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_GETTER_WITH_BODY', 36, "External getters cannot have a body");
-  static final ParserErrorCode EXTERNAL_METHOD_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_METHOD_WITH_BODY', 37, "External methods cannot have a body");
-  static final ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_OPERATOR_WITH_BODY', 38, "External operators cannot have a body");
-  static final ParserErrorCode EXTERNAL_SETTER_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_SETTER_WITH_BODY', 39, "External setters cannot have a body");
-  static final ParserErrorCode EXTERNAL_TYPEDEF = new ParserErrorCode.con2('EXTERNAL_TYPEDEF', 40, "Type aliases cannot be declared to be 'external'");
-  static final ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = new ParserErrorCode.con2('FACTORY_TOP_LEVEL_DECLARATION', 41, "Top-level declarations cannot be declared to be 'factory'");
-  static final ParserErrorCode FACTORY_WITHOUT_BODY = new ParserErrorCode.con2('FACTORY_WITHOUT_BODY', 42, "A non-redirecting 'factory' constructor must have a body");
-  static final ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new ParserErrorCode.con2('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 43, "Field initializers can only be used in a constructor");
-  static final ParserErrorCode FINAL_AND_VAR = new ParserErrorCode.con2('FINAL_AND_VAR', 44, "Members cannot be declared to be both 'final' and 'var'");
-  static final ParserErrorCode FINAL_CLASS = new ParserErrorCode.con2('FINAL_CLASS', 45, "Classes cannot be declared to be 'final'");
-  static final ParserErrorCode FINAL_CONSTRUCTOR = new ParserErrorCode.con2('FINAL_CONSTRUCTOR', 46, "A constructor cannot be declared to be 'final'");
-  static final ParserErrorCode FINAL_METHOD = new ParserErrorCode.con2('FINAL_METHOD', 47, "Getters, setters and methods cannot be declared to be 'final'");
-  static final ParserErrorCode FINAL_TYPEDEF = new ParserErrorCode.con2('FINAL_TYPEDEF', 48, "Type aliases cannot be declared to be 'final'");
-  static final ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = new ParserErrorCode.con2('FUNCTION_TYPED_PARAMETER_VAR', 49, "Function typed parameters cannot specify 'const', 'final' or 'var' instead of return type");
-  static final ParserErrorCode GETTER_WITH_PARAMETERS = new ParserErrorCode.con2('GETTER_WITH_PARAMETERS', 50, "Getter should be declared without a parameter list");
-  static final ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = new ParserErrorCode.con2('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 51, "Illegal assignment to non-assignable expression");
-  static final ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = new ParserErrorCode.con2('IMPLEMENTS_BEFORE_EXTENDS', 52, "The extends clause must be before the implements clause");
-  static final ParserErrorCode IMPLEMENTS_BEFORE_WITH = new ParserErrorCode.con2('IMPLEMENTS_BEFORE_WITH', 53, "The with clause must be before the implements clause");
-  static final ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new ParserErrorCode.con2('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 54, "Import directives must preceed part directives");
-  static final ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = new ParserErrorCode.con2('INITIALIZED_VARIABLE_IN_FOR_EACH', 55, "The loop variable in a for-each loop cannot be initialized");
-  static final ParserErrorCode INVALID_CODE_POINT = new ParserErrorCode.con2('INVALID_CODE_POINT', 56, "The escape sequence '%s' is not a valid code point");
-  static final ParserErrorCode INVALID_COMMENT_REFERENCE = new ParserErrorCode.con2('INVALID_COMMENT_REFERENCE', 57, "Comment references should contain a possibly prefixed identifier and can start with 'new', but should not contain anything else");
-  static final ParserErrorCode INVALID_HEX_ESCAPE = new ParserErrorCode.con2('INVALID_HEX_ESCAPE', 58, "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits");
-  static final ParserErrorCode INVALID_OPERATOR = new ParserErrorCode.con2('INVALID_OPERATOR', 59, "The string '%s' is not a valid operator");
-  static final ParserErrorCode INVALID_OPERATOR_FOR_SUPER = new ParserErrorCode.con2('INVALID_OPERATOR_FOR_SUPER', 60, "The operator '%s' cannot be used with 'super'");
-  static final ParserErrorCode INVALID_UNICODE_ESCAPE = new ParserErrorCode.con2('INVALID_UNICODE_ESCAPE', 61, "An escape sequence starting with '\\u' must be followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'");
-  static final ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = new ParserErrorCode.con2('LIBRARY_DIRECTIVE_NOT_FIRST', 62, "The library directive must appear before all other directives");
-  static final ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = new ParserErrorCode.con2('LOCAL_FUNCTION_DECLARATION_MODIFIER', 63, "Local function declarations cannot specify any modifier");
-  static final ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = new ParserErrorCode.con2('MISSING_ASSIGNABLE_SELECTOR', 64, "Missing selector such as \".<identifier>\" or \"[0]\"");
-  static final ParserErrorCode MISSING_CATCH_OR_FINALLY = new ParserErrorCode.con2('MISSING_CATCH_OR_FINALLY', 65, "A try statement must have either a catch or finally clause");
-  static final ParserErrorCode MISSING_CLASS_BODY = new ParserErrorCode.con2('MISSING_CLASS_BODY', 66, "A class definition must have a body, even if it is empty");
-  static final ParserErrorCode MISSING_CLOSING_PARENTHESIS = new ParserErrorCode.con2('MISSING_CLOSING_PARENTHESIS', 67, "The closing parenthesis is missing");
-  static final ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = new ParserErrorCode.con2('MISSING_CONST_FINAL_VAR_OR_TYPE', 68, "Variables must be declared using the keywords 'const', 'final', 'var' or a type name");
-  static final ParserErrorCode MISSING_EXPRESSION_IN_THROW = new ParserErrorCode.con2('MISSING_EXPRESSION_IN_THROW', 69, "Throw expressions must compute the object to be thrown");
-  static final ParserErrorCode MISSING_FUNCTION_BODY = new ParserErrorCode.con2('MISSING_FUNCTION_BODY', 70, "A function body must be provided");
-  static final ParserErrorCode MISSING_FUNCTION_PARAMETERS = new ParserErrorCode.con2('MISSING_FUNCTION_PARAMETERS', 71, "Functions must have an explicit list of parameters");
-  static final ParserErrorCode MISSING_IDENTIFIER = new ParserErrorCode.con2('MISSING_IDENTIFIER', 72, "Expected an identifier");
-  static final ParserErrorCode MISSING_KEYWORD_OPERATOR = new ParserErrorCode.con2('MISSING_KEYWORD_OPERATOR', 73, "Operator declarations must be preceeded by the keyword 'operator'");
-  static final ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = new ParserErrorCode.con2('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 74, "Library directives must include a library name");
-  static final ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = new ParserErrorCode.con2('MISSING_NAME_IN_PART_OF_DIRECTIVE', 75, "Library directives must include a library name");
-  static final ParserErrorCode MISSING_STATEMENT = new ParserErrorCode.con2('MISSING_STATEMENT', 76, "Expected a statement");
-  static final ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 77, "There is no '%s' to close the parameter group");
-  static final ParserErrorCode MISSING_TYPEDEF_PARAMETERS = new ParserErrorCode.con2('MISSING_TYPEDEF_PARAMETERS', 78, "Type aliases for functions must have an explicit list of parameters");
-  static final ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = new ParserErrorCode.con2('MISSING_VARIABLE_IN_FOR_EACH', 79, "A loop variable must be declared in a for-each loop before the 'in', but none were found");
-  static final ParserErrorCode MIXED_PARAMETER_GROUPS = new ParserErrorCode.con2('MIXED_PARAMETER_GROUPS', 80, "Cannot have both positional and named parameters in a single parameter list");
-  static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.con2('MULTIPLE_EXTENDS_CLAUSES', 81, "Each class definition can have at most one extends clause");
-  static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode.con2('MULTIPLE_IMPLEMENTS_CLAUSES', 82, "Each class definition can have at most one implements clause");
-  static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode.con2('MULTIPLE_LIBRARY_DIRECTIVES', 83, "Only one library directive may be declared in a file");
-  static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserErrorCode.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 84, "Cannot have multiple groups of named parameters in a single parameter list");
-  static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode.con2('MULTIPLE_PART_OF_DIRECTIVES', 85, "Only one part-of directive may be declared in a file");
-  static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new ParserErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 86, "Cannot have multiple groups of positional parameters in a single parameter list");
-  static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorCode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 87, "A single loop variable must be declared in a for-each loop before the 'in', but %s were found");
-  static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2('MULTIPLE_WITH_CLAUSES', 88, "Each class definition can have at most one with clause");
-  static final ParserErrorCode NAMED_FUNCTION_EXPRESSION = new ParserErrorCode.con2('NAMED_FUNCTION_EXPRESSION', 89, "Function expressions cannot be named");
-  static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCode.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 90, "Named parameters must be enclosed in curly braces ('{' and '}')");
-  static final ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = new ParserErrorCode.con2('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 91, "Native functions can only be declared in the SDK and code that is loaded through native extensions");
-  static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con2('NON_CONSTRUCTOR_FACTORY', 92, "Only constructors can be declared to be a 'factory'");
-  static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode.con2('NON_IDENTIFIER_LIBRARY_NAME', 93, "The name of a library must be an identifier");
-  static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCode.con2('NON_PART_OF_DIRECTIVE_IN_PART', 94, "The part-of directive must be the only directive in a part");
-  static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode.con2('NON_USER_DEFINABLE_OPERATOR', 95, "The operator '%s' is not user definable");
-  static final ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = new ParserErrorCode.con2('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 96, "Normal parameters must occur before optional parameters");
-  static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserErrorCode.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 97, "Positional arguments must occur before named arguments");
-  static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserErrorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 98, "Positional parameters must be enclosed in square brackets ('[' and ']')");
-  static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('STATIC_AFTER_CONST', 99, "The modifier 'static' should be before the modifier 'const'");
-  static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('STATIC_AFTER_FINAL', 100, "The modifier 'static' should be before the modifier 'final'");
-  static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STATIC_AFTER_VAR', 101, "The modifier 'static' should be before the modifier 'var'");
-  static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('STATIC_CONSTRUCTOR', 102, "Constructors cannot be static");
-  static final ParserErrorCode STATIC_GETTER_WITHOUT_BODY = new ParserErrorCode.con2('STATIC_GETTER_WITHOUT_BODY', 103, "A 'static' getter must have a body");
-  static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATIC_OPERATOR', 104, "Operators cannot be static");
-  static final ParserErrorCode STATIC_SETTER_WITHOUT_BODY = new ParserErrorCode.con2('STATIC_SETTER_WITHOUT_BODY', 105, "A 'static' setter must have a body");
-  static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCode.con2('STATIC_TOP_LEVEL_DECLARATION', 106, "Top-level declarations cannot be declared to be 'static'");
-  static final ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = new ParserErrorCode.con2('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 107, "The 'default' case should be the last case in a switch statement");
-  static final ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = new ParserErrorCode.con2('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 108, "The 'default' case can only be declared once");
-  static final ParserErrorCode TOP_LEVEL_OPERATOR = new ParserErrorCode.con2('TOP_LEVEL_OPERATOR', 109, "Operators must be declared within a class");
-  static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 110, "There is no '%s' to open a parameter group");
-  static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEXPECTED_TOKEN', 111, "Unexpected token '%s'");
-  static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('WITH_BEFORE_EXTENDS', 112, "The extends clause must be before the with clause");
-  static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2('WITH_WITHOUT_EXTENDS', 113, "The with clause cannot be used without an extends clause");
-  static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserErrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 114, "The default value of a named parameter should be preceeded by ':'");
-  static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new ParserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 115, "The default value of a positional parameter should be preceeded by '='");
-  static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 116, "Expected '%s' to close parameter group");
-  static final ParserErrorCode VAR_AS_TYPE_NAME = new ParserErrorCode.con2('VAR_AS_TYPE_NAME', 117, "The keyword 'var' cannot be used as a type name");
-  static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS', 118, "Classes cannot be declared to be 'var'");
-  static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_RETURN_TYPE', 119, "The return type cannot be 'var'");
-  static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPEDEF', 120, "Type aliases cannot be declared to be 'var'");
-  static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_PARAMETER', 121, "Parameters cannot have a type of 'void'");
-  static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VARIABLE', 122, "Variables cannot have a type of 'void'");
-  static final List<ParserErrorCode> values = [ABSTRACT_CLASS_MEMBER, ABSTRACT_STATIC_METHOD, ABSTRACT_TOP_LEVEL_FUNCTION, ABSTRACT_TOP_LEVEL_VARIABLE, ABSTRACT_TYPEDEF, BREAK_OUTSIDE_OF_LOOP, CONST_AND_FINAL, CONST_AND_VAR, CONST_CLASS, CONST_CONSTRUCTOR_WITH_BODY, CONST_FACTORY, CONST_METHOD, CONST_TYPEDEF, CONSTRUCTOR_WITH_RETURN_TYPE, CONTINUE_OUTSIDE_OF_LOOP, CONTINUE_WITHOUT_LABEL_IN_CASE, DEPRECATED_ARGUMENT_DEFINITION_TEST, DIRECTIVE_AFTER_DECLARATION, DUPLICATE_LABEL_IN_SWITCH_STATEMENT, DUPLICATED_MODIFIER, EQUALITY_CANNOT_BE_EQUALITY_OPERAND, EXPECTED_CASE_OR_DEFAULT, EXPECTED_CLASS_MEMBER, EXPECTED_EXECUTABLE, EXPECTED_LIST_OR_MAP_LITERAL, EXPECTED_STRING_LITERAL, EXPECTED_TOKEN, EXPECTED_TWO_MAP_TYPE_ARGUMENTS, EXPECTED_TYPE_NAME, EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, EXTERNAL_AFTER_CONST, EXTERNAL_AFTER_FACTORY, EXTERNAL_AFTER_STATIC, EXTERNAL_CLASS, EXTERNAL_CONSTRUCTOR_WITH_BODY, EXTERNAL_FIELD, EXTERNAL_GETTER_WITH_BODY, EXTERNAL_METHOD_WITH_BODY, EXTERNAL_OPERATOR_WITH_BODY, EXTERNAL_SETTER_WITH_BODY, EXTERNAL_TYPEDEF, FACTORY_TOP_LEVEL_DECLARATION, FACTORY_WITHOUT_BODY, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FINAL_AND_VAR, FINAL_CLASS, FINAL_CONSTRUCTOR, FINAL_METHOD, FINAL_TYPEDEF, FUNCTION_TYPED_PARAMETER_VAR, GETTER_WITH_PARAMETERS, ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, IMPLEMENTS_BEFORE_EXTENDS, IMPLEMENTS_BEFORE_WITH, IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, INITIALIZED_VARIABLE_IN_FOR_EACH, INVALID_CODE_POINT, INVALID_COMMENT_REFERENCE, INVALID_HEX_ESCAPE, INVALID_OPERATOR, INVALID_OPERATOR_FOR_SUPER, INVALID_UNICODE_ESCAPE, LIBRARY_DIRECTIVE_NOT_FIRST, LOCAL_FUNCTION_DECLARATION_MODIFIER, MISSING_ASSIGNABLE_SELECTOR, MISSING_CATCH_OR_FINALLY, MISSING_CLASS_BODY, MISSING_CLOSING_PARENTHESIS, MISSING_CONST_FINAL_VAR_OR_TYPE, MISSING_EXPRESSION_IN_THROW, MISSING_FUNCTION_BODY, MISSING_FUNCTION_PARAMETERS, MISSING_IDENTIFIER, MISSING_KEYWORD_OPERATOR, MISSING_NAME_IN_LIBRARY_DIRECTIVE, MISSING_NAME_IN_PART_OF_DIRECTIVE, MISSING_STATEMENT, MISSING_TERMINATOR_FOR_PARAMETER_GROUP, MISSING_TYPEDEF_PARAMETERS, MISSING_VARIABLE_IN_FOR_EACH, MIXED_PARAMETER_GROUPS, MULTIPLE_EXTENDS_CLAUSES, MULTIPLE_IMPLEMENTS_CLAUSES, MULTIPLE_LIBRARY_DIRECTIVES, MULTIPLE_NAMED_PARAMETER_GROUPS, MULTIPLE_PART_OF_DIRECTIVES, MULTIPLE_POSITIONAL_PARAMETER_GROUPS, MULTIPLE_VARIABLES_IN_FOR_EACH, MULTIPLE_WITH_CLAUSES, NAMED_FUNCTION_EXPRESSION, NAMED_PARAMETER_OUTSIDE_GROUP, NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, NON_CONSTRUCTOR_FACTORY, NON_IDENTIFIER_LIBRARY_NAME, NON_PART_OF_DIRECTIVE_IN_PART, NON_USER_DEFINABLE_OPERATOR, NORMAL_BEFORE_OPTIONAL_PARAMETERS, POSITIONAL_AFTER_NAMED_ARGUMENT, POSITIONAL_PARAMETER_OUTSIDE_GROUP, STATIC_AFTER_CONST, STATIC_AFTER_FINAL, STATIC_AFTER_VAR, STATIC_CONSTRUCTOR, STATIC_GETTER_WITHOUT_BODY, STATIC_OPERATOR, STATIC_SETTER_WITHOUT_BODY, STATIC_TOP_LEVEL_DECLARATION, SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, SWITCH_HAS_MULTIPLE_DEFAULT_CASES, TOP_LEVEL_OPERATOR, UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, UNEXPECTED_TOKEN, WITH_BEFORE_EXTENDS, WITH_WITHOUT_EXTENDS, WRONG_SEPARATOR_FOR_NAMED_PARAMETER, WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, WRONG_TERMINATOR_FOR_PARAMETER_GROUP, VAR_AS_TYPE_NAME, VAR_CLASS, VAR_RETURN_TYPE, VAR_TYPEDEF, VOID_PARAMETER, VOID_VARIABLE];
+  static final ParserErrorCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS = new ParserErrorCode.con2('EXPECTED_ONE_LIST_TYPE_ARGUMENTS', 27, "List literal requires exactly one type arguments or none, but %d found");
+  static final ParserErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS = new ParserErrorCode.con2('EXPECTED_TWO_MAP_TYPE_ARGUMENTS', 28, "Map literal requires exactly two type arguments or none, but %d found");
+  static final ParserErrorCode EXPECTED_TYPE_NAME = new ParserErrorCode.con2('EXPECTED_TYPE_NAME', 29, "Expected a type name");
+  static final ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new ParserErrorCode.con2('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 30, "Export directives must preceed part directives");
+  static final ParserErrorCode EXTERNAL_AFTER_CONST = new ParserErrorCode.con2('EXTERNAL_AFTER_CONST', 31, "The modifier 'external' should be before the modifier 'const'");
+  static final ParserErrorCode EXTERNAL_AFTER_FACTORY = new ParserErrorCode.con2('EXTERNAL_AFTER_FACTORY', 32, "The modifier 'external' should be before the modifier 'factory'");
+  static final ParserErrorCode EXTERNAL_AFTER_STATIC = new ParserErrorCode.con2('EXTERNAL_AFTER_STATIC', 33, "The modifier 'external' should be before the modifier 'static'");
+  static final ParserErrorCode EXTERNAL_CLASS = new ParserErrorCode.con2('EXTERNAL_CLASS', 34, "Classes cannot be declared to be 'external'");
+  static final ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_CONSTRUCTOR_WITH_BODY', 35, "External constructors cannot have a body");
+  static final ParserErrorCode EXTERNAL_FIELD = new ParserErrorCode.con2('EXTERNAL_FIELD', 36, "Fields cannot be declared to be 'external'");
+  static final ParserErrorCode EXTERNAL_GETTER_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_GETTER_WITH_BODY', 37, "External getters cannot have a body");
+  static final ParserErrorCode EXTERNAL_METHOD_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_METHOD_WITH_BODY', 38, "External methods cannot have a body");
+  static final ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_OPERATOR_WITH_BODY', 39, "External operators cannot have a body");
+  static final ParserErrorCode EXTERNAL_SETTER_WITH_BODY = new ParserErrorCode.con2('EXTERNAL_SETTER_WITH_BODY', 40, "External setters cannot have a body");
+  static final ParserErrorCode EXTERNAL_TYPEDEF = new ParserErrorCode.con2('EXTERNAL_TYPEDEF', 41, "Type aliases cannot be declared to be 'external'");
+  static final ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = new ParserErrorCode.con2('FACTORY_TOP_LEVEL_DECLARATION', 42, "Top-level declarations cannot be declared to be 'factory'");
+  static final ParserErrorCode FACTORY_WITHOUT_BODY = new ParserErrorCode.con2('FACTORY_WITHOUT_BODY', 43, "A non-redirecting 'factory' constructor must have a body");
+  static final ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new ParserErrorCode.con2('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 44, "Field initializers can only be used in a constructor");
+  static final ParserErrorCode FINAL_AND_VAR = new ParserErrorCode.con2('FINAL_AND_VAR', 45, "Members cannot be declared to be both 'final' and 'var'");
+  static final ParserErrorCode FINAL_CLASS = new ParserErrorCode.con2('FINAL_CLASS', 46, "Classes cannot be declared to be 'final'");
+  static final ParserErrorCode FINAL_CONSTRUCTOR = new ParserErrorCode.con2('FINAL_CONSTRUCTOR', 47, "A constructor cannot be declared to be 'final'");
+  static final ParserErrorCode FINAL_METHOD = new ParserErrorCode.con2('FINAL_METHOD', 48, "Getters, setters and methods cannot be declared to be 'final'");
+  static final ParserErrorCode FINAL_TYPEDEF = new ParserErrorCode.con2('FINAL_TYPEDEF', 49, "Type aliases cannot be declared to be 'final'");
+  static final ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = new ParserErrorCode.con2('FUNCTION_TYPED_PARAMETER_VAR', 50, "Function typed parameters cannot specify 'const', 'final' or 'var' instead of return type");
+  static final ParserErrorCode GETTER_WITH_PARAMETERS = new ParserErrorCode.con2('GETTER_WITH_PARAMETERS', 51, "Getter should be declared without a parameter list");
+  static final ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = new ParserErrorCode.con2('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 52, "Illegal assignment to non-assignable expression");
+  static final ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = new ParserErrorCode.con2('IMPLEMENTS_BEFORE_EXTENDS', 53, "The extends clause must be before the implements clause");
+  static final ParserErrorCode IMPLEMENTS_BEFORE_WITH = new ParserErrorCode.con2('IMPLEMENTS_BEFORE_WITH', 54, "The with clause must be before the implements clause");
+  static final ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new ParserErrorCode.con2('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 55, "Import directives must preceed part directives");
+  static final ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = new ParserErrorCode.con2('INITIALIZED_VARIABLE_IN_FOR_EACH', 56, "The loop variable in a for-each loop cannot be initialized");
+  static final ParserErrorCode INVALID_CODE_POINT = new ParserErrorCode.con2('INVALID_CODE_POINT', 57, "The escape sequence '%s' is not a valid code point");
+  static final ParserErrorCode INVALID_COMMENT_REFERENCE = new ParserErrorCode.con2('INVALID_COMMENT_REFERENCE', 58, "Comment references should contain a possibly prefixed identifier and can start with 'new', but should not contain anything else");
+  static final ParserErrorCode INVALID_HEX_ESCAPE = new ParserErrorCode.con2('INVALID_HEX_ESCAPE', 59, "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits");
+  static final ParserErrorCode INVALID_OPERATOR = new ParserErrorCode.con2('INVALID_OPERATOR', 60, "The string '%s' is not a valid operator");
+  static final ParserErrorCode INVALID_OPERATOR_FOR_SUPER = new ParserErrorCode.con2('INVALID_OPERATOR_FOR_SUPER', 61, "The operator '%s' cannot be used with 'super'");
+  static final ParserErrorCode INVALID_UNICODE_ESCAPE = new ParserErrorCode.con2('INVALID_UNICODE_ESCAPE', 62, "An escape sequence starting with '\\u' must be followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'");
+  static final ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = new ParserErrorCode.con2('LIBRARY_DIRECTIVE_NOT_FIRST', 63, "The library directive must appear before all other directives");
+  static final ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = new ParserErrorCode.con2('LOCAL_FUNCTION_DECLARATION_MODIFIER', 64, "Local function declarations cannot specify any modifier");
+  static final ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = new ParserErrorCode.con2('MISSING_ASSIGNABLE_SELECTOR', 65, "Missing selector such as \".<identifier>\" or \"[0]\"");
+  static final ParserErrorCode MISSING_CATCH_OR_FINALLY = new ParserErrorCode.con2('MISSING_CATCH_OR_FINALLY', 66, "A try statement must have either a catch or finally clause");
+  static final ParserErrorCode MISSING_CLASS_BODY = new ParserErrorCode.con2('MISSING_CLASS_BODY', 67, "A class definition must have a body, even if it is empty");
+  static final ParserErrorCode MISSING_CLOSING_PARENTHESIS = new ParserErrorCode.con2('MISSING_CLOSING_PARENTHESIS', 68, "The closing parenthesis is missing");
+  static final ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = new ParserErrorCode.con2('MISSING_CONST_FINAL_VAR_OR_TYPE', 69, "Variables must be declared using the keywords 'const', 'final', 'var' or a type name");
+  static final ParserErrorCode MISSING_EXPRESSION_IN_THROW = new ParserErrorCode.con2('MISSING_EXPRESSION_IN_THROW', 70, "Throw expressions must compute the object to be thrown");
+  static final ParserErrorCode MISSING_FUNCTION_BODY = new ParserErrorCode.con2('MISSING_FUNCTION_BODY', 71, "A function body must be provided");
+  static final ParserErrorCode MISSING_FUNCTION_PARAMETERS = new ParserErrorCode.con2('MISSING_FUNCTION_PARAMETERS', 72, "Functions must have an explicit list of parameters");
+  static final ParserErrorCode MISSING_IDENTIFIER = new ParserErrorCode.con2('MISSING_IDENTIFIER', 73, "Expected an identifier");
+  static final ParserErrorCode MISSING_KEYWORD_OPERATOR = new ParserErrorCode.con2('MISSING_KEYWORD_OPERATOR', 74, "Operator declarations must be preceeded by the keyword 'operator'");
+  static final ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = new ParserErrorCode.con2('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 75, "Library directives must include a library name");
+  static final ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = new ParserErrorCode.con2('MISSING_NAME_IN_PART_OF_DIRECTIVE', 76, "Library directives must include a library name");
+  static final ParserErrorCode MISSING_STATEMENT = new ParserErrorCode.con2('MISSING_STATEMENT', 77, "Expected a statement");
+  static final ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 78, "There is no '%s' to close the parameter group");
+  static final ParserErrorCode MISSING_TYPEDEF_PARAMETERS = new ParserErrorCode.con2('MISSING_TYPEDEF_PARAMETERS', 79, "Type aliases for functions must have an explicit list of parameters");
+  static final ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = new ParserErrorCode.con2('MISSING_VARIABLE_IN_FOR_EACH', 80, "A loop variable must be declared in a for-each loop before the 'in', but none were found");
+  static final ParserErrorCode MIXED_PARAMETER_GROUPS = new ParserErrorCode.con2('MIXED_PARAMETER_GROUPS', 81, "Cannot have both positional and named parameters in a single parameter list");
+  static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.con2('MULTIPLE_EXTENDS_CLAUSES', 82, "Each class definition can have at most one extends clause");
+  static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode.con2('MULTIPLE_IMPLEMENTS_CLAUSES', 83, "Each class definition can have at most one implements clause");
+  static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode.con2('MULTIPLE_LIBRARY_DIRECTIVES', 84, "Only one library directive may be declared in a file");
+  static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserErrorCode.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 85, "Cannot have multiple groups of named parameters in a single parameter list");
+  static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode.con2('MULTIPLE_PART_OF_DIRECTIVES', 86, "Only one part-of directive may be declared in a file");
+  static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new ParserErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 87, "Cannot have multiple groups of positional parameters in a single parameter list");
+  static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorCode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 88, "A single loop variable must be declared in a for-each loop before the 'in', but %s were found");
+  static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2('MULTIPLE_WITH_CLAUSES', 89, "Each class definition can have at most one with clause");
+  static final ParserErrorCode NAMED_FUNCTION_EXPRESSION = new ParserErrorCode.con2('NAMED_FUNCTION_EXPRESSION', 90, "Function expressions cannot be named");
+  static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCode.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 91, "Named parameters must be enclosed in curly braces ('{' and '}')");
+  static final ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = new ParserErrorCode.con2('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 92, "Native functions can only be declared in the SDK and code that is loaded through native extensions");
+  static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con2('NON_CONSTRUCTOR_FACTORY', 93, "Only constructors can be declared to be a 'factory'");
+  static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode.con2('NON_IDENTIFIER_LIBRARY_NAME', 94, "The name of a library must be an identifier");
+  static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCode.con2('NON_PART_OF_DIRECTIVE_IN_PART', 95, "The part-of directive must be the only directive in a part");
+  static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode.con2('NON_USER_DEFINABLE_OPERATOR', 96, "The operator '%s' is not user definable");
+  static final ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = new ParserErrorCode.con2('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 97, "Normal parameters must occur before optional parameters");
+  static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserErrorCode.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 98, "Positional arguments must occur before named arguments");
+  static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserErrorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 99, "Positional parameters must be enclosed in square brackets ('[' and ']')");
+  static final ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = new ParserErrorCode.con2('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 100, "Only factory constructor can specify '=' redirection.");
+  static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('STATIC_AFTER_CONST', 101, "The modifier 'static' should be before the modifier 'const'");
+  static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('STATIC_AFTER_FINAL', 102, "The modifier 'static' should be before the modifier 'final'");
+  static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STATIC_AFTER_VAR', 103, "The modifier 'static' should be before the modifier 'var'");
+  static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('STATIC_CONSTRUCTOR', 104, "Constructors cannot be static");
+  static final ParserErrorCode STATIC_GETTER_WITHOUT_BODY = new ParserErrorCode.con2('STATIC_GETTER_WITHOUT_BODY', 105, "A 'static' getter must have a body");
+  static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATIC_OPERATOR', 106, "Operators cannot be static");
+  static final ParserErrorCode STATIC_SETTER_WITHOUT_BODY = new ParserErrorCode.con2('STATIC_SETTER_WITHOUT_BODY', 107, "A 'static' setter must have a body");
+  static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCode.con2('STATIC_TOP_LEVEL_DECLARATION', 108, "Top-level declarations cannot be declared to be 'static'");
+  static final ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = new ParserErrorCode.con2('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 109, "The 'default' case should be the last case in a switch statement");
+  static final ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = new ParserErrorCode.con2('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 110, "The 'default' case can only be declared once");
+  static final ParserErrorCode TOP_LEVEL_OPERATOR = new ParserErrorCode.con2('TOP_LEVEL_OPERATOR', 111, "Operators must be declared within a class");
+  static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 112, "There is no '%s' to open a parameter group");
+  static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEXPECTED_TOKEN', 113, "Unexpected token '%s'");
+  static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('WITH_BEFORE_EXTENDS', 114, "The extends clause must be before the with clause");
+  static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2('WITH_WITHOUT_EXTENDS', 115, "The with clause cannot be used without an extends clause");
+  static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserErrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 116, "The default value of a named parameter should be preceeded by ':'");
+  static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new ParserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 117, "The default value of a positional parameter should be preceeded by '='");
+  static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new ParserErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 118, "Expected '%s' to close parameter group");
+  static final ParserErrorCode VAR_AND_TYPE = new ParserErrorCode.con2('VAR_AND_TYPE', 119, "Variables cannot be declared using both 'var' and a type name; remove the 'var'");
+  static final ParserErrorCode VAR_AS_TYPE_NAME = new ParserErrorCode.con2('VAR_AS_TYPE_NAME', 120, "The keyword 'var' cannot be used as a type name");
+  static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS', 121, "Classes cannot be declared to be 'var'");
+  static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_RETURN_TYPE', 122, "The return type cannot be 'var'");
+  static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPEDEF', 123, "Type aliases cannot be declared to be 'var'");
+  static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_PARAMETER', 124, "Parameters cannot have a type of 'void'");
+  static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VARIABLE', 125, "Variables cannot have a type of 'void'");
+  static final List<ParserErrorCode> values = [
+      ABSTRACT_CLASS_MEMBER,
+      ABSTRACT_STATIC_METHOD,
+      ABSTRACT_TOP_LEVEL_FUNCTION,
+      ABSTRACT_TOP_LEVEL_VARIABLE,
+      ABSTRACT_TYPEDEF,
+      BREAK_OUTSIDE_OF_LOOP,
+      CONST_AND_FINAL,
+      CONST_AND_VAR,
+      CONST_CLASS,
+      CONST_CONSTRUCTOR_WITH_BODY,
+      CONST_FACTORY,
+      CONST_METHOD,
+      CONST_TYPEDEF,
+      CONSTRUCTOR_WITH_RETURN_TYPE,
+      CONTINUE_OUTSIDE_OF_LOOP,
+      CONTINUE_WITHOUT_LABEL_IN_CASE,
+      DEPRECATED_ARGUMENT_DEFINITION_TEST,
+      DIRECTIVE_AFTER_DECLARATION,
+      DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
+      DUPLICATED_MODIFIER,
+      EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
+      EXPECTED_CASE_OR_DEFAULT,
+      EXPECTED_CLASS_MEMBER,
+      EXPECTED_EXECUTABLE,
+      EXPECTED_LIST_OR_MAP_LITERAL,
+      EXPECTED_STRING_LITERAL,
+      EXPECTED_TOKEN,
+      EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
+      EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
+      EXPECTED_TYPE_NAME,
+      EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
+      EXTERNAL_AFTER_CONST,
+      EXTERNAL_AFTER_FACTORY,
+      EXTERNAL_AFTER_STATIC,
+      EXTERNAL_CLASS,
+      EXTERNAL_CONSTRUCTOR_WITH_BODY,
+      EXTERNAL_FIELD,
+      EXTERNAL_GETTER_WITH_BODY,
+      EXTERNAL_METHOD_WITH_BODY,
+      EXTERNAL_OPERATOR_WITH_BODY,
+      EXTERNAL_SETTER_WITH_BODY,
+      EXTERNAL_TYPEDEF,
+      FACTORY_TOP_LEVEL_DECLARATION,
+      FACTORY_WITHOUT_BODY,
+      FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+      FINAL_AND_VAR,
+      FINAL_CLASS,
+      FINAL_CONSTRUCTOR,
+      FINAL_METHOD,
+      FINAL_TYPEDEF,
+      FUNCTION_TYPED_PARAMETER_VAR,
+      GETTER_WITH_PARAMETERS,
+      ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
+      IMPLEMENTS_BEFORE_EXTENDS,
+      IMPLEMENTS_BEFORE_WITH,
+      IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
+      INITIALIZED_VARIABLE_IN_FOR_EACH,
+      INVALID_CODE_POINT,
+      INVALID_COMMENT_REFERENCE,
+      INVALID_HEX_ESCAPE,
+      INVALID_OPERATOR,
+      INVALID_OPERATOR_FOR_SUPER,
+      INVALID_UNICODE_ESCAPE,
+      LIBRARY_DIRECTIVE_NOT_FIRST,
+      LOCAL_FUNCTION_DECLARATION_MODIFIER,
+      MISSING_ASSIGNABLE_SELECTOR,
+      MISSING_CATCH_OR_FINALLY,
+      MISSING_CLASS_BODY,
+      MISSING_CLOSING_PARENTHESIS,
+      MISSING_CONST_FINAL_VAR_OR_TYPE,
+      MISSING_EXPRESSION_IN_THROW,
+      MISSING_FUNCTION_BODY,
+      MISSING_FUNCTION_PARAMETERS,
+      MISSING_IDENTIFIER,
+      MISSING_KEYWORD_OPERATOR,
+      MISSING_NAME_IN_LIBRARY_DIRECTIVE,
+      MISSING_NAME_IN_PART_OF_DIRECTIVE,
+      MISSING_STATEMENT,
+      MISSING_TERMINATOR_FOR_PARAMETER_GROUP,
+      MISSING_TYPEDEF_PARAMETERS,
+      MISSING_VARIABLE_IN_FOR_EACH,
+      MIXED_PARAMETER_GROUPS,
+      MULTIPLE_EXTENDS_CLAUSES,
+      MULTIPLE_IMPLEMENTS_CLAUSES,
+      MULTIPLE_LIBRARY_DIRECTIVES,
+      MULTIPLE_NAMED_PARAMETER_GROUPS,
+      MULTIPLE_PART_OF_DIRECTIVES,
+      MULTIPLE_POSITIONAL_PARAMETER_GROUPS,
+      MULTIPLE_VARIABLES_IN_FOR_EACH,
+      MULTIPLE_WITH_CLAUSES,
+      NAMED_FUNCTION_EXPRESSION,
+      NAMED_PARAMETER_OUTSIDE_GROUP,
+      NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE,
+      NON_CONSTRUCTOR_FACTORY,
+      NON_IDENTIFIER_LIBRARY_NAME,
+      NON_PART_OF_DIRECTIVE_IN_PART,
+      NON_USER_DEFINABLE_OPERATOR,
+      NORMAL_BEFORE_OPTIONAL_PARAMETERS,
+      POSITIONAL_AFTER_NAMED_ARGUMENT,
+      POSITIONAL_PARAMETER_OUTSIDE_GROUP,
+      REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR,
+      STATIC_AFTER_CONST,
+      STATIC_AFTER_FINAL,
+      STATIC_AFTER_VAR,
+      STATIC_CONSTRUCTOR,
+      STATIC_GETTER_WITHOUT_BODY,
+      STATIC_OPERATOR,
+      STATIC_SETTER_WITHOUT_BODY,
+      STATIC_TOP_LEVEL_DECLARATION,
+      SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
+      SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
+      TOP_LEVEL_OPERATOR,
+      UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP,
+      UNEXPECTED_TOKEN,
+      WITH_BEFORE_EXTENDS,
+      WITH_WITHOUT_EXTENDS,
+      WRONG_SEPARATOR_FOR_NAMED_PARAMETER,
+      WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER,
+      WRONG_TERMINATOR_FOR_PARAMETER_GROUP,
+      VAR_AND_TYPE,
+      VAR_AS_TYPE_NAME,
+      VAR_CLASS,
+      VAR_RETURN_TYPE,
+      VAR_TYPEDEF,
+      VOID_PARAMETER,
+      VOID_VARIABLE];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -6312,7 +6517,17 @@
     }
     visit6(node.typeArguments, " ");
     _writer.print("[");
-    visitList5(node.elements, ", ");
+    {
+      NodeList<Expression> elements = node.elements;
+      if (elements.length < 2 || elements.toString().length < 60) {
+        visitList5(elements, ", ");
+      } else {
+        String elementIndent = "${_indentString}    ";
+        _writer.print("\n");
+        _writer.print(elementIndent);
+        visitList5(elements, ",\n${elementIndent}");
+      }
+    }
     _writer.print("]");
     return null;
   }
@@ -6365,6 +6580,11 @@
     visit7(" ", node.expression);
     return null;
   }
+  Object visitNativeClause(NativeClause node) {
+    _writer.print("native ");
+    visit(node.name);
+    return null;
+  }
   Object visitNativeFunctionBody(NativeFunctionBody node) {
     _writer.print("native ");
     visit(node.stringLiteral);
diff --git a/pkg/analyzer_experimental/lib/src/generated/resolver.dart b/pkg/analyzer_experimental/lib/src/generated/resolver.dart
index 555fb9f..8672e0d 100644
--- a/pkg/analyzer_experimental/lib/src/generated/resolver.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/resolver.dart
@@ -2439,7 +2439,7 @@
     node.staticElement = element;
     node.element = element;
     ArgumentList argumentList = node.argumentList;
-    List<ParameterElement> parameters = resolveArgumentsToParameters(false, argumentList, element);
+    List<ParameterElement> parameters = resolveArgumentsToParameters(isInConstConstructor, argumentList, element);
     if (parameters != null) {
       argumentList.correspondingStaticParameters = parameters;
     }
@@ -2754,6 +2754,17 @@
   }
 
   /**
+   * @return `true` iff current enclosing function is constant constructor declaration.
+   */
+  bool get isInConstConstructor {
+    ExecutableElement function = _resolver.enclosingFunction;
+    if (function is ConstructorElement) {
+      return ((function as ConstructorElement)).isConst;
+    }
+    return false;
+  }
+
+  /**
    * Return `true` if the given element is a static element.
    *
    * @param element the element being tested
@@ -4761,7 +4772,7 @@
         _coreLibrary = createLibrary(_coreLibrarySource);
       }
       instrumentation.metric3("createLibrary", "complete");
-      computeLibraryDependencies(targetLibrary);
+      computeLibraryDependencies2(targetLibrary, unit);
       _librariesInCycles = computeLibrariesInCycles(targetLibrary);
       buildElementModels();
       instrumentation.metric3("buildElementModels", "complete");
@@ -5072,9 +5083,49 @@
    */
   void computeLibraryDependencies(Library library) {
     Source librarySource = library.librarySource;
+    computeLibraryDependencies3(library, _analysisContext.computeImportedLibraries(librarySource), _analysisContext.computeExportedLibraries(librarySource));
+  }
+
+  /**
+   * Recursively traverse the libraries reachable from the given library, creating instances of the
+   * class [Library] to represent them, and record the references in the library objects.
+   *
+   * @param library the library to be processed to find libraries that have not yet been traversed
+   * @throws AnalysisException if some portion of the library graph could not be traversed
+   */
+  void computeLibraryDependencies2(Library library, CompilationUnit unit) {
+    Source librarySource = library.librarySource;
+    Set<Source> exportedSources = new Set<Source>();
+    Set<Source> importedSources = new Set<Source>();
+    for (Directive directive in unit.directives) {
+      if (directive is ExportDirective) {
+        Source exportSource = resolveSource(librarySource, (directive as ExportDirective));
+        if (exportSource != null) {
+          javaSetAdd(exportedSources, exportSource);
+        }
+      } else if (directive is ImportDirective) {
+        Source importSource = resolveSource(librarySource, (directive as ImportDirective));
+        if (importSource != null) {
+          javaSetAdd(importedSources, importSource);
+        }
+      }
+    }
+    computeLibraryDependencies3(library, new List.from(importedSources), new List.from(exportedSources));
+  }
+
+  /**
+   * Recursively traverse the libraries reachable from the given library, creating instances of the
+   * class [Library] to represent them, and record the references in the library objects.
+   *
+   * @param library the library to be processed to find libraries that have not yet been traversed
+   * @param importedSources an array containing the sources that are imported into the given library
+   * @param exportedSources an array containing the sources that are exported from the given library
+   * @throws AnalysisException if some portion of the library graph could not be traversed
+   */
+  void computeLibraryDependencies3(Library library, List<Source> importedSources, List<Source> exportedSources) {
     List<Library> importedLibraries = new List<Library>();
     bool explicitlyImportsCore = false;
-    for (Source importedSource in _analysisContext.computeImportedLibraries(librarySource)) {
+    for (Source importedSource in importedSources) {
       if (importedSource == _coreLibrarySource) {
         explicitlyImportsCore = true;
       }
@@ -5091,7 +5142,7 @@
     }
     library.importedLibraries = new List.from(importedLibraries);
     List<Library> exportedLibraries = new List<Library>();
-    for (Source exportedSource in _analysisContext.computeExportedLibraries(librarySource)) {
+    for (Source exportedSource in exportedSources) {
       Library exportedLibrary = _libraryMap[exportedSource];
       if (exportedLibrary == null) {
         exportedLibrary = createLibraryOrNull(exportedSource);
@@ -5246,6 +5297,31 @@
   }
 
   /**
+   * Return the result of resolving the URI of the given URI-based directive against the URI of the
+   * given library, or `null` if the URI is not valid.
+   *
+   * @param librarySource the source representing the library containing the directive
+   * @param directive the directive which URI should be resolved
+   * @return the result of resolving the URI against the URI of the library
+   */
+  Source resolveSource(Source librarySource, UriBasedDirective directive) {
+    StringLiteral uriLiteral = directive.uri;
+    if (uriLiteral is StringInterpolation) {
+      return null;
+    }
+    String uriContent = uriLiteral.stringValue.trim();
+    if (uriContent == null) {
+      return null;
+    }
+    try {
+      parseUriWithException(uriContent);
+      return _analysisContext.sourceFactory.resolveUri(librarySource, uriContent);
+    } on URISyntaxException catch (exception) {
+      return null;
+    }
+  }
+
+  /**
    * Run additional analyses, such as the [ConstantVerifier] and [ErrorVerifier]
    * analysis in the current cycle.
    *
@@ -7163,7 +7239,7 @@
     String methodName = methodNameNode.name;
     if (methodName == "then") {
       Expression target = node.realTarget;
-      Type2 targetType = getBestType(target);
+      Type2 targetType = target == null ? null : getBestType(target);
       if (isAsyncFutureType(targetType)) {
         NodeList<Expression> arguments = node.argumentList.arguments;
         if (arguments.length == 1) {
@@ -8563,7 +8639,7 @@
     ExtendsClause extendsClause = node.extendsClause;
     if (extendsClause != null) {
       ErrorCode errorCode = node.withClause == null ? CompileTimeErrorCode.EXTENDS_NON_CLASS : CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS;
-      superclassType = resolveType(extendsClause.superclass, errorCode);
+      superclassType = resolveType(extendsClause.superclass, errorCode, errorCode);
       if (superclassType != typeProvider.objectType) {
         classElement.validMixin = false;
       }
@@ -8584,7 +8660,8 @@
   Object visitClassTypeAlias(ClassTypeAlias node) {
     super.visitClassTypeAlias(node);
     ClassElementImpl classElement = getClassElement(node.name);
-    InterfaceType superclassType = resolveType(node.superclass, CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS);
+    ErrorCode errorCode = CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS;
+    InterfaceType superclassType = resolveType(node.superclass, errorCode, errorCode);
     if (superclassType == null) {
       superclassType = typeProvider.objectType;
     }
@@ -9000,7 +9077,7 @@
         if (((parent as InstanceCreationExpression)).isConst) {
           return CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS;
         } else {
-          return CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS;
+          return StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS;
         }
       }
     }
@@ -9184,26 +9261,21 @@
    */
   void resolve(ClassElementImpl classElement, WithClause withClause, ImplementsClause implementsClause) {
     if (withClause != null) {
-      List<InterfaceType> mixinTypes = resolveTypes(withClause.mixinTypes, CompileTimeErrorCode.MIXIN_OF_NON_CLASS);
+      List<InterfaceType> mixinTypes = resolveTypes(withClause.mixinTypes, CompileTimeErrorCode.MIXIN_OF_NON_CLASS, CompileTimeErrorCode.MIXIN_OF_NON_CLASS);
       if (classElement != null) {
         classElement.mixins = mixinTypes;
       }
     }
     if (implementsClause != null) {
       NodeList<TypeName> interfaces = implementsClause.interfaces;
-      List<InterfaceType> interfaceTypes = resolveTypes(interfaces, CompileTimeErrorCode.IMPLEMENTS_NON_CLASS);
+      List<InterfaceType> interfaceTypes = resolveTypes(interfaces, CompileTimeErrorCode.IMPLEMENTS_NON_CLASS, CompileTimeErrorCode.IMPLEMENTS_DYNAMIC);
       List<TypeName> typeNames = new List.from(interfaces);
-      String dynamicKeyword = sc.Keyword.DYNAMIC.syntax;
       List<bool> detectedRepeatOnIndex = new List<bool>.filled(typeNames.length, false);
       for (int i = 0; i < detectedRepeatOnIndex.length; i++) {
         detectedRepeatOnIndex[i] = false;
       }
       for (int i = 0; i < typeNames.length; i++) {
         TypeName typeName = typeNames[i];
-        String name = typeName.name.name;
-        if (name == dynamicKeyword) {
-          reportError(CompileTimeErrorCode.IMPLEMENTS_DYNAMIC, typeName, []);
-        }
         if (!detectedRepeatOnIndex[i]) {
           for (int j = i + 1; j < typeNames.length; j++) {
             Element element = typeName.name.element;
@@ -9230,15 +9302,18 @@
    * @param typeName the type name specifying the type to be returned
    * @param nonTypeError the error to produce if the type name is defined to be something other than
    *          a type
+   * @param dynamicTypeError the error to produce if the type name is "dynamic"
    * @return the type specified by the type name
    */
-  InterfaceType resolveType(TypeName typeName, ErrorCode nonTypeError) {
+  InterfaceType resolveType(TypeName typeName, ErrorCode nonTypeError, ErrorCode dynamicTypeError) {
     Type2 type = typeName.type;
     if (type is InterfaceType) {
       return type as InterfaceType;
     }
     Identifier name = typeName.name;
-    if (name.name != sc.Keyword.DYNAMIC.syntax) {
+    if (name.name == sc.Keyword.DYNAMIC.syntax) {
+      reportError(dynamicTypeError, name, [name.name]);
+    } else {
       reportError(nonTypeError, name, [name.name]);
     }
     return null;
@@ -9250,12 +9325,13 @@
    * @param typeNames the type names to be resolved
    * @param nonTypeError the error to produce if the type name is defined to be something other than
    *          a type
+   * @param dynamicTypeError the error to produce if the type name is "dynamic"
    * @return an array containing all of the types that were resolved.
    */
-  List<InterfaceType> resolveTypes(NodeList<TypeName> typeNames, ErrorCode nonTypeError) {
+  List<InterfaceType> resolveTypes(NodeList<TypeName> typeNames, ErrorCode nonTypeError, ErrorCode dynamicTypeError) {
     List<InterfaceType> types = new List<InterfaceType>();
     for (TypeName typeName in typeNames) {
-      InterfaceType type = resolveType(typeName, nonTypeError);
+      InterfaceType type = resolveType(typeName, nonTypeError, dynamicTypeError);
       if (type != null) {
         types.add(type);
       }
@@ -10826,6 +10902,18 @@
   bool _isInCatchClause = false;
 
   /**
+   * This is set to `true` iff the visitor is currently visiting children nodes of an
+   * [InstanceCreationExpression].
+   */
+  bool _isInConstInstanceCreation = false;
+
+  /**
+   * This is set to `true` iff the visitor is currently visiting children nodes of a native
+   * [ClassDeclaration].
+   */
+  bool _isInNativeClass = false;
+
+  /**
    * This is set to `true` iff the visitor is currently visiting a static variable
    * declaration.
    */
@@ -10929,7 +11017,12 @@
     _isInConstructorInitializer = false;
     _isInStaticMethod = false;
     _dynamicType = typeProvider.dynamicType;
-    _DISALLOWED_TYPES_TO_EXTEND_OR_IMPLEMENT = <InterfaceType> [typeProvider.numType, typeProvider.intType, typeProvider.doubleType, typeProvider.boolType, typeProvider.stringType];
+    _DISALLOWED_TYPES_TO_EXTEND_OR_IMPLEMENT = <InterfaceType> [
+        typeProvider.numType,
+        typeProvider.intType,
+        typeProvider.doubleType,
+        typeProvider.boolType,
+        typeProvider.stringType];
   }
   Object visitArgumentDefinitionTest(ArgumentDefinitionTest node) {
     checkForArgumentDefinitionTestNonParameter(node);
@@ -10970,6 +11063,7 @@
   Object visitClassDeclaration(ClassDeclaration node) {
     ClassElement outerClass = _enclosingClass;
     try {
+      _isInNativeClass = node.nativeClause != null;
       _enclosingClass = node.element;
       WithClause withClause = node.withClause;
       ImplementsClause implementsClause = node.implementsClause;
@@ -10998,8 +11092,10 @@
       checkForFinalNotInitialized(node);
       checkForDuplicateDefinitionInheritance();
       checkForConflictingGetterAndMethod();
+      checkImplementsSuperClass(node);
       return super.visitClassDeclaration(node);
     } finally {
+      _isInNativeClass = false;
       _initialFieldElementsMap = null;
       _enclosingClass = outerClass;
     }
@@ -11011,6 +11107,7 @@
     try {
       _enclosingClass = node.element;
       checkForRecursiveInterfaceInheritance(node.element, new List<ClassElement>());
+      checkForTypeAliasCannotReferenceItself_mixin(node);
     } finally {
       _enclosingClass = outerClassElement;
     }
@@ -11035,6 +11132,7 @@
       checkForAllRedirectConstructorErrorCodes(node);
       checkForUndefinedConstructorInInitializerImplicit(node);
       checkForRedirectToNonConstConstructor(node);
+      checkForReturnInGenerativeConstructor(node);
       return super.visitConstructorDeclaration(node);
     } finally {
       _isEnclosingConstructorConst = false;
@@ -11076,6 +11174,7 @@
     _isInStaticVariableDeclaration = node.isStatic;
     _isInInstanceVariableDeclaration = !_isInStaticVariableDeclaration;
     try {
+      checkForAllInvalidOverrideErrorCodes2(node);
       return super.visitFieldDeclaration(node);
     } finally {
       _isInStaticVariableDeclaration = false;
@@ -11129,7 +11228,7 @@
   Object visitFunctionTypeAlias(FunctionTypeAlias node) {
     checkForBuiltInIdentifierAsName(node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
     checkForDefaultValueInFunctionTypeAlias(node);
-    checkForTypeAliasCannotReferenceItself(node);
+    checkForTypeAliasCannotReferenceItself_function(node);
     return super.visitFunctionTypeAlias(node);
   }
   Object visitIfStatement(IfStatement node) {
@@ -11146,21 +11245,26 @@
     return super.visitIndexExpression(node);
   }
   Object visitInstanceCreationExpression(InstanceCreationExpression node) {
-    ConstructorName constructorName = node.constructorName;
-    TypeName typeName = constructorName.type;
-    Type2 type = typeName.type;
-    if (type is InterfaceType) {
-      InterfaceType interfaceType = type as InterfaceType;
-      checkForConstOrNewWithAbstractClass(node, typeName, interfaceType);
-      if (node.isConst) {
-        checkForConstWithNonConst(node);
-        checkForConstWithUndefinedConstructor(node);
-        checkForConstWithTypeParameters(node);
-      } else {
-        checkForNewWithUndefinedConstructor(node);
+    _isInConstInstanceCreation = node.isConst;
+    try {
+      ConstructorName constructorName = node.constructorName;
+      TypeName typeName = constructorName.type;
+      Type2 type = typeName.type;
+      if (type is InterfaceType) {
+        InterfaceType interfaceType = type as InterfaceType;
+        checkForConstOrNewWithAbstractClass(node, typeName, interfaceType);
+        if (_isInConstInstanceCreation) {
+          checkForConstWithNonConst(node);
+          checkForConstWithUndefinedConstructor(node);
+          checkForConstWithTypeParameters(node);
+        } else {
+          checkForNewWithUndefinedConstructor(node);
+        }
       }
+      return super.visitInstanceCreationExpression(node);
+    } finally {
+      _isInConstInstanceCreation = false;
     }
-    return super.visitInstanceCreationExpression(node);
   }
   Object visitListLiteral(ListLiteral node) {
     if (node.modifier != null) {
@@ -11172,6 +11276,7 @@
         }
       }
     }
+    checkForListElementTypeNotAssignable(node);
     return super.visitListLiteral(node);
   }
   Object visitMapLiteral(MapLiteral node) {
@@ -11186,6 +11291,7 @@
       }
     }
     checkForNonConstMapAsExpressionStatement(node);
+    checkForMapTypeNotAssignable(node);
     return super.visitMapLiteral(node);
   }
   Object visitMethodDeclaration(MethodDeclaration node) {
@@ -11214,7 +11320,7 @@
         checkForNonVoidReturnTypeForOperator(node);
       }
       checkForConcreteClassWithAbstractMember(node);
-      checkForAllInvalidOverrideErrorCodes(node);
+      checkForAllInvalidOverrideErrorCodes3(node);
       return super.visitMethodDeclaration(node);
     } finally {
       _enclosingFunction = previousFunction;
@@ -11246,7 +11352,8 @@
     return super.visitPrefixExpression(node);
   }
   Object visitPropertyAccess(PropertyAccess node) {
-    checkForStaticAccessToInstanceMember(node.target, node.propertyName);
+    Expression target = node.realTarget;
+    checkForStaticAccessToInstanceMember(target, node.propertyName);
     return super.visitPropertyAccess(node);
   }
   Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
@@ -11355,6 +11462,9 @@
     if (node.factoryKeyword != null || node.redirectedConstructor != null || node.externalKeyword != null) {
       return false;
     }
+    if (_isInNativeClass) {
+      return false;
+    }
     bool foundError = false;
     Map<FieldElement, INIT_STATE> fieldElementsMap = new Map<FieldElement, INIT_STATE>.from(_initialFieldElementsMap);
     NodeList<FormalParameter> formalParameters = node.parameters.parameters;
@@ -11383,6 +11493,9 @@
     }
     NodeList<ConstructorInitializer> initializers = node.initializers;
     for (ConstructorInitializer constructorInitializer in initializers) {
+      if (constructorInitializer is RedirectingConstructorInvocation) {
+        return false;
+      }
       if (constructorInitializer is ConstructorFieldInitializer) {
         ConstructorFieldInitializer constructorFieldInitializer = constructorInitializer as ConstructorFieldInitializer;
         SimpleIdentifier fieldName = constructorFieldInitializer.fieldName;
@@ -11407,13 +11520,24 @@
         }
       }
     }
+    for (MapEntry<FieldElement, INIT_STATE> entry in getMapEntrySet(fieldElementsMap)) {
+      if (identical(entry.getValue(), INIT_STATE.NOT_INIT)) {
+        FieldElement fieldElement = entry.getKey();
+        if (fieldElement.isFinal || fieldElement.isConst) {
+          _errorReporter.reportError2(StaticWarningCode.FINAL_NOT_INITIALIZED, node.returnType, [fieldElement.name]);
+          foundError = true;
+        }
+      }
+    }
     return foundError;
   }
 
   /**
-   * This checks the passed method declaration against override-error codes.
+   * This checks the passed executable element against override-error codes.
    *
-   * @param node the [MethodDeclaration] to evaluate
+   * @param executableElement the [ExecutableElement] to evaluate
+   * @param parameters the parameters of the executable element
+   * @param errorNameTarget the node to report problems on
    * @return `true` if and only if an error code is generated on the passed node
    * @see StaticWarningCode#INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC
    * @see CompileTimeErrorCode#INVALID_OVERRIDE_REQUIRED
@@ -11427,22 +11551,18 @@
    * @see StaticWarningCode#INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE
    * @see StaticWarningCode#INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES
    */
-  bool checkForAllInvalidOverrideErrorCodes(MethodDeclaration node) {
-    if (_enclosingClass == null || node.isStatic || node.body is NativeFunctionBody) {
-      return false;
-    }
-    ExecutableElement executableElement = node.element;
-    if (executableElement == null) {
-      return false;
-    }
-    SimpleIdentifier methodName = node.name;
-    if (methodName.isSynthetic) {
-      return false;
-    }
-    String methodNameStr = methodName.name;
+  bool checkForAllInvalidOverrideErrorCodes(ExecutableElement executableElement, List<ParameterElement> parameters2, List<ASTNode> parameterLocations, SimpleIdentifier errorNameTarget) {
+    String executableElementName = executableElement.name;
     ExecutableElement overriddenExecutable = _inheritanceManager.lookupInheritance(_enclosingClass, executableElement.name);
+    bool isGetter = false;
+    bool isSetter = false;
+    if (executableElement is PropertyAccessorElement) {
+      PropertyAccessorElement accessorElement = executableElement as PropertyAccessorElement;
+      isGetter = accessorElement.isGetter;
+      isSetter = accessorElement.isSetter;
+    }
     if (overriddenExecutable == null) {
-      if (!node.isGetter && !node.isSetter && !node.isOperator) {
+      if (!isGetter && !isSetter && !executableElement.isOperator) {
         Set<ClassElement> visitedClasses = new Set<ClassElement>();
         InterfaceType superclassType = _enclosingClass.supertype;
         ClassElement superclassElement = superclassType == null ? null : superclassType.element;
@@ -11450,22 +11570,28 @@
           javaSetAdd(visitedClasses, superclassElement);
           List<FieldElement> fieldElts = superclassElement.fields;
           for (FieldElement fieldElt in fieldElts) {
-            if (fieldElt.name == methodNameStr && fieldElt.isStatic) {
-              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, methodName, [methodNameStr, fieldElt.enclosingElement.displayName]);
+            if (fieldElt.name == executableElementName && fieldElt.isStatic) {
+              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
+                  executableElementName,
+                  fieldElt.enclosingElement.displayName]);
               return true;
             }
           }
           List<PropertyAccessorElement> propertyAccessorElts = superclassElement.accessors;
           for (PropertyAccessorElement accessorElt in propertyAccessorElts) {
-            if (accessorElt.name == methodNameStr && accessorElt.isStatic) {
-              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, methodName, [methodNameStr, accessorElt.enclosingElement.displayName]);
+            if (accessorElt.name == executableElementName && accessorElt.isStatic) {
+              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
+                  executableElementName,
+                  accessorElt.enclosingElement.displayName]);
               return true;
             }
           }
           List<MethodElement> methodElements = superclassElement.methods;
           for (MethodElement methodElement in methodElements) {
-            if (methodElement.name == methodNameStr && methodElement.isStatic) {
-              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, methodName, [methodNameStr, methodElement.enclosingElement.displayName]);
+            if (methodElement.name == executableElementName && methodElement.isStatic) {
+              _errorReporter.reportError2(StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, errorNameTarget, [
+                  executableElementName,
+                  methodElement.enclosingElement.displayName]);
               return true;
             }
           }
@@ -11478,7 +11604,7 @@
     FunctionType overridingFT = executableElement.type;
     FunctionType overriddenFT = overriddenExecutable.type;
     InterfaceType enclosingType = _enclosingClass.type;
-    overriddenFT = _inheritanceManager.substituteTypeArgumentsInMemberFromInheritance(overriddenFT, methodNameStr, enclosingType);
+    overriddenFT = _inheritanceManager.substituteTypeArgumentsInMemberFromInheritance(overriddenFT, executableElementName, enclosingType);
     if (overridingFT == null || overriddenFT == null) {
       return false;
     }
@@ -11491,11 +11617,15 @@
     Map<String, Type2> overridingNamedPT = overridingFT.namedParameterTypes;
     Map<String, Type2> overriddenNamedPT = overriddenFT.namedParameterTypes;
     if (overridingNormalPT.length != overriddenNormalPT.length) {
-      _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_REQUIRED, methodName, [overriddenNormalPT.length, overriddenExecutable.enclosingElement.displayName]);
+      _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_REQUIRED, errorNameTarget, [
+          overriddenNormalPT.length,
+          overriddenExecutable.enclosingElement.displayName]);
       return true;
     }
     if (overridingPositionalPT.length < overriddenPositionalPT.length) {
-      _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_POSITIONAL, methodName, [overriddenPositionalPT.length, overriddenExecutable.enclosingElement.displayName]);
+      _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_POSITIONAL, errorNameTarget, [
+          overriddenPositionalPT.length,
+          overriddenExecutable.enclosingElement.displayName]);
       return true;
     }
     Set<String> overridingParameterNameSet = overridingNamedPT.keys.toSet();
@@ -11503,30 +11633,39 @@
     while (overriddenParameterNameIterator.hasNext) {
       String overriddenParamName = overriddenParameterNameIterator.next();
       if (!overridingParameterNameSet.contains(overriddenParamName)) {
-        _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_NAMED, methodName, [overriddenParamName, overriddenExecutable.enclosingElement.displayName]);
+        _errorReporter.reportError2(CompileTimeErrorCode.INVALID_OVERRIDE_NAMED, errorNameTarget, [
+            overriddenParamName,
+            overriddenExecutable.enclosingElement.displayName]);
         return true;
       }
     }
     if (overriddenFTReturnType != VoidTypeImpl.instance && !overridingFTReturnType.isAssignableTo(overriddenFTReturnType)) {
-      _errorReporter.reportError2(!node.isGetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE : StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE, methodName, [overridingFTReturnType.displayName, overriddenFTReturnType.displayName, overriddenExecutable.enclosingElement.displayName]);
+      _errorReporter.reportError2(!isGetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE : StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE, errorNameTarget, [
+          overridingFTReturnType.displayName,
+          overriddenFTReturnType.displayName,
+          overriddenExecutable.enclosingElement.displayName]);
       return true;
     }
-    FormalParameterList formalParameterList = node.parameters;
-    if (formalParameterList == null) {
+    if (parameterLocations == null) {
       return false;
     }
-    NodeList<FormalParameter> parameterNodeList = formalParameterList.parameters;
     int parameterIndex = 0;
     for (int i = 0; i < overridingNormalPT.length; i++) {
       if (!overridingNormalPT[i].isAssignableTo(overriddenNormalPT[i])) {
-        _errorReporter.reportError2(!node.isSetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE : StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, parameterNodeList[parameterIndex], [overridingNormalPT[i].displayName, overriddenNormalPT[i].displayName, overriddenExecutable.enclosingElement.displayName]);
+        _errorReporter.reportError2(!isSetter ? StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE : StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, parameterLocations[parameterIndex], [
+            overridingNormalPT[i].displayName,
+            overriddenNormalPT[i].displayName,
+            overriddenExecutable.enclosingElement.displayName]);
         return true;
       }
       parameterIndex++;
     }
     for (int i = 0; i < overriddenPositionalPT.length; i++) {
       if (!overridingPositionalPT[i].isAssignableTo(overriddenPositionalPT[i])) {
-        _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, parameterNodeList[parameterIndex], [overridingPositionalPT[i].displayName, overriddenPositionalPT[i].displayName, overriddenExecutable.enclosingElement.displayName]);
+        _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, parameterLocations[parameterIndex], [
+            overridingPositionalPT[i].displayName,
+            overriddenPositionalPT[i].displayName,
+            overriddenExecutable.enclosingElement.displayName]);
         return true;
       }
       parameterIndex++;
@@ -11539,32 +11678,35 @@
         continue;
       }
       if (!overriddenNamedPTEntry.getValue().isAssignableTo(overridingType)) {
-        NormalFormalParameter parameterToSelect = null;
-        for (FormalParameter formalParameter in parameterNodeList) {
-          if (formalParameter is DefaultFormalParameter && identical(formalParameter.kind, ParameterKind.NAMED)) {
-            DefaultFormalParameter defaultFormalParameter = formalParameter as DefaultFormalParameter;
-            NormalFormalParameter normalFormalParameter = defaultFormalParameter.parameter;
-            if (overriddenNamedPTEntry.getKey() == normalFormalParameter.identifier.name) {
-              parameterToSelect = normalFormalParameter;
-              break;
-            }
+        ParameterElement parameterToSelect = null;
+        ASTNode parameterLocationToSelect = null;
+        for (int i = 0; i < parameters2.length; i++) {
+          ParameterElement parameter = parameters2[i];
+          if (identical(parameter.parameterKind, ParameterKind.NAMED) && overriddenNamedPTEntry.getKey() == parameter.name) {
+            parameterToSelect = parameter;
+            parameterLocationToSelect = parameterLocations[i];
+            break;
           }
         }
         if (parameterToSelect != null) {
-          _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, parameterToSelect, [overridingType.displayName, overriddenNamedPTEntry.getValue().displayName, overriddenExecutable.enclosingElement.displayName]);
+          _errorReporter.reportError2(StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, parameterLocationToSelect, [
+              overridingType.displayName,
+              overriddenNamedPTEntry.getValue().displayName,
+              overriddenExecutable.enclosingElement.displayName]);
           return true;
         }
       }
     }
     bool foundError = false;
-    List<FormalParameter> formalParameters = new List<FormalParameter>();
+    List<ASTNode> formalParameters = new List<ASTNode>();
     List<ParameterElementImpl> parameterElts = new List<ParameterElementImpl>();
     List<ParameterElementImpl> overriddenParameterElts = new List<ParameterElementImpl>();
     List<ParameterElement> overriddenPEs = overriddenExecutable.parameters;
-    for (FormalParameter formalParameter in parameterNodeList) {
-      if (formalParameter.kind.isOptional) {
-        formalParameters.add(formalParameter);
-        parameterElts.add((formalParameter.element as ParameterElementImpl));
+    for (int i = 0; i < parameters2.length; i++) {
+      ParameterElement parameter = parameters2[i];
+      if (parameter.parameterKind.isOptional) {
+        formalParameters.add(parameterLocations[i]);
+        parameterElts.add((parameter as ParameterElementImpl));
       }
     }
     for (ParameterElement parameterElt in overriddenPEs) {
@@ -11590,7 +11732,10 @@
                 break;
               }
               if (!result.equalValues(overriddenResult)) {
-                _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, formalParameters[i], [overriddenExecutable.enclosingElement.displayName, overriddenExecutable.displayName, parameterName]);
+                _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, formalParameters[i], [
+                    overriddenExecutable.enclosingElement.displayName,
+                    overriddenExecutable.displayName,
+                    parameterName]);
                 foundError = true;
               }
             }
@@ -11609,7 +11754,9 @@
             continue;
           }
           if (!result.equalValues(overriddenResult)) {
-            _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, formalParameters[i], [overriddenExecutable.enclosingElement.displayName, overriddenExecutable.displayName]);
+            _errorReporter.reportError2(StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, formalParameters[i], [
+                overriddenExecutable.enclosingElement.displayName,
+                overriddenExecutable.displayName]);
             foundError = true;
           }
         }
@@ -11619,6 +11766,62 @@
   }
 
   /**
+   * This checks the passed field declaration against override-error codes.
+   *
+   * @param node the [MethodDeclaration] to evaluate
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see #checkForAllInvalidOverrideErrorCodes(ExecutableElement)
+   */
+  bool checkForAllInvalidOverrideErrorCodes2(FieldDeclaration node) {
+    if (_enclosingClass == null || node.isStatic) {
+      return false;
+    }
+    bool hasProblems = false;
+    VariableDeclarationList fields = node.fields;
+    for (VariableDeclaration field in fields.variables) {
+      FieldElement element = field.element as FieldElement;
+      if (element == null) {
+        continue;
+      }
+      PropertyAccessorElement getter = element.getter;
+      PropertyAccessorElement setter = element.setter;
+      SimpleIdentifier fieldName = field.name;
+      if (getter != null) {
+        hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodes(getter, ParameterElementImpl.EMPTY_ARRAY, ASTNode.EMPTY_ARRAY, fieldName));
+      }
+      if (setter != null) {
+        hasProblems = javaBooleanOr(hasProblems, checkForAllInvalidOverrideErrorCodes(setter, setter.parameters, <ASTNode> [fieldName], fieldName));
+      }
+    }
+    return hasProblems;
+  }
+
+  /**
+   * This checks the passed method declaration against override-error codes.
+   *
+   * @param node the [MethodDeclaration] to evaluate
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see #checkForAllInvalidOverrideErrorCodes(ExecutableElement)
+   */
+  bool checkForAllInvalidOverrideErrorCodes3(MethodDeclaration node) {
+    if (_enclosingClass == null || node.isStatic || node.body is NativeFunctionBody) {
+      return false;
+    }
+    ExecutableElement executableElement = node.element;
+    if (executableElement == null) {
+      return false;
+    }
+    SimpleIdentifier methodName = node.name;
+    if (methodName.isSynthetic) {
+      return false;
+    }
+    FormalParameterList formalParameterList = node.parameters;
+    NodeList<FormalParameter> parameterList = formalParameterList != null ? formalParameterList.parameters : null;
+    List<ASTNode> parameters = parameterList != null ? new List.from(parameterList) : null;
+    return checkForAllInvalidOverrideErrorCodes(executableElement, executableElement.parameters, parameters, methodName);
+  }
+
+  /**
    * This verifies that all classes of the passed 'with' clause are valid.
    *
    * @param node the 'with' clause to evaluate
@@ -11749,7 +11952,10 @@
     for (String name in newNames) {
       ExportElement prevElement = _exportedNames[name];
       if (prevElement != null && prevElement != exportElement) {
-        _errorReporter.reportError2(CompileTimeErrorCode.AMBIGUOUS_EXPORT, node, [name, prevElement.exportedLibrary.definingCompilationUnit.displayName, exportedLibrary.definingCompilationUnit.displayName]);
+        _errorReporter.reportError2(CompileTimeErrorCode.AMBIGUOUS_EXPORT, node, [
+            name,
+            prevElement.exportedLibrary.definingCompilationUnit.displayName,
+            exportedLibrary.definingCompilationUnit.displayName]);
         return true;
       } else {
         _exportedNames[name] = exportElement;
@@ -11794,43 +12000,70 @@
   }
 
   /**
-   * This verifies that the passed argument can be assigned to their corresponding parameters.
+   * This verifies that the passed argument can be assigned to its corresponding parameter.
    *
-   * @param node the argument to evaluate
+   * @param argument the argument to evaluate
    * @return `true` if and only if an error code is generated on the passed node
    * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
+   * @see CompileTimeErrorCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
    */
   bool checkForArgumentTypeNotAssignable2(Expression argument) {
     if (argument == null) {
       return false;
     }
+    ErrorCode errorCode;
+    if (_isInConstInstanceCreation || _isEnclosingConstructorConst) {
+      errorCode = CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE;
+    } else {
+      errorCode = StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE;
+    }
     ParameterElement staticParameterElement = argument.staticParameterElement;
     Type2 staticParameterType = staticParameterElement == null ? null : staticParameterElement.type;
-    Type2 staticArgumentType = getStaticType(argument);
-    if (staticArgumentType == null || staticParameterType == null) {
+    ParameterElement propagatedParameterElement = argument.parameterElement;
+    Type2 propagatedParameterType = propagatedParameterElement == null ? null : propagatedParameterElement.type;
+    return checkForArgumentTypeNotAssignable3(argument, staticParameterType, propagatedParameterType, errorCode);
+  }
+
+  /**
+   * This verifies that the passed expression can be assigned to its corresponding parameters.
+   *
+   * @param expression the expression to evaluate
+   * @param expectedStaticType the expected static type
+   * @param expectedPropagatedType the expected propagated type, may be `null`
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see StaticWarningCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
+   * @see CompileTimeErrorCode#ARGUMENT_TYPE_NOT_ASSIGNABLE
+   */
+  bool checkForArgumentTypeNotAssignable3(Expression expression, Type2 expectedStaticType, Type2 expectedPropagatedType, ErrorCode errorCode) {
+    Type2 staticArgumentType = getStaticType(expression);
+    if (staticArgumentType == null || expectedStaticType == null) {
       return false;
     }
     if (_strictMode) {
-      if (staticArgumentType.isAssignableTo(staticParameterType)) {
+      if (staticArgumentType.isAssignableTo(expectedStaticType)) {
         return false;
       }
-      _errorReporter.reportError2(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, argument, [staticArgumentType.displayName, staticParameterType.displayName]);
+      _errorReporter.reportError2(errorCode, expression, [
+          staticArgumentType.displayName,
+          expectedStaticType.displayName]);
       return true;
     }
-    ParameterElement propagatedParameterElement = argument.parameterElement;
-    Type2 propagatedParameterType = propagatedParameterElement == null ? null : propagatedParameterElement.type;
-    Type2 propagatedArgumentType = getPropagatedType(argument);
-    if (propagatedArgumentType == null || propagatedParameterType == null) {
-      if (staticArgumentType.isAssignableTo(staticParameterType)) {
+    Type2 propagatedArgumentType = getPropagatedType(expression);
+    if (propagatedArgumentType == null || expectedPropagatedType == null) {
+      if (staticArgumentType.isAssignableTo(expectedStaticType)) {
         return false;
       }
-      _errorReporter.reportError2(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, argument, [staticArgumentType.displayName, staticParameterType.displayName]);
+      _errorReporter.reportError2(errorCode, expression, [
+          staticArgumentType.displayName,
+          expectedStaticType.displayName]);
       return true;
     }
-    if (staticArgumentType.isAssignableTo(staticParameterType) || staticArgumentType.isAssignableTo(propagatedParameterType) || propagatedArgumentType.isAssignableTo(staticParameterType) || propagatedArgumentType.isAssignableTo(propagatedParameterType)) {
+    if (staticArgumentType.isAssignableTo(expectedStaticType) || staticArgumentType.isAssignableTo(expectedPropagatedType) || propagatedArgumentType.isAssignableTo(expectedStaticType) || propagatedArgumentType.isAssignableTo(expectedPropagatedType)) {
       return false;
     }
-    _errorReporter.reportError2(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, argument, [(propagatedArgumentType == null ? staticArgumentType : propagatedArgumentType).displayName, (propagatedParameterType == null ? staticParameterType : propagatedParameterType).displayName]);
+    _errorReporter.reportError2(errorCode, expression, [
+        (propagatedArgumentType == null ? staticArgumentType : propagatedArgumentType).displayName,
+        (expectedPropagatedType == null ? expectedStaticType : expectedPropagatedType).displayName]);
     return true;
   }
 
@@ -11852,6 +12085,7 @@
    * @param node the expression to evaluate
    * @return `true` if and only if an error code is generated on the passed node
    * @see StaticWarningCode#ASSIGNMENT_TO_FINAL
+   * @see StaticWarningCode#ASSIGNMENT_TO_METHOD
    */
   bool checkForAssignmentToFinal2(Expression expression) {
     Element element = null;
@@ -11877,6 +12111,10 @@
       }
       return false;
     }
+    if (element is MethodElement) {
+      _errorReporter.reportError2(StaticWarningCode.ASSIGNMENT_TO_METHOD, expression, []);
+      return true;
+    }
     return false;
   }
 
@@ -12098,7 +12336,10 @@
         continue;
       }
       hasProblem = true;
-      _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, method.nameOffset, name.length, [_enclosingClass.displayName, inherited.enclosingElement.displayName, name]);
+      _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, method.nameOffset, name.length, [
+          _enclosingClass.displayName,
+          inherited.enclosingElement.displayName,
+          name]);
     }
     for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
       if (!accessor.isGetter) {
@@ -12110,7 +12351,10 @@
         continue;
       }
       hasProblem = true;
-      _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, accessor.nameOffset, name.length, [_enclosingClass.displayName, inherited.enclosingElement.displayName, name]);
+      _errorReporter.reportError3(CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, accessor.nameOffset, name.length, [
+          _enclosingClass.displayName,
+          inherited.enclosingElement.displayName,
+          name]);
     }
     return hasProblem;
   }
@@ -12504,7 +12748,10 @@
     LibraryElement prevLibrary = _nameToExportElement[name];
     if (prevLibrary != null) {
       if (prevLibrary != nodeLibrary) {
-        _errorReporter.reportError2(StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAME, node, [prevLibrary.definingCompilationUnit.displayName, nodeLibrary.definingCompilationUnit.displayName, name]);
+        _errorReporter.reportError2(StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAME, node, [
+            prevLibrary.definingCompilationUnit.displayName,
+            nodeLibrary.definingCompilationUnit.displayName,
+            name]);
         return true;
       }
     } else {
@@ -12631,9 +12878,13 @@
       return false;
     }
     if (_isEnclosingConstructorConst) {
-      _errorReporter.reportError2(CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [(propagatedType == null ? staticType : propagatedType).displayName, fieldType.displayName]);
+      _errorReporter.reportError2(CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [
+          (propagatedType == null ? staticType : propagatedType).displayName,
+          fieldType.displayName]);
     } else {
-      _errorReporter.reportError2(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [(propagatedType == null ? staticType : propagatedType).displayName, fieldType.displayName]);
+      _errorReporter.reportError2(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, expression, [
+          (propagatedType == null ? staticType : propagatedType).displayName,
+          fieldType.displayName]);
     }
     return true;
   }
@@ -12702,12 +12953,15 @@
    * @see CompileTimeErrorCode#FINAL_NOT_INITIALIZED
    */
   bool checkForFinalNotInitialized2(VariableDeclarationList node) {
+    if (_isInNativeClass) {
+      return false;
+    }
     bool foundError = false;
     if (!node.isSynthetic && (node.isConst || node.isFinal)) {
       NodeList<VariableDeclaration> variables = node.variables;
       for (VariableDeclaration variable in variables) {
         if (variable.initializer == null) {
-          _errorReporter.reportError2(StaticWarningCode.FINAL_NOT_INITIALIZED, variable, [variable.name.name]);
+          _errorReporter.reportError2(StaticWarningCode.FINAL_NOT_INITIALIZED, variable.name, [variable.name.name]);
           foundError = true;
         }
       }
@@ -12744,7 +12998,7 @@
    * @see CompileTimeErrorCode#INSTANCE_MEMBER_ACCESS_FROM_STATIC TODO(scheglov) rename thid method
    */
   bool checkForImplicitThisReferenceInInitializer(SimpleIdentifier node) {
-    if (!_isInConstructorInitializer && !_isInStaticMethod && !_isInInstanceVariableInitializer) {
+    if (!_isInConstructorInitializer && !_isInStaticMethod && !_isInInstanceVariableInitializer && !_isInStaticVariableDeclaration) {
       return false;
     }
     Element element = node.element;
@@ -12769,24 +13023,22 @@
         return false;
       }
     }
-    {
-      if (parent is PropertyAccess) {
-        PropertyAccess access = parent as PropertyAccess;
-        if (identical(access.propertyName, node) && access.realTarget != null) {
-          return false;
-        }
-      }
-      if (parent is PrefixedIdentifier) {
-        PrefixedIdentifier prefixed = parent as PrefixedIdentifier;
-        if (identical(prefixed.identifier, node)) {
-          return false;
-        }
+    if (parent is PropertyAccess) {
+      PropertyAccess access = parent as PropertyAccess;
+      if (identical(access.propertyName, node) && access.realTarget != null) {
+        return false;
       }
     }
-    if (_isInConstructorInitializer || _isInInstanceVariableInitializer) {
-      _errorReporter.reportError2(CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, node, []);
-    } else if (_isInStaticMethod) {
+    if (parent is PrefixedIdentifier) {
+      PrefixedIdentifier prefixed = parent as PrefixedIdentifier;
+      if (identical(prefixed.identifier, node)) {
+        return false;
+      }
+    }
+    if (_isInStaticMethod) {
       _errorReporter.reportError2(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, node, []);
+    } else {
+      _errorReporter.reportError2(CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, node, []);
     }
     return true;
   }
@@ -12812,7 +13064,10 @@
     LibraryElement prevLibrary = _nameToImportElement[name];
     if (prevLibrary != null) {
       if (prevLibrary != nodeLibrary) {
-        _errorReporter.reportError2(StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, node, [prevLibrary.definingCompilationUnit.displayName, nodeLibrary.definingCompilationUnit.displayName, name]);
+        _errorReporter.reportError2(StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME, node, [
+            prevLibrary.definingCompilationUnit.displayName,
+            nodeLibrary.definingCompilationUnit.displayName,
+            name]);
         return true;
       }
     } else {
@@ -13019,6 +13274,80 @@
   }
 
   /**
+   * This verifies that the elements given [ListLiteral] are subtypes of the specified element
+   * type.
+   *
+   * @param node the list literal to evaluate
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see CompileTimeErrorCode#LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+   * @see StaticWarningCode#LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+   */
+  bool checkForListElementTypeNotAssignable(ListLiteral node) {
+    TypeArgumentList typeArgumentList = node.typeArguments;
+    if (typeArgumentList == null) {
+      return false;
+    }
+    NodeList<TypeName> typeArguments = typeArgumentList.arguments;
+    if (typeArguments.length < 1) {
+      return false;
+    }
+    Type2 listElementType = typeArguments[0].type;
+    ErrorCode errorCode;
+    if (node.modifier != null) {
+      errorCode = CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE;
+    } else {
+      errorCode = StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE;
+    }
+    bool hasProblems = false;
+    for (Expression element in node.elements) {
+      hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(element, listElementType, null, errorCode));
+    }
+    return hasProblems;
+  }
+
+  /**
+   * This verifies that the key/value of entries of the given [MapLiteral] are subtypes of the
+   * key/value types specified in the type arguments.
+   *
+   * @param node the map literal to evaluate
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see CompileTimeErrorCode#MAP_KEY_TYPE_NOT_ASSIGNABLE
+   * @see CompileTimeErrorCode#MAP_VALUE_TYPE_NOT_ASSIGNABLE
+   * @see StaticWarningCode#MAP_KEY_TYPE_NOT_ASSIGNABLE
+   * @see StaticWarningCode#MAP_VALUE_TYPE_NOT_ASSIGNABLE
+   */
+  bool checkForMapTypeNotAssignable(MapLiteral node) {
+    TypeArgumentList typeArgumentList = node.typeArguments;
+    if (typeArgumentList == null) {
+      return false;
+    }
+    NodeList<TypeName> typeArguments = typeArgumentList.arguments;
+    if (typeArguments.length < 2) {
+      return false;
+    }
+    Type2 keyType = typeArguments[0].type;
+    Type2 valueType = typeArguments[1].type;
+    ErrorCode keyErrorCode;
+    ErrorCode valueErrorCode;
+    if (node.modifier != null) {
+      keyErrorCode = CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE;
+      valueErrorCode = CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE;
+    } else {
+      keyErrorCode = StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE;
+      valueErrorCode = StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE;
+    }
+    bool hasProblems = false;
+    NodeList<MapLiteralEntry> entries = node.entries;
+    for (MapLiteralEntry entry in entries) {
+      Expression key = entry.key;
+      Expression value = entry.value;
+      hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(key, keyType, null, keyErrorCode));
+      hasProblems = javaBooleanOr(hasProblems, checkForArgumentTypeNotAssignable3(value, valueType, null, valueErrorCode));
+    }
+    return hasProblems;
+  }
+
+  /**
    * This verifies that the [enclosingClass] does not define members with the same name as
    * the enclosing class.
    *
@@ -13071,7 +13400,10 @@
       getterType = getGetterType(counterpartAccessor);
     }
     if (setterType != null && getterType != null && !getterType.isAssignableTo(setterType)) {
-      _errorReporter.reportError2(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES, accessorDeclaration, [accessorTextName, setterType.displayName, getterType.displayName]);
+      _errorReporter.reportError2(StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES, accessorDeclaration, [
+          accessorTextName,
+          setterType.displayName,
+          getterType.displayName]);
     }
   }
 
@@ -13315,11 +13647,23 @@
     } else if (stringMembersArray.length == 2) {
       analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, node.name, [stringMembersArray[0], stringMembersArray[1]]);
     } else if (stringMembersArray.length == 3) {
-      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, node.name, [stringMembersArray[0], stringMembersArray[1], stringMembersArray[2]]);
+      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, node.name, [
+          stringMembersArray[0],
+          stringMembersArray[1],
+          stringMembersArray[2]]);
     } else if (stringMembersArray.length == 4) {
-      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, node.name, [stringMembersArray[0], stringMembersArray[1], stringMembersArray[2], stringMembersArray[3]]);
+      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, node.name, [
+          stringMembersArray[0],
+          stringMembersArray[1],
+          stringMembersArray[2],
+          stringMembersArray[3]]);
     } else {
-      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, node.name, [stringMembersArray[0], stringMembersArray[1], stringMembersArray[2], stringMembersArray[3], stringMembersArray.length - 4]);
+      analysisError = _errorReporter.newErrorWithProperties(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, node.name, [
+          stringMembersArray[0],
+          stringMembersArray[1],
+          stringMembersArray[2],
+          stringMembersArray[3],
+          stringMembersArray.length - 4]);
     }
     analysisError.setProperty(ErrorProperty.UNIMPLEMENTED_METHODS, missingOverridesArray);
     _errorReporter.reportError(analysisError);
@@ -13726,6 +14070,26 @@
   }
 
   /**
+   * This checks that if the the given constructor declaration is generative, then it does not have
+   * an expression function body.
+   *
+   * @param node the constructor to evaluate
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see CompileTimeErrorCode#RETURN_IN_GENERATIVE_CONSTRUCTOR
+   */
+  bool checkForReturnInGenerativeConstructor(ConstructorDeclaration node) {
+    if (node.factoryKeyword != null) {
+      return false;
+    }
+    FunctionBody body = node.body;
+    if (body is! ExpressionFunctionBody) {
+      return false;
+    }
+    _errorReporter.reportError2(CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, body, []);
+    return true;
+  }
+
+  /**
    * This checks that a type mis-match between the return type and the expressed return type by the
    * enclosing method or function.
    *
@@ -13743,7 +14107,10 @@
       if (staticReturnType.isVoid || staticReturnType.isDynamic || identical(staticReturnType, BottomTypeImpl.instance)) {
         return false;
       }
-      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [staticReturnType.displayName, expectedReturnType.displayName, _enclosingFunction.displayName]);
+      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
+          staticReturnType.displayName,
+          expectedReturnType.displayName,
+          _enclosingFunction.displayName]);
       return true;
     }
     bool isStaticAssignable = staticReturnType.isAssignableTo(expectedReturnType);
@@ -13752,14 +14119,20 @@
       if (isStaticAssignable) {
         return false;
       }
-      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [staticReturnType.displayName, expectedReturnType.displayName, _enclosingFunction.displayName]);
+      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
+          staticReturnType.displayName,
+          expectedReturnType.displayName,
+          _enclosingFunction.displayName]);
       return true;
     } else {
       bool isPropagatedAssignable = propagatedReturnType.isAssignableTo(expectedReturnType);
       if (isStaticAssignable || isPropagatedAssignable) {
         return false;
       }
-      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [staticReturnType.displayName, expectedReturnType.displayName, _enclosingFunction.displayName]);
+      _errorReporter.reportError2(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, returnExpression, [
+          staticReturnType.displayName,
+          expectedReturnType.displayName,
+          _enclosingFunction.displayName]);
       return true;
     }
   }
@@ -13827,7 +14200,7 @@
    * @return `true` if and only if an error code is generated on the passed node
    * @see CompileTimeErrorCode#TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
    */
-  bool checkForTypeAliasCannotReferenceItself(FunctionTypeAlias node) {
+  bool checkForTypeAliasCannotReferenceItself_function(FunctionTypeAlias node) {
     FunctionTypeAliasElement element = node.element;
     if (!hasFunctionTypeAliasSelfReference(element)) {
       return false;
@@ -13837,6 +14210,21 @@
   }
 
   /**
+   * This verifies that the given class type alias does not reference itself.
+   *
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see CompileTimeErrorCode#TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
+   */
+  bool checkForTypeAliasCannotReferenceItself_mixin(ClassTypeAlias node) {
+    ClassElement element = node.element;
+    if (!hasClassTypeAliasSelfReference(element, new Set<ClassElement>())) {
+      return false;
+    }
+    _errorReporter.reportError2(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node, []);
+    return true;
+  }
+
+  /**
    * This verifies that the type arguments in the passed type name are all within their bounds.
    *
    * @param node the [TypeName] to evaluate
@@ -14017,6 +14405,32 @@
   }
 
   /**
+   * This verifies that the given class declaration does not have the same class in the 'extends'
+   * and 'implements' clauses.
+   *
+   * @return `true` if and only if an error code is generated on the passed node
+   * @see CompileTimeErrorCode#IMPLEMENTS_SUPER_CLASS
+   */
+  bool checkImplementsSuperClass(ClassDeclaration node) {
+    InterfaceType superType = _enclosingClass.supertype;
+    if (superType == null) {
+      return false;
+    }
+    ImplementsClause implementsClause = node.implementsClause;
+    if (implementsClause == null) {
+      return false;
+    }
+    bool hasProblem = false;
+    for (TypeName interfaceNode in implementsClause.interfaces) {
+      if (interfaceNode.type == superType) {
+        hasProblem = true;
+        _errorReporter.reportError2(CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS, interfaceNode, [superType.displayName]);
+      }
+    }
+    return hasProblem;
+  }
+
+  /**
    * Return the propagated type of the given expression, or the static type if there is no
    * propagated type information.
    *
@@ -14100,6 +14514,27 @@
   }
 
   /**
+   * @return <code>true</code> if given [ClassElement] has direct or indirect reference to
+   *         itself using only other typedef [ClassElement]s.
+   */
+  bool hasClassTypeAliasSelfReference(ClassElement element2, Set<ClassElement> seenMixins) {
+    if (seenMixins.contains(element2)) {
+      return true;
+    }
+    javaSetAdd(seenMixins, element2);
+    for (InterfaceType mixin in element2.mixins) {
+      ClassElement mixinElement = mixin.element;
+      if (!mixinElement.isTypedef) {
+        continue;
+      }
+      if (hasClassTypeAliasSelfReference(mixinElement, seenMixins)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
    * Checks if "target" is referenced by "current".
    */
   bool hasFunctionTypeAliasReference(Set<FunctionTypeAliasElement> visited, FunctionTypeAliasElement target, Element currentElement) {
@@ -14214,9 +14649,12 @@
   static final INIT_STATE NOT_INIT = new INIT_STATE('NOT_INIT', 0);
   static final INIT_STATE INIT_IN_DECLARATION = new INIT_STATE('INIT_IN_DECLARATION', 1);
   static final INIT_STATE INIT_IN_FIELD_FORMAL = new INIT_STATE('INIT_IN_FIELD_FORMAL', 2);
-  static final INIT_STATE INIT_IN_DEFAULT_VALUE = new INIT_STATE('INIT_IN_DEFAULT_VALUE', 3);
-  static final INIT_STATE INIT_IN_INITIALIZERS = new INIT_STATE('INIT_IN_INITIALIZERS', 4);
-  static final List<INIT_STATE> values = [NOT_INIT, INIT_IN_DECLARATION, INIT_IN_FIELD_FORMAL, INIT_IN_DEFAULT_VALUE, INIT_IN_INITIALIZERS];
+  static final INIT_STATE INIT_IN_INITIALIZERS = new INIT_STATE('INIT_IN_INITIALIZERS', 3);
+  static final List<INIT_STATE> values = [
+      NOT_INIT,
+      INIT_IN_DECLARATION,
+      INIT_IN_FIELD_FORMAL,
+      INIT_IN_INITIALIZERS];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -14407,7 +14845,10 @@
   static final ResolverErrorCode BREAK_LABEL_ON_SWITCH_MEMBER = new ResolverErrorCode('BREAK_LABEL_ON_SWITCH_MEMBER', 0, ErrorType.COMPILE_TIME_ERROR, "Break label resolves to case or default statement");
   static final ResolverErrorCode CONTINUE_LABEL_ON_SWITCH = new ResolverErrorCode('CONTINUE_LABEL_ON_SWITCH', 1, ErrorType.COMPILE_TIME_ERROR, "A continue label resolves to switch, must be loop or switch member");
   static final ResolverErrorCode MISSING_LIBRARY_DIRECTIVE_WITH_PART = new ResolverErrorCode('MISSING_LIBRARY_DIRECTIVE_WITH_PART', 2, ErrorType.COMPILE_TIME_ERROR, "Libraries that have parts must have a library directive");
-  static final List<ResolverErrorCode> values = [BREAK_LABEL_ON_SWITCH_MEMBER, CONTINUE_LABEL_ON_SWITCH, MISSING_LIBRARY_DIRECTIVE_WITH_PART];
+  static final List<ResolverErrorCode> values = [
+      BREAK_LABEL_ON_SWITCH_MEMBER,
+      CONTINUE_LABEL_ON_SWITCH,
+      MISSING_LIBRARY_DIRECTIVE_WITH_PART];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
diff --git a/pkg/analyzer_experimental/lib/src/generated/scanner.dart b/pkg/analyzer_experimental/lib/src/generated/scanner.dart
index 047cc09..1d7676e 100644
--- a/pkg/analyzer_experimental/lib/src/generated/scanner.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/scanner.dart
@@ -143,7 +143,14 @@
   static final ScannerErrorCode MISSING_QUOTE = new ScannerErrorCode('MISSING_QUOTE', 4, "Expected quote (' or \")");
   static final ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT = new ScannerErrorCode('UNTERMINATED_MULTI_LINE_COMMENT', 5, "Unterminated multi-line comment");
   static final ScannerErrorCode UNTERMINATED_STRING_LITERAL = new ScannerErrorCode('UNTERMINATED_STRING_LITERAL', 6, "Unterminated string literal");
-  static final List<ScannerErrorCode> values = [CHARACTER_EXPECTED_AFTER_SLASH, ILLEGAL_CHARACTER, MISSING_DIGIT, MISSING_HEX_DIGIT, MISSING_QUOTE, UNTERMINATED_MULTI_LINE_COMMENT, UNTERMINATED_STRING_LITERAL];
+  static final List<ScannerErrorCode> values = [
+      CHARACTER_EXPECTED_AFTER_SLASH,
+      ILLEGAL_CHARACTER,
+      MISSING_DIGIT,
+      MISSING_HEX_DIGIT,
+      MISSING_QUOTE,
+      UNTERMINATED_MULTI_LINE_COMMENT,
+      UNTERMINATED_STRING_LITERAL];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -251,7 +258,55 @@
   static final Keyword SET = new Keyword.con2('SET', 45, "set", true);
   static final Keyword STATIC = new Keyword.con2('STATIC', 46, "static", true);
   static final Keyword TYPEDEF = new Keyword.con2('TYPEDEF', 47, "typedef", true);
-  static final List<Keyword> values = [ASSERT, BREAK, CASE, CATCH, CLASS, CONST, CONTINUE, DEFAULT, DO, ELSE, ENUM, EXTENDS, FALSE, FINAL, FINALLY, FOR, IF, IN, IS, NEW, NULL, RETHROW, RETURN, SUPER, SWITCH, THIS, THROW, TRUE, TRY, VAR, VOID, WHILE, WITH, ABSTRACT, AS, DYNAMIC, EXPORT, EXTERNAL, FACTORY, GET, IMPLEMENTS, IMPORT, LIBRARY, OPERATOR, PART, SET, STATIC, TYPEDEF];
+  static final List<Keyword> values = [
+      ASSERT,
+      BREAK,
+      CASE,
+      CATCH,
+      CLASS,
+      CONST,
+      CONTINUE,
+      DEFAULT,
+      DO,
+      ELSE,
+      ENUM,
+      EXTENDS,
+      FALSE,
+      FINAL,
+      FINALLY,
+      FOR,
+      IF,
+      IN,
+      IS,
+      NEW,
+      NULL,
+      RETHROW,
+      RETURN,
+      SUPER,
+      SWITCH,
+      THIS,
+      THROW,
+      TRUE,
+      TRY,
+      VAR,
+      VOID,
+      WHILE,
+      WITH,
+      ABSTRACT,
+      AS,
+      DYNAMIC,
+      EXPORT,
+      EXTERNAL,
+      FACTORY,
+      GET,
+      IMPLEMENTS,
+      IMPORT,
+      LIBRARY,
+      OPERATOR,
+      PART,
+      SET,
+      STATIC,
+      TYPEDEF];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -1826,7 +1881,23 @@
    * A value used to indicate that the token type is a unary operator.
    */
   static final TokenClass UNARY_PREFIX_OPERATOR = new TokenClass.con2('UNARY_PREFIX_OPERATOR', 15, 14);
-  static final List<TokenClass> values = [NO_CLASS, ADDITIVE_OPERATOR, ASSIGNMENT_OPERATOR, BITWISE_AND_OPERATOR, BITWISE_OR_OPERATOR, BITWISE_XOR_OPERATOR, CASCADE_OPERATOR, CONDITIONAL_OPERATOR, EQUALITY_OPERATOR, LOGICAL_AND_OPERATOR, LOGICAL_OR_OPERATOR, MULTIPLICATIVE_OPERATOR, RELATIONAL_OPERATOR, SHIFT_OPERATOR, UNARY_POSTFIX_OPERATOR, UNARY_PREFIX_OPERATOR];
+  static final List<TokenClass> values = [
+      NO_CLASS,
+      ADDITIVE_OPERATOR,
+      ASSIGNMENT_OPERATOR,
+      BITWISE_AND_OPERATOR,
+      BITWISE_OR_OPERATOR,
+      BITWISE_XOR_OPERATOR,
+      CASCADE_OPERATOR,
+      CONDITIONAL_OPERATOR,
+      EQUALITY_OPERATOR,
+      LOGICAL_AND_OPERATOR,
+      LOGICAL_OR_OPERATOR,
+      MULTIPLICATIVE_OPERATOR,
+      RELATIONAL_OPERATOR,
+      SHIFT_OPERATOR,
+      UNARY_POSTFIX_OPERATOR,
+      UNARY_PREFIX_OPERATOR];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -1960,7 +2031,75 @@
   static final TokenType BACKPING = new TokenType.con2('BACKPING', 65, null, "`");
   static final TokenType BACKSLASH = new TokenType.con2('BACKSLASH', 66, null, "\\");
   static final TokenType PERIOD_PERIOD_PERIOD = new TokenType.con2('PERIOD_PERIOD_PERIOD', 67, null, "...");
-  static final List<TokenType> values = [EOF, DOUBLE, HEXADECIMAL, IDENTIFIER, INT, KEYWORD, MULTI_LINE_COMMENT, SCRIPT_TAG, SINGLE_LINE_COMMENT, STRING, AMPERSAND, AMPERSAND_AMPERSAND, AMPERSAND_EQ, AT, BANG, BANG_EQ, BAR, BAR_BAR, BAR_EQ, COLON, COMMA, CARET, CARET_EQ, CLOSE_CURLY_BRACKET, CLOSE_PAREN, CLOSE_SQUARE_BRACKET, EQ, EQ_EQ, FUNCTION, GT, GT_EQ, GT_GT, GT_GT_EQ, HASH, INDEX, INDEX_EQ, IS, LT, LT_EQ, LT_LT, LT_LT_EQ, MINUS, MINUS_EQ, MINUS_MINUS, OPEN_CURLY_BRACKET, OPEN_PAREN, OPEN_SQUARE_BRACKET, PERCENT, PERCENT_EQ, PERIOD, PERIOD_PERIOD, PLUS, PLUS_EQ, PLUS_PLUS, QUESTION, SEMICOLON, SLASH, SLASH_EQ, STAR, STAR_EQ, STRING_INTERPOLATION_EXPRESSION, STRING_INTERPOLATION_IDENTIFIER, TILDE, TILDE_SLASH, TILDE_SLASH_EQ, BACKPING, BACKSLASH, PERIOD_PERIOD_PERIOD];
+  static final List<TokenType> values = [
+      EOF,
+      DOUBLE,
+      HEXADECIMAL,
+      IDENTIFIER,
+      INT,
+      KEYWORD,
+      MULTI_LINE_COMMENT,
+      SCRIPT_TAG,
+      SINGLE_LINE_COMMENT,
+      STRING,
+      AMPERSAND,
+      AMPERSAND_AMPERSAND,
+      AMPERSAND_EQ,
+      AT,
+      BANG,
+      BANG_EQ,
+      BAR,
+      BAR_BAR,
+      BAR_EQ,
+      COLON,
+      COMMA,
+      CARET,
+      CARET_EQ,
+      CLOSE_CURLY_BRACKET,
+      CLOSE_PAREN,
+      CLOSE_SQUARE_BRACKET,
+      EQ,
+      EQ_EQ,
+      FUNCTION,
+      GT,
+      GT_EQ,
+      GT_GT,
+      GT_GT_EQ,
+      HASH,
+      INDEX,
+      INDEX_EQ,
+      IS,
+      LT,
+      LT_EQ,
+      LT_LT,
+      LT_LT_EQ,
+      MINUS,
+      MINUS_EQ,
+      MINUS_MINUS,
+      OPEN_CURLY_BRACKET,
+      OPEN_PAREN,
+      OPEN_SQUARE_BRACKET,
+      PERCENT,
+      PERCENT_EQ,
+      PERIOD,
+      PERIOD_PERIOD,
+      PLUS,
+      PLUS_EQ,
+      PLUS_PLUS,
+      QUESTION,
+      SEMICOLON,
+      SLASH,
+      SLASH_EQ,
+      STAR,
+      STAR_EQ,
+      STRING_INTERPOLATION_EXPRESSION,
+      STRING_INTERPOLATION_IDENTIFIER,
+      TILDE,
+      TILDE_SLASH,
+      TILDE_SLASH_EQ,
+      BACKPING,
+      BACKSLASH,
+      PERIOD_PERIOD_PERIOD];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
diff --git a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
index cda5d2d..d92be2b0 100644
--- a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
@@ -146,7 +146,7 @@
   /// Initialize a newly created visitor to write source code representing
   /// the visited nodes to the given [writer].
   SourceVisitor(FormatterOptions options) :
-      writer = new SourceWriter(initialIndent: options.initialIndentationLevel,
+      writer = new SourceWriter(indentCount: options.initialIndentationLevel,
                                 lineSeparator: options.lineSeparator);
 
   visitAdjacentStrings(AdjacentStrings node) {
diff --git a/pkg/analyzer_experimental/lib/src/services/writer.dart b/pkg/analyzer_experimental/lib/src/services/writer.dart
index 39c3f83..4171733 100644
--- a/pkg/analyzer_experimental/lib/src/services/writer.dart
+++ b/pkg/analyzer_experimental/lib/src/services/writer.dart
@@ -78,13 +78,14 @@
 class SourceWriter {
 
   final StringBuffer buffer = new StringBuffer();
-  Line currentLine = new Line();
+  Line currentLine;
 
   final String lineSeparator;
   int indentCount = 0;
 
-  SourceWriter({int initialIndent: 0, this.lineSeparator: '\n'}) :
-    indentCount = initialIndent;
+  SourceWriter({this.indentCount: 0, this.lineSeparator: '\n'}) {
+    currentLine = new Line(indent: indentCount);
+  }
 
   indent() {
     ++indentCount;
diff --git a/pkg/analyzer_experimental/test/generated/ast_test.dart b/pkg/analyzer_experimental/test/generated/ast_test.dart
index 7713229..5163120 100644
--- a/pkg/analyzer_experimental/test/generated/ast_test.dart
+++ b/pkg/analyzer_experimental/test/generated/ast_test.dart
@@ -717,7 +717,17 @@
   static final AssignmentKind SIMPLE_LEFT = new AssignmentKind('SIMPLE_LEFT', 7);
   static final AssignmentKind SIMPLE_RIGHT = new AssignmentKind('SIMPLE_RIGHT', 8);
   static final AssignmentKind NONE = new AssignmentKind('NONE', 9);
-  static final List<AssignmentKind> values = [BINARY, COMPOUND_LEFT, COMPOUND_RIGHT, POSTFIX_INC, PREFIX_DEC, PREFIX_INC, PREFIX_NOT, SIMPLE_LEFT, SIMPLE_RIGHT, NONE];
+  static final List<AssignmentKind> values = [
+      BINARY,
+      COMPOUND_LEFT,
+      COMPOUND_RIGHT,
+      POSTFIX_INC,
+      PREFIX_DEC,
+      PREFIX_INC,
+      PREFIX_NOT,
+      SIMPLE_LEFT,
+      SIMPLE_RIGHT,
+      NONE];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -735,7 +745,12 @@
   static final WrapperKind PROPERTY_LEFT = new WrapperKind('PROPERTY_LEFT', 2);
   static final WrapperKind PROPERTY_RIGHT = new WrapperKind('PROPERTY_RIGHT', 3);
   static final WrapperKind NONE = new WrapperKind('NONE', 4);
-  static final List<WrapperKind> values = [PREFIXED_LEFT, PREFIXED_RIGHT, PROPERTY_LEFT, PROPERTY_RIGHT, NONE];
+  static final List<WrapperKind> values = [
+      PREFIXED_LEFT,
+      PREFIXED_RIGHT,
+      PROPERTY_LEFT,
+      PROPERTY_RIGHT,
+      NONE];
 
   /// The name of this enum constant, as declared in the enum declaration.
   final String name;
@@ -749,7 +764,25 @@
 }
 class BreadthFirstVisitorTest extends ParserTestCase {
   void testIt() {
-    String source = EngineTestCase.createSource(["class A {", "  bool get g => true;", "}", "class B {", "  int f() {", "    num q() {", "      return 3;", "    }", "  return q() + 4;", "  }", "}", "A f(var p) {", "  if ((p as A).g) {", "    return p;", "  } else {", "    return null;", "  }", "}"]);
+    String source = EngineTestCase.createSource([
+        "class A {",
+        "  bool get g => true;",
+        "}",
+        "class B {",
+        "  int f() {",
+        "    num q() {",
+        "      return 3;",
+        "    }",
+        "  return q() + 4;",
+        "  }",
+        "}",
+        "A f(var p) {",
+        "  if ((p as A).g) {",
+        "    return p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "}"]);
     CompilationUnit unit = ParserTestCase.parseCompilationUnit(source, []);
     List<ASTNode> nodes = new List<ASTNode>();
     BreadthFirstVisitor<Object> visitor = new BreadthFirstVisitor_15(nodes);
@@ -1287,13 +1320,19 @@
     assertSource("break;", ASTFactory.breakStatement());
   }
   void test_visitCascadeExpression_field() {
-    assertSource("a..b..c", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [ASTFactory.cascadedPropertyAccess("b"), ASTFactory.cascadedPropertyAccess("c")]));
+    assertSource("a..b..c", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
+        ASTFactory.cascadedPropertyAccess("b"),
+        ASTFactory.cascadedPropertyAccess("c")]));
   }
   void test_visitCascadeExpression_index() {
-    assertSource("a..[0]..[1]", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [ASTFactory.cascadedIndexExpression(ASTFactory.integer(0)), ASTFactory.cascadedIndexExpression(ASTFactory.integer(1))]));
+    assertSource("a..[0]..[1]", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
+        ASTFactory.cascadedIndexExpression(ASTFactory.integer(0)),
+        ASTFactory.cascadedIndexExpression(ASTFactory.integer(1))]));
   }
   void test_visitCascadeExpression_method() {
-    assertSource("a..b()..c()", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [ASTFactory.cascadedMethodInvocation("b", []), ASTFactory.cascadedMethodInvocation("c", [])]));
+    assertSource("a..b()..c()", ASTFactory.cascadeExpression(ASTFactory.identifier3("a"), [
+        ASTFactory.cascadedMethodInvocation("b", []),
+        ASTFactory.cascadedMethodInvocation("c", [])]));
   }
   void test_visitCatchClause_catch_noStack() {
     assertSource("catch (e) {}", ASTFactory.catchClause("e", []));
@@ -1329,7 +1368,9 @@
     assertSource("class C implements B {}", ASTFactory.classDeclaration(null, "C", null, null, null, ASTFactory.implementsClause([ASTFactory.typeName4("B", [])]), []));
   }
   void test_visitClassDeclaration_multipleMember() {
-    assertSource("class C {var a; var b;}", ASTFactory.classDeclaration(null, "C", null, null, null, null, [ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("a")]), ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("b")])]));
+    assertSource("class C {var a; var b;}", ASTFactory.classDeclaration(null, "C", null, null, null, null, [
+        ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("a")]),
+        ASTFactory.fieldDeclaration2(false, Keyword.VAR, [ASTFactory.variableDeclaration("b")])]));
   }
   void test_visitClassDeclaration_parameters() {
     assertSource("class C<E> {}", ASTFactory.classDeclaration(null, "C", ASTFactory.typeParameterList(["E"]), null, null, null, []));
@@ -1419,10 +1460,14 @@
     assertSource("C() {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), null, ASTFactory.blockFunctionBody([])));
   }
   void test_visitConstructorDeclaration_multipleInitializers() {
-    assertSource("C() : a = b, c = d {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFactory.list([(ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier3("b")) as ConstructorInitializer), ASTFactory.constructorFieldInitializer(false, "c", ASTFactory.identifier3("d"))]), ASTFactory.blockFunctionBody([])));
+    assertSource("C() : a = b, c = d {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFactory.list([
+        (ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier3("b")) as ConstructorInitializer),
+        ASTFactory.constructorFieldInitializer(false, "c", ASTFactory.identifier3("d"))]), ASTFactory.blockFunctionBody([])));
   }
   void test_visitConstructorDeclaration_multipleParameters() {
-    assertSource("C(var a, var b) {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, ASTFactory.blockFunctionBody([])));
+    assertSource("C(var a, var b) {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter(Keyword.VAR, "a"),
+        ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, ASTFactory.blockFunctionBody([])));
   }
   void test_visitConstructorDeclaration_named() {
     assertSource("C.m() {}", ASTFactory.constructorDeclaration2(null, null, ASTFactory.identifier3("C"), "m", ASTFactory.formalParameterList([]), null, ASTFactory.blockFunctionBody([])));
@@ -1479,7 +1524,9 @@
     assertSource("export 'a.dart' show A;", ASTFactory.exportDirective2("a.dart", [(ASTFactory.showCombinator([ASTFactory.identifier3("A")]) as Combinator)]));
   }
   void test_visitExportDirective_combinators() {
-    assertSource("export 'a.dart' show A hide B;", ASTFactory.exportDirective2("a.dart", [ASTFactory.showCombinator([ASTFactory.identifier3("A")]), ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+    assertSource("export 'a.dart' show A hide B;", ASTFactory.exportDirective2("a.dart", [
+        ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
+        ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
   }
   void test_visitExportDirective_minimal() {
     assertSource("export 'a.dart';", ASTFactory.exportDirective2("a.dart", []));
@@ -1521,43 +1568,73 @@
     assertSource("({a : 0})", ASTFactory.formalParameterList([ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0))]));
   }
   void test_visitFormalParameterList_nn() {
-    assertSource("({a : 0, b : 1})", ASTFactory.formalParameterList([ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+    assertSource("({a : 0, b : 1})", ASTFactory.formalParameterList([
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
   }
   void test_visitFormalParameterList_p() {
     assertSource("([a = 0])", ASTFactory.formalParameterList([ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0))]));
   }
   void test_visitFormalParameterList_pp() {
-    assertSource("([a = 0, b = 1])", ASTFactory.formalParameterList([ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+    assertSource("([a = 0, b = 1])", ASTFactory.formalParameterList([
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("a"), ASTFactory.integer(0)),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
   }
   void test_visitFormalParameterList_r() {
     assertSource("(a)", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a")]));
   }
   void test_visitFormalParameterList_rn() {
-    assertSource("(a, {b : 1})", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+    assertSource("(a, {b : 1})", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
   }
   void test_visitFormalParameterList_rnn() {
-    assertSource("(a, {b : 1, c : 2})", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
+    assertSource("(a, {b : 1, c : 2})", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
   }
   void test_visitFormalParameterList_rp() {
-    assertSource("(a, [b = 1])", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
+    assertSource("(a, [b = 1])", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1))]));
   }
   void test_visitFormalParameterList_rpp() {
-    assertSource("(a, [b = 1, c = 2])", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
+    assertSource("(a, [b = 1, c = 2])", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("b"), ASTFactory.integer(1)),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(2))]));
   }
   void test_visitFormalParameterList_rr() {
-    assertSource("(a, b)", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.simpleFormalParameter3("b")]));
+    assertSource("(a, b)", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.simpleFormalParameter3("b")]));
   }
   void test_visitFormalParameterList_rrn() {
-    assertSource("(a, b, {c : 3})", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.simpleFormalParameter3("b"), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
+    assertSource("(a, b, {c : 3})", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.simpleFormalParameter3("b"),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
   }
   void test_visitFormalParameterList_rrnn() {
-    assertSource("(a, b, {c : 3, d : 4})", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.simpleFormalParameter3("b"), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)), ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
+    assertSource("(a, b, {c : 3, d : 4})", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.simpleFormalParameter3("b"),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)),
+        ASTFactory.namedFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
   }
   void test_visitFormalParameterList_rrp() {
-    assertSource("(a, b, [c = 3])", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.simpleFormalParameter3("b"), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
+    assertSource("(a, b, [c = 3])", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.simpleFormalParameter3("b"),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3))]));
   }
   void test_visitFormalParameterList_rrpp() {
-    assertSource("(a, b, [c = 3, d = 4])", ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter3("a"), ASTFactory.simpleFormalParameter3("b"), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)), ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
+    assertSource("(a, b, [c = 3, d = 4])", ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter3("a"),
+        ASTFactory.simpleFormalParameter3("b"),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("c"), ASTFactory.integer(3)),
+        ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("d"), ASTFactory.integer(4))]));
   }
   void test_visitForStatement_c() {
     assertSource("for (; c;) {}", ASTFactory.forStatement((null as Expression), ASTFactory.identifier3("c"), null, ASTFactory.block([])));
@@ -1623,7 +1700,9 @@
     assertSource("if (c) {}", ASTFactory.ifStatement(ASTFactory.identifier3("c"), ASTFactory.block([])));
   }
   void test_visitImplementsClause_multiple() {
-    assertSource("implements A, B", ASTFactory.implementsClause([ASTFactory.typeName4("A", []), ASTFactory.typeName4("B", [])]));
+    assertSource("implements A, B", ASTFactory.implementsClause([
+        ASTFactory.typeName4("A", []),
+        ASTFactory.typeName4("B", [])]));
   }
   void test_visitImplementsClause_single() {
     assertSource("implements A", ASTFactory.implementsClause([ASTFactory.typeName4("A", [])]));
@@ -1632,7 +1711,9 @@
     assertSource("import 'a.dart' show A;", ASTFactory.importDirective2("a.dart", null, [ASTFactory.showCombinator([ASTFactory.identifier3("A")])]));
   }
   void test_visitImportDirective_combinators() {
-    assertSource("import 'a.dart' show A hide B;", ASTFactory.importDirective2("a.dart", null, [ASTFactory.showCombinator([ASTFactory.identifier3("A")]), ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+    assertSource("import 'a.dart' show A hide B;", ASTFactory.importDirective2("a.dart", null, [
+        ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
+        ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
   }
   void test_visitImportDirective_minimal() {
     assertSource("import 'a.dart';", ASTFactory.importDirective2("a.dart", null, []));
@@ -1644,7 +1725,9 @@
     assertSource("import 'a.dart' as p show A;", ASTFactory.importDirective2("a.dart", "p", [ASTFactory.showCombinator([ASTFactory.identifier3("A")])]));
   }
   void test_visitImportDirective_prefix_combinators() {
-    assertSource("import 'a.dart' as p show A hide B;", ASTFactory.importDirective2("a.dart", "p", [ASTFactory.showCombinator([ASTFactory.identifier3("A")]), ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
+    assertSource("import 'a.dart' as p show A hide B;", ASTFactory.importDirective2("a.dart", "p", [
+        ASTFactory.showCombinator([ASTFactory.identifier3("A")]),
+        ASTFactory.hideCombinator([ASTFactory.identifier3("B")])]));
   }
   void test_visitImportHideCombinator_multiple() {
     assertSource("hide a, b", ASTFactory.hideCombinator([ASTFactory.identifier3("a"), ASTFactory.identifier3("b")]));
@@ -1701,7 +1784,10 @@
     assertSource("library l;", ASTFactory.libraryDirective2("l"));
   }
   void test_visitLibraryIdentifier_multiple() {
-    assertSource("a.b.c", ASTFactory.libraryIdentifier([ASTFactory.identifier3("a"), ASTFactory.identifier3("b"), ASTFactory.identifier3("c")]));
+    assertSource("a.b.c", ASTFactory.libraryIdentifier([
+        ASTFactory.identifier3("a"),
+        ASTFactory.identifier3("b"),
+        ASTFactory.identifier3("c")]));
   }
   void test_visitLibraryIdentifier_single() {
     assertSource("a", ASTFactory.libraryIdentifier([ASTFactory.identifier3("a")]));
@@ -1713,7 +1799,10 @@
     assertSource("[]", ASTFactory.listLiteral([]));
   }
   void test_visitListLiteral_nonEmpty() {
-    assertSource("[a, b, c]", ASTFactory.listLiteral([ASTFactory.identifier3("a"), ASTFactory.identifier3("b"), ASTFactory.identifier3("c")]));
+    assertSource("[a, b, c]", ASTFactory.listLiteral([
+        ASTFactory.identifier3("a"),
+        ASTFactory.identifier3("b"),
+        ASTFactory.identifier3("c")]));
   }
   void test_visitMapLiteral_const() {
     assertSource("const {}", ASTFactory.mapLiteral(Keyword.CONST, null, []));
@@ -1722,7 +1811,10 @@
     assertSource("{}", ASTFactory.mapLiteral2([]));
   }
   void test_visitMapLiteral_nonEmpty() {
-    assertSource("{'a' : a, 'b' : b, 'c' : c}", ASTFactory.mapLiteral2([ASTFactory.mapLiteralEntry("a", ASTFactory.identifier3("a")), ASTFactory.mapLiteralEntry("b", ASTFactory.identifier3("b")), ASTFactory.mapLiteralEntry("c", ASTFactory.identifier3("c"))]));
+    assertSource("{'a' : a, 'b' : b, 'c' : c}", ASTFactory.mapLiteral2([
+        ASTFactory.mapLiteralEntry("a", ASTFactory.identifier3("a")),
+        ASTFactory.mapLiteralEntry("b", ASTFactory.identifier3("b")),
+        ASTFactory.mapLiteralEntry("c", ASTFactory.identifier3("c"))]));
   }
   void test_visitMapLiteralEntry() {
     assertSource("'a' : b", ASTFactory.mapLiteralEntry("a", ASTFactory.identifier3("b")));
@@ -1746,7 +1838,9 @@
     assertSource("m() {}", ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody([])));
   }
   void test_visitMethodDeclaration_multipleParameters() {
-    assertSource("m(var a, var b) {}", ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), ASTFactory.blockFunctionBody([])));
+    assertSource("m(var a, var b) {}", ASTFactory.methodDeclaration2(null, null, null, null, ASTFactory.identifier3("m"), ASTFactory.formalParameterList([
+        ASTFactory.simpleFormalParameter(Keyword.VAR, "a"),
+        ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), ASTFactory.blockFunctionBody([])));
   }
   void test_visitMethodDeclaration_operator() {
     assertSource("operator +() {}", ASTFactory.methodDeclaration2(null, null, null, Keyword.OPERATOR, ASTFactory.identifier3("+"), ASTFactory.formalParameterList([]), ASTFactory.blockFunctionBody([])));
@@ -1840,7 +1934,10 @@
     assertSource("'a'", ASTFactory.string2("a"));
   }
   void test_visitStringInterpolation() {
-    assertSource("'a\${e}b'", ASTFactory.string([ASTFactory.interpolationString("'a", "a"), ASTFactory.interpolationExpression(ASTFactory.identifier3("e")), ASTFactory.interpolationString("b'", "b")]));
+    assertSource("'a\${e}b'", ASTFactory.string([
+        ASTFactory.interpolationString("'a", "a"),
+        ASTFactory.interpolationExpression(ASTFactory.identifier3("e")),
+        ASTFactory.interpolationString("b'", "b")]));
   }
   void test_visitSuperConstructorInvocation() {
     assertSource("super()", ASTFactory.superConstructorInvocation([]));
@@ -1876,7 +1973,9 @@
     assertSource("l1: default: {}", ASTFactory.switchDefault(ASTFactory.list([ASTFactory.label2("l1")]), [ASTFactory.block([])]));
   }
   void test_visitSwitchStatement() {
-    assertSource("switch (a) {case 'b': {} default: {}}", ASTFactory.switchStatement(ASTFactory.identifier3("a"), [ASTFactory.switchCase(ASTFactory.string2("b"), [ASTFactory.block([])]), ASTFactory.switchDefault2([ASTFactory.block([])])]));
+    assertSource("switch (a) {case 'b': {} default: {}}", ASTFactory.switchStatement(ASTFactory.identifier3("a"), [
+        ASTFactory.switchCase(ASTFactory.string2("b"), [ASTFactory.block([])]),
+        ASTFactory.switchDefault2([ASTFactory.block([])])]));
   }
   void test_visitSymbolLiteral_multiple() {
     assertSource("#a.b.c", ASTFactory.symbolLiteral(["a", "b", "c"]));
@@ -1894,13 +1993,17 @@
     assertSource("var a;", ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")]));
   }
   void test_visitTopLevelVariableDeclaration_single() {
-    assertSource("var a, b;", ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a"), ASTFactory.variableDeclaration("b")]));
+    assertSource("var a, b;", ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [
+        ASTFactory.variableDeclaration("a"),
+        ASTFactory.variableDeclaration("b")]));
   }
   void test_visitTryStatement_catch() {
     assertSource("try {} on E {}", ASTFactory.tryStatement2(ASTFactory.block([]), [ASTFactory.catchClause3(ASTFactory.typeName4("E", []), [])]));
   }
   void test_visitTryStatement_catches() {
-    assertSource("try {} on E {} on F {}", ASTFactory.tryStatement2(ASTFactory.block([]), [ASTFactory.catchClause3(ASTFactory.typeName4("E", []), []), ASTFactory.catchClause3(ASTFactory.typeName4("F", []), [])]));
+    assertSource("try {} on E {} on F {}", ASTFactory.tryStatement2(ASTFactory.block([]), [
+        ASTFactory.catchClause3(ASTFactory.typeName4("E", []), []),
+        ASTFactory.catchClause3(ASTFactory.typeName4("F", []), [])]));
   }
   void test_visitTryStatement_catchFinally() {
     assertSource("try {} on E {} finally {}", ASTFactory.tryStatement3(ASTFactory.block([]), ASTFactory.list([ASTFactory.catchClause3(ASTFactory.typeName4("E", []), [])]), ASTFactory.block([])));
@@ -1915,13 +2018,17 @@
     assertSource("typedef A F();", ASTFactory.typeAlias(ASTFactory.typeName4("A", []), "F", null, ASTFactory.formalParameterList([])));
   }
   void test_visitTypeArgumentList_multiple() {
-    assertSource("<E, F>", ASTFactory.typeArgumentList([ASTFactory.typeName4("E", []), ASTFactory.typeName4("F", [])]));
+    assertSource("<E, F>", ASTFactory.typeArgumentList([
+        ASTFactory.typeName4("E", []),
+        ASTFactory.typeName4("F", [])]));
   }
   void test_visitTypeArgumentList_single() {
     assertSource("<E>", ASTFactory.typeArgumentList([ASTFactory.typeName4("E", [])]));
   }
   void test_visitTypeName_multipleArgs() {
-    assertSource("C<D, E>", ASTFactory.typeName4("C", [ASTFactory.typeName4("D", []), ASTFactory.typeName4("E", [])]));
+    assertSource("C<D, E>", ASTFactory.typeName4("C", [
+        ASTFactory.typeName4("D", []),
+        ASTFactory.typeName4("E", [])]));
   }
   void test_visitTypeName_nestedArg() {
     assertSource("C<D<E>>", ASTFactory.typeName4("C", [ASTFactory.typeName4("D", [ASTFactory.typeName4("E", [])])]));
@@ -1951,16 +2058,24 @@
     assertSource("a", ASTFactory.variableDeclaration("a"));
   }
   void test_visitVariableDeclarationList_const_type() {
-    assertSource("const C a, b", ASTFactory.variableDeclarationList(Keyword.CONST, ASTFactory.typeName4("C", []), [ASTFactory.variableDeclaration("a"), ASTFactory.variableDeclaration("b")]));
+    assertSource("const C a, b", ASTFactory.variableDeclarationList(Keyword.CONST, ASTFactory.typeName4("C", []), [
+        ASTFactory.variableDeclaration("a"),
+        ASTFactory.variableDeclaration("b")]));
   }
   void test_visitVariableDeclarationList_final_noType() {
-    assertSource("final a, b", ASTFactory.variableDeclarationList2(Keyword.FINAL, [ASTFactory.variableDeclaration("a"), ASTFactory.variableDeclaration("b")]));
+    assertSource("final a, b", ASTFactory.variableDeclarationList2(Keyword.FINAL, [
+        ASTFactory.variableDeclaration("a"),
+        ASTFactory.variableDeclaration("b")]));
   }
   void test_visitVariableDeclarationList_type() {
-    assertSource("C a, b", ASTFactory.variableDeclarationList(null, ASTFactory.typeName4("C", []), [ASTFactory.variableDeclaration("a"), ASTFactory.variableDeclaration("b")]));
+    assertSource("C a, b", ASTFactory.variableDeclarationList(null, ASTFactory.typeName4("C", []), [
+        ASTFactory.variableDeclaration("a"),
+        ASTFactory.variableDeclaration("b")]));
   }
   void test_visitVariableDeclarationList_var() {
-    assertSource("var a, b", ASTFactory.variableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("a"), ASTFactory.variableDeclaration("b")]));
+    assertSource("var a, b", ASTFactory.variableDeclarationList2(Keyword.VAR, [
+        ASTFactory.variableDeclaration("a"),
+        ASTFactory.variableDeclaration("b")]));
   }
   void test_visitVariableDeclarationStatement() {
     assertSource("C c;", ASTFactory.variableDeclarationStatement(null, ASTFactory.typeName4("C", []), [ASTFactory.variableDeclaration("c")]));
@@ -1969,7 +2084,10 @@
     assertSource("while (c) {}", ASTFactory.whileStatement(ASTFactory.identifier3("c"), ASTFactory.block([])));
   }
   void test_visitWithClause_multiple() {
-    assertSource("with A, B, C", ASTFactory.withClause([ASTFactory.typeName4("A", []), ASTFactory.typeName4("B", []), ASTFactory.typeName4("C", [])]));
+    assertSource("with A, B, C", ASTFactory.withClause([
+        ASTFactory.typeName4("A", []),
+        ASTFactory.typeName4("B", []),
+        ASTFactory.typeName4("C", [])]));
   }
   void test_visitWithClause_single() {
     assertSource("with A", ASTFactory.withClause([ASTFactory.typeName4("A", [])]));
diff --git a/pkg/analyzer_experimental/test/generated/element_test.dart b/pkg/analyzer_experimental/test/generated/element_test.dart
index c7c2a10..7cd1a48 100644
--- a/pkg/analyzer_experimental/test/generated/element_test.dart
+++ b/pkg/analyzer_experimental/test/generated/element_test.dart
@@ -113,7 +113,13 @@
     LibraryElementImpl library4 = ElementFactory.library(context, "l4");
     PrefixElement prefixA = new PrefixElementImpl(ASTFactory.identifier3("a"));
     PrefixElement prefixB = new PrefixElementImpl(ASTFactory.identifier3("b"));
-    List<ImportElementImpl> imports = [ElementFactory.importFor(library2, null, []), ElementFactory.importFor(library2, prefixB, []), ElementFactory.importFor(library3, null, []), ElementFactory.importFor(library3, prefixA, []), ElementFactory.importFor(library3, prefixB, []), ElementFactory.importFor(library4, prefixA, [])];
+    List<ImportElementImpl> imports = [
+        ElementFactory.importFor(library2, null, []),
+        ElementFactory.importFor(library2, prefixB, []),
+        ElementFactory.importFor(library3, null, []),
+        ElementFactory.importFor(library3, prefixA, []),
+        ElementFactory.importFor(library3, prefixB, []),
+        ElementFactory.importFor(library4, prefixA, [])];
     library1.imports = imports;
     List<LibraryElement> libraries = library1.importedLibraries;
     EngineTestCase.assertEqualsIgnoreOrder(<LibraryElement> [library2, library3, library4], libraries);
@@ -123,7 +129,12 @@
     LibraryElementImpl library = ElementFactory.library(context, "l1");
     PrefixElement prefixA = new PrefixElementImpl(ASTFactory.identifier3("a"));
     PrefixElement prefixB = new PrefixElementImpl(ASTFactory.identifier3("b"));
-    List<ImportElementImpl> imports = [ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []), ElementFactory.importFor(ElementFactory.library(context, "l3"), null, []), ElementFactory.importFor(ElementFactory.library(context, "l4"), prefixA, []), ElementFactory.importFor(ElementFactory.library(context, "l5"), prefixA, []), ElementFactory.importFor(ElementFactory.library(context, "l6"), prefixB, [])];
+    List<ImportElementImpl> imports = [
+        ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []),
+        ElementFactory.importFor(ElementFactory.library(context, "l3"), null, []),
+        ElementFactory.importFor(ElementFactory.library(context, "l4"), prefixA, []),
+        ElementFactory.importFor(ElementFactory.library(context, "l5"), prefixA, []),
+        ElementFactory.importFor(ElementFactory.library(context, "l6"), prefixB, [])];
     library.imports = imports;
     List<PrefixElement> prefixes = library.prefixes;
     EngineTestCase.assertLength(2, prefixes);
@@ -145,7 +156,9 @@
   void test_setImports() {
     AnalysisContext context = createAnalysisContext();
     LibraryElementImpl library = new LibraryElementImpl(context, ASTFactory.libraryIdentifier2(["l1"]));
-    List<ImportElementImpl> expectedImports = [ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []), ElementFactory.importFor(ElementFactory.library(context, "l3"), null, [])];
+    List<ImportElementImpl> expectedImports = [
+        ElementFactory.importFor(ElementFactory.library(context, "l2"), null, []),
+        ElementFactory.importFor(ElementFactory.library(context, "l3"), null, [])];
     library.imports = expectedImports;
     List<ImportElement> actualImports = library.imports;
     EngineTestCase.assertLength(expectedImports.length, actualImports);
@@ -427,7 +440,11 @@
     InterfaceType typeA = classA.type;
     InterfaceType typeC = classC.type;
     InterfaceType typeD = classD.type;
-    classD.mixins = <InterfaceType> [ElementFactory.classElement2("M", []).type, ElementFactory.classElement2("N", []).type, ElementFactory.classElement2("O", []).type, ElementFactory.classElement2("P", []).type];
+    classD.mixins = <InterfaceType> [
+        ElementFactory.classElement2("M", []).type,
+        ElementFactory.classElement2("N", []).type,
+        ElementFactory.classElement2("O", []).type,
+        ElementFactory.classElement2("P", []).type];
     JUnitTestCase.assertEquals(typeA, typeD.getLeastUpperBound(typeC));
     JUnitTestCase.assertEquals(typeA, typeC.getLeastUpperBound(typeD));
   }
@@ -1107,7 +1124,9 @@
   }
   void test_setTypeArguments() {
     InterfaceTypeImpl type = ElementFactory.classElement2("A", []).type as InterfaceTypeImpl;
-    List<Type2> typeArguments = <Type2> [ElementFactory.classElement2("B", []).type, ElementFactory.classElement2("C", []).type];
+    List<Type2> typeArguments = <Type2> [
+        ElementFactory.classElement2("B", []).type,
+        ElementFactory.classElement2("C", []).type];
     type.typeArguments = typeArguments;
     JUnitTestCase.assertEquals(typeArguments, type.typeArguments);
   }
@@ -2436,12 +2455,16 @@
     variableS.bound = stringType;
     TypeVariableTypeImpl typeS = new TypeVariableTypeImpl(variableS);
     FunctionElementImpl functionAliasElement = new FunctionElementImpl.con1(ASTFactory.identifier3("func"));
-    functionAliasElement.parameters = <ParameterElement> [ElementFactory.requiredParameter2("a", typeB), ElementFactory.positionalParameter2("b", typeS)];
+    functionAliasElement.parameters = <ParameterElement> [
+        ElementFactory.requiredParameter2("a", typeB),
+        ElementFactory.positionalParameter2("b", typeS)];
     functionAliasElement.returnType = stringType;
     FunctionTypeImpl functionAliasType = new FunctionTypeImpl.con1(functionAliasElement);
     functionAliasElement.type = functionAliasType;
     FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
-    functionElement.parameters = <ParameterElement> [ElementFactory.requiredParameter2("c", boolType), ElementFactory.positionalParameter2("d", stringType)];
+    functionElement.parameters = <ParameterElement> [
+        ElementFactory.requiredParameter2("c", boolType),
+        ElementFactory.positionalParameter2("d", stringType)];
     functionElement.returnType = provider.dynamicType;
     FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
     functionElement.type = functionType;
@@ -2477,7 +2500,10 @@
     TypeVariableType parameterType = definingClass.typeVariables[0].type;
     MethodElementImpl functionElement = new MethodElementImpl.con1(ASTFactory.identifier3("m"));
     String namedParameterName = "c";
-    functionElement.parameters = <ParameterElement> [ElementFactory.requiredParameter2("a", parameterType), ElementFactory.positionalParameter2("b", parameterType), ElementFactory.namedParameter2(namedParameterName, parameterType)];
+    functionElement.parameters = <ParameterElement> [
+        ElementFactory.requiredParameter2("a", parameterType),
+        ElementFactory.positionalParameter2("b", parameterType),
+        ElementFactory.namedParameter2(namedParameterName, parameterType)];
     functionElement.returnType = parameterType;
     definingClass.methods = <MethodElement> [functionElement];
     FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
@@ -2502,7 +2528,10 @@
     Type2 namedParameterType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("C")));
     FunctionElementImpl functionElement = new FunctionElementImpl.con1(ASTFactory.identifier3("f"));
     String namedParameterName = "c";
-    functionElement.parameters = <ParameterElement> [ElementFactory.requiredParameter2("a", normalParameterType), ElementFactory.positionalParameter2("b", optionalParameterType), ElementFactory.namedParameter2(namedParameterName, namedParameterType)];
+    functionElement.parameters = <ParameterElement> [
+        ElementFactory.requiredParameter2("a", normalParameterType),
+        ElementFactory.positionalParameter2("b", optionalParameterType),
+        ElementFactory.namedParameter2(namedParameterName, namedParameterType)];
     functionElement.returnType = returnType;
     FunctionTypeImpl functionType = new FunctionTypeImpl.con1(functionElement);
     InterfaceTypeImpl argumentType = new InterfaceTypeImpl.con1(new ClassElementImpl(ASTFactory.identifier3("D")));
diff --git a/pkg/analyzer_experimental/test/generated/parser_test.dart b/pkg/analyzer_experimental/test/generated/parser_test.dart
index 8af6e64..abe510f 100644
--- a/pkg/analyzer_experimental/test/generated/parser_test.dart
+++ b/pkg/analyzer_experimental/test/generated/parser_test.dart
@@ -517,7 +517,9 @@
     JUnitTestCase.assertNotNull(section.propertyName);
   }
   void test_parseClassDeclaration_abstract() {
-    ClassDeclaration declaration = ParserTestCase.parse("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), TokenFactory.token(Keyword.ABSTRACT)], "class A {}");
+    ClassDeclaration declaration = ParserTestCase.parse("parseClassDeclaration", <Object> [
+        emptyCommentAndMetadata(),
+        TokenFactory.token(Keyword.ABSTRACT)], "class A {}");
     JUnitTestCase.assertNull(declaration.documentationComment);
     JUnitTestCase.assertNotNull(declaration.abstractKeyword);
     JUnitTestCase.assertNull(declaration.extendsClause);
@@ -609,6 +611,15 @@
     JUnitTestCase.assertNotNull(declaration.rightBracket);
     JUnitTestCase.assertNull(declaration.typeParameters);
   }
+  void test_parseClassDeclaration_native() {
+    ClassDeclaration declaration = ParserTestCase.parse("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class A native 'nativeValue' {}");
+    NativeClause nativeClause = declaration.nativeClause;
+    JUnitTestCase.assertNotNull(nativeClause);
+    JUnitTestCase.assertNotNull(nativeClause.keyword);
+    JUnitTestCase.assertEquals("nativeValue", nativeClause.name.stringValue);
+    JUnitTestCase.assertSame(nativeClause.keyword, nativeClause.beginToken);
+    JUnitTestCase.assertSame(nativeClause.name.endToken, nativeClause.endToken);
+  }
   void test_parseClassDeclaration_nonEmpty() {
     ClassDeclaration declaration = ParserTestCase.parse("parseClassDeclaration", <Object> [emptyCommentAndMetadata(), null], "class A {var f;}");
     JUnitTestCase.assertNull(declaration.documentationComment);
@@ -1100,7 +1111,9 @@
     JUnitTestCase.assertEquals(20, reference.offset);
   }
   void test_parseCommentReferences_singleLine() {
-    List<Token> tokens = <Token> [new StringToken(TokenType.SINGLE_LINE_COMMENT, "/// xxx [a] yyy [b] zzz", 3), new StringToken(TokenType.SINGLE_LINE_COMMENT, "/// x [c]", 28)];
+    List<Token> tokens = <Token> [
+        new StringToken(TokenType.SINGLE_LINE_COMMENT, "/// xxx [a] yyy [b] zzz", 3),
+        new StringToken(TokenType.SINGLE_LINE_COMMENT, "/// x [c]", 28)];
     List<CommentReference> references = ParserTestCase.parse("parseCommentReferences", <Object> [tokens], "");
     EngineTestCase.assertSize(3, references);
     CommentReference reference = references[0];
@@ -1369,6 +1382,16 @@
     JUnitTestCase.assertNotNull(declaration.semicolon);
     JUnitTestCase.assertNotNull(declaration.variables);
   }
+  void test_parseCompilationUnitMember_variableGet() {
+    TopLevelVariableDeclaration declaration = ParserTestCase.parse("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "String get = null;");
+    JUnitTestCase.assertNotNull(declaration.semicolon);
+    JUnitTestCase.assertNotNull(declaration.variables);
+  }
+  void test_parseCompilationUnitMember_variableSet() {
+    TopLevelVariableDeclaration declaration = ParserTestCase.parse("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "String set = null;");
+    JUnitTestCase.assertNotNull(declaration.semicolon);
+    JUnitTestCase.assertNotNull(declaration.variables);
+  }
   void test_parseConditionalExpression() {
     ConditionalExpression expression = ParserTestCase.parse5("parseConditionalExpression", "x ? y : z", []);
     JUnitTestCase.assertNotNull(expression.condition);
@@ -2169,7 +2192,11 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.token(Keyword.STATIC);
     TypeName returnType = new TypeName.full(new SimpleIdentifier.full(null), null);
-    MethodDeclaration method = ParserTestCase.parse("parseGetter", <Object> [commentAndMetadata(comment, []), null, staticKeyword, returnType], "get a => 42;");
+    MethodDeclaration method = ParserTestCase.parse("parseGetter", <Object> [
+        commentAndMetadata(comment, []),
+        null,
+        staticKeyword,
+        returnType], "get a => 42;");
     JUnitTestCase.assertNotNull(method.body);
     JUnitTestCase.assertEquals(comment, method.documentationComment);
     JUnitTestCase.assertNull(method.externalKeyword);
@@ -2296,7 +2323,11 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.token(Keyword.STATIC);
     TypeName type = new TypeName.full(new SimpleIdentifier.full(null), null);
-    FieldDeclaration declaration = ParserTestCase.parse("parseInitializedIdentifierList", <Object> [commentAndMetadata(comment, []), staticKeyword, null, type], "a = 1, b, c = 3;");
+    FieldDeclaration declaration = ParserTestCase.parse("parseInitializedIdentifierList", <Object> [
+        commentAndMetadata(comment, []),
+        staticKeyword,
+        null,
+        type], "a = 1, b, c = 3;");
     JUnitTestCase.assertEquals(comment, declaration.documentationComment);
     VariableDeclarationList fields = declaration.fields;
     JUnitTestCase.assertNotNull(fields);
@@ -2310,7 +2341,11 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.token(Keyword.STATIC);
     Token varKeyword = TokenFactory.token(Keyword.VAR);
-    FieldDeclaration declaration = ParserTestCase.parse("parseInitializedIdentifierList", <Object> [commentAndMetadata(comment, []), staticKeyword, varKeyword, null], "a = 1, b, c = 3;");
+    FieldDeclaration declaration = ParserTestCase.parse("parseInitializedIdentifierList", <Object> [
+        commentAndMetadata(comment, []),
+        staticKeyword,
+        varKeyword,
+        null], "a = 1, b, c = 3;");
     JUnitTestCase.assertEquals(comment, declaration.documentationComment);
     VariableDeclarationList fields = declaration.fields;
     JUnitTestCase.assertNotNull(fields);
@@ -2382,7 +2417,7 @@
   }
   void test_parseListLiteral_empty_oneToken() {
     Token token = TokenFactory.token(Keyword.CONST);
-    TypeArgumentList typeArguments = new TypeArgumentList.full(null, null, null);
+    TypeArgumentList typeArguments = null;
     ListLiteral literal = ParserTestCase.parse("parseListLiteral", <Object> [token, typeArguments], "[]");
     JUnitTestCase.assertEquals(token, literal.modifier);
     JUnitTestCase.assertEquals(typeArguments, literal.typeArguments);
@@ -2392,7 +2427,7 @@
   }
   void test_parseListLiteral_empty_twoTokens() {
     Token token = TokenFactory.token(Keyword.CONST);
-    TypeArgumentList typeArguments = new TypeArgumentList.full(null, null, null);
+    TypeArgumentList typeArguments = null;
     ListLiteral literal = ParserTestCase.parse("parseListLiteral", <Object> [token, typeArguments], "[ ]");
     JUnitTestCase.assertEquals(token, literal.modifier);
     JUnitTestCase.assertEquals(typeArguments, literal.typeArguments);
@@ -2464,7 +2499,9 @@
   }
   void test_parseMapLiteral_empty() {
     Token token = TokenFactory.token(Keyword.CONST);
-    TypeArgumentList typeArguments = ASTFactory.typeArgumentList([ASTFactory.typeName4("String", []), ASTFactory.typeName4("int", [])]);
+    TypeArgumentList typeArguments = ASTFactory.typeArgumentList([
+        ASTFactory.typeName4("String", []),
+        ASTFactory.typeName4("int", [])]);
     MapLiteral literal = ParserTestCase.parse("parseMapLiteral", <Object> [token, typeArguments], "{}");
     JUnitTestCase.assertEquals(token, literal.modifier);
     JUnitTestCase.assertEquals(typeArguments, literal.typeArguments);
@@ -3009,7 +3046,11 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.token(Keyword.STATIC);
     TypeName returnType = new TypeName.full(new SimpleIdentifier.full(null), null);
-    MethodDeclaration method = ParserTestCase.parse("parseSetter", <Object> [commentAndMetadata(comment, []), null, staticKeyword, returnType], "set a(var x) {}");
+    MethodDeclaration method = ParserTestCase.parse("parseSetter", <Object> [
+        commentAndMetadata(comment, []),
+        null,
+        staticKeyword,
+        returnType], "set a(var x) {}");
     JUnitTestCase.assertNotNull(method.body);
     JUnitTestCase.assertEquals(comment, method.documentationComment);
     JUnitTestCase.assertNull(method.externalKeyword);
@@ -4269,6 +4310,10 @@
         final __test = new SimpleParserTest();
         runJUnitTest(__test, __test.test_parseClassDeclaration_implements);
       });
+      _ut.test('test_parseClassDeclaration_native', () {
+        final __test = new SimpleParserTest();
+        runJUnitTest(__test, __test.test_parseClassDeclaration_native);
+      });
       _ut.test('test_parseClassDeclaration_nonEmpty', () {
         final __test = new SimpleParserTest();
         runJUnitTest(__test, __test.test_parseClassDeclaration_nonEmpty);
@@ -4577,6 +4622,14 @@
         final __test = new SimpleParserTest();
         runJUnitTest(__test, __test.test_parseCompilationUnitMember_variable);
       });
+      _ut.test('test_parseCompilationUnitMember_variableGet', () {
+        final __test = new SimpleParserTest();
+        runJUnitTest(__test, __test.test_parseCompilationUnitMember_variableGet);
+      });
+      _ut.test('test_parseCompilationUnitMember_variableSet', () {
+        final __test = new SimpleParserTest();
+        runJUnitTest(__test, __test.test_parseCompilationUnitMember_variableSet);
+      });
       _ut.test('test_parseCompilationUnit_abstractAsPrefix_parameterized', () {
         final __test = new SimpleParserTest();
         runJUnitTest(__test, __test.test_parseCompilationUnit_abstractAsPrefix_parameterized);
@@ -6053,7 +6106,12 @@
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.condition);
   }
   void test_constructor_initializer_withParenthesizedExpression() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["class C {", "  C() :", "    this.a = (b == null ? c : d) {", "  }", "}"]), []);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(EngineTestCase.createSource([
+        "class C {",
+        "  C() :",
+        "    this.a = (b == null ? c : d) {",
+        "  }",
+        "}"]), []);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     EngineTestCase.assertSize(1, declarations);
   }
@@ -6652,7 +6710,15 @@
  */
 class RecoveryParserTest extends ParserTestCase {
   void fail_incomplete_returnType() {
-    ParserTestCase.parseCompilationUnit(EngineTestCase.createSource(["Map<Symbol, convertStringToSymbolMap(Map<String, dynamic> map) {", "  if (map == null) return null;", "  Map<Symbol, dynamic> result = new Map<Symbol, dynamic>();", "  map.forEach((name, value) {", "    result[new Symbol(name)] = value;", "  });", "  return result;", "}"]), []);
+    ParserTestCase.parseCompilationUnit(EngineTestCase.createSource([
+        "Map<Symbol, convertStringToSymbolMap(Map<String, dynamic> map) {",
+        "  if (map == null) return null;",
+        "  Map<Symbol, dynamic> result = new Map<Symbol, dynamic>();",
+        "  map.forEach((name, value) {",
+        "    result[new Symbol(name)] = value;",
+        "  });",
+        "  return result;",
+        "}"]), []);
   }
   void test_additiveExpression_missing_LHS() {
     BinaryExpression expression = ParserTestCase.parseExpression("+ y", [ParserErrorCode.MISSING_IDENTIFIER]);
@@ -6660,7 +6726,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_additiveExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("+", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("+", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6677,15 +6745,23 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_additiveExpression_precedence_multiplicative_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("* +", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("* +", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_additiveExpression_precedence_multiplicative_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("+ *", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("+ *", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_additiveExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super + +", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super + +", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_assignmentExpression_missing_compound1() {
@@ -6722,7 +6798,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_bitwiseAndExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("&", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("&", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6739,15 +6817,23 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_bitwiseAndExpression_precedence_equality_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("== &", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("== &", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_bitwiseAndExpression_precedence_equality_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("& ==", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("& ==", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_bitwiseAndExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super &  &", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super &  &", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_bitwiseOrExpression_missing_LHS() {
@@ -6756,7 +6842,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_bitwiseOrExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("|", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("|", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6773,15 +6861,23 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_bitwiseOrExpression_precedence_xor_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("^ |", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("^ |", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_bitwiseOrExpression_precedence_xor_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("| ^", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("| ^", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_bitwiseOrExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super |  |", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super |  |", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_bitwiseXorExpression_missing_LHS() {
@@ -6790,7 +6886,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_bitwiseXorExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("^", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("^", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6807,15 +6905,23 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_bitwiseXorExpression_precedence_and_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("& ^", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("& ^", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_bitwiseXorExpression_precedence_and_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("^ &", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("^ &", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_bitwiseXorExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super ^  ^", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super ^  ^", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_classTypeAlias_withBody() {
@@ -6837,7 +6943,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_equalityExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("==", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("==", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6854,15 +6962,24 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_equalityExpression_precedence_relational_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("is ==", [ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("is ==", [
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(IsExpression, expression.leftOperand);
   }
   void test_equalityExpression_precedence_relational_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("== is", [ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("== is", [
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(IsExpression, expression.rightOperand);
   }
   void test_equalityExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super ==  ==", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super ==  ==", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_expressionList_multiple_end() {
@@ -6898,7 +7015,10 @@
     JUnitTestCase.assertTrue(name.isSynthetic);
   }
   void test_isExpression_noType() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit("class Bar<T extends Foo> {m(x){if (x is ) return;if (x is !)}}", [ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.MISSING_STATEMENT]);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit("class Bar<T extends Foo> {m(x){if (x is ) return;if (x is !)}}", [
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.MISSING_STATEMENT]);
     ClassDeclaration declaration = unit.declarations[0] as ClassDeclaration;
     MethodDeclaration method = declaration.members[0] as MethodDeclaration;
     BlockFunctionBody body = method.body as BlockFunctionBody;
@@ -6918,7 +7038,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_logicalAndExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("&&", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("&&", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6930,11 +7052,17 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_logicalAndExpression_precedence_bitwiseOr_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("| &&", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("| &&", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_logicalAndExpression_precedence_bitwiseOr_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("&& |", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("&& |", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_logicalOrExpression_missing_LHS() {
@@ -6943,7 +7071,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_logicalOrExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("||", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("||", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6955,11 +7085,17 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_logicalOrExpression_precedence_logicalAnd_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("&& ||", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("&& ||", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_logicalOrExpression_precedence_logicalAnd_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("|| &&", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("|| &&", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_multiplicativeExpression_missing_LHS() {
@@ -6968,7 +7104,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_multiplicativeExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("*", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("*", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -6993,7 +7131,10 @@
     EngineTestCase.assertInstanceOf(PrefixExpression, expression.rightOperand);
   }
   void test_multiplicativeExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super ==  ==", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super ==  ==", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_prefixExpression_missing_operand_minus() {
@@ -7008,7 +7149,9 @@
     JUnitTestCase.assertTrue(expression.expression.isSynthetic);
   }
   void test_relationalExpression_missing_LHS_RHS() {
-    IsExpression expression = ParserTestCase.parseExpression("is", [ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.MISSING_IDENTIFIER]);
+    IsExpression expression = ParserTestCase.parseExpression("is", [
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.expression);
     JUnitTestCase.assertTrue(expression.expression.isSynthetic);
     EngineTestCase.assertInstanceOf(TypeName, expression.type);
@@ -7020,7 +7163,10 @@
     JUnitTestCase.assertTrue(expression.type.isSynthetic);
   }
   void test_relationalExpression_precedence_shift_right() {
-    IsExpression expression = ParserTestCase.parseExpression("<< is", [ParserErrorCode.EXPECTED_TYPE_NAME, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    IsExpression expression = ParserTestCase.parseExpression("<< is", [
+        ParserErrorCode.EXPECTED_TYPE_NAME,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.expression);
   }
   void test_shiftExpression_missing_LHS() {
@@ -7029,7 +7175,9 @@
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
   }
   void test_shiftExpression_missing_LHS_RHS() {
-    BinaryExpression expression = ParserTestCase.parseExpression("<<", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("<<", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.leftOperand);
     JUnitTestCase.assertTrue(expression.leftOperand.isSynthetic);
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression.rightOperand);
@@ -7046,19 +7194,29 @@
     JUnitTestCase.assertTrue(expression.rightOperand.isSynthetic);
   }
   void test_shiftExpression_precedence_unary_left() {
-    BinaryExpression expression = ParserTestCase.parseExpression("+ <<", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("+ <<", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_shiftExpression_precedence_unary_right() {
-    BinaryExpression expression = ParserTestCase.parseExpression("<< +", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("<< +", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.rightOperand);
   }
   void test_shiftExpression_super() {
-    BinaryExpression expression = ParserTestCase.parseExpression("super << <<", [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.MISSING_IDENTIFIER]);
+    BinaryExpression expression = ParserTestCase.parseExpression("super << <<", [
+        ParserErrorCode.MISSING_IDENTIFIER,
+        ParserErrorCode.MISSING_IDENTIFIER]);
     EngineTestCase.assertInstanceOf(BinaryExpression, expression.leftOperand);
   }
   void test_typedef_eof() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit("typedef n", [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_TYPEDEF_PARAMETERS]);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit("typedef n", [
+        ParserErrorCode.EXPECTED_TOKEN,
+        ParserErrorCode.MISSING_TYPEDEF_PARAMETERS]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     EngineTestCase.assertSize(1, declarations);
     CompilationUnitMember member = declarations[0];
@@ -7421,6 +7579,12 @@
   void fail_unexpectedToken_invalidPostfixExpression() {
     ParserTestCase.parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]);
   }
+  void fail_varAndType_local() {
+    ParserTestCase.parseStatement("var int x;", [ParserErrorCode.VAR_AND_TYPE]);
+  }
+  void fail_varAndType_parameter() {
+    ParserTestCase.parse5("parseFormalParameterList", "(var int x)", [ParserErrorCode.VAR_AND_TYPE]);
+  }
   void fail_voidVariable_initializer() {
     ParserTestCase.parseStatement("void x = 0;", [ParserErrorCode.VOID_VARIABLE]);
   }
@@ -7597,6 +7761,10 @@
   void test_expectedInterpolationIdentifier() {
     ParserTestCase.parse5("parseStringLiteral", "'\$x\$'", [ParserErrorCode.MISSING_IDENTIFIER]);
   }
+  void test_expectedOneListTypeArguments_two() {
+    Expression expression = ParserTestCase.parse5("parsePrimaryExpression", "<int, int>[]", [ParserErrorCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
+    EngineTestCase.assertInstanceOf(ListLiteral, expression);
+  }
   void test_expectedStringLiteral() {
     StringLiteral expression = ParserTestCase.parse5("parseStringLiteral", "1", [ParserErrorCode.EXPECTED_STRING_LITERAL]);
     JUnitTestCase.assertTrue(expression.isSynthetic);
@@ -7712,7 +7880,9 @@
     ParserTestCase.parse4("parseClassMember", <Object> ["C"], "int get x() {}", [ParserErrorCode.GETTER_WITH_PARAMETERS]);
   }
   void test_illegalAssignmentToNonAssignable_superAssigned() {
-    ParserTestCase.parseExpression("super = x;", [ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
+    ParserTestCase.parseExpression("super = x;", [
+        ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
+        ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE]);
   }
   void test_implementsBeforeExtends() {
     ParserTestCase.parseCompilationUnit("class A implements B extends C {}", [ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS]);
@@ -7760,7 +7930,9 @@
     ParserTestCase.parse5("parseStringLiteral", "'\\u{}'", [ParserErrorCode.INVALID_UNICODE_ESCAPE]);
   }
   void test_invalidUnicodeEscape_tooManyDigits_variable() {
-    ParserTestCase.parse5("parseStringLiteral", "'\\u{12345678}'", [ParserErrorCode.INVALID_UNICODE_ESCAPE, ParserErrorCode.INVALID_CODE_POINT]);
+    ParserTestCase.parse5("parseStringLiteral", "'\\u{12345678}'", [
+        ParserErrorCode.INVALID_UNICODE_ESCAPE,
+        ParserErrorCode.INVALID_CODE_POINT]);
   }
   void test_libraryDirectiveNotFirst() {
     ParserTestCase.parseCompilationUnit("import 'x.dart'; library l;", [ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST]);
@@ -7956,6 +8128,9 @@
   void test_positionalParameterOutsideGroup() {
     ParserTestCase.parse5("parseFormalParameterList", "(a, b = 0)", [ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP]);
   }
+  void test_redirectionInNonFactoryConstructor() {
+    ParserTestCase.parse4("parseClassMember", <Object> ["C"], "C() = D;", [ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR]);
+  }
   void test_staticAfterConst() {
     ParserTestCase.parse4("parseClassMember", <Object> ["C"], "final static int f;", [ParserErrorCode.STATIC_AFTER_FINAL]);
   }
@@ -7996,13 +8171,17 @@
     ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1;}", [ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
   }
   void test_switchHasCaseAfterDefaultCase_repeated() {
-    ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1; case 2: return 2;}", [ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
+    ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; case 1: return 1; case 2: return 2;}", [
+        ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
+        ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
   }
   void test_switchHasMultipleDefaultCases() {
     ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; default: return 1;}", [ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
   }
   void test_switchHasMultipleDefaultCases_repeated() {
-    ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; default: return 1; default: return 2;}", [ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
+    ParserTestCase.parse5("parseSwitchStatement", "switch (a) {default: return 0; default: return 1; default: return 2;}", [
+        ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
+        ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
   }
   void test_topLevelOperator_withoutType() {
     ParserTestCase.parse4("parseCompilationUnitMember", <Object> [emptyCommentAndMetadata()], "operator +(bool x, bool y) => x | y;", [ParserErrorCode.TOP_LEVEL_OPERATOR]);
@@ -8030,6 +8209,12 @@
     EngineTestCase.assertInstanceOf(SimpleIdentifier, expression);
     JUnitTestCase.assertTrue(expression.isSynthetic);
   }
+  void test_varAndType_field() {
+    ParserTestCase.parseCompilationUnit("class C { var int x; }", [ParserErrorCode.VAR_AND_TYPE]);
+  }
+  void test_varAndType_topLevelVariable() {
+    ParserTestCase.parseCompilationUnit("var int x;", [ParserErrorCode.VAR_AND_TYPE]);
+  }
   void test_varAsTypeName_as() {
     ParserTestCase.parseExpression("x as var", [ParserErrorCode.VAR_AS_TYPE_NAME]);
   }
@@ -8295,6 +8480,10 @@
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_expectedInterpolationIdentifier);
       });
+      _ut.test('test_expectedOneListTypeArguments_two', () {
+        final __test = new ErrorParserTest();
+        runJUnitTest(__test, __test.test_expectedOneListTypeArguments_two);
+      });
       _ut.test('test_expectedStringLiteral', () {
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_expectedStringLiteral);
@@ -8759,6 +8948,10 @@
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_positionalParameterOutsideGroup);
       });
+      _ut.test('test_redirectionInNonFactoryConstructor', () {
+        final __test = new ErrorParserTest();
+        runJUnitTest(__test, __test.test_redirectionInNonFactoryConstructor);
+      });
       _ut.test('test_staticAfterConst', () {
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_staticAfterConst);
@@ -8855,6 +9048,14 @@
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_useOfUnaryPlusOperator);
       });
+      _ut.test('test_varAndType_field', () {
+        final __test = new ErrorParserTest();
+        runJUnitTest(__test, __test.test_varAndType_field);
+      });
+      _ut.test('test_varAndType_topLevelVariable', () {
+        final __test = new ErrorParserTest();
+        runJUnitTest(__test, __test.test_varAndType_topLevelVariable);
+      });
       _ut.test('test_varAsTypeName_as', () {
         final __test = new ErrorParserTest();
         runJUnitTest(__test, __test.test_varAsTypeName_as);
@@ -8942,6 +9143,7 @@
   'isLinkText_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.isLinkText(arg0, arg1)),
   'isOperator_1': new MethodTrampoline(1, (Parser target, arg0) => target.isOperator(arg0)),
   'isSwitchMember_0': new MethodTrampoline(0, (Parser target) => target.isSwitchMember()),
+  'isTypedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => target.isTypedIdentifier(arg0)),
   'lexicallyFirst_1': new MethodTrampoline(1, (Parser target, arg0) => target.lexicallyFirst(arg0)),
   'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target.matches(arg0)),
   'matches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => target.matches3(arg0, arg1)),
@@ -9019,6 +9221,7 @@
   'parseMethodDeclaration_6': new MethodTrampoline(6, (Parser target, arg0, arg1, arg2, arg3, arg4, arg5) => target.parseMethodDeclaration2(arg0, arg1, arg2, arg3, arg4, arg5)),
   'parseModifiers_0': new MethodTrampoline(0, (Parser target) => target.parseModifiers()),
   'parseMultiplicativeExpression_0': new MethodTrampoline(0, (Parser target) => target.parseMultiplicativeExpression()),
+  'parseNativeClause_0': new MethodTrampoline(0, (Parser target) => target.parseNativeClause()),
   'parseNewExpression_0': new MethodTrampoline(0, (Parser target) => target.parseNewExpression()),
   'parseNonLabeledStatement_0': new MethodTrampoline(0, (Parser target) => target.parseNonLabeledStatement()),
   'parseNormalFormalParameter_0': new MethodTrampoline(0, (Parser target) => target.parseNormalFormalParameter()),
diff --git a/pkg/analyzer_experimental/test/generated/resolver_test.dart b/pkg/analyzer_experimental/test/generated/resolver_test.dart
index 0924a2b..89d8c51 100644
--- a/pkg/analyzer_experimental/test/generated/resolver_test.dart
+++ b/pkg/analyzer_experimental/test/generated/resolver_test.dart
@@ -22,7 +22,12 @@
 import 'element_test.dart' show ElementFactory;
 class TypePropagationTest extends ResolverTestCase {
   void fail_functionExpression_asInvocationArgument_functionExpressionInvocation() {
-    String code = EngineTestCase.createSource(["main() {", "  (f(String value)) {} ((v) {", "    v;", "  });", "}"]);
+    String code = EngineTestCase.createSource([
+        "main() {",
+        "  (f(String value)) {} ((v) {",
+        "    v;",
+        "  });",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -42,7 +47,17 @@
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.intType);
   }
   void test_as() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  bool get g => true;", "}", "A f(var p) {", "  if ((p as A).g) {", "    return p;", "  } else {", "    return null;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  bool get g => true;",
+        "}",
+        "A f(var p) {",
+        "  if ((p as A).g) {",
+        "    return p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -57,7 +72,12 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_assert() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  assert (p is A);", "  return p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  assert (p is A);",
+        "  return p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -95,7 +115,12 @@
     JUnitTestCase.assertSame(typeProvider.doubleType, variableName.propagatedType);
   }
   void test_forEach() {
-    String code = EngineTestCase.createSource(["f(List<String> p) {", "  for (var e in p) {", "    e;", "  }", "}"]);
+    String code = EngineTestCase.createSource([
+        "f(List<String> p) {",
+        "  for (var e in p) {",
+        "    e;",
+        "  }",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -112,7 +137,16 @@
     }
   }
   void test_functionExpression_asInvocationArgument() {
-    String code = EngineTestCase.createSource(["class MyMap<K, V> {", "  forEach(f(K key, V value)) {}", "}", "f(MyMap<int, String> m) {", "  m.forEach((k, v) {", "    k;", "    v;", "  });", "}"]);
+    String code = EngineTestCase.createSource([
+        "class MyMap<K, V> {",
+        "  forEach(f(K key, V value)) {}",
+        "}",
+        "f(MyMap<int, String> m) {",
+        "  m.forEach((k, v) {",
+        "    k;",
+        "    v;",
+        "  });",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -132,7 +166,14 @@
     JUnitTestCase.assertSame(typeProvider.dynamicType, vIdentifier.staticType);
   }
   void test_functionExpression_asInvocationArgument_fromInferredInvocation() {
-    String code = EngineTestCase.createSource(["class MyMap<K, V> {", "  forEach(f(K key, V value)) {}", "}", "f(MyMap<int, String> m) {", "  var m2 = m;", "  m2.forEach((k, v) {});", "}"]);
+    String code = EngineTestCase.createSource([
+        "class MyMap<K, V> {",
+        "  forEach(f(K key, V value)) {}",
+        "}",
+        "f(MyMap<int, String> m) {",
+        "  var m2 = m;",
+        "  m2.forEach((k, v) {});",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -146,7 +187,15 @@
     JUnitTestCase.assertSame(stringType, vParameter.identifier.propagatedType);
   }
   void test_functionExpression_asInvocationArgument_keepIfLessSpecific() {
-    String code = EngineTestCase.createSource(["class MyList {", "  forEach(f(Object value)) {}", "}", "f(MyList list) {", "  list.forEach((int v) {", "    v;", "  });", "}"]);
+    String code = EngineTestCase.createSource([
+        "class MyList {",
+        "  forEach(f(Object value)) {}",
+        "}",
+        "f(MyList list) {",
+        "  list.forEach((int v) {",
+        "    v;",
+        "  });",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -161,7 +210,15 @@
     JUnitTestCase.assertSame(null, vIdentifier.propagatedType);
   }
   void test_functionExpression_asInvocationArgument_replaceIfMoreSpecific() {
-    String code = EngineTestCase.createSource(["class MyList<E> {", "  forEach(f(E value)) {}", "}", "f(MyList<String> list) {", "  list.forEach((Object v) {", "    v;", "  });", "}"]);
+    String code = EngineTestCase.createSource([
+        "class MyList<E> {",
+        "  forEach(f(E value)) {}",
+        "}",
+        "f(MyList<String> list) {",
+        "  list.forEach((Object v) {",
+        "    v;",
+        "  });",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -175,7 +232,16 @@
     JUnitTestCase.assertSame(stringType, vIdentifier.propagatedType);
   }
   void test_Future_then() {
-    String code = EngineTestCase.createSource(["import 'dart:async';", "main(Future<int> firstFuture) {", "  firstFuture.then((p1) {", "    return 1.0;", "  }).then((p2) {", "    return new Future<String>.value('str');", "  }).then((p3) {", "  });", "}"]);
+    String code = EngineTestCase.createSource([
+        "import 'dart:async';",
+        "main(Future<int> firstFuture) {",
+        "  firstFuture.then((p1) {",
+        "    return 1.0;",
+        "  }).then((p2) {",
+        "    return new Future<String>.value('str');",
+        "  }).then((p3) {",
+        "  });",
+        "}"]);
     Source source = addSource(code);
     LibraryElement library = resolve(source);
     assertNoErrors();
@@ -221,7 +287,11 @@
     JUnitTestCase.assertSame(typeProvider.stringType, variableName.propagatedType);
   }
   void test_is_conditional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  return (p is A) ? p : null;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  return (p is A) ? p : null;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -236,7 +306,15 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_is_if() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is A) {", "    return p;", "  } else {", "    return null;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is A) {",
+        "    return p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -251,7 +329,15 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_is_if_lessSpecific() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(A p) {", "  if (p is Object) {", "    return p;", "  } else {", "    return null;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(A p) {",
+        "  if (p is Object) {",
+        "    return p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -264,7 +350,15 @@
     JUnitTestCase.assertSame(null, variableName.propagatedType);
   }
   void test_is_if_logicalAnd() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is A && p != null) {", "    return p;", "  } else {", "    return null;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is A && p != null) {",
+        "    return p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -279,7 +373,12 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_is_postConditional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  A a = (p is A) ? p : throw null;", "  return p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  A a = (p is A) ? p : throw null;",
+        "  return p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -293,7 +392,16 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_is_postIf() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is A) {", "    A a = p;", "  } else {", "    return null;", "  }", "  return p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is A) {",
+        "    A a = p;",
+        "  } else {",
+        "    return null;",
+        "  }",
+        "  return p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -307,7 +415,16 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_is_subclass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  B m() => this;", "}", "A f(A p) {", "  if (p is B) {", "    return p.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  B m() => this;",
+        "}",
+        "A f(A p) {",
+        "  if (p is B) {",
+        "    return p.m();",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_METHOD]);
     verify([source]);
@@ -320,7 +437,13 @@
     JUnitTestCase.assertNotNull(invocation.methodName.element);
   }
   void test_is_while() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  while (p is A) {", "    return p;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  while (p is A) {",
+        "    return p;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -335,7 +458,11 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_isNot_conditional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  return (p is! A) ? null : p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  return (p is! A) ? null : p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -350,7 +477,15 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_isNot_if() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is! A) {", "    return null;", "  } else {", "    return p;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is! A) {",
+        "    return null;",
+        "  } else {",
+        "    return p;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -365,7 +500,15 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_isNot_if_logicalOr() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is! A || null == p) {", "    return null;", "  } else {", "    return p;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is! A || null == p) {",
+        "    return null;",
+        "  } else {",
+        "    return p;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -380,7 +523,12 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_isNot_postConditional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  A a = (p is! A) ? throw null : p;", "  return p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  A a = (p is! A) ? throw null : p;",
+        "  return p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -394,7 +542,14 @@
     JUnitTestCase.assertSame(typeA, variableName.propagatedType);
   }
   void test_isNot_postIf() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "A f(var p) {", "  if (p is! A) {", "    return null;", "  }", "  return p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "A f(var p) {",
+        "  if (p is! A) {",
+        "    return null;",
+        "  }",
+        "  return p;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -432,7 +587,11 @@
     JUnitTestCase.assertSame(typeProvider.intType, indexExpression.propagatedType);
   }
   void test_mapLiteral_different() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  var v = {'0' : 0, 1 : '1', '2' : 2};", "  return v;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  var v = {'0' : 0, 1 : '1', '2' : 2};",
+        "  return v;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -449,7 +608,11 @@
     JUnitTestCase.assertSame(typeProvider.dynamicType, typeArguments[1]);
   }
   void test_mapLiteral_same() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  var v = {'a' : 0, 'b' : 1, 'c' : 2};", "  return v;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  var v = {'a' : 0, 'b' : 1, 'c' : 2};",
+        "  return v;",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -474,15 +637,33 @@
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.intType);
   }
   void test_propagatedReturnType_function_moreSpecificStaticReturnType() {
-    String code = EngineTestCase.createSource(["int f() => (42 as Object);", "main() {", "  var v = f();", "}"]);
+    String code = EngineTestCase.createSource([
+        "int f() => (42 as Object);",
+        "main() {",
+        "  var v = f();",
+        "}"]);
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.intType);
   }
   void test_propagatedReturnType_function_noReturnTypeName_blockBody_multipleReturns() {
-    String code = EngineTestCase.createSource(["f() {", "  if (true) return 0;", "  return 1.0;", "}", "main() {", "  var v = f();", "}"]);
+    String code = EngineTestCase.createSource([
+        "f() {",
+        "  if (true) return 0;",
+        "  return 1.0;",
+        "}",
+        "main() {",
+        "  var v = f();",
+        "}"]);
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.numType);
   }
   void test_propagatedReturnType_function_noReturnTypeName_blockBody_oneReturn() {
-    String code = EngineTestCase.createSource(["f() {", "  var z = 42;", "  return z;", "}", "main() {", "  var v = f();", "}"]);
+    String code = EngineTestCase.createSource([
+        "f() {",
+        "  var z = 42;",
+        "  return z;",
+        "}",
+        "main() {",
+        "  var v = f();",
+        "}"]);
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.intType);
   }
   void test_propagatedReturnType_function_noReturnTypeName_expressionBody() {
@@ -494,7 +675,25 @@
     check_propagatedReturnType(code, typeProvider.dynamicType, typeProvider.intType);
   }
   void test_query() {
-    Source source = addSource(EngineTestCase.createSource(["import 'dart:html';", "", "main() {", "  var v1 = query('a');", "  var v2 = query('A');", "  var v3 = query('body:active');", "  var v4 = query('button[foo=\"bar\"]');", "  var v5 = query('div.class');", "  var v6 = query('input#id');", "  var v7 = query('select#id');", "  // invocation of method", "  var m1 = document.query('div');", " // unsupported currently", "  var b1 = query('noSuchTag');", "  var b2 = query('DART_EDITOR_NO_SUCH_TYPE');", "  var b3 = query('body div');", "  return [v1, v2, v3, v4, v5, v6, v7, m1, b1, b2, b3];", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'dart:html';",
+        "",
+        "main() {",
+        "  var v1 = query('a');",
+        "  var v2 = query('A');",
+        "  var v3 = query('body:active');",
+        "  var v4 = query('button[foo=\"bar\"]');",
+        "  var v5 = query('div.class');",
+        "  var v6 = query('input#id');",
+        "  var v7 = query('select#id');",
+        "  // invocation of method",
+        "  var m1 = document.query('div');",
+        " // unsupported currently",
+        "  var b1 = query('noSuchTag');",
+        "  var b2 = query('DART_EDITOR_NO_SUCH_TYPE');",
+        "  var b3 = query('body div');",
+        "  return [v1, v2, v3, v4, v5, v6, v7, m1, b1, b2, b3];",
+        "}"]));
     LibraryElement library = resolve(source);
     assertNoErrors();
     verify([source]);
@@ -685,7 +884,10 @@
 }
 class NonErrorResolverTest extends ResolverTestCase {
   void test_ambiguousExport() {
-    Source source = addSource(EngineTestCase.createSource(["library L;", "export 'lib1.dart';", "export 'lib2.dart';"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library L;",
+        "export 'lib1.dart';",
+        "export 'lib2.dart';"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class M {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
@@ -693,7 +895,10 @@
     verify([source]);
   }
   void test_ambiguousExport_combinators_hide() {
-    Source source = addSource(EngineTestCase.createSource(["library L;", "export 'lib1.dart';", "export 'lib2.dart' hide B;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library L;",
+        "export 'lib1.dart';",
+        "export 'lib2.dart' hide B;"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library L1;", "class A {}", "class B {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library L2;", "class B {}", "class C {}"]));
     resolve(source);
@@ -701,7 +906,10 @@
     verify([source]);
   }
   void test_ambiguousExport_combinators_show() {
-    Source source = addSource(EngineTestCase.createSource(["library L;", "export 'lib1.dart';", "export 'lib2.dart' show C;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library L;",
+        "export 'lib1.dart';",
+        "export 'lib2.dart' show C;"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library L1;", "class A {}", "class B {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library L2;", "class B {}", "class C {}"]));
     resolve(source);
@@ -727,13 +935,29 @@
     verify([source]);
   }
   void test_argumentTypeNotAssignable_classWithCall_Function() {
-    Source source = addSource(EngineTestCase.createSource(["  caller(Function callee) {", "    callee();", "  }", "", "  class CallMeBack {", "    call() => 0;", "  }", "", "  main() {", "    caller(new CallMeBack());", "  }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "  caller(Function callee) {",
+        "    callee();",
+        "  }",
+        "",
+        "  class CallMeBack {",
+        "    call() => 0;",
+        "  }",
+        "",
+        "  main() {",
+        "    caller(new CallMeBack());",
+        "  }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_argumentTypeNotAssignable_invocation_functionParameter_generic() {
-    Source source = addSource(EngineTestCase.createSource(["class A<K> {", "  m(f(K k), K v) {", "    f(v);", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<K> {",
+        "  m(f(K k), K v) {",
+        "    f(v);",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -745,19 +969,33 @@
     verify([source]);
   }
   void test_argumentTypeNotAssignable_Object_Function() {
-    Source source = addSource(EngineTestCase.createSource(["main() {", "  process(() {});", "}", "process(Object x) {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "main() {",
+        "  process(() {});",
+        "}",
+        "process(Object x) {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_argumentTypeNotAssignable_typedef_local() {
-    Source source = addSource(EngineTestCase.createSource(["typedef A(int p1, String p2);", "A getA() => null;", "f() {", "  A a = getA();", "  a(1, '2');", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef A(int p1, String p2);",
+        "A getA() => null;",
+        "f() {",
+        "  A a = getA();",
+        "  a(1, '2');",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_argumentTypeNotAssignable_typedef_parameter() {
-    Source source = addSource(EngineTestCase.createSource(["typedef A(int p1, String p2);", "f(A a) {", "  a(1, '2');", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef A(int p1, String p2);",
+        "f(A a) {",
+        "  a(1, '2');",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -769,14 +1007,27 @@
     verify([source]);
   }
   void test_assignmentToFinals_importWithPrefix() {
-    Source source = addSource(EngineTestCase.createSource(["library lib;", "import 'lib1.dart' as foo;", "main() {", "  foo.x = true;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library lib;",
+        "import 'lib1.dart' as foo;",
+        "main() {",
+        "  foo.x = true;",
+        "}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "bool x = false;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_breakWithoutLabelInSwitch() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m(int i) {", "    switch (i) {", "      case 0:", "        break;", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m(int i) {",
+        "    switch (i) {",
+        "      case 0:",
+        "        break;",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -788,31 +1039,80 @@
     verify([source]);
   }
   void test_caseBlockNotTerminated() {
-    Source source = addSource(EngineTestCase.createSource(["f(int p) {", "  for (int i = 0; i < 10; i++) {", "    switch (p) {", "      case 0:", "        break;", "      case 1:", "        continue;", "      case 2:", "        return;", "      case 3:", "        throw new Object();", "      case 4:", "      case 5:", "        return;", "      case 6:", "      default:", "        return;", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int p) {",
+        "  for (int i = 0; i < 10; i++) {",
+        "    switch (p) {",
+        "      case 0:",
+        "        break;",
+        "      case 1:",
+        "        continue;",
+        "      case 2:",
+        "        return;",
+        "      case 3:",
+        "        throw new Object();",
+        "      case 4:",
+        "      case 5:",
+        "        return;",
+        "      case 6:",
+        "      default:",
+        "        return;",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_caseBlockNotTerminated_lastCase() {
-    Source source = addSource(EngineTestCase.createSource(["f(int p) {", "  switch (p) {", "    case 0:", "      p = p + 1;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int p) {",
+        "  switch (p) {",
+        "    case 0:",
+        "      p = p + 1;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_caseExpressionTypeImplementsEquals_int() {
-    Source source = addSource(EngineTestCase.createSource(["f(int i) {", "  switch(i) {", "    case(1) : return 1;", "    default: return 0;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int i) {",
+        "  switch(i) {",
+        "    case(1) : return 1;",
+        "    default: return 0;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_caseExpressionTypeImplementsEquals_Object() {
-    Source source = addSource(EngineTestCase.createSource(["class IntWrapper {", "  final int value;", "  const IntWrapper(this.value);", "}", "", "f(IntWrapper intWrapper) {", "  switch(intWrapper) {", "    case(const IntWrapper(1)) : return 1;", "    default: return 0;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class IntWrapper {",
+        "  final int value;",
+        "  const IntWrapper(this.value);",
+        "}",
+        "",
+        "f(IntWrapper intWrapper) {",
+        "  switch(intWrapper) {",
+        "    case(const IntWrapper(1)) : return 1;",
+        "    default: return 0;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_caseExpressionTypeImplementsEquals_String() {
-    Source source = addSource(EngineTestCase.createSource(["f(String s) {", "  switch(s) {", "    case('1') : return 1;", "    default: return 0;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(String s) {",
+        "  switch(s) {",
+        "    case('1') : return 1;",
+        "    default: return 0;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -824,19 +1124,33 @@
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_instance() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get v => 0;", "}", "class B extends A {", "  get v => 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get v => 0;",
+        "}",
+        "class B extends A {",
+        "  get v => 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_conflictingStaticGetterAndInstanceSetter_thisClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get x => 0;", "  static set x(int p) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get x => 0;",
+        "  static set x(int p) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_conflictingStaticSetterAndInstanceMember_thisClass_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static x() {}", "  static set x(int p) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static x() {}",
+        "  static set x(int p) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -848,7 +1162,13 @@
     verify([source]);
   }
   void test_constConstructorWithNonFinalField_mixin() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  a() {}", "}", "class B extends Object with A {", "  const B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  a() {}",
+        "}",
+        "class B extends Object with A {",
+        "  const B();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -860,7 +1180,12 @@
     verify([source]);
   }
   void test_constConstructorWithNonFinalField_syntheticField() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "  set x(value) {}", "  get x {return 0;}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "  set x(value) {}",
+        "  get x {return 0;}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -873,43 +1198,114 @@
     verify([source]);
   }
   void test_constEval_propertyExtraction_methodStatic_targetType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "  static m() {}", "}", "const C = A.m;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "  static m() {}",
+        "}",
+        "const C = A.m;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constEvalTypeBoolNumString_equal() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "class B {", "  final v;", "  const B.a1(bool p) : v = p == true;", "  const B.a2(bool p) : v = p == false;", "  const B.a3(bool p) : v = p == 0;", "  const B.a4(bool p) : v = p == 0.0;", "  const B.a5(bool p) : v = p == '';", "  const B.b1(int p) : v = p == true;", "  const B.b2(int p) : v = p == false;", "  const B.b3(int p) : v = p == 0;", "  const B.b4(int p) : v = p == 0.0;", "  const B.b5(int p) : v = p == '';", "  const B.c1(String p) : v = p == true;", "  const B.c2(String p) : v = p == false;", "  const B.c3(String p) : v = p == 0;", "  const B.c4(String p) : v = p == 0.0;", "  const B.c5(String p) : v = p == '';", "  const B.n1(num p) : v = p == null;", "  const B.n2(num p) : v = null == p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "class B {",
+        "  final v;",
+        "  const B.a1(bool p) : v = p == true;",
+        "  const B.a2(bool p) : v = p == false;",
+        "  const B.a3(bool p) : v = p == 0;",
+        "  const B.a4(bool p) : v = p == 0.0;",
+        "  const B.a5(bool p) : v = p == '';",
+        "  const B.b1(int p) : v = p == true;",
+        "  const B.b2(int p) : v = p == false;",
+        "  const B.b3(int p) : v = p == 0;",
+        "  const B.b4(int p) : v = p == 0.0;",
+        "  const B.b5(int p) : v = p == '';",
+        "  const B.c1(String p) : v = p == true;",
+        "  const B.c2(String p) : v = p == false;",
+        "  const B.c3(String p) : v = p == 0;",
+        "  const B.c4(String p) : v = p == 0.0;",
+        "  const B.c5(String p) : v = p == '';",
+        "  const B.n1(num p) : v = p == null;",
+        "  const B.n2(num p) : v = null == p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constEvalTypeBoolNumString_notEqual() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "class B {", "  final v;", "  const B.a1(bool p) : v = p != true;", "  const B.a2(bool p) : v = p != false;", "  const B.a3(bool p) : v = p != 0;", "  const B.a4(bool p) : v = p != 0.0;", "  const B.a5(bool p) : v = p != '';", "  const B.b1(int p) : v = p != true;", "  const B.b2(int p) : v = p != false;", "  const B.b3(int p) : v = p != 0;", "  const B.b4(int p) : v = p != 0.0;", "  const B.b5(int p) : v = p != '';", "  const B.c1(String p) : v = p != true;", "  const B.c2(String p) : v = p != false;", "  const B.c3(String p) : v = p != 0;", "  const B.c4(String p) : v = p != 0.0;", "  const B.c5(String p) : v = p != '';", "  const B.n1(num p) : v = p != null;", "  const B.n2(num p) : v = null != p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "class B {",
+        "  final v;",
+        "  const B.a1(bool p) : v = p != true;",
+        "  const B.a2(bool p) : v = p != false;",
+        "  const B.a3(bool p) : v = p != 0;",
+        "  const B.a4(bool p) : v = p != 0.0;",
+        "  const B.a5(bool p) : v = p != '';",
+        "  const B.b1(int p) : v = p != true;",
+        "  const B.b2(int p) : v = p != false;",
+        "  const B.b3(int p) : v = p != 0;",
+        "  const B.b4(int p) : v = p != 0.0;",
+        "  const B.b5(int p) : v = p != '';",
+        "  const B.c1(String p) : v = p != true;",
+        "  const B.c2(String p) : v = p != false;",
+        "  const B.c3(String p) : v = p != 0;",
+        "  const B.c4(String p) : v = p != 0.0;",
+        "  const B.c5(String p) : v = p != '';",
+        "  const B.n1(num p) : v = p != null;",
+        "  const B.n2(num p) : v = null != p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constWithNonConstantArgument_literals() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(a, b, c, d);", "}", "f() { return const A(true, 0, 1.0, '2'); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(a, b, c, d);",
+        "}",
+        "f() { return const A(true, 0, 1.0, '2'); }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constWithTypeParameters_direct() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  static const V = const A<int>();", "  const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  static const V = const A<int>();",
+        "  const A();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constWithUndefinedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.name();", "}", "f() {", "  return const A.name();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.name();",
+        "}",
+        "f() {",
+        "  return const A.name();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_constWithUndefinedConstructorDefault() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "f() {", "  return const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "f() {",
+        "  return const A();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -921,7 +1317,11 @@
     verify([source]);
   }
   void test_duplicateDefinition_emptyName() {
-    Source source = addSource(EngineTestCase.createSource(["Map _globalMap = {", "  'a' : () {},", "  'b' : () {}", "};"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "Map _globalMap = {",
+        "  'a' : () {},",
+        "  'b' : () {}",
+        "};"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -959,7 +1359,13 @@
     verify([source]);
   }
   void test_extraPositionalArguments_typedef_local() {
-    Source source = addSource(EngineTestCase.createSource(["typedef A(p1, p2);", "A getA() => null;", "f() {", "  A a = getA();", "  a(1, 2);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef A(p1, p2);",
+        "A getA() => null;",
+        "f() {",
+        "  A a = getA();",
+        "  a(1, 2);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -971,7 +1377,12 @@
     verify([source]);
   }
   void test_fieldInitializedByMultipleInitializers() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  int y;", "  A() : x = 0, y = 0 {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  int y;",
+        "  A() : x = 0, y = 0 {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1001,7 +1412,14 @@
     verify([source]);
   }
   void test_fieldInitializerRedirectingConstructor_super() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B extends A {", "  int x;", "  A(this.x) : super();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B extends A {",
+        "  int x;",
+        "  A(this.x) : super();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1030,74 +1448,176 @@
     assertNoErrors();
     verify([source]);
   }
+  void test_finalNotInitialized_functionTypedFieldFormal() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final Function x;",
+        "  A(int this.x(int p)) {}",
+        "}"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
+  void test_finalNotInitialized_hasNativeClause_hasConstructor() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A native 'something' {",
+        "  final int x;",
+        "  A() {}",
+        "}"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
+  void test_finalNotInitialized_hasNativeClause_noConstructor() {
+    Source source = addSource(EngineTestCase.createSource(["class A native 'something' {", "  final int x;", "}"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
   void test_finalNotInitialized_initializer() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  final int x;", "  A() : x = 0 {}", "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
+  void test_finalNotInitialized_redirectingConstructor() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int x;",
+        "  A(this.x);",
+        "  A.named() : this (42);",
+        "}"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
   void test_implicitThisReferenceInInitializer_constructorName() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.named() {}", "}", "class B {", "  var v;", "  B() : v = new A.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.named() {}",
+        "}",
+        "class B {",
+        "  var v;",
+        "  B() : v = new A.named();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_prefixedIdentifier() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var f;", "}", "class B {", "  var v;", "  B(A a) : v = a.f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var f;",
+        "}",
+        "class B {",
+        "  var v;",
+        "  B(A a) : v = a.f;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_qualifiedMethodInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  f() {}", "}", "class B {", "  var v;", "  B() : v = new A().f();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  f() {}",
+        "}",
+        "class B {",
+        "  var v;",
+        "  B() : v = new A().f();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_qualifiedPropertyAccess() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var f;", "}", "class B {", "  var v;", "  B() : v = new A().f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var f;",
+        "}",
+        "class B {",
+        "  var v;",
+        "  B() : v = new A().f;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_staticField_superClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var f;", "}", "class B extends A {", "  var v;", "  B() : v = f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static var f;",
+        "}",
+        "class B extends A {",
+        "  var v;",
+        "  B() : v = f;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_staticField_thisClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f;", "  static var f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f;",
+        "  static var f;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_staticGetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f;", "  static get f => 42;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f;",
+        "  static get f => 42;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_staticMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f();", "  static f() => 42;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f();",
+        "  static f() => 42;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_topLevelField() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f;", "}", "var f = 42;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f;",
+        "}",
+        "var f = 42;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_topLevelFunction() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f();", "}", "f() => 42;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f();",
+        "}",
+        "f() => 42;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_topLevelGetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f;", "}", "get f => 42;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f;",
+        "}",
+        "get f => 42;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1109,7 +1629,10 @@
     verify([source]);
   }
   void test_importDuplicatedLibraryName() {
-    Source source = addSource(EngineTestCase.createSource(["library test;", "import 'lib.dart';", "import 'lib.dart';"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library test;",
+        "import 'lib.dart';",
+        "import 'lib.dart';"]));
     addSource2("/lib.dart", "library lib;");
     resolve(source);
     assertNoErrors();
@@ -1130,7 +1653,15 @@
     verify([source]);
   }
   void test_inconsistentCaseExpressionTypes() {
-    Source source = addSource(EngineTestCase.createSource(["f(var p) {", "  switch (p) {", "    case 1:", "      break;", "    case 2:", "      break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(var p) {",
+        "  switch (p) {",
+        "    case 1:",
+        "      break;",
+        "    case 2:",
+        "      break;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1142,7 +1673,13 @@
     verify([source]);
   }
   void test_instanceMemberAccessFromStatic_fromComment() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "  /// [m]", "  static foo() {", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "  /// [m]",
+        "  static foo() {",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1161,8 +1698,16 @@
     verify([source]);
   }
   void test_invalidAnnotation_importWithPrefix_constConstructor() {
-    addSource2("/lib.dart", EngineTestCase.createSource(["library lib;", "class A {", "  const A.named(int p);", "}"]));
-    Source source = addSource(EngineTestCase.createSource(["import 'lib.dart' as p;", "@p.A.named(42)", "main() {", "}"]));
+    addSource2("/lib.dart", EngineTestCase.createSource([
+        "library lib;",
+        "class A {",
+        "  const A.named(int p);",
+        "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib.dart' as p;",
+        "@p.A.named(42)",
+        "main() {",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1174,7 +1719,17 @@
     verify([source]);
   }
   void test_invalidAssignment_compoundAssignment() {
-    Source source = addSource(EngineTestCase.createSource(["class byte {", "  int _value;", "  byte(this._value);", "  byte operator +(int val) {}", "}", "", "void main() {", "  byte b = new byte(52);", "  b += 3;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class byte {",
+        "  int _value;",
+        "  byte(this._value);",
+        "  byte operator +(int val) {}",
+        "}",
+        "",
+        "void main() {",
+        "  byte b = new byte(52);",
+        "  b += 3;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1192,79 +1747,161 @@
     verify([source]);
   }
   void test_invalidMethodOverrideNamedParamType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({int a}) {}", "}", "class B implements A {", "  m({int a, int b}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({int a}) {}",
+        "}",
+        "class B implements A {",
+        "  m({int a, int b}) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideDifferentDefaultValues_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({int p : 0}) {}", "}", "class B extends A {", "  m({int p : 0}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({int p : 0}) {}",
+        "}",
+        "class B extends A {",
+        "  m({int p : 0}) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideDifferentDefaultValues_positional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m([int p = 0]) {}", "}", "class B extends A {", "  m([int p = 0]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m([int p = 0]) {}",
+        "}",
+        "class B extends A {",
+        "  m([int p = 0]) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideDifferentDefaultValues_positional_changedOrder() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m([int a = 0, String b = '0']) {}", "}", "class B extends A {", "  m([int b = 0, String a = '0']) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m([int a = 0, String b = '0']) {}",
+        "}",
+        "class B extends A {",
+        "  m([int b = 0, String a = '0']) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideNamed_unorderedNamedParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({a, b}) {}", "}", "class B extends A {", "  m({b, a}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({a, b}) {}",
+        "}",
+        "class B extends A {",
+        "  m({b, a}) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_interface() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["abstract class A {", "  num m();", "}", "class B implements A {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "abstract class A {",
+        "  num m();",
+        "}",
+        "class B implements A {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_interface2() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["abstract class A {", "  num m();", "}", "abstract class B implements A {", "}", "class C implements B {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "abstract class A {",
+        "  num m();",
+        "}",
+        "abstract class B implements A {",
+        "}",
+        "class C implements B {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_mixin() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["class A {", "  num m() { return 0; }", "}", "class B extends Object with A {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "class A {",
+        "  num m() { return 0; }",
+        "}",
+        "class B extends Object with A {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_parameterizedTypes() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A<E> {", "  List<E> m();", "}", "class B extends A<dynamic> {", "  List<dynamic> m() { return new List<dynamic>(); }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A<E> {",
+        "  List<E> m();",
+        "}",
+        "class B extends A<dynamic> {",
+        "  List<dynamic> m() { return new List<dynamic>(); }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_sameType() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["class A {", "  int m() { return 0; }", "}", "class B extends A {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "class A {",
+        "  int m() { return 0; }",
+        "}",
+        "class B extends A {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_superclass() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["class A {", "  num m() { return 0; }", "}", "class B extends A {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "class A {",
+        "  num m() { return 0; }",
+        "}",
+        "class B extends A {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_superclass2() {
-    Source source = addSource2("/test.dart", EngineTestCase.createSource(["class A {", "  num m() { return 0; }", "}", "class B extends A {", "}", "class C extends B {", "  int m() { return 1; }", "}"]));
+    Source source = addSource2("/test.dart", EngineTestCase.createSource([
+        "class A {",
+        "  num m() { return 0; }",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  int m() { return 1; }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidOverrideReturnType_returnType_void() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m() {}", "}", "class B extends A {", "  int m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m() {}",
+        "}",
+        "class B extends A {",
+        "  int m() {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1282,25 +1919,50 @@
     verify([source]);
   }
   void test_invalidTypeArgumentInConstList() {
-    Source source = addSource(EngineTestCase.createSource(["class A<E> {", "  m() {", "    return <E>[];", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<E> {",
+        "  m() {",
+        "    return <E>[];",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invalidTypeArgumentInConstMap() {
-    Source source = addSource(EngineTestCase.createSource(["class A<E> {", "  m() {", "    return <String, E>{};", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<E> {",
+        "  m() {",
+        "    return <String, E>{};",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invocationOfNonFunction_dynamic() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var f;", "}", "class B extends A {", "  g() {", "    f();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var f;",
+        "}",
+        "class B extends A {",
+        "  g() {",
+        "    f();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invocationOfNonFunction_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var g;", "}", "f() {", "  A a;", "  a.g();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var g;",
+        "}",
+        "f() {",
+        "  A a;",
+        "  a.g();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1318,7 +1980,13 @@
     verify([source]);
   }
   void test_invocationOfNonFunction_localVariable_dynamic2() {
-    Source source = addSource(EngineTestCase.createSource(["f() {}", "main() {", "  var v = f;", "  v = 1;", "  v();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {}",
+        "main() {",
+        "  var v = f;",
+        "  v = 1;",
+        "  v();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1329,6 +1997,18 @@
     assertNoErrors();
     verify([source]);
   }
+  void test_listElementTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v1 = <int> [42];", "var v2 = const <int> [42];"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
+  void test_mapKeyTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = <String, int > {'a' : 1};"]));
+    resolve(source);
+    assertNoErrors();
+    verify([source]);
+  }
   void test_memberWithClassName_setter() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  set A(v) {}", "}"]));
     resolve(source);
@@ -1336,7 +2016,11 @@
     verify([source]);
   }
   void test_misMatchedGetterAndSetterTypes_instance_sameTypes() {
-    Source source = addSource(EngineTestCase.createSource(["class C {", "  int get x => 0;", "  set x(int v) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class C {",
+        "  int get x => 0;",
+        "  set x(int v) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1372,25 +2056,39 @@
     verify([source]);
   }
   void test_mixinDeclaresConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends Object with A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends Object with A {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_mixinDeclaresConstructor_factory() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A() {}", "}", "class B extends Object with A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A() {}",
+        "}",
+        "class B extends Object with A {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_classDeclaration_mixTypedef() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "typedef B = Object with A;", "class C extends Object with B {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "typedef B = Object with A;",
+        "class C extends Object with B {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_typedef_mixTypedef() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "typedef B = Object with A;", "typedef C = Object with B;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "typedef B = Object with A;",
+        "typedef C = Object with B;"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1402,19 +2100,38 @@
     verify([source]);
   }
   void test_multipleSuperInitializers_single() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  B() : super() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  B() : super() {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_newWithAbstractClass_factory() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  factory A() { return new B(); }", "}", "class B implements A {", "  B() {}", "}", "A f() {", "  return new A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  factory A() { return new B(); }",
+        "}",
+        "class B implements A {",
+        "  B() {}",
+        "}",
+        "A f() {",
+        "  return new A();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_newWithUndefinedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.name() {}", "}", "f() {", "  new A.name();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.name() {}",
+        "}",
+        "f() {",
+        "  new A.name();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1432,7 +2149,11 @@
     verify([source]);
   }
   void test_nonBoolExpression_assert_functionType() {
-    Source source = addSource(EngineTestCase.createSource(["bool makeAssertion() => true;", "f() {", "  assert(makeAssertion);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "bool makeAssertion() => true;",
+        "f() {",
+        "  assert(makeAssertion);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1474,7 +2195,16 @@
     verify([source]);
   }
   void test_nonConstCaseExpression() {
-    Source source = addSource(EngineTestCase.createSource(["f(Type t) {", "  switch (t) {", "    case bool:", "    case int:", "      return true;", "    default:", "      return false;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(Type t) {",
+        "  switch (t) {",
+        "    case bool:",
+        "    case int:",
+        "      return true;",
+        "    default:",
+        "      return false;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1498,72 +2228,183 @@
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_bool() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v;", "  const A.a1(bool p) : v = p && true;", "  const A.a2(bool p) : v = true && p;", "  const A.b1(bool p) : v = p || true;", "  const A.b2(bool p) : v = true || p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v;",
+        "  const A.a1(bool p) : v = p && true;",
+        "  const A.a2(bool p) : v = true && p;",
+        "  const A.b1(bool p) : v = p || true;",
+        "  const A.b2(bool p) : v = true || p;",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_dynamic() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v;", "  const A.a1(p) : v = p + 5;", "  const A.a2(p) : v = 5 + p;", "  const A.b1(p) : v = p - 5;", "  const A.b2(p) : v = 5 - p;", "  const A.c1(p) : v = p * 5;", "  const A.c2(p) : v = 5 * p;", "  const A.d1(p) : v = p / 5;", "  const A.d2(p) : v = 5 / p;", "  const A.e1(p) : v = p ~/ 5;", "  const A.e2(p) : v = 5 ~/ p;", "  const A.f1(p) : v = p > 5;", "  const A.f2(p) : v = 5 > p;", "  const A.g1(p) : v = p < 5;", "  const A.g2(p) : v = 5 < p;", "  const A.h1(p) : v = p >= 5;", "  const A.h2(p) : v = 5 >= p;", "  const A.i1(p) : v = p <= 5;", "  const A.i2(p) : v = 5 <= p;", "  const A.j1(p) : v = p % 5;", "  const A.j2(p) : v = 5 % p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v;",
+        "  const A.a1(p) : v = p + 5;",
+        "  const A.a2(p) : v = 5 + p;",
+        "  const A.b1(p) : v = p - 5;",
+        "  const A.b2(p) : v = 5 - p;",
+        "  const A.c1(p) : v = p * 5;",
+        "  const A.c2(p) : v = 5 * p;",
+        "  const A.d1(p) : v = p / 5;",
+        "  const A.d2(p) : v = 5 / p;",
+        "  const A.e1(p) : v = p ~/ 5;",
+        "  const A.e2(p) : v = 5 ~/ p;",
+        "  const A.f1(p) : v = p > 5;",
+        "  const A.f2(p) : v = 5 > p;",
+        "  const A.g1(p) : v = p < 5;",
+        "  const A.g2(p) : v = 5 < p;",
+        "  const A.h1(p) : v = p >= 5;",
+        "  const A.h2(p) : v = 5 >= p;",
+        "  const A.i1(p) : v = p <= 5;",
+        "  const A.i2(p) : v = 5 <= p;",
+        "  const A.j1(p) : v = p % 5;",
+        "  const A.j2(p) : v = 5 % p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
   void test_nonConstValueInInitializer_binary_int() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v;", "  const A.a1(int p) : v = p ^ 5;", "  const A.a2(int p) : v = 5 ^ p;", "  const A.b1(int p) : v = p & 5;", "  const A.b2(int p) : v = 5 & p;", "  const A.c1(int p) : v = p | 5;", "  const A.c2(int p) : v = 5 | p;", "  const A.d1(int p) : v = p >> 5;", "  const A.d2(int p) : v = 5 >> p;", "  const A.e1(int p) : v = p << 5;", "  const A.e2(int p) : v = 5 << p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v;",
+        "  const A.a1(int p) : v = p ^ 5;",
+        "  const A.a2(int p) : v = 5 ^ p;",
+        "  const A.b1(int p) : v = p & 5;",
+        "  const A.b2(int p) : v = 5 & p;",
+        "  const A.c1(int p) : v = p | 5;",
+        "  const A.c2(int p) : v = 5 | p;",
+        "  const A.d1(int p) : v = p >> 5;",
+        "  const A.d2(int p) : v = 5 >> p;",
+        "  const A.e1(int p) : v = p << 5;",
+        "  const A.e2(int p) : v = 5 << p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_num() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v;", "  const A.a1(num p) : v = p + 5;", "  const A.a2(num p) : v = 5 + p;", "  const A.b1(num p) : v = p - 5;", "  const A.b2(num p) : v = 5 - p;", "  const A.c1(num p) : v = p * 5;", "  const A.c2(num p) : v = 5 * p;", "  const A.d1(num p) : v = p / 5;", "  const A.d2(num p) : v = 5 / p;", "  const A.e1(num p) : v = p ~/ 5;", "  const A.e2(num p) : v = 5 ~/ p;", "  const A.f1(num p) : v = p > 5;", "  const A.f2(num p) : v = 5 > p;", "  const A.g1(num p) : v = p < 5;", "  const A.g2(num p) : v = 5 < p;", "  const A.h1(num p) : v = p >= 5;", "  const A.h2(num p) : v = 5 >= p;", "  const A.i1(num p) : v = p <= 5;", "  const A.i2(num p) : v = 5 <= p;", "  const A.j1(num p) : v = p % 5;", "  const A.j2(num p) : v = 5 % p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v;",
+        "  const A.a1(num p) : v = p + 5;",
+        "  const A.a2(num p) : v = 5 + p;",
+        "  const A.b1(num p) : v = p - 5;",
+        "  const A.b2(num p) : v = 5 - p;",
+        "  const A.c1(num p) : v = p * 5;",
+        "  const A.c2(num p) : v = 5 * p;",
+        "  const A.d1(num p) : v = p / 5;",
+        "  const A.d2(num p) : v = 5 / p;",
+        "  const A.e1(num p) : v = p ~/ 5;",
+        "  const A.e2(num p) : v = 5 ~/ p;",
+        "  const A.f1(num p) : v = p > 5;",
+        "  const A.f2(num p) : v = 5 > p;",
+        "  const A.g1(num p) : v = p < 5;",
+        "  const A.g2(num p) : v = 5 < p;",
+        "  const A.h1(num p) : v = p >= 5;",
+        "  const A.h2(num p) : v = 5 >= p;",
+        "  const A.i1(num p) : v = p <= 5;",
+        "  const A.i2(num p) : v = 5 <= p;",
+        "  const A.j1(num p) : v = p % 5;",
+        "  const A.j2(num p) : v = 5 % p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonConstValueInInitializer_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int a;", "  const A() : a = 5;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int a;",
+        "  const A() : a = 5;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonConstValueInInitializer_redirecting() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.named(p);", "  const A() : this.named(42);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.named(p);",
+        "  const A() : this.named(42);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonConstValueInInitializer_super() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(p);", "}", "class B extends A {", "  const B() : super(42);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(p);",
+        "}",
+        "class B extends A {",
+        "  const B() : super(42);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonConstValueInInitializer_unary() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v;", "  const A.a(bool p) : v = !p;", "  const A.b(int p) : v = ~p;", "  const A.c(num p) : v = -p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v;",
+        "  const A.a(bool p) : v = !p;",
+        "  const A.b(int p) : v = ~p;",
+        "  const A.c(num p) : v = -p;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonGenerativeConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.named() {}", "  factory A() {}", "}", "class B extends A {", "  B() : super.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.named() {}",
+        "  factory A() {}",
+        "}",
+        "class B extends A {",
+        "  B() : super.named();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonTypeInCatchClause_isClass() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  try {", "  } on String catch (e) {", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  try {",
+        "  } on String catch (e) {",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonTypeInCatchClause_isFunctionTypeAlias() {
-    Source source = addSource(EngineTestCase.createSource(["typedef F();", "f() {", "  try {", "  } on F catch (e) {", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef F();",
+        "f() {",
+        "  try {",
+        "  } on F catch (e) {",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_nonTypeInCatchClause_isTypeVariable() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  f() {", "    try {", "    } on T catch (e) {", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  f() {",
+        "    try {",
+        "    } on T catch (e) {",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1618,55 +2459,107 @@
   }
   void test_prefixCollidesWithTopLevelMembers() {
     addSource2("/lib.dart", "library lib;");
-    Source source = addSource(EngineTestCase.createSource(["import '/lib.dart' as p;", "typedef P();", "p2() {}", "var p3;", "class p4 {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import '/lib.dart' as p;",
+        "typedef P();",
+        "p2() {}",
+        "var p3;",
+        "class p4 {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_recursiveConstructorRedirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.a() : this.b();", "  A.b() : this.c();", "  A.c() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.a() : this.b();",
+        "  A.b() : this.c();",
+        "  A.c() {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_recursiveFactoryRedirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A() = B;", "}", "class B implements A {", "  factory B() = C;", "}", "class C implements B {", "  factory C() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A() = B;",
+        "}",
+        "class B implements A {",
+        "  factory B() = C;",
+        "}",
+        "class C implements B {",
+        "  factory C() {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_redirectToInvalidFunctionType() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B {", "  A(int p) {}", "}", "class B {", "  B(int p) = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B {",
+        "  A(int p) {}",
+        "}",
+        "class B {",
+        "  factory B(int p) = A;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_redirectToNonConstConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.a();", "  const factory A.b() = A.a;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.a();",
+        "  const factory A.b() = A.a;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_referenceToDeclaredVariableInInitializer_constructorName() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.x() {}", "}", "f() {", "  var x = new A.x();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.x() {}",
+        "}",
+        "f() {",
+        "  var x = new A.x();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_referenceToDeclaredVariableInInitializer_methodName() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  x() {}", "}", "f(A a) {", "  var x = a.x();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  x() {}",
+        "}",
+        "f(A a) {",
+        "  var x = a.x();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_referenceToDeclaredVariableInInitializer_propertyName() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var x;", "}", "f(A a) {", "  var x = a.x;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var x;",
+        "}",
+        "f(A a) {",
+        "  var x = a.x;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_rethrowOutsideCatch() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m() {", "    try {} catch (e) {rethrow;}", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m() {",
+        "    try {} catch (e) {rethrow;}",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1678,31 +2571,62 @@
     verify([source]);
   }
   void test_returnOfInvalidType_dynamic() {
-    Source source = addSource(EngineTestCase.createSource(["class TypeError {}", "class A {", "  static void testLogicalOp() {", "    testOr(a, b, onTypeError) {", "      try {", "        return a || b;", "      } on TypeError catch (t) {", "        return onTypeError;", "      }", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class TypeError {}",
+        "class A {",
+        "  static void testLogicalOp() {",
+        "    testOr(a, b, onTypeError) {",
+        "      try {",
+        "        return a || b;",
+        "      } on TypeError catch (t) {",
+        "        return onTypeError;",
+        "      }",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_returnOfInvalidType_dynamicAsTypeArgument() {
-    Source source = addSource(EngineTestCase.createSource(["class I<T> {", "  factory I() => new A<T>();", "}", "class A<T> implements I {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class I<T> {",
+        "  factory I() => new A<T>();",
+        "}",
+        "class A<T> implements I {",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_returnOfInvalidType_subtype() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "A f(B b) { return b; }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "A f(B b) { return b; }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_returnOfInvalidType_supertype() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "B f(A a) { return a; }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "B f(A a) { return a; }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_returnOfInvalidType_void() {
-    Source source = addSource(EngineTestCase.createSource(["void f1() {}", "void f2() { return; }", "void f3() { return null; }", "void f4() { return g1(); }", "void f5() { return g2(); }", "g1() {}", "void g2() {}", ""]));
+    Source source = addSource(EngineTestCase.createSource([
+        "void f1() {}",
+        "void f2() { return; }",
+        "void f3() { return null; }",
+        "void f4() { return g1(); }",
+        "void f5() { return g2(); }",
+        "g1() {}",
+        "void g2() {}",
+        ""]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1720,31 +2644,70 @@
     verify([source]);
   }
   void test_staticAccessToInstanceMember_annotation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.name();", "}", "@A.name()", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.name();",
+        "}",
+        "@A.name()",
+        "main() {",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_staticAccessToInstanceMember_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static m() {}", "}", "main() {", "  A.m;", "  A.m();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static m() {}",
+        "}",
+        "main() {",
+        "  A.m;",
+        "  A.m();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_staticAccessToInstanceMember_propertyAccess_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var f;", "}", "main() {", "  A.f;", "  A.f = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static var f;",
+        "}",
+        "main() {",
+        "  A.f;",
+        "  A.f = 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_staticAccessToInstanceMember_propertyAccess_propertyAccessor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get f => 42;", "  static set f(x) {}", "}", "main() {", "  A.f;", "  A.f = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get f => 42;",
+        "  static set f(x) {}",
+        "}",
+        "main() {",
+        "  A.f;",
+        "  A.f = 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_superInInvalidContext() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  B() {", "    var v = super.m();", "  }", "  n() {", "    var v = super.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  B() {",
+        "    var v = super.m();",
+        "  }",
+        "  n() {",
+        "    var v = super.m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1756,13 +2719,23 @@
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_const() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "class G<E extends A> {", "  const G();", "}", "f() { return const G<B>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "class G<E extends A> {",
+        "  const G();",
+        "}",
+        "f() { return const G<B>(); }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_new() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "class G<E extends A> {}", "f() { return new G<B>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "class G<E extends A> {}",
+        "f() { return new G<B>(); }"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1786,53 +2759,112 @@
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_explicit_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.named() {}", "}", "class B extends A {", "  B() : super.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.named() {}",
+        "}",
+        "class B extends A {",
+        "  B() : super.named();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_explicit_unnamed() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B extends A {", "  B() : super();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B extends A {",
+        "  B() : super();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_hasOptionalParameters() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A([p]) {}", "}", "class B extends A {", "  B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A([p]) {}",
+        "}",
+        "class B extends A {",
+        "  B();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_implicit() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B extends A {", "  B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B extends A {",
+        "  B();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_implicit_typedef() {
-    Source source = addSource(EngineTestCase.createSource(["class M {}", "typedef A = Object with M;", "class B extends A {", "  B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class M {}",
+        "typedef A = Object with M;",
+        "class B extends A {",
+        "  B();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_redirecting() {
-    Source source = addSource(EngineTestCase.createSource(["class Foo {", "  Foo.ctor();", "}", "class Bar extends Foo {", "  Bar() : this.ctor();", "  Bar.ctor() : super.ctor();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class Foo {",
+        "  Foo.ctor();",
+        "}",
+        "class Bar extends Foo {",
+        "  Bar() : this.ctor();",
+        "  Bar.ctor() : super.ctor();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedGetter_noSuchMethod_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  noSuchMethod(invocation) {}", "}", "f() {", "  (new A()).g;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  noSuchMethod(invocation) {}",
+        "}",
+        "f() {",
+        "  (new A()).g;",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
   void test_undefinedGetter_noSuchMethod_getter2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  noSuchMethod(invocation) {}", "}", "class B {", "  A a = new A();", "  m() {", "    a.g;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  noSuchMethod(invocation) {}",
+        "}",
+        "class B {",
+        "  A a = new A();",
+        "  m() {",
+        "    a.g;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
   void test_undefinedGetter_typeSubstitution() {
-    Source source = addSource(EngineTestCase.createSource(["class A<E> {", "  E element;", "}", "class B extends A<List> {", "  m() {", "    element.last;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<E> {",
+        "  E element;",
+        "}",
+        "class B extends A<List> {",
+        "  m() {",
+        "    element.last;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1845,7 +2877,13 @@
     verify([source]);
   }
   void test_undefinedIdentifier_noSuchMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  noSuchMethod(invocation) {}", "  f() {", "    var v = a;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  noSuchMethod(invocation) {}",
+        "  f() {",
+        "    var v = a;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
@@ -1867,12 +2905,26 @@
     assertNoErrors();
   }
   void test_undefinedMethod_noSuchMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  noSuchMethod(invocation) {}", "}", "f() {", "  (new A()).m();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  noSuchMethod(invocation) {}",
+        "}",
+        "f() {",
+        "  (new A()).m();",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
   void test_undefinedOperator_index() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  operator [](a) {}", "  operator []=(a, b) {}", "}", "f(A a) {", "  a[0];", "  a[0] = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  operator [](a) {}",
+        "  operator []=(a, b) {}",
+        "}",
+        "f(A a) {",
+        "  a[0];",
+        "  a[0] = 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -1884,18 +2936,40 @@
     verify([source]);
   }
   void test_undefinedSetter_noSuchMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  noSuchMethod(invocation) {}", "}", "f() {", "  (new A()).s = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  noSuchMethod(invocation) {}",
+        "}",
+        "f() {",
+        "  (new A()).s = 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
   }
   void test_undefinedSuperMethod_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var m;", "}", "class B extends A {", "  f() {", "    super.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var m;",
+        "}",
+        "class B extends A {",
+        "  f() {",
+        "    super.m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_undefinedSuperMethod_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  f() {", "    super.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  f() {",
+        "    super.m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -2169,10 +3243,26 @@
         final __test = new NonErrorResolverTest();
         runJUnitTest(__test, __test.test_finalNotInitialized_fieldFormal);
       });
+      _ut.test('test_finalNotInitialized_functionTypedFieldFormal', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_finalNotInitialized_functionTypedFieldFormal);
+      });
+      _ut.test('test_finalNotInitialized_hasNativeClause_hasConstructor', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_finalNotInitialized_hasNativeClause_hasConstructor);
+      });
+      _ut.test('test_finalNotInitialized_hasNativeClause_noConstructor', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_finalNotInitialized_hasNativeClause_noConstructor);
+      });
       _ut.test('test_finalNotInitialized_initializer', () {
         final __test = new NonErrorResolverTest();
         runJUnitTest(__test, __test.test_finalNotInitialized_initializer);
       });
+      _ut.test('test_finalNotInitialized_redirectingConstructor', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_finalNotInitialized_redirectingConstructor);
+      });
       _ut.test('test_implicitThisReferenceInInitializer_constructorName', () {
         final __test = new NonErrorResolverTest();
         runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_constructorName);
@@ -2365,6 +3455,14 @@
         final __test = new NonErrorResolverTest();
         runJUnitTest(__test, __test.test_invocationOfNonFunction_localVariable_dynamic2);
       });
+      _ut.test('test_listElementTypeNotAssignable', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_listElementTypeNotAssignable);
+      });
+      _ut.test('test_mapKeyTypeNotAssignable', () {
+        final __test = new NonErrorResolverTest();
+        runJUnitTest(__test, __test.test_mapKeyTypeNotAssignable);
+      });
       _ut.test('test_memberWithClassName_setter', () {
         final __test = new NonErrorResolverTest();
         runJUnitTest(__test, __test.test_memberWithClassName_setter);
@@ -2903,38 +4001,71 @@
     assertErrors([StaticTypeWarningCode.INACCESSIBLE_SETTER]);
     verify([source]);
   }
-  void fail_redirectWithInvalidTypeParameters() {
-    Source source = addSource(EngineTestCase.createSource([]));
-    resolve(source);
-    assertErrors([StaticTypeWarningCode.REDIRECT_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
-  }
   void test_inconsistentMethodInheritance_paramCount() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int x();", "}", "abstract class B {", "  int x(int y);", "}", "class C implements A, B {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int x();",
+        "}",
+        "abstract class B {",
+        "  int x(int y);",
+        "}",
+        "class C implements A, B {",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
     verify([source]);
   }
   void test_inconsistentMethodInheritance_paramType() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  x(int i);", "}", "abstract class B {", "  x(String s);", "}", "abstract class C implements A, B {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  x(int i);",
+        "}",
+        "abstract class B {",
+        "  x(String s);",
+        "}",
+        "abstract class C implements A, B {}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
     verify([source]);
   }
   void test_inconsistentMethodInheritance_returnType() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int x();", "}", "abstract class B {", "  String x();", "}", "abstract class C implements A, B {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int x();",
+        "}",
+        "abstract class B {",
+        "  String x();",
+        "}",
+        "abstract class C implements A, B {}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
     verify([source]);
   }
   void test_invalidAssignment_compoundAssignment() {
-    Source source = addSource(EngineTestCase.createSource(["class byte {", "  int _value;", "  byte(this._value);", "  int operator +(int val) {}", "}", "", "void main() {", "  byte b = new byte(52);", "  b += 3;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class byte {",
+        "  int _value;",
+        "  byte(this._value);",
+        "  int operator +(int val) {}",
+        "}",
+        "",
+        "void main() {",
+        "  byte b = new byte(52);",
+        "  b += 3;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
   void test_invalidAssignment_instanceVariable() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "}", "f() {", "  A a;", "  a.x = '0';", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "}",
+        "f() {",
+        "  A a;",
+        "  a.x = '0';",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
@@ -2946,7 +4077,13 @@
     verify([source]);
   }
   void test_invalidAssignment_staticVariable() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int x;", "}", "f() {", "  A.x = '0';", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int x;",
+        "}",
+        "f() {",
+        "  A.x = '0';",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
@@ -2975,15 +4112,43 @@
     verify([source]);
   }
   void test_invocationOfNonFunction_ordinaryInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int x;", "}", "class B {", "  m() {", "    A.x();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int x;",
+        "}",
+        "class B {",
+        "  m() {",
+        "    A.x();",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
   void test_invocationOfNonFunction_staticInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int get g => 0;", "  f() {", "    A.g();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int get g => 0;",
+        "  f() {",
+        "    A.g();",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
   }
+  void test_invocationOfNonFunction_superExpression() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get g => 0;",
+        "}",
+        "class B extends A {",
+        "  m() {",
+        "    var v = super.g();",
+        "  }",
+        "}"]));
+    resolve(source);
+    assertErrors([StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+    verify([source]);
+  }
   void test_nonBoolCondition_conditional() {
     Source source = addSource(EngineTestCase.createSource(["f() { return 3 ? 2 : 1; }"]));
     resolve(source);
@@ -3039,7 +4204,12 @@
     verify([source]);
   }
   void test_returnOfInvalidType_expressionFunctionBody_localFunction() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  String m() {", "    int f() => '0';", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  String m() {",
+        "    int f() => '0';",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
     verify([source]);
@@ -3069,7 +4239,12 @@
     verify([source]);
   }
   void test_returnOfInvalidType_localFunction() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  String m() {", "    int f() { return '0'; }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  String m() {",
+        "    int f() { return '0'; }",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
     verify([source]);
@@ -3087,97 +4262,182 @@
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_classTypeAlias() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class C {}", "class G<E extends A> {}", "typedef D = G<B> with C;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class C {}",
+        "class G<E extends A> {}",
+        "typedef D = G<B> with C;"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_extends() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "class C extends G<B>{}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "class C extends G<B>{}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_fieldFormalParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "class C {", "  var f;", "  C(G<B> this.f) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "class C {",
+        "  var f;",
+        "  C(G<B> this.f) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_functionReturnType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "G<B> f() {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "G<B> f() {}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_functionTypeAlias() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "typedef G<B> f();"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "typedef G<B> f();"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_functionTypedFormalParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "f(G<B> h()) {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "f(G<B> h()) {}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_implements() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "class C implements G<B>{}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "class C implements G<B>{}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_is() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "var b = 1 is G<B>;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "var b = 1 is G<B>;"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_methodReturnType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "class C {", "  G<B> m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "class C {",
+        "  G<B> m() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_new() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "f() { return new G<B>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "f() { return new G<B>(); }"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "class C extends B {}", "class G<E extends B> {}", "f() { return new G<A>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "class C extends B {}",
+        "class G<E extends B> {}",
+        "f() { return new G<A>(); }"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_parameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "f(G<B> g) {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "f(G<B> g) {}"]));
+    resolve(source);
+    assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+    verify([source]);
+  }
+  void test_typeArgumentNotMatchingBounds_redirectingConstructor() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class X<T extends A> {",
+        "  X(int x, int y) {}",
+        "  factory X.name(int x, int y) = X<B>;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_typeArgumentList() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class C<E> {}", "class D<E extends A> {}", "C<D<B>> Var;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class C<E> {}",
+        "class D<E extends A> {}",
+        "C<D<B>> Var;"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_typeParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class C {}", "class G<E extends A> {}", "class D<F extends G<B>> {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class C {}",
+        "class G<E extends A> {}",
+        "class D<F extends G<B>> {}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_variableDeclaration() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "G<B> g;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "G<B> g;"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
   }
   void test_typeArgumentNotMatchingBounds_with() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {}", "class C extends Object with G<B>{}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {}",
+        "class C extends Object with G<B>{}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
@@ -3203,7 +4463,17 @@
     assertErrors([StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
   void test_undefinedMethod_ignoreTypePropagation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  m() {}", "}", "class C {", "f() {", "    A a = new B();", "    a.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  m() {}",
+        "}",
+        "class C {",
+        "f() {",
+        "    A a = new B();",
+        "    a.m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
@@ -3238,7 +4508,11 @@
     assertErrors([StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
   void test_undefinedSuperMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  m() { return super.m(); }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  m() { return super.m(); }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
   }
@@ -3255,13 +4529,23 @@
     verify([source]);
   }
   void test_wrongNumberOfTypeArguments_typeTest_tooFew() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<K, V> {}", "f(p) {", "  return p is C<A>;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<K, V> {}",
+        "f(p) {",
+        "  return p is C<A>;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
     verify([source]);
   }
   void test_wrongNumberOfTypeArguments_typeTest_tooMany() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<E> {}", "f(p) {", "  return p is C<A, A>;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<E> {}",
+        "f(p) {",
+        "  return p is C<A, A>;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
     verify([source]);
@@ -3320,6 +4604,10 @@
         final __test = new StaticTypeWarningCodeTest();
         runJUnitTest(__test, __test.test_invocationOfNonFunction_staticInvocation);
       });
+      _ut.test('test_invocationOfNonFunction_superExpression', () {
+        final __test = new StaticTypeWarningCodeTest();
+        runJUnitTest(__test, __test.test_invocationOfNonFunction_superExpression);
+      });
       _ut.test('test_nonBoolCondition_conditional', () {
         final __test = new StaticTypeWarningCodeTest();
         runJUnitTest(__test, __test.test_nonBoolCondition_conditional);
@@ -3436,6 +4724,10 @@
         final __test = new StaticTypeWarningCodeTest();
         runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_parameter);
       });
+      _ut.test('test_typeArgumentNotMatchingBounds_redirectingConstructor', () {
+        final __test = new StaticTypeWarningCodeTest();
+        runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_redirectingConstructor);
+      });
       _ut.test('test_typeArgumentNotMatchingBounds_typeArgumentList', () {
         final __test = new StaticTypeWarningCodeTest();
         runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_typeArgumentList);
@@ -3581,37 +4873,61 @@
     verify([source]);
   }
   void test_deadCode_deadCatch_catchFollowingCatch() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "f() {", "  try {} catch (e) {} catch (e) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "f() {",
+        "  try {} catch (e) {} catch (e) {}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
     verify([source]);
   }
   void test_deadCode_deadCatch_catchFollowingCatch_nested() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "f() {", "  try {} catch (e) {} catch (e) {if(false) {}}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "f() {",
+        "  try {} catch (e) {} catch (e) {if(false) {}}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
     verify([source]);
   }
   void test_deadCode_deadCatch_catchFollowingCatch_object() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  try {} on Object catch (e) {} catch (e) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  try {} on Object catch (e) {} catch (e) {}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
     verify([source]);
   }
   void test_deadCode_deadCatch_catchFollowingCatch_object_nested() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  try {} on Object catch (e) {} catch (e) {if(false) {}}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  try {} on Object catch (e) {} catch (e) {if(false) {}}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
     verify([source]);
   }
   void test_deadCode_deadCatch_onCatchSubtype() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "f() {", "  try {} on A catch (e) {} on B catch (e) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "f() {",
+        "  try {} on A catch (e) {} on B catch (e) {}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
     verify([source]);
   }
   void test_deadCode_deadCatch_onCatchSubtype_nested() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "f() {", "  try {} on A catch (e) {} on B catch (e) {if(false) {}}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "f() {",
+        "  try {} on A catch (e) {} on B catch (e) {if(false) {}}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
     verify([source]);
@@ -3641,31 +4957,62 @@
     verify([source]);
   }
   void test_deadCode_statementAfterReturn_function() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  var one = 1;", "  return;", "  var two = 2;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  var one = 1;",
+        "  return;",
+        "  var two = 2;",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_deadCode_statementAfterReturn_ifStatement() {
-    Source source = addSource(EngineTestCase.createSource(["f(bool b) {", "  if(b) {", "    var one = 1;", "    return;", "    var two = 2;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(bool b) {",
+        "  if(b) {",
+        "    var one = 1;",
+        "    return;",
+        "    var two = 2;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_deadCode_statementAfterReturn_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {", "    var one = 1;", "    return;", "    var two = 2;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {",
+        "    var one = 1;",
+        "    return;",
+        "    var two = 2;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_deadCode_statementAfterReturn_nested() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  var one = 1;", "  return;", "  if(false) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  var one = 1;",
+        "  return;",
+        "  if(false) {}",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_deadCode_statementAfterReturn_twoReturns() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  var one = 1;", "  return;", "  var two = 2;", "  return;", "  var three = 3;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  var one = 1;",
+        "  return;",
+        "  var two = 2;",
+        "  return;",
+        "  var three = 3;",
+        "}"]));
     resolve(source);
     assertErrors([HintCode.DEAD_CODE]);
     verify([source]);
@@ -4333,7 +5680,18 @@
     InterfaceType symbolType = classElement("Symbol", objectType, []).type;
     InterfaceType typeType = classElement("Type", objectType, []).type;
     CompilationUnitElementImpl unit = new CompilationUnitElementImpl("lib.dart");
-    unit.types = <ClassElement> [boolType.element, doubleType.element, functionType.element, intType.element, listType.element, mapType.element, objectType.element, stackTraceType.element, stringType.element, symbolType.element, typeType.element];
+    unit.types = <ClassElement> [
+        boolType.element,
+        doubleType.element,
+        functionType.element,
+        intType.element,
+        listType.element,
+        mapType.element,
+        objectType.element,
+        stackTraceType.element,
+        stringType.element,
+        symbolType.element,
+        typeType.element];
     LibraryElementImpl library = new LibraryElementImpl(new AnalysisContextImpl(), ASTFactory.libraryIdentifier2(["lib"]));
     library.definingCompilationUnit = unit;
     TypeProviderImpl provider = new TypeProviderImpl(library);
@@ -4838,7 +6196,11 @@
     verify([source]);
   }
   void fail_constEvalThrowsException() {
-    Source source = addSource(EngineTestCase.createSource(["class C {", "  const C();", "}", "f() { return const C(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class C {",
+        "  const C();",
+        "}",
+        "f() { return const C(); }"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
     verify([source]);
@@ -4856,7 +6218,11 @@
     verify([source]);
   }
   void fail_mixinDeclaresConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B extends Object mixin A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B extends Object mixin A {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
@@ -4874,39 +6240,19 @@
     verify([source]);
   }
   void fail_recursiveCompileTimeConstant() {
-    Source source = addSource(EngineTestCase.createSource(["const x = y + 1;", "const y = x + 1;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "  final m = const A();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
     verify([source]);
   }
-  void fail_recursiveFunctionTypeAlias_direct() {
-    Source source = addSource(EngineTestCase.createSource(["typedef F(F f);"]));
+  void fail_recursiveCompileTimeConstant_cycle() {
+    Source source = addSource(EngineTestCase.createSource(["const x = y + 1;", "const y = x + 1;"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
-  }
-  void fail_recursiveFunctionTypeAlias_indirect() {
-    Source source = addSource(EngineTestCase.createSource(["typedef F(G g);", "typedef G(F f);"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
-  }
-  void fail_reservedWordAsIdentifier() {
-    Source source = addSource(EngineTestCase.createSource(["int class = 2;"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.RESERVED_WORD_AS_IDENTIFIER]);
-    verify([source]);
-  }
-  void fail_staticTopLevelFunction_topLevel() {
-    Source source = addSource(EngineTestCase.createSource(["static f() {}"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.STATIC_TOP_LEVEL_FUNCTION]);
-    verify([source]);
-  }
-  void fail_staticTopLevelVariable() {
-    Source source = addSource(EngineTestCase.createSource(["static int x;"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.STATIC_TOP_LEVEL_VARIABLE]);
+    assertErrors([CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
     verify([source]);
   }
   void fail_superInitializerInObject() {
@@ -4915,14 +6261,11 @@
     assertErrors([CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
     verify([source]);
   }
-  void fail_uninitializedFinalField() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int i;", "}"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.UNINITIALIZED_FINAL_FIELD]);
-    verify([source]);
-  }
   void test_ambiguousExport() {
-    Source source = addSource(EngineTestCase.createSource(["library L;", "export 'lib1.dart';", "export 'lib2.dart';"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library L;",
+        "export 'lib1.dart';",
+        "export 'lib2.dart';"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
@@ -4930,70 +6273,109 @@
     verify([source]);
   }
   void test_ambiguousImport_as() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "f(p) {p as N;}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "f(p) {p as N;}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_extends() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "class A extends N {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "class A extends N {}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT, CompileTimeErrorCode.EXTENDS_NON_CLASS]);
+    assertErrors([
+        CompileTimeErrorCode.AMBIGUOUS_IMPORT,
+        CompileTimeErrorCode.EXTENDS_NON_CLASS]);
   }
   void test_ambiguousImport_function() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "g() { return f(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "g() { return f(); }"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "f() {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "f() {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT, StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+    assertErrors([
+        CompileTimeErrorCode.AMBIGUOUS_IMPORT,
+        StaticTypeWarningCode.UNDEFINED_FUNCTION]);
   }
   void test_ambiguousImport_implements() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "class A implements N {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "class A implements N {}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT, CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
+    assertErrors([
+        CompileTimeErrorCode.AMBIGUOUS_IMPORT,
+        CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
   void test_ambiguousImport_instanceCreation() {
-    Source source = addSource(EngineTestCase.createSource(["library L;", "import 'lib1.dart';", "import 'lib2.dart';", "f() {new N();}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library L;",
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "f() {new N();}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_is() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "f(p) {p is N;}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "f(p) {p is N;}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_qualifier() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "g() { N.FOO; }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "g() { N.FOO; }"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_typeArgument_instanceCreation() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "class A<T> {}", "f() {new A<N>();}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "class A<T> {}",
+        "f() {new A<N>();}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_varRead() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "f() { g(v); }", "g(p) {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "f() { g(v); }",
+        "g(p) {}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "var v;"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "var v;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_varWrite() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "f() { v = 0; }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "f() { v = 0; }"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "var v;"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "var v;"]));
     resolve(source);
@@ -5002,13 +6384,41 @@
   void test_argumentDefinitionTestNonParameter() {
     Source source = addSource(EngineTestCase.createSource(["f() {", " var v = 0;", " return ?v;", "}"]));
     resolve(source);
-    assertErrors([ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER]);
+    assertErrors([
+        ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST,
+        CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER]);
+    verify([source]);
+  }
+  void test_argumentTypeNotAssignable_const() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(String p);",
+        "}",
+        "main() {",
+        "  const A(42);",
+        "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+  void test_argumentTypeNotAssignable_const_super() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(String p);",
+        "}",
+        "class B extends A {",
+        "  const B() : super(42);",
+        "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_builtInIdentifierAsType() {
     Source source = addSource(EngineTestCase.createSource(["f() {", "  typedef x;", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, StaticWarningCode.UNDEFINED_CLASS]);
+    assertErrors([
+        CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE,
+        StaticWarningCode.UNDEFINED_CLASS]);
     verify([source]);
   }
   void test_builtInIdentifierAsTypedefName_classTypeAlias() {
@@ -5036,7 +6446,21 @@
     verify([source]);
   }
   void test_caseExpressionTypeImplementsEquals() {
-    Source source = addSource(EngineTestCase.createSource(["class IntWrapper {", "  final int value;", "  const IntWrapper(this.value);", "  bool operator ==(IntWrapper x) {", "    return value == x.value;", "  }", "}", "", "f(var a) {", "  switch(a) {", "    case(const IntWrapper(1)) : return 1;", "    default: return 0;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class IntWrapper {",
+        "  final int value;",
+        "  const IntWrapper(this.value);",
+        "  bool operator ==(IntWrapper x) {",
+        "    return value == x.value;",
+        "  }",
+        "}",
+        "",
+        "f(var a) {",
+        "  switch(a) {",
+        "    case(const IntWrapper(1)) : return 1;",
+        "    default: return 0;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
     verify([source]);
@@ -5054,37 +6478,73 @@
     verify([source]);
   }
   void test_conflictingGetterAndMethod_field_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m;", "}", "class B extends A {", "  m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m;",
+        "}",
+        "class B extends A {",
+        "  m() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
     verify([source]);
   }
   void test_conflictingGetterAndMethod_getter_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get m => 0;", "}", "class B extends A {", "  m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get m => 0;",
+        "}",
+        "class B extends A {",
+        "  m() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
     verify([source]);
   }
   void test_conflictingGetterAndMethod_method_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  int m;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  int m;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
     verify([source]);
   }
   void test_conflictingGetterAndMethod_method_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  get m => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  get m => 0;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
     verify([source]);
   }
   void test_constConstructorWithNonFinalField_mixin() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var a;", "}", "class B extends Object with A {", "  const B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var a;",
+        "}",
+        "class B extends Object with A {",
+        "  const B();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
     verify([source]);
   }
   void test_constConstructorWithNonFinalField_super() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var a;", "}", "class B extends A {", "  const B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var a;",
+        "}",
+        "class B extends A {",
+        "  const B();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
     verify([source]);
@@ -5102,13 +6562,25 @@
     verify([source]);
   }
   void test_constEval_propertyExtraction_methodInstance() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "  m() {}", "}", "final a = const A();", "const C = a.m;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "  m() {}",
+        "}",
+        "final a = const A();",
+        "const C = a.m;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
   }
   void test_constEval_propertyExtraction_methodStatic_targetInstance() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "  static m() {}", "}", "final a = const A();", "const C = a.m;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "  static m() {}",
+        "}",
+        "final a = const A();",
+        "const C = a.m;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
     verify([source]);
@@ -5130,12 +6602,16 @@
   void test_constEvalThrowsException_unaryBitNot_null() {
     Source source = addSource("const C = ~null;");
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+        StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_constEvalThrowsException_unaryNegated_null() {
     Source source = addSource("const C = -null;");
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+        StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_constEvalThrowsException_unaryNot_null() {
     Source source = addSource("const C = !null;");
@@ -5150,17 +6626,33 @@
   void test_constEvalTypeBool_binary_leftTrue() {
     Source source = addSource("const C = (true || 0);");
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, HintCode.DEAD_CODE]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+        HintCode.DEAD_CODE]);
     verify([source]);
   }
   void test_constEvalTypeBoolNumString_equal() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "class B {", "  final a;", "  const B(num p) : a = p == const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "class B {",
+        "  final a;",
+        "  const B(num p) : a = p == const A();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
     verify([source]);
   }
   void test_constEvalTypeBoolNumString_notEqual() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "class B {", "  final a;", "  const B(String p) : a = p != const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "class B {",
+        "  final a;",
+        "  const B(String p) : a = p != const A();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
     verify([source]);
@@ -5184,6 +6676,12 @@
     check_constEvalTypeNum_withParameter_binary("p <= ''");
     check_constEvalTypeNum_withParameter_binary("p % ''");
   }
+  void test_constEvalTypeNum_plus_String() {
+    Source source = addSource("const C = 'a' + 'b';");
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_NUM]);
+    verify([source]);
+  }
   void test_constFormalParameter_fieldFormalParameter() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  var x;", "  A(const this.x) {}", "}"]));
     resolve(source);
@@ -5221,37 +6719,70 @@
     verify([source]);
   }
   void test_constWithInvalidTypeParameters() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "f() { return const A<A>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "f() { return const A<A>(); }"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
   void test_constWithInvalidTypeParameters_tooFew() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<K, V> {", "  const C();", "}", "f(p) {", "  return const C<A>();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<K, V> {",
+        "  const C();",
+        "}",
+        "f(p) {",
+        "  return const C<A>();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
   void test_constWithInvalidTypeParameters_tooMany() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<E> {", "  const C();", "}", "f(p) {", "  return const C<A, A>();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<E> {",
+        "  const C();",
+        "}",
+        "f(p) {",
+        "  return const C<A, A>();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
     verify([source]);
   }
   void test_constWithNonConst() {
-    Source source = addSource(EngineTestCase.createSource(["class T {", "  T(a, b, {c, d}) {}", "}", "f() { return const T(0, 1, c: 2, d: 3); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class T {",
+        "  T(a, b, {c, d}) {}",
+        "}",
+        "f() { return const T(0, 1, c: 2, d: 3); }"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_NON_CONST]);
     verify([source]);
   }
   void test_constWithNonConstantArgument_annotation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(int p);", "}", "var v = 42;", "@A(v)", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(int p);",
+        "}",
+        "var v = 42;",
+        "@A(v)",
+        "main() {",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
     verify([source]);
   }
   void test_constWithNonConstantArgument_instanceCreation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(a);", "}", "f(p) { return const A(p); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(a);",
+        "}",
+        "f(p) { return const A(p); }"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
     verify([source]);
@@ -5264,31 +6795,59 @@
   }
   void test_constWithNonType_fromLibrary() {
     Source source1 = addSource2("lib.dart", "");
-    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource(["import 'lib.dart' as lib;", "void f() {", "  const lib.A();", "}"]));
+    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource([
+        "import 'lib.dart' as lib;",
+        "void f() {",
+        "  const lib.A();",
+        "}"]));
     resolve(source1);
     resolve(source2);
     assertErrors([CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
     verify([source1]);
   }
   void test_constWithTypeParameters_direct() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  static const V = const A<T>();", "  const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  static const V = const A<T>();",
+        "  const A();",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
+        StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
     verify([source]);
   }
   void test_constWithTypeParameters_indirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  static const V = const A<List<T>>();", "  const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  static const V = const A<List<T>>();",
+        "  const A();",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
+        StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
     verify([source]);
   }
   void test_constWithUndefinedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "f() {", "  return const A.noSuchConstructor();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "f() {",
+        "  return const A.noSuchConstructor();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
   }
   void test_constWithUndefinedConstructorDefault() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.name();", "}", "f() {", "  return const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.name();",
+        "}",
+        "f() {",
+        "  return const A();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
     verify([source]);
@@ -5302,19 +6861,25 @@
   void test_duplicateConstructorName_named() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  A.a() {}", "  A.a() {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME, CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
+        CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME]);
     verify([source]);
   }
   void test_duplicateConstructorName_unnamed() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "  A() {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
+        CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT]);
     verify([source]);
   }
   void test_duplicateDefinition() {
     Source source = addSource(EngineTestCase.createSource(["f() {", "  int m = 0;", "  m(a) {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
   void test_duplicateDefinition_acrossLibraries() {
@@ -5328,47 +6893,81 @@
   void test_duplicateDefinition_classMembers_fields() {
     Source librarySource = addSource(EngineTestCase.createSource(["class A {", "  int a;", "  int a;", "}"]));
     resolve(librarySource);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([librarySource]);
   }
   void test_duplicateDefinition_classMembers_fields_oneStatic() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  static int x;", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
   void test_duplicateDefinition_classMembers_methods() {
     Source librarySource = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "  m() {}", "}"]));
     resolve(librarySource);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([librarySource]);
   }
   void test_duplicateDefinition_localFields() {
-    Source librarySource = addSource(EngineTestCase.createSource(["class A {", "  m() {", "    int a;", "    int a;", "  }", "}"]));
+    Source librarySource = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {",
+        "    int a;",
+        "    int a;",
+        "  }",
+        "}"]));
     resolve(librarySource);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([librarySource]);
   }
   void test_duplicateDefinition_parameterWithFunctionName_local() {
     Source source = addSource(EngineTestCase.createSource(["main() {", "  f(f) {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
   void test_duplicateDefinition_parameterWithFunctionName_topLevel() {
     Source source = addSource(EngineTestCase.createSource(["main() {", "  f(f) {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION, CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertErrors([
+        CompileTimeErrorCode.DUPLICATE_DEFINITION,
+        CompileTimeErrorCode.DUPLICATE_DEFINITION]);
     verify([source]);
   }
   void test_duplicateDefinitionInheritance_instanceMethod_staticMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  x() {}", "}", "class B extends A {", "  static x() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  x() {}",
+        "}",
+        "class B extends A {",
+        "  static x() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
   }
   void test_duplicateDefinitionInheritance_instanceMethodAbstract_staticMethod() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  x();", "}", "abstract class B extends A {", "  static x() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  x();",
+        "}",
+        "abstract class B extends A {",
+        "  static x() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
     verify([source]);
@@ -5398,34 +6997,50 @@
     assertErrors([CompileTimeErrorCode.EXTENDS_NON_CLASS]);
     verify([source]);
   }
+  void test_extendsNonClass_dynamic() {
+    Source source = addSource(EngineTestCase.createSource(["class B extends dynamic {}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.EXTENDS_NON_CLASS]);
+    verify([source]);
+  }
   void test_extendsOrImplementsDisallowedClass_extends_bool() {
     Source source = addSource(EngineTestCase.createSource(["class A extends bool {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
+    assertErrors([
+        CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
   void test_extendsOrImplementsDisallowedClass_extends_double() {
     Source source = addSource(EngineTestCase.createSource(["class A extends double {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
+    assertErrors([
+        CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
   void test_extendsOrImplementsDisallowedClass_extends_int() {
     Source source = addSource(EngineTestCase.createSource(["class A extends int {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
+    assertErrors([
+        CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
   void test_extendsOrImplementsDisallowedClass_extends_num() {
     Source source = addSource(EngineTestCase.createSource(["class A extends num {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
+    assertErrors([
+        CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
   void test_extendsOrImplementsDisallowedClass_extends_String() {
     Source source = addSource(EngineTestCase.createSource(["class A extends String {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
+    assertErrors([
+        CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
     verify([source]);
   }
   void test_extendsOrImplementsDisallowedClass_implements_bool() {
@@ -5459,7 +7074,25 @@
     verify([source]);
   }
   void test_extraPositionalArguments_const() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "main() {", "  const A(0);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "main() {",
+        "  const A(0);",
+        "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
+    verify([source]);
+  }
+  void test_extraPositionalArguments_const_super() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "class B extends A {",
+        "  const B() : super(0);",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
     verify([source]);
@@ -5471,19 +7104,36 @@
     verify([source]);
   }
   void test_fieldInitializedByMultipleInitializers_multipleInits() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  A() : x = 0, x = 1, x = 2 {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  A() : x = 0, x = 1, x = 2 {}",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
+    assertErrors([
+        CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+        CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
     verify([source]);
   }
   void test_fieldInitializedByMultipleInitializers_multipleNames() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  int y;", "  A() : x = 0, x = 1, y = 0, y = 1 {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  int y;",
+        "  A() : x = 0, x = 1, y = 0, y = 1 {}",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
+    assertErrors([
+        CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+        CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
     verify([source]);
   }
   void test_fieldInitializedInInitializerAndDeclaration_final() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int x = 0;", "  A() : x = 1 {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int x = 0;",
+        "  A() : x = 1 {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION]);
     verify([source]);
@@ -5501,7 +7151,11 @@
     verify([source]);
   }
   void test_fieldInitializerNotAssignable() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int x;", "  const A() : x = '';", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int x;",
+        "  const A() : x = '';",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE]);
     verify([source]);
@@ -5509,7 +7163,9 @@
   void test_fieldInitializerOutsideConstructor() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  m(this.x) {}", "}"]));
     resolve(source);
-    assertErrors([ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
+    assertErrors([
+        ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+        CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
     verify([source]);
   }
   void test_fieldInitializerOutsideConstructor_defaultParameter() {
@@ -5519,19 +7175,34 @@
     verify([source]);
   }
   void test_fieldInitializerRedirectingConstructor_afterRedirection() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  A.named() {}", "  A() : this.named(), x = 42;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  A.named() {}",
+        "  A() : this.named(), x = 42;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
   void test_fieldInitializerRedirectingConstructor_beforeRedirection() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  A.named() {}", "  A() : x = 42, this.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  A.named() {}",
+        "  A() : x = 42, this.named();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
   void test_fieldInitializingFormalRedirectingConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int x;", "  A.named() {}", "  A(this.x) : this.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int x;",
+        "  A.named() {}",
+        "  A(this.x) : this.named();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
@@ -5588,7 +7259,9 @@
   void test_getterAndMethodWithSameName() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  x(y) {}", "  get x => 0;", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME, CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME]);
+    assertErrors([
+        CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME,
+        CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME]);
     verify([source]);
   }
   void test_implementsDynamic() {
@@ -5616,13 +7289,35 @@
     verify([source]);
   }
   void test_implementsRepeated_3times() {
-    Source source = addSource(EngineTestCase.createSource(["class A {} class C{}", "class B implements A, A, A, A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {} class C{}",
+        "class B implements A, A, A, A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.IMPLEMENTS_REPEATED, CompileTimeErrorCode.IMPLEMENTS_REPEATED, CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
+    assertErrors([
+        CompileTimeErrorCode.IMPLEMENTS_REPEATED,
+        CompileTimeErrorCode.IMPLEMENTS_REPEATED,
+        CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
+    verify([source]);
+  }
+  void test_implementsSuperClass() {
+    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A implements A {}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
+    verify([source]);
+  }
+  void test_implementsSuperClass_Object() {
+    Source source = addSource(EngineTestCase.createSource(["class A implements Object {}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f;", "  var f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f;",
+        "  var f;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
@@ -5634,19 +7329,42 @@
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_invocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var v;", "  A() : v = f();", "  f() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var v;",
+        "  A() : v = f();",
+        "  f() {}",
+        "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
+    verify([source]);
+  }
+  void test_implicitThisReferenceInInitializer_invocationInStatic() {
+    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var F = m();", "  m() {}", "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A(p) {}", "  A.named() : this(f);", "  var f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A(p) {}",
+        "  A.named() : this(f);",
+        "  var f;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
   }
   void test_implicitThisReferenceInInitializer_superConstructorInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A(p) {}", "}", "class B extends A {", "  B() : super(f);", "  var f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A(p) {}",
+        "}",
+        "class B extends A {",
+        "  B() : super(f);",
+        "  var f;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
     verify([source]);
@@ -5671,15 +7389,35 @@
     verify([source]);
   }
   void test_inconsistentCaseExpressionTypes() {
-    Source source = addSource(EngineTestCase.createSource(["f(var p) {", "  switch (p) {", "    case 1:", "      break;", "    case 'a':", "      break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(var p) {",
+        "  switch (p) {",
+        "    case 1:",
+        "      break;",
+        "    case 'a':",
+        "      break;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
     verify([source]);
   }
   void test_inconsistentCaseExpressionTypes_repeated() {
-    Source source = addSource(EngineTestCase.createSource(["f(var p) {", "  switch (p) {", "    case 1:", "      break;", "    case 'a':", "      break;", "    case 'b':", "      break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(var p) {",
+        "  switch (p) {",
+        "    case 1:",
+        "      break;",
+        "    case 'a':",
+        "      break;",
+        "    case 'b':",
+        "      break;",
+        "  }",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES, CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
+    assertErrors([
+        CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
+        CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
     verify([source]);
   }
   void test_initializerForNonExistant_initializer() {
@@ -5700,7 +7438,13 @@
     verify([source]);
   }
   void test_initializingFormalForNonExistantField_notInEnclosingClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "int x;", "}", "class B extends A {", "  B(this.x) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "int x;",
+        "}",
+        "class B extends A {",
+        "  B(this.x) {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTANT_FIELD]);
     verify([source]);
@@ -5718,19 +7462,37 @@
     verify([source]);
   }
   void test_instanceMemberAccessFromStatic_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int f;", "  static foo() {", "    f;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int f;",
+        "  static foo() {",
+        "    f;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
   }
   void test_instanceMemberAccessFromStatic_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get g => null;", "  static foo() {", "    g;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get g => null;",
+        "  static foo() {",
+        "    g;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
   }
   void test_instanceMemberAccessFromStatic_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "  static foo() {", "    m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "  static foo() {",
+        "    m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
     verify([source]);
@@ -5775,7 +7537,13 @@
     verify([source]);
   }
   void test_invalidAnnotation_staticMethodReference() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static f() {}", "}", "@A.f", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static f() {}",
+        "}",
+        "@A.f",
+        "main() {",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_ANNOTATION]);
     verify([source]);
@@ -5797,25 +7565,49 @@
     assertErrors([CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
   }
   void test_invalidOverrideNamed_fewerNamedParameters() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({a, b}) {}", "}", "class B extends A {", "  m({a}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({a, b}) {}",
+        "}",
+        "class B extends A {",
+        "  m({a}) {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_OVERRIDE_NAMED]);
     verify([source]);
   }
   void test_invalidOverrideNamed_missingNamedParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({a, b}) {}", "}", "class B extends A {", "  m({a, c}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({a, b}) {}",
+        "}",
+        "class B extends A {",
+        "  m({a, c}) {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_OVERRIDE_NAMED]);
     verify([source]);
   }
   void test_invalidOverridePositional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m([a, b]) {}", "}", "class B extends A {", "  m([a]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m([a, b]) {}",
+        "}",
+        "class B extends A {",
+        "  m([a]) {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_OVERRIDE_POSITIONAL]);
     verify([source]);
   }
   void test_invalidOverrideRequired() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m(a) {}", "}", "class B extends A {", "  m(a, b) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m(a) {}",
+        "}",
+        "class B extends A {",
+        "  m(a, b) {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_OVERRIDE_REQUIRED]);
     verify([source]);
@@ -5863,19 +7655,34 @@
     verify([source]);
   }
   void test_invalidTypeArgumentForKey() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {", "    return const <int, int>{};", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {",
+        "    return const <int, int>{};",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_FOR_KEY]);
     verify([source]);
   }
   void test_invalidTypeArgumentInConstList() {
-    Source source = addSource(EngineTestCase.createSource(["class A<E> {", "  m() {", "    return const <E>[];", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<E> {",
+        "  m() {",
+        "    return const <E>[];",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
     verify([source]);
   }
   void test_invalidTypeArgumentInConstMap() {
-    Source source = addSource(EngineTestCase.createSource(["class A<E> {", "  m() {", "    return const <String, E>{};", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<E> {",
+        "  m() {",
+        "    return const <String, E>{};",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
     verify([source]);
@@ -5896,20 +7703,57 @@
     assertErrors([CompileTimeErrorCode.INVALID_URI]);
   }
   void test_labelInOuterScope() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m(int i) {", "    l: while (i > 0) {", "      void f() {", "        break l;", "      };", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m(int i) {",
+        "    l: while (i > 0) {",
+        "      void f() {",
+        "        break l;",
+        "      };",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
   }
   void test_labelUndefined_break() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  x: while (true) {", "    break y;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  x: while (true) {",
+        "    break y;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.LABEL_UNDEFINED]);
   }
   void test_labelUndefined_continue() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  x: while (true) {", "    continue y;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  x: while (true) {",
+        "    continue y;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.LABEL_UNDEFINED]);
   }
+  void test_listElementTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = const <String> [42];"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+  void test_mapKeyTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = const <String, int > {1 : 2};"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+  void test_mapValueTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = const <String, String> {'a' : 2};"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
   void test_memberWithClassName_field() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  int A = 0;", "}"]));
     resolve(source);
@@ -5933,41 +7777,63 @@
   void test_methodAndGetterWithSameName() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  get x => 0;", "  x(y) {}", "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME, CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME]);
+    assertErrors([
+        CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME,
+        CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME]);
     verify([source]);
   }
   void test_mixinDeclaresConstructor_classDeclaration() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B extends Object with A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B extends Object with A {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
   }
   void test_mixinDeclaresConstructor_typedef() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "typedef B = Object with A;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "typedef B = Object with A;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_classDeclaration_extends() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "class C extends Object with B {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "class C extends Object with B {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_classDeclaration_with() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends Object with A {}", "class C extends Object with B {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends Object with A {}",
+        "class C extends Object with B {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_typedef_extends() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "typedef C = Object with B;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "typedef C = Object with B;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
   }
   void test_mixinInheritsFromNotObject_typedef_with() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends Object with A {}", "typedef C = Object with B;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends Object with A {}",
+        "typedef C = Object with B;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verify([source]);
@@ -5985,7 +7851,11 @@
     verify([source]);
   }
   void test_mixinReferencesSuper() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  toString() => super.toString();", "}", "class B extends Object with A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  toString() => super.toString();",
+        "}",
+        "class B extends Object with A {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
     verify([source]);
@@ -6003,13 +7873,22 @@
     verify([source]);
   }
   void test_multipleRedirectingConstructorInvocations() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() : this.a(), this.b();", "  A.a() {}", "  A.b() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() : this.a(), this.b();",
+        "  A.a() {}",
+        "  A.b() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
     verify([source]);
   }
   void test_multipleSuperInitializers() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  B() : super(), super() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  B() : super(), super() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS]);
     verify([source]);
@@ -6026,24 +7905,6 @@
     assertErrors([ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
     verify([source]);
   }
-  void test_newWithInvalidTypeParameters() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "f() { return new A<A>(); }"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
-  }
-  void test_newWithInvalidTypeParameters_tooFew() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<K, V> {}", "f(p) {", "  return new C<A>();", "}"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
-  }
-  void test_newWithInvalidTypeParameters_tooMany() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class C<E> {}", "f(p) {", "  return new C<A, A>();", "}"]));
-    resolve(source);
-    assertErrors([CompileTimeErrorCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
-  }
   void test_noAnnotationConstructorArguments() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "@A", "main() {", "}"]));
     resolve(source);
@@ -6051,7 +7912,13 @@
     verify([source]);
   }
   void test_noDefaultSuperConstructorExplicit() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A(p);", "}", "class B extends A {", "  B() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A(p);",
+        "}",
+        "class B extends A {",
+        "  B() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
     verify([source]);
@@ -6069,7 +7936,13 @@
     verify([source]);
   }
   void test_nonConstantAnnotationConstructor_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.fromInt() {}", "}", "@A.fromInt()", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.fromInt() {}",
+        "}",
+        "@A.fromInt()",
+        "main() {",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
     verify([source]);
@@ -6117,7 +7990,13 @@
     verify([source]);
   }
   void test_nonConstCaseExpression() {
-    Source source = addSource(EngineTestCase.createSource(["f(int p, int q) {", "  switch (p) {", "    case 3 + q:", "      break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int p, int q) {",
+        "  switch (p) {",
+        "    case 3 + q:",
+        "      break;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
     verify([source]);
@@ -6153,67 +8032,139 @@
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_notBool_left() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final bool a;", "  const A(String p) : a = p && true;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final bool a;",
+        "  const A(String p) : a = p && true;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
+    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_notBool_right() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final bool a;", "  const A(String p) : a = true && p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final bool a;",
+        "  const A(String p) : a = true && p;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
+    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_notInt() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int a;", "  const A(String p) : a = 5 & p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int a;",
+        "  const A(String p) : a = 5 & p;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
+        CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_binary_notNum() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int a;", "  const A(String p) : a = 5 + p;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final int a;",
+        "  const A(String p) : a = 5 + p;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
+        CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int C;", "  final int a;", "  const A() : a = C;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int C;",
+        "  final int a;",
+        "  const A() : a = C;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_redirecting() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var C;", "  const A.named(p);", "  const A() : this.named(C);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static var C;",
+        "  const A.named(p);",
+        "  const A() : this.named(C);",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
   void test_nonConstValueInInitializer_super() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(p);", "}", "class B extends A {", "  static var C;", "  const B() : super(C);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(p);",
+        "}",
+        "class B extends A {",
+        "  static var C;",
+        "  const B() : super(C);",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
     verify([source]);
   }
   void test_nonGenerativeConstructor_explicit() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A.named() {}", "}", "class B extends A {", "  B() : super.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A.named() {}",
+        "}",
+        "class B extends A {",
+        "  B() : super.named();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
   void test_nonGenerativeConstructor_implicit() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A() {}", "}", "class B extends A {", "  B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A() {}",
+        "}",
+        "class B extends A {",
+        "  B();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
   void test_nonGenerativeConstructor_implicit2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A() {}", "}", "class B extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A() {}",
+        "}",
+        "class B extends A {",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
   void test_notEnoughRequiredArguments_const() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(int p);", "}", "main() {", "  const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(int p);",
+        "}",
+        "main() {",
+        "  const A();",
+        "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
+    verify([source]);
+  }
+  void test_notEnoughRequiredArguments_const_super() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(int p);",
+        "}",
+        "class B extends A {",
+        "  const B() : super();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
     verify([source]);
@@ -6284,9 +8235,15 @@
     verify([source]);
   }
   void test_recursiveConstructorRedirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.a() : this.b();", "  A.b() : this.a();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.a() : this.b();",
+        "  A.b() : this.a();",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
     verify([source]);
   }
   void test_recursiveConstructorRedirect_directSelfReference() {
@@ -6296,9 +8253,24 @@
     verify([source]);
   }
   void test_recursiveFactoryRedirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B {", "  factory A() = C;", "}", "class B implements C {", "  factory B() = A;", "}", "class C implements A {", "  factory C() = B;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B {",
+        "  factory A() = C;",
+        "}",
+        "class B implements C {",
+        "  factory B() = A;",
+        "}",
+        "class C implements A {",
+        "  factory C() = B;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveFactoryRedirect_directSelfReference() {
@@ -6308,15 +8280,45 @@
     verify([source]);
   }
   void test_recursiveFactoryRedirect_generic() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> implements B<T> {", "  factory A() = C;", "}", "class B<T> implements C<T> {", "  factory B() = A;", "}", "class C<T> implements A<T> {", "  factory C() = B;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> implements B<T> {",
+        "  factory A() = C;",
+        "}",
+        "class B<T> implements C<T> {",
+        "  factory B() = A;",
+        "}",
+        "class C<T> implements A<T> {",
+        "  factory C() = B;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveFactoryRedirect_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B {", "  factory A.nameA() = C.nameC;", "}", "class B implements C {", "  factory B.nameB() = A.nameA;", "}", "class C implements A {", "  factory C.nameC() = B.nameB;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B {",
+        "  factory A.nameA() = C.nameC;",
+        "}",
+        "class B implements C {",
+        "  factory B.nameB() = A.nameA;",
+        "}",
+        "class C implements A {",
+        "  factory C.nameC() = B.nameB;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
 
@@ -6325,45 +8327,78 @@
    * not the part of a cycle.
    */
   void test_recursiveFactoryRedirect_outsideCycle() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  factory A() = C;", "}", "class B implements C {", "  factory B() = C;", "}", "class C implements A, B {", "  factory C() = B;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  factory A() = C;",
+        "}",
+        "class B implements C {",
+        "  factory B() = C;",
+        "}",
+        "class C implements A, B {",
+        "  factory C() = B;",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_extends() {
     Source source = addSource(EngineTestCase.createSource(["class A extends B {}", "class B extends A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_extends_implements() {
     Source source = addSource(EngineTestCase.createSource(["class A extends B {}", "class B implements A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_implements() {
     Source source = addSource(EngineTestCase.createSource(["class A implements B {}", "class B implements A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_tail() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A implements A {}", "class B implements A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A implements A {}",
+        "class B implements A {}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_tail2() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A implements B {}", "abstract class B implements A {}", "class C implements A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A implements B {}",
+        "abstract class B implements A {}",
+        "class C implements A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritance_tail3() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A implements B {}", "abstract class B implements C {}", "abstract class C implements A {}", "class D implements A {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A implements B {}",
+        "abstract class B implements C {}",
+        "abstract class C implements A {}",
+        "class D implements A {}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
+    assertErrors([
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+        CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
     verify([source]);
   }
   void test_recursiveInterfaceInheritanceBaseCaseExtends() {
@@ -6379,13 +8414,20 @@
     verify([source]);
   }
   void test_recursiveInterfaceInheritanceBaseCaseImplements_typedef() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class M {}", "typedef B = A with M implements B;"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class M {}",
+        "typedef B = A with M implements B;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS]);
     verify([source]);
   }
   void test_redirectToNonConstConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.a() {}", "  const factory A.b() = A.a;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.a() {}",
+        "  const factory A.b() = A.a;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
     verify([source]);
@@ -6426,33 +8468,72 @@
     assertErrors([CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
     verify([source]);
   }
+  void test_returnInGenerativeConstructor_expressionFunctionBody() {
+    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() => null;", "}"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
+    verify([source]);
+  }
   void test_superInInvalidContext_binaryExpression() {
     Source source = addSource(EngineTestCase.createSource(["var v = super + 0;"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInInvalidContext_constructorFieldInitializer() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  var f;", "  B() : f = super.m();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  var f;",
+        "  B() : f = super.m();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInInvalidContext_factoryConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m() {}", "}", "class B extends A {", "  factory B() {", "    super.m();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "class B extends A {",
+        "  factory B() {",
+        "    super.m();",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInInvalidContext_instanceVariableInitializer() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  var a;", "}", "class B extends A {", " var b = super.a;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  var a;",
+        "}",
+        "class B extends A {",
+        " var b = super.a;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInInvalidContext_staticMethod() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static m() {}", "}", "class B extends A {", "  static n() { return super.m(); }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static m() {}",
+        "}",
+        "class B extends A {",
+        "  static n() { return super.m(); }",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInInvalidContext_staticVariableInitializer() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int a = 0;", "}", "class B extends A {", "  static int b = super.a;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int a = 0;",
+        "}",
+        "class B extends A {",
+        "  static int b = super.a;",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
@@ -6467,13 +8548,23 @@
     assertErrors([CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
   void test_superInRedirectingConstructor_redirectionSuper() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {", "  B() : this.name(), super();", "  B.name() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {",
+        "  B() : this.name(), super();",
+        "  B.name() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
   }
   void test_superInRedirectingConstructor_superRedirection() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {", "  B() : super(), this.name();", "  B.name() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {",
+        "  B() : super(), this.name();",
+        "  B.name() {}",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
     verify([source]);
@@ -6505,7 +8596,9 @@
   void test_typeAliasCannotReferenceItself_returnType_indirect() {
     Source source = addSource(EngineTestCase.createSource(["typedef B A();", "typedef A B();"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
+    assertErrors([
+        CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+        CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
   void test_typeAliasCannotReferenceItself_typeVariableBounds() {
@@ -6514,8 +8607,30 @@
     assertErrors([CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
     verify([source]);
   }
+  void test_typeAliasCannotRereferenceItself_mixin_direct() {
+    Source source = addSource(EngineTestCase.createSource(["typedef M = Object with M;"]));
+    resolve(source);
+    assertErrors([CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
+    verify([source]);
+  }
+  void test_typeAliasCannotRereferenceItself_mixin_indirect() {
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef M1 = Object with M2;",
+        "typedef M2 = Object with M1;"]));
+    resolve(source);
+    assertErrors([
+        CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+        CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
+    verify([source]);
+  }
   void test_typeArgumentNotMatchingBounds_const() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B {}", "class G<E extends A> {", "  const G();", "}", "f() { return const G<B>(); }"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B {}",
+        "class G<E extends A> {",
+        "  const G();",
+        "}",
+        "f() { return const G<B>(); }"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
     verify([source]);
@@ -6527,24 +8642,46 @@
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_explicit_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {", "  B() : super.named();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {",
+        "  B() : super.named();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
   }
   void test_undefinedConstructorInInitializer_explicit_unnamed() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.named() {}", "}", "class B extends A {", "  B() : super();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.named() {}",
+        "}",
+        "class B extends A {",
+        "  B() : super();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
   void test_undefinedConstructorInInitializer_implicit() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.named() {}", "}", "class B extends A {", "  B();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.named() {}",
+        "}",
+        "class B extends A {",
+        "  B();",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
     verify([source]);
   }
   void test_undefinedNamedParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A();", "}", "main() {", "  const A(p: 0);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A();",
+        "}",
+        "main() {",
+        "  const A(p: 0);",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
   }
@@ -6566,7 +8703,9 @@
   void test_uriWithInterpolation_constant() {
     Source source = addSource(EngineTestCase.createSource(["import 'stuff_\$platform.dart';"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.URI_WITH_INTERPOLATION, StaticWarningCode.UNDEFINED_IDENTIFIER]);
+    assertErrors([
+        CompileTimeErrorCode.URI_WITH_INTERPOLATION,
+        StaticWarningCode.UNDEFINED_IDENTIFIER]);
   }
   void test_uriWithInterpolation_nonConstant() {
     Source source = addSource(EngineTestCase.createSource(["library lib;", "part '\${'a'}.dart';"]));
@@ -6656,28 +8795,46 @@
       assertErrors([CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
       verify([source]);
     } else {
-      assertErrors([CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+      assertErrors([
+          CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+          StaticTypeWarningCode.UNDEFINED_OPERATOR]);
     }
     reset();
   }
   void check_constEvalTypeBool_withParameter_binary(String expr) {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final a;", "  const A(bool p) : a = ${expr};", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final a;",
+        "  const A(bool p) : a = ${expr};",
+        "}"]));
     resolve(source);
     assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
     verify([source]);
     reset();
   }
   void check_constEvalTypeInt_withParameter_binary(String expr) {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final a;", "  const A(int p) : a = ${expr};", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final a;",
+        "  const A(int p) : a = ${expr};",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_INT, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
+        CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
     reset();
   }
   void check_constEvalTypeNum_withParameter_binary(String expr) {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final a;", "  const A(num p) : a = ${expr};", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final a;",
+        "  const A(num p) : a = ${expr};",
+        "}"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    assertErrors([
+        CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
+        CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
     reset();
   }
@@ -6742,6 +8899,14 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_argumentDefinitionTestNonParameter);
       });
+      _ut.test('test_argumentTypeNotAssignable_const', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_argumentTypeNotAssignable_const);
+      });
+      _ut.test('test_argumentTypeNotAssignable_const_super', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_argumentTypeNotAssignable_const_super);
+      });
       _ut.test('test_builtInIdentifierAsType', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_builtInIdentifierAsType);
@@ -6850,6 +9015,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_constEvalTypeNum_binary);
       });
+      _ut.test('test_constEvalTypeNum_plus_String', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_constEvalTypeNum_plus_String);
+      });
       _ut.test('test_constEval_newInstance_constConstructor', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_constEval_newInstance_constConstructor);
@@ -7002,6 +9171,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_extendsNonClass_class);
       });
+      _ut.test('test_extendsNonClass_dynamic', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_extendsNonClass_dynamic);
+      });
       _ut.test('test_extendsOrImplementsDisallowedClass_extends_String', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_extendsOrImplementsDisallowedClass_extends_String);
@@ -7046,6 +9219,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_extraPositionalArguments_const);
       });
+      _ut.test('test_extraPositionalArguments_const_super', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_extraPositionalArguments_const_super);
+      });
       _ut.test('test_fieldInitializedByMultipleInitializers', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_fieldInitializedByMultipleInitializers);
@@ -7138,6 +9315,14 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_implementsRepeated_3times);
       });
+      _ut.test('test_implementsSuperClass', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_implementsSuperClass);
+      });
+      _ut.test('test_implementsSuperClass_Object', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_implementsSuperClass_Object);
+      });
       _ut.test('test_implicitThisReferenceInInitializer_field', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_field);
@@ -7150,6 +9335,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_invocation);
       });
+      _ut.test('test_implicitThisReferenceInInitializer_invocationInStatic', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_invocationInStatic);
+      });
       _ut.test('test_implicitThisReferenceInInitializer_redirectingConstructorInvocation', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_redirectingConstructorInvocation);
@@ -7334,6 +9523,18 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_labelUndefined_continue);
       });
+      _ut.test('test_listElementTypeNotAssignable', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_listElementTypeNotAssignable);
+      });
+      _ut.test('test_mapKeyTypeNotAssignable', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_mapKeyTypeNotAssignable);
+      });
+      _ut.test('test_mapValueTypeNotAssignable', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_mapValueTypeNotAssignable);
+      });
       _ut.test('test_memberWithClassName_field', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_memberWithClassName_field);
@@ -7414,18 +9615,6 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_nativeFunctionBodyInNonSDKCode_method);
       });
-      _ut.test('test_newWithInvalidTypeParameters', () {
-        final __test = new CompileTimeErrorCodeTest();
-        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters);
-      });
-      _ut.test('test_newWithInvalidTypeParameters_tooFew', () {
-        final __test = new CompileTimeErrorCodeTest();
-        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters_tooFew);
-      });
-      _ut.test('test_newWithInvalidTypeParameters_tooMany', () {
-        final __test = new CompileTimeErrorCodeTest();
-        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters_tooMany);
-      });
       _ut.test('test_noAnnotationConstructorArguments', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_noAnnotationConstructorArguments);
@@ -7542,6 +9731,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_notEnoughRequiredArguments_const);
       });
+      _ut.test('test_notEnoughRequiredArguments_const_super', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_notEnoughRequiredArguments_const_super);
+      });
       _ut.test('test_optionalParameterInOperator_named', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_optionalParameterInOperator_named);
@@ -7674,6 +9867,10 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_returnInGenerativeConstructor);
       });
+      _ut.test('test_returnInGenerativeConstructor_expressionFunctionBody', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_returnInGenerativeConstructor_expressionFunctionBody);
+      });
       _ut.test('test_superInInvalidContext_binaryExpression', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_superInInvalidContext_binaryExpression);
@@ -7738,6 +9935,14 @@
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_typeAliasCannotReferenceItself_typeVariableBounds);
       });
+      _ut.test('test_typeAliasCannotRereferenceItself_mixin_direct', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_typeAliasCannotRereferenceItself_mixin_direct);
+      });
+      _ut.test('test_typeAliasCannotRereferenceItself_mixin_indirect', () {
+        final __test = new CompileTimeErrorCodeTest();
+        runJUnitTest(__test, __test.test_typeAliasCannotRereferenceItself_mixin_indirect);
+      });
       _ut.test('test_typeArgumentNotMatchingBounds_const', () {
         final __test = new CompileTimeErrorCodeTest();
         runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_const);
@@ -7969,7 +10174,13 @@
  */
 class StrictModeTest extends ResolverTestCase {
   void fail_for() {
-    Source source = addSource(EngineTestCase.createSource(["int f(List<int> list) {", "  num sum = 0;", "  for (num i = 0; i < list.length; i++) {", "    sum += list[i];", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(List<int> list) {",
+        "  num sum = 0;",
+        "  for (num i = 0; i < list.length; i++) {",
+        "    sum += list[i];",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
@@ -7980,57 +10191,111 @@
     analysisContext.analysisOptions = options;
   }
   void test_assert_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  assert (n is int);", "  return n & 0x0F;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  assert (n is int);",
+        "  return n & 0x0F;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_conditional_and_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  return (n is int && n > 0) ? n & 0x0F : 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  return (n is int && n > 0) ? n & 0x0F : 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_conditional_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  return (n is int) ? n & 0x0F : 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  return (n is int) ? n & 0x0F : 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_conditional_isNot() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  return (n is! int) ? 0 : n & 0x0F;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  return (n is! int) ? 0 : n & 0x0F;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_conditional_or_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  return (n is! int || n < 0) ? 0 : n & 0x0F;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  return (n is! int || n < 0) ? 0 : n & 0x0F;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_forEach() {
-    Source source = addSource(EngineTestCase.createSource(["int f(List<int> list) {", "  num sum = 0;", "  for (num n in list) {", "    sum += n & 0x0F;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(List<int> list) {",
+        "  num sum = 0;",
+        "  for (num n in list) {",
+        "    sum += n & 0x0F;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_if_and_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  if (n is int && n > 0) {", "    return n & 0x0F;", "  }", "  return 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  if (n is int && n > 0) {",
+        "    return n & 0x0F;",
+        "  }",
+        "  return 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_if_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  if (n is int) {", "    return n & 0x0F;", "  }", "  return 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  if (n is int) {",
+        "    return n & 0x0F;",
+        "  }",
+        "  return 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_if_isNot() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  if (n is! int) {", "    return 0;", "  } else {", "    return n & 0x0F;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  if (n is! int) {",
+        "    return 0;",
+        "  } else {",
+        "    return n & 0x0F;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_if_isNot_abrupt() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  if (n is! int) {", "    return 0;", "  }", "  return n & 0x0F;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  if (n is! int) {",
+        "    return 0;",
+        "  }",
+        "  return n & 0x0F;",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
   void test_if_or_is() {
-    Source source = addSource(EngineTestCase.createSource(["int f(num n) {", "  if (n is! int || n < 0) {", "    return 0;", "  } else {", "    return n & 0x0F;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "int f(num n) {",
+        "  if (n is! int || n < 0) {",
+        "    return 0;",
+        "  } else {",
+        "    return n & 0x0F;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
@@ -8138,7 +10403,9 @@
     JUnitTestCase.fail("Not yet tested");
     String prefixName = "p";
     _definingLibrary.imports = <ImportElement> [ElementFactory.importFor(null, ElementFactory.prefix(prefixName), [])];
-    ImportDirective directive = ASTFactory.importDirective2(null, prefixName, [ASTFactory.showCombinator2(["A"]), ASTFactory.hideCombinator2(["B"])]);
+    ImportDirective directive = ASTFactory.importDirective2(null, prefixName, [
+        ASTFactory.showCombinator2(["A"]),
+        ASTFactory.hideCombinator2(["B"])]);
     resolveNode(directive, []);
     _listener.assertNoErrors();
   }
@@ -8892,12 +11159,16 @@
   void test_import_packageWithDotDot() {
     Source source = addSource(EngineTestCase.createSource(["import 'package:somepackage/../other.dart';"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.URI_DOES_NOT_EXIST, PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT]);
+    assertErrors([
+        CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+        PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT]);
   }
   void test_import_packageWithLeadingDotDot() {
     Source source = addSource(EngineTestCase.createSource(["import 'package:../other.dart';"]));
     resolve(source);
-    assertErrors([CompileTimeErrorCode.URI_DOES_NOT_EXIST, PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT]);
+    assertErrors([
+        CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+        PubSuggestionCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT]);
   }
   void test_import_referenceIntoLibDirectory() {
     cacheSource("/myproj/pubspec.yaml", "");
@@ -8993,7 +11264,12 @@
 }
 class StaticWarningCodeTest extends ResolverTestCase {
   void fail_argumentTypeNotAssignable_invocation_functionParameter_generic() {
-    Source source = addSource(EngineTestCase.createSource(["class A<K, V> {", "  m(f(K k), V v) {", "    f(v);", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<K, V> {",
+        "  m(f(K k), V v) {",
+        "    f(v);",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
@@ -9028,32 +11304,28 @@
     assertErrors([StaticWarningCode.COMMENT_REFERENCE_URI_NOT_LIBRARY]);
     verify([source]);
   }
-  void fail_finalNotInitialized_inConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int x;", "  A() {}", "}"]));
-    resolve(source);
-    assertErrors([StaticWarningCode.FINAL_NOT_INITIALIZED]);
-    verify([source]);
-  }
-  void fail_invalidFactoryName() {
-    Source source = addSource(EngineTestCase.createSource([]));
-    resolve(source);
-    assertErrors([StaticWarningCode.INVALID_FACTORY_NAME]);
-    verify([source]);
-  }
-  void fail_invocationOfNonFunction() {
-    Source source = addSource(EngineTestCase.createSource([]));
-    resolve(source);
-    assertErrors([StaticWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
-  }
   void fail_mismatchedAccessorTypes_getterAndSuperSetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get g { return 0; }", "  set g(int v) {}", "}", "class B extends A {", "  set g(String v) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get g { return 0; }",
+        "  set g(int v) {}",
+        "}",
+        "class B extends A {",
+        "  set g(String v) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
     verify([source]);
   }
   void fail_mismatchedAccessorTypes_superGetterAndSetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get g { return 0; }", "  set g(int v) {}", "}", "class B extends A {", "  String get g { return ''; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get g { return 0; }",
+        "  set g(int v) {}",
+        "}",
+        "class B extends A {",
+        "  String get g { return ''; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
     verify([source]);
@@ -9067,7 +11339,9 @@
   void fail_undefinedIdentifier_commentReference() {
     Source source = addSource(EngineTestCase.createSource(["/** [m] xxx [new B.c] */", "class A {", "}"]));
     resolve(source);
-    assertErrors([StaticWarningCode.UNDEFINED_IDENTIFIER, StaticWarningCode.UNDEFINED_IDENTIFIER]);
+    assertErrors([
+        StaticWarningCode.UNDEFINED_IDENTIFIER,
+        StaticWarningCode.UNDEFINED_IDENTIFIER]);
   }
   void fail_undefinedIdentifier_function() {
     Source source = addSource(EngineTestCase.createSource(["int a() => b;"]));
@@ -9094,51 +11368,109 @@
     verify([source]);
   }
   void test_ambiguousImport_typeAnnotation() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "typedef N FT(N p);", "N f(N p) {", "  N v;", "}", "class A {", "  N m() {}", "}", "class B<T extends N> {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "typedef N FT(N p);",
+        "N f(N p) {",
+        "  N v;",
+        "}",
+        "class A {",
+        "  N m() {}",
+        "}",
+        "class B<T extends N> {}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
-    assertErrors([StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT, StaticWarningCode.AMBIGUOUS_IMPORT]);
+    assertErrors([
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT,
+        StaticWarningCode.AMBIGUOUS_IMPORT]);
   }
   void test_ambiguousImport_typeArgument_annotation() {
-    Source source = addSource(EngineTestCase.createSource(["import 'lib1.dart';", "import 'lib2.dart';", "class A<T> {}", "A<N> f() {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "import 'lib1.dart';",
+        "import 'lib2.dart';",
+        "class A<T> {}",
+        "A<N> f() {}"]));
     addSource2("/lib1.dart", EngineTestCase.createSource(["library lib1;", "class N {}"]));
     addSource2("/lib2.dart", EngineTestCase.createSource(["library lib2;", "class N {}"]));
     resolve(source);
     assertErrors([StaticWarningCode.AMBIGUOUS_IMPORT]);
   }
   void test_argumentTypeNotAssignable_annotation_namedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A.fromInt(int p);", "}", "@A.fromInt('0')", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A.fromInt(int p);",
+        "}",
+        "@A.fromInt('0')",
+        "main() {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_annotation_unnamedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  const A(int p);", "}", "@A('0')", "main() {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  const A(int p);",
+        "}",
+        "@A('0')",
+        "main() {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_binary() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  operator +(int p) {}", "}", "f(A a) {", "  a + '0';", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  operator +(int p) {}",
+        "}",
+        "f(A a) {",
+        "  a + '0';",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_index() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  operator [](int index) {}", "}", "f(A a) {", "  a['0'];", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  operator [](int index) {}",
+        "}",
+        "f(A a) {",
+        "  a['0'];",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_invocation_callParameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  call(int p) {}", "}", "f(A a) {", "  a('0');", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  call(int p) {}",
+        "}",
+        "f(A a) {",
+        "  a('0');",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_invocation_callVariable() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  call(int p) {}", "}", "main() {", "  A a = new A();", "  a('0');", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  call(int p) {}",
+        "}",
+        "main() {",
+        "  A a = new A();",
+        "  a('0');",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
@@ -9150,7 +11482,13 @@
     verify([source]);
   }
   void test_argumentTypeNotAssignable_invocation_generic() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  m(T t) {}", "}", "f(A<String> a) {", "  a.m(1);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  m(T t) {}",
+        "}",
+        "f(A<String> a) {",
+        "  a.m(1);",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
@@ -9180,7 +11518,13 @@
     verify([source]);
   }
   void test_argumentTypeNotAssignable_invocation_typedef_local() {
-    Source source = addSource(EngineTestCase.createSource(["typedef A(int p);", "A getA() => null;", "main() {", "  A a = getA();", "  a('1');", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef A(int p);",
+        "A getA() => null;",
+        "main() {",
+        "  A a = getA();",
+        "  a('1');",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
@@ -9192,25 +11536,50 @@
     verify([source]);
   }
   void test_argumentTypeNotAssignable_new_generic() {
-    Source source = addSource(EngineTestCase.createSource(["class A<T> {", "  A(T p) {}", "}", "main() {", "  new A<String>(42);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A<T> {",
+        "  A(T p) {}",
+        "}",
+        "main() {",
+        "  new A<String>(42);",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_new_optional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A([String p]) {}", "}", "main() {", "  new A(42);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A([String p]) {}",
+        "}",
+        "main() {",
+        "  new A(42);",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_argumentTypeNotAssignable_new_required() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A(String p) {}", "}", "main() {", "  new A(42);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A(String p) {}",
+        "}",
+        "main() {",
+        "  new A(42);",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
     verify([source]);
   }
   void test_assignmentToFinal_instanceVariable() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  final v = 0;", "}", "f() {", "  A a = new A();", "  a.v = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  final v = 0;",
+        "}",
+        "f() {",
+        "  A a = new A();",
+        "  a.v = 1;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ASSIGNMENT_TO_FINAL]);
     verify([source]);
@@ -9234,7 +11603,16 @@
     verify([source]);
   }
   void test_assignmentToFinal_propertyAccess() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get x => 0;", "}", "class B {", "  static A a;", "}", "main() {", "  B.a.x = 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get x => 0;",
+        "}",
+        "class B {",
+        "  static A a;",
+        "}",
+        "main() {",
+        "  B.a.x = 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.ASSIGNMENT_TO_FINAL]);
     verify([source]);
@@ -9257,8 +11635,28 @@
     assertErrors([StaticWarningCode.ASSIGNMENT_TO_FINAL]);
     verify([source]);
   }
+  void test_assignmentToMethod() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m() {}",
+        "}",
+        "f(A a) {",
+        "  a.m = () {};",
+        "}"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.ASSIGNMENT_TO_METHOD]);
+    verify([source]);
+  }
   void test_caseBlockNotTerminated() {
-    Source source = addSource(EngineTestCase.createSource(["f(int p) {", "  switch (p) {", "    case 0:", "      f(p);", "    case 1:", "      break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int p) {",
+        "  switch (p) {",
+        "    case 0:",
+        "      f(p);",
+        "    case 1:",
+        "      break;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CASE_BLOCK_NOT_TERMINATED]);
     verify([source]);
@@ -9276,67 +11674,130 @@
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_direct_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int v;", "}", "class B extends A {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int v;",
+        "}",
+        "class B extends A {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_direct_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get v => 0;", "}", "class B extends A {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get v => 0;",
+        "}",
+        "class B extends A {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_direct_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static v() {}", "}", "class B extends A {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static v() {}",
+        "}",
+        "class B extends A {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_direct_setter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static set v(x) {}", "}", "class B extends A {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static set v(x) {}",
+        "}",
+        "class B extends A {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_indirect() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int v;", "}", "class B extends A {}", "class C extends B {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int v;",
+        "}",
+        "class B extends A {}",
+        "class C extends B {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceGetterAndSuperclassMember_mixin() {
-    Source source = addSource(EngineTestCase.createSource(["class M {", "  static int v;", "}", "class B extends Object with M {", "  get v => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class M {",
+        "  static int v;",
+        "}",
+        "class B extends Object with M {",
+        "  get v => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingInstanceSetterAndSuperclassMember() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int v;", "}", "class B extends A {", "  set v(x) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int v;",
+        "}",
+        "class B extends A {",
+        "  set v(x) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER]);
     verify([source]);
   }
   void test_conflictingStaticGetterAndInstanceSetter_mixin() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  set x(int p) {}", "}", "class B extends Object with A {", "  static get x => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  set x(int p) {}",
+        "}",
+        "class B extends Object with A {",
+        "  static get x => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
     verify([source]);
   }
   void test_conflictingStaticGetterAndInstanceSetter_superClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  set x(int p) {}", "}", "class B extends A {", "  static get x => 0;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  set x(int p) {}",
+        "}",
+        "class B extends A {",
+        "  static get x => 0;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
     verify([source]);
   }
   void test_conflictingStaticGetterAndInstanceSetter_thisClass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get x => 0;", "  set x(int p) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get x => 0;",
+        "  set x(int p) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
     verify([source]);
   }
   void test_conflictingStaticSetterAndInstanceMember_thisClass_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get x => 0;", "  static set x(int p) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get x => 0;",
+        "  static set x(int p) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER]);
     verify([source]);
@@ -9348,7 +11809,13 @@
     verify([source]);
   }
   void test_constWithAbstractClass() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  const A();", "}", "void f() {", "  A a = const A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  const A();",
+        "}",
+        "void f() {",
+        "  A a = const A();",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
     verify([source]);
@@ -9360,7 +11827,10 @@
     verify([source]);
   }
   void test_exportDuplicatedLibraryName() {
-    Source source = addSource(EngineTestCase.createSource(["library test;", "export 'lib1.dart';", "export 'lib2.dart';"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library test;",
+        "export 'lib1.dart';",
+        "export 'lib2.dart';"]));
     addSource2("/lib1.dart", "library lib;");
     addSource2("/lib2.dart", "library lib;");
     resolve(source);
@@ -9385,6 +11855,12 @@
     assertErrors([StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE]);
     verify([source]);
   }
+  void test_finalNotInitialized_inConstructor() {
+    Source source = addSource(EngineTestCase.createSource(["class A {", "  final int x;", "  A() {}", "}"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.FINAL_NOT_INITIALIZED]);
+    verify([source]);
+  }
   void test_finalNotInitialized_instanceField_const_static() {
     Source source = addSource(EngineTestCase.createSource(["class A {", "  static const F;", "}"]));
     resolve(source);
@@ -9428,7 +11904,10 @@
     verify([source]);
   }
   void test_importDuplicatedLibraryName() {
-    Source source = addSource(EngineTestCase.createSource(["library test;", "import 'lib1.dart';", "import 'lib2.dart';"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "library test;",
+        "import 'lib1.dart';",
+        "import 'lib2.dart';"]));
     addSource2("/lib1.dart", "library lib;");
     addSource2("/lib2.dart", "library lib;");
     resolve(source);
@@ -9436,139 +11915,321 @@
     verify([source]);
   }
   void test_inconsistentMethodInheritanceGetterAndMethod() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int x();", "}", "abstract class B {", "  int get x;", "}", "class C implements A, B {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int x();",
+        "}",
+        "abstract class B {",
+        "  int get x;",
+        "}",
+        "class C implements A, B {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_field() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var n;", "}", "class B extends A {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static var n;",
+        "}",
+        "class B extends A {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_field2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static var n;", "}", "class B extends A {", "}", "class C extends B {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static var n;",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get n {return 0;}", "}", "class B extends A {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get n {return 0;}",
+        "}",
+        "class B extends A {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_getter2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static get n {return 0;}", "}", "class B extends A {", "}", "class C extends B {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static get n {return 0;}",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static n () {}", "}", "class B extends A {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static n () {}",
+        "}",
+        "class B extends A {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_method2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static n () {}", "}", "class B extends A {", "}", "class C extends B {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static n () {}",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_setter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static set n(int x) {}", "}", "class B extends A {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static set n(int x) {}",
+        "}",
+        "class B extends A {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_instanceMethodNameCollidesWithSuperclassStatic_setter2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static set n(int x) {}", "}", "class B extends A {", "}", "class C extends B {", "  void n() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static set n(int x) {}",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  void n() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC]);
     verify([source]);
   }
   void test_invalidGetterOverrideReturnType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get g { return 0; }", "}", "class B extends A {", "  String get g { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get g { return 0; }",
+        "}",
+        "class B extends A {",
+        "  String get g { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
+  void test_invalidGetterOverrideReturnType_implicit() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  String f;",
+        "}",
+        "class B extends A {",
+        "  int f;",
+        "}"]));
+    resolve(source);
+    assertErrors([
+        StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE,
+        StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
+    verify([source]);
+  }
   void test_invalidMethodOverrideNamedParamType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({int a}) {}", "}", "class B implements A {", "  m({String a}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({int a}) {}",
+        "}",
+        "class B implements A {",
+        "  m({String a}) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideNormalParamType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m(int a) {}", "}", "class B implements A {", "  m(String a) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m(int a) {}",
+        "}",
+        "class B implements A {",
+        "  m(String a) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideOptionalParamType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m([int a]) {}", "}", "class B implements A {", "  m([String a]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m([int a]) {}",
+        "}",
+        "class B implements A {",
+        "  m([String a]) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_interface() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m() { return 0; }", "}", "class B implements A {", "  String m() { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m() { return 0; }",
+        "}",
+        "class B implements A {",
+        "  String m() { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_interface2() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int m();", "}", "abstract class B implements A {", "}", "class C implements B {", "  String m() { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int m();",
+        "}",
+        "abstract class B implements A {",
+        "}",
+        "class C implements B {",
+        "  String m() { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_mixin() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m() { return 0; }", "}", "class B extends Object with A {", "  String m() { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m() { return 0; }",
+        "}",
+        "class B extends Object with A {",
+        "  String m() { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_superclass() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m() { return 0; }", "}", "class B extends A {", "  String m() { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m() { return 0; }",
+        "}",
+        "class B extends A {",
+        "  String m() { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_superclass2() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m() { return 0; }", "}", "class B extends A {", "}", "class C extends B {", "  String m() { return 'a'; }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m() { return 0; }",
+        "}",
+        "class B extends A {",
+        "}",
+        "class C extends B {",
+        "  String m() { return 'a'; }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidMethodOverrideReturnType_void() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int m() {}", "}", "class B extends A {", "  void m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int m() {}",
+        "}",
+        "class B extends A {",
+        "  void m() {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE]);
     verify([source]);
   }
   void test_invalidOverrideDifferentDefaultValues_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m({int p : 0}) {}", "}", "class B extends A {", "  m({int p : 1}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m({int p : 0}) {}",
+        "}",
+        "class B extends A {",
+        "  m({int p : 1}) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED]);
     verify([source]);
   }
   void test_invalidOverrideDifferentDefaultValues_positional() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  m([int p = 0]) {}", "}", "class B extends A {", "  m([int p = 1]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  m([int p = 0]) {}",
+        "}",
+        "class B extends A {",
+        "  m([int p = 1]) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL]);
     verify([source]);
   }
   void test_invalidSetterOverrideNormalParamType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void set s(int v) {}", "}", "class B extends A {", "  void set s(String v) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void set s(int v) {}",
+        "}",
+        "class B extends A {",
+        "  void set s(String v) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
     verify([source]);
   }
+  void test_listElementTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = <String> [42];"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+  void test_mapKeyTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = <String, int > {1 : 2};"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+  void test_mapValueTypeNotAssignable() {
+    Source source = addSource(EngineTestCase.createSource(["var v = <String, String> {'a' : 2};"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
   void test_mismatchedAccessorTypes_class() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get g { return 0; }", "  set g(String v) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get g { return 0; }",
+        "  set g(String v) {}",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
     verify([source]);
@@ -9580,11 +12241,43 @@
     verify([source]);
   }
   void test_newWithAbstractClass() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {}", "void f() {", "  A a = new A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {}",
+        "void f() {",
+        "  A a = new A();",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NEW_WITH_ABSTRACT_CLASS]);
     verify([source]);
   }
+  void test_newWithInvalidTypeParameters() {
+    Source source = addSource(EngineTestCase.createSource(["class A {}", "f() { return new A<A>(); }"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
+    verify([source]);
+  }
+  void test_newWithInvalidTypeParameters_tooFew() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<K, V> {}",
+        "f(p) {",
+        "  return new C<A>();",
+        "}"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
+    verify([source]);
+  }
+  void test_newWithInvalidTypeParameters_tooMany() {
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class C<E> {}",
+        "f(p) {",
+        "  return new C<A, A>();",
+        "}"]));
+    resolve(source);
+    assertErrors([StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS]);
+    verify([source]);
+  }
   void test_newWithNonType() {
     Source source = addSource(EngineTestCase.createSource(["var A = 0;", "void f() {", "  var a = new A();", "}"]));
     resolve(source);
@@ -9593,91 +12286,183 @@
   }
   void test_newWithNonType_fromLibrary() {
     Source source1 = addSource2("lib.dart", "");
-    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource(["import 'lib.dart' as lib;", "void f() {", "  var a = new lib.A();", "}"]));
+    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource([
+        "import 'lib.dart' as lib;",
+        "void f() {",
+        "  var a = new lib.A();",
+        "}"]));
     resolve(source1);
     resolve(source2);
     assertErrors([StaticWarningCode.NEW_WITH_NON_TYPE]);
     verify([source1]);
   }
   void test_newWithUndefinedConstructor() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "f() {", "  new A.name();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "f() {",
+        "  new A.name();",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR]);
   }
   void test_newWithUndefinedConstructorDefault() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A.name() {}", "}", "f() {", "  new A();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A.name() {}",
+        "}",
+        "f() {",
+        "  new A();",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberFivePlus() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  m();", "  n();", "  o();", "  p();", "  q();", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  m();",
+        "  n();",
+        "  o();",
+        "  p();",
+        "  q();",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberFour() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  m();", "  n();", "  o();", "  p();", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  m();",
+        "  n();",
+        "  o();",
+        "  p();",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_getter_fromInterface() {
-    Source source = addSource(EngineTestCase.createSource(["class I {", "  int get g {return 1;}", "}", "class C implements I {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class I {",
+        "  int get g {return 1;}",
+        "}",
+        "class C implements I {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_getter_fromSuperclass() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int get g;", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int get g;",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_method_fromInterface() {
-    Source source = addSource(EngineTestCase.createSource(["class I {", "  m(p) {}", "}", "class C implements I {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class I {",
+        "  m(p) {}",
+        "}",
+        "class C implements I {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_method_fromSuperclass() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  m(p);", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  m(p);",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  int x(int a);", "}", "abstract class B {", "  int x(int a, [int b]);", "}", "class C implements A, B {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  int x(int a);",
+        "}",
+        "abstract class B {",
+        "  int x(int a, [int b]);",
+        "}",
+        "class C implements A, B {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_setter_fromInterface() {
-    Source source = addSource(EngineTestCase.createSource(["class I {", "  set s(int i) {}", "}", "class C implements I {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class I {",
+        "  set s(int i) {}",
+        "}",
+        "class C implements I {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_setter_fromSuperclass() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  set s(int i);", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  set s(int i);",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberOne_superclasses_interface() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get a => 'a';", "}", "abstract class B implements A {", "  get b => 'b';", "}", "class C extends B {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get a => 'a';",
+        "}",
+        "abstract class B implements A {",
+        "  get b => 'b';",
+        "}",
+        "class C extends B {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberThree() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  m();", "  n();", "  o();", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  m();",
+        "  n();",
+        "  o();",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE]);
     verify([source]);
   }
   void test_nonAbstractClassInheritsAbstractMemberTwo() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class A {", "  m();", "  n();", "}", "class C extends A {", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class A {",
+        "  m();",
+        "  n();",
+        "}",
+        "class C extends A {",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
     verify([source]);
@@ -9689,7 +12474,13 @@
     verify([source]);
   }
   void test_nonTypeInCatchClause_notType() {
-    Source source = addSource(EngineTestCase.createSource(["var T = 0;", "f() {", "  try {", "  } on T catch (e) {", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "var T = 0;",
+        "f() {",
+        "  try {",
+        "  } on T catch (e) {",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE]);
     verify([source]);
@@ -9707,7 +12498,12 @@
     verify([source]);
   }
   void test_nonVoidReturnForSetter_method() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int set x(int v) {", "    return 42;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int set x(int v) {",
+        "    return 42;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.NON_VOID_RETURN_FOR_SETTER]);
     verify([source]);
@@ -9732,35 +12528,59 @@
     verify([source]);
   }
   void test_redirectToInvalidFunctionType() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B {", "  A(int p) {}", "}", "class B {", "  B() = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B {",
+        "  A(int p) {}",
+        "}",
+        "class B {",
+        "  factory B() = A;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE]);
     verify([source]);
   }
   void test_redirectToInvalidReturnType() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "}", "class B {", "  B() = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "}",
+        "class B {",
+        "  factory B() = A;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE]);
     verify([source]);
   }
   void test_redirectToMissingConstructor_named() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B{", "  A() {}", "}", "class B {", "  B() = A.name;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B{",
+        "  A() {}",
+        "}",
+        "class B {",
+        "  factory B() = A.name;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
   void test_redirectToMissingConstructor_unnamed() {
-    Source source = addSource(EngineTestCase.createSource(["class A implements B{", "  A.name() {}", "}", "class B {", "  B() = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A implements B{",
+        "  A.name() {}",
+        "}",
+        "class B {",
+        "  factory B() = A;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
   void test_redirectToNonClass_notAType() {
-    Source source = addSource(EngineTestCase.createSource(["class B {", "  int A;", "  B() = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource(["class B {", "  int A;", "  factory B() = A;", "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_NON_CLASS]);
     verify([source]);
   }
   void test_redirectToNonClass_undefinedIdentifier() {
-    Source source = addSource(EngineTestCase.createSource(["class B {", "  B() = A;", "}"]));
+    Source source = addSource(EngineTestCase.createSource(["class B {", "  factory B() = A;", "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.REDIRECT_TO_NON_CLASS]);
     verify([source]);
@@ -9790,19 +12610,36 @@
     verify([source]);
   }
   void test_staticAccessToInstanceMember_propertyAccess_getter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  get f => 42;", "}", "main() {", "  A.f;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  get f => 42;",
+        "}",
+        "main() {",
+        "  A.f;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
     verify([source]);
   }
   void test_staticAccessToInstanceMember_propertyAccess_setter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  set f(x) {}", "}", "main() {", "  A.f = 42;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  set f(x) {}",
+        "}",
+        "main() {",
+        "  A.f = 42;",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
     verify([source]);
   }
   void test_switchExpressionNotAssignable() {
-    Source source = addSource(EngineTestCase.createSource(["f(int p) {", "  switch (p) {", "    case 'a': break;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f(int p) {",
+        "  switch (p) {",
+        "    case 'a': break;",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE]);
     verify([source]);
@@ -9866,7 +12703,11 @@
   }
   void test_undefinedGetter_fromLibrary() {
     Source source1 = addSource2("lib.dart", "");
-    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource(["import 'lib.dart' as lib;", "void f() {", "  var g = lib.gg;", "}"]));
+    Source source2 = addSource2("lib2.dart", EngineTestCase.createSource([
+        "import 'lib.dart' as lib;",
+        "void f() {",
+        "  var g = lib.gg;",
+        "}"]));
     resolve(source1);
     resolve(source2);
     assertErrors([StaticWarningCode.UNDEFINED_GETTER]);
@@ -10002,6 +12843,10 @@
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_assignmentToFinal_topLevelVariable);
       });
+      _ut.test('test_assignmentToMethod', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_assignmentToMethod);
+      });
       _ut.test('test_caseBlockNotTerminated', () {
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_caseBlockNotTerminated);
@@ -10086,6 +12931,10 @@
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_fieldInitializingFormalNotAssignable);
       });
+      _ut.test('test_finalNotInitialized_inConstructor', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_finalNotInitialized_inConstructor);
+      });
       _ut.test('test_finalNotInitialized_instanceField_const_static', () {
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_finalNotInitialized_instanceField_const_static);
@@ -10158,6 +13007,10 @@
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_invalidGetterOverrideReturnType);
       });
+      _ut.test('test_invalidGetterOverrideReturnType_implicit', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_invalidGetterOverrideReturnType_implicit);
+      });
       _ut.test('test_invalidMethodOverrideNamedParamType', () {
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_invalidMethodOverrideNamedParamType);
@@ -10206,6 +13059,18 @@
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_invalidSetterOverrideNormalParamType);
       });
+      _ut.test('test_listElementTypeNotAssignable', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_listElementTypeNotAssignable);
+      });
+      _ut.test('test_mapKeyTypeNotAssignable', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_mapKeyTypeNotAssignable);
+      });
+      _ut.test('test_mapValueTypeNotAssignable', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_mapValueTypeNotAssignable);
+      });
       _ut.test('test_mismatchedAccessorTypes_class', () {
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_mismatchedAccessorTypes_class);
@@ -10218,6 +13083,18 @@
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_newWithAbstractClass);
       });
+      _ut.test('test_newWithInvalidTypeParameters', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters);
+      });
+      _ut.test('test_newWithInvalidTypeParameters_tooFew', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters_tooFew);
+      });
+      _ut.test('test_newWithInvalidTypeParameters_tooMany', () {
+        final __test = new StaticWarningCodeTest();
+        runJUnitTest(__test, __test.test_newWithInvalidTypeParameters_tooMany);
+      });
       _ut.test('test_newWithNonType', () {
         final __test = new StaticWarningCodeTest();
         runJUnitTest(__test, __test.test_newWithNonType);
@@ -10431,13 +13308,31 @@
 }
 class ErrorResolverTest extends ResolverTestCase {
   void test_breakLabelOnSwitchMember() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m(int i) {", "    switch (i) {", "      l: case 0:", "        break;", "      case 1:", "        break l;", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m(int i) {",
+        "    switch (i) {",
+        "      l: case 0:",
+        "        break;",
+        "      case 1:",
+        "        break l;",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER]);
     verify([source]);
   }
   void test_continueLabelOnSwitch() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m(int i) {", "    l: switch (i) {", "      case 0:", "        continue l;", "    }", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m(int i) {",
+        "    l: switch (i) {",
+        "      case 0:",
+        "        continue l;",
+        "    }",
+        "  }",
+        "}"]));
     resolve(source);
     assertErrors([ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH]);
     verify([source]);
@@ -10581,7 +13476,9 @@
       ClassElementImpl iterableElement = ElementFactory.classElement2("Iterable", ["E"]);
       _iterableType = iterableElement.type;
       Type2 eType = iterableElement.typeVariables[0].type;
-      iterableElement.accessors = <PropertyAccessorElement> [ElementFactory.getterElement("iterator", false, iteratorType.substitute4(<Type2> [eType])), ElementFactory.getterElement("last", false, eType)];
+      iterableElement.accessors = <PropertyAccessorElement> [
+          ElementFactory.getterElement("iterator", false, iteratorType.substitute4(<Type2> [eType])),
+          ElementFactory.getterElement("last", false, eType)];
       propagateTypeArguments(iterableElement);
     }
     return _iterableType;
@@ -10605,7 +13502,10 @@
       InterfaceType iterableType = this.iterableType.substitute4(<Type2> [eType]);
       listElement.interfaces = <InterfaceType> [iterableType];
       listElement.accessors = <PropertyAccessorElement> [ElementFactory.getterElement("length", false, intType)];
-      listElement.methods = <MethodElement> [ElementFactory.methodElement("[]", eType, [intType]), ElementFactory.methodElement("[]=", VoidTypeImpl.instance, [intType, eType]), ElementFactory.methodElement("add", VoidTypeImpl.instance, [eType])];
+      listElement.methods = <MethodElement> [
+          ElementFactory.methodElement("[]", eType, [intType]),
+          ElementFactory.methodElement("[]=", VoidTypeImpl.instance, [intType, eType]),
+          ElementFactory.methodElement("add", VoidTypeImpl.instance, [eType])];
       propagateTypeArguments(listElement);
     }
     return _listType;
@@ -10631,8 +13531,13 @@
       _objectType = objectElement.type;
       if (objectElement.methods.length == 0) {
         objectElement.constructors = <ConstructorElement> [ElementFactory.constructorElement(objectElement, null)];
-        objectElement.methods = <MethodElement> [ElementFactory.methodElement("toString", stringType, []), ElementFactory.methodElement("==", boolType, [_objectType]), ElementFactory.methodElement("noSuchMethod", dynamicType, [dynamicType])];
-        objectElement.accessors = <PropertyAccessorElement> [ElementFactory.getterElement("hashCode", false, intType), ElementFactory.getterElement("runtimeType", false, typeType)];
+        objectElement.methods = <MethodElement> [
+            ElementFactory.methodElement("toString", stringType, []),
+            ElementFactory.methodElement("==", boolType, [_objectType]),
+            ElementFactory.methodElement("noSuchMethod", dynamicType, [dynamicType])];
+        objectElement.accessors = <PropertyAccessorElement> [
+            ElementFactory.getterElement("hashCode", false, intType),
+            ElementFactory.getterElement("runtimeType", false, typeType)];
       }
     }
     return _objectType;
@@ -10647,8 +13552,14 @@
     if (_stringType == null) {
       _stringType = ElementFactory.classElement2("String", []).type;
       ClassElementImpl stringElement = _stringType.element as ClassElementImpl;
-      stringElement.accessors = <PropertyAccessorElement> [ElementFactory.getterElement("isEmpty", false, boolType), ElementFactory.getterElement("length", false, intType), ElementFactory.getterElement("codeUnits", false, listType.substitute4(<Type2> [intType]))];
-      stringElement.methods = <MethodElement> [ElementFactory.methodElement("toLowerCase", _stringType, []), ElementFactory.methodElement("toUpperCase", _stringType, [])];
+      stringElement.accessors = <PropertyAccessorElement> [
+          ElementFactory.getterElement("isEmpty", false, boolType),
+          ElementFactory.getterElement("length", false, intType),
+          ElementFactory.getterElement("codeUnits", false, listType.substitute4(<Type2> [intType]))];
+      stringElement.methods = <MethodElement> [
+          ElementFactory.methodElement("+", _stringType, [_stringType]),
+          ElementFactory.methodElement("toLowerCase", _stringType, []),
+          ElementFactory.methodElement("toUpperCase", _stringType, [])];
     }
     return _stringType;
   }
@@ -10678,9 +13589,53 @@
     _doubleType = doubleElement.type;
     boolType;
     stringType;
-    numElement.methods = <MethodElement> [ElementFactory.methodElement("+", _numType, [_numType]), ElementFactory.methodElement("-", _numType, [_numType]), ElementFactory.methodElement("*", _numType, [_numType]), ElementFactory.methodElement("%", _numType, [_numType]), ElementFactory.methodElement("/", _doubleType, [_numType]), ElementFactory.methodElement("~/", _numType, [_numType]), ElementFactory.methodElement("-", _numType, []), ElementFactory.methodElement("remainder", _numType, [_numType]), ElementFactory.methodElement("<", _boolType, [_numType]), ElementFactory.methodElement("<=", _boolType, [_numType]), ElementFactory.methodElement(">", _boolType, [_numType]), ElementFactory.methodElement(">=", _boolType, [_numType]), ElementFactory.methodElement("isNaN", _boolType, []), ElementFactory.methodElement("isNegative", _boolType, []), ElementFactory.methodElement("isInfinite", _boolType, []), ElementFactory.methodElement("abs", _numType, []), ElementFactory.methodElement("floor", _numType, []), ElementFactory.methodElement("ceil", _numType, []), ElementFactory.methodElement("round", _numType, []), ElementFactory.methodElement("truncate", _numType, []), ElementFactory.methodElement("toInt", _intType, []), ElementFactory.methodElement("toDouble", _doubleType, []), ElementFactory.methodElement("toStringAsFixed", _stringType, [_intType]), ElementFactory.methodElement("toStringAsExponential", _stringType, [_intType]), ElementFactory.methodElement("toStringAsPrecision", _stringType, [_intType]), ElementFactory.methodElement("toRadixString", _stringType, [_intType])];
-    intElement.methods = <MethodElement> [ElementFactory.methodElement("&", _intType, [_intType]), ElementFactory.methodElement("|", _intType, [_intType]), ElementFactory.methodElement("^", _intType, [_intType]), ElementFactory.methodElement("~", _intType, []), ElementFactory.methodElement("<<", _intType, [_intType]), ElementFactory.methodElement(">>", _intType, [_intType]), ElementFactory.methodElement("-", _intType, []), ElementFactory.methodElement("abs", _intType, []), ElementFactory.methodElement("round", _intType, []), ElementFactory.methodElement("floor", _intType, []), ElementFactory.methodElement("ceil", _intType, []), ElementFactory.methodElement("truncate", _intType, []), ElementFactory.methodElement("toString", _stringType, [])];
-    List<FieldElement> fields = <FieldElement> [ElementFactory.fieldElement("NAN", true, false, true, _doubleType), ElementFactory.fieldElement("INFINITY", true, false, true, _doubleType), ElementFactory.fieldElement("NEGATIVE_INFINITY", true, false, true, _doubleType), ElementFactory.fieldElement("MIN_POSITIVE", true, false, true, _doubleType), ElementFactory.fieldElement("MAX_FINITE", true, false, true, _doubleType)];
+    numElement.methods = <MethodElement> [
+        ElementFactory.methodElement("+", _numType, [_numType]),
+        ElementFactory.methodElement("-", _numType, [_numType]),
+        ElementFactory.methodElement("*", _numType, [_numType]),
+        ElementFactory.methodElement("%", _numType, [_numType]),
+        ElementFactory.methodElement("/", _doubleType, [_numType]),
+        ElementFactory.methodElement("~/", _numType, [_numType]),
+        ElementFactory.methodElement("-", _numType, []),
+        ElementFactory.methodElement("remainder", _numType, [_numType]),
+        ElementFactory.methodElement("<", _boolType, [_numType]),
+        ElementFactory.methodElement("<=", _boolType, [_numType]),
+        ElementFactory.methodElement(">", _boolType, [_numType]),
+        ElementFactory.methodElement(">=", _boolType, [_numType]),
+        ElementFactory.methodElement("isNaN", _boolType, []),
+        ElementFactory.methodElement("isNegative", _boolType, []),
+        ElementFactory.methodElement("isInfinite", _boolType, []),
+        ElementFactory.methodElement("abs", _numType, []),
+        ElementFactory.methodElement("floor", _numType, []),
+        ElementFactory.methodElement("ceil", _numType, []),
+        ElementFactory.methodElement("round", _numType, []),
+        ElementFactory.methodElement("truncate", _numType, []),
+        ElementFactory.methodElement("toInt", _intType, []),
+        ElementFactory.methodElement("toDouble", _doubleType, []),
+        ElementFactory.methodElement("toStringAsFixed", _stringType, [_intType]),
+        ElementFactory.methodElement("toStringAsExponential", _stringType, [_intType]),
+        ElementFactory.methodElement("toStringAsPrecision", _stringType, [_intType]),
+        ElementFactory.methodElement("toRadixString", _stringType, [_intType])];
+    intElement.methods = <MethodElement> [
+        ElementFactory.methodElement("&", _intType, [_intType]),
+        ElementFactory.methodElement("|", _intType, [_intType]),
+        ElementFactory.methodElement("^", _intType, [_intType]),
+        ElementFactory.methodElement("~", _intType, []),
+        ElementFactory.methodElement("<<", _intType, [_intType]),
+        ElementFactory.methodElement(">>", _intType, [_intType]),
+        ElementFactory.methodElement("-", _intType, []),
+        ElementFactory.methodElement("abs", _intType, []),
+        ElementFactory.methodElement("round", _intType, []),
+        ElementFactory.methodElement("floor", _intType, []),
+        ElementFactory.methodElement("ceil", _intType, []),
+        ElementFactory.methodElement("truncate", _intType, []),
+        ElementFactory.methodElement("toString", _stringType, [])];
+    List<FieldElement> fields = <FieldElement> [
+        ElementFactory.fieldElement("NAN", true, false, true, _doubleType),
+        ElementFactory.fieldElement("INFINITY", true, false, true, _doubleType),
+        ElementFactory.fieldElement("NEGATIVE_INFINITY", true, false, true, _doubleType),
+        ElementFactory.fieldElement("MIN_POSITIVE", true, false, true, _doubleType),
+        ElementFactory.fieldElement("MAX_FINITE", true, false, true, _doubleType)];
     doubleElement.fields = fields;
     int fieldCount = fields.length;
     List<PropertyAccessorElement> accessors = new List<PropertyAccessorElement>(fieldCount);
@@ -10688,7 +13643,21 @@
       accessors[i] = fields[i].getter;
     }
     doubleElement.accessors = accessors;
-    doubleElement.methods = <MethodElement> [ElementFactory.methodElement("remainder", _doubleType, [_numType]), ElementFactory.methodElement("+", _doubleType, [_numType]), ElementFactory.methodElement("-", _doubleType, [_numType]), ElementFactory.methodElement("*", _doubleType, [_numType]), ElementFactory.methodElement("%", _doubleType, [_numType]), ElementFactory.methodElement("/", _doubleType, [_numType]), ElementFactory.methodElement("~/", _doubleType, [_numType]), ElementFactory.methodElement("-", _doubleType, []), ElementFactory.methodElement("abs", _doubleType, []), ElementFactory.methodElement("round", _doubleType, []), ElementFactory.methodElement("floor", _doubleType, []), ElementFactory.methodElement("ceil", _doubleType, []), ElementFactory.methodElement("truncate", _doubleType, []), ElementFactory.methodElement("toString", _stringType, [])];
+    doubleElement.methods = <MethodElement> [
+        ElementFactory.methodElement("remainder", _doubleType, [_numType]),
+        ElementFactory.methodElement("+", _doubleType, [_numType]),
+        ElementFactory.methodElement("-", _doubleType, [_numType]),
+        ElementFactory.methodElement("*", _doubleType, [_numType]),
+        ElementFactory.methodElement("%", _doubleType, [_numType]),
+        ElementFactory.methodElement("/", _doubleType, [_numType]),
+        ElementFactory.methodElement("~/", _doubleType, [_numType]),
+        ElementFactory.methodElement("-", _doubleType, []),
+        ElementFactory.methodElement("abs", _doubleType, []),
+        ElementFactory.methodElement("round", _doubleType, []),
+        ElementFactory.methodElement("floor", _doubleType, []),
+        ElementFactory.methodElement("ceil", _doubleType, []),
+        ElementFactory.methodElement("truncate", _doubleType, []),
+        ElementFactory.methodElement("toString", _stringType, [])];
   }
 
   /**
@@ -10732,7 +13701,18 @@
     Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
     sdkContext.setContents(coreSource, "");
     coreUnit.source = coreSource;
-    coreUnit.types = <ClassElement> [provider.boolType.element, provider.doubleType.element, provider.functionType.element, provider.intType.element, provider.listType.element, provider.mapType.element, provider.numType.element, provider.objectType.element, provider.stackTraceType.element, provider.stringType.element, provider.typeType.element];
+    coreUnit.types = <ClassElement> [
+        provider.boolType.element,
+        provider.doubleType.element,
+        provider.functionType.element,
+        provider.intType.element,
+        provider.listType.element,
+        provider.mapType.element,
+        provider.numType.element,
+        provider.objectType.element,
+        provider.stackTraceType.element,
+        provider.stringType.element,
+        provider.typeType.element];
     LibraryElementImpl coreLibrary = new LibraryElementImpl(sdkContext, ASTFactory.libraryIdentifier2(["dart", "core"]));
     coreLibrary.definingCompilationUnit = coreUnit;
     CompilationUnitElementImpl htmlUnit = new CompilationUnitElementImpl("html_dartium.dart");
@@ -10744,7 +13724,16 @@
     ClassElementImpl documentElement = ElementFactory.classElement("Document", elementType, []);
     ClassElementImpl htmlDocumentElement = ElementFactory.classElement("HtmlDocument", documentElement.type, []);
     htmlDocumentElement.methods = <MethodElement> [ElementFactory.methodElement("query", elementType, <Type2> [provider.stringType])];
-    htmlUnit.types = <ClassElement> [ElementFactory.classElement("AnchorElement", elementType, []), ElementFactory.classElement("BodyElement", elementType, []), ElementFactory.classElement("ButtonElement", elementType, []), ElementFactory.classElement("DivElement", elementType, []), documentElement, elementElement, htmlDocumentElement, ElementFactory.classElement("InputElement", elementType, []), ElementFactory.classElement("SelectElement", elementType, [])];
+    htmlUnit.types = <ClassElement> [
+        ElementFactory.classElement("AnchorElement", elementType, []),
+        ElementFactory.classElement("BodyElement", elementType, []),
+        ElementFactory.classElement("ButtonElement", elementType, []),
+        ElementFactory.classElement("DivElement", elementType, []),
+        documentElement,
+        elementElement,
+        htmlDocumentElement,
+        ElementFactory.classElement("InputElement", elementType, []),
+        ElementFactory.classElement("SelectElement", elementType, [])];
     htmlUnit.functions = <FunctionElement> [ElementFactory.functionElement3("query", elementElement, <ClassElement> [provider.stringType.element], ClassElementImpl.EMPTY_ARRAY)];
     TopLevelVariableElementImpl document = ElementFactory.topLevelVariableElement3("document", true, htmlDocumentElement.type);
     htmlUnit.topLevelVariables = <TopLevelVariableElement> [document];
@@ -10756,7 +13745,9 @@
     elementMap[htmlSource] = htmlLibrary;
     sdkContext.recordLibraryElements(elementMap);
     AnalysisContextImpl context = new DelegatingAnalysisContextImpl();
-    sourceFactory = new SourceFactory.con2([new DartUriResolver(sdkContext.sourceFactory.dartSdk), new FileUriResolver()]);
+    sourceFactory = new SourceFactory.con2([
+        new DartUriResolver(sdkContext.sourceFactory.dartSdk),
+        new FileUriResolver()]);
     context.sourceFactory = sourceFactory;
     return context;
   }
@@ -11520,6 +14511,11 @@
     assertType2(_typeProvider.mapType.substitute4(<Type2> [_typeProvider.dynamicType, _typeProvider.dynamicType]), resultType);
     _listener.assertNoErrors();
   }
+  void test_visitMethodInvocation_then() {
+    Expression node = ASTFactory.methodInvocation(null, "then", []);
+    analyze(node);
+    _listener.assertNoErrors();
+  }
   void test_visitNamedExpression() {
     Expression node = ASTFactory.namedExpression2("n", resolvedString("a"));
     JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
@@ -11635,7 +14631,10 @@
     _listener.assertNoErrors();
   }
   void test_visitStringInterpolation() {
-    Expression node = ASTFactory.string([ASTFactory.interpolationString("a", "a"), ASTFactory.interpolationExpression(resolvedString("b")), ASTFactory.interpolationString("c", "c")]);
+    Expression node = ASTFactory.string([
+        ASTFactory.interpolationString("a", "a"),
+        ASTFactory.interpolationExpression(resolvedString("b")),
+        ASTFactory.interpolationString("c", "c")]);
     JUnitTestCase.assertSame(_typeProvider.stringType, analyze(node));
     _listener.assertNoErrors();
   }
@@ -12068,6 +15067,10 @@
         final __test = new StaticTypeAnalyzerTest();
         runJUnitTest(__test, __test.test_visitMapLiteral_nonEmpty);
       });
+      _ut.test('test_visitMethodInvocation_then', () {
+        final __test = new StaticTypeAnalyzerTest();
+        runJUnitTest(__test, __test.test_visitMethodInvocation_then);
+      });
       _ut.test('test_visitNamedExpression', () {
         final __test = new StaticTypeAnalyzerTest();
         runJUnitTest(__test, __test.test_visitNamedExpression);
@@ -12161,7 +15164,12 @@
 }
 class NonHintCodeTest extends ResolverTestCase {
   void test_deadCode_deadCatch_onCatchSubtype() {
-    Source source = addSource(EngineTestCase.createSource(["class A {}", "class B extends A {}", "f() {", "  try {} on B catch (e) {} on A catch (e) {} catch (e) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {}",
+        "class B extends A {}",
+        "f() {",
+        "  try {} on B catch (e) {} on A catch (e) {} catch (e) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12238,7 +15246,10 @@
     _sourceFactory = new SourceFactory.con2([new FileUriResolver()]);
   }
   void test_accessorsAcrossFiles() {
-    Source librarySource = addSource("/lib.dart", EngineTestCase.createSource(["library lib;", "part 'first.dart';", "part 'second.dart';"]));
+    Source librarySource = addSource("/lib.dart", EngineTestCase.createSource([
+        "library lib;",
+        "part 'first.dart';",
+        "part 'second.dart';"]));
     addSource("/first.dart", EngineTestCase.createSource(["part of lib;", "int get V => 0;"]));
     addSource("/second.dart", EngineTestCase.createSource(["part of lib;", "void set V(int v) {}"]));
     LibraryElement element = buildLibrary(librarySource, []);
@@ -12290,7 +15301,12 @@
     JUnitTestCase.assertNotNull(element);
   }
   void test_multipleFiles() {
-    Source librarySource = addSource("/lib.dart", EngineTestCase.createSource(["library lib;", "part 'first.dart';", "part 'second.dart';", "", "class A {}"]));
+    Source librarySource = addSource("/lib.dart", EngineTestCase.createSource([
+        "library lib;",
+        "part 'first.dart';",
+        "part 'second.dart';",
+        "",
+        "class A {}"]));
     addSource("/first.dart", EngineTestCase.createSource(["part of lib;", "class B {}"]));
     addSource("/second.dart", EngineTestCase.createSource(["part of lib;", "class C {}"]));
     LibraryElement element = buildLibrary(librarySource, []);
@@ -12362,7 +15378,9 @@
    */
   LibraryElement buildLibrary(Source librarySource, List<ErrorCode> expectedErrorCodes) {
     AnalysisContextImpl context = new AnalysisContextImpl();
-    context.sourceFactory = new SourceFactory.con2([new DartUriResolver(DirectoryBasedDartSdk.defaultSdk), new FileUriResolver()]);
+    context.sourceFactory = new SourceFactory.con2([
+        new DartUriResolver(DirectoryBasedDartSdk.defaultSdk),
+        new FileUriResolver()]);
     LibraryResolver resolver = new LibraryResolver(context);
     LibraryElementBuilder builder = new LibraryElementBuilder(resolver);
     Library library = resolver.createLibrary(librarySource) as Library;
@@ -12496,67 +15514,151 @@
 }
 class SimpleResolverTest extends ResolverTestCase {
   void fail_staticInvocation() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  static int get g => (a,b) => 0;", "}", "class B {", "  f() {", "    A.g(1,0);", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  static int get g => (a,b) => 0;",
+        "}",
+        "class B {",
+        "  f() {",
+        "    A.g(1,0);",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_argumentResolution_required_matching() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, 3);", "  }", "  void g(a, b, c) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, 3);",
+        "  }",
+        "  void g(a, b, c) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2]);
   }
   void test_argumentResolution_required_tooFew() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2);", "  }", "  void g(a, b, c) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2);",
+        "  }",
+        "  void g(a, b, c) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1]);
   }
   void test_argumentResolution_required_tooMany() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, 3);", "  }", "  void g(a, b) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, 3);",
+        "  }",
+        "  void g(a, b) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, -1]);
   }
   void test_argumentResolution_requiredAndNamed_extra() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, c: 3, d: 4);", "  }", "  void g(a, b, {c}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, c: 3, d: 4);",
+        "  }",
+        "  void g(a, b, {c}) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2, -1]);
   }
   void test_argumentResolution_requiredAndNamed_matching() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, c: 3);", "  }", "  void g(a, b, {c}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, c: 3);",
+        "  }",
+        "  void g(a, b, {c}) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2]);
   }
   void test_argumentResolution_requiredAndNamed_missing() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, d: 3);", "  }", "  void g(a, b, {c, d}) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, d: 3);",
+        "  }",
+        "  void g(a, b, {c, d}) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 3]);
   }
   void test_argumentResolution_requiredAndPositional_fewer() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, 3);", "  }", "  void g(a, b, [c, d]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, 3);",
+        "  }",
+        "  void g(a, b, [c, d]) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2]);
   }
   void test_argumentResolution_requiredAndPositional_matching() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, 3, 4);", "  }", "  void g(a, b, [c, d]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, 3, 4);",
+        "  }",
+        "  void g(a, b, [c, d]) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2, 3]);
   }
   void test_argumentResolution_requiredAndPositional_more() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void f() {", "    g(1, 2, 3, 4);", "  }", "  void g(a, b, [c]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void f() {",
+        "    g(1, 2, 3, 4);",
+        "  }",
+        "  void g(a, b, [c]) {}",
+        "}"]));
     validateArgumentResolution(source, [0, 1, 2, -1]);
   }
   void test_class_definesCall() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int call(int x) { return x; }", "}", "int f(A a) {", "  return a(0);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int call(int x) { return x; }",
+        "}",
+        "int f(A a) {",
+        "  return a(0);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_class_extends_implements() {
-    Source source = addSource(EngineTestCase.createSource(["class A extends B implements C {}", "class B {}", "class C {}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A extends B implements C {}",
+        "class B {}",
+        "class C {}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_commentReference_class() {
-    Source source = addSource(EngineTestCase.createSource(["f() {}", "/** [A] [new A] [A.n] [new A.n] [m] [f] */", "class A {", "  A() {}", "  A.n() {}", "  m() {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {}",
+        "/** [A] [new A] [A.n] [new A.n] [m] [f] */",
+        "class A {",
+        "  A() {}",
+        "  A.n() {}",
+        "  m() {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_commentReference_parameter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  A() {}", "  A.n() {}", "  /** [e] [f] */", "  m(e, f()) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  A() {}",
+        "  A.n() {}",
+        "  /** [e] [f] */",
+        "  m(e, f()) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12574,7 +15676,14 @@
     verify([source]);
   }
   void test_extractedMethodAsConstant() {
-    Source source = addSource(EngineTestCase.createSource(["abstract class Comparable<T> {", "  int compareTo(T other);", "  static int compare(Comparable a, Comparable b) => a.compareTo(b);", "}", "class A {", "  void sort([compare = Comparable.compare]) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "abstract class Comparable<T> {",
+        "  int compareTo(T other);",
+        "  static int compare(Comparable a, Comparable b) => a.compareTo(b);",
+        "}",
+        "class A {",
+        "  void sort([compare = Comparable.compare]) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12586,25 +15695,50 @@
     verify([source]);
   }
   void test_forEachLoops_nonConflicting() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  List list = [1,2,3];", "  for (int x in list) {}", "  for (int x in list) {}", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  List list = [1,2,3];",
+        "  for (int x in list) {}",
+        "  for (int x in list) {}",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_forLoops_nonConflicting() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  for (int i = 0; i < 3; i++) {", "  }", "  for (int i = 0; i < 3; i++) {", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  for (int i = 0; i < 3; i++) {",
+        "  }",
+        "  for (int i = 0; i < 3; i++) {",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_functionTypeAlias() {
-    Source source = addSource(EngineTestCase.createSource(["typedef bool P(e);", "class A {", "  P p;", "  m(e) {", "    if (p(e)) {}", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "typedef bool P(e);",
+        "class A {",
+        "  P p;",
+        "  m(e) {",
+        "    if (p(e)) {}",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_getterAndSetterWithDifferentTypes() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get f => 0;", "  void set f(String s) {}", "}", "g (A a) {", "  a.f = a.f.toString();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get f => 0;",
+        "  void set f(String s) {}",
+        "}",
+        "g (A a) {",
+        "  a.f = a.f.toString();",
+        "}"]));
     resolve(source);
     assertErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
     verify([source]);
@@ -12625,20 +15759,39 @@
   void test_import_hide() {
     addSource2("lib1.dart", EngineTestCase.createSource(["library lib1;", "set foo(value) {}"]));
     addSource2("lib2.dart", EngineTestCase.createSource(["library lib2;", "set foo(value) {}"]));
-    Source source = addSource2("lib3.dart", EngineTestCase.createSource(["import 'lib1.dart' hide foo;", "import 'lib2.dart';", "", "main() {", "  foo = 0;", "}"]));
+    Source source = addSource2("lib3.dart", EngineTestCase.createSource([
+        "import 'lib1.dart' hide foo;",
+        "import 'lib2.dart';",
+        "",
+        "main() {",
+        "  foo = 0;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_import_prefix() {
     addSource2("/two.dart", EngineTestCase.createSource(["library two;", "f(int x) {", "  return x * x;", "}"]));
-    Source source = addSource2("/one.dart", EngineTestCase.createSource(["library one;", "import 'two.dart' as _two;", "main() {", "  _two.f(0);", "}"]));
+    Source source = addSource2("/one.dart", EngineTestCase.createSource([
+        "library one;",
+        "import 'two.dart' as _two;",
+        "main() {",
+        "  _two.f(0);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_indexExpression_typeParameters() {
-    Source source = addSource(EngineTestCase.createSource(["f() {", "  List<int> a;", "  a[0];", "  List<List<int>> b;", "  b[0][0];", "  List<List<List<int>>> c;", "  c[0][0][0];", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "f() {",
+        "  List<int> a;",
+        "  a[0];",
+        "  List<List<int>> b;",
+        "  b[0][0];",
+        "  List<List<List<int>>> c;",
+        "  c[0][0][0];",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12650,13 +15803,34 @@
     verify([source]);
   }
   void test_indirectOperatorThroughCall() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  B call() { return new B(); }", "}", "", "class B {", "  int operator [](int i) { return i; }", "}", "", "A f = new A();", "", "g(int x) {}", "", "main() {", "  g(f()[0]);", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  B call() { return new B(); }",
+        "}",
+        "",
+        "class B {",
+        "  int operator [](int i) { return i; }",
+        "}",
+        "",
+        "A f = new A();",
+        "",
+        "g(int x) {}",
+        "",
+        "main() {",
+        "  g(f()[0]);",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_invoke_dynamicThroughGetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  List get X => [() => 0];", "  m(A a) {", "    X.last;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  List get X => [() => 0];",
+        "  m(A a) {",
+        "    X.last;",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12686,7 +15860,12 @@
     verify([source]);
   }
   void test_isValidMixin_super() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  toString() {", "    return super.toString();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  toString() {",
+        "    return super.toString();",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     JUnitTestCase.assertNotNull(library);
     CompilationUnitElement unit = library.definingCompilationUnit;
@@ -12710,7 +15889,17 @@
     verify([source]);
   }
   void test_labels_switch() {
-    Source source = addSource(EngineTestCase.createSource(["void doSwitch(int target) {", "  switch (target) {", "    l0: case 0:", "      continue l1;", "    l1: case 1:", "      continue l0;", "    default:", "      continue l1;", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "void doSwitch(int target) {",
+        "  switch (target) {",
+        "    l0: case 0:",
+        "      continue l1;",
+        "    l1: case 1:",
+        "      continue l0;",
+        "    default:",
+        "      continue l1;",
+        "  }",
+        "}"]));
     LibraryElement library = resolve(source);
     JUnitTestCase.assertNotNull(library);
     assertNoErrors();
@@ -12767,25 +15956,66 @@
     verify([source]);
   }
   void test_method_fromMixin() {
-    Source source = addSource(EngineTestCase.createSource(["class B {", "  bar() => 1;", "}", "class A {", "  foo() => 2;", "}", "", "class C extends B with A {", "  bar() => super.bar();", "  foo() => super.foo();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class B {",
+        "  bar() => 1;",
+        "}",
+        "class A {",
+        "  foo() => 2;",
+        "}",
+        "",
+        "class C extends B with A {",
+        "  bar() => super.bar();",
+        "  foo() => super.foo();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_method_fromSuperclassMixin() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m1() {}", "}", "class B extends Object with A {", "}", "class C extends B {", "}", "f(C c) {", "  c.m1();", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m1() {}",
+        "}",
+        "class B extends Object with A {",
+        "}",
+        "class C extends B {",
+        "}",
+        "f(C c) {",
+        "  c.m1();",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_methodCascades() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  void m1() {}", "  void m2() {}", "  void m() {", "    A a = new A();", "    a..m1()", "     ..m2();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  void m1() {}",
+        "  void m2() {}",
+        "  void m() {",
+        "    A a = new A();",
+        "    a..m1()",
+        "     ..m2();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
   }
   void test_methodCascades_withSetter() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  String name;", "  void m1() {}", "  void m2() {}", "  void m() {", "    A a = new A();", "    a..m1()", "     ..name = 'name'", "     ..m2();", "  }", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  String name;",
+        "  void m1() {}",
+        "  void m2() {}",
+        "  void m() {",
+        "    A a = new A();",
+        "    a..m1()",
+        "     ..name = 'name'",
+        "     ..m2();",
+        "  }",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
@@ -12797,7 +16027,15 @@
     verify([source]);
   }
   void test_setter_inherited() {
-    Source source = addSource(EngineTestCase.createSource(["class A {", "  int get x => 0;", "  set x(int p) {}", "}", "class B extends A {", "  int get x => super.x == null ? 0 : super.x;", "  int f() => x = 1;", "}"]));
+    Source source = addSource(EngineTestCase.createSource([
+        "class A {",
+        "  int get x => 0;",
+        "  set x(int p) {}",
+        "}",
+        "class B extends A {",
+        "  int get x => super.x == null ? 0 : super.x;",
+        "  int f() => x = 1;",
+        "}"]));
     resolve(source);
     assertNoErrors();
     verify([source]);
diff --git a/pkg/analyzer_experimental/test/generated/scanner_test.dart b/pkg/analyzer_experimental/test/generated/scanner_test.dart
index 15e6c1d..55ee345 100644
--- a/pkg/analyzer_experimental/test/generated/scanner_test.dart
+++ b/pkg/analyzer_experimental/test/generated/scanner_test.dart
@@ -1879,15 +1879,23 @@
   }
   void test_lineInfo_multilineComment() {
     String source = "/*\r *\r */";
-    assertLineInfo(source, [new AbstractScannerTest_ExpectedLocation(0, 1, 1), new AbstractScannerTest_ExpectedLocation(4, 2, 2), new AbstractScannerTest_ExpectedLocation(source.length - 1, 3, 3)]);
+    assertLineInfo(source, [
+        new AbstractScannerTest_ExpectedLocation(0, 1, 1),
+        new AbstractScannerTest_ExpectedLocation(4, 2, 2),
+        new AbstractScannerTest_ExpectedLocation(source.length - 1, 3, 3)]);
   }
   void test_lineInfo_simpleClass() {
     String source = "class Test {\r\n    String s = '...';\r\n    int get x => s.MISSING_GETTER;\r\n}";
-    assertLineInfo(source, [new AbstractScannerTest_ExpectedLocation(0, 1, 1), new AbstractScannerTest_ExpectedLocation(source.indexOf("MISSING_GETTER"), 3, 20), new AbstractScannerTest_ExpectedLocation(source.length - 1, 4, 1)]);
+    assertLineInfo(source, [
+        new AbstractScannerTest_ExpectedLocation(0, 1, 1),
+        new AbstractScannerTest_ExpectedLocation(source.indexOf("MISSING_GETTER"), 3, 20),
+        new AbstractScannerTest_ExpectedLocation(source.length - 1, 4, 1)]);
   }
   void test_lineInfo_slashN() {
     String source = "class Test {\n}";
-    assertLineInfo(source, [new AbstractScannerTest_ExpectedLocation(0, 1, 1), new AbstractScannerTest_ExpectedLocation(source.indexOf("}"), 2, 1)]);
+    assertLineInfo(source, [
+        new AbstractScannerTest_ExpectedLocation(0, 1, 1),
+        new AbstractScannerTest_ExpectedLocation(source.indexOf("}"), 2, 1)]);
   }
   void test_lt() {
     assertToken(TokenType.LT, "<");
@@ -1938,10 +1946,20 @@
     assertToken(TokenType.PERIOD_PERIOD_PERIOD, "...");
   }
   void test_periodAfterNumberNotIncluded_identifier() {
-    assertTokens("42.isEven()", [new StringToken(TokenType.INT, "42", 0), new Token(TokenType.PERIOD, 2), new StringToken(TokenType.IDENTIFIER, "isEven", 3), new Token(TokenType.OPEN_PAREN, 9), new Token(TokenType.CLOSE_PAREN, 10)]);
+    assertTokens("42.isEven()", [
+        new StringToken(TokenType.INT, "42", 0),
+        new Token(TokenType.PERIOD, 2),
+        new StringToken(TokenType.IDENTIFIER, "isEven", 3),
+        new Token(TokenType.OPEN_PAREN, 9),
+        new Token(TokenType.CLOSE_PAREN, 10)]);
   }
   void test_periodAfterNumberNotIncluded_period() {
-    assertTokens("42..isEven()", [new StringToken(TokenType.INT, "42", 0), new Token(TokenType.PERIOD_PERIOD, 2), new StringToken(TokenType.IDENTIFIER, "isEven", 4), new Token(TokenType.OPEN_PAREN, 10), new Token(TokenType.CLOSE_PAREN, 11)]);
+    assertTokens("42..isEven()", [
+        new StringToken(TokenType.INT, "42", 0),
+        new Token(TokenType.PERIOD_PERIOD, 2),
+        new StringToken(TokenType.IDENTIFIER, "isEven", 4),
+        new Token(TokenType.OPEN_PAREN, 10),
+        new Token(TokenType.CLOSE_PAREN, 11)]);
   }
   void test_plus() {
     assertToken(TokenType.PLUS, "+");
@@ -1992,10 +2010,19 @@
     assertToken(TokenType.STRING, "\"\"\"multi-line\nstring\"\"\"");
   }
   void test_string_multi_interpolation_block() {
-    assertTokens("\"Hello \${name}!\"", [new StringToken(TokenType.STRING, "\"Hello ", 0), new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 7), new StringToken(TokenType.IDENTIFIER, "name", 9), new Token(TokenType.CLOSE_CURLY_BRACKET, 13), new StringToken(TokenType.STRING, "!\"", 14)]);
+    assertTokens("\"Hello \${name}!\"", [
+        new StringToken(TokenType.STRING, "\"Hello ", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 7),
+        new StringToken(TokenType.IDENTIFIER, "name", 9),
+        new Token(TokenType.CLOSE_CURLY_BRACKET, 13),
+        new StringToken(TokenType.STRING, "!\"", 14)]);
   }
   void test_string_multi_interpolation_identifier() {
-    assertTokens("\"Hello \$name!\"", [new StringToken(TokenType.STRING, "\"Hello ", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 7), new StringToken(TokenType.IDENTIFIER, "name", 8), new StringToken(TokenType.STRING, "!\"", 12)]);
+    assertTokens("\"Hello \$name!\"", [
+        new StringToken(TokenType.STRING, "\"Hello ", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 7),
+        new StringToken(TokenType.IDENTIFIER, "name", 8),
+        new StringToken(TokenType.STRING, "!\"", 12)]);
   }
   void test_string_multi_single() {
     assertToken(TokenType.STRING, "'''string'''");
@@ -2034,25 +2061,69 @@
     assertToken(TokenType.STRING, "'a\\\$b'");
   }
   void test_string_simple_interpolation_adjacentIdentifiers() {
-    assertTokens("'\$a\$b'", [new StringToken(TokenType.STRING, "'", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1), new StringToken(TokenType.IDENTIFIER, "a", 2), new StringToken(TokenType.STRING, "", 3), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3), new StringToken(TokenType.IDENTIFIER, "b", 4), new StringToken(TokenType.STRING, "'", 5)]);
+    assertTokens("'\$a\$b'", [
+        new StringToken(TokenType.STRING, "'", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
+        new StringToken(TokenType.IDENTIFIER, "a", 2),
+        new StringToken(TokenType.STRING, "", 3),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
+        new StringToken(TokenType.IDENTIFIER, "b", 4),
+        new StringToken(TokenType.STRING, "'", 5)]);
   }
   void test_string_simple_interpolation_block() {
-    assertTokens("'Hello \${name}!'", [new StringToken(TokenType.STRING, "'Hello ", 0), new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 7), new StringToken(TokenType.IDENTIFIER, "name", 9), new Token(TokenType.CLOSE_CURLY_BRACKET, 13), new StringToken(TokenType.STRING, "!'", 14)]);
+    assertTokens("'Hello \${name}!'", [
+        new StringToken(TokenType.STRING, "'Hello ", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 7),
+        new StringToken(TokenType.IDENTIFIER, "name", 9),
+        new Token(TokenType.CLOSE_CURLY_BRACKET, 13),
+        new StringToken(TokenType.STRING, "!'", 14)]);
   }
   void test_string_simple_interpolation_blockWithNestedMap() {
-    assertTokens("'a \${f({'b' : 'c'})} d'", [new StringToken(TokenType.STRING, "'a ", 0), new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 3), new StringToken(TokenType.IDENTIFIER, "f", 5), new Token(TokenType.OPEN_PAREN, 6), new Token(TokenType.OPEN_CURLY_BRACKET, 7), new StringToken(TokenType.STRING, "'b'", 8), new Token(TokenType.COLON, 12), new StringToken(TokenType.STRING, "'c'", 14), new Token(TokenType.CLOSE_CURLY_BRACKET, 17), new Token(TokenType.CLOSE_PAREN, 18), new Token(TokenType.CLOSE_CURLY_BRACKET, 19), new StringToken(TokenType.STRING, " d'", 20)]);
+    assertTokens("'a \${f({'b' : 'c'})} d'", [
+        new StringToken(TokenType.STRING, "'a ", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 3),
+        new StringToken(TokenType.IDENTIFIER, "f", 5),
+        new Token(TokenType.OPEN_PAREN, 6),
+        new Token(TokenType.OPEN_CURLY_BRACKET, 7),
+        new StringToken(TokenType.STRING, "'b'", 8),
+        new Token(TokenType.COLON, 12),
+        new StringToken(TokenType.STRING, "'c'", 14),
+        new Token(TokenType.CLOSE_CURLY_BRACKET, 17),
+        new Token(TokenType.CLOSE_PAREN, 18),
+        new Token(TokenType.CLOSE_CURLY_BRACKET, 19),
+        new StringToken(TokenType.STRING, " d'", 20)]);
   }
   void test_string_simple_interpolation_firstAndLast() {
-    assertTokens("'\$greeting \$name'", [new StringToken(TokenType.STRING, "'", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1), new StringToken(TokenType.IDENTIFIER, "greeting", 2), new StringToken(TokenType.STRING, " ", 10), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 11), new StringToken(TokenType.IDENTIFIER, "name", 12), new StringToken(TokenType.STRING, "'", 16)]);
+    assertTokens("'\$greeting \$name'", [
+        new StringToken(TokenType.STRING, "'", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
+        new StringToken(TokenType.IDENTIFIER, "greeting", 2),
+        new StringToken(TokenType.STRING, " ", 10),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 11),
+        new StringToken(TokenType.IDENTIFIER, "name", 12),
+        new StringToken(TokenType.STRING, "'", 16)]);
   }
   void test_string_simple_interpolation_identifier() {
-    assertTokens("'Hello \$name!'", [new StringToken(TokenType.STRING, "'Hello ", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 7), new StringToken(TokenType.IDENTIFIER, "name", 8), new StringToken(TokenType.STRING, "!'", 12)]);
+    assertTokens("'Hello \$name!'", [
+        new StringToken(TokenType.STRING, "'Hello ", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 7),
+        new StringToken(TokenType.IDENTIFIER, "name", 8),
+        new StringToken(TokenType.STRING, "!'", 12)]);
   }
   void test_string_simple_interpolation_missingIdentifier() {
-    assertTokens("'\$x\$'", [new StringToken(TokenType.STRING, "'", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1), new StringToken(TokenType.IDENTIFIER, "x", 2), new StringToken(TokenType.STRING, "", 3), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3), new StringToken(TokenType.STRING, "'", 4)]);
+    assertTokens("'\$x\$'", [
+        new StringToken(TokenType.STRING, "'", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
+        new StringToken(TokenType.IDENTIFIER, "x", 2),
+        new StringToken(TokenType.STRING, "", 3),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
+        new StringToken(TokenType.STRING, "'", 4)]);
   }
   void test_string_simple_interpolation_nonIdentifier() {
-    assertTokens("'\$1'", [new StringToken(TokenType.STRING, "'", 0), new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1), new StringToken(TokenType.STRING, "1'", 2)]);
+    assertTokens("'\$1'", [
+        new StringToken(TokenType.STRING, "'", 0),
+        new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
+        new StringToken(TokenType.STRING, "1'", 2)]);
   }
   void test_string_simple_single() {
     assertToken(TokenType.STRING, "'string'");
diff --git a/pkg/analyzer_experimental/test/generated/test_support.dart b/pkg/analyzer_experimental/test/generated/test_support.dart
index f51b03c..8ec0c66 100644
--- a/pkg/analyzer_experimental/test/generated/test_support.dart
+++ b/pkg/analyzer_experimental/test/generated/test_support.dart
@@ -329,10 +329,19 @@
       writer.newLine();
       if (lineInfo == null) {
         int offset = error.offset;
-        writer.printf("  %s %s (%d..%d)", [source == null ? "" : source.shortName, error.errorCode, offset, offset + error.length]);
+        writer.printf("  %s %s (%d..%d)", [
+            source == null ? "" : source.shortName,
+            error.errorCode,
+            offset,
+            offset + error.length]);
       } else {
         LineInfo_Location location = lineInfo.getLocation(error.offset);
-        writer.printf("  %s %s (%d, %d/%d)", [source == null ? "" : source.shortName, error.errorCode, location.lineNumber, location.columnNumber, error.length]);
+        writer.printf("  %s %s (%d, %d/%d)", [
+            source == null ? "" : source.shortName,
+            error.errorCode,
+            location.lineNumber,
+            location.columnNumber,
+            error.length]);
       }
     }
     writer.newLine();
@@ -345,10 +354,21 @@
       writer.newLine();
       if (lineInfo == null) {
         int offset = error.offset;
-        writer.printf("  %s %s (%d..%d): %s", [source == null ? "" : source.shortName, error.errorCode, offset, offset + error.length, error.message]);
+        writer.printf("  %s %s (%d..%d): %s", [
+            source == null ? "" : source.shortName,
+            error.errorCode,
+            offset,
+            offset + error.length,
+            error.message]);
       } else {
         LineInfo_Location location = lineInfo.getLocation(error.offset);
-        writer.printf("  %s %s (%d, %d/%d): %s", [source == null ? "" : source.shortName, error.errorCode, location.lineNumber, location.columnNumber, error.length, error.message]);
+        writer.printf("  %s %s (%d, %d/%d): %s", [
+            source == null ? "" : source.shortName,
+            error.errorCode,
+            location.lineNumber,
+            location.columnNumber,
+            error.length,
+            error.message]);
       }
     }
     JUnitTestCase.fail(writer.toString());
diff --git a/pkg/analyzer_experimental/test/services/formatter_test.dart b/pkg/analyzer_experimental/test/services/formatter_test.dart
index b993a16..145aef6 100644
--- a/pkg/analyzer_experimental/test/services/formatter_test.dart
+++ b/pkg/analyzer_experimental/test/services/formatter_test.dart
@@ -69,57 +69,85 @@
           '}'
         );
     });
-//
-//    test('CU (method indent - 2)', () {
-//      expectCUFormatsTo(
-//          'class A {\n'
-//          ' static  bool x(){ return true; }\n'
-//          ' }',
-//          'class A {\n'
-//          '  static bool x() {\n'
-//          '    return true;\n'
-//          '  }\n'
-//          '}'
-//        );
-//    });
-//
-//    test('CU (method indent - 3)', () {
-//      expectCUFormatsTo(
-//          'class A {\n'
-//          ' int x() =>   42   + 3 ;  \n'
-//          '   }',
-//          'class A {\n'
-//          '  int x() => 42 + 3;\n'
-//          '}'
-//        );
-//    });
-//
-//    test('CU (method indent - 4)', () {
-//      expectCUFormatsTo(
-//          'class A {\n'
-//          ' int x() { \n'
-//          'if (true) {return 42;\n'
-//          '} else { return false; }\n'
-//          '   }'
-//          '}',
-//          'class A {\n'
-//          ' int x() {\n'
-//          '   if (true) {\n'
-//          '     return 42;\n'
-//          '   } else {\n'
-//          '     return false;\n'
-//          '   }\n'
-//          '}'
-//        );
-//    });
+
+    test('CU (method indent - 2)', () {
+      expectCUFormatsTo(
+          'class A {\n'
+          ' static  bool x(){ return true; }\n'
+          ' }',
+          'class A {\n'
+          '  static bool x() {\n'
+          '    return true;\n'
+          '  }\n'
+          '}'
+        );
+    });
+
+    test('CU (method indent - 3)', () {
+      expectCUFormatsTo(
+          'class A {\n'
+          ' int x() =>   42   + 3 ;  \n'
+          '   }',
+          'class A {\n'
+          '  int x() => 42 + 3;\n'
+          '}'
+        );
+    });
+
+    test('CU (method indent - 4)', () {
+      expectCUFormatsTo(
+          'class A {\n'
+          ' int x() { \n'
+          'if (true) {return 42;\n'
+          '} else { return false; }\n'
+          '   }'
+          '}',
+          'class A {\n'
+          '  int x() {\n'
+          '    if (true) {\n'
+          '      return 42;\n'
+          '    } else {\n'
+          '      return false;\n'
+          '    }\n'
+          '  }\n'
+          '}'
+        );
+    });
+
+    test('stmt', () {
+      expectStmtFormatsTo(
+         'if (true){\n'
+         'if (true){\n'
+         'if (true){\n'
+         'return true;\n'
+         '} else{\n'
+         'return false;\n'
+         '}\n'
+         '}\n'
+         '}else{\n'
+         'return false;\n'
+         '}',
+         'if (true) {\n'
+         '  if (true) {\n'
+         '    if (true) {\n'
+         '      return true;\n'
+         '    } else {\n'
+         '      return false;\n'
+         '    }\n'
+         '  }\n'
+         '} else {\n'
+         '  return false;\n'
+         '}'
+        );
+    });
 
 
-//    test('initialIndent', () {
-//      var formatter = new CodeFormatter(
-//          new FormatterOptions(initialIndentationLevel: 2));
-//      var formattedSource = formatter.format(CodeKind.STATEMENT, 'var x;');
-//      expect(formattedSource, startsWith('  '));
-//    });
+    test('initialIndent', () {
+      var formatter = new CodeFormatter(
+          new FormatterOptions(initialIndentationLevel: 2));
+      var formattedSource = formatter.format(CodeKind.STATEMENT, 'var x;');
+      expect(formattedSource, startsWith('    '));
+    });
 
   });
 
@@ -238,4 +266,10 @@
 String formatCU(src, {options: const FormatterOptions()}) =>
     new CodeFormatter(options).format(CodeKind.COMPILATION_UNIT, src);
 
+String formatStatement(src, {options: const FormatterOptions()}) =>
+    new CodeFormatter(options).format(CodeKind.STATEMENT, src);
+
 expectCUFormatsTo(src, expected) => expect(formatCU(src), equals(expected));
+
+expectStmtFormatsTo(src, expected) => expect(formatStatement(src),
+    equals(expected));
diff --git a/pkg/barback/lib/src/asset.dart b/pkg/barback/lib/src/asset.dart
index 636d468..05a2202 100644
--- a/pkg/barback/lib/src/asset.dart
+++ b/pkg/barback/lib/src/asset.dart
@@ -6,70 +6,125 @@
 
 import 'dart:async';
 import 'dart:io';
+import 'dart:utf';
+
+import 'asset_id.dart';
+import 'utils.dart';
 
 /// A blob of content.
 ///
 /// Assets may come from the file system, or as the output of a [Transformer].
 /// They are identified by [AssetId].
 abstract class Asset {
-  factory Asset.fromFile(File file) {
-    return new _FileAsset(file);
-  }
+  /// The ID for this asset.
+  final AssetId id;
 
-  factory Asset.fromString(String content) {
-    return new _StringAsset(content);
-  }
+  Asset(this.id);
 
-  factory Asset.fromPath(String path) {
-    return new _FileAsset(new File(path));
-  }
+  factory Asset.fromBytes(AssetId id, List<int> bytes) =>
+      new _BinaryAsset(id, bytes);
 
-  // TODO(rnystrom): This prevents users from defining their own
-  // implementations of Asset. Use serialization package instead.
-  factory Asset.deserialize(data) {
-    // TODO(rnystrom): Handle errors.
-    switch (data[0]) {
-      case "file": return new _FileAsset(new File(data[1])); break;
-      case "string": return new _StringAsset(data[1]); break;
-    }
-  }
+  factory Asset.fromFile(AssetId id, File file) =>
+      new _FileAsset(id, file);
+
+  factory Asset.fromString(AssetId id, String content) =>
+      new _StringAsset(id, content);
+
+  factory Asset.fromPath(AssetId id, String path) =>
+      new _FileAsset(id, new File(path));
 
   /// Returns the contents of the asset as a string.
-  // TODO(rnystrom): Figure out how binary assets should be handled.
-  Future<String> readAsString();
+  ///
+  /// If the asset was created from a [String] the original string is always
+  /// returned and [encoding] is ignored. Otherwise, the binary data of the
+  /// asset is decoded using [encoding], which defaults to [Encoding.UTF_8].
+  Future<String> readAsString({Encoding encoding});
 
-  /// Streams the contents of the asset.
+  /// Streams the binary contents of the asset.
+  ///
+  /// If the asset was created from a [String], this returns its UTF-8 encoding.
   Stream<List<int>> read();
+}
 
-  /// Serializes this [Asset] to an object that can be sent across isolates
-  /// and passed to [deserialize].
-  Object serialize();
+/// An asset whose data is stored in a list of bytes.
+class _BinaryAsset extends Asset {
+  final List<int> _contents;
+
+  _BinaryAsset(AssetId id, this._contents)
+      : super(id);
+
+  Future<String> readAsString({Encoding encoding}) {
+    if (encoding == null) encoding = Encoding.UTF_8;
+
+    // TODO(rnystrom): When #6284 is fixed, just use that. Until then, only
+    // UTF-8 is supported. :(
+    if (encoding != Encoding.UTF_8) {
+      throw new UnsupportedError(
+          "${encoding.name} is not a supported encoding.");
+    }
+
+    return new Future.value(decodeUtf8(_contents));
+  }
+
+  Stream<List<int>> read() => new Future<List<int>>.value(_contents).asStream();
+
+  String toString() {
+    var buffer = new StringBuffer();
+    buffer.write("Bytes [");
+
+    // Don't show the whole list if it's long.
+    if (_contents.length > 11) {
+      for (var i = 0; i < 5; i++) {
+        buffer.write(byteToHex(_contents[i]));
+        buffer.write(" ");
+      }
+
+      buffer.write("...");
+
+      for (var i = _contents.length - 5; i < _contents.length; i++) {
+        buffer.write(" ");
+        buffer.write(byteToHex(_contents[i]));
+      }
+    } else {
+      for (var i = 0; i < _contents.length; i++) {
+        if (i > 0) buffer.write(" ");
+        buffer.write(byteToHex(_contents[i]));
+      }
+    }
+
+    buffer.write("]");
+    return buffer.toString();
+  }
 }
 
 /// An asset backed by a file on the local file system.
-class _FileAsset implements Asset {
+class _FileAsset extends Asset {
   final File _file;
-  _FileAsset(this._file);
+  _FileAsset(AssetId id, this._file)
+      : super(id);
 
-  Future<String> readAsString() => _file.readAsString();
+  Future<String> readAsString({Encoding encoding}) {
+    if (encoding == null) encoding = Encoding.UTF_8;
+    return _file.readAsString(encoding: encoding);
+  }
+
   Stream<List<int>> read() => _file.openRead();
 
   String toString() => 'File "${_file.path}"';
-
-  Object serialize() => ["file", _file.path];
 }
 
 /// An asset whose data is stored in a string.
-// TODO(rnystrom): Have something similar for in-memory binary assets.
-class _StringAsset implements Asset {
+class _StringAsset extends Asset {
   final String _contents;
 
-  _StringAsset(this._contents);
+  _StringAsset(AssetId id, this._contents)
+      : super(id);
 
-  Future<String> readAsString() => new Future.value(_contents);
+  Future<String> readAsString({Encoding encoding}) =>
+      new Future.value(_contents);
 
-  // TODO(rnystrom): Implement this and handle encoding.
-  Stream<List<int>> read() => throw new UnimplementedError();
+  Stream<List<int>> read() =>
+      new Future<List<int>>.value(encodeUtf8(_contents)).asStream();
 
   String toString() {
     // Don't show the whole string if it's long.
@@ -83,8 +138,6 @@
     return 'String "$contents"';
   }
 
-  Object serialize() => ["string", _contents];
-
   String _escape(String string) {
     return string
         .replaceAll("\"", r'\"')
diff --git a/pkg/barback/lib/src/asset_graph.dart b/pkg/barback/lib/src/asset_graph.dart
index 5d77a5c..5682fb1 100644
--- a/pkg/barback/lib/src/asset_graph.dart
+++ b/pkg/barback/lib/src/asset_graph.dart
@@ -10,6 +10,7 @@
 import 'asset.dart';
 import 'asset_id.dart';
 import 'asset_provider.dart';
+import 'asset_set.dart';
 import 'errors.dart';
 import 'change_batch.dart';
 import 'phase.dart';
@@ -24,9 +25,29 @@
 
   final _phases = <Phase>[];
 
+  /// A stream that emits a [BuildResult] each time the build is completed,
+  /// whether or not it succeeded.
+  ///
+  /// If an unexpected error in barback itself occurs, it will be emitted
+  /// through this stream's error channel.
   Stream<BuildResult> get results => _resultsController.stream;
   final _resultsController = new StreamController<BuildResult>.broadcast();
 
+  /// A stream that emits any errors from the asset graph or the transformers.
+  ///
+  /// This emits errors as they're detected. If an error occurs in one part of
+  /// the asset graph, unrelated parts will continue building.
+  ///
+  /// This will not emit programming errors from barback itself. Those will be
+  /// emitted through the [results] stream's error channel.
+  Stream get errors => _errorsController.stream;
+  final _errorsController = new StreamController.broadcast();
+
+  /// The errors that have occurred since the current build started.
+  ///
+  /// This will be empty if no build is occurring.
+  Queue _accumulatedErrors;
+
   /// A future that completes when the currently running build process finishes.
   ///
   /// If no build it in progress, is `null`.
@@ -43,14 +64,14 @@
       Iterable<Iterable<Transformer>> transformerPhases) {
     // Flatten the phases to a list so we can traverse backwards to wire up
     // each phase to its next.
-    transformerPhases = transformerPhases.toList();
+    var phases = transformerPhases.toList();
 
     // Each phase writes its outputs as inputs to the next phase after it.
     // Add a phase at the end for the final outputs of the last phase.
-    transformerPhases.add([]);
+    phases.add([]);
 
     Phase nextPhase = null;
-    for (var transformers in transformerPhases.reversed) {
+    for (var transformers in phases.reversed) {
       nextPhase = new Phase(this, _phases.length, transformers.toList(),
           nextPhase);
       _phases.insert(0, nextPhase);
@@ -118,9 +139,9 @@
     _waitForProcess();
   }
 
-  /// Reports a process result with the given error then throws it.
   void reportError(error) {
-    _resultsController.add(new BuildResult(error));
+    _accumulatedErrors.add(error);
+    _errorsController.add(error);
   }
 
   /// Starts the build process asynchronously if there is work to be done.
@@ -132,10 +153,12 @@
   /// to discard it.
   Future _waitForProcess() {
     if (_processDone != null) return _processDone;
+
+    _accumulatedErrors = new Queue();
     return _processDone = _process().then((_) {
       // Report the build completion.
       // TODO(rnystrom): Put some useful data in here.
-      _resultsController.add(new BuildResult());
+      _resultsController.add(new BuildResult(_accumulatedErrors));
     }).catchError((error) {
       // If we get here, it's an unexpected error. Runtime errors like missing
       // assets should be handled earlier. Errors from transformers or other
@@ -148,6 +171,7 @@
       _resultsController.addError(error);
     }).whenComplete(() {
       _processDone = null;
+      _accumulatedErrors = null;
     });
   }
 
@@ -190,12 +214,12 @@
       var changes = _sourceChanges;
       _sourceChanges = null;
 
-      var updated = new Map<AssetId, Asset>();
+      var updated = new AssetSet();
       var futures = [];
       for (var id in changes.updated) {
         // TODO(rnystrom): Catch all errors from provider and route to results.
         futures.add(_provider.getAsset(id).then((asset) {
-          updated[id] = asset;
+          updated.add(asset);
         }).catchError((error) {
           if (error is AssetNotFoundException) {
             // Handle missing asset errors like regular missing assets.
@@ -214,14 +238,18 @@
   }
 }
 
-/// Used to report build results back from the asynchronous build process
-/// running in the background.
+/// An event indicating that the asset graph has finished building.
+///
+/// A build can end either in success or failure. If there were no errors during
+/// the build, it's considered to be a success; any errors render it a failure,
+/// although individual assets may still have built successfully.
 class BuildResult {
-  /// The error that occurred, or `null` if the result is not an error.
-  final error;
+  /// All errors that occurred during the build.
+  final List errors;
 
-  /// `true` if this result is for a successful build.
-  bool get succeeded => error == null;
+  /// `true` if the build succeeded.
+  bool get succeeded => errors.isEmpty;
 
-  BuildResult([this.error]);
+  BuildResult(Iterable errors)
+      : errors = errors.toList();
 }
diff --git a/pkg/barback/lib/src/asset_node.dart b/pkg/barback/lib/src/asset_node.dart
index 6fd86c6..7bef7a0 100644
--- a/pkg/barback/lib/src/asset_node.dart
+++ b/pkg/barback/lib/src/asset_node.dart
@@ -17,17 +17,21 @@
 /// Keeps a cache of the last asset that was built for this node (i.e. for this
 /// node's ID and phase) and tracks which transforms depend on it.
 class AssetNode {
-  final AssetId id;
   Asset asset;
 
   /// The [TransformNode]s that consume this node's asset as an input.
   final consumers = new Set<TransformNode>();
 
-  AssetNode(this.id);
+  AssetId get id => asset.id;
+
+  AssetNode(this.asset);
 
   /// Updates this node's generated asset value and marks all transforms that
   /// use this as dirty.
   void updateAsset(Asset asset) {
+    // Cannot update an asset to one with a different ID.
+    assert(id == asset.id);
+
     this.asset = asset;
     consumers.forEach((consumer) => consumer.dirty());
   }
diff --git a/pkg/barback/lib/src/asset_set.dart b/pkg/barback/lib/src/asset_set.dart
new file mode 100644
index 0000000..f58e188
--- /dev/null
+++ b/pkg/barback/lib/src/asset_set.dart
@@ -0,0 +1,58 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.asset_set;
+
+import 'dart:async';
+import 'dart:collection';
+import 'dart:io';
+
+import 'asset.dart';
+import 'asset_id.dart';
+
+/// A set of [Asset]s with distinct IDs.
+///
+/// This uses the [AssetId] of each asset to determine uniqueness, so no two
+/// assets with the same ID can be in the set.
+class AssetSet extends IterableBase<Asset> {
+  final _assets = new Map<AssetId, Asset>();
+
+  Iterator<Asset> get iterator => _assets.values.iterator;
+
+  int get length => _assets.length;
+
+  /// Gets the [Asset] in the set with [id], or returns `null` if no asset with
+  /// that ID is present.
+  Asset operator[](AssetId id) => _assets[id];
+
+  /// Adds [asset] to the set.
+  ///
+  /// If there is already an asset with that ID in the set, it is replaced by
+  /// the new one. Returns [asset].
+  Asset add(Asset asset) {
+    _assets[asset.id] = asset;
+    return asset;
+  }
+
+  /// Adds [assets] to the set.
+  void addAll(Iterable<Asset> assets) {
+    assets.forEach(add);
+  }
+
+  /// Returns `true` if the set contains [asset].
+  bool contains(Asset asset) {
+    var other = _assets[asset.id];
+    return other == asset;
+  }
+
+  /// Returns `true` if the set contains an [Asset] with [id].
+  bool containsId(AssetId id) {
+    return _assets.containsKey(id);
+  }
+
+  /// Removes all assets from the set.
+  void clear() {
+    _assets.clear();
+  }
+}
diff --git a/pkg/barback/lib/src/phase.dart b/pkg/barback/lib/src/phase.dart
index d52ed75..26d64da 100644
--- a/pkg/barback/lib/src/phase.dart
+++ b/pkg/barback/lib/src/phase.dart
@@ -10,6 +10,7 @@
 import 'asset_graph.dart';
 import 'asset_id.dart';
 import 'asset_node.dart';
+import 'asset_set.dart';
 import 'errors.dart';
 import 'transform_node.dart';
 import 'transformer.dart';
@@ -69,7 +70,7 @@
   ///
   /// This marks any affected [transforms] as dirty or discards them if their
   /// inputs are removed.
-  void updateInputs(Map<AssetId, Asset> updated, Set<AssetId> removed) {
+  void updateInputs(AssetSet updated, Set<AssetId> removed) {
     // Remove any nodes that are no longer being output. Handle removals first
     // in case there are assets that were removed by one transform but updated
     // by another. In that case, the update should win.
@@ -83,15 +84,18 @@
     }
 
     // Update and new or modified assets.
-    updated.forEach((id, asset) {
-      var node = inputs.putIfAbsent(id, () => new AssetNode(id));
-
-      // If it's a new node, remember that so we can see if any new transforms
-      // will consume it.
-      if (node.asset == null) _newInputs.add(node);
-
-      node.updateAsset(asset);
-    });
+    for (var asset in updated) {
+      var node = inputs[asset.id];
+      if (node == null) {
+        // It's a new node. Add it and remember it so we can see if any new
+        // transforms will consume it.
+        node = new AssetNode(asset);
+        inputs[asset.id] = node;
+        _newInputs.add(node);
+      } else {
+        node.updateAsset(asset);
+      }
+    }
   }
 
   /// Processes this phase.
@@ -119,7 +123,7 @@
       for (var transformer in _transformers) {
         // TODO(rnystrom): Catch all errors from isPrimary() and redirect
         // to results.
-        futures.add(transformer.isPrimary(node.id).then((isPrimary) {
+        futures.add(transformer.isPrimary(node.asset).then((isPrimary) {
           if (!isPrimary) return;
           var transform = new TransformNode(this, transformer, node);
           node.consumers.add(transform);
@@ -145,23 +149,23 @@
       // Collect all of the outputs. Since the transforms are run in parallel,
       // we have to be careful here to ensure that the result is deterministic
       // and not influenced by the order that transforms complete.
-      var updated = new Map<AssetId, Asset>();
+      var updated = new AssetSet();
       var removed = new Set<AssetId>();
       var collisions = new Set<AssetId>();
 
       // Handle the generated outputs of all transforms first.
       for (var outputs in transformOutputs) {
         // Collect the outputs of all transformers together.
-        outputs.updated.forEach((id, asset) {
-          if (updated.containsKey(id)) {
+        for (var asset in outputs.updated) {
+          if (updated.containsId(asset.id)) {
             // Report a collision.
-            collisions.add(id);
+            collisions.add(asset.id);
           } else {
             // TODO(rnystrom): In the case of a collision, the asset that
             // "wins" is chosen non-deterministically. Do something better.
-            updated[id] = asset;
+            updated.add(asset);
           }
-        });
+        }
 
         // Track any assets no longer output by this transform. We don't
         // handle the case where *another* transform generates the asset
diff --git a/pkg/barback/lib/src/transform.dart b/pkg/barback/lib/src/transform.dart
index 8023d0e..37f0327 100644
--- a/pkg/barback/lib/src/transform.dart
+++ b/pkg/barback/lib/src/transform.dart
@@ -9,6 +9,7 @@
 import 'asset.dart';
 import 'asset_id.dart';
 import 'asset_node.dart';
+import 'asset_set.dart';
 import 'errors.dart';
 import 'transform_node.dart';
 
@@ -18,7 +19,7 @@
 /// itself a public constructor, which would be visible to external users.
 /// Unlike the [Transform] class, this function is not exported by barback.dart.
 Transform createTransform(TransformNode node, Set<AssetNode> inputs,
-                          Map<AssetId, Asset> outputs) =>
+                          AssetSet outputs) =>
     new Transform._(node, inputs, outputs);
 
 /// While a [Transformer] represents a *kind* of transformation, this defines
@@ -32,7 +33,7 @@
   final TransformNode _node;
 
   final Set<AssetNode> _inputs;
-  final Map<AssetId, Asset> _outputs;
+  final AssetSet _outputs;
 
   /// Gets the ID of the primary input for this transformation.
   ///
@@ -71,9 +72,12 @@
     });
   }
 
-  /// Stores [output] as the output created by this transformation for asset
-  /// [id]. A transformation can output as many assets as it wants.
-  void addOutput(AssetId id, Asset output) {
-    _outputs[id] = output;
+  /// Stores [output] as the output created by this transformation.
+  ///
+  /// A transformation can output as many assets as it wants.
+  void addOutput(Asset output) {
+    // TODO(rnystrom): This should immediately throw if an output with that ID
+    // has already been created by this transformer.
+    _outputs.add(output);
   }
 }
diff --git a/pkg/barback/lib/src/transform_node.dart b/pkg/barback/lib/src/transform_node.dart
index 49222be..194f073 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -10,6 +10,7 @@
 import 'asset_graph.dart';
 import 'asset_id.dart';
 import 'asset_node.dart';
+import 'asset_set.dart';
 import 'errors.dart';
 import 'phase.dart';
 import 'transform.dart';
@@ -58,7 +59,7 @@
   /// previous runs.
   Future<TransformOutputs> apply() {
     var newInputs = new Set<AssetNode>();
-    var newOutputs = new Map<AssetId, Asset>();
+    var newOutputs = new AssetSet();
     var transform = createTransform(this, newInputs, newOutputs);
     return _transformer.apply(transform).catchError((error) {
       // Catch all transformer errors and pipe them to the results stream.
@@ -84,7 +85,7 @@
       _inputs = newInputs;
 
       // See which outputs are missing from the last run.
-      var outputIds = newOutputs.keys.toSet();
+      var outputIds = newOutputs.map((asset) => asset.id).toSet();
       var removed = _outputs.difference(outputIds);
       _outputs = outputIds;
 
@@ -97,7 +98,7 @@
 /// applied.
 class TransformOutputs {
   /// The outputs that are new or were modified since the last run.
-  final Map<AssetId, Asset> updated;
+  final AssetSet updated;
 
   /// The outputs that were created by the previous run but were not generated
   /// by the most recent run.
diff --git a/pkg/barback/lib/src/transformer.dart b/pkg/barback/lib/src/transformer.dart
index 664d2e4..422066f 100644
--- a/pkg/barback/lib/src/transformer.dart
+++ b/pkg/barback/lib/src/transformer.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'asset_id.dart';
+import 'asset.dart';
 import 'transform.dart';
 
 /// A [Transformer] represents a processor that takes in one or more input
@@ -29,7 +29,7 @@
   /// of those to generate the final JS. However you still run dart2js "on" a
   /// single file: the entrypoint Dart file that has your `main()` method.
   /// This entrypoint file would be the primary input.
-  Future<bool> isPrimary(AssetId input);
+  Future<bool> isPrimary(Asset input);
 
   /// Run this transformer on on the primary input specified by [transform].
   ///
diff --git a/pkg/barback/lib/src/utils.dart b/pkg/barback/lib/src/utils.dart
new file mode 100644
index 0000000..c4ab3a3
--- /dev/null
+++ b/pkg/barback/lib/src/utils.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.utils;
+
+/// Converts a number in the range [0-255] to a two digit hex string.
+///
+/// For example, given `255`, returns `ff`.
+String byteToHex(int byte) {
+  assert(byte >= 0 && byte <= 255);
+
+  const DIGITS = "0123456789abcdef";
+  return DIGITS[(byte ~/ 16) % 16] + DIGITS[byte % 16];
+}
\ No newline at end of file
diff --git a/pkg/barback/test/asset_graph/errors_test.dart b/pkg/barback/test/asset_graph/errors_test.dart
index 39e07c7..75e16bf 100644
--- a/pkg/barback/test/asset_graph/errors_test.dart
+++ b/pkg/barback/test/asset_graph/errors_test.dart
@@ -24,7 +24,7 @@
     ]);
     updateSources(["app|foo.a"]);
 
-    expectCollision("app|foo.b");
+    buildShouldFail([isAssetCollisionException("app|foo.b")]);
   });
 
   test("does not report asset not found errors in results", () {
@@ -38,10 +38,7 @@
     initGraph();
     updateSources(["app|unknown.txt"]);
 
-    buildShouldFail((error) {
-      expect(error, new isInstanceOf<AssetNotFoundException>());
-      expect(error.id, equals(new AssetId.parse("app|unknown.txt")));
-    });
+    buildShouldFail([isAssetNotFoundException("app|unknown.txt")]);
   });
 
   test("reports missing input errors in results", () {
@@ -49,10 +46,7 @@
       [new ManyToOneTransformer("txt")]
     ]);
 
-    buildShouldFail((error) {
-      expect(error, new isInstanceOf<MissingInputException>());
-      expect(error.id, equals(new AssetId.parse("app|a.inc")));
-    });
+    buildShouldFail([isMissingInputException("app|a.inc")]);
 
     updateSources(["app|a.txt"]);
 
@@ -77,10 +71,7 @@
       removeSources(["app|b.inc"]);
     });
 
-    buildShouldFail((error) {
-      expect(error, new isInstanceOf<MissingInputException>());
-      expect(error.id, equals(new AssetId.parse("app|b.inc")));
-    });
+    buildShouldFail([isMissingInputException("app|b.inc")]);
     expectNoAsset("app|a.out");
   });
 
@@ -95,9 +86,7 @@
 
     expectNoAsset("app|foo.out");
 
-    buildShouldFail((error) {
-      expect(error, equals(BadTransformer.ERROR));
-    });
+    buildShouldFail([equals(BadTransformer.ERROR)]);
   });
 
   // TODO(rnystrom): Is this the behavior we expect? If a transformer fails
@@ -123,9 +112,7 @@
 
     // Note: No asset requests here.
 
-    buildShouldFail((error) {
-      expect(error, equals(BadTransformer.ERROR));
-    });
+    buildShouldFail([equals(BadTransformer.ERROR)]);
   });
 
   test("discards outputs from failed transforms", () {
diff --git a/pkg/barback/test/asset_id_test.dart b/pkg/barback/test/asset_id_test.dart
index 6834039..6e4a7d8 100644
--- a/pkg/barback/test/asset_id_test.dart
+++ b/pkg/barback/test/asset_id_test.dart
@@ -32,4 +32,15 @@
       expect(() => new AssetId.parse("app|"), throwsFormatException);
     });
   });
+
+  test("equals another ID with the same package and path", () {
+    expect(new AssetId.parse("foo|asset.txt"), equals(
+           new AssetId.parse("foo|asset.txt")));
+
+    expect(new AssetId.parse("foo|asset.txt"), isNot(equals(
+        new AssetId.parse("bar|asset.txt"))));
+
+    expect(new AssetId.parse("foo|asset.txt"), isNot(equals(
+        new AssetId.parse("bar|other.txt"))));
+  });
 }
diff --git a/pkg/barback/test/asset_set_test.dart b/pkg/barback/test/asset_set_test.dart
new file mode 100644
index 0000000..6cb1eb8
--- /dev/null
+++ b/pkg/barback/test/asset_set_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.test.asset_set_test;
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:barback/barback.dart';
+import 'package:barback/src/asset_set.dart';
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart';
+
+main() {
+  initConfig();
+
+  var fooId = new AssetId.parse("app|foo.txt");
+  var barId = new AssetId.parse("app|bar.txt");
+
+  group("[] operator", () {
+    test("gets an asset with the given ID", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      set.add(foo);
+
+      expect(set[fooId], equals(foo));
+    });
+
+    test("returns null if no asset with the ID is in the set", () {
+      var set = new AssetSet();
+      expect(set[fooId], isNull);
+    });
+  });
+
+  group(".add()", () {
+    test("adds the asset to the set", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      set.add(foo);
+      expect(set.contains(foo), isTrue);
+    });
+
+    test("replaces a previously added asset with that ID", () {
+      var set = new AssetSet();
+      set.add(new MockAsset(fooId, "before"));
+      set.add(new MockAsset(fooId, "after"));
+      expect(set[fooId].contents, equals("after"));
+    });
+
+    test("returns the added item", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      expect(set.add(foo), equals(foo));
+    });
+  });
+
+  group(".addAll()", () {
+    test("adds the assets to the set", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      var bar = new MockAsset(barId, "bar");
+      set.addAll([foo, bar]);
+      expect(set.contains(foo), isTrue);
+      expect(set.contains(bar), isTrue);
+    });
+
+    test("replaces assets earlier in the sequence with later ones", () {
+      var set = new AssetSet();
+      var foo1 = new MockAsset(fooId, "before");
+      var foo2 = new MockAsset(fooId, "after");
+      set.addAll([foo1, foo2]);
+      expect(set[fooId].contents, equals("after"));
+    });
+  });
+
+  group(".clear()", () {
+    test("empties the set", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      set.add(foo);
+      set.clear();
+
+      expect(set.length, equals(0));
+      expect(set.contains(foo), isFalse);
+    });
+  });
+
+  group(".contains()", () {
+    test("returns true if the asset is in the set", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      var bar = new MockAsset(barId, "bar");
+      set.add(foo);
+
+      expect(set.contains(foo), isTrue);
+      expect(set.contains(bar), isFalse);
+    });
+  });
+
+  group(".containsId()", () {
+    test("returns true if an asset with the ID is in the set", () {
+      var set = new AssetSet();
+      var foo = new MockAsset(fooId, "foo");
+      set.add(foo);
+
+      expect(set.containsId(fooId), isTrue);
+      expect(set.containsId(barId), isFalse);
+    });
+  });
+}
diff --git a/pkg/barback/test/asset_test.dart b/pkg/barback/test/asset_test.dart
new file mode 100644
index 0000000..c2ecefc
--- /dev/null
+++ b/pkg/barback/test/asset_test.dart
@@ -0,0 +1,180 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library barback.test.asset_test;
+
+import 'dart:async';
+import 'dart:io';
+import 'dart:utf';
+
+import 'package:barback/barback.dart';
+import 'package:pathos/path.dart' as pathos;
+import 'package:unittest/unittest.dart';
+
+import 'utils.dart';
+
+/// The contents of the test binary file.
+final binaryContents = [0, 1, 2, 3, 4];
+
+main() {
+  initConfig();
+
+  Directory tempDir;
+  String binaryFilePath;
+  String textFilePath;
+  String utf32FilePath;
+
+  setUp(() {
+    // Create a temp file we can use for assets.
+    tempDir = new Directory("").createTempSync();
+    binaryFilePath = pathos.join(tempDir.path, "file.bin");
+    new File(binaryFilePath).writeAsBytesSync(binaryContents);
+
+    textFilePath = pathos.join(tempDir.path, "file.txt");
+    new File(textFilePath).writeAsStringSync("çøñ†éℵ™");
+
+    utf32FilePath = pathos.join(tempDir.path, "file.utf32");
+    new File(utf32FilePath).writeAsBytesSync(encodeUtf32("çøñ†éℵ™"));
+  });
+
+  tearDown(() {
+    if (tempDir != null) tempDir.deleteSync(recursive: true);
+  });
+
+  var id = new AssetId.parse("package|path/to/asset.txt");
+
+  group("Asset.fromBytes", () {
+    test("returns an asset with the given ID", () {
+      var asset = new Asset.fromBytes(id, [1]);
+      expect(asset.id, equals(id));
+    });
+  });
+
+  group("Asset.fromFile", () {
+    test("returns an asset with the given ID", () {
+      var asset = new Asset.fromFile(id, new File("asset.txt"));
+      expect(asset.id, equals(id));
+    });
+  });
+
+  group("Asset.fromPath", () {
+    test("returns an asset with the given ID", () {
+      var asset = new Asset.fromPath(id, "asset.txt");
+      expect(asset.id, equals(id));
+    });
+  });
+
+  group("Asset.fromString", () {
+    test("returns an asset with the given ID", () {
+      var asset = new Asset.fromString(id, "content");
+      expect(asset.id, equals(id));
+    });
+  });
+
+  group("read()", () {
+    test("gets the UTF-8-encoded string for a string asset", () {
+      var asset = new Asset.fromString(id, "çøñ†éℵ™");
+      expect(asset.read().toList(),
+          completion(equals([encodeUtf8("çøñ†éℵ™")])));
+    });
+
+    test("gets the raw bytes for a byte asset", () {
+      var asset = new Asset.fromBytes(id, binaryContents);
+      expect(asset.read().toList(),
+          completion(equals([binaryContents])));
+    });
+
+    test("gets the raw bytes for a binary file", () {
+      var asset = new Asset.fromPath(id, binaryFilePath);
+      expect(asset.read().toList(),
+          completion(equals([binaryContents])));
+    });
+
+    test("gets the raw bytes for a text file", () {
+      var asset = new Asset.fromPath(id, textFilePath);
+      expect(asset.read().toList(),
+          completion(equals([encodeUtf8("çøñ†éℵ™")])));
+    });
+  });
+
+  group("readAsString()", () {
+    group("byte asset", () {
+      test("defaults to UTF-8 if encoding is omitted", () {
+        var asset = new Asset.fromBytes(id, encodeUtf8("çøñ†éℵ™"));
+        expect(asset.readAsString(),
+            completion(equals("çøñ†éℵ™")));
+      });
+
+      test("supports UTF-8", () {
+        var asset = new Asset.fromBytes(id, encodeUtf8("çøñ†éℵ™"));
+        expect(asset.readAsString(encoding: Encoding.UTF_8),
+            completion(equals("çøñ†éℵ™")));
+      });
+
+      // TODO(rnystrom): Test other encodings once #6284 is fixed.
+    });
+
+    group("string asset", () {
+      test("gets the string", () {
+        var asset = new Asset.fromString(id, "contents");
+        expect(asset.readAsString(),
+            completion(equals("contents")));
+      });
+
+      test("ignores the encoding", () {
+        var asset = new Asset.fromString(id, "contents");
+        expect(asset.readAsString(encoding: Encoding.ISO_8859_1),
+            completion(equals("contents")));
+      });
+    });
+
+    group("file asset", () {
+      test("defaults to UTF-8 if encoding is omitted", () {
+        var asset = new Asset.fromPath(id, textFilePath);
+        expect(asset.readAsString(),
+            completion(equals("çøñ†éℵ™")));
+      });
+    });
+  });
+
+  group("toString()", () {
+    group("byte asset", () {
+      test("shows the list of bytes in hex", () {
+        var asset = new Asset.fromBytes(id,
+            [0, 1, 2, 4, 8, 16, 32, 64, 128, 255]);
+        expect(asset.toString(), equals(
+            "Bytes [00 01 02 04 08 10 20 40 80 ff]"));
+      });
+
+      test("truncates the middle of there are more than ten bytes", () {
+        var asset = new Asset.fromBytes(id,
+            [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
+        expect(asset.toString(), equals(
+            "Bytes [01 02 03 04 05 ... 0a 0b 0c 0d 0e]"));
+      });
+    });
+
+    group("string asset", () {
+      test("shows the contents", () {
+        var asset = new Asset.fromString(id, "contents");
+        expect(asset.toString(), equals(
+            'String "contents"'));
+      });
+
+      test("truncates the middle of there are more than 40 characters", () {
+        var asset = new Asset.fromString(id,
+            "this is a fairly long string asset content that gets shortened");
+        expect(asset.toString(), equals(
+            'String "this is a fairly lon ...  that gets shortened"'));
+      });
+    });
+
+    group("file asset", () {
+      test("shows the file path", () {
+        var asset = new Asset.fromPath(id, "path.txt");
+        expect(asset.toString(), equals('File "path.txt"'));
+      });
+    });
+  });
+}
diff --git a/pkg/barback/test/utils.dart b/pkg/barback/test/utils.dart
index c8ec836..f14ff3d 100644
--- a/pkg/barback/test/utils.dart
+++ b/pkg/barback/test/utils.dart
@@ -6,6 +6,7 @@
 
 import 'dart:async';
 import 'dart:collection';
+import 'dart:io';
 
 import 'package:barback/barback.dart';
 import 'package:barback/src/asset_graph.dart';
@@ -105,21 +106,24 @@
 }
 
 /// Expects that the next [BuildResult] is a build success.
-void buildShouldSucceed([void callback()]) {
+void buildShouldSucceed() {
   expect(_graph.results.elementAt(_nextBuildResult++).then((result) {
     expect(result.succeeded, isTrue);
-    if (callback != null) callback();
   }), completes);
 }
 
 /// Expects that the next [BuildResult] emitted is a failure.
 ///
-/// Invokes [callback] with the error (not the result) so that it can provide
-/// more precise expectations.
-void buildShouldFail(void callback(error)) {
+/// [matchers] is a list of matchers to match against the errors that caused the
+/// build to fail. Every matcher is expected to match an error, but the order of
+/// matchers is unimportant.
+void buildShouldFail(List matchers) {
   expect(_graph.results.elementAt(_nextBuildResult++).then((result) {
     expect(result.succeeded, isFalse);
-    callback(result.error);
+    expect(result.errors.length, equals(matchers.length));
+    for (var matcher in matchers) {
+      expect(result.errors, contains(matcher));
+    }
   }), completes);
 }
 
@@ -131,7 +135,7 @@
     return _graph.results.first.then((result) {
       expect(result.succeeded, isTrue);
     });
-  });
+  }, "wait for build");
 }
 
 /// Schedules an expectation that the graph will deliver an asset matching
@@ -150,9 +154,8 @@
     return _graph.getAssetById(id).then((asset) {
       // TODO(rnystrom): Make an actual Matcher class for this.
       expect(asset, new isInstanceOf<MockAsset>());
-      expect(asset._id.package, equals(id.package));
-      expect(asset._id.path, equals(id.path));
-      expect(asset._contents, equals(contents));
+      expect(asset.id, equals(id));
+      expect(asset.contents, equals(contents));
     });
   }, "get asset $name");
 }
@@ -173,16 +176,6 @@
   }, "get asset $name");
 }
 
-/// Expects that the next [BuildResult] is an output file collision error on an
-/// asset matching [name].
-Future expectCollision(String name) {
-  var id = new AssetId.parse(name);
-  _graph.results.first.then(wrapAsync((result) {
-    expect(result.error, new isInstanceOf<AssetCollisionException>());
-    expect(result.error.id, equals(id));
-  }));
-}
-
 /// Schedules an expectation that [graph] will have an error on an asset
 /// matching [name] for missing [input].
 Future expectMissingInput(AssetGraph graph, String name, String input) {
@@ -199,6 +192,30 @@
   }, "get missing input on $name");
 }
 
+/// Returns a matcher for an [AssetNotFoundException] with the given [id].
+Matcher isAssetNotFoundException(String name) {
+  var id = new AssetId.parse(name);
+  return allOf(
+      new isInstanceOf<AssetNotFoundException>(),
+      predicate((error) => error.id == id, 'id is $name'));
+}
+
+/// Returns a matcher for an [AssetCollisionException] with the given [id].
+Matcher isAssetCollisionException(String name) {
+  var id = new AssetId.parse(name);
+  return allOf(
+      new isInstanceOf<AssetCollisionException>(),
+      predicate((error) => error.id == id, 'id is $name'));
+}
+
+/// Returns a matcher for a [MissingInputException] with the given [id].
+Matcher isMissingInputException(String name) {
+  var id = new AssetId.parse(name);
+  return allOf(
+      new isInstanceOf<MissingInputException>(),
+      predicate((error) => error.id == id, 'id is $name'));
+}
+
 /// An [AssetProvider] that provides the given set of assets.
 class MockProvider implements AssetProvider {
   Iterable<String> get packages => _packages.keys;
@@ -242,8 +259,8 @@
 
   void _modifyAsset(String name, String contents) {
     var id = new AssetId.parse(name);
-    var asset = _packages[id.package].firstWhere((a) => a._id == id);
-    asset._contents = contents;
+    var asset = _packages[id.package].firstWhere((a) => a.id == id);
+    asset.contents = contents;
   }
 
   List<AssetId> listAssets(String package, {String within}) {
@@ -266,7 +283,7 @@
       var package = _packages[id.package];
       if (package == null) throw new AssetNotFoundException(id);
 
-      return package.firstWhere((asset) => asset._id == id,
+      return package.firstWhere((asset) => asset.id == id,
           orElse: () => throw new AssetNotFoundException(id));
     });
   }
@@ -318,8 +335,8 @@
     _wait = null;
   }
 
-  Future<bool> isPrimary(AssetId asset) {
-    return new Future.value(asset.extension == ".$from");
+  Future<bool> isPrimary(Asset asset) {
+    return new Future.value(asset.id.extension == ".$from");
   }
 
   Future apply(Transform transform) {
@@ -330,7 +347,7 @@
       return Future.wait(to.split(" ").map((extension) {
         var id = transform.primaryId.changeExtension(".$extension");
         return input.readAsString().then((content) {
-          transform.addOutput(id, new MockAsset(id, "$content.$extension"));
+          transform.addOutput(new MockAsset(id, "$content.$extension"));
         });
       })).then((_) {
         if (_wait != null) return _wait.future;
@@ -357,8 +374,8 @@
   /// files at each of those paths.
   OneToManyTransformer(this.extension);
 
-  Future<bool> isPrimary(AssetId asset) {
-    return new Future.value(asset.extension == ".$extension");
+  Future<bool> isPrimary(Asset asset) {
+    return new Future.value(asset.id.extension == ".$extension");
   }
 
   Future apply(Transform transform) {
@@ -367,7 +384,7 @@
       return input.readAsString().then((lines) {
         for (var line in lines.split(",")) {
           var id = new AssetId(transform.primaryId.package, line);
-          transform.addOutput(id, new MockAsset(id, "spread $extension"));
+          transform.addOutput(new MockAsset(id, "spread $extension"));
         }
       });
     });
@@ -392,8 +409,8 @@
   /// files at each of those paths.
   ManyToOneTransformer(this.extension);
 
-  Future<bool> isPrimary(AssetId asset) {
-    return new Future.value(asset.extension == ".$extension");
+  Future<bool> isPrimary(Asset asset) {
+    return new Future.value(asset.id.extension == ".$extension");
   }
 
   Future apply(Transform transform) {
@@ -416,7 +433,7 @@
           });
         }).then((_) {
           var id = transform.primaryId.changeExtension(".out");
-          transform.addOutput(id, new MockAsset(id, output));
+          transform.addOutput(new MockAsset(id, output));
         });
       });
     });
@@ -436,13 +453,13 @@
 
   BadTransformer(this.outputs);
 
-  Future<bool> isPrimary(AssetId asset) => new Future.value(true);
+  Future<bool> isPrimary(Asset asset) => new Future.value(true);
   Future apply(Transform transform) {
     return new Future(() {
       // Create the outputs first.
       for (var output in outputs) {
         var id = new AssetId.parse(output);
-        transform.addOutput(id, new MockAsset(id, output));
+        transform.addOutput(new MockAsset(id, output));
       }
 
       // Then fail.
@@ -453,15 +470,15 @@
 
 /// An implementation of [Asset] that never hits the file system.
 class MockAsset implements Asset {
-  final AssetId _id;
-  String _contents;
+  final AssetId id;
+  String contents;
 
-  MockAsset(this._id, this._contents);
+  MockAsset(this.id, this.contents);
 
-  Future<String> readAsString() => new Future.value(_contents);
+  Future<String> readAsString({Encoding encoding}) =>
+      new Future.value(contents);
+
   Stream<List<int>> read() => throw new UnimplementedError();
 
-  serialize() => throw new UnimplementedError();
-
-  String toString() => "MockAsset $_id $_contents";
+  String toString() => "MockAsset $id $contents";
 }
\ No newline at end of file
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index 76cb0bb..3431fe8 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -55,12 +55,12 @@
  * Also initializes the command line arguments. 
  * 
  * [packageRoot] is the packages directory of the directory being analyzed. 
- * If [includeSdk] is 'true', then any SDK libraries explicitly imported will 
+ * If [includeSdk] is `true`, then any SDK libraries explicitly imported will 
  * also be documented. 
- * If [parseSdk] is 'true', then all Dart SDK libraries will be documented. 
+ * If [parseSdk] is `true`, then all Dart SDK libraries will be documented. 
  * This option is useful when only the SDK libraries are needed. 
  * 
- * Returns true if docgen sucessfuly completes. 
+ * Returns `true` if docgen sucessfuly completes. 
  */
 Future<bool> docgen(List<String> files, {String packageRoot, 
     bool outputToYaml: true, bool includePrivate: false, bool includeSdk: false,
@@ -272,13 +272,20 @@
 }
 
 /**
- * Converts all [_] references in comments to <code>_</code>.
+ * Converts all [foo] references in comments to <a>libraryName.foo</a>.
  */
-// TODO(tmandel): Create proper links for [_] style markdown based
-// on scope once layout of viewer is finished.
 markdown.Node fixReference(String name, LibraryMirror currentLibrary, 
     ClassMirror currentClass, MemberMirror currentMember) {
-  return new markdown.Element.text('code', name);
+  var reference;
+  var memberScope = currentMember == null ? 
+      null : currentMember.lookupInScope(name);
+  if (memberScope != null) reference = memberScope.qualifiedName;
+  else {
+    var classScope = currentClass == null ?
+        null : currentClass.lookupInScope(name);
+    reference = classScope != null ? classScope.qualifiedName : name;
+  }
+  return new markdown.Element.text('a', reference);
 }
 
 /**
diff --git a/pkg/docgen/pubspec.yaml b/pkg/docgen/pubspec.yaml
index 5a6e7af..8545c8e 100644
--- a/pkg/docgen/pubspec.yaml
+++ b/pkg/docgen/pubspec.yaml
@@ -4,5 +4,6 @@
   args: any
   logging: any
   markdown: any
+  pathos: any
   scheduled_test: any
   unittest: any
diff --git a/pkg/docgen/test/single_library_test.dart b/pkg/docgen/test/single_library_test.dart
new file mode 100644
index 0000000..e92c857
--- /dev/null
+++ b/pkg/docgen/test/single_library_test.dart
@@ -0,0 +1,110 @@
+library single_library_test;
+
+import 'dart:io'; 
+
+import 'package:unittest/unittest.dart';
+
+import '../lib/docgen.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
+
+main() {
+  group('Generate docs for', () {
+    test('one simple file.', () {
+      // TODO(janicejl): Instead of creating a new file, should use an in-memory
+      // file for creating the mirrorSystem. Example of the util function in 
+      // sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart. 
+      // Example of the test is in file mirrors_lookup_test.dart
+      var file = new File('test.dart');
+      file.writeAsStringSync('''
+  library test;
+  /**
+   * Doc comment for class [A].
+   * 
+   * Multiline Test
+   */
+  /*
+   * Normal comment for class A.
+   */
+  class A {
+    
+    int _someNumber;
+    
+    A() {
+      _someNumber = 12;
+    }
+    
+    /**
+     * Test for linking to parameter [A]
+     */
+    void doThis(int A) {
+      print(A);
+    }
+  }
+  
+  main() {
+    A a = new A();
+    a.doThis(5);
+  }
+      ''');
+      
+      getMirrorSystem(['test.dart'],'', parseSdk: false)
+        .then(expectAsync1((mirrorSystem) {
+          var testLibraryUri = currentDirectory.resolve('test.dart');
+          var library = generateLibrary(mirrorSystem.libraries[testLibraryUri], 
+              includePrivate: true);
+          expect(library is Library, isTrue);
+          
+          var classes = library.classes.values;
+          expect(classes.every((e) => e is Class), isTrue);
+          
+          var classMethods = [];
+          classes.forEach((e) => classMethods.addAll(e.methods.values));
+          expect(classMethods.every((e) => e is Method), isTrue);
+          
+          var methodParameters = [];
+          classMethods.forEach((e) { 
+            methodParameters.addAll(e.parameters.values);
+          });
+          expect(methodParameters.every((e) => e is Parameter), isTrue);
+          
+          var functions = library.functions.values;
+          expect(functions.every((e) => e is Method), isTrue);
+          
+          var functionParameters = [];
+          functions.forEach((e) {
+            functionParameters.addAll(e.parameters.values); 
+          });
+          expect(functionParameters.every((e) => e is Parameter), isTrue);
+    
+          var variables = library.variables.values;
+          expect(variables.every((e) => e is Variable), isTrue);
+          
+          /// Testing fixReference 
+          // Testing Doc comment for class [A].
+          var libraryMirror = mirrorSystem.libraries[testLibraryUri];
+          var classMirror = libraryMirror.classes.values.first;
+          var classDocComment = fixReference('A', libraryMirror, 
+              classMirror, null).children.first.text;
+          expect(classDocComment == 'test.A', isTrue);
+          
+          // Test for linking to parameter [A]
+          var methodMirror = classMirror.methods['doThis'];
+          var methodParameterDocComment = fixReference('A', libraryMirror,
+              classMirror, methodMirror).children.first.text;
+          expect(methodParameterDocComment == 'test.A.doThis#A', isTrue);
+          
+          // Testing trying to refer to doThis function
+          var methodDocComment = fixReference('doThis', libraryMirror, 
+              classMirror, methodMirror).children.first.text;
+          expect(methodDocComment == 'test.A.doThis', isTrue);
+          
+          // Testing something with no reference
+          var libraryDocComment = fixReference('foobar', libraryMirror,
+              classMirror, methodMirror).children.first.text;
+          expect(libraryDocComment == 'foobar', isTrue);
+          
+          file.deleteSync();
+        }));
+    });
+  });
+}
diff --git a/pkg/observe/lib/src/observable_list.dart b/pkg/observe/lib/src/observable_list.dart
index bc66ea02..2021374 100644
--- a/pkg/observe/lib/src/observable_list.dart
+++ b/pkg/observe/lib/src/observable_list.dart
@@ -102,7 +102,7 @@
   bool remove(Object element) {
     for (int i = 0; i < this.length; i++) {
       if (this[i] == element) {
-        removeRange(i, 1);
+        removeRange(i, i + 1);
         return true;
       }
     }
diff --git a/pkg/observe/test/observable_list_test.dart b/pkg/observe/test/observable_list_test.dart
index e211243..b886f03 100644
--- a/pkg/observe/test/observable_list_test.dart
+++ b/pkg/observe/test/observable_list_test.dart
@@ -31,6 +31,15 @@
       expectChanges(changes, [_lengthChange]);
     });
 
+    test('removeObject', () {
+      list.remove(2);
+      expect(list, orderedEquals([1, 3]));
+
+      deliverChangeRecords();
+      deliverChangeRecords();
+      expectChanges(changes, [_lengthChange]);
+    });
+
     test('removeRange changes length', () {
       list.add(4);
       list.removeRange(1, 3);
diff --git a/pkg/pkg.gyp b/pkg/pkg.gyp
index 172eef5..c06b517 100644
--- a/pkg/pkg.gyp
+++ b/pkg/pkg.gyp
@@ -24,6 +24,24 @@
             '<@(_inputs)',
           ],
         },
+        {
+          'action_name': 'make_third_party_packages',
+          'inputs': [
+            '../tools/make_links.py',
+            '<!@(["python", "../tools/list_pkg_directories.py", '
+                '"../third_party/pkg"])',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/third_party_packages.stamp',
+          ],
+          'action': [
+            'python', '../tools/make_links.py',
+            '--timestamp_file=<(SHARED_INTERMEDIATE_DIR)/third_party_packages.'
+                'stamp',
+            '<(PRODUCT_DIR)/packages',
+            '<@(_inputs)',
+          ],
+        },
       ],
     }
   ],
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 16ffbd7..cb9ad10 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -36,6 +36,7 @@
 [ $runtime == d8 || $runtime == jsshell ]
 unittest/test/unittest_test: Pass, Fail # http://dartbug.com/10109
 stack_trace/test/vm_test: Fail, OK # VM-specific traces
+sequence_zip/test/stream_test: Fail, OK # Timers are not supported.
 
 [$compiler == dart2dart]
 *: Skip
@@ -59,6 +60,7 @@
 
 # Skip browser-specific tests on VM
 [ $runtime == vm ]
+docgen/test/single_library_test: Skip # Uses js_helper
 pathos/test/pathos_dartium_test: Fail, OK # Uses dart:html
 pathos/test/pathos_dart2js_test: Fail, OK # Uses dart:html
 intl/test/find_default_locale_browser_test: Skip
@@ -71,6 +73,7 @@
 [ $compiler == dart2js ]
 analyzer_experimental/test/generated/ast_test: Fail, Slow # Issue 11230
 unittest/test/instance_test: Fail # http://dartbug.com/11191
+stack_trace/test/trace_test: Pass, Timeout # Issue 11645
 
 [ $compiler == dart2js && $checked ]
 mdv_observe/test/observable_map_test: Fail # BUG(11480): Triage.
@@ -90,7 +93,6 @@
 [ $compiler == dart2js && $minified ]
 serialization/test/serialization_test: Fail # Issue 6490
 serialization/test/no_library_test: Fail # Issue 6490
-stack_trace/test/trace_test: Pass, Timeout # Issue 11645
 
 # The unminified unittest tests test that the real names of Dart types are
 # printed. Minified versions of these tests exist that test the behavior when
@@ -191,3 +193,7 @@
 # Skip mdv tests on command line VM, they only run in the browser.
 [ $runtime == vm ]
 mdv: Skip
+
+[ $runtime == safari || $runtime == chrome || $runtime == ie9 || $runtime == ff || $runtime == dartium || $runtime == drt ]
+docgen/test/single_library_test: Skip # Uses dart:io
+
diff --git a/pkg/sequence_zip/lib/iterable_zip.dart b/pkg/sequence_zip/lib/iterable_zip.dart
new file mode 100644
index 0000000..90c4c4f
--- /dev/null
+++ b/pkg/sequence_zip/lib/iterable_zip.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library iterable_zip;
+
+import "dart:collection";
+
+/**
+ * Iterable that iterates over lists of values from other iterables.
+ *
+ * When [iterator] is read, an [Iterator] is created for each [Iterable] in
+ * the [Iterable] passed to the constructor.
+ *
+ * As long as all these iterators have a next value, those next values are
+ * combined into a single list, which becomes the next value of this
+ * [Iterable]'s [Iterator]. As soon as any of the iterators run out,
+ * the zipped iterator also stops.
+ */
+class IterableZip extends IterableBase<List> {
+  final Iterable<Iterable> _iterables;
+  IterableZip(Iterable<Iterable> iterables)
+      : this._iterables = iterables;
+
+  /**
+   * Returns an iterator that combines values of the iterables' iterators
+   * as long as they all have values.
+   */
+  Iterator<List> get iterator {
+    List iterators = _iterables.map((x) => x.iterator).toList(growable: false);
+    // TODO(lrn): Return an empty iterator directly if iterators is empty?
+    return new _IteratorZip(iterators);
+  }
+}
+
+class _IteratorZip implements Iterator<List> {
+  final List<Iterator> _iterators;
+  List _current;
+  _IteratorZip(List iterators) : _iterators = iterators;
+  bool moveNext() {
+    if (_iterators.isEmpty) return false;
+    for (int i = 0; i < _iterators.length; i++) {
+      if (!_iterators[i].moveNext()) {
+        _current = null;
+        return false;
+      }
+    }
+    _current = new List(_iterators.length);
+    for (int i = 0; i < _iterators.length; i++) {
+      _current[i] = _iterators[i].current;
+    }
+    return true;
+  }
+
+  List get current => _current;
+}
diff --git a/pkg/sequence_zip/lib/sequence_zip.dart b/pkg/sequence_zip/lib/sequence_zip.dart
new file mode 100644
index 0000000..e8331ac
--- /dev/null
+++ b/pkg/sequence_zip/lib/sequence_zip.dart
@@ -0,0 +1,8 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library sequence_zip;
+
+export "iterable_zip.dart";
+export "stream_zip.dart";
diff --git a/pkg/sequence_zip/lib/stream_zip.dart b/pkg/sequence_zip/lib/stream_zip.dart
new file mode 100644
index 0000000..d1a47ab
--- /dev/null
+++ b/pkg/sequence_zip/lib/stream_zip.dart
@@ -0,0 +1,116 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library stream_zip;
+
+import "dart:async";
+
+/**
+ * A stream that combines the values of other streams.
+ */
+class StreamZip extends Stream<List> {
+  final Iterable<Stream> _streams;
+  StreamZip(Iterable<Stream> streams) : _streams = streams;
+
+  StreamSubscription<List> listen(void onData(List data), {
+                                  void onError(Object error),
+                                  void onDone(),
+                                  bool cancelOnError}) {
+    cancelOnError = identical(true, cancelOnError);
+    List<StreamSubscription> subscriptions = <StreamSubscription>[];
+    StreamController controller;
+    List current;
+    int dataCount = 0;
+
+    /// Called for each data from a subscription in [subscriptions].
+    void handleData(int index, data) {
+      current[index] = data;
+      dataCount++;
+      if (dataCount == subscriptions.length) {
+        List data = current;
+        current = new List(subscriptions.length);
+        dataCount = 0;
+        for (int i = 0; i < subscriptions.length; i++) {
+          if (i != index) subscriptions[i].resume();
+        }
+        controller.add(data);
+      } else {
+        subscriptions[index].pause();
+      }
+    }
+
+    /// Called for each error from a subscription in [subscriptons].
+    /// Except if [cancelOnError] is true, in which case the function below
+    /// is used instead.
+    void handleError(Object error) {
+      controller.addError(error);
+    }
+
+    /// Called when a subscription has an error and [cancelOnError] is true.
+    ///
+    /// Prematurely cancels all subscriptions since we know that we won't
+    /// be needing any more values.
+    void handleErrorCancel(Object error) {
+      for (int i = 0; i < subscriptions.length; i++) {
+        subscriptions[i].cancel();
+      }
+      controller.addError(error);
+    }
+
+    void handleDone() {
+      for (int i = 0; i < subscriptions.length; i++) {
+        subscriptions[i].cancel();
+      }
+      controller.close();
+    }
+
+    try {
+      for (Stream stream in _streams) {
+        int index = subscriptions.length;
+        subscriptions.add(stream.listen(
+            (data) { handleData(index, data); },
+            onError: cancelOnError ? handleError : handleErrorCancel,
+            onDone: handleDone,
+            cancelOnError: cancelOnError));
+      }
+    } catch (e) {
+      for (int i = subscriptions.length - 1; i >= 0; i--) {
+        subscriptions[i].cancel();
+      }
+      rethrow;
+    }
+
+    current = new List(subscriptions.length);
+
+    controller = new StreamController<List>(
+      onPause: () {
+        for (int i = 0; i < subscriptions.length; i++) {
+          // This may pause some subscriptions more than once.
+          // These will not be resumed by onResume below, but must wait for the
+          // next round.
+          subscriptions[i].pause();
+        }
+      },
+      onResume: () {
+        for (int i = 0; i < subscriptions.length; i++) {
+          subscriptions[i].resume();
+        }
+      },
+      onCancel: () {
+        for (int i = 0; i < subscriptions.length; i++) {
+          // Canceling more than once is safe.
+          subscriptions[i].cancel();
+        }
+      }
+    );
+
+    if (subscriptions.isEmpty) {
+      controller.close();
+    }
+    return controller.stream.listen(onData,
+                                    onError: onError,
+                                    onDone: onDone,
+                                    cancelOnError: cancelOnError);
+  }
+}
diff --git a/pkg/sequence_zip/pubspec.yaml b/pkg/sequence_zip/pubspec.yaml
new file mode 100644
index 0000000..ba4d377
--- /dev/null
+++ b/pkg/sequence_zip/pubspec.yaml
@@ -0,0 +1,9 @@
+name: sequence_zip
+author: "Dart Team <misc@dartlang.org>"
+homepage: http://www.dartlang.org
+description: >
+  "Zip" functionality on iterables and streams.
+  Combines multiple iterables into a single iterable of tuples of values,
+  and similar for Streams.
+dev_dependencies:
+  unittest: any
diff --git a/pkg/sequence_zip/test/iterable_test.dart b/pkg/sequence_zip/test/iterable_test.dart
new file mode 100644
index 0000000..978ee96
--- /dev/null
+++ b/pkg/sequence_zip/test/iterable_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:collection";
+import "package:sequence_zip/iterable_zip.dart";
+import "package:unittest/unittest.dart";
+
+/// Iterable like [base] except that it throws when value equals [errorValue].
+Iterable iterError(Iterable base, int errorValue) {
+  return base.map((x) => x == errorValue ? throw "BAD" : x);
+}
+
+main() {
+  test("Basic", () {
+    expect(new IterableZip([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Uneven length 1", () {
+    expect(new IterableZip([[1, 2, 3, 99, 100], [4, 5, 6], [7, 8, 9]]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Uneven length 2", () {
+    expect(new IterableZip([[1, 2, 3], [4, 5, 6, 99, 100], [7, 8, 9]]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Uneven length 3", () {
+    expect(new IterableZip([[1, 2, 3], [4, 5, 6], [7, 8, 9, 99, 100]]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Uneven length 3", () {
+    expect(new IterableZip([[1, 2, 3, 98], [4, 5, 6], [7, 8, 9, 99, 100]]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Empty 1", () {
+    expect(new IterableZip([[], [4, 5, 6], [7, 8, 9]]), equals([]));
+  });
+
+  test("Empty 2", () {
+    expect(new IterableZip([[1, 2, 3], [], [7, 8, 9]]), equals([]));
+  });
+
+  test("Empty 3", () {
+    expect(new IterableZip([[1, 2, 3], [4, 5, 6], []]), equals([]));
+  });
+
+  test("Empty source", () {
+    expect(new IterableZip([]), equals([]));
+  });
+
+  test("Single Source", () {
+    expect(new IterableZip([[1, 2, 3]]), equals([[1], [2], [3]]));
+  });
+
+  test("Not-lists", () {
+    // Use other iterables than list literals.
+    Iterable it1 = [1, 2, 3, 4, 5, 6].where((x) => x < 4);
+    Set it2 = new LinkedHashSet()..add(4)..add(5)..add(6);
+    Iterable it3 = (new LinkedHashMap()..[7] = 0 ..[8] = 0 ..[9] = 0).keys;
+    Iterable<Iterable> allIts =
+        new Iterable.generate(3, (i) => [it1, it2, it3][i]);
+    expect(new IterableZip(allIts),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+
+  test("Error 1", () {
+    expect(() => new IterableZip([iterError([1, 2, 3], 2),
+                                  [4, 5, 6],
+                                  [7, 8, 9]]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error 2", () {
+    expect(() => new IterableZip([[1, 2, 3],
+                                  iterError([4, 5, 6], 5),
+                                  [7, 8, 9]]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error 3", () {
+    expect(() => new IterableZip([[1, 2, 3],
+                                  [4, 5, 6],
+                                  iterError([7, 8, 9], 8)]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error at end", () {
+    expect(() => new IterableZip([[1, 2, 3],
+                                  iterError([4, 5, 6], 6),
+                                  [7, 8, 9]]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error before first end", () {
+    expect(() => new IterableZip([iterError([1, 2, 3, 4], 4),
+                                  [4, 5, 6],
+                                  [7, 8, 9]]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error after first end", () {
+    expect(new IterableZip([[1, 2, 3],
+                            [4, 5, 6],
+                            iterError([7, 8, 9, 10], 10)]),
+           equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
+  });
+}
diff --git a/pkg/sequence_zip/test/stream_test.dart b/pkg/sequence_zip/test/stream_test.dart
new file mode 100644
index 0000000..c3e82b8
--- /dev/null
+++ b/pkg/sequence_zip/test/stream_test.dart
@@ -0,0 +1,229 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "package:sequence_zip/stream_zip.dart";
+import "package:unittest/unittest.dart";
+
+/// Create an error with the same values as [base], except that it throwsA
+/// when seeing the value [errorValue].
+Stream streamError(Stream base, int errorValue) {
+  return base.map((x) => (x == errorValue) ? throw "BAD" : x);
+}
+
+/// Make a [Stream] from an [Iterable] by adding events to a stream controller
+/// at periodic intervals.
+Stream mks(Iterable iterable) {
+  Iterator iterator = iterable.iterator;
+  StreamController controller = new StreamController();
+  // Some varying time between 3 and 10 ms.
+  int ms = ((++ctr) * 5) % 7 + 3;
+  new Timer.periodic(new Duration(milliseconds: ms), (Timer timer) {
+    if (iterator.moveNext()) {
+      controller.add(iterator.current);
+    } else {
+      controller.close();
+      timer.cancel();
+    }
+  });
+  return controller.stream;
+}
+
+/// Counter used to give varying delays for streams.
+int ctr = 0;
+
+main() {
+  // Test that zipping [streams] gives the results iterated by [expectedData].
+  testZip(Iterable streams, Iterable expectedData) {
+    List data = [];
+    Stream zip = new StreamZip(streams);
+    zip.listen(data.add, onDone: expectAsync0(() {
+      expect(data, equals(expectedData));
+    }));
+  }
+
+  test("Basic", () {
+    testZip([mks([1, 2, 3]), mks([4, 5, 6]), mks([7, 8, 9])],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+  });
+
+  test("Uneven length 1", () {
+    testZip([mks([1, 2, 3, 99, 100]), mks([4, 5, 6]), mks([7, 8, 9])],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+  });
+
+  test("Uneven length 2", () {
+    testZip([mks([1, 2, 3]), mks([4, 5, 6, 99, 100]), mks([7, 8, 9])],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+  });
+
+  test("Uneven length 3", () {
+    testZip([mks([1, 2, 3]), mks([4, 5, 6]), mks([7, 8, 9, 99, 100])],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+  });
+
+  test("Uneven length 4", () {
+    testZip([mks([1, 2, 3, 98]), mks([4, 5, 6]), mks([7, 8, 9, 99, 100])],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+  });
+
+  test("Empty 1", () {
+    testZip([mks([]), mks([4, 5, 6]), mks([7, 8, 9])], []);
+  });
+
+  test("Empty 2", () {
+    testZip([mks([1, 2, 3]), mks([]), mks([7, 8, 9])], []);
+  });
+
+  test("Empty 3", () {
+    testZip([mks([1, 2, 3]), mks([4, 5, 6]), mks([])], []);
+  });
+
+  test("Empty source", () {
+    testZip([], []);
+  });
+
+  test("Single Source", () {
+    testZip([mks([1, 2, 3])], [[1], [2], [3]]);
+  });
+
+  test("Other-streams", () {
+    Stream st1 = mks([1, 2, 3, 4, 5, 6]).where((x) => x < 4);
+    Stream st2 = new Stream.periodic(const Duration(milliseconds: 5),
+                                     (x) => x + 4).take(3);
+    StreamController c = new StreamController.broadcast();
+    Stream st3 = c.stream;
+    testZip([st1, st2, st3],
+            [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+    c..add(7)..add(8)..add(9)..close();
+  });
+
+  test("Error 1", () {
+    expect(new StreamZip([streamError(mks([1, 2, 3]), 2),
+                          mks([4, 5, 6]),
+                          mks([7, 8, 9])]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error 2", () {
+    expect(new StreamZip([mks([1, 2, 3]),
+                          streamError(mks([4, 5, 6]), 5),
+                          mks([7, 8, 9])]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error 3", () {
+    expect(new StreamZip([mks([1, 2, 3]),
+                          mks([4, 5, 6]),
+                          streamError(mks([7, 8, 9]), 8)]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error at end", () {
+    expect(new StreamZip([mks([1, 2, 3]),
+                          streamError(mks([4, 5, 6]), 6),
+                          mks([7, 8, 9])]).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error before first end", () {
+    // StreamControllers' streams with no "close" called will never be done,
+    // so the fourth event of the first stream is guaranteed to come first.
+    expect(new StreamZip(
+                [streamError(mks([1, 2, 3, 4]), 4),
+                 (new StreamController()..add(4)..add(5)..add(6)).stream,
+                 (new StreamController()..add(7)..add(8)..add(9)).stream]
+               ).toList(),
+           throwsA(equals("BAD")));
+  });
+
+  test("Error after first end", () {
+    StreamController controller = new StreamController();
+    controller..add(7)..add(8)..add(9);
+    testZip([mks([1, 2, 3]),
+             mks([4, 5, 6]),
+             controller.stream],
+           [[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
+    // This comes after the first three events in all cases, since they
+    // use durations no greater than 10 ms.
+    new Timer(const Duration(milliseconds: 100), () {
+      controller.addError("BAD");
+    });
+  });
+
+  test("Pause/Resume", () {
+    var done = expectAsync0((){});  // Call to complete test.
+
+    int sc1p = 0;
+    StreamController c1 = new StreamController(
+      onPause: () {
+        sc1p++;
+      },
+      onResume: () {
+        sc1p--;
+      });
+
+    int sc2p = 0;
+    StreamController c2 = new StreamController(
+      onPause: () {
+        sc2p++;
+      },
+      onResume: () {
+        sc2p--;
+      });
+    Stream zip = new StreamZip([c1.stream, c2.stream]);
+
+    const ms25 = const Duration(milliseconds: 25);
+
+    // StreamIterator uses pause and resume to control flow.
+    StreamIterator it = new StreamIterator(zip);
+
+    it.moveNext().then((hasMore) {
+      expect(hasMore, isTrue);
+      expect(it.current, equals([1, 2]));
+      return it.moveNext();
+    }).then((hasMore) {
+      expect(hasMore, isTrue);
+      expect(it.current, equals([3, 4]));
+      c2.add(6);
+      return it.moveNext();
+    }).then((hasMore) {
+      expect(hasMore, isTrue);
+      expect(it.current, equals([5, 6]));
+      new Future.delayed(ms25).then((_) { c2.add(8); });
+      return it.moveNext();
+    }).then((hasMore) {
+      expect(hasMore, isTrue);
+      expect(it.current, equals([7, 8]));
+      c2.add(9);
+      return it.moveNext();
+    }).then((hasMore) {
+      expect(hasMore, isFalse);
+      done();
+    });
+
+    c1..add(1)..add(3)..add(5)..add(7)..close();
+    c2..add(2)..add(4);
+  });
+
+  test("pause-resume2", () {
+    var s1 = new Stream.fromIterable([0, 2, 4, 6, 8]);
+    var s2 = new Stream.fromIterable([1, 3, 5, 7]);
+    var sz = new StreamZip([s1, s2]);
+    int ctr = 0;
+    var sub;
+    sub = sz.listen(expectAsync1((v) {
+      expect(v, equals([ctr * 2, ctr * 2 + 1]));
+      if (ctr == 1) {
+        sub.pause(new Future.delayed(const Duration(milliseconds: 25)));
+      } else if (ctr == 2) {
+        sub.pause();
+        new Future.delayed(const Duration(milliseconds: 25)).then((_) {
+          sub.resume();
+        });
+      }
+      ctr++;
+    }, count: 4));
+  });
+}
diff --git a/pkg/shadow_dom/README.md b/pkg/shadow_dom/README.md
new file mode 100644
index 0000000..85f062a
--- /dev/null
+++ b/pkg/shadow_dom/README.md
@@ -0,0 +1,100 @@
+# Shadow DOM polyfill
+
+Shadow DOM is designed to provide encapsulation by hiding DOM subtrees under
+shadow roots. It provides a method of establishing and maintaining functional
+boundaries between DOM trees and how these trees interact with each other within
+a document, thus enabling better functional encapsulation within the DOM. See
+the
+[W3C specification](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html)
+for details.
+
+## Getting started
+
+Include the polyfill in your HTML `<head>` to enable Shadow DOM:
+
+```html
+    <script src="packages/shadow_dom/shadow_dom.debug.js"></script>
+```
+
+You can also use a minified version for deployment:
+
+```html
+    <script src="packages/shadow_dom/shadow_dom.min.js"></script>
+```
+
+Because it does extensive DOM patching, it should be included **before** other
+script tags.
+
+## Useful Resources
+
+- [What the Heck is Shadow DOM?](http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/)
+- [Web Components Explained - Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/57f8cfc4a7dc/explainer/index.html#shadow-dom-section)
+- [HTML5Rocks - Shadow DOM 101](http://www.html5rocks.com/tutorials/webcomponents/shadowdom/)
+- [HTML5Rocks - Shadow DOM 201: CSS and Styling](http://www.html5rocks.com/tutorials/webcomponents/shadowdom-201/)
+- [HTML5Rocks - Shadow DOM 301: Advanced Concepts & DOM APIs](http://www.html5rocks.com/tutorials/webcomponents/shadowdom-301/)
+
+## Learn the tech
+
+### Basic usage
+
+```dart
+var el = new DivElement();
+var shadow = el.createShadowRoot();
+shadow.innerHtml = '<content select="h1"></content>';
+```
+
+### Shadow DOM subtrees
+
+Shadow DOM allows a single node to express three subtrees: _light DOM_, _shadow DOM_, and _composed DOM_.
+
+A component user supplies the light DOM; the node has a (hidden) shadow DOM; and the composed DOM is what is actually rendered in the browser. At render time, the light DOM is merged with the shadow DOM to produce the composed DOM. For example:
+
+**Light DOM**
+
+```html
+<my-custom-element>
+  <!-- everything in here is my-custom-element's light DOM -->
+  <q>Hello World</q>
+</my-custom-element>
+```
+
+**Shadow DOM**
+
+```html
+<!-- shadow-root is attached to my-custom-element, but is not a child -->
+<shadow-root>
+  <!-- everything in here is my-custom-element's shadow DOM -->
+  <span>People say: <content></content></span>
+</shadow-root>
+```
+
+**Composed (rendered) DOM**
+
+```html
+<!-- rendered DOM -->
+<my-custom-element>
+  <span>People say: <q>Hello World</q></span>
+</my-custom-element>
+```
+
+The following is true about this example:
+
+* The light DOM that belongs to `<my-custom-element>` is visible to the user as its normal subtree. It can expressed by `.childNodes`, `.nodes`, `.innerHtml` or any other property or method that gives you information about a node's subtree.
+* Nodes in light DOM or shadow DOM express parent and sibling relationships that match their respective tree structures; the relationships that exist in the rendered tree are not expressed anywhere in DOM.
+
+So, while in the final rendered tree `<span>` is a child of `<my-custom-element>` and the parent of `<q>`, interrogating those nodes will tell you that the `<span>` is a child of `<shadow-root>` and `<q>` is a child of `<my-custom-element>`, and that those two nodes are unrelated.
+
+In this way, the user can manipulate light DOM or shadow DOM directly as regular DOM subtrees, and let the system take care of keeping the render tree synchronized.
+
+## Polyfill details
+
+You can read more about how the polyfill is implemented in JavaScript here:
+<https://github.com/polymer/ShadowDOM#polyfill-details>.
+
+## Getting the source code
+
+This package is built from:
+<https://github.com/dart-lang/ShadowDOM/tree/conditional_shadowdom>
+
+You'll need [node.js](http://nodejs.org) to rebuild the JS file. Use `npm install` to
+get dependencies and `grunt` to build.
diff --git a/pkg/shadow_dom/lib/shadow_dom.debug.js b/pkg/shadow_dom/lib/shadow_dom.debug.js
new file mode 100644
index 0000000..dc87a19
--- /dev/null
+++ b/pkg/shadow_dom/lib/shadow_dom.debug.js
@@ -0,0 +1,3221 @@
+if ((!HTMLElement.prototype.createShadowRoot &&
+    !HTMLElement.prototype.webkitCreateShadowRoot) ||
+    window.__forceShadowDomPolyfill) {
+
+/*
+ * Copyright 2013 The Polymer Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+(function() {
+  // TODO(jmesserly): fix dart:html to use unprefixed name
+  if (Element.prototype.webkitCreateShadowRoot) {
+    Element.prototype.webkitCreateShadowRoot = function() {
+      return window.ShadowDOMPolyfill.wrapIfNeeded(this).createShadowRoot();
+    };
+  }
+})();
+
+/*
+ * Copyright 2012 The Polymer Authors. All rights reserved.
+ * Use of this source code is goverened by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+// SideTable is a weak map where possible. If WeakMap is not available the
+// association is stored as an expando property.
+var SideTable;
+// TODO(arv): WeakMap does not allow for Node etc to be keys in Firefox
+if (typeof WeakMap !== 'undefined' && navigator.userAgent.indexOf('Firefox/') < 0) {
+  SideTable = WeakMap;
+} else {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var hasOwnProperty = Object.hasOwnProperty;
+    var counter = new Date().getTime() % 1e9;
+
+    SideTable = function() {
+      this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');
+    };
+
+    SideTable.prototype = {
+      set: function(key, value) {
+        defineProperty(key, this.name, {value: value, writable: true});
+      },
+      get: function(key) {
+        return hasOwnProperty.call(key, this.name) ? key[this.name] : undefined;
+      },
+      delete: function(key) {
+        this.set(key, undefined);
+      }
+    }
+  })();
+}
+
+// Copyright 2012 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+var ShadowDOMPolyfill = {};
+
+(function(scope) {
+  'use strict';
+
+  var wrapperTable = new SideTable();
+  var constructorTable = new SideTable();
+  var wrappers = Object.create(null);
+
+  function assert(b) {
+    if (!b)
+      throw new Error('Assertion failed');
+  };
+
+  function mixin(to, from) {
+    Object.getOwnPropertyNames(from).forEach(function(name) {
+      Object.defineProperty(to, name,
+                            Object.getOwnPropertyDescriptor(from, name));
+    });
+    return to;
+  };
+
+  function mixinStatics(to, from) {
+    Object.getOwnPropertyNames(from).forEach(function(name) {
+      switch (name) {
+        case 'arguments':
+        case 'caller':
+        case 'length':
+        case 'name':
+        case 'prototype':
+        case 'toString':
+          return;
+      }
+      Object.defineProperty(to, name,
+                            Object.getOwnPropertyDescriptor(from, name));
+    });
+    return to;
+  };
+
+  // Mozilla's old DOM bindings are bretty busted:
+  // https://bugzilla.mozilla.org/show_bug.cgi?id=855844
+  // Make sure they are create before we start modifying things.
+  Object.getOwnPropertyNames(window);
+
+  function getWrapperConstructor(node) {
+    var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
+    var wrapperConstructor = constructorTable.get(nativePrototype);
+    if (wrapperConstructor)
+      return wrapperConstructor;
+
+    var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
+
+    var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
+    registerInternal(nativePrototype, GeneratedWrapper, node);
+
+    return GeneratedWrapper;
+  }
+
+  function addForwardingProperties(nativePrototype, wrapperPrototype) {
+    installProperty(nativePrototype, wrapperPrototype, true);
+  }
+
+  function registerInstanceProperties(wrapperPrototype, instanceObject) {
+    installProperty(instanceObject, wrapperPrototype, false);
+  }
+
+  var isFirefox = /Firefox/.test(navigator.userAgent);
+
+  // This is used as a fallback when getting the descriptor fails in
+  // installProperty.
+  var dummyDescriptor = {
+    get: function() {},
+    set: function(v) {},
+    configurable: true,
+    enumerable: true
+  };
+
+  function installProperty(source, target, allowMethod) {
+    Object.getOwnPropertyNames(source).forEach(function(name) {
+      if (name in target)
+        return;
+
+      if (isFirefox) {
+        // Tickle Firefox's old bindings.
+        source.__lookupGetter__(name);
+      }
+      var descriptor;
+      try {
+        descriptor = Object.getOwnPropertyDescriptor(source, name);
+      } catch (ex) {
+        // JSC and V8 both use data properties instead accessors which can cause
+        // getting the property desciptor throw an exception.
+        // https://bugs.webkit.org/show_bug.cgi?id=49739
+        descriptor = dummyDescriptor;
+      }
+      var getter, setter;
+      if (allowMethod && typeof descriptor.value === 'function') {
+        target[name] = function() {
+          return this.impl[name].apply(this.impl, arguments);
+        };
+        return;
+      }
+
+      getter = function() {
+        return this.impl[name];
+      };
+
+      if (descriptor.writable || descriptor.set) {
+        setter = function(value) {
+          this.impl[name] = value;
+        };
+      }
+
+      Object.defineProperty(target, name, {
+        get: getter,
+        set: setter,
+        configurable: descriptor.configurable,
+        enumerable: descriptor.enumerable
+      });
+    });
+  }
+
+  /**
+   * @param {Function} nativeConstructor
+   * @param {Function} wrapperConstructor
+   * @param {string|Object=} opt_instance If present, this is used to extract
+   *     properties from an instance object. If this is a string
+   *     |document.createElement| is used to create an instance.
+   */
+  function register(nativeConstructor, wrapperConstructor, opt_instance) {
+    var nativePrototype = nativeConstructor.prototype;
+    registerInternal(nativePrototype, wrapperConstructor, opt_instance);
+    mixinStatics(wrapperConstructor, nativeConstructor);
+  }
+
+  function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {
+    var wrapperPrototype = wrapperConstructor.prototype;
+    assert(constructorTable.get(nativePrototype) === undefined);
+    constructorTable.set(nativePrototype, wrapperConstructor);
+    addForwardingProperties(nativePrototype, wrapperPrototype);
+    if (opt_instance)
+      registerInstanceProperties(wrapperPrototype, opt_instance);
+  }
+
+  function isWrapperFor(wrapperConstructor, nativeConstructor) {
+    return constructorTable.get(nativeConstructor.prototype) ===
+        wrapperConstructor;
+  }
+
+  /**
+   * Creates a generic wrapper constructor based on |object| and its
+   * constructor.
+   * Sometimes the constructor does not have an associated instance
+   * (CharacterData for example). In that case you can pass the constructor that
+   * you want to map the object to using |opt_nativeConstructor|.
+   * @param {Node} object
+   * @param {Function=} opt_nativeConstructor
+   * @return {Function} The generated constructor.
+   */
+  function registerObject(object) {
+    var nativePrototype = Object.getPrototypeOf(object);
+
+    var superWrapperConstructor = getWrapperConstructor(nativePrototype);
+    var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);
+    registerInternal(nativePrototype, GeneratedWrapper, object);
+
+    return GeneratedWrapper;
+  }
+
+  function createWrapperConstructor(superWrapperConstructor) {
+    function GeneratedWrapper(node) {
+      superWrapperConstructor.call(this, node);
+    }
+    GeneratedWrapper.prototype =
+        Object.create(superWrapperConstructor.prototype);
+    GeneratedWrapper.prototype.constructor = GeneratedWrapper;
+
+    return GeneratedWrapper;
+  }
+
+  var OriginalDOMImplementation = DOMImplementation;
+  var OriginalEvent = Event;
+  var OriginalNode = Node;
+  var OriginalWindow = Window;
+
+  function isWrapper(object) {
+    return object instanceof wrappers.EventTarget ||
+           object instanceof wrappers.Event ||
+           object instanceof wrappers.DOMImplementation;
+  }
+
+  function isNative(object) {
+    return object instanceof OriginalNode ||
+           object instanceof OriginalEvent ||
+           object instanceof OriginalWindow ||
+           object instanceof OriginalDOMImplementation;
+  }
+
+  /**
+   * Wraps a node in a WrapperNode. If there already exists a wrapper for the
+   * |node| that wrapper is returned instead.
+   * @param {Node} node
+   * @return {WrapperNode}
+   */
+  function wrap(impl) {
+    if (impl === null)
+      return null;
+
+    assert(isNative(impl));
+    var wrapper = wrapperTable.get(impl);
+    if (!wrapper) {
+      var wrapperConstructor = getWrapperConstructor(impl);
+      wrapper = new wrapperConstructor(impl);
+      wrapperTable.set(impl, wrapper);
+    }
+    return wrapper;
+  }
+
+  /**
+   * Unwraps a wrapper and returns the node it is wrapping.
+   * @param {WrapperNode} wrapper
+   * @return {Node}
+   */
+  function unwrap(wrapper) {
+    if (wrapper === null)
+      return null;
+    assert(isWrapper(wrapper));
+    return wrapper.impl;
+  }
+
+  /**
+   * Unwraps object if it is a wrapper.
+   * @param {Object} object
+   * @return {Object} The native implementation object.
+   */
+  function unwrapIfNeeded(object) {
+    return object && isWrapper(object) ? unwrap(object) : object;
+  }
+
+  /**
+   * Wraps object if it is not a wrapper.
+   * @param {Object} object
+   * @return {Object} The wrapper for object.
+   */
+  function wrapIfNeeded(object) {
+    return object && !isWrapper(object) ? wrap(object) : object;
+  }
+
+  /**
+   * Overrides the current wrapper (if any) for node.
+   * @param {Node} node
+   * @param {WrapperNode=} wrapper If left out the wrapper will be created as
+   *     needed next time someone wraps the node.
+   */
+  function rewrap(node, wrapper) {
+    if (wrapper === null)
+      return;
+    assert(isNative(node));
+    assert(wrapper === undefined || isWrapper(wrapper));
+    wrapperTable.set(node, wrapper);
+  }
+
+  function defineGetter(constructor, name, getter) {
+    Object.defineProperty(constructor.prototype, name, {
+      get: getter,
+      configurable: true,
+      enumerable: true
+    });
+  }
+
+  function defineWrapGetter(constructor, name) {
+    defineGetter(constructor, name, function() {
+      return wrap(this.impl[name]);
+    });
+  }
+
+  /**
+   * Forwards existing methods on the native object to the wrapper methods.
+   * This does not wrap any of the arguments or the return value since the
+   * wrapper implementation already takes care of that.
+   * @param {Array.<Function>} constructors
+   * @parem {Array.<string>} names
+   */
+  function forwardMethodsToWrapper(constructors, names) {
+    constructors.forEach(function(constructor) {
+      names.forEach(function(name) {
+        constructor.prototype[name] = function() {
+          var w = wrap(this);
+          return w[name].apply(w, arguments);
+        };
+      });
+    });
+  }
+
+  scope.assert = assert;
+  scope.defineGetter = defineGetter;
+  scope.defineWrapGetter = defineWrapGetter;
+  scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
+  scope.isWrapper = isWrapper;
+  scope.isWrapperFor = isWrapperFor;
+  scope.mixin = mixin;
+  scope.registerObject = registerObject;
+  scope.registerWrapper = register;
+  scope.rewrap = rewrap;
+  scope.unwrap = unwrap;
+  scope.unwrapIfNeeded = unwrapIfNeeded;
+  scope.wrap = wrap;
+  scope.wrapIfNeeded = wrapIfNeeded;
+  scope.wrappers = wrappers;
+
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrappers = scope.wrappers;
+
+  var wrappedFuns = new SideTable();
+  var listenersTable = new SideTable();
+  var handledEventsTable = new SideTable();
+  var targetTable = new SideTable();
+  var currentTargetTable = new SideTable();
+  var relatedTargetTable = new SideTable();
+  var eventPhaseTable = new SideTable();
+  var stopPropagationTable = new SideTable();
+  var stopImmediatePropagationTable = new SideTable();
+
+  function isShadowRoot(node) {
+    return node instanceof wrappers.ShadowRoot;
+  }
+
+  function isInsertionPoint(node) {
+    var localName = node.localName;
+    return localName === 'content' || localName === 'shadow';
+  }
+
+  function isShadowHost(node) {
+    return !!node.shadowRoot;
+  }
+
+  function getEventParent(node) {
+    var dv;
+    return node.parentNode || (dv = node.defaultView) && wrap(dv) || null;
+  }
+
+  // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-adjusted-parent
+  function calculateParents(node, context, ancestors) {
+    if (ancestors.length)
+      return ancestors.shift();
+
+    // 1.
+    if (isShadowRoot(node))
+      return node.insertionParent || scope.getHostForShadowRoot(node);
+
+    // 2.
+    var eventParents = scope.eventParentsTable.get(node);
+    if (eventParents) {
+      // Copy over the remaining event parents for next iteration.
+      for (var i = 1; i < eventParents.length; i++) {
+        ancestors[i - 1] = eventParents[i];
+      }
+      return eventParents[0];
+    }
+
+    // 3.
+    if (context && isInsertionPoint(node)) {
+      var parentNode = node.parentNode;
+      if (parentNode && isShadowHost(parentNode)) {
+        var trees = scope.getShadowTrees(parentNode);
+        var p = context.insertionParent;
+        for (var i = 0; i < trees.length; i++) {
+          if (trees[i].contains(p))
+            return p;
+        }
+      }
+    }
+
+    return getEventParent(node);
+  }
+
+  // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#event-retargeting
+  function retarget(node) {
+    var stack = [];  // 1.
+    var ancestor = node;  // 2.
+    var targets = [];
+    var ancestors = [];
+    while (ancestor) {  // 3.
+      var context = null;  // 3.2.
+      // TODO(arv): Change order of these. If the stack is empty we always end
+      // up pushing ancestor, no matter what.
+      if (isInsertionPoint(ancestor)) {  // 3.1.
+        context = topMostNotInsertionPoint(stack);  // 3.1.1.
+        var top = stack[stack.length - 1] || ancestor;  // 3.1.2.
+        stack.push(top);
+      } else if (!stack.length) {
+        stack.push(ancestor);  // 3.3.
+      }
+      var target = stack[stack.length - 1];  // 3.4.
+      targets.push({target: target, currentTarget: ancestor});  // 3.5.
+      if (isShadowRoot(ancestor))  // 3.6.
+        stack.pop();  // 3.6.1.
+
+      ancestor = calculateParents(ancestor, context, ancestors);  // 3.7.
+    }
+    return targets;
+  }
+
+  function topMostNotInsertionPoint(stack) {
+    for (var i = stack.length - 1; i >= 0; i--) {
+      if (!isInsertionPoint(stack[i]))
+        return stack[i];
+    }
+    return null;
+  }
+
+  // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-adjusted-related-target
+  function adjustRelatedTarget(target, related) {
+    var ancestors = [];
+    while (target) {  // 3.
+      var stack = [];  // 3.1.
+      var ancestor = related;  // 3.2.
+      var last = undefined;  // 3.3. Needs to be reset every iteration.
+      while (ancestor) {
+        var context = null;
+        if (!stack.length) {
+          stack.push(ancestor);
+        } else {
+          if (isInsertionPoint(ancestor)) {  // 3.4.3.
+            context = topMostNotInsertionPoint(stack);
+            // isDistributed is more general than checking whether last is
+            // assigned into ancestor.
+            if (isDistributed(last)) {  // 3.4.3.2.
+              var head = stack[stack.length - 1];
+              stack.push(head);
+            }
+          }
+        }
+
+        if (inSameTree(ancestor, target))  // 3.4.4.
+          return stack[stack.length - 1];
+
+        if (isShadowRoot(ancestor))  // 3.4.5.
+          stack.pop();
+
+        last = ancestor;  // 3.4.6.
+        ancestor = calculateParents(ancestor, context, ancestors);  // 3.4.7.
+      }
+      if (isShadowRoot(target))  // 3.5.
+        target = scope.getHostForShadowRoot(target);
+      else
+        target = target.parentNode;  // 3.6.
+    }
+  }
+
+  function isDistributed(node) {
+    return node.insertionParent;
+  }
+
+  function rootOfNode(node) {
+    var p;
+    while (p = node.parentNode) {
+      node = p;
+    }
+    return node;
+  }
+
+  function inSameTree(a, b) {
+    return rootOfNode(a) === rootOfNode(b);
+  }
+
+  function isMutationEvent(type) {
+    switch (type) {
+      case 'DOMAttrModified':
+      case 'DOMAttributeNameChanged':
+      case 'DOMCharacterDataModified':
+      case 'DOMElementNameChanged':
+      case 'DOMNodeInserted':
+      case 'DOMNodeInsertedIntoDocument':
+      case 'DOMNodeRemoved':
+      case 'DOMNodeRemovedFromDocument':
+      case 'DOMSubtreeModified':
+        return true;
+    }
+    return false;
+  }
+
+  function dispatchOriginalEvent(originalEvent) {
+    // Make sure this event is only dispatched once.
+    if (handledEventsTable.get(originalEvent))
+      return;
+    handledEventsTable.set(originalEvent, true);
+
+    // Don't do rendering if this is a mutation event since rendering might
+    // mutate the DOM which would fire more events and we would most likely
+    // just iloop.
+    if (!isMutationEvent(originalEvent.type))
+      scope.renderAllPending();
+
+    var target = wrap(originalEvent.target);
+    var event = wrap(originalEvent);
+    return dispatchEvent(event, target);
+  }
+
+  function dispatchEvent(event, originalWrapperTarget) {
+    var eventPath = retarget(originalWrapperTarget);
+
+    // For window load events the load event is dispatched at the window but
+    // the target is set to the document.
+    //
+    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end
+    //
+    // TODO(arv): Find a loess hacky way to do this.
+    if (event.type === 'load' &&
+        eventPath.length === 2 &&
+        eventPath[0].target instanceof wrappers.Document) {
+      eventPath.shift();
+    }
+
+    if (dispatchCapturing(event, eventPath)) {
+      if (dispatchAtTarget(event, eventPath)) {
+        dispatchBubbling(event, eventPath);
+      }
+    }
+
+    eventPhaseTable.set(event, Event.NONE);
+    currentTargetTable.set(event, null);
+
+    return event.defaultPrevented;
+  }
+
+  function dispatchCapturing(event, eventPath) {
+    var phase;
+
+    for (var i = eventPath.length - 1; i > 0; i--) {
+      var target = eventPath[i].target;
+      var currentTarget = eventPath[i].currentTarget;
+      if (target === currentTarget)
+        continue;
+
+      phase = Event.CAPTURING_PHASE;
+      if (!invoke(eventPath[i], event, phase))
+        return false;
+    }
+
+    return true;
+  }
+
+  function dispatchAtTarget(event, eventPath) {
+    var phase = Event.AT_TARGET;
+    return invoke(eventPath[0], event, phase);
+  }
+
+  function dispatchBubbling(event, eventPath) {
+    var bubbles = event.bubbles;
+    var phase;
+
+    for (var i = 1; i < eventPath.length; i++) {
+      var target = eventPath[i].target;
+      var currentTarget = eventPath[i].currentTarget;
+      if (target === currentTarget)
+        phase = Event.AT_TARGET;
+      else if (bubbles && !stopImmediatePropagationTable.get(event))
+        phase = Event.BUBBLING_PHASE;
+      else
+        continue;
+
+      if (!invoke(eventPath[i], event, phase))
+        return;
+    }
+  }
+
+  function invoke(tuple, event, phase) {
+    var target = tuple.target;
+    var currentTarget = tuple.currentTarget;
+
+    var listeners = listenersTable.get(currentTarget);
+    if (!listeners)
+      return true;
+
+    if ('relatedTarget' in event) {
+      var originalEvent = unwrap(event);
+      var relatedTarget = wrap(originalEvent.relatedTarget);
+
+      var adjusted = adjustRelatedTarget(currentTarget, relatedTarget);
+      if (adjusted === target)
+        return true;
+
+      relatedTargetTable.set(event, adjusted);
+    }
+
+    eventPhaseTable.set(event, phase);
+    var type = event.type;
+
+    var anyRemoved = false;
+    targetTable.set(event, target);
+    currentTargetTable.set(event, currentTarget);
+
+    for (var i = 0; i < listeners.length; i++) {
+      var listener = listeners[i];
+      if (listener.removed) {
+        anyRemoved = true;
+        continue;
+      }
+
+      if (listener.type !== type ||
+          !listener.capture && phase === Event.CAPTURING_PHASE ||
+          listener.capture && phase === Event.BUBBLING_PHASE) {
+        continue;
+      }
+
+      try {
+        if (typeof listener.handler === 'function')
+          listener.handler.call(currentTarget, event);
+        else
+          listener.handler.handleEvent(event);
+
+        if (stopImmediatePropagationTable.get(event))
+          return false;
+
+      } catch (ex) {
+        if (window.onerror)
+          window.onerror(ex.message);
+        else
+          console.error(ex);
+      }
+    }
+
+    if (anyRemoved) {
+      var copy = listeners.slice();
+      listeners.length = 0;
+      for (var i = 0; i < copy.length; i++) {
+        if (!copy[i].removed)
+          listeners.push(copy[i]);
+      }
+    }
+
+    return !stopPropagationTable.get(event);
+  }
+
+  function Listener(type, handler, capture) {
+    this.type = type;
+    this.handler = handler;
+    this.capture = Boolean(capture);
+  }
+  Listener.prototype = {
+    equals: function(that) {
+      return this.handler === that.handler && this.type === that.type &&
+          this.capture === that.capture;
+    },
+    get removed() {
+      return this.handler === null;
+    },
+    remove: function() {
+      this.handler = null;
+    }
+  };
+
+  var OriginalEvent = window.Event;
+
+  /**
+   * Creates a new Event wrapper or wraps an existin native Event object.
+   * @param {string|Event} type
+   * @param {Object=} options
+   * @constructor
+   */
+  function Event(type, options) {
+    if (type instanceof OriginalEvent)
+      this.impl = type;
+    else
+      return wrap(constructEvent(OriginalEvent, 'Event', type, options));
+  }
+  Event.prototype = {
+    get target() {
+      return targetTable.get(this);
+    },
+    get currentTarget() {
+      return currentTargetTable.get(this);
+    },
+    get eventPhase() {
+      return eventPhaseTable.get(this);
+    },
+    stopPropagation: function() {
+      stopPropagationTable.set(this, true);
+    },
+    stopImmediatePropagation: function() {
+      stopPropagationTable.set(this, true);
+      stopImmediatePropagationTable.set(this, true);
+    }
+  };
+  registerWrapper(OriginalEvent, Event, document.createEvent('Event'));
+
+  function unwrapOptions(options) {
+    if (!options || !options.relatedTarget)
+      return options;
+    return Object.create(options, {
+      relatedTarget: {value: unwrap(options.relatedTarget)}
+    });
+  }
+
+  function registerGenericEvent(name, SuperEvent, prototype) {
+    var OriginalEvent = window[name];
+    var GenericEvent = function(type, options) {
+      if (type instanceof OriginalEvent)
+        this.impl = type;
+      else
+        return wrap(constructEvent(OriginalEvent, name, type, options));
+    };
+    GenericEvent.prototype = Object.create(SuperEvent.prototype);
+    if (prototype)
+      mixin(GenericEvent.prototype, prototype);
+    // Firefox does not support FocusEvent
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=855741
+    if (OriginalEvent)
+      registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));
+    return GenericEvent;
+  }
+
+  var UIEvent = registerGenericEvent('UIEvent', Event);
+  var CustomEvent = registerGenericEvent('CustomEvent', Event);
+
+  var relatedTargetProto = {
+    get relatedTarget() {
+      return relatedTargetTable.get(this) || wrap(unwrap(this).relatedTarget);
+    }
+  };
+
+  function getInitFunction(name, relatedTargetIndex) {
+    return function() {
+      arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);
+      var impl = unwrap(this);
+      impl[name].apply(impl, arguments);
+    };
+  }
+
+  var mouseEventProto = mixin({
+    initMouseEvent: getInitFunction('initMouseEvent', 14)
+  }, relatedTargetProto);
+
+  var focusEventProto = mixin({
+    initFocusEvent: getInitFunction('initFocusEvent', 5)
+  }, relatedTargetProto);
+
+  var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);
+  var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);
+
+  var MutationEvent = registerGenericEvent('MutationEvent', Event, {
+    initMutationEvent: getInitFunction('initMutationEvent', 3),
+    get relatedNode() {
+      return wrap(this.impl.relatedNode);
+    },
+  });
+
+  // In case the browser does not support event constructors we polyfill that
+  // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to
+  // `initFooEvent` are derived from the registered default event init dict.
+  var defaultInitDicts = Object.create(null);
+
+  var supportsEventConstructors = (function() {
+    try {
+      new window.MouseEvent('click');
+    } catch (ex) {
+      return false;
+    }
+    return true;
+  })();
+
+  /**
+   * Constructs a new native event.
+   */
+  function constructEvent(OriginalEvent, name, type, options) {
+    if (supportsEventConstructors)
+      return new OriginalEvent(type, unwrapOptions(options));
+
+    // Create the arguments from the default dictionary.
+    var event = unwrap(document.createEvent(name));
+    var defaultDict = defaultInitDicts[name];
+    var args = [type];
+    Object.keys(defaultDict).forEach(function(key) {
+      var v = options != null && key in options ?
+          options[key] : defaultDict[key];
+      if (key === 'relatedTarget')
+        v = unwrap(v);
+      args.push(v);
+    });
+    event['init' + name].apply(event, args);
+    return event;
+  }
+
+  if (!supportsEventConstructors) {
+    var configureEventConstructor = function(name, initDict, superName) {
+      if (superName) {
+        var superDict = defaultInitDicts[superName];
+        initDict = mixin(mixin({}, superDict), initDict);
+      }
+
+      defaultInitDicts[name] = initDict;
+    };
+
+    // The order of the default event init dictionary keys is important, the
+    // arguments to initFooEvent is derived from that.
+    configureEventConstructor('Event', {bubbles: false, cancelable: false});
+    configureEventConstructor('CustomEvent', {detail: null}, 'Event');
+    configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');
+    configureEventConstructor('MouseEvent', {
+      screenX: 0,
+      screenY: 0,
+      clientX: 0,
+      clientY: 0,
+      ctrlKey: false,
+      altKey: false,
+      shiftKey: false,
+      metaKey: false,
+      button: 0,
+      relatedTarget: null
+    }, 'UIEvent');
+    configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');
+  }
+
+  function isValidListener(fun) {
+    if (typeof fun === 'function')
+      return true;
+    return fun && fun.handleEvent;
+  }
+
+  var OriginalEventTarget = window.EventTarget;
+
+  /**
+   * This represents a wrapper for an EventTarget.
+   * @param {!EventTarget} impl The original event target.
+   * @constructor
+   */
+  function EventTarget(impl) {
+    this.impl = impl;
+  }
+
+  // Node and Window have different internal type checks in WebKit so we cannot
+  // use the same method as the original function.
+  var methodNames = [
+    'addEventListener',
+    'removeEventListener',
+    'dispatchEvent'
+  ];
+
+  [Element, Window, Document].forEach(function(constructor) {
+    var p = constructor.prototype;
+    methodNames.forEach(function(name) {
+      Object.defineProperty(p, name + '_', {value: p[name]});
+    });
+  });
+
+  function getTargetToListenAt(wrapper) {
+    if (wrapper instanceof wrappers.ShadowRoot)
+      wrapper = scope.getHostForShadowRoot(wrapper);
+    return unwrap(wrapper);
+  }
+
+  EventTarget.prototype = {
+    addEventListener: function(type, fun, capture) {
+      if (!isValidListener(fun))
+        return;
+
+      var listener = new Listener(type, fun, capture);
+      var listeners = listenersTable.get(this);
+      if (!listeners) {
+        listeners = [];
+        listenersTable.set(this, listeners);
+      } else {
+        // Might have a duplicate.
+        for (var i = 0; i < listeners.length; i++) {
+          if (listener.equals(listeners[i]))
+            return;
+        }
+      }
+
+      listeners.push(listener);
+
+      var target = getTargetToListenAt(this);
+      target.addEventListener_(type, dispatchOriginalEvent, true);
+    },
+    removeEventListener: function(type, fun, capture) {
+      capture = Boolean(capture);
+      var listeners = listenersTable.get(this);
+      if (!listeners)
+        return;
+      var count = 0, found = false;
+      for (var i = 0; i < listeners.length; i++) {
+        if (listeners[i].type === type && listeners[i].capture === capture) {
+          count++;
+          if (listeners[i].handler === fun) {
+            found = true;
+            listeners[i].remove();
+          }
+        }
+      }
+
+      if (found && count === 1) {
+        var target = getTargetToListenAt(this);
+        target.removeEventListener_(type, dispatchOriginalEvent, true);
+      }
+    },
+    dispatchEvent: function(event) {
+      scope.renderAllPending();
+      var target = getTargetToListenAt(this);
+      return target.dispatchEvent_(unwrap(event));
+    }
+  };
+
+  if (OriginalEventTarget)
+    registerWrapper(OriginalEventTarget, EventTarget);
+
+  function wrapEventTargetMethods(constructors) {
+    forwardMethodsToWrapper(constructors, methodNames);
+  }
+
+
+  var originalElementFromPoint = document.elementFromPoint;
+
+  function elementFromPoint(self, document, x, y) {
+    scope.renderAllPending();
+
+    var element = wrap(originalElementFromPoint.call(document.impl, x, y));
+    var targets = retarget(element, this)
+    for (var i = 0; i < targets.length; i++) {
+      var target = targets[i];
+      if (target.currentTarget === self)
+        return target.target;
+    }
+    return null;
+  }
+
+  scope.adjustRelatedTarget = adjustRelatedTarget;
+  scope.elementFromPoint = elementFromPoint;
+  scope.wrapEventTargetMethods = wrapEventTargetMethods;
+  scope.wrappers.CustomEvent = CustomEvent;
+  scope.wrappers.Event = Event;
+  scope.wrappers.EventTarget = EventTarget;
+  scope.wrappers.FocusEvent = FocusEvent;
+  scope.wrappers.MouseEvent = MouseEvent;
+  scope.wrappers.MutationEvent = MutationEvent;
+  scope.wrappers.UIEvent = UIEvent;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2012 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var wrap = scope.wrap;
+
+  function nonEnum(obj, prop) {
+    Object.defineProperty(obj, prop, {enumerable: false});
+  }
+
+  function NodeList() {
+    this.length = 0;
+    nonEnum(this, 'length');
+  }
+  NodeList.prototype = {
+    item: function(index) {
+      return this[index];
+    }
+  };
+  nonEnum(NodeList.prototype, 'item');
+
+  function wrapNodeList(list) {
+    if (list == null)
+      return list;
+    var wrapperList = new NodeList();
+    for (var i = 0, length = list.length; i < length; i++) {
+      wrapperList[i] = wrap(list[i]);
+    }
+    wrapperList.length = length;
+    return wrapperList;
+  }
+
+  function addWrapNodeListMethod(wrapperConstructor, name) {
+    wrapperConstructor.prototype[name] = function() {
+      return wrapNodeList(this.impl[name].apply(this.impl, arguments));
+    };
+  }
+
+  scope.wrappers.NodeList = NodeList;
+  scope.addWrapNodeListMethod = addWrapNodeListMethod;
+  scope.wrapNodeList = wrapNodeList;
+
+})(this.ShadowDOMPolyfill);
+// Copyright 2012 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var EventTarget = scope.wrappers.EventTarget;
+  var NodeList = scope.wrappers.NodeList;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var assert = scope.assert;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+
+  function assertIsNodeWrapper(node) {
+    assert(node instanceof Node);
+  }
+
+  /**
+   * Collects nodes from a DocumentFragment or a Node for removal followed
+   * by an insertion.
+   *
+   * This updates the internal pointers for node, previousNode and nextNode.
+   */
+  function collectNodes(node, parentNode, previousNode, nextNode) {
+    if (node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
+      if (node.parentNode)
+        node.parentNode.removeChild(node);
+      node.parentNode_ = parentNode;
+      node.previousSibling_ = previousNode;
+      node.nextSibling_ = nextNode;
+      if (previousNode)
+        previousNode.nextSibling_ = node;
+      if (nextNode)
+        nextNode.previousSibling_ = node;
+      return [node];
+    }
+
+    var nodes = [];
+    var firstChild;
+    while (firstChild = node.firstChild) {
+      node.removeChild(firstChild);
+      nodes.push(firstChild);
+      firstChild.parentNode_ = parentNode;
+    }
+
+    for (var i = 0; i < nodes.length; i++) {
+      nodes[i].previousSibling_ = nodes[i - 1] || previousNode;
+      nodes[i].nextSibling_ = nodes[i + 1] || nextNode;
+    }
+
+    if (previousNode)
+      previousNode.nextSibling_ = nodes[0];
+    if (nextNode)
+      nextNode.previousSibling_ = nodes[nodes.length - 1];
+
+    return nodes;
+  }
+
+  function unwrapNodesForInsertion(nodes) {
+    if (nodes.length === 1)
+      return unwrap(nodes[0]);
+
+    var df = unwrap(document.createDocumentFragment());
+    for (var i = 0; i < nodes.length; i++) {
+      df.appendChild(unwrap(nodes[i]));
+    }
+    return df;
+  }
+
+  function removeAllChildNodes(wrapper) {
+    var childWrapper = wrapper.firstChild;
+    while (childWrapper) {
+      assert(childWrapper.parentNode === wrapper);
+      var nextSibling = childWrapper.nextSibling;
+      var childNode = unwrap(childWrapper);
+      var parentNode = childNode.parentNode;
+      if (parentNode)
+        originalRemoveChild.call(parentNode, childNode);
+      childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;
+      childWrapper = nextSibling;
+    }
+    wrapper.firstChild_ = wrapper.lastChild_ = null;
+  }
+
+  var OriginalNode = window.Node;
+
+  /**
+   * This represents a wrapper of a native DOM node.
+   * @param {!Node} original The original DOM node, aka, the visual DOM node.
+   * @constructor
+   * @extends {EventTarget}
+   */
+  function Node(original) {
+    assert(original instanceof OriginalNode);
+
+    EventTarget.call(this, original);
+
+    // These properties are used to override the visual references with the
+    // logical ones. If the value is undefined it means that the logical is the
+    // same as the visual.
+
+    /**
+     * @type {Node|undefined}
+     * @private
+     */
+    this.parentNode_ = undefined;
+
+    /**
+     * @type {Node|undefined}
+     * @private
+     */
+    this.firstChild_ = undefined;
+
+    /**
+     * @type {Node|undefined}
+     * @private
+     */
+    this.lastChild_ = undefined;
+
+    /**
+     * @type {Node|undefined}
+     * @private
+     */
+    this.nextSibling_ = undefined;
+
+    /**
+     * @type {Node|undefined}
+     * @private
+     */
+    this.previousSibling_ = undefined;
+  };
+
+  var originalAppendChild = OriginalNode.prototype.appendChild;
+  var originalInsertBefore = OriginalNode.prototype.insertBefore;
+  var originalReplaceChild = OriginalNode.prototype.replaceChild;
+  var originalRemoveChild = OriginalNode.prototype.removeChild;
+  var originalCompareDocumentPosition =
+      OriginalNode.prototype.compareDocumentPosition;
+
+  Node.prototype = Object.create(EventTarget.prototype);
+  mixin(Node.prototype, {
+    appendChild: function(childWrapper) {
+      assertIsNodeWrapper(childWrapper);
+
+      this.invalidateShadowRenderer();
+
+      var previousNode = this.lastChild;
+      var nextNode = null;
+      var nodes = collectNodes(childWrapper, this,
+                               previousNode, nextNode);
+
+      this.lastChild_ = nodes[nodes.length - 1];
+      if (!previousNode)
+        this.firstChild_ = nodes[0];
+
+      // TODO(arv): It is unclear if we need to update the visual DOM here.
+      // A better aproach might be to make sure we only get here for nodes that
+      // are related to a shadow host and then invalidate that and re-render
+      // the host (on reflow?).
+      originalAppendChild.call(this.impl, unwrapNodesForInsertion(nodes));
+
+      return childWrapper;
+    },
+
+    insertBefore: function(childWrapper, refWrapper) {
+      // TODO(arv): Unify with appendChild
+      if (!refWrapper)
+        return this.appendChild(childWrapper);
+
+      assertIsNodeWrapper(childWrapper);
+      assertIsNodeWrapper(refWrapper);
+      assert(refWrapper.parentNode === this);
+
+      this.invalidateShadowRenderer();
+
+      var previousNode = refWrapper.previousSibling;
+      var nextNode = refWrapper;
+      var nodes = collectNodes(childWrapper, this,
+                               previousNode, nextNode);
+
+
+      if (this.firstChild === refWrapper)
+        this.firstChild_ = nodes[0];
+
+      // insertBefore refWrapper no matter what the parent is?
+      var refNode = unwrap(refWrapper);
+      var parentNode = refNode.parentNode;
+      if (parentNode) {
+        originalInsertBefore.call(
+            parentNode,
+            unwrapNodesForInsertion(nodes),
+            refNode);
+      }
+
+      return childWrapper;
+    },
+
+    removeChild: function(childWrapper) {
+      assertIsNodeWrapper(childWrapper);
+      if (childWrapper.parentNode !== this) {
+        // TODO(arv): DOMException
+        throw new Error('NotFoundError');
+      }
+
+      this.invalidateShadowRenderer();
+
+      // We need to remove the real node from the DOM before updating the
+      // pointers. This is so that that mutation event is dispatched before
+      // the pointers have changed.
+      var thisFirstChild = this.firstChild;
+      var thisLastChild = this.lastChild;
+      var childWrapperNextSibling = childWrapper.nextSibling;
+      var childWrapperPreviousSibling = childWrapper.previousSibling;
+
+      var childNode = unwrap(childWrapper);
+      var parentNode = childNode.parentNode;
+      if (parentNode)
+        originalRemoveChild.call(parentNode, childNode);
+
+      if (thisFirstChild === childWrapper)
+        this.firstChild_ = childWrapperNextSibling;
+      if (thisLastChild === childWrapper)
+        this.lastChild_ = childWrapperPreviousSibling;
+      if (childWrapperPreviousSibling)
+        childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;
+      if (childWrapperNextSibling)
+        childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;
+
+      childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;
+
+      return childWrapper;
+    },
+
+    replaceChild: function(newChildWrapper, oldChildWrapper) {
+      assertIsNodeWrapper(newChildWrapper);
+      assertIsNodeWrapper(oldChildWrapper);
+
+      if (oldChildWrapper.parentNode !== this) {
+        // TODO(arv): DOMException
+        throw new Error('NotFoundError');
+      }
+
+      this.invalidateShadowRenderer();
+
+      var previousNode = oldChildWrapper.previousSibling;
+      var nextNode = oldChildWrapper.nextSibling;
+      if (nextNode === newChildWrapper)
+        nextNode = newChildWrapper.nextSibling;
+      var nodes = collectNodes(newChildWrapper, this,
+                               previousNode, nextNode);
+
+      if (this.firstChild === oldChildWrapper)
+        this.firstChild_ = nodes[0];
+      if (this.lastChild === oldChildWrapper)
+        this.lastChild_ = nodes[nodes.length - 1];
+
+      oldChildWrapper.previousSibling_ = null;
+      oldChildWrapper.nextSibling_ = null;
+      oldChildWrapper.parentNode_ = null;
+
+      // replaceChild no matter what the parent is?
+      var oldChildNode = unwrap(oldChildWrapper);
+      if (oldChildNode.parentNode) {
+        originalReplaceChild.call(
+            oldChildNode.parentNode,
+            unwrapNodesForInsertion(nodes),
+            oldChildNode);
+      }
+
+      return oldChildWrapper;
+    },
+
+    hasChildNodes: function() {
+      return this.firstChild === null;
+    },
+
+    /** @type {Node} */
+    get parentNode() {
+      // If the parentNode has not been overridden, use the original parentNode.
+      return this.parentNode_ !== undefined ?
+          this.parentNode_ : wrap(this.impl.parentNode);
+    },
+
+    /** @type {Node} */
+    get firstChild() {
+      return this.firstChild_ !== undefined ?
+          this.firstChild_ : wrap(this.impl.firstChild);
+    },
+
+    /** @type {Node} */
+    get lastChild() {
+      return this.lastChild_ !== undefined ?
+          this.lastChild_ : wrap(this.impl.lastChild);
+    },
+
+    /** @type {Node} */
+    get nextSibling() {
+      return this.nextSibling_ !== undefined ?
+          this.nextSibling_ : wrap(this.impl.nextSibling);
+    },
+
+    /** @type {Node} */
+    get previousSibling() {
+      return this.previousSibling_ !== undefined ?
+          this.previousSibling_ : wrap(this.impl.previousSibling);
+    },
+
+    get parentElement() {
+      var p = this.parentNode;
+      while (p && p.nodeType !== Node.ELEMENT_NODE) {
+        p = p.parentNode;
+      }
+      return p;
+    },
+
+    get textContent() {
+      // TODO(arv): This should fallback to this.impl.textContent if there
+      // are no shadow trees below or above the context node.
+      var s = '';
+      for (var child = this.firstChild; child; child = child.nextSibling) {
+        s += child.textContent;
+      }
+      return s;
+    },
+    set textContent(textContent) {
+      removeAllChildNodes(this);
+      this.invalidateShadowRenderer();
+      if (textContent !== '') {
+        var textNode = this.impl.ownerDocument.createTextNode(textContent);
+        this.appendChild(textNode);
+      }
+    },
+
+    get childNodes() {
+      var wrapperList = new NodeList();
+      var i = 0;
+      for (var child = this.firstChild; child; child = child.nextSibling) {
+        wrapperList[i++] = child;
+      }
+      wrapperList.length = i;
+      return wrapperList;
+    },
+
+    cloneNode: function(deep) {
+      if (!this.invalidateShadowRenderer())
+        return wrap(this.impl.cloneNode(deep));
+
+      var clone = wrap(this.impl.cloneNode(false));
+      if (deep) {
+        for (var child = this.firstChild; child; child = child.nextSibling) {
+          clone.appendChild(child.cloneNode(true));
+        }
+      }
+      // TODO(arv): Some HTML elements also clone other data like value.
+      return clone;
+    },
+
+    // insertionParent is added in ShadowRender.js
+
+    contains: function(child) {
+      if (!child)
+        return false;
+
+      // TODO(arv): Optimize using ownerDocument etc.
+      if (child === this)
+        return true;
+      var parentNode = child.parentNode;
+      if (!parentNode)
+        return false;
+      return this.contains(parentNode);
+    },
+
+    compareDocumentPosition: function(otherNode) {
+      // This only wraps, it therefore only operates on the composed DOM and not
+      // the logical DOM.
+      return originalCompareDocumentPosition.call(this.impl, unwrap(otherNode));
+    }
+  });
+
+  defineWrapGetter(Node, 'ownerDocument');
+
+  // We use a DocumentFragment as a base and then delete the properties of
+  // DocumentFragment.prototype from the wrapper Node. Since delete makes
+  // objects slow in some JS engines we recreate the prototype object.
+  registerWrapper(OriginalNode, Node, document.createDocumentFragment());
+  delete Node.prototype.querySelector;
+  delete Node.prototype.querySelectorAll;
+  Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);
+
+  scope.wrappers.Node = Node;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  function findOne(node, selector) {
+    var m, el = node.firstElementChild;
+    while (el) {
+      if (el.matches(selector))
+        return el;
+      m = findOne(el, selector);
+      if (m)
+        return m;
+      el = el.nextElementSibling;
+    }
+    return null;
+  }
+
+  function findAll(node, selector, results) {
+    var el = node.firstElementChild;
+    while (el) {
+      if (el.matches(selector))
+        results[results.length++] = el;
+      findAll(el, selector, results);
+      el = el.nextElementSibling;
+    }
+    return results;
+  }
+
+  // find and findAll will only match Simple Selectors,
+  // Structural Pseudo Classes are not guarenteed to be correct
+  // http://www.w3.org/TR/css3-selectors/#simple-selectors
+
+  var SelectorsInterface = {
+    querySelector: function(selector) {
+      return findOne(this, selector);
+    },
+    querySelectorAll: function(selector) {
+      return findAll(this, selector, new NodeList())
+    }
+  };
+
+  var GetElementsByInterface = {
+    getElementsByTagName: function(tagName) {
+      // TODO(arv): Check tagName?
+      return this.querySelectorAll(tagName);
+    },
+    getElementsByClassName: function(className) {
+      // TODO(arv): Check className?
+      return this.querySelectorAll('.' + className);
+    },
+    getElementsByTagNameNS: function(ns, tagName) {
+      if (ns === '*')
+        return this.getElementsByTagName(tagName);
+
+      // TODO(arv): Check tagName?
+      var result = new NodeList;
+      var els = this.getElementsByTagName(tagName);
+      for (var i = 0, j = 0; i < els.length; i++) {
+        if (els[i].namespaceURI === ns)
+          result[j++] = els[i];
+      }
+      result.length = j;
+      return result;
+    }
+  };
+
+  scope.GetElementsByInterface = GetElementsByInterface;
+  scope.SelectorsInterface = SelectorsInterface;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var NodeList = scope.wrappers.NodeList;
+
+  function forwardElement(node) {
+    while (node && node.nodeType !== Node.ELEMENT_NODE) {
+      node = node.nextSibling;
+    }
+    return node;
+  }
+
+  function backwardsElement(node) {
+    while (node && node.nodeType !== Node.ELEMENT_NODE) {
+      node = node.previousSibling;
+    }
+    return node;
+  }
+
+  var ParentNodeInterface = {
+    get firstElementChild() {
+      return forwardElement(this.firstChild);
+    },
+
+    get lastElementChild() {
+      return backwardsElement(this.lastChild);
+    },
+
+    get childElementCount() {
+      var count = 0;
+      for (var child = this.firstElementChild;
+           child;
+           child = child.nextElementSibling) {
+        count++;
+      }
+      return count;
+    },
+
+    get children() {
+      var wrapperList = new NodeList();
+      var i = 0;
+      for (var child = this.firstElementChild;
+           child;
+           child = child.nextElementSibling) {
+        wrapperList[i++] = child;
+      }
+      wrapperList.length = i;
+      return wrapperList;
+    }
+  };
+
+  var ChildNodeInterface = {
+    get nextElementSibling() {
+      return forwardElement(this.nextSibling);
+    },
+
+    get previousElementSibling() {
+      return backwardsElement(this.nextSibling);
+    }
+  };
+
+  scope.ChildNodeInterface = ChildNodeInterface;
+  scope.ParentNodeInterface = ParentNodeInterface;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var ChildNodeInterface = scope.ChildNodeInterface;
+  var Node = scope.wrappers.Node;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+
+  var OriginalCharacterData = window.CharacterData;
+
+  function CharacterData(node) {
+    Node.call(this, node);
+  }
+  CharacterData.prototype = Object.create(Node.prototype);
+  mixin(CharacterData.prototype, {
+    get textContent() {
+      return this.data;
+    },
+    set textContent(value) {
+      this.data = value;
+    }
+  });
+
+  mixin(CharacterData.prototype, ChildNodeInterface);
+
+  registerWrapper(OriginalCharacterData, CharacterData,
+                  document.createTextNode(''));
+
+  scope.wrappers.CharacterData = CharacterData;
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var ChildNodeInterface = scope.ChildNodeInterface;
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var Node = scope.wrappers.Node;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var addWrapNodeListMethod = scope.addWrapNodeListMethod;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var wrappers = scope.wrappers;
+
+  var shadowRootTable = new SideTable();
+  var OriginalElement = window.Element;
+
+  var originalMatches =
+      OriginalElement.prototype.matches ||
+      OriginalElement.prototype.mozMatchesSelector ||
+      OriginalElement.prototype.msMatchesSelector ||
+      OriginalElement.prototype.webkitMatchesSelector;
+
+  function Element(node) {
+    Node.call(this, node);
+  }
+  Element.prototype = Object.create(Node.prototype);
+  mixin(Element.prototype, {
+    createShadowRoot: function() {
+      var newShadowRoot = new wrappers.ShadowRoot(this);
+      shadowRootTable.set(this, newShadowRoot);
+
+      scope.getRendererForHost(this);
+
+      this.invalidateShadowRenderer(true);
+
+      return newShadowRoot;
+    },
+
+    get shadowRoot() {
+      return shadowRootTable.get(this) || null;
+    },
+
+    setAttribute: function(name, value) {
+      this.impl.setAttribute(name, value);
+      // This is a bit agressive. We need to invalidate if it affects
+      // the rendering content[select] or if it effects the value of a content
+      // select.
+      this.invalidateShadowRenderer();
+    },
+
+    matches: function(selector) {
+      return originalMatches.call(this.impl, selector);
+    }
+  });
+
+  mixin(Element.prototype, ChildNodeInterface);
+  mixin(Element.prototype, GetElementsByInterface);
+  mixin(Element.prototype, ParentNodeInterface);
+  mixin(Element.prototype, SelectorsInterface);
+
+  registerWrapper(OriginalElement, Element);
+
+  scope.wrappers.Element = Element;
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var Element = scope.wrappers.Element;
+  var defineGetter = scope.defineGetter;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+
+  /////////////////////////////////////////////////////////////////////////////
+  // innerHTML and outerHTML
+
+  var escapeRegExp = /&|<|"/g;
+
+  function escapeReplace(c) {
+    switch (c) {
+      case '&':
+        return '&amp;';
+      case '<':
+        return '&lt;';
+      case '"':
+        return '&quot;'
+    }
+  }
+
+  function escape(s) {
+    return s.replace(escapeRegExp, escapeReplace);
+  }
+
+  // http://www.whatwg.org/specs/web-apps/current-work/#void-elements
+  var voidElements = {
+    'area': true,
+    'base': true,
+    'br': true,
+    'col': true,
+    'command': true,
+    'embed': true,
+    'hr': true,
+    'img': true,
+    'input': true,
+    'keygen': true,
+    'link': true,
+    'meta': true,
+    'param': true,
+    'source': true,
+    'track': true,
+    'wbr': true
+  };
+
+  function getOuterHTML(node) {
+    switch (node.nodeType) {
+      case Node.ELEMENT_NODE:
+        var tagName = node.tagName.toLowerCase();
+        var s = '<' + tagName;
+        var attrs = node.attributes;
+        for (var i = 0, attr; attr = attrs[i]; i++) {
+          s += ' ' + attr.name + '="' + escape(attr.value) + '"';
+        }
+        s += '>';
+        if (voidElements[tagName])
+          return s;
+
+        return s + getInnerHTML(node) + '</' + tagName + '>';
+
+      case Node.TEXT_NODE:
+        return escape(node.nodeValue);
+
+      case Node.COMMENT_NODE:
+        return '<!--' + escape(node.nodeValue) + '-->';
+      default:
+        console.error(node);
+        throw new Error('not implemented');
+    }
+  }
+
+  function getInnerHTML(node) {
+    var s = '';
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      s += getOuterHTML(child);
+    }
+    return s;
+  }
+
+  function setInnerHTML(node, value, opt_tagName) {
+    var tagName = opt_tagName || 'div';
+    node.textContent = '';
+    var tempElement =unwrap(node.ownerDocument.createElement(tagName));
+    tempElement.innerHTML = value;
+    var firstChild;
+    while (firstChild = tempElement.firstChild) {
+      node.appendChild(wrap(firstChild));
+    }
+  }
+
+  var OriginalHTMLElement = window.HTMLElement;
+
+  function HTMLElement(node) {
+    Element.call(this, node);
+  }
+  HTMLElement.prototype = Object.create(Element.prototype);
+  mixin(HTMLElement.prototype, {
+    get innerHTML() {
+      // TODO(arv): This should fallback to this.impl.innerHTML if there
+      // are no shadow trees below or above the context node.
+      return getInnerHTML(this);
+    },
+    set innerHTML(value) {
+      setInnerHTML(this, value, this.tagName);
+    },
+
+    get outerHTML() {
+      // TODO(arv): This should fallback to HTMLElement_prototype.outerHTML if there
+      // are no shadow trees below or above the context node.
+      return getOuterHTML(this);
+    },
+    set outerHTML(value) {
+      if (!this.invalidateShadowRenderer()) {
+        this.impl.outerHTML = value;
+      } else {
+        throw new Error('not implemented');
+      }
+    }
+  });
+
+  function getterRequiresRendering(name) {
+    defineGetter(HTMLElement, name, function() {
+      scope.renderAllPending();
+      return this.impl[name];
+     });
+  }
+
+  [
+    'clientHeight',
+    'clientLeft',
+    'clientTop',
+    'clientWidth',
+    'offsetHeight',
+    'offsetLeft',
+    'offsetTop',
+    'offsetWidth',
+    'scrollHeight',
+    'scrollLeft',
+    'scrollTop',
+    'scrollWidth',
+  ].forEach(getterRequiresRendering);
+
+  function methodRequiresRendering(name) {
+    Object.defineProperty(HTMLElement.prototype, name, {
+      value: function() {
+        scope.renderAllPending();
+        return this.impl[name].apply(this.impl, arguments);
+      },
+      configurable: true,
+      enumerable: true
+    });
+  }
+
+  [
+    'getBoundingClientRect',
+    'getClientRects',
+    'scrollIntoView'
+  ].forEach(methodRequiresRendering);
+
+  // HTMLElement is abstract so we use a subclass that has no members.
+  registerWrapper(OriginalHTMLElement, HTMLElement,
+                  document.createElement('b'));
+
+  scope.wrappers.HTMLElement = HTMLElement;
+
+  // TODO: Find a better way to share these two with WrapperShadowRoot.
+  scope.getInnerHTML = getInnerHTML;
+  scope.setInnerHTML = setInnerHTML
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+
+  var OriginalHTMLContentElement = window.HTMLContentElement;
+
+  function HTMLContentElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLContentElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLContentElement.prototype, {
+    get select() {
+      return this.getAttribute('select');
+    },
+    set select(value) {
+      this.setAttribute('select', value);
+    },
+
+    setAttribute: function(n, v) {
+      HTMLElement.prototype.setAttribute.call(this, n, v);
+      if (String(n).toLowerCase() === 'select')
+        this.invalidateShadowRenderer(true);
+    }
+
+    // getDistributedNodes is added in ShadowRenderer
+
+    // TODO: attribute boolean resetStyleInheritance;
+  });
+
+  if (OriginalHTMLContentElement)
+    registerWrapper(OriginalHTMLContentElement, HTMLContentElement);
+
+  scope.wrappers.HTMLContentElement = HTMLContentElement;
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+
+  var OriginalHTMLShadowElement = window.HTMLShadowElement;
+
+  function HTMLShadowElement(node) {
+    HTMLElement.call(this, node);
+    this.olderShadowRoot_ = null;
+  }
+  HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLShadowElement.prototype, {
+    get olderShadowRoot() {
+      return this.olderShadowRoot_;
+    },
+
+    invalidateShadowRenderer: function() {
+      HTMLElement.prototype.invalidateShadowRenderer.call(this, true);
+    },
+
+    // TODO: attribute boolean resetStyleInheritance;
+  });
+
+  if (OriginalHTMLShadowElement)
+    registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);
+
+  scope.wrappers.HTMLShadowElement = HTMLShadowElement;
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var getInnerHTML = scope.getInnerHTML;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var setInnerHTML = scope.setInnerHTML;
+  var wrap = scope.wrap;
+
+  var contentTable = new SideTable();
+  var templateContentsOwnerTable = new SideTable();
+
+  // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner
+  function getTemplateContentsOwner(doc) {
+    if (!doc.defaultView)
+      return doc;
+    var d = templateContentsOwnerTable.get(doc);
+    if (!d) {
+      // TODO(arv): This should either be a Document or HTMLDocument depending
+      // on doc.
+      d = doc.implementation.createHTMLDocument('');
+      while (d.lastChild) {
+        d.removeChild(d.lastChild);
+      }
+      templateContentsOwnerTable.set(doc, d);
+    }
+    return d;
+  }
+
+  function extractContent(templateElement) {
+    var doc = getTemplateContentsOwner(templateElement.ownerDocument);
+    var df = doc.createDocumentFragment();
+    var nextSibling;
+    var child;
+    while (child = templateElement.firstChild) {
+      df.appendChild(child);
+    }
+    return df;
+  }
+
+  var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
+
+  function HTMLTemplateElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
+
+  mixin(HTMLTemplateElement.prototype, {
+    get content() {
+      if (OriginalHTMLTemplateElement)
+        return wrap(this.impl.content);
+
+      // TODO(arv): This should be done in createCallback. I initially tried to
+      // do this in the constructor but the wrapper is not yet created at that
+      // point in time so we hit an iloop.
+      var content = contentTable.get(this);
+      if (!content) {
+        content = extractContent(this);
+        contentTable.set(this, content);
+      }
+      return content;
+    },
+
+    get innerHTML() {
+      return getInnerHTML(this.content);
+    },
+    set innerHTML(value) {
+      setInnerHTML(this.content, value);
+      this.invalidateShadowRenderer();
+    }
+
+    // TODO(arv): cloneNode needs to clone content.
+
+  });
+
+  if (OriginalHTMLTemplateElement)
+    registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);
+
+  scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var HTMLContentElement = scope.wrappers.HTMLContentElement;
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
+  var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+
+  var OriginalHTMLUnknownElement = window.HTMLUnknownElement;
+
+  function HTMLUnknownElement(node) {
+    switch (node.localName) {
+      case 'content':
+        return new HTMLContentElement(node);
+      case 'shadow':
+        return new HTMLShadowElement(node);
+      case 'template':
+        return new HTMLTemplateElement(node);
+    }
+    HTMLElement.call(this, node);
+  }
+  HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);
+  registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);
+  scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var mixin = scope.mixin;
+  var registerObject = scope.registerObject;
+
+  var DocumentFragment = registerObject(document.createDocumentFragment());
+  mixin(DocumentFragment.prototype, ParentNodeInterface);
+  mixin(DocumentFragment.prototype, SelectorsInterface);
+  mixin(DocumentFragment.prototype, GetElementsByInterface);
+
+  var Text = registerObject(document.createTextNode(''));
+  var Comment = registerObject(document.createComment(''));
+
+  scope.wrappers.Comment = Comment;
+  scope.wrappers.DocumentFragment = DocumentFragment;
+  scope.wrappers.Text = Text;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var DocumentFragment = scope.wrappers.DocumentFragment;
+  var elementFromPoint = scope.elementFromPoint;
+  var getInnerHTML = scope.getInnerHTML;
+  var mixin = scope.mixin;
+  var rewrap = scope.rewrap;
+  var setInnerHTML = scope.setInnerHTML;
+  var unwrap = scope.unwrap;
+
+  var shadowHostTable = new SideTable();
+
+  function ShadowRoot(hostWrapper) {
+    var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());
+    DocumentFragment.call(this, node);
+
+    // createDocumentFragment associates the node with a wrapper
+    // DocumentFragment instance. Override that.
+    rewrap(node, this);
+
+    var oldShadowRoot = hostWrapper.shadowRoot;
+    scope.nextOlderShadowTreeTable.set(this, oldShadowRoot);
+
+    shadowHostTable.set(this, hostWrapper);
+  }
+  ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
+  mixin(ShadowRoot.prototype, {
+    get innerHTML() {
+      return getInnerHTML(this);
+    },
+    set innerHTML(value) {
+      setInnerHTML(this, value);
+      this.invalidateShadowRenderer();
+    },
+
+    invalidateShadowRenderer: function() {
+      return shadowHostTable.get(this).invalidateShadowRenderer();
+    },
+
+    elementFromPoint: function(x, y) {
+      return elementFromPoint(this, this.ownerDocument, x, y);
+    },
+
+    getElementById: function(id) {
+      return this.querySelector('#' + id);
+    }
+  });
+
+  scope.wrappers.ShadowRoot = ShadowRoot;
+  scope.getHostForShadowRoot = function(node) {
+    return shadowHostTable.get(node);
+  };
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var HTMLContentElement = scope.wrappers.HTMLContentElement;
+  var Node = scope.wrappers.Node;
+  var assert = scope.assert;
+  var mixin = scope.mixin;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+
+  /**
+   * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.
+   * Up means parentNode
+   * Sideways means previous and next sibling.
+   * @param {!Node} wrapper
+   */
+  function updateWrapperUpAndSideways(wrapper) {
+    wrapper.previousSibling_ = wrapper.previousSibling;
+    wrapper.nextSibling_ = wrapper.nextSibling;
+    wrapper.parentNode_ = wrapper.parentNode;
+  }
+
+  /**
+   * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.
+   * Down means first and last child
+   * @param {!Node} wrapper
+   */
+  function updateWrapperDown(wrapper) {
+    wrapper.firstChild_ = wrapper.firstChild;
+    wrapper.lastChild_ = wrapper.lastChild;
+  }
+
+  function updateAllChildNodes(parentNodeWrapper) {
+    assert(parentNodeWrapper instanceof Node);
+    for (var childWrapper = parentNodeWrapper.firstChild;
+         childWrapper;
+         childWrapper = childWrapper.nextSibling) {
+      updateWrapperUpAndSideways(childWrapper);
+    }
+    updateWrapperDown(parentNodeWrapper);
+  }
+
+  // This object groups DOM operations. This is supposed to be the DOM as the
+  // browser/render tree sees it.
+  // When changes are done to the visual DOM the logical DOM needs to be updated
+  // to reflect the correct tree.
+  function removeAllChildNodes(parentNodeWrapper) {
+    var parentNode = unwrap(parentNodeWrapper);
+    updateAllChildNodes(parentNodeWrapper);
+    parentNode.textContent = '';
+  }
+
+  function appendChild(parentNodeWrapper, childWrapper) {
+    var parentNode = unwrap(parentNodeWrapper);
+    var child = unwrap(childWrapper);
+    if (child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+      updateAllChildNodes(childWrapper);
+
+    } else {
+      remove(childWrapper);
+      updateWrapperUpAndSideways(childWrapper);
+    }
+
+    parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;
+    if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)
+      parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;
+
+    var lastChildWrapper = wrap(parentNode.lastChild);
+    if (lastChildWrapper) {
+      lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;
+    }
+
+    parentNode.appendChild(child);
+  }
+
+  function removeChild(parentNodeWrapper, childWrapper) {
+    var parentNode = unwrap(parentNodeWrapper);
+    var child = unwrap(childWrapper);
+
+    updateWrapperUpAndSideways(childWrapper);
+
+    if (childWrapper.previousSibling)
+      childWrapper.previousSibling.nextSibling_ = childWrapper;
+    if (childWrapper.nextSibling)
+      childWrapper.nextSibling.previousSibling_ = childWrapper;
+
+    if (parentNodeWrapper.lastChild === childWrapper)
+      parentNodeWrapper.lastChild_ = childWrapper;
+    if (parentNodeWrapper.firstChild === childWrapper)
+      parentNodeWrapper.firstChild_ = childWrapper;
+
+    parentNode.removeChild(child);
+  }
+
+  function remove(nodeWrapper) {
+    var node = unwrap(nodeWrapper)
+    var parentNode = node.parentNode;
+    if (parentNode)
+      removeChild(wrap(parentNode), nodeWrapper);
+  }
+
+  var distributedChildNodesTable = new SideTable();
+  var eventParentsTable = new SideTable();
+  var insertionParentTable = new SideTable();
+  var nextOlderShadowTreeTable = new SideTable();
+  var rendererForHostTable = new SideTable();
+  var shadowDOMRendererTable = new SideTable();
+
+  var reprCounter = 0;
+
+  function repr(node) {
+    if (!node.displayName)
+      node.displayName = node.nodeName + '-' + ++reprCounter;
+    return node.displayName;
+  }
+
+  function distributeChildToInsertionPoint(child, insertionPoint) {
+    getDistributedChildNodes(insertionPoint).push(child);
+    insertionParentTable.set(child, insertionPoint);
+
+    var eventParents = eventParentsTable.get(child);
+    if (!eventParents)
+      eventParentsTable.set(child, eventParents = []);
+    eventParents.push(insertionPoint);
+  }
+
+  function resetDistributedChildNodes(insertionPoint) {
+    distributedChildNodesTable.set(insertionPoint, []);
+  }
+
+  function getDistributedChildNodes(insertionPoint) {
+    return distributedChildNodesTable.get(insertionPoint);
+  }
+
+  function getChildNodesSnapshot(node) {
+    var result = [], i = 0;
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      result[i++] = child;
+    }
+    return result;
+  }
+
+  /**
+   * Visits all nodes in the tree that fulfils the |predicate|. If the |visitor|
+   * function returns |false| the traversal is aborted.
+   * @param {!Node} tree
+   * @param {function(!Node) : boolean} predicate
+   * @param {function(!Node) : *} visitor
+   */
+  function visit(tree, predicate, visitor) {
+    // This operates on logical DOM.
+    var nodes = getChildNodesSnapshot(tree);
+    for (var i = 0; i < nodes.length; i++) {
+      var node = nodes[i];
+      if (predicate(node)) {
+        if (visitor(node) === false)
+          return;
+      } else {
+        visit(node, predicate, visitor);
+      }
+    }
+  }
+
+  // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-distribution-algorithm
+  function distribute(tree, pool) {
+    var anyRemoved = false;
+
+    visit(tree, isActiveInsertionPoint,
+        function(insertionPoint) {
+          resetDistributedChildNodes(insertionPoint);
+          for (var i = 0; i < pool.length; i++) {  // 1.2
+            var node = pool[i];  // 1.2.1
+            if (node === undefined)  // removed
+              continue;
+            if (matchesCriteria(node, insertionPoint)) {  // 1.2.2
+              distributeChildToInsertionPoint(node, insertionPoint);  // 1.2.2.1
+              pool[i] = undefined;  // 1.2.2.2
+              anyRemoved = true;
+            }
+          }
+        });
+
+    if (!anyRemoved)
+      return pool;
+
+    return pool.filter(function(item) {
+      return item !== undefined;
+    });
+  }
+
+  // Matching Insertion Points
+  // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#matching-insertion-points
+
+  // TODO(arv): Verify this... I don't remember why I picked this regexp.
+  var selectorMatchRegExp = /^[*.:#[a-zA-Z_|]/;
+
+  var allowedPseudoRegExp = new RegExp('^:(' + [
+    'link',
+    'visited',
+    'target',
+    'enabled',
+    'disabled',
+    'checked',
+    'indeterminate',
+    'nth-child',
+    'nth-last-child',
+    'nth-of-type',
+    'nth-last-of-type',
+    'first-child',
+    'last-child',
+    'first-of-type',
+    'last-of-type',
+    'only-of-type',
+  ].join('|') + ')');
+
+
+  function oneOf(object, propertyNames) {
+    for (var i = 0; i < propertyNames.length; i++) {
+      if (propertyNames[i] in object)
+        return propertyNames[i];
+    }
+  }
+
+  /**
+   * @param {Element} node
+   * @oaram {Element} point The insertion point element.
+   * @return {boolean} Whether the node matches the insertion point.
+   */
+  function matchesCriteria(node, point) {
+    var select = point.getAttribute('select');
+    if (!select)
+      return true;
+
+    // Here we know the select attribute is a non empty string.
+    select = select.trim();
+    if (!select)
+      return true;
+
+    if (node.nodeType !== Node.ELEMENT_NODE)
+      return false;
+
+    // TODO(arv): This does not seem right. Need to check for a simple selector.
+    if (!selectorMatchRegExp.test(select))
+      return false;
+
+    if (select[0] === ':' &&!allowedPseudoRegExp.test(select))
+      return false;
+
+    try {
+      return node.matches(select);
+    } catch (ex) {
+      // Invalid selector.
+      return false;
+    }
+  }
+
+  var request = oneOf(window, [
+    'requestAnimationFrame',
+    'mozRequestAnimationFrame',
+    'webkitRequestAnimationFrame',
+    'setTimeout'
+  ]);
+
+  var pendingDirtyRenderers = [];
+  var renderTimer;
+
+  function renderAllPending() {
+    renderTimer = null;
+    pendingDirtyRenderers.forEach(function(owner) {
+      owner.render();
+    });
+    pendingDirtyRenderers = [];
+  }
+
+  function ShadowRenderer(host) {
+    this.host = host;
+    this.dirty = false;
+    this.associateNode(host);
+  }
+
+  function getRendererForHost(host) {
+    var renderer = rendererForHostTable.get(host);
+    if (!renderer) {
+      renderer = new ShadowRenderer(host);
+      rendererForHostTable.set(host, renderer);
+    }
+    return renderer;
+  }
+
+  ShadowRenderer.prototype = {
+    // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees
+    render: function() {
+      if (!this.dirty)
+        return;
+
+      var host = this.host;
+      this.treeComposition();
+      var shadowDOM = host.shadowRoot;
+      if (!shadowDOM)
+        return;
+
+      this.removeAllChildNodes(this.host);
+
+      var shadowDOMChildNodes = getChildNodesSnapshot(shadowDOM);
+      shadowDOMChildNodes.forEach(function(node) {
+        this.renderNode(host, shadowDOM, node, false);
+      }, this);
+
+      this.dirty = false;
+    },
+
+    invalidate: function() {
+      if (!this.dirty) {
+        this.dirty = true;
+        pendingDirtyRenderers.push(this);
+        if (renderTimer)
+          return;
+        renderTimer = window[request](renderAllPending, 0);
+      }
+    },
+
+    renderNode: function(visualParent, tree, node, isNested) {
+      if (isShadowHost(node)) {
+        this.appendChild(visualParent, node);
+        var renderer = getRendererForHost(node);
+        renderer.dirty = true;  // Need to rerender due to reprojection.
+        renderer.render();
+      } else if (isInsertionPoint(node)) {
+        this.renderInsertionPoint(visualParent, tree, node, isNested);
+      } else if (isShadowInsertionPoint(node)) {
+        this.renderShadowInsertionPoint(visualParent, tree, node);
+      } else {
+        this.renderAsAnyDomTree(visualParent, tree, node, isNested);
+      }
+    },
+
+    renderAsAnyDomTree: function(visualParent, tree, child, isNested) {
+      this.appendChild(visualParent, child);
+
+      if (isShadowHost(child)) {
+        render(child);
+      } else {
+        var parent = child;
+        var logicalChildNodes = getChildNodesSnapshot(parent);
+        logicalChildNodes.forEach(function(node) {
+          this.renderNode(parent, tree, node, isNested);
+        }, this);
+      }
+    },
+
+    renderInsertionPoint: function(visualParent, tree, insertionPoint, isNested) {
+      var distributedChildNodes = getDistributedChildNodes(insertionPoint);
+      if (distributedChildNodes.length) {
+        this.removeAllChildNodes(insertionPoint);
+
+        distributedChildNodes.forEach(function(child) {
+          if (isInsertionPoint(child) && isNested)
+            this.renderInsertionPoint(visualParent, tree, child, isNested);
+          else
+            this.renderAsAnyDomTree(visualParent, tree, child, isNested);
+        }, this);
+      } else {
+        this.renderFallbackContent(visualParent, insertionPoint);
+      }
+      this.remove(insertionPoint);
+    },
+
+    renderShadowInsertionPoint: function(visualParent, tree, shadowInsertionPoint) {
+      var nextOlderTree = getNextOlderTree(tree);
+      if (nextOlderTree) {
+        // This makes ShadowRoot have its insertionParent be the <shadow>.
+        insertionParentTable.set(nextOlderTree, shadowInsertionPoint);
+        shadowInsertionPoint.olderShadowRoot_ = nextOlderTree;
+        this.remove(shadowInsertionPoint);
+        var shadowDOMChildNodes = getChildNodesSnapshot(nextOlderTree);
+        shadowDOMChildNodes.forEach(function(node) {
+          this.renderNode(visualParent, nextOlderTree, node, true);
+        }, this);
+      } else {
+        this.renderFallbackContent(visualParent, shadowInsertionPoint);
+      }
+    },
+
+    renderFallbackContent: function (visualParent, fallbackHost) {
+      var logicalChildNodes = getChildNodesSnapshot(fallbackHost);
+      logicalChildNodes.forEach(function(node) {
+        this.appendChild(visualParent, node);
+      }, this);
+    },
+
+    // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-tree-composition
+    treeComposition: function () {
+      var shadowHost = this.host;
+      var tree = shadowHost.shadowRoot;  // 1.
+      var pool = [];  // 2.
+      var shadowHostChildNodes = getChildNodesSnapshot(shadowHost);
+      shadowHostChildNodes.forEach(function(child) {  // 3.
+        if (isInsertionPoint(child)) {  // 3.2.
+          var reprojected = getDistributedChildNodes(child);  // 3.2.1.
+          // if reprojected is undef... reset it?
+          if (!reprojected || !reprojected.length)  // 3.2.2.
+            reprojected = getChildNodesSnapshot(child);
+          pool.push.apply(pool, reprojected);  // 3.2.3.
+        } else {
+          pool.push(child); // 3.3.
+        }
+      });
+
+      var shadowInsertionPoint, point;
+      while (tree) {  // 4.
+        // 4.1.
+        shadowInsertionPoint = undefined;  // Reset every iteration.
+        visit(tree, isActiveShadowInsertionPoint, function(point) {
+          shadowInsertionPoint = point;
+          return false;
+        });
+        point = shadowInsertionPoint;
+
+        pool = distribute(tree, pool);  // 4.2.
+        if (point) {  // 4.3.
+          var nextOlderTree = getNextOlderTree(tree);  // 4.3.1.
+          if (!nextOlderTree) {
+            break;  // 4.3.1.1.
+          } else {
+            tree = nextOlderTree;  // 4.3.2.2.
+            assignShadowTreeToShadowInsertionPoint(tree, point);  // 4.3.2.2.
+            continue;  // 4.3.2.3.
+          }
+        } else {
+          break;  // 4.4.
+        }
+      }
+    },
+
+    // Visual DOM mutation.
+    appendChild: function(parent, child) {
+      appendChild(parent, child);
+      this.associateNode(child);
+    },
+
+    remove: function(node) {
+      remove(node);
+      this.associateNode(node);
+    },
+
+    removeAllChildNodes: function(parent) {
+      removeAllChildNodes(parent);
+      // TODO(arv): Does this need to associate all the nodes with this renderer?
+    },
+
+    associateNode: function(node) {
+      // TODO: Clear when moved out of shadow tree.
+      shadowDOMRendererTable.set(node, this);
+    }
+  };
+
+  function isInsertionPoint(node) {
+    // Should this include <shadow>?
+    return node.localName === 'content';
+  }
+
+  function isActiveInsertionPoint(node) {
+    // <content> inside another <content> or <shadow> is considered inactive.
+    return node.localName === 'content';
+  }
+
+  function isShadowInsertionPoint(node) {
+    return node.localName === 'shadow';
+  }
+
+  function isActiveShadowInsertionPoint(node) {
+    // <shadow> inside another <content> or <shadow> is considered inactive.
+    return node.localName === 'shadow';
+  }
+
+  function isShadowHost(shadowHost) {
+    return !!shadowHost.shadowRoot;
+  }
+
+  /**
+   * @param {WrapperShadowRoot} tree
+   */
+  function getNextOlderTree(tree) {
+    return nextOlderShadowTreeTable.get(tree);
+  }
+
+  function getShadowTrees(host) {
+    var trees = [];
+
+    for (var tree = host.shadowRoot;
+         tree;
+         tree = nextOlderShadowTreeTable.get(tree)) {
+      trees.push(tree);
+    }
+    return trees;
+  }
+
+  function assignShadowTreeToShadowInsertionPoint(tree, point) {
+    insertionParentTable.set(tree, point);
+  }
+
+  // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees
+  function render(host) {
+    new ShadowRenderer(host).render();
+  };
+
+  Node.prototype.invalidateShadowRenderer = function(force) {
+    // TODO: If this is in light DOM we only need to invalidate renderer if this
+    // is a direct child of a ShadowRoot.
+    // Maybe we should only associate renderers with direct child nodes of a
+    // shadow root (and all nodes in the shadow dom).
+    var renderer = shadowDOMRendererTable.get(this);
+    if (!renderer)
+      return false;
+
+    var p;
+    if (force || this.shadowRoot ||
+        (p = this.parentNode) && (p.shadowRoot || p instanceof ShadowRoot)) {
+      renderer.invalidate();
+    }
+
+    return true;
+  };
+
+  HTMLContentElement.prototype.getDistributedNodes = function() {
+    // TODO(arv): We should associate the element with the shadow root so we
+    // only have to rerender this ShadowRenderer.
+    renderAllPending();
+    return getDistributedChildNodes(this);
+  };
+
+  mixin(Node.prototype, {
+    get insertionParent() {
+      return insertionParentTable.get(this) || null;
+    }
+  });
+
+  scope.eventParentsTable = eventParentsTable;
+  scope.getRendererForHost = getRendererForHost;
+  scope.getShadowTrees = getShadowTrees;
+  scope.nextOlderShadowTreeTable = nextOlderShadowTreeTable;
+  scope.renderAllPending = renderAllPending;
+
+  // Exposed for testing
+  scope.visual = {
+    removeAllChildNodes: removeAllChildNodes,
+    appendChild: appendChild,
+    removeChild: removeChild
+  };
+
+})(this.ShadowDOMPolyfill);
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var Node = scope.wrappers.Node;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var elementFromPoint = scope.elementFromPoint;
+  var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrapEventTargetMethods = scope.wrapEventTargetMethods;
+  var wrapNodeList = scope.wrapNodeList;
+
+  var implementationTable = new SideTable();
+
+  function Document(node) {
+    Node.call(this, node);
+  }
+  Document.prototype = Object.create(Node.prototype);
+
+  defineWrapGetter(Document, 'documentElement');
+
+  // Conceptually both body and head can be in a shadow but suporting that seems
+  // overkill at this point.
+  defineWrapGetter(Document, 'body');
+  defineWrapGetter(Document, 'head');
+
+  // document cannot be overridden so we override a bunch of its methods
+  // directly on the instance.
+
+  function wrapMethod(name) {
+    var original = document[name];
+    Document.prototype[name] = function() {
+      return wrap(original.apply(this.impl, arguments));
+    };
+  }
+
+  [
+    'getElementById',
+    'createElement',
+    'createElementNS',
+    'createTextNode',
+    'createDocumentFragment',
+    'createEvent',
+    'createEventNS',
+  ].forEach(wrapMethod);
+
+  var originalAdoptNode = document.adoptNode;
+  var originalWrite = document.write;
+
+  mixin(Document.prototype, {
+    adoptNode: function(node) {
+      originalAdoptNode.call(this.impl, unwrap(node));
+      return node;
+    },
+    elementFromPoint: function(x, y) {
+      return elementFromPoint(this, this, x, y);
+    },
+    write: function(s) {
+      var all = this.querySelectorAll('*');
+      var last = all[all.length - 1];
+      while (last.nextSibling) {
+        last = last.nextSibling;
+      }
+      var p = last.parentNode;
+      p.lastChild_ = undefined;
+      last.nextSibling_ = undefined;
+      originalWrite.call(this.impl, s);
+    }
+  });
+
+  // We also override some of the methods on document.body and document.head
+  // for convenience.
+  forwardMethodsToWrapper([
+    window.HTMLBodyElement,
+    window.HTMLDocument || window.Document,  // Gecko adds these to HTMLDocument
+    window.HTMLHeadElement,
+  ], [
+    'appendChild',
+    'compareDocumentPosition',
+    'getElementsByClassName',
+    'getElementsByTagName',
+    'getElementsByTagNameNS',
+    'insertBefore',
+    'querySelector',
+    'querySelectorAll',
+    'removeChild',
+    'replaceChild',
+  ]);
+
+  forwardMethodsToWrapper([
+    window.HTMLDocument || window.Document,  // Gecko adds these to HTMLDocument
+  ], [
+    'adoptNode',
+    'createDocumentFragment',
+    'createElement',
+    'createElementNS',
+    'createEvent',
+    'createEventNS',
+    'createTextNode',
+    'elementFromPoint',
+    'getElementById',
+    'write',
+  ]);
+
+  mixin(Document.prototype, GetElementsByInterface);
+  mixin(Document.prototype, ParentNodeInterface);
+  mixin(Document.prototype, SelectorsInterface);
+
+  mixin(Document.prototype, {
+    get implementation() {
+      var implementation = implementationTable.get(this);
+      if (implementation)
+        return implementation;
+      implementation =
+          new DOMImplementation(unwrap(this).implementation);
+      implementationTable.set(this, implementation);
+      return implementation;
+    }
+  });
+
+  registerWrapper(window.Document, Document,
+      document.implementation.createHTMLDocument(''));
+
+  // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has
+  // one Document interface and IE implements the standard correctly.
+  if (window.HTMLDocument)
+    registerWrapper(window.HTMLDocument, Document);
+
+  wrapEventTargetMethods([
+    window.HTMLBodyElement,
+    window.HTMLDocument || window.Document,  // Gecko adds these to HTMLDocument
+    window.HTMLHeadElement,
+  ]);
+
+  function DOMImplementation(impl) {
+    this.impl = impl;
+  }
+
+  function wrapImplMethod(constructor, name) {
+    var original = document.implementation[name];
+    constructor.prototype[name] = function() {
+      return wrap(original.apply(this.impl, arguments));
+    };
+  }
+
+  function forwardImplMethod(constructor, name) {
+    var original = document.implementation[name];
+    constructor.prototype[name] = function() {
+      return original.apply(this.impl, arguments);
+    };
+  }
+
+  wrapImplMethod(DOMImplementation, 'createDocumentType');
+  wrapImplMethod(DOMImplementation, 'createDocument');
+  wrapImplMethod(DOMImplementation, 'createHTMLDocument');
+  forwardImplMethod(DOMImplementation, 'hasFeature');
+
+  registerWrapper(window.DOMImplementation, DOMImplementation);
+
+  forwardMethodsToWrapper([
+    window.DOMImplementation,
+  ], [
+    'createDocumentType',
+    'createDocument',
+    'createHTMLDocument',
+    'hasFeature',
+  ]);
+
+  scope.wrappers.Document = Document;
+  scope.wrappers.DOMImplementation = DOMImplementation;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var EventTarget = scope.wrappers.EventTarget;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+
+  var OriginalWindow = window.Window;
+
+  function Window(impl) {
+    EventTarget.call(this, impl);
+  }
+  Window.prototype = Object.create(EventTarget.prototype);
+
+  var originalGetComputedStyle = window.getComputedStyle;
+  OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {
+    return originalGetComputedStyle.call(this || window, unwrapIfNeeded(el),
+                                         pseudo);
+  };
+
+  ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(
+      function(name) {
+        OriginalWindow.prototype[name] = function() {
+          var w = wrap(this || window);
+          return w[name].apply(w, arguments);
+        };
+      });
+
+  mixin(Window.prototype, {
+    getComputedStyle: function(el, pseudo) {
+      return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),
+                                           pseudo);
+    }
+  });
+
+  registerWrapper(OriginalWindow, Window);
+
+  scope.wrappers.Window = Window;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var defineGetter = scope.defineGetter;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var registerWrapper = scope.registerWrapper;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrapNodeList = scope.wrapNodeList;
+  var wrappers = scope.wrappers;
+
+  var OriginalMutationObserver = window.MutationObserver ||
+      window.WebKitMutationObserver;
+
+  if (!OriginalMutationObserver)
+    return;
+
+  var OriginalMutationRecord = window.MutationRecord;
+
+  function MutationRecord(impl) {
+    this.impl = impl;
+  }
+
+  MutationRecord.prototype = {
+    get addedNodes() {
+      return wrapNodeList(this.impl.addedNodes);
+    },
+    get removedNodes() {
+      return wrapNodeList(this.impl.removedNodes);
+    }
+  };
+
+  ['target', 'previousSibling', 'nextSibling'].forEach(function(name) {
+    defineWrapGetter(MutationRecord, name);
+  });
+
+  // WebKit/Blink treats these as instance properties so we override
+  [
+    'type',
+    'attributeName',
+    'attributeNamespace',
+    'oldValue'
+  ].forEach(function(name) {
+    defineGetter(MutationRecord, name, function() {
+      return this.impl[name];
+    });
+  });
+
+  if (OriginalMutationRecord)
+    registerWrapper(OriginalMutationRecord, MutationRecord);
+
+  function wrapRecord(record) {
+    return new MutationRecord(record);
+  }
+
+  function wrapRecords(records) {
+    return records.map(wrapRecord);
+  }
+
+  function MutationObserver(callback) {
+    var self = this;
+    this.impl = new OriginalMutationObserver(function(mutations, observer) {
+      callback.call(self, wrapRecords(mutations), self);
+    });
+  }
+
+  var OriginalNode = window.Node;
+
+  MutationObserver.prototype = {
+    observe: function(target, options) {
+      this.impl.observe(unwrapIfNeeded(target), options);
+    },
+    disconnect: function() {
+      this.impl.disconnect();
+    },
+    takeRecords: function() {
+      return wrapRecords(this.impl.takeRecords());
+    }
+  };
+
+  scope.wrappers.MutationObserver = MutationObserver;
+  scope.wrappers.MutationRecord = MutationRecord;
+
+})(this.ShadowDOMPolyfill);
+
+// Copyright 2013 The Polymer Authors. All rights reserved.
+// Use of this source code is goverened by a BSD-style
+// license that can be found in the LICENSE file.
+
+(function(scope) {
+  'use strict';
+
+  var isWrapperFor = scope.isWrapperFor;
+
+  // This is a list of the elements we currently override the global constructor
+  // for.
+  var elements = {
+    'a': 'HTMLAnchorElement',
+    'applet': 'HTMLAppletElement',
+    'area': 'HTMLAreaElement',
+    'audio': 'HTMLAudioElement',
+    'br': 'HTMLBRElement',
+    'base': 'HTMLBaseElement',
+    'body': 'HTMLBodyElement',
+    'button': 'HTMLButtonElement',
+    'canvas': 'HTMLCanvasElement',
+    // 'command': 'HTMLCommandElement',  // Not fully implemented in Gecko.
+    'dl': 'HTMLDListElement',
+    'datalist': 'HTMLDataListElement',
+    'dir': 'HTMLDirectoryElement',
+    'div': 'HTMLDivElement',
+    'embed': 'HTMLEmbedElement',
+    'fieldset': 'HTMLFieldSetElement',
+    'font': 'HTMLFontElement',
+    'form': 'HTMLFormElement',
+    'frame': 'HTMLFrameElement',
+    'frameset': 'HTMLFrameSetElement',
+    'hr': 'HTMLHRElement',
+    'head': 'HTMLHeadElement',
+    'h1': 'HTMLHeadingElement',
+    'html': 'HTMLHtmlElement',
+    'iframe': 'HTMLIFrameElement',
+
+    // Uses HTMLSpanElement in Firefox.
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=843881
+    // 'image',
+
+    'input': 'HTMLInputElement',
+    'li': 'HTMLLIElement',
+    'label': 'HTMLLabelElement',
+    'legend': 'HTMLLegendElement',
+    'link': 'HTMLLinkElement',
+    'map': 'HTMLMapElement',
+    // 'media', Covered by audio and video
+    'menu': 'HTMLMenuElement',
+    'menuitem': 'HTMLMenuItemElement',
+    'meta': 'HTMLMetaElement',
+    'meter': 'HTMLMeterElement',
+    'del': 'HTMLModElement',
+    'ol': 'HTMLOListElement',
+    'object': 'HTMLObjectElement',
+    'optgroup': 'HTMLOptGroupElement',
+    'option': 'HTMLOptionElement',
+    'output': 'HTMLOutputElement',
+    'p': 'HTMLParagraphElement',
+    'param': 'HTMLParamElement',
+    'pre': 'HTMLPreElement',
+    'progress': 'HTMLProgressElement',
+    'q': 'HTMLQuoteElement',
+    'script': 'HTMLScriptElement',
+    'select': 'HTMLSelectElement',
+    'source': 'HTMLSourceElement',
+    'span': 'HTMLSpanElement',
+    'style': 'HTMLStyleElement',
+    'caption': 'HTMLTableCaptionElement',
+    // WebKit and Moz are wrong:
+    // https://bugs.webkit.org/show_bug.cgi?id=111469
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=848096
+    // 'td': 'HTMLTableCellElement',
+    'col': 'HTMLTableColElement',
+    'table': 'HTMLTableElement',
+    'tr': 'HTMLTableRowElement',
+    'thead': 'HTMLTableSectionElement',
+    'tbody': 'HTMLTableSectionElement',
+    'textarea': 'HTMLTextAreaElement',
+    'title': 'HTMLTitleElement',
+    'ul': 'HTMLUListElement',
+    'video': 'HTMLVideoElement',
+  };
+
+  function overrideConstructor(tagName) {
+    var nativeConstructorName = elements[tagName];
+    var nativeConstructor = window[nativeConstructorName];
+    if (!nativeConstructor)
+      return;
+    var element = document.createElement(tagName);
+    var wrapperConstructor = element.constructor;
+    window[nativeConstructorName] = wrapperConstructor;
+  }
+
+  Object.keys(elements).forEach(overrideConstructor);
+
+  Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {
+    window[name] = scope.wrappers[name]
+  });
+
+  // Export for testing.
+  scope.knownElements = elements;
+
+})(this.ShadowDOMPolyfill);
+/*
+ * Copyright 2013 The Polymer Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+(function() {
+  var ShadowDOMPolyfill = window.ShadowDOMPolyfill;
+  var wrap = ShadowDOMPolyfill.wrap;
+
+  // patch in prefixed name
+  Object.defineProperties(HTMLElement.prototype, {
+    //TODO(sjmiles): review accessor alias with Arv
+    webkitShadowRoot: {
+      get: function() {
+        return this.shadowRoot;
+      }
+    }
+  });
+
+  //TODO(sjmiles): review method alias with Arv
+  HTMLElement.prototype.webkitCreateShadowRoot =
+      HTMLElement.prototype.createShadowRoot;
+
+  // TODO(jmesserly): figure out what to do about these Dart-specific patches
+  // Right now it depends on some dart2js impl details to patch getTypeNameOf
+  // TODO(jmesserly): we need to wrap document somehow (a dart:html hook?)
+  window.dartMainRunner = function(main) {
+    var NodeList = ShadowDOMPolyfill.wrappers.NodeList;
+    var ShadowRoot = ShadowDOMPolyfill.wrappers.ShadowRoot;
+    var isWrapper = ShadowDOMPolyfill.isWrapper;
+    var unwrap = ShadowDOMPolyfill.unwrap;
+    var innerTypeNameOf = window.$.getFunctionForTypeNameOf();
+
+    function typeNameOfShadowDOM(obj) {
+      var result;
+      if (obj instanceof NodeList) {
+        result = 'NodeList';
+      } else if (obj instanceof ShadowRoot) {
+        result = 'ShadowRoot';
+      } else if (obj instanceof MutationRecord) {
+        result = 'MutationRecord';
+      } else if (obj instanceof MutationObserver) {
+        result = 'MutationObserver';
+      } else {
+        if (isWrapper(obj)) {
+          obj = unwrap(obj);
+
+          // Fix up class names for Firefox. For some of them like
+          // HTMLFormElement and HTMLInputElement, the "constructor" property of
+          // the unwrapped nodes points at the wrapper for some reason.
+          // TODO(jmesserly): figure out why this is happening.
+          var ctor = obj.constructor;
+          if (ctor && !ctor.builtin$cls && ctor.name == 'GeneratedWrapper') {
+            var name = Object.prototype.toString.call(obj);
+            name = name.substring(8, name.length - 1);
+            ctor.builtin$cls = name;
+          }
+        }
+
+        result = innerTypeNameOf.call$1(obj);
+      }
+
+      return result;
+    }
+
+    function constructorNameShadowDOM(object) {
+      var $constructor, $name, string;
+      if (object == null)
+        return "Null";
+      $constructor = object.constructor;
+      if (typeof $constructor === "function") {
+        $name = $constructor.builtin$cls;
+        if ($name != null)
+          return $name;
+      }
+
+    }
+
+    window.$.constructorNameFallback = constructorNameShadowDOM;
+    window.$._getTypeNameOf = { call$1: typeNameOfShadowDOM };
+    window.Isolate.$isolateProperties._getTypeNameOf = window.$._getTypeNameOf;
+
+    // Invoke the real main
+    main();
+  };
+
+})();
+
+}
\ No newline at end of file
diff --git a/pkg/shadow_dom/lib/shadow_dom.min.js b/pkg/shadow_dom/lib/shadow_dom.min.js
new file mode 100644
index 0000000..cea694d
--- /dev/null
+++ b/pkg/shadow_dom/lib/shadow_dom.min.js
@@ -0,0 +1,2 @@
+if(!HTMLElement.prototype.createShadowRoot&&!HTMLElement.prototype.webkitCreateShadowRoot||window.__forceShadowDomPolyfill){(function(){Element.prototype.webkitCreateShadowRoot&&(Element.prototype.webkitCreateShadowRoot=function(){return window.ShadowDOMPolyfill.wrapIfNeeded(this).createShadowRoot()})})();var SideTable;"undefined"!=typeof WeakMap&&0>navigator.userAgent.indexOf("Firefox/")?SideTable=WeakMap:function(){var e=Object.defineProperty,t=Object.hasOwnProperty,n=(new Date).getTime()%1e9;SideTable=function(){this.name="__st"+(1e9*Math.random()>>>0)+(n++ +"__")},SideTable.prototype={set:function(t,n){e(t,this.name,{value:n,writable:!0})},get:function(e){return t.call(e,this.name)?e[this.name]:void 0},"delete":function(e){this.set(e,void 0)}}}();var ShadowDOMPolyfill={};(function(e){"use strict";function t(e){if(!e)throw new Error("Assertion failed")}function n(e,t){return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function r(e,t){return Object.getOwnPropertyNames(t).forEach(function(n){switch(n){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function i(e){var t=e.__proto__||Object.getPrototypeOf(e),n=M.get(t);if(n)return n;var r=i(t),o=p(r);return u(t,o,e),o}function o(e,t){l(e,t,!0)}function a(e,t){l(t,e,!1)}function l(e,t,n){Object.getOwnPropertyNames(e).forEach(function(r){if(!(r in t)){L&&e.__lookupGetter__(r);var i;try{i=Object.getOwnPropertyDescriptor(e,r)}catch(o){i=C}var a,l;if(n&&"function"==typeof i.value)return t[r]=function(){return this.impl[r].apply(this.impl,arguments)},void 0;a=function(){return this.impl[r]},(i.writable||i.set)&&(l=function(e){this.impl[r]=e}),Object.defineProperty(t,r,{get:a,set:l,configurable:i.configurable,enumerable:i.enumerable})}})}function s(e,t,n){var i=e.prototype;u(i,t,n),r(t,e)}function u(e,n,r){var i=n.prototype;t(void 0===M.get(e)),M.set(e,n),o(e,i),r&&a(i,r)}function c(e,t){return M.get(t.prototype)===e}function d(e){var t=Object.getPrototypeOf(e),n=i(t),r=p(n);return u(t,r,e),r}function p(e){function t(t){e.call(this,t)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}function f(e){return e instanceof N.EventTarget||e instanceof N.Event||e instanceof N.DOMImplementation}function h(e){return e instanceof D||e instanceof O||e instanceof _||e instanceof H}function m(e){if(null===e)return null;t(h(e));var n=S.get(e);if(!n){var r=i(e);n=new r(e),S.set(e,n)}return n}function w(e){return null===e?null:(t(f(e)),e.impl)}function g(e){return e&&f(e)?w(e):e}function v(e){return e&&!f(e)?m(e):e}function E(e,n){null!==n&&(t(h(e)),t(void 0===n||f(n)),S.set(e,n))}function y(e,t,n){Object.defineProperty(e.prototype,t,{get:n,configurable:!0,enumerable:!0})}function T(e,t){y(e,t,function(){return m(this.impl[t])})}function b(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=m(this);return e[t].apply(e,arguments)}})})}var S=new SideTable,M=new SideTable,N=Object.create(null);Object.getOwnPropertyNames(window);var L=/Firefox/.test(navigator.userAgent),C={get:function(){},set:function(){},configurable:!0,enumerable:!0},H=DOMImplementation,O=Event,D=Node,_=Window;e.assert=t,e.defineGetter=y,e.defineWrapGetter=T,e.forwardMethodsToWrapper=b,e.isWrapper=f,e.isWrapperFor=c,e.mixin=n,e.registerObject=d,e.registerWrapper=s,e.rewrap=E,e.unwrap=w,e.unwrapIfNeeded=g,e.wrap=m,e.wrapIfNeeded=v,e.wrappers=N})(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof I.ShadowRoot}function n(e){var t=e.localName;return"content"===t||"shadow"===t}function r(e){return!!e.shadowRoot}function i(e){var t;return e.parentNode||(t=e.defaultView)&&R(t)||null}function o(o,a,l){if(l.length)return l.shift();if(t(o))return o.insertionParent||e.getHostForShadowRoot(o);var s=e.eventParentsTable.get(o);if(s){for(var u=1;s.length>u;u++)l[u-1]=s[u];return s[0]}if(a&&n(o)){var c=o.parentNode;if(c&&r(c))for(var d=e.getShadowTrees(c),p=a.insertionParent,u=0;d.length>u;u++)if(d[u].contains(p))return p}return i(o)}function a(e){for(var r=[],i=e,a=[],s=[];i;){var u=null;if(n(i)){u=l(r);var c=r[r.length-1]||i;r.push(c)}else r.length||r.push(i);var d=r[r.length-1];a.push({target:d,currentTarget:i}),t(i)&&r.pop(),i=o(i,u,s)}return a}function l(e){for(var t=e.length-1;t>=0;t--)if(!n(e[t]))return e[t];return null}function s(r,i){for(var a=[];r;){for(var s=[],c=i,p=void 0;c;){var f=null;if(s.length){if(n(c)&&(f=l(s),u(p))){var h=s[s.length-1];s.push(h)}}else s.push(c);if(d(c,r))return s[s.length-1];t(c)&&s.pop(),p=c,c=o(c,f,a)}r=t(r)?e.getHostForShadowRoot(r):r.parentNode}}function u(e){return e.insertionParent}function c(e){for(var t;t=e.parentNode;)e=t;return e}function d(e,t){return c(e)===c(t)}function p(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function f(t){if(!F.get(t)){F.set(t,!0),p(t.type)||e.renderAllPending();var n=R(t.target),r=R(t);return h(r,n)}}function h(e,t){var n=a(t);return"load"===e.type&&2===n.length&&n[0].target instanceof I.Document&&n.shift(),m(e,n)&&w(e,n)&&g(e,n),k.set(e,y.NONE),W.set(e,null),e.defaultPrevented}function m(e,t){for(var n,r=t.length-1;r>0;r--){var i=t[r].target,o=t[r].currentTarget;if(i!==o&&(n=y.CAPTURING_PHASE,!v(t[r],e,n)))return!1}return!0}function w(e,t){var n=y.AT_TARGET;return v(t[0],e,n)}function g(e,t){for(var n,r=e.bubbles,i=1;t.length>i;i++){var o=t[i].target,a=t[i].currentTarget;if(o===a)n=y.AT_TARGET;else{if(!r||q.get(e))continue;n=y.BUBBLING_PHASE}if(!v(t[i],e,n))return}}function v(e,t,n){var r=e.target,i=e.currentTarget,o=A.get(i);if(!o)return!0;if("relatedTarget"in t){var a=x(t),l=R(a.relatedTarget),u=s(i,l);if(u===r)return!0;B.set(t,u)}k.set(t,n);var c=t.type,d=!1;j.set(t,r),W.set(t,i);for(var p=0;o.length>p;p++){var f=o[p];if(f.removed)d=!0;else if(!(f.type!==c||!f.capture&&n===y.CAPTURING_PHASE||f.capture&&n===y.BUBBLING_PHASE))try{if("function"==typeof f.handler?f.handler.call(i,t):f.handler.handleEvent(t),q.get(t))return!1}catch(h){window.onerror?window.onerror(h.message):console.error(h)}}if(d){var m=o.slice();o.length=0;for(var p=0;m.length>p;p++)m[p].removed||o.push(m[p])}return!G.get(t)}function E(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){return e instanceof U?(this.impl=e,void 0):R(M(U,"Event",e,t))}function T(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:x(e.relatedTarget)}}):e}function b(e,t,n){var r=window[e],i=function(t,n){return t instanceof r?(this.impl=t,void 0):R(M(r,e,t,n))};return i.prototype=Object.create(t.prototype),n&&_(i.prototype,n),r&&P(r,i,document.createEvent(e)),i}function S(e,t){return function(){arguments[t]=x(arguments[t]);var n=x(this);n[e].apply(n,arguments)}}function M(e,t,n,r){if(et)return new e(n,T(r));var i=x(document.createEvent(t)),o=J[t],a=[n];return Object.keys(o).forEach(function(e){var t=null!=r&&e in r?r[e]:o[e];"relatedTarget"===e&&(t=x(t)),a.push(t)}),i["init"+t].apply(i,a),i}function N(e){return"function"==typeof e?!0:e&&e.handleEvent}function L(e){this.impl=e}function C(t){return t instanceof I.ShadowRoot&&(t=e.getHostForShadowRoot(t)),x(t)}function H(e){D(e,rt)}function O(t,n,r,i){e.renderAllPending();for(var o=R(it.call(n.impl,r,i)),l=a(o,this),s=0;l.length>s;s++){var u=l[s];if(u.currentTarget===t)return u.target}return null}var D=e.forwardMethodsToWrapper,_=e.mixin,P=e.registerWrapper,x=e.unwrap,R=e.wrap,I=e.wrappers;new SideTable;var A=new SideTable,F=new SideTable,j=new SideTable,W=new SideTable,B=new SideTable,k=new SideTable,G=new SideTable,q=new SideTable;E.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var U=window.Event;y.prototype={get target(){return j.get(this)},get currentTarget(){return W.get(this)},get eventPhase(){return k.get(this)},stopPropagation:function(){G.set(this,!0)},stopImmediatePropagation:function(){G.set(this,!0),q.set(this,!0)}},P(U,y,document.createEvent("Event"));var $=b("UIEvent",y),V=b("CustomEvent",y),K={get relatedTarget(){return B.get(this)||R(x(this).relatedTarget)}},z=_({initMouseEvent:S("initMouseEvent",14)},K),X=_({initFocusEvent:S("initFocusEvent",5)},K),Y=b("MouseEvent",$,z),Q=b("FocusEvent",$,X),Z=b("MutationEvent",y,{initMutationEvent:S("initMutationEvent",3),get relatedNode(){return R(this.impl.relatedNode)}}),J=Object.create(null),et=function(){try{new window.MouseEvent("click")}catch(e){return!1}return!0}();if(!et){var tt=function(e,t,n){if(n){var r=J[n];t=_(_({},r),t)}J[e]=t};tt("Event",{bubbles:!1,cancelable:!1}),tt("CustomEvent",{detail:null},"Event"),tt("UIEvent",{view:null,detail:0},"Event"),tt("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),tt("FocusEvent",{relatedTarget:null},"UIEvent")}var nt=window.EventTarget,rt=["addEventListener","removeEventListener","dispatchEvent"];[Element,Window,Document].forEach(function(e){var t=e.prototype;rt.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),L.prototype={addEventListener:function(e,t,n){if(N(t)){var r=new E(e,t,n),i=A.get(this);if(i){for(var o=0;i.length>o;o++)if(r.equals(i[o]))return}else i=[],A.set(this,i);i.push(r);var a=C(this);a.addEventListener_(e,f,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=A.get(this);if(r){for(var i=0,o=!1,a=0;r.length>a;a++)r[a].type===e&&r[a].capture===n&&(i++,r[a].handler===t&&(o=!0,r[a].remove()));if(o&&1===i){var l=C(this);l.removeEventListener_(e,f,!0)}}},dispatchEvent:function(t){e.renderAllPending();var n=C(this);return n.dispatchEvent_(x(t))}},nt&&P(nt,L);var it=document.elementFromPoint;e.adjustRelatedTarget=s,e.elementFromPoint=O,e.wrapEventTargetMethods=H,e.wrappers.CustomEvent=V,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=Q,e.wrappers.MouseEvent=Y,e.wrappers.MutationEvent=Z,e.wrappers.UIEvent=$}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,{enumerable:!1})}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,i=e.length;i>r;r++)t[r]=o(e[r]);return t.length=i,t}function i(e,t){e.prototype[t]=function(){return r(this.impl[t].apply(this.impl,arguments))}}var o=e.wrap;n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=i,e.wrapNodeList=r}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){u(e instanceof o)}function n(e,t,n,r){if(e.nodeType!==o.DOCUMENT_FRAGMENT_NODE)return e.parentNode&&e.parentNode.removeChild(e),e.parentNode_=t,e.previousSibling_=n,e.nextSibling_=r,n&&(n.nextSibling_=e),r&&(r.previousSibling_=e),[e];for(var i,a=[];i=e.firstChild;)e.removeChild(i),a.push(i),i.parentNode_=t;for(var l=0;a.length>l;l++)a[l].previousSibling_=a[l-1]||n,a[l].nextSibling_=a[l+1]||r;return n&&(n.nextSibling_=a[0]),r&&(r.previousSibling_=a[a.length-1]),a}function r(e){if(1===e.length)return p(e[0]);for(var t=p(document.createDocumentFragment()),n=0;e.length>n;n++)t.appendChild(p(e[n]));return t}function i(e){for(var t=e.firstChild;t;){u(t.parentNode===e);var n=t.nextSibling,r=p(t),i=r.parentNode;i&&v.call(i,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}function o(e){u(e instanceof h),a.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var a=e.wrappers.EventTarget,l=e.wrappers.NodeList,s=e.defineWrapGetter,u=e.assert,c=e.mixin,d=e.registerWrapper,p=e.unwrap,f=e.wrap,h=window.Node,m=h.prototype.appendChild,w=h.prototype.insertBefore,g=h.prototype.replaceChild,v=h.prototype.removeChild,E=h.prototype.compareDocumentPosition;o.prototype=Object.create(a.prototype),c(o.prototype,{appendChild:function(e){t(e),this.invalidateShadowRenderer();var i=this.lastChild,o=null,a=n(e,this,i,o);return this.lastChild_=a[a.length-1],i||(this.firstChild_=a[0]),m.call(this.impl,r(a)),e},insertBefore:function(e,i){if(!i)return this.appendChild(e);t(e),t(i),u(i.parentNode===this),this.invalidateShadowRenderer();var o=i.previousSibling,a=i,l=n(e,this,o,a);this.firstChild===i&&(this.firstChild_=l[0]);var s=p(i),c=s.parentNode;return c&&w.call(c,r(l),s),e},removeChild:function(e){if(t(e),e.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var n=this.firstChild,r=this.lastChild,i=e.nextSibling,o=e.previousSibling,a=p(e),l=a.parentNode;return l&&v.call(l,a),n===e&&(this.firstChild_=i),r===e&&(this.lastChild_=o),o&&(o.nextSibling_=i),i&&(i.previousSibling_=o),e.previousSibling_=e.nextSibling_=e.parentNode_=null,e},replaceChild:function(e,i){if(t(e),t(i),i.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var o=i.previousSibling,a=i.nextSibling;a===e&&(a=e.nextSibling);var l=n(e,this,o,a);this.firstChild===i&&(this.firstChild_=l[0]),this.lastChild===i&&(this.lastChild_=l[l.length-1]),i.previousSibling_=null,i.nextSibling_=null,i.parentNode_=null;var s=p(i);return s.parentNode&&g.call(s.parentNode,r(l),s),i},hasChildNodes:function(){return null===this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:f(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:f(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:f(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:f(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:f(this.impl.previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==o.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)e+=t.textContent;return e},set textContent(e){if(i(this),this.invalidateShadowRenderer(),""!==e){var t=this.impl.ownerDocument.createTextNode(e);this.appendChild(t)}},get childNodes(){for(var e=new l,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){if(!this.invalidateShadowRenderer())return f(this.impl.cloneNode(e));var t=f(this.impl.cloneNode(!1));if(e)for(var n=this.firstChild;n;n=n.nextSibling)t.appendChild(n.cloneNode(!0));return t},contains:function(e){if(!e)return!1;if(e===this)return!0;var t=e.parentNode;return t?this.contains(t):!1},compareDocumentPosition:function(e){return E.call(this.impl,p(e))}}),s(o,"ownerDocument"),d(h,o,document.createDocumentFragment()),delete o.prototype.querySelector,delete o.prototype.querySelectorAll,o.prototype=c(Object.create(a.prototype),o.prototype),e.wrappers.Node=o}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e,n){for(var r,i=e.firstElementChild;i;){if(i.matches(n))return i;if(r=t(i,n))return r;i=i.nextElementSibling}return null}function n(e,t,r){for(var i=e.firstElementChild;i;)i.matches(t)&&(r[r.length++]=i),n(i,t,r),i=i.nextElementSibling;return r}var r={querySelector:function(e){return t(this,e)},querySelectorAll:function(e){return n(this,e,new NodeList)}},i={getElementsByTagName:function(e){return this.querySelectorAll(e)},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){if("*"===e)return this.getElementsByTagName(t);for(var n=new NodeList,r=this.getElementsByTagName(t),i=0,o=0;r.length>i;i++)r[i].namespaceURI===e&&(n[o++]=r[i]);return n.length=o,n}};e.GetElementsByInterface=i,e.SelectorsInterface=r}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,i={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e}},o={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.nextSibling)}};e.ChildNodeInterface=o,e.ParentNodeInterface=i}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,i=e.mixin,o=e.registerWrapper,a=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get textContent(){return this.data},set textContent(e){this.data=e}}),i(t.prototype,n),o(a,t,document.createTextNode("")),e.wrappers.CharacterData=t}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){i.call(this,e)}var n=e.ChildNodeInterface,r=e.GetElementsByInterface,i=e.wrappers.Node,o=e.ParentNodeInterface,a=e.SelectorsInterface;e.addWrapNodeListMethod;var l=e.mixin,s=e.registerWrapper,u=e.wrappers,c=new SideTable,d=window.Element,p=d.prototype.matches||d.prototype.mozMatchesSelector||d.prototype.msMatchesSelector||d.prototype.webkitMatchesSelector;t.prototype=Object.create(i.prototype),l(t.prototype,{createShadowRoot:function(){var t=new u.ShadowRoot(this);return c.set(this,t),e.getRendererForHost(this),this.invalidateShadowRenderer(!0),t},get shadowRoot(){return c.get(this)||null},setAttribute:function(e,t){this.impl.setAttribute(e,t),this.invalidateShadowRenderer()},matches:function(e){return p.call(this.impl,e)}}),l(t.prototype,n),l(t.prototype,r),l(t.prototype,o),l(t.prototype,a),s(d,t),e.wrappers.Element=t}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function n(e){return e.replace(m,t)}function r(e){switch(e.nodeType){case Node.ELEMENT_NODE:for(var t,r=e.tagName.toLowerCase(),o="<"+r,a=e.attributes,l=0;t=a[l];l++)o+=" "+t.name+'="'+n(t.value)+'"';return o+=">",w[r]?o:o+i(e)+"</"+r+">";case Node.TEXT_NODE:return n(e.nodeValue);case Node.COMMENT_NODE:return"<!--"+n(e.nodeValue)+"-->";default:throw console.error(e),new Error("not implemented")}}function i(e){for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=r(n);return t}function o(e,t,n){var r=n||"div";e.textContent="";var i=f(e.ownerDocument.createElement(r));i.innerHTML=t;for(var o;o=i.firstChild;)e.appendChild(h(o))}function a(e){u.call(this,e)}function l(t){c(a,t,function(){return e.renderAllPending(),this.impl[t]})}function s(t){Object.defineProperty(a.prototype,t,{value:function(){return e.renderAllPending(),this.impl[t].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var u=e.wrappers.Element,c=e.defineGetter,d=e.mixin,p=e.registerWrapper,f=e.unwrap,h=e.wrap,m=/&|<|"/g,w={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},g=window.HTMLElement;a.prototype=Object.create(u.prototype),d(a.prototype,{get innerHTML(){return i(this)},set innerHTML(e){o(this,e,this.tagName)},get outerHTML(){return r(this)},set outerHTML(e){if(this.invalidateShadowRenderer())throw new Error("not implemented");this.impl.outerHTML=e}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollLeft","scrollTop","scrollWidth"].forEach(l),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(s),p(g,a,document.createElement("b")),e.wrappers.HTMLElement=a,e.getInnerHTML=i,e.setInnerHTML=o}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,i=e.registerWrapper,o=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),o&&i(o,t),e.wrappers.HTMLContentElement=t}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e),this.olderShadowRoot_=null}var n=e.wrappers.HTMLElement,r=e.mixin,i=e.registerWrapper,o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get olderShadowRoot(){return this.olderShadowRoot_},invalidateShadowRenderer:function(){n.prototype.invalidateShadowRenderer.call(this,!0)}}),o&&i(o,t),e.wrappers.HTMLShadowElement=t}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),i=r.createDocumentFragment();n=e.firstChild;)i.appendChild(n);return i}function r(e){i.call(this,e)}var i=e.wrappers.HTMLElement,o=e.getInnerHTML,a=e.mixin,l=e.registerWrapper,s=e.setInnerHTML,u=e.wrap,c=new SideTable,d=new SideTable,p=window.HTMLTemplateElement;r.prototype=Object.create(i.prototype),a(r.prototype,{get content(){if(p)return u(this.impl.content);var e=c.get(this);return e||(e=n(this),c.set(this,e)),e},get innerHTML(){return o(this.content)},set innerHTML(e){s(this.content,e),this.invalidateShadowRenderer()}}),p&&l(p,r),e.wrappers.HTMLTemplateElement=r}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new i(e);case"template":return new o(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,i=e.wrappers.HTMLShadowElement,o=e.wrappers.HTMLTemplateElement;e.mixin;var a=e.registerWrapper,l=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(l,t),e.wrappers.HTMLUnknownElement=t}(this.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.ParentNodeInterface,r=e.SelectorsInterface,i=e.mixin,o=e.registerObject,a=o(document.createDocumentFragment());i(a.prototype,n),i(a.prototype,r),i(a.prototype,t);var l=o(document.createTextNode("")),s=o(document.createComment(""));e.wrappers.Comment=s,e.wrappers.DocumentFragment=a,e.wrappers.Text=l}(this.ShadowDOMPolyfill),function(e){"use strict";function t(t){var r=s(t.impl.ownerDocument.createDocumentFragment());n.call(this,r),a(r,this);var i=t.shadowRoot;e.nextOlderShadowTreeTable.set(this,i),u.set(this,t)}var n=e.wrappers.DocumentFragment,r=e.elementFromPoint,i=e.getInnerHTML,o=e.mixin,a=e.rewrap,l=e.setInnerHTML,s=e.unwrap,u=new SideTable;t.prototype=Object.create(n.prototype),o(t.prototype,{get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},invalidateShadowRenderer:function(){return u.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return r(this,this.ownerDocument,e,t)},getElementById:function(e){return this.querySelector("#"+e)}}),e.wrappers.ShadowRoot=t,e.getHostForShadowRoot=function(e){return u.get(e)}}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(e){e.firstChild_=e.firstChild,e.lastChild_=e.lastChild}function r(e){_(e instanceof D);for(var r=e.firstChild;r;r=r.nextSibling)t(r);n(e)}function i(e){var t=x(e);r(e),t.textContent=""}function o(e,n){var i=x(e),o=x(n);o.nodeType===D.DOCUMENT_FRAGMENT_NODE?r(n):(l(n),t(n)),e.lastChild_=e.lastChild,e.lastChild===e.firstChild&&(e.firstChild_=e.firstChild);var a=R(i.lastChild);a&&(a.nextSibling_=a.nextSibling),i.appendChild(o)}function a(e,n){var r=x(e),i=x(n);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),e.lastChild===n&&(e.lastChild_=n),e.firstChild===n&&(e.firstChild_=n),r.removeChild(i)}function l(e){var t=x(e),n=t.parentNode;n&&a(R(n),e)}function s(e,t){c(t).push(e),F.set(e,t);var n=A.get(e);n||A.set(e,n=[]),n.push(t)}function u(e){I.set(e,[])}function c(e){return I.get(e)}function d(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function p(e,t,n){for(var r=d(e),i=0;r.length>i;i++){var o=r[i];if(t(o)){if(n(o)===!1)return}else p(o,t,n)}}function f(e,t){var n=!1;return p(e,y,function(e){u(e);for(var r=0;t.length>r;r++){var i=t[r];void 0!==i&&m(i,e)&&(s(i,e),t[r]=void 0,n=!0)}}),n?t.filter(function(e){return void 0!==e}):t}function h(e,t){for(var n=0;t.length>n;n++)if(t[n]in e)return t[n]}function m(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(e.nodeType!==D.ELEMENT_NODE)return!1;if(!k.test(n))return!1;if(":"===n[0]&&!G.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function w(){H=null,U.forEach(function(e){e.render()}),U=[]}function g(e){this.host=e,this.dirty=!1,this.associateNode(e)}function v(e){var t=W.get(e);return t||(t=new g(e),W.set(e,t)),t}function E(e){return"content"===e.localName}function y(e){return"content"===e.localName}function T(e){return"shadow"===e.localName}function b(e){return"shadow"===e.localName}function S(e){return!!e.shadowRoot}function M(e){return j.get(e)}function N(e){for(var t=[],n=e.shadowRoot;n;n=j.get(n))t.push(n);return t}function L(e,t){F.set(e,t)}function C(e){new g(e).render()}var H,O=e.wrappers.HTMLContentElement,D=e.wrappers.Node,_=e.assert,P=e.mixin,x=e.unwrap,R=e.wrap,I=new SideTable,A=new SideTable,F=new SideTable,j=new SideTable,W=new SideTable,B=new SideTable,k=/^[*.:#[a-zA-Z_|]/,G=new RegExp("^:("+["link","visited","target","enabled","disabled","checked","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of-type","last-of-type","only-of-type"].join("|")+")"),q=h(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),U=[];g.prototype={render:function(){if(this.dirty){var e=this.host;this.treeComposition();var t=e.shadowRoot;if(t){this.removeAllChildNodes(this.host);var n=d(t);n.forEach(function(n){this.renderNode(e,t,n,!1)},this),this.dirty=!1}}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,U.push(this),H)return;H=window[q](w,0)}},renderNode:function(e,t,n,r){if(S(n)){this.appendChild(e,n);var i=v(n);i.dirty=!0,i.render()}else E(n)?this.renderInsertionPoint(e,t,n,r):T(n)?this.renderShadowInsertionPoint(e,t,n):this.renderAsAnyDomTree(e,t,n,r)},renderAsAnyDomTree:function(e,t,n,r){if(this.appendChild(e,n),S(n))C(n);else{var i=n,o=d(i);o.forEach(function(e){this.renderNode(i,t,e,r)},this)}},renderInsertionPoint:function(e,t,n,r){var i=c(n);i.length?(this.removeAllChildNodes(n),i.forEach(function(n){E(n)&&r?this.renderInsertionPoint(e,t,n,r):this.renderAsAnyDomTree(e,t,n,r)},this)):this.renderFallbackContent(e,n),this.remove(n)},renderShadowInsertionPoint:function(e,t,n){var r=M(t);if(r){F.set(r,n),n.olderShadowRoot_=r,this.remove(n);var i=d(r);i.forEach(function(t){this.renderNode(e,r,t,!0)},this)}else this.renderFallbackContent(e,n)},renderFallbackContent:function(e,t){var n=d(t);n.forEach(function(t){this.appendChild(e,t)},this)},treeComposition:function(){var e=this.host,t=e.shadowRoot,n=[],r=d(e);r.forEach(function(e){if(E(e)){var t=c(e);t&&t.length||(t=d(e)),n.push.apply(n,t)}else n.push(e)});for(var i,o;t;){if(i=void 0,p(t,b,function(e){return i=e,!1}),o=i,n=f(t,n),o){var a=M(t);if(a){t=a,L(t,o);continue}break}break}},appendChild:function(e,t){o(e,t),this.associateNode(t)},remove:function(e){l(e),this.associateNode(e)},removeAllChildNodes:function(e){i(e)},associateNode:function(e){B.set(e,this)}},D.prototype.invalidateShadowRenderer=function(e){var t=B.get(this);if(!t)return!1;var n;return(e||this.shadowRoot||(n=this.parentNode)&&(n.shadowRoot||n instanceof ShadowRoot))&&t.invalidate(),!0},O.prototype.getDistributedNodes=function(){return w(),c(this)},P(D.prototype,{get insertionParent(){return F.get(this)||null}}),e.eventParentsTable=A,e.getRendererForHost=v,e.getShadowTrees=N,e.nextOlderShadowTreeTable=j,e.renderAllPending=w,e.visual={removeAllChildNodes:i,appendChild:o,removeChild:a}}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){l.call(this,e)}function n(e){var n=document[e];t.prototype[e]=function(){return w(n.apply(this.impl,arguments))}}function r(e){this.impl=e}function i(e,t){var n=document.implementation[t];e.prototype[t]=function(){return w(n.apply(this.impl,arguments))}}function o(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(this.impl,arguments)}}var a=e.GetElementsByInterface,l=e.wrappers.Node,s=e.ParentNodeInterface,u=e.SelectorsInterface,c=e.defineWrapGetter,d=e.elementFromPoint,p=e.forwardMethodsToWrapper,f=e.mixin,h=e.registerWrapper,m=e.unwrap,w=e.wrap,g=e.wrapEventTargetMethods;e.wrapNodeList;var v=new SideTable;t.prototype=Object.create(l.prototype),c(t,"documentElement"),c(t,"body"),c(t,"head"),["getElementById","createElement","createElementNS","createTextNode","createDocumentFragment","createEvent","createEventNS"].forEach(n);var E=document.adoptNode,y=document.write;f(t.prototype,{adoptNode:function(e){return E.call(this.impl,m(e)),e},elementFromPoint:function(e,t){return d(this,this,e,t)},write:function(e){for(var t=this.querySelectorAll("*"),n=t[t.length-1];n.nextSibling;)n=n.nextSibling;var r=n.parentNode;r.lastChild_=void 0,n.nextSibling_=void 0,y.call(this.impl,e)}}),p([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement],["appendChild","compareDocumentPosition","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),p([window.HTMLDocument||window.Document],["adoptNode","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createTextNode","elementFromPoint","getElementById","write"]),f(t.prototype,a),f(t.prototype,s),f(t.prototype,u),f(t.prototype,{get implementation(){var e=v.get(this);return e?e:(e=new r(m(this).implementation),v.set(this,e),e)}}),h(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&h(window.HTMLDocument,t),g([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),i(r,"createDocumentType"),i(r,"createDocument"),i(r,"createHTMLDocument"),o(r,"hasFeature"),h(window.DOMImplementation,r),p([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),e.wrappers.Document=t,e.wrappers.DOMImplementation=r}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,i=e.registerWrapper,o=e.unwrap,a=e.unwrapIfNeeded,l=e.wrap,s=window.Window;t.prototype=Object.create(n.prototype);var u=window.getComputedStyle;s.prototype.getComputedStyle=function(e,t){return u.call(this||window,a(e),t)},["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){s.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)}}),r(t.prototype,{getComputedStyle:function(e,t){return u.call(o(this),a(e),t)}}),i(s,t),e.wrappers.Window=t}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){this.impl=e}function n(e){return new t(e)}function r(e){return e.map(n)}function i(e){var t=this;this.impl=new c(function(n){e.call(t,r(n),t)})}var o=e.defineGetter,a=e.defineWrapGetter,l=e.registerWrapper,s=e.unwrapIfNeeded,u=e.wrapNodeList;e.wrappers;var c=window.MutationObserver||window.WebKitMutationObserver;if(c){var d=window.MutationRecord;t.prototype={get addedNodes(){return u(this.impl.addedNodes)},get removedNodes(){return u(this.impl.removedNodes)}},["target","previousSibling","nextSibling"].forEach(function(e){a(t,e)}),["type","attributeName","attributeNamespace","oldValue"].forEach(function(e){o(t,e,function(){return this.impl[e]})}),d&&l(d,t),window.Node,i.prototype={observe:function(e,t){this.impl.observe(s(e),t)
+},disconnect:function(){this.impl.disconnect()},takeRecords:function(){return r(this.impl.takeRecords())}},e.wrappers.MutationObserver=i,e.wrappers.MutationRecord=t}}(this.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var i=document.createElement(e),o=i.constructor;window[t]=o}}e.isWrapperFor;var n={a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTextAreaElement",title:"HTMLTitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"};Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]}),e.knownElements=n}(this.ShadowDOMPolyfill),function(){var e=window.ShadowDOMPolyfill;e.wrap,Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot,window.dartMainRunner=function(t){function n(e){var t;if(e instanceof i)t="NodeList";else if(e instanceof o)t="ShadowRoot";else if(e instanceof MutationRecord)t="MutationRecord";else if(e instanceof MutationObserver)t="MutationObserver";else{if(a(e)){e=l(e);var n=e.constructor;if(n&&!n.builtin$cls&&"GeneratedWrapper"==n.name){var r=Object.prototype.toString.call(e);r=r.substring(8,r.length-1),n.builtin$cls=r}}t=s.call$1(e)}return t}function r(e){var t,n;return null==e?"Null":(t=e.constructor,"function"==typeof t&&(n=t.builtin$cls,null!=n)?n:void 0)}var i=e.wrappers.NodeList,o=e.wrappers.ShadowRoot,a=e.isWrapper,l=e.unwrap,s=window.$.getFunctionForTypeNameOf();window.$.constructorNameFallback=r,window.$._getTypeNameOf={call$1:n},window.Isolate.$isolateProperties._getTypeNameOf=window.$._getTypeNameOf,t()}}()}
\ No newline at end of file
diff --git a/pkg/shadow_dom/pubspec.yaml b/pkg/shadow_dom/pubspec.yaml
new file mode 100644
index 0000000..61b7107
--- /dev/null
+++ b/pkg/shadow_dom/pubspec.yaml
@@ -0,0 +1,9 @@
+name: shadow_dom
+author: "Web UI Team <web-ui-dev@dartlang.org>"
+homepage: https://github.com/dart-lang/ShadowDOM/tree/conditional_shadowdom
+description: >
+  Shadow DOM is designed to provide encapsulation by hiding DOM subtrees under
+  shadow roots. It provides a method of establishing and maintaining functional
+  boundaries between DOM trees and how these trees interact with each other
+  within a document, thus enabling better functional encapsulation within the
+  DOM.
diff --git a/pkg/source_maps/lib/span.dart b/pkg/source_maps/lib/span.dart
index e7bf5bf..7ca0ca9 100644
--- a/pkg/source_maps/lib/span.dart
+++ b/pkg/source_maps/lib/span.dart
@@ -219,11 +219,20 @@
   int getLine(int offset) => binarySearch(_lineStarts, (o) => o > offset) - 1;
 
   /// Gets the 0-based column corresponding to an offset.
-  int getColumn(int line, int offset) => offset - _lineStarts[line];
+  int getColumn(int line, int offset) {
+    if (line < 0 || line >= _lineStarts.length) return 0;
+    return offset - _lineStarts[line];
+  }
 
   /// Get the offset for a given line and column
-  int getOffset(int line, int column) =>
-      _lineStarts[max(min(line, _lineStarts.length - 1), 0)] + column;
+  int getOffset(int line, int column) {
+    if (line < 0) return getOffset(0, 0);
+    if (line < _lineStarts.length) {
+      return _lineStarts[line] + column;
+    } else {
+      return _decodedChars.length;
+    }
+  }
 
   /// Gets the text at the given offsets.
   String getText(int start, [int end]) =>
@@ -251,7 +260,6 @@
     // +1 for 0-indexing, +1 again to avoid the last line
     var textLine = getText(getOffset(line, 0), getOffset(line + 1, 0));
 
-
     column = min(column, textLine.length - 1);
     int toColumn = min(column + end - start, textLine.length);
     if (useColors) {
@@ -265,6 +273,7 @@
       buf.write(textLine.substring(toColumn));
     } else {
       buf.write(textLine);
+      if (textLine != '' && !textLine.endsWith('\n')) buf.write('\n');
     }
 
     int i = 0;
@@ -290,13 +299,13 @@
   final int _baseOffset;
   final int _baseLine;
   final int _baseColumn;
+  final int _maxOffset;
 
-  // TODO(sigmund): consider providing an end-offset to correctly truncate
-  // values passed the end of the segment.
   SourceFileSegment(String url, String textSegment, Location startOffset)
       : _baseOffset = startOffset.offset,
         _baseLine = startOffset.line,
         _baseColumn = startOffset.column,
+        _maxOffset = startOffset.offset + textSegment.length,
         super.text(url, textSegment);
 
   /// Craete a span, where [start] is relative to this segment's base offset.
@@ -313,9 +322,13 @@
 
   /// Return the line on the underlying file associated with the [offset] of the
   /// underlying file. This method operates on the real offsets from the
-  /// original file, so that error messages can be reported accurately.
-  int getLine(int offset) =>
-      super.getLine(max(offset - _baseOffset, 0)) + _baseLine;
+  /// original file, so that error messages can be reported accurately. When the
+  /// requested offset is past the length of the segment, this returns the line
+  /// number after the end of the segment (total lines + 1).
+  int getLine(int offset) {
+    var res = super.getLine(max(offset - _baseOffset, 0)) + _baseLine;
+    return (offset > _maxOffset) ? res + 1 : res;
+  }
 
   /// Return the column on the underlying file associated with [line] and
   /// [offset], where [line] is absolute from the beginning of the underlying
@@ -330,13 +343,12 @@
   /// on the real offsets from the original file, so that error messages can be
   /// reported accurately.
   int getOffset(int line, int column) =>
-      super.getOffset(line - _baseLine,
-         line == _baseLine ? column - _baseColumn : column) + _baseOffset;
+    super.getOffset(line - _baseLine,
+        line == _baseLine ? column - _baseColumn : column) + _baseOffset;
 
   /// Retrieve the text associated with the specified range. This method
   /// operates on the real offsets from the original file, so that error
   /// messages can be reported accurately.
   String getText(int start, [int end]) =>
-      super.getText(start - _baseOffset,
-          end == null ? null : end - _baseOffset);
+    super.getText(start - _baseOffset, end == null ? null : end - _baseOffset);
 }
diff --git a/pkg/source_maps/test/span_test.dart b/pkg/source_maps/test/span_test.dart
index 66bd8a8..c7b9cde 100644
--- a/pkg/source_maps/test/span_test.dart
+++ b/pkg/source_maps/test/span_test.dart
@@ -69,22 +69,80 @@
     expect(file.getText(line + 2, line + 11), '34+6789_1');
   });
 
-  test('get location message', () {
-    // fifth line (including 4 new lines), columns 2 .. 11
-    var line = 10 + 80 + 31 + 27 + 4;
-    expect(file.getLocationMessage('the message', line + 2, line + 11),
-        'file:5:3: the message\n'
-        '1234+6789_1234\n'
-        '  ^^^^^^^^^');
-  });
+  group('location message', () {
+    test('first line', () {
+      expect(file.getLocationMessage('the message', 1, 3),
+          'file:1:2: the message\n'
+          '+23456789_\n'
+          ' ^^');
+    });
 
-  test('get location message - no file url', () {
-    var line = 10 + 80 + 31 + 27 + 4;
-    expect(new SourceFile.text(null, TEST_FILE).getLocationMessage(
-        'the message', line + 2, line + 11),
-        ':5:3: the message\n'
-        '1234+6789_1234\n'
-        '  ^^^^^^^^^');
+    test('in the middle of the file', () {
+      // fifth line (including 4 new lines), columns 2 .. 11
+      var line = 10 + 80 + 31 + 27 + 4;
+      expect(file.getLocationMessage('the message', line + 2, line + 11),
+          'file:5:3: the message\n'
+          '1234+6789_1234\n'
+          '  ^^^^^^^^^');
+    });
+
+    test('no file url', () {
+      var line = 10 + 80 + 31 + 27 + 4;
+      expect(new SourceFile.text(null, TEST_FILE).getLocationMessage(
+          'the message', line + 2, line + 11),
+          ':5:3: the message\n'
+          '1234+6789_1234\n'
+          '  ^^^^^^^^^');
+    });
+
+    test('penultimate line', () {
+      // We search '\n' backwards twice because last line is \n terminated:
+      int index = TEST_FILE.lastIndexOf('\n');
+      var start = TEST_FILE.lastIndexOf('\n', index - 1) - 3;
+      expect(file.getLocationMessage('the message', start, start + 2),
+          'file:11:41: the message\n'
+          '123456789_+23456789_123456789_123456789_123\n'
+          '                                        ^^');
+    });
+
+    test('last line', () {
+      var start = TEST_FILE.lastIndexOf('\n') - 2;
+      expect(file.getLocationMessage('the message', start, start + 1),
+          'file:12:28: the message\n'
+          '123456789_1+3456789_123456789\n'
+          '                           ^');
+    });
+
+    group('no trailing empty-line at the end -', () {
+      var text = TEST_FILE.substring(0, TEST_FILE.length - 1);
+      var file2 = new SourceFile.text('file', text);
+
+      test('penultimate line', () {
+        var start = text.lastIndexOf('\n') - 3;
+        expect(file2.getLocationMessage('the message', start, start + 2),
+            'file:11:41: the message\n'
+            '123456789_+23456789_123456789_123456789_123\n'
+            '                                        ^^');
+      });
+
+      test('last line', () {
+        var start = text.length - 2;
+        expect(file2.getLocationMessage('the message', start, start + 1),
+            'file:12:28: the message\n'
+            '123456789_1+3456789_123456789\n'
+            '                           ^');
+      });
+    });
+
+    test('single line', () {
+      var text = "this is a single line";
+      int start = text.indexOf(' ') + 1;
+      var file2 = new SourceFile.text('file', text);
+      expect(file2.getLocationMessage('the message', start, start + 2),
+            'file:1:${start + 1}: the message\n'
+            'this is a single line\n'
+            '     ^^');
+    });
   });
 
   test('location getters', () {
@@ -242,17 +300,11 @@
           '123456789_1+3456789_123456789\n'
           '                            ^');
 
-        // TODO(sigmund): consider also fixing this and report file:10:4
         // The answer below is different because the segment parsing only knows
         // about the 10 lines it has (and nothing about the possible extra lines
         // afterwards)
         expect(segment.getLocationMessage('the message', start, start + 1),
-          'file:10:112: the message\n');
-
-        // The number 112 includes the count of extra characters past the
-        // segment, which we verify here:
-        var lastSegmentLineStart = segmentText.lastIndexOf('\n');
-        expect(start - baseOffset - lastSegmentLineStart, 112);
+          'file:11:1: the message\n');
       });
     });
   });
diff --git a/pkg/stack_trace/lib/src/trace.dart b/pkg/stack_trace/lib/src/trace.dart
index 2b9d22a..6b7da75 100644
--- a/pkg/stack_trace/lib/src/trace.dart
+++ b/pkg/stack_trace/lib/src/trace.dart
@@ -19,7 +19,7 @@
 /// Firefox's trace frames start with the name of the function in which the
 /// error occurred, possibly including its parameters inside `()`. For example,
 /// `.VW.call$0("arg")@http://pub.dartlang.org/stuff.dart.js:560`.
-final _firefoxTrace = new RegExp(r"^([.0-9A-Za-z_$/<]*|\(.*\))*@");
+final _firefoxTrace = new RegExp(r"^([.0-9A-Za-z_$/<]|\(.*\))*@");
 
 /// A RegExp to match this package's stack traces.
 final _friendlyTrace = new RegExp(r"^[^\s]+( \d+:\d+)?\s+[^\s]+($|\n)");
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index ca7cfb6..65dc2d5 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -778,10 +778,10 @@
  * The feature description will typically describe the item and the feature,
  * while the feature name will just name the feature. For example, we may
  * have a Widget class where each Widget has a price; we could make a
- * FeatureMatcher that can make assertions about prices with:
+ * [CustomMatcher] that can make assertions about prices with:
  *
- *     class HasPrice extends FeatureMatcher {
- *       const HasPrice(matcher) :
+ *     class HasPrice extends CustomMatcher {
+ *       HasPrice(matcher) :
  *           super("Widget with price that is", "price", matcher);
  *       featureValueOf(actual) => actual.price;
  *     }
diff --git a/runtime/bin/dbg_connection.cc b/runtime/bin/dbg_connection.cc
index db77a16..e5d4f6b 100644
--- a/runtime/bin/dbg_connection.cc
+++ b/runtime/bin/dbg_connection.cc
@@ -377,6 +377,7 @@
 
 
 void DebuggerConnectionHandler::AcceptDbgConnection(int debug_fd) {
+  Socket::SetNoDelay(debug_fd, true);
   AddNewDebuggerConnection(debug_fd);
   {
     ASSERT(handler_lock_ != NULL);
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index c2a3a96..97b3ad7 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -48,6 +48,7 @@
   V(SecureSocket_PeerCertificate, 1)                                           \
   V(SecureSocket_RegisterBadCertificateCallback, 2)                            \
   V(SecureSocket_RegisterHandshakeCompleteCallback, 2)                         \
+  V(SecureSocket_Renegotiate, 4)                                               \
   V(SecureSocket_InitializeLibrary, 3)                                         \
   V(SecureSocket_NewServicePort, 0)                                            \
   V(SecureSocket_FilterPointer, 1)                                             \
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index f4871cf..7b5cd37 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -189,6 +189,21 @@
 }
 
 
+void FUNCTION_NAME(SecureSocket_Renegotiate)(Dart_NativeArguments args) {
+  Dart_EnterScope();
+  bool use_session_cache =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 1));
+  bool request_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 2));
+  bool require_client_certificate =
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
+  GetFilter(args)->Renegotiate(use_session_cache,
+                               request_client_certificate,
+                               require_client_certificate);
+  Dart_ExitScope();
+}
+
+
 void FUNCTION_NAME(SecureSocket_RegisterHandshakeCompleteCallback)(
     Dart_NativeArguments args) {
   Dart_EnterScope();
@@ -525,6 +540,15 @@
   ASSERT(bad_certificate_callback_ != NULL);
 }
 
+
+char* PasswordCallback(PK11SlotInfo* slot, PRBool retry, void* arg) {
+  if (!retry) {
+    return PL_strdup(static_cast<char*>(arg));  // Freed by NSS internals.
+  }
+  return NULL;
+}
+
+
 static const char* builtin_roots_module =
 #if defined(TARGET_OS_LINUX) || defined(TARGET_OS_ANDROID)
     "name=\"Root Certs\" library=\"libnssckbi.so\"";
@@ -545,7 +569,6 @@
   MutexLocker locker(mutex_);
   SECStatus status;
   if (!library_initialized_) {
-    password_ = strdup(password);  // This one copy persists until Dart exits.
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     // TODO(whesse): Verify there are no UTF-8 issues here.
     if (certificate_database == NULL || certificate_database[0] == '\0') {
@@ -579,6 +602,8 @@
         ThrowPRException("TlsException",
                          "Failed NSS_Init call.");
       }
+      password_ = strdup(password);  // This one copy persists until Dart exits.
+      PK11_SetPasswordFunc(PasswordCallback);
     }
     library_initialized_ = true;
 
@@ -612,14 +637,6 @@
 }
 
 
-char* PasswordCallback(PK11SlotInfo* slot, PRBool retry, void* arg) {
-  if (!retry) {
-    return PL_strdup(static_cast<char*>(arg));  // Freed by NSS internals.
-  }
-  return NULL;
-}
-
-
 SECStatus BadCertificateCallback(void* filter, PRFileDesc* fd) {
   SSLFilter* ssl_filter = static_cast<SSLFilter*>(filter);
   Dart_Handle callback = ssl_filter->bad_certificate_callback();
@@ -673,8 +690,6 @@
 
   SECStatus status;
   if (is_server) {
-    PK11_SetPasswordFunc(PasswordCallback);
-
     CERTCertificate* certificate = NULL;
     if (strstr(certificate_name, "CN=") != NULL) {
       // Look up certificate using the distinguished name (DN) certificate_name.
@@ -732,8 +747,9 @@
         ThrowPRException("TlsException",
                          "Failed SSL_OptionSet(REQUEST_CERTIFICATE) call");
       }
-      PRBool require_cert = require_client_certificate ? PR_TRUE : PR_FALSE;
-      status = SSL_OptionSet(filter_, SSL_REQUIRE_CERTIFICATE, require_cert);
+      status = SSL_OptionSet(filter_,
+                             SSL_REQUIRE_CERTIFICATE,
+                             require_client_certificate);
       if (status != SECSuccess) {
         ThrowPRException("TlsException",
                          "Failed SSL_OptionSet(REQUIRE_CERTIFICATE) call");
@@ -755,6 +771,7 @@
     }
 
     if (send_client_certificate) {
+      SSL_SetPKCS11PinArg(filter_, const_cast<char*>(password_));
       status = SSL_GetClientAuthDataHook(
           filter_,
           NSS_GetClientAuthData,
@@ -771,8 +788,7 @@
                            BadCertificateCallback,
                            static_cast<void*>(this));
 
-  PRBool as_server = is_server ? PR_TRUE : PR_FALSE;
-  status = SSL_ResetHandshake(filter_, as_server);
+  status = SSL_ResetHandshake(filter_, is_server);
   if (status != SECSuccess) {
     ThrowPRException("TlsException",
                      "Failed SSL_ResetHandshake call");
@@ -826,6 +842,43 @@
 }
 
 
+void SSLFilter::Renegotiate(bool use_session_cache,
+                            bool request_client_certificate,
+                            bool require_client_certificate) {
+  SECStatus status;
+  // The SSL_REQUIRE_CERTIFICATE option only takes effect if the
+  // SSL_REQUEST_CERTIFICATE option is also set, so set it.
+  request_client_certificate =
+      request_client_certificate || require_client_certificate;
+
+  status = SSL_OptionSet(filter_,
+                         SSL_REQUEST_CERTIFICATE,
+                         request_client_certificate);
+  if (status != SECSuccess) {
+    ThrowPRException("TlsException",
+       "Failure in (Raw)SecureSocket.renegotiate request_client_certificate");
+  }
+  status = SSL_OptionSet(filter_,
+                         SSL_REQUIRE_CERTIFICATE,
+                         require_client_certificate);
+  if (status != SECSuccess) {
+    ThrowPRException("TlsException",
+       "Failure in (Raw)SecureSocket.renegotiate require_client_certificate");
+  }
+  bool flush_cache = !use_session_cache;
+  status = SSL_ReHandshake(filter_, flush_cache);
+  if (status != SECSuccess) {
+    if (is_server_) {
+      ThrowPRException("HandshakeException",
+                       "Failure in (Raw)SecureSocket.renegotiate in server");
+    } else {
+      ThrowPRException("HandshakeException",
+                       "Failure in (Raw)SecureSocket.renegotiate in client");
+    }
+  }
+}
+
+
 void SSLFilter::Destroy() {
   for (int i = 0; i < kNumBuffers; ++i) {
     Dart_DeletePersistentHandle(dart_buffer_objects_[i]);
diff --git a/runtime/bin/secure_socket.h b/runtime/bin/secure_socket.h
index ce011b6..817be4a 100644
--- a/runtime/bin/secure_socket.h
+++ b/runtime/bin/secure_socket.h
@@ -66,6 +66,9 @@
                bool send_client_certificate);
   void Destroy();
   void Handshake();
+  void Renegotiate(bool use_session_cache,
+                   bool request_client_certificate,
+                   bool require_client_certificate);
   void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
   void RegisterBadCertificateCallback(Dart_Handle callback);
   Dart_Handle bad_certificate_callback() {
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index 4b7c5ab..104f562 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -31,6 +31,14 @@
     _raw.onBadCertificate = callback;
   }
 
+  void renegotiate({bool useSessionCache: true,
+                    bool requestClientCertificate: false,
+                    bool requireClientCertificate: false}) {
+    _raw.renegotiate(useSessionCache: useSessionCache,
+                     requestClientCertificate: requestClientCertificate,
+                     requireClientCertificate: requireClientCertificate);
+  }
+
   X509Certificate get peerCertificate {
     if (_raw == null) {
      throw new StateError("peerCertificate called on destroyed SecureSocket");
@@ -84,6 +92,10 @@
 
   void handshake() native "SecureSocket_Handshake";
 
+  void renegotiate(bool useSessionCache,
+                   bool requestClientCertificate,
+                   bool requireClientCertificate)
+      native "SecureSocket_Renegotiate";
   void init() native "SecureSocket_Init";
 
   X509Certificate get peerCertificate native "SecureSocket_PeerCertificate";
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index dd0e256..976efcf 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -360,7 +360,7 @@
 bool Socket::SetNoDelay(intptr_t fd, bool enabled) {
   int on = enabled ? 1 : 0;
   return TEMP_FAILURE_RETRY(setsockopt(fd,
-                                       SOL_TCP,
+                                       IPPROTO_TCP,
                                        TCP_NODELAY,
                                        reinterpret_cast<char *>(&on),
                                        sizeof(on))) == 0;
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index e2fdf5c..571a876 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -246,6 +246,10 @@
 
 
 static bool ShouldIncludeIfaAddrs(struct ifaddrs* ifa, int lookup_family) {
+  if (ifa->ifa_addr == NULL) {
+    // OpenVPN's virtual device tun0.
+    return false;
+  }
   int family = ifa->ifa_addr->sa_family;
   if (lookup_family == family) return true;
   if (lookup_family == AF_UNSPEC &&
@@ -398,7 +402,7 @@
 bool Socket::SetNoDelay(intptr_t fd, bool enabled) {
   int on = enabled ? 1 : 0;
   return TEMP_FAILURE_RETRY(setsockopt(fd,
-                                       SOL_TCP,
+                                       IPPROTO_TCP,
                                        TCP_NODELAY,
                                        reinterpret_cast<char *>(&on),
                                        sizeof(on))) == 0;
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc
index 66737cd..81b2d02 100644
--- a/runtime/bin/socket_macos.cc
+++ b/runtime/bin/socket_macos.cc
@@ -246,6 +246,10 @@
 
 
 static bool ShouldIncludeIfaAddrs(struct ifaddrs* ifa, int lookup_family) {
+  if (ifa->ifa_addr == NULL) {
+    // OpenVPN's virtual device tun0.
+    return false;
+  }
   int family = ifa->ifa_addr->sa_family;
   if (lookup_family == family) return true;
   if (lookup_family == AF_UNSPEC &&
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index a75932f..ec79333 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -666,9 +666,9 @@
 /**
  * An isolate shutdown callback function.
  *
- * This callback, provided by the embedder, is called after the vm
- * shuts down an isolate.  Since the isolate has been shut down, it is
- * not safe to enter the isolate or use it to run any Dart code.
+ * This callback, provided by the embedder, is called before the vm
+ * shuts down an isolate.  The isolate being shutdown will be the current
+ * isolate. It is safe to run Dart code.
  *
  * This function should be used to dispose of native resources that
  * are allocated to an isolate in order to avoid leaks.
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index e7f88a3..e16cbef 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -14,7 +14,7 @@
   void operator []=(int index, E value) native "ObjectArray_setIndexed";
 
   String toString() {
-    return ToString.iterableToString(this);
+    return IterableMixinWorkaround.toStringIterable(this,'[' , ']');
   }
 
   int get length native "ObjectArray_getLength";
@@ -457,7 +457,7 @@
   }
 
   String toString() {
-    return ToString.iterableToString(this);
+    return IterableMixinWorkaround.toStringIterable(this, '[', ']');
   }
 
   int indexOf(Object element, [int start = 0]) {
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index d614535..5de84c4 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -3,61 +3,135 @@
 // BSD-style license that can be found in the LICENSE file.
 
 patch class Expando<T> {
-  /* patch */ Expando([this.name]) : _data = new List();
+  /* patch */ Expando([this.name])
+      : _data = new List(_minSize),
+        _used = 0;
+
+  static const _minSize = 8;
+  static final _deletedEntry = new _WeakProperty(null, null);
 
   /* patch */ T operator[](Object object) {
     _checkType(object);
-    var doCompact = false;
-    var result = null;
-    for (int i = 0; i < _data.length; ++i) {
-      var key = _data[i].key;
-      if (identical(key, object)) {
-        result = _data[i].value;
-        break;
+
+    var mask = _size - 1;
+    var idx = object.hashCode & mask;
+    var wp = _data[idx];
+
+    while (wp != null) {
+      if (identical(wp.key, object)) {
+        return wp.value;
+      } else if (wp.key == null) {
+        // This entry has been cleared by the GC.
+        _data[idx] = _deletedEntry;
       }
-      if (key == null) {
-        doCompact = true;
-        _data[i] = null;
-      }
+      idx = (idx + 1) & mask;
+      wp = _data[idx];
     }
-    if (doCompact) {
-      _data = _data.where((e) => (e != null)).toList();
-    }
-    return result;
+
+    return null;
   }
 
   /* patch */ void operator[]=(Object object, T value) {
     _checkType(object);
-    var doCompact = false;
-    int i = 0;
-    for (; i < _data.length; ++i) {
-      var key = _data[i].key;
-      if (identical(key, object)) {
-        break;
+
+    var mask = _size - 1;
+    var idx = object.hashCode & mask;
+    var empty_idx = -1;
+    var wp = _data[idx];
+
+    while (wp != null) {
+      if (identical(wp.key, object)) {
+        if (value != null) {
+          // Update the associated value.
+          wp.value = value;
+        } else {
+          // Mark the entry as deleted.
+          _data[idx] = _deletedEntry;
+        }
+        return;
+      } else if ((empty_idx < 0) && identical(wp, _deletedEntry)) {
+        empty_idx = idx;  // Insert at this location if not found.
+      } else if (wp.key == null) {
+        // This entry has been cleared by the GC.
+        _data[idx] = _deletedEntry;
+        if (empty_idx < 0) {
+          empty_idx = idx;  // Insert at this location if not found.
+        }
       }
-      if (key == null) {
-        doCompact = true;
-        _data[i] = null;
+      idx = (idx + 1) & mask;
+      wp = _data[idx];
+    }
+
+    if (value == null) {
+      // Not entering a null value. We just needed to make sure to clear an
+      // existing value if it existed. 
+      return;
+    }
+
+    if (empty_idx >= 0) {
+      // We will be reusing the empty slot below.
+      _used--;
+      idx = empty_idx;
+    }
+
+    if (_used < _limit) {
+      _data[idx] = new _WeakProperty(object, value);
+      _used++;
+      return;
+    }
+
+    // Grow/reallocate if too many slots have been used.
+    _rehash();
+    this[object] = value;  // Recursively add the value.
+  }
+
+  _rehash() {
+    // Determine the population count of the map to allocate an appropriately
+    // sized map below.
+    var count = 0;
+    var old_data = _data;
+    var len = old_data.length;
+    for (var i = 0; i < len; i++) {
+      var entry = old_data[i];
+      if ((entry != null) && (entry.key != null)) {
+        // Only count non-cleared entries.
+        count++;
       }
     }
-    if (i != _data.length && value == null) {
-      doCompact = true;
-      _data[i] = null;
-    } else if (i != _data.length) {
-      _data[i].value = value;
-    } else {
-      _data.add(new _WeakProperty(object, value));
+
+    var new_size = _size;
+    if (count <= (new_size >> 2)) {
+      new_size = new_size >> 1;
+    } else if (count > (new_size >> 1)) {
+      new_size = new_size << 1;
     }
-    if (doCompact) {
-      _data = _data.where((e) => (e != null)).toList();
+    new_size = (new_size < _minSize) ? _minSize : new_size;
+
+    // Reset the mappings to empty so that we can just add the existing
+    // valid entries.
+    _data = new List(new_size);
+    _used = 0;
+
+    for (var i = 0; i < old_data.length; i++) {
+      var entry = old_data[i];
+      if ((entry != null) && (entry.key != null)) {
+        this[entry.key] = entry.value;
+      }
     }
   }
 
   static _checkType(object) {
-    if (object == null || object is bool || object is num || object is String) {
+    if ((object == null) ||
+         (object is bool) ||
+         (object is num) ||
+         (object is String)) {
       throw new ArgumentError(object);
     }
   }
 
+  get _size => _data.length;
+  get _limit => (3 * (_size ~/ 4));
+
   List _data;
+  int _used;  // Number of used (active and deleted) slots.
 }
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index d58492e..812a71a 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -337,7 +337,7 @@
   }
 
   String toString() {
-    return ToString.iterableToString(this);
+    return IterableMixinWorkaround.toStringIterable(this, '[', ']');
   }
 
   Iterator<T> get iterator {
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index efb2d16..3cb8690 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -6,6 +6,7 @@
 #include "include/dart_debugger_api.h"
 #include "include/dart_mirrors_api.h"
 #include "vm/dart_api_impl.h"
+#include "vm/dart_api_state.h"  // TODO(11742): Remove with CreateMirrorRef.
 #include "vm/bootstrap_natives.h"
 #include "vm/dart_entry.h"
 #include "vm/exceptions.h"
@@ -160,6 +161,20 @@
   return vm_ref;
 }
 
+
+// TODO(11742): Remove once there are no more users of the Dart_Handle-based
+// VMReferences.
+static Dart_Handle CreateMirrorReference(Dart_Handle handle) {
+  Isolate* isolate = Isolate::Current();
+  DARTSCOPE(isolate);
+  const Object& referent = Object::Handle(isolate, Api::UnwrapHandle(handle));
+  const MirrorReference& reference =
+       MirrorReference::Handle(MirrorReference::New());
+  reference.set_referent(referent);
+  return Api::NewHandle(isolate, reference.raw());
+}
+
+
 static Dart_Handle StringFromSymbol(Dart_Handle symbol) {
   Dart_Handle result = Dart_Invoke(MirrorLib(), NewString("_n"), 1, &symbol);
   return result;
@@ -597,8 +612,9 @@
   }
 
   Dart_Handle args[] = {
+    CreateMirrorReference(intf),
     CreateVMReference(intf),
-    intf_name,
+    Dart_Null(),  // "name"
     Dart_NewBoolean(Dart_IsClass(intf)),
     lib_mirror,
     CreateLazyMirror(super_class),
@@ -614,7 +630,6 @@
 
 
 static Dart_Handle CreateMethodMirror(Dart_Handle func,
-                                      Dart_Handle func_name,
                                       Dart_Handle owner_mirror) {
   ASSERT(Dart_IsFunction(func));
   Dart_Handle mirror_cls_name = NewString("_LocalMethodMirrorImpl");
@@ -666,7 +681,7 @@
 
   // TODO(turnidge): Implement constructor kinds (arguments 7 - 10).
   Dart_Handle args[] = {
-    func_name,
+    CreateMirrorReference(func),
     owner_mirror,
     CreateParameterMirrorList(func),
     CreateLazyMirror(return_type),
@@ -790,7 +805,7 @@
       continue;
     }
 
-    Dart_Handle func_mirror = CreateMethodMirror(func, func_name, owner_mirror);
+    Dart_Handle func_mirror = CreateMethodMirror(func, owner_mirror);
     if (Dart_IsError(func_mirror)) {
       return func_mirror;
     }
@@ -834,7 +849,7 @@
       continue;
     }
 
-    Dart_Handle func_mirror = CreateMethodMirror(func, func_name, owner_mirror);
+    Dart_Handle func_mirror = CreateMethodMirror(func, owner_mirror);
     if (Dart_IsError(func_mirror)) {
       return func_mirror;
     }
@@ -1070,7 +1085,6 @@
     }
 
     // TODO(turnidge): Why not use the real function name here?
-    Dart_Handle func_name = NewString("call");
     Dart_Handle func_owner = Dart_FunctionOwner(func);
     if (Dart_IsError(func_owner)) {
       return func_owner;
@@ -1079,7 +1093,7 @@
     // TODO(turnidge): Pass the function owner here.  This will require
     // us to support functions in CreateLazyMirror.
     Dart_Handle func_mirror =
-        CreateMethodMirror(func, func_name, Dart_Null());
+        CreateMethodMirror(func, Dart_Null());
     if (Dart_IsError(func_mirror)) {
       return func_mirror;
     }
@@ -1398,10 +1412,28 @@
   Dart_ExitScope();
 }
 
+
 void HandleMirrorsMessage(Isolate* isolate,
                           Dart_Port reply_port,
                           const Instance& message) {
   UNIMPLEMENTED();
 }
 
+
+DEFINE_NATIVE_ENTRY(ClassMirror_name, 1) {
+  const MirrorReference& klass_ref =
+      MirrorReference::CheckedHandle(arguments->NativeArgAt(0));
+  Class& klass = Class::Handle();
+  klass ^= klass_ref.referent();
+  return klass.Name();
+}
+
+DEFINE_NATIVE_ENTRY(MethodMirror_name, 1) {
+  const MirrorReference& func_ref =
+      MirrorReference::CheckedHandle(arguments->NativeArgAt(0));
+  Function& func = Function::Handle();
+  func ^= func_ref.referent();
+  return func.UserVisibleName();
+}
+
 }  // namespace dart
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 407060b..219b45b 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -83,13 +83,17 @@
   final Map<Uri, LibraryMirror> libraries;
   final IsolateMirror isolate;
 
+  // TODO(11743): dynamicType and voidType should not respond to the 
+  // ClassMirror protocol, so they should not inherit from the ClassMirror
+  // implementation.
+
   TypeMirror _dynamicType = null;
 
   TypeMirror get dynamicType {
     if (_dynamicType == null) {
       _dynamicType =
           new _LocalClassMirrorImpl(
-              null, 'dynamic', false, null, null, [], null,
+              null, null, 'dynamic', false, null, null, [], null,
               const {}, const {}, const {});
     }
     return _dynamicType;
@@ -101,7 +105,7 @@
     if (_voidType == null) {
       _voidType =
           new _LocalClassMirrorImpl(
-              null, 'void', false, null, null, [], null,
+              null, null, 'void', false, null, null, [], null,
               const {}, const {}, const {});
     }
     return _voidType;
@@ -376,7 +380,8 @@
 
 class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
     implements ClassMirror {
-  _LocalClassMirrorImpl(ref,
+  _LocalClassMirrorImpl(this._reflectee,
+                        ref,
                         String simpleName,
                         this.isClass,
                         this._owner,
@@ -386,13 +391,23 @@
                         Map<String, Mirror> members,
                         Map<String, Mirror> constructors,
                         Map<String, Mirror> typeVariables)
-      : this.simpleName = _s(simpleName),
+      : this._simpleName = _s(simpleName),
         this.members = _convertStringToSymbolMap(members),
         this.constructors = _convertStringToSymbolMap(constructors),
         this.typeVariables = _convertStringToSymbolMap(typeVariables),
         super(ref);
 
-  final Symbol simpleName;
+  final _MirrorReference _reflectee;
+
+  Symbol _simpleName;
+  Symbol get simpleName {
+    // dynamic, void and the function types have their names set eagerly in the
+    // constructor.
+    if(_simpleName == null) {
+      _simpleName = _s(_ClassMirror_name(_reflectee));
+    }
+    return _simpleName;
+  }
 
   Symbol _qualifiedName = null;
   Symbol get qualifiedName {
@@ -558,6 +573,9 @@
 
   static _invokeConstructor(ref, constructorName, positionalArguments, async)
       native 'LocalClassMirrorImpl_invokeConstructor';
+
+  static String _ClassMirror_name(reflectee)
+      native "ClassMirror_name";
 }
 
 class _LazyFunctionTypeMirror {
@@ -578,7 +596,8 @@
                                simpleName,
                                this._returnType,
                                this.parameters)
-      : super(ref,
+      : super(null,
+              ref,
               simpleName,
               true,
               null,
@@ -810,7 +829,7 @@
 
 class _LocalMethodMirrorImpl extends _LocalMirrorImpl
     implements MethodMirror {
-  _LocalMethodMirrorImpl(String simpleName,
+  _LocalMethodMirrorImpl(this._reflectee,
                          this._owner,
                          this.parameters,
                          this._returnType,
@@ -822,10 +841,17 @@
                          this.isConstConstructor,
                          this.isGenerativeConstructor,
                          this.isRedirectingConstructor,
-                         this.isFactoryConstructor)
-      : this.simpleName = _s(simpleName);
+                         this.isFactoryConstructor);
 
-  final Symbol simpleName;
+  final _MirrorReference _reflectee;
+
+  Symbol _simpleName = null;
+  Symbol get simpleName {
+    if (_simpleName == null) {
+      _simpleName = _s(_MethodMirror_name(_reflectee));
+    }
+    return _simpleName;
+  }
 
   Symbol _qualifiedName = null;
   Symbol get qualifiedName {
@@ -913,6 +939,9 @@
   }
 
   String toString() => "MethodMirror on '${_n(simpleName)}'";
+
+  static String _MethodMirror_name(reflectee)
+      native "MethodMirror_name";
 }
 
 class _LocalVariableMirrorImpl extends _LocalMirrorImpl
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index a4a3faf..d9b0c65 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -5,6 +5,7 @@
 #include "vm/bootstrap_natives.h"
 
 #include "vm/exceptions.h"
+#include "vm/heap.h"
 #include "vm/native_entry.h"
 #include "vm/object.h"
 #include "vm/stack_frame.h"
@@ -21,6 +22,22 @@
 }
 
 
+DEFINE_NATIVE_ENTRY(Object_getHash, 1) {
+  const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
+  Heap* heap = isolate->heap();
+  return Smi::New(heap->GetHash(instance.raw()));
+}
+
+
+DEFINE_NATIVE_ENTRY(Object_setHash, 2) {
+  const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
+  GET_NON_NULL_NATIVE_ARGUMENT(Smi, hash, arguments->NativeArgAt(1));
+  Heap* heap = isolate->heap();
+  heap->SetHash(instance.raw(), hash.Value());
+  return Object::null();
+}
+
+
 DEFINE_NATIVE_ENTRY(Object_toString, 1) {
   const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
   const char* c_str = instance.ToCString();
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index 72b158a..8ef62a9 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -4,20 +4,26 @@
 
 patch class Object {
 
-  // Helpers used to implement hashCode. If a hashCode is used we remember it
-  // using an Expando object. A new hashCode value is calculated using a Random
+  // Helpers used to implement hashCode. If a hashCode is used, we remember it
+  // in a weak table in the VM. A new hashCode value is calculated using a
   // number generator.
-  static Expando _hashCodeExp = new Expando("Object.hashCode");
-  static Random _hashCodeRnd = new Random();
+  static final _hashCodeRnd = new Random();
+
+  static _getHash(obj) native "Object_getHash";
+  static _setHash(obj, hash) native "Object_setHash";
 
   /* patch */ int get hashCode {
     if (this == null) {
       return 2011;  // The year Dart was announced and a prime.
     }
-    var result = _hashCodeExp[this];
-    if (result == null) {
-      result = _hashCodeRnd.nextInt(0x40000000);  // Stay in Smi range.
-      _hashCodeExp[this] = result;
+    var result = _getHash(this);
+    if (result == 0) {
+      // We want the hash to be a Smi value greater than 0.
+      result = _hashCodeRnd.nextInt(0x40000000);
+      while (result == 0) {
+        result = _hashCodeRnd.nextInt(0x40000000);
+      }
+      _setHash(this, result);
     }
     return result;
   }
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index 04f6fa9..f2fde0d 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -279,6 +279,7 @@
 // the collection and list interfaces.
 
 abstract class _TypedListBase {
+
   // Method(s) implementing the Collection interface.
   bool contains(element) => IterableMixinWorkaround.contains(this, element);
 
@@ -505,7 +506,7 @@
   // Method(s) implementing Object interface.
 
   String toString() {
-    return ToString.iterableToString(this);
+    return IterableMixinWorkaround.toStringIterable(this, '[', ']');
   }
 
 
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 8f82b99..9e45e89 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -54,10 +54,6 @@
 # Skip until we stabilize language tests.
 *: Skip
 
-[ $arch == arm && $mode == release ]
-dart/byte_array_optimized_test: Crash
-dart/byte_array_test: Crash
-
 [ $arch == mips ]
 *: Skip
 
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index fcb4759..d944996 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -8,6 +8,7 @@
 #include "vm/assembler.h"
 #include "vm/simulator.h"
 #include "vm/runtime_entry.h"
+#include "vm/stack_frame.h"
 #include "vm/stub_code.h"
 
 // An extra check since we are assuming the existence of /proc/cpuinfo below.
@@ -2046,6 +2047,7 @@
 
 void Assembler::EnterDartFrame(intptr_t frame_size) {
   const intptr_t offset = CodeSize();
+
   // Save PC in frame for fast identification of corresponding code.
   // Note that callee-saved registers can be added to the register list.
   EnterFrame((1 << PP) | (1 << FP) | (1 << LR) | (1 << PC), 0);
@@ -2066,6 +2068,27 @@
 }
 
 
+// On entry to a function compiled for OSR, the caller's frame pointer, the
+// stack locals, and any copied parameters are already in place.  The frame
+// pointer is already set up.  The PC marker is not correct for the
+// optimized function and there may be extra space for spill slots to
+// allocate. We must also set up the pool pointer for the function.
+void Assembler::EnterOsrFrame(intptr_t extra_size) {
+  const intptr_t offset = CodeSize();
+
+  Comment("EnterOsrFrame");
+  mov(TMP, ShifterOperand(PC));
+
+  AddImmediate(TMP, -offset);
+  str(TMP, Address(FP, kPcMarkerSlotFromFp * kWordSize));
+
+  // Setup pool pointer for this dart function.
+  LoadPoolPointer();
+
+  AddImmediate(SP, -extra_size);
+}
+
+
 void Assembler::LeaveDartFrame() {
   LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
   // Adjust SP for PC pushed in EnterDartFrame.
diff --git a/runtime/vm/assembler_arm.h b/runtime/vm/assembler_arm.h
index 7696e03..3117d48 100644
--- a/runtime/vm/assembler_arm.h
+++ b/runtime/vm/assembler_arm.h
@@ -665,6 +665,11 @@
   void EnterDartFrame(intptr_t frame_size);
   void LeaveDartFrame();
 
+  // Set up a Dart frame for a function compiled for on-stack replacement.
+  // The frame layout is a normal Dart frame, but the frame is partially set
+  // up on entry (it is the frame of the unoptimized code).
+  void EnterOsrFrame(intptr_t extra_size);
+
   // Set up a stub frame so that the stack traversal code can easily identify
   // a stub frame.
   void EnterStubFrame(bool uses_pp = false);
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index 55e0f44..810efc5 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2212,6 +2212,7 @@
 // optimized function and there may be extra space for spill slots to
 // allocate.
 void Assembler::EnterOsrFrame(intptr_t extra_size) {
+  Comment("EnterOsrFrame");
   Label dart_entry;
   call(&dart_entry);
   Bind(&dart_entry);
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index 40db73b..5a9716f 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -8,6 +8,7 @@
 #include "vm/assembler.h"
 #include "vm/runtime_entry.h"
 #include "vm/simulator.h"
+#include "vm/stack_frame.h"
 #include "vm/stub_code.h"
 
 namespace dart {
@@ -475,19 +476,12 @@
       Instructions::HeaderSize() - Instructions::object_pool_offset() +
       CodeSize();
 
-  // This sw instruction is the return address for the bal, so T0 holds
-  // the PC at this sw instruction.
+  // TMP1 has the address of the next instruction.
   Bind(&next);
 
   // Save PC in frame for fast identification of corresponding code.
-  if (offset == 0) {
-    sw(TMP1, Address(SP, 3 * kWordSize));
-  } else {
-    // Adjust saved PC for any intrinsic code that could have been generated
-    // before a frame is created.
-    addiu(TMP1, TMP1, Immediate(-offset));
-    sw(TMP1, Address(SP, 3 * kWordSize));
-  }
+  AddImmediate(TMP1, -offset);
+  sw(TMP1, Address(SP, 3 * kWordSize));
 
   // Set FP to the saved previous FP.
   addiu(FP, SP, Immediate(kWordSize));
@@ -500,6 +494,46 @@
 }
 
 
+// On entry to a function compiled for OSR, the caller's frame pointer, the
+// stack locals, and any copied parameters are already in place.  The frame
+// pointer is already set up.  The PC marker is not correct for the
+// optimized function and there may be extra space for spill slots to
+// allocate. We must also set up the pool pointer for the function.
+void Assembler::EnterOsrFrame(intptr_t extra_size) {
+  Comment("EnterOsrFrame");
+  Label next;
+  // Branch and link to the instruction after the delay slot to get the PC.
+  bal(&next);
+  // RA is the address of the sw instruction below. Save it in T0.
+  delay_slot()->mov(TMP, RA);
+
+  // The runtime system assumes that the code marker address is
+  // kEntryPointToPcMarkerOffset bytes from the entry.  Since there is no
+  // code to set up the frame pointer, etc., the address needs to be adjusted.
+  const intptr_t offset = kEntryPointToPcMarkerOffset - CodeSize();
+  // Calculate the offset of the pool pointer from the PC.
+  const intptr_t object_pool_pc_dist =
+      Instructions::HeaderSize() - Instructions::object_pool_offset() +
+      CodeSize();
+
+  // temp has the address of the next instruction.
+  Bind(&next);
+
+  // Adjust PC by the offset, and store it in the stack frame.
+  AddImmediate(TMP, TMP, offset);
+  sw(TMP, Address(FP, kPcMarkerSlotFromFp * kWordSize));
+
+  // Restore return address.
+  lw(RA, Address(FP, 1 * kWordSize));
+
+  // Load the pool pointer. offset has already been subtracted from temp.
+  lw(PP, Address(TMP, -object_pool_pc_dist - offset));
+
+  // Reserve space for locals.
+  AddImmediate(SP, -extra_size);
+}
+
+
 void Assembler::LeaveDartFrame() {
   addiu(SP, FP, Immediate(-kWordSize));
 
diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h
index d5fa6e0..bb2bb35 100644
--- a/runtime/vm/assembler_mips.h
+++ b/runtime/vm/assembler_mips.h
@@ -1076,6 +1076,11 @@
   void LeaveDartFrame();
   void LeaveDartFrameAndReturn();
 
+  // Set up a Dart frame for a function compiled for on-stack replacement.
+  // The frame layout is a normal Dart frame, but the frame is partially set
+  // up on entry (it is the frame of the unoptimized code).
+  void EnterOsrFrame(intptr_t extra_size);
+
  private:
   AssemblerBuffer buffer_;
   GrowableObjectArray& object_pool_;  // Objects and patchable jump targets.
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index e1c8452..809b4db 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -137,6 +137,11 @@
 }
 
 
+const char* TypeNode::Name() const {
+  return String::Handle(type().UserVisibleName()).ToCString();
+}
+
+
 bool ComparisonNode::IsKindValid() const {
   return Token::IsRelationalOperator(kind_)
       || Token::IsEqualityOperator(kind_)
@@ -405,6 +410,11 @@
 }
 
 
+const char* LoadLocalNode::Name() const {
+  return local().name().ToCString();
+}
+
+
 bool LoadLocalNode::IsPotentiallyConst() const {
   // Parameters of const constructors are implicitly final and can be
   // used in initializer expressions.
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 7e13bef..9f1b610 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -358,6 +358,8 @@
 
   const AbstractType& type() const { return type_; }
 
+  virtual const char* Name() const;
+
   virtual const Instance* EvalConstExpr() const {
     if (!type_.IsInstantiated() || type_.IsMalformed()) {
       return NULL;
@@ -963,6 +965,7 @@
 
   virtual void VisitChildren(AstNodeVisitor* visitor) const { }
 
+  virtual const char* Name() const;
   virtual const Instance* EvalConstExpr() const;
   virtual bool IsPotentiallyConst() const;
   virtual AstNode* MakeAssignmentNode(AstNode* rhs);
diff --git a/runtime/vm/bit_vector.cc b/runtime/vm/bit_vector.cc
index 90c074a..1e6f1ef 100644
--- a/runtime/vm/bit_vector.cc
+++ b/runtime/vm/bit_vector.cc
@@ -41,8 +41,8 @@
   }
   if (i < data_length_) {
     // Don't compare bits beyond length_.
-    uword mask =
-        static_cast<uword>(-1) >> (kBitsPerWord - (length_ % kBitsPerWord));
+    const intptr_t shift_size = (kBitsPerWord - length_) & (kBitsPerWord - 1);
+    const uword mask = static_cast<uword>(-1) >> shift_size;
     if ((data_[i] & mask) != (other.data_[i] & mask)) return false;
   }
   return true;
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 29b9253..df3fc8c0 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -13,6 +13,8 @@
 
 // List of bootstrap native entry points used in the core dart library.
 #define BOOTSTRAP_NATIVE_LIST(V)                                               \
+  V(Object_getHash, 1)                                                         \
+  V(Object_setHash, 2)                                                         \
   V(Object_toString, 1)                                                        \
   V(Object_noSuchMethod, 6)                                                    \
   V(Object_runtimeType, 1)                                                     \
@@ -243,6 +245,8 @@
   V(LocalObjectMirrorImpl_setField, 4)                                         \
   V(LocalClosureMirrorImpl_apply, 3)                                           \
   V(LocalClassMirrorImpl_invokeConstructor, 4)                                 \
+  V(ClassMirror_name, 1)                                                       \
+  V(MethodMirror_name, 1)                                                      \
   V(GrowableObjectArray_allocate, 2)                                           \
   V(GrowableObjectArray_getIndexed, 2)                                         \
   V(GrowableObjectArray_setIndexed, 3)                                         \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 4b2e6db..bd9f25c 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -957,8 +957,7 @@
     function = super_class.LookupFunction(name);
     if (!function.IsNull() &&
         !function.is_static() &&
-        !function.IsMethodExtractor() &&
-        !function.IsNoSuchMethodDispatcher()) {
+        !function.IsMethodExtractor()) {
       return super_class.raw();
     }
     super_class = super_class.SuperClass();
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index fcd8ce1..f778d61 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -57,11 +57,7 @@
 DECLARE_FLAG(bool, report_usage_count);
 DECLARE_FLAG(bool, trace_type_checks);
 
-#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement.");
-#else
-DEFINE_FLAG(bool, use_osr, false, "Use on-stack replacement.");
-#endif
 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement.");
 
 
@@ -218,6 +214,34 @@
 }
 
 
+// Instantiate type.
+// Arg0: uninstantiated type.
+// Arg1: instantiator type arguments.
+// Return value: instantiated type.
+DEFINE_RUNTIME_ENTRY(InstantiateType, 2) {
+  ASSERT(arguments.ArgCount() == kInstantiateTypeRuntimeEntry.argument_count());
+  AbstractType& type = AbstractType::CheckedHandle(arguments.ArgAt(0));
+  const AbstractTypeArguments& instantiator =
+      AbstractTypeArguments::CheckedHandle(arguments.ArgAt(1));
+  ASSERT(!type.IsNull() && !type.IsInstantiated());
+  ASSERT(instantiator.IsNull() || instantiator.IsInstantiated());
+  Error& malformed_error = Error::Handle();
+  type = type.InstantiateFrom(instantiator, &malformed_error);
+  if (!malformed_error.IsNull()) {
+    // Throw a dynamic type error.
+    const intptr_t location = GetCallerLocation();
+    String& malformed_error_message =  String::Handle(
+        String::New(malformed_error.ToErrorCString()));
+    Exceptions::CreateAndThrowTypeError(
+        location, Symbols::Empty(), Symbols::Empty(),
+        Symbols::Empty(), malformed_error_message);
+    UNREACHABLE();
+  }
+  ASSERT(!type.IsNull() && type.IsInstantiated());
+  arguments.SetReturn(type);
+}
+
+
 // Instantiate type arguments.
 // Arg0: uninstantiated type arguments.
 // Arg1: instantiator type arguments.
@@ -1169,9 +1193,7 @@
                                                getter_name,
                                                kNumArguments,
                                                kNumNamedArguments));
-  if (getter.IsNull() ||
-      getter.IsMethodExtractor() ||
-      getter.IsNoSuchMethodDispatcher()) {
+  if (getter.IsNull() || getter.IsMethodExtractor()) {
     return false;
   }
 
@@ -1193,41 +1215,6 @@
 }
 
 
-// Create a method for noSuchMethod invocation and attach it to the receiver
-// class.
-static RawFunction* CreateNoSuchMethodDispatcher(
-    const String& target_name,
-    const Class& receiver_class,
-    const Array& arguments_descriptor) {
-  Function& invocation = Function::Handle(
-      Function::New(String::Handle(Symbols::New(target_name)),
-                    RawFunction::kNoSuchMethodDispatcher,
-                    false,  // Not static.
-                    false,  // Not const.
-                    false,  // Not abstract.
-                    false,  // Not external.
-                    receiver_class,
-                    0));  // No token position.
-
-  // Initialize signature: receiver is a single fixed parameter.
-  const intptr_t kNumParameters = 1;
-  invocation.set_num_fixed_parameters(kNumParameters);
-  invocation.SetNumOptionalParameters(0, 0);
-  invocation.set_parameter_types(Array::Handle(Array::New(kNumParameters,
-                                                         Heap::kOld)));
-  invocation.set_parameter_names(Array::Handle(Array::New(kNumParameters,
-                                                         Heap::kOld)));
-  invocation.SetParameterTypeAt(0, Type::Handle(Type::DynamicType()));
-  invocation.SetParameterNameAt(0, Symbols::This());
-  invocation.set_result_type(Type::Handle(Type::DynamicType()));
-  invocation.set_is_visible(false);  // Not visible in stack trace.
-
-  receiver_class.AddFunction(invocation);
-
-  return invocation.raw();
-}
-
-
 // The IC miss handler has failed to find a (cacheable) instance function to
 // invoke.  Handle three possibilities:
 //
@@ -1263,35 +1250,29 @@
                                 args,
                                 &result)) {
     ArgumentsDescriptor desc(args_descriptor);
-    Function& target_function = Function::Handle(
-        Resolver::ResolveDynamicAnyArgs(receiver_class, target_name));
-    // Check number of arguments and check that there is not already a method
-    // with the same name present.
-    // TODO(fschneider): Handle multiple arguments.
-    if (target_function.IsNull() &&
-        (desc.Count() == 1) && (desc.PositionalCount() == 1)) {
-      // Create Function for noSuchMethodInvocation and add it to the class.
-      target_function ^= CreateNoSuchMethodDispatcher(target_name,
-                                                      receiver_class,
-                                                      args_descriptor);
-
-      // Update IC data.
-      ASSERT(!target_function.IsNull());
+    const Function& target_function = Function::Handle(
+        receiver_class.GetNoSuchMethodDispatcher(target_name, args_descriptor));
+    // Update IC data.
+    ASSERT(!target_function.IsNull());
+    if (ic_data.num_args_tested() == 1) {
       ic_data.AddReceiverCheck(receiver.GetClassId(), target_function);
-      if (FLAG_trace_ic) {
-        OS::PrintErr("NoSuchMethod IC miss: adding <%s> id:%"Pd" -> <%s>\n",
-            Class::Handle(receiver.clazz()).ToCString(),
-            receiver.GetClassId(),
-            target_function.ToCString());
-      }
-      result =
-          DartEntry::InvokeFunction(target_function, args, args_descriptor);
     } else {
-      result = DartEntry::InvokeNoSuchMethod(receiver,
-                                             target_name,
-                                             args,
-                                             args_descriptor);
+      // Operators calls have two or three arguments tested ([], []=, etc.)
+      ASSERT(ic_data.num_args_tested() > 1);
+      GrowableArray<intptr_t> class_ids(ic_data.num_args_tested());
+      class_ids.Add(receiver.GetClassId());
+      for (intptr_t i = 1; i < ic_data.num_args_tested(); ++i) {
+        class_ids.Add(Object::Handle(args.At(i)).GetClassId());
+      }
+      ic_data.AddCheck(class_ids, target_function);
     }
+    if (FLAG_trace_ic) {
+      OS::PrintErr("NoSuchMethod IC miss: adding <%s> id:%"Pd" -> <%s>\n",
+          Class::Handle(receiver.clazz()).ToCString(),
+          receiver.GetClassId(),
+          target_function.ToCString());
+    }
+    result = DartEntry::InvokeFunction(target_function, args, args_descriptor);
   }
   CheckResultError(result);
   arguments.SetReturn(result);
@@ -1342,7 +1323,11 @@
 DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
   ASSERT(arguments.ArgCount() ==
          kStackOverflowRuntimeEntry.argument_count());
+#if defined(USING_SIMULATOR)
+  uword stack_pos = Simulator::Current()->get_register(SPREG);
+#else
   uword stack_pos = reinterpret_cast<uword>(&arguments);
+#endif
 
   // If an interrupt happens at the same time as a stack overflow, we
   // process the stack overflow first.
diff --git a/runtime/vm/code_generator.h b/runtime/vm/code_generator.h
index c791651..2461594 100644
--- a/runtime/vm/code_generator.h
+++ b/runtime/vm/code_generator.h
@@ -37,6 +37,7 @@
 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs);
 DECLARE_RUNTIME_ENTRY(InstanceFunctionLookup);
 DECLARE_RUNTIME_ENTRY(Instanceof);
+DECLARE_RUNTIME_ENTRY(InstantiateType);
 DECLARE_RUNTIME_ENTRY(InstantiateTypeArguments);
 DECLARE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction);
 DECLARE_RUNTIME_ENTRY(MegamorphicCacheMissHandler);
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 300e5b3..e401374 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -210,12 +210,9 @@
 }
 
 
-void Dart::ShutdownIsolate() {
+void Dart::RunShutdownCallback() {
   Isolate* isolate = Isolate::Current();
   void* callback_data = isolate->init_callback_data();
-  isolate->Shutdown();
-  delete isolate;
-
   Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
   if (callback != NULL) {
     (callback)(callback_data);
@@ -223,6 +220,13 @@
 }
 
 
+void Dart::ShutdownIsolate() {
+  Isolate* isolate = Isolate::Current();
+  isolate->Shutdown();
+  delete isolate;
+}
+
+
 uword Dart::AllocateReadOnlyHandle() {
   ASSERT(Isolate::Current() == Dart::vm_isolate());
   ASSERT(predefined_handles_ != NULL);
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index 61a7a7b..d1c592a 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -31,6 +31,7 @@
 
   static Isolate* CreateIsolate(const char* name_prefix);
   static RawError* InitializeIsolate(const uint8_t* snapshot, void* data);
+  static void RunShutdownCallback();
   static void ShutdownIsolate();
 
   static Isolate* vm_isolate() { return vm_isolate_; }
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index c002066..3cb5b75 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -798,7 +798,13 @@
 
 
 DART_EXPORT void Dart_ShutdownIsolate() {
-  CHECK_ISOLATE(Isolate::Current());
+  Isolate* isolate = Isolate::Current();
+  CHECK_ISOLATE(isolate);
+  {
+    StackZone zone(isolate);
+    HandleScope handle_scope(isolate);
+    Dart::RunShutdownCallback();
+  }
   STOP_TIMER(time_total_runtime);
   Dart::ShutdownIsolate();
 }
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index c030ea6..84da4ac 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -7079,6 +7079,72 @@
   Isolate::SetShutdownCallback(saved);
 }
 
+static int64_t add_result = 0;
+static void IsolateShutdownRunDartCodeTestCallback(void* callback_data) {
+  Dart_EnterScope();
+  Dart_Handle lib = Dart_RootLibrary();
+  EXPECT_VALID(lib);
+  Dart_Handle arg1 = Dart_NewInteger(90);
+  EXPECT_VALID(arg1);
+  Dart_Handle arg2 = Dart_NewInteger(9);
+  EXPECT_VALID(arg2);
+  Dart_Handle dart_args[2] = { arg1, arg2 };
+  Dart_Handle result = Dart_Invoke(lib, NewString("add"), 2, dart_args);
+  EXPECT_VALID(result);
+  result = Dart_IntegerToInt64(result, &add_result);
+  EXPECT_VALID(result);
+  Dart_ExitScope();
+}
+
+UNIT_TEST_CASE(IsolateShutdownRunDartCode) {
+  const char* kScriptChars =
+      "int add(int a, int b) {\n"
+      "  return a + b;\n"
+      "}\n"
+      "\n"
+      "void main() {\n"
+      "  add(4, 5);\n"
+      "}\n";
+
+  // Create an isolate.
+  char* err;
+  Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL,
+                                            bin::snapshot_buffer,
+                                            NULL, &err);
+  if (isolate == NULL) {
+    OS::Print("Creation of isolate failed '%s'\n", err);
+    free(err);
+  }
+  EXPECT(isolate != NULL);
+
+  Isolate::SetShutdownCallback(IsolateShutdownRunDartCodeTestCallback);
+
+  {
+    Dart_EnterScope();
+    Dart_Handle url = NewString(TestCase::url());
+    Dart_Handle source = NewString(kScriptChars);
+    Dart_Handle result = Dart_SetLibraryTagHandler(TestCase::library_handler);
+    EXPECT_VALID(result);
+    Dart_Handle lib = Dart_LoadScript(url, source, 0, 0);
+    EXPECT_VALID(lib);
+    result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+    EXPECT_VALID(result);
+    Dart_ExitScope();
+  }
+
+
+  // The shutdown callback has not been called.
+  EXPECT_EQ(0, add_result);
+
+  EXPECT(isolate != NULL);
+
+  // Shutdown the isolate.
+  Dart_ShutdownIsolate();
+
+  // The shutdown callback has been called and ran Dart code.
+  EXPECT_EQ(99, add_result);
+}
+
 static int64_t GetValue(Dart_Handle arg) {
   EXPECT_VALID(arg);
   EXPECT(Dart_IsInteger(arg));
@@ -7965,18 +8031,17 @@
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
   Dart_Handle result = Dart_Invoke(lib,
-                                      NewString("testMain"),
-                                      0,
-                                      NULL);
+                                   NewString("testMain"),
+                                   0,
+                                   NULL);
   const char* expected_str = "constant string";
   const intptr_t kExpectedLen = 15;
-  int peer = 40;
   uint8_t ext_str[kExpectedLen];
   Dart_Handle str = Dart_MakeExternalString(result,
                                             ext_str,
                                             kExpectedLen,
-                                            &peer,
-                                            MakeExternalCback);
+                                            NULL,
+                                            NULL);
 
   EXPECT(Dart_IsExternalString(str));
   for (intptr_t i = 0; i < kExpectedLen; i++) {
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index ccb58e5..839407d 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -167,12 +167,19 @@
 }
 
 
-bool ArgumentsDescriptor::MatchesNameAt(intptr_t index,
-                                        const String& other) const {
+RawString* ArgumentsDescriptor::NameAt(intptr_t index) const {
   const intptr_t offset = kFirstNamedEntryIndex +
                           (index * kNamedEntrySize) +
                           kNameOffset;
-  return array_.At(offset) == other.raw();
+  String& result = String::Handle();
+  result ^= array_.At(offset);
+  return result.raw();
+}
+
+
+bool ArgumentsDescriptor::MatchesNameAt(intptr_t index,
+                                        const String& other) const {
+  return NameAt(index) == other.raw();
 }
 
 
diff --git a/runtime/vm/dart_entry.h b/runtime/vm/dart_entry.h
index aeab904..92d05af 100644
--- a/runtime/vm/dart_entry.h
+++ b/runtime/vm/dart_entry.h
@@ -37,6 +37,7 @@
   intptr_t Count() const;
   intptr_t PositionalCount() const;
   intptr_t NamedCount() const { return Count() - PositionalCount(); }
+  RawString* NameAt(intptr_t i) const;
   bool MatchesNameAt(intptr_t i, const String& other) const;
 
   // Generated code support.
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index e3700f6..e0d2fff 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -854,7 +854,18 @@
 
 
 void ValueGraphVisitor::VisitTypeNode(TypeNode* node) {
-  ReturnDefinition(new ConstantInstr(node->type()));
+  const AbstractType& type = node->type();
+  ASSERT(type.IsFinalized() && !type.IsMalformed());
+  if (type.IsInstantiated()) {
+    ReturnDefinition(new ConstantInstr(type));
+  } else {
+    const Class& instantiator_class = Class::ZoneHandle(
+        owner()->parsed_function()->function().Owner());
+    Value* instantiator_value = BuildInstantiatorTypeArguments(
+        node->token_pos(), instantiator_class, NULL);
+    ReturnDefinition(new InstantiateTypeInstr(
+        node->token_pos(), type, instantiator_class, instantiator_value));
+  }
 }
 
 
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index ca7c2fe..29bfc8f 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -23,6 +23,7 @@
 
 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
 DECLARE_FLAG(int, optimization_counter_threshold);
+DECLARE_FLAG(int, reoptimization_counter_threshold);
 DECLARE_FLAG(bool, print_ast);
 DECLARE_FLAG(bool, print_scopes);
 DECLARE_FLAG(bool, enable_type_checks);
@@ -1041,52 +1042,56 @@
 
 void FlowGraphCompiler::EmitFrameEntry() {
   const Function& function = parsed_function().function();
-  if (CanOptimizeFunction() && function.is_optimizable()) {
-    const bool can_optimize = !is_optimizing() || may_reoptimize();
+  if (CanOptimizeFunction() &&
+      function.is_optimizable() &&
+      (!is_optimizing() || may_reoptimize())) {
     const Register function_reg = R6;
-    if (can_optimize) {
-      // The pool pointer is not setup before entering the Dart frame.
 
-      // Preserve PP of caller.
-      __ mov(R7, ShifterOperand(PP));
+    // The pool pointer is not setup before entering the Dart frame.
+    // Preserve PP of caller.
+    __ mov(R7, ShifterOperand(PP));
+    // Temporarily setup pool pointer for this dart function.
+    __ LoadPoolPointer();
+    // Load function object from object pool.
+    __ LoadObject(function_reg, function);  // Uses PP.
+    // Restore PP of caller.
+    __ mov(PP, ShifterOperand(R7));
 
-      // Temporarily setup pool pointer for this dart function.
-      __ LoadPoolPointer();
-
-      // Load function object from object pool.
-      __ LoadObject(function_reg, function);  // Uses PP.
-
-      // Restore PP of caller.
-      __ mov(PP, ShifterOperand(R7));
-    }
     // Patch point is after the eventually inlined function object.
     AddCurrentDescriptor(PcDescriptors::kEntryPatch,
                          Isolate::kNoDeoptId,
                          0);  // No token position.
-    if (can_optimize) {
-      // Reoptimization of optimized function is triggered by counting in
+    intptr_t threshold = FLAG_optimization_counter_threshold;
+    __ ldr(R7, FieldAddress(function_reg,
+                            Function::usage_counter_offset()));
+    if (is_optimizing()) {
+      // Reoptimization of an optimized function is triggered by counting in
       // IC stubs, but not at the entry of the function.
-      if (!is_optimizing()) {
-        __ ldr(R7, FieldAddress(function_reg,
-                                Function::usage_counter_offset()));
-        __ add(R7, R7, ShifterOperand(1));
-        __ str(R7, FieldAddress(function_reg,
-                                Function::usage_counter_offset()));
-      } else {
-        __ ldr(R7, FieldAddress(function_reg,
-                                Function::usage_counter_offset()));
-      }
-      __ CompareImmediate(R7, FLAG_optimization_counter_threshold);
-      ASSERT(function_reg == R6);
-      __ Branch(&StubCode::OptimizeFunctionLabel(), GE);
+      threshold = FLAG_reoptimization_counter_threshold;
+    } else {
+      __ add(R7, R7, ShifterOperand(1));
+      __ str(R7, FieldAddress(function_reg,
+                              Function::usage_counter_offset()));
     }
-  } else {
+    __ CompareImmediate(R7, threshold);
+    ASSERT(function_reg == R6);
+    __ Branch(&StubCode::OptimizeFunctionLabel(), GE);
+  } else if (!flow_graph().IsCompiledForOsr()) {
     AddCurrentDescriptor(PcDescriptors::kEntryPatch,
                          Isolate::kNoDeoptId,
                          0);  // No token position.
   }
   __ Comment("Enter frame");
-  __ EnterDartFrame(StackSize() * kWordSize);
+  if (flow_graph().IsCompiledForOsr()) {
+    intptr_t extra_slots = StackSize()
+        - flow_graph().num_stack_locals()
+        - flow_graph().num_copied_params();
+    ASSERT(extra_slots >= 0);
+    __ EnterOsrFrame(extra_slots * kWordSize);
+  } else {
+    ASSERT(StackSize() >= 0);
+    __ EnterDartFrame(StackSize() * kWordSize);
+  }
 }
 
 
@@ -1123,10 +1128,10 @@
   if (num_copied_params == 0) {
 #ifdef DEBUG
     ASSERT(!parsed_function().function().HasOptionalParameters());
-    const bool check_arguments = true;
+    const bool check_arguments = !flow_graph().IsCompiledForOsr();
 #else
     const bool check_arguments =
-        function.IsClosureFunction() || function.IsNoSuchMethodDispatcher();
+        function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
 #endif
     if (check_arguments) {
       __ Comment("Check argument count");
@@ -1140,7 +1145,7 @@
       __ cmp(R0, ShifterOperand(R1));
       __ b(&correct_num_arguments, EQ);
       __ Bind(&wrong_num_arguments);
-      if (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) {
+      if (function.IsClosureFunction()) {
         // Invoke noSuchMethod function passing the original function name.
         // For closure functions, use "call" as the original name.
         const String& name =
@@ -1161,7 +1166,7 @@
       }
       __ Bind(&correct_num_arguments);
     }
-  } else {
+  } else if (!flow_graph().IsCompiledForOsr()) {
     CopyParameters();
   }
 
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index e7fd6ea..0aa8da9 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -1131,8 +1131,7 @@
     const bool check_arguments = !flow_graph().IsCompiledForOsr();
 #else
     const bool check_arguments =
-        (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) &&
-        !flow_graph().IsCompiledForOsr();
+        function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
 #endif
     if (check_arguments) {
       __ Comment("Check argument count");
@@ -1147,7 +1146,7 @@
       __ j(EQUAL, &correct_num_arguments, Assembler::kNearJump);
 
       __ Bind(&wrong_num_arguments);
-      if (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) {
+      if (function.IsClosureFunction()) {
         // Invoke noSuchMethod function passing the original function name.
         // For closure functions, use "call" as the original name.
         const String& name =
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 91409f3..7edcc80 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -23,6 +23,7 @@
 
 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization.");
 DECLARE_FLAG(int, optimization_counter_threshold);
+DECLARE_FLAG(int, reoptimization_counter_threshold);
 DECLARE_FLAG(bool, print_ast);
 DECLARE_FLAG(bool, print_scopes);
 DECLARE_FLAG(bool, enable_type_checks);
@@ -1071,72 +1072,71 @@
 
 void FlowGraphCompiler::EmitFrameEntry() {
   const Function& function = parsed_function().function();
-  if (CanOptimizeFunction() && function.is_optimizable()) {
-    const bool can_optimize = !is_optimizing() || may_reoptimize();
+  if (CanOptimizeFunction() &&
+      function.is_optimizable() &&
+      (!is_optimizing() || may_reoptimize())) {
     const Register function_reg = T0;
-    if (can_optimize) {
-      Label next;
-      // The pool pointer is not setup before entering the Dart frame.
 
-      __ mov(TMP1, RA);  // Save RA.
-      __ bal(&next);  // Branch and link to next instruction to get PC in RA.
-      __ delay_slot()->mov(T2, RA);  // Save PC of the following mov.
+    Label next;
+    // The pool pointer is not setup before entering the Dart frame.
+    __ mov(TMP1, RA);  // Save RA.
+    __ bal(&next);  // Branch and link to next instruction to get PC in RA.
+    __ delay_slot()->mov(T2, RA);  // Save PC of the following mov.
+    // Calculate offset of pool pointer from the PC.
+    const intptr_t object_pool_pc_dist =
+       Instructions::HeaderSize() - Instructions::object_pool_offset() +
+       assembler()->CodeSize();
+    __ Bind(&next);
+    __ mov(RA, TMP1);  // Restore RA.
+    // Preserve PP of caller.
+    __ mov(T1, PP);
+    // Temporarily setup pool pointer for this dart function.
+    __ lw(PP, Address(T2, -object_pool_pc_dist));
+    // Load function object from object pool.
+    __ LoadObject(function_reg, function);  // Uses PP.
+    // Restore PP of caller.
+    __ mov(PP, T1);
 
-      // Calculate offset of pool pointer from the PC.
-      const intptr_t object_pool_pc_dist =
-         Instructions::HeaderSize() - Instructions::object_pool_offset() +
-         assembler()->CodeSize();
-
-      __ Bind(&next);
-      __ mov(RA, TMP1);  // Restore RA.
-
-      // Preserve PP of caller.
-      __ mov(T1, PP);
-
-      // Temporarily setup pool pointer for this dart function.
-      __ lw(PP, Address(T2, -object_pool_pc_dist));
-
-      // Load function object from object pool.
-      __ LoadObject(function_reg, function);  // Uses PP.
-
-      // Restore PP of caller.
-      __ mov(PP, T1);
-    }
     // Patch point is after the eventually inlined function object.
     AddCurrentDescriptor(PcDescriptors::kEntryPatch,
                          Isolate::kNoDeoptId,
                          0);  // No token position.
-    if (can_optimize) {
-      // Reoptimization of optimized function is triggered by counting in
+    intptr_t threshold = FLAG_optimization_counter_threshold;
+    __ lw(T1, FieldAddress(function_reg, Function::usage_counter_offset()));
+    if (is_optimizing()) {
+      // Reoptimization of an optimized function is triggered by counting in
       // IC stubs, but not at the entry of the function.
-      if (!is_optimizing()) {
-        __ lw(T1, FieldAddress(function_reg,
-                               Function::usage_counter_offset()));
-        __ addiu(T1, T1, Immediate(1));
-        __ sw(T1, FieldAddress(function_reg,
-                               Function::usage_counter_offset()));
-      } else {
-        __ lw(T1, FieldAddress(function_reg,
-                               Function::usage_counter_offset()));
-      }
-
-      // Skip Branch if T1 is less than the threshold.
-      Label dont_branch;
-      __ BranchSignedLess(T1, FLAG_optimization_counter_threshold,
-                          &dont_branch);
-
-      ASSERT(function_reg == T0);
-      __ Branch(&StubCode::OptimizeFunctionLabel());
-
-      __ Bind(&dont_branch);
+      threshold = FLAG_reoptimization_counter_threshold;
+    } else {
+      __ addiu(T1, T1, Immediate(1));
+      __ sw(T1, FieldAddress(function_reg, Function::usage_counter_offset()));
     }
-  } else {
+
+    // Skip Branch if T1 is less than the threshold.
+    Label dont_branch;
+    __ BranchSignedLess(T1, threshold, &dont_branch);
+
+    ASSERT(function_reg == T0);
+    __ Branch(&StubCode::OptimizeFunctionLabel());
+
+    __ Bind(&dont_branch);
+
+  } else if (!flow_graph().IsCompiledForOsr()) {
     AddCurrentDescriptor(PcDescriptors::kEntryPatch,
                          Isolate::kNoDeoptId,
                          0);  // No token position.
   }
   __ Comment("Enter frame");
-  __ EnterDartFrame(StackSize() * kWordSize);
+  if (flow_graph().IsCompiledForOsr()) {
+    intptr_t extra_slots = StackSize()
+        - flow_graph().num_stack_locals()
+        - flow_graph().num_copied_params();
+    ASSERT(extra_slots >= 0);
+    __ EnterOsrFrame(extra_slots * kWordSize);
+  } else {
+    ASSERT(StackSize() >= 0);
+    __ EnterDartFrame(StackSize() * kWordSize);
+  }
 }
 
 
@@ -1173,10 +1173,10 @@
   if (num_copied_params == 0) {
 #ifdef DEBUG
     ASSERT(!parsed_function().function().HasOptionalParameters());
-    const bool check_arguments = true;
+    const bool check_arguments = !flow_graph().IsCompiledForOsr();
 #else
     const bool check_arguments =
-        function.IsClosureFunction() || function.IsNoSuchMethodDispatcher();
+        function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
 #endif
     if (check_arguments) {
       __ TraceSimMsg("Check argument count");
@@ -1191,7 +1191,7 @@
                              ArgumentsDescriptor::positional_count_offset()));
       __ beq(T0, T1, &correct_num_arguments);
       __ Bind(&wrong_num_arguments);
-      if (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) {
+      if (function.IsClosureFunction()) {
         // Invoke noSuchMethod function passing the original function name.
         // For closure functions, use "call" as the original name.
         const String& name =
@@ -1212,7 +1212,7 @@
       }
       __ Bind(&correct_num_arguments);
     }
-  } else {
+  } else if (!flow_graph().IsCompiledForOsr()) {
     CopyParameters();
   }
 
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 345de2f..14fcc5b 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -1126,8 +1126,7 @@
     const bool check_arguments = !flow_graph().IsCompiledForOsr();
 #else
     const bool check_arguments =
-        (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) &&
-        !flow_graph().IsCompiledForOsr();
+        function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
 #endif
     if (check_arguments) {
       __ Comment("Check argument count");
@@ -1142,7 +1141,7 @@
       __ j(EQUAL, &correct_num_arguments, Assembler::kNearJump);
 
       __ Bind(&wrong_num_arguments);
-      if (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) {
+      if (function.IsClosureFunction()) {
         // Invoke noSuchMethod function passing the original function name.
         // For closure functions, use "call" as the original name.
         const String& name =
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index b388cdc..7bb096a 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -31,6 +31,8 @@
     "Always inline functions that have threshold or fewer instructions");
 DEFINE_FLAG(int, inlining_callee_call_sites_threshold, 1,
     "Always inline functions containing threshold or fewer calls.");
+DEFINE_FLAG(int, inlining_caller_size_threshold, 50000,
+    "Stop inlining once caller reaches the threshold.");
 DEFINE_FLAG(int, inlining_constant_arguments_count, 1,
     "Inline function calls with sufficient constant arguments "
     "and up to the increased threshold on instructions");
@@ -371,6 +373,10 @@
   bool ShouldWeInline(intptr_t instr_count,
                       intptr_t call_site_count,
                       intptr_t const_arg_count) {
+    if (inlined_size_ > FLAG_inlining_caller_size_threshold) {
+      // Prevent methods becoming humongous and thus slow to compile.
+      return false;
+    }
     if (instr_count <= FLAG_inlining_size_threshold) {
       return true;
     }
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 88ff226..1665cb9 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -5905,6 +5905,27 @@
 }
 
 
+void ConstantPropagator::VisitInstantiateType(InstantiateTypeInstr* instr) {
+  const Object& object =
+      instr->instantiator()->definition()->constant_value();
+  if (IsNonConstant(object)) {
+    SetValue(instr, non_constant_);
+    return;
+  }
+  if (IsConstant(object)) {
+    if (instr->type().IsTypeParameter()) {
+      if (object.IsNull()) {
+        SetValue(instr, Type::ZoneHandle(Type::DynamicType()));
+        return;
+      }
+      // We could try to instantiate the type parameter and return it if no
+      // malformed error is reported.
+    }
+    SetValue(instr, non_constant_);
+  }
+}
+
+
 void ConstantPropagator::VisitInstantiateTypeArguments(
     InstantiateTypeArgumentsInstr* instr) {
   const Object& object =
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 509f422..b7ae253 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -379,18 +379,21 @@
 }
 
 
-void GCMarker::ProcessPeerReferents(PageSpace* page_space) {
-  PageSpace::PeerTable* peer_table = page_space->GetPeerTable();
-  PageSpace::PeerTable::iterator it = peer_table->begin();
-  while (it != peer_table->end()) {
-    RawObject* raw_obj = it->first;
-    ASSERT(raw_obj->IsHeapObject());
-    if (raw_obj->IsMarked()) {
-      // The object has survived.  Do nothing.
-      ++it;
-    } else {
-      // The object has become garbage.  Remove its record.
-      peer_table->erase(it++);
+void GCMarker::ProcessWeakTables(PageSpace* page_space) {
+  for (int sel = 0;
+       sel < Heap::kNumWeakSelectors;
+       sel++) {
+    WeakTable* table = heap_->GetWeakTable(
+        Heap::kOld, static_cast<Heap::WeakSelector>(sel));
+    intptr_t size = table->size();
+    for (intptr_t i = 0; i < size; i++) {
+      if (table->IsValidEntryAt(i)) {
+        RawObject* raw_obj = table->ObjectAt(i);
+        ASSERT(raw_obj->IsHeapObject());
+        if (!raw_obj->IsMarked()) {
+          table->InvalidateAt(i);
+        }
+      }
     }
   }
 }
@@ -408,7 +411,7 @@
   MarkingWeakVisitor mark_weak;
   IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
   mark.Finalize();
-  ProcessPeerReferents(page_space);
+  ProcessWeakTables(page_space);
   Epilogue(isolate, invoke_api_callbacks);
 }
 
diff --git a/runtime/vm/gc_marker.h b/runtime/vm/gc_marker.h
index 576a7ad..36c899c 100644
--- a/runtime/vm/gc_marker.h
+++ b/runtime/vm/gc_marker.h
@@ -41,7 +41,7 @@
   void IterateWeakReferences(Isolate* isolate, MarkingVisitor* visitor);
   void DrainMarkingStack(Isolate* isolate, MarkingVisitor* visitor);
   void ProcessWeakProperty(RawWeakProperty* raw_weak, MarkingVisitor* visitor);
-  void ProcessPeerReferents(PageSpace* page_space);
+  void ProcessWeakTables(PageSpace* page_space);
 
   Heap* heap_;
 
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 5dcc4b9..59691e8 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -19,6 +19,7 @@
 #include "vm/stack_frame.h"
 #include "vm/verifier.h"
 #include "vm/virtual_memory.h"
+#include "vm/weak_table.h"
 
 namespace dart {
 
@@ -35,7 +36,13 @@
             "old gen heap size in MB,"
             "e.g: --old_gen_heap_size=1024 allocates a 1024MB old gen heap");
 
-Heap::Heap() : read_only_(false), gc_in_progress_(false) {
+  Heap::Heap() : read_only_(false), gc_in_progress_(false) {
+  for (int sel = 0;
+       sel < kNumWeakSelectors;
+       sel++) {
+    new_weak_tables_[sel] = new WeakTable();
+    old_weak_tables_[sel] = new WeakTable();
+  }
   new_space_ = new Scavenger(this,
                              (FLAG_new_gen_heap_size * MB),
                              kNewObjectAlignmentOffset);
@@ -47,6 +54,12 @@
 Heap::~Heap() {
   delete new_space_;
   delete old_space_;
+  for (int sel = 0;
+       sel < kNumWeakSelectors;
+       sel++) {
+    delete new_weak_tables_[sel];
+    delete old_weak_tables_[sel];
+  }
 }
 
 
@@ -360,27 +373,33 @@
 }
 
 
-void Heap::SetPeer(RawObject* raw_obj, void* peer) {
-  if (raw_obj->IsNewObject()) {
-    new_space_->SetPeer(raw_obj, peer);
-  } else {
-    ASSERT(raw_obj->IsOldObject());
-    old_space_->SetPeer(raw_obj, peer);
-  }
+int64_t Heap::PeerCount() const {
+  return new_weak_tables_[kPeers]->count() + old_weak_tables_[kPeers]->count();
 }
 
 
-void* Heap::GetPeer(RawObject* raw_obj) {
+int64_t Heap::HashCount() const {
+  return
+      new_weak_tables_[kHashes]->count() + old_weak_tables_[kHashes]->count();
+}
+
+
+intptr_t Heap::GetWeakEntry(RawObject* raw_obj, WeakSelector sel) const {
   if (raw_obj->IsNewObject()) {
-    return new_space_->GetPeer(raw_obj);
+    return new_weak_tables_[sel]->GetValue(raw_obj);
   }
   ASSERT(raw_obj->IsOldObject());
-  return old_space_->GetPeer(raw_obj);
+  return old_weak_tables_[sel]->GetValue(raw_obj);
 }
 
 
-int64_t Heap::PeerCount() const {
-  return new_space_->PeerCount() + old_space_->PeerCount();
+void Heap::SetWeakEntry(RawObject* raw_obj, WeakSelector sel, intptr_t val) {
+  if (raw_obj->IsNewObject()) {
+    new_weak_tables_[sel]->SetValue(raw_obj, val);
+  } else {
+    ASSERT(raw_obj->IsOldObject());
+    old_weak_tables_[sel]->SetValue(raw_obj, val);
+  }
 }
 
 
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 359efea..6dd4419 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -11,6 +11,7 @@
 #include "vm/globals.h"
 #include "vm/pages.h"
 #include "vm/scavenger.h"
+#include "vm/weak_table.h"
 
 namespace dart {
 
@@ -33,6 +34,12 @@
     kCode,
   };
 
+  enum WeakSelector {
+    kPeers = 0,
+    kHashes,
+    kNumWeakSelectors
+  };
+
   enum ApiCallbacks {
     kIgnoreApiCallbacks,
     kInvokeApiCallbacks
@@ -168,17 +175,45 @@
 
   static const char* GCReasonToString(GCReason gc_reason);
 
-  // Associates a peer with an object.  If an object has a peer, it is
-  // replaced.  A value of NULL disassociate an object from its peer.
-  void SetPeer(RawObject* raw_obj, void* peer);
-
-  // Retrieves the peer associated with an object.  Returns NULL if
-  // there is no association.
-  void* GetPeer(RawObject* raw_obj);
-
-  // Returns the number of objects with a peer.
+  // Associate a peer with an object.  A non-existent peer is equal to NULL.
+  void SetPeer(RawObject* raw_obj, void* peer) {
+    SetWeakEntry(raw_obj, kPeers, reinterpret_cast<intptr_t>(peer));
+  }
+  void* GetPeer(RawObject* raw_obj) const {
+    return reinterpret_cast<void*>(GetWeakEntry(raw_obj, kPeers));
+  }
   int64_t PeerCount() const;
 
+  // Associate an identity hashCode with an object. An non-existent hashCode
+  // is equal to 0.
+  void SetHash(RawObject* raw_obj, intptr_t hash) {
+    SetWeakEntry(raw_obj, kHashes, hash);
+  }
+  intptr_t GetHash(RawObject* raw_obj) const {
+    return GetWeakEntry(raw_obj, kHashes);
+  }
+  int64_t HashCount() const;
+
+  // Used by the GC algorithms to propagate weak entries.
+  intptr_t GetWeakEntry(RawObject* raw_obj, WeakSelector sel) const;
+  void SetWeakEntry(RawObject* raw_obj, WeakSelector sel, intptr_t val);
+
+  WeakTable* GetWeakTable(Space space, WeakSelector selector) const {
+    if (space == kNew) {
+      return new_weak_tables_[selector];
+    }
+    ASSERT(space ==kOld);
+    return old_weak_tables_[selector];
+  }
+  void SetWeakTable(Space space, WeakSelector selector, WeakTable* value) {
+    if (space == kNew) {
+      new_weak_tables_[selector] = value;
+    } else {
+      ASSERT(space == kOld);
+      old_weak_tables_[selector] = value;
+    }
+  }
+
   // Stats collection.
   void RecordTime(int id, int64_t micros) {
     ASSERT((id >= 0) && (id < GCStats::kDataEntries));
@@ -246,6 +281,9 @@
   Scavenger* new_space_;
   PageSpace* old_space_;
 
+  WeakTable* new_weak_tables_[kNumWeakSelectors];
+  WeakTable* old_weak_tables_[kNumWeakSelectors];
+
   // GC stats collection.
   GCStats stats_;
 
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index d0cd907..638081c 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -554,6 +554,13 @@
 }
 
 
+void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const {
+  const String& type_name = String::Handle(type().Name());
+  f->Print("%s, ", type_name.ToCString());
+  instantiator()->PrintTo(f);
+}
+
+
 void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const {
   const String& type_args = String::Handle(type_arguments().Name());
   f->Print("%s, ", type_args.ToCString());
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 48b8e20..e29dbea 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -554,6 +554,7 @@
   M(StoreVMField)                                                              \
   M(LoadUntagged)                                                              \
   M(LoadClassId)                                                               \
+  M(InstantiateType)                                                           \
   M(InstantiateTypeArguments)                                                  \
   M(ExtractConstructorTypeArguments)                                           \
   M(ExtractConstructorInstantiator)                                            \
@@ -4063,6 +4064,44 @@
 };
 
 
+class InstantiateTypeInstr : public TemplateDefinition<1> {
+ public:
+  InstantiateTypeInstr(intptr_t token_pos,
+                       const AbstractType& type,
+                       const Class& instantiator_class,
+                       Value* instantiator)
+      : token_pos_(token_pos),
+        type_(type),
+        instantiator_class_(instantiator_class) {
+    ASSERT(type.IsZoneHandle());
+    SetInputAt(0, instantiator);
+  }
+
+  DECLARE_INSTRUCTION(InstantiateType)
+
+  Value* instantiator() const { return inputs_[0]; }
+  const AbstractType& type() const { return type_;
+  }
+  const Class& instantiator_class() const { return instantiator_class_; }
+  intptr_t token_pos() const { return token_pos_; }
+
+  virtual void PrintOperandsTo(BufferFormatter* f) const;
+
+  virtual bool CanDeoptimize() const { return true; }
+
+  virtual EffectSet Effects() const { return EffectSet::None(); }
+
+  virtual bool MayThrow() const { return true; }
+
+ private:
+  const intptr_t token_pos_;
+  const AbstractType& type_;
+  const Class& instantiator_class_;
+
+  DISALLOW_COPY_AND_ASSIGN(InstantiateTypeInstr);
+};
+
+
 class InstantiateTypeArgumentsInstr : public TemplateDefinition<1> {
  public:
   InstantiateTypeArgumentsInstr(intptr_t token_pos,
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 7cbb6b9..200e725 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -24,6 +24,7 @@
 
 DECLARE_FLAG(int, optimization_counter_threshold);
 DECLARE_FLAG(bool, propagate_ic_data);
+DECLARE_FLAG(bool, use_osr);
 
 // Generic summary for call instructions that have all arguments pushed
 // on the stack and return the result in a fixed register R0.
@@ -1809,6 +1810,37 @@
 }
 
 
+LocationSummary* InstantiateTypeInstr::MakeLocationSummary() const {
+  const intptr_t kNumInputs = 1;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* locs =
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+  locs->set_in(0, Location::RegisterLocation(R0));
+  locs->set_out(Location::RegisterLocation(R0));
+  return locs;
+}
+
+
+void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register instantiator_reg = locs()->in(0).reg();
+  Register result_reg = locs()->out().reg();
+
+  // 'instantiator_reg' is the instantiator AbstractTypeArguments object
+  // (or null).
+  // A runtime call to instantiate the type is required.
+  __ PushObject(Object::ZoneHandle());  // Make room for the result.
+  __ PushObject(type());
+  __ Push(instantiator_reg);  // Push instantiator type arguments.
+  compiler->GenerateCallRuntime(token_pos(),
+                                deopt_id(),
+                                kInstantiateTypeRuntimeEntry,
+                                locs());
+  __ Drop(2);  // Drop instantiator and uninstantiated type.
+  __ Pop(result_reg);  // Pop instantiated type.
+  ASSERT(instantiator_reg == result_reg);
+}
+
+
 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
@@ -2020,11 +2052,12 @@
 
 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 0;
-  const intptr_t kNumTemps = 0;
+  const intptr_t kNumTemps = 1;
   LocationSummary* summary =
       new LocationSummary(kNumInputs,
                           kNumTemps,
                           LocationSummary::kCallOnSlowPath);
+  summary->set_temp(0, Location::RequiresRegister());
   return summary;
 }
 
@@ -2046,6 +2079,13 @@
                                   instruction_->deopt_id(),
                                   kStackOverflowRuntimeEntry,
                                   instruction_->locs());
+
+    if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) {
+      // In unoptimized code, record loop stack checks as possible OSR entries.
+      compiler->AddCurrentDescriptor(PcDescriptors::kOsrEntry,
+                                     instruction_->deopt_id(),
+                                     0);  // No token position.
+    }
     compiler->pending_deoptimization_env_ = NULL;
     compiler->RestoreLiveRegisters(instruction_->locs());
     __ b(exit_label());
@@ -2064,6 +2104,18 @@
   __ ldr(IP, Address(IP));
   __ cmp(SP, ShifterOperand(IP));
   __ b(slow_path->entry_label(), LS);
+  if (compiler->CanOSRFunction() && in_loop()) {
+    Register temp = locs()->temp(0).reg();
+    // In unoptimized code check the usage counter to trigger OSR at loop
+    // stack checks.  Use progressively higher thresholds for more deeply
+    // nested loops to attempt to hit outer loops with OSR when possible.
+    __ LoadObject(temp, compiler->parsed_function().function());
+    intptr_t threshold =
+        FLAG_optimization_counter_threshold * (loop_depth() + 1);
+    __ ldr(temp, FieldAddress(temp, Function::usage_counter_offset()));
+    __ CompareImmediate(temp, threshold);
+    __ b(slow_path->entry_label(), GE);
+  }
   __ Bind(slow_path->exit_label());
 }
 
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index b8c4942..532be75 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1859,6 +1859,37 @@
 }
 
 
+LocationSummary* InstantiateTypeInstr::MakeLocationSummary() const {
+  const intptr_t kNumInputs = 1;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* locs =
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+  locs->set_in(0, Location::RegisterLocation(EAX));
+  locs->set_out(Location::RegisterLocation(EAX));
+  return locs;
+}
+
+
+void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register instantiator_reg = locs()->in(0).reg();
+  Register result_reg = locs()->out().reg();
+
+  // 'instantiator_reg' is the instantiator AbstractTypeArguments object
+  // (or null).
+  // A runtime call to instantiate the type is required.
+  __ PushObject(Object::ZoneHandle());  // Make room for the result.
+  __ PushObject(type());
+  __ pushl(instantiator_reg);  // Push instantiator type arguments.
+  compiler->GenerateCallRuntime(token_pos(),
+                                deopt_id(),
+                                kInstantiateTypeRuntimeEntry,
+                                locs());
+  __ Drop(2);  // Drop instantiator and uninstantiated type.
+  __ popl(result_reg);  // Pop instantiated type.
+  ASSERT(instantiator_reg == result_reg);
+}
+
+
 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index c954766..6f379eb 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -24,6 +24,7 @@
 
 DECLARE_FLAG(int, optimization_counter_threshold);
 DECLARE_FLAG(bool, propagate_ic_data);
+DECLARE_FLAG(bool, use_osr);
 
 // Generic summary for call instructions that have all arguments pushed
 // on the stack and return the result in a fixed register V0.
@@ -1886,6 +1887,45 @@
 }
 
 
+LocationSummary* InstantiateTypeInstr::MakeLocationSummary() const {
+  const intptr_t kNumInputs = 1;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* locs =
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+  locs->set_in(0, Location::RegisterLocation(T0));
+  locs->set_out(Location::RegisterLocation(T0));
+  return locs;
+}
+
+
+void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  __ TraceSimMsg("InstantiateTypeInstr");
+  Register instantiator_reg = locs()->in(0).reg();
+  Register result_reg = locs()->out().reg();
+
+  // 'instantiator_reg' is the instantiator AbstractTypeArguments object
+  // (or null).
+  // A runtime call to instantiate the type is required.
+  __ addiu(SP, SP, Immediate(-3 * kWordSize));
+  __ LoadObject(TMP1, Object::ZoneHandle());
+  __ sw(TMP1, Address(SP, 2 * kWordSize));  // Make room for the result.
+  __ LoadObject(TMP1, type());
+  __ sw(TMP1, Address(SP, 1 * kWordSize));
+  // Push instantiator type arguments.
+  __ sw(instantiator_reg, Address(SP, 0 * kWordSize));
+
+  compiler->GenerateCallRuntime(token_pos(),
+                                deopt_id(),
+                                kInstantiateTypeRuntimeEntry,
+                                locs());
+  // Pop instantiated type.
+  __ lw(result_reg, Address(SP, 2 * kWordSize));
+  // Drop instantiator and uninstantiated type.
+  __ addiu(SP, SP, Immediate(3 * kWordSize));
+  ASSERT(instantiator_reg == result_reg);
+}
+
+
 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
@@ -2122,11 +2162,12 @@
 
 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 0;
-  const intptr_t kNumTemps = 0;
+  const intptr_t kNumTemps = 1;
   LocationSummary* summary =
       new LocationSummary(kNumInputs,
                           kNumTemps,
                           LocationSummary::kCallOnSlowPath);
+  summary->set_temp(0, Location::RequiresRegister());
   return summary;
 }
 
@@ -2149,6 +2190,13 @@
                                   instruction_->deopt_id(),
                                   kStackOverflowRuntimeEntry,
                                   instruction_->locs());
+
+    if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) {
+      // In unoptimized code, record loop stack checks as possible OSR entries.
+      compiler->AddCurrentDescriptor(PcDescriptors::kOsrEntry,
+                                     instruction_->deopt_id(),
+                                     0);  // No token position.
+    }
     compiler->pending_deoptimization_env_ = NULL;
     compiler->RestoreLiveRegisters(instruction_->locs());
     __ b(exit_label());
@@ -2168,7 +2216,17 @@
 
   __ lw(TMP1, Address(TMP1));
   __ BranchUnsignedLessEqual(SP, TMP1, slow_path->entry_label());
-
+  if (compiler->CanOSRFunction() && in_loop()) {
+    Register temp = locs()->temp(0).reg();
+    // In unoptimized code check the usage counter to trigger OSR at loop
+    // stack checks.  Use progressively higher thresholds for more deeply
+    // nested loops to attempt to hit outer loops with OSR when possible.
+    __ LoadObject(temp, compiler->parsed_function().function());
+    intptr_t threshold =
+        FLAG_optimization_counter_threshold * (loop_depth() + 1);
+    __ lw(temp, FieldAddress(temp, Function::usage_counter_offset()));
+    __ BranchSignedGreaterEqual(temp, threshold, slow_path->entry_label());
+  }
   __ Bind(slow_path->exit_label());
 }
 
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 3d91a75..79ab510 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -1841,6 +1841,37 @@
 }
 
 
+LocationSummary* InstantiateTypeInstr::MakeLocationSummary() const {
+  const intptr_t kNumInputs = 1;
+  const intptr_t kNumTemps = 0;
+  LocationSummary* locs =
+      new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+  locs->set_in(0, Location::RegisterLocation(RAX));
+  locs->set_out(Location::RegisterLocation(RAX));
+  return locs;
+}
+
+
+void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register instantiator_reg = locs()->in(0).reg();
+  Register result_reg = locs()->out().reg();
+
+  // 'instantiator_reg' is the instantiator AbstractTypeArguments object
+  // (or null).
+  // A runtime call to instantiate the type is required.
+  __ PushObject(Object::ZoneHandle());  // Make room for the result.
+  __ PushObject(type());
+  __ pushq(instantiator_reg);  // Push instantiator type arguments.
+  compiler->GenerateCallRuntime(token_pos(),
+                                deopt_id(),
+                                kInstantiateTypeRuntimeEntry,
+                                locs());
+  __ Drop(2);  // Drop instantiator and uninstantiated type.
+  __ popq(result_reg);  // Pop instantiated type.
+  ASSERT(instantiator_reg == result_reg);
+}
+
+
 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary() const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 14c2392..76e6235 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -649,6 +649,7 @@
     if (!error.IsNull()) {
       OS::PrintErr("in ShutdownIsolate: %s\n", error.ToErrorCString());
     }
+    Dart::RunShutdownCallback();
   }
   {
     // Shut the isolate down.
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 1749cff..df60bc5 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 #include "platform/assert.h"
+#include "vm/object.h"
 #include "vm/json_stream.h"
 
 
@@ -83,6 +84,12 @@
 }
 
 
+void JSONStream::PrintValue(const Object& o, bool ref) {
+  PrintCommaIfNeeded();
+  o.PrintToJSONStream(this, ref);
+}
+
+
 void JSONStream::PrintPropertyBool(const char* name, bool b) {
   PrintPropertyName(name);
   PrintValueBool(b);
@@ -107,6 +114,12 @@
 }
 
 
+void JSONStream::PrintProperty(const char* name, const Object& o, bool ref) {
+  PrintPropertyName(name);
+  PrintValue(o, ref);
+}
+
+
 void JSONStream::PrintPropertyName(const char* name) {
   ASSERT(name != NULL);
   PrintCommaIfNeeded();
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 1b019ff..7650c9b 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -9,6 +9,7 @@
 
 namespace dart {
 
+class Object;
 
 class JSONStream : ValueObject {
  public:
@@ -27,11 +28,13 @@
   void PrintValue(intptr_t i);
   void PrintValue(double d);
   void PrintValue(const char* s);
+  void PrintValue(const Object& o, bool ref = true);
 
   void PrintPropertyBool(const char* name, bool b);
   void PrintProperty(const char* name, intptr_t i);
   void PrintProperty(const char* name, double d);
   void PrintProperty(const char* name, const char* s);
+  void PrintProperty(const char* name, const Object& o, bool ref = true);
 
  private:
   void PrintPropertyName(const char* name);
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index 152c5dd..8f3e40e 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -219,4 +219,17 @@
 }
 
 
+TEST_CASE(JSON_JSONStream_DartObject) {
+  TextBuffer tb(256);
+  JSONStream js(&tb);
+  js.OpenArray();
+  js.PrintValue(Object::Handle(Object::null()));
+  js.OpenObject();
+  js.PrintProperty("object_key", Object::Handle(Object::null()));
+  js.CloseArray();
+  EXPECT_STREQ("[{\"type\":\"null\"},{\"object_key\":{\"type\":\"null\"}]",
+               tb.buf());
+}
+
+
 }  // namespace dart
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7657480..f9f8d40 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1524,6 +1524,7 @@
   StorePointer(&raw_ptr()->canonical_types_, Object::empty_array().raw());
   StorePointer(&raw_ptr()->functions_, Object::empty_array().raw());
   StorePointer(&raw_ptr()->fields_, Object::empty_array().raw());
+  StorePointer(&raw_ptr()->no_such_method_cache_, Object::empty_array().raw());
 }
 
 
@@ -1680,7 +1681,7 @@
 
 
 bool Class::HasTypeArguments() const {
-  if (!IsSignatureClass() && (is_type_finalized() || is_prefinalized())) {
+  if (!IsSignatureClass() && (is_finalized() || is_prefinalized())) {
     // More efficient than calling NumTypeArguments().
     return type_arguments_field_offset() != kNoTypeArguments;
   } else {
@@ -1713,8 +1714,7 @@
 
 // Return a TypeParameter if the type_name is a type parameter of this class.
 // Return null otherwise.
-RawTypeParameter* Class::LookupTypeParameter(const String& type_name,
-                                             intptr_t token_pos) const {
+RawTypeParameter* Class::LookupTypeParameter(const String& type_name) const {
   ASSERT(!type_name.IsNull());
   Isolate* isolate = Isolate::Current();
   ReusableHandleScope reused_handles(isolate);
@@ -1780,6 +1780,107 @@
 }
 
 
+RawFunction* Class::GetNoSuchMethodDispatcher(const String& target_name,
+                                              const Array& args_desc) const {
+  enum {
+    kNameIndex = 0,
+    kArgsDescIndex,
+    kFunctionIndex,
+    kEntrySize
+  };
+
+  Function& dispatcher = Function::Handle();
+  Array& cache = Array::Handle(no_such_method_cache());
+  ASSERT(!cache.IsNull());
+  String& name = String::Handle();
+  Array& desc = Array::Handle();
+  intptr_t i = 0;
+  for (; i < cache.Length(); i += kEntrySize) {
+    name ^= cache.At(i + kNameIndex);
+    if (name.IsNull()) break;  // Reached last entry.
+    if (!name.Equals(target_name)) continue;
+    desc ^= cache.At(i + kArgsDescIndex);
+    if (desc.raw() == args_desc.raw()) {
+      // Found match.
+      dispatcher ^= cache.At(i + kFunctionIndex);
+      ASSERT(dispatcher.IsFunction());
+      break;
+    }
+  }
+
+  if (dispatcher.IsNull()) {
+    if (i == cache.Length()) {
+      // Allocate new larger cache.
+      intptr_t new_len = (cache.Length() == 0)
+          ? static_cast<intptr_t>(kEntrySize)
+          : cache.Length() * 2;
+      cache ^= Array::Grow(cache, new_len);
+      set_no_such_method_cache(cache);
+    }
+    dispatcher ^= CreateNoSuchMethodDispatcher(target_name, args_desc);
+    cache.SetAt(i + kNameIndex, target_name);
+    cache.SetAt(i + kArgsDescIndex, args_desc);
+    cache.SetAt(i + kFunctionIndex, dispatcher);
+  }
+  return dispatcher.raw();
+}
+
+
+RawFunction* Class::CreateNoSuchMethodDispatcher(const String& target_name,
+                                                 const Array& args_desc) const {
+  Function& invocation = Function::Handle(
+      Function::New(String::Handle(Symbols::New(target_name)),
+                    RawFunction::kNoSuchMethodDispatcher,
+                    false,  // Not static.
+                    false,  // Not const.
+                    false,  // Not abstract.
+                    false,  // Not external.
+                    *this,
+                    0));  // No token position.
+  ArgumentsDescriptor desc(args_desc);
+  invocation.set_num_fixed_parameters(desc.PositionalCount());
+  invocation.SetNumOptionalParameters(desc.NamedCount(),
+                                      false);  // Not positional.
+  invocation.set_parameter_types(Array::Handle(Array::New(desc.Count(),
+                                                         Heap::kOld)));
+  invocation.set_parameter_names(Array::Handle(Array::New(desc.Count(),
+                                                         Heap::kOld)));
+  // Receiver.
+  invocation.SetParameterTypeAt(0, Type::Handle(Type::DynamicType()));
+  invocation.SetParameterNameAt(0, Symbols::This());
+  // Remaining positional parameters.
+  intptr_t i = 1;
+  for (; i < desc.PositionalCount(); i++) {
+    invocation.SetParameterTypeAt(i, Type::Handle(Type::DynamicType()));
+    char name[64];
+    OS::SNPrint(name, 64, ":p%"Pd, i);
+    invocation.SetParameterNameAt(i, String::Handle(Symbols::New(name)));
+  }
+
+  // Named parameters.
+  for (; i < desc.Count(); i++) {
+    invocation.SetParameterTypeAt(i, Type::Handle(Type::DynamicType()));
+    intptr_t index = i - desc.PositionalCount();
+    invocation.SetParameterNameAt(i, String::Handle(desc.NameAt(index)));
+  }
+  invocation.set_result_type(Type::Handle(Type::DynamicType()));
+  invocation.set_is_visible(false);  // Not visible in stack trace.
+  invocation.set_saved_args_desc(args_desc);
+
+  return invocation.raw();
+}
+
+
+RawArray* Class::no_such_method_cache() const {
+  return raw_ptr()->no_such_method_cache_;
+}
+
+
+void Class::set_no_such_method_cache(const Array& cache) const {
+  StorePointer(&raw_ptr()->no_such_method_cache_, cache.raw());
+}
+
+
 void Class::Finalize() const {
   ASSERT(!is_finalized());
   // Prefinalized classes have a VM internal representation and no Dart fields.
@@ -2691,6 +2792,12 @@
 }
 
 
+void Class::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void Class::InsertCanonicalConstant(intptr_t index,
                                     const Instance& constant) const {
   // The constant needs to be added to the list. Grow the list if it is full.
@@ -2770,6 +2877,12 @@
 }
 
 
+void UnresolvedClass::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t AbstractTypeArguments::Length() const  {
   // AbstractTypeArguments is an abstract class.
   UNREACHABLE();
@@ -3002,6 +3115,13 @@
 }
 
 
+void AbstractTypeArguments::PrintToJSONStream(JSONStream* stream,
+                                              bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t TypeArguments::Length() const {
   ASSERT(!IsNull());
   return Smi::Value(raw_ptr()->length_);
@@ -3337,6 +3457,12 @@
 }
 
 
+void TypeArguments::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t InstantiatedTypeArguments::Length() const {
   return AbstractTypeArguments::Handle(
       uninstantiated_type_arguments()).Length();
@@ -3419,6 +3545,13 @@
 }
 
 
+void InstantiatedTypeArguments::PrintToJSONStream(JSONStream* stream,
+                                                  bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* PatchClass::ToCString() const {
   const char* kFormat = "PatchClass for %s";
   const Class& cls = Class::Handle(patched_class());
@@ -3430,6 +3563,12 @@
 }
 
 
+void PatchClass::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawPatchClass* PatchClass::New(const Class& patched_class,
                                const Class& source_class) {
   const PatchClass& result = PatchClass::Handle(PatchClass::New());
@@ -3587,6 +3726,21 @@
 }
 
 
+RawArray* Function::saved_args_desc() const {
+  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher);
+  const Object& obj = Object::Handle(raw_ptr()->data_);
+  ASSERT(obj.IsArray());
+  return Array::Cast(obj).raw();
+}
+
+
+void Function::set_saved_args_desc(const Array& value) const {
+  ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher);
+  ASSERT(raw_ptr()->data_ == Object::null());
+  set_data(value);
+}
+
+
 RawFunction* Function::parent_function() const {
   if (IsClosureFunction()) {
     const Object& obj = Object::Handle(raw_ptr()->data_);
@@ -4398,6 +4552,9 @@
   // Set closure function's result type to this result type.
   closure_function.set_result_type(AbstractType::Handle(result_type()));
 
+  // Set closure function's end token to this end token.
+  closure_function.set_end_token_pos(end_token_pos());
+
   // Set closure function's formal parameters to this formal parameters,
   // removing the receiver if this is an instance method and adding the closure
   // object as first parameter.
@@ -4743,6 +4900,12 @@
 }
 
 
+void Function::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void ClosureData::set_context_scope(const ContextScope& value) const {
   StorePointer(&raw_ptr()->context_scope_, value.raw());
 }
@@ -4786,6 +4949,12 @@
 }
 
 
+void ClosureData::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void RedirectionData::set_type(const Type& value) const {
   ASSERT(!value.IsNull());
   StorePointer(&raw_ptr()->type_, value.raw());
@@ -4816,6 +4985,12 @@
 }
 
 
+void RedirectionData::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawString* Field::GetterName(const String& field_name) {
   return String::Concat(Symbols::GetterPrefix(), field_name);
 }
@@ -4979,6 +5154,12 @@
 }
 
 
+void Field::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawArray* Field::dependent_code() const {
   return raw_ptr()->dependent_code_;
 }
@@ -5154,6 +5335,12 @@
 }
 
 
+void LiteralToken::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawArray* TokenStream::TokenObjects() const {
   return raw_ptr()->token_objects_;
 }
@@ -5564,6 +5751,12 @@
 }
 
 
+void TokenStream::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 TokenStream::Iterator::Iterator(const TokenStream& tokens, intptr_t token_pos)
     : tokens_(TokenStream::Handle(tokens.raw())),
       data_(ExternalTypedData::Handle(tokens.GetStream())),
@@ -5910,6 +6103,12 @@
 }
 
 
+void Script::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 DictionaryIterator::DictionaryIterator(const Library& library)
     : array_(Array::Handle(library.dictionary())),
       // Last element in array is a Smi.
@@ -6900,6 +7099,12 @@
 }
 
 
+void Library::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawLibrary* LibraryPrefix::GetLibrary(int index) const {
   if ((index >= 0) || (index < num_imports())) {
     const Array& imports = Array::Handle(this->imports());
@@ -7009,6 +7214,12 @@
 }
 
 
+void LibraryPrefix::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* Namespace::ToCString() const {
   const char* kFormat = "Namespace for library '%s'";
   const Library& lib = Library::Handle(library());
@@ -7019,6 +7230,12 @@
 }
 
 
+void Namespace::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 bool Namespace::HidesName(const String& name) const {
   // Check whether the name is in the list of explicitly hidden names.
   if (hide_names() != Array::null()) {
@@ -7228,6 +7445,12 @@
 }
 
 
+void Instructions::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t PcDescriptors::Length() const {
   return Smi::Value(raw_ptr()->length_);
 }
@@ -7377,6 +7600,12 @@
 }
 
 
+void PcDescriptors::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 // Verify assumptions (in debug mode only).
 // - No two deopt descriptors have the same deoptimization id.
 // - No two ic-call descriptors have the same deoptimization id (type feedback).
@@ -7528,6 +7757,12 @@
 }
 
 
+void Stackmap::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawString* LocalVarDescriptors::GetName(intptr_t var_index) const {
   ASSERT(var_index < Length());
   const Array& names = Array::Handle(raw_ptr()->names_);
@@ -7592,6 +7827,13 @@
 }
 
 
+void LocalVarDescriptors::PrintToJSONStream(JSONStream* stream,
+                                            bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawLocalVarDescriptors* LocalVarDescriptors::New(intptr_t num_variables) {
   ASSERT(Object::var_descriptors_class() != Class::null());
   if (num_variables < 0 || num_variables > kMaxElements) {
@@ -7755,6 +7997,13 @@
 }
 
 
+void ExceptionHandlers::PrintToJSONStream(JSONStream* stream,
+                                          bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t DeoptInfo::Length() const {
   return Smi::Value(raw_ptr()->length_);
 }
@@ -7848,6 +8097,12 @@
 }
 
 
+void DeoptInfo::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawDeoptInfo* DeoptInfo::New(intptr_t num_commands) {
   ASSERT(Object::deopt_info_class() != Class::null());
   DeoptInfo& result = DeoptInfo::Handle();
@@ -8211,6 +8466,12 @@
 }
 
 
+void Code::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 uword Code::GetPatchCodePc() const {
   const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
   return descriptors.GetPcForKind(PcDescriptors::kPatchCode);
@@ -8337,6 +8598,12 @@
 }
 
 
+void Context::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawContextScope* ContextScope::New(intptr_t num_variables) {
   ASSERT(Object::context_scope_class() != Class::null());
   if (num_variables < 0 || num_variables > kMaxElements) {
@@ -8451,6 +8718,12 @@
 }
 
 
+void ContextScope::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* ICData::ToCString() const {
   const char* kFormat = "ICData target:'%s' num-checks: %"Pd"";
   const String& name = String::Handle(target_name());
@@ -8864,6 +9137,12 @@
 }
 
 
+void ICData::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawArray* MegamorphicCache::buckets() const {
   return raw_ptr()->buckets_;
 }
@@ -8975,6 +9254,12 @@
 }
 
 
+void MegamorphicCache::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawSubtypeTestCache* SubtypeTestCache::New() {
   ASSERT(Object::subtypetestcache_class() != Class::null());
   SubtypeTestCache& result = SubtypeTestCache::Handle();
@@ -9046,6 +9331,12 @@
 }
 
 
+void SubtypeTestCache::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* Error::ToErrorCString() const {
   UNREACHABLE();
   return "Internal Error";
@@ -9059,6 +9350,12 @@
 }
 
 
+void Error::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawApiError* ApiError::New() {
   ASSERT(Object::api_error_class() != Class::null());
   RawObject* raw = Object::Allocate(ApiError::kClassId,
@@ -9099,6 +9396,12 @@
 }
 
 
+void ApiError::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawLanguageError* LanguageError::New() {
   ASSERT(Object::language_error_class() != Class::null());
   RawObject* raw = Object::Allocate(LanguageError::kClassId,
@@ -9139,6 +9442,12 @@
 }
 
 
+void LanguageError::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawUnhandledException* UnhandledException::New(const Instance& exception,
                                                const Instance& stacktrace,
                                                Heap::Space space) {
@@ -9207,6 +9516,13 @@
 }
 
 
+void UnhandledException::PrintToJSONStream(JSONStream* stream,
+                                           bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawUnwindError* UnwindError::New(const String& message, Heap::Space space) {
   ASSERT(Object::unwind_error_class() != Class::null());
   UnwindError& result = UnwindError::Handle();
@@ -9238,6 +9554,12 @@
 }
 
 
+void UnwindError::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 bool Instance::Equals(const Instance& other) const {
   if (this->raw() == other.raw()) {
     return true;  // "===".
@@ -9558,6 +9880,12 @@
 }
 
 
+void Instance::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 bool AbstractType::IsResolved() const {
   // AbstractType is an abstract class.
   UNREACHABLE();
@@ -9897,6 +10225,12 @@
 }
 
 
+void AbstractType::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawType* Type::NullType() {
   return Isolate::Current()->object_store()->null_type();
 }
@@ -10288,6 +10622,12 @@
 }
 
 
+void Type::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void TypeParameter::set_is_finalized() const {
   ASSERT(!IsFinalized());
   set_type_state(RawTypeParameter::kFinalizedUninstantiated);
@@ -10466,6 +10806,12 @@
 }
 
 
+void TypeParameter::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 bool BoundedType::IsMalformed() const {
   return FLAG_enable_type_checks && AbstractType::Handle(bound()).IsMalformed();
 }
@@ -10614,6 +10960,11 @@
 }
 
 
+void BoundedType::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
 
 RawString* MixinAppType::Name() const {
   return String::New("MixinApplication");
@@ -10625,6 +10976,12 @@
 }
 
 
+void MixinAppType::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void MixinAppType::set_super_type(const AbstractType& value) const {
   StorePointer(&raw_ptr()->super_type_, value.raw());
 }
@@ -10663,6 +11020,12 @@
 }
 
 
+void Number::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* Integer::ToCString() const {
   // Integer is an interface. No instances of Integer should exist.
   UNREACHABLE();
@@ -10670,6 +11033,12 @@
 }
 
 
+void Integer::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 // Throw FiftyThreeBitOverflow exception.
 static void ThrowFiftyThreeBitOverflow(const Integer& i) {
   const Array& exc_args = Array::Handle(Array::New(1));
@@ -11070,6 +11439,12 @@
 }
 
 
+void Smi::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawClass* Smi::Class() {
   return Isolate::Current()->object_store()->smi_class();
 }
@@ -11184,6 +11559,12 @@
 }
 
 
+void Mint::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void Double::set_value(double value) const {
   raw_ptr()->value_ = value;
 }
@@ -11285,6 +11666,12 @@
 }
 
 
+void Double::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawBigint* Integer::AsBigint() const {
   ASSERT(!IsNull());
   if (IsSmi()) {
@@ -11451,6 +11838,12 @@
 }
 
 
+void Bigint::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 // Synchronize with implementation in compiler (intrinsifier).
 class StringHasher : ValueObject {
  public:
@@ -12049,6 +12442,12 @@
 }
 
 
+void String::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 void String::ToUTF8(uint8_t* utf8_array, intptr_t array_len) const {
   ASSERT(array_len >= Utf8::Length(*this));
   Utf8::Encode(*this, reinterpret_cast<char*>(utf8_array), array_len);
@@ -12729,6 +13128,12 @@
 }
 
 
+void Bool::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 bool Array::Equals(const Instance& other) const {
   if (this->raw() == other.raw()) {
     // Both handles point to the same raw instance.
@@ -12807,6 +13212,12 @@
 }
 
 
+void Array::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawArray* Array::Grow(const Array& source, int new_length, Heap::Space space) {
   const Array& result = Array::Handle(Array::New(new_length, space));
   intptr_t len = 0;
@@ -13012,6 +13423,13 @@
 }
 
 
+void GrowableObjectArray::PrintToJSONStream(JSONStream* stream,
+                                            bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawFloat32x4* Float32x4::New(float v0, float v1, float v2, float v3,
                              Heap::Space space) {
   ASSERT(Isolate::Current()->object_store()->float32x4_class() !=
@@ -13112,6 +13530,12 @@
 }
 
 
+void Float32x4::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawUint32x4* Uint32x4::New(uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3,
                            Heap::Space space) {
   ASSERT(Isolate::Current()->object_store()->uint32x4_class() !=
@@ -13212,6 +13636,12 @@
 }
 
 
+void Uint32x4::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const intptr_t TypedData::element_size[] = {
   1,   // kTypedDataInt8ArrayCid.
   1,   // kTypedDataUint8ArrayCid.
@@ -13258,6 +13688,12 @@
 }
 
 
+void TypedData::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 FinalizablePersistentHandle* ExternalTypedData::AddFinalizer(
     void* peer, Dart_WeakPersistentHandleFinalizer callback) const {
   SetPeer(peer);
@@ -13288,6 +13724,14 @@
 }
 
 
+void ExternalTypedData::PrintToJSONStream(JSONStream* stream,
+                                          bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
+
 const char* Closure::ToCString(const Instance& closure) {
   const Function& fun = Function::Handle(Closure::function(closure));
   const bool is_implicit_closure = fun.IsImplicitClosureFunction();
@@ -13327,6 +13771,12 @@
 }
 
 
+void DartFunction::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 intptr_t Stacktrace::Length() const {
   const Array& code_array = Array::Handle(raw_ptr()->code_array_);
   return code_array.Length();
@@ -13493,6 +13943,12 @@
 }
 
 
+void Stacktrace::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 const char* Stacktrace::ToCStringInternal(intptr_t frame_index) const {
   Isolate* isolate = Isolate::Current();
   Function& function = Function::Handle();
@@ -13659,6 +14115,12 @@
 }
 
 
+void JSRegExp::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 RawWeakProperty* WeakProperty::New(Heap::Space space) {
   ASSERT(Isolate::Current()->object_store()->weak_property_class()
          != Class::null());
@@ -13674,6 +14136,11 @@
 }
 
 
+void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
 RawMirrorReference* MirrorReference::New(Heap::Space space) {
   ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
          != Class::null());
@@ -13689,4 +14156,10 @@
 }
 
 
+void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
+  stream->OpenObject();
+  stream->CloseObject();
+}
+
+
 }  // namespace dart
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 840ec69..4691908 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -8,6 +8,7 @@
 #include "include/dart_api.h"
 #include "platform/assert.h"
 #include "platform/utils.h"
+#include "vm/json_stream.h"
 #include "vm/bitmap.h"
 #include "vm/dart.h"
 #include "vm/globals.h"
@@ -119,6 +120,10 @@
     return reinterpret_cast<Raw##object*>(Object::null());                     \
   }                                                                            \
   virtual const char* ToCString() const;                                       \
+  /* Object is printed as JSON into stream. If ref is true only a header */    \
+  /* with an object id is printed. If ref is false the object is fully   */    \
+  /* printed.                                                            */    \
+  virtual void PrintToJSONStream(JSONStream* stream, bool ref = true) const;   \
   static const ClassId kClassId = k##object##Cid;                              \
  private:  /* NOLINT */                                                        \
   /* Initialize the handle based on the raw_ptr in the presence of null. */    \
@@ -246,6 +251,19 @@
     }
   }
 
+  virtual void PrintToJSONStream(JSONStream* stream, bool ref = true) const {
+    if (IsNull()) {
+      stream->OpenObject();
+      stream->PrintProperty("type", "null");
+      stream->CloseObject();
+      return;
+    }
+    ASSERT(!IsNull());
+    stream->OpenObject();
+    stream->PrintProperty("type", "Object");
+    stream->CloseObject();
+  }
+
   // Returns the name that is used to identify an object in the
   // namespace dictionary.
   // Object::DictionaryName() returns String::null(). Only subclasses
@@ -688,8 +706,7 @@
 
   // Return a TypeParameter if the type_name is a type parameter of this class.
   // Return null otherwise.
-  RawTypeParameter* LookupTypeParameter(const String& type_name,
-                                        intptr_t token_pos) const;
+  RawTypeParameter* LookupTypeParameter(const String& type_name) const;
 
   // The type argument vector is flattened and includes the type arguments of
   // the super class.
@@ -912,6 +929,9 @@
 
   RawArray* constants() const;
 
+  RawFunction* GetNoSuchMethodDispatcher(const String& target_name,
+                                         const Array& args_desc) const;
+
   void Finalize() const;
 
   const char* ApplyPatch(const Class& patch) const;
@@ -1001,6 +1021,10 @@
   void set_canonical_types(const Array& value) const;
   RawArray* canonical_types() const;
 
+  RawArray* no_such_method_cache() const;
+  void set_no_such_method_cache(const Array& cache) const;
+  RawFunction* CreateNoSuchMethodDispatcher(const String& target_name,
+                                            const Array& args_desc) const;
   void CalculateFieldOffsets() const;
 
   // Assigns empty array to all raw class array fields.
@@ -1407,6 +1431,9 @@
   void set_extracted_method_closure(const Function& function) const;
   RawFunction* extracted_method_closure() const;
 
+  void set_saved_args_desc(const Array& array) const;
+  RawArray* saved_args_desc() const;
+
   bool IsMethodExtractor() const {
     return kind() == RawFunction::kMethodExtractor;
   }
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index d8522bb..2e82fcd 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -321,26 +321,6 @@
 }
 
 
-void PageSpace::SetPeer(RawObject* raw_obj, void* peer) {
-  if (peer == NULL) {
-    peer_table_.erase(raw_obj);
-  } else {
-    peer_table_[raw_obj] = peer;
-  }
-}
-
-
-void* PageSpace::GetPeer(RawObject* raw_obj) {
-  PeerTable::iterator it = peer_table_.find(raw_obj);
-  return (it == peer_table_.end()) ? NULL : it->second;
-}
-
-
-int64_t PageSpace::PeerCount() const {
-  return static_cast<int64_t>(peer_table_.size());
-}
-
-
 void PageSpace::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
   HeapPage* page = pages_;
   while (page != NULL) {
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index 4a61de0..c29121b 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -5,8 +5,6 @@
 #ifndef VM_PAGES_H_
 #define VM_PAGES_H_
 
-#include <map>
-
 #include "vm/freelist.h"
 #include "vm/globals.h"
 #include "vm/virtual_memory.h"
@@ -205,16 +203,6 @@
 
   void WriteProtect(bool read_only);
 
-  typedef std::map<RawObject*, void*> PeerTable;
-
-  void SetPeer(RawObject* raw_obj, void* peer);
-
-  void* GetPeer(RawObject* raw_obj);
-
-  int64_t PeerCount() const;
-
-  PeerTable* GetPeerTable() { return &peer_table_; }
-
  private:
   // Ids for time and data records in Heap::GCStats.
   enum {
@@ -253,8 +241,6 @@
   HeapPage* pages_tail_;
   HeapPage* large_pages_;
 
-  PeerTable peer_table_;
-
   // Various sizes being tracked for this generation.
   intptr_t max_capacity_;
   intptr_t capacity_;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 29c03b5..38cc62e 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -773,7 +773,8 @@
       node_sequence = parser.ParseMethodExtractor(func);
       break;
     case RawFunction::kNoSuchMethodDispatcher:
-      node_sequence = parser.ParseNoSuchMethodDispatcher(func);
+      node_sequence =
+          parser.ParseNoSuchMethodDispatcher(func, default_parameter_values);
       break;
     default:
       UNREACHABLE();
@@ -1006,7 +1007,7 @@
   // func.token_pos() points to the name of the field.
   intptr_t ident_pos = func.token_pos();
   ASSERT(current_class().raw() == func.Owner());
-  params.AddReceiver(ReceiverType(ident_pos), ident_pos);
+  params.AddReceiver(ReceiverType(), ident_pos);
   ASSERT(func.num_fixed_parameters() == 1);  // receiver.
   ASSERT(!func.HasOptionalParameters());
   ASSERT(AbstractType::Handle(func.result_type()).IsResolved());
@@ -1050,7 +1051,7 @@
 
   ParamList params;
   ASSERT(current_class().raw() == func.Owner());
-  params.AddReceiver(ReceiverType(ident_pos), ident_pos);
+  params.AddReceiver(ReceiverType(), ident_pos);
   params.AddFinalParameter(ident_pos,
                            &Symbols::Value(),
                            &field_type);
@@ -1083,7 +1084,7 @@
   const intptr_t ident_pos = func.token_pos();
   ASSERT(func.token_pos() == 0);
   ASSERT(current_class().raw() == func.Owner());
-  params.AddReceiver(ReceiverType(ident_pos), ident_pos);
+  params.AddReceiver(ReceiverType(), ident_pos);
   ASSERT(func.num_fixed_parameters() == 1);  // Receiver.
   ASSERT(!func.HasOptionalParameters());
 
@@ -1107,17 +1108,46 @@
 }
 
 
-SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func) {
+SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func,
+                                                  Array& default_values) {
   TRACE_PARSER("ParseNoSuchMethodDispatcher");
-  ParamList params;
 
   ASSERT(func.IsNoSuchMethodDispatcher());
   intptr_t token_pos = func.token_pos();
   ASSERT(func.token_pos() == 0);
   ASSERT(current_class().raw() == func.Owner());
-  params.AddReceiver(ReceiverType(token_pos), token_pos);
-  ASSERT(func.num_fixed_parameters() == 1);  // Receiver.
-  ASSERT(!func.HasOptionalParameters());
+
+  ArgumentsDescriptor desc(Array::Handle(func.saved_args_desc()));
+  ASSERT(desc.Count() > 0);
+
+  // Create parameter list. Receiver first.
+  ParamList params;
+  params.AddReceiver(ReceiverType(), token_pos);
+
+  // Remaining positional parameters.
+  intptr_t i = 1;
+  for (; i < desc.PositionalCount(); ++i) {
+    ParamDesc p;
+    char name[64];
+    OS::SNPrint(name, 64, ":p%"Pd, i);
+    p.name = &String::ZoneHandle(Symbols::New(name));
+    p.type = &Type::ZoneHandle(Type::DynamicType());
+    params.parameters->Add(p);
+    params.num_fixed_parameters++;
+  }
+  // Named parameters.
+  for (; i < desc.Count(); ++i) {
+    ParamDesc p;
+    intptr_t index = i - desc.PositionalCount();
+    p.name = &String::ZoneHandle(desc.NameAt(index));
+    p.type = &Type::ZoneHandle(Type::DynamicType());
+    p.default_value = &Object::ZoneHandle();
+    params.parameters->Add(p);
+    params.num_optional_parameters++;
+    params.has_optional_named_parameters = true;
+  }
+
+  SetupDefaultsForOptionalParams(&params, default_values);
 
   // Build local scope for function and populate with the formal parameters.
   OpenFunctionBlock(func);
@@ -1125,11 +1155,20 @@
   AddFormalParamsToScope(&params, scope);
 
   // Receiver is local 0.
-  LocalVariable* receiver = scope->VariableAt(0);
-  LoadLocalNode* load_receiver = new LoadLocalNode(token_pos, receiver);
-
   ArgumentListNode* func_args = new ArgumentListNode(token_pos);
-  func_args->Add(load_receiver);
+  for (intptr_t i = 0; i < desc.Count(); ++i) {
+    func_args->Add(new LoadLocalNode(token_pos, scope->VariableAt(i)));
+  }
+
+  if (params.num_optional_parameters > 0) {
+    const Array& arg_names =
+        Array::ZoneHandle(Array::New(params.num_optional_parameters));
+    for (intptr_t i = 0; i < arg_names.Length(); ++i) {
+      arg_names.SetAt(i, String::Handle(desc.NameAt(i)));
+    }
+    func_args->set_names(arg_names);
+  }
+
   const String& func_name = String::ZoneHandle(func.name());
   ArgumentListNode* arguments = BuildNoSuchMethodArguments(token_pos,
                                                            func_name,
@@ -2220,7 +2259,7 @@
   // Add implicit receiver parameter which is passed the allocated
   // but uninitialized instance to construct.
   ASSERT(current_class().raw() == func.Owner());
-  params.AddReceiver(ReceiverType(TokenPos()), func.token_pos());
+  params.AddReceiver(ReceiverType(), func.token_pos());
 
   // Add implicit parameter for construction phase.
   params.AddFinalParameter(
@@ -2349,6 +2388,7 @@
     }
   }
   OpenBlock();  // Block to collect constructor body nodes.
+  intptr_t body_pos = TokenPos();
 
   // Insert the implicit super call to the super constructor body.
   if (super_call != NULL) {
@@ -2356,15 +2396,15 @@
     const Function& super_ctor = super_call->function();
     // Patch the initializer call so it only executes the super initializer.
     initializer_args->SetNodeAt(1,
-        new LiteralNode(TokenPos(),
+        new LiteralNode(body_pos,
                         Smi::ZoneHandle(Smi::New(Function::kCtorPhaseInit))));
 
-    ArgumentListNode* super_call_args = new ArgumentListNode(TokenPos());
+    ArgumentListNode* super_call_args = new ArgumentListNode(body_pos);
     // First argument is the receiver.
-    super_call_args->Add(new LoadLocalNode(TokenPos(), receiver));
+    super_call_args->Add(new LoadLocalNode(body_pos, receiver));
     // Second argument is the construction phase argument.
     AstNode* phase_parameter =
-        new LiteralNode(TokenPos(),
+        new LiteralNode(body_pos,
                         Smi::ZoneHandle(Smi::New(Function::kCtorPhaseBody)));
     super_call_args->Add(phase_parameter);
     super_call_args->set_names(initializer_args->names());
@@ -2372,15 +2412,15 @@
       AstNode* arg = initializer_args->NodeAt(i);
       if (arg->IsLiteralNode()) {
         LiteralNode* lit = arg->AsLiteralNode();
-        super_call_args->Add(new LiteralNode(TokenPos(), lit->literal()));
+        super_call_args->Add(new LiteralNode(body_pos, lit->literal()));
       } else {
         ASSERT(arg->IsLoadLocalNode() || arg->IsStoreLocalNode());
         if (arg->IsLoadLocalNode()) {
           const LocalVariable& temp = arg->AsLoadLocalNode()->local();
-          super_call_args->Add(new LoadLocalNode(TokenPos(), &temp));
+          super_call_args->Add(new LoadLocalNode(body_pos, &temp));
         } else if (arg->IsStoreLocalNode()) {
           const LocalVariable& temp = arg->AsStoreLocalNode()->local();
-          super_call_args->Add(new LoadLocalNode(TokenPos(), &temp));
+          super_call_args->Add(new LoadLocalNode(body_pos, &temp));
         }
       }
     }
@@ -2388,7 +2428,7 @@
                                         super_call_args->names(),
                                         NULL));
     current_block_->statements->Add(
-        new StaticCallNode(TokenPos(), super_ctor, super_call_args));
+        new StaticCallNode(body_pos, super_ctor, super_call_args));
   }
 
   if (CurrentToken() == Token::kLBRACE) {
@@ -2410,19 +2450,19 @@
   if (ctor_block->length() > 0) {
     // Generate guard around the constructor body code.
     LocalVariable* phase_param = LookupPhaseParameter();
-    AstNode* phase_value = new LoadLocalNode(TokenPos(), phase_param);
+    AstNode* phase_value = new LoadLocalNode(body_pos, phase_param);
     AstNode* phase_check =
-        new BinaryOpNode(TokenPos(), Token::kBIT_AND,
+        new BinaryOpNode(body_pos, Token::kBIT_AND,
             phase_value,
-            new LiteralNode(TokenPos(),
+            new LiteralNode(body_pos,
                 Smi::ZoneHandle(Smi::New(Function::kCtorPhaseBody))));
     AstNode* comparison =
-       new ComparisonNode(TokenPos(), Token::kNE_STRICT,
+       new ComparisonNode(body_pos, Token::kNE_STRICT,
                          phase_check,
-                         new LiteralNode(TokenPos(),
+                         new LiteralNode(body_pos,
                                          Smi::ZoneHandle(Smi::New(0))));
     AstNode* guarded_block_statements =
-        new IfNode(TokenPos(), comparison, ctor_block, NULL);
+        new IfNode(body_pos, comparison, ctor_block, NULL);
     current_block_->statements->Add(guarded_block_statements);
   }
 
@@ -2479,7 +2519,7 @@
   } else if (!func.is_static()) {
     // Static functions do not have a receiver.
     ASSERT(current_class().raw() == func.Owner());
-    params.AddReceiver(ReceiverType(TokenPos()), func.token_pos());
+    params.AddReceiver(ReceiverType(), func.token_pos());
   } else if (func.IsFactory()) {
     // The first parameter of a factory is the AbstractTypeArguments vector of
     // the type of the instance to be allocated.
@@ -2642,8 +2682,7 @@
         // We have a library prefix qualified identifier, unless the prefix is
         // shadowed by a type parameter in scope.
         if (current_class().IsNull() ||
-            (current_class().LookupTypeParameter(*(qual_ident->ident),
-                                                 TokenPos()) ==
+            (current_class().LookupTypeParameter(*(qual_ident->ident)) ==
              TypeParameter::null())) {
           ConsumeToken();  // Consume the kPERIOD token.
           qual_ident->lib_prefix = &lib_prefix;
@@ -2696,8 +2735,7 @@
   // The first parameter of a factory is the AbstractTypeArguments vector of
   // the type of the instance to be allocated.
   if (!method->has_static || method->IsConstructor()) {
-    method->params.AddReceiver(ReceiverType(formal_param_pos),
-                               formal_param_pos);
+    method->params.AddReceiver(ReceiverType(), formal_param_pos);
   } else if (method->IsFactory()) {
     method->params.AddFinalParameter(
         formal_param_pos,
@@ -3048,7 +3086,7 @@
                              field->name_pos);
       ParamList params;
       ASSERT(current_class().raw() == getter.Owner());
-      params.AddReceiver(ReceiverType(TokenPos()), field->name_pos);
+      params.AddReceiver(ReceiverType(), field->name_pos);
       getter.set_result_type(*field->type);
       AddFormalParamsToFunction(&params, getter);
       members->AddFunction(getter);
@@ -3064,7 +3102,7 @@
                                field->name_pos);
         ParamList params;
         ASSERT(current_class().raw() == setter.Owner());
-        params.AddReceiver(ReceiverType(TokenPos()), field->name_pos);
+        params.AddReceiver(ReceiverType(), field->name_pos);
         params.AddFinalParameter(TokenPos(),
                                  &Symbols::Value(),
                                  field->type);
@@ -4881,6 +4919,8 @@
   return from_scope->LookupVariable(Symbols::TypeArgumentsParameter(),
                                     test_only);
 }
+
+
 LocalVariable* Parser::LookupPhaseParameter() {
   const bool kTestOnly = false;
   return current_block_->scope->LookupVariable(Symbols::PhaseParameter(),
@@ -5911,12 +5951,9 @@
     AstNode* loop_var_primary =
         ResolveIdent(loop_var_pos, *loop_var_name, false);
     ASSERT(!loop_var_primary->IsPrimaryNode());
-    loop_var_assignment =
-        CreateAssignmentNode(loop_var_primary, iterator_current);
-    if (loop_var_assignment == NULL) {
-      ErrorMsg(loop_var_pos, "variable or field '%s' is not assignable",
-               loop_var_name->ToCString());
-    }
+    loop_var_assignment = CreateAssignmentNode(
+        loop_var_primary, iterator_current, loop_var_name, loop_var_pos);
+    ASSERT(loop_var_assignment != NULL);
   }
   current_block_->statements->Add(loop_var_assignment);
 
@@ -7008,17 +7045,6 @@
 }
 
 
-bool Parser::IsAssignableExpr(AstNode* expr) {
-  return (expr->IsLoadLocalNode()
-          && (!expr->AsLoadLocalNode()->local().is_final()))
-      || expr->IsLoadStaticFieldNode()
-      || expr->IsStaticGetterNode()
-      || expr->IsInstanceGetterNode()
-      || expr->IsLoadIndexedNode()
-      || (expr->IsPrimaryNode() && !expr->AsPrimaryNode()->IsSuper());
-}
-
-
 AstNode* Parser::ParseExprList() {
   TRACE_PARSER("ParseExprList");
   AstNode* expressions = ParseExpr(kAllowConst, kConsumeCascades);
@@ -7187,25 +7213,35 @@
 }
 
 
-// Ensure that the expression temp is allocated for nodes that may need it.
-AstNode* Parser::CreateAssignmentNode(AstNode* original, AstNode* rhs) {
+AstNode* Parser::CreateAssignmentNode(AstNode* original,
+                                      AstNode* rhs,
+                                      const String* left_ident,
+                                      intptr_t left_pos) {
   AstNode* result = original->MakeAssignmentNode(rhs);
-  if ((result == NULL) && original->IsTypeNode()) {
-    const String& type_name = String::ZoneHandle(
-        original->AsTypeNode()->type().ClassName());
-    // TODO(tball): determine whether NoSuchMethod should be called instead.
+  if (result == NULL) {
+    String& name = String::ZoneHandle();
+    if (original->IsTypeNode()) {
+      name = Symbols::New(original->Name());
+    } else if ((left_ident != NULL) &&
+               (original->IsLiteralNode() ||
+                original->IsLoadLocalNode() ||
+                original->IsLoadStaticFieldNode())) {
+      name = left_ident->raw();
+    }
+    if (name.IsNull()) {
+      ErrorMsg(left_pos, "expression is not assignable");
+    }
     result = ThrowNoSuchMethodError(original->token_pos(),
                                     current_class(),
-                                    type_name,
+                                    name,
                                     InvocationMirror::kStatic,
                                     InvocationMirror::kSetter);
-  }
-  if ((result != NULL) &&
-      (result->IsStoreIndexedNode() ||
-       result->IsInstanceSetterNode() ||
-       result->IsStaticSetterNode() ||
-       result->IsStoreStaticFieldNode() ||
-       result->IsStoreLocalNode())) {
+  } else if (result->IsStoreIndexedNode() ||
+             result->IsInstanceSetterNode() ||
+             result->IsStaticSetterNode() ||
+             result->IsStoreStaticFieldNode() ||
+             result->IsStoreLocalNode()) {
+    // Ensure that the expression temp is allocated for nodes that may need it.
     EnsureExpressionTemp();
   }
   return result;
@@ -7228,6 +7264,9 @@
     } else {
       ErrorMsg("identifier or [ expected after ..");
     }
+    String* expr_ident =
+        Token::IsIdentifier(CurrentToken()) ? CurrentLiteral() : NULL;
+    const intptr_t expr_pos = TokenPos();
     expr = ParseSelectors(load_cascade_receiver, true);
 
     // Assignments after a cascade are part of the cascade. The
@@ -7243,23 +7282,17 @@
         LetNode* let_expr = PrepareCompoundAssignmentNodes(&expr);
         right_expr =
             ExpandAssignableOp(assignment_pos, assignment_op, expr, right_expr);
-        AstNode* assign_expr = CreateAssignmentNode(expr, right_expr);
-        if (assign_expr == NULL) {
-          ErrorMsg(assignment_pos,
-                   "left hand side of '%s' is not assignable",
-                   Token::Str(assignment_op));
-        }
+        AstNode* assign_expr = CreateAssignmentNode(
+            expr, right_expr, expr_ident, expr_pos);
+        ASSERT(assign_expr != NULL);
         let_expr->AddNode(assign_expr);
         expr = let_expr;
       } else {
         right_expr =
             ExpandAssignableOp(assignment_pos, assignment_op, expr, right_expr);
-        AstNode* assign_expr = CreateAssignmentNode(expr, right_expr);
-        if (assign_expr == NULL) {
-          ErrorMsg(assignment_pos,
-                   "left hand side of '%s' is not assignable",
-                   Token::Str(assignment_op));
-        }
+        AstNode* assign_expr = CreateAssignmentNode(
+            expr, right_expr, expr_ident, expr_pos);
+        ASSERT(assign_expr != NULL);
         expr = assign_expr;
       }
     }
@@ -7275,6 +7308,8 @@
 AstNode* Parser::ParseExpr(bool require_compiletime_const,
                            bool consume_cascades) {
   TRACE_PARSER("ParseExpr");
+  String* expr_ident =
+      Token::IsIdentifier(CurrentToken()) ? CurrentLiteral() : NULL;
   const intptr_t expr_pos = TokenPos();
 
   if (CurrentToken() == Token::kTHROW) {
@@ -7294,7 +7329,7 @@
     return expr;
   }
   // Assignment expressions.
-  Token::Kind assignment_op = CurrentToken();
+  const Token::Kind assignment_op = CurrentToken();
   const intptr_t assignment_pos = TokenPos();
   ConsumeToken();
   const intptr_t right_expr_pos = TokenPos();
@@ -7307,23 +7342,17 @@
     LetNode* let_expr = PrepareCompoundAssignmentNodes(&expr);
     AstNode* assigned_value =
         ExpandAssignableOp(assignment_pos, assignment_op, expr, right_expr);
-    AstNode* assign_expr = CreateAssignmentNode(expr, assigned_value);
-    if (assign_expr == NULL) {
-      ErrorMsg(assignment_pos,
-               "left hand side of '%s' is not assignable",
-               Token::Str(assignment_op));
-    }
+    AstNode* assign_expr = CreateAssignmentNode(
+        expr, assigned_value, expr_ident, expr_pos);
+    ASSERT(assign_expr != NULL);
     let_expr->AddNode(assign_expr);
     return let_expr;
   } else {
     AstNode* assigned_value =
         ExpandAssignableOp(assignment_pos, assignment_op, expr, right_expr);
-    AstNode* assign_expr = CreateAssignmentNode(expr, assigned_value);
-    if (assign_expr == NULL) {
-      ErrorMsg(assignment_pos,
-               "left hand side of '%s' is not assignable",
-               Token::Str(assignment_op));
-    }
+    AstNode* assign_expr = CreateAssignmentNode(
+        expr, assigned_value, expr_ident, expr_pos);
+    ASSERT(assign_expr != NULL);
     return assign_expr;
   }
 }
@@ -7372,10 +7401,10 @@
   } else if (IsIncrementOperator(CurrentToken())) {
     Token::Kind incr_op = CurrentToken();
     ConsumeToken();
+    String* expr_ident =
+        Token::IsIdentifier(CurrentToken()) ? CurrentLiteral() : NULL;
+    const intptr_t expr_pos = TokenPos();
     expr = ParseUnaryExpr();
-    if (!IsAssignableExpr(expr)) {
-      ErrorMsg("expression is not assignable");
-    }
     // Is prefix.
     LetNode* let_expr = PrepareCompoundAssignmentNodes(&expr);
     Token::Kind binary_op =
@@ -7385,7 +7414,7 @@
         binary_op,
         expr,
         new LiteralNode(op_pos, Smi::ZoneHandle(Smi::New(1))));
-    AstNode* store = CreateAssignmentNode(expr, add);
+    AstNode* store = CreateAssignmentNode(expr, add, expr_ident, expr_pos);
     ASSERT(store != NULL);
     let_expr->AddNode(store);
     expr = let_expr;
@@ -7725,6 +7754,18 @@
       if (left->IsPrimaryNode()) {
         if (left->AsPrimaryNode()->primary().IsFunction()) {
           left = LoadClosure(left->AsPrimaryNode());
+        } else if (left->AsPrimaryNode()->primary().IsTypeParameter()) {
+          if (current_block_->scope->function_level() > 0) {
+            // Make sure that the instantiator is captured.
+            CaptureInstantiator();
+          }
+          TypeParameter& type_parameter = TypeParameter::ZoneHandle();
+          type_parameter ^= ClassFinalizer::FinalizeType(
+              current_class(),
+              TypeParameter::Cast(left->AsPrimaryNode()->primary()),
+              ClassFinalizer::kFinalize);
+          ASSERT(!type_parameter.IsMalformed());
+          left = new TypeNode(primary->token_pos(), type_parameter);
         } else {
           // Super field access handled in ParseSuperFieldAccess(),
           // super calls handled in ParseSuperCall().
@@ -7781,7 +7822,26 @@
         if (primary->primary().IsFunction()) {
           array = LoadClosure(primary);
         } else if (primary->primary().IsClass()) {
-          ErrorMsg(bracket_pos, "cannot apply index operator to class");
+          const Class& type_class = Class::Cast(primary->primary());
+          Type& type = Type::ZoneHandle(
+              Type::New(type_class, TypeArguments::Handle(),
+                        primary->token_pos(), Heap::kOld));
+          type ^= ClassFinalizer::FinalizeType(
+              current_class(), type, ClassFinalizer::kCanonicalize);
+          ASSERT(!type.IsMalformed());
+          array = new TypeNode(primary->token_pos(), type);
+        } else if (primary->primary().IsTypeParameter()) {
+          if (current_block_->scope->function_level() > 0) {
+            // Make sure that the instantiator is captured.
+            CaptureInstantiator();
+          }
+          TypeParameter& type_parameter = TypeParameter::ZoneHandle();
+          type_parameter ^= ClassFinalizer::FinalizeType(
+              current_class(),
+              TypeParameter::Cast(primary->primary()),
+              ClassFinalizer::kFinalize);
+          ASSERT(!type_parameter.IsMalformed());
+          array = new TypeNode(primary->token_pos(), type_parameter);
         } else {
           UNREACHABLE();  // Internal parser error.
         }
@@ -7828,9 +7888,23 @@
             AstNode* receiver = LoadReceiver(primary->token_pos());
             selector = ParseInstanceCall(receiver, name);
           }
+        } else if (primary->primary().IsTypeParameter()) {
+          const String& name = String::ZoneHandle(
+              Symbols::New(primary->Name()));
+          selector = ThrowNoSuchMethodError(primary->token_pos(),
+                                            current_class(),
+                                            name,
+                                            InvocationMirror::kStatic,
+                                            InvocationMirror::kMethod);
         } else if (primary->primary().IsClass()) {
-          ErrorMsg(left->token_pos(),
-                   "must use 'new' or 'const' to construct new instance");
+          const Class& type_class = Class::Cast(primary->primary());
+          Type& type = Type::ZoneHandle(
+              Type::New(type_class, TypeArguments::Handle(),
+                        primary->token_pos(), Heap::kOld));
+          type ^= ClassFinalizer::FinalizeType(
+              current_class(), type, ClassFinalizer::kCanonicalize);
+          ASSERT(!type.IsMalformed());
+          selector = new TypeNode(primary->token_pos(), type);
         } else {
           UNREACHABLE();  // Internal parser error.
         }
@@ -7854,7 +7928,20 @@
                         primary->token_pos(), Heap::kOld));
           type ^= ClassFinalizer::FinalizeType(
               current_class(), type, ClassFinalizer::kCanonicalize);
+          ASSERT(!type.IsMalformed());
           left = new TypeNode(primary->token_pos(), type);
+        } else if (primary->primary().IsTypeParameter()) {
+          if (current_block_->scope->function_level() > 0) {
+            // Make sure that the instantiator is captured.
+            CaptureInstantiator();
+          }
+          TypeParameter& type_parameter = TypeParameter::ZoneHandle();
+          type_parameter ^= ClassFinalizer::FinalizeType(
+              current_class(),
+              TypeParameter::Cast(primary->primary()),
+              ClassFinalizer::kFinalize);
+          ASSERT(!type_parameter.IsMalformed());
+          left = new TypeNode(primary->token_pos(), type_parameter);
         } else if (primary->IsSuper()) {
           // Return "super" to handle unary super operator calls,
           // or to report illegal use of "super" otherwise.
@@ -7874,35 +7961,34 @@
 
 AstNode* Parser::ParsePostfixExpr() {
   TRACE_PARSER("ParsePostfixExpr");
-  const intptr_t postfix_expr_pos = TokenPos();
-  AstNode* postfix_expr = ParsePrimary();
-  postfix_expr = ParseSelectors(postfix_expr, false);
+  String* expr_ident =
+      Token::IsIdentifier(CurrentToken()) ? CurrentLiteral() : NULL;
+  const intptr_t expr_pos = TokenPos();
+  AstNode* expr = ParsePrimary();
+  expr = ParseSelectors(expr, false);
   if (IsIncrementOperator(CurrentToken())) {
     TRACE_PARSER("IncrementOperator");
     Token::Kind incr_op = CurrentToken();
-    if (!IsAssignableExpr(postfix_expr)) {
-      ErrorMsg("expression is not assignable");
-    }
     ConsumeToken();
     // Not prefix.
-    LetNode* let_expr = PrepareCompoundAssignmentNodes(&postfix_expr);
-    LocalVariable* temp = let_expr->AddInitializer(postfix_expr);
+    LetNode* let_expr = PrepareCompoundAssignmentNodes(&expr);
+    LocalVariable* temp = let_expr->AddInitializer(expr);
     Token::Kind binary_op =
         (incr_op == Token::kINCR) ? Token::kADD : Token::kSUB;
     BinaryOpNode* add = new BinaryOpNode(
-        postfix_expr_pos,
+        expr_pos,
         binary_op,
-        new LoadLocalNode(postfix_expr_pos, temp),
-        new LiteralNode(postfix_expr_pos, Smi::ZoneHandle(Smi::New(1))));
-    AstNode* store = CreateAssignmentNode(postfix_expr, add);
+        new LoadLocalNode(expr_pos, temp),
+        new LiteralNode(expr_pos, Smi::ZoneHandle(Smi::New(1))));
+    AstNode* store = CreateAssignmentNode(expr, add, expr_ident, expr_pos);
     ASSERT(store != NULL);
     // The result is a pair of the (side effects of the) store followed by
     // the (value of the) initial value temp variable load.
     let_expr->AddNode(store);
-    let_expr->AddNode(new LoadLocalNode(postfix_expr_pos, temp));
+    let_expr->AddNode(new LoadLocalNode(expr_pos, temp));
     return let_expr;
   }
-  return postfix_expr;
+  return expr;
 }
 
 
@@ -7932,8 +8018,7 @@
       if (!scope_class.IsNull()) {
         // First check if the type is a type parameter of the given scope class.
         const TypeParameter& type_parameter = TypeParameter::Handle(
-            scope_class.LookupTypeParameter(unresolved_class_name,
-                                            type->token_pos()));
+            scope_class.LookupTypeParameter(unresolved_class_name));
         if (!type_parameter.IsNull()) {
           // A type parameter is considered to be a malformed type when
           // referenced by a static member.
@@ -8072,14 +8157,14 @@
 }
 
 
-const Type* Parser::ReceiverType(intptr_t type_pos) const {
+const Type* Parser::ReceiverType() const {
   ASSERT(!current_class().IsNull());
   TypeArguments& type_arguments = TypeArguments::Handle();
   if (current_class().NumTypeParameters() > 0) {
     type_arguments = current_class().type_parameters();
   }
   Type& type = Type::ZoneHandle(
-      Type::New(current_class(), type_arguments, type_pos));
+      Type::New(current_class(), type_arguments, current_class().token_pos()));
   if (!is_top_level_ || current_class().is_type_finalized()) {
     type ^= ClassFinalizer::FinalizeType(
         current_class(), type, ClassFinalizer::kCanonicalizeWellFormed);
@@ -8638,8 +8723,7 @@
 }
 
 
-// Resolve identifier, issue an error message if the name refers to
-// a class/interface or a type parameter. Issue an error message if
+// Resolve identifier. Issue an error message if
 // the ident refers to a method and allow_closure_names is false.
 // If the name cannot be resolved, turn it into an instance field access
 // if we're compiling an instance method, or issue an error message
@@ -8653,15 +8737,19 @@
   AstNode* resolved = NULL;
   ResolveIdentInLocalScope(ident_pos, ident, &resolved);
   if (resolved == NULL) {
-    // Check whether the identifier is a type parameter. Type parameters
-    // can never be used in primary expressions.
+    // Check whether the identifier is a type parameter.
     if (!current_class().IsNull()) {
-      TypeParameter& type_param = TypeParameter::Handle(
-          current_class().LookupTypeParameter(ident, ident_pos));
-      if (!type_param.IsNull()) {
-        String& type_param_name = String::Handle(type_param.name());
-        ErrorMsg(ident_pos, "illegal use of type parameter %s",
-                 type_param_name.ToCString());
+      TypeParameter& type_parameter = TypeParameter::ZoneHandle(
+          current_class().LookupTypeParameter(ident));
+      if (!type_parameter.IsNull()) {
+        if (current_block_->scope->function_level() > 0) {
+          // Make sure that the instantiator is captured.
+          CaptureInstantiator();
+        }
+        type_parameter ^= ClassFinalizer::FinalizeType(
+            current_class(), type_parameter, ClassFinalizer::kFinalize);
+        ASSERT(!type_parameter.IsMalformed());
+        return new TypeNode(ident_pos, type_parameter);
       }
     }
     // Not found in the local scope, and the name is not a type parameter.
@@ -8694,10 +8782,15 @@
         ErrorMsg(ident_pos, "illegal reference to method '%s'",
                  ident.ToCString());
       }
-    } else {
-      ASSERT(primary->primary().IsClass());
-      ErrorMsg(ident_pos, "illegal reference to class or interface '%s'",
-               ident.ToCString());
+    } else if (primary->primary().IsClass()) {
+      const Class& type_class = Class::Cast(primary->primary());
+      Type& type = Type::ZoneHandle(
+          Type::New(type_class, TypeArguments::Handle(),
+                    primary->token_pos(), Heap::kOld));
+      type ^= ClassFinalizer::FinalizeType(
+          current_class(), type, ClassFinalizer::kCanonicalize);
+      ASSERT(!type.IsMalformed());
+      resolved = new TypeNode(primary->token_pos(), type);
     }
   }
   return resolved;
@@ -9550,17 +9643,12 @@
       if (!ResolveIdentInLocalScope(qual_ident.ident_pos,
                                     *qual_ident.ident,
                                     &primary)) {
-        // Check whether the identifier is a type parameter. Type parameters
-        // can never be used as part of primary expressions.
+        // Check whether the identifier is a type parameter.
         if (!current_class().IsNull()) {
           TypeParameter& type_param = TypeParameter::ZoneHandle(
-              current_class().LookupTypeParameter(*(qual_ident.ident),
-                                                  TokenPos()));
+              current_class().LookupTypeParameter(*(qual_ident.ident)));
           if (!type_param.IsNull()) {
-            const String& type_param_name = String::Handle(type_param.name());
-            ErrorMsg(qual_ident.ident_pos,
-                     "illegal use of type parameter %s",
-                     type_param_name.ToCString());
+            return new PrimaryNode(qual_ident.ident_pos, type_param);
           }
         }
         // This is a non-local unqualified identifier so resolve the
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 6fe1e2e..81341d5 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -435,7 +435,8 @@
   SequenceNode* ParseInstanceSetter(const Function& func);
   SequenceNode* ParseStaticConstGetter(const Function& func);
   SequenceNode* ParseMethodExtractor(const Function& func);
-  SequenceNode* ParseNoSuchMethodDispatcher(const Function& func);
+  SequenceNode* ParseNoSuchMethodDispatcher(const Function& func,
+                                            Array& default_values);
 
   void ChainNewBlock(LocalScope* outer_scope);
   void OpenBlock();
@@ -548,7 +549,7 @@
   LocalVariable* LookupLocalScope(const String& ident);
   void CheckInstanceFieldAccess(intptr_t field_pos, const String& field_name);
   bool ParsingStaticMember() const;
-  const Type* ReceiverType(intptr_t type_pos) const;
+  const Type* ReceiverType() const;
   bool IsInstantiatorRequired() const;
   bool ResolveIdentInLocalScope(intptr_t ident_pos,
                                 const String &ident,
@@ -598,8 +599,6 @@
   LetNode* PrepareCompoundAssignmentNodes(AstNode** expr);
   LocalVariable* CreateTempConstVariable(intptr_t token_pos, const char* s);
 
-  static bool IsAssignableExpr(AstNode* expr);
-
   static SequenceNode* NodeAsSequenceNode(intptr_t sequence_pos,
                                           AstNode* node,
                                           LocalScope* scope);
@@ -621,7 +620,10 @@
 
   void EnsureExpressionTemp();
   void EnsureSavedCurrentContext();
-  AstNode* CreateAssignmentNode(AstNode* original, AstNode* rhs);
+  AstNode* CreateAssignmentNode(AstNode* original,
+                                AstNode* rhs,
+                                const String* left_ident,
+                                intptr_t left_pos);
   AstNode* InsertClosureCallNodes(AstNode* condition);
 
   ConstructorCallNode* CreateConstructorCallNode(
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index cf80f17..04c2951 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -488,6 +488,7 @@
   RawFunction* signature_function_;  // Associated function for signature class.
   RawArray* constants_;  // Canonicalized values of this class.
   RawArray* canonical_types_;  // Canonicalized types of this class.
+  RawArray* no_such_method_cache_;   // Dispatcher functions for noSuchMethod.
   RawCode* allocation_stub_;  // Stub code for allocation of instances.
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_);
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index af4b1a8..11382c0 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -202,7 +202,7 @@
   // allocations may happen.
   intptr_t num_flds = (type.raw()->to() - type.raw()->from());
   for (intptr_t i = 0; i <= num_flds; i++) {
-    (*reader->ObjectHandle()) = reader->ReadObjectRef();
+    (*reader->ObjectHandle()) = reader->ReadObjectImpl();
     type.StorePointer((type.raw()->from() + i), reader->ObjectHandle()->raw());
   }
 
@@ -286,8 +286,10 @@
   writer->WriteIntptrValue(ptr()->token_pos_);
   writer->Write<int8_t>(ptr()->type_state_);
 
-  // Write out all the object pointer fields.
-  SnapshotWriterVisitor visitor(writer);
+  // Write out all the object pointer fields. Since we will be canonicalizing
+  // the type object when reading it back we should write out all the fields
+  // inline and not as references.
+  SnapshotWriterVisitor visitor(writer, false);
   visitor.VisitPointers(from(), to());
 }
 
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc
index 3c39714..9833fe7 100644
--- a/runtime/vm/resolver.cc
+++ b/runtime/vm/resolver.cc
@@ -138,7 +138,7 @@
     // Getter invocation might actually be a method extraction.
     if (is_getter && function.IsNull()) {
       function ^= cls.LookupDynamicFunction(field_name);
-      if (!function.IsNull() && !function.IsNoSuchMethodDispatcher()) {
+      if (!function.IsNull()) {
         // We were looking for the getter but found a method with the same name.
         // Create a method extractor and return it.
         function ^= CreateMethodExtractor(function_name, function);
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 81aae4d..8d6e4bf 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -16,6 +16,7 @@
 #include "vm/store_buffer.h"
 #include "vm/verifier.h"
 #include "vm/visitor.h"
+#include "vm/weak_table.h"
 
 namespace dart {
 
@@ -556,20 +557,35 @@
 }
 
 
-void Scavenger::ProcessPeerReferents() {
-  PeerTable prev;
-  std::swap(prev, peer_table_);
-  for (PeerTable::iterator it = prev.begin(); it != prev.end(); ++it) {
-    RawObject* raw_obj = it->first;
-    ASSERT(raw_obj->IsHeapObject());
-    uword raw_addr = RawObject::ToAddr(raw_obj);
-    uword header = *reinterpret_cast<uword*>(raw_addr);
-    if (IsForwarding(header)) {
-      // The object has survived.  Preserve its record.
-      uword new_addr = ForwardedAddr(header);
-      raw_obj = RawObject::FromAddr(new_addr);
-      heap_->SetPeer(raw_obj, it->second);
+void Scavenger::ProcessWeakTables() {
+  for (int sel = 0;
+       sel < Heap::kNumWeakSelectors;
+       sel++) {
+    WeakTable* table = heap_->GetWeakTable(
+        Heap::kNew, static_cast<Heap::WeakSelector>(sel));
+    heap_->SetWeakTable(Heap::kNew,
+                        static_cast<Heap::WeakSelector>(sel),
+                        WeakTable::NewFrom(table));
+    intptr_t size = table->size();
+    for (intptr_t i = 0; i < size; i++) {
+      if (table->IsValidEntryAt(i)) {
+        RawObject* raw_obj = table->ObjectAt(i);
+        ASSERT(raw_obj->IsHeapObject());
+        uword raw_addr = RawObject::ToAddr(raw_obj);
+        uword header = *reinterpret_cast<uword*>(raw_addr);
+        if (IsForwarding(header)) {
+          // The object has survived.  Preserve its record.
+          uword new_addr = ForwardedAddr(header);
+          raw_obj = RawObject::FromAddr(new_addr);
+          heap_->SetWeakEntry(raw_obj,
+                              static_cast<Heap::WeakSelector>(sel),
+                              table->ValueAt(i));
+        }
+      }
     }
+    // Remove the old table as it has been replaced with the newly allocated
+    // table above.
+    delete table;
   }
 }
 
@@ -625,7 +641,7 @@
   ScavengerWeakVisitor weak_visitor(this);
   IterateWeakRoots(isolate, &weak_visitor, invoke_api_callbacks);
   visitor.Finalize();
-  ProcessPeerReferents();
+  ProcessWeakTables();
   int64_t end = OS::GetCurrentTimeMicros();
   heap_->RecordTime(kProcessToSpace, middle - start);
   heap_->RecordTime(kIterateWeaks, end - middle);
@@ -649,23 +665,4 @@
 }
 
 
-void Scavenger::SetPeer(RawObject* raw_obj, void* peer) {
-  if (peer == NULL) {
-    peer_table_.erase(raw_obj);
-  } else {
-    peer_table_[raw_obj] = peer;
-  }
-}
-
-
-void* Scavenger::GetPeer(RawObject* raw_obj) {
-  PeerTable::iterator it = peer_table_.find(raw_obj);
-  return (it == peer_table_.end()) ? NULL : it->second;
-}
-
-
-int64_t Scavenger::PeerCount() const {
-  return static_cast<int64_t>(peer_table_.size());
-}
-
 }  // namespace dart
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index 0ce70d6..2ff0033 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -5,8 +5,6 @@
 #ifndef VM_SCAVENGER_H_
 #define VM_SCAVENGER_H_
 
-#include <map>
-
 #include "platform/assert.h"
 #include "platform/utils.h"
 #include "vm/flags.h"
@@ -89,12 +87,6 @@
 
   void WriteProtect(bool read_only);
 
-  void SetPeer(RawObject* raw_obj, void* peer);
-
-  void* GetPeer(RawObject* raw_obj);
-
-  int64_t PeerCount() const;
-
  private:
   // Ids for time and data records in Heap::GCStats.
   enum {
@@ -145,7 +137,7 @@
     return end_ < to_->end();
   }
 
-  void ProcessPeerReferents();
+  void ProcessWeakTables();
 
   VirtualMemory* space_;
   MemoryRegion* to_;
@@ -153,9 +145,6 @@
 
   Heap* heap_;
 
-  typedef std::map<RawObject*, void*> PeerTable;
-  PeerTable peer_table_;
-
   // Current allocation top and end. These values are being accessed directly
   // from generated code.
   uword top_;
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 3333f2d..0a645c4 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -32,7 +32,7 @@
 static bool IsObjectStoreClassId(intptr_t class_id) {
   // Check if this is a class which is stored in the object store.
   return (class_id == kObjectCid ||
-          (class_id >= kInstanceCid && class_id <= kWeakPropertyCid) ||
+          (class_id >= kInstanceCid && class_id <= kUint32x4Cid) ||
           class_id == kArrayCid ||
           class_id == kImmutableArrayCid ||
           RawObject::IsStringClassId(class_id) ||
@@ -201,18 +201,19 @@
   // Read the class header information and lookup the class.
   intptr_t class_header = ReadIntptrValue();
   ASSERT((class_header & kSmiTagMask) != kSmiTag);
+  ASSERT(!IsVMIsolateObject(class_header) ||
+         !IsSingletonClassId(GetVMIsolateObjectId(class_header)));
+  ASSERT((SerializedHeaderTag::decode(class_header) != kObjectId) ||
+         !IsObjectStoreClassId(SerializedHeaderData::decode(class_header)));
   Class& cls = Class::ZoneHandle(isolate(), Class::null());
-  cls = LookupInternalClass(class_header);
   AddBackRef(object_id, &cls, kIsDeserialized);
-  if (cls.IsNull()) {
-    // Read the library/class information and lookup the class.
-    str_ ^= ReadObjectImpl(class_header);
-    library_ = Library::LookupLibrary(str_);
-    ASSERT(!library_.IsNull());
-    str_ ^= ReadObjectImpl();
-    cls = library_.LookupClass(str_);
-    cls.EnsureIsFinalized(isolate());
-  }
+  // Read the library/class information and lookup the class.
+  str_ ^= ReadObjectImpl(class_header);
+  library_ = Library::LookupLibrary(str_);
+  ASSERT(!library_.IsNull());
+  str_ ^= ReadObjectImpl();
+  cls = library_.LookupClass(str_);
+  cls.EnsureIsFinalized(isolate());
   ASSERT(!cls.IsNull());
   return cls.raw();
 }
@@ -1151,8 +1152,21 @@
     return true;
   }
 
-  // Check if classes are not being serialized and it is preinitialized type.
+  // Check if classes are not being serialized and it is preinitialized type
+  // or a predefined internal VM class in the object store.
   if (kind_ != Snapshot::kFull) {
+    // Check if it is an internal VM class which is in the object store.
+    if (rawobj->GetClassId() == kClassCid) {
+      RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj);
+      intptr_t class_id = raw_class->ptr()->id_;
+      if (IsObjectStoreClassId(class_id)) {
+        intptr_t object_id = ObjectIdFromClassId(class_id);
+        WriteIndexedObject(object_id);
+        return true;
+      }
+    }
+
+    // Now check it is a preinitialized type object.
     RawType* raw_type = reinterpret_cast<RawType*>(rawobj);
     intptr_t index = GetTypeIndex(object_store(), raw_type);
     if (index != kInvalidIndex) {
@@ -1264,25 +1278,18 @@
 void SnapshotWriter::WriteClassId(RawClass* cls) {
   ASSERT(kind_ != Snapshot::kFull);
   int class_id = cls->ptr()->id_;
-  if (IsSingletonClassId(class_id)) {
-    intptr_t object_id = ObjectIdFromClassId(class_id);
-    WriteVMIsolateObject(object_id);
-  } else if (IsObjectStoreClassId(class_id)) {
-    intptr_t object_id = ObjectIdFromClassId(class_id);
-    WriteIndexedObject(object_id);
-  } else {
-    // TODO(5411462): Should restrict this to only core-lib classes in this
-    // case.
-    // Write out the class and tags information.
-    WriteVMIsolateObject(kClassCid);
-    WriteIntptrValue(GetObjectTags(cls));
+  ASSERT(!IsSingletonClassId(class_id) && !IsObjectStoreClassId(class_id));
+  // TODO(5411462): Should restrict this to only core-lib classes in this
+  // case.
+  // Write out the class and tags information.
+  WriteVMIsolateObject(kClassCid);
+  WriteIntptrValue(GetObjectTags(cls));
 
-    // Write out the library url and class name.
-    RawLibrary* library = cls->ptr()->library_;
-    ASSERT(library != Library::null());
-    WriteObjectImpl(library->ptr()->url_);
-    WriteObjectImpl(cls->ptr()->name_);
-  }
+  // Write out the library url and class name.
+  RawLibrary* library = cls->ptr()->library_;
+  ASSERT(library != Library::null());
+  WriteObjectImpl(library->ptr()->url_);
+  WriteObjectImpl(cls->ptr()->name_);
 }
 
 
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index c092a32..f3d8e43 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -1050,6 +1050,10 @@
       "  final int fld2;"
       "}";
   const char* kScriptChars =
+      "class TestTrace implements StackTrace {"
+      "  TestTrace();"
+      "  String toString() { return 'my trace'; }"
+      "}"
       "class Fields  {"
       "  Fields(int i, int j) : fld1 = i, fld2 = j {}"
       "  int fld1;"
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 8ab3c07..b0ae1e5 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -266,11 +266,12 @@
       "     * dart frame corresponding to StackFrame2Test.testMain"
       "     * entry frame"
       "     */"
-      "    StackFrame.equals(8, StackFrame.frameCount());"
-      "    StackFrame.equals(3, StackFrame.dartFrameCount());"
+      "    StackFrame.equals(9, StackFrame.frameCount());"
+      "    StackFrame.equals(4, StackFrame.dartFrameCount());"
       "    StackFrame.validateFrame(0, \"StackFrame_validateFrame\");"
       "    StackFrame.validateFrame(1, \"StackFrame2Test_noSuchMethod\");"
-      "    StackFrame.validateFrame(2, \"StackFrame2Test_testMain\");"
+      "    StackFrame.validateFrame(2, \"StackFrame2Test_foo\");"
+      "    StackFrame.validateFrame(3, \"StackFrame2Test_testMain\");"
       "    return 5;"
       "  }"
       "  static testMain() {"
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index bce3b70..8170d9d 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -1334,18 +1334,8 @@
     __ LeaveStubFrame();
   }
   __ ldr(R7, FieldAddress(func_reg, Function::usage_counter_offset()));
-  Label is_hot;
-  if (FlowGraphCompiler::CanOptimize()) {
-    ASSERT(FLAG_optimization_counter_threshold > 1);
-    __ CompareImmediate(R7, FLAG_optimization_counter_threshold);
-    __ b(&is_hot, GE);
-    // 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.
-  }
   __ add(R7, R7, ShifterOperand(1));
   __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset()));
-  __ Bind(&is_hot);
 }
 
 
@@ -1357,20 +1347,8 @@
   ASSERT(temp_reg == R6);
   __ ldr(func_reg, FieldAddress(ic_reg, ICData::function_offset()));
   __ ldr(R7, FieldAddress(func_reg, Function::usage_counter_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.
-    __ CompareImmediate(R7, FLAG_optimization_counter_threshold);
-    __ b(&is_hot, EQ);
-    // 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.
-  }
   __ add(R7, R7, ShifterOperand(1));
   __ str(R7, FieldAddress(func_reg, Function::usage_counter_offset()));
-  __ Bind(&is_hot);
 }
 
 
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index 2989efd..25578d5 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -1513,18 +1513,8 @@
     __ LeaveStubFrame();
   }
   __ lw(T7, FieldAddress(func_reg, Function::usage_counter_offset()));
-  Label is_hot;
-  if (FlowGraphCompiler::CanOptimize()) {
-    ASSERT(FLAG_optimization_counter_threshold > 1);
-    __ BranchSignedGreaterEqual(T7, FLAG_optimization_counter_threshold,
-                                &is_hot);
-    // 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.
-  }
   __ addiu(T7, T7, Immediate(1));
   __ sw(T7, FieldAddress(func_reg, Function::usage_counter_offset()));
-  __ Bind(&is_hot);
 }
 
 
@@ -1537,19 +1527,8 @@
   ASSERT(temp_reg == T0);
   __ lw(func_reg, FieldAddress(ic_reg, ICData::function_offset()));
   __ lw(T1, FieldAddress(func_reg, Function::usage_counter_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.
-    __ BranchEqual(T1, FLAG_optimization_counter_threshold, &is_hot);
-    // 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.
-  }
   __ addiu(T1, T1, Immediate(1));
   __ sw(T1, FieldAddress(func_reg, Function::usage_counter_offset()));
-  __ Bind(&is_hot);
 }
 
 
@@ -2180,8 +2159,9 @@
       ICData::CountIndexFor(kNumArgsTested) * kWordSize;
   Label no_overflow;
   __ lw(T1, Address(T6, count_offset));
-  __ AddImmediateDetectOverflow(T1, T1, Smi::RawValue(1), CMPRES, T6);
+  __ AddImmediateDetectOverflow(T1, T1, Smi::RawValue(1), CMPRES, T5);
   __ bgez(CMPRES, &no_overflow);
+  __ delay_slot()->sw(T1, Address(T6, count_offset));
   __ LoadImmediate(TMP1, Smi::RawValue(Smi::kMaxValue));
   __ sw(TMP1, Address(T6, count_offset));  // If overflow.
   __ Bind(&no_overflow);
diff --git a/runtime/vm/vm_sources.gypi b/runtime/vm/vm_sources.gypi
index dcafa4a..422b80b 100644
--- a/runtime/vm/vm_sources.gypi
+++ b/runtime/vm/vm_sources.gypi
@@ -337,6 +337,8 @@
     'visitor.h',
     'vtune.cc',
     'vtune.h',
+    'weak_table.cc',
+    'weak_table.h',
     'zone.cc',
     'zone.h',
     'zone_test.cc',
diff --git a/runtime/vm/weak_table.cc b/runtime/vm/weak_table.cc
new file mode 100644
index 0000000..cb45d2e
--- /dev/null
+++ b/runtime/vm/weak_table.cc
@@ -0,0 +1,115 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/weak_table.h"
+
+#include "platform/assert.h"
+#include "vm/raw_object.h"
+
+namespace dart {
+
+intptr_t WeakTable::SizeFor(intptr_t count, intptr_t size) {
+  intptr_t result = size;
+  if (count <= (size / 4)) {
+    // Reduce the capacity.
+    result = size / 2;
+  } else {
+    // Increase the capacity.
+    result = size * 2;
+    if (result < size) {
+      FATAL("Reached impossible state of having more weak table entries"
+            " than memory available for heap objects.");
+    }
+  }
+  if (result < kMinSize) {
+    result = kMinSize;
+  }
+  return result;
+}
+
+
+void WeakTable::SetValue(RawObject* key, intptr_t val) {
+  intptr_t mask = size() - 1;
+  intptr_t idx = Hash(key) & mask;
+  intptr_t empty_idx = -1;
+  RawObject* obj = ObjectAt(idx);
+
+  while (obj != NULL) {
+    if (obj == key) {
+      SetValueAt(idx, val);
+      return;
+    } else if ((empty_idx < 0) &&
+               (reinterpret_cast<intptr_t>(obj) == kDeletedEntry)) {
+      empty_idx = idx;  // Insert at this location if not found.
+    }
+    idx = (idx + 1) & mask;
+    obj = ObjectAt(idx);
+  }
+
+  if (val == 0) {
+    // Do not enter an invalid value. Associating 0 with a key deletes it from
+    // this weak table above in SetValueAt. If the key was not present in the
+    // weak table we are done.
+    return;
+  }
+
+  if (empty_idx >= 0) {
+    // We will be reusing a slot below.
+    set_used(used() - 1);
+    idx = empty_idx;
+  }
+
+  ASSERT(!IsValidEntryAt(idx));
+  // Set the key and value.
+  SetObjectAt(idx, key);
+  SetValueAt(idx, val);
+  // Update the counts.
+  set_used(used() + 1);
+  set_count(count() + 1);
+
+  // Rehash if needed to ensure that there are empty slots available.
+  if (used_ >= limit()) {
+    Rehash();
+  }
+}
+
+
+void WeakTable::Rehash() {
+  intptr_t old_size = size();
+  intptr_t* old_data = data_;
+
+  intptr_t new_size = SizeFor(count(), size());
+  ASSERT(Utils::IsPowerOfTwo(new_size));
+  intptr_t* new_data = reinterpret_cast<intptr_t*>(
+      calloc(new_size, kEntrySize * kWordSize));
+
+  intptr_t mask = new_size - 1;
+  set_used(0);
+  for (intptr_t i = 0; i < old_size; i++) {
+    if (IsValidEntryAt(i)) {
+      // Find the new hash location for this entry.
+      RawObject* key = ObjectAt(i);
+      intptr_t idx = Hash(key) & mask;
+      RawObject* obj = reinterpret_cast<RawObject*>(new_data[ObjectIndex(idx)]);
+      while (obj != NULL) {
+        ASSERT(obj != key);  // Duplicate entry is not expected.
+        idx = (idx + 1) & mask;
+        obj = reinterpret_cast<RawObject*>(new_data[ObjectIndex(idx)]);
+      }
+
+      new_data[ObjectIndex(idx)] = reinterpret_cast<intptr_t>(key);
+      new_data[ValueIndex(idx)] = ValueAt(i);
+      set_used(used() + 1);
+    }
+  }
+  // We should only have used valid entries.
+  ASSERT(used() == count());
+
+  // Switch to using the newly allocated backing store.
+  size_ = new_size;
+  data_ = new_data;
+  free(old_data);
+}
+
+}  // namespace dart
diff --git a/runtime/vm/weak_table.h b/runtime/vm/weak_table.h
new file mode 100644
index 0000000..cc7f54d
--- /dev/null
+++ b/runtime/vm/weak_table.h
@@ -0,0 +1,172 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_WEAK_TABLE_H_
+#define VM_WEAK_TABLE_H_
+
+#include "vm/globals.h"
+
+#include "platform/assert.h"
+#include "vm/raw_object.h"
+
+namespace dart {
+
+class WeakTable {
+ public:
+  WeakTable() : size_(kMinSize), used_(0), count_(0) {
+    ASSERT(Utils::IsPowerOfTwo(size_));
+    data_ = reinterpret_cast<intptr_t*>(calloc(size_, kEntrySize * kWordSize));
+  }
+  explicit WeakTable(intptr_t size) : used_(0), count_(0) {
+    ASSERT(size >= 0);
+    ASSERT(Utils::IsPowerOfTwo(kMinSize));
+    if (size < kMinSize) {
+      size = kMinSize;
+    }
+    // Get a max size that avoids overflows.
+    const intptr_t kMaxSize =
+      (kIntptrOne << (kBitsPerWord - 2)) / (kEntrySize * kWordSize);
+    ASSERT(Utils::IsPowerOfTwo(kMaxSize));
+    if (size > kMaxSize) {
+      size = kMaxSize;
+    }
+    size_ = size;
+    ASSERT(Utils::IsPowerOfTwo(size_));
+    data_ = reinterpret_cast<intptr_t*>(calloc(size_, kEntrySize * kWordSize));
+  }
+
+  ~WeakTable() {
+    free(data_);
+  }
+
+  static WeakTable* NewFrom(WeakTable* original) {
+    return new WeakTable(SizeFor(original->count(), original->size()));
+  }
+
+  intptr_t size() const { return size_; }
+  intptr_t used() const { return used_; }
+  intptr_t count() const { return count_; }
+
+  bool IsValidEntryAt(intptr_t i) const {
+    ASSERT(((ValueAt(i) == 0) &&
+            ((ObjectAt(i) == NULL) ||
+             (data_[ObjectIndex(i)] == kDeletedEntry))) ||
+           ((ValueAt(i) != 0) &&
+            (ObjectAt(i) != NULL) &&
+            (data_[ObjectIndex(i)] != kDeletedEntry)));
+    return (data_[ValueIndex(i)] != 0);
+  }
+
+  void InvalidateAt(intptr_t i) {
+    ASSERT(IsValidEntryAt(i));
+    SetValueAt(i, 0);
+  }
+
+  RawObject* ObjectAt(intptr_t i) const {
+    ASSERT(i >= 0);
+    ASSERT(i < size());
+    return reinterpret_cast<RawObject*>(data_[ObjectIndex(i)]);
+  }
+
+  intptr_t ValueAt(intptr_t i) const {
+    ASSERT(i >= 0);
+    ASSERT(i < size());
+    return data_[ValueIndex(i)];
+  }
+
+  void SetValue(RawObject* key, intptr_t val);
+
+  intptr_t GetValue(RawObject* key) const {
+    intptr_t mask = size() - 1;
+    intptr_t idx = Hash(key) & mask;
+    RawObject* obj = ObjectAt(idx);
+    while (obj != NULL) {
+      if (obj == key) {
+        return ValueAt(idx);
+      }
+      idx = (idx + 1) & mask;
+      obj = ObjectAt(idx);
+    }
+    ASSERT(ValueAt(idx) == 0);
+    return 0;
+  }
+
+ private:
+  enum {
+    kObjectOffset = 0,
+    kValueOffset,
+    kEntrySize,
+  };
+
+  static const intptr_t kDeletedEntry = 1;  // Equivalent to a tagged NULL.
+  static const intptr_t kMinSize = 8;
+
+  static intptr_t SizeFor(intptr_t count, intptr_t size);
+  static intptr_t LimitFor(intptr_t size) {
+    // Maintain a maximum of 75% fill rate.
+    return 3 * (size / 4);
+  }
+  intptr_t limit() const { return LimitFor(size()); }
+
+  intptr_t index(intptr_t i) const {
+    return i * kEntrySize;
+  }
+
+  void set_used(intptr_t val) {
+    ASSERT(val <= limit());
+    used_ = val;
+  }
+
+  void set_count(intptr_t val) {
+    ASSERT(val <= limit());
+    ASSERT(val <= used());
+    count_ = val;
+  }
+
+  intptr_t ObjectIndex(intptr_t i) const {
+    return index(i) + kObjectOffset;
+  }
+
+  intptr_t ValueIndex(intptr_t i) const {
+    return index(i) + kValueOffset;
+  }
+
+  void SetObjectAt(intptr_t i, RawObject* key) {
+    ASSERT(i >= 0);
+    ASSERT(i < size());
+    data_[ObjectIndex(i)] = reinterpret_cast<intptr_t>(key);
+  }
+
+  void SetValueAt(intptr_t i, intptr_t val) {
+    ASSERT(i >= 0);
+    ASSERT(i < size());
+    // Setting a value of 0 is equivalent to invalidating the entry.
+    if (val == 0) {
+      data_[ObjectIndex(i)] = kDeletedEntry;
+      set_count(count() - 1);
+    }
+    data_[ValueIndex(i)] = val;
+  }
+
+  void Rehash();
+
+  static intptr_t Hash(RawObject* key) {
+    return reinterpret_cast<intptr_t>(key) >> kObjectAlignmentLog2;
+  }
+
+  // data_ contains size_ tuples of key/value.
+  intptr_t* data_;
+  // size_ keeps the number of entries in data_. used_ maintains the number of
+  // non-NULL entries and will trigger rehashing if needed. count_ stores the
+  // number valid entries, and will determine the size_ after rehashing.
+  intptr_t size_;
+  intptr_t used_;
+  intptr_t count_;
+
+  DISALLOW_COPY_AND_ASSIGN(WeakTable);
+};
+
+}  // namespace dart
+
+#endif  // VM_WEAK_TABLE_H_
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index 6e1e5ec..7013272 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -8,10 +8,18 @@
 // This is a hack to make @deprecated work in dart:io. Don't remove or use this,
 // unless coordinated with either me or the core library team. Thanks!
 // TODO(ajohnsen): Remove at the 11th of Auguest 2013.
-// TODO(ajohnsen): Remove hide in sdk/lib/web_sql/dart2js/web_sql_dart2js.dart.
-// TODO(ajohnsen): Remove hide in sdk/lib/html/dart2js/html_dart2js.dart.
-// TODO(ajohnsen): Remove hide in
-//     sdk/lib/web_audio/dart2js/web_audio_dart2js.dart.
+// TODO(ajohnsen): Remove hide in:
+//    tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+//    tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
+//    tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
+//    tools/dom/templates/html/dart2js/web_gl_dart2js.darttemplate
+//    tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate
+//    tools/dom/templates/html/dartium/html_dartium.darttemplate
+//    tools/dom/templates/html/dartium/svg_dartium.darttemplate
+//    tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
+//    tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
+//    tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
+
 const deprecated = 0;
 
 /**
@@ -323,9 +331,7 @@
 
 class MappedIterable<S, T> extends IterableBase<T> {
   final Iterable<S> _iterable;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _Transformation<S, T> */ _f;
+  final _Transformation<S, T> _f;
 
   MappedIterable(this._iterable, T this._f(S element));
 
@@ -345,9 +351,7 @@
 class MappedIterator<S, T> extends Iterator<T> {
   T _current;
   final Iterator<S> _iterator;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _Transformation<S, T> */ _f;
+  final _Transformation<S, T> _f;
 
   MappedIterator(this._iterator, T this._f(S element));
 
@@ -366,9 +370,7 @@
 /** Specialized alternative to [MappedIterable] for mapped [List]s. */
 class MappedListIterable<S, T> extends ListIterable<T> {
   final Iterable<S> _source;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _Transformation<S, T> */ _f;
+  final _Transformation<S, T> _f;
 
   MappedListIterable(this._source, T this._f(S value));
 
@@ -381,9 +383,7 @@
 
 class WhereIterable<E> extends IterableBase<E> {
   final Iterable<E> _iterable;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
 
   WhereIterable(this._iterable, bool this._f(E element));
 
@@ -392,9 +392,7 @@
 
 class WhereIterator<E> extends Iterator<E> {
   final Iterator<E> _iterator;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
 
   WhereIterator(this._iterator, bool this._f(E element));
 
@@ -414,9 +412,7 @@
 
 class ExpandIterable<S, T> extends IterableBase<T> {
   final Iterable<S> _iterable;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ExpandFunction */ _f;
+  final _ExpandFunction _f;
 
   ExpandIterable(this._iterable, Iterable<T> this._f(S element));
 
@@ -425,9 +421,7 @@
 
 class ExpandIterator<S, T> implements Iterator<T> {
   final Iterator<S> _iterator;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ExpandFunction */ _f;
+  final _ExpandFunction _f;
   // Initialize _currentExpansion to an empty iterable. A null value
   // marks the end of iteration, and we don't want to call _f before
   // the first moveNext call.
@@ -499,9 +493,7 @@
 
 class TakeWhileIterable<E> extends IterableBase<E> {
   final Iterable<E> _iterable;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
 
   TakeWhileIterable(this._iterable, bool this._f(E element));
 
@@ -512,9 +504,7 @@
 
 class TakeWhileIterator<E> extends Iterator<E> {
   final Iterator<E> _iterator;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
   bool _isFinished = false;
 
   TakeWhileIterator(this._iterator, bool this._f(E element));
@@ -575,9 +565,7 @@
 
 class SkipWhileIterable<E> extends IterableBase<E> {
   final Iterable<E> _iterable;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
 
   SkipWhileIterable(this._iterable, bool this._f(E element));
 
@@ -588,9 +576,7 @@
 
 class SkipWhileIterator<E> extends Iterator<E> {
   final Iterator<E> _iterator;
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final /* _ElementPredicate */ _f;
+  final _ElementPredicate _f;
   bool _hasSkipped = false;
 
   SkipWhileIterator(this._iterator, bool this._f(E element));
@@ -702,6 +688,9 @@
  * The uses of this class will be replaced by mixins.
  */
 class IterableMixinWorkaround {
+  // A list to identify cyclic collections during toString() calls.
+  static List _toStringList = new List();
+
   static bool contains(Iterable iterable, var element) {
     for (final e in iterable) {
       if (e == element) return true;
@@ -895,6 +884,27 @@
     return buffer.toString();
   }
 
+  static String toStringIterable(Iterable iterable, String leftDelimiter,
+                                 String rightDelimiter) {
+    for (int i = 0; i < _toStringList.length; i++) {
+      if (identical(_toStringList[i], iterable)) {
+        return '$leftDelimiter...$rightDelimiter';
+        }
+    }
+
+    StringBuffer result = new StringBuffer();
+    try {
+      _toStringList.add(iterable);
+      result.write(leftDelimiter);
+      result.writeAll(iterable, ', ');
+      result.write(rightDelimiter);
+    } finally {
+      assert(identical(_toStringList.last, iterable));
+      _toStringList.removeLast();
+    }
+    return result.toString();
+  }
+
   static Iterable where(Iterable iterable, bool f(var element)) {
     return new WhereIterable(iterable, f);
   }
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index abb492c..cad9fb5 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -255,7 +255,22 @@
     return libraryRoot.resolve(patchPath);
   }
 
-  translatePackageUri(Uri uri, tree.Node node) => packageRoot.resolve(uri.path);
+  Uri translatePackageUri(Uri uri, tree.Node node) {
+    if (packageRoot == null) {
+      if (node != null) {
+        reportErrorCode(node, 
+            leg.MessageKind.PACKAGE_ROOT_NOT_SET,
+            {'uri': uri});
+      } else {
+        reportDiagnostic(null, 
+            leg.MessageKind.PACKAGE_ROOT_NOT_SET.error({'uri': uri}).toString(),
+            api.Diagnostic.ERROR);
+        
+      }
+      throw new leg.CompilerCancelledException("Package root not set.");
+    }
+    return packageRoot.resolve(uri.path);
+  }
 
   bool run(Uri uri) {
     log('Allowed library categories: $allowedLibraryCategories');
diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart
index 6abb7bd..2fd29da 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -671,9 +671,17 @@
               || enclosingElement.kind == ElementKind.GETTER
               || enclosingElement.kind == ElementKind.SETTER);
          enclosingElement = enclosingElement.enclosingElement) {
-      SourceString surroundingName =
-          Elements.operatorNameToIdentifier(enclosingElement.name);
-      parts = parts.prepend(surroundingName.slowToString());
+      // TODO(johnniwinther): Simplify computed names.
+      if (enclosingElement.isGenerativeConstructor() ||
+          enclosingElement.isGenerativeConstructorBody() ||
+          enclosingElement.isFactoryConstructor()) {
+        parts = parts.prepend(
+            Elements.reconstructConstructorName(enclosingElement));
+      } else {
+        SourceString surroundingName =
+            Elements.operatorNameToIdentifier(enclosingElement.name);
+        parts = parts.prepend(surroundingName.slowToString());
+      }
       // A generative constructors's parent is the class; the class name is
       // already part of the generative constructor's name.
       if (enclosingElement.kind == ElementKind.GENERATIVE_CONSTRUCTOR) break;
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 635f8f0..4580dc0 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -14,6 +14,7 @@
 import 'source_file_provider.dart';
 import 'filenames.dart';
 import 'util/uri_extras.dart';
+import 'util/util.dart';
 import '../../libraries.dart';
 
 const String LIBRARY_ROOT = '../../../../..';
@@ -93,6 +94,7 @@
 
 void compile(List<String> argv) {
   bool isWindows = (Platform.operatingSystem == 'windows');
+  stackTraceFilePrefix = '$currentDirectory';
   Uri libraryRoot = currentDirectory;
   Uri out = currentDirectory.resolve('out.js');
   Uri sourceMapOut = currentDirectory.resolve('out.js.map');
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
index ddc8571..6dc9ad8 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
@@ -109,20 +109,13 @@
     assert(element.isConstructor());
     StringBuffer result = new StringBuffer();
     String name = element.name.slowToString();
-    if (element.name != element.getEnclosingClass().name) {
+    if (element.name != const SourceString('')) {
       // Named constructor or factory. Is there a more reliable way to check
       // this case?
       if (!placeholder.isRedirectingCall) {
         result.write(renameType(placeholder.type, renameElement));
         result.write('.');
       }
-      String prefix = '${element.getEnclosingClass().name.slowToString()}\$';
-      if (!name.startsWith(prefix)) {
-        // Factory for another interface (that is going away soon).
-        compiler.internalErrorOnElement(element,
-            "Factory constructors for external interfaces are not supported.");
-      }
-      name = name.substring(prefix.length);
       if (!element.getLibrary().isPlatformLibrary) {
         name = renameString(element.getLibrary(), name);
       }
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 2bd5812..7411bc9 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -353,21 +353,22 @@
     return isLocal(element);
   }
 
-  static SourceString constructConstructorName(SourceString receiver,
-                                               SourceString selector) {
-    String r = receiver.slowToString();
-    String s = selector.slowToString();
-    return new SourceString('$r\$$s');
-  }
-
-  static SourceString deconstructConstructorName(SourceString name,
-                                                 ClassElement holder) {
-    String r = '${holder.name.slowToString()}\$';
-    String s = name.slowToString();
-    if (s.startsWith(r)) {
-      return new SourceString(s.substring(r.length));
+  static SourceString reconstructConstructorNameSourceString(Element element) {
+    if (element.name == const SourceString('')) {
+      return element.getEnclosingClass().name;
+    } else {
+      return new SourceString(reconstructConstructorName(element));
     }
-    return null;
+  }
+  
+  // TODO(johnniwinther): Remove this method.
+  static String reconstructConstructorName(Element element) {
+    String className = element.getEnclosingClass().name.slowToString();
+    if (element.name == const SourceString('')) {
+      return className;
+    } else {
+      return '$className\$${element.name.slowToString()}';
+    }
   }
 
   /**
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 91f3f44..58c2344 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1409,7 +1409,7 @@
 
   SynthesizedConstructorElementX.forDefault(Element enclosing,
                                             Compiler compiler)
-      : super(enclosing.name, ElementKind.GENERATIVE_CONSTRUCTOR,
+      : super(const SourceString(''), ElementKind.GENERATIVE_CONSTRUCTOR,
               Modifiers.EMPTY, enclosing),
         target = null {
     // TODO(karlklose): get rid of the fake AST.
@@ -1798,16 +1798,7 @@
   // make noMatch a required argument. Peter's suspicion is that most
   // callers of this method would benefit from using the noMatch method.
   Element lookupConstructor(Selector selector, [Element noMatch(Element)]) {
-    SourceString normalizedName;
-    SourceString className = this.name;
-    SourceString constructorName = selector.name;
-    if (constructorName != const SourceString('')) {
-      normalizedName = Elements.constructConstructorName(className,
-                                                         constructorName);
-    } else {
-      normalizedName = className;
-    }
-    Element result = localLookup(normalizedName);
+    Element result = localLookup(selector.name);
     return validateConstructorLookupResults(selector, result, noMatch);
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 80ed094..55494ac 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -42,15 +42,6 @@
              link = link.tail) {
           addMemberByName(link.head.element);
         }
-      } else if (element.isConstructor()) {
-        SourceString source = Elements.deconstructConstructorName(
-            element.name, element.getEnclosingClass());
-        if (source == null) {
-          // source is null for unnamed constructors.
-          name = '';
-        } else {
-          name = source.slowToString();
-        }
       }
       allElementsByName[name] = allElementsByName.putIfAbsent(
           name, () => const Link<Element>()).prepend(element);
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index c8fd503..2f90272 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -668,15 +668,6 @@
     } else if (cls.isNative()) {
       addInterceptorsForNativeClassMembers(cls, enqueuer);
     }
-
-    if (compiler.enableTypeAssertions) {
-      // We need to register is checks for assignments to fields.
-      cls.forEachMember((Element enclosing, Element member) {
-        if (!member.isInstanceMember() || !member.isField()) return;
-        DartType type = member.computeType(compiler);
-        enqueuer.registerIsCheck(type, elements);
-      }, includeSuperAndInjectedMembers: true);
-    }
   }
 
   void registerUseInterceptor(Enqueuer enqueuer) {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 9032bf5..0b6150b 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1262,18 +1262,20 @@
       int requiredParameterCount;
       int optionalParameterCount;
       String namedArguments = '';
-      bool isConstructor;
+      bool isConstructor = false;
       if (elementOrSelector is Selector) {
         Selector selector = elementOrSelector;
         requiredParameterCount = selector.argumentCount;
         optionalParameterCount = 0;
-        isConstructor = false;
         namedArguments = namedParametersAsReflectionNames(selector);
       } else {
         FunctionElement function = elementOrSelector;
+        if (function.isConstructor()) {
+          isConstructor = true;
+          name = Elements.reconstructConstructorName(function);
+        }
         requiredParameterCount = function.requiredParameterCount(compiler);
         optionalParameterCount = function.optionalParameterCount(compiler);
-        isConstructor = function.isConstructor();
         FunctionSignature signature = function.computeSignature(compiler);
         if (signature.optionalParametersAreNamed) {
           var names = [];
@@ -1543,10 +1545,11 @@
   }
 
   bool canGenerateCheckedSetter(Element member) {
-    DartType type = member.computeType(compiler);
-    if (type.element.isTypeVariable()
-        || type.element == compiler.dynamicClass
-        || type.element == compiler.objectClass) {
+    DartType type = member.computeType(compiler).unalias(compiler);
+    if (type.element.isTypeVariable() ||
+        (type is FunctionType && type.containsTypeVariables) || 
+        type.element == compiler.dynamicClass ||
+        type.element == compiler.objectClass) {
       // TODO(ngeoffray): Support type checks on type parameters.
       return false;
     }
@@ -1562,6 +1565,8 @@
     // TODO(ahe): Generate a dynamic type error here.
     if (type.element.isErroneous()) return;
     type = type.unalias(compiler);
+    // TODO(11273): Support complex subtype checks.
+    type = type.asRaw();
     CheckedModeHelper helper =
         backend.getCheckedModeHelper(type, typeCast: false);
     FunctionElement helperElement = helper.getElement(compiler);
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 61f6d84..571fd6d 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -317,9 +317,8 @@
     if (name != elementName) return getMappedOperatorName(name.slowToString());
 
     LibraryElement library = element.getLibrary();
-    if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
-      ConstructorBodyElement bodyElement = element;
-      name = bodyElement.constructor.name;
+    if (element.isGenerativeConstructorBody()) {
+      name = Elements.reconstructConstructorNameSourceString(element);
     }
     FunctionSignature signature = element.computeSignature(compiler);
     String methodName =
@@ -516,12 +515,13 @@
     assert(!element.isInstanceMember());
     String name;
     if (element.isGenerativeConstructor()) {
-      if (element.name == element.getEnclosingClass().name) {
-        // Keep the class name for the class and not the factory.
-        name = "${element.name.slowToString()}\$";
-      } else {
-        name = element.name.slowToString();
-      }
+      name = "${element.getEnclosingClass().name.slowToString()}\$"
+             "${element.name.slowToString()}";
+    } else if (element.isFactoryConstructor()) {
+      // TODO(johnniwinther): Change factory name encoding as to not include
+      // the class-name twice.
+      String className = element.getEnclosingClass().name.slowToString();
+      name = '${className}_${Elements.reconstructConstructorName(element)}';
     } else if (Elements.isStaticOrTopLevel(element)) {
       if (element.isMember()) {
         ClassElement enclosingClass = element.getEnclosingClass();
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
index 0ae4696..73e31a1 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
@@ -469,10 +469,17 @@
     };
     InterfaceType type = cls.computeType(compiler);
     InterfaceType target = type.asInstanceOf(check);
-    if (cls.typeVariables.isEmpty && !alwaysGenerateFunction) {
+    Link<DartType> typeVariables;
+    if (cls.isMixinApplication) {
+      MixinApplicationElement mixinApplication = cls;
+      typeVariables = mixinApplication.mixin.typeVariables;
+    } else {
+      typeVariables = cls.typeVariables;
+    }
+    if (typeVariables.isEmpty && !alwaysGenerateFunction) {
       return new Substitution.list(target.typeArguments);
     } else {
-      return new Substitution.function(target.typeArguments, cls.typeVariables);
+      return new Substitution.function(target.typeArguments, typeVariables);
     }
   }
 
@@ -798,11 +805,11 @@
 class Substitution {
   final bool isFunction;
   final Link<DartType> arguments;
-  final Link<TypeVariableType> parameters;
+  final Link<DartType> parameters;
 
   Substitution.list(this.arguments)
       : isFunction = false,
-        parameters = const Link<TypeVariableType>();
+        parameters = const Link<DartType>();
 
   Substitution.function(this.arguments, this.parameters)
       : isFunction = true;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
index d90fcf0..d86c626 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
@@ -1307,13 +1307,11 @@
     implements MethodMirror {
   final Dart2JsContainerMirror _objectMirror;
   final String simpleName;
-  final String constructorName;
   final Dart2JsMethodKind _kind;
 
   Dart2JsMethodMirror._internal(Dart2JsContainerMirror objectMirror,
       FunctionElement function,
       String this.simpleName,
-      String this.constructorName,
       Dart2JsMethodKind this._kind)
       : this._objectMirror = objectMirror,
         super(objectMirror.mirrors, function);
@@ -1325,7 +1323,6 @@
     // Elements.operatorNameToIdentifier.
     String simpleName =
         Elements.operatorNameToIdentifier(function.name).slowToString();
-    String constructorName = null;
     Dart2JsMethodKind kind;
     if (function.kind == ElementKind.GETTER) {
       kind = Dart2JsMethodKind.GETTER;
@@ -1334,16 +1331,6 @@
       simpleName = '$simpleName=';
     } else if (function.kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
       // TODO(johnniwinther): Support detection of redirecting constructors.
-      constructorName = '';
-      int dollarPos = simpleName.indexOf('\$');
-      if (dollarPos != -1) {
-        constructorName = simpleName.substring(dollarPos + 1);
-        simpleName = simpleName.substring(0, dollarPos);
-        // Simple name is TypeName.constructorName.
-        simpleName = '$simpleName.$constructorName';
-      } else {
-        // Simple name is TypeName.
-      }
       if (function.modifiers.isConst()) {
         kind = Dart2JsMethodKind.CONST;
       } else {
@@ -1351,13 +1338,6 @@
       }
     } else if (function.modifiers.isFactory()) {
       kind = Dart2JsMethodKind.FACTORY;
-      constructorName = '';
-      int dollarPos = simpleName.indexOf('\$');
-      if (dollarPos != -1) {
-        constructorName = simpleName.substring(dollarPos+1);
-        simpleName = simpleName.substring(0, dollarPos);
-        simpleName = '$simpleName.$constructorName';
-      }
     } else if (realName == 'unary-') {
       kind = Dart2JsMethodKind.OPERATOR;
       // Simple name is 'unary-'.
@@ -1371,7 +1351,7 @@
       kind = Dart2JsMethodKind.REGULAR;
     }
     return new Dart2JsMethodMirror._internal(objectMirror, function,
-        simpleName, constructorName, kind);
+        simpleName, kind);
   }
 
   FunctionElement get _function => _element;
@@ -1389,9 +1369,6 @@
 
   bool get isMethod => !isConstructor;
 
-  bool get isPrivate =>
-      isConstructor ? _isPrivate(constructorName) : _isPrivate(simpleName);
-
   bool get isStatic => _function.modifiers.isStatic();
 
   List<ParameterMirror> get parameters {
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
index 4f9d8f1..ebfa797 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
@@ -56,8 +56,8 @@
    *
    * The simple name is in most cases the declared single identifier name of
    * the entity, such as 'method' for a method [:void method() {...}:]. For an
-   * unnamed constructor for [:class Foo:] the simple name is 'Foo'. For a
-   * constructor for [:class Foo:] named 'named' the simple name is 'Foo.named'.
+   * unnamed constructor for [:class Foo:] the simple name is ''. For a
+   * constructor for [:class Foo:] named 'named' the simple name is 'named'.
    * For a property [:foo:] the simple name of the getter method is 'foo' and
    * the simple name of the setter is 'foo='. For operators the simple name is
    * the operator itself, for example '+' for [:operator +:].
@@ -591,12 +591,6 @@
   bool get isFactoryConstructor;
 
   /**
-   * Returns the constructor name for named constructors and factory methods,
-   * e.g. [:'bar':] for constructor [:Foo.bar:] of type [:Foo:].
-   */
-  String get constructorName;
-
-  /**
    * Is [:true:] if this method is a getter method.
    */
   bool get isGetter;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
index a0bbe66..182a83f 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
@@ -40,9 +40,6 @@
     } else if (methodMirror.isOperator) {
       return 'operator ${operatorName(methodMirror)}';
     } else if (methodMirror.isConstructor) {
-      // TODO(johnniwinther): Remove this when [simpleName] is
-      // [constructorName].
-      simpleName = methodMirror.constructorName;
       String className = displayName(methodMirror.owner);
       if (simpleName == '') {
         return className;
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index c45ecd2..3868400 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -184,7 +184,7 @@
   }
 
   String constructorNameForDiagnostics(SourceString className,
-                                   SourceString constructorName) {
+                                       SourceString constructorName) {
     String classNameString = className.slowToString();
     String constructorNameString = constructorName.slowToString();
     return (constructorName == const SourceString(''))
@@ -672,7 +672,6 @@
                 MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS,
                 {'modifiers': mismatchedFlags});
           }
-          checkConstructorNameHack(holder, member);
         }
         checkAbstractField(member);
         checkValidOverride(member, cls.lookupSuperMember(member.name));
@@ -681,36 +680,6 @@
     });
   }
 
-  // TODO(ahe): Remove this method.  It is only needed while we store
-  // constructor names as ClassName$id.  Once we start storing
-  // constructors as just id, this will be caught by the general
-  // mechanism for duplicate members.
-  /// Check that a constructor name does not conflict with a member.
-  void checkConstructorNameHack(ClassElement holder, FunctionElement member) {
-    // If the name of the constructor is the same as the name of the
-    // class, there cannot be a problem.
-    if (member.name == holder.name) return;
-
-    SourceString name =
-      Elements.deconstructConstructorName(member.name, holder);
-
-    // If the name could not be deconstructed, this is is from a
-    // factory method from a deprecated interface implementation.
-    if (name == null) return;
-
-    Element otherMember = holder.lookupLocalMember(name);
-    if (otherMember != null) {
-      if (compiler.onDeprecatedFeature(member, 'conflicting constructor')) {
-        compiler.reportMessage(
-            compiler.spanFromElement(otherMember),
-            // Using GENERIC as this message is temporary.
-            MessageKind.GENERIC.error({'text': 'This member conflicts with a'
-                                               ' constructor.'}),
-            Diagnostic.INFO);
-      }
-    }
-  }
-
   void checkAbstractField(Element member) {
     // Only check for getters. The test can only fail if there is both a setter
     // and a getter with the same name, and we only need to check each abstract
@@ -3343,23 +3312,13 @@
   }
 
   bool isDefaultConstructor(FunctionElement constructor) {
-    return constructor.name == constructor.getEnclosingClass().name &&
+    return constructor.name == const SourceString('') &&
         constructor.computeSignature(compiler).parameterCount == 0;
   }
 
   FunctionElement createForwardingConstructor(FunctionElement constructor,
                                               ClassElement target) {
-    ClassElement cls = constructor.getEnclosingClass();
-    SourceString constructorName;
-    if (constructor.name == cls.name) {
-      constructorName = target.name;
-    } else {
-      SourceString selector =
-          Elements.deconstructConstructorName(constructor.name, cls);
-      constructorName =
-          Elements.constructConstructorName(target.name, selector);
-    }
-    return new SynthesizedConstructorElementX.forwarding(constructorName,
+    return new SynthesizedConstructorElementX.forwarding(constructor.name,
                                                          constructor,
                                                          target);
   }
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 793c850..81f9fec 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/class_element_parser.dart
@@ -89,7 +89,10 @@
   // TODO(johnniwinther): Remove this method.
   SourceString getMethodNameHack(Node methodName) {
     Send send = methodName.asSend();
-    if (send == null) return methodName.asIdentifier().source;
+    if (send == null) {
+      if (isConstructorName(methodName)) return const SourceString('');
+      return methodName.asIdentifier().source;
+    }
     Identifier receiver = send.receiver.asIdentifier();
     Identifier selector = send.selector.asIdentifier();
     Operator operator = selector.asOperator();
@@ -100,17 +103,12 @@
       bool isUnary = identical(operator.token.next.next.stringValue, ')');
       return Elements.constructOperatorName(operator.source, isUnary);
     } else {
-      if (receiver == null) {
-        listener.cancel('library prefix in named factory constructor not '
-                        'implemented', node: send.receiver);
-      }
-      if (receiver.source != enclosingElement.name) {
-        listener.reportErrorCode(receiver,
+      if (receiver == null || receiver.source != enclosingElement.name) {
+        listener.reportErrorCode(send.receiver,
                                  MessageKind.INVALID_CONSTRUCTOR_NAME,
                                  {'name': enclosingElement.name});
       }
-      return Elements.constructConstructorName(receiver.source,
-                                               selector.source);
+      return selector.source;
     }
   }
 
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 08ff69f..e522e72 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1799,21 +1799,28 @@
           && right.instructionType.isUseful() && right.isInteger();
     }
 
-    bool generateAtUseSite = isGenerateAtUseSite(input);
-    if (input is HIs) {
-      emitIs(input, '!==');
-    } else if (input is HIdentity && generateAtUseSite) {
-      HIdentity identity = input;
-      emitIdentityComparison(identity.left, identity.right, true);
-    } else if (input is HBoolify && generateAtUseSite) {
-      use(input.inputs[0]);
-      push(new js.Binary("!==", pop(), newLiteralBool(true)), input);
-    } else if (canGenerateOptimizedComparison(input) && generateAtUseSite) {
-      HRelational relational = input;
-      BinaryOperation operation = relational.operation(backend.constantSystem);
-      String op = mapRelationalOperator(operation.name.stringValue, true);
-      visitRelational(input, op);
-    } else {
+    bool handledBySpecialCase = false;
+    if (isGenerateAtUseSite(input)) {
+      handledBySpecialCase = true;
+      if (input is HIs) {
+        emitIs(input, '!==');
+      } else if (input is HIdentity) {
+        HIdentity identity = input;
+        emitIdentityComparison(identity.left, identity.right, true);
+      } else if (input is HBoolify) {
+        use(input.inputs[0]);
+        push(new js.Binary("!==", pop(), newLiteralBool(true)), input);
+      } else if (canGenerateOptimizedComparison(input)) {
+        HRelational relational = input;
+        BinaryOperation operation =
+            relational.operation(backend.constantSystem);
+        String op = mapRelationalOperator(operation.name.stringValue, true);
+        visitRelational(input, op);
+      } else {
+        handledBySpecialCase = false;
+      }
+    }
+    if (!handledBySpecialCase) {
       use(input);
       push(new js.Prefix("!", pop()));
     }
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index 5efc577..5249a6e 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -983,10 +983,7 @@
     Element element = elements[node.send];
     if (Elements.isUnresolved(element)) return types.dynamicType;
 
-    ClassElement enclosingClass = element.getEnclosingClass();
-    SourceString name = Elements.deconstructConstructorName(
-        element.name, enclosingClass);
-    checkPrivateAccess(node, element, name);
+    checkPrivateAccess(node, element, element.name);
 
     DartType newType = elements.getType(node);
     DartType constructorType = computeConstructorType(element, newType);
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 c7bf3d3..dd1935b 100644
--- a/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
@@ -308,6 +308,7 @@
   final ClassBaseType mapBaseType;
   final ClassBaseType objectBaseType;
   final ClassBaseType typeBaseType;
+  final ClassBaseType functionBaseType;
 
   BaseTypes(Compiler compiler) :
     intBaseType = new ClassBaseType(compiler.backend.intImplementation),
@@ -324,7 +325,9 @@
         new ClassBaseType(compiler.backend.constListImplementation),
     mapBaseType = new ClassBaseType(compiler.backend.mapImplementation),
     objectBaseType = new ClassBaseType(compiler.objectClass),
-    typeBaseType = new ClassBaseType(compiler.backend.typeImplementation);
+    typeBaseType = new ClassBaseType(compiler.backend.typeImplementation),
+    functionBaseType
+        = new ClassBaseType(compiler.backend.functionImplementation);
 }
 
 /**
@@ -1702,12 +1705,34 @@
     return result;
   }
 
+  void analyzeClosure(FunctionExpression node) {
+    for (VariableDefinitions definitions in node.parameters) {
+      for (Node parameter in definitions.definitions) {
+        environment = environment.put(elements[parameter],
+            inferrer.unknownConcreteType);
+      }
+    }
+    analyze(node.body);
+  }
+
   ConcreteType visitFunctionDeclaration(FunctionDeclaration node) {
-    inferrer.fail(node, 'not yet implemented');
+    analyzeClosure(node.function);
+    environment = environment.put(elements[node],
+        inferrer.singletonConcreteType(inferrer.baseTypes.functionBaseType));
+    return inferrer.emptyConcreteType;
   }
 
   ConcreteType visitFunctionExpression(FunctionExpression node) {
-    return analyze(node.body);
+    // Naive handling of closures: we assume their body is always executed,
+    // and that each of their arguments has type dynamic.
+    // TODO(polux): treat closures as classes
+    if (node.name == null) {
+      analyzeClosure(node);
+      return inferrer.singletonConcreteType(
+          inferrer.baseTypes.functionBaseType);
+    } else {
+      return analyze(node.body);
+    }
   }
 
   ConcreteType visitIdentifier(Identifier node) {
@@ -2028,7 +2053,33 @@
   }
 
   ConcreteType visitForIn(ForIn node) {
-    inferrer.fail(node, 'not yet implemented');
+    Element declaredIdentifier = elements[node.declaredIdentifier];
+    assert(declaredIdentifier != null);
+    ConcreteType iterableType = analyze(node.expression);
+
+    // var n0 = e.iterator
+    ConcreteType iteratorType = analyzeDynamicGetterSend(
+        elements.getIteratorSelector(node),
+        iterableType);
+    ConcreteType result = inferrer.emptyConcreteType;
+    ConcreteTypesEnvironment oldEnvironment;
+    do {
+      oldEnvironment = environment;
+      // n0.moveNext();
+      analyzeDynamicSend(
+          elements.getMoveNextSelector(node),
+          iteratorType,
+          const SourceString("moveNext"),
+          new ArgumentsTypes(const [], const {}));
+      // id = n0.current
+      ConcreteType currentType = analyzeDynamicGetterSend(
+          elements.getCurrentSelector(node),
+          iteratorType);
+      environment = environment.put(declaredIdentifier, currentType);
+      result = result.union(analyze(node.body));
+      environment = oldEnvironment.join(environment);
+    } while (oldEnvironment != environment);
+    return result;
   }
 
   ConcreteType visitLabel(Label node) {
@@ -2113,6 +2164,44 @@
     return visitGetterSendForSelector(node, selector);
   }
 
+  ConcreteType analyzeDynamicGetterSend(Selector selector,
+                                        ConcreteType receiverType) {
+    ConcreteType result = inferrer.emptyConcreteType;
+    void augmentResult(ClassElement baseReceiverType, Element member) {
+      if (member.isField()) {
+        result = result.union(analyzeFieldRead(selector, member));
+      } else if (member.isAbstractField()){
+        // call to a getter
+        AbstractFieldElement abstractField = member;
+        ConcreteType getterReturnType = analyzeGetterSend(
+            selector, baseReceiverType, abstractField.getter);
+        result = result.union(getterReturnType);
+      }
+      // since this is a get we ignore non-fields
+    }
+
+    if (receiverType.isUnknown()) {
+      inferrer.addDynamicCaller(selector.name, currentMethodOrField);
+      List<Element> members = inferrer.getMembersByName(selector.name);
+      for (Element member in members) {
+        Element cls = member.getEnclosingClass();
+        augmentResult(cls, member);
+      }
+    } else {
+      for (BaseType baseReceiverType in receiverType.baseTypes) {
+        if (!baseReceiverType.isNull()) {
+          ClassBaseType classBaseType = baseReceiverType;
+          ClassElement cls = classBaseType.element;
+          Element getterOrField = cls.lookupMember(selector.name);
+          if (getterOrField != null) {
+            augmentResult(cls, getterOrField.implementation);
+          }
+        }
+      }
+    }
+    return result;
+  }
+
   ConcreteType visitGetterSendForSelector(Send node, Selector selector) {
     Element element = elements[node];
     if (element != null) {
@@ -2134,51 +2223,15 @@
     } else {
       // node is a field/getter which doesn't belong to the current class or
       // the field/getter of a mixed-in class
-      ConcreteType result = inferrer.emptyConcreteType;
-      void augmentResult(ClassElement baseReceiverType, Element member) {
-        if (member.isField()) {
-          result = result.union(analyzeFieldRead(selector, member));
-        } else if (member.isAbstractField()){
-          // call to a getter
-          AbstractFieldElement abstractField = member;
-          result = result.union(
-              analyzeGetterSend(selector,
-                                baseReceiverType, abstractField.getter));
-        }
-        // since this is a get we ignore non-fields
-      }
-
       ConcreteType receiverType = node.receiver != null
           ? analyze(node.receiver)
           : environment.lookupTypeOfThis();
-      if (receiverType.isUnknown()) {
-        SourceString name = node.selector.asIdentifier().source;
-        inferrer.addDynamicCaller(name, currentMethodOrField);
-        List<Element> members = inferrer.getMembersByName(name);
-        for (Element member in members) {
-          if (!(member.isField() || member.isAbstractField())) continue;
-          Element cls = member.getEnclosingClass();
-          augmentResult(cls, member);
-        }
-      } else {
-        for (BaseType baseReceiverType in receiverType.baseTypes) {
-          if (!baseReceiverType.isNull()) {
-            ClassBaseType classBaseType = baseReceiverType;
-            ClassElement cls = classBaseType.element;
-            Element getterOrField =
-                cls.lookupMember(node.selector.asIdentifier().source);
-            if (getterOrField != null) {
-              augmentResult(cls, getterOrField.implementation);
-            }
-          }
-        }
-      }
-      return result;
+      return analyzeDynamicGetterSend(selector, receiverType);
     }
   }
 
   ConcreteType visitClosureSend(Send node) {
-    inferrer.fail(node, 'not implemented');
+    return inferrer.unknownConcreteType;
   }
 
   ConcreteType analyzeDynamicSend(Selector selector,
diff --git a/sdk/lib/_internal/compiler/implementation/util/util.dart b/sdk/lib/_internal/compiler/implementation/util/util.dart
index c9c8399..3ac91b9 100644
--- a/sdk/lib/_internal/compiler/implementation/util/util.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/util.dart
@@ -38,6 +38,155 @@
   String toString() => 'Compiler crashed: $message.';
 }
 
+/**
+ * Helper method for printing stack traces for debugging.
+ * 
+ * [message] is printed as the header of the stack trace.
+ * 
+ * If [condition] is provided, the stack trace is only printed if [condition]
+ * returns [:true:] on the stack trace text. This can be used to filter the
+ * printed stack traces based on their content. For instance only print stack 
+ * traces that contain specific paths.
+ */
+void trace(String message, [bool condition(String stackTrace)]) {
+  try {
+    throw '';
+  } catch (e, s) {
+    String stackTrace = prettifyStackTrace(
+        s, rangeStart: 1, filePrefix: stackTraceFilePrefix);
+    if (condition != null) {
+      if (!condition(stackTrace)) return;
+    }
+    print('$message\n$stackTrace');
+  }
+}
+
+/**
+ * File name prefix used to shorten the file name in stack traces printed by 
+ * [trace].
+ */
+String stackTraceFilePrefix = null;
+
+/// Helper class for the processing of stack traces in [prettifyStackTrace].
+class _StackTraceLine {
+  final int index;
+  final String file;
+  final String lineNo;
+  final String columnNo;
+  final String method;
+  
+  _StackTraceLine(this.index, this.file, this.lineNo, 
+                  this.columnNo, this.method);
+}
+
+// TODO(johnniwinther): Use this format for --throw-on-error.
+/**
+ * Converts the normal VM stack trace into a more compact and readable format.
+ * 
+ * The output format is [: <file> . . . <lineNo>:<columnNo> <method> :] where
+ * [: <file> :] is file name, [: <lineNo> :] is the line number, 
+ * [: <columnNo> :] is the column number, and [: <method> :] is the method name.
+ * 
+ * If [rangeStart] and/or [rangeEnd] are provided, only the lines within the
+ * range are included.
+ * If [showColumnNo] is [:false:], the [: :<columnNo> :] part is omitted.
+ * If [showDots] is [:true:], the space between [: <file> :] and [: <lineNo> :]
+ * is padded with dots on every other line.
+ * If [filePrefix] is provided, then for  every file name thats starts with 
+ * [filePrefix] only the remainder is printed.
+ * If [lambda] is non-null, anonymous closures are printed as [lambda]. 
+ */
+String prettifyStackTrace(StackTrace s, 
+                          {int rangeStart, 
+                           int rangeEnd, 
+                           bool showColumnNo: false,
+                           bool showDots: true,
+                           String filePrefix,
+                           String lambda: r'?'}) {
+  int index = -1;
+  int maxFileLength = 0;
+  int maxLineNoLength = 0;
+  int maxColumnNoLength = 0;
+  
+  List<_StackTraceLine> lines = <_StackTraceLine>[];
+  for (String line in '$s'.split('\n')) {
+    index++;
+    if (rangeStart != null && index < rangeStart) continue;
+    if (rangeEnd != null && index > rangeEnd) continue;
+    if (line.isEmpty) continue;
+    
+    // Strip index.
+    line = line.replaceFirst(new RegExp(r'#\d+\s*'), '');
+    
+    int leftParenPos = line.indexOf('(');
+    int rightParenPos = line.indexOf(')', leftParenPos);
+    int lastColon = line.lastIndexOf(':', rightParenPos);
+    int nextToLastColon = line.lastIndexOf(':', lastColon-1);
+    
+    String lineNo = line.substring(nextToLastColon+1, lastColon);
+    if (lineNo.length > maxLineNoLength) {
+      maxLineNoLength = lineNo.length;
+    }
+    String columnNo = line.substring(lastColon+1, rightParenPos);
+    if (columnNo.length > maxColumnNoLength) {
+      maxColumnNoLength = columnNo.length;
+    }
+    String file = line.substring(leftParenPos+1, nextToLastColon);
+    if (filePrefix != null && file.startsWith(filePrefix)) {
+      file = file.substring(filePrefix.length);
+    }
+    if (file.length > maxFileLength) {
+      maxFileLength = file.length;
+    }
+    String method = line.substring(0, leftParenPos-1);
+    if (lambda != null) {
+      method = method.replaceAll('<anonymous closure>', lambda);
+    }
+    lines.add(new _StackTraceLine(index, file, lineNo, columnNo, method));
+  }
+  
+  StringBuffer sb = new StringBuffer();
+  bool dots = true;
+  for (_StackTraceLine line in lines) {
+    String file = pad('${line.file} ', maxFileLength, 
+                      dots: showDots && dots ? ' .' : ' ');
+    String lineNo = pad(line.lineNo, maxLineNoLength, padLeft: true);
+    String columnNo = 
+        showColumnNo ? ':${pad(line.columnNo, maxColumnNoLength)}' : '';
+    String method = line.method;
+    sb.write('  $file $lineNo$columnNo $method\n');
+    dots = !dots;
+  }
+
+  return sb.toString();
+}
+
+/**
+ * Pads (or truncates) [text] to the [intendedLength]. 
+ * 
+ * If [padLeft] is [:true:] the text is padding inserted to the left of [text].
+ * A repetition of the [dots] text is used for padding. 
+ */
+String pad(String text, int intendedLength, 
+           {bool padLeft: false, String dots: ' '}) {
+  if (text.length == intendedLength) return text;
+  if (text.length > intendedLength) return text.substring(0, intendedLength);
+  if (dots == null || dots.isEmpty) dots = ' ';
+  int dotsLength = dots.length;
+  StringBuffer sb = new StringBuffer();
+  if (!padLeft) {
+    sb.write(text);
+  }
+  for (int index = text.length ; index < intendedLength ; index ++) {
+    int dotsIndex = index % dotsLength;
+    sb.write(dots.substring(dotsIndex, dotsIndex + 1));
+  }
+  if (padLeft) {
+    sb.write(text);
+  }
+  return sb.toString();
+}
+
 /// Writes the characters of [string] on [buffer].  The characters
 /// are escaped as suitable for JavaScript and JSON.  [buffer] is
 /// anything which supports [:write:] and [:writeCharCode:], for example,
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index cf89bed..ee30a60 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -445,6 +445,9 @@
   static const OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
       'Hint: The class "#{class}" overrides "operator==", '
       'but not "get hashCode".');
+  
+  static const PACKAGE_ROOT_NOT_SET = const MessageKind(
+      "Error: Cannot resolve '#{uri}'. Package root has not been set.");
 
   static const COMPILER_CRASHED = const MessageKind(
       "Error: The compiler crashed when compiling this element.");
diff --git a/sdk/lib/_internal/lib/js_array.dart b/sdk/lib/_internal/lib/js_array.dart
index 36685a4..5718c5d 100644
--- a/sdk/lib/_internal/lib/js_array.dart
+++ b/sdk/lib/_internal/lib/js_array.dart
@@ -11,10 +11,11 @@
  * argument added to each member.
  */
 class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
+
   const JSArray();
 
   checkMutable(reason) {
-    if (this is !JSMutableArray) { 
+    if (this is !JSMutableArray) {
       throw new UnsupportedError(reason);
     }
   }
@@ -261,7 +262,7 @@
 
   bool get isNotEmpty => !isEmpty;
 
-  String toString() => ToString.iterableToString(this);
+  String toString() => IterableMixinWorkaround.toStringIterable(this, '[', ']');
 
   List<E> toList({ bool growable: true }) =>
       new List<E>.from(this, growable: growable);
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 453e1ac..52d798b 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -195,12 +195,15 @@
       return;
     }
 
-    // Inside browser.
+    // Inside browser or nodejs.
+    if (JS('bool', r'typeof console == "object"') &&
+        JS('bool', r'typeof console.log == "function"')) {
+      JS('void', r'console.log(#)', string);
+      return;
+    }
+
+    // Don't throw inside IE, the console is only defined if dev tools is open.
     if (JS('bool', r'typeof window == "object"')) {
-      // On IE, the console is only defined if dev tools is open.
-      if (JS('bool', r'typeof console == "object"')) {
-        JS('void', r'console.log(#)', string);
-      }
       return;
     }
 
diff --git a/sdk/lib/_internal/pub/lib/src/command/deploy.dart b/sdk/lib/_internal/pub/lib/src/command/deploy.dart
index 76904a8..da4dfb9 100644
--- a/sdk/lib/_internal/pub/lib/src/command/deploy.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/deploy.dart
@@ -71,10 +71,11 @@
               packageRoot: entrypoint.packagesDir, toDart: true);
         }).then((dart) {
           writeTextFile(targetFile, dart, dontLogContents: true);
-          // TODO(nweiz): we should put dart.js files next to any HTML file
+          // TODO(nweiz): we should put browser JS files next to any HTML file
           // rather than any entrypoint. An HTML file could import an entrypoint
           // that's not adjacent.
-          _maybeAddDartJs(path.dirname(targetFile));
+          _maybeAddBrowserJs(path.dirname(targetFile), "dart");
+          _maybeAddBrowserJs(path.dirname(targetFile), "interop");
         });
       });
     });
@@ -106,7 +107,9 @@
     var sourceLengths = new List.from(
             _entrypoints.map((file) => path.relative(file).length))
         ..add("${path.relative(source)}${path.separator}".length);
-    if (_shouldAddDartJs) sourceLengths.add("package:browser/dart.js".length);
+    if (_shouldAddBrowserJs) {
+      sourceLengths.add("package:browser/interop.js".length);
+    }
     _maxSourceLength = sourceLengths.reduce(math.max);
   }
 
@@ -119,21 +122,21 @@
 
   // TODO(nweiz): do something more principled when issue 6101 is fixed.
   /// If this package depends non-transitively on the `browser` package, this
-  /// ensures that the `dart.js` file is copied into [directory], under
+  /// ensures that the [name].js file is copied into [directory], under
   /// `packages/browser/`.
-  void _maybeAddDartJs(String directory) {
-    var jsPath = path.join(directory, 'packages', 'browser', 'dart.js');
+  void _maybeAddBrowserJs(String directory, String name) {
+    var jsPath = path.join(directory, 'packages', 'browser', '$name.js');
     // TODO(nweiz): warn if they don't depend on browser?
-    if (!_shouldAddDartJs || fileExists(jsPath)) return;
+    if (!_shouldAddBrowserJs || fileExists(jsPath)) return;
 
-    _logAction("Copying", "package:browser/dart.js", path.relative(jsPath));
+    _logAction("Copying", "package:browser/$name.js", path.relative(jsPath));
     ensureDir(path.dirname(jsPath));
-    copyFile(path.join(entrypoint.packagesDir, 'browser', 'dart.js'), jsPath);
+    copyFile(path.join(entrypoint.packagesDir, 'browser', '$name.js'), jsPath);
   }
 
-  /// Whether we should copy the browser package's dart.js file into the
-  /// deployed app.
-  bool get _shouldAddDartJs {
+  /// Whether we should copy the browser package's JS files into the deployed
+  /// app.
+  bool get _shouldAddBrowserJs {
     return !_entrypoints.isEmpty &&
         entrypoint.root.dependencies.any((dep) =>
             dep.name == 'browser' && dep.source == 'hosted');
diff --git a/sdk/lib/_internal/pub/test/deploy/copies_dart_js_next_to_entrypoints_test.dart b/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
similarity index 69%
rename from sdk/lib/_internal/pub/test/deploy/copies_dart_js_next_to_entrypoints_test.dart
rename to sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
index 417233b..e6f007c 100644
--- a/sdk/lib/_internal/pub/test/deploy/copies_dart_js_next_to_entrypoints_test.dart
+++ b/sdk/lib/_internal/pub/test/deploy/copies_browser_js_next_to_entrypoints_test.dart
@@ -13,7 +13,7 @@
 main() {
   initConfig();
 
-  integration("compiles dart.js next to entrypoints", () {
+  integration("compiles dart.js and interop.js next to entrypoints", () {
     // Dart2js can take a long time to compile dart code, so we increase the
     // timeout to cope with that.
     currentSchedule.timeout *= 3;
@@ -40,7 +40,8 @@
             d.tar('1.0.0.tar.gz', [
               d.file('pubspec.yaml', yaml(packageMap("browser", "1.0.0"))),
               d.dir('lib', [
-                d.file('dart.js', 'contents of dart.js')
+                d.file('dart.js', 'contents of dart.js'),
+                d.file('interop.js', 'contents of interop.js')
               ])
             ])
           ])
@@ -63,13 +64,15 @@
     schedulePub(args: ["deploy"],
         output: '''
 Finding entrypoints...
-Copying   web|                    => deploy|
-Compiling web|file.dart           => deploy|file.dart.js
-Compiling web|file.dart           => deploy|file.dart
-Copying   package:browser/dart.js => deploy|packages|browser|dart.js
-Compiling web|subdir|subfile.dart => deploy|subdir|subfile.dart.js
-Compiling web|subdir|subfile.dart => deploy|subdir|subfile.dart
-Copying   package:browser/dart.js => deploy|subdir|packages|browser|dart.js
+Copying   web|                       => deploy|
+Compiling web|file.dart              => deploy|file.dart.js
+Compiling web|file.dart              => deploy|file.dart
+Copying   package:browser/dart.js    => deploy|packages|browser|dart.js
+Copying   package:browser/interop.js => deploy|packages|browser|interop.js
+Compiling web|subdir|subfile.dart    => deploy|subdir|subfile.dart.js
+Compiling web|subdir|subfile.dart    => deploy|subdir|subfile.dart
+Copying   package:browser/dart.js    => deploy|subdir|packages|browser|dart.js
+Copying   package:browser/interop.js => deploy|subdir|packages|browser|interop.js
 '''.replaceAll('|', path.separator),
         exitCode: 0);
 
@@ -78,11 +81,13 @@
         d.matcherFile('file.dart.js', isNot(isEmpty)),
         d.matcherFile('file.dart', isNot(isEmpty)),
         d.dir('packages', [d.dir('browser', [
-          d.file('dart.js', 'contents of dart.js')
+          d.file('dart.js', 'contents of dart.js'),
+          d.file('interop.js', 'contents of interop.js')
         ])]),
         d.dir('subdir', [
           d.dir('packages', [d.dir('browser', [
-            d.file('dart.js', 'contents of dart.js')
+            d.file('dart.js', 'contents of dart.js'),
+            d.file('interop.js', 'contents of interop.js')
           ])]),
           d.matcherFile('subfile.dart.js', isNot(isEmpty)),
           d.matcherFile('subfile.dart', isNot(isEmpty))
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 9ce21c6..222ad8d 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -277,9 +277,7 @@
     T value;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/* T */ element) {
+      (T element) {
         if (seenFirst) {
           _runUserCode(() => combine(value, element),
                        (T newValue) { value = newValue; },
@@ -308,9 +306,7 @@
     var value = initialValue;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ element) {
+      (T element) {
         _runUserCode(
           () => combine(value, element),
           (newValue) { value = newValue; },
@@ -328,6 +324,44 @@
   }
 
   /**
+   * Collects string of data events' string representations.
+   *
+   * If [separator] is provided, it is inserted between any two
+   * elements.
+   *
+   * Any error in the stream causes the future to complete with that
+   * error. Otherwise it completes with the collected string when
+   * the "done" event arrives.
+   */
+  Future<String> join([String separator = ""]) {
+    _FutureImpl<String> result = new _FutureImpl<String>();
+    StringBuffer buffer = new StringBuffer();
+    StreamSubscription subscription;
+    bool first = true;
+    subscription = this.listen(
+      (T element) {
+        if (!first) {
+          buffer.write(separator);
+        }
+        first = false;
+        try {
+          buffer.write(element);
+        } catch (e, s) {
+          subscription.cancel();
+          result._setError(_asyncError(e, s));
+        }
+      },
+      onError: (e) {
+        result._setError(e);
+      },
+      onDone: () {
+        result._setValue(buffer.toString());
+      },
+      cancelOnError: true);
+    return result;
+  }
+
+  /**
    * Checks whether [needle] occurs in the elements provided by this stream.
    *
    * Completes the [Future] when the answer is known.
@@ -337,9 +371,7 @@
     _FutureImpl<bool> future = new _FutureImpl<bool>();
     StreamSubscription subscription;
     subscription = this.listen(
-        // TODO(ahe): Restore type when feature is implemented in dart2js
-        // checked mode. http://dartbug.com/7733
-        (/*T*/ element) {
+        (T element) {
           _runUserCode(
             () => (element == needle),
             (bool isMatch) {
@@ -370,9 +402,7 @@
     _FutureImpl future = new _FutureImpl();
     StreamSubscription subscription;
     subscription = this.listen(
-        // TODO(ahe): Restore type when feature is implemented in dart2js
-        // checked mode. http://dartbug.com/7733
-        (/*T*/ element) {
+        (T element) {
           _runUserCode(
             () => action(element),
             (_) {},
@@ -397,9 +427,7 @@
     _FutureImpl<bool> future = new _FutureImpl<bool>();
     StreamSubscription subscription;
     subscription = this.listen(
-        // TODO(ahe): Restore type when feature is implemented in dart2js
-        // checked mode. http://dartbug.com/7733
-        (/*T*/ element) {
+        (T element) {
           _runUserCode(
             () => test(element),
             (bool isMatch) {
@@ -429,9 +457,7 @@
     _FutureImpl<bool> future = new _FutureImpl<bool>();
     StreamSubscription subscription;
     subscription = this.listen(
-        // TODO(ahe): Restore type when feature is implemented in dart2js
-        // checked mode. http://dartbug.com/7733
-        (/*T*/ element) {
+        (T element) {
           _runUserCode(
             () => test(element),
             (bool isMatch) {
@@ -488,9 +514,7 @@
     List<T> result = <T>[];
     _FutureImpl<List<T>> future = new _FutureImpl<List<T>>();
     this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ data) {
+      (T data) {
         result.add(data);
       },
       onError: future._setError,
@@ -506,9 +530,7 @@
     Set<T> result = new Set<T>();
     _FutureImpl<Set<T>> future = new _FutureImpl<Set<T>>();
     this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ data) {
+      (T data) {
         result.add(data);
       },
       onError: future._setError,
@@ -600,9 +622,7 @@
     _FutureImpl<T> future = new _FutureImpl<T>();
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         subscription.cancel();
         future._setValue(value);
         return;
@@ -626,9 +646,7 @@
     bool foundResult = false;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         foundResult = true;
         result = value;
       },
@@ -655,9 +673,7 @@
     bool foundResult = false;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         if (foundResult) {
           subscription.cancel();
           // This is the second element we get.
@@ -698,9 +714,7 @@
     _FutureImpl<dynamic> future = new _FutureImpl();
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         _runUserCode(
           () => test(value),
           (bool isMatch) {
@@ -737,9 +751,7 @@
     bool foundResult = false;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         _runUserCode(
           () => true == test(value),
           (bool isMatch) {
@@ -779,9 +791,7 @@
     bool foundResult = false;
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         _runUserCode(
           () => true == test(value),
           (bool isMatch) {
@@ -824,9 +834,7 @@
     _FutureImpl<T> future = new _FutureImpl<T>();
     StreamSubscription subscription;
     subscription = this.listen(
-      // TODO(ahe): Restore type when feature is implemented in dart2js
-      // checked mode. http://dartbug.com/7733
-      (/*T*/ value) {
+      (T value) {
         if (index == 0) {
           subscription.cancel();
           future._setValue(value);
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index 43e3f650..c8fbe70 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -77,9 +77,7 @@
   static const int _STATE_PAUSE_COUNT_SHIFT = 6;
 
   /* Event handlers provided in constructor. */
-  /* TODO(7733): Fix Function->_DataHandler<T> when dart2js understands
-   * parameterized function types. */
-  Function _onData;
+  _DataHandler<T> _onData;
   _ErrorHandler _onError;
   _DoneHandler _onDone;
   final _Zone _zone = _Zone.current;
diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart
index 9438452..7436b92 100644
--- a/sdk/lib/async/stream_pipe.dart
+++ b/sdk/lib/async/stream_pipe.dart
@@ -140,9 +140,7 @@
 
   // Methods used as listener on source subscription.
 
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  void _handleData(/*S*/ data) {
+  void _handleData(S data) {
     _stream._handleData(data, this);
   }
 
@@ -431,9 +429,7 @@
  * [StreamEventTransformer].
  */
 class _StreamTransformerImpl<S, T> extends StreamEventTransformer<S, T> {
-  // TODO(ahe): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  final Function /*_TransformDataHandler<S, T>*/ _handleData;
+  final _TransformDataHandler<S, T> _handleData;
   final _TransformErrorHandler<T> _handleError;
   final _TransformDoneHandler<T> _handleDone;
 
diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
index 86c69c8..147d1ca 100644
--- a/sdk/lib/collection/hash_set.dart
+++ b/sdk/lib/collection/hash_set.dart
@@ -6,6 +6,7 @@
 
 /** Common parts of [HashSet] and [LinkedHashSet] implementations. */
 abstract class _HashSetBase<E> extends IterableBase<E> implements Set<E> {
+
   // Set.
   bool containsAll(Iterable<Object> other) {
     for (Object object in other) {
@@ -53,7 +54,8 @@
     retainWhere(retainSet.contains);
   }
 
-  String toString() => ToString.iterableToString(this);
+  // TODO(zarah) Remove this, and let it be inherited by IterableBase
+  String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}');
 }
 
 /**
diff --git a/sdk/lib/collection/linked_list.dart b/sdk/lib/collection/linked_list.dart
index a9c8989..502341c 100644
--- a/sdk/lib/collection/linked_list.dart
+++ b/sdk/lib/collection/linked_list.dart
@@ -14,6 +14,7 @@
 class LinkedList<E extends LinkedListEntry<E>>
     extends IterableBase<E>
     implements _LinkedListLink {
+
   int _modificationCount = 0;
   int _length = 0;
   _LinkedListLink _next;
@@ -60,7 +61,8 @@
 
   Iterator<E> get iterator => new _LinkedListIterator<E>(this);
 
-  String toString() => ToString.iterableToString(this);
+  // TODO(zarah) Remove this, and let it be inherited by IterableMixin
+  String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}');
 
   int get length => _length;
 
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index 5c81ae7..7b4a074 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -28,6 +28,9 @@
  * mixin to prevent all modifications.
  */
 abstract class ListMixin<E> implements List<E> {
+  // A list to identify cyclic lists during toString() calls. 
+  static List _toStringList = new List();
+  
   // Iterable interface.
   Iterator<E> get iterator => new ListIterator<E>(this);
 
@@ -477,5 +480,22 @@
 
   Iterable<E> get reversed => new ReversedListIterable(this);
 
-  String toString() => ToString.iterableToString(this);
+  String toString() {
+    for (int i = 0; i < _toStringList.length; i++) {
+      if (identical(_toStringList[i], this)) { return '[...]'; }
+    }
+
+    var result = new StringBuffer();
+    try {
+      _toStringList.add(this);
+      result.write('[');
+      result.writeAll(this, ', ');
+      result.write(']');
+     } finally {
+       assert(identical(_toStringList.last, this));
+       _toStringList.removeLast();  
+     }
+     
+    return result.toString();
+  }
 }
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index 303008c..9bc7a54 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -60,6 +60,9 @@
 
   static bool isNotEmpty(Map map) => map.keys.isNotEmpty;
 
+  // A list to identify cyclic maps during toString() calls.
+  static List _toStringList = new List();
+
   /**
    * Returns a string representing the specified map. The returned string
    * looks like this: [:'{key0: value0, key1: value1, ... keyN: valueN}':].
@@ -76,7 +79,33 @@
    * A typical implementation of a map's [toString] method will
    * simply return the results of this method applied to the collection.
    */
-  static String mapToString(Map m) => ToString.mapToString(m);
+  static String mapToString(Map m) {
+    for (int i = 0; i < _toStringList.length; i++) {
+      if (identical(_toStringList[i], m)) { return '{...}'; }
+    }
+
+    var result = new StringBuffer();
+    try {
+      _toStringList.add(m);
+      result.write('{');
+      bool first = true;
+      m.forEach((k, v) {
+        if(!first) {
+          result.write(', ');
+        }
+        first = false;
+        result.write(k);
+        result.write(': ');
+        result.write(v);
+      });
+      result.write('}');
+    } finally {
+      assert(identical(_toStringList.last, m));
+      _toStringList.removeLast();
+    }
+
+    return result.toString();
+  }
 
   static _id(x) => x;
 
diff --git a/sdk/lib/collection/queue.dart b/sdk/lib/collection/queue.dart
index 7bc65ca..0e1bb8a 100644
--- a/sdk/lib/collection/queue.dart
+++ b/sdk/lib/collection/queue.dart
@@ -301,9 +301,8 @@
     return new _DoubleLinkedQueueIterator<E>(_sentinel);
   }
 
-  String toString() {
-    return ToString.iterableToString(this);
-  }
+  // TODO(zarah)  Remove this, and let it be inherited by IterableBase
+  String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}');
 }
 
 class _DoubleLinkedQueueIterator<E> implements Iterator<E> {
@@ -530,9 +529,8 @@
     }
   }
 
-  String toString() {
-    return ToString.iterableToString(this);
-  }
+  // TODO(zarah)  Remove this, and let it be inherited by IterableBase
+  String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}');
 
   // Queue interface.
 
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 7dac687..a0c3624 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -241,9 +241,7 @@
  * method. This also means that `null` is *not* allowed as a key.
  */
 class SplayTreeMap<K, V> extends _SplayTree<K> implements Map<K, V> {
-  // TODO(ngeoffray): Restore type when feature is implemented in dart2js
-  // checked mode. http://dartbug.com/7733
-  Function /* Comparator<K> */_comparator;
+  Comparator<K> _comparator;
 
   SplayTreeMap([int compare(K key1, K key2)])
       : _comparator = (compare == null) ? Comparable.compare : compare;
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index d2e78dd..b218ef9 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -6048,7 +6048,9 @@
   factory CustomEvent(String type,
       {bool canBubble: true, bool cancelable: true, Object detail}) {
 
-    final CustomEvent e = document.$dom_createEvent("CustomEvent");
+    final CustomEvent e = document.$dom_createEvent('CustomEvent');
+
+    detail = convertDartToNative_SerializedScriptValue(detail);
     e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
 
     return e;
@@ -6056,10 +6058,12 @@
   // To suppress missing implicit constructor warnings.
   factory CustomEvent._() { throw new UnsupportedError("Not supported"); }
 
+  dynamic get detail => convertNativeToDart_SerializedScriptValue(this._get_detail);
+  @JSName('detail')
   @DomName('CustomEvent.detail')
   @DocsEditable()
   @Creates('Null')
-  final Object detail;
+  final dynamic _get_detail;
 
   @JSName('initCustomEvent')
   @DomName('CustomEvent.initCustomEvent')
@@ -11087,7 +11091,12 @@
 
   @DomName('FormData.append')
   @DocsEditable()
-  void append(String name, value, [String filename]) native;
+  void append(String name, String value) native;
+
+  @JSName('append')
+  @DomName('FormData.append')
+  @DocsEditable()
+  void appendBlob(String name, Blob 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
@@ -23163,10 +23172,65 @@
   @DocsEditable()
   void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
 
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
   @DomName('WebSocket.send')
   @DocsEditable()
   void send(data) native;
 
+  @JSName('send')
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
+  @DomName('WebSocket.send')
+  @DocsEditable()
+  void sendBlob(Blob data) native;
+
+  @JSName('send')
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
+  @DomName('WebSocket.send')
+  @DocsEditable()
+  void sendByteBuffer(ByteBuffer data) native;
+
+  @JSName('send')
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
+  @DomName('WebSocket.send')
+  @DocsEditable()
+  void sendString(String data) native;
+
+  @JSName('send')
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
+  @DomName('WebSocket.send')
+  @DocsEditable()
+  void sendTypedData(TypedData data) native;
+
   @DomName('WebSocket.onclose')
   @DocsEditable()
   Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
@@ -25683,7 +25747,7 @@
 @DomName('NamedNodeMap')
 // http://dom.spec.whatwg.org/#namednodemap
 @deprecated // deprecated
-class _NamedNodeMap extends Interceptor with ListMixin<Node>, ImmutableListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap" {
+class _NamedNodeMap extends Interceptor with ListMixin<Node>, ImmutableListMixin<Node> implements JavaScriptIndexingBehavior, List<Node> native "NamedNodeMap,MozNamedAttrMap" {
 
   @DomName('NamedNodeMap.length')
   @DocsEditable()
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index b7452d4..26dcd4a 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7,7 +7,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev' hide Symbol;
+import 'dart:_collection-dev' hide Symbol, deprecated;
 import 'dart:html_common';
 import 'dart:indexed_db';
 import 'dart:isolate';
@@ -6541,7 +6541,8 @@
   factory CustomEvent(String type,
       {bool canBubble: true, bool cancelable: true, Object detail}) {
 
-    final CustomEvent e = document.$dom_createEvent("CustomEvent");
+    final CustomEvent e = document.$dom_createEvent('CustomEvent');
+
     e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
 
     return e;
@@ -11446,7 +11447,11 @@
 
   @DomName('FormData.append')
   @DocsEditable()
-  void append(String name, value, [String filename]) native "FormData_append_Callback";
+  void append(String name, String value) native "FormData_append_Callback";
+
+  @DomName('FormData.appendBlob')
+  @DocsEditable()
+  void appendBlob(String name, Blob value, [String filename]) native "FormData_appendBlob_Callback";
 
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -24790,10 +24795,33 @@
   @DocsEditable()
   void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WebSocket_removeEventListener_Callback";
 
+  /**
+   * Transmit data to the server over this connection.
+   *
+   * This method accepts data of type [Blob], [ByteBuffer], [String], or
+   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+   * or [sendTypedData], in constrast, only accept data of the specified type.
+   */
   @DomName('WebSocket.send')
   @DocsEditable()
   void send(data) native "WebSocket_send_Callback";
 
+  @DomName('WebSocket.sendBlob')
+  @DocsEditable()
+  void sendBlob(Blob data) native "WebSocket_sendBlob_Callback";
+
+  @DomName('WebSocket.sendByteBuffer')
+  @DocsEditable()
+  void sendByteBuffer(ByteBuffer data) native "WebSocket_sendByteBuffer_Callback";
+
+  @DomName('WebSocket.sendString')
+  @DocsEditable()
+  void sendString(String data) native "WebSocket_sendString_Callback";
+
+  @DomName('WebSocket.sendTypedData')
+  @DocsEditable()
+  void sendTypedData(TypedData data) native "WebSocket_sendTypedData_Callback";
+
   @DomName('WebSocket.onclose')
   @DocsEditable()
   Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 417534a..6da8ec6 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -150,6 +150,17 @@
   X509Certificate get peerCertificate;
 
   /**
+   * Renegotiate an existing secure connection, renewing the session keys
+   * and possibly changing the connection properties.
+   *
+   * This repeats the SSL or TLS handshake, with options that allow clearing
+   * the session cache and requesting a client certificate.
+   */
+  void renegotiate({bool useSessionCache: true,
+                    bool requestClientCertificate: false,
+                    bool requireClientCertificate: false});
+
+  /**
    * Initializes the NSS library. If [initialize] is not called, the library
    * is automatically initialized as if [initialize] were called with no
    * arguments. If [initialize] is called more than once, or called after
@@ -334,6 +345,17 @@
   }
 
   /**
+   * Renegotiate an existing secure connection, renewing the session keys
+   * and possibly changing the connection properties.
+   *
+   * This repeats the SSL or TLS handshake, with options that allow clearing
+   * the session cache and requesting a client certificate.
+   */
+  void renegotiate({bool useSessionCache: true,
+                    bool requestClientCertificate: false,
+                    bool requireClientCertificate: false});
+
+  /**
    * Get the peer certificate for a connected RawSecureSocket.  If this
    * RawSecureSocket is the server end of a secure socket connection,
    * [peerCertificate] will return the client certificate, or null, if no
@@ -785,6 +807,21 @@
     }
   }
 
+  void renegotiate({bool useSessionCache: true,
+                    bool requestClientCertificate: false,
+                    bool requireClientCertificate: false}) {
+    if (_status != CONNECTED) {
+      throw new HandshakeException(
+          "Called renegotiate on a non-connected socket");
+    }
+    _secureFilter.renegotiate(useSessionCache,
+                              requestClientCertificate,
+                              requireClientCertificate);
+    _status = HANDSHAKE;
+    _filterStatus.writeEmpty = false;
+    _scheduleFilter();
+  }
+
   void _secureHandshakeCompleteHandler() {
     _status = CONNECTED;
     if (_connectPending) {
@@ -1158,6 +1195,10 @@
                bool sendClientCertificate);
   void destroy();
   void handshake();
+  void rehandshake();
+  void renegotiate(bool useSessionCache,
+                   bool requestClientCertificate,
+                   bool requireClientCertificate);
   void init();
   X509Certificate get peerCertificate;
   int processBuffer(int bufferIndex);
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index e52cac8..e481c15 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -2,7 +2,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:_js_helper' show Creates, Returns, JavaScriptIndexingBehavior, JSName;
diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart
index f78f08f..98774f3 100644
--- a/sdk/lib/svg/dartium/svg_dartium.dart
+++ b/sdk/lib/svg/dartium/svg_dartium.dart
@@ -2,7 +2,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index bbb4d83..e065196 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -326,9 +326,21 @@
   @DocsEditable()
   WaveTable createWaveTable(Float32List real, Float32List imag) native;
 
+  @JSName('decodeAudioData')
   @DomName('AudioContext.decodeAudioData')
   @DocsEditable()
-  void decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native;
+  void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native;
+
+  @JSName('decodeAudioData')
+  @DomName('AudioContext.decodeAudioData')
+  @DocsEditable()
+  Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
+    var completer = new Completer<AudioBuffer>();
+    _decodeAudioData(audioData,
+        (value) { completer.complete(value); },
+        (error) { completer.completeError(error); });
+    return completer.future;
+  }
 
   @DomName('AudioContext.startRendering')
   @DocsEditable()
diff --git a/sdk/lib/web_audio/dartium/web_audio_dartium.dart b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
index 26c9862..8fb7c34 100644
--- a/sdk/lib/web_audio/dartium/web_audio_dartium.dart
+++ b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
@@ -2,7 +2,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
@@ -432,7 +432,15 @@
 
   @DomName('AudioContext.decodeAudioData')
   @DocsEditable()
-  void decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native "AudioContext_decodeAudioData_Callback";
+  void _decodeAudioData(ByteBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native "AudioContext_decodeAudioData_Callback";
+
+  Future<AudioBuffer> decodeAudioData(ByteBuffer audioData) {
+    var completer = new Completer<AudioBuffer>();
+    _decodeAudioData(audioData,
+        (value) { completer.complete(value); },
+        (error) { completer.completeError(error); });
+    return completer.future;
+  }
 
   @DomName('AudioContext.startRendering')
   @DocsEditable()
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index e511e3c..eef8b0f 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -1,7 +1,7 @@
 library dart.dom.web_gl;
 
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:typed_data';
diff --git a/sdk/lib/web_gl/dartium/web_gl_dartium.dart b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
index 3b1b095..7b2efc5 100644
--- a/sdk/lib/web_gl/dartium/web_gl_dartium.dart
+++ b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
@@ -2,7 +2,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/sdk/lib/web_sql/dartium/web_sql_dartium.dart b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
index b737b2e..33f5260 100644
--- a/sdk/lib/web_sql/dartium/web_sql_dartium.dart
+++ b/sdk/lib/web_sql/dartium/web_sql_dartium.dart
@@ -12,7 +12,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/tests/co19/co19-analyzer.status b/tests/co19/co19-analyzer.status
index 2aba1b3..906a6f5 100644
--- a/tests/co19/co19-analyzer.status
+++ b/tests/co19/co19-analyzer.status
@@ -10,9 +10,6 @@
 # not clear: null..[1](1)[2](2).foo(3, bar: 4)=5 - it seems that verything before =5 it not assignable
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A04_t15: fail
 
-# not initialized final instance variable, should be static warning
-Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: fail
-
 # invalid argument for constant constructor
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t02: fail
 Language/11_Expressions/01_Constants_A16_t03: fail
@@ -218,3 +215,15 @@
 # co19 issue #462, const instance creation with invalid arguments is error
 Language/11_Expressions/11_Instance_Creation/2_Const_A09_t02: fail, OK
 Language/11_Expressions/11_Instance_Creation/2_Const_A09_t03: fail, OK
+
+# co19 issue #464, not initialized final instance variable is warning, not error
+Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: fail
+
+# co19 issue #465, any use of a malbounded type gives rise to a static warning.
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t02: fail, OK
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t03: fail, OK
+Language/11_Expressions/11_Instance_Creation_A03_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation_A04_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation_A04_t02: fail, OK
+
diff --git a/tests/co19/co19-analyzer2.status b/tests/co19/co19-analyzer2.status
index 847f5dc..71b2817 100644
--- a/tests/co19/co19-analyzer2.status
+++ b/tests/co19/co19-analyzer2.status
@@ -10,9 +10,6 @@
 # not clear: null..[1](1)[2](2).foo(3, bar: 4)=5 - it seems that verything before =5 it not assignable
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A04_t15: fail
 
-# not initialized final instance variable, should be static warning
-Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: fail
-
 # invalid argument for constant constructor
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t02: fail
 Language/11_Expressions/01_Constants_A16_t03: fail
@@ -119,10 +116,6 @@
 Language/05_Variables/05_Variables_A13_t01: fail, OK
 Language/07_Classes/07_Classes_A02_t11: fail, OK
 
-# co19 issue 459, FallThroughError is no longer const
-LibTest/core/FallThroughError/toString_A01_t01: Fail
-LibTest/core/FallThroughError/FallThroughError_A01_t01: Fail
-
 # co19 issue #429, It is a compile-time error if a formal parameter is declared as a constant variable
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A15_t07: fail, OK
 
@@ -195,6 +188,10 @@
 LibTest/core/AssertionError/line_A01_t02: fail, OK
 LibTest/core/AssertionError/url_A01_t01: fail, OK
 
+# co19 issue 459, FallThroughError is no longer const
+LibTest/core/FallThroughError/toString_A01_t01: Fail
+LibTest/core/FallThroughError/FallThroughError_A01_t01: Fail
+
 # co19 issue #437, annotation should be constant _variable_ or constant constructor invocation
 Language/07_Classes/07_Classes_A01_t20: fail, OK
 Language/07_Classes/07_Classes_A02_t34: fail, OK
@@ -214,3 +211,19 @@
 
 # co19 issue #441, assignment in constructor is not initializing
 Language/05_Variables/05_Variables_A05_t04: fail, OK
+
+# co19 issue #462, const instance creation with invalid arguments is error
+Language/11_Expressions/11_Instance_Creation/2_Const_A09_t02: fail, OK
+Language/11_Expressions/11_Instance_Creation/2_Const_A09_t03: fail, OK
+
+# co19 issue #464, not initialized final instance variable is warning, not error
+Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: fail
+
+# co19 issue #465, any use of a malbounded type gives rise to a static warning.
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t02: fail, OK
+Language/11_Expressions/11_Instance_Creation/1_New_A05_t03: fail, OK
+Language/11_Expressions/11_Instance_Creation_A03_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation_A04_t01: fail, OK
+Language/11_Expressions/11_Instance_Creation_A04_t02: fail, OK
+
diff --git a/tests/co19/co19-dart2dart.status b/tests/co19/co19-dart2dart.status
index e926a29..5692eb8 100644
--- a/tests/co19/co19-dart2dart.status
+++ b/tests/co19/co19-dart2dart.status
@@ -110,11 +110,6 @@
 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_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_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
@@ -125,11 +120,8 @@
 Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t05: Fail # Inherited from dart2js
 Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t03: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t04: Fail # http://dartbug.com/5519
-Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t05: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t06: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t07: Fail # http://dartbug.com/5519
-Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t06: Fail # http://dartbug.com/5519
-Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t10: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t14: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t15: Fail # http://dartbug.com/5519
 Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A02_t01: Fail # http://dartbug.com/5519
@@ -184,12 +176,6 @@
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t01: Fail # inherited from VM
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t02: Fail # inherited from VM
 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_A01_t02: Fail # Inherited from dart2js
-Language/07_Classes/6_Constructors_A01_t03: Fail # Inherited from dart2js
-Language/07_Classes/6_Constructors_A01_t04: Fail # Inherited from dart2js
-Language/07_Classes/6_Constructors_A01_t05: Fail # Inherited from dart2js
-Language/07_Classes/6_Constructors_A01_t06: Fail # Inherited from dart2js
 Language/07_Classes/6_Constructors_A02_t01: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A03_t02: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A03_t03: Fail # http://dartbug.com/5519
@@ -241,7 +227,6 @@
 Language/11_Expressions/01_Constants_A19_t04: Fail # http://dartbug.com/5519
 Language/11_Expressions/01_Constants_A20_t02: Fail # http://dartbug.com/5810
 Language/11_Expressions/01_Constants_A20_t03: 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_A02_t01: Skip # co19 issue 90.
 Language/11_Expressions/05_Strings_A02_t46: Fail # inherited from VM
@@ -267,48 +252,21 @@
 Language/11_Expressions/11_Instance_Creation/2_Const_A10_t01: Fail # inherited from VM
 Language/11_Expressions/14_Function_Invocation/4_Function_Expression_Invocation_A05_t01: Fail # inherited from VM
 Language/11_Expressions/18_Assignment_A05_t04: Fail, Pass, OK # Fails in minified, depends on method names.
-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_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/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
-Language/11_Expressions/25_Additive_Expressions_A01_t14: Fail # Inherited from dart2js
-Language/11_Expressions/26_Multiplicative_Expressions_A01_t16: Fail # Inherited from dart2js
-Language/11_Expressions/26_Multiplicative_Expressions_A01_t17: Fail # Inherited from dart2js
 Language/11_Expressions/27_Unary_Expressions_A01_t01: Fail # inherited from VM
-Language/11_Expressions/27_Unary_Expressions_A01_t02: Fail # Inherited from dart2js
-Language/11_Expressions/27_Unary_Expressions_A01_t04: Fail # Inherited from dart2js
-Language/11_Expressions/27_Unary_Expressions_A01_t05: Fail # Inherited from dart2js
-Language/11_Expressions/27_Unary_Expressions_A01_t20: Fail # Inherited from dart2js
-Language/11_Expressions/27_Unary_Expressions_A01_t21: Fail # Inherited from dart2js
-Language/11_Expressions/27_Unary_Expressions_A01_t22: Fail # Inherited from dart2js
-Language/11_Expressions/28_Postfix_Expressions_A01_t02: Fail # Inherited from dart2js
-Language/11_Expressions/28_Postfix_Expressions_A01_t03: Fail # Inherited from dart2js
-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_t12: Fail # Inherited from dart2js
-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_A04_t01: Fail # Inherited from dart2js
 Language/11_Expressions/32_Type_Cast_A03_t01: Fail # Inherited from dart2js
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 915dc3e..dd3854d 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -33,11 +33,6 @@
 Language/07_Classes/6_Constructors/2_Factories_A07_t01: Fail # TODO(ahe): Please triage this failure.
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t01: Fail # TODO(ahe): Please triage this failure.
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t03: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/6_Constructors_A01_t02: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/6_Constructors_A01_t03: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/6_Constructors_A01_t04: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/6_Constructors_A01_t05: Fail # TODO(ahe): Please triage this failure.
-Language/07_Classes/6_Constructors_A01_t06: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/01_Constants_A13_t06: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/01_Constants_A18_t07: Fail # TODO(ahe): Please triage this failure.
 Language/11_Expressions/01_Constants_A20_t03: Fail # TODO(ahe): Please triage this failure.
@@ -692,7 +687,6 @@
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A09_t01: Fail # Checks that error is produced if a final variable is not initialized in one  of the specified ways.
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A03_t01: Fail # Checks that a compile-time error is produced when a class with constant  constructor also declares a non-final instance variable.
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A03_t02: Fail # Checks that compile-time error is produced when a class with constant constructor inherits a non-final instance variable.
-Language/07_Classes/6_Constructors_A01_t01: Fail # Checks that a compile-error is produced when a constructor's id coincides with the name of a field in the same class.
 Language/07_Classes/6_Constructors_A02_t01: Fail # Checks that a compile-error is produced when a named constructor definition does not begin with the name of its class.
 Language/11_Expressions/01_Constants_A16_t01: Fail # Checks that an IntegerDivisionByZeroException raised during evaluation  of a compile-time constant causes a compile-time error.
 Language/11_Expressions/01_Constants_A16_t02: Fail # Checks that an OutOfMemoryException raised during evaluation of a compile-time constant causes a compile-time error.
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 3e2c8c7..75e703b 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -30,13 +30,6 @@
 Language/11_Expressions/03_Numbers_A01_t01: Fail # co19 issue 428
 Language/11_Expressions/01_Constants_A01_t01: Fail # co19 issue 428
 
-Language/05_Variables/05_Variables_A07_t01: Fail # TODO(vm-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t02: Fail # TODO(vm-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t03: Fail # TODO(vm-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t04: Fail # TODO(vm-team): Please triage this failure.
-Language/05_Variables/05_Variables_A07_t10: Fail # TODO(vm-team): Please triage this failure.
-Language/06_Functions/2_Formal_Parameters/1_Required_Formals_A02_t05: Fail # TODO(vm-team): Please triage this failure.
-Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t06: Fail # TODO(vm-team): Please triage this failure.
 Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A03_t04: Fail # TODO(vm-team): Please triage this failure.
 Language/11_Expressions/01_Constants_A18_t06: Fail # TODO(vm-team): Please triage this failure.
 Language/11_Expressions/14_Function_Invocation/3_Unqualified_Invocation_A01_t10: Fail # TODO(vm-team): Please triage this failure.
@@ -88,7 +81,6 @@
 Language/13_Libraries_and_Scripts/1_Imports_A04_t03: Fail # co19 issue 385
 Language/13_Libraries_and_Scripts/2_Exports_A05_t01: Fail # co19 issue 385
 
-Language/06_Functions/2_Formal_Parameters/2_Optional_Formals_A01_t10: Fail # co19 issue 348
 Language/07_Classes/4_Abstract_Instance_Members_A03_t02: Fail # Dart issue 978
 Language/07_Classes/4_Abstract_Instance_Members_A03_t03: Fail # Dart issue 978
 Language/07_Classes/4_Abstract_Instance_Members_A03_t04: Fail # Dart issue 978
@@ -97,43 +89,13 @@
 Language/07_Classes/4_Abstract_Instance_Members_A04_t06: Fail # Dart issue 978
 Language/07_Classes/6_Constructors/1_Generative_Constructors_A04_t15: Fail # Dart issue 6954
 Language/07_Classes/6_Constructors/3_Constant_Constructors_A05_t01: Fail # co19 issue 426
-Language/11_Expressions/05_Strings/1_String_Interpolation_A01_t04: Fail # Dart issue 7246
-Language/11_Expressions/05_Strings/1_String_Interpolation_A01_t05: Fail # Dart issue 7246
-Language/11_Expressions/05_Strings/1_String_Interpolation_A01_t06: Fail # Dart issue 7246
 Language/11_Expressions/05_Strings_A02_t46: Fail # Dart issue 4009
 Language/11_Expressions/05_Strings_A02_t48: Fail # Dart issue 4009
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t03: Fail # Dart issue 3309
 Language/11_Expressions/11_Instance_Creation/1_New_A02_t05: Fail # Dart issue 7247
 Language/11_Expressions/11_Instance_Creation/1_New_A09_t09: Fail # Dart issue 1372
 Language/11_Expressions/11_Instance_Creation/2_Const_A10_t01: Fail # Dart issue 5775
-Language/11_Expressions/19_Conditional_A01_t14: Fail # Dart issue 7251
-Language/11_Expressions/19_Conditional_A01_t15: Fail # Dart issue 7252
-Language/11_Expressions/20_Logical_Boolean_Expressions_A01_t14: Fail # Dart issue 7251
-Language/11_Expressions/20_Logical_Boolean_Expressions_A01_t15: Fail # Dart issue 7251
-Language/11_Expressions/21_Bitwise_Expressions_A01_t16: Fail # Dart issue 7251
-Language/11_Expressions/21_Bitwise_Expressions_A01_t17: Fail # Dart issue 7251
-Language/11_Expressions/22_Equality_A01_t23: Fail # Dart issue 7254
-Language/11_Expressions/22_Equality_A01_t24: Fail # Dart issue 7254
-Language/11_Expressions/23_Relational_Expressions_A01_t22: Fail # Dart issue 7256
-Language/11_Expressions/23_Relational_Expressions_A01_t23: Fail # Dart issue 7256
-Language/11_Expressions/24_Shift_A01_t13: Fail # Dart issue 7256
-Language/11_Expressions/24_Shift_A01_t14: Fail # Dart issue 7256
-Language/11_Expressions/25_Additive_Expressions_A01_t13: Fail # Dart issue 7256
-Language/11_Expressions/25_Additive_Expressions_A01_t14: Fail # Dart issue 7256
-Language/11_Expressions/26_Multiplicative_Expressions_A01_t16: Fail # Dart issue 7256
-Language/11_Expressions/26_Multiplicative_Expressions_A01_t17: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t02: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t04: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t05: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t20: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t21: Fail # Dart issue 7256
-Language/11_Expressions/27_Unary_Expressions_A01_t22: Fail # Dart issue 7256
-Language/11_Expressions/28_Postfix_Expressions_A01_t02: Fail # Dart issue 7256
-Language/11_Expressions/28_Postfix_Expressions_A01_t03: Fail # Dart issue 7256
-Language/11_Expressions/28_Postfix_Expressions_A01_t05: Fail # Dart issue 7256
-Language/11_Expressions/29_Assignable_Expressions_A01_t08: Fail # Dart issue 7256
 Language/11_Expressions/30_Identifier_Reference_A05_t02: Fail # Dart issue 2492
-Language/11_Expressions/30_Identifier_Reference_A07_t01: Fail # Dart issue 7257
 Language/11_Expressions/30_Identifier_Reference_A08_t02: Fail # Dart issue 5802
 Language/12_Statements/03_Variable_Declaration_A04_t07: Fail # Dart issue 7305
 Language/12_Statements/04_Local_Function_Declaration_A02_t02: Fail # Dart issue 5773
@@ -168,10 +130,6 @@
 LibTest/math/pow_A13_t01: Fail # Dart issue 449
 
 Language/05_Variables/05_Variables_A05_t04: Fail # Dart issue 5881
-Language/05_Variables/05_Variables_A05_t11: Fail # Dart issue 5885
-Language/05_Variables/05_Variables_A05_t13: Fail # Dart issue 5885
-Language/05_Variables/05_Variables_A05_t14: Fail # Dart issue 5885
-Language/05_Variables/05_Variables_A05_t15: Fail # Dart issue 5885
 Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t02: Fail # Dart issue 5802
 Language/05_Variables/1_Evaluation_of_Implicit_Variable_Getters_A01_t05: Fail # Dart issue 5894
 
@@ -361,6 +319,7 @@
 LibTest/core/RegExp/Pattern_semantics/firstMatch_Atom_A04_t01: Fail # StringBuffer renamed add to write. co19 issue 388.
 Language/12_Statements/01_Blocks_A01_t03: Fail # StringBuffer renamed add to write. co19 issue 388.
 Language/11_Expressions/14_Function_Invocation/1_Actual_Argument_List_Evaluation_A02_t01: Fail # StringBuffer renamed add to write. co19 issue 388.
+Language/11_Expressions/11_Instance_Creation/1_New_A01_t04: Fail # co19 issue 461
 Language/11_Expressions/11_Instance_Creation/1_New_A09_t12: Fail # StringBuffer renamed add to write. co19 issue 388.
 Language/11_Expressions/11_Instance_Creation/1_New_A09_t05: Fail # StringBuffer renamed add to write. co19 issue 388.
 Language/11_Expressions/11_Instance_Creation/1_New_A13_t03: Fail # StringBuffer renamed add to write. co19 issue 388.
@@ -466,6 +425,7 @@
 Language/11_Expressions/18_Assignment_A05_t04: Fail, OK # co19 issue 405
 Language/11_Expressions/18_Assignment_A05_t05: Fail, OK # co19 issue 405
 Language/11_Expressions/18_Assignment_A08_t04: Fail, OK # co19 issue 405
+Language/11_Expressions/30_Identifier_Reference_A07_t01: Fail, OK # co19 issue 460
 
 Language/12_Statements/09_Switch_A05_t01: Fail # TODO(vm-team): Please triage this failure.
 
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index 9e1262b..8e81e93 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -48,6 +48,7 @@
   BaseType growableList;
   BaseType map;
   BaseType nullType;
+  BaseType functionType;
 
   AnalysisResult(MockCompiler compiler) : this.compiler = compiler {
     inferrer = compiler.typesTask.concreteTypesInferrer;
@@ -60,6 +61,7 @@
     growableList = inferrer.baseTypes.growableListBaseType;
     map = inferrer.baseTypes.mapBaseType;
     nullType = const NullBaseType();
+    functionType = inferrer.baseTypes.functionBaseType;
     Element mainElement = compiler.mainApp.find(buildSourceString('main'));
     ast = mainElement.parseNode(compiler);
   }
@@ -341,6 +343,42 @@
   result.checkNodeHasType('i', [result.int]);
 }
 
+testForIn() {
+  final String source = r"""
+      class MyIterator {
+        var counter = 0;
+
+        moveNext() {
+          if (counter == 0) {
+            counter = 1;
+            return true;
+          } else if (counter == 1) {
+            counter = 2;
+            return true;
+          } else {
+            return false;
+          }
+        }
+
+        get current => (counter == 1) ? "foo" : 42;
+      }
+
+      class MyIterable {
+        get iterator => new MyIterator();
+      }
+
+      main() {
+        var res;
+        for (var i in new MyIterable()) {
+          res = i;
+        }
+        res;
+      }
+      """;
+  AnalysisResult result = analyze(source);
+  result.checkNodeHasType('res', [result.int, result.string, result.nullType]);
+}
+
 testToplevelVariable() {
   final String source = r"""
       final top = 'abc';
@@ -1461,6 +1499,56 @@
   result.checkNodeHasType('w', [result.int]);
 }
 
+testClosures() {
+  final String source = r"""
+      class A {
+        final foo = 42;
+      }
+      class B {
+        final foo = "abc";
+      }
+      main() {
+        new A(); new B();
+
+        var a;
+        var f = (x) {
+          a = x.foo;
+        };
+        var b = f(42);
+        a; b; f;
+      }
+      """;
+  AnalysisResult result = analyze(source);
+  result.checkNodeHasType('a', [result.int, result.string]);
+  result.checkNodeHasType('f', [result.functionType]);
+  result.checkNodeHasUnknownType('b');
+}
+
+testNestedFunctions() {
+  final String source = r"""
+      class A {
+        final foo = 42;
+      }
+      class B {
+        final foo = "abc";
+      }
+      main() {
+        new A(); new B();
+
+        var a;
+        f(x) {
+          a = x.foo;
+        }
+        var b = f(42);
+        a; b; f;
+      }
+      """;
+  AnalysisResult result = analyze(source);
+  result.checkNodeHasType('a', [result.int, result.string]);
+  result.checkNodeHasType('f', [result.functionType]);
+  result.checkNodeHasUnknownType('b');
+}
+
 void main() {
   testDynamicBackDoor();
   testVariableDeclaration();
@@ -1472,6 +1560,7 @@
   testFor1();
   testFor2();
   testFor3();
+  testForIn();
   testToplevelVariable();
   testNonRecusiveFunction();
   testRecusiveFunction();
@@ -1516,4 +1605,6 @@
   testConcreteTypeToTypeMask();
   testSelectors();
   testMixins();
+  testClosures();
+  testNestedFunctions();
 }
diff --git a/tests/compiler/dart2js/deprecated_features_test.dart b/tests/compiler/dart2js/deprecated_features_test.dart
index 3d0a12e..f43b6ad 100644
--- a/tests/compiler/dart2js/deprecated_features_test.dart
+++ b/tests/compiler/dart2js/deprecated_features_test.dart
@@ -58,12 +58,7 @@
       "19<part 'part.dart';>::${deprecatedMessage('missing part-of tag')}\n"
       "0<>:/part.dart:info: Note: This file has no part-of tag, but it is being"
       " used as a part.\n"
-
-      // TODO(ahe): Should be <bar>.
-      "52<Foo>::${deprecatedMessage('conflicting constructor')}\n"
-
-      "72<bar>::info: This member conflicts with a constructor.\n"
-      "103<()>::${deprecatedMessage('getter parameters')}\n",
+      "57<()>::${deprecatedMessage('getter parameters')}\n",
       messages.toString());
 }
 
@@ -80,14 +75,11 @@
 part 'part.dart';
 
 class Foo {
-  Foo.bar();
-  static bar() => new Foo.bar();
   get x() => null;
 }
 
 main() {
-  var a = Foo.bar();
-  var b = new Foo.bar();
+  var a = new Foo();
 }
 """,
     // TODO(ahe): Why isn't this 'part.dart'? Why the leading slash?
diff --git a/tests/compiler/dart2js/find_my_name_test.dart b/tests/compiler/dart2js/find_my_name_test.dart
index d5e7d0f..dc24326 100644
--- a/tests/compiler/dart2js/find_my_name_test.dart
+++ b/tests/compiler/dart2js/find_my_name_test.dart
@@ -36,7 +36,9 @@
   cls.parseNode(compiler);
   for (Element e in cls.localMembers) {
     String name = e.name.slowToString();
-    if (e.isConstructor()) name = name.replaceFirst(r'$', '.');
+    if (e.isConstructor()) {
+      name = Elements.reconstructConstructorName(e).replaceFirst(r'$', '.');
+    }
     Expect.equals(code.indexOf(name, skip), e.position().charOffset);
   }
 }
diff --git a/tests/compiler/dart2js/mirrors_test.dart b/tests/compiler/dart2js/mirrors_test.dart
index 4090882..75aadeb 100644
--- a/tests/compiler/dart2js/mirrors_test.dart
+++ b/tests/compiler/dart2js/mirrors_test.dart
@@ -625,7 +625,6 @@
   Expect.isFalse(method1.isGenerativeConstructor);
   Expect.isFalse(method1.isRedirectingConstructor);
   Expect.isFalse(method1.isFactoryConstructor);
-  Expect.isNull(method1.constructorName);
   Expect.isFalse(method1.isGetter);
   Expect.isFalse(method1.isSetter);
   Expect.isFalse(method1.isOperator);
@@ -678,7 +677,6 @@
   Expect.isFalse(method2.isGenerativeConstructor);
   Expect.isFalse(method2.isRedirectingConstructor);
   Expect.isFalse(method2.isFactoryConstructor);
-  Expect.isNull(method2.constructorName);
   Expect.isFalse(method2.isGetter);
   Expect.isFalse(method2.isSetter);
   Expect.isFalse(method2.isOperator);
@@ -744,7 +742,6 @@
   Expect.isFalse(method3.isGenerativeConstructor);
   Expect.isFalse(method3.isRedirectingConstructor);
   Expect.isFalse(method3.isFactoryConstructor);
-  Expect.isNull(method3.constructorName);
   Expect.isFalse(method3.isGetter);
   Expect.isFalse(method3.isSetter);
   Expect.isFalse(method3.isOperator);
@@ -867,7 +864,6 @@
   Expect.isFalse(operator_eq.isGenerativeConstructor);
   Expect.isFalse(operator_eq.isRedirectingConstructor);
   Expect.isFalse(operator_eq.isFactoryConstructor);
-  Expect.isNull(operator_eq.constructorName);
   Expect.isFalse(operator_eq.isGetter);
   Expect.isFalse(operator_eq.isSetter);
   Expect.isTrue(operator_eq.isOperator);
@@ -897,7 +893,6 @@
   Expect.isFalse(operator_negate.isGenerativeConstructor);
   Expect.isFalse(operator_negate.isRedirectingConstructor);
   Expect.isFalse(operator_negate.isFactoryConstructor);
-  Expect.isNull(operator_negate.constructorName);
   Expect.isFalse(operator_negate.isGetter);
   Expect.isFalse(operator_negate.isSetter);
   Expect.isTrue(operator_negate.isOperator);
@@ -912,7 +907,7 @@
   ////////////////////////////////////////////////////////////////////////////
   //   Baz();
   ////////////////////////////////////////////////////////////////////////////
-  var bazClassNonameConstructor = bazClassConstructors['Baz'];
+  var bazClassNonameConstructor = bazClassConstructors[''];
   Expect.isNotNull(bazClassNonameConstructor);
   Expect.isTrue(bazClassNonameConstructor is MethodMirror);
   Expect.isTrue(bazClassNonameConstructor.isConstructor);
@@ -921,16 +916,15 @@
   Expect.isTrue(bazClassNonameConstructor.isGenerativeConstructor);
   Expect.isFalse(bazClassNonameConstructor.isRedirectingConstructor);
   Expect.isFalse(bazClassNonameConstructor.isFactoryConstructor);
-  Expect.stringEquals('Baz', bazClassNonameConstructor.simpleName);
+  Expect.stringEquals('', bazClassNonameConstructor.simpleName);
   Expect.stringEquals('Baz', displayName(bazClassNonameConstructor));
-  Expect.stringEquals('mirrors_helper.Baz.Baz',
+  Expect.stringEquals('mirrors_helper.Baz.',
       bazClassNonameConstructor.qualifiedName);
-  Expect.stringEquals('', bazClassNonameConstructor.constructorName);
 
   ////////////////////////////////////////////////////////////////////////////
   //   const Baz.named();
   ////////////////////////////////////////////////////////////////////////////
-  var bazClassNamedConstructor = bazClassConstructors['Baz.named'];
+  var bazClassNamedConstructor = bazClassConstructors['named'];
   Expect.isNotNull(bazClassNamedConstructor);
   Expect.isTrue(bazClassNamedConstructor is MethodMirror);
   Expect.isTrue(bazClassNamedConstructor.isConstructor);
@@ -939,16 +933,15 @@
   Expect.isFalse(bazClassNamedConstructor.isGenerativeConstructor);
   Expect.isFalse(bazClassNamedConstructor.isRedirectingConstructor);
   Expect.isFalse(bazClassNamedConstructor.isFactoryConstructor);
-  Expect.stringEquals('Baz.named', bazClassNamedConstructor.simpleName);
+  Expect.stringEquals('named', bazClassNamedConstructor.simpleName);
   Expect.stringEquals('Baz.named', displayName(bazClassNamedConstructor));
-  Expect.stringEquals('mirrors_helper.Baz.Baz.named',
+  Expect.stringEquals('mirrors_helper.Baz.named',
       bazClassNamedConstructor.qualifiedName);
-  Expect.stringEquals('named', bazClassNamedConstructor.constructorName);
 
   ////////////////////////////////////////////////////////////////////////////
   //   factory Baz.factory() => new Baz<E,F>();
   ////////////////////////////////////////////////////////////////////////////
-  var bazClassFactoryConstructor = bazClassConstructors['Baz.factory'];
+  var bazClassFactoryConstructor = bazClassConstructors['factory'];
   Expect.isNotNull(bazClassFactoryConstructor);
   Expect.isTrue(bazClassFactoryConstructor is MethodMirror);
   Expect.isTrue(bazClassFactoryConstructor.isConstructor);
@@ -957,11 +950,10 @@
   Expect.isFalse(bazClassFactoryConstructor.isGenerativeConstructor);
   Expect.isFalse(bazClassFactoryConstructor.isRedirectingConstructor);
   Expect.isTrue(bazClassFactoryConstructor.isFactoryConstructor);
-  Expect.stringEquals('Baz.factory', bazClassFactoryConstructor.simpleName);
+  Expect.stringEquals('factory', bazClassFactoryConstructor.simpleName);
   Expect.stringEquals('Baz.factory', displayName(bazClassFactoryConstructor));
-  Expect.stringEquals('mirrors_helper.Baz.Baz.factory',
+  Expect.stringEquals('mirrors_helper.Baz.factory',
       bazClassFactoryConstructor.qualifiedName);
-  Expect.stringEquals('factory', bazClassFactoryConstructor.constructorName);
 
   // TODO(johnniwinther): Add more tests of constructors.
   // TODO(johnniwinther): Add a test for unnamed factory methods.
@@ -1014,7 +1006,7 @@
   Expect.isTrue(privateMethod.isRegularMethod);
 
   var privateConstructor =
-      privateClass.members['_PrivateClass._privateConstructor'];
+      privateClass.members['_privateConstructor'];
   Expect.isNotNull(privateConstructor);
   Expect.isTrue(privateConstructor is MethodMirror);
   Expect.isTrue(privateConstructor.isConstructor);
@@ -1025,7 +1017,7 @@
   Expect.isFalse(privateConstructor.isFactoryConstructor);
 
   var privateFactoryConstructor =
-      privateClass.members['_PrivateClass._privateFactoryConstructor'];
+      privateClass.members['_privateFactoryConstructor'];
   Expect.isNotNull(privateFactoryConstructor);
   Expect.isTrue(privateFactoryConstructor is MethodMirror);
   Expect.isTrue(privateFactoryConstructor.isConstructor);
diff --git a/tests/compiler/dart2js/package_root_test.dart b/tests/compiler/dart2js/package_root_test.dart
new file mode 100644
index 0000000..6bdb104
--- /dev/null
+++ b/tests/compiler/dart2js/package_root_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file

+// for details. All rights reserved. Use of this source code is governed by a

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

+

+// Test that the compiler can handle imports when package root has not been set.

+

+library dart2js.test.package_root;

+

+import 'package:expect/expect.dart';

+import 'memory_source_file_helper.dart';

+

+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'

+       show NullSink;

+

+import '../../../sdk/lib/_internal/compiler/compiler.dart'

+       show DiagnosticHandler, Diagnostic;

+

+import 'dart:async';

+

+import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';

+import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart';

+

+const MEMORY_SOURCE_FILES = const {

+  'main.dart': '''

+

+import 'package:foo/foo.dart';

+

+main() {}

+''',

+};

+

+void runCompiler(Uri main) {

+  Uri script = currentDirectory.resolve(nativeToUriPath(Platform.script));

+  Uri libraryRoot = script.resolve('../../../sdk/');

+

+  MemorySourceFileProvider.MEMORY_SOURCE_FILES = MEMORY_SOURCE_FILES;

+  var provider = new MemorySourceFileProvider();

+  var handler = new FormattingDiagnosticHandler(provider);

+  var errors = [];

+  

+  void diagnosticHandler(Uri uri, int begin, int end, String message,

+                         Diagnostic kind) {

+    if (kind == Diagnostic.ERROR) {

+      errors.add(message);

+    }

+    handler(uri, begin, end, message, kind);

+  }

+  

+  

+  EventSink<String> outputProvider(String name, String extension) {

+    if (name != '') throw 'Attempt to output file "$name.$extension"';

+    return new NullSink('$name.$extension');

+  }

+

+  Compiler compiler = new Compiler(provider.readStringFromUri,

+                                   outputProvider,

+                                   diagnosticHandler,

+                                   libraryRoot,

+                                   null,

+                                   []);

+  

+  compiler.run(main);

+  Expect.equals(1, errors.length);

+  Expect.equals("Error: Cannot resolve 'package:foo/foo.dart'. "

+                "Package root has not been set.", 

+                errors[0]);

+}

+

+void main() {

+  runCompiler(Uri.parse('memory:main.dart'));

+  runCompiler(Uri.parse('package:foo/foo.dart'));

+}

diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index f476e1e..cb7ccab 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -141,10 +141,10 @@
   Expect.equals(classPatch, classOrigin.patch);
   Expect.equals(classOrigin, classPatch.origin);
 
-  var constructorOrigin = ensure(compiler, "Class",
+  var constructorOrigin = ensure(compiler, "",
                                  (name) => classOrigin.localLookup(name),
                                  expectIsPatched: true);
-  var constructorPatch = ensure(compiler, "Class",
+  var constructorPatch = ensure(compiler, "",
                                 (name) => classPatch.localLookup(name),
                                 expectIsPatch: true);
 
diff --git a/tests/compiler/dart2js/simple_inferrer_test.dart b/tests/compiler/dart2js/simple_inferrer_test.dart
index b5b9d9b..186504d 100644
--- a/tests/compiler/dart2js/simple_inferrer_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_test.dart
@@ -580,11 +580,11 @@
   checkReturnInClass('B', 'returnInt8', typesInferrer.intType);
   checkReturnInClass('B', 'returnInt9', typesInferrer.intType);
 
-  checkFactoryConstructor(String className) {
+  checkFactoryConstructor(String className, String factoryName) {
     var cls = findElement(compiler, className);
-    var element = cls.localLookup(buildSourceString(className));
+    var element = cls.localLookup(buildSourceString(factoryName));
     Expect.equals(new TypeMask.nonNullExact(cls.rawType),
                   typesInferrer.getReturnTypeOfElement(element));
   }
-  checkFactoryConstructor('A');
+  checkFactoryConstructor('A', '');
 }
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 3b54d94..fe615af 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -98,7 +98,6 @@
 list_removeat_test: fail
 
 [ $compiler == dart2analyzer ]
-symbol_test/01: Fail
 symbol_test/02: Fail
 symbol_test/03: Fail
 int_parse_radix_test: fail
@@ -118,7 +117,7 @@
 int_parse_radix_test: Skip # Timeout
 
 [ $arch == simmips && $checked ]
-hash_map2_test: Crash # Too far PC relative branch.
+hash_map2_test: Pass, Crash # Too far PC relative branch (?)
 collection_length_test: Pass, Timeout
 
 [ $arch == simmips && $mode == debug ]
diff --git a/tests/corelib/list_to_string2_test.dart b/tests/corelib/list_to_string2_test.dart
new file mode 100644
index 0000000..27af867
--- /dev/null
+++ b/tests/corelib/list_to_string2_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+main() {
+  List list = [1, 2];
+  list.add(list);
+
+  List list2 = new List(4);
+  list2[0] = 1;
+  list2[1] = 2;
+  list2[2] = list2;
+  list2[3] = list;
+
+  Expect.equals("[1, 2, [...]]", list.toString());
+  Expect.equals("[1, 2, [...], [1, 2, [...]]]", list2.toString());
+
+  // Throwing in the middle of a toString does not leave the
+  // list as being visited.
+  List list3 = [1, 2, new ThrowOnToString(), 4];
+  Expect.throws(list3.toString, (e) => e == "Bad!");
+  list3[2] = 3;
+  Expect.equals("[1, 2, 3, 4]", list3.toString());
+}
+
+class ThrowOnToString {
+
+  String toString() {
+    throw "Bad!";
+  }
+}
diff --git a/tests/corelib/map_to_string_test.dart b/tests/corelib/map_to_string_test.dart
new file mode 100644
index 0000000..8d2bc9b
--- /dev/null
+++ b/tests/corelib/map_to_string_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+void main() {
+  Map m = new Map();
+
+  m[0] = 0;
+  m[1] = 1;
+  m[2] = m;
+
+  Expect.equals('{0: 0, 1: 1, 2: {...}}', m.toString());
+
+  // Throwing in the middle of a toString does not leave the
+  // map as being visited
+  ThrowOnToString err = new ThrowOnToString();
+  m[1] = err;
+  Expect.throws(m.toString, (e) => e == "Bad!");
+  m[1] = 1;
+  Expect.equals('{0: 0, 1: 1, 2: {...}}', m.toString());
+  m[err] = 1;
+  Expect.throws(m.toString, (e) => e == "Bad!");
+  m.remove(err);
+}
+
+class ThrowOnToString {
+
+  String toString() {
+    throw "Bad!";
+  }
+}
diff --git a/tests/corelib/set_to_string_test.dart b/tests/corelib/set_to_string_test.dart
new file mode 100644
index 0000000..55f31da
--- /dev/null
+++ b/tests/corelib/set_to_string_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+import "dart:collection";
+
+void main() {
+  Set s = new HashSet();
+  s.add(1);
+  Expect.equals("{1}", s.toString());
+  s.remove(1);
+  s.add(s);
+  Expect.equals("{{...}}", s.toString());
+
+  Queue q = new ListQueue(4);
+  q.add(1);
+  q.add(2);
+  q.add(q);
+  q.add(s);
+
+  Expect.equals("{1, 2, {...}, {{...}}}", q.toString());
+
+  // Throwing in the middle of a toString does not leave the
+  // set as being visited
+  q.addLast(new ThrowOnToString());
+  Expect.throws(q.toString, (e) => e == "Bad!");
+  q.removeLast();
+  Expect.equals("{1, 2, {...}, {{...}}}", q.toString());
+}
+
+class ThrowOnToString {
+
+  String toString() {
+    throw "Bad!";
+  }
+}
diff --git a/tests/html/event_customevent_test.dart b/tests/html/event_customevent_test.dart
index dc2951e..f7740e8 100644
--- a/tests/html/event_customevent_test.dart
+++ b/tests/html/event_customevent_test.dart
@@ -8,22 +8,6 @@
 import '../../pkg/unittest/lib/html_config.dart';
 import 'dart:html';
 
-// TODO(nweiz): Make this private to testEvents when Frog supports closures with
-// optional arguments.
-eventTest(String name, Event eventFn(), void validate(Event),
-    [String type = 'foo']) {
-  test(name, () {
-    final el = new Element.tag('div');
-    var fired = false;
-    el.on[type].add((ev) {
-      fired = true;
-      validate(ev);
-    });
-    el.on[type].dispatch(eventFn());
-    expect(fired, isTrue, reason: 'Expected event to be dispatched.');
-  });
-}
-
 main() {
   useHtmlConfiguration();
 
@@ -34,12 +18,32 @@
     var fired = false;
     provider.forTarget(el).listen((ev) {
       fired = true;
-      expect(ev.detail, 'detail');
+      expect(ev.detail, {'type': 'detail'});
     });
 
     var ev = new CustomEvent('foo', canBubble: false, cancelable: false,
-        detail: 'detail');
+        detail: {'type': 'detail'});
     el.dispatchEvent(ev);
     expect(fired, isTrue);
   });
+
+  test('custom events from JS', () {
+    var scriptContents = '''
+      var event = document.createEvent("CustomEvent");
+      event.initCustomEvent("js_custom_event", true, true, {type: "detail"});
+      window.dispatchEvent(event);
+    ''';
+
+    var fired = false;
+    window.on['js_custom_event'].listen((ev) {
+      fired = true;
+      expect(ev.detail, {'type': 'detail'});
+    });
+
+    var script = new ScriptElement();
+    script.text = scriptContents;
+    document.body.append(script);
+
+    expect(fired, isTrue);
+  });
 }
diff --git a/tests/html/form_data_test.dart b/tests/html/form_data_test.dart
index 0cbe6bc..140c253 100644
--- a/tests/html/form_data_test.dart
+++ b/tests/html/form_data_test.dart
@@ -62,7 +62,7 @@
         var blob = new Blob(
             ['Indescribable... Indestructible! Nothing can stop it!'],
             'text/plain');
-        form.append('theBlob', blob, 'theBlob.txt');
+        form.appendBlob('theBlob', blob, 'theBlob.txt');
       });
 
       test('send', () {
@@ -72,7 +72,7 @@
         var blob = new Blob(
             [blobString],
             'text/plain');
-        form.append('theBlob', blob, 'theBlob.txt');
+        form.appendBlob('theBlob', blob, 'theBlob.txt');
 
         var xhr = new HttpRequest();
         xhr.open('POST',
diff --git a/tests/html/html.status b/tests/html/html.status
index 63a6af5..6977ddf 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -368,6 +368,7 @@
 isolates_test: Skip   # Timeout because leg does not support web workers.
 
 [ $compiler == dart2js && $csp && ($runtime == drt || $runtime == safari || $runtime == ff || $runtime == chrome || $runtime == chromeOnAndroid) ]
+event_customevent_test: Fail       # Test cannot run under CSP restrictions.
 js_interop_1_test: Skip            # Test cannot run under CSP restrictions (times out).
 js_interop_2_test: Fail, OK        # Test cannot run under CSP restrictions.
 js_interop_3_test: Skip            # Test cannot run under CSP restrictions (times out).
diff --git a/tests/language/class_literal_test.dart b/tests/language/class_literal_test.dart
index 246f99c..cb9b536 100644
--- a/tests/language/class_literal_test.dart
+++ b/tests/language/class_literal_test.dart
@@ -13,24 +13,6 @@
 foo(x) {}
 
 main() {
-  if (false) {
-    Class(); /// 02: compile-time error
-    Class[0]; /// 05: compile-time error
-    var x = Class(); /// 07: compile-time error
-    var x = Class[0]; /// 10: compile-time error
-    var x = Class[0].field; /// 11: compile-time error
-    var x = Class[0].method(); /// 12: compile-time error
-    foo(Class()); /// 14: compile-time error
-    foo(Class[0]); /// 17: compile-time error
-    foo(Class[0].field); /// 18: compile-time error
-    foo(Class[0].method()); /// 19: compile-time error
-    Class[0] = 91; /// 22: compile-time error
-    Class++; /// 23: compile-time error
-    ++Class; /// 24: compile-time error
-    Class[0] += 3; /// 27: compile-time error
-    ++Class[0]; /// 28: compile-time error
-    Class[0]++; /// 29: compile-time error
-  }
   Expect.equals(42, Class.fisk());
   Expect.equals(null, foo(Class.fisk()));
   
@@ -41,6 +23,22 @@
   Expect.isFalse(Class == null);
 
   // Verify that dereferencing a class literal is a runtime error.
+  Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError);
+  Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError);
   Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError);
   Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError);
   Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError);
diff --git a/tests/language/language.status b/tests/language/language.status
index b105eb7..b29b872 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -22,7 +22,6 @@
 mixin_super_constructor_named_test: Fail
 mixin_super_constructor_positionals_test: Fail
 mixin_super_constructor_multiple_test: Fail
-closure_type_variable_test: Fail # Type variable used as expression (dartbug.com/6282)
 const_constructor_super_test/01: fail
 
 [ $compiler == none ]
@@ -33,13 +32,9 @@
 mixin_super_constructor_named_test: Fail
 mixin_super_constructor_positionals_test: Fail
 mixin_super_constructor_multiple_test: Fail
-closure_type_variable_test: Fail # Type variable used as expression (dartbug.com/6282)
 built_in_identifier_prefix_test: Fail # http://dartbug.com/6970
 library_juxtaposition_test: Fail # Issue 6877
 pseudo_kw_illegal_test/14: Fail  # Issue 356
-method_override2_test/00: Fail # Issue 7076.
-method_override2_test/02: Fail # Issue 7076.
-method_override2_test/03: Fail # Issue 7076.
 bound_closure_equality_test: Fail # Issue 10849
 
 # These bugs refer currently ongoing language discussions.
@@ -74,8 +69,6 @@
 type_annotation_test/06: Fail # Issue 6973
 type_annotation_test/09: Fail # Issue 6973
 
-type_parameter_literal_test: Fail # Issue 7551
-
 on_catch_malformed_type_test: Fail # Issue 8601
 
 mixin_mixin_test: Fail
@@ -206,9 +199,6 @@
 
 metadata_test: Fail
 # Fails in conservative mode, issue 4935, passes in minifinying mode.
-bad_constructor_test/04: Fail
-bad_constructor_test/05: Fail
-bad_constructor_test/06: Fail
 argument_definition_test/*: Skip # Not implemented.
 const_var_test: Pass, Fail # Map literals take 2 type arguments.
 map_literal3_test: Fail # Map literals take 2 type arguments.
@@ -230,9 +220,6 @@
 duplicate_implements_test/03: Fail
 duplicate_implements_test/04: Fail
 interface_factory_constructor_negative_test: Fail
-method_override2_test/00: Fail
-method_override2_test/02: Fail
-method_override2_test/03: Fail
 method_override4_test: Fail
 method_override5_test: Fail
 operator1_negative_test: Fail
@@ -307,7 +294,6 @@
 compile_time_constant_checked3_test/06: Fail, OK
 
 type_error_test: Fail, OK # VM bug: http://dartbug.com/5280
-type_parameter_literal_test: Fail
 
 type_variable_field_initializer_closure_test: Crash # VM bug: issue 8847
 closures_initializer_test: Crash # VM bug: issue 8847
@@ -318,7 +304,7 @@
 super_getter_setter_test: Fail # Issue 11065.
 
 # TODO(tball): Assign proper bug numbers.
-class_literal_test/none: Fail
+class_literal_test: Fail
 
 import_core_prefix_test: Pass
 prefix22_test: Pass
@@ -327,8 +313,9 @@
 
 
 [ $arch == simarm || $arch == arm ]
-stack_overflow_test: Crash, Pass # Passes on HW in release mode.
-stack_overflow_stacktrace_test: Crash, Pass # Passes on HW in release mode.
+# TODO(zra): Check to see if the ASSERT that fails in debug mode is correct
+stack_overflow_test: Crash, Pass # Passes in release mode.
+stack_overflow_stacktrace_test: Crash, Pass # Passes in release mode.
 
 
 [ $arch == mips ]
@@ -338,5 +325,6 @@
 [ $arch == simmips ]
 arithmetic_test: Crash  # Too far relative branch.
 large_implicit_getter_test: Crash  # Too far relative branch.
-stack_overflow_test: Crash
-stack_overflow_stacktrace_test: Crash
+# TODO(zra): Check to see if the ASSERT that fails in debug mode is correct
+stack_overflow_test: Crash, Pass # Passes in release mode.
+stack_overflow_stacktrace_test: Crash, Pass # Passes in release mode.
\ No newline at end of file
diff --git a/tests/language/language_analyzer.status b/tests/language/language_analyzer.status
index 7ca82ad..3ba09e1 100644
--- a/tests/language/language_analyzer.status
+++ b/tests/language/language_analyzer.status
@@ -25,7 +25,6 @@
 call_through_getter_test: fail
 cast_test/04: fail
 cast_test/05: fail
-class_cycle_test/03: fail
 closure_call_wrong_argument_count_negative_test: fail
 const_constructor_super_test/01: fail
 compile_time_constant10_test/none: fail
@@ -46,7 +45,6 @@
 cyclic_type_variable_test/04: fail
 default_factory2_test/01: fail
 default_implementation2_test: fail
-dynamic2_test/00: fail
 dynamic_field_test: fail
 export_cyclic_test: fail
 f_bounded_quantification_test/01: fail
@@ -54,7 +52,6 @@
 factory2_test: fail
 factory5_test/00: fail
 factory_implementation_test/none: fail
-factory_redirection2_test/01: fail
 field_method4_negative_test: fail
 field_override_test/01: fail
 final_for_in_variable_test/01: fail
@@ -65,7 +62,6 @@
 final_variable_assignment_test/03: fail
 final_variable_assignment_test/04: fail
 first_class_types_constants_test: fail
-for_in2_test: fail
 getter_no_setter2_test/00: fail
 getter_no_setter2_test/03: fail
 getter_no_setter_test/00: fail
@@ -81,24 +77,14 @@
 interface_test/00: fail
 is_not_class2_negative_test: fail
 library_juxtaposition_test: fail
-list_literal1_negative_test: fail
-list_literal_syntax_test/01: fail
-list_literal_syntax_test/02: fail
-list_literal_syntax_test/03: fail
-map_literal1_negative_test: fail
 map_literal3_test: fail
 mixin_illegal_constructor_test/13: fail
 mixin_illegal_constructor_test/14: fail
 mixin_illegal_constructor_test/15: fail
 mixin_illegal_constructor_test/16: fail
-mixin_illegal_cycles_test/02: fail
-mixin_illegal_cycles_test/03: fail
-mixin_illegal_cycles_test/04: fail
-mixin_illegal_cycles_test/06: fail
 mixin_illegal_syntax_test/13: fail
 mixin_type_parameters_errors_test/01: fail
 mixin_type_parameters_errors_test/02: fail
-mixin_type_parameters_errors_test/03: fail
 mixin_type_parameters_errors_test/04: fail
 mixin_type_parameters_errors_test/05: fail
 named_parameters2_test: fail
@@ -164,7 +150,6 @@
 type_variable_bounds_test/00: fail
 type_variable_bounds_test/03: fail
 type_variable_bounds_test/04: fail
-type_variable_identifier_expression_negative_test: fail
 type_variable_static_context_negative_test: fail
 unresolved_in_factory_negative_test: fail
 unresolved_top_level_method_negative_test: fail
@@ -236,11 +221,23 @@
 # Test issue 11564, named parameter starts with '_'
 named_parameters_with_object_property_names_test: fail
 
-method_override3_test: fail # issue 11497
+method_override2_test/00: fail # issue 11497
+method_override2_test/01: fail # issue 11497
+method_override2_test/02: fail # issue 11497
+method_override2_test/03: fail # issue 11497
+method_override3_test/00: fail # issue 11497
+method_override3_test/01: fail # issue 11497
+method_override3_test/02: fail # issue 11497
 method_override4_test: fail # issue 11497
 method_override5_test: fail # issue 11497
 method_override6_test: fail # issue 11497
 
+# testing framework problem: we do report warning, framework does not understand it
+# may be https://codereview.chromium.org/18174010/ will fix this
+mixin_type_parameters_errors_test/03: fail
+type_variable_bounds_test/08: fail
+wrong_number_type_arguments_test/01: fail
+
 [ $compiler == dartanalyzer && $checked ]
 factory1_test/00: fail
 factory1_test/01: fail
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index bf179d5..a5cfdc9 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -12,7 +12,6 @@
 bad_override_test/01: fail
 bad_override_test/02: fail
 black_listed_test/11: fail
-body_less_constructor_wrong_arg_negative_test: fail
 built_in_identifier_prefix_test: fail
 call_constructor_on_unresolvable_class_test/01: fail
 call_constructor_on_unresolvable_class_test/02: fail
@@ -26,35 +25,26 @@
 call_through_getter_test: fail
 cast_test/04: fail
 cast_test/05: fail
-class_cycle_test/03: fail
 closure_call_wrong_argument_count_negative_test: fail
 const_constructor_super_test/01: fail
 compile_time_constant10_test/none: fail
 compile_time_constant_c_test/01: fail
-compile_time_constant_c_test/02: fail
-compile_time_constant_checked2_test/02: fail
 compile_time_constant_checked2_test/03: fail
 compile_time_constant_checked2_test/04: fail
-compile_time_constant_checked2_test/06: fail
-compile_time_constant_checked3_test/02: fail
 compile_time_constant_checked3_test/03: fail
 compile_time_constant_checked3_test/04: fail
-compile_time_constant_checked3_test/06: fail
 compile_time_constant_e_test: fail
 constructor2_negative_test: fail
 constructor3_negative_test: fail
 constructor_call_wrong_argument_count_negative_test: fail
 constructor_initializer_test: fail # uses argument definition test
 constructor_negative_test: fail
-constructor_return_with_arrow_negative_test: fail
-constructor_return_with_init_and_arrow_negative_test: fail
 cyclic_type_variable_test/01: fail
 cyclic_type_variable_test/02: fail
 cyclic_type_variable_test/03: fail
 cyclic_type_variable_test/04: fail
 default_factory2_test/01: fail
 default_implementation2_test: fail
-dynamic2_test/00: fail
 dynamic_field_test: fail
 export_cyclic_test: fail
 f_bounded_quantification_test/01: fail
@@ -62,7 +52,6 @@
 factory2_test: fail
 factory5_test/00: fail
 factory_implementation_test/none: fail
-factory_redirection2_test/01: fail
 field_method4_negative_test: fail
 field_override_test/01: fail
 final_for_in_variable_test/01: fail
@@ -73,7 +62,6 @@
 final_variable_assignment_test/03: fail
 final_variable_assignment_test/04: fail
 first_class_types_constants_test: fail
-for_in2_test: fail
 getter_no_setter2_test/00: fail
 getter_no_setter2_test/03: fail
 getter_no_setter_test/00: fail
@@ -89,24 +77,14 @@
 interface_test/00: fail
 is_not_class2_negative_test: fail
 library_juxtaposition_test: fail
-list_literal1_negative_test: fail
-list_literal_syntax_test/01: fail
-list_literal_syntax_test/02: fail
-list_literal_syntax_test/03: fail
-map_literal1_negative_test: fail
 map_literal3_test: fail
 mixin_illegal_constructor_test/13: fail
 mixin_illegal_constructor_test/14: fail
 mixin_illegal_constructor_test/15: fail
 mixin_illegal_constructor_test/16: fail
-mixin_illegal_cycles_test/02: fail
-mixin_illegal_cycles_test/03: fail
-mixin_illegal_cycles_test/04: fail
-mixin_illegal_cycles_test/06: fail
 mixin_illegal_syntax_test/13: fail
 mixin_type_parameters_errors_test/01: fail
 mixin_type_parameters_errors_test/02: fail
-mixin_type_parameters_errors_test/03: fail
 mixin_type_parameters_errors_test/04: fail
 mixin_type_parameters_errors_test/05: fail
 named_parameters2_test: fail
@@ -172,7 +150,6 @@
 type_variable_bounds_test/00: fail
 type_variable_bounds_test/03: fail
 type_variable_bounds_test/04: fail
-type_variable_identifier_expression_negative_test: fail
 type_variable_static_context_negative_test: fail
 unresolved_in_factory_negative_test: fail
 unresolved_top_level_method_negative_test: fail
@@ -244,11 +221,23 @@
 # Test issue 11564, named parameter starts with '_'
 named_parameters_with_object_property_names_test: fail
 
-method_override3_test: fail # issue 11497
+method_override2_test/00: fail # issue 11497
+method_override2_test/01: fail # issue 11497
+method_override2_test/02: fail # issue 11497
+method_override2_test/03: fail # issue 11497
+method_override3_test/00: fail # issue 11497
+method_override3_test/01: fail # issue 11497
+method_override3_test/02: fail # issue 11497
 method_override4_test: fail # issue 11497
 method_override5_test: fail # issue 11497
 method_override6_test: fail # issue 11497
 
+# testing framework problem: we do report warning, framework does not understand it
+# may be https://codereview.chromium.org/18174010/ will fix this
+mixin_type_parameters_errors_test/03: fail
+type_variable_bounds_test/08: fail
+wrong_number_type_arguments_test/01: fail
+
 [ $compiler == dart2analyzer && $checked ]
 factory1_test/00: fail
 factory1_test/01: fail
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 89dae43..c4d4dd1 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -109,9 +109,6 @@
 final_variable_assignment_test/04: Fail
 bad_override_test/01: Fail
 bad_override_test/02: 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
 call_nonexistent_constructor_test: Fail
 constructor_named_arguments_test/01: Fail # http://dartbug.com/5519
 getter_no_setter_test/01: Fail # http://dartbug.com/5519
@@ -152,9 +149,6 @@
 get_set_syntax_test/16: Fail # Fixed by https://chromiumcodereview.appspot.com/10915111
 method_binding_test: Fail # internal error: super property read not implemented.
 method_override_test: Fail # cannot resolve type GetKeysFunctionType
-method_override2_test/00: Fail # accepts illegal override
-method_override2_test/02: Fail # accepts illegal override
-method_override2_test/03: Fail # accepts illegal override
 method_override5_test: Fail # Issue 11496
 abstract_getter_test/01: Fail # instantiation of abstract class
 abstract_factory_constructor_test/01: Fail # instantiation of abstract class
diff --git a/tests/language/method_override2_test.dart b/tests/language/method_override2_test.dart
index 75fb53a..1b4d861 100644
--- a/tests/language/method_override2_test.dart
+++ b/tests/language/method_override2_test.dart
@@ -5,25 +5,25 @@
 // Checks that an overriding method has compatible parameters.
 
 abstract class I {
-  m(x, {a, b});
+  m({a, b});
 }
 
 abstract class J extends I { }
 
 abstract class K extends J {
-  m({c, d});  /// 00: compile-time error
+  m({c, d});  /// 00: static type warning
 }
 
 class C implements I {
-  m(x, {a, b}) {
-    print("$x $a $b");
+  m({a, b}) {
+    print("$a $b");
   }
 }
 
 class D
-    extends C  /// 01: compile-time error
-    implements I  /// 02: compile-time error
-    implements J  /// 03: compile-time error
+    extends C  /// 01: static type warning
+    implements I  /// 02: static type warning
+    implements J  /// 03: static type warning
 {
   m({c, d}) {
     print("$c $d");
@@ -33,7 +33,7 @@
 
 int main() {
   var c = new C();
-  c.m(1, a: "hello", b: "world");
+  c.m(a: "hello", b: "world");
   var d = new D();
   d.m(c: "hello", d: "world");
   print("${c is I} ${d is I} ${d is I} ${d is J}");
diff --git a/tests/language/method_override3_test.dart b/tests/language/method_override3_test.dart
index d5709c3..3c99b94 100644
--- a/tests/language/method_override3_test.dart
+++ b/tests/language/method_override3_test.dart
@@ -12,17 +12,37 @@
 }
 
 class B extends A {
-  foo(required1) => required1;
-  bar(required1, required2, { named1: 29 })
-      => required1 + required2 * 3 + named1 * 5;
-  gee({named2: 11}) => named2 * 99;
+  foo(required1
+     /*  /// 00: static type warning
+      , { named1: 499 }
+     */  /// 00: static type warning
+     ) {
+    return required1;
+  }
+
+  bar(required1, required2,
+      { named1: 13
+      /*  /// 01: static type warning
+        , named2: 17
+      */  /// 01: static type warning
+      }) {
+    return required1 + required2 * 3 + named1 * 5;
+  }
+
+  gee({named2: 11
+      /*  /// 02: static type warning
+       , named1: 31
+      */  /// 02: static type warning
+      }) {
+    return named2 * 99;
+  }
 }
 
 main() {
   var b = new B();
   Expect.equals(499, b.foo(499));
   Expect.equals(1 + 3 * 3 + 5 * 5, b.bar(1, 3, named1: 5));
-  Expect.equals(1 + 3 * 3 + 29 * 5, b.bar(1, 3));
+  Expect.equals(1 + 3 * 3 + 13 * 5, b.bar(1, 3));
   Expect.equals(3 * 99, b.gee(named2: 3));
   Expect.equals(11 * 99, b.gee());
 }
diff --git a/tests/language/no_such_method_dispatcher_test.dart b/tests/language/no_such_method_dispatcher_test.dart
index 8686480..b4e3744 100644
--- a/tests/language/no_such_method_dispatcher_test.dart
+++ b/tests/language/no_such_method_dispatcher_test.dart
@@ -16,6 +16,35 @@
 
 class B extends A { }
 
+
+call_bar(x) => x.bar();
+
+testMessage() {
+  try {
+    call_bar(5);
+  } catch (e) {
+    Expect.isTrue(e.toString().indexOf("method not found") != -1);
+  }
+}
+
+class C {
+  C(this.pos, this.named, this.posArgs, this.namedArgs);
+  var pos, named;
+  noSuchMethod(m) {
+    Expect.equals(pos, m.positionalArguments.length);
+    Expect.equals(named, m.namedArguments.length);
+    for (var i = 0; i < posArgs.length; ++i) {
+      Expect.equals(posArgs[i], m.positionalArguments[i]);
+    }
+    for (var k in namedArgs.keys) {
+      Expect.equals(namedArgs[k], m.namedArguments[new Symbol(k)]);
+    }
+    return 123;
+  }
+  List posArgs;
+  Map namedArgs;
+}
+
 main() {
   var a = new A();
   for (var i = 0; i < 100; ++i) Expect.equals(123, a.foo());
@@ -28,5 +57,21 @@
     Expect.equals(123, b.bar());
     Expect.equals(2, b.bar(1));
   }
+
+  for (var i = 0; i < 100; ++i) {
+    Expect.equals(123, b.bar(1,2,3));
+    Expect.equals(123, b.bar(1,2,foo:3));
+  }
+
+  // Test named and positional arguments.
+  var c = new C(1, 2, [100], {"n1":101, "n2":102});
+  for (var i = 0; i < 100; ++i) {
+    Expect.equals(123, c.bar(100, n1:101, n2:102));
+    Expect.equals(123, c.bar(100, n2:102, n1:101));
+  }
+
+  // Test NoSuchMethodError message.
+  for (var i = 0; i < 100; i++) testMessage();
+
 }
 
diff --git a/tests/language/type_variable_identifier_expression_negative_test.dart b/tests/language/type_variable_identifier_expression_test.dart
similarity index 64%
rename from tests/language/type_variable_identifier_expression_negative_test.dart
rename to tests/language/type_variable_identifier_expression_test.dart
index 427291c..bef7e09 100644
--- a/tests/language/type_variable_identifier_expression_negative_test.dart
+++ b/tests/language/type_variable_identifier_expression_test.dart
@@ -3,15 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--enable_type_checks
 
-// Section 9, type variables are not valid in identifier expressions
-
 class A {
   static func() { return "class A"; }
 }
 
 class B<T> {
   doFunc() {
-    T.func(); // illegal to use type variable as an identifier expression
+    T.func();
   }
 }
 
@@ -19,7 +17,6 @@
   try {
     var buf = new B<A>().doFunc();
     print(buf);
-  } on Exception catch (e) {
-    // should be an uncatchable compile-time error,
+  } on NoSuchMethodError catch (e) {
   }
 }
diff --git a/tests/lib/async/stream_controller_async_test.dart b/tests/lib/async/stream_controller_async_test.dart
index 526b0bc..0cae4fa 100644
--- a/tests/lib/async/stream_controller_async_test.dart
+++ b/tests/lib/async/stream_controller_async_test.dart
@@ -5,9 +5,9 @@
 // Test the basic StreamController and StreamController.singleSubscription.
 library stream_controller_async_test;
 
-import "package:expect/expect.dart";
 import 'dart:async';
 import 'dart:isolate';
+import "package:expect/expect.dart";
 import '../../../pkg/unittest/lib/unittest.dart';
 import 'event_helper.dart';
 import 'stream_state_helper.dart';
diff --git a/tests/lib/async/stream_join_test.dart b/tests/lib/async/stream_join_test.dart
new file mode 100644
index 0000000..b7b9f78
--- /dev/null
+++ b/tests/lib/async/stream_join_test.dart
@@ -0,0 +1,75 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test the basic StreamController and StreamController.singleSubscription.
+library stream_join_test;
+
+import 'dart:async';
+import 'event_helper.dart';
+import 'package:unittest/unittest.dart';
+import "package:expect/expect.dart";
+
+main() {
+  test("join-empty", () {
+    StreamController c = new StreamController();
+    c.stream.join("X").then(expectAsync1(
+      (String s) => expect(s, equals(""))
+    ));
+    c.close();
+  });
+
+  test("join-single", () {
+    StreamController c = new StreamController();
+    c.stream.join("X").then(expectAsync1(
+      (String s) => expect(s, equals("foo"))
+    ));
+    c.add("foo");
+    c.close();
+  });
+
+  test("join-three", () {
+    StreamController c = new StreamController();
+    c.stream.join("X").then(expectAsync1(
+      (String s) => expect(s, equals("fooXbarXbaz"))
+    ));
+    c.add("foo");
+    c.add("bar");
+    c.add("baz");
+    c.close();
+  });
+
+  test("join-three-non-string", () {
+    StreamController c = new StreamController();
+    c.stream.join("X").then(expectAsync1(
+      (String s) => expect(s, equals("fooXbarXbaz"))
+    ));
+    c.add(new Foo("foo"));
+    c.add(new Foo("bar"));
+    c.add(new Foo("baz"));
+    c.close();
+  });
+
+  test("join-error", () {
+    StreamController c = new StreamController();
+    c.stream.join("X").catchError(expectAsync1(
+      (String s) => expect(s, equals("BAD!"))
+    ));
+    c.add(new Foo("foo"));
+    c.add(new Foo("bar"));
+    c.add(new Bad());
+    c.add(new Foo("baz"));
+    c.close();
+  });
+}
+
+class Foo {
+  String value;
+  Foo(this.value);
+  String toString() => value;
+}
+
+class Bad {
+  Bad();
+  String toString() => throw "BAD!";
+}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index dc9f78e..11cee52 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -4,24 +4,19 @@
 
 [ $compiler == dart2js ]
 math/*: Skip
+mirrors/method_mirror_test: Fail # Issue 6335
 mirrors/mirrors_test: Fail # TODO(ahe): I'm working on fixing this.
 mirrors/library_uri_io_test: Skip # Not intended for dart2js as it uses dart:io.
 async/run_async3_test: Fail # _enqueueImmediate runs after Timer. http://dartbug.com/9002
 async/run_async4_test: Pass, Fail # no global exception handler in isolates. http://dartbug.com/9012
 async/run_async6_test: Fail # global error handling is not supported. http://dartbug.com/5958
 
-[ $compiler == dart2js  && $unchecked]
-async/stream_state_test: Fail # Issue 11722
-
 # SIMD is unsupported on dart2js.
 typed_data/float32x4_test: Fail, OK
 typed_data/float32x4_list_test: Fail, OK
 typed_data/float32x4_unbox_phi_test: Fail, OK
 typed_data/float32x4_unbox_regress_test: Fail, OK
 
-[ $compiler == dart2js && $checked ]
-async/catch_errors20_test: Fail # Issue 11470
-
 [ $compiler == dart2js && ($runtime == d8 || $runtime == ie9) ]
 typed_data/byte_data_test: Fail, OK # d8/ie9 doesn't support DataView
 
@@ -108,7 +103,6 @@
 mirrors/reflectively_instantiate_uninstantiated_class_test: Fail # http://dartbug.com/11187
 mirrors/reflect_model_test: Fail # http://dartbug.com/11219
 mirrors/parameter_test: Fail # http://dartbug.com/11567
-mirrors/metadata_constructed_constant_test: Fail # http://dartbug.com/11609
 
 [ $compiler == none && $runtime == drt ]
 async/timer_isolate_test: Skip # See Issue 4997
diff --git a/tests/lib/mirrors/method_mirror_test.dart b/tests/lib/mirrors/method_mirror_test.dart
new file mode 100644
index 0000000..16851c9
--- /dev/null
+++ b/tests/lib/mirrors/method_mirror_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:mirrors";
+
+import "../../../pkg/unittest/lib/unittest.dart";
+
+String _symbolToString(Symbol sym) {
+  return MirrorSystem.getName(sym);
+}
+
+doNothing42() {}
+
+main() {
+  // Regression test for http://www.dartbug.com/6335
+  test("NamedMethodName", () {
+    var closureMirror = reflect(doNothing42);
+    expect(_symbolToString(closureMirror.function.simpleName), "doNothing42");
+  });
+}
diff --git a/tests/standalone/debugger/debug_lib.dart b/tests/standalone/debugger/debug_lib.dart
index 6949257..79161c7 100644
--- a/tests/standalone/debugger/debug_lib.dart
+++ b/tests/standalone/debugger/debug_lib.dart
@@ -539,6 +539,7 @@
 
   void openConnection(int portNumber) {
     Socket.connect("127.0.0.1", portNumber).then((s) {
+        s.setOption(SocketOption.TCP_NODELAY, true);
         this.socket = s;
         var stringStream = socket.transform(new StringDecoder());
         stringStream.listen((str) {
diff --git a/tests/standalone/io/secure_socket_renegotiate_client.dart b/tests/standalone/io/secure_socket_renegotiate_client.dart
new file mode 100644
index 0000000..9ac2192
--- /dev/null
+++ b/tests/standalone/io/secure_socket_renegotiate_client.dart
@@ -0,0 +1,79 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Client for secure_socket_renegotiate_test, that runs in a subprocess.
+// The test verifies that client certificates work, if the client and server
+// are in separate processes, and that connection renegotiation can request
+// a client certificate to be sent.
+
+import "dart:async";
+import "dart:io";
+
+const HOST_NAME = "localhost";
+const CERTIFICATE = "localhost_cert";
+
+
+class ExpectException implements Exception {
+  ExpectException(this.message);
+  String toString() => message;
+  String message;
+}
+
+
+void expectEquals(expected, actual) {
+  if (actual != expected) {
+    throw new ExpectException('Expected $expected, found $actual');
+  }
+}
+
+
+void expect(condition) {
+  if (!condition) {
+    throw new ExpectException('');
+  }
+}
+
+
+void runClient(int port) {
+  SecureSocket.connect(HOST_NAME, port, sendClientCertificate: true)
+    .then((SecureSocket socket) {
+      X509Certificate certificate = socket.peerCertificate;
+      expect(certificate != null);
+      expectEquals('CN=localhost', certificate.subject);
+      expectEquals('CN=myauthority', certificate.issuer);
+      StreamIterator<String> input = new StreamIterator(socket
+          .transform(new StringDecoder())
+          .transform(new LineTransformer()));
+      socket.writeln('first');
+      input.moveNext()
+        .then((success) {
+          expect(success);
+          expectEquals('first reply', input.current);
+          socket.renegotiate();
+          socket.writeln('renegotiated');
+          return input.moveNext();
+        })
+        .then((success) {
+          expect(success);
+          expectEquals('server renegotiated', input.current);
+          X509Certificate certificate = socket.peerCertificate;
+          expect(certificate != null);
+          expectEquals("CN=localhost", certificate.subject);
+          expectEquals("CN=myauthority", certificate.issuer);
+          socket.writeln('second');
+          return input.moveNext();
+        })
+        .then((success) {
+          expect(success != true);
+          socket.close();
+        });
+    });
+}
+
+
+void main() {
+  final args = new Options().arguments;
+  SecureSocket.initialize(database: args[1], password: 'dartdart');
+  runClient(int.parse(args[0]));
+}
diff --git a/tests/standalone/io/secure_socket_renegotiate_test.dart b/tests/standalone/io/secure_socket_renegotiate_test.dart
new file mode 100644
index 0000000..49c1644
--- /dev/null
+++ b/tests/standalone/io/secure_socket_renegotiate_test.dart
@@ -0,0 +1,85 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test verifies that client certificates work, if the client and server
+// are in separate processes, and that connection renegotiation works, and
+// can request a client certificate to be sent.
+
+import "package:expect/expect.dart";
+import "package:pathos/path.dart" as path;
+import "dart:async";
+import "dart:io";
+
+const HOST_NAME = "localhost";
+const CERTIFICATE = "localhost_cert";
+
+
+String certificateDatabase() =>
+    path.join(path.dirname(new Options().script), 'pkcert', '');
+
+
+Future<SecureServerSocket> runServer() {
+  SecureSocket.initialize(database: certificateDatabase(),
+      password: 'dartdart');
+
+  return SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE)
+    .then((SecureServerSocket server) {
+      server.listen((SecureSocket socket) {
+        Expect.isNull(socket.peerCertificate);
+
+        StreamIterator<String> input =
+            new StreamIterator(socket.transform(new StringDecoder())
+                                     .transform(new LineTransformer()));
+        input.moveNext().then((success) {
+          Expect.isTrue(success);
+          Expect.equals('first', input.current);
+          socket.writeln('first reply');
+          return input.moveNext();
+        }).then((success) {
+          Expect.isTrue(success);
+          Expect.equals('renegotiated', input.current);
+          Expect.isNull(socket.peerCertificate);
+          socket.renegotiate(requestClientCertificate: true,
+                             requireClientCertificate: true,
+                             useSessionCache: false);
+          socket.writeln('server renegotiated');
+          return input.moveNext();
+        }).then((success) {
+          Expect.isTrue(success);
+          Expect.equals('second', input.current);
+          X509Certificate certificate = socket.peerCertificate;
+          Expect.isNotNull(certificate);
+          Expect.equals("CN=localhost", certificate.subject);
+          Expect.equals("CN=myauthority", certificate.issuer);
+          server.close();
+          socket.close();
+        });
+      });
+      return server;
+    });
+}
+
+
+void main() {
+  runServer()
+    .then((SecureServerSocket server) {
+      final options = new Options();
+      var clientScript =
+          options.script.replaceFirst("_test.dart", "_client.dart");
+      Expect.isTrue(clientScript.endsWith("_client.dart"));
+      Process.run(options.executable,
+                  [clientScript,
+                   server.port.toString(),
+                   certificateDatabase()])
+        .then((ProcessResult result) {
+          if (result.exitCode != 0) {
+            print("Client failed, stdout:");
+            print(result.stdout);
+            print("  stderr:");
+            print(result.stderr);
+            Expect.fail('Client subprocess exit code: ${result.exitCode}');
+          }
+        });
+    });
+}
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 69ed33a..cf1d4c3 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -130,7 +130,6 @@
 [ $compiler == dart2js && $checked ]
 io/http_read_test: Skip # Timeout TODO(ngeoffray): investigate
 io/list_input_stream_test: Skip # Timeout TODO(ngeoffray): investigate
-io/http_parser_test: Fail # dartbug.com/11273
 
 [ $compiler == dart2dart ]
 # Skip until we stabilize language tests.
diff --git a/tests/utils/dummy_compiler_test.dart b/tests/utils/dummy_compiler_test.dart
index 74df9b2..acc3501 100644
--- a/tests/utils/dummy_compiler_test.dart
+++ b/tests/utils/dummy_compiler_test.dart
@@ -78,7 +78,8 @@
 setDispatchProperty(o, v) {}""";
     } else if (uri.path.endsWith('js_helper.dart')) {
       source = 'library jshelper; class JSInvocationMirror {} '
-               'class ConstantMap {} class TypeImpl {}';
+               'class ConstantMap {} class TypeImpl {} '
+               'createRuntimeType(String name) => null;';
     } else if (uri.path.endsWith('isolate_helper.dart')) {
       source = 'library isolatehelper; class _WorkerStub {}';
     } else {
diff --git a/tools/VERSION b/tools/VERSION
index 4719d1d..a97e77c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 6
-BUILD 3
-PATCH 3
+BUILD 4
+PATCH 0
diff --git a/tools/bots/editor.py b/tools/bots/editor.py
index 6879b93..bb31143 100755
--- a/tools/bots/editor.py
+++ b/tools/bots/editor.py
@@ -84,6 +84,7 @@
   directory = directory % {'revision' : utils.GetSVNRevision()}
   uri = '%s/%s' % (GCS_EDITOR_BUCKET, directory)
   RunProcess([GSUTIL, 'cp', dart_editor_dmg, uri])
+  RunProcess([GSUTIL, 'setacl', 'public-read', uri])
 
 def CreateAndUploadMacInstaller(arch):
   dart_icns = os.path.join(
diff --git a/tools/coverage.dart b/tools/coverage.dart
index 4a3467b..cc12e94 100644
--- a/tools/coverage.dart
+++ b/tools/coverage.dart
@@ -35,7 +35,7 @@
   // the source position.
   static void recordBp(Debugger debugger, Map<String,dynamic> msg) {
     // Progress indicator.
-    if (++numBps % 100 == 0) print(numBps);
+    if (++numBps % 1000 == 0) print(numBps);
     var location = msg["params"]["location"];
     if (location == null) return;
     String url = location["url"];
@@ -317,6 +317,7 @@
   void openConnection(int portNumber) {
     Socket.connect("127.0.0.1", portNumber).then((s) {
       socket = s;
+      socket.setOption(SocketOption.TCP_NODELAY, true);
       var stringStream = socket.transform(new StringDecoder());
       stringStream.listen(
           (str) {
diff --git a/tools/ddbg.dart b/tools/ddbg.dart
index 3b9dbbe..f1079e0 100644
--- a/tools/ddbg.dart
+++ b/tools/ddbg.dart
@@ -574,6 +574,7 @@
   outstandingCommands = new Map<int, Completer>();
   Socket.connect("127.0.0.1", 5858).then((s) {
     vmSock = s;
+    vmSock.setOption(SocketOption.TCP_NODELAY, true);
     var stringStream = vmSock.transform(new StringDecoder());
     vmSubscription = stringStream.listen(
         (String data) {
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index 5c8279d..b2fd1ba 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -378,7 +378,18 @@
         " * [Introducing WebSockets](http://www.html5rocks.com/en/tutorials/websockets/basics/),",
         " * an HTML5Rocks.com tutorial.",
         " */"
-      ]
+      ],
+      "members": {
+        "send": [
+          "/**",
+          "   * Transmit data to the server over this connection.",
+          "   *",
+          "   * This method accepts data of type [Blob], [ByteBuffer], [String], or",
+          "   * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],",
+          "   * or [sendTypedData], in constrast, only accept data of the specified type.",
+          "   */"
+        ]
+      }
     },
     "XMLHttpRequest": {
       "members": {
diff --git a/tools/dom/dom.json b/tools/dom/dom.json
index fb3f638..e70a639 100644
--- a/tools/dom/dom.json
+++ b/tools/dom/dom.json
@@ -11478,7 +11478,7 @@
       "sendBlob": {},
       "sendByteBuffer": {},
       "sendString": {},
-      "sendTypeData": {},
+      "sendTypedData": {},
       "url": {}
     },
     "support_level": "stable"
diff --git a/tools/dom/scripts/chromegenerator.py b/tools/dom/scripts/chromegenerator.py
index af6ef3a..1d7e359 100755
--- a/tools/dom/scripts/chromegenerator.py
+++ b/tools/dom/scripts/chromegenerator.py
@@ -10,11 +10,11 @@
 
 # The path to the JSON Schema Compiler, which can be run to generate the files.
 # Lives in the Chromium repository, so needs to be pulled in somehow.
-COMPILER = "../../../third_party/chrome_api_tools/compiler.py"
+COMPILER = "../../../third_party/chrome/tools/json_schema_compiler/compiler.py"
 
 # The path to the Chrome IDL files. They live in the Chromium repository, so
 # need to be pulled in somehow.
-API_DIR = "../../../third_party/chrome_api/"
+API_DIR = "../../../third_party/chrome/idl/"
 
 # The path to the custom overrides directory, containing override files.
 OVERRIDES_DIR = "../src/chrome/custom_dart/"
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 4a6c53e..2f09e5a 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -113,6 +113,8 @@
 
     'MutationObserver': 'MutationObserver,WebKitMutationObserver',
 
+    'NamedNodeMap': 'NamedNodeMap,MozNamedAttrMap',
+
     'NodeList': 'NodeList,RadioNodeList',
 
     'OscillatorNode': 'OscillatorNode,Oscillator',
@@ -547,6 +549,10 @@
     'any set MessagePort.postMessage': _serialize_SSV,
     'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV,
 
+    '* get CustomEvent.detail':
+      Conversion('convertNativeToDart_SerializedScriptValue',
+                 'dynamic', 'dynamic'),
+
     # receiving message via MessageEvent
     '* get MessageEvent.data':
       Conversion('convertNativeToDart_SerializedScriptValue',
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 8b2ec85..ff438d4 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -125,6 +125,7 @@
 
 convert_to_future_members = monitored.Set(
     'htmlrenamer.converted_to_future_members', [
+  'AudioContext.decodeAudioData',
   'DataTransferItem.getAsString',
   'DirectoryEntry.getDirectory',
   'DirectoryEntry.getFile',
@@ -360,6 +361,8 @@
       'DOMString repetitionType)': 'createPatternFromImage',
   'DataTransferItemList.add(File file)': 'addFile',
   'DataTransferItemList.add(DOMString data, DOMString type)': 'addData',
+  'FormData.append(DOMString name, Blob value, DOMString filename)':
+      'appendBlob',
   'IDBDatabase.transaction(DOMStringList storeNames, DOMString mode)':
       'transactionStores',
   'IDBDatabase.transaction(sequence<DOMString> storeNames, DOMString mode)':
@@ -406,6 +409,10 @@
       'long long offset, ArrayBuffer data)': 'bufferSubByteData',
   'WebGLRenderingContext.bufferSubData(unsigned long target, '
       'long long offset, ArrayBufferView data)': 'bufferSubDataTyped',
+  'WebSocket.send(ArrayBuffer data)': 'sendByteBuffer',
+  'WebSocket.send(ArrayBufferView data)': 'sendTypedData',
+  'WebSocket.send(DOMString data)': 'sendString',
+  'WebSocket.send(Blob data)': 'sendBlob'
 })
 
 # Members that have multiple definitions, but their types are identical (only
@@ -416,13 +423,12 @@
   'CanvasRenderingContext2D.putImageData',
   'CanvasRenderingContext2D.webkitPutImageDataHD',
   'DataTransferItemList.add',
-  'FormData.append', # TODO(efortuna): Split out into appendBlob.
   'HTMLInputElement.setRangeText',
   'HTMLTextAreaElement.setRangeText',
   'IDBDatabase.transaction',
   'RTCDataChannel.send',
   'URL.createObjectURL',
-  'WebSocket.send', # TODO(efortuna): Add sendBlob, sendString, and family.
+  'WebSocket.send',
   'XMLHttpRequest.send'
 ])
 
diff --git a/tools/dom/scripts/idlsync.py b/tools/dom/scripts/idlsync.py
index e2a7753..66f15a1 100755
--- a/tools/dom/scripts/idlsync.py
+++ b/tools/dom/scripts/idlsync.py
@@ -49,13 +49,13 @@
 CHROME_URL_PATTERN = r'"chromium_url": "(\S+)",'
 CHROME_REV_PATTERN = r'"chromium_revision": "(\d+)",'
 CHROME_IDL_SUBPATH = 'trunk/src/chrome/common/extensions/api'
-CHROME_TOOLS_SUBPATH = 'trunk/src/tools'
+CHROME_COMMENT_EATER_SUBPATH = 'trunk/src/tools/json_comment_eater'
 CHROME_COMPILER_SUBPATH = 'trunk/src/tools/json_schema_compiler'
 CHROME_IDL_PARSER_SUBPATH = 'trunk/src/ppapi/generators'
 CHROME_PLY_SUBPATH = 'trunk/src/third_party/ply'
 LOCAL_CHROME_IDL_PATH = os.path.join(DART_PATH, 'third_party', 'chrome', 'idl')
-LOCAL_CHROME_TOOLS_PATH = os.path.join(DART_PATH, 'third_party', 'chrome',
-                                       'tools')
+LOCAL_CHROME_COMMENT_EATER_PATH = os.path.join(
+      DART_PATH, 'third_party', 'chrome', 'tools', 'json_comment_eater')
 LOCAL_CHROME_COMPILER_PATH = os.path.join(DART_PATH, 'third_party', 'chrome',
                                           'tools', 'json_schema_compiler')
 LOCAL_CHROME_IDL_PARSER_PATH = os.path.join(DART_PATH, 'third_party', 'chrome',
@@ -103,9 +103,8 @@
     # ply files.
     ('chrome', CHROME_PLY_SUBPATH, LOCAL_CHROME_PLY_PATH, LOCAL_CHROME_README,
      DEPTH_INFINITY),
-    # Top level Chrome tools folder. Contains json_comment_eater.py which is
-    # needed by the Chrome IDL compiler.
-    ('chrome', CHROME_TOOLS_SUBPATH, LOCAL_CHROME_TOOLS_PATH,
+    # Path for json_comment_eater, which is needed by the Chrome IDL compiler.
+    ('chrome', CHROME_COMMENT_EATER_SUBPATH, LOCAL_CHROME_COMMENT_EATER_PATH,
      LOCAL_CHROME_README, DEPTH_FILES),
     # Chrome IDL compiler files.
     ('chrome', CHROME_COMPILER_SUBPATH, LOCAL_CHROME_COMPILER_PATH,
@@ -113,12 +112,12 @@
     ]
 
 
-def RunCommand(cmd):
+def RunCommand(cmd, valid_exits=[0]):
   """Executes a shell command and return its stdout."""
   print ' '.join(cmd)
   pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
   output = pipe.communicate()
-  if pipe.returncode == 0:
+  if pipe.returncode in valid_exits:
     return output[0]
   else:
     print output[1]
@@ -184,16 +183,18 @@
 ZIP_ARCHIVE = 'version-control-dirs.zip'
 
 def SaveVersionControlDir(local_path):
-  RunCommand([
-    'sh', '-c',
-    'find %s -name .svn -or -name .git | zip -r %s -@' % (
-        os.path.relpath(local_path), ZIP_ARCHIVE)
-  ])
+  if os.path.exists(local_path):
+    RunCommand([
+      'sh', '-c',
+      'find %s -name .svn -or -name .git | zip -r %s -@' % (
+          os.path.relpath(local_path), ZIP_ARCHIVE)
+    ], [0, 12])  # It is ok if zip has nothing to do (exit code 12).
 
-
-def RestoreVersionControlDir():
-  RunCommand(['unzip', ZIP_ARCHIVE, '-d', '.'])
-  RunCommand(['rm', ZIP_ARCHIVE])
+def RestoreVersionControlDir(local_path):
+  archive_path = os.path.join(local_path, ZIP_ARCHIVE)
+  if os.path.exists(archive_path):
+    RunCommand(['unzip', ZIP_ARCHIVE, '-d', '.'])
+    RunCommand(['rm', ZIP_ARCHIVE])
 
 def ParseOptions():
   parser = optparse.OptionParser()
@@ -226,7 +227,7 @@
       RefreshFiles(url, revision, remote_path, local_path, depth)
       PruneExtraFiles(local_path)
       GenerateReadme(local_path, readme, url, revision)
-      RestoreVersionControlDir();
+      RestoreVersionControlDir(local_path);
 
 if __name__ == '__main__':
   main()
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index eae9aa2..89cc40e 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -15,7 +15,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev' hide Symbol;
+import 'dart:_collection-dev' hide Symbol, deprecated;
 import 'dart:html_common';
 import 'dart:indexed_db';
 import 'dart:isolate';
diff --git a/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate b/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
index c5fd5e2..3b8b7eef 100644
--- a/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:_js_helper' show Creates, Returns, JavaScriptIndexingBehavior, JSName;
diff --git a/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate b/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
index 772177a..af28eef 100644
--- a/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
@@ -6,7 +6,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:typed_data';
diff --git a/tools/dom/templates/html/dart2js/web_gl_dart2js.darttemplate b/tools/dom/templates/html/dart2js/web_gl_dart2js.darttemplate
index a4124e7..6383511 100644
--- a/tools/dom/templates/html/dart2js/web_gl_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/web_gl_dart2js.darttemplate
@@ -5,7 +5,7 @@
 library dart.dom.web_gl;
 
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:typed_data';
diff --git a/tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate b/tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate
index ba02215..105360e 100644
--- a/tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate
@@ -16,7 +16,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:_js_helper' show convertDartClosureToJS, Creates, JavaScriptIndexingBehavior, JSName;
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 54903e0..4116036 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -14,7 +14,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev' hide Symbol;
+import 'dart:_collection-dev' hide Symbol, deprecated;
 import 'dart:html_common';
 import 'dart:indexed_db';
 import 'dart:isolate';
diff --git a/tools/dom/templates/html/dartium/svg_dartium.darttemplate b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
index 863fc5f..66b9873 100644
--- a/tools/dom/templates/html/dartium/svg_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
@@ -5,7 +5,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
index 97b9424..d2457d0 100644
--- a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
@@ -5,7 +5,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate b/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
index ec1dcc9..f651502 100644
--- a/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_gl_dartium.darttemplate
@@ -5,7 +5,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
index b78b476..eb97322 100644
--- a/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_sql_dartium.darttemplate
@@ -16,7 +16,7 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:_collection-dev';
+import 'dart:_collection-dev' hide deprecated;
 import 'dart:html';
 import 'dart:html_common';
 import 'dart:nativewrappers';
diff --git a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
index be6b7ef..a5305e1 100644
--- a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
@@ -10,7 +10,11 @@
   factory $CLASSNAME(String type,
       {bool canBubble: true, bool cancelable: true, Object detail}) {
 
-    final CustomEvent e = document.$dom_createEvent("CustomEvent");
+    final CustomEvent e = document.$dom_createEvent('CustomEvent');
+
+$if DART2JS
+    detail = convertDartToNative_SerializedScriptValue(detail);
+$endif
     e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
 
     return e;
diff --git a/tools/list_pkg_directories.py b/tools/list_pkg_directories.py
index 6d01564..f1b69f1 100644
--- a/tools/list_pkg_directories.py
+++ b/tools/list_pkg_directories.py
@@ -4,20 +4,23 @@
 # BSD-style license that can be found in the LICENSE file.
 
 '''Tool for listing the directories under pkg, with their lib directories.
-Used in pkg.gyp. Lists all of the directories in the current directory
-which have a lib subdirectory.
+Used in pkg.gyp. Lists all of the directories in the directory passed in as an
+argument to this script which have a lib subdirectory.
 
 Usage:
-  python tools/list_pkg_directories.py
+  python tools/list_pkg_directories.py directory_to_list
 '''
 
 import os
 import sys
 
 def main(argv):
-  paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir(argv[1])))
-  for lib in filter(lambda x: os.path.exists(x), paths):
-    print lib
+  directory = argv[1]
+  paths = map(lambda x: x + '/lib', filter(lambda x: os.path.isdir(
+      os.path.join(directory, x)), os.listdir(directory)))
+  for lib in filter(lambda x: os.path.exists(os.path.join(directory, x)),
+      paths):
+    print '%s/%s' % (directory, lib)
 
 if __name__ == '__main__':
   sys.exit(main(sys.argv))