chore(ast): Attribute.__init__ 加构造断点,定位 stdint.vp attr 垃圾来源
This commit is contained in:
1 parent
802377e9ab
commit
a2378e6878
1 file changed
+5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user