fix(exprlen): 剥离 sha1 前缀修复 len() 分派失效

class_members/class_member_element_class 的 key 为裸类名,而 _CurrentCpythonObjectClass 可能带 sha1 前缀导致 gate miss 落到 strlen(stdint.vp 0xC0000005 根因)。同时按字段静态类型沿 MRO 分派 list.__len__,并移除排查期诊断 printf。
This commit is contained in:
TermiNexus committed 2026-08-20 10:28:29 +08:00
1 parent bd5d2467ab
commit f2cdbdc70f
3 files changed
+40 -13

No files matched your search

-4
View File
@@ -950,10 +950,6 @@ 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