oxc/crates/oxc_codegen
Boshen e78cba6464 refactor(minifier): ast passes infrastructure (#4625)
After studying google closure compiler, I'm leaning towards a multi-ast-pass infrastructure for the minifier.

This is one of the few places where we are going to trade maintainability over performance, given the goal of the minifier is compression size not performance.

All of the terminologies and separation of concerns are aligned with google closure compiler.

Infrastructure of `terser` and `esbuild` are not suitable for us to study nor pursuit. Their code are so tightly coupled - I failed to comprehend any of them every time I try to walk through a piece of optmization. Google closure compiler despite being written in Java, it's actually the most readable minifier out there.

To improve performance between ast passes, I envision a change detection system over a portion of the code.

The benchmark will demonstrate the performance regression of running 5 ast passes instead of 2.

To complete this PR, I need to figure out "fix-point" and order of these ast passes.
2024-08-04 11:58:39 +00:00
..
examples refactor(sourcemap)!: avoid passing Results (#4541) 2024-07-30 04:23:49 +00:00
src refactor(minifier): ast passes infrastructure (#4625) 2024-08-04 11:58:39 +00:00
tests/integration fix(codegen): enable more test cases (#4585) 2024-07-31 12:58:28 +00:00
Cargo.toml Release crates v0.23.0 (#4595) 2024-08-01 16:55:41 +08:00
CHANGELOG.md Release crates v0.23.0 (#4595) 2024-08-01 16:55:41 +08:00