Set arity in native compiler and bytecode modules
Sx_compiler.compile/compile_module now emit arity (local slot count) in the bytecode dict. MCP sx_build_bytecode serializes arity into .sxbc.json. sx-platform.js passes arity through to K.loadModule(). Without this, the VM allocated only 16 local slots per module frame. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -245,6 +245,7 @@
|
||||
|
||||
var module = {
|
||||
_type: 'dict',
|
||||
arity: json.module.arity || 0,
|
||||
bytecode: { _type: 'list', items: json.module.bytecode },
|
||||
constants: { _type: 'list', items: json.module.constants.map(deserializeConstant) },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user