Skip to content

Commit

Permalink
Merge pull request #16772 from emberjs/cleanup-core-object
Browse files Browse the repository at this point in the history
Remove unneeded things that create many mixins and merges.
  • Loading branch information
rwjblue committed Jun 23, 2018
2 parents 8dba59c + 49eb760 commit 7b1fc36
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions packages/ember-runtime/lib/system/core_object.js
Expand Up @@ -39,7 +39,6 @@ const wasApplied = new WeakSet();
const factoryMap = new WeakMap();

const prototypeMixinMap = new WeakMap();
const classMixinMap = new WeakMap();

/**
@class CoreObject
Expand Down Expand Up @@ -806,7 +805,6 @@ class CoreObject {
@public
*/
static reopenClass() {
reopen.apply(this.ClassMixin, arguments);
applyMixin(this, arguments, false);
return this;
}
Expand Down Expand Up @@ -893,22 +891,10 @@ class CoreObject {
});
}

static get ClassMixin() {
let classMixin = classMixinMap.get(this);
if (classMixin === undefined) {
let s = this.superclass;
classMixin = s === undefined ? Mixin.create() : Mixin.create(s.ClassMixin);
classMixin.ownerConstructor = this;
classMixinMap.set(this, classMixin);
}
return classMixin;
}

static get PrototypeMixin() {
let prototypeMixin = prototypeMixinMap.get(this);
if (prototypeMixin === undefined) {
let s = this.superclass;
prototypeMixin = s === undefined ? Mixin.create() : Mixin.create(s.PrototypeMixin);
prototypeMixin = Mixin.create();
prototypeMixin.ownerConstructor = this;
prototypeMixinMap.set(this, prototypeMixin);
}
Expand All @@ -934,14 +920,9 @@ class CoreObject {
}
}

// CoreObject.prototype.concatenatedProperties = null;
// CoreObject.prototype.mergedProperties = null;

CoreObject.toString = classToString;
setName(CoreObject, 'Ember.CoreObject');

CoreObject.PrototypeMixin.ownerConstructor = CoreObject;

CoreObject.isClass = true;
CoreObject.isMethod = false;

Expand Down

0 comments on commit 7b1fc36

Please sign in to comment.