mirror of https://github.com/gorhill/uBlock.git
Ensure pattern is first unit for biditrie-ability purpose
This commit is contained in:
parent
c54b521345
commit
2e1cb9be9b
|
@ -3760,21 +3760,6 @@ class FilterCompiler {
|
||||||
|
|
||||||
const units = [];
|
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
|
// Pattern
|
||||||
const patternClass = this.compilePattern(units);
|
const patternClass = this.compilePattern(units);
|
||||||
|
|
||||||
|
@ -3792,6 +3777,21 @@ class FilterCompiler {
|
||||||
units.push(FilterAnchorRight.compile());
|
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
|
// Origin
|
||||||
if ( this.fromDomainOpt !== '' ) {
|
if ( this.fromDomainOpt !== '' ) {
|
||||||
compileFromDomainOpt(
|
compileFromDomainOpt(
|
||||||
|
|
Loading…
Reference in New Issue