RESOLVED FIXED 176977
WSL should support enum
https://bugs.webkit.org/show_bug.cgi?id=176977
Summary WSL should support enum
Filip Pizlo
Reported 2017-09-14 21:32:20 PDT
...
Attachments
almost done (24.68 KB, patch)
2017-09-18 17:40 PDT, Filip Pizlo
no flags
the patch (49.14 KB, patch)
2017-09-18 20:18 PDT, Filip Pizlo
no flags
the ptach (49.71 KB, patch)
2017-09-18 20:21 PDT, Filip Pizlo
mmaxfield: review+
Filip Pizlo
Comment 1 2017-09-18 12:02:49 PDT
Ima do this next.
Filip Pizlo
Comment 2 2017-09-18 17:40:57 PDT
Created attachment 321158 [details] almost done
Filip Pizlo
Comment 3 2017-09-18 20:18:24 PDT
Created attachment 321178 [details] the patch
Filip Pizlo
Comment 4 2017-09-18 20:21:58 PDT
Created attachment 321179 [details] the ptach
Myles C. Maxfield
Comment 5 2017-09-18 20:35:46 PDT
Comment on attachment 321179 [details] the ptach View in context: https://bugs.webkit.org/attachment.cgi?id=321179&action=review > Tools/WebGPUShadingLanguageRI/Intrinsics.js:111 > + type.formatValueFromDoubleLiteral = value => value; No rounding? > Tools/WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js:27 > +function synthesizeEnumFunctions(program) Wow, this is cool! Dynamically generating functions! I wish I knew how to do this with clang (without emitting a giant string) > Tools/WebGPUShadingLanguageRI/Test.js:3929 > + Foo war() > + { > + return Foo.War; > + } > + Foo famine() > + { > + return Foo.Famine; > + } > + Foo pestilence() > + { > + return Foo.Pestilence; > + } > + Foo death() > + { > + return Foo.Death; > + } Couldn't you do, like, months of the year or something?
Filip Pizlo
Comment 6 2017-09-18 20:44:15 PDT
(In reply to Myles C. Maxfield from comment #5) > Comment on attachment 321179 [details] > the ptach > > View in context: > https://bugs.webkit.org/attachment.cgi?id=321179&action=review > > > Tools/WebGPUShadingLanguageRI/Intrinsics.js:111 > > + type.formatValueFromDoubleLiteral = value => value; > > No rounding? Oh! Fixed. > > > Tools/WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js:27 > > +function synthesizeEnumFunctions(program) > > Wow, this is cool! Dynamically generating functions! > > I wish I knew how to do this with clang (without emitting a giant string) > > > Tools/WebGPUShadingLanguageRI/Test.js:3929 > > + Foo war() > > + { > > + return Foo.War; > > + } > > + Foo famine() > > + { > > + return Foo.Famine; > > + } > > + Foo pestilence() > > + { > > + return Foo.Pestilence; > > + } > > + Foo death() > > + { > > + return Foo.Death; > > + } > > Couldn't you do, like, months of the year or something? ;-)
Filip Pizlo
Comment 7 2017-09-18 20:44:45 PDT
Radar WebKit Bug Importer
Comment 8 2017-09-27 12:36:10 PDT
Myles C. Maxfield
Comment 9 2018-10-13 16:40:02 PDT
Note You need to log in before you can comment on or make changes to this bug.