fix
This commit is contained in:
@@ -586,6 +586,7 @@ function turn(msg)
|
|||||||
|
|
||||||
log.console(`FIXME: need to get main from config, not just set to true`)
|
log.console(`FIXME: need to get main from config, not just set to true`)
|
||||||
log.console(`FIXME: actors need the truncated use function as well`)
|
log.console(`FIXME: actors need the truncated use function as well`)
|
||||||
|
log.console(`FIXME: remove global access (ie globalThis.use)`)
|
||||||
actor_mod.register_actor(cell.id, turn, true, config.system.ar_timer)
|
actor_mod.register_actor(cell.id, turn, true, config.system.ar_timer)
|
||||||
|
|
||||||
if (config.system.actor_memory)
|
if (config.system.actor_memory)
|
||||||
@@ -710,9 +711,8 @@ var prog = cell.args.program
|
|||||||
|
|
||||||
// Resolve the main program path
|
// Resolve the main program path
|
||||||
var locator = shop.resolve_locator(cell.args.program, ACTOR_EXT, null)
|
var locator = shop.resolve_locator(cell.args.program, ACTOR_EXT, null)
|
||||||
if (!locator) {
|
if (!locator)
|
||||||
throw new Error(`Main program ${cell.args.program} could not be found`)
|
throw new Error(`Main program ${cell.args.program} could not be found`)
|
||||||
}
|
|
||||||
|
|
||||||
$_.clock(_ => {
|
$_.clock(_ => {
|
||||||
var val = locator.symbol.call(null, $_, cell.args.arg);
|
var val = locator.symbol.call(null, $_, cell.args.arg);
|
||||||
|
|||||||
@@ -499,7 +499,9 @@ script_forms['.cm'] = function(path, script, pkg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
script_forms['.ce'] = function(path, script, pkg) {
|
script_forms['.ce'] = function(path, script, pkg) {
|
||||||
return `(function start($_, arg) { var args = arg; ${script} ; })`
|
var pkg_arg = pkg ? `'${pkg}'` : 'null'
|
||||||
|
var relative_use_fn = `def use = function(path) { return globalThis.use(path, ${pkg_arg});}`
|
||||||
|
return `(function start($_, arg) { ${relative_use_fn}; var args = arg; ${script} ; })`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get flags from config
|
// Get flags from config
|
||||||
@@ -1227,7 +1229,6 @@ Shop.build_package = function(package)
|
|||||||
log.console("Linking " + lib_name)
|
log.console("Linking " + lib_name)
|
||||||
|
|
||||||
var link_flags = '-fPIC -shared'
|
var link_flags = '-fPIC -shared'
|
||||||
if (platform == 'macOS') link_flags += ' -undefined dynamic_lookup'
|
|
||||||
|
|
||||||
var ldflags = get_flags(config, platform, 'LDFLAGS')
|
var ldflags = get_flags(config, platform, 'LDFLAGS')
|
||||||
if (ldflags != '') link_flags += ' ' + ldflags
|
if (ldflags != '') link_flags += ' ' + ldflags
|
||||||
@@ -1238,7 +1239,7 @@ Shop.build_package = function(package)
|
|||||||
objs_str += '"$HERE/' + c_objects[i] + '" '
|
objs_str += '"$HERE/' + c_objects[i] + '" '
|
||||||
}
|
}
|
||||||
|
|
||||||
var link_cmd = 'HERE=$(pwd); cd ' + module_dir + ' && cc ' + link_flags + ' ' + objs_str + ' -lc -lc++ -o ' + temp_lib
|
var link_cmd = 'HERE=$(pwd); cd ' + module_dir + ' && cc ' + link_flags + ' ' + objs_str + ' -lcell -lc -lc++ -o ' + temp_lib
|
||||||
var ret = os.system(link_cmd)
|
var ret = os.system(link_cmd)
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
log.error("Linking failed")
|
log.error("Linking failed")
|
||||||
|
|||||||
Reference in New Issue
Block a user