oxc/crates/oxc_wasm
rzvxa 4d2b7f1227 refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761)
It has the same spirit as #3747 but with a much simpler approach. I've used the fact that @Boshen mentioned about linter always using CFG so now we assert `semantic.cfg().is_some()` in the `LintContext::new` because of this assertion we can have a `LintContext::cfg` that unwraps unchecked.
Eliminates unnecessary checks in our hot paths.

It has the best of both worlds, No complicated typing yet we still get the CFG as a non-optional value without extra ASM or branching.
2024-06-19 13:01:33 +00:00
..
.cargo fix(oxc_wasm): remove wee_alloc dependency; fix profile warning 2023-03-06 14:50:02 +08:00
src refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
.gitignore chore(oxc_wasm): remove unnecessary lines from .gitignore 2023-03-20 14:38:09 +08:00
Cargo.toml chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00