oxc-project
oxc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
perf(allocator): remove ineffective `likely` hint and `#[cold]` from Vec grow - Remove `likely()` wrapper function - the `#[cold]` attribute on `alloc_slow` already tells LLVM the slow path is unlikely - Remove `#[cold]` from Vec's inner grow function - for interleaved Vec growth patterns (e.g., in `tally_slot_frequencies`), this path is actually hot, not cold. Keep `#[inline(never)]` to avoid code bloat. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
refactor/remove-bumpalo
28 minutes ago
feat(ast): add keyword and operator position fields to AST nodes Add `u32` position fields for keywords and punctuators where the position cannot be derived from `span.start`. This improves: - Linter fix accuracy - Formatter comment placement - Diagnostic accuracy in parser, semantic, and linter ## Changes ### Core Statements - `IfStatement`: `else_pos: Option<u32>` - `TryStatement`: `catch_pos: Option<u32>`, `finally_pos: Option<u32>` - `DoWhileStatement`: `while_pos: u32` - `ForInStatement`: `in_pos: u32` - `ForOfStatement`: `of_pos: u32` - `SwitchCase`: `keyword_pos: u32` ### Operators - `BinaryExpression`: `operator_pos: u32` - `LogicalExpression`: `operator_pos: u32` - `AssignmentExpression`: `operator_pos: u32` - `PrivateInExpression`: `in_pos: u32` ### Other Expressions - `ConditionalExpression`: `question_pos: u32`, `colon_pos: u32` - `ArrowFunctionExpression`: `arrow_pos: u32` ### TypeScript Nodes - `TSConditionalType`: `extends_pos: u32`, `question_pos: u32`, `colon_pos: u32` - `TSAsExpression`: `as_pos: u32` - `TSSatisfiesExpression`: `satisfies_pos: u32` - `TSMappedType`: `in_pos: u32` All position fields are marked with `#[content_eq(skip)]` and `#[estree(skip)]` to exclude them from content equality comparisons and ESTree output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat/ast-keyword-positions
52 minutes ago
fix(minifier): validate RegExp patterns before marking as pure (#18125) ## Summary Invalid RegExp patterns like `RegExp("[")` or invalid flags like `RegExp("a", "xyz")` throw `SyntaxError` at runtime, but the minifier was incorrectly removing them. This change uses `oxc_regular_expression` to validate patterns at compile time: - Valid patterns are marked as pure and can be removed when unused - Invalid patterns or non-literal arguments are kept (preserving runtime errors) ### Behavior | Input | Valid? | Removed? | |-------|--------|----------| | `RegExp()` | ✅ | ✅ | | `RegExp('a', 'g')` | ✅ | ✅ | | `RegExp(/foo/)` | ✅ | ✅ | | `RegExp('[')` | ❌ | ❌ (throws SyntaxError) | | `RegExp('a', 'xyz')` | ❌ | ❌ (throws SyntaxError) | | `RegExp(variable)` | ? | ❌ (can't determine) | Fixes #18050 ## Test plan - [x] Updated existing tests to reflect correct behavior - [x] Added tests for invalid patterns and flags - [x] `cargo test -p oxc_minifier` passes - [x] `cargo test -p oxc_ecmascript` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
main
1 hour ago
perf(allocator): increase default chunk size to match bumpalo usable space The DEFAULT_CHUNK_SIZE was 512 bytes total, which left only 464 bytes usable after accounting for the 48-byte footer. Bumpalo's FIRST_ALLOCATION_GOAL is 512 bytes of *usable* space. This 10% difference in initial usable space caused more frequent chunk allocations, which was identified as the source of the performance regression in build_semantic -> alloc_slow -> alloc_chunk. Fix by setting DEFAULT_CHUNK_SIZE = 512 + FOOTER_SIZE, giving us ~512 bytes of usable space like bumpalo. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
refactor/remove-bumpalo
1 hour ago
fix(minifier): validate RegExp patterns before marking as pure (#18125) ## Summary Invalid RegExp patterns like `RegExp("[")` or invalid flags like `RegExp("a", "xyz")` throw `SyntaxError` at runtime, but the minifier was incorrectly removing them. This change uses `oxc_regular_expression` to validate patterns at compile time: - Valid patterns are marked as pure and can be removed when unused - Invalid patterns or non-literal arguments are kept (preserving runtime errors) ### Behavior | Input | Valid? | Removed? | |-------|--------|----------| | `RegExp()` | ✅ | ✅ | | `RegExp('a', 'g')` | ✅ | ✅ | | `RegExp(/foo/)` | ✅ | ✅ | | `RegExp('[')` | ❌ | ❌ (throws SyntaxError) | | `RegExp('a', 'xyz')` | ❌ | ❌ (throws SyntaxError) | | `RegExp(variable)` | ? | ❌ (can't determine) | Fixes #18050 ## Test plan - [x] Updated existing tests to reflect correct behavior - [x] Added tests for invalid patterns and flags - [x] `cargo test -p oxc_minifier` passes - [x] `cargo test -p oxc_ecmascript` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix/minifier-regexp-validation
1 hour ago
fix(parser): reparse all statements with await identifier in unambiguous mode (#18163) ## Summary - Fix parsing of `await (...)` and other cases where `await` followed by certain tokens was parsed as an identifier instead of an await expression in unambiguous mode - Commit 92e27b4 only handled `await /regex/` but missed other cases ## Changes - Add `encountered_await_identifier` flag to `ParserState` to track when await is parsed as identifier - Set flag in `parse_identifier_reference` when parsing "await" as identifier in non-await context - Modify statement parsing to track checkpoints only for statements that actually used await as identifier - Once ESM detected, enable await context for remaining statements ## Test plan - Added test cases in `tasks/coverage/misc/pass/`: - `unambiguous-await-call.js` - Tests `await (async function () { })();` - `unambiguous-await-in-declaration.js` - Tests `const x = await (async function () { })();` - All parser tests pass - All conformance tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
main
2 hours ago
fix(parser): reparse all statements with await identifier in unambiguous mode Commit 92e27b4 only handled `await /regex/` but missed `await (...)` and other cases where `await` followed by certain tokens was parsed as an identifier instead of an await expression. This change follows TypeScript's approach by tracking ALL identifiers named "await" and reparsing affected statements when ESM syntax is detected. Changes: - Add `encountered_await_identifier` flag to ParserState - Set flag when parsing "await" as identifier in non-await context - Track checkpoints only for statements that actually used await as identifier - Once ESM detected, enable await context for remaining statements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix/parser-await-reparse-all-statements
3 hours ago
fix(allocator): maintain alignment in grow() for non-aligned sizes When growing allocations with sizes not aligned to ALIGN (8 bytes), the cursor could become misaligned. For example, a Vec<u8> growing from capacity 3 to 6 would compute additional=3, making the cursor point to an address not divisible by 8. Fix by computing additional as the difference between rounded sizes: additional = round_up_to(new_size, ALIGN) - round_up_to(old_size, ALIGN) Also handle the case where both sizes round to the same value (no additional space needed). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
refactor/remove-bumpalo
4 hours ago
Active Branches
refactor(allocator): replace bumpalo with custom bump allocator
last run
28 minutes ago
#18141
CodSpeed Performance Gauge
-3%
feat(ast): add keyword and operator position fields to AST nodes
last run
52 minutes ago
#18166
CodSpeed Performance Gauge
0%
fix(linter/unicorn): fix `prefer-array-some` autofix for `.filter().length` pattern
last run
4 hours ago
#18153
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs