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