Bug 176334

Summary: [WSL] Rationalize how protocol inheritance deals with type parameters
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: WebGPUAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: mark.lam, 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
the patch
none
the patch mark.lam: review+

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