diff --git a/App/lib/core/Gen/VarGenMixin.vp b/App/lib/core/Gen/VarGenMixin.vp index 0b2596e..0402c6f 100644 --- a/App/lib/core/Gen/VarGenMixin.vp +++ b/App/lib/core/Gen/VarGenMixin.vp @@ -305,8 +305,8 @@ novirtual class VarGenMixin: entry.IsConst = 0 # 生命期标签显式初始化:未登记 = LIFE_UNKNOWN(保守放行)。 entry.Life = GenTypes.LIFE_UNKNOWN - # P2 willFree:新变量未失效。显式清零,避免复用槽位残留上一变量的失效态。 - entry.Freed = 0 + # P2 willFree 的 entry.Freed **不在这里写**:init_vars 已对整块 memset 清零(见 init_vars), + # 逐个字段写末端偏移在"结构体刚加字段"时容易踩到;统一依赖整块清零。 # [S3 dual write] Value-type Spec (alloca.Ty is Ptr(value type), so take its pointee) entry.Spec = self._spec_of_var_alloca(alloca) return 0