Remove the alias pass's tracking of assigned variables
Why
#9424 taught the alias pass and two helpers about Lassigns in bodies inlined from other modules: the pass collected the variables such a body assigns, Lam_bounded_vars.rewrite renamed the assigned variable, and Lam_pass_collect recorded nothing for a mutable let. Since a body that updates a local ref is no longer stored (warning 113), no inlined body assigns a variable, and only Lam_pass_sroa, which runs after every inlining pass, makes Lassigns. Lam_check.check checks this after each pass before sroa under -check-lam, which the compiler tests use. So the set was always empty, no inlined body had an assignment to rename, and no mutable let existed when the facts were collected. The code goes, and Lam_bounded_vars.rewrite now fails on an assignment instead of renaming it. The generated JavaScript doesn't change.
Review
- Why not keep renaming the assignment, in case? A body with an assignment that reaches inlining is already a bug: the passes before sroa would move reads of the variable past it. Failing there names the variable.