feat(ast2ir): 实现C11类型提升系统并重构HIR基本块管理

- 新增 scc_ast2ir_promote.c 实现整数提升(6.3.1.1)和寻常算术转换(6.3.1.8)
- 重构 HIR Builder: bblock → create_bblock + append_bblock,引入BBList链表管理
- AST2IR 全面集成类型提升:二元运算、赋值、函数调用参数、自增/自减操作符
- 变参函数支持:跳过 ... 假参数,实现默认参数提升(float→double等)
- 简化 HIR Dump 实现
- MIR: Win64 ABI改进、x86指令选择优化
- 新增 printf 测试用例
This commit is contained in:
zzy
2026-05-24 15:46:22 +08:00
parent ea553718f0
commit cec96333e7
27 changed files with 1223 additions and 740 deletions

View File

@@ -135,6 +135,9 @@ typedef enum {
/* 栈管理 */
SCC_LIR_ALLOCA,
/* 类型扩展 */
SCC_LIR_EXTEND,
SCC_LIR_NOP
} scc_lir_op_t;
@@ -208,6 +211,10 @@ typedef struct scc_lir_ins {
int align_bytes;
} alloca;
struct scc_lir_extend {
int from_size; // 源类型宽度(字节)
} extend;
struct {
scc_lir_val_t ap;
scc_lir_val_t last;