chore(dbg): 补语句级与调用级探针(stmt.kind / call.enter fn)
崩点已收窄到 Check 函数体内的翻译,这两个探针把范围压到具体语句与具体被调者。均为 TEMP,定位后移除。
This commit is contained in:
1 parent
400cc6e17b
commit
20e3f3694f
2 files changed
+4
No files matched your search
@@ -94,6 +94,8 @@ novirtual class CallGenMixin(CallGenBase.CallGenBase):
|
||||
def translate_call(self, pool: memhub.MemBuddy*, builder: mlirlite.IRBuilder*, mod: mlirlite.LLVMModule*, node: ast.AST*, funcs_ptr: t.CPtr, func_count: int, trans: HT.Translator* = None) -> mlirlite.Value*:
|
||||
"""Translate a Call node and return the result Value."""
|
||||
cl: ast.Call* = ast.Call*(node)
|
||||
# [TEMP dbg] 阶段日志:定位到具体调用(定位后移除)
|
||||
VLogger.info(f"call.enter fn={self.Gen.ExprGenBase.get_func_name(cl.func)}", "TR")
|
||||
# Static symbols must not be used cross-module: fail fast on mod.fn(...) hitting another
|
||||
# module's static; the check lives in _CheckStaticCallCrossModule to keep this huge function inferable.
|
||||
self._CheckStaticCallCrossModule(pool, trans, cl)
|
||||
|
||||
@@ -27,6 +27,8 @@ novirtual class StmtGenMixin(StmtGenDeclMixin.StmtGenDeclMixin):
|
||||
|
||||
def translate_stmt(self, trans: HT.Translator*, node: ast.AST*) -> int:
|
||||
"""Translate a single statement with a depth guard; returns the number of new variables"""
|
||||
# [TEMP dbg] 阶段日志:语句级(定位崩溃到具体语句,定位后移除)
|
||||
if node is not None: VLogger.info(f"stmt.kind={node.kind()}", "TR")
|
||||
if trans is not None:
|
||||
# --traceback: statement-level DWARF location (no-op outside a DI-attached
|
||||
# define). Every instruction then carries ", !dbg !N".
|
||||
|
||||
Reference in new issue
Block a user