Bug 199763

Summary: [WHLSL] Return statements don't need to keep track of the function they're in
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: WebGPUAssignee: Robin Morisset <rmorisset>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Robin Morisset 2019-07-12 15:50:35 PDT
This is only used in the Checker, and it can easily keep track of the current function.
Doing it this way spares us from tracking the current function in the name resolver, and saves 8 bytes from every Return.
Comment 1 Robin Morisset 2019-07-12 15:55:24 PDT
Created attachment 374046 [details]
Patch

Not yet up for review because I've not yet tested it.
Comment 2 Robin Morisset 2019-07-12 16:27:17 PDT
Comment on attachment 374046 [details]
Patch

It passes all tests, so asking for review.
Comment 3 Myles C. Maxfield 2019-07-12 21:59:42 PDT
Comment on attachment 374046 [details]
Patch

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

> Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLReturn.h:-60
> -    void setFunction(FunctionDefinition* functionDefinition) { m_function = functionDefinition; }

We might have to add this back in if we add a pass to inline things.
Comment 4 WebKit Commit Bot 2019-07-13 10:43:47 PDT
Comment on attachment 374046 [details]
Patch

Clearing flags on attachment: 374046

Committed r247419: <https://trac.webkit.org/changeset/247419>
Comment 5 WebKit Commit Bot 2019-07-13 10:43:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-07-13 10:44:17 PDT
<rdar://problem/53054937>