Bug 189015 - [WHLSL] Generate built-in functions "as-if" they were there the whole time
Summary: [WHLSL] Generate built-in functions "as-if" they were there the whole time
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 176199
  Show dependency treegraph
Reported: 2018-08-27 15:26 PDT by Myles C. Maxfield
Modified: 2018-10-13 15:19 PDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2018-08-27 15:26:00 PDT
Now that we've removed generics, we need to generate some functions at compile time. For example, operator.length of an int[10]. There is no way of describing this generically in the standard library, so we do it at compile time.

These newly-generated functions need to be created inside the type checker, because that's the only place which the type of every expression in the program. However, this is halfway through compilation. We need to make sure these newly-generated functions don't have any observable difference than regular functions in the standard library.
Comment 1 Myles C. Maxfield 2018-10-13 15:19:40 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/86