Skip to content

Commit

Permalink
Cleanup boot_module() to be a bit more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 25, 2013
1 parent 1f32051 commit 07ea01b
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions corelib/runtime.js
Expand Up @@ -138,26 +138,23 @@
mtor.prototype = superklass.constructor.prototype;

OpalModule.prototype = new mtor();
var prototype = OpalModule.prototype;

prototype._alloc = constructor;
prototype._isClass = true;
prototype.constructor = OpalModule;
prototype._super = superklass;
prototype._methods = [];
prototype.__inc__ = [];
prototype.__parent = superklass;

var klass = new OpalModule();

klass._alloc = constructor;
klass._isClass = true;
klass.constructor = OpalModule;
klass._super = superklass;
klass._methods = [];
klass.__inc__ = [];
klass.__parent = superklass;
// method table (_proto) for a module can be a simple js object as
// we dont inherit methods, and we dont ever instantialize it.
klass._proto = {};
klass._proto = {};
klass._mod$ = true;
klass.__dep__ = [];

klass._mod$ = true;
klass.__dep__ = [];

return klass;
return klass;

This comment has been minimized.

Copy link
@elia

elia Sep 25, 2013

Member

I bet this missing space is vim's fault 😆

This comment has been minimized.

Copy link
@adambeynon

adambeynon Sep 25, 2013

Author Contributor

Quite possibly ;) 3cc7e39

This comment has been minimized.

Copy link
@meh

meh Sep 25, 2013

Member

This wouldn't have happened if we were using tabs for indentation ( ≖‿≖)

This comment has been minimized.

Copy link
@elia

elia Sep 25, 2013

Member

lolz, in my experience 🛂

  • 1 space errors are typical of vim
  • but spurious non-breaking spaces are from sublime text (a la  )
  • a textmate user will probably leave some trailing space

I miss some emacs rules, but that's only because I don't see enough :neckbeard: emacs code…

}

// Boot a base class (makes instances).
Expand Down

0 comments on commit 07ea01b

Please sign in to comment.