stage1 重制18测试用例替换成match 完成现有全部测试

This commit is contained in:
zzy
2026-07-11 21:24:52 +08:00
parent 147f26e063
commit 53ae30f1ca
9 changed files with 729 additions and 143 deletions

View File

@@ -27,6 +27,7 @@ static int parse_fn_body(spl_comp_t *ctx, const char *fn_name, spl_type_info_t *
ctx->current_func_idx = fi;
ctx->current_ret_type = ret_type;
ctx->current_local_bytes = 0;
ctx->peak_local_bytes = 0;
spl_push_scope(ctx);
@@ -47,7 +48,7 @@ static int parse_fn_body(spl_comp_t *ctx, const char *fn_name, spl_type_info_t *
skip_nl(ctx);
}
spl_patch(ctx, alloc_addr, ctx->current_local_bytes / (int)sizeof(spl_val_t) - nparams);
spl_patch(ctx, alloc_addr, ctx->peak_local_bytes / (int)sizeof(spl_val_t) - nparams);
expect(ctx, TOK_R_BRACE);
}