Bug 199602

Summary: [WHLSL] Implement uint/int div safety and add tests
Product: WebKit Reporter: Saam Barati <saam>
Component: WebGPUAssignee: Saam Barati <saam>
Status: RESOLVED WONTFIX    
Severity: Normal CC: dino, fpizlo, jonlee, justin_fan, mmaxfield, rmorisset
Priority: P1    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 195681    
Attachments:
Description Flags
WIP none

Description Saam Barati 2019-07-08 17:22:30 PDT
e.g
```
    program = "uint foo(uint x, uint y) { return x / y; }";
    assert_equals(await callUintFunction(program, "foo", [makeUint(7), makeUint(2)]), 3);
```
Comment 1 Saam Barati 2019-07-09 16:30:52 PDT
and

```
    program = "int foo(int x, int y) { return x / y; }";
    assert_equals(await callIntFunction(program, "foo", [makeInt(7), makeInt(2)]), 3);
```
Comment 2 Saam Barati 2019-07-20 06:35:42 PDT
I shall do this
Comment 3 Saam Barati 2019-07-20 06:41:21 PDT
This seems to work now. I'll land tests.
Comment 4 Saam Barati 2019-07-20 06:42:06 PDT
(In reply to Saam Barati from comment #3)
> This seems to work now. I'll land tests.

Though maybe we need to do things to make the div safe
Comment 5 Saam Barati 2019-07-20 06:57:40 PDT
Created attachment 374551 [details]
WIP
Comment 6 Myles C. Maxfield 2020-05-05 00:42:35 PDT
WHLSL is no longer relevant.