fix(tpv): translate_attribute 读路径字段未找到时标记 _deps_pending
- fileio.vp li.QuadPart 报错:LARGE_INTEGER(win32base)未编译时只有 vpi 空 stub,读路径字段查找失败未标记 pending → 直接 fatal 中断多遍收敛 - 读路径对齐写路径:字段未找到 → 标记 trans._deps_pending=1 下遍重译
This commit is contained in:
1 parent
20ba8e0297
commit
6540e27844
1 file changed
+6
-1
@@ -916,7 +916,12 @@ class ExprGenAttr(ExprGenBase.ExprGenBase):
|
||||
annot_ptr_ty: llvmlite.LLVMType | t.CPtr = llvmlite.Ptr(pool, annot_struct.Ty)
|
||||
return llvmlite.build_bitcast(builder, loaded_val, annot_ptr_ty)
|
||||
return loaded_val
|
||||
# fast-fail: 字段未找到,立即终止编译(不再打印诊断后返回 None)
|
||||
# 字段未找到:可能是 Phase A 依赖未就绪(定义侧模块未编译,vpi
|
||||
# stub 空类 FieldCount=0,如 LARGE_INTEGER)→ 标记 pending 下遍
|
||||
# 重译(对齐写路径 get_attribute_ptr;lookup_field_by_class 已对
|
||||
# 空 stub 返回 None 而非 fatal)。真实错误由 Phase A 收敛检查暴露。
|
||||
if trans is not None:
|
||||
trans._deps_pending = 1
|
||||
# Phase A 依赖未就绪(_deps_pending,父类/依赖类未注册致字段缺失):
|
||||
# 跳过本属性访问交给下遍重译(对齐 get_attribute_ptr L5541-5547),
|
||||
# 避免 fail-fast 中断多遍收敛;依赖就绪后仍缺失则走下方真实报错。
|
||||
|
||||
Reference in new issue
Block a user