Replace local mutable blocks in one pass over the function
Why
The pass analyzed and rewrote a block's whole scope once per block, so n refs used in one function cost O(n²): 1,000 refs updated in one loop allocated 151M words. One traversal now decides every block and one rewrite replaces them, so the same input allocates 17M.
A value written to, or initializing, a never-read field is held back until its block is decided, as the old innermost-first order dropped such values before analyzing the blocks around them. The generated JavaScript is the same for the test suites and 1,600 generated functions.