Version 0.8.10.8

svn merge -c 29890 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29963 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29968 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29975 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29979 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29982 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29987 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29991 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29993 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29996 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29997 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 29999 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30000 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30002 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30004 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30008 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30011 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30013 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30014 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30021 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30031 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 30034 https://dart.googlecode.com/svn/branches/bleeding_edge trunk

R=kasperl@google.com

Review URL: https://codereview.chromium.org//64033002

git-svn-id: http://dart.googlecode.com/svn/trunk@30039 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 49eec4b..84c562e 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -453,6 +453,7 @@
   // require allocation.
   __ EnterStubFrame();
   if (preserve_result) {
+    __ pushq(Immediate(0));  // Workaround for dropped stack slot during GC.
     __ pushq(RBX);  // Preserve result, it will be GC-d here.
   }
   __ pushq(Immediate(Smi::RawValue(0)));  // Space for the result.
@@ -463,6 +464,7 @@
   __ SmiUntag(RBX);
   if (preserve_result) {
     __ popq(RAX);  // Restore result.
+    __ Drop(1);  // Workaround for dropped stack slot during GC.
   }
   __ LeaveFrame();
 
@@ -1820,7 +1822,7 @@
 //  RBX, R10: May contain arguments to runtime stub.
 //  TOS(0): return address (Dart code).
 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
-  __ EnterStubFrame();
+  __ EnterStubFrameWithPP();
   // Preserve runtime args.
   __ pushq(RBX);
   __ pushq(R10);
@@ -1832,7 +1834,7 @@
   __ popq(RAX);  // Address of original.
   __ popq(R10);  // Restore arguments.
   __ popq(RBX);
-  __ LeaveFrame();
+  __ LeaveFrameWithPP();
   __ jmp(RAX);   // Jump to original stub.
 }
 
@@ -1861,11 +1863,11 @@
 
 //  TOS(0): return address (Dart code).
 void StubCode::GenerateBreakpointReturnStub(Assembler* assembler) {
-  __ EnterStubFrame();
+  __ EnterStubFrameWithPP();
   __ pushq(RAX);
   __ CallRuntime(kBreakpointReturnHandlerRuntimeEntry, 0);
   __ popq(RAX);
-  __ LeaveFrame();
+  __ LeaveFrameWithPP();
 
   __ popq(R11);  // discard return address of call to this stub.
   __ LeaveFrameWithPP();
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 1d7ecf8..d530651 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -932,7 +932,8 @@
 
 abstract class MixinApplicationElement extends ClassElement {
   ClassElement get mixin;
-  void set mixin(ClassElement value);
+  InterfaceType get mixinType;
+  void set mixinType(InterfaceType value);
   void addConstructor(FunctionElement constructor);
 }
 
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index b10064e..0b6c4c2 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -2172,12 +2172,14 @@
 
   Link<FunctionElement> constructors = new Link<FunctionElement>();
 
-  ClassElement mixin;
+  InterfaceType mixinType;
 
   MixinApplicationElementX(String name, Element enclosing, int id,
                            this.node, this.modifiers)
       : super(name, enclosing, id, STATE_NOT_STARTED);
 
+  ClassElement get mixin => mixinType != null ? mixinType.element : null;
+
   bool get isMixinApplication => true;
   bool get isUnnamedMixinApplication => node is! NamedMixinApplication;
   bool get hasConstructor => !constructors.isEmpty;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
index 987b996..86ef658 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
@@ -293,6 +293,8 @@
 
   String get simpleName => _element.name;
 
+  bool get isNameSynthetic => false;
+
   /**
    * Computes the first token for this declaration using the begin token of the
    * element node or element position as indicator.
@@ -537,13 +539,7 @@
    */
   String get simpleName {
     if (_library.libraryTag != null) {
-      // TODO(ahe): Remove StringNode check when old syntax is removed.
-      StringNode name = _library.libraryTag.name.asStringNode();
-      if (name != null) {
-        return name.dartString.slowToString();
-      } else {
-        return _library.libraryTag.name.toString();
-      }
+      return _library.libraryTag.name.toString();
     } else {
       // Use the file name as script name.
       String path = _library.canonicalUri.path;
@@ -847,6 +843,23 @@
     return null;
   }
 
+  ClassMirror get mixin {
+    if (_class.isMixinApplication) {
+      MixinApplicationElement mixinApplication = _class;
+      return new Dart2JsInterfaceTypeMirror(mirrors,
+                                            mixinApplication.mixinType);
+    }
+    return this;
+  }
+
+  bool get isNameSynthetic {
+    if (_class.isMixinApplication) {
+      MixinApplicationElement mixinApplication = _class;
+      return mixinApplication.isUnnamedMixinApplication;
+    }
+    return false;
+  }
+
   List<ClassMirror> get superinterfaces {
     var list = <ClassMirror>[];
     Link<DartType> link = _class.interfaces;
@@ -958,6 +971,10 @@
 
   List<ClassMirror> get superinterfaces => const <ClassMirror>[];
 
+  // TODO(johnniwinther): Refactor [TypedefMirror] to not extend [ClassMirror]
+  // and remove this.
+  ClassMirror get mixin => this;
+
   bool get isClass => false;
 
   bool get isOriginalDeclaration => true;
@@ -1077,6 +1094,8 @@
 
   InterfaceType get _interfaceType => _type;
 
+  bool get isNameSynthetic => originalDeclaration.isNameSynthetic;
+
   String get qualifiedName => originalDeclaration.qualifiedName;
 
   // TODO(johnniwinther): Substitute type arguments for type variables.
@@ -1096,6 +1115,14 @@
   // TODO(johnniwinther): Substitute type arguments for type variables.
   List<ClassMirror> get superinterfaces => originalDeclaration.superinterfaces;
 
+  // TODO(johnniwinther): Substitute type arguments for type variables.
+  ClassMirror get mixin {
+    if (originalDeclaration.mixin == originalDeclaration) {
+      return this;
+    }
+    return originalDeclaration.mixin;
+  }
+
   bool get isClass => originalDeclaration.isClass;
 
   bool get isAbstract => originalDeclaration.isAbstract;
@@ -1170,7 +1197,7 @@
   List<ParameterMirror> _parameters;
 
   Dart2JsFunctionTypeMirror(Dart2JsMirrorSystem system,
-                             FunctionType functionType, this._functionSignature)
+                            FunctionType functionType, this._functionSignature)
       : super(system, functionType) {
     assert (_functionSignature != null);
   }
@@ -1209,6 +1236,8 @@
   // TODO(johnniwinther): Substitute type arguments for type variables.
   List<ClassMirror> get superinterfaces => originalDeclaration.superinterfaces;
 
+  ClassMirror get mixin => this;
+
   bool get isClass => originalDeclaration.isClass;
 
   bool get isPrivate => originalDeclaration.isPrivate;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
index 7347573..8e83643 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
@@ -64,6 +64,10 @@
    */
   String get simpleName;
 
+  /// Returns `true` if the name of this declaration is generated by the
+  /// provider of the mirror system.
+  bool get isNameSynthetic;
+
   /**
    * Returns the name of this entity qualified by is enclosing context. For
    * instance, the qualified name of a method 'method' in class 'Class' in
@@ -107,7 +111,7 @@
   /**
    * Looks up [name] in the scope of this declaration.
    *
-   * [name] may be either a single identifier, like 'foo', or of the 
+   * [name] may be either a single identifier, like 'foo', or of the
    * a prefixed identifier, like 'foo.bar', where 'foo' must be a prefix.
    * For methods and constructors, the scope includes the parameters. For
    * classes and typedefs, the scope includes the type variables.
@@ -368,6 +372,13 @@
   List<ClassMirror> get superinterfaces;
 
   /**
+   * The mixin of this class. If this class is the result of a mixin application
+   * of the form S with M, returns a class mirror on M. Otherwise return the
+   * class mirror itself.
+   */
+  ClassMirror get mixin;
+
+  /**
    * Is [:true:] iff this type is a class.
    */
   bool get isClass;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
index 81fcc90..4336d05 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
@@ -172,6 +172,83 @@
   }
 }
 
+bool isMixinApplication(Mirror mirror) {
+  return mirror is ClassMirror && mirror.mixin != mirror;
+}
+
+/**
+ * Returns the superclass of [cls] skipping unnamed mixin applications.
+ *
+ * For instance, for all of the following definitions this method returns [:B:].
+ *
+ *     class A extends B {}
+ *     class A extends B with C1, C2 {}
+ *     class A extends B implements D1, D2 {}
+ *     class A extends B with C1, C2 implements D1, D2 {}
+ *     class A = B with C1, C2;
+ *     abstract class A = B with C1, C2 implements D1, D2;
+ */
+ClassMirror getSuperclass(ClassMirror cls) {
+  ClassMirror superclass = cls.superclass;
+  while (isMixinApplication(superclass) && superclass.isNameSynthetic) {
+    superclass = superclass.superclass;
+  }
+  return superclass;
+}
+
+/**
+ * Returns the mixins directly applied to [cls].
+ *
+ * For instance, for all of the following definitions this method returns
+ * [:C1, C2:].
+ *
+ *     class A extends B with C1, C2 {}
+ *     class A extends B with C1, C2 implements D1, D2 {}
+ *     class A = B with C1, C2;
+ *     abstract class A = B with C1, C2 implements D1, D2;
+ */
+Iterable<ClassMirror> getAppliedMixins(ClassMirror cls) {
+  List<ClassMirror> mixins = <ClassMirror>[];
+  ClassMirror superclass = cls.superclass;
+  while (isMixinApplication(superclass) && superclass.isNameSynthetic) {
+    mixins.add(superclass.mixin);
+    superclass = superclass.superclass;
+  }
+  if (mixins.length > 1) {
+    mixins = new List<ClassMirror>.from(mixins.reversed);
+  }
+  if (isMixinApplication(cls)) {
+    mixins.add(cls.mixin);
+  }
+  return mixins;
+}
+
+/**
+ * Returns the superinterfaces directly and explicitly implemented by [cls].
+ *
+ * For instance, for all of the following definitions this method returns
+ * [:D1, D2:].
+ *
+ *     class A extends B implements D1, D2 {}
+ *     class A extends B with C1, C2 implements D1, D2 {}
+ *     abstract class A = B with C1, C2 implements D1, D2;
+ */
+Iterable<ClassMirror> getExplicitInterfaces(ClassMirror cls) {
+  if (isMixinApplication(cls)) {
+    bool first = true;
+    ClassMirror mixin = cls.mixin;
+    bool filter(ClassMirror superinterface) {
+      if (first && superinterface == mixin) {
+        first = false;
+        return false;
+      }
+      return true;
+    }
+    return cls.superinterfaces.where(filter);
+  }
+  return cls.superinterfaces;
+}
+
 final RegExp _singleLineCommentStart = new RegExp(r'^///? ?(.*)');
 final RegExp _multiLineCommentStartEnd =
     new RegExp(r'^/\*\*? ?([\s\S]*)\*/$', multiLine: true);
