fixing issues with main modules.
This commit is contained in:
parent
f2c2b540fd
commit
569058c2f2
|
@ -186,7 +186,7 @@
|
|||
|
||||
|
||||
[(AliasModuleAsMain!? op)
|
||||
(format "M.mainModules.push(M.modules[~s]);"
|
||||
(format "M.mainModules.push(~s);"
|
||||
(symbol->string (ModuleLocator-name (AliasModuleAsMain!-from op))))]
|
||||
|
||||
[(FinalizeModuleInvokation!? op)
|
||||
|
|
|
@ -823,8 +823,9 @@
|
|||
var mainModules = machine.mainModules.slice();
|
||||
var loop = function() {
|
||||
if (mainModules.length > 0) {
|
||||
var nextModule = mainModules.shift();
|
||||
nextModule.invoke(machine, loop, fail);
|
||||
var nextModuleName = mainModules.shift();
|
||||
machine.modules[nextModuleName] = machine.installedModules[nextModuleName]();
|
||||
machine.modules[nextModuleName].invoke(machine, loop, fail);
|
||||
} else {
|
||||
setReadyTrue();
|
||||
succ();
|
||||
|
@ -839,7 +840,7 @@
|
|||
var i;
|
||||
machine = machine || runtime.currentMachine;
|
||||
for (i = 0; i < machine.mainModules.length; i++) {
|
||||
var ns = machine.mainModules[i].getExports();
|
||||
var ns = machine.modules[mainModules[i]].getExternalExports();
|
||||
if(ns.hasKey(name)) {
|
||||
return ns.get(name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user