Bug 176335
Summary: | WSL StructTypes and Funcs should be type-specializable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> |
Component: | WebGPU | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | mmaxfield |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 176199, 177784 |
Filip Pizlo
I think that we should generalize the power of casts. Specifically, make it possible to say:
void foo<|int>() { ... }
void foo<|double>() { ... }
Then when you call foo<int>(), you get the first one, and if you call foo<double>(), you get the second one. If you call foo<bool>(), you get an error.
In general, the syntax would be:
void foo<typeVariables | typeParameters>()
So you could say:
void foo<T, U:numeric | vec4<T>, U>() { ... }
You'd get that function if you called:
foo<vec4<int>, double>();
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
We've removed generics from the language, so this bug doesn't make much sense any more.
Myles C. Maxfield
Migrated to https://github.com/gpuweb/WHLSL/issues/151