qt6-bb10/src/corelib/tools
Giuseppe D'Angelo 5c9ba41f71 QRegularExpression: optimize global match
PCRE doesn't like illegal Unicode sequences (it's explicitely
documented in pcreunicode(3) that they trigger undefined behaviour,
and the program may crash). Therefore, we always let PCRE check
the validity of both the pattern and the subject string.

However, when performing global matching, the subject string
can be checked only once: subsequent matches can safely skip the check
and avoid a huge performance hit of scanning the whole subject
string for each match (!).

This patch implements that behaviour internally -- it's still
not possible for the user to skip the sanity check. On large
subject strings, this gives a terrific performance benefit.

Change-Id: Ia44cf18782e07966c9cd6ec4ccfef081ed131763
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-12 15:12:23 +02:00
..
qalgorithms.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qalgorithms.qdoc Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qbitarray.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qbitarray.h Remove/update Qt 5 to-do's that won't be done for Qt 5. 2012-04-04 14:04:03 +02:00
qbytearray.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qbytearray.h Bump some Qt 5 to-do's to Qt 6. 2012-04-10 22:47:37 +02:00
qbytearraymatcher.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qbytearraymatcher.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qbytedata_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcache.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcache.qdoc Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qchar.cpp QChar: optimize some methods a bit for general case 2012-04-11 15:57:32 +02:00
qchar.h QChar: optimize some methods a bit for general case 2012-04-11 15:57:32 +02:00
qcontainerfwd.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcontiguouscache.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcontiguouscache.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcryptographichash.cpp Use #define before including SHA-2 3rdparty code 2012-03-07 00:02:23 +01:00
qcryptographichash.h QCryptographicHash: make constructor explicit 2012-02-29 15:53:21 +01:00
qdatetime.cpp Support legacy QDataStream serialization of QDate. 2012-03-07 00:02:35 +01:00
qdatetime.h QDateTime: Store Julian Day as qint64 2012-02-05 00:26:07 +01:00
qdatetime_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qeasingcurve.cpp QEasingCurve: fix a missing */ 2012-02-22 17:21:26 +01:00
qeasingcurve.h QEasingCurve: implement copy assignment operator inline 2012-02-21 19:15:48 +01:00
qelapsedtimer.cpp Various documentation fixes ported from Qt 4.8 2012-02-02 16:03:30 +01:00
qelapsedtimer.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qelapsedtimer_generic.cpp Update the documentation about the sign in QElapsedTimer::(m)secsTo 2012-04-04 18:10:11 +02:00
qelapsedtimer_mac.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qelapsedtimer_unix.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qelapsedtimer_win.cpp QElapsedTimer/Win: Fix 64-bit integer overflow 2012-02-22 00:07:31 +01:00
qfreelist.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qfreelist_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qharfbuzz.cpp Make cache of opentype tables in Harfbuzz face lazy 2012-03-06 12:43:27 +01:00
qharfbuzz_p.h Make cache of opentype tables in Harfbuzz face lazy 2012-03-06 12:43:27 +01:00
qhash.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qhash.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qiterator.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qiterator.qdoc Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qline.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qline.h Bump some Qt 5 to-do's to Qt 6. 2012-04-10 22:47:37 +02:00
qlinkedlist.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qlinkedlist.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qlist.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qlist.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qlocale.cpp Fix measurement system for the UK 2012-03-26 11:41:07 +02:00
qlocale.h Fix measurement system for the UK 2012-03-26 11:41:07 +02:00
qlocale.qdoc Fix measurement system for the UK 2012-03-26 11:41:07 +02:00
qlocale_data_p.h Fix measurement system for the UK 2012-03-26 11:41:07 +02:00
qlocale_icu.cpp Fix loading of the ICU dynamic libraries on Windows. 2012-03-24 15:10:00 +01:00
qlocale_mac.mm Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qlocale_p.h Make QLocale not depend on being friends with the global static 2012-03-22 20:59:27 +01:00
qlocale_tools.cpp Remove ARMFPA support and Q_DOUBLE_FORMAT detection 2012-03-01 16:26:55 +01:00
qlocale_tools_p.h Remove ARMFPA support and Q_DOUBLE_FORMAT detection 2012-03-01 16:26:55 +01:00
qlocale_unix.cpp Make QLocalePrivate::updateSystemLocale() reset the locale data on Unix 2012-03-22 20:59:27 +01:00
qlocale_win.cpp Fix a crash in QSystemLocalePrivate::uiLanguages(). 2012-02-25 14:04:22 +01:00
qmap.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qmap.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qmargins.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qmargins.h QtCore: add constexpr to geometric classes 2012-02-22 00:07:31 +01:00
qpair.h Merge remote-tracking branch 'origin/api_changes' 2012-03-04 21:45:05 +01:00
qpair.qdoc Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qpodlist_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qpoint.cpp QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull() 2012-02-20 15:17:08 +01:00
qpoint.h QtCore: add constexpr to geometric classes 2012-02-22 00:07:31 +01:00
qqueue.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qqueue.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qrect.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qrect.h QtCore: add constexpr to geometric classes 2012-02-22 00:07:31 +01:00
qrefcount.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qrefcount.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qregexp.cpp QRegExp: remove docs about RegExp2 being default in Qt5 2012-03-14 11:37:18 +01:00
qregexp.h Remove many deprecated methods 2012-01-31 16:17:55 +01:00
qregularexpression.cpp QRegularExpression: optimize global match 2012-04-12 15:12:23 +02:00
qregularexpression.h QRegularExpression: add captureCount() 2012-03-06 23:56:14 +01:00
qringbuffer_p.h QRingBuffer: make constructor explicit 2012-02-29 00:05:38 +01:00
qscopedpointer.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qscopedpointer.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedpointer_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedvaluerollback.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedvaluerollback.h QScopedValueRollback: make constructor explicit 2012-02-29 13:52:01 +01:00
qset.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qset.qdoc Remove qdoc for obsolete methods of QSet. 2012-04-02 14:52:48 +02:00
qshareddata.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qshareddata.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsharedpointer.cpp Make it possible to put QObject tracked with QWeakPointer inside QSharedPointer 2012-02-10 15:37:10 +01:00
qsharedpointer.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsharedpointer_impl.h Make it possible to put QObject tracked with QWeakPointer inside QSharedPointer 2012-02-10 15:37:10 +01:00
qsimd.cpp Remove the false information that IA-64 supports SSE2 2012-03-22 18:59:45 +01:00
qsimd_p.h Remove support for Mac OS X compilers without the -Xarch flag 2012-03-24 15:10:00 +01:00
qsize.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qsize.h QtCore: add constexpr to geometric classes 2012-02-22 00:07:31 +01:00
qstack.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstack.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstring.cpp minor improvement for NormalizationCorrections 2012-04-11 01:42:12 +02:00
qstring.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qstringbuilder.cpp Remove unneeded code to convert to ASCII/Latin1. 2012-02-22 20:51:47 +01:00
qstringbuilder.h Allow QChar::SpecialCharacter with QStringBuilder. 2012-02-29 14:08:43 +01:00
qstringlist.cpp Remove the usage of deprecated qdoc macros. 2012-03-02 23:16:25 +01:00
qstringlist.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstringmatcher.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstringmatcher.h QStringMatcher: make constructor explicit 2012-02-26 10:53:25 +01:00
qtextboundaryfinder.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtextboundaryfinder.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtimeline.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtimeline.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtools_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qunicodetables.cpp minor improvement for NormalizationCorrections 2012-04-11 01:42:12 +02:00
qunicodetables_p.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qvarlengtharray.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qvarlengtharray.qdoc containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qvector.cpp containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qvector.h containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qvsnprintf.cpp Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
tools.pri Add qpair.h to the HEADERS list 2012-03-22 18:59:45 +01:00