- From: JF Bastien <w3c@jfbastien.com>
- Date: Wed, 07 Mar 2018 21:15:39 +0000
- To: Corentin Wallez <cwallez@google.com>
- Cc: Kai Ninomiya <kainino@google.com>, public-gpu <public-gpu@w3.org>
- Message-ID: <CACeCroutJ+NTVmScLrwwBK-0ae-qzNsCRFkXxsiS1xabfn3Kjg@mail.gmail.com>
On Wed, Mar 7, 2018 at 12:16 PM Corentin Wallez <cwallez@google.com> wrote: > Thanks for the pointers Kai! > > In the host bindings proposal, it looks like we could pass string to > functions both as C strings (memory offset + size) or a DOMString wrapped > in an anyref. If the choice between the two is left to the WebAssembly > module and supporting code, then it could choose to use DOMStrings wrapped > in anyref to take advantage of the AtomicString optimization. This is a bit > scary though because it might perform worse than C-strings on browsers that > don't have the optimization. The alternative is that WebGPU describes which > is the import binding structure is the most efficient for its entry points. > > The host binding proposal doesn't address dictionaries though (except for > the JSON string argument type) so we should ask the WASM CG what the > options would be there. > We could put it on the agenda for the upcoming in person meeting: https://github.com/WebAssembly/meetings/blob/master/2018/CG-04.md On Tue, Mar 6, 2018 at 5:12 PM, Kai Ninomiya <kainino@google.com> wrote: > >> Hey all, >> >> I don't think these have been shared here (I only just actually learned >> that there were published up-to-date proposals). >> >> Draft Reference Types proposal (add an "anyref" type to WASM which >> references opaque objects outside WASM): >> >> https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md >> >> Draft Host Bindings proposal (relies on "anyref" for host binding calls): >> https://github.com/WebAssembly/host-bindings/blob/master/proposals/host- >> bindings/Overview.md >> >> My understanding from a brief chat with Brad Nelson, just now, is that >> the anyref objects can be held directly from WASM - avoiding >> host-binding-call-time table lookups (lookups in the WebAssembly.Table). >> > >
Received on Wednesday, 7 March 2018 21:16:17 UTC