| Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
|
| 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 bbce58a28536a7dc6a33645df781061ec2993511..9d5be9da87f9d2fcd7221bb7c1c31535c25d9b32 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
|
| @@ -424,13 +424,6 @@ class OldEmitter implements Emitter {
|
| function() {
|
| function tmp() {}
|
| return function (constructor, superConstructor) {
|
| - if (superConstructor == null) {
|
| - // Fix up the the Dart Object class' prototype.
|
| - var prototype = constructor.prototype;
|
| - prototype.constructor = constructor;
|
| - prototype.#isObject = constructor;
|
| - return prototype;
|
| - }
|
| tmp.prototype = superConstructor.prototype;
|
| var object = new tmp();
|
| var properties = constructor.prototype;
|
| @@ -447,8 +440,7 @@ class OldEmitter implements Emitter {
|
| return object;
|
| };
|
| }()
|
| - """, { 'operatorIsPrefix' : js.string(namer.operatorIsPrefix),
|
| - 'isObject' : namer.operatorIs(compiler.objectClass) });
|
| + """, { 'operatorIsPrefix' : js.string(namer.operatorIsPrefix)});
|
| if (compiler.hasIncrementalSupport) {
|
| result = js(
|
| r'#.inheritFrom = #', [namer.accessIncrementalHelper, result]);
|
| @@ -512,7 +504,12 @@ class OldEmitter implements Emitter {
|
| // the Object.prototype object, and they show through here, so we check
|
| // that we have a string.
|
| if (!superclass || typeof superclass != "string") {
|
| - inheritFrom(allClasses[cls], null);
|
| + // Inlined special case of InheritFrom here for performance reasons.
|
| + // Fix up the the Dart Object class' prototype.
|
| + var constructor = allClasses[cls];
|
| + var prototype = constructor.prototype;
|
| + prototype.constructor = constructor;
|
| + prototype.#isObject = constructor;
|
| return;
|
| }
|
| finishClass(superclass);
|
| @@ -531,7 +528,8 @@ class OldEmitter implements Emitter {
|
| }''', {'finishedClassesAccess': finishedClassesAccess,
|
| 'needsMixinSupport': needsMixinSupport,
|
| 'hasNativeClasses': hasNativeClasses,
|
| - 'nativeInfoHandler': nativeInfoHandler});
|
| + 'nativeInfoHandler': nativeInfoHandler,
|
| + 'isObject' : namer.operatorIs(compiler.objectClass) });
|
| }
|
|
|
| void emitFinishIsolateConstructorInvocation(CodeOutput output) {
|
|
|