pub fn write_tables_to_vmctx(&mut self) {
        // Safety: we allocated the memory correctly and the bounds are correct at this point.
        let vm_tables = unsafe {
            let ptr = self.ptr_mut_u8().offset(VmContext::tables_offset(
                self.num_globals,
                self.num_imported_funcs,
            )) as *mut VmTable;
            slice::from_raw_parts_mut(ptr, self.tables.len())
        };

        for (table, vm_table) in self.tables.iter().zip(vm_tables.iter_mut()) {
            *vm_table = table.as_vm_table();
        }
    }
/// Write the table data to the VmContext.
Write the table data to the VmContext.
Write the table data to the VmContext .
pub fn write_tables_to_vmctx(&mut self) {
        // Safety: we allocated the memory correctly and the bounds are correct at this point.
        let vm_tables = unsafe {
            let ptr = self.ptr_mut_u8().offset(VmContext::tables_offset(
                self.num_globals,
                self.num_imported_funcs,
            )) as *mut VmTable;
            slice::from_raw_parts_mut(ptr, self.tables.len())
        };
        for (table, vm_table) in self.tables.iter().zip(vm_tables.iter_mut()) {
            *vm_table = table.as_vm_table();
        }
    }
pub fn write_tables_to_vmctx ( & mut self ) { // Safety: we allocated the memory correctly and the bounds are correct at this point. let vm_tables = unsafe { let ptr = self . ptr_mut_u8 ( ) . offset ( VmContext :: tables_offset ( self . num_globals , self . num_imported_funcs , ) ) as * mut VmTable ; slice :: from_raw_parts_mut ( ptr , self . tables . len ( ) ) } ; for ( table , vm_table ) in self . tables . iter ( ) . zip ( vm_tables . iter_mut ( ) ) { * vm_table = table . as_vm_table ( ) ; } }
Write the table data to the VmContext.
Write the table data to the VmContext .
&mut self
&mut self