Boshen
878ce10296
fix(minifier): void 0 equals to undefined ( #8673 )
2025-01-23 08:27:47 +00:00
Boshen
1bb2539d64
refactor(minifier): move more code into minimize_conditions local loop ( #8671 )
2025-01-23 07:03:42 +00:00
Boshen
13e4a4593f
refactor(minifier): move conditional assignment to minimize_conditions ( #8669 )
2025-01-23 04:42:44 +00:00
Boshen
ba201a6511
fix(minifier): remove "non esbuild optimizations" which is incorrect ( #8668 )
2025-01-23 03:45:42 +00:00
Boshen
ae895d8c0e
refactor(minifier): use NonEmptyStack for function stack ( #8661 )
2025-01-22 16:04:36 +00:00
Boshen
3802d28233
refactor(minifier): clean up try_minimize_conditional ( #8660 )
2025-01-22 15:17:47 +00:00
Boshen
9953ac7cad
perf(minifier): add LatePeepholeOptimizations ( #8651 )
...
This PR adds a `LatePeepholeOptimizations` pass for minifications that
don't interact with the fixed point loop.
While working on this I found a couple of cases where the previous fixed
point loop is not idempotent.
2025-01-22 16:19:06 +08:00
Boshen
00dc63f6a5
perf(minifier): only substitute typed array constructor once ( #8649 )
2025-01-22 02:49:52 +00:00
Boshen
3e19e4e004
perf(minifier): remove the useless empty statement removal code in statement fusion ( #8646 )
2025-01-22 09:08:56 +08:00
Boshen
5b3c412e26
perf(minifier): only run optimizations on local changes ( #8644 )
...
Previously all code are ran in a fixed point loop when ast changes.
This PR changes running code when a function changes its enclosing ast only.
2025-01-21 23:55:54 +08:00
sapphi-red
835b25889b
feat(minifier): compress typeof foo === 'object' && foo !== null to typeof foo == 'object' && !!foo ( #8638 )
...
If `typeof foo == 'object'`, then `foo` is guaranteed to be an object or null. In that case, `foo !== null` can be replaced with `!!foo` because objects return `true` for `!!foo` and null returns `false` for it.
**References**
- [Spec of `typeof`](https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-typeof-operator )
- [Spec of `!`](https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-logical-not-operator )
- [Spec of `ToBoolean`](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toboolean )
2025-01-21 14:59:25 +00:00
sapphi-red
2bcbed2d50
feat(minifier): compress (a = b) === null || a === undefined to (a = b) == null ( #8637 )
2025-01-21 14:59:23 +00:00
overlookmotel
e66da9fe41
refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax ( #8643 )
...
While working on #8641 , I found a lot of places where we unnecessarily use `ref` / `ref mut` in match arms.
In many cases, we're creating double-references (turning a `&T` into a `&&T`). The compiler should be smart enough to remove them for us, but there doesn't seem much point in explicitly creating double-references when we don't actually want them, and relying on compiler to optimize them out again.
2025-01-21 14:20:07 +00:00
Boshen
dcc1f2bcb3
refactor(minifier): rename ast_passes to peephole ( #8635 )
2025-01-21 11:09:53 +00:00
Boshen
52458de00b
refactor(minifier): remove unused code and traits ( #8632 )
2025-01-21 05:41:11 +00:00
Boshen
6f95cd599a
refactor(minifier): remove all the unnecessary fake ast passes ( #8618 )
...
This also removes handling of making cjs-module-lexer to work.
2025-01-20 22:05:51 +08:00
Boshen
d9f5e7fd52
test(minifier): enable passed esbuild tests
2025-01-20 16:39:39 +08:00
Boshen
712cae034c
refactor(minifier): run the compressor on all test cases ( #8604 )
...
Running individual plugins causes too much confusion.
- [x] fix 110 failed tests :-)
2025-01-20 08:11:11 +00:00
翠 / green
8c8b5fa9be
fix(minifier): avoid minifing String(a) into "" + a for symbols ( #8612 )
...
We shouldn't change `String(a)` into `"" + a` if `a` can be a Symbol.
`String(Symbol())` does not throw an error, but `"" + Symbol()` does.
**References**
- [Spec of `ToString` (called for `"" +
variable`)](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring )
- [Spec of
`String(a)`](https://tc39.es/ecma262/multipage/text-processing.html#sec-string-constructor-string-value )
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 13:34:46 +08:00
Boshen
4ff6e85137
fix(minifier): remove expression statement void 0 ( #8602 )
2025-01-19 14:47:00 +00:00
branchseer
ac4f98e376
refactor(span): derive Copy on Atom ( #8596 )
...
Follow up from
https://github.com/oxc-project/oxc/pull/8543#discussion_r1918592423
> I agree. https://github.com/oxc-project/backlog/issues/155
> Originally we were considering some form of interning and
reference-counting, so we didn't make it Copy to leave the door open for
that. But now all strings are stored in the arena anyway, so even if we
did decide to intern strings, reference-counting would be irrelevant -
our bump allocator doesn't allow freeing individual allocations anyway.
Most of the changes are done automatically by `just fix` (`cargo clippy
--fix` && `cargo fmt --all`). See the commit list for the manual edits.
2025-01-19 16:14:23 +08:00
camc314
93d643e6a4
fix(minifier): keep side effects when folding const conditional exprs ( #8591 )
2025-01-19 01:53:21 +00:00
oxc-bot
8f5be07ed6
release(crates): v0.47.1 ( #8593 )
...
## [0.47.1] - 2025-01-19
### Features
- ee8ee55 napi/parser: Add `.hasChanged()` to `MagicString` (#8586 )
(Boshen)
- 1bef911 napi/parser: Add source map API (#8584 ) (Boshen)
### Bug Fixes
- 7b219a9 minifier: Fix dce shadowed undefined (#8582 ) (Boshen)
- 7421a52 transformer/typescript: Correctly resolve references to
non-constant enum members (#8543 ) (branchseer)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2025-01-19 09:44:29 +08:00
Boshen
7b219a930f
fix(minifier): fix dce shadowed undefined ( #8582 )
2025-01-18 09:04:28 +00:00
oxc-bot
d3fd7a9741
release(crates): v0.47.0 ( #8580 )
...
## [0.47.0] - 2025-01-18
- fae4cd2 allocator: [**BREAKING**] Remove `Vec::into_string` (#8571 )
(overlookmotel)
- 95bc0d7 allocator: [**BREAKING**] `Allocator` do not deref to
`bumpalo::Bump` (#8569 ) (overlookmotel)
- 19d3677 ast: [**BREAKING**] Always return
`Array<ImportDeclarationSpecifier>` for `ImportDeclaration.specifiers`
(#8560 ) (sapphi-red)
- 4ce6329 semantic: [**BREAKING**] Ensure program outlives semantic
(#8455 ) (Valentinas Janeiko)
- 7066d1c ast, span, syntax, regular_expression: [**BREAKING**] Remove
`ContentHash` (#8512 ) (overlookmotel)
### Features
- bf4e5e1 allocator: Add `HashMap` (#8553 ) (overlookmotel)
- a6d71f8 ast: Add `AstKind::ty` method (#8521 ) (overlookmotel)
- 4d4e805 minifier: Collapse if stmt with empty consequent (#8577 )
(camc314)
- 991a22f minifier: Fold `Array::concat` into literal (#8442 )
(sapphi-red)
- 3dc2d8b minifier: Fold string concat chaining (#8441 ) (sapphi-red)
- a4ae450 minifier: Fold array concat chaining (#8440 ) (sapphi-red)
- 7cc81ef minifier: Fold invalid typeof comparisons (#8550 ) (camc314)
- 927f43f minifier: Improve `.charCodeAt(arg)` when arg is valid (#8534 )
(Boshen)
- 06f14d5 minifier: Remove empty class static block `class Foo { static
{} }` (#8525 ) (Boshen)
- 1860411 minifier: Remove last redundant return statement (#8523 )
(Boshen)
- c479a58 napi/parser: Expose dynamic import expressions (#8540 )
(Boshen)
- 2f0314e npm/oxc-minify: Npm package and publish script (#8579 )
(Boshen)
- f413bb5 transformer/optional-chaining: Change parent scope for
expression when it wrapped with an arrow function (#8511 ) (Dunqing)
### Bug Fixes
- e87c001 allocator: Statically prevent memory leaks in allocator
(#8570 ) (overlookmotel)
- 855c839 codegen: Shorthand assignment target identifier consider
mangled names (#8536 ) (Boshen)
- 65c596d minifer: Keep idents if not in scope when minimizing array
exprs (#8551 ) (camc314)
- f57aac2 minifier: Incorrect folding of expr in bool ctx (#8542 )
(camc314)
- 946ad76 minifier: `(-Infinity).toString()` -> `'-Infinity'` (#8535 )
(Boshen)
- b1d0186 minifier: Do not fold `!!void b` (#8533 ) (Boshen)
- 53adde5 minifier: `x['-2147483648']` -> `x[-2147483648]` (#8528 )
(Boshen)
- 405b73d minifier: Do not change `delete undefined` to `delete void 0`
(#8527 ) (Boshen)
- 92e44cb minifier: Do not remove `undefined` in `var x = undefined`
(#8526 ) (Boshen)
- 209e313 minifier: `class C { ['-1']() {} }` cannot be minifized
(#8516 ) (Boshen)
- 6585463 minifier: Always keep the last value of sequence expression
(#8490 ) (Boshen)
- b552f5c transformer: `wrap_in_arrow_function_iife` take span of input
`Expression` (#8547 ) (overlookmotel)
- 9963533 transformer/arrow-functions: Visit arguments to `super()` call
(#8494 ) (overlookmotel)
- 06ccb51 transformer/async-to-generator: Move parameters to the inner
generator function when they could throw errors (#8500 ) (Dunqing)
- 356f0c1 transformer/class-properties: Handle nested `super()` calls
(#8506 ) (overlookmotel)
- a048337 transformer/class-static-blocks: Static block converted to
IIFE use span of original block (#8549 ) (overlookmotel)
### Performance
- 76ea52b allocator: Inline `Box` methods (#8572 ) (overlookmotel)
- 93df57f allocator: `#[inline(always)]` methods of `Vec` which just
delegate to `allocator_api2` (#8567 ) (overlookmotel)
- 5a28d68 allocator: `#[inline(always)]` methods of `HashMap` which just
delegate to `hashbrown` (#8565 ) (overlookmotel)
- d17021c mangler: Optimize `base54` function (#8557 ) (overlookmotel)
- 6b52d7a mangler: Use a single allocation space for temporary vecs
(#8495 ) (Boshen)
- 30a869e semantic: Use `oxc_allocator::HashMap` in `ScopeTree` (#8554 )
(overlookmotel)
- 63eb298 span: Compare `Span`s as single `u64`s (#8300 ) (overlookmotel)
- a43560c span: Hash `Span` as a single `u64` (#8299 ) (overlookmotel)
- 3fff7d2 span: Align `Span` same as `usize` (#8298 ) (overlookmotel)
- 53ef263 transformer/arrow-functions: Bail out of visiting early when
inserting `_this = this` after `super()` (#8482 ) (overlookmotel)
### Documentation
- fa1a6d5 allocator: Update docs for `Vec` (#8555 ) (overlookmotel)
### Refactor
- ac05134 allocator: `String` type (#8568 ) (overlookmotel)
- 68fab81 allocator: Rename inner `Vec` type (#8566 ) (overlookmotel)
- fcbca32 ast: Rename `#[estree(with)]` to `#[estree(via)]` (#8564 )
(overlookmotel)
- 007e8c0 ast, regular_expression: Shorten `ContentEq` implementations
(#8519 ) (overlookmotel)
- b4c87e2 linter: Move DiagnosticsReporters to oxlint (#8454 ) (Alexander
S.)
- 8f57929 minifier: Merge `try_compress_type_of_equal_string` into
`try_minimize_binary` (#8561 ) (sapphi-red)
- 2857ae1 parser: Refactor visitor in regexp example (#8524 )
(overlookmotel)
- b5ed58e span: All methods take owned `Span` (#8297 ) (overlookmotel)
- 712633f transformer: `wrap_statements_in_arrow_function_iife` utility
function (#8548 ) (overlookmotel)
- 5206c6a transformer: Rename `wrap_in_arrow_function_iife` (#8546 )
(overlookmotel)
- 61077ca transformer: `wrap_arrow_function_iife` receive an owned
`Expression` (#8545 ) (overlookmotel)
- 6820d24 transformer: Move `wrap_arrow_function_iife` to root utils
module (#8529 ) (Dunqing)
- 52bd0b1 transformer: Move common utils functions to the root module
(#8513 ) (Dunqing)
- c30654a transformer/arrow-function: Wrapping arrow function iife by
using `wrap_arrow_function_iife` (#8530 ) (Dunqing)
- 2bc5175 transformer/arrow-functions: Rename method (#8481 )
(overlookmotel)
- 72f425f transformer/class-properties: Fix lint warning in release mode
(#8539 ) (overlookmotel)
- 7e61b23 transformer/typescript: Shorten code (#8504 ) (overlookmotel)
- 04bc259 traverse: Remove unnecessary `#[allow]` (#8518 )
(overlookmotel)
- a368726 traverse: Harden soundness of `Traverse` and document safety
invariants better (#8507 ) (overlookmotel)
### Testing
- e0f5d6c minifier: Update esbuild test (Boshen)
- 629c417 minifier: Port esbuild minification tests (#8497 ) (Boshen)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2025-01-18 14:26:20 +08:00
camc314
4d4e805691
feat(minifier): collapse if stmt with empty consequent ( #8577 )
2025-01-18 03:51:40 +00:00
sapphi-red
8f57929419
refactor(minifier): merge try_compress_type_of_equal_string into try_minimize_binary ( #8561 )
...
This compression can be handled by `try_minimize_binary`.
2025-01-17 11:01:54 +00:00
sapphi-red
991a22f907
feat(minifier): fold Array::concat into literal ( #8442 )
...
Compress `[].concat(a, [b])` into `[a, b]`.
**References**
- [Spec of `Array::concat`](https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.concat )
2025-01-17 06:00:07 +00:00
sapphi-red
3dc2d8b8e9
feat(minifier): fold string concat chaining ( #8441 )
...
Compress `"".concat(a).concat(b)` into `"".concat(a, b)`.
**References**
- [Spec of `String::concat`](https://tc39.es/ecma262/multipage/text-processing.html#sec-string.prototype.concat )
2025-01-17 06:00:06 +00:00
sapphi-red
a4ae4505f1
feat(minifier): fold array concat chaining ( #8440 )
...
Compress `[].concat(a).concat(b)` into `[].concat(a, b)`.
**References**
- [Spec of `Array::concat`](https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.concat )
---
### The new assumption
I added a new assumption description in `crates/oxc_minifier/README.md`: "Errors thrown when creating a String or an Array that exceeds the maximum length can disappear or moved".
This is an assumption held by other minifiers. Without this assumption, we have to treat `+` and array creation/update to have a sideeffect and that limits the minification.
For input:
```js
[...Array(Number(2n ** 32n - 1n)),""]
" ".repeat(Number(2n ** 29n - 24n - 1n)) + ' '
export {}
```
(Note that `2 ** 32 - 1` is the max array length and `2 ** 29 - 24` is the max string length on V8.)
This code errors with too long array and too long string on V8 based runtimes.
terser outputs:
```js
Array(Number(2n**32n-1n))," ".repeat(Number(536870887n));export{};
```
No error will happen with this code.
SWC outputs:
```js
[...Array(Number(2n**32n-1n))]," ".repeat(Number(2n**29n-24n-1n));export{};
```
No error will happen with this code.
[playground](https://play.swc.rs/?version=1.10.7&code=H4sIAAAAAAAAA4vW09NzLCpKrNTwK81NSi3SMMpT0NJSMAZSugqGeZqaOkpKsbxcSgpKekWpBamJJajqjCxB6oxMYKoVtBXUFdR5uVIrCvKLShSqa3m5AGRqy%2FBiAAAA&config=H4sIAAAAAAAAA32UO3LjMAyG%2B5zCozrFjostcoDtcgYOTYIyvXxoCNCxJuO7L0RJtjeG3En48AMkAOL7bbfrTmi6j903f%2FLPoAtCuf2zBcdE%2BsKWDkzUaIofqHtf6Qkn5HRAaKbrTDrSpQdqKtz%2F2u8XRRdyRlgViy365N34mNPkOBRAfLCxlUPWCInwf%2F3CSv6aAJX6aD%2FkHECnF0RpVD4R9FCkwCaHoAcEddZFiDKdVBePWUoxwUpg1VDyIPJkPfmcOOcztaCtMtmCgHwBQ%2F4MkoxzsSwhX0%2B4T8MWDrXvW59%2FqOGsQ9Uk5IRLawmfVoh6zB5JuZqkEs5wowYzXIr7U%2BmdKkC1pGfdKfu00ZO%2FAFyBoBGTjiDFbR6O52lL7V4qfXI8sjQKnOdbumWCnouqvHdCZafKQCEvdbOArQamyhrpOAveKB96Cwqc41kRQuOXJ3OUktI4QHYC4P5qJ03VDNTtFW7w6UG8wH%2F4liQP2OIRNR23KY7xkMOLBBHomO0LB24F5W1ceEtchm1ekwUeDbCiS8UGnpcAPwDKKrR9%2BTQb%2FDw4oupDPtzXxOJwve3hqFN%2Ff%2B%2FzKn5bHLqYbW1wWfJTf%2BfV%2FLu7O61beD1B5%2FFzFbac13%2FKOhgeLwYAAA%3D%3D )
esbuild outputs:
```js
[...Array(Number(2n**32n-1n))]," ".repeat(Number(2n**29n-24n-1n))+"";export{};
```
No error will happen with this code.
[esbuild try](https://esbuild.github.io/try/#dAAwLjI0LjIALS1taW5pZnkAWy4uLkFycmF5KE51bWJlcigybiAqKiAzMm4gLSAxbikpLCIiXQoiICIucmVwZWF0KE51bWJlcigybiAqKiAyOW4gLSAyNG4gLSAxbikpICsgJyAnCmV4cG9ydCB7fQ )
OXC outputs:
```js
[...Array(Number(2n**32n-1n))]," ".repeat(Number(2n**29n-24n-1n))+" ";export{};
```
The array error won't happen and the String error will happen with this code.
[playground](https://playground.oxc.rs/#eNpVT71OwzAQfhXrlv4QIhpgIBtLR8SOGZxwCUH22To7baMo746dNEVMd5/u+7sRaijhI8/zV2Y1bN96UyFvCxL7vXiM414caLfLJEj4lCRBSMgZHarwn1u8JG7xtCrEndiIjSS8OMtBjJMkyMBCOQL3lIYfKKgLlIF7zEB3FKBslPYR+No6XC9+MJXVKwqsyDeWzZU8ZeAUe+TZ0vZc47HTSMpEAwjoQ/7jY7JjjKQTvitG8n/ilDuL437zXtyC4hZjKUBfPByeITJq+4UtpvoRmI66plu4tTUpIRovNc/fXcx2qr69YRS1+opmJwps9VHbc9KfkCvr43npNU2/v/WIsw== )
2025-01-17 05:53:54 +00:00
camc314
65c596d002
fix(minifer): keep idents if not in scope when minimizing array exprs ( #8551 )
2025-01-16 14:26:37 +00:00
camc314
7cc81ef5ef
feat(minifier): fold invalid typeof comparisons ( #8550 )
2025-01-16 14:26:36 +00:00
camc314
f57aac2aee
fix(minifier): incorrect folding of expr in bool ctx ( #8542 )
...
esbuild code comment is wrong.
8f1faf7d4a/internal/js_ast/js_ast_helpers.go (L2127-L2128)
https://esbuild.github.io/try/#dAAwLjI0LjIALS1taW5pZnkAaWYgKGFueXRoaW5nMSA/ICgwLCBmYWxzZSkgOiBhbnl0aGluZzIpOw
2025-01-16 14:18:03 +00:00
Boshen
946ad7690b
fix(minifier): (-Infinity).toString() -> '-Infinity' ( #8535 )
2025-01-16 06:47:40 +00:00
Boshen
e0f5d6c7bb
test(minifier): update esbuild test
2025-01-16 14:46:12 +08:00
Boshen
927f43ff84
feat(minifier): improve .charCodeAt(arg) when arg is valid ( #8534 )
2025-01-16 06:36:34 +00:00
Boshen
b1d018622b
fix(minifier): do not fold !!void b ( #8533 )
2025-01-16 05:52:03 +00:00
Boshen
53adde5003
fix(minifier): x['-2147483648'] -> x[-2147483648] ( #8528 )
2025-01-16 13:43:23 +08:00
Boshen
405b73d8e7
fix(minifier): do not change delete undefined to delete void 0 ( #8527 )
...
`delete undefined` returns `false`
`delete void 0` returns `true`
2025-01-16 03:08:26 +00:00
Boshen
92e44cba6b
fix(minifier): do not remove undefined in var x = undefined ( #8526 )
2025-01-16 02:57:28 +00:00
Boshen
06f14d526b
feat(minifier): remove empty class static block class Foo { static {} } ( #8525 )
2025-01-16 02:46:25 +00:00
Boshen
1860411656
feat(minifier): remove last redundant return statement ( #8523 )
2025-01-16 02:07:28 +00:00
Boshen
209e313e40
fix(minifier): class C { ['-1']() {} } cannot be minifized ( #8516 )
2025-01-15 16:15:01 +00:00
Boshen
629c41713b
test(minifier): port esbuild minification tests ( #8497 )
2025-01-15 06:29:01 +00:00
Boshen
65854630be
fix(minifier): always keep the last value of sequence expression ( #8490 )
...
Caught in react app:
```
React.useEffect(() => {
isMountRef.current = false;
return () => {
isMountRef.current = true;
};
}, []);
```
->
```
React.useEffect(() => isMountRef.current = !1 , []);
```
Two problems: there were no unit tests guarding this, no good way of knowing when code gets deleted.
2025-01-14 15:35:00 +00:00
oxc-bot
3e05055783
release(crates): v0.46.0 ( #8487 )
...
## [0.46.0] - 2025-01-14
- 7eb6ccd ast: [**BREAKING**] Remove unused and not useful `ContentHash`
(#8483 ) (Boshen)
### Features
- 8accfef minifier: Minify `var x; void x` -> `void 0` (#8466 ) (Boshen)
- 870a583 minifier: Fold `false['toString']` (#8447 ) (Boshen)
- 4ad695d napi/minify: Implement napi (#8478 ) (Boshen)
- 9d550aa span: Add `Atom::r#static` (#8479 ) (_Kerman)
### Bug Fixes
- 4071878 isolated-declarations: Retain `declare` declarations when they
are exported (#8477 ) (Dunqing)
- 7ee7634 isolated-declarations: Import statement disappears when import
binding is referenced in nested `typeof` (#8476 ) (Dunqing)
- 7252cb0 isolated-declarations: Unexpected error when global `Symbol`
as property key (#8475 ) (Dunqing)
- 4c6675c minifier: Do not convert while to fors in DCE (#8484 ) (Boshen)
- 1d6e84d minifier: Fix incorrect `null.toString()` and `1n.toString()`
(#8464 ) (Boshen)
- 25d4bf9 minifier: Remove usage of empty spans (#8462 ) (Boshen)
- dd64340 minifier: Keep `return undefined` in async generator function
(#8439 ) (Boshen)
- c444de8 transformer/arrow-functions: Transform `this` and `super`
incorrectly in async arrow function (#8435 ) (Dunqing)
- 270245f transformer/typescript: Correct the semantic for
TSImportEqualsDeclaration transformation (#8463 ) (Dunqing)
- 2a400d6 transformer/typescript: Retain TSImportEqualsDeclaration when
it is exported (Dunqing)
- ab694b0 transformer/typescript: Retain `TSImportEqualsDeclaration` in
`namespace` when its binding has been referenced or
`onlyRemoveTypeImports` is true (#8458 ) (Dunqing)
### Performance
- 7a8200c mangler: Allocate base54 name without heap allocation (#8472 )
(Boshen)
- 31dac22 mangler: Allocate data in arena (#8471 ) (Boshen)
- 8fc238a minifier: Merge `Normalize` and `RemoveSyntax` pass (#8467 )
(Boshen)
- 372eb09 minifier: Preallocate mangler's semantic data (#8451 ) (Boshen)
### Refactor
- 6e64eef codegen: Remove `match_expression!` (#8450 ) (Boshen)
- de5b288 span: Rename `Atom::new_const` method (#8480 ) (overlookmotel)
- c83ce5c transformer/typescript: Improve transforming namespace (#8459 )
(Dunqing)
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
2025-01-14 19:40:44 +08:00
Boshen
4c6675c46d
fix(minifier): do not convert while to fors in DCE ( #8484 )
2025-01-14 10:01:35 +00:00
Boshen
4ad695dcfb
feat(napi/minify): implement napi ( #8478 )
2025-01-14 08:55:55 +00:00
Boshen
8fc238ac34
perf(minifier): merge Normalize and RemoveSyntax pass ( #8467 )
2025-01-13 16:08:00 +00:00
Boshen
8accfefa74
feat(minifier): minify var x; void x -> void 0 ( #8466 )
2025-01-13 16:07:59 +00:00