stage1 支持结构体初始化

This commit is contained in:
zzy committed 2026-09-14 10:09:32 +08:00
1 parent 72ae6d6994
commit 9bdb7f892e
4 files changed
+72 -15

No files matched your search

+2 -2
View File
@@ -858,8 +858,8 @@ static void cg_node(cgen_t *cg, usize ref, const spl_ir_node_t *n) {
spl_type_node_t *tn = spl_type_node(cg->ctx->type, n->arith.tid);
if (tn && tn->kind == SPL_TYPE_BOOL) {
cg_load_slot(cg, n->arith.left, SPL_BOOL);
CG_PUSH(cg, SPL_U8, 0);
CG_OP(cg, SPL_EQ, SPL_U8);
CG_PUSH(cg, SPL_BOOL, 0);
CG_OP(cg, SPL_EQ, SPL_BOOL);
cg_store_slot(cg, ref, SPL_BOOL);
} else {
cg_unop(cg, ref, n, SPL_NOT);