stage1 初步实现
This commit is contained in:
@@ -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 ========== */
|
||||
|
||||
Reference in New Issue
Block a user