Bug 187779 - [WHLSL] The interpreter doesn't support boolean short-circuiting
Summary: [WHLSL] The interpreter doesn't support boolean short-circuiting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 186773 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-18 13:52 PDT by Thomas Denney
Modified: 2018-07-20 15:35 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.15 KB, patch)
2018-07-18 20:35 PDT, Thomas Denney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Denney 2018-07-18 13:52:07 PDT
The WHLSL specification states that the boolean operations && and || should support short-circuiting, i.e. in e1 && e2, e2 is only evaluated if e1 evaluates to true, and in e1 || e2, e2 is only evaluated if e1 evaluates to false. Currently the interpreter doesn't adhere to this behavior and evaluates both operands as && and || are implemented as functions that take a pair of boolean arguments.
Comment 1 Thomas Denney 2018-07-18 20:35:30 PDT
Created attachment 345320 [details]
Patch
Comment 2 WebKit Commit Bot 2018-07-19 13:42:26 PDT
Comment on attachment 345320 [details]
Patch

Clearing flags on attachment: 345320

Committed r234001: <https://trac.webkit.org/changeset/234001>
Comment 3 WebKit Commit Bot 2018-07-19 13:42:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-07-19 13:43:18 PDT
<rdar://problem/42398027>
Comment 5 Jer Noble 2018-07-20 15:35:12 PDT
*** Bug 186773 has been marked as a duplicate of this bug. ***