Bug 177092 - WSL should report an error if you try to create an operator overload that will never be called
Summary: WSL should report an error if you try to create an operator overload that wil...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords: InRadar
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2017-09-18 11:59 PDT by Filip Pizlo
Modified: 2018-10-13 19:47 PDT (History)
4 users (show)

See Also:


Attachments
possible patch (23.16 KB, patch)
2017-09-21 18:37 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
more tests (26.24 KB, patch)
2017-09-21 19:30 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
even more tests (37.77 KB, patch)
2017-09-21 20:03 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
more tests! (43.85 KB, patch)
2017-09-21 20:16 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
more tests (45.89 KB, patch)
2017-09-21 21:49 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
more tests (52.22 KB, patch)
2017-09-21 22:30 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (144.71 KB, patch)
2017-09-22 11:52 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (167.61 KB, patch)
2017-09-22 11:55 PDT, Filip Pizlo
jfbastien: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (13.36 MB, application/zip)
2017-09-22 14:33 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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