fix(tpv): 依赖注入期默认参数按定义模块 SHA1 登记,消除跨模块同名函数串味
N17:VpiReader 注入函数/方法 declare 时显式传入 src_sha1(被依赖模块自身
sha1),add_func_to_table 透传至 _register_global_defaults;调用点默认值查找
改用 find_func_entry_in_table_owned 按 "{owner_sha1}." 前缀限定。修复
usb.uhci.init 误命中 mm.init 的 5 形参/2 默认值而凭空补 2 个 i32 0 的 ABI
错位(IR 实证:call @...init(i16 %4, i32 0, i32 0) → (i16 %4))。
同轮并入的其他编译器侧改动:
- N11 Converter.vp:无 -> 但带 @c.CReturn 时合成 tuple 返回注解,与 define 对齐
- N12 VpiReader.vp:union 指针(T | t.CPtr)stub 解析与定义侧收敛到 i8*
- N14 ExprGenFstr.vp:f-string 32 位整型不再写 l 修饰符
- N2 撤回 ExprGenOps.vp:删除在 _node_type_unsigned 热点查/填 vpi 缓存的
_call_ret_annot_unsigned(有副作用,触发 fat32_diskio.vp match 路径崩溃)
This commit is contained in:
1 parent
e66d9e3adb
commit
d3690f9143
7 files changed
+124
-92
No files matched your search
@@ -338,10 +338,12 @@ class ExprGenFstr(ExprGenBase.ExprGenBase):
|
||||
return None
|
||||
len_mod[0] = '\0'
|
||||
ibits: int = self.Gen.ExprGenBase.get_llvm_type_bits(val.Ty)
|
||||
# 32 位**不写**长度修饰符(N14):`{x:08X}` 的实参是 i32,此前推导出
|
||||
# `l` → 格式串 `%08lX`(long)与实参宽度不符(LP64 下 printf 按 64 位
|
||||
# 读参 → 变参错位)。与同文件无 spec 路径 `_fstr_infer_c_fmt`(32 位用
|
||||
# `%u/%d`)以及 TPC 侧 HandlesExprFormat.py 保持一致。
|
||||
if ibits == 64:
|
||||
string.strcpy(len_mod, "ll")
|
||||
elif ibits == 32:
|
||||
string.strcpy(len_mod, "l")
|
||||
elif ibits == 16:
|
||||
string.strcpy(len_mod, "h")
|
||||
elif ibits == 8:
|
||||
|
||||
Reference in new issue
Block a user