SIGN IN SIGN UP

refactor(packages/codegen): add `writeWithMapNamedPrivate` (#25981)

Continuation of #25980.

Add a specialized function `writeWithMapNamedPrivate` for writing a `PrivateIdentifier`. It feeds `hashLength: 1` to `markMapNamed`, which allows removing polymoprhic `node.type` access from `markMapNamed`.

The code being printed in paths that lead to `markMapNamed` is always the same as `node.name`, so just pass it in to `markMapNamed`, which removes a polymorphic `node.name` read there.

Additionally, `writeWithMapNamedNoLast` now only receives `Identifier` nodes, so becomes monomorphic.
O
overlookmotel committed
c1bcac3be04fd90e7942986308e9d1b4ac49e7c4
Parent: 17ae11c