stage1 重新实现ast2ir
This commit is contained in:
1 parent
bcd26d3021
commit
ab6e99c958
10 files changed
+1175
-677
No files matched your search
+2
-2
@@ -196,7 +196,7 @@ static void ir_dump_node(const spl_type_t *ty, spl_ir_node_t *n) {
|
||||
printf(" float=%f", n->type_const.float_lit);
|
||||
} else if (t && t->kind == SPL_TYPE_FN) {
|
||||
printf(" fn#%zu", n->type_const.fn);
|
||||
} else if (t && t->kind == SPL_TYPE_SLICE) {
|
||||
} else if (t && t->kind == SPL_TYPE_PTR) {
|
||||
printf(" str=\"%s\"", n->type_const.cstr_lit ? n->type_const.cstr_lit : "?");
|
||||
} else if (t && t->kind == SPL_TYPE_INT && t->int_type.bits == 8) {
|
||||
printf(" char='%c'", n->type_const.ch_lit);
|
||||
@@ -276,7 +276,7 @@ void spl_ir_dump(spl_ir_t *ir, const spl_type_t *ty) {
|
||||
continue;
|
||||
spl_ir_func_t *func = &vec_at(ir->funcs, i);
|
||||
printf("func %s %%%zu", func->name ? func->name : "?", i);
|
||||
printf(" tid=");
|
||||
printf(" tid = ");
|
||||
spl_type_pure_dump((spl_type_t *)ty, func->fn_tid);
|
||||
printf("\n");
|
||||
vec_for(func->nodes, j) {
|
||||
|
||||
Reference in new issue
Block a user