diff --git a/lib/api/src/externals/function.rs b/lib/api/src/externals/function.rs index 5b2161d8b..1df33f2cc 100644 --- a/lib/api/src/externals/function.rs +++ b/lib/api/src/externals/function.rs @@ -42,8 +42,6 @@ pub enum FunctionDefinition { pub struct Function { pub(crate) store: Store, pub(crate) definition: FunctionDefinition, - // If the Function is owned by the Store, not the instance - pub(crate) owned_by_store: bool, pub(crate) exported: ExportFunction, } @@ -69,7 +67,6 @@ impl Function { Self { store: store.clone(), - owned_by_store: true, definition: FunctionDefinition::Host(HostFunctionDefinition { has_env: false }), exported: ExportFunction { address, @@ -108,7 +105,6 @@ impl Function { Self { store: store.clone(), - owned_by_store: true, definition: FunctionDefinition::Host(HostFunctionDefinition { has_env: true }), exported: ExportFunction { address, @@ -144,7 +140,6 @@ impl Function { Self { store: store.clone(), - owned_by_store: true, definition: FunctionDefinition::Host(HostFunctionDefinition { has_env: false }), exported: ExportFunction { address, @@ -182,7 +177,6 @@ impl Function { Self { store: store.clone(), - owned_by_store: true, definition: FunctionDefinition::Host(HostFunctionDefinition { has_env: true }), exported: ExportFunction { address, @@ -309,7 +303,6 @@ impl Function { .expect("Can't get call trampoline for the function"); Self { store: store.clone(), - owned_by_store: false, definition: FunctionDefinition::Wasm(WasmFunctionDefinition { trampoline }), exported: wasmer_export, } diff --git a/lib/api/src/native.rs b/lib/api/src/native.rs index ea0cd4d3b..0de061c12 100644 --- a/lib/api/src/native.rs +++ b/lib/api/src/native.rs @@ -81,7 +81,6 @@ where Self { store: other.store, definition: other.definition, - owned_by_store: true, // todo exported: ExportFunction { address: other.address, vmctx: other.vmctx,