Bug 199763 - [WHLSL] Return statements don't need to keep track of the function they're in
Summary: [WHLSL] Return statements don't need to keep track of the function they're in
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
Keywords: InRadar
Depends on:
Reported: 2019-07-12 15:50 PDT by Robin Morisset
Modified: 2019-07-13 10:44 PDT (History)
3 users (show)

See Also:

Patch (7.28 KB, patch)
2019-07-12 15:55 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]

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]

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]

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]

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