stage1 初步实现

This commit is contained in:
zzy
2026-08-06 19:26:30 +08:00
parent a56b4cbb70
commit 314100afbc
35 changed files with 556 additions and 2236 deletions

View File

@@ -548,7 +548,7 @@ void spl_vm_init_ex(spl_vm_t *vm, int stack_size, int call_depth) {
#endif
if (!vm)
return;
vm->config.max_stack_depth = stack_size > 0 ? stack_size : 1024 * 8;
vm->config.max_stack_depth = stack_size > 0 ? stack_size : 1024 * 1024 * 8;
vm->config.max_call_depth = call_depth > 0 ? call_depth : 128;
vec_init(vm->stacks);
@@ -989,6 +989,8 @@ int spl_vm_run_once(spl_vm_t *vm) {
}
case SPL_HALT:
if (ins->imm)
vm->exit_code = (int)ins->imm;
return 1;
/* ========== Stack / Frame Local Memory ========== */