Commit Graph

9267 Commits

Author SHA1 Message Date
Donny/강동윤
a417ff4d86
feat(allocator): Add maybe types (#9278) 2024-07-19 13:22:34 +09:00
SWC Bot
201f58dc7b chore: Bump crates
Some checks failed
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Has been cancelled
2024-07-18 14:05:38 +00:00
Donny/강동윤
a31fb58399
feat(allocator): Feature gate nightly via macros (#9274)
**Description:**

We can make swc faster without dropping support for stable rustc.
2024-07-18 14:03:58 +00:00
SWC Bot
04d8a369cd chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-18 04:02:00 +00:00
Donny/강동윤
9a6367b0f6
fix(es/minifier): Support minifying JSX (#9271)
**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9204
2024-07-18 12:50:59 +09:00
SWC Bot
fa0841c0a5 chore: Update changelog 2024-07-18 03:48:11 +00:00
SWC Bot
a0ff90fbf1 chore: Publish 1.7.0 with swc_core v0.99.1 2024-07-18 03:48:10 +00:00
SWC Bot
b4758db0f9 chore: Update changelog 2024-07-18 02:49:13 +00:00
SWC Bot
c6c24b0318 chore: Publish 1.7.0-nightly-20240718.3 with swc_core v0.99.1 2024-07-18 02:49:12 +00:00
SWC Bot
2cfaf47f53 chore: Bump crates 2024-07-18 02:42:29 +00:00
magic-akari
6b1d2ff66b
fix(es/typescript): Workaround wasm-bindgen (#9272)
> [!NOTE]  
> We should remove this if
https://github.com/rustwasm/wasm-bindgen/pull/4015 get mereged.
2024-07-18 11:39:52 +09:00
강동윤 (Donny)
c69e0307a6 chore(ci): Implement Wasm breaking mode 2024-07-18 11:39:15 +09:00
SWC Bot
fb3eabe730 chore: Update changelog
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-18 01:29:33 +00:00
SWC Bot
880e3a477d chore: Publish 1.7.0-nightly-20240718.2 with swc_core v0.99.1 2024-07-18 01:29:32 +00:00
SWC Bot
b07da5a43a chore: Bump crates 2024-07-18 01:22:28 +00:00
Donny/강동윤
93d9e44f1c
fix(es/quote): Fix macro (#9270) 2024-07-18 10:12:26 +09:00
SWC Bot
5f91339515 chore: Update changelog 2024-07-18 00:36:09 +00:00
SWC Bot
451fd6893c chore: Publish 1.7.0-nightly-20240718.1 with swc_core v0.99.0 2024-07-18 00:36:08 +00:00
강동윤 (Donny)
aea4f45c73 chore: Publish crates 2024-07-18 08:31:54 +09:00
강동윤 (Donny)
1c652f913e chore(ci): Use $NPM_TAG env var
- Closes https://github.com/swc-project/swc/issues/9269
2024-07-18 08:30:51 +09:00
Donny/강동윤
9c176632b1
refactor(visit): Pre-generate visitor code (#9262)
**Description:**

This would improve compile time by a margin, and this is a refactoring that should be done before applying `swc_allocator::boxed::Box` to ES AST.

This PR removes `swc_visit_macros` because we now use a simple binary to generate code before publishing.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9101
2024-07-17 23:00:45 +00:00
SWC Bot
01d474b30b chore: Update changelog 2024-07-17 20:15:40 +00:00
SWC Bot
4a87670638 chore: Publish 1.7.0-nightly-20240717.3 with swc_core v0.98.0 2024-07-17 20:15:39 +00:00
SWC Bot
b998a0a765 chore: Publish 1.7.0-nightly-20240717.2 with swc_core v0.98.0 2024-07-17 19:50:04 +00:00
SWC Bot
e30498d5e9 chore: Update changelog 2024-07-17 19:40:34 +00:00
SWC Bot
933a7be7b5 chore: Publish 1.7.0-nightly-20240717.1 with swc_core v0.98.0 2024-07-17 19:40:33 +00:00
SWC Bot
02f77f6409 chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-17 10:58:08 +00:00
Donny/강동윤
b9b233cacd
refactor(es/codegen): Revert #9248 (#9266) 2024-07-17 10:56:36 +00:00
SWC Bot
1ae79670c1 chore: Bump crates 2024-07-17 10:31:21 +00:00
Donny/강동윤
efc396377f
test(allocator): Merge test (#9267) 2024-07-17 10:29:39 +00:00
SWC Bot
a92ce51183 chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-17 05:51:34 +00:00
pshu
6ddbfa04db
fix(es/minifier): Collect raw str values for new Tpl element (#9261)
**Description:**

Convert `raw` value to `cooked` for creating a new Tpl element.


**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9184
2024-07-17 14:50:04 +09:00
SWC Bot
38c8453103 chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-16 10:24:55 +00:00
Levi
baeb9e2df9
fix(es/minifier): Fix panic in bitwise logic and incorrect values (#9258)
**Description:**

This PR fixes all issues listed in #9256 as well as the following:

`1.7976931348623157e+308 << 1.7976931348623157e+308` - swc currently
does not transform this and leaves it as-is

Anything involving low floating-point numbers, like `5e-324`, such as
`5e-324 >> 5e-324`, `5e-324 >> 0` etc - swc currently panics;
https://play.swc.rs/?version=1.6.7&code=H4sIAAAAAAAAA0vTME3VNTYyUbCzUzDQBACkm%2Ft7DgAAAA%3D%3D&config=H4sIAAAAAAAAA32UO3LjMAyG%2B5zCozrFjostcoDtcgYOTYIyvXxoCNCxJuO7L0TJj40hdRI%2B%2FAAJgPh%2B2%2B26E5ruY%2FfNn%2Fwz6IJQ7v9swTGRvrClAxM1muIH6t5v9IQTcjogNNN1Jh3p0gM1Fe5%2F7feLogs5I9wUiy365N34nNPkOBRAfLKxlUPWCInwf%2F3CSv6aAJX6bD%2FkHECnDaI0Kp8IeihSYJND0AOCOusiRJlOqovHLKWYYCWwaih5EHmynnxOnPOVWtBWmWxBQL6AIX8GSca5WJaQryfcp2ELh9r3rc8%2F1HDWoWoScsKltYRPK0Q9Zo%2BkXE1SCWe4UoMZLsX9qfROFaBa0qvulH1a6clfAK5A0IhJR5DiNg%2FH87SmdptKnxyPLI0C5%2FmWbpmg56Iq751Q2akyUMhL3Sxgq4GpskY6zoJXyofeggLneFaE0PjlyRylpDQOkJ0AuL%2FaSVM1A3V%2FhSt8ehAb%2BA%2FfkuQBWzyipuM6xTEecthIEIGO2W44cCsor%2BPCW%2BIyrPOaLPBogBVdKjbwugT4AVBWoe3Ll9ng58ERVR%2Fy4bEmFofrfQ9HnfrHe59X8dvi0MVsa4PLkp%2F6O6%2Fm393D6baF7wfvPH7elC3p9R%2BoYzQdMAYAAA%3D%3D

This PR also fixes `shiftCount` being incorrect and incorrect conversion
between `f64` and `i32`/`u32`. A new API in swc_ecma_utils has been
added, `to_js_int32` and `to_js_uint32` that allows external callers to
convert `f64`s to `i32` and `u32` so they can perform bitwise operations
themselves if they're trying to replicate JavaScript behaviour.

I also believe the updated bit shifting logic should be accessible
externally via swc_ecma_utils, but unsure about this.



**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/9256

---------

Co-authored-by: magic-akari <akari.ccino@gmail.com>
2024-07-16 18:56:05 +09:00
SWC Bot
5a218f7c09 chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-16 03:42:12 +00:00
magic-akari
06bb5338ce
fix(es/minifier): Fix exponentiate operator (#9251)
**Related issue:**

- Closes https://github.com/swc-project/swc/issues/9250.
2024-07-16 03:40:36 +00:00
SWC Bot
f6f359e0a7 chore: Bump crates 2024-07-16 02:49:52 +00:00
Donny/강동윤
970f32398c perf(es/codegen): Use scoped allocator (#9248)
**Description:**

Main:
<img width="711" alt="스크린샷 2024-07-15 오후 8 05 50"
src="https://github.com/user-attachments/assets/508a29e8-744f-4017-a819-b7576e61d287">

new:

<img width="711" alt="스크린샷 2024-07-15 오후 8 05 19"
src="https://github.com/user-attachments/assets/bcf3107d-e843-4fab-8b8a-fc6376705273">
2024-07-16 11:48:18 +09:00
SWC Bot
5cc6449734 chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-15 19:05:16 +00:00
Donny/강동윤
6e098aeeb5
refactor(allocator): Use RAII guard instead of scope (#9254)
**Related issue:**

- https://github.com/swc-project/swc/issues/9253
2024-07-15 19:02:52 +00:00
SWC Bot
d2e96bf40f chore: Bump crates
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run
Bot / Start (push) Waiting to run
2024-07-15 15:26:45 +00:00
Donny/강동윤
d8e8b04cd8
fix(allocator): Remove wrong assertions and add tests (#9252) 2024-07-15 15:25:00 +00:00
SWC Bot
123a9f921b chore: Bump crates 2024-07-15 14:32:19 +00:00
Jimmy Moon
ff5bbdae6a
doc(contributing): Fix deno installation url (#9249) 2024-07-15 14:30:35 +00:00
SWC Bot
cfea948f29 chore: Bump crates 2024-07-15 12:53:31 +00:00
Donny/강동윤
e7ce94b5ee
test: Enable scoped API by default (#9247)
**Description:**

This PR is to profile real performance using codspeed
2024-07-15 12:51:42 +00:00
SWC Bot
887d7a2124 chore: Bump crates 2024-07-15 10:55:49 +00:00
Donny/강동윤
e086f38b0f
chore: Apply cargo-autoinherit (#9244) 2024-07-15 10:54:00 +00:00
SWC Bot
11af5578b7 chore: Update changelog 2024-07-15 10:17:45 +00:00
SWC Bot
cb0ff00c73 chore: Publish 1.7.0-nightly-20240715.2 with swc_core v0.97.5 2024-07-15 10:17:43 +00:00