mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-18 19:31:22 +00:00
Use Arc instead of Rc
This commit is contained in:
@ -103,7 +103,6 @@ impl Instance {
|
||||
LocalOrImport::Local(local_func_index) => instance
|
||||
.module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_func(&instance.module.info, local_func_index)
|
||||
.unwrap(),
|
||||
LocalOrImport::Import(import_func_index) => NonNull::new(
|
||||
@ -133,7 +132,6 @@ impl Instance {
|
||||
let wasm_trampoline = instance
|
||||
.module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_trampoline(&instance.module.info, sig_index)
|
||||
.expect("wasm trampoline");
|
||||
|
||||
@ -149,7 +147,7 @@ impl Instance {
|
||||
/// Load an `Instance` using the given loader.
|
||||
pub fn load<T: Loader>(&self, loader: T) -> ::std::result::Result<T::Instance, T::Error> {
|
||||
loader.load(
|
||||
&**self.module.runnable_module.borrow(),
|
||||
&**self.module.runnable_module,
|
||||
&self.module.info,
|
||||
unsafe { &*self.inner.vmctx },
|
||||
)
|
||||
@ -219,7 +217,6 @@ impl Instance {
|
||||
let func_wasm_inner = self
|
||||
.module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_trampoline(&self.module.info, sig_index)
|
||||
.unwrap();
|
||||
|
||||
@ -227,7 +224,6 @@ impl Instance {
|
||||
LocalOrImport::Local(local_func_index) => (
|
||||
self.module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_func(&self.module.info, local_func_index)
|
||||
.unwrap(),
|
||||
None,
|
||||
@ -368,7 +364,7 @@ impl Instance {
|
||||
|
||||
call_func_with_index(
|
||||
&self.module.info,
|
||||
&**self.module.runnable_module.borrow(),
|
||||
&**self.module.runnable_module,
|
||||
&self.inner.import_backing,
|
||||
self.inner.vmctx,
|
||||
func_index,
|
||||
@ -467,7 +463,6 @@ impl InstanceInner {
|
||||
LocalOrImport::Local(local_func_index) => (
|
||||
module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_func(&module.info, local_func_index)
|
||||
.expect("broken invariant, func resolver not synced with module.exports")
|
||||
.cast()
|
||||
@ -797,7 +792,7 @@ impl<'a> DynFunc<'a> {
|
||||
|
||||
call_func_with_index(
|
||||
&self.module.info,
|
||||
&**self.module.runnable_module.borrow(),
|
||||
&**self.module.runnable_module,
|
||||
&self.instance_inner.import_backing,
|
||||
self.instance_inner.vmctx,
|
||||
self.func_index,
|
||||
@ -819,7 +814,6 @@ impl<'a> DynFunc<'a> {
|
||||
LocalOrImport::Local(local_func_index) => self
|
||||
.module
|
||||
.runnable_module
|
||||
.borrow()
|
||||
.get_func(&self.module.info, local_func_index)
|
||||
.unwrap()
|
||||
.as_ptr(),
|
||||
|
Reference in New Issue
Block a user