Bug 231125 - Share more code that uses ScratchRegisterAllocator in the ICs
Summary: Share more code that uses ScratchRegisterAllocator in the ICs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-02 15:41 PDT by Saam Barati
Modified: 2021-10-11 17:33 PDT (History)
8 users (show)

See Also:


Attachments
patch (14.68 KB, patch)
2021-10-11 12:55 PDT, Saam Barati
sam: review+
Details | Formatted Diff | Diff
patch for landing (14.46 KB, patch)
2021-10-11 14:43 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2021-10-02 15:41:07 PDT
A bunch of similar code. We can just share things.
Comment 1 Radar WebKit Bug Importer 2021-10-09 15:42:16 PDT
<rdar://problem/84066374>
Comment 2 Saam Barati 2021-10-11 12:55:00 PDT
Created attachment 440825 [details]
patch
Comment 3 Justin Michaud 2021-10-11 12:59:22 PDT
Comment on attachment 440825 [details]
patch

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

> Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp:256
> +ScratchRegisterAllocator AccessGenerationState::makeDefaultScratchAllocator(GPRReg extraToLock)

Cool, LGTM
Comment 4 Sam Weinig 2021-10-11 13:52:30 PDT
Comment on attachment 440825 [details]
patch

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

> Source/JavaScriptCore/bytecode/AccessCase.cpp:1681
> +        ScratchRegisterAllocator allocator = state.makeDefaultScratchAllocator(scratchGPR);

In other parts of WebKit, we would use auto here, since the function makes it exceedingly clear what the type is, but I'm not sure where JSC is on that these days.
Comment 5 Saam Barati 2021-10-11 14:38:55 PDT
Comment on attachment 440825 [details]
patch

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

>> Source/JavaScriptCore/bytecode/AccessCase.cpp:1681
>> +        ScratchRegisterAllocator allocator = state.makeDefaultScratchAllocator(scratchGPR);
> 
> In other parts of WebKit, we would use auto here, since the function makes it exceedingly clear what the type is, but I'm not sure where JSC is on that these days.

I'm happy to use "auto" in these cases.
Comment 6 Saam Barati 2021-10-11 14:43:08 PDT
Created attachment 440838 [details]
patch for landing
Comment 7 EWS 2021-10-11 17:33:25 PDT
Committed r283954 (242805@main): <https://commits.webkit.org/242805@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440838 [details].