Bug 187779

Summary: [WHLSL] The interpreter doesn't support boolean short-circuiting
Product: WebKit Reporter: Thomas Denney <tdenney>
Component: WebGPUAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, dino, mmaxfield, rmorisset, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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. ***