@@ -220,12 +297,12 @@
  * Looks up [name] in the scope [declaration].
  *
  * If [name] is of the form 'a.b.c', 'a' is looked up in the scope of
- * [declaration] and if unresolved 'a.b' is looked in the scope of 
+ * [declaration] and if unresolved 'a.b' is looked in the scope of
  * [declaration]. Each identifier of the remaining suffix, 'c' or 'b.c', is
  * then looked up in the local scope of the previous result.
- * 
+ *
  * For instance, assumming that [:Iterable:] is imported into the scope of
- * [declaration] via the prefix 'col', 'col.Iterable.E' finds the type 
+ * [declaration] via the prefix 'col', 'col.Iterable.E' finds the type
  * variable of [:Iterable:] and 'col.Iterable.contains.element' finds the
  * [:element:] parameter of the [:contains:] method on [:Iterable:].
  */
@@ -233,7 +310,7 @@
                                          String name) {
   // TODO(11653): Support lookup of constructors using the [:new Foo:]
   // syntax.
-  int offset = 1; 
+  int offset = 1;
   List<String> parts = name.split('.');
   DeclarationMirror result = declaration.lookupInScope(parts[0]);
   if (result == null && parts.length > 1) {
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 40703cf..699f026 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -3949,10 +3949,8 @@
       return;
     }
 
-    assert(mixinApplication.mixin == null);
-    Element mixin = resolveMixinFor(mixinApplication, mixinType);
-
-    mixinApplication.mixin = mixin;
+    assert(mixinApplication.mixinType == null);
+    mixinApplication.mixinType = resolveMixinFor(mixinApplication, mixinType);
 
     // Create forwarding constructors for constructor defined in the superclass
     // because they are now hidden by the mixin application.
@@ -3966,8 +3964,8 @@
     calculateAllSupertypes(mixinApplication);
   }
 
