refactor(packages/codegen): simplify recording named mappings (#25957)
Pure refactor.
`recordSourceMapping`'s logic for recording named mappings was convoluted, and was hard to follow. Refactor it to clarify what's going on, and add comments explaining it.
In the process, it became apparent there were unnecessary branches and operations:
* `name = printedName;` always set `name` to `undefined`, which it was already.
* `if (name !== undefined) { ... }` block was present in multiple code paths where `name` is always `undefined`.
This PR removes those unnecessary code paths, so may have a small perf benefit, but main motivation is greater clarity. O
overlookmotel committed
4628044a29c5f331fc854488de53267bea2f18a2
Parent: 516440d