fitzgen opened PR #1882 from tables-can-hold-externref
to master
:
This commit enables
wasmtime_runtime::Table
to internally hold elements of
eitherfuncref
(all that is currently supported) orexternref
(newly
introduced in this commit).This commit updates
Table
's API, but does NOT generally propagate those
changes outwards all the way through the Wasmtime embedding API. It only does
enough to get everything compiling and the current test suite passing. It is
expected that as we implement more of the reference types spec, we will bubble
these changes out and expose them to the embedding API.cc #929
fitzgen requested yurydelendik for a review on PR #1882.
alexcrichton merged PR #1882.
yurydelendik submitted PR Review.
yurydelendik created PR Review Comment:
We are exposing
Option<VMExternRef>
elements to the CL or other low level compiler. It is hard to guess what type of binary representation we will be dealing with here. For comparison, I see#[repr(C)]
nearVMCallerCheckedAnyfunc
.
yurydelendik submitted PR Review.
fitzgen submitted PR Review.
fitzgen created PR Review Comment:
VMExternRef
isrepr(transparent)
around aNonNull
which isrepr(transparent)
around a pointer. Additionally,Option<NonNull<...>>
is guaranteed to have the same representation as a pointer. So we should be good as far as binary representation goes.
Last updated: Nov 22 2024 at 16:03 UTC