fix(gen): P2 失效状态改存独立槽表,不再给 VarEntry 加字段
现象:任何工程编译都在函数形参注册刚结束处 access-violation(pc=0,逐字节可复现)。定位:逐层探针把崩点压到 FuncGenDef 的 pre_scan 段,而该段对 Check(body 仅 if+return)应为空操作,唯一变量是 VarEntry 这个热结构被加了 Freed 字段。修法:撤销 VarEntry.Freed,改用 VarGenMixin 的独立失效槽表 _g_freed_slots(键 = 变量槽 alloca,整次翻译内唯一,故全局累积、无需按函数 reset/restore);_FreedMark/_FreedCheck/_FreedClearSlot 三个 API 替换字段读写,P2 语义不变。同时清除全部 TEMP 探针。
This commit is contained in:
1 parent
95b076581a
commit
dd24dc670f
10 files changed
+61
-50
No files matched your search
@@ -840,8 +840,6 @@ def RunMultiFileProject(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str, ou
|
||||
done_flags[i] = 1
|
||||
completed_this_pass += 1
|
||||
continue
|
||||
# [TEMP dbg] 阶段日志:定位 Phase A 崩溃点(定位后移除)
|
||||
VLogger.info(f"PhaseA translating: {ent.Path}", "PhaseA")
|
||||
# Compute the package name (the directory part relative to source_dir)
|
||||
src_dir_len_pa: sizet = string.strlen(source_dir)
|
||||
pkg_pa: str = None
|
||||
|
||||
Reference in new issue
Block a user