Bug 199389

Summary: [WHLSL] the initializer in VariableDeclaration should be a std::unique_ptr, not Optional<UniqueRef<..>>
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: WebGPUAssignee: Robin Morisset <rmorisset>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, rmorisset, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 199695    
Attachments:
Description Flags
Patch none

Robin Morisset
Reported 2019-07-01 16:58:04 PDT
Optional<UniqueRef<..>> is not only semantically weird (UniqueRef is basically a unique_ptr that promises not to be null), but also inefficient, wasting 8 bytes for the boolean in Optional. It is a pattern that appears throughout the AST. In this patch I start by removing it in a fairly simple spot: the initializer for VariableDeclaration.
Attachments
Patch (30.87 KB, patch)
2019-07-01 17:01 PDT, Robin Morisset
no flags
Robin Morisset
Comment 1 2019-07-01 17:01:45 PDT
Robin Morisset
Comment 2 2019-07-02 10:47:51 PDT
Thanks for the review!
WebKit Commit Bot
Comment 3 2019-07-02 11:13:23 PDT
Comment on attachment 373279 [details] Patch Clearing flags on attachment: 373279 Committed r247062: <https://trac.webkit.org/changeset/247062>
WebKit Commit Bot
Comment 4 2019-07-02 11:13:25 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2019-07-02 11:14:21 PDT
Note You need to log in before you can comment on or make changes to this bug.