perf(isolated_declarations): mark all diagnostic functions as #[cold]#19279
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR optimizes oxc_isolated_declarations diagnostic construction by marking diagnostic helper functions as cold paths, helping the compiler keep error-only code out of hot instruction paths.
Changes:
- Added
#[cold]to diagnostic-constructor functions indiagnostics.rsto hint they’re rarely executed. - No functional changes to diagnostic creation logic.
Comments suppressed due to low confidence (2)
crates/oxc_isolated_declarations/src/diagnostics.rs:90
- Diagnostic message has a grammatical error: "can't inferred" should be "can't be inferred".
OxcDiagnostic::error(
"TS9018: Arrays with spread elements can't inferred with --isolatedDeclarations.",
)
crates/oxc_isolated_declarations/src/diagnostics.rs:128
- Diagnostic message uses "it's" ("it is") where the possessive "its" is intended.
OxcDiagnostic::error(
"TS9025: Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.",
)
Merge activity
|
06426e0 to
99ce2a6
Compare
### 🚀 Features - 429d876 semantic: Assign ast node ids during semantic build (#19263) (Boshen) - ebb80b3 ast: Add `node_id` field to all AST struct nodes (#18138) (Boshen) ### 🐛 Bug Fixes - bfb15a3 semantic: Make multi_index_vec clone panic-safe (#19299) (Boshen) - 41c50a5 transformer: Ignore invalid JSX pragma identifiers (#19296) (Boshen) - deed3d8 transformer: Remove unnecessary trailing expression in object rest spread assignment (#19259) (Boshen) - 5bdaacc transformer: Propagate source spans for sourcemap correctness (#19258) (Boshen) - 3e0e5ba isolated-declarations: Align readonly class array initializer diagnostics with tsc (#19218) (camc314) ### ⚡ Performance - c169c77 syntax: Optimize `is_identifier_name_patched` (#19386) (sapphi-red) - aa1e1a8 allocator: Inline BitSet accessors (#19331) (Boshen) - 5b90d46 semantic: Improve SoA with multi index vec (#19138) (Boshen) - 99ce2a6 isolated_declarations: Mark all diagnostic functions as `#[cold]` (#19279) (camc314) - dd0220f transformer: Remove TS-only nodes earlier in `enter_statements` (#19166) (Dunqing) - e5baf60 isolated-declarations: Replace hash collections with index-based Vec (#19221) (Dunqing) ### 📚 Documentation - 569aa61 rust: Add missing rustdocs and remove missing_docs lint attrs (#19306) (Boshen)
### 🚀 Features - 429d876 semantic: Assign ast node ids during semantic build (oxc-project#19263) (Boshen) - ebb80b3 ast: Add `node_id` field to all AST struct nodes (oxc-project#18138) (Boshen) ### 🐛 Bug Fixes - bfb15a3 semantic: Make multi_index_vec clone panic-safe (oxc-project#19299) (Boshen) - 41c50a5 transformer: Ignore invalid JSX pragma identifiers (oxc-project#19296) (Boshen) - deed3d8 transformer: Remove unnecessary trailing expression in object rest spread assignment (oxc-project#19259) (Boshen) - 5bdaacc transformer: Propagate source spans for sourcemap correctness (oxc-project#19258) (Boshen) - 3e0e5ba isolated-declarations: Align readonly class array initializer diagnostics with tsc (oxc-project#19218) (camc314) ### ⚡ Performance - c169c77 syntax: Optimize `is_identifier_name_patched` (oxc-project#19386) (sapphi-red) - aa1e1a8 allocator: Inline BitSet accessors (oxc-project#19331) (Boshen) - 5b90d46 semantic: Improve SoA with multi index vec (oxc-project#19138) (Boshen) - 99ce2a6 isolated_declarations: Mark all diagnostic functions as `#[cold]` (oxc-project#19279) (camc314) - dd0220f transformer: Remove TS-only nodes earlier in `enter_statements` (oxc-project#19166) (Dunqing) - e5baf60 isolated-declarations: Replace hash collections with index-based Vec (oxc-project#19221) (Dunqing) ### 📚 Documentation - 569aa61 rust: Add missing rustdocs and remove missing_docs lint attrs (oxc-project#19306) (Boshen)

No description provided.