-  ClassElement resolveMixinFor(MixinApplicationElement mixinApplication,
-                               DartType mixinType) {
+  InterfaceType resolveMixinFor(MixinApplicationElement mixinApplication,
+                                DartType mixinType) {
     ClassElement mixin = mixinType.element;
     mixin.ensureResolved(compiler);
 
@@ -3989,7 +3987,7 @@
       current = currentMixinApplication.mixin;
     }
     compiler.world.registerMixinUse(mixinApplication, mixin);
-    return mixin;
+    return mixinType;
   }
 
   DartType resolveType(TypeAnnotation node) {
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index 33e2c46..b0536bd 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -1186,12 +1186,13 @@
     subtypes.sort((x, y) => x.simpleName.compareTo(y.simpleName));
 
     // Show the chain of superclasses.
-    if (!type.superclass.isObject) {
+    var superclass = getSuperclass(type);
+    if (!superclass.isObject) {
       final supertypes = [];
-      var thisType = type.superclass;
+      var thisType = superclass;
       do {
         supertypes.add(thisType);
-        thisType = thisType.superclass;
+        thisType = getSuperclass(thisType);
       } while (!thisType.isObject);
 
       writeln('<h3>Extends</h3>');
@@ -1207,7 +1208,8 @@
     }
 
     listTypes(subtypes, 'Subclasses');
-    listTypes(type.superinterfaces, 'Implements');
+    listTypes(getAppliedMixins(type), 'Mixins');
+    listTypes(getExplicitInterfaces(type), 'Implements');
   }
 
   /**
@@ -1572,9 +1574,7 @@
     writeln('</h4>');
 
     if (inherited) {
-      write('<div class="inherited-from">inherited from ');
-      annotateType(host, member.owner);
-      write('</div>');
+      docInherited(host, member.owner);
     }
 
     writeln('<div class="doc">');
@@ -1589,6 +1589,21 @@
     _currentMember = null;
   }
 
+  /**
+   * Annotate a member as inherited or mixed in from [owner].
+   */
+  void docInherited(ContainerMirror host, ClassMirror owner) {
+    if (isMixinApplication(owner)) {
+      write('<div class="inherited-from">mixed in from ');
+      annotateType(host, owner.mixin);
+      write('</div>');
+    } else {
+      write('<div class="inherited-from">inherited from ');
+      annotateType(host, owner);
+      write('</div>');
+    }
+  }
+
   void docField(ContainerMirror host, VariableMirror field,
                 {bool asGetter: false, bool asSetter: false}) {
     if (asGetter) {
@@ -1654,9 +1669,7 @@
         ''');
 
     if (inherited) {
-      write('<div class="inherited-from">inherited from ');
-      annotateType(host, getter.owner);
-      write('</div>');
+      docInherited(host, getter.owner);
     }
 
     DocComment comment = getMemberComment(getter);
@@ -1779,6 +1792,9 @@
       }
     }
     if (comment == null) return null;
+    if (isMixinApplication(inheritedFrom)) {
+      inheritedFrom = inheritedFrom.mixin;
+    }
     return new DocComment(comment, inheritedFrom, dartdocSyntaxes,
         dartdocResolver);
   }
diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart
index 802563e..79bbdb6 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -204,6 +204,8 @@
 
   String get _prettyName => 'TypeVariableMirror';
 
+  bool get isTopLevel => false;
+
   TypeMirror get upperBound {
     if (_cachedUpperBound != null) return _cachedUpperBound;
     return _cachedUpperBound = typeMirrorFromRuntimeTypeRepresentation(
@@ -555,6 +557,16 @@
   return result;
 }
 
+Map<Symbol, MethodMirror> filterConstructors(methods) {
+  var result = new Map();
+  for (JsMethodMirror method in methods) {
+    if (method.isConstructor) {
+      result[method.simpleName] = method;
+    }
+  }
+  return result;
+}
+
 Map<Symbol, MethodMirror> filterGetters(List<MethodMirror> methods,
                                         Map<Symbol, VariableMirror> fields) {
   var result = new Map();
@@ -571,7 +583,7 @@
 }
 
 Map<Symbol, MethodMirror> filterSetters(List<MethodMirror> methods,
-                                          Map<Symbol, VariableMirror> fields) {
+                                        Map<Symbol, VariableMirror> fields) {
   var result = new Map();
   for (JsMethodMirror method in methods) {
     if (method.isSetter) {
@@ -587,6 +599,24 @@
   return result;
 }
 
+Map<Symbol, Mirror> filterMembers(List<MethodMirror> methods,
+                                  Map<Symbol, VariableMirror> variables) {
+  Map<Symbol, Mirror> result = new Map.from(variables);
+  for (JsMethodMirror method in methods) {
+    if (method.isSetter) {
+      String name = n(method.simpleName);
+      name = name.substring(0, name.length - 1);
+      // Filter-out setters corresponding to variables.
+      if (result[s(name)] is VariableMirror) continue;
+    }
+    // Constructors aren't 'members'.
+    if (method.isConstructor) continue;
+    // Use putIfAbsent to filter-out getters corresponding to variables.
+    result.putIfAbsent(method.simpleName, () => method);
+  }
+  return result;
+}
+
 int counter = 0;
 
 ClassMirror reflectMixinApplication(mixinNames, String mangledName) {
@@ -861,6 +891,9 @@
   String _typeArguments;
 
   UnmodifiableListView<TypeMirror> _cachedTypeArguments;
+  UnmodifiableMapView<Symbol, DeclarationMirror> _cachedDeclarations;
+  UnmodifiableMapView<Symbol, DeclarationMirror> _cachedMembers;
+  UnmodifiableMapView<Symbol, MethodMirror> _cachedConstructors;
   Map<Symbol, VariableMirror> _cachedVariables;
   Map<Symbol, MethodMirror> _cachedGetters;
   Map<Symbol, MethodMirror> _cachedSetters;
@@ -927,8 +960,6 @@
     return _cachedTypeArguments = new UnmodifiableListView(result);
   }
 
-  Map<Symbol, MethodMirror> get constructors => _class.constructors;
-
   List<JsMethodMirror> get _methods {
     if (_cachedMethods != null) return _cachedMethods;
     return _cachedMethods =_class._getMethodsWithOwner(this);
@@ -940,6 +971,13 @@
         filterMethods(_methods));
   }
 
+  Map<Symbol, MethodMirror> get constructors {
+    if (_cachedConstructors != null) return _cachedConstructors;
+    return _cachedConstructors =
+        new UnmodifiableMapView<Symbol, MethodMirror>(
+            filterConstructors(_methods));
+  }
+
   Map<Symbol, MethodMirror> get getters {
     if (_cachedGetters != null) return _cachedGetters;
     return _cachedGetters = new UnmodifiableMapView<Symbol, MethodMirror>(
@@ -962,7 +1000,22 @@
         new UnmodifiableMapView<Symbol, VariableMirror>(result);
   }
 
-  Map<Symbol, Mirror> get members => _class.members;
+  Map<Symbol, DeclarationMirror> get members {
+    if (_cachedMembers != null) return _cachedMembers;
+    return _cachedMembers = new UnmodifiableMapView<Symbol, DeclarationMirror>(
+        filterMembers(_methods, variables));
+  }
+
+  Map<Symbol, DeclarationMirror> get declarations {
+    if (_cachedDeclarations != null) return _cachedDeclarations;
+    Map<Symbol, DeclarationMirror> result =
+        new Map<Symbol, DeclarationMirror>();
+    result.addAll(members);
+    result.addAll(constructors);
+    typeVariables.forEach((tv) => result[tv.simpleName] = tv);
+    return _cachedDeclarations =
+        new UnmodifiableMapView<Symbol, DeclarationMirror>(result);
+  }
 
   InstanceMirror setField(Symbol fieldName, Object arg) {
     return _class.setField(fieldName, arg);
@@ -1068,14 +1121,9 @@
 
   Map<Symbol, MethodMirror> get constructors {
     if (_cachedConstructors != null) return _cachedConstructors;
-    var result = new Map();
-    for (JsMethodMirror method in _methods) {
-      if (method.isConstructor) {
-        result[method.simpleName] = method;
-      }
-    }
     return _cachedConstructors =
-        new UnmodifiableMapView<Symbol, MethodMirror>(result);
+        new UnmodifiableMapView<Symbol, MethodMirror>(
+            filterConstructors(_methods));
   }
 
   List<JsMethodMirror> _getMethodsWithOwner(DeclarationMirror methodOwner) {
@@ -1189,20 +1237,8 @@
 
   Map<Symbol, Mirror> get members {
     if (_cachedMembers != null) return _cachedMembers;
-    Map<Symbol, Mirror> result = new Map.from(variables);
-    for (JsMethodMirror method in _methods) {
-      if (method.isSetter) {
-        String name = n(method.simpleName);
-        name = name.substring(0, name.length - 1);
-        // Filter-out setters corresponding to variables.
-        if (result[s(name)] is VariableMirror) continue;
-      }
-      // Constructors aren't 'members'.
-      if (method.isConstructor) continue;
-      // Use putIfAbsent to filter-out getters corresponding to variables.
-      result.putIfAbsent(method.simpleName, () => method);
-    }
-    return _cachedMembers = new UnmodifiableMapView<Symbol, Mirror>(result);
+    return _cachedMembers = new UnmodifiableMapView<Symbol, Mirror>(
+        filterMembers(_methods, variables));
   }
 
   Map<Symbol, DeclarationMirror> get declarations {
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index a6c6720..8e480f8 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -5,10 +5,10 @@
 part of dart.convert;
 
 /** The Unicode Replacement character `U+FFFD` (�). */
-const UNICODE_REPLACEMENT_CHARACTER_RUNE = 0xFFFD;
+const int UNICODE_REPLACEMENT_CHARACTER_RUNE = 0xFFFD;
 
 /** The Unicode Byte Order Marker (BOM) character `U+FEFF`. */
-const UNICODE_BOM_CHARACTER_RUNE = 0xFEFF;
+const int UNICODE_BOM_CHARACTER_RUNE = 0xFEFF;
 
 /**
  * An instance of the default implementation of the [Utf8Codec].
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 3f455e92..32db241 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -14448,6 +14448,22 @@
   @DocsEditable()
   final String statusText;
 
+  /**
+   * Length of time before a request is automatically terminated.
+   *
+   * When the time has passed, a [TimeoutEvent] is dispatched.
+   *
+   * If [timeout] is set to 0, then the request will not time out.
+   *
+   * ## Other resources
+   *
+   * * [XMLHttpRequest.timeout]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#timeout)
+   * from MDN.
+   * * [The timeout attribute]
+   * (http://www.w3.org/TR/XMLHttpRequest/#the-timeout-attribute)
+   * from W3C.
+   */
   @DomName('XMLHttpRequest.timeout')
   @DocsEditable()
   @Experimental() // untriaged
@@ -14550,15 +14566,34 @@
    * `send` method is intended only for more complext HTTP requests where
    * finer-grained control is needed.
    *
-   * See also:
+   * ## Other resources
    *
-   *   * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
+   * * [XMLHttpRequest.send]
+   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
    * from MDN.
    */
   @DomName('XMLHttpRequest.send')
   @DocsEditable()
   void send([data]) native;
 
+  /**
+   * Sets the value of an HTTP requst header.
+   *
+   * This method should be called after the request is opened, but before
+   * the request is sent.
+   *
+   * Multiple calls with the same header will combine all their values into a
+   * single header.
+   *
+   * ## Other resources
+   *
+   * * [XMLHttpRequest.setRequestHeader]
+   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
+   * from MDN.
+   * * [The setRequestHeader() method]
+   * (http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method) from
+   * W3C.
+   */
   @DomName('XMLHttpRequest.setRequestHeader')
   @DocsEditable()
   void setRequestHeader(String header, String value) native;
@@ -19292,6 +19327,9 @@
   // Custom element created callback.
   Node._created() : super._created();
 
+  /**
+   * A modifiable list of this node's children.
+   */
   List<Node> get nodes {
     return new _ChildNodeListLazy(this);
   }
@@ -19418,16 +19456,43 @@
   @DocsEditable()
   final String _baseUri;
 
+  /**
+   * A list of this node's children.
+   *
+   * ## Other resources
+   *
+   * * [Node.childNodes]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.childNodes)
+   * from MDN.
+   */
   @DomName('Node.childNodes')
   @DocsEditable()
   @Returns('NodeList')
   @Creates('NodeList')
   final List<Node> childNodes;
 
+  /**
+   * The first child of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.firstChild]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.firstChild)
+   * from MDN.
+   */
   @DomName('Node.firstChild')
   @DocsEditable()
   final Node firstChild;
 
+  /**
+   * The last child of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.lastChild]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.lastChild)
+   * from MDN.
+   */
   @DomName('Node.lastChild')
   @DocsEditable()
   final Node lastChild;
@@ -19443,41 +19508,147 @@
   final String _namespaceUri;
 
   @JSName('nextSibling')
+  /**
+   * The next sibling node.
+   *
+   * ## Other resources
+   *
+   * * [Node.nextSibling]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nextSibling)
+   * from MDN.
+   */
   @DomName('Node.nextSibling')
   @DocsEditable()
   final Node nextNode;
 
+  /**
+   * The name of this node.
+   *
+   * This varies by this node's [nodeType].
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeName]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeName)
+   * from MDN. This page contains a table of [nodeName] values for each
+   * [nodeType].
+   */
   @DomName('Node.nodeName')
   @DocsEditable()
   final String nodeName;
 
+  /**
+   * The type of node.
+   *
+   * This value is one of:
+   *
+   * * [ATTRIBUTE_NODE] if this node is an attribute.
+   * * [CDATA_SECTION_NODE] if this node is a [CDataSection].
+   * * [COMMENT_NODE] if this node is a [Comment].
+   * * [DOCUMENT_FRAGMENT_NODE] if this node is a [DocumentFragment].
+   * * [DOCUMENT_NODE] if this node is a [Document].
+   * * [DOCUMENT_TYPE_NODE] if this node is a [DocumentType] node.
+   * * [ELEMENT_NODE] if this node is an [Element].
+   * * [ENTITY_NODE] if this node is an entity.
+   * * [ENTITY_REFERENCE_NODE] if this node is an entity reference.
+   * * [NOTATION_NODE] if this node is a notation.
+   * * [PROCESSING_INSTRUCTION_NODE] if this node is a [ProcessingInstruction].
+   * * [TEXT_NODE] if this node is a [Text] node.
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeType]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType) from MDN.
+   */
   @DomName('Node.nodeType')
   @DocsEditable()
   final int nodeType;
 
+  /**
+   * The value of this node.
+   *
+   * This varies by this type's [nodeType].
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeValue]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeValue)
+   * from MDN. This page contains a table of [nodeValue] values for each
+   * [nodeType].
+   */
   @DomName('Node.nodeValue')
   @DocsEditable()
   final String nodeValue;
 
+  /**
+   * The document this node belongs to.
+   *
+   * Returns `null` if this node does not belong to any document.
+   *
+   * ## Other resources
+   *
+   * * [Node.ownerDocument]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.ownerDocument) from
+   * MDN.
+   */
   @DomName('Node.ownerDocument')
   @DocsEditable()
   final Document ownerDocument;
 
   @JSName('parentElement')
+  /**
+   * The parent element of this node.
+   *
+   * Returns `null` if this node either does not have a parent or its parent is
+   * not an element.
+   *
+   * ## Other resources
+   *
+   * * [Node.parentElement]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentElement) from
+   * W3C.
+   */
   @DomName('Node.parentElement')
   @DocsEditable()
   final Element parent;
 
+  /**
+   * The parent node of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.parentNode]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentNode) from
+   * MDN.
+   */
   @DomName('Node.parentNode')
   @DocsEditable()
   final Node parentNode;
 
   @JSName('previousSibling')
+  /**
+   * The previous sibling node.
+   *
+   * ## Other resources
+   *
+   * * [Node.previousSibling]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.previousSibling)
+   * from MDN.
+   */
   @DomName('Node.previousSibling')
   @DocsEditable()
   final Node previousNode;
 
   @JSName('textContent')
+  /**
+   * All text within this node and its decendents.
+   *
+   * ## Other resources
+   *
+   * * [Node.textContent]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent) from
+   * MDN.
+   */
   @DomName('Node.textContent')
   @DocsEditable()
   String text;
@@ -19497,18 +19668,56 @@
   Node append(Node newChild) native;
 
   @JSName('cloneNode')
+  /**
+   * Returns a copy of this node.
+   *
+   * If [deep] is `true`, then all of this node's children and decendents are
+   * copied as well. If [deep] is `false`, then only this node is copied.
+   *
+   * ## Other resources
+   *
+   * * [Node.cloneNode]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.cloneNode) from
+   * MDN.
+   */
   @DomName('Node.cloneNode')
   @DocsEditable()
   Node clone(bool deep) native;
 
+  /**
+   * Returns true if this node contains the specified node.
+   *
+   * ## Other resources
+   *
+   * * [Node.contains]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.contains) from MDN.
+   */
   @DomName('Node.contains')
   @DocsEditable()
   bool contains(Node other) native;
 
+  /**
+   * Returns true if this node has any children.
+   *
+   * ## Other resources
+   *
+   * * [Node.hasChildNodes]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.hasChildNodes) from
+   * MDN.
+   */
   @DomName('Node.hasChildNodes')
   @DocsEditable()
   bool hasChildNodes() native;
 
+  /**
+   * Inserts all of the nodes into this node directly before refChild.
+   *
+   * ## Other resources
+   *
+   * * [Node.insertBefore]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.insertBefore) from
+   * MDN.
+   */
   @DomName('Node.insertBefore')
   @DocsEditable()
   Node insertBefore(Node newChild, Node refChild) native;
@@ -26315,12 +26524,14 @@
  * Top-level container for the current browser tab or window.
  *
  * In a web browser, each window has a [Window] object, but within the context
- * of a script, a [Window] object represents only the current window. In
- * addition to the open window, each window, tab, and iframe has its own
- * [Window] object. A [Window] contains a [Document] object, which contains this
- * web page's content.
+ * of a script, this object represents only the current window.
+ * Each other window, tab, and iframe has its own [Window] object.
  *
- * Use `window` to access properties of the current window. For example:
+ * Each window contains a [Document] object, which contains all of the window's
+ * content.
+ *
+ * Use the top-level `window` object to access the current window.
+ * For example:
  *
  *     // Draw a scene when the window repaints.
  *     drawScene(num delta) {...}
@@ -26330,8 +26541,12 @@
  *     window.console.log('Jinkies!');
  *     window.console.error('Jeepers!');
  *
- * **Note:** This class represents the current window, whereas [WindowBase] is
- * a representation of any window, including other tabs, windows, and frames.
+ * **Note:** This class represents only the current window, while [WindowBase]
+ * is a representation of any window, including other tabs, windows, and frames.
+ *
+ * ## See also
+ *
+ * * [WindowBase]
  *
  * ## Other resources
  *
@@ -29759,10 +29974,7 @@
 /**
  * An object that can be drawn to a 2D canvas rendering context.
  *
- * This object is either an [ImageElement], [VideoElement], or
- * [CanvasElement].
- *
- * The image drawn to the canvas differs by implementation:
+ * The image drawn to the canvas depends on the type of this object:
  *
  * * If this object is an [ImageElement], then this element's image is
  * drawn to the canvas. If this element is an animated image, then this
@@ -29804,13 +30016,17 @@
 /**
  * Top-level container for a browser tab or window.
  *
- * In a web browser, a [WindowBase] object represents any browser window.  This
- * abstract class contains the state of the window and its relation to other
- * windows, such as which window opened it.
+ * In a web browser, a [WindowBase] object represents any browser window. This
+ * object contains the window's state and its relation to other
+ * windows, such as which window opened this window.
  *
- * **Note:** This class represents any window, whereas [Window] is
+ * **Note:** This class represents any window, while [Window] is
  * used to access the properties and content of the current window or tab.
  *
+ * ## See also
+ *
+ * * [Window]
+ *
  * ## Other resources
  *
  * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 7cd038f..9c76577 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -14877,11 +14877,43 @@
   @DocsEditable()
   String get statusText native "XMLHttpRequest_statusText_Getter";
 
+  /**
+   * Length of time before a request is automatically terminated.
+   *
+   * When the time has passed, a [TimeoutEvent] is dispatched.
+   *
+   * If [timeout] is set to 0, then the request will not time out.
+   *
+   * ## Other resources
+   *
+   * * [XMLHttpRequest.timeout]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#timeout)
+   * from MDN.
+   * * [The timeout attribute]
+   * (http://www.w3.org/TR/XMLHttpRequest/#the-timeout-attribute)
+   * from W3C.
+   */
   @DomName('XMLHttpRequest.timeout')
   @DocsEditable()
   @Experimental() // untriaged
   int get timeout native "XMLHttpRequest_timeout_Getter";
 
+  /**
+   * Length of time before a request is automatically terminated.
+   *
+   * When the time has passed, a [TimeoutEvent] is dispatched.
+   *
+   * If [timeout] is set to 0, then the request will not time out.
+   *
+   * ## Other resources
+   *
+   * * [XMLHttpRequest.timeout]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#timeout)
+   * from MDN.
+   * * [The timeout attribute]
+   * (http://www.w3.org/TR/XMLHttpRequest/#the-timeout-attribute)
+   * from W3C.
+   */
   @DomName('XMLHttpRequest.timeout')
   @DocsEditable()
   @Experimental() // untriaged
@@ -14994,15 +15026,34 @@
    * `send` method is intended only for more complext HTTP requests where
    * finer-grained control is needed.
    *
-   * See also:
+   * ## Other resources
    *
-   *   * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
+   * * [XMLHttpRequest.send]
+   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
    * from MDN.
    */
   @DomName('XMLHttpRequest.send')
   @DocsEditable()
   void send([data]) native "XMLHttpRequest_send_Callback";
 
+  /**
+   * Sets the value of an HTTP requst header.
+   *
+   * This method should be called after the request is opened, but before
+   * the request is sent.
+   *
+   * Multiple calls with the same header will combine all their values into a
+   * single header.
+   *
+   * ## Other resources
+   *
+   * * [XMLHttpRequest.setRequestHeader]
+   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)
+   * from MDN.
+   * * [The setRequestHeader() method]
+   * (http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method) from
+   * W3C.
+   */
   @DomName('XMLHttpRequest.setRequestHeader')
   @DocsEditable()
   void setRequestHeader(String header, String value) native "XMLHttpRequest_setRequestHeader_Callback";
@@ -20421,6 +20472,9 @@
   // Custom element created callback.
   Node._created() : super._created();
 
+  /**
+   * A modifiable list of this node's children.
+   */
   List<Node> get nodes {
     return new _ChildNodeListLazy(this);
   }
@@ -20546,14 +20600,41 @@
   @DocsEditable()
   String get _baseUri native "Node_baseURI_Getter";
 
+  /**
+   * A list of this node's children.
+   *
+   * ## Other resources
+   *
+   * * [Node.childNodes]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.childNodes)
+   * from MDN.
+   */
   @DomName('Node.childNodes')
   @DocsEditable()
   List<Node> get childNodes native "Node_childNodes_Getter";
 
+  /**
+   * The first child of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.firstChild]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.firstChild)
+   * from MDN.
+   */
   @DomName('Node.firstChild')
   @DocsEditable()
   Node get firstChild native "Node_firstChild_Getter";
 
+  /**
+   * The last child of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.lastChild]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.lastChild)
+   * from MDN.
+   */
   @DomName('Node.lastChild')
   @DocsEditable()
   Node get lastChild native "Node_lastChild_Getter";
@@ -20566,42 +20647,157 @@
   @DocsEditable()
   String get _namespaceUri native "Node_namespaceURI_Getter";
 
+  /**
+   * The next sibling node.
+   *
+   * ## Other resources
+   *
+   * * [Node.nextSibling]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nextSibling)
+   * from MDN.
+   */
   @DomName('Node.nextSibling')
   @DocsEditable()
   Node get nextNode native "Node_nextSibling_Getter";
 
+  /**
+   * The name of this node.
+   *
+   * This varies by this node's [nodeType].
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeName]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeName)
+   * from MDN. This page contains a table of [nodeName] values for each
+   * [nodeType].
+   */
   @DomName('Node.nodeName')
   @DocsEditable()
   String get nodeName native "Node_nodeName_Getter";
 
+  /**
+   * The type of node.
+   *
+   * This value is one of:
+   *
+   * * [ATTRIBUTE_NODE] if this node is an attribute.
+   * * [CDATA_SECTION_NODE] if this node is a [CDataSection].
+   * * [COMMENT_NODE] if this node is a [Comment].
+   * * [DOCUMENT_FRAGMENT_NODE] if this node is a [DocumentFragment].
+   * * [DOCUMENT_NODE] if this node is a [Document].
+   * * [DOCUMENT_TYPE_NODE] if this node is a [DocumentType] node.
+   * * [ELEMENT_NODE] if this node is an [Element].
+   * * [ENTITY_NODE] if this node is an entity.
+   * * [ENTITY_REFERENCE_NODE] if this node is an entity reference.
+   * * [NOTATION_NODE] if this node is a notation.
+   * * [PROCESSING_INSTRUCTION_NODE] if this node is a [ProcessingInstruction].
+   * * [TEXT_NODE] if this node is a [Text] node.
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeType]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType) from MDN.
+   */
   @DomName('Node.nodeType')
   @DocsEditable()
   int get nodeType native "Node_nodeType_Getter";
 
+  /**
+   * The value of this node.
+   *
+   * This varies by this type's [nodeType].
+   *
+   * ## Other resources
+   *
+   * * [Node.nodeValue]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeValue)
+   * from MDN. This page contains a table of [nodeValue] values for each
+   * [nodeType].
+   */
   @DomName('Node.nodeValue')
   @DocsEditable()
   String get nodeValue native "Node_nodeValue_Getter";
 
+  /**
+   * The document this node belongs to.
+   *
+   * Returns `null` if this node does not belong to any document.
+   *
+   * ## Other resources
+   *
+   * * [Node.ownerDocument]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.ownerDocument) from
+   * MDN.
+   */
   @DomName('Node.ownerDocument')
   @DocsEditable()
   Document get ownerDocument native "Node_ownerDocument_Getter";
 
+  /**
+   * The parent element of this node.
+   *
+   * Returns `null` if this node either does not have a parent or its parent is
+   * not an element.
+   *
+   * ## Other resources
+   *
+   * * [Node.parentElement]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentElement) from
+   * W3C.
+   */
   @DomName('Node.parentElement')
   @DocsEditable()
   Element get parent native "Node_parentElement_Getter";
 
+  /**
+   * The parent node of this node.
+   *
+   * ## Other resources
+   *
+   * * [Node.parentNode]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentNode) from
+   * MDN.
+   */
   @DomName('Node.parentNode')
   @DocsEditable()
   Node get parentNode native "Node_parentNode_Getter";
 
+  /**
+   * The previous sibling node.
+   *
+   * ## Other resources
+   *
+   * * [Node.previousSibling]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.previousSibling)
+   * from MDN.
+   */
   @DomName('Node.previousSibling')
   @DocsEditable()
   Node get previousNode native "Node_previousSibling_Getter";
 
+  /**
+   * All text within this node and its decendents.
+   *
+   * ## Other resources
+   *
+   * * [Node.textContent]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent) from
+   * MDN.
+   */
   @DomName('Node.textContent')
   @DocsEditable()
   String get text native "Node_textContent_Getter";
 
+  /**
+   * All text within this node and its decendents.
+   *
+   * ## Other resources
+   *
+   * * [Node.textContent]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent) from
+   * MDN.
+   */
   @DomName('Node.textContent')
   @DocsEditable()
   void set text(String value) native "Node_textContent_Setter";
@@ -20619,18 +20815,56 @@
   @DocsEditable()
   Node append(Node newChild) native "Node_appendChild_Callback";
 
+  /**
+   * Returns a copy of this node.
+   *
+   * If [deep] is `true`, then all of this node's children and decendents are
+   * copied as well. If [deep] is `false`, then only this node is copied.
+   *
+   * ## Other resources
+   *
+   * * [Node.cloneNode]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.cloneNode) from
+   * MDN.
+   */
   @DomName('Node.cloneNode')
   @DocsEditable()
   Node clone(bool deep) native "Node_cloneNode_Callback";
 
+  /**
+   * Returns true if this node contains the specified node.
+   *
+   * ## Other resources
+   *
+   * * [Node.contains]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.contains) from MDN.
+   */
   @DomName('Node.contains')
   @DocsEditable()
   bool contains(Node other) native "Node_contains_Callback";
 
+  /**
+   * Returns true if this node has any children.
+   *
+   * ## Other resources
+   *
+   * * [Node.hasChildNodes]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.hasChildNodes) from
+   * MDN.
+   */
   @DomName('Node.hasChildNodes')
   @DocsEditable()
   bool hasChildNodes() native "Node_hasChildNodes_Callback";
 
+  /**
+   * Inserts all of the nodes into this node directly before refChild.
+   *
+   * ## Other resources
+   *
+   * * [Node.insertBefore]
+   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.insertBefore) from
+   * MDN.
+   */
   @DomName('Node.insertBefore')
   @DocsEditable()
   Node insertBefore(Node newChild, Node refChild) native "Node_insertBefore_Callback";
@@ -28096,12 +28330,14 @@
  * Top-level container for the current browser tab or window.
  *
  * In a web browser, each window has a [Window] object, but within the context
- * of a script, a [Window] object represents only the current window. In
- * addition to the open window, each window, tab, and iframe has its own
- * [Window] object. A [Window] contains a [Document] object, which contains this
- * web page's content.
+ * of a script, this object represents only the current window.
+ * Each other window, tab, and iframe has its own [Window] object.
  *
- * Use `window` to access properties of the current window. For example:
+ * Each window contains a [Document] object, which contains all of the window's
+ * content.
+ *
+ * Use the top-level `window` object to access the current window.
+ * For example:
  *
  *     // Draw a scene when the window repaints.
  *     drawScene(num delta) {...}
@@ -28111,8 +28347,12 @@
  *     window.console.log('Jinkies!');
  *     window.console.error('Jeepers!');
  *
- * **Note:** This class represents the current window, whereas [WindowBase] is
- * a representation of any window, including other tabs, windows, and frames.
+ * **Note:** This class represents only the current window, while [WindowBase]
+ * is a representation of any window, including other tabs, windows, and frames.
+ *
+ * ## See also
+ *
+ * * [WindowBase]
  *
  * ## Other resources
  *
@@ -31656,10 +31896,7 @@
 /**
  * An object that can be drawn to a 2D canvas rendering context.
  *
- * This object is either an [ImageElement], [VideoElement], or
- * [CanvasElement].
- *
- * The image drawn to the canvas differs by implementation:
+ * The image drawn to the canvas depends on the type of this object:
  *
  * * If this object is an [ImageElement], then this element's image is
  * drawn to the canvas. If this element is an animated image, then this
@@ -31701,13 +31938,17 @@
 /**
  * Top-level container for a browser tab or window.
  *
- * In a web browser, a [WindowBase] object represents any browser window.  This
- * abstract class contains the state of the window and its relation to other
- * windows, such as which window opened it.
+ * In a web browser, a [WindowBase] object represents any browser window. This
+ * object contains the window's state and its relation to other
+ * windows, such as which window opened this window.
  *
- * **Note:** This class represents any window, whereas [Window] is
+ * **Note:** This class represents any window, while [Window] is
  * used to access the properties and content of the current window or tab.
  *
+ * ## See also
+ *
+ * * [Window]
+ *
  * ## Other resources
  *
  * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index fb3fbe4..79df03c 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -8,7 +8,7 @@
 /**
  * An instance of the default implementation of the [ZLibCodec].
  */
-const ZLIB = const ZLibCodec();
+const ZLibCodec ZLIB = const ZLibCodec();
 
 
 /**
@@ -45,7 +45,7 @@
 /**
  * An instance of the default implementation of the [GZipCodec].
  */
-const GZIP = const GZipCodec();
+const GZipCodec GZIP = const GZipCodec();
 
 
 /**
diff --git a/sdk/lib/io/string_transformer.dart b/sdk/lib/io/string_transformer.dart
index dafd2bd..091f0d6 100644
--- a/sdk/lib/io/string_transformer.dart
+++ b/sdk/lib/io/string_transformer.dart
@@ -4,7 +4,7 @@
 
 part of dart.io;
 
-const SYSTEM_ENCODING = const SystemEncoding();
+const SystemEncoding SYSTEM_ENCODING = const SystemEncoding();
 
 /**
  * The system encoding is the current code page on Windows and UTF-8 on
diff --git a/tests/compiler/dart2js/mirror_system_helper.dart b/tests/compiler/dart2js/mirror_system_helper.dart
new file mode 100644
index 0000000..2776de6
--- /dev/null
+++ b/tests/compiler/dart2js/mirror_system_helper.dart
@@ -0,0 +1,139 @@
+// 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 mirror_system_helper;

+

+import 'dart:async';

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

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

+import 'mock_compiler.dart';

+

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

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

+

+const String SOURCE = 'source';

+final Uri SOURCE_URI = new Uri(scheme: SOURCE, path: SOURCE);

+

+// TODO(johnniwinther): Move this to a mirrors helper library.

+Future<MirrorSystem> createMirrorSystem(String source) {

+  MockCompiler compiler = new MockCompiler(

+      analyzeOnly: true,

+      analyzeAll: true,

+      preserveComments: true);

+    compiler.registerSource(SOURCE_URI, source);

+    compiler.librariesToAnalyzeWhenRun = <Uri>[SOURCE_URI];

+  return compiler.runCompiler(null).then((_) {

+    return new Dart2JsMirrorSystem(compiler);

+  });

+}

+

+/**

+ * Returns [:true:] if [type] is an instance of [:decl:] with type arguments

+ * equal to [typeArgument].

+ */

+bool isInstance(ClassMirror decl, List<TypeMirror> typeArguments,

+            ClassMirror type) {

+  if (type.isOriginalDeclaration) return false;

+  if (!isSameDeclaration(decl, type)) return false;

+  return areEqualsTypes(typeArguments, type.typeArguments);

+}

+

+/**

+ * Returns [:true:] if [type] is the same type as [expected]. This method

+ * equates a non-generic declaration with its instantiation.

+ */

+bool isEqualType(TypeMirror expected, TypeMirror type) {

+  if (expected == type) return true;

+  if (expected is ClassMirror && type is ClassMirror) {

+    if (!isSameDeclaration(expected, type)) return false;

+    if (expected.isOriginalDeclaration || expected.typeArguments.isEmpty) {

+      return type.isOriginalDeclaration || type.typeArguments.isEmpty;

+    }

+    return areEqualsTypes(expected.typeArguments, type.typeArguments);

+  }

+  return true;

+}

+

+/**

+ * Returns [:true:] if [types] are equals to [expected] using the equalitry

+ * defined by [isEqualType].

+ */

+bool areEqualsTypes(List<TypeMirror> expected, List<TypeMirror> types) {

+  return checkSameList(expected, types, isEqualType);

+}

+

+/**

+ * Returns [:true:] if an instance of [type] with type arguments equal to

+ * [typeArguments] is found in [types].

+ */

+bool containsType(ClassMirror decl, List<TypeMirror> typeArguments,

+                  Iterable<TypeMirror> types) {

+  return types.any((type) => isInstance(decl, typeArguments, type));

+}

+

+/**

+ * Returns the declaration of [type].

+ */

+TypeMirror toDeclaration(TypeMirror type) {

+  return type is ClassMirror ? type.originalDeclaration : type;

+}

+

+/**

+ * Returns [:true:] if [type] is of the same declaration as [expected].

+ */

+bool isSameDeclaration(TypeMirror expected, TypeMirror type) {

+  return toDeclaration(expected) == toDeclaration(type);

+}

+

+/**

+ * Returns [:true:] if a type of the declaration of [expected] is in [types].

+ */

+bool containsDeclaration(TypeMirror expected, Iterable<TypeMirror> types) {

+  for (var type in types) {

+    if (isSameDeclaration(expected, type)) {

+      return true;

+    }

+  }

+  return false;

+}

+

+/**

+ * Returns [:true:] if declarations of [expected] are the same as those of

+ * [types], taking order into account.

+ */

+bool isSameDeclarationList(Iterable<TypeMirror> expected,

+                           Iterable<TypeMirror> types) {

+  return checkSameList(expected, types, isSameDeclaration);

+}

+

+/**

+ * Returns [:true:] if declarations of [expected] are the same as those of

+ * [iterable], not taking order into account.

+ */

+bool isSameDeclarationSet(Iterable<TypeMirror> expected,

+                          Iterable<TypeMirror> types) {

+   Set<TypeMirror> expectedSet = expected.map(toDeclaration).toSet();

+   Set<TypeMirror> typesSet = types.map(toDeclaration).toSet();

+   return expectedSet.length == typesSet.length &&

+          expectedSet.containsAll(typesSet);

+}

+

+/**

+ * Utility method for checking whether [expected] and [iterable] contains the

+ * same elements with respect to the checking function [check], takin order

+ * into account.

+ */

+bool checkSameList(Iterable<TypeMirror> expected,

+                   Iterable<TypeMirror> types,

+                   bool check(TypeMirror a, TypeMirror b)) {

+  if (expected.length != types.length) return false;

+  Iterator<TypeMirror> expectedIterator = expected.iterator;

+  Iterator<TypeMirror> typesIterator = types.iterator;

+  while (expectedIterator.moveNext() && typesIterator.moveNext()) {

+    if (!check(expectedIterator.current, typesIterator.current)) {

+      return false;

+    }

+  }

+  return true;

+}

diff --git a/tests/compiler/dart2js/mirrors_metadata_test.dart b/tests/compiler/dart2js/mirrors_metadata_test.dart
index 1e3307c..66c2e41 100644
--- a/tests/compiler/dart2js/mirrors_metadata_test.dart
+++ b/tests/compiler/dart2js/mirrors_metadata_test.dart
@@ -3,29 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'dart:async';
 import "package:async_helper/async_helper.dart";
-import 'dart:io';
-import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
-import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
-import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart';
-import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider.dart';
-import 'mock_compiler.dart';
-
-const String SOURCE = 'source';
-Uri SOURCE_URI = new Uri(scheme: SOURCE, path: SOURCE);
-
-Future<MirrorSystem> createMirrorSystem(String source) {
-  MockCompiler compiler = new MockCompiler(
-      analyzeOnly: true,
-      analyzeAll: true,
-      preserveComments: true);
-    compiler.registerSource(SOURCE_URI, source);
-    compiler.librariesToAnalyzeWhenRun = <Uri>[SOURCE_URI];
-  return compiler.runCompiler(null).then((_) {
-    return new Dart2JsMirrorSystem(compiler);
-  });
-}
+import 'dart:async';
+import 'mirror_system_helper.dart';
 
 void validateDeclarationComment(String code,
                                 String text,
diff --git a/tests/compiler/dart2js/mirrors_mixin_test.dart b/tests/compiler/dart2js/mirrors_mixin_test.dart
new file mode 100644
index 0000000..1486851
--- /dev/null
+++ b/tests/compiler/dart2js/mirrors_mixin_test.dart
@@ -0,0 +1,240 @@
+// 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 mirrors_mixin_test;

+

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

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

+import 'mirror_system_helper.dart';

+

+const String CLASS_SOURCE = '''

+class A {}

+

+class S {}

+class M1<T> {}

+class M2 {}

+

+class C extends S with M1<A> {}

+class D extends S with M1, M2 {}

+class E extends S with M2, M1 implements A, M1 {}

+class E2 extends E {}

+

+class F = S with M1<A>;

+abstract class G = S with M1, M2;

+class H = S with M2, M1 implements A, M1;

+class H2 extends H {}

+''';

+

+void main() {

+  asyncTest(() => createMirrorSystem(CLASS_SOURCE).then((MirrorSystem mirrors) {

+    LibraryMirror library = mirrors.libraries[SOURCE_URI];

+

+    checkSimpleClass(var cls) {

+      Expect.isNotNull(cls);

+      Expect.isTrue(cls is ClassMirror);

+      Expect.isFalse(isMixinApplication(cls));

+      Expect.isFalse(cls.isNameSynthetic);

+      Expect.isFalse(cls.isObject);

+      Expect.isTrue(cls.superclass.isObject);

+      Expect.equals(0, cls.superinterfaces.length);

+

+      Expect.isTrue(getSuperclass(cls).isObject);

+      Expect.isTrue(getAppliedMixins(cls).isEmpty);

+      Expect.isTrue(getExplicitInterfaces(cls).isEmpty);

+    }

+

+    // class A {}

+    var A = library.classes['A'];

+    checkSimpleClass(A);

+

+    // class S {}

+    var S = library.classes['S'];

+    checkSimpleClass(S);

+

+    // class M1 {}

+    var M1 = library.classes['M1'];

+    checkSimpleClass(M1);

+

+    // class M2 {}

+    var M2 = library.classes['M2'];

+    checkSimpleClass(M2);

+

+    // class C extends S with M1<A> {}

+    var C = library.classes['C'];

+    Expect.isNotNull(C);

+    Expect.isTrue(C is ClassMirror);

+    Expect.isFalse(isMixinApplication(C));

+    Expect.isFalse(C.isObject);

+    Expect.equals(0, C.superinterfaces.length);

+    var C_super = C.superclass;

+    Expect.isNotNull(C_super);

+    Expect.isTrue(C_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(C_super));

+    Expect.isTrue(C_super.isNameSynthetic);

+    Expect.equals(1, C_super.superinterfaces.length);

+    Expect.isTrue(containsType(M1, [A], C_super.superinterfaces));

+    Expect.isTrue(isInstance(M1, [A], C_super.mixin));

+    Expect.isFalse(C_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, C_super.superclass));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(C)));

+    Expect.isTrue(isSameDeclarationList([M1], getAppliedMixins(C)));

+    Expect.isTrue(getExplicitInterfaces(C).isEmpty);

+

+    // D extends S with M1, M2 {}

+    var D = library.classes['D'];

+    Expect.isNotNull(D);

+    Expect.isTrue(D is ClassMirror);

+    Expect.isFalse(isMixinApplication(D));

+    Expect.isFalse(D.isObject);

+    Expect.equals(0, D.superinterfaces.length);

+    var D_super = D.superclass;

+    Expect.isNotNull(D_super);

+    Expect.isTrue(D_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(D_super));

+    Expect.isTrue(D_super.isNameSynthetic);

+    Expect.equals(1, D_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M2, D_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M2, D_super.mixin));

+    Expect.isFalse(D_super.isObject);

+    Expect.isFalse(isSameDeclaration(S, D_super.superclass));

+    var D_super_super = D_super.superclass;

+    Expect.isNotNull(D_super_super);

+    Expect.isTrue(D_super_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(D_super_super));

+    Expect.isTrue(D_super_super.isNameSynthetic);

+    Expect.equals(1, D_super_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M1, D_super_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M1, D_super_super.mixin));

+    Expect.isFalse(D_super_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, D_super_super.superclass));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(D)));

+    Expect.isTrue(isSameDeclarationList([M1, M2], getAppliedMixins(D)));

+    Expect.isTrue(getExplicitInterfaces(D).isEmpty);

+

+    // class E extends S with M2, M1 implements A, M1 {}

+    var E = library.classes['E'];

+    Expect.isNotNull(E);

+    Expect.isTrue(E is ClassMirror);

+    Expect.isFalse(isMixinApplication(E));

+    Expect.isFalse(E.isObject);

+    Expect.equals(2, E.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(A, E.superinterfaces));

+    Expect.isTrue(containsDeclaration(M1, E.superinterfaces));

+    var E_super = E.superclass;

+    Expect.isNotNull(E_super);

+    Expect.isTrue(E_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(E_super));

+    Expect.isTrue(E_super.isNameSynthetic);

+    Expect.equals(1, E_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M1, E_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M1, E_super.mixin));

+    Expect.isFalse(E_super.isObject);

+    Expect.isFalse(isSameDeclaration(S, E_super.superclass));

+    var E_super_super = E_super.superclass;

+    Expect.isNotNull(E_super_super);

+    Expect.isTrue(E_super_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(E_super_super));

+    Expect.isTrue(E_super_super.isNameSynthetic);

+    Expect.equals(1, E_super_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M2, E_super_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M2, E_super_super.mixin));

+    Expect.isFalse(E_super_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, E_super_super.superclass));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(E)));

+    Expect.isTrue(isSameDeclarationList([M2, M1], getAppliedMixins(E)));

+    Expect.isTrue(isSameDeclarationSet([A, M1], getExplicitInterfaces(E)));

+

+    // class E2 extends E {}

+    var E2 = library.classes['E2'];

+    Expect.isTrue(isSameDeclaration(E, getSuperclass(E2)));

+    Expect.isTrue(getAppliedMixins(E2).isEmpty);

+    Expect.isTrue(getExplicitInterfaces(E2).isEmpty);

+

+    // class F = S with M1<A>;

+    var F = library.classes['F'];

+    Expect.isNotNull(F);

+    Expect.isTrue(F is ClassMirror);

+    Expect.isFalse(F.isAbstract);

+    Expect.isTrue(isMixinApplication(F));

+    Expect.isFalse(F.isNameSynthetic);

+    Expect.equals('F', F.simpleName);

+    Expect.isFalse(F.isObject);

+    Expect.equals(1, F.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M1, F.superinterfaces));

+    Expect.isTrue(isInstance(M1, [A], F.mixin));

+    var F_super = F.superclass;

+    Expect.isNotNull(F_super);

+    Expect.isTrue(F_super is ClassMirror);

+    Expect.isFalse(isMixinApplication(F_super));

+    Expect.isFalse(F_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, F_super));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(F)));

+    Expect.isTrue(isSameDeclarationList([M1], getAppliedMixins(F)));

+    Expect.isTrue(getExplicitInterfaces(F).isEmpty);

+

+    // typedef G = abstract S with M1, M2;

+    var G = library.classes['G'];

+    Expect.isNotNull(G);

+    Expect.isTrue(G is ClassMirror);

+    Expect.isTrue(G.isAbstract);

+    Expect.isTrue(isMixinApplication(G));

+    Expect.isFalse(G.isNameSynthetic);

+    Expect.equals('G', G.simpleName);

+    Expect.isFalse(G.isObject);

+    Expect.equals(1, G.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M2, G.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M2, G.mixin));

+    var G_super = G.superclass;

+    Expect.isNotNull(G_super);

+    Expect.isTrue(G_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(G_super));

+    Expect.equals(1, G_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M1, G_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M1, G_super.mixin));

+    Expect.isFalse(G_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, G_super.superclass));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(G)));

+    Expect.isTrue(isSameDeclarationList([M1, M2], getAppliedMixins(G)));

+    Expect.isTrue(getExplicitInterfaces(G).isEmpty);

+

+    // typedef H = S with M2, M1 implements A, M1;

+    var H = library.classes['H'];

+    Expect.isNotNull(H);

+    Expect.isTrue(H is ClassMirror);

+    Expect.isFalse(H.isAbstract);

+    Expect.isTrue(isMixinApplication(H));

+    Expect.isFalse(H.isNameSynthetic);

+    Expect.equals('H', H.simpleName);

+    Expect.isFalse(H.isObject);

+    Expect.equals(3, H.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(A, H.superinterfaces));

+    Expect.isTrue(containsDeclaration(M1, H.superinterfaces));

+    Expect.isFalse(containsDeclaration(M2, H.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M1, H.mixin));

+    var H_super = H.superclass;

+    Expect.isNotNull(H_super);

+    Expect.isTrue(H_super is ClassMirror);

+    Expect.isTrue(isMixinApplication(H_super));

+    Expect.equals(1, H_super.superinterfaces.length);

+    Expect.isTrue(containsDeclaration(M2, H_super.superinterfaces));

+    Expect.isTrue(isSameDeclaration(M2, H_super.mixin));

+    Expect.isFalse(H_super.isObject);

+    Expect.isTrue(isSameDeclaration(S, H_super.superclass));

+

+    Expect.isTrue(isSameDeclaration(S, getSuperclass(H)));

+    Expect.isTrue(isSameDeclarationList([M2, M1], getAppliedMixins(H)));

+    Expect.isTrue(isSameDeclarationSet([A, M1], getExplicitInterfaces(H)));

+

+    // class H2 extends H {}

+    var H2 = library.classes['H2'];

+    Expect.isTrue(isSameDeclaration(H, getSuperclass(H2)));

+    Expect.isTrue(getAppliedMixins(H2).isEmpty);

+    Expect.isTrue(getExplicitInterfaces(H2).isEmpty);

+  }));

+}
\ No newline at end of file
diff --git a/tests/language/language_analyzer.status b/tests/language/language_analyzer.status
index 50eb8a4..2ce056c 100644
--- a/tests/language/language_analyzer.status
+++ b/tests/language/language_analyzer.status
@@ -21,15 +21,13 @@
 method_override7_test/03: Fail # Issue 11496
 method_override8_test/03: Fail # Issue 11496
 
-export_double_same_main_test: Fail # Issue 14772
-
 # Please add new failing tests before this line.
 # Section below is for invalid tests.
 #
 #
 
-ref_before_declaration_test/07: fail # please triage
-ref_before_declaration_test/none: fail # please triage
+ref_before_declaration_test/none: fail # test issue 14879, "P" is not defined
+bad_initializer2_negative_test: fail # tester issue 14880, Analyzer reports compile-time error, but test runner is not satisfied
 
 # test issue 11124, It is warning, not error to don't initialize final field
 field3a_negative_test: Fail # Issue 11124
@@ -71,9 +69,6 @@
 constructor_call_wrong_argument_count_negative_test: fail
 instance_call_wrong_argument_count_negative_test: fail
 
-# test issue 11589, export D from 2 export directives
-export_cyclic_test: fail
-
 # test issue 11590, runtime only negative test
 field_method4_negative_test: fail
 
@@ -130,9 +125,6 @@
 static_field_test/03: fail # Issue 12541
 static_field_test/04: fail # Issue 12541
 
-# test issue 13787; duplicate exports of the same declaration is not handled
-duplicate_export_test: fail # Issue 13787
-
 # test issue 13916, Looks as no warning should be in this redirecting factory
 redirecting_factory_infinite_steps_test/01: fail
 
diff --git a/tests/lib/mirrors/generic_class_declaration_test.dart b/tests/lib/mirrors/generic_class_declaration_test.dart
new file mode 100644
index 0000000..0b8260f
--- /dev/null
+++ b/tests/lib/mirrors/generic_class_declaration_test.dart
@@ -0,0 +1,83 @@
+// 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 'package:expect/expect.dart';
+
+import 'stringify.dart';
+
+class A<T> {
+  var instanceVariable;
+  get instanceGetter => null;
+  set instanceSetter(x) => x;
+  instanceMethod() => null;
+
+  var _instanceVariable;
+  get _instanceGetter => null;
+  set _instanceSetter(x) => x;
+  _instanceMethod() => null;
+
+  static var staticVariable;
+  static get staticGetter => null;
+  static set staticSetter(x) => x;
+  static staticMethod() => null;
+
+  static var _staticVariable;
+  static get _staticGetter => null;
+  static set _staticSetter(x) => x;
+  static _staticMethod() => null;
+}
+
+main() {
+  ClassMirror cm = reflect(new A<String>()).type;
+  Expect.setEquals(
+      ['Variable(s(_instanceVariable) in s(A), private)',
+       'Variable(s(_staticVariable) in s(A), private, static)',
+       'Variable(s(instanceVariable) in s(A))',
+       'Variable(s(staticVariable) in s(A), static)'],
+       cm.declarations.values
+         .where((dm) => dm is VariableMirror).map(stringify),
+  'variables');
+
+  Expect.setEquals(
+      ['Method(s(_instanceGetter) in s(A), private, getter)',
+       'Method(s(_staticGetter) in s(A), private, static, getter)',
+       'Method(s(instanceGetter) in s(A), getter)',
+       'Method(s(staticGetter) in s(A), static, getter)'],
+       cm.declarations.values
+         .where((dm) => dm is MethodMirror && dm.isGetter).map(stringify),
+  'getters');
+
+  Expect.setEquals(
+      ['Method(s(_instanceSetter=) in s(A), private, setter)',
+       'Method(s(_staticSetter=) in s(A), private, static, setter)',
+       'Method(s(instanceSetter=) in s(A), setter)',
+       'Method(s(staticSetter=) in s(A), static, setter)'],
+       cm.declarations.values
+         .where((dm) => dm is MethodMirror && dm.isSetter).map(stringify),
+  'setters');
+
+  Expect.setEquals(
+      ['Method(s(_instanceMethod) in s(A), private)',
+       'Method(s(_staticMethod) in s(A), private, static)',
+       'Method(s(instanceMethod) in s(A))',
+       'Method(s(staticMethod) in s(A), static)'],
+       cm.declarations.values
+         .where((dm) => dm is MethodMirror && dm.isRegularMethod)
+           .map(stringify), 'methods');
+
+  Expect.setEquals(
+      ['Method(s(A) in s(A), constructor)'],
+       cm.declarations.values
+         .where((dm) => dm is MethodMirror && dm.isConstructor).map(stringify),
+  'constructors');
+
+  Expect.setEquals(
+      ['TypeVariable(s(T) in s(A), upperBound = Class(s(Object) in '
+       's(dart.core), top-level))'],
+       cm.declarations.values
+         .where((dm) => dm is TypeVariableMirror).map(stringify),
+  'type variables');
+
+}
\ No newline at end of file
diff --git a/tools/VERSION b/tools/VERSION
index a12320b..0f1a9ac 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 8
 BUILD 10
-PATCH 7
+PATCH 8
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index 43706bc..ba4e5fc 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -2311,6 +2311,209 @@
           "   * This method is more efficient than `nodes.add`, and is the preferred",
           "   * way of appending a child node.",
           "   */"
+        ],
+        "childNodes": [
+          "/**",
+          "   * A list of this node's children.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.childNodes]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.childNodes)",
+          "   * from MDN.",
+          "   */"
+        ],
+        "cloneNode": [
+          "/**",
+          "   * Returns a copy of this node.",
+          "   *",
+          "   * If [deep] is `true`, then all of this node's children and decendents are",
+          "   * copied as well. If [deep] is `false`, then only this node is copied.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.cloneNode]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.cloneNode) from",
+          "   * MDN.",
+          "   */"
+        ],
+        "contains": [
+          "/**",
+          "   * Returns true if this node contains the specified node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.contains]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.contains) from MDN.",
+          "   */"
+        ],
+        "firstChild": [
+          "/**",
+          "   * The first child of this node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.firstChild]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.firstChild)",
+          "   * from MDN.",
+          "   */"
+        ],
+        "hasChildNodes": [
+          "/**",
+          "   * Returns true if this node has any children.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.hasChildNodes]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.hasChildNodes) from",
+          "   * MDN.",
+          "   */"
+        ],
+        "insertBefore": [
+          "/**",
+          "   * Inserts all of the nodes into this node directly before refChild.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.insertBefore]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.insertBefore) from",
+          "   * MDN.",
+          "   */"
+        ],
+        "lastChild": [
+          "/**",
+          "   * The last child of this node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.lastChild]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.lastChild)",
+          "   * from MDN.",
+          "   */"
+        ],
+        "nextSibling": [
+          "/**",
+          "   * The next sibling node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.nextSibling]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nextSibling)",
+          "   * from MDN.",
+          "   */"
+        ],
+        "nodeName": [
+          "/**",
+          "   * The name of this node.",
+          "   *",
+          "   * This varies by this node's [nodeType].",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.nodeName]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeName)",
+          "   * from MDN. This page contains a table of [nodeName] values for each",
+          "   * [nodeType].",
+          "   */"
+        ],
+        "nodeType": [
+          "/**",
+          "   * The type of node.",
+          "   *",
+          "   * This value is one of:",
+          "   *",
+          "   * * [ATTRIBUTE_NODE] if this node is an attribute.",
+          "   * * [CDATA_SECTION_NODE] if this node is a [CDataSection].",
+          "   * * [COMMENT_NODE] if this node is a [Comment].",
+          "   * * [DOCUMENT_FRAGMENT_NODE] if this node is a [DocumentFragment].",
+          "   * * [DOCUMENT_NODE] if this node is a [Document].",
+          "   * * [DOCUMENT_TYPE_NODE] if this node is a [DocumentType] node.",
+          "   * * [ELEMENT_NODE] if this node is an [Element].",
+          "   * * [ENTITY_NODE] if this node is an entity.",
+          "   * * [ENTITY_REFERENCE_NODE] if this node is an entity reference.",
+          "   * * [NOTATION_NODE] if this node is a notation.",
+          "   * * [PROCESSING_INSTRUCTION_NODE] if this node is a [ProcessingInstruction].",
+          "   * * [TEXT_NODE] if this node is a [Text] node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.nodeType]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType) from MDN.",
+          "   */"
+        ],
+        "nodeValue": [
+          "/**",
+          "   * The value of this node.",
+          "   *",
+          "   * This varies by this type's [nodeType].",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.nodeValue]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeValue)",
+          "   * from MDN. This page contains a table of [nodeValue] values for each",
+          "   * [nodeType].",
+          "   */"
+        ],
+        "ownerDocument": [
+          "/**",
+          "   * The document this node belongs to.",
+          "   *",
+          "   * Returns `null` if this node does not belong to any document.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.ownerDocument]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.ownerDocument) from",
+          "   * MDN.",
+          "   */"
+        ],
+        "parentElement": [
+          "/**",
+          "   * The parent element of this node.",
+          "   *",
+          "   * Returns `null` if this node either does not have a parent or its parent is",
+          "   * not an element.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.parentElement]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentElement) from",
+          "   * W3C.",
+          "   */"
+        ],
+        "parentNode": [
+          "/**",
+          "   * The parent node of this node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.parentNode]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.parentNode) from",
+          "   * MDN.",
+          "   */"
+        ],
+        "previousSibling": [
+          "/**",
+          "   * The previous sibling node.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.previousSibling]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.previousSibling)",
+          "   * from MDN.",
+          "   */"
+        ],
+        "textContent": [
+          "/**",
+          "   * All text within this node and its decendents.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [Node.textContent]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent) from",
+          "   * MDN.",
+          "   */"
         ]
       }
     },
@@ -2908,12 +3111,14 @@
         " * Top-level container for the current browser tab or window.",
         " *",
         " * In a web browser, each window has a [Window] object, but within the context",
-        " * of a script, a [Window] object represents only the current window. In",
-        " * addition to the open window, each window, tab, and iframe has its own",
-        " * [Window] object. A [Window] contains a [Document] object, which contains this",
-        " * web page's content.",
+        " * of a script, this object represents only the current window.",
+        " * Each other window, tab, and iframe has its own [Window] object.",
         " *",
-        " * Use `window` to access properties of the current window. For example:",
+        " * Each window contains a [Document] object, which contains all of the window's",
+        " * content.",
+        " *",
+        " * Use the top-level `window` object to access the current window.",
+        " * For example:",
         " *",
         " *     // Draw a scene when the window repaints.",
         " *     drawScene(num delta) {...}",
@@ -2923,8 +3128,12 @@
         " *     window.console.log('Jinkies!');",
         " *     window.console.error('Jeepers!');",
         " *",
-        " * **Note:** This class represents the current window, whereas [WindowBase] is",
-        " * a representation of any window, including other tabs, windows, and frames.",
+        " * **Note:** This class represents only the current window, while [WindowBase]",
+        " * is a representation of any window, including other tabs, windows, and frames.",
+        " *",
+        " * ## See also",
+        " *",
+        " * * [WindowBase]",
         " *",
         " * ## Other resources",
         " *",
@@ -3419,12 +3628,33 @@
           "   * `send` method is intended only for more complext HTTP requests where",
           "   * finer-grained control is needed.",
           "   *",
-          "   * See also:",
+          "   * ## Other resources",
           "   *",
-          "   *   * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)",
+          "   * * [XMLHttpRequest.send]",
+          "   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)",
           "   * from MDN.",
           "   */"
         ],
+        "setRequestHeader": [
+          "/**",
+          "   * Sets the value of an HTTP requst header.",
+          "   *",
+          "   * This method should be called after the request is opened, but before",
+          "   * the request is sent.",
+          "   *",
+          "   * Multiple calls with the same header will combine all their values into a",
+          "   * single header.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [XMLHttpRequest.setRequestHeader]",
+          "   * (https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)",
+          "   * from MDN.",
+          "   * * [The setRequestHeader() method]",
+          "   * (http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method) from",
+          "   * W3C.",
+          "   */"
+        ],
         "status": [
           "/**",
           "   * The http result code from the request (200, 404, etc).",
@@ -3437,6 +3667,24 @@
           "   * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)",
           "   */"
         ],
+        "timeout": [
+          "/**",
+          "   * Length of time before a request is automatically terminated.",
+          "   *",
+          "   * When the time has passed, a [TimeoutEvent] is dispatched.",
+          "   *",
+          "   * If [timeout] is set to 0, then the request will not time out.",
+          "   *",
+          "   * ## Other resources",
+          "   *",
+          "   * * [XMLHttpRequest.timeout]",
+          "   * (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#timeout)",
+          "   * from MDN.",
+          "   * * [The timeout attribute]",
+          "   * (http://www.w3.org/TR/XMLHttpRequest/#the-timeout-attribute)",
+          "   * from W3C.",
+          "   */"
+        ],
         "upload": [
           "/**",
           "   * [EventTarget] that can hold listeners to track the progress of the request.",
diff --git a/tools/dom/src/CanvasImageSource.dart b/tools/dom/src/CanvasImageSource.dart
index b6a770c..e030533 100644
--- a/tools/dom/src/CanvasImageSource.dart
+++ b/tools/dom/src/CanvasImageSource.dart
@@ -7,10 +7,7 @@
 /**
  * An object that can be drawn to a 2D canvas rendering context.
  *
- * This object is either an [ImageElement], [VideoElement], or
- * [CanvasElement].
- *
- * The image drawn to the canvas differs by implementation:
+ * The image drawn to the canvas depends on the type of this object:
  *
  * * If this object is an [ImageElement], then this element's image is
  * drawn to the canvas. If this element is an animated image, then this
diff --git a/tools/dom/src/CrossFrameTypes.dart b/tools/dom/src/CrossFrameTypes.dart
index f8ed874..679092d 100644
--- a/tools/dom/src/CrossFrameTypes.dart
+++ b/tools/dom/src/CrossFrameTypes.dart
@@ -7,13 +7,17 @@
 /**
  * Top-level container for a browser tab or window.
  *
- * In a web browser, a [WindowBase] object represents any browser window.  This
- * abstract class contains the state of the window and its relation to other
- * windows, such as which window opened it.
+ * In a web browser, a [WindowBase] object represents any browser window. This
+ * object contains the window's state and its relation to other
+ * windows, such as which window opened this window.
  *
- * **Note:** This class represents any window, whereas [Window] is
+ * **Note:** This class represents any window, while [Window] is
  * used to access the properties and content of the current window or tab.
  *
+ * ## See also
+ *
+ * * [Window]
+ *
  * ## Other resources
  *
  * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 2f7b2d7..bb01401 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -190,6 +190,9 @@
   // Custom element created callback.
   Node._created() : super._created();
 
+  /**
+   * A modifiable list of this node's children.
+   */
   List<Node> get nodes {
     return new _ChildNodeListLazy(this);
   }