1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-05 18:49:39 +02:00

Ensure pattern is first unit for biditrie-ability purpose

This commit is contained in:
Raymond Hill 2023-01-30 11:12:21 -05:00
parent c54b521345
commit 2e1cb9be9b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3760,21 +3760,6 @@ class FilterCompiler {
const units = [];
// Method(s)
if ( this.methodBits !== 0 || this.notMethodBits !== 0 ) {
units.push(FilterMethod.compile(this));
}
// Not types
if ( this.notTypeBits !== 0 ) {
units.push(FilterNotType.compile(this));
}
// Strict partiness
if ( this.strictParty !== 0 ) {
units.push(FilterStrictParty.compile(this));
}
// Pattern
const patternClass = this.compilePattern(units);
@ -3792,6 +3777,21 @@ class FilterCompiler {
units.push(FilterAnchorRight.compile());
}
// Method(s)
if ( this.methodBits !== 0 || this.notMethodBits !== 0 ) {
units.push(FilterMethod.compile(this));
}
// Not types
if ( this.notTypeBits !== 0 ) {
units.push(FilterNotType.compile(this));
}
// Strict partiness
if ( this.strictParty !== 0 ) {
units.push(FilterStrictParty.compile(this));
}
// Origin
if ( this.fromDomainOpt !== '' ) {
compileFromDomainOpt(