Bug 200681 - [WHLSL] Don't generate empty comma expressions for bare ';'
Summary: [WHLSL] Don't generate empty comma expressions for bare ';'
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:
Blocks: 199726
  Show dependency treegraph
Reported: 2019-08-13 11:45 PDT by Robin Morisset
Modified: 2019-08-13 18:06 PDT (History)
4 users (show)

See Also:

Patch (10.65 KB, patch)
2019-08-13 11:49 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-08-13 11:45:58 PDT
Currently we emit a comma expression with no sub-expression for bare ';', as well as for the initialization of for loops with no initializers.
This crashes the Checker, as it tries to access the last sub-expression of comma expressions.
Instead we should generate an empty statement block for that case.

This problem was found (and originally fixed before the commit was reverted) in https://bugs.webkit.org/show_bug.cgi?id=199726.
I am just isolating the fix here for easier review and debugging.
Comment 1 Robin Morisset 2019-08-13 11:49:31 PDT
Created attachment 376189 [details]
Comment 2 WebKit Commit Bot 2019-08-13 18:05:33 PDT
Comment on attachment 376189 [details]

Clearing flags on attachment: 376189

Committed r248650: <https://trac.webkit.org/changeset/248650>
Comment 3 WebKit Commit Bot 2019-08-13 18:05:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-08-13 18:06:21 PDT