From 9e6e76fcab38b377dbb16f3ced468f4e02e060ac Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Thu, 20 Aug 2026 11:54:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(gen):=20=E5=85=84=E5=BC=9F=20Mixin=20this?= =?UTF-8?q?=20=E8=B0=83=E6=95=B4=E6=94=B9=E7=94=A8=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=BA=A7=20HandlesClassDef.=5Fget=5Ftype=5Fsize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 765702b 用 self._get_type_size(定义在 ClassGenEnumMixin)跨 Mixin 调用按 self 类型解析失败 → 链接 undefined symbol: CallGenCall._get_type_size。改为 HandlesClassDef._get_type_size(模块级函数,_field_byte_offset 同源用法)。 --- App/lib/core/Gen/CallGenCall.vp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/lib/core/Gen/CallGenCall.vp b/App/lib/core/Gen/CallGenCall.vp index 1d78a28..ac7ba9d 100644 --- a/App/lib/core/Gen/CallGenCall.vp +++ b/App/lib/core/Gen/CallGenCall.vp @@ -1023,7 +1023,7 @@ class CallGenCall(CallGenBase.CallGenBase): # BaseB 字段区起点,BaseA 区在它前面,this 前移 sizeof(定义类)。 # 若无此分支,sub_field_th 查找失败 → 下方 fail-fast,兄弟 Mixin # 调用永远编译不过(NoVTableCrossMixinTest BaseB.caller 根因)。 - anc_size_th: int = self._get_type_size(anc_entry_th.Ty) + anc_size_th: int = HandlesClassDef._get_type_size(anc_entry_th.Ty) if anc_size_th > 0: i8_ty_th2: llvmlite.LLVMType | t.CPtr = llvmlite.Int8(pool) i8_ptr_th2: llvmlite.LLVMType | t.CPtr = llvmlite.Ptr(pool, i8_ty_th2)