Summary: | Implement Unicode RegExp support in the YARR JIT | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||||||||||
Component: | JavaScriptCore | Assignee: | Michael Saboff <msaboff> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | buildbot, fpizlo, jfbastien, keith_miller, mark.lam, saam, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | Other | ||||||||||||||
Hardware: | Other | ||||||||||||||
OS: | Other | ||||||||||||||
Attachments: |
|
Description
Michael Saboff
2017-07-18 16:48:16 PDT
Created attachment 315867 [details]
Work in Progress
This passes tests on both Mac and iOS 64 bit, but there is some more tuning that can be done.
Created attachment 315930 [details]
Updated Work in Progress with build fixes for 32 bit platforms
Comment on attachment 315930 [details] Updated Work in Progress with build fixes for 32 bit platforms Attachment 315930 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4158569 New failing tests: js/regexp-unicode.html imported/w3c/IndexedDB-private-browsing/idbfactory_open.html Created attachment 316059 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Created attachment 318771 [details]
Patch
Created attachment 318789 [details]
Updated Patch
Added check for quantifier overflow of character terms.
Comment on attachment 318789 [details] Updated Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318789&action=review LGTM > Source/JavaScriptCore/ChangeLog:38 > + function, getEffectiveAddress64(), for ARM64. It just calls x86Lea64() on X86-64. Nice. Comment on attachment 318789 [details] Updated Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318789&action=review lgtm, not an expert in this though.... > Source/JavaScriptCore/yarr/YarrInterpreter.cpp:2067 > COMPILE_ASSERT(sizeof(Interpreter<UChar>::BackTrackInfoParentheses) == (YarrStackSpaceForBackTrackInfoParentheses * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoParentheses); Move to static_assert? > Source/JavaScriptCore/yarr/YarrJIT.cpp:2925 > + , m_canonicalMode(m_pattern.unicode() ? CanonicalMode::Unicode : CanonicalMode::UCS2) This is a bit weird because Unicode normalization has a concept of "canonical" which doesn't match this: http://unicode.org/faq/normalization.html (In reply to JF Bastien from comment #8) > Comment on attachment 318789 [details] > Updated Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=318789&action=review > > lgtm, not an expert in this though.... > > > Source/JavaScriptCore/yarr/YarrInterpreter.cpp:2067 > > COMPILE_ASSERT(sizeof(Interpreter<UChar>::BackTrackInfoParentheses) == (YarrStackSpaceForBackTrackInfoParentheses * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoParentheses); > > Move to static_assert? COMPILE_ASSERT resolves to static_assert on appropriate platforms. > > Source/JavaScriptCore/yarr/YarrJIT.cpp:2925 > > + , m_canonicalMode(m_pattern.unicode() ? CanonicalMode::Unicode : CanonicalMode::UCS2) > > This is a bit weird because Unicode normalization has a concept of > "canonical" which doesn't match this: > http://unicode.org/faq/normalization.html This is part of our implementation Canonicalize() for case folding as specified in the standard at https://tc39.github.io/ecma262/#sec-runtime-semantics-canonicalize-ch. We use CanonicalMode::Unicode to signify what that section has as "Unicode is true". UCS2 is legacy canonicalization. Committed r221052: <http://trac.webkit.org/changeset/221052> |