Version 1.8.0-dev.4.4

svn merge -c 41690 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41707 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41719 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41795 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41815 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41816 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 41831 https://dart.googlecode.com/svn/branches/bleeding_edge trunk

Reverts:
svn merge -c -41436 https://dart.googlecode.com/svn/branches/bleeding_edge/ trunk

git-svn-id: http://dart.googlecode.com/svn/trunk@41847 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkg/analyzer/lib/options.dart b/pkg/analyzer/lib/options.dart
index 0e31c41..4833c3c 100644
--- a/pkg/analyzer/lib/options.dart
+++ b/pkg/analyzer/lib/options.dart
@@ -243,7 +243,7 @@
   /** Creates a new command line parser */
   _CommandLineParser()
     : _knownFlags = <String>[],
-      _parser = new ArgParser();
+      _parser = new ArgParser(allowTrailingOptions: true);
 
 
   /**
diff --git a/pkg/analyzer2dart/lib/src/modely.dart b/pkg/analyzer2dart/lib/src/modely.dart
index 23a8391..1bd8947 100644
--- a/pkg/analyzer2dart/lib/src/modely.dart
+++ b/pkg/analyzer2dart/lib/src/modely.dart
@@ -1,785 +1,788 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file

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

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

-

-part of analyzer2dart.element_converter;

-

-

-/// Base [dart2js.Element] implementation for converted analyzer elements.

-class ElementY extends dart2js.Element {

-  final ElementConverter converter;

-  final analyzer.Element element;

-

-  @override

-  String get name => element.name;

-

-  ElementY(this.converter, this.element);

-

-  @override

-  dart2js.LibraryElement get implementationLibrary => library;

-

-  @override

-  dart2js.Element get origin => this;

-

-  @override

-  dart2js.Element get patch => null;

-

-  @override

-  dart2js.Element get declaration => this;

-

-  @override

-  dart2js.Element get implementation => this;

-

-  @override

-  bool get isPatch => false;

-

-  @override

-  bool get isPatched => false;

-

-  @override

-  bool get isDeclaration => true;

-

-  @override

-  bool get isImplementation => false;

-

-  @override

-  dart2js.LibraryElement get library {

-    return converter.convertElement(element.library);

-  }

-

-  @override

-  bool get isLocal => false;

-

-  unsupported(String method) {

-    throw new UnsupportedError(

-        "'$method' is unsupported on $this ($runtimeType)");

-  }

-

-

-  @override

-  bool get isFinal => unsupported('isFinal');

-

-  @override

-  bool get isStatic => unsupported('isStatic');

-

-  @override

-  bool isForeign(_) => unsupported('isForeign');

-

-  @override

-  bool get impliesType => unsupported('impliesType');

-

-  @override

-  bool get isOperator => unsupported('impliesType');

-

-  @override

-  get position => unsupported('position');

-

-  @override

-  computeType(_) => unsupported('computeType');

-

-  @override

-  get enclosingElement => unsupported('enclosingElement');

-

-  @override

-  accept(_) => unsupported('accept');

-

-  @override

-  void addMetadata(_) => unsupported('addMetadata');

-

-  @override

-  get analyzableElement => unsupported('analyzableElement');

-

-  @override

-  asFunctionElement() => unsupported('asFunctionElement');

-

-  @override

-  buildScope() => unsupported('buildScope');

-

-  @override

-  get compilationUnit => unsupported('compilationUnit');

-

-  @override

-  get contextClass => unsupported('contextClass');

-

-  @override

-  void diagnose(context, listener) => unsupported('diagnose');

-

-  @override

-  get enclosingClass => unsupported('enclosingClass');

-

-  @override

-  get enclosingClassOrCompilationUnit {

-    return unsupported('enclosingClassOrCompilationUnit');

-  }

-

-  @override

-  String get fixedBackendName => unsupported('fixedBackendName');

-

-  @override

-  bool get hasFixedBackendName => unsupported('hasFixedBackendName');

-

-  @override

-  bool get isAbstract => unsupported('isAbstract');

-

-  @override

-  bool get isAssignable => unsupported('isAssignable');

-

-  @override

-  bool get isClassMember => unsupported('isClassMember');

-

-  @override

-  bool get isClosure => unsupported('isClosure');

-

-  @override

-  bool get isConst => unsupported('isConst');

-

-  @override

-  bool get isDeferredLoaderGetter => unsupported('isDeferredLoaderGetter');

-

-  @override

-  bool get isFactoryConstructor => unsupported('isFactoryConstructor');

-

-  @override

-  bool get isForwardingConstructor => unsupported('isForwardingConstructor');

-

-  @override

-  bool get isInjected => unsupported('isInjected');

-

-  @override

-  bool get isInstanceMember => unsupported('isInstanceMember');

-

-  @override

-  bool get isMixinApplication => unsupported('isMixinApplication');

-

-  @override

-  bool get isNative => unsupported('isNative');

-

-  @override

-  bool get isSynthesized => unsupported('isSynthesized');

-

-  @override

-  bool get isTopLevel => unsupported('isTopLevel');

-

-  @override

-  get kind => unsupported('kind');

-

-  @override

-  get metadata => unsupported('metadata');

-

-  @override

-  get outermostEnclosingMemberOrTopLevel {

-    return unsupported('outermostEnclosingMemberOrTopLevel');

-  }

-

-  @override

-  void setFixedBackendName(String name) => unsupported('setFixedBackendName');

-

-  @override

-  void setNative(String name) => unsupported('setNative');

-

-  String toString() => '$kind($name)';

-}

-

-abstract class AnalyzableElementY

-    implements ElementY, dart2js.AnalyzableElement {

-  @override

-  bool get hasTreeElements => unsupported('hasTreeElements');

-

-  @override

-  get treeElements => unsupported('treeElements');

-}

-

-abstract class AstElementY implements ElementY, dart2js.AstElement {

-  @override

-  bool get hasNode => unsupported('hasNode');

-

-  @override

-  get node => unsupported('node');

-

-  @override

-  bool get hasResolvedAst => unsupported('hasResolvedAst');

-

-  @override

-  get resolvedAst => unsupported('resolvedAst');

-}

-

-class LibraryElementY extends ElementY with AnalyzableElementY

-    implements dart2js.LibraryElement {

-  analyzer.LibraryElement get element => super.element;

-

-  @override

-  dart2js.ElementKind get kind => dart2js.ElementKind.LIBRARY;

-

-  // TODO(johnniwinther): Ensure the correct semantics of this.

-  @override

-  bool get isInternalLibrary => isPlatformLibrary && element.isPrivate;

-

-  // TODO(johnniwinther): Ensure the correct semantics of this.

-  @override

-  bool get isPlatformLibrary => element.isInSdk;

-

-  @override

-  bool get isDartCore => element.isDartCore;

-

-  LibraryElementY(ElementConverter converter, analyzer.LibraryElement element)

-      : super(converter, element);

-

-  @override

-  void addCompilationUnit(_) => unsupported('addCompilationUnit');

-

-  @override

-  void addImport(element, import, listener) => unsupported('addImport');

-

-  @override

-  void addMember(element, listener) => unsupported('addMember');

-

-  @override

-  void addTag(tag, listener) => unsupported('addTag');

-

-  @override

-  void addToScope(element, listener) => unsupported('addToScope');

-

-  @override

-  void set canUseNative(bool value) => unsupported('canUseNative');

-

-  @override

-  bool get canUseNative => unsupported('canUseNative');

-

-  @override

-  Uri get canonicalUri => unsupported('canonicalUri');

-

-  @override

-  int compareTo(other) => unsupported('compareTo');

-

-  @override

-  get compilationUnits => unsupported('compilationUnits');

-

-  @override

-  get entryCompilationUnit => unsupported('entryCompilationUnit');

-

-  @override

-  get exports => unsupported('exports');

-

-  @override

-  bool get exportsHandled => unsupported('exportsHandled');

-

-  @override

-  find(String elementName) => unsupported('find');

-

-  @override

-  findExported(String elementName) => unsupported('findExported');

-

-  @override

-  findLocal(String elementName) => unsupported('findLocal');

-

-  @override

-  void forEachExport(_) => unsupported('forEachExport');

-

-  @override

-  void forEachLocalMember(_) => unsupported('forEachLocalMember');

-

-  @override

-  getImportsFor(element) => unsupported('getImportsFor');

-

-  @override

-  getLibraryFromTag(tag) => unsupported('getLibraryFromTag');

-

-  @override

-  String getLibraryName() => unsupported('getLibraryName');

-

-  @override

-  String getLibraryOrScriptName() => unsupported('getLibraryOrScriptName');

-

-  @override

-  getNonPrivateElementsInScope() => unsupported('getNonPrivateElementsInScope');

-

-  @override

-  bool hasLibraryName() => unsupported('hasLibraryName');

-

-  @override

-  bool get isPackageLibrary => unsupported('isPackageLibrary');

-

-  @override

-  get libraryTag => unsupported('libraryTag');

-

-  @override

-  void set libraryTag(value) => unsupported('libraryTag');

-

-  @override

-  localLookup(elementName) => unsupported('localLookup');

-

-  @override

-  void recordResolvedTag(tag, library) => unsupported('recordResolvedTag');

-

-  @override

-  void setExports(exportedElements) => unsupported('setExports');

-

-  @override

-  get tags => unsupported('tags');

-}

-

-abstract class TopLevelElementMixin implements ElementY {

-  @override

-  bool get isClassMember => false;

-

-  @override

-  bool get isInstanceMember => false;

-

-  @override

-  bool get isTopLevel => true;

-

-  // TODO(johnniwinther): Ensure the correct semantics of this.

-  @override

-  bool get isFactoryConstructor => false;

-

-  @override

-  bool get isStatic {

-    // Semantic difference: Analyzer considers top-level and static class

-    // members to be static, dart2js only considers static class members to be

-    // static.

-    return false;

-  }

-

-  // TODO(johnniwinther): Ensure the correct semantics of this.

-  @override

-  bool get isAbstract => false;

-}

-

-abstract class FunctionElementMixin

-    implements ElementY, dart2js.FunctionElement {

-  @override

-  get abstractField => unsupported('abstractField');

-

-  @override

-  computeSignature(_) => unsupported('computeSignature');

-

-  @override

-  get memberContext => unsupported('memberContext');

-

-  @override

-  get functionSignature => unsupported('functionSignature');

-

-  @override

-  bool get hasFunctionSignature => unsupported('hasFunctionSignature');

-

-  @override

-  get asyncMarker => unsupported('asyncMarker');

-}

-

-class TopLevelFunctionElementY extends ElementY

-    with AnalyzableElementY,

-         AstElementY,

-         TopLevelElementMixin,

-         FunctionElementMixin

-    implements dart2js.FunctionElement {

-  analyzer.FunctionElement get element => super.element;

-

-  @override

-  dart2js.ElementKind get kind => dart2js.ElementKind.FUNCTION;

-

-  @override

-  dart2js.FunctionType get type => converter.convertType(element.type);

-

-  TopLevelFunctionElementY(ElementConverter converter,

-                           analyzer.FunctionElement element)

-      : super(converter, element);

-}

-

-class LocalFunctionElementY extends ElementY

-    with AnalyzableElementY,

-         AstElementY,

-         LocalElementMixin,

-         FunctionElementMixin

-    implements dart2js.LocalFunctionElement {

-  analyzer.FunctionElement get element => super.element;

-

-  @override

-  dart2js.ElementKind get kind => dart2js.ElementKind.FUNCTION;

-

-  @override

-  dart2js.FunctionType get type => converter.convertType(element.type);

-

-  @override

-  bool get isAbstract => false;

-

-  @override

-  bool get isConst => false;

-

-  LocalFunctionElementY(ElementConverter converter,

-                        analyzer.FunctionElement element)

-      : super(converter, element);

-}

-

-class ParameterElementY extends ElementY

-    with AnalyzableElementY, AstElementY

-    implements dart2js.ParameterElement {

-

-  analyzer.ParameterElement get element => super.element;

-

-  @override

-  dart2js.ElementKind get kind => dart2js.ElementKind.PARAMETER;

-

-  @override

-  dart2js.DartType get type => converter.convertType(element.type);

-

-  @override

-  bool get isLocal => true;

-

-  @override

-  bool get isStatic => false;

-

-  @override

-  bool get isConst => false;

-

-  ParameterElementY(ElementConverter converter,

-                    analyzer.ParameterElement element)

-      : super(converter, element) {

-    assert(!element.isInitializingFormal);

-  }

-

-  @override

-  get executableContext => unsupported('executableContext');

-

-  @override

-  get functionDeclaration => unsupported('functionDeclaration');

-

-  @override

-  get initializer => unsupported('initializer');

-

-  @override

-  get memberContext => unsupported('memberContext');

-

-  @override

-  get functionSignature => unsupported('functionSignature');

-}

-

-class TypeDeclarationElementY extends ElementY

-    with AnalyzableElementY, AstElementY

-    implements dart2js.TypeDeclarationElement {

-

-  TypeDeclarationElementY(ElementConverter converter,

-                          analyzer.Element element)

-      : super(converter, element);

-

-  @override

-  void ensureResolved(compiler) => unsupported('ensureResolved');

-

-  @override

-  bool get isResolved => unsupported('isResolved');

-

-  @override

-  get rawType => null;//unsupported('rawType');

-

-  @override

-  int get resolutionState => unsupported('resolutionState');

-

-  @override

-  get thisType => unsupported('thisType');

-

-  @override

-  get typeVariables => unsupported('typeVariables');

-

-}

-

-class ClassElementY extends TypeDeclarationElementY

-    implements dart2js.ClassElement {

-

-  analyzer.ClassElement get element => super.element;

-

-  dart2js.ElementKind get kind => dart2js.ElementKind.CLASS;

-

-  @override

-  bool get isObject => element.type.isObject;

-

-  ClassElementY(ElementConverter converter, analyzer.ClassElement element)

-      : super(converter, element);

-

-  @override

-  void addBackendMember(element) => unsupported('addBackendMember');

-

-  @override

-  void addMember(element, listener) => unsupported('addMember');

-

-  @override

-  void addToScope(element, listener) => unsupported('addToScope');

-

-  @override

-  get allSupertypes => unsupported('allSupertypes');

-

-  @override

-  get allSupertypesAndSelf => unsupported('allSupertypesAndSelf');

-

-  @override

-  asInstanceOf(cls) => unsupported('asInstanceOf');

-

-  @override

-  get callType => unsupported('callType');

-

-  @override

-  computeTypeParameters(compiler) => unsupported('computeTypeParameters');

-

-  @override

-  get constructors => unsupported('constructors');

-

-  @override

-  void forEachBackendMember(f) => unsupported('forEachBackendMember');

-

-  @override

-  void forEachClassMember(f) => unsupported('forEachClassMember');

-

-  @override

-  void forEachInstanceField(f, {includeSuperAndInjectedMembers: false}) {

-    unsupported('forEachInstanceField');

-  }

-

-  @override

-  void forEachInterfaceMember(f) => unsupported('forEachInterfaceMember');

-

-  @override

-  void forEachLocalMember(f) => unsupported('forEachLocalMember');

-

-  @override

-  void forEachMember(f,

-                     {includeBackendMembers: false,

-                      includeSuperAndInjectedMembers: false}) {

-    unsupported('forEachMember');

-  }

-

-  @override

-  void forEachStaticField(f) => unsupported('forEachStaticField');

-

-  @override

-  bool get hasBackendMembers => unsupported('hasBackendMembers');

-

-  @override

-  bool get hasConstructor => unsupported('hasConstructor');

-

-  @override

-  bool hasFieldShadowedBy(fieldMember) => unsupported('hasFieldShadowedBy');

-

-  @override

-  bool get hasIncompleteHierarchy => unsupported('hasIncompleteHierarchy');

-

-  @override

-  bool get hasLocalScopeMembers => unsupported('hasLocalScopeMembers');

-

-  @override

-  int get hierarchyDepth => unsupported('hierarchyDepth');

-

-  @override

-  int get id => unsupported('id');

-

-  @override

-  bool implementsInterface(intrface) => unsupported('implementsInterface');

-

-  @override

-  get interfaces => unsupported('interfaces');

-

-  @override

-  bool get isProxy => unsupported('isProxy');

-

-  @override

-  bool isSubclassOf(cls) => unsupported('isSubclassOf');

-

-  @override

-  get isUnnamedMixinApplication => unsupported('isUnnamedMixinApplication');

-

-  @override

-  localLookup(String elementName) => unsupported('localLookup');

-

-  @override

-  lookupBackendMember(String memberName) => unsupported('lookupBackendMember');

-

-  @override

-  lookupClassMember(name) => unsupported('lookupClassMember');

-

-  @override

-  lookupConstructor(selector, [noMatch]) => unsupported('lookupConstructor');

-

-  @override

-  lookupInterfaceMember(name) => unsupported('lookupInterfaceMember');

-

-  @override

-  lookupLocalMember(String memberName) => unsupported('lookupLocalMember');

-

-  @override

-  lookupMember(String memberName) => unsupported('lookupMember');

-

-  @override

-  lookupSelector(selector) => unsupported('lookupSelector');

-

-  @override

-  lookupSuperMember(String memberName) => unsupported('lookupSuperMember');

-

-  @override

-  lookupSuperMemberInLibrary(memberName, library) {

-    unsupported('lookupSuperMemberInLibrary');

-  }

-

-  @override

-  lookupSuperSelector(selector) => unsupported('lookupSuperSelector');

-

-  @override

-  String get nativeTagInfo => unsupported('nativeTagInfo');

-

-  @override

-  void reverseBackendMembers() => unsupported('reverseBackendMembers');

-

-  @override

-  void setDefaultConstructor(constructor, compiler) {

-    unsupported('setDefaultConstructor');

-  }

-

-  @override

-  dart2js.ClassElement get superclass => unsupported('superclass');

-

-  // TODO(johnniwinther): Semantic difference: Dart2js points to unnamed

-  // mixin applications, analyzer points to the type in the extends clause or

-  // Object if omitted.

-  @override

-  dart2js.DartType get supertype => unsupported('supertype');

-

-  @override

-  int get supertypeLoadState => unsupported('supertypeLoadState');

-

-  @override

-  validateConstructorLookupResults(selector,  result, noMatch) {

-    unsupported('validateConstructorLookupResults');

-  }

-

-  @override

-  bool get isEnumClass => unsupported('isEnum');

-}

-

-class TypedefElementY extends TypeDeclarationElementY

-    implements dart2js.TypedefElement {

-

-  analyzer.FunctionTypeAliasElement get element => super.element;

-

-  dart2js.ElementKind get kind => dart2js.ElementKind.TYPEDEF;

-

-  TypedefElementY(ElementConverter converter,

-                  analyzer.FunctionTypeAliasElement element)

-      : super(converter, element);

-

-  @override

-  dart2js.DartType get alias => unsupported('alias');

-

-  @override

-  void checkCyclicReference(compiler) => unsupported('checkCyclicReference');

-

-  @override

-  get functionSignature => unsupported('functionSignature');

-}

-

-abstract class VariableElementMixin

-    implements ElementY, dart2js.VariableElement {

-  @override

-  get initializer => unsupported('initializer');

-

-  @override

-  get memberContext => unsupported('memberContext');

-}

-

-class TopLevelVariableElementY extends ElementY

-    with AnalyzableElementY,

-         AstElementY,

-         TopLevelElementMixin,

-         VariableElementMixin

-    implements dart2js.FieldElement {

-

-  analyzer.TopLevelVariableElement get element => super.element;

-

-  dart2js.ElementKind get kind => dart2js.ElementKind.FIELD;

-

-  @override

-  dart2js.DartType get type => converter.convertType(element.type);

-

-  TopLevelVariableElementY(ElementConverter converter,

-                           analyzer.TopLevelVariableElement element)

-      : super(converter, element);

-

-  @override

-  get nestedClosures => unsupported('nestedClosures');

-}

-

-abstract class LocalElementMixin implements ElementY, dart2js.LocalElement {

-

-  @override

-  bool get isLocal => true;

-

-  @override

-  bool get isStatic => false;

-

-  @override

-  get executableContext => unsupported('executableContext');

-

-  // TODO(johnniwinther): Ensure the correct semantics of this.

-  @override

-  bool get isFactoryConstructor => false;

-}

-

-class LocalVariableElementY extends ElementY

-    with AnalyzableElementY,

-         AstElementY,

-         LocalElementMixin,

-         VariableElementMixin

-    implements dart2js.LocalVariableElement {

-

-  analyzer.LocalVariableElement get element => super.element;

-

-  dart2js.ElementKind get kind => dart2js.ElementKind.VARIABLE;

-

-  @override

-  bool get isConst => element.isConst;

-

-  LocalVariableElementY(ElementConverter converter,

-                        analyzer.LocalVariableElement element)

-      : super(converter, element);

-

-  @override

-  dart2js.DartType get type => unsupported('type');

-}

-

-class ConstructorElementY extends ElementY

-    with AnalyzableElementY,

-         AstElementY,

-         FunctionElementMixin

-    implements dart2js.ConstructorElement {

-

-  analyzer.ConstructorElement get element => super.element;

-

-  @override

-  dart2js.ClassElement get enclosingClass {

-    return converter.convertElement(element.enclosingElement);

-  }

-

-  // TODO(johnniwinther): Support redirecting/factory constructors.

-  @override

-  dart2js.ElementKind get kind => dart2js.ElementKind.GENERATIVE_CONSTRUCTOR;

-

-  ConstructorElementY(ElementConverter converter,

-                      analyzer.ConstructorElement element)

-      : super(converter, element);

-

-  @override

-  computeEffectiveTargetType(_) => unsupported('computeEffectiveTargetType');

-

-  @override

-  get definingConstructor => unsupported('definingConstructor');

-

-  @override

-  get effectiveTarget => unsupported('effectiveTarget');

-

-  @override

-  get immediateRedirectionTarget => unsupported('immediateRedirectionTarget');

-

-  @override

-  bool get isRedirectingFactory => unsupported('isRedirectingFactory');

-

-  @override

-  get nestedClosures => unsupported('nestedClosures');

-

-  @override

-  get type => unsupported('type');

-}
\ No newline at end of file
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of analyzer2dart.element_converter;
+
+
+/// Base [dart2js.Element] implementation for converted analyzer elements.
+class ElementY extends dart2js.Element {
+  final ElementConverter converter;
+  final analyzer.Element element;
+
+  @override
+  String get name => element.name;
+
+  ElementY(this.converter, this.element);
+
+  @override
+  dart2js.LibraryElement get implementationLibrary => library;
+
+  @override
+  dart2js.Element get origin => this;
+
+  @override
+  dart2js.Element get patch => null;
+
+  @override
+  dart2js.Element get declaration => this;
+
+  @override
+  dart2js.Element get implementation => this;
+
+  @override
+  bool get isPatch => false;
+
+  @override
+  bool get isPatched => false;
+
+  @override
+  bool get isDeclaration => true;
+
+  @override
+  bool get isImplementation => false;
+
+  @override
+  dart2js.LibraryElement get library {
+    return converter.convertElement(element.library);
+  }
+
+  @override
+  bool get isLocal => false;
+
+  unsupported(String method) {
+    throw new UnsupportedError(
+        "'$method' is unsupported on $this ($runtimeType)");
+  }
+
+
+  @override
+  bool get isFinal => unsupported('isFinal');
+
+  @override
+  bool get isStatic => unsupported('isStatic');
+
+  @override
+  bool isForeign(_) => unsupported('isForeign');
+
+  @override
+  bool get impliesType => unsupported('impliesType');
+
+  @override
+  bool get isOperator => unsupported('impliesType');
+
+  @override
+  get position => unsupported('position');
+
+  @override
+  computeType(_) => unsupported('computeType');
+
+  @override
+  get enclosingElement => unsupported('enclosingElement');
+
+  @override
+  accept(_) => unsupported('accept');
+
+  @override
+  void addMetadata(_) => unsupported('addMetadata');
+
+  @override
+  get analyzableElement => unsupported('analyzableElement');
+
+  @override
+  asFunctionElement() => unsupported('asFunctionElement');
+
+  @override
+  buildScope() => unsupported('buildScope');
+
+  @override
+  get compilationUnit => unsupported('compilationUnit');
+
+  @override
+  get contextClass => unsupported('contextClass');
+
+  @override
+  void diagnose(context, listener) => unsupported('diagnose');
+
+  @override
+  get enclosingClass => unsupported('enclosingClass');
+
+  @override
+  get enclosingClassOrCompilationUnit {
+    return unsupported('enclosingClassOrCompilationUnit');
+  }
+
+  @override
+  String get fixedBackendName => unsupported('fixedBackendName');
+
+  @override
+  bool get hasFixedBackendName => unsupported('hasFixedBackendName');
+
+  @override
+  bool get isAbstract => unsupported('isAbstract');
+
+  @override
+  bool get isAssignable => unsupported('isAssignable');
+
+  @override
+  bool get isClassMember => unsupported('isClassMember');
+
+  @override
+  bool get isClosure => unsupported('isClosure');
+
+  @override
+  bool get isConst => unsupported('isConst');
+
+  @override
+  bool get isDeferredLoaderGetter => unsupported('isDeferredLoaderGetter');
+
+  @override
+  bool get isFactoryConstructor => unsupported('isFactoryConstructor');
+
+  @override
+  bool get isForwardingConstructor => unsupported('isForwardingConstructor');
+
+  @override
+  bool get isInjected => unsupported('isInjected');
+
+  @override
+  bool get isInstanceMember => unsupported('isInstanceMember');
+
+  @override
+  bool get isMixinApplication => unsupported('isMixinApplication');
+
+  @override
+  bool get isNative => unsupported('isNative');
+
+  @override
+  bool get isSynthesized => unsupported('isSynthesized');
+
+  @override
+  bool get isTopLevel => unsupported('isTopLevel');
+
+  @override
+  get kind => unsupported('kind');
+
+  @override
+  get metadata => unsupported('metadata');
+
+  @override
+  get outermostEnclosingMemberOrTopLevel {
+    return unsupported('outermostEnclosingMemberOrTopLevel');
+  }
+
+  @override
+  void setFixedBackendName(String name) => unsupported('setFixedBackendName');
+
+  @override
+  void setNative(String name) => unsupported('setNative');
+
+  String toString() => '$kind($name)';
+}
+
+abstract class AnalyzableElementY
+    implements ElementY, dart2js.AnalyzableElement {
+  @override
+  bool get hasTreeElements => unsupported('hasTreeElements');
+
+  @override
+  get treeElements => unsupported('treeElements');
+}
+
+abstract class AstElementY implements ElementY, dart2js.AstElement {
+  @override
+  bool get hasNode => unsupported('hasNode');
+
+  @override
+  get node => unsupported('node');
+
+  @override
+  bool get hasResolvedAst => unsupported('hasResolvedAst');
+
+  @override
+  get resolvedAst => unsupported('resolvedAst');
+}
+
+class LibraryElementY extends ElementY with AnalyzableElementY
+    implements dart2js.LibraryElement {
+  analyzer.LibraryElement get element => super.element;
+
+  @override
+  dart2js.ElementKind get kind => dart2js.ElementKind.LIBRARY;
+
+  // TODO(johnniwinther): Ensure the correct semantics of this.
+  @override
+  bool get isInternalLibrary => isPlatformLibrary && element.isPrivate;
+
+  // TODO(johnniwinther): Ensure the correct semantics of this.
+  @override
+  bool get isPlatformLibrary => element.isInSdk;
+
+  @override
+  bool get isDartCore => element.isDartCore;
+
+  LibraryElementY(ElementConverter converter, analyzer.LibraryElement element)
+      : super(converter, element);
+
+  @override
+  void addCompilationUnit(_) => unsupported('addCompilationUnit');
+
+  @override
+  void addImport(element, import, listener) => unsupported('addImport');
+
+  @override
+  void addMember(element, listener) => unsupported('addMember');
+
+  @override
+  void addTag(tag, listener) => unsupported('addTag');
+
+  @override
+  void addToScope(element, listener) => unsupported('addToScope');
+
+  @override
+  void set canUseNative(bool value) => unsupported('canUseNative');
+
+  @override
+  bool get canUseNative => unsupported('canUseNative');
+
+  @override
+  Uri get canonicalUri => unsupported('canonicalUri');
+
+  @override
+  int compareTo(other) => unsupported('compareTo');
+
+  @override
+  get compilationUnits => unsupported('compilationUnits');
+
+  @override
+  get entryCompilationUnit => unsupported('entryCompilationUnit');
+
+  @override
+  get exports => unsupported('exports');
+
+  @override
+  bool get exportsHandled => unsupported('exportsHandled');
+
+  @override
+  find(String elementName) => unsupported('find');
+
+  @override
+  findExported(String elementName) => unsupported('findExported');
+
+  @override
+  findLocal(String elementName) => unsupported('findLocal');
+
+  @override
+  void forEachExport(_) => unsupported('forEachExport');
+
+  @override
+  void forEachLocalMember(_) => unsupported('forEachLocalMember');
+
+  @override
+  getImportsFor(element) => unsupported('getImportsFor');
+
+  @override
+  getLibraryFromTag(tag) => unsupported('getLibraryFromTag');
+
+  @override
+  String getLibraryName() => unsupported('getLibraryName');
+
+  @override
+  String getLibraryOrScriptName() => unsupported('getLibraryOrScriptName');
+
+  @override
+  getNonPrivateElementsInScope() => unsupported('getNonPrivateElementsInScope');
+
+  @override
+  bool hasLibraryName() => unsupported('hasLibraryName');
+
+  @override
+  bool get isPackageLibrary => unsupported('isPackageLibrary');
+
+  @override
+  get libraryTag => unsupported('libraryTag');
+
+  @override
+  void set libraryTag(value) => unsupported('libraryTag');
+
+  @override
+  localLookup(elementName) => unsupported('localLookup');
+
+  @override
+  void recordResolvedTag(tag, library) => unsupported('recordResolvedTag');
+
+  @override
+  void setExports(exportedElements) => unsupported('setExports');
+
+  @override
+  get tags => unsupported('tags');
+}
+
+abstract class TopLevelElementMixin implements ElementY {
+  @override
+  bool get isClassMember => false;
+
+  @override
+  bool get isInstanceMember => false;
+
+  @override
+  bool get isTopLevel => true;
+
+  // TODO(johnniwinther): Ensure the correct semantics of this.
+  @override
+  bool get isFactoryConstructor => false;
+
+  @override
+  bool get isStatic {
+    // Semantic difference: Analyzer considers top-level and static class
+    // members to be static, dart2js only considers static class members to be
+    // static.
+    return false;
+  }
+
+  // TODO(johnniwinther): Ensure the correct semantics of this.
+  @override
+  bool get isAbstract => false;
+}
+
+abstract class FunctionElementMixin
+    implements ElementY, dart2js.FunctionElement {
+  @override
+  get abstractField => unsupported('abstractField');
+
+  @override
+  computeSignature(_) => unsupported('computeSignature');
+
+  @override
+  get memberContext => unsupported('memberContext');
+
+  @override
+  get functionSignature => unsupported('functionSignature');
+
+  @override
+  bool get hasFunctionSignature => unsupported('hasFunctionSignature');
+
+  @override
+  get asyncMarker => unsupported('asyncMarker');
+}
+
+class TopLevelFunctionElementY extends ElementY
+    with AnalyzableElementY,
+         AstElementY,
+         TopLevelElementMixin,
+         FunctionElementMixin
+    implements dart2js.FunctionElement {
+  analyzer.FunctionElement get element => super.element;
+
+  @override
+  dart2js.ElementKind get kind => dart2js.ElementKind.FUNCTION;
+
+  @override
+  dart2js.FunctionType get type => converter.convertType(element.type);
+
+  TopLevelFunctionElementY(ElementConverter converter,
+                           analyzer.FunctionElement element)
+      : super(converter, element);
+}
+
+class LocalFunctionElementY extends ElementY
+    with AnalyzableElementY,
+         AstElementY,
+         LocalElementMixin,
+         FunctionElementMixin
+    implements dart2js.LocalFunctionElement {
+  analyzer.FunctionElement get element => super.element;
+
+  @override
+  dart2js.ElementKind get kind => dart2js.ElementKind.FUNCTION;
+
+  @override
+  dart2js.FunctionType get type => converter.convertType(element.type);
+
+  @override
+  bool get isAbstract => false;
+
+  @override
+  bool get isConst => false;
+
+  LocalFunctionElementY(ElementConverter converter,
+                        analyzer.FunctionElement element)
+      : super(converter, element);
+}
+
+class ParameterElementY extends ElementY
+    with AnalyzableElementY, AstElementY
+    implements dart2js.ParameterElement {
+
+  analyzer.ParameterElement get element => super.element;
+
+  @override
+  dart2js.ElementKind get kind => dart2js.ElementKind.PARAMETER;
+
+  @override
+  dart2js.DartType get type => converter.convertType(element.type);
+
+  @override
+  bool get isLocal => true;
+
+  @override
+  bool get isStatic => false;
+
+  @override
+  bool get isConst => false;
+
+  ParameterElementY(ElementConverter converter,
+                    analyzer.ParameterElement element)
+      : super(converter, element) {
+    assert(!element.isInitializingFormal);
+  }
+
+  @override
+  get executableContext => unsupported('executableContext');
+
+  @override
+  get functionDeclaration => unsupported('functionDeclaration');
+
+  @override
+  get initializer => unsupported('initializer');
+
+  @override
+  get memberContext => unsupported('memberContext');
+
+  @override
+  get functionSignature => unsupported('functionSignature');
+}
+
+class TypeDeclarationElementY extends ElementY
+    with AnalyzableElementY, AstElementY
+    implements dart2js.TypeDeclarationElement {
+
+  TypeDeclarationElementY(ElementConverter converter,
+                          analyzer.Element element)
+      : super(converter, element);
+
+  @override
+  void ensureResolved(compiler) => unsupported('ensureResolved');
+
+  @override
+  bool get isResolved => unsupported('isResolved');
+
+  @override
+  get rawType => null;//unsupported('rawType');
+
+  @override
+  int get resolutionState => unsupported('resolutionState');
+
+  @override
+  get thisType => unsupported('thisType');
+
+  @override
+  get typeVariables => unsupported('typeVariables');
+
+}
+
+class ClassElementY extends TypeDeclarationElementY
+    implements dart2js.ClassElement {
+
+  analyzer.ClassElement get element => super.element;
+
+  dart2js.ElementKind get kind => dart2js.ElementKind.CLASS;
+
+  @override
+  bool get isObject => element.type.isObject;
+
+  ClassElementY(ElementConverter converter, analyzer.ClassElement element)
+      : super(converter, element);
+
+  @override
+  void addBackendMember(element) => unsupported('addBackendMember');
+
+  @override
+  void addMember(element, listener) => unsupported('addMember');
+
+  @override
+  void addToScope(element, listener) => unsupported('addToScope');
+
+  @override
+  get allSupertypes => unsupported('allSupertypes');
+
+  @override
+  get allSupertypesAndSelf => unsupported('allSupertypesAndSelf');
+
+  @override
+  asInstanceOf(cls) => unsupported('asInstanceOf');
+
+  @override
+  get callType => unsupported('callType');
+
+  @override
+  computeTypeParameters(compiler) => unsupported('computeTypeParameters');
+
+  @override
+  get constructors => unsupported('constructors');
+
+  @override
+  void forEachBackendMember(f) => unsupported('forEachBackendMember');
+
+  @override
+  void forEachClassMember(f) => unsupported('forEachClassMember');
+
+  @override
+  void forEachInstanceField(f, {includeSuperAndInjectedMembers: false}) {
+    unsupported('forEachInstanceField');
+  }
+
+  @override
+  void forEachInterfaceMember(f) => unsupported('forEachInterfaceMember');
+
+  @override
+  void forEachLocalMember(f) => unsupported('forEachLocalMember');
+
+  @override
+  void forEachMember(f,
+                     {includeBackendMembers: false,
+                      includeSuperAndInjectedMembers: false}) {
+    unsupported('forEachMember');
+  }
+
+  @override
+  void forEachStaticField(f) => unsupported('forEachStaticField');
+
+  @override
+  bool get hasBackendMembers => unsupported('hasBackendMembers');
+
+  @override
+  bool get hasConstructor => unsupported('hasConstructor');
+
+  @override
+  bool hasFieldShadowedBy(fieldMember) => unsupported('hasFieldShadowedBy');
+
+  @override
+  bool get hasIncompleteHierarchy => unsupported('hasIncompleteHierarchy');
+
+  @override
+  bool get hasLocalScopeMembers => unsupported('hasLocalScopeMembers');
+
+  @override
+  int get hierarchyDepth => unsupported('hierarchyDepth');
+
+  @override
+  int get id => unsupported('id');
+
+  @override
+  bool implementsFunction(compiler) => unsupported('implementsFunction');
+
+  @override
+  bool implementsInterface(intrface) => unsupported('implementsInterface');
+
+  @override
+  get interfaces => unsupported('interfaces');
+
+  @override
+  bool get isProxy => unsupported('isProxy');
+
+  @override
+  bool isSubclassOf(cls) => unsupported('isSubclassOf');
+
+  @override
+  get isUnnamedMixinApplication => unsupported('isUnnamedMixinApplication');
+
+  @override
+  localLookup(String elementName) => unsupported('localLookup');
+
+  @override
+  lookupBackendMember(String memberName) => unsupported('lookupBackendMember');
+
+  @override
+  lookupClassMember(name) => unsupported('lookupClassMember');
+
+  @override
+  lookupConstructor(selector, [noMatch]) => unsupported('lookupConstructor');
+
+  @override
+  lookupInterfaceMember(name) => unsupported('lookupInterfaceMember');
+
+  @override
+  lookupLocalMember(String memberName) => unsupported('lookupLocalMember');
+
+  @override
+  lookupMember(String memberName) => unsupported('lookupMember');
+
+  @override
+  lookupSelector(selector) => unsupported('lookupSelector');
+
+  @override
+  lookupSuperMember(String memberName) => unsupported('lookupSuperMember');
+
+  @override
+  lookupSuperMemberInLibrary(memberName, library) {
+    unsupported('lookupSuperMemberInLibrary');
+  }
+
+  @override
+  lookupSuperSelector(selector) => unsupported('lookupSuperSelector');
+
+  @override
+  String get nativeTagInfo => unsupported('nativeTagInfo');
+
+  @override
+  void reverseBackendMembers() => unsupported('reverseBackendMembers');
+
+  @override
+  void setDefaultConstructor(constructor, compiler) {
+    unsupported('setDefaultConstructor');
+  }
+
+  @override
+  dart2js.ClassElement get superclass => unsupported('superclass');
+
+  // TODO(johnniwinther): Semantic difference: Dart2js points to unnamed
+  // mixin applications, analyzer points to the type in the extends clause or
+  // Object if omitted.
+  @override
+  dart2js.DartType get supertype => unsupported('supertype');
+
+  @override
+  int get supertypeLoadState => unsupported('supertypeLoadState');
+
+  @override
+  validateConstructorLookupResults(selector,  result, noMatch) {
+    unsupported('validateConstructorLookupResults');
+  }
+
+  @override
+  bool get isEnumClass => unsupported('isEnum');
+}
+
+class TypedefElementY extends TypeDeclarationElementY
+    implements dart2js.TypedefElement {
+
+  analyzer.FunctionTypeAliasElement get element => super.element;
+
+  dart2js.ElementKind get kind => dart2js.ElementKind.TYPEDEF;
+
+  TypedefElementY(ElementConverter converter,
+                  analyzer.FunctionTypeAliasElement element)
+      : super(converter, element);
+
+  @override
+  dart2js.DartType get alias => unsupported('alias');
+
+  @override
+  void checkCyclicReference(compiler) => unsupported('checkCyclicReference');
+
+  @override
+  get functionSignature => unsupported('functionSignature');
+}
+
+abstract class VariableElementMixin
+    implements ElementY, dart2js.VariableElement {
+  @override
+  get initializer => unsupported('initializer');
+
+  @override
+  get memberContext => unsupported('memberContext');
+}
+
+class TopLevelVariableElementY extends ElementY
+    with AnalyzableElementY,
+         AstElementY,
+         TopLevelElementMixin,
+         VariableElementMixin
+    implements dart2js.FieldElement {
+
+  analyzer.TopLevelVariableElement get element => super.element;
+
+  dart2js.ElementKind get kind => dart2js.ElementKind.FIELD;
+
+  @override
+  dart2js.DartType get type => converter.convertType(element.type);
+
+  TopLevelVariableElementY(ElementConverter converter,
+                           analyzer.TopLevelVariableElement element)
+      : super(converter, element);
+
+  @override
+  get nestedClosures => unsupported('nestedClosures');
+}
+
+abstract class LocalElementMixin implements ElementY, dart2js.LocalElement {
+
+  @override
+  bool get isLocal => true;
+
+  @override
+  bool get isStatic => false;
+
+  @override
+  get executableContext => unsupported('executableContext');
+
+  // TODO(johnniwinther): Ensure the correct semantics of this.
+  @override
+  bool get isFactoryConstructor => false;
+}
+
+class LocalVariableElementY extends ElementY
+    with AnalyzableElementY,
+         AstElementY,
+         LocalElementMixin,
+         VariableElementMixin
+    implements dart2js.LocalVariableElement {
+
+  analyzer.LocalVariableElement get element => super.element;
+
+  dart2js.ElementKind get kind => dart2js.ElementKind.VARIABLE;
+
+  @override
+  bool get isConst => element.isConst;
+
+  LocalVariableElementY(ElementConverter converter,
+                        analyzer.LocalVariableElement element)
+      : super(converter, element);
+
+  @override
+  dart2js.DartType get type => unsupported('type');
+}
+
+class ConstructorElementY extends ElementY
+    with AnalyzableElementY,
+         AstElementY,
+         FunctionElementMixin
+    implements dart2js.ConstructorElement {
+
+  analyzer.ConstructorElement get element => super.element;
+
+  @override
+  dart2js.ClassElement get enclosingClass {
+    return converter.convertElement(element.enclosingElement);
+  }
+
+  // TODO(johnniwinther): Support redirecting/factory constructors.
+  @override
+  dart2js.ElementKind get kind => dart2js.ElementKind.GENERATIVE_CONSTRUCTOR;
+
+  ConstructorElementY(ElementConverter converter,
+                      analyzer.ConstructorElement element)
+      : super(converter, element);
+
+  @override
+  computeEffectiveTargetType(_) => unsupported('computeEffectiveTargetType');
+
+  @override
+  get definingConstructor => unsupported('definingConstructor');
+
+  @override
+  get effectiveTarget => unsupported('effectiveTarget');
+
+  @override
+  get immediateRedirectionTarget => unsupported('immediateRedirectionTarget');
+
+  @override
+  bool get isRedirectingFactory => unsupported('isRedirectingFactory');
+
+  @override
+  get nestedClosures => unsupported('nestedClosures');
+
+  @override
+  get type => unsupported('type');
+}
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index f8b7844..6341a3b 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -1337,11 +1337,15 @@
   /// Returns `true` if this class is `Object` from dart:core.
   bool get isObject;
 
+  /// Returns `true` if this class implements [Function] either by directly
+  /// implementing the interface or by providing a [call] method.
+  bool implementsFunction(Compiler compiler);
+
   bool isSubclassOf(ClassElement cls);
   /// Returns true if `this` explicitly/nominally implements [intrface].
   ///
   /// Note that, if [intrface] is the `Function` class, this method returns
-  /// falso for a class that has a `call` method but does not explicitly
+  /// false for a class that has a `call` method but does not explicitly
   /// implement `Function`.
   bool implementsInterface(ClassElement intrface);
   bool hasFieldShadowedBy(Element fieldMember);
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index e862b14..c0feddb 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2285,6 +2285,10 @@
     backendMembers.forEach(f);
   }
 
+  bool implementsFunction(Compiler compiler) {
+    return asInstanceOf(compiler.functionClass) != null || callType != null;
+  }
+
   bool implementsInterface(ClassElement intrface) {
     for (DartType implementedInterfaceType in allSupertypes) {
       ClassElement implementedInterface = implementedInterfaceType.element;
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index e5905ff..6534bbe 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -104,14 +104,22 @@
     workList.add(info);
   }
 
+  bool _wouldBeTooManyUsers(Set users) {
+    int seenSoFar = analyzedElements.length;
+    if (seenSoFar + users.length <= MAX_ANALYSIS_COUNT) return false;
+    int actualWork = users
+        .where((TypeInformation user) => !analyzedElements.contains(user.owner))
+        .length;
+    return seenSoFar + actualWork > MAX_ANALYSIS_COUNT;
+  }
+
   void analyze() {
     // Collect the [TypeInformation] where the list can flow in,
     // as well as the operations done on all these [TypeInformation]s.
     addNewEscapeInformation(tracedType);
     while (!workList.isEmpty) {
       currentUser = workList.removeLast();
-      int expectedWork = analyzedElements.length + currentUser.users.length;
-      if (expectedWork > MAX_ANALYSIS_COUNT) {
+      if (_wouldBeTooManyUsers(currentUser.users)) {
         bailout('Too many users');
         break;
       }
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 8941c7b..bea6f60 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -167,10 +167,10 @@
 
   accept(TypeInformationVisitor visitor);
 
-  /// The [Element] where this [TypeInformation] was created. May be
+  /// The [Element] where this [TypeInformation] was created. May be `null`
   /// for some [TypeInformation] nodes, where we do not need to store
   /// the information.
-  Element get owner => null;
+  Element get owner => (context != null) ? context.element : null;
 
   /// Returns whether the type cannot change after it has been
   /// inferred.
@@ -472,8 +472,6 @@
     return visitor.visitMemberTypeInformation(this);
   }
 
-  Element get owner => element.outermostEnclosingMemberOrTopLevel;
-
   bool hasStableType(TypeGraphInferrerEngine inferrer) {
     // The number of assignments of non-final fields is
     // not stable. Therefore such a field cannot be stable.
@@ -639,8 +637,6 @@
 
   /// Return an iterable over the targets of this call.
   Iterable<Element> get callees;
-
-  Element get owner => caller;
 }
 
 class StaticCallSiteTypeInformation extends CallSiteTypeInformation {
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index fd49c22..e206f95 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -351,6 +351,7 @@
   }
 
   List buildSplitOffAliases() {
+    if (backend.aliasedSuperMembers.isEmpty) return [];
     return [js(r'''
         var splitOffAliases = function(constructor) {
           var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -539,7 +540,7 @@
 
         // Process aliased members due to super calls. We have to do this early
         // to ensure that we also hit the object class.
-        splitOffAliases(constructor);
+        if (#) splitOffAliases(constructor);
 
         // The superclass is only false (empty string) for the Dart Object
         // class.  The minifier together with noSuchMethod can put methods on
@@ -605,6 +606,7 @@
         }
       }
     }''', [finishedClassesAccess,
+           backend.aliasedSuperMembers.isNotEmpty,
            !nativeClasses.isEmpty,
            interceptorsByTagAccess,
            leafTagsAccess,
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart
index 5fc4d0c..aa88a7a 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart
@@ -168,10 +168,14 @@
         call = cls.lookupBackendMember(Compiler.CALL_OPERATOR_NAME);
       }
       if (call != null && call.isFunction) {
-        generateInterfacesIsTests(compiler.functionClass,
-                                  emitIsTest,
-                                  emitSubstitution,
-                                  generated);
+        // A superclass might already implement the Function interface. In such
+        // a case, we can avoid emiting the is test here.
+        if (!cls.superclass.implementsFunction(compiler)) {
+          generateInterfacesIsTests(compiler.functionClass,
+                                    emitIsTest,
+                                    emitSubstitution,
+                                    generated);
+        }
         FunctionType callType = call.computeType(compiler);
         Map<FunctionType, bool> functionTypeChecks =
             getFunctionTypeChecksOn(callType);
diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart
index d400306..9a0e5af 100644
--- a/runtime/bin/stdio_patch.dart
+++ b/runtime/bin/stdio_patch.dart
@@ -30,7 +30,7 @@
       case _STDIO_HANDLE_TYPE_PIPE:
       case _STDIO_HANDLE_TYPE_SOCKET:
       case _STDIO_HANDLE_TYPE_FILE:
-        return wrap(new IOSink(new _FileStreamConsumer.fromStdio(fd)));
+        return wrap(new IOSink(new _StdConsumer(fd)));
       default:
         throw new FileSystemException("Unsupported stdin type");
     }
diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart
index b8a8524..c824217 100644
--- a/runtime/lib/core_patch.dart
+++ b/runtime/lib/core_patch.dart
@@ -10,3 +10,14 @@
 void  _asyncCatchHelper(catchFunction, continuation) {
   catchFunction((e) => continuation(null, e));
 }
+
+// The members of this class are cloned and added to each class that
+// represents an enum type.
+class _EnumHelper {
+  // Declare the list of enum value names private. When this field is
+  // cloned into a user-defined enum class, the field will be inaccessible
+  // because of the library-specific name suffix. The toString() function
+  // below can access it because it uses the same name suffix.
+  static const List<String> _enum_names = null;
+  String toString() => _enum_names[index];
+}
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 9868440..c495a76 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -2346,6 +2346,50 @@
     CollectImmediateSuperInterfaces(cls, &cids);
     RemoveCHAOptimizedCode(cids);
   }
+  if (cls.is_enum_class()) {
+    AllocateEnumValues(cls);
+  }
+}
+
+
+// Allocate instances for each enumeration value, and populate the
+// static field 'values'.
+// By allocating the instances programmatically, we save an implicit final
+// getter function object for each enumeration value and for the
+// values field. We also don't have to generate the code for these getters
+// from thin air (no source code is available).
+void ClassFinalizer::AllocateEnumValues(const Class &enum_cls) {
+  const Field& index_field =
+      Field::Handle(enum_cls.LookupInstanceField(Symbols::Index()));
+  ASSERT(!index_field.IsNull());
+  const Field& values_field =
+      Field::Handle(enum_cls.LookupStaticField(Symbols::Values()));
+  ASSERT(!values_field.IsNull());
+  ASSERT(Instance::Handle(values_field.value()).IsArray());
+  Array& values_list = Array::Handle(Array::RawCast(values_field.value()));
+
+  const Array& fields = Array::Handle(enum_cls.fields());
+  Field& field = Field::Handle();
+  Instance& ordinal_value = Instance::Handle();
+  Instance& enum_value = Instance::Handle();
+
+  for (intptr_t i = 0; i < fields.Length(); i++) {
+    field = Field::RawCast(fields.At(i));
+    if (!field.is_static()) continue;
+    ordinal_value = field.value();
+    // The static fields that need to be initialized with enum instances
+    // contain the smi value of the ordinal number, which was stored in
+    // the field by the parser. Other fields contain non-smi values.
+    if (!ordinal_value.IsSmi()) continue;
+    enum_value = Instance::New(enum_cls, Heap::kOld);
+    enum_value.SetField(index_field, ordinal_value);
+    field.set_value(enum_value);
+    field.RecordStore(enum_value);
+    intptr_t ord = Smi::Cast(ordinal_value).Value();
+    ASSERT(ord < values_list.Length());
+    values_list.SetAt(ord, enum_value);
+  }
+  values_list.MakeImmutable();
 }
 
 
@@ -2726,7 +2770,13 @@
                 "class '%s' may not extend function type alias '%s'",
                 String::Handle(isolate, cls.Name()).ToCString(),
                 String::Handle(isolate,
-                                  super_type.UserVisibleName()).ToCString());
+                               super_type.UserVisibleName()).ToCString());
+  }
+  if (interface_class.is_enum_class()) {
+    ReportError(cls, cls.token_pos(),
+                "class '%s' may not extend enum '%s'",
+                String::Handle(isolate, cls.Name()).ToCString(),
+                String::Handle(isolate, interface_class.Name()).ToCString());
   }
 
   // If cls belongs to core lib or to core lib's implementation, restrictions
@@ -2803,6 +2853,13 @@
                   "function type alias '%s' may not be used as interface",
                   interface_name.ToCString());
     }
+    if (interface_class.is_enum_class()) {
+      const String& interface_name = String::Handle(isolate,
+                                                    interface_class.Name());
+      ReportError(cls, cls.token_pos(),
+                  "enum '%s' may not be used as interface",
+                  interface_name.ToCString());
+    }
     // Verify that unless cls belongs to core lib, it cannot extend, implement,
     // or mixin any of Null, bool, num, int, double, String, dynamic.
     if (!cls_belongs_to_core_lib) {
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index 5987a48..be4c987 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -109,6 +109,7 @@
                              GrowableObjectArray* pending_types = NULL);
 
  private:
+  static void AllocateEnumValues(const Class& enum_cls);
   static bool IsSuperCycleFree(const Class& cls);
   static bool IsTypeCycleFree(const Class& cls,
                               const AbstractType& type,
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index a86a2cc..d74a42c 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -32,21 +32,21 @@
 // (factory-name-symbol, result-cid, fingerprint).
 // TODO(srdjan): Store the values in the snapshot instead.
 #define RECOGNIZED_LIST_FACTORY_LIST(V)                                        \
-  V(_ListFactory, kArrayCid, 1595327584)                                       \
-  V(_GrowableListWithData, kGrowableObjectArrayCid, 732923072)                 \
-  V(_GrowableListFactory, kGrowableObjectArrayCid, 1956565810)                 \
-  V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 1499010120)                     \
-  V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 354210806)                    \
-  V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 231626935)      \
-  V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 1044203454)                   \
-  V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 616427808)                  \
-  V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 26656923)                     \
-  V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 297463966)                  \
-  V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 105050331)                    \
-  V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1469861670)                 \
-  V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 342242776)                \
-  V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 105860920)                \
-  V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1217848993)           \
+  V(_ListFactory, kArrayCid, 335347617)                                        \
+  V(_GrowableListWithData, kGrowableObjectArrayCid, 536409567)                 \
+  V(_GrowableListFactory, kGrowableObjectArrayCid, 619206641)                  \
+  V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 1234236264)                     \
+  V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 89436950)                     \
+  V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 2114336727)     \
+  V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 779429598)                    \
+  V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 351653952)                  \
+  V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 1909366715)                   \
+  V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 32690110)                   \
+  V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 1987760123)                   \
+  V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1205087814)                 \
+  V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 77468920)                 \
+  V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1988570712)               \
+  V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 953075137)            \
 
 
 // Class that recognizes factories and returns corresponding result cid.
diff --git a/runtime/vm/method_recognizer.h b/runtime/vm/method_recognizer.h
index 13af219..8d4b7274 100644
--- a/runtime/vm/method_recognizer.h
+++ b/runtime/vm/method_recognizer.h
@@ -14,9 +14,9 @@
 // correct fingerprint from the mismatch error.
 #define OTHER_RECOGNIZED_LIST(V)                                               \
   V(::, identical, ObjectIdentical, 496869842)                                 \
-  V(ClassID, getID, ClassIDgetID, 1322490980)                                  \
+  V(ClassID, getID, ClassIDgetID, 1662520165)                                  \
   V(Object, Object., ObjectConstructor, 1066669787)                            \
-  V(_List, ., ObjectArrayAllocate, 1595327584)                                 \
+  V(_List, ., ObjectArrayAllocate, 335347617)                                  \
   V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1541411498)                    \
   V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 1032404349)                  \
   V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 381073990)                   \
@@ -28,19 +28,19 @@
   V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1792407200)              \
   V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1338379857)          \
   V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 1469917805)              \
-  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 433348464)                     \
-  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 149406583)                   \
-  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 805477162)                   \
-  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 888580944)                 \
-  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1708248181)                  \
-  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1863152792)                \
-  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 1473080053)                  \
-  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1148703855)              \
-  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 972883980)               \
-  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 950522310)           \
-  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1301138078)              \
-  V(_StringBase, _interpolate, StringBaseInterpolate, 1540062866)              \
-  V(_IntegerImplementation, toDouble, IntegerToDouble, 1084977108)             \
+  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 783880753)                     \
+  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 499938872)                   \
+  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1156009451)                  \
+  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1239113233)                \
+  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 2058780470)                  \
+  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 66201433)                  \
+  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 1823612342)                  \
+  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1499236144)              \
+  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1323416269)              \
+  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1301054599)          \
+  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1651670367)              \
+  V(_StringBase, _interpolate, StringBaseInterpolate, 1503544722)              \
+  V(_IntegerImplementation, toDouble, IntegerToDouble, 1020333941)             \
   V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32,  \
       597111055)                                                               \
   V(_Double, truncateToDouble, DoubleTruncate, 2117801967)                     \
@@ -54,22 +54,22 @@
   V(_Double, _div, DoubleDiv, 1201505037)                                      \
   V(::, sin, MathSin, 1741396147)                                              \
   V(::, cos, MathCos, 1951197905)                                              \
-  V(::, min, MathMin, 1022567780)                                              \
-  V(::, max, MathMax, 612058870)                                               \
-  V(::, _doublePow, MathDoublePow, 823139975)                                  \
-  V(Float32x4, Float32x4., Float32x4Constructor, 1755873079)                   \
-  V(Float32x4, Float32x4.zero, Float32x4Zero, 1494069379)                      \
-  V(Float32x4, Float32x4.splat, Float32x4Splat, 916211464)                     \
+  V(::, min, MathMin, 214919172)                                               \
+  V(::, max, MathMax, 989552054)                                               \
+  V(::, _doublePow, MathDoublePow, 275712742)                                  \
+  V(Float32x4, Float32x4., Float32x4Constructor, 137170840)                    \
+  V(Float32x4, Float32x4.zero, Float32x4Zero, 1336967908)                      \
+  V(Float32x4, Float32x4.splat, Float32x4Splat, 2001978631)                    \
   V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits,            \
-      640076216)                                                               \
-  V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1279591344)    \
+      1725843383)                                                              \
+  V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 217874863)     \
   V(_Float32x4, shuffle, Float32x4Shuffle, 1636488139)                         \
   V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 597555927)                    \
-  V(_Float32x4, get:x, Float32x4ShuffleX, 384850558)                           \
-  V(_Float32x4, get:y, Float32x4ShuffleY, 1398002778)                          \
-  V(_Float32x4, get:z, Float32x4ShuffleZ, 1178056441)                          \
-  V(_Float32x4, get:w, Float32x4ShuffleW, 480831839)                           \
-  V(_Float32x4, get:signMask, Float32x4GetSignMask, 630761511)                 \
+  V(_Float32x4, get:x, Float32x4ShuffleX, 384880349)                           \
+  V(_Float32x4, get:y, Float32x4ShuffleY, 1398032569)                          \
+  V(_Float32x4, get:z, Float32x4ShuffleZ, 1178086232)                          \
+  V(_Float32x4, get:w, Float32x4ShuffleW, 480861630)                           \
+  V(_Float32x4, get:signMask, Float32x4GetSignMask, 630791302)                 \
   V(_Float32x4, _cmpequal, Float32x4Equal, 571062952)                          \
   V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1613543295)                      \
   V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 589402909)               \
@@ -89,205 +89,205 @@
   V(_Float32x4, withY, Float32x4WithY, 309844761)                              \
   V(_Float32x4, withZ, Float32x4WithZ, 971921505)                              \
   V(_Float32x4, withW, Float32x4WithW, 1759699726)                             \
-  V(Float64x2, Float64x2., Float64x2Constructor, 1399581872)                   \
-  V(Float64x2, Float64x2.zero, Float64x2Zero, 1836770587)                      \
-  V(Float64x2, Float64x2.splat, Float64x2Splat, 939291159)                     \
-  V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 1499726406)    \
-  V(_Float64x2, get:x, Float64x2GetX, 261044094)                               \
-  V(_Float64x2, get:y, Float64x2GetY, 1942257886)                              \
+  V(Float64x2, Float64x2., Float64x2Constructor, 490465873)                    \
+  V(Float64x2, Float64x2.zero, Float64x2Zero, 1679669116)                      \
+  V(Float64x2, Float64x2.splat, Float64x2Splat, 2025058326)                    \
+  V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 438009925)     \
+  V(_Float64x2, get:x, Float64x2GetX, 261073885)                               \
+  V(_Float64x2, get:y, Float64x2GetY, 1942287677)                              \
   V(_Float64x2, _negate, Float64x2Negate, 2133212774)                          \
   V(_Float64x2, abs, Float64x2Abs, 1224776282)                                 \
   V(_Float64x2, sqrt, Float64x2Sqrt, 1037569520)                               \
-  V(_Float64x2, get:signMask, Float64x2GetSignMask, 252936800)                 \
+  V(_Float64x2, get:signMask, Float64x2GetSignMask, 252966591)                 \
   V(_Float64x2, scale, Float64x2Scale, 1199438744)                             \
   V(_Float64x2, withX, Float64x2WithX, 1042725932)                             \
   V(_Float64x2, withY, Float64x2WithY, 1496958947)                             \
   V(_Float64x2, min, Float64x2Min, 485240583)                                  \
   V(_Float64x2, max, Float64x2Max, 2146148204)                                 \
-  V(Int32x4, Int32x4., Int32x4Constructor, 665986284)                          \
-  V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 87082660)                   \
+  V(Int32x4, Int32x4., Int32x4Constructor, 1194767693)                         \
+  V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1052882565)                 \
   V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits,              \
-      372517418)                                                               \
-  V(_Int32x4, get:flagX, Int32x4GetFlagX, 1077555238)                          \
-  V(_Int32x4, get:flagY, Int32x4GetFlagY, 779160284)                           \
-  V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181912283)                           \
-  V(_Int32x4, get:flagW, Int32x4GetFlagW, 977675534)                           \
-  V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929271914)                    \
+      1458284585)                                                              \
+  V(_Int32x4, get:flagX, Int32x4GetFlagX, 1077585029)                          \
+  V(_Int32x4, get:flagY, Int32x4GetFlagY, 779190075)                           \
+  V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181942074)                           \
+  V(_Int32x4, get:flagW, Int32x4GetFlagW, 977705325)                           \
+  V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929301705)                    \
   V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702)                             \
   V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870)                        \
-  V(_Int32x4, select, Int32x4Select, 1696037681)                               \
+  V(_Int32x4, select, Int32x4Select, 1291364368)                               \
   V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789)                          \
   V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978)                         \
   V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960)                          \
   V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907)                         \
-  V(_Float32Array, [], Float32ArrayGetIndexed, 856653338)                      \
-  V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464)                    \
-  V(_Int8Array, [], Int8ArrayGetIndexed, 321230586)                            \
-  V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685)                          \
-  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063)            \
-  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340)           \
+  V(_Float32Array, [], Float32ArrayGetIndexed, 1092936601)                     \
+  V(_Float32Array, []=, Float32ArraySetIndexed, 102284991)                     \
+  V(_Int8Array, [], Int8ArrayGetIndexed, 557513849)                            \
+  V(_Int8Array, []=, Int8ArraySetIndexed, 1135113150)                          \
+  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 666955326)            \
+  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 2053292453)          \
   V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed,       \
-    1346536303)                                                                \
+    1582819566)                                                                \
   V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed,      \
-    1794849214)                                                                \
-  V(_Int16Array, [], Int16ArrayGetIndexed, 74127855)                           \
-  V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345)                        \
-  V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953)                        \
-  V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040)                      \
-  V(_Int32Array, [], Int32ArrayGetIndexed, 203101370)                          \
-  V(_Int32Array, []=, Int32ArraySetIndexed, 338968571)                         \
-  V(_Uint32Array, [], Uint32ArrayGetIndexed, 1640672852)                       \
-  V(_Uint32Array, []=, Uint32ArraySetIndexed, 1472976717)                      \
-  V(_Int64Array, [], Int64ArrayGetIndexed, 206855782)                          \
-  V(_Int64Array, []=, Int64ArraySetIndexed, 1258282177)                        \
-  V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1466627059)                 \
-  V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 2141660076)                \
-  V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 818792056)                      \
-  V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1021474038)                    \
-  V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 288114492)                  \
-  V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 941746736)                 \
-  V(_Bigint, get:_neg, Bigint_getNeg, 1151514099)                              \
-  V(_Bigint, get:_used, Bigint_getUsed, 1308529543)                            \
-  V(_Bigint, get:_digits, Bigint_getDigits, 1408062672)                        \
+    879363679)                                                                 \
+  V(_Int16Array, [], Int16ArrayGetIndexed, 310411118)                          \
+  V(_Int16Array, []=, Int16ArraySetIndexed, 694766810)                         \
+  V(_Uint16Array, [], Uint16ArrayGetIndexed, 706695216)                        \
+  V(_Uint16Array, []=, Uint16ArraySetIndexed, 733443505)                       \
+  V(_Int32Array, [], Int32ArrayGetIndexed, 439384633)                          \
+  V(_Int32Array, []=, Int32ArraySetIndexed, 1570966684)                        \
+  V(_Uint32Array, [], Uint32ArrayGetIndexed, 1876956115)                       \
+  V(_Uint32Array, []=, Uint32ArraySetIndexed, 557491182)                       \
+  V(_Int64Array, [], Int64ArrayGetIndexed, 443139045)                          \
+  V(_Int64Array, []=, Int64ArraySetIndexed, 342796642)                         \
+  V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1702910322)                 \
+  V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 157778603)                 \
+  V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1055075319)                     \
+  V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1185076213)                    \
+  V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 524397755)                  \
+  V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 1105348911)                \
+  V(_Bigint, get:_neg, Bigint_getNeg, 1151543890)                              \
+  V(_Bigint, get:_used, Bigint_getUsed, 1308559334)                            \
+  V(_Bigint, get:_digits, Bigint_getDigits, 1408092463)                        \
 
 // List of intrinsics:
 // (class-name, function-name, intrinsification method, fingerprint).
 #define CORE_LIB_INTRINSIC_LIST(V)                                             \
-  V(_Smi, ~, Smi_bitNegate, 105519892)                                         \
-  V(_Smi, get:bitLength, Smi_bitLength, 869956497)                             \
-  V(_Bigint, set:_neg, Bigint_setNeg, 920204960)                               \
-  V(_Bigint, set:_used, Bigint_setUsed, 1857576743)                            \
-  V(_Bigint, _set_digits, Bigint_setDigits, 582835804)                         \
-  V(_Bigint, _absAdd, Bigint_absAdd, 233965936)                                \
-  V(_Bigint, _absSub, Bigint_absSub, 1401148862)                               \
-  V(_Bigint, _mulAdd, Bigint_mulAdd, 1283124653)                               \
-  V(_Bigint, _sqrAdd, Bigint_sqrAdd, 1665155090)                               \
-  V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 643982609)            \
-  V(_Montgomery, _mulMod, Montgomery_mulMod, 149127024)                        \
-  V(_Double, >, Double_greaterThan, 381325711)                                 \
-  V(_Double, >=, Double_greaterEqualThan, 1409267140)                          \
-  V(_Double, <, Double_lessThan, 2080387973)                                   \
-  V(_Double, <=, Double_lessEqualThan, 106225572)                              \
-  V(_Double, ==, Double_equal, 2093918133)                                     \
-  V(_Double, +, Double_add, 1646350451)                                        \
-  V(_Double, -, Double_sub, 1477459276)                                        \
-  V(_Double, *, Double_mul, 1334580777)                                        \
-  V(_Double, /, Double_div, 1938037155)                                        \
-  V(_Double, get:isNaN, Double_getIsNaN, 843050033)                            \
-  V(_Double, get:isNegative, Double_getIsNegative, 1637875580)                 \
-  V(_Double, _mulFromInteger, Double_mulFromInteger, 1594796483)               \
-  V(_Double, .fromInteger, DoubleFromInteger, 999771940)                       \
-  V(_List, []=, ObjectArraySetIndexed, 1288827575)                             \
-  V(_GrowableList, .withData, GrowableArray_Allocate, 732923072)               \
-  V(_GrowableList, [], GrowableArrayGetIndexed, 919108233)                     \
-  V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853)                   \
-  V(_GrowableList, _setLength, GrowableArraySetLength, 89389299)               \
-  V(_GrowableList, _setData, GrowableArraySetData, 2126927509)                 \
-  V(_GrowableList, add, GrowableArray_add, 1899133961)                         \
-  V(Object, ==, ObjectEquals, 1068471689)                                      \
-  V(_StringBase, get:hashCode, String_getHashCode, 2102906241)                 \
-  V(_StringBase, get:isEmpty, StringBaseIsEmpty, 49873871)                     \
+  V(_Smi, ~, Smi_bitNegate, 134149043)                                         \
+  V(_Smi, get:bitLength, Smi_bitLength, 869986288)                             \
+  V(_Bigint, set:_neg, Bigint_setNeg, 855560832)                               \
+  V(_Bigint, set:_used, Bigint_setUsed, 1792932615)                            \
+  V(_Bigint, _set_digits, Bigint_setDigits, 178162491)                         \
+  V(_Bigint, _absAdd, Bigint_absAdd, 97148049)                                 \
+  V(_Bigint, _absSub, Bigint_absSub, 159012285)                                \
+  V(_Bigint, _mulAdd, Bigint_mulAdd, 101252203)                                \
+  V(_Bigint, _sqrAdd, Bigint_sqrAdd, 1684445648)                               \
+  V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 649845040)            \
+  V(_Montgomery, _mulMod, Montgomery_mulMod, 1551846228)                       \
+  V(_Double, >, Double_greaterThan, 1538121903)                                \
+  V(_Double, >=, Double_greaterEqualThan, 1058495718)                          \
+  V(_Double, <, Double_lessThan, 62910596)                                     \
+  V(_Double, <=, Double_lessEqualThan, 1902937798)                             \
+  V(_Double, ==, Double_equal, 793601203)                                      \
+  V(_Double, +, Double_add, 655662995)                                         \
+  V(_Double, -, Double_sub, 486771820)                                         \
+  V(_Double, *, Double_mul, 343893321)                                         \
+  V(_Double, /, Double_div, 947349699)                                         \
+  V(_Double, get:isNaN, Double_getIsNaN, 843079824)                            \
+  V(_Double, get:isNegative, Double_getIsNegative, 1637905371)                 \
+  V(_Double, _mulFromInteger, Double_mulFromInteger, 1748815298)               \
+  V(_Double, .fromInteger, DoubleFromInteger, 803258435)                       \
+  V(_List, []=, ObjectArraySetIndexed, 1768442583)                             \
+  V(_GrowableList, .withData, GrowableArray_Allocate, 536409567)               \
+  V(_GrowableList, [], GrowableArrayGetIndexed, 514434920)                     \
+  V(_GrowableList, []=, GrowableArraySetIndexed, 1698264861)                   \
+  V(_GrowableList, _setLength, GrowableArraySetLength, 1832199634)             \
+  V(_GrowableList, _setData, GrowableArraySetData, 1722254196)                 \
+  V(_GrowableList, add, GrowableArray_add, 422087403)                          \
+  V(Object, ==, ObjectEquals, 1955975370)                                      \
+  V(_StringBase, get:hashCode, String_getHashCode, 2102936032)                 \
+  V(_StringBase, get:isEmpty, StringBaseIsEmpty, 769493198)                    \
   V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 397735324)                  \
-  V(_StringBase, [], StringBaseCharAt, 1512210677)                             \
-  V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1111837929)       \
+  V(_StringBase, [], StringBaseCharAt, 1107537364)                             \
+  V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1111867720)       \
   V(_OneByteString, _substringUncheckedNative,                                 \
       OneByteString_substringUnchecked, 1527498975)                            \
-  V(_OneByteString, _setAt, OneByteStringSetAt, 468605749)                     \
-  V(_OneByteString, _allocate, OneByteString_allocate, 2035417022)             \
-  V(_OneByteString, ==, OneByteString_equality, 1727047023)                    \
-  V(_TwoByteString, ==, TwoByteString_equality, 951149689)                     \
+  V(_OneByteString, _setAt, OneByteStringSetAt, 819138038)                     \
+  V(_OneByteString, _allocate, OneByteString_allocate, 227962559)              \
+  V(_OneByteString, ==, OneByteString_equality, 1857083054)                    \
+  V(_TwoByteString, ==, TwoByteString_equality, 1081185720)                    \
 
 
 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V)                                     \
   V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger,           \
     438687793)                                                                 \
-  V(_IntegerImplementation, +, Integer_add, 501253666)                         \
+  V(_IntegerImplementation, +, Integer_add, 1324179652)                        \
   V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger,           \
     562800077)                                                                 \
-  V(_IntegerImplementation, -, Integer_sub, 1819430179)                        \
+  V(_IntegerImplementation, -, Integer_sub, 494872517)                         \
   V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger,           \
     67891834)                                                                  \
-  V(_IntegerImplementation, *, Integer_mul, 1787870724)                        \
+  V(_IntegerImplementation, *, Integer_mul, 463313062)                         \
   V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger,     \
     93478264)                                                                  \
-  V(_IntegerImplementation, ~/, Integer_truncDivide, 1309867000)               \
-  V(_IntegerImplementation, unary-, Integer_negate, 2095203689)                \
+  V(_IntegerImplementation, ~/, Integer_truncDivide, 300412283)                \
+  V(_IntegerImplementation, unary-, Integer_negate, 1899613736)                \
   V(_IntegerImplementation, _bitAndFromInteger,                                \
     Integer_bitAndFromInteger, 504496713)                                      \
-  V(_IntegerImplementation, &, Integer_bitAnd, 648886925)                      \
+  V(_IntegerImplementation, &, Integer_bitAnd, 1471812911)                     \
   V(_IntegerImplementation, _bitOrFromInteger,                                 \
     Integer_bitOrFromInteger, 1763728073)                                      \
-  V(_IntegerImplementation, |, Integer_bitOr, 1473764427)                      \
+  V(_IntegerImplementation, |, Integer_bitOr, 149206765)                       \
   V(_IntegerImplementation, _bitXorFromInteger,                                \
     Integer_bitXorFromInteger, 281425907)                                      \
-  V(_IntegerImplementation, ^, Integer_bitXor, 99980524)                       \
+  V(_IntegerImplementation, ^, Integer_bitXor, 922906510)                      \
   V(_IntegerImplementation,                                                    \
     _greaterThanFromInteger,                                                   \
     Integer_greaterThanFromInt, 787426822)                                     \
-  V(_IntegerImplementation, >, Integer_greaterThan, 123961041)                 \
-  V(_IntegerImplementation, ==, Integer_equal, 1423724294)                     \
+  V(_IntegerImplementation, >, Integer_greaterThan, 1226840498)                \
+  V(_IntegerImplementation, ==, Integer_equal, 1155579943)                     \
   V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger,           \
     1790821042)                                                                \
-  V(_IntegerImplementation, <, Integer_lessThan, 425560117)                    \
-  V(_IntegerImplementation, <=, Integer_lessEqualThan, 1512735828)             \
-  V(_IntegerImplementation, >=, Integer_greaterEqualThan, 668293748)           \
-  V(_IntegerImplementation, <<, Integer_shl, 656407087)                        \
-  V(_IntegerImplementation, >>, Integer_sar, 487746736)                        \
+  V(_IntegerImplementation, <, Integer_lessThan, 555566388)                    \
+  V(_IntegerImplementation, <=, Integer_lessEqualThan, 1161964406)             \
+  V(_IntegerImplementation, >=, Integer_greaterEqualThan, 317522326)           \
+  V(_IntegerImplementation, <<, Integer_shl, 1479333073)                       \
+  V(_IntegerImplementation, >>, Integer_sar, 1310672722)                       \
   V(_Double, toInt, DoubleToInteger, 1547535151)
 
 
 #define MATH_LIB_INTRINSIC_LIST(V)                                             \
   V(::, sqrt, MathSqrt, 101545548)                                             \
-  V(_Random, _nextState, Random_nextState, 55890711)                           \
+  V(_Random, _nextState, Random_nextState, 84519862)                           \
 
 
 #define TYPED_DATA_LIB_INTRINSIC_LIST(V)                                       \
-  V(_Int8Array, _new, TypedData_Int8Array_new, 1150131819)                     \
-  V(_Uint8Array, _new, TypedData_Uint8Array_new, 2019665760)                   \
-  V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 726412668)      \
-  V(_Int16Array, _new, TypedData_Int16Array_new, 1879541015)                   \
-  V(_Uint16Array, _new, TypedData_Uint16Array_new, 189496401)                  \
-  V(_Int32Array, _new, TypedData_Int32Array_new, 1725327048)                   \
-  V(_Uint32Array, _new, TypedData_Uint32Array_new, 10306485)                   \
-  V(_Int64Array, _new, TypedData_Int64Array_new, 1299501918)                   \
-  V(_Uint64Array, _new, TypedData_Uint64Array_new, 1635318703)                 \
-  V(_Float32Array, _new, TypedData_Float32Array_new, 577737480)                \
-  V(_Float64Array, _new, TypedData_Float64Array_new, 645355686)                \
-  V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 596639418)            \
-  V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 496358233)                \
-  V(_Float64x2Array, _new, TypedData_Float64x2Array_new, 1506975080)           \
-  V(_Int8Array, ., TypedData_Int8Array_factory, 1499010120)                    \
-  V(_Uint8Array, ., TypedData_Uint8Array_factory, 354210806)                   \
-  V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 231626935)     \
-  V(_Int16Array, ., TypedData_Int16Array_factory, 1044203454)                  \
-  V(_Uint16Array, ., TypedData_Uint16Array_factory, 616427808)                 \
-  V(_Int32Array, ., TypedData_Int32Array_factory, 26656923)                    \
-  V(_Uint32Array, ., TypedData_Uint32Array_factory, 297463966)                 \
-  V(_Int64Array, ., TypedData_Int64Array_factory, 105050331)                   \
-  V(_Uint64Array, ., TypedData_Uint64Array_factory, 1469861670)                \
-  V(_Float32Array, ., TypedData_Float32Array_factory, 105860920)               \
-  V(_Float64Array, ., TypedData_Float64Array_factory, 342242776)               \
-  V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1217848993)          \
-  V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 100825417)               \
-  V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 611308575)           \
+  V(_Int8Array, _new, TypedData_Int8Array_new, 1490161004)                     \
+  V(_Uint8Array, _new, TypedData_Uint8Array_new, 212211297)                    \
+  V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 1066441853)     \
+  V(_Int16Array, _new, TypedData_Int16Array_new, 72086552)                     \
+  V(_Uint16Array, _new, TypedData_Uint16Array_new, 529525586)                  \
+  V(_Int32Array, _new, TypedData_Int32Array_new, 2065356233)                   \
+  V(_Uint32Array, _new, TypedData_Uint32Array_new, 350335670)                  \
+  V(_Int64Array, _new, TypedData_Int64Array_new, 1639531103)                   \
+  V(_Uint64Array, _new, TypedData_Uint64Array_new, 1975347888)                 \
+  V(_Float32Array, _new, TypedData_Float32Array_new, 917766665)                \
+  V(_Float64Array, _new, TypedData_Float64Array_new, 985384871)                \
+  V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 936668603)            \
+  V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 836387418)                \
+  V(_Float64x2Array, _new, TypedData_Float64x2Array_new, 1847004265)           \
+  V(_Int8Array, ., TypedData_Int8Array_factory, 1234236264)                    \
+  V(_Uint8Array, ., TypedData_Uint8Array_factory, 89436950)                    \
+  V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 2114336727)    \
+  V(_Int16Array, ., TypedData_Int16Array_factory, 779429598)                   \
+  V(_Uint16Array, ., TypedData_Uint16Array_factory, 351653952)                 \
+  V(_Int32Array, ., TypedData_Int32Array_factory, 1909366715)                  \
+  V(_Uint32Array, ., TypedData_Uint32Array_factory, 32690110)                  \
+  V(_Int64Array, ., TypedData_Int64Array_factory, 1987760123)                  \
+  V(_Uint64Array, ., TypedData_Uint64Array_factory, 1205087814)                \
+  V(_Float32Array, ., TypedData_Float32Array_factory, 1988570712)              \
+  V(_Float64Array, ., TypedData_Float64Array_factory, 77468920)                \
+  V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 953075137)           \
+  V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 1983535209)              \
+  V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 346534719)           \
 
 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
-  V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140)                           \
-  V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553)                        \
-  V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1678777951)         \
-  V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 918478513)         \
-  V(_Float64Array, []=, Float64ArraySetIndexed, 243929230)                     \
-  V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297)                     \
-  V(_TypedList, get:length, TypedDataLength, 522565357)                        \
+  V(_Uint8Array, [], Uint8ArrayGetIndexed, 252408403)                          \
+  V(_Uint8Array, []=, Uint8ArraySetIndexed, 1102579018)                        \
+  V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1915061214)         \
+  V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2992978)           \
+  V(_Float64Array, []=, Float64ArraySetIndexed, 407531405)                     \
+  V(_Float64Array, [], Float64ArrayGetIndexed, 2015337560)                     \
+  V(_TypedList, get:length, TypedDataLength, 522595148)                        \
 
 #define GRAPH_CORE_INTRINSICS_LIST(V)                                          \
-  V(_List, get:length, ObjectArrayLength, 1181352729)                          \
-  V(_List, [], ObjectArrayGetIndexed, 795612476)                               \
-  V(_ImmutableList, get:length, ImmutableArrayLength, 274917727)               \
-  V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341)                  \
-  V(_GrowableList, get:length, GrowableArrayLength, 778505107)                 \
-  V(_GrowableList, get:_capacity, GrowableArrayCapacity, 555140075)            \
-  V(_StringBase, get:length, StringBaseLength, 784399628)                      \
+  V(_List, get:length, ObjectArrayLength, 1181382520)                          \
+  V(_List, [], ObjectArrayGetIndexed, 390939163)                               \
+  V(_ImmutableList, get:length, ImmutableArrayLength, 274947518)               \
+  V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028)                  \
+  V(_GrowableList, get:length, GrowableArrayLength, 778534898)                 \
+  V(_GrowableList, get:_capacity, GrowableArrayCapacity, 555169866)            \
+  V(_StringBase, get:length, StringBaseLength, 784429419)                      \
 
 #define GRAPH_INTRINSICS_LIST(V)                                               \
   GRAPH_CORE_INTRINSICS_LIST(V)                                                \
@@ -315,50 +315,50 @@
 
 // A list of core function that should always be inlined.
 #define INLINE_WHITE_LIST(V)                                                   \
-  V(Object, ==, ObjectEquals, 1068471689)                                      \
-  V(_List, get:length, ObjectArrayLength, 1181352729)                          \
-  V(_ImmutableList, get:length, ImmutableArrayLength, 274917727)               \
-  V(_TypedList, get:length, TypedDataLength, 522565357)                        \
-  V(_GrowableList, get:length, GrowableArrayLength, 778505107)                 \
-  V(_StringBase, get:length, StringBaseLength, 784399628)                      \
-  V(ListIterator, moveNext, ListIteratorMoveNext, 210829138)                   \
-  V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 1147271335)  \
-  V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946)            \
-  V(_GrowableList, forEach, GrowableArrayForEach, 2085943947)                  \
-  V(_List, ., ObjectArrayAllocate, 1595327584)                                 \
-  V(_List, [], ObjectArrayGetIndexed, 795612476)                               \
-  V(_List, []=, ObjectArraySetIndexed, 1288827575)                             \
-  V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737)                        \
-  V(_List, get:iterator, ObjectArrayIterator, 458612415)                       \
-  V(_List, forEach, ObjectArrayForEach, 592525445)                             \
-  V(_List, _slice, ObjectArraySlice, 1891508040)                               \
-  V(_ImmutableList, get:iterator, ImmutableArrayIterator, 362084797)           \
-  V(_ImmutableList, forEach, ImmutableArrayForEach, 63658053)                  \
-  V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341)                  \
-  V(_GrowableList, [], GrowableArrayGetIndexed, 919108233)                     \
-  V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853)                   \
-  V(_Float32Array, [], Float32ArrayGetIndexed, 856653338)                      \
-  V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464)                    \
-  V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297)                     \
-  V(_Float64Array, []=, Float64ArraySetIndexed, 243929230)                     \
-  V(_Int8Array, [], Int8ArrayGetIndexed, 321230586)                            \
-  V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685)                          \
-  V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140)                           \
-  V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553)                        \
-  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063)            \
-  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340)           \
-  V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953)                        \
-  V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040)                      \
-  V(_Int16Array, [], Int16ArrayGetIndexed, 74127855)                           \
-  V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345)                        \
-  V(_Int32Array, [], Int32ArrayGetIndexed, 203101370)                          \
-  V(_Int32Array, []=, Int32ArraySetIndexed, 338968571)                         \
-  V(_Int64Array, [], Int64ArrayGetIndexed, 206855782)                          \
-  V(_Int64Array, []=, Int64ArraySetIndexed, 1258282177)                        \
-  V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 1543480955)                 \
-  V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 936729641)                 \
-  V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1898018934)                   \
-  V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 111684506)                   \
+  V(Object, ==, ObjectEquals, 1955975370)                                      \
+  V(_List, get:length, ObjectArrayLength, 1181382520)                          \
+  V(_ImmutableList, get:length, ImmutableArrayLength, 274947518)               \
+  V(_TypedList, get:length, TypedDataLength, 522595148)                        \
+  V(_GrowableList, get:length, GrowableArrayLength, 778534898)                 \
+  V(_StringBase, get:length, StringBaseLength, 784429419)                      \
+  V(ListIterator, moveNext, ListIteratorMoveNext, 1001265875)                  \
+  V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 890839431)   \
+  V(_GrowableList, get:iterator, GrowableArrayIterator, 1663047580)            \
+  V(_GrowableList, forEach, GrowableArrayForEach, 605873384)                   \
+  V(_List, ., ObjectArrayAllocate, 335347617)                                  \
+  V(_List, [], ObjectArrayGetIndexed, 390939163)                               \
+  V(_List, []=, ObjectArraySetIndexed, 1768442583)                             \
+  V(_List, get:isEmpty, ObjectArrayIsEmpty, 702383416)                         \
+  V(_List, get:iterator, ObjectArrayIterator, 308726049)                       \
+  V(_List, forEach, ObjectArrayForEach, 1720909126)                            \
+  V(_List, _slice, ObjectArraySlice, 1738717516)                               \
+  V(_ImmutableList, get:iterator, ImmutableArrayIterator, 212198431)           \
+  V(_ImmutableList, forEach, ImmutableArrayForEach, 1192041734)                \
+  V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028)                  \
+  V(_GrowableList, [], GrowableArrayGetIndexed, 514434920)                     \
+  V(_GrowableList, []=, GrowableArraySetIndexed, 1698264861)                   \
+  V(_Float32Array, [], Float32ArrayGetIndexed, 1092936601)                     \
+  V(_Float32Array, []=, Float32ArraySetIndexed, 102284991)                     \
+  V(_Float64Array, [], Float64ArrayGetIndexed, 2015337560)                     \
+  V(_Float64Array, []=, Float64ArraySetIndexed, 407531405)                     \
+  V(_Int8Array, [], Int8ArrayGetIndexed, 557513849)                            \
+  V(_Int8Array, []=, Int8ArraySetIndexed, 1135113150)                          \
+  V(_Uint8Array, [], Uint8ArrayGetIndexed, 252408403)                          \
+  V(_Uint8Array, []=, Uint8ArraySetIndexed, 1102579018)                        \
+  V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 666955326)            \
+  V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 2053292453)          \
+  V(_Uint16Array, [], Uint16ArrayGetIndexed, 706695216)                        \
+  V(_Uint16Array, []=, Uint16ArraySetIndexed, 733443505)                       \
+  V(_Int16Array, [], Int16ArrayGetIndexed, 310411118)                          \
+  V(_Int16Array, []=, Int16ArraySetIndexed, 694766810)                         \
+  V(_Int32Array, [], Int32ArrayGetIndexed, 439384633)                          \
+  V(_Int32Array, []=, Int32ArraySetIndexed, 1570966684)                        \
+  V(_Int64Array, [], Int64ArrayGetIndexed, 443139045)                          \
+  V(_Int64Array, []=, Int64ArraySetIndexed, 342796642)                         \
+  V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 735017274)                  \
+  V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1913230218)                \
+  V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1089555253)                   \
+  V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 1088185083)                  \
   V(::, asin, MathASin, 1651042633)                                            \
   V(::, acos, MathACos, 1139647090)                                            \
   V(::, atan, MathATan, 1668754384)                                            \
@@ -366,30 +366,30 @@
   V(::, cos, MathCos, 1951197905)                                              \
   V(::, exp, MathExp, 1809210829)                                              \
   V(::, log, MathLog, 1620336448)                                              \
-  V(::, max, MathMax, 612058870)                                               \
-  V(::, min, MathMin, 1022567780)                                              \
-  V(::, pow, MathPow, 930962530)                                               \
+  V(::, max, MathMax, 989552054)                                               \
+  V(::, min, MathMin, 214919172)                                               \
+  V(::, pow, MathPow, 1381728863)                                              \
   V(::, sin, MathSin, 1741396147)                                              \
   V(::, sqrt, MathSqrt, 101545548)                                             \
   V(::, tan, MathTan, 982072809)                                               \
-  V(Lists, copy, ListsCopy, 902244797)                                         \
-  V(_Bigint, get:_neg, Bigint_getNeg, 1151514099)                              \
-  V(_Bigint, get:_used, Bigint_getUsed, 1308529543)                            \
-  V(_Bigint, get:_digits, Bigint_getDigits, 1408062672)                        \
-  V(_Bigint, set:_digits, Bigint_setDigits, 1135754410)                        \
+  V(Lists, copy, ListsCopy, 605584668)                                         \
+  V(_Bigint, get:_neg, Bigint_getNeg, 1151543890)                              \
+  V(_Bigint, get:_used, Bigint_getUsed, 1308559334)                            \
+  V(_Bigint, get:_digits, Bigint_getDigits, 1408092463)                        \
+  V(_Bigint, set:_digits, Bigint_setDigits, 1625268649)                        \
 
 // A list of core function that should never be inlined.
 #define INLINE_BLACK_LIST(V)                                                   \
-  V(_Bigint, _absAdd, Bigint_absAdd, 233965936)                                \
-  V(_Bigint, _absSub, Bigint_absSub, 1401148862)                               \
-  V(_Bigint, _mulAdd, Bigint_mulAdd, 1283124653)                               \
-  V(_Bigint, _sqrAdd, Bigint_sqrAdd, 1665155090)                               \
-  V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 643982609)            \
-  V(_Montgomery, _mulMod, Montgomery_mulMod, 149127024)                        \
+  V(_Bigint, _absAdd, Bigint_absAdd, 97148049)                                 \
+  V(_Bigint, _absSub, Bigint_absSub, 159012285)                                \
+  V(_Bigint, _mulAdd, Bigint_mulAdd, 101252203)                                \
+  V(_Bigint, _sqrAdd, Bigint_sqrAdd, 1684445648)                               \
+  V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 649845040)            \
+  V(_Montgomery, _mulMod, Montgomery_mulMod, 1551846228)                       \
 
 // A list of core functions that internally dispatch based on received id.
 #define POLYMORPHIC_TARGET_LIST(V)                                             \
-  V(_StringBase, [], StringBaseCharAt, 1512210677)                             \
+  V(_StringBase, [], StringBaseCharAt, 1107537364)                             \
   V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 397735324)                  \
   V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1541411498)                    \
   V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 1032404349)                  \
@@ -401,16 +401,16 @@
   V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1792407200)              \
   V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1338379857)          \
   V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 1469917805)              \
-  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 433348464)                     \
-  V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 149406583)                    \
-  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 805477162)                   \
-  V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 888580944)                  \
-  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1708248181)                  \
-  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1863152792)                \
-  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1148703855)              \
-  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 972883980)               \
-  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 950522310)           \
-  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1301138078)              \
+  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 783880753)                     \
+  V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 499938872)                    \
+  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1156009451)                  \
+  V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 1239113233)                 \
+  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 2058780470)                  \
+  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 66201433)                  \
+  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1499236144)              \
+  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1323416269)              \
+  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1301054599)          \
+  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1651670367)              \
 
 // Forward declarations.
 class Function;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 6a9f84b..6eab91a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -3402,6 +3402,11 @@
 }
 
 
+void Class::set_is_enum_class() const {
+  set_state_bits(EnumBit::update(true, raw_ptr()->state_bits_));
+}
+
+
 void Class::set_is_const() const {
   set_state_bits(ConstBit::update(true, raw_ptr()->state_bits_));
 }
@@ -6687,7 +6692,7 @@
     if (recalculatingFingerprints) {
       // This output can be copied into a file, then used with sed
       // to replace the old values.
-      // sed -i .bak -f /tmp/newkeys runtime/vm/intrinsifier.h
+      // sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h
       // sed -i .bak -f /tmp/newkeys runtime/vm/intermediate_language.h
       // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
       OS::Print("s/%d/%d/\n", fp, SourceFingerprint());
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 7da98c0..8def916 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1170,6 +1170,11 @@
   }
   void set_is_synthesized_class() const;
 
+  bool is_enum_class() const {
+    return EnumBit::decode(raw_ptr()->state_bits_);
+  }
+  void set_is_enum_class() const;
+
   bool is_finalized() const {
     return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
         == RawClass::kFinalized;
@@ -1327,6 +1332,7 @@
     kMixinTypeAppliedBit = 10,
     kFieldsMarkedNullableBit = 11,
     kCycleFreeBit = 12,
+    kEnumBit = 13,
   };
   class ConstBit : public BitField<bool, kConstBit, 1> {};
   class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
@@ -1342,6 +1348,7 @@
   class FieldsMarkedNullableBit : public BitField<bool,
       kFieldsMarkedNullableBit, 1> {};  // NOLINT
   class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {};
+  class EnumBit : public BitField<bool, kEnumBit, 1> {};
 
   void set_name(const String& value) const;
   void set_pretty_name(const String& value) const;
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 26bca7f..524db36 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -732,6 +732,14 @@
     const Library& lib = Library::Handle(isolate, cls.library());
     Parser parser(script, lib, cls.token_pos());
     parser.ParseClassDefinition(cls);
+  } else if (cls.is_enum_class()) {
+    Isolate* isolate = Isolate::Current();
+    TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+    ASSERT(isolate->long_jump_base()->IsSafeToJump());
+    const Script& script = Script::Handle(isolate, cls.script());
+    const Library& lib = Library::Handle(isolate, cls.library());
+    Parser parser(script, lib, cls.token_pos());
+    parser.ParseEnumDefinition(cls);
   }
 }
 
@@ -1125,11 +1133,13 @@
   // Receiver is local 0.
   LocalVariable* receiver = current_block_->scope->VariableAt(0);
   LoadLocalNode* load_receiver = new LoadLocalNode(ident_pos, receiver);
-  ASSERT(IsIdentifier());
-  const String& field_name = *CurrentLiteral();
+  String& field_name = String::Handle(I, func.name());
+  field_name = Field::NameFromGetter(field_name);
+
   const Class& field_class = Class::Handle(I, func.Owner());
   const Field& field =
       Field::ZoneHandle(I, field_class.LookupInstanceField(field_name));
+  ASSERT(!field.IsNull());
 
   LoadInstanceFieldNode* load_field =
       new LoadInstanceFieldNode(ident_pos, load_receiver, field);
@@ -3051,8 +3061,7 @@
   intptr_t end_token_pos = 0;
   if (CurrentToken() == Token::kLBRACE) {
     ConsumeToken();
-    if (String::Handle(I, func.name()).Equals(
-        Symbols::EqualOperator())) {
+    if (String::Handle(I, func.name()).Equals(Symbols::EqualOperator())) {
       const Class& owner = Class::Handle(I, func.Owner());
       if (!owner.IsObjectClass()) {
         AddEqualityNullCheck();
@@ -4002,6 +4011,54 @@
 }
 
 
+void Parser::ParseEnumDeclaration(const GrowableObjectArray& pending_classes,
+                                  const Class& toplevel_class,
+                                  intptr_t metadata_pos) {
+  TRACE_PARSER("ParseEnumDeclaration");
+  ConsumeToken();
+  const intptr_t enum_pos = TokenPos();
+  String* enum_name =
+      ExpectUserDefinedTypeIdentifier("enum type name expected");
+  if (FLAG_trace_parser) {
+    OS::Print("TopLevel parsing enum '%s'\n", enum_name->ToCString());
+  }
+  ExpectToken(Token::kLBRACE);
+  if (!IsIdentifier()) {
+    ReportError("Enumeration must have at least one name");
+  }
+  while (IsIdentifier()) {
+    ConsumeToken();
+    if (CurrentToken() == Token::kCOMMA) {
+      ConsumeToken();
+      if (CurrentToken() == Token::kRBRACE) {
+        break;
+      }
+    } else if (CurrentToken() == Token::kRBRACE) {
+      break;
+    } else {
+      ReportError(", or } expected");
+    }
+  }
+  ExpectToken(Token::kRBRACE);
+
+  Object& obj = Object::Handle(I, library_.LookupLocalObject(*enum_name));
+  if (!obj.IsNull()) {
+    ReportError(enum_pos, "'%s' is already defined", enum_name->ToCString());
+  }
+  Class& cls = Class::Handle(I);
+  cls = Class::New(*enum_name, script_, enum_pos);
+  cls.set_library(library_);
+  library_.AddClass(cls);
+  cls.set_is_synthesized_class();
+  cls.set_is_enum_class();
+  if (metadata_pos >= 0) {
+    library_.AddClassMetadata(cls, toplevel_class, metadata_pos);
+  }
+  cls.set_super_type(Type::Handle(I, Type::ObjectType()));
+  pending_classes.Add(cls, Heap::kOld);
+}
+
+
 void Parser::ParseClassDeclaration(const GrowableObjectArray& pending_classes,
                                    const Class& toplevel_class,
                                    intptr_t metadata_pos) {
@@ -4244,6 +4301,168 @@
 }
 
 
+void Parser::ParseEnumDefinition(const Class& cls) {
+  TRACE_PARSER("ParseEnumDefinition");
+  CompilerStats::num_classes_compiled++;
+
+  const String& enum_name = String::Handle(I, cls.Name());
+  ClassDesc enum_members(cls, enum_name, false, cls.token_pos());
+
+  // Add instance field 'final int index'.
+  Field& index_field = Field::ZoneHandle(I);
+  const Type& int_type = Type::Handle(I, Type::IntType());
+  const Type& dynamic_type = Type::Handle(Type::DynamicType());
+  index_field = Field::New(Symbols::Index(),
+                           false,  // Not static.
+                           true,  // Field is final.
+                           false,  // Not const.
+                           false,  // Not synthetic.
+                           cls,
+                           cls.token_pos());
+  index_field.set_type(int_type);
+  enum_members.AddField(index_field);
+
+  // Add implicit getter for index field.
+  const String& getter_name =
+      String::Handle(I, Field::GetterSymbol(Symbols::Index()));
+  Function& getter = Function::Handle(I);
+  getter = Function::New(getter_name,
+                         RawFunction::kImplicitGetter,
+                         /* is_static = */ false,
+                         /* is_const = */ true,
+                         /* is_abstract = */ false,
+                         /* is_external = */ false,
+                         /* is_native = */ false,
+                         cls,
+                         cls.token_pos());
+  getter.set_result_type(int_type);
+  ParamList params;
+  params.AddReceiver(&dynamic_type, cls.token_pos());
+  AddFormalParamsToFunction(&params, getter);
+  enum_members.AddFunction(getter);
+
+  GrowableObjectArray& enum_names = GrowableObjectArray::Handle(I,
+      GrowableObjectArray::New(8, Heap::kOld));
+  const String& name_prefix =
+      String::Handle(String::Concat(enum_name, Symbols::Dot()));
+
+  ASSERT(IsIdentifier());
+  ASSERT(CurrentLiteral()->raw() == cls.Name());
+
+  ConsumeToken();  // Enum type name.
+  ExpectToken(Token::kLBRACE);
+  Field& enum_value = Field::Handle(I);
+  String& enum_value_name = String::Handle(I);
+  intptr_t i = 0;
+  GrowableArray<String*> declared_names(8);
+
+  while (IsIdentifier()) {
+    String* enum_ident = CurrentLiteral();
+
+    // Check for name conflicts.
+    if (enum_ident->raw() == cls.Name()) {
+      ReportError("enum identifier '%s' cannot be equal to enum type name",
+          CurrentLiteral()->ToCString());
+    } else if (enum_ident->raw() == Symbols::Index().raw()) {
+      ReportError("enum identifier conflicts with "
+                  "implicit instance field 'index'");
+    } else if (enum_ident->raw() == Symbols::Values().raw()) {
+      ReportError("enum identifier conflicts with "
+                  "implicit static field 'values'");
+    } else if (enum_ident->raw() == Symbols::toString().raw()) {
+      ReportError("enum identifier conflicts with "
+                  "implicit instance method 'toString()'");
+    }
+    for (intptr_t n = 0; n < declared_names.length(); n++) {
+      if (enum_ident->Equals(*declared_names[n])) {
+        ReportError("Duplicate name '%s' in enum definition '%s'",
+                    enum_ident->ToCString(),
+                    enum_name.ToCString());
+      }
+    }
+    declared_names.Add(enum_ident);
+
+    // Create the static const field for the enumeration value.
+    enum_value = Field::New(*enum_ident,
+                            /* is_static = */ true,
+                            /* is_final = */ true,
+                            /* is_const = */ true,
+                            /* is_synthetic = */ false,
+                            cls,
+                            cls.token_pos());
+    enum_value.set_type(dynamic_type);
+    enum_value.set_has_initializer(false);
+    enum_members.AddField(enum_value);
+    // Initialize the field with the ordinal value. It will be patched
+    // later with the enum constant instance.
+    const Smi& ordinal_value = Smi::Handle(I, Smi::New(i));
+    enum_value.set_value(ordinal_value);
+    enum_value.RecordStore(ordinal_value);
+    i++;
+
+    // For the user-visible name of the enumeration value, we need to
+    // unmangle private names.
+    if (enum_ident->CharAt(0) == '_') {
+      *enum_ident = String::IdentifierPrettyName(*enum_ident);
+    }
+    enum_value_name = Symbols::FromConcat(name_prefix, *enum_ident);
+    enum_names.Add(enum_value_name, Heap::kOld);
+
+    ConsumeToken();  // Enum value name.
+    if (CurrentToken() == Token::kCOMMA) {
+      ConsumeToken();
+    }
+  }
+  ExpectToken(Token::kRBRACE);
+
+  const Class& helper_class =
+      Class::Handle(I, Library::LookupCoreClass(Symbols::_EnumHelper()));
+  ASSERT(!helper_class.IsNull());
+
+  // Add static field 'const List values'.
+  Field& values_field = Field::ZoneHandle(I);
+  values_field = Field::New(Symbols::Values(),
+                            /* is_static = */ true,
+                            /* is_final = */ true,
+                            /* is_const = */ true,
+                            /* is_synthetic = */ false,
+                            cls,
+                            cls.token_pos());
+  values_field.set_type(Type::Handle(I, Type::ArrayType()));
+  enum_members.AddField(values_field);
+
+  // Allocate the immutable array containing the enumeration values.
+  // The actual enum instance values will be patched in later.
+  const Array& values_array = Array::Handle(I, Array::New(i, Heap::kOld));
+  values_field.set_value(values_array);
+  values_field.RecordStore(values_array);
+
+  // Create a static field that contains the list of enumeration names.
+  // Clone the _enum_names field from the helper class.
+  Field& names_field = Field::Handle(I,
+      helper_class.LookupStaticField(Symbols::_EnumNames()));
+  ASSERT(!names_field.IsNull());
+  names_field = names_field.Clone(cls);
+  enum_members.AddField(names_field);
+  const Array& names_array = Array::Handle(Array::MakeArray(enum_names));
+  names_field.set_value(names_array);
+  names_field.RecordStore(names_array);
+
+  // Clone the toString() function from the helper class.
+  Function& to_string_func = Function::Handle(I,
+      helper_class.LookupDynamicFunctionAllowPrivate(Symbols::toString()));
+  ASSERT(!to_string_func.IsNull());
+  to_string_func = to_string_func.Clone(cls);
+  to_string_func.set_is_visible(false);
+  enum_members.AddFunction(to_string_func);
+
+  cls.AddFields(enum_members.fields());
+  const Array& functions =
+      Array::Handle(I, Array::MakeArray(enum_members.functions()));
+  cls.SetFunctions(functions);
+}
+
+
 // Add an implicit constructor to the given class.
 void Parser::AddImplicitConstructor(const Class& cls) {
   // The implicit constructor is unnamed, has no explicit parameter.
@@ -5426,6 +5645,8 @@
     intptr_t metadata_pos = SkipMetadata();
     if (CurrentToken() == Token::kCLASS) {
       ParseClassDeclaration(pending_classes, toplevel_class, metadata_pos);
+    } else if (CurrentToken() == Token::kENUM) {
+      ParseEnumDeclaration(pending_classes, toplevel_class, metadata_pos);
     } else if ((CurrentToken() == Token::kTYPEDEF) &&
                (LookaheadToken(1) != Token::kLPAREN)) {
       set_current_class(toplevel_class);
@@ -10998,6 +11219,12 @@
             String::Handle(I, type.UserVisibleName()).ToCString() :
             "dynamic");
   }
