remove property access for bytecode functions

This commit is contained in:
2026-01-11 13:22:36 -06:00
parent 17b9aaaf51
commit ffe7b61ae2
4 changed files with 263 additions and 17 deletions

View File

@@ -72,7 +72,7 @@ function use_core(path) {
var script = text(script_blob)
var mod = `(function setup_module(use){${script}})`
var fn = js.eval('core:' + path, mod)
var result = fn.call(sym, use_core);
var result = call(fn,sym, use_core)
use_cache[cache_key] = result;
return result;
}
@@ -432,7 +432,7 @@ $_.start = function start(cb, program, ...args) {
if (!program) return
var id = guid()
if (args.length == 1 && Array.isArray(args[0])) args = args[0]
if (args.length == 1 && is_array(args[0])) args = args[0]
var startup = {
id,
overling: $_.self,
@@ -786,7 +786,7 @@ $_.clock(_ => {
// Call with signature: setup_module(args, use, ...capabilities)
// The script wrapper builds $_ from the injected capabilities for backward compatibility
var val = locator.symbol.call(null, _cell.args.arg, use_fn, ...vals)
var val = call(locator.symbol, null, _cell.args.arg, use_fn, ...vals)
if (val)
throw new Error('Program must not return anything');