From 20e3f3694fafd5c8e1fb3156b9c5167a5da7aa71 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 9 Oct 2026 10:39:24 +0800 Subject: [PATCH] =?UTF-8?q?chore(dbg):=20=E8=A1=A5=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E7=BA=A7=E4=B8=8E=E8=B0=83=E7=94=A8=E7=BA=A7=E6=8E=A2=E9=92=88?= =?UTF-8?q?=EF=BC=88stmt.kind=20/=20call.enter=20fn=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 崩点已收窄到 Check 函数体内的翻译,这两个探针把范围压到具体语句与具体被调者。均为 TEMP,定位后移除。 --- App/lib/core/Gen/Call/CallGenMixin.vp | 2 ++ App/lib/core/Gen/Stmt/StmtGenMixin.vp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/App/lib/core/Gen/Call/CallGenMixin.vp b/App/lib/core/Gen/Call/CallGenMixin.vp index d30b6cd..18c5e66 100644 --- a/App/lib/core/Gen/Call/CallGenMixin.vp +++ b/App/lib/core/Gen/Call/CallGenMixin.vp @@ -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) diff --git a/App/lib/core/Gen/Stmt/StmtGenMixin.vp b/App/lib/core/Gen/Stmt/StmtGenMixin.vp index 2102d0a..403759f 100644 --- a/App/lib/core/Gen/Stmt/StmtGenMixin.vp +++ b/App/lib/core/Gen/Stmt/StmtGenMixin.vp @@ -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".