perf(packages/codegen): add functions for writing/marking unnamed mappings (#25975)
Small optimization to sourcemap builds. Add functions for writing with a source mapping, where it's known from what's being written that the mapping cannot need a name, because `node.name` is never a string, and change all call sites to use the appropriate function. This allows removing 2 checks from ``recordSourceMapping``: - `typeof node.name === "string"` - because that's now statically known. - `printedName.length > 0` - because identifiers cannot be length. All `write` and `markMap` functions take a `NamedMappableNode` or `UnnamedMappableNode`, which makes it a type error to call the wrong function. `markMapNamed` becomes dead code, and is removed.
O
overlookmotel committed
215a6a51ade8cf033a1b925015394c2a36d3d732
Parent: 343e1aa