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:
1 parent
bd5d2467ab
commit
f2cdbdc70f
3 files changed
+40
-13
No files matched your search
@@ -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
|
||||
|
||||
@@ -239,12 +239,6 @@ class LLVMModule:
|
||||
if func_scan.Params is not None:
|
||||
param_scan: Param | t.CPtr = func_scan.Params.Head
|
||||
param_scan_steps: t.CSizeT = 0
|
||||
if param_scan is not None:
|
||||
# 诊断(builtins.vp dump 卡死根因排查):对比访问器与
|
||||
# 直接字段访问的 param0/next——stub 字段访问若生成错误
|
||||
# GEP 会读到垃圾导致死循环。
|
||||
stdio.printf("[DIAG] param_scan 首节点: param=%llu next=%llu(函数名=%s)\n",
|
||||
t.CUInt64T(param_scan), t.CUInt64T(param_scan.Next), func_scan.Name)
|
||||
while param_scan is not None:
|
||||
param_scan_steps += 1
|
||||
if param_scan_steps > IR_DUMP_CHAIN_LIMIT:
|
||||
|
||||
Reference in new issue
Block a user