mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113955: Still generate regexp jitcode when doing string matching, r=jandem
This commit is contained in:
parent
c0d5a6c306
commit
ebd370c69f
@ -491,11 +491,8 @@ bool
|
||||
RegExpShared::compile(JSContext *cx, HandleAtom pattern, HandleLinearString input,
|
||||
CompilationMode mode, ForceByteCodeEnum force)
|
||||
{
|
||||
if (!ignoreCase() && !StringHasRegExpMetaChars(pattern)) {
|
||||
if (!ignoreCase() && !StringHasRegExpMetaChars(pattern))
|
||||
canStringMatch = true;
|
||||
parenCount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
CompileOptions options(cx);
|
||||
TokenStream dummyTokenStream(cx, options, nullptr, 0, nullptr);
|
||||
@ -537,7 +534,7 @@ bool
|
||||
RegExpShared::compileIfNecessary(JSContext *cx, HandleLinearString input,
|
||||
CompilationMode mode, ForceByteCodeEnum force)
|
||||
{
|
||||
if (isCompiled(mode, input->hasLatin1Chars(), force) || canStringMatch)
|
||||
if (isCompiled(mode, input->hasLatin1Chars(), force))
|
||||
return true;
|
||||
return compile(cx, input, mode, force);
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class RegExpShared
|
||||
/* Accessors */
|
||||
|
||||
size_t getParenCount() const {
|
||||
MOZ_ASSERT(isCompiled() || canStringMatch);
|
||||
MOZ_ASSERT(isCompiled());
|
||||
return parenCount;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user