fix(tpv): 修 VKernel 暴露的 codegen 缺陷(浮点 CDefine/__sizeof__ packed/CONST_STR/alloca/无符号/ABI)

- 浮点 t.CDefine 初值序列化与源恢复(gfx PI 编成 0.0)

- __sizeof__ 按 packed 计算(cpu _tss memset 越界写 4B)

- 数组初始化器支持 CONST_STR 单字符;模块级别名不再产出 global i32 0 假全局

- 临时缓冲/构造临时量 alloca 提升至入口块(B6 未覆盖路径)

- 无符号判定补 CSizeT/小写别名/结构体字段 + udiv/urem + range 位宽与符号 + zext 扩展

- 跨模块 declare 形参按 vpi 定义侧收敛(修 _vpi_method_param_annot 拒绝 cls_name=None 导致 coerce 恒失效)
This commit is contained in:
TermiNexus committed 2026-09-11 14:26:54 +08:00
1 parent bd46b47b22
commit e20a6f3d11
23 files changed
+655 -101

No files matched your search

+1 -1
View File
@@ -172,7 +172,7 @@ class ExprGenFstr(ExprGenBase.ExprGenBase):
return None
# 固定栈缓冲 [FSTR_BUF_SIZE x i8],GEP(0,0) 取 i8*
buf_ty: llvmlite.LLVMType | t.CPtr = llvmlite.Array(pool, i8_ty, FSTR_BUF_SIZE)
buf_alloca: llvmlite.Value | t.CPtr = llvmlite.build_alloca(builder, buf_ty)
buf_alloca: llvmlite.Value | t.CPtr = self.Gen.VarGen._alloca_at_entry(builder, buf_ty)
if buf_alloca is None:
return None
zero_i32: llvmlite.Value | t.CPtr = llvmlite.const_int32(pool, 0)