stage1 重构代码

This commit is contained in:
zzy
2026-07-20 12:10:55 +08:00
parent ab63c8ed90
commit 21f35b30fa
14 changed files with 1963 additions and 1539 deletions

View File

@@ -443,7 +443,7 @@ const char *opcode_name[] = {
#undef X
};
const char *spl_opcode_name(spl_opcode_t opcode) { return opcode_name[opcode]; }
const char *spl_type_name(spl_type_t type) {
const char *spl_type_tag_name(spl_type_t type) {
switch (type) {
case SPL_VOID:
return "void";
@@ -481,7 +481,7 @@ const char *spl_type_name(spl_type_t type) {
void spl_ins_dump(spl_ins_t *ins, spl_val_t addr) {
printf("%4zu: %s", addr, spl_opcode_name((spl_opcode_t)ins->opcode));
if (ins->type != SPL_VOID)
printf(" %s", spl_type_name((spl_type_t)ins->type));
printf(" %s", spl_type_tag_name((spl_type_t)ins->type));
printf(" %zd:%zx", ins->imm, ins->imm);
printf("\n");
}