Bug 200188

Summary: [WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
Product: WebKit Reporter: Saam Barati <saam>
Component: WebGPUAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dino, ews-watchlist, fpizlo, jonlee, justin_fan, mmaxfield, rmorisset, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
mmaxfield: review+
followup patch
none
followup patch none

Saam Barati
Reported 2019-07-26 19:04:49 PDT
They don't make any sense anymore since UnnamedType is now ref counted. You should just take a ref to the thing instead.
Attachments
patch (8.81 KB, patch)
2019-07-26 19:27 PDT, Saam Barati
mmaxfield: review+
followup patch (5.97 KB, patch)
2019-07-31 15:06 PDT, Saam Barati
no flags
followup patch (5.98 KB, patch)
2019-07-31 15:07 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2019-07-26 19:27:19 PDT
EWS Watchlist
Comment 2 2019-07-26 19:30:22 PDT
Attachment 375009 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:34: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:35: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:33: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 5 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 3 2019-07-27 18:32:13 PDT
Radar WebKit Bug Importer
Comment 4 2019-07-27 18:33:16 PDT
Darin Adler
Comment 5 2019-07-29 11:26:41 PDT
Comment on attachment 375009 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=375009&action=review > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:47 > + WTF_MAKE_NONCOPYABLE(ArrayReferenceType); > + WTF_MAKE_NONMOVABLE(ArrayReferenceType); Doesn’t make sense to me that you would ever need both of these. I don’t think that’s how C++ works. If you delete the copy constructor I don’t think you normally have to explicitly delete the move constructor too, for example.
Saam Barati
Comment 6 2019-07-31 14:17:42 PDT
(In reply to Darin Adler from comment #5) > Comment on attachment 375009 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375009&action=review > > > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:47 > > + WTF_MAKE_NONCOPYABLE(ArrayReferenceType); > > + WTF_MAKE_NONMOVABLE(ArrayReferenceType); > > Doesn’t make sense to me that you would ever need both of these. I don’t > think that’s how C++ works. If you delete the copy constructor I don’t think > you normally have to explicitly delete the move constructor too, for example. Yeah good point. I was employing full paranoia without remembering that explicitly defining (a deleted or not) copy constructor removes the move constructor.
Saam Barati
Comment 7 2019-07-31 14:21:29 PDT
I can prep a patch in a few minutes
Saam Barati
Comment 8 2019-07-31 15:06:05 PDT
Created attachment 375258 [details] followup patch
Saam Barati
Comment 9 2019-07-31 15:07:26 PDT
Created attachment 375259 [details] followup patch
Saam Barati
Comment 10 2019-07-31 17:04:44 PDT
Note You need to log in before you can comment on or make changes to this bug.