Bug 176334 - [WSL] Rationalize how protocol inheritance deals with type parameters
Summary: [WSL] Rationalize how protocol inheritance deals with type parameters
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-04 13:46 PDT by Filip Pizlo
Modified: 2018-10-13 17:00 PDT (History)
3 users (show)

See Also:


Attachments
the patch (7.60 KB, patch)
2017-09-07 10:26 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (7.87 KB, patch)
2017-09-07 10:34 PDT, Filip Pizlo
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-09-04 13:46:35 PDT
If a signature in a protocol has type parameters, then we should probably pass those type parameters as type arguments during inheritance resolution.
Comment 1 Filip Pizlo 2017-09-07 10:26:41 PDT
Created attachment 320127 [details]
the patch
Comment 2 Filip Pizlo 2017-09-07 10:34:45 PDT
Created attachment 320130 [details]
the patch
Comment 3 Mark Lam 2017-09-07 10:48:26 PDT
Comment on attachment 320130 [details]
the patch

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

r=me

> Tools/WebGPUShadingLanguageRI/ProtocolDecl.js:93
> +            let overload = this.program.resolveFuncOverload(signature.name, signature.typeParameters, signature.parameterTypes);

Not really due to this patch but "typeParameters" and "parameterTypes" sound too similar.  Can there be better names for these?
Comment 4 Filip Pizlo 2017-09-07 10:52:58 PDT
(In reply to Mark Lam from comment #3)
> Comment on attachment 320130 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=320130&action=review
> 
> r=me
> 
> > Tools/WebGPUShadingLanguageRI/ProtocolDecl.js:93
> > +            let overload = this.program.resolveFuncOverload(signature.name, signature.typeParameters, signature.parameterTypes);
> 
> Not really due to this patch but "typeParameters" and "parameterTypes" sound
> too similar.  Can there be better names for these?

They are indeed confusing.  But, they are terms of art.
Comment 5 Filip Pizlo 2017-09-07 10:54:15 PDT
Landed in https://trac.webkit.org/changeset/221740/webkit
Comment 6 Radar WebKit Bug Importer 2017-09-27 12:37:45 PDT
<rdar://problem/34693637>
Comment 7 Myles C. Maxfield 2018-10-13 17:00:12 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/152