+  // Attempting to instantiate an enum type is a compile-time error.
+  Class& type_class = Class::Handle(I, type.type_class());
+  if (type_class.is_enum_class()) {
+    ReportError(new_pos, "enum type '%s' can not be instantiated",
+                String::Handle(I, type_class.Name()).ToCString());
+  }
 
   // The grammar allows for an optional ('.' identifier)? after the type, which
   // is a named constructor. Note that we tell ParseType() above not to
@@ -11025,7 +11252,6 @@
   }
 
   // Resolve the type and optional identifier to a constructor or factory.
-  Class& type_class = Class::Handle(I, type.type_class());
   String& type_class_name = String::Handle(I, type_class.Name());
   TypeArguments& type_arguments =
       TypeArguments::ZoneHandle(I, type.arguments());
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index ca54975..19c7f61 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -388,6 +388,10 @@
 
   // Support for parsing of scripts.
   void ParseTopLevel();
+  void ParseEnumDeclaration(const GrowableObjectArray& pending_classes,
+                            const Class& toplevel_class,
+                            intptr_t metadata_pos);
+  void ParseEnumDefinition(const Class& cls);
   void ParseClassDeclaration(const GrowableObjectArray& pending_classes,
                              const Class& toplevel_class,
                              intptr_t metadata_pos);
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 4abe031..cb9cb70 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -31,6 +31,9 @@
   V(Current, "current")                                                        \
   V(MoveNext, "moveNext")                                                      \
   V(Value, "value")                                                            \
