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