Bug 176581 - WSL should support while loops
Summary: WSL should support while loops
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
: 176263 (view as bug list)
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2017-09-07 20:57 PDT by Myles C. Maxfield
Modified: 2018-10-13 16:53 PDT (History)
2 users (show)

See Also:


Attachments
WIP (16.94 KB, patch)
2017-09-07 20:58 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (19.22 KB, patch)
2017-09-08 00:02 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (22.94 KB, patch)
2017-09-08 11:25 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (39.58 KB, patch)
2017-09-10 16:51 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (38.82 KB, patch)
2017-09-10 17:17 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (44.90 KB, patch)
2017-09-10 17:37 PDT, Myles C. Maxfield
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-09-07 20:57:59 PDT
WSL should support while loops
Comment 1 Myles C. Maxfield 2017-09-07 20:58:36 PDT
Created attachment 320230 [details]
WIP
Comment 2 Myles C. Maxfield 2017-09-08 00:02:01 PDT
Created attachment 320246 [details]
WIP
Comment 3 Myles C. Maxfield 2017-09-08 00:03:17 PDT
Comment on attachment 320246 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=320246&action=review

> Tools/WebGPUShadingLanguageRI/Node.js:40
> +        //memoTable.set(this, returnValue);

Because Evaluator is a Visitor, the memo table doesn't work when evaluating, because while loops' conditions need to actually be evaluated each time. Fil: Do you know a way to solve this?
Comment 4 Myles C. Maxfield 2017-09-08 11:25:20 PDT
Created attachment 320285 [details]
WIP
Comment 5 Myles C. Maxfield 2017-09-10 16:51:18 PDT
Created attachment 320406 [details]
Patch
Comment 6 Myles C. Maxfield 2017-09-10 17:17:47 PDT
Created attachment 320408 [details]
Patch
Comment 7 Myles C. Maxfield 2017-09-10 17:37:05 PDT
Created attachment 320409 [details]
Patch
Comment 8 Filip Pizlo 2017-09-10 17:57:07 PDT
Comment on attachment 320409 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=320409&action=review

Nice!  R=me.

> Tools/WebGPUShadingLanguageRI/Break.js:38
> +        return "Break";

Lowercase is better since that’s what te language does.

> Tools/WebGPUShadingLanguageRI/Checker.js:245
> +            throw new Error("Trying to negate something with no type: " + node.conditional);

I don’t think negation is what is going on here.
Comment 9 Myles C. Maxfield 2017-09-10 18:05:25 PDT
Committed r221842: <http://trac.webkit.org/changeset/221842>
Comment 10 Myles C. Maxfield 2017-09-13 21:15:21 PDT
*** Bug 176263 has been marked as a duplicate of this bug. ***
Comment 11 Radar WebKit Bug Importer 2017-09-27 12:37:01 PDT
<rdar://problem/34693608>
Comment 12 Myles C. Maxfield 2018-10-13 16:53:55 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/146