Skip to content

Inline compound negation arguments - #204

Merged
jdalton merged 4 commits into
dperini:masterfrom
jdalton:perf/compound-negation
Sep 7, 2026
Merged

Inline compound negation arguments#204
jdalton merged 4 commits into
dperini:masterfrom
jdalton:perf/compound-negation

Conversation

@jdalton

@jdalton jdalton commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Tooling update

Rebased onto merged #212 as one commit. Sources and tests use .mts, Node tests use Vitest, and the published JavaScript paths stay unchanged. The original engine changes are preserved.

Local lint, formatting, Node and packed-package checks pass. All 41 WPT pages pass against both generated builds.

Change

Inline compound :not() arguments instead of calling the general matcher for each candidate. Selector lists and combinator arguments retain the existing path.

Extracted from #167. Four tests cover nested negation, structural pseudo-classes, matching, invalid arguments, EOF recovery, and unchanged traversal. An instrumented matcher confirms that compounds avoid delegation while selector lists still delegate.

All four tests pass. Run with Node.js ≥ 22 on a jsdom-supported patch release; commands are in test/not-extracted.md. No end-to-end speedup is claimed without a benchmark.

@jdalton
jdalton force-pushed the perf/compound-negation branch from d25f5ea to 1f9910d Compare September 5, 2026 19:10
@jdalton
jdalton force-pushed the perf/compound-negation branch 2 times, most recently from 92da4fe to c606c60 Compare September 6, 2026 02:30
@jdalton
jdalton force-pushed the perf/compound-negation branch from c606c60 to 4314386 Compare September 6, 2026 11:40
@jdalton
jdalton merged commit 82e0ea6 into dperini:master Sep 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant