Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala committed Sep 11, 2015
1 parent b01a5b4 commit 18f1e4c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 43 deletions.
8 changes: 0 additions & 8 deletions packages/ember-application/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ import Ember from 'ember-metal/core';
@submodule ember-application
*/

<<<<<<< HEAD
import DefaultResolver from 'ember-application/system/resolver';
import {
Resolver
} from 'ember-application/system/resolver';
import Application from 'ember-application/system/application';
=======
Ember.onLoad('Ember.Application', function() {
Ember.__loader.require('ember-application/ext/controller');
});
>>>>>>> play with making more things lazy. HTMLBars stuff still is quite costly…

var reexport = Ember.__reexport;

Expand Down
1 change: 1 addition & 0 deletions packages/ember-application/lib/system/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { set } from 'ember-metal/property_set';
import EmptyObject from 'ember-metal/empty_object';
import { runLoadHooks } from 'ember-runtime/system/lazy_load';
import Namespace from 'ember-runtime/system/namespace';
import RegistryProxy, { buildFakeRegistryWithDeprecations } from 'ember-runtime/mixins/registry_proxy';

import environment from 'ember-metal/environment';

Expand Down
2 changes: 0 additions & 2 deletions packages/ember-metal/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ function reexport(moduleName, exportsProperty, properties) {
importAs = exportAs = property;
}

var exportObj = exportsProperty ? Ember[exportsProperty] : Ember;

//Ember.assert(`Do you really think Ember.${exportsProperty} exists? wtf`, typeof exportObj !== 'undefined');
//Ember.assert(`Import exists ${moduleName}{${importAs}}`, typeof Ember.__loader.require(moduleName)[importAs] !== 'undefined');

Expand Down
18 changes: 0 additions & 18 deletions packages/ember-metal/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,24 +184,6 @@ reexport('ember-metal/is_blank', 'isBlank');
reexport('ember-metal/is_present', 'isPresent');
reexport('ember-metal/merge', 'merge');

<<<<<<< HEAD
if (isEnabled('ember-metal-stream')) {
reexport('ember-metal/streams/stream', 'stream');
reexport('ember-metal/streams/utils', 'stream', [
'Stream',
'isStream',
'subscribe',
'unsubscribe',
'read',
'readHash',
'readArray',
'scanArray',
'scanHash',
'concat',
'chain'
]);
}

Ember.FEATURES = FEATURES;
Ember.FEATURES.isEnabled = isEnabled;

Expand Down
2 changes: 1 addition & 1 deletion packages/ember-routing/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Ember from 'ember-metal/core';
// ES6TODO: Cleanup modules with side-effects below
import 'ember-routing/ext/run_loop';
import 'ember-routing/ext/controller';
import 'ember-routing/initializers/routing-service';
import 'ember-routing/services/routing';

var reexport = Ember.__reexport;

Expand Down
18 changes: 6 additions & 12 deletions packages/ember-runtime/lib/ext/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
@submodule ember-runtime
*/

import Ember from 'ember-metal/core'; // Ember.EXTEND_PROTOTYPES, Ember.assert
import expandProperties from 'ember-metal/expand_properties';

function computed() {
return Ember.__loader.require('ember-metal/computed');
}

function observer() {
return Ember.__loader.require('ember-metal/observer');
}
import Ember from 'ember-metal/core'; // Ember.EXTEND_PROTOTYPES
import { assert, deprecateFunc } from 'ember-metal/debug';
import { computed } from 'ember-metal/computed';
import { observer } from 'ember-metal/mixin';

var a_slice = Array.prototype.slice;
var FunctionPrototype = Function.prototype;
Expand Down Expand Up @@ -78,7 +72,7 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
@public
*/
FunctionPrototype.property = function () {
var ret = computed()(this);
var ret = computed(this);
// ComputedProperty.prototype.property expands properties; no need for us to
// do so here.
return ret.property(...arguments);
Expand Down Expand Up @@ -111,7 +105,7 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
*/
FunctionPrototype.observes = function(...args) {
args.push(this);
return observer().apply(this, args);
return observer.apply(this, args);
};


Expand Down
2 changes: 0 additions & 2 deletions packages/ember-runtime/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ reexport('ember-runtime/mixins/observable', 'Observable');
reexport('ember-runtime/mixins/-proxy', '_ProxyMixin');
reexport('ember-runtime/computed/array_computed', ['arrayComputed', 'ArrayComputedProperty']);
reexport('ember-runtime/computed/reduce_computed', ['reduceComputed', 'ReduceComputedProperty']);
reexport('ember-runtime/utils', ['typeOf']);

// ES6TODO: this seems a less than ideal way/place to add properties to Ember.computed
reexport('ember-runtime/computed/reduce_computed_macros', 'computed', [
Expand Down Expand Up @@ -72,7 +71,6 @@ reexport('ember-runtime/controllers/object_controller', 'ObjectController');
reexport('ember-runtime/controllers/controller', 'Controller');
reexport('ember-runtime/mixins/controller', 'ControllerMixin');
reexport('ember-runtime/system/service', 'Service');
reexport('ember-runtime/mixins/-proxy', '_ProxyMixin');

Ember.RSVP = RSVP;
// END EXPORTS
Expand Down

0 comments on commit 18f1e4c

Please sign in to comment.