Latest Results
refactor(transformer): move TransformCtx into TraverseCtx state
Move all `TransformCtx` fields into `TransformState<'a>`, which is the
generic state parameter of `TraverseCtx<'a, State>`. This eliminates the
separate `&'ctx TransformCtx<'a>` reference that every transform struct
previously held, removing the `'ctx` lifetime from all transform structs.
Key changes:
- `TransformState<'a>` now holds all shared state (stores, options, errors)
- `TransformCtx<'a>` is a type alias for `TransformState<'a>`
- `context.rs` reduced to type aliases for `TraverseCtx` and `TransformCtx`
- Transform structs access shared state via `ctx.state.X` instead of `self.ctx.X`
- Methods causing split-borrow conflicts converted to free functions:
`helper_call_expr`, `helper_load`, `duplicate_expression`,
`create_uid_var`, `key_needs_temp_var`, etc.
- Entry point uses `ReusableTraverseCtx` + `traverse_mut_with_ctx`
60 files changed, ~1120 insertions, ~1410 deletions (net -290 lines).
Closes #11742
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>refactor/transformer-move-ctx-into-state Active Branches
#19140+6%
#191440%
#19143-4%
Ā© 2026 CodSpeed Technology