Bug 232652

Summary: [JSC] Clean up StructureStubInfo initialization
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: REOPENED ---    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, ews-watchlist, hi, joepeck, keith_miller, mark.lam, msaboff, pangle, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 232907    
Bug Blocks:    
Attachments:
Description Flags
Patch
saam: review+, ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch none

Description Yusuke Suzuki 2021-11-02 19:38:33 PDT
[JSC] Clean up StructureStubInfo initialization
Comment 1 Yusuke Suzuki 2021-11-02 19:40:29 PDT
Created attachment 443164 [details]
Patch
Comment 2 Saam Barati 2021-11-02 19:47:55 PDT
Comment on attachment 443164 [details]
Patch

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

> Source/WTF/wtf/FixedVector.h:68
> +        : m_storage(std::forward<Container>(other))

Why forward?

> Source/WTF/wtf/FixedVector.h:74
> +        m_storage = std::forward<Container>(other);

Why forward?
Comment 3 Yusuke Suzuki 2021-11-03 09:53:14 PDT
Created attachment 443205 [details]
Patch
Comment 4 Yusuke Suzuki 2021-11-03 09:56:09 PDT
Comment on attachment 443164 [details]
Patch

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

>> Source/WTF/wtf/FixedVector.h:68
>> +        : m_storage(std::forward<Container>(other))
> 
> Why forward?

Since this Container can become rvalue and lvalue (using Container&& templatized value in the parameter).
std::forward handles both cases. https://en.cppreference.com/w/cpp/utility/forward

>> Source/WTF/wtf/FixedVector.h:74
>> +        m_storage = std::forward<Container>(other);
> 
> Why forward?

Ditto
Comment 5 Yusuke Suzuki 2021-11-03 10:44:43 PDT
Created attachment 443211 [details]
Patch
Comment 6 Yusuke Suzuki 2021-11-03 12:13:15 PDT
Created attachment 443221 [details]
Patch
Comment 7 Yusuke Suzuki 2021-11-03 12:37:15 PDT
Created attachment 443226 [details]
Patch
Comment 8 Yusuke Suzuki 2021-11-03 13:42:59 PDT
Created attachment 443235 [details]
Patch
Comment 9 Yusuke Suzuki 2021-11-03 17:05:48 PDT
Committed r285246 (243861@main): <https://commits.webkit.org/243861@main>
Comment 10 Radar WebKit Bug Importer 2021-11-03 17:06:20 PDT
<rdar://problem/84998450>
Comment 11 WebKit Commit Bot 2021-11-09 15:04:00 PST
Re-opened since this is blocked by bug 232907