Bug 228676

Summary: [JSC] Yarr should use Bitmap instead of ByteVector for BoyerMoore search
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch saam: review+, ews-feeder: commit-queue-

Description Yusuke Suzuki 2021-07-31 00:05:47 PDT
[JSC] Yarr should use Bitmap instead of ByteVector for BoyerMoore search
Comment 1 Yusuke Suzuki 2021-07-31 00:10:39 PDT
Created attachment 434690 [details]
Patch
Comment 2 Yusuke Suzuki 2021-07-31 00:14:13 PDT
Created attachment 434691 [details]
Patch
Comment 3 Yusuke Suzuki 2021-07-31 00:20:17 PDT
Created attachment 434692 [details]
Patch
Comment 4 Yusuke Suzuki 2021-07-31 13:51:45 PDT
Created attachment 434703 [details]
Patch
Comment 5 Saam Barati 2021-08-02 10:14:24 PDT
Comment on attachment 434703 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434703&action=review

> Source/JavaScriptCore/yarr/YarrJIT.cpp:2428
> +                            auto matched = branchTestBit64(NonZero, regT2, regT0); // We can ignore upper bits since module-64 is performed.

module->modulo

The instruction itself performs modulo 64?
Comment 6 Saam Barati 2021-08-02 10:14:34 PDT
r=me
Comment 7 Yusuke Suzuki 2021-08-02 10:39:57 PDT
Comment on attachment 434703 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434703&action=review

Thanks!

>> Source/JavaScriptCore/yarr/YarrJIT.cpp:2428
>> +                            auto matched = branchTestBit64(NonZero, regT2, regT0); // We can ignore upper bits since module-64 is performed.
> 
> module->modulo
> 
> The instruction itself performs modulo 64?

Yes. https://www.felixcloutier.com/x86/bt
Comment 8 Yusuke Suzuki 2021-08-02 10:46:42 PDT
Committed r280544 (240171@main): <https://commits.webkit.org/240171@main>
Comment 9 Radar WebKit Bug Importer 2021-08-02 10:47:18 PDT
<rdar://problem/81419055>