Bug 177092

Summary: WSL should report an error if you try to create an operator overload that will never be called
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: WebGPUAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, jfbastien, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 176199    
Attachments:
Description Flags
possible patch
none
more tests
none
even more tests
none
more tests!
none
more tests
none
more tests
none
the patch
none
the patch
jfbastien: review+, buildbot: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 none

Description Filip Pizlo 2017-09-18 11:59:23 PDT
Like:

Wrong number of args: int operator+(int, int, int)

Type parameters that cannot be inferred: int operator+<T>(int, int)

Probably other things.
Comment 1 Filip Pizlo 2017-09-21 18:37:07 PDT
Created attachment 321503 [details]
possible patch

It passes tests but I need to write a lot more tests.
Comment 2 Filip Pizlo 2017-09-21 19:30:42 PDT
Created attachment 321506 [details]
more tests

Adding tests for the checks I added.
Comment 3 Filip Pizlo 2017-09-21 20:03:13 PDT
Created attachment 321509 [details]
even more tests
Comment 4 Filip Pizlo 2017-09-21 20:16:23 PDT
Created attachment 321511 [details]
more tests!
Comment 5 Filip Pizlo 2017-09-21 21:49:27 PDT
Created attachment 321514 [details]
more tests
Comment 6 Filip Pizlo 2017-09-21 22:30:46 PDT
Created attachment 321518 [details]
more tests
Comment 7 Filip Pizlo 2017-09-22 11:52:29 PDT
Created attachment 321572 [details]
the patch

My test hacking spree ended up uncovering some bugs in type instantiation.  I then fixed those bugs.

Basically, even if we instantiate a Func, we need its CallExpressions to retain the original uninstantiated types for the purpose of reresolving protocol function calls.
Comment 8 Filip Pizlo 2017-09-22 11:55:06 PDT
Created attachment 321573 [details]
the patch
Comment 9 Build Bot 2017-09-22 14:33:50 PDT
Comment on attachment 321573 [details]
the patch

Attachment 321573 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4631211

New failing tests:
http/tests/cache-storage/cache-representation.https.html
Comment 10 Build Bot 2017-09-22 14:33:52 PDT
Created attachment 321593 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 11 JF Bastien 2017-09-22 16:23:43 PDT
Comment on attachment 321573 [details]
the patch

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

r=me

> Tools/WebGPUShadingLanguageRI/FuncInstantiator.js:97
> +        class InstantiationInstantiateImmediates extends InstantiateImmediates {

InstantiationInstantiateImmediates 🤔

> Tools/WebGPUShadingLanguageRI/Prepare.js:32
> +            parse(standardProgram, "/internal/stdlib", "native", 28 - 1, standardLibrary);

What's that number?

> Tools/WebGPUShadingLanguageRI/StandardLibrary.js:27
> +// NOTE: The next line is line 28, and we rely on this in Prepare.js.

Ah OK.
Comment 12 Filip Pizlo 2017-09-22 16:24:59 PDT
(In reply to JF Bastien from comment #11)
> Comment on attachment 321573 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321573&action=review
> 
> r=me
> 
> > Tools/WebGPUShadingLanguageRI/FuncInstantiator.js:97
> > +        class InstantiationInstantiateImmediates extends InstantiateImmediates {
> 
> InstantiationInstantiateImmediates 🤔
> 
> > Tools/WebGPUShadingLanguageRI/Prepare.js:32
> > +            parse(standardProgram, "/internal/stdlib", "native", 28 - 1, standardLibrary);
> 
> What's that number?

I'll add a comment.

> 
> > Tools/WebGPUShadingLanguageRI/StandardLibrary.js:27
> > +// NOTE: The next line is line 28, and we rely on this in Prepare.js.
> 
> Ah OK.
Comment 13 Filip Pizlo 2017-09-22 16:28:47 PDT
Landed in https://trac.webkit.org/changeset/222413/webkit
Comment 14 Radar WebKit Bug Importer 2017-09-27 12:29:22 PDT
<rdar://problem/34693367>
Comment 15 Myles C. Maxfield 2018-10-13 19:47:08 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/191