Bug 176209

Summary: WSL IntLiteral should have variable type so that it can unify with things like uint
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: WebGPUAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, jfbastien, keith_miller, mark.lam, mmaxfield, msaboff, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 176199    
Attachments:
Description Flags
the patch
none
the patch mmaxfield: review+

Filip Pizlo
Reported 2017-08-31 19:38:03 PDT
Patch forthcoming.
Attachments
the patch (21.78 KB, patch)
2017-09-03 11:28 PDT, Filip Pizlo
no flags
the patch (23.22 KB, patch)
2017-09-03 12:38 PDT, Filip Pizlo
mmaxfield: review+
Filip Pizlo
Comment 1 2017-09-03 10:55:36 PDT
I think that if you use an integer literal without any suffixes, then it should unify with any type in which that literal is representable.
Filip Pizlo
Comment 2 2017-09-03 11:28:17 PDT
Created attachment 319789 [details] the patch
Filip Pizlo
Comment 3 2017-09-03 12:38:18 PDT
Created attachment 319796 [details] the patch Added more tests.
Myles C. Maxfield
Comment 4 2017-09-04 13:10:20 PDT
Comment on attachment 319796 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=319796&action=review > Tools/ChangeLog:24 > + Also updated Test.html so that it runs again and is better at printing things. So the following wouldn't work: int x = 4; double y = x; But the following would work: double y = 4; > Tools/WebGPUShadingLanguageRI/IntLiteralType.js:57 > + print("Unified with: " + realThis); print() :( > Tools/WebGPUShadingLanguageRI/Intrinsics.js:67 > + type.isInt = true; I never see this read from. What is it used for?
Filip Pizlo
Comment 5 2017-09-04 14:06:44 PDT
Filip Pizlo
Comment 6 2017-09-04 14:08:50 PDT
(In reply to Myles C. Maxfield from comment #4) > Comment on attachment 319796 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319796&action=review > > > Tools/ChangeLog:24 > > + Also updated Test.html so that it runs again and is better at printing things. > > So the following wouldn't work: > int x = 4; > double y = x; > > But the following would work: > double y = 4; Right. > > > Tools/WebGPUShadingLanguageRI/IntLiteralType.js:57 > > + print("Unified with: " + realThis); > > print() :( I removed it! > > > Tools/WebGPUShadingLanguageRI/Intrinsics.js:67 > > + type.isInt = true; > > I never see this read from. What is it used for? It's not used right now. I added it because all compilers eventually need to ask their types if they are int or float.
Radar WebKit Bug Importer
Comment 7 2017-09-27 13:00:42 PDT
Myles C. Maxfield
Comment 8 2018-10-13 19:56:39 PDT
Note You need to log in before you can comment on or make changes to this bug.