Bug 53496 - Replace PCRE with Yarr in WebCore
Summary: Replace PCRE with Yarr in WebCore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Peter Varga
URL:
Keywords:
Depends on: 53765
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-01 08:33 PST by Peter Varga
Modified: 2011-02-09 04:30 PST (History)
10 users (show)

See Also:


Attachments
proposed patch (30.56 KB, patch)
2011-02-01 08:37 PST, Peter Varga
no flags Details | Formatted Diff | Diff
proposed patch v1.1 (29.97 KB, patch)
2011-02-01 08:47 PST, Peter Varga
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Varga 2011-02-01 08:33:15 PST
PCRE isn't used in JavaScriptCore anymore and the time has come to remove PCRE from WebCore as well.
The PCRE's jsRegExp matching functions should be changed to the analogue of Yarr Interpreter's functions.
Comment 1 Peter Varga 2011-02-01 08:37:40 PST
Created attachment 80761 [details]
proposed patch
Comment 2 Peter Varga 2011-02-01 08:47:27 PST
Created attachment 80762 [details]
proposed patch v1.1

The WebCore's pbxproj file modification is removed from the patch.
Comment 3 Mark Rowe (bdash) 2011-02-01 10:26:01 PST
Please don’t modify the .order files.  They’re periodically updated in an automated fashion.  There’s no benefit to updating them manually in between.
Comment 4 Gavin Barraclough 2011-02-01 12:15:27 PST
Hi Peter, this looks really great.  I'm waiting to see the test bots go green & then I'll r+ (though please follow mark's comment re .order files).
Comment 5 Gavin Barraclough 2011-02-01 19:41:55 PST
Comment on attachment 80762 [details]
proposed patch v1.1

Shame, looks like a couple of test bots have stalled?  r+, since after a day of waiting the ones that did run are green.
This patch looks good as is, and getting rid of PCRE will be fantastic.  I think it would probably be even better to try to unify jsc/runtime/RegExp with WebCore's RegularExpression class (with the product of this merge likely living in wtf/text?) - whether this is ultimately possible or not, this patch is a really great step in the right direction.
Comment 6 WebKit Review Bot 2011-02-04 06:58:31 PST
http://trac.webkit.org/changeset/77625 might have broken Windows Release (Build) and Windows Debug (Build)
Comment 7 Dimitri Glazkov (Google) 2011-02-04 07:07:35 PST
Borked Chromium build too.
Comment 8 WebKit Review Bot 2011-02-04 07:43:40 PST
http://trac.webkit.org/changeset/77626 might have broken Leopard Intel Release (Tests)
The following tests are not passing:
platform/mac/fast/AppleScript/date.html
Comment 9 Csaba Osztrogonác 2011-02-04 10:28:46 PST
Comment on attachment 80762 [details]
proposed patch v1.1

landed in http://trac.webkit.org/changeset/77626

and rolled out: http://trac.webkit.org/changeset/77630 because of build breaks
Comment 10 Csaba Osztrogonác 2011-02-04 10:38:02 PST
Peter, could you check the build fails at monday, please?
I copied the build logs here:

Build log from Windows bot after http://trac.webkit.org/changeset/77626 and 

http://trac.webkit.org/changeset/77628 windows buildfixes:
3>..\platform\text\RegularExpression.cpp(103) : error C2057: expected constant expression
3>..\platform\text\RegularExpression.cpp(103) : error C2466: cannot allocate an array of constant size 0
3>..\platform\text\RegularExpression.cpp(103) : error C2133: 'offsets' : unknown size





Build log from Chromium Windows bot:

22>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "struct JSRegExp * __cdecl jsRegExpCompile(wchar_t const *,int,enum JSRegExpIgnoreCaseOption,enum JSRegExpMultilineOption,unsigned int *,char const * *)" (?jsRegExpCompile@@YAPAUJSRegExp@@PB_WHW4JSRegExpIgnoreCaseOption@@W4JSRegExpMultilineOption@@PAIPAPBD@Z) referenced in function "private: static struct JSRegExp * __cdecl WebCore::RegularExpression::Private::compile(class WTF::String const &,enum WTF::TextCaseSensitivity)" (?compile@Private@RegularExpression@WebCore@@CAPAUJSRegExp@@ABVString@WTF@@W4TextCaseSensitivity@6@@Z)
22>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "void __cdecl jsRegExpFree(struct JSRegExp *)" (?jsRegExpFree@@YAXPAUJSRegExp@@@Z) referenced in function "public: __thiscall WebCore::RegularExpression::Private::~Private(void)" (??1Private@RegularExpression@WebCore@@QAE@XZ)
22>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "int __cdecl jsRegExpExecute(struct JSRegExp const *,wchar_t const *,int,int,int *,int)" (?jsRegExpExecute@@YAHPBUJSRegExp@@PB_WHHPAHH@Z) referenced in function "public: int __thiscall WebCore::RegularExpression::match(class WTF::String const &,int,int *)const " (?match@RegularExpression@WebCore@@QBEHABVString@WTF@@HPAH@Z)
22>E:\google-windows-1\chromium-win-release\build\Source\WebKit\chromium\Release\DumpRenderTree.exe : fatal error LNK1120: 3 unresolved externals
21>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "struct JSRegExp * __cdecl jsRegExpCompile(wchar_t const *,int,enum JSRegExpIgnoreCaseOption,enum JSRegExpMultilineOption,unsigned int *,char const * *)" (?jsRegExpCompile@@YAPAUJSRegExp@@PB_WHW4JSRegExpIgnoreCaseOption@@W4JSRegExpMultilineOption@@PAIPAPBD@Z) referenced in function "private: static struct JSRegExp * __cdecl WebCore::RegularExpression::Private::compile(class WTF::String const &,enum WTF::TextCaseSensitivity)" (?compile@Private@RegularExpression@WebCore@@CAPAUJSRegExp@@ABVString@WTF@@W4TextCaseSensitivity@6@@Z)
21>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "void __cdecl jsRegExpFree(struct JSRegExp *)" (?jsRegExpFree@@YAXPAUJSRegExp@@@Z) referenced in function "public: __thiscall WebCore::RegularExpression::Private::~Private(void)" (??1Private@RegularExpression@WebCore@@QAE@XZ)
21>webcore_platform.lib(RegularExpression.obj) : error LNK2019: unresolved external symbol "int __cdecl jsRegExpExecute(struct JSRegExp const *,wchar_t const *,int,int,int *,int)" (?jsRegExpExecute@@YAHPBUJSRegExp@@PB_WHHPAHH@Z) referenced in function "public: int __thiscall WebCore::RegularExpression::match(class WTF::String const &,int,int *)const " (?match@RegularExpression@WebCore@@QBEHABVString@WTF@@HPAH@Z)
21>E:\google-windows-1\chromium-win-release\build\Source\WebKit\chromium\Release\webkit_unit_tests.exe : fatal error LNK1120: 3 unresolved externals
Comment 11 Peter Varga 2011-02-09 04:30:00 PST
Landed in http://trac.webkit.org/changeset/78042