Inline compound negation arguments - #204
Merged
Merged
Conversation
jdalton
force-pushed
the
perf/compound-negation
branch
from
September 5, 2026 19:10
d25f5ea to
1f9910d
Compare
jdalton
force-pushed
the
perf/compound-negation
branch
2 times, most recently
from
September 6, 2026 02:30
92da4fe to
c606c60
Compare
jdalton
force-pushed
the
perf/compound-negation
branch
from
September 6, 2026 11:40
c606c60 to
4314386
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.