From a2378e6878a33ccef10aae36da509259e6ca257a Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 18 Aug 2026 09:25:36 +0800 Subject: [PATCH] =?UTF-8?q?chore(ast):=20Attribute.=5F=5Finit=5F=5F=20?= =?UTF-8?q?=E5=8A=A0=E6=9E=84=E9=80=A0=E6=96=AD=E7=82=B9=EF=BC=8C=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=20stdint.vp=20attr=20=E5=9E=83=E5=9C=BE=E6=9D=A5?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/ast/exprs.vp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/ast/exprs.vp b/includes/ast/exprs.vp index eaac740..85e54b9 100644 --- a/includes/ast/exprs.vp +++ b/includes/ast/exprs.vp @@ -2,6 +2,7 @@ import t, c from stdint import * import memhub import string +import stdio from .base import ( AST, ExprNode, ASTKind, ASTCtx, OpKind, _init_ast, _copy_str, _set_parent_list, @@ -949,6 +950,10 @@ class Attribute(ExprNode): self.value = value self.attr = _copy_str(pool, attr) self.ctx = ctx + # 诊断(stdint.vp Attribute.attr 垃圾定位):构造后打印 attr 副本地址 + stdio.printf("[DIAG] Attribute.__init__: this=%llu attr_src=%llu attr_copy=%llu value=%llu ctx=%d\n", + t.CUInt64T(self), t.CUInt64T(attr), t.CUInt64T(self.attr), + t.CUInt64T(self.value), self.ctx) def kind(self) -> t.CInt: return ASTKind.Attribute