mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-25 06:24:27 +08:00
Outside constructors a final field cannot change: the constructors that store it are finished or suspended below every other running frame. A loop reading p.f through a never-rebound parameter (usually this) still reloaded it after every store or call that might alias the object and hid bounds and strides such as y < this.h or i - this.w from loop-invariant reasoning. Such reads now go through an immutable local declared before the outermost loop containing them. analyzeFinalFields gains a scalar mode, which also treats in-place numeric updates (fieldIncDec) as writes.