diff --git a/App/lib/core/Gen/VarGenMixin.vp b/App/lib/core/Gen/VarGenMixin.vp index 6beea47..a69f596 100644 --- a/App/lib/core/Gen/VarGenMixin.vp +++ b/App/lib/core/Gen/VarGenMixin.vp @@ -374,6 +374,7 @@ novirtual class VarGenMixin: # 路径都失效,才算失效"(求交),与 life_* 的 Meet 同点位、同生命周期(pool 快照)。 def freed_capture(self, trans: HT.Translator*) -> sizet*: """快照当前失效槽表:buf[0]=count,其后每项一个失效槽指针;失败返回 None""" + global _g_freed_slots, _g_freed_count if trans is None or trans.Pool is None: return None pool: memhub.MemBuddy* = trans.Pool n: sizet = sizet(_g_freed_count) @@ -388,7 +389,7 @@ novirtual class VarGenMixin: def freed_restore(self, buf: sizet*) -> int: """把失效槽表复位到快照(分支出口 / 单侧到达合流时用);0=完成 / 1=无快照""" - global _g_freed_count + global _g_freed_slots, _g_freed_count if buf is None: return 1 n: sizet = buf[0] if n > 0: @@ -404,7 +405,7 @@ novirtual class VarGenMixin: def freed_join(self, buf: sizet*) -> int: """合流:当前失效槽表与快照**求交**(只有两路都失效才算失效);0=完成 / 1=无快照""" - global _g_freed_count + global _g_freed_slots, _g_freed_count if buf is None: return 1 n: sizet = buf[0] out: int = 0