Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove Module.prototype.go. It is unnecessary.

  • Loading branch information...
commit 2a0bc74218e7a6caff1d7631fab2e97df848dd13 1 parent 3a82cad
@isaacs isaacs authored
Showing with 3 additions and 10 deletions.
  1. +3 −10 lib/module.js
View
13 lib/module.js
@@ -16,7 +16,7 @@ function main (filename) {
mod.filename = filename;
// start the module when the event loop fires up.
process.checkBreak();
- process.nextTick(function () { mod.go() });
+ process.nextTick(function () { mod.compile() });
}
function requireNative (id) {
@@ -28,7 +28,7 @@ function requireNative (id) {
}
var mod = nativeModuleCache[id] = new Module(id)
mod.data = natives[id];
- return mod.go().exports;
+ return mod.compile().exports;
}
// load up the module referenced by "id", from "parent"
@@ -43,7 +43,7 @@ function require (id, parent) {
if (!parent) {
throw new Error("Cannot load non-native orphan module");
}
- return parent.spawn(id).go().exports;
+ return parent.spawn(id).compile().exports;
}
function Module (id, parent) {
@@ -122,13 +122,6 @@ Module.prototype.mintChild = function (id, filename) {
return child;
}
-Module.prototype.go = function () {
- // already have filename or code.
- return this.compiled ? this
- : this.data ? this.compile()
- : this.load().compile();
-}
-
Module.prototype.load = function () {
// If it's already been loaded/compiled, just return.
if (this.data || this.compiled) return this;
Please sign in to comment.
Something went wrong with that request. Please try again.