Move client library sources (cssx.sx) before defcomp/defisland definitions in component-defs so defines are evaluated first. Identified root cause of CSSX "Not callable: nil" errors: JIT compiler captures free variable values at compile time instead of looking them up at runtime from vm_globals. When ~cssx/tw's JIT code calls cssx-process-token, it uses the compile-time snapshot (nil) instead of the runtime value (lambda). The function IS in global_env (type-of returns "lambda") but the JIT bytecode doesn't see it. Fix needed: JIT compiler should emit GLOBAL_GET instructions for free variables that reference vm_globals at runtime, not capture at compile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
96 KiB
96 KiB