+  V(_EnumHelper, "_EnumHelper")                                                \
+  V(Values, "values")                                                          \
+  V(_EnumNames, "_enum_names")                                                 \
   V(ExprTemp, ":expr_temp")                                                    \
   V(AnonymousClosure, "<anonymous closure>")                                   \
   V(ClosureParameter, ":closure")                                              \
@@ -285,6 +288,7 @@
   V(SetterPrefix, "set:")                                                      \
   V(InitPrefix, "init:")                                                       \
   V(_New, "_new")                                                              \
+  V(Index, "index")                                                            \
   V(DartScheme, "dart:")                                                       \
   V(DartSchemePrivate, "dart:_")                                               \
   V(DartNativeWrappers, "dart:nativewrappers")                                 \
diff --git a/runtime/vm/token.h b/runtime/vm/token.h
index b446076..f633894 100644
--- a/runtime/vm/token.h
+++ b/runtime/vm/token.h
@@ -152,6 +152,7 @@
   KW(kDEFAULT, "default", 0, kKeyword)                                         \
   KW(kDO, "do", 0, kKeyword)                                                   \
   KW(kELSE, "else", 0, kKeyword)                                               \
+  KW(kENUM, "enum", 0, kKeyword)                                               \
   KW(kEXPORT, "export", 0, kPseudoKeyword)                                     \
   KW(kEXTENDS, "extends", 0, kKeyword)                                         \
   KW(kEXTERNAL, "external", 0, kPseudoKeyword)                                 \
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index 61ed003..cd1ad33 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -176,11 +176,6 @@
     _openFuture = _file.open(mode: mode);
   }
 
