diff --git a/App/lib/core/Gen/AssignGenMixin.vp b/App/lib/core/Gen/AssignGenMixin.vp index 00dad54..5acb69e 100644 --- a/App/lib/core/Gen/AssignGenMixin.vp +++ b/App/lib/core/Gen/AssignGenMixin.vp @@ -2254,6 +2254,21 @@ novirtual class AssignGenMixin: # Ensure the full cross-module struct definition is available (for alloca) self.Gen.StructGen.ensure_struct_def_in_module(pool, trans.Module, var_ty) + # [TEMP-DIAG] 变量声明的槽类型文本(定位完删除): + # class 标注若被解析成 `ptr`,槽就是"指针"而非值本位(`CAM: V3` / `col: V3` 现场)。 + vtb: str = "?" + bt0: str = pool.alloc_tagged(512, memhub.DETSITE_ASSIGNGEN_578) + if bt0 is not None: + mlirlite.TypePrint(bt0, 512, var_ty, pool) + vtb = bt0 + vptr0: int = -1 + if var_ty is not None: vptr0 = self.Gen.ExprGenBase.is_ptr_type(var_ty) + nm0: str = nm.id + if nm0 is None: nm0 = "?" + fn0: str = None + if trans._cur_func is not None: fn0 = mlirlite.function_get_name(trans._cur_func) + if fn0 is None: fn0 = "?" + stdio.printf("[VAR-DIAG] fn=%s name=%s vptr=%d var_ty=%s\n", fn0, nm0, vptr0, vtb) alloca: mlirlite.Value* = self.Gen.VarGen._alloca_at_entry(builder, var_ty) if alloca is not None: if self.Gen.VarGen.define_var(trans.SymTab, nm.id, alloca) == 0: