diff --git a/App/lib/core/Gen/AssignGenMixin.vp b/App/lib/core/Gen/AssignGenMixin.vp index 142b0a0..00dad54 100644 --- a/App/lib/core/Gen/AssignGenMixin.vp +++ b/App/lib/core/Gen/AssignGenMixin.vp @@ -1151,16 +1151,27 @@ novirtual class AssignGenMixin: # 目标位置是地址(`&T(...)`、指针目标、指针槽)才交出本帧地址 ⇒ LIFE_FRAME。 if target_ty is not None and self.Gen.ExprGenBase.is_ptr_type(target_ty) == 0: return GenTypes.LIFE_VALUE - # [TEMP-DIAG] 裸构造仍判帧生命期时的输入快照(定位完删除) + # [TEMP-DIAG] 打印构造类型与目标类型的**真实 LLVM 文本**(定位完删除): + # ct_ty 是 `T(...)` 自身的类型(`%"..T"` = 值本体 / `ptr` = 已被解析成指针) + # tgt 是目标位置(模块级全局/值槽)的类型文本 + ctb: str = "?" + bt1: str = trans.Pool.alloc_tagged(512, memhub.DETSITE_ASSIGNGEN_578) + if bt1 is not None: + mlirlite.TypePrint(bt1, 512, ct_ty, trans.Pool) + ctb = bt1 + ttb: str = "(none)" + if target_ty is not None: + bt2: str = trans.Pool.alloc_tagged(512, memhub.DETSITE_ASSIGNGEN_579) + if bt2 is not None: + mlirlite.TypePrint(bt2, 512, target_ty, trans.Pool) + ttb = bt2 hv: int = -1 if ct_en is not None: hv = ct_en.HasNew - tptr: int = -1 - if target_ty is not None: tptr = self.Gen.ExprGenBase.is_ptr_type(target_ty) fn_c: str = None if trans._cur_func is not None: fn_c = mlirlite.function_get_name(trans._cur_func) if fn_c is None: fn_c = "?" - stdio.printf("[CTOR-DIAG] fn=%s ctor=%s hasnew=%d tptr=%d tgt_none=%d\n", - fn_c, ctor_nm, hv, tptr, 1 if target_ty is None else 0) + stdio.printf("[CTOR-DIAG] fn=%s ctor=%s hasnew=%d ct_ty=%s tgt=%s\n", + fn_c, ctor_nm, hv, ctb, ttb) return GenTypes.LIFE_FRAME return GenTypes.LIFE_UNKNOWN if k == ast.ASTKind.New: