Minor corrections with latest changes.
This commit is contained in:
@@ -750,7 +750,7 @@ impl VMExternRefActivationsTable {
|
||||
///
|
||||
/// It is the responsibility of the caller to not have the pointer outlive
|
||||
/// the stack map lookup trait object.
|
||||
pub unsafe trait StackMapLookup {
|
||||
pub unsafe trait StackMapLookup: 'static {
|
||||
/// Lookup the stack map at a program counter (PC) value.
|
||||
fn lookup(&self, pc: usize) -> Option<*const StackMap>;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ unsafe impl WasmTy for Option<ExternRef> {
|
||||
unsafe {
|
||||
store
|
||||
.externref_activations_table()
|
||||
.insert_with_gc(x.inner, &*store.stack_map_lookup());
|
||||
.insert_with_gc(x.inner, store.stack_map_lookup());
|
||||
}
|
||||
abi
|
||||
} else {
|
||||
|
||||
@@ -524,7 +524,7 @@ impl<'a> Instantiator<'a> {
|
||||
externref_activations_table: self.store.externref_activations_table()
|
||||
as *const VMExternRefActivationsTable
|
||||
as *mut _,
|
||||
stack_map_lookup: Some(std::mem::transmute(self.store.stack_map_lookup())),
|
||||
stack_map_lookup: Some(self.store.stack_map_lookup()),
|
||||
})?;
|
||||
|
||||
// After we've created the `InstanceHandle` we still need to run
|
||||
|
||||
@@ -77,7 +77,7 @@ fn create_handle(
|
||||
externref_activations_table: store.externref_activations_table()
|
||||
as *const VMExternRefActivationsTable
|
||||
as *mut _,
|
||||
stack_map_lookup: Some(std::mem::transmute(store.stack_map_lookup())),
|
||||
stack_map_lookup: Some(store.stack_map_lookup()),
|
||||
},
|
||||
)?;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ impl Val {
|
||||
let externref_ptr = x.inner.as_raw();
|
||||
store
|
||||
.externref_activations_table()
|
||||
.insert_with_gc(x.inner, &*store.stack_map_lookup());
|
||||
.insert_with_gc(x.inner, store.stack_map_lookup());
|
||||
ptr::write(p as *mut *mut u8, externref_ptr)
|
||||
}
|
||||
Val::FuncRef(f) => ptr::write(
|
||||
|
||||
Reference in New Issue
Block a user