Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 7ad7e47

Browse files
committed
Remove dead methods
I think I brought these back by accident in a bad merge
1 parent f43477d commit 7ad7e47

1 file changed

Lines changed: 0 additions & 51 deletions

File tree

crates/wasmtime/src/runtime/vm/component.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! cranelift-compiled adapters, will use this `VMComponentContext` as well.
88
99
use crate::component::{Component, Instance, InstancePre, ResourceType, RuntimeImport};
10-
use crate::prelude::*;
1110
use crate::runtime::component::ComponentInstanceId;
1211
use crate::runtime::vm::{
1312
Export, ExportFunction, ExportGlobal, ExportGlobalKind, SendSyncPtr, VMArrayCallFunction,
@@ -688,56 +687,6 @@ impl ComponentInstance {
688687
resource.instance == component.defined_resource_instances[idx]
689688
}
690689

691-
/// Implementation of the `resource.new` intrinsic for `i32`
692-
/// representations.
693-
pub fn resource_new32(
694-
&mut self,
695-
store: &mut dyn VMStore,
696-
ty: TypeResourceTableIndex,
697-
rep: u32,
698-
) -> Result<u32> {
699-
self.resource_tables(store)
700-
.resource_new(TypedResource::Component { ty, rep })
701-
}
702-
703-
/// Implementation of the `resource.rep` intrinsic for `i32`
704-
/// representations.
705-
pub fn resource_rep32(
706-
&mut self,
707-
store: &mut dyn VMStore,
708-
ty: TypeResourceTableIndex,
709-
index: u32,
710-
) -> Result<u32> {
711-
self.resource_tables(store)
712-
.resource_rep(TypedResourceIndex::Component { ty, index })
713-
}
714-
715-
/// Implementation of the `resource.drop` intrinsic.
716-
pub fn resource_drop(
717-
&mut self,
718-
store: &mut dyn VMStore,
719-
ty: TypeResourceTableIndex,
720-
index: u32,
721-
) -> Result<Option<u32>> {
722-
self.resource_tables(store)
723-
.resource_drop(TypedResourceIndex::Component { ty, index })
724-
}
725-
726-
/// NB: this is intended to be a private method. This does not have
727-
/// `host_table` information at this time meaning it's only suitable for
728-
/// working with resources specified to this component which is currently
729-
/// all that this is used for.
730-
///
731-
/// If necessary though it's possible to enhance the `Store` trait to thread
732-
/// through the relevant information and get `host_table` to be `Some` here.
733-
fn resource_tables<'a>(&'a mut self, store: &'a mut dyn VMStore) -> ResourceTables<'a> {
734-
ResourceTables {
735-
host_table: None,
736-
calls: store.component_calls(),
737-
guest: Some((&mut self.instance_resource_tables, self.component.types())),
738-
}
739-
}
740-
741690
/// Returns the runtime state of resources associated with this component.
742691
#[inline]
743692
pub fn guest_tables(

0 commit comments

Comments
 (0)