Files
oxc/.github
overlookmotel ffdb114504 refactor(lexer): convert cpu_version and cpu_versions macros to proc macros (#28681)
Part of effort to move to runtime CPU feature detection.

The `cpu_version` and `cpu_versions` macros had become unweildly, and we'd reached the edge of what it's possible to do with declarative macros, even using all the tt-muncher tricks. Some improvements were impractical to make.

Convert both macros to proc macros in a new `oxc_lexer_macros` crate.

The proc macros are half as many lines of code, easier to understand, and more capable.

This also allows getting rid of the weird `apply` wrapper:

```rust
// Before
#[apply(cpu_version(Avx2))]
// After
#[cpu_version(Avx2)]
```

Rename `cpu_versions` to `cpu_multiversion`, which describes it better.
2026-11-02 01:43:27 +00:00
..