From 054dcf0a0b5750c3043194c875abe7dce708919f Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 9 Oct 2026 11:24:29 +0800 Subject: [PATCH] =?UTF-8?q?chore(dbg):=20=E5=BD=A2=E5=8F=82=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E4=B8=8E=20pre-scan=20=E4=B9=8B=E9=97=B4=E8=A1=A5=20p?= =?UTF-8?q?1c=20=E6=8E=A2=E9=92=88=EF=BC=88TEMP=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add_var 三次全过(esz=56),崩点在其后。p1c 夹出 L700-763(状态保存)与 L765-775(pre-scan)两段。 --- App/lib/core/Gen/Func/FuncGenDef.vp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App/lib/core/Gen/Func/FuncGenDef.vp b/App/lib/core/Gen/Func/FuncGenDef.vp index 3fe8d4b..f6bcfa2 100644 --- a/App/lib/core/Gen/Func/FuncGenDef.vp +++ b/App/lib/core/Gen/Func/FuncGenDef.vp @@ -760,7 +760,8 @@ novirtual class FuncGenDef(CallGenBase.CallGenBase): GenApi.clear_scope_names(trans) # Reset the in-chain nonlocal heap prebuild flag (built once per function; multiple nested function definitions # share one heap, preventing repeated malloc + double VarEntry redirection). - trans._nl_chain_done = 0 + trans._nl_chain_done = 0 + VLogger.info("TR.p1c.state.saved", "TR") # Pre-scan the body: 1) Global/Nonlocal declarations first (Python semantics: they apply to the whole function # scope regardless of position, so register before any assignment); 2) AnnAssign to create local allocas early.