Swap forEachChild to use a table of functions instead of a switch statement. (#50225)

* Swap `forEachChild` to use an array of functions instead of a `switch` statement.

* Let's see if 'new' changes anything.

* Co-locate each assignment into `forEachChildTable`.

* Try `push`ing undefined to create a packed Array.

* Try using an unconditional no-op function.

* `forEach` -> `forEachChildIn`

* Remove the optional chain if we are pre-filling with no-ops.

* Grab function directly to avoid possible `.call` overhead from downlevel emit.

* Swap to object literal.

* Lints and formatting.
This commit is contained in:
Daniel Rosenwasser 2022-08-21 17:48:45 -07:00 committed by GitHub
parent 38e91fb120
commit 76357ba802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff