diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-08 11:00:22 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-11 13:11:30 +0000 |
commit | 04b4a269e604731f855b8008acc94dcd70ea116c (patch) | |
tree | 1abc4f5067736704656a10f4c08e4933fcc3af72 /src/qml/jsruntime/qv4regexp.cpp | |
parent | d6d659a04832217d05930063a2aa484a5f0ec7ee (diff) |
Enable the Yarr JIT for regexps with nested parenthesis
Change-Id: I4e7a44ae2b5759febec6f83ab9fa85612515ab04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexp.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexp.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4regexp.cpp b/src/qml/jsruntime/qv4regexp.cpp index e562482395..6963400a08 100644 --- a/src/qml/jsruntime/qv4regexp.cpp +++ b/src/qml/jsruntime/qv4regexp.cpp @@ -63,9 +63,15 @@ uint RegExp::match(const QString &string, int start, uint *matchOffsets) WTF::String s(string); #if ENABLE(YARR_JIT) - if (d()->hasValidJITCode()) + if (d()->hasValidJITCode()) { +#if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS) + char buffer[8192]; + return uint(jitCode()->execute(s.characters16(), start, s.length(), (int*)matchOffsets, buffer, 8192).start); +#else return uint(jitCode()->execute(s.characters16(), start, s.length(), (int*)matchOffsets).start); #endif + } +#endif return JSC::Yarr::interpret(byteCode(), s.characters16(), string.length(), start, matchOffsets); } |