Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(minifier): add negation for conditional expressions - #26580

Draft
armano2 wants to merge 2 commits into
oxc-project:mainfrom
armano2:feat/negation-conditional-expression
Draft

feat(minifier): add negation for conditional expressions#26580
armano2 wants to merge 2 commits into
oxc-project:mainfrom
armano2:feat/negation-conditional-expression

Conversation

@armano2

@armano2 armano2 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

// `!(a ? b : !c)` => `(a ? !b : c)`
// `!(a ? !b : c)` => `(a ? b : !c)`
Expression::ConditionalExpression(cond_expr) if boolean_context => {
// TODO: we should calculate cost first instead of negating it directly

@armano2 armano2 Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have to rewrite negation to use precedence if we should negate stuff

@codspeed-hq

codspeed-hq Bot commented Sep 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 19 skipped benchmarks1


Comparing armano2:feat/negation-conditional-expression (df8dcaf) with main (071ac78)

Open in CodSpeed

Footnotes

  1. 19 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant