perf(packages/codegen): ensure indent strings are flattened (#26107)
Codegen pre-prepares strings for writing indentation and caches them.
This PR ensure that these strings are properly flattened. They already were - `indent.charCodeAt(0)` does that. But that's only the case as long as `growIndents` doesn't get tiered up to TurboFan. If it does, TurboFan treats `indent.charCodeAt(0)` as a no-op, and removes it as dead code, which removes the flattening.
`growIndents` is a cold path, so it's unlikely to get tiered up, but make sure that even if it does, we don't lose the flattening by using `indent = [indent, indentString].join("");` instead.
No effect on benchmarks, because TurboFan wasn't kicking in here. O
overlookmotel committed
77855831a6a4d065519f24a126d5f7e1248d5ff5
Parent: 5e6d537