-  _FileStreamConsumer.fromStdio(int fd) {
-    assert(1 <= fd && fd <= 2);
-    _openFuture = new Future.value(_File._openStdioSync(fd));
-  }
-
   Future<File> addStream(Stream<List<int>> stream) {
     Completer<File> completer = new Completer<File>.sync();
     _openFuture
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index e4bdf01..f36dd83 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -191,6 +191,36 @@
 }
 
 
+class _StdConsumer implements StreamConsumer<List<int>> {
+  final _file;
+
+  _StdConsumer(int fd) : _file = _File._openStdioSync(fd);
+
+  Future addStream(Stream<List<int>> stream) {
+    var completer = new Completer();
+    var sub;
+    sub = stream.listen(
+        (data) {
+          try {
+            _file.writeFromSync(data);
+          } catch (e, s) {
+            sub.cancel();
+            completer.completeError(e, s);
+          }
+        },
+        onError: completer.completeError,
+        onDone: completer.complete,
+        cancelOnError: true);
+    return completer.future;
+  }
+
+  Future close() {
+    _file.closeSync();
+    return new Future.value();
+  }
+}
+
+
 class _StdSink implements IOSink {
   final IOSink _sink;
 
diff --git a/tests/language/enum_syntax_test.dart b/tests/language/enum_syntax_test.dart
new file mode 100644
index 0000000..6690580
--- /dev/null
+++ b/tests/language/enum_syntax_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-enum
+
+// Basic syntax test for enumeration types
+
+import 'package:expect/expect.dart';
+
+
+enum Color { red, orange, yellow, green }
+
+// Additional comma at end of list is ok.
+enum Veggies { carrot, bean, broccolo, }
+
+// Need at least one enumeration identifier.
+enum Nada {}  /// 01: compile-time error
+
+// Duplicate entries are a compile-time error
+enum ComeAgain { ahau, knust, zipfel, knust, gupf }  /// 02: compile-time error
+
+// Enum entries must not collide with implicitly defined members.
+enum ComeAgain { ahau, knust, zipfel, index } /// 03: compile-time error
+
+enum ComeAgain { ahau, knust, zipfel, values } /// 04: compile-time error
+
+enum ComeAgain { ahau, knust, zipfel, toString } /// 05: compile-time error
+
+// Enum entry must not collide with enum type name.
+enum ComeAgain { ahau, knust, zipfel, ComeAgain } /// 06: compile-time error
+
+// Missing comma.
+enum Numbers { one, two, three four, five }  /// 07: compile-time error
+
+// Missing enum type name.
+enum { eins, zwei, drei }  /// 08: compile-time error
+
+// Duplicate name in library scope.
+topLevelFunction() => null;
+enum topLevelFunction { bla, blah }  /// 09: compile-time error
+
+class C {}
+enum C { bla, blah }  /// 10: compile-time error
+
+var zzTop;
+enum zzTop { Billy, Dusty, Frank }  /// 11: compile-time error
+
+// Enum type cannot be super type or interface type.
+class Rainbow extends Color {}  /// 20: compile-time error
+class Rainbow implements Color {}  /// 21: compile-time error
+class Rainbow extends List with Color {}  /// 22: compile-time error
+
+main() {
+  var x = ComeAgain.zipfel;  /// 02: continued
+  var x = ComeAgain.zipfel;  /// 03: continued
+  var x = ComeAgain.zipfel;  /// 04: continued
+  var x = ComeAgain.zipfel;  /// 05: continued
+  var x = ComeAgain.zipfel;  /// 06: continued
+  var x = Numbers.four;  /// 07: continued
+  var x = topLevelFunction.bla;  /// 09: continued
+  var x = C.bla;  /// 10: continued
+  var x = zzTop.Frank;  /// 11: continued
+
+  var x = new Rainbow();  /// 20: continued
+  var x = new Rainbow();  /// 21: continued
+  var x = new Rainbow();  /// 22: continued
+
+  // It is a compile-time error to explicitly instantiate an enum instance.
+  var x = new Color();  /// 30: compile-time error
+}
+
diff --git a/tests/language/language.status b/tests/language/language.status
index 5d7549a..2c26cee 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -7,7 +7,6 @@
 
 [ $compiler == none ]
 built_in_identifier_prefix_test: Fail # Issue 6970
-enum_test: Fail # Issue 21416
 
 # These bugs refer currently ongoing language discussions.
 constructor_initializer_test/none: Fail # Issue 12633
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index 89154fc..083c89c 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -6,6 +6,12 @@
 # Runtime negative test. No static errors or warnings.
 closure_call_wrong_argument_count_negative_test: skip
 
+enum_syntax_test/02: Fail # 21649
+enum_syntax_test/03: Fail # 21649
+enum_syntax_test/04: Fail # 21649
+enum_syntax_test/05: Fail # 21649
+enum_syntax_test/06: Fail # 21649
+
 # Test issue 12694 (was analyzer issue), (1) when "abstract" is import prefix using it as type is warning; (2) currently analyzer resolves prefix as field (don't ask)
 built_in_identifier_prefix_test: CompileTimeError # Issue 12694
 
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index fc56841..ffd3428 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -43,6 +43,8 @@
 external_test/10: Fail
 external_test/20: Fail
 
+enum_syntax_test/01: Fail # Issue 21648
+
 
 # VM specific tests that should not be run by dart2js.
 vm/*: Skip # Issue 12699
diff --git a/tools/VERSION b/tools/VERSION
index bfc0b1c..39d7666 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
 MINOR 8
 PATCH 0
 PRERELEASE 4
-PRERELEASE_PATCH 3
+PRERELEASE_PATCH 4