|
7 | 7 | //! cranelift-compiled adapters, will use this `VMComponentContext` as well. |
8 | 8 |
|
9 | 9 | use crate::component::{Component, Instance, InstancePre, ResourceType, RuntimeImport}; |
10 | | -use crate::prelude::*; |
11 | 10 | use crate::runtime::component::ComponentInstanceId; |
12 | 11 | use crate::runtime::vm::{ |
13 | 12 | Export, ExportFunction, ExportGlobal, ExportGlobalKind, SendSyncPtr, VMArrayCallFunction, |
@@ -688,56 +687,6 @@ impl ComponentInstance { |
688 | 687 | resource.instance == component.defined_resource_instances[idx] |
689 | 688 | } |
690 | 689 |
|
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 | | - |
741 | 690 | /// Returns the runtime state of resources associated with this component. |
742 | 691 | #[inline] |
743 | 692 | pub fn guest_tables( |
|
0 commit comments