Implement table.init and elem.drop from the bulk memory proposal
This commit is contained in:
@@ -536,12 +536,14 @@ impl VMBuiltinFunctionsArray {
|
||||
|
||||
pub fn initialized() -> Self {
|
||||
use crate::libcalls::*;
|
||||
|
||||
let mut ptrs = [0; Self::len()];
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_memory32_grow_index().index() as usize] =
|
||||
wasmtime_memory32_grow as usize;
|
||||
ptrs[BuiltinFunctionIndex::get_imported_memory32_grow_index().index() as usize] =
|
||||
wasmtime_imported_memory32_grow as usize;
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_memory32_size_index().index() as usize] =
|
||||
wasmtime_memory32_size as usize;
|
||||
ptrs[BuiltinFunctionIndex::get_imported_memory32_size_index().index() as usize] =
|
||||
@@ -549,16 +551,18 @@ impl VMBuiltinFunctionsArray {
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_table_copy_defined_defined_index().index() as usize] =
|
||||
wasmtime_table_copy_defined_defined as usize;
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_table_copy_defined_imported_index().index() as usize] =
|
||||
wasmtime_table_copy_defined_imported as usize;
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_table_copy_imported_defined_index().index() as usize] =
|
||||
wasmtime_table_copy_imported_defined as usize;
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_table_copy_imported_imported_index().index() as usize] =
|
||||
wasmtime_table_copy_imported_imported as usize;
|
||||
|
||||
ptrs[BuiltinFunctionIndex::get_table_init_index().index() as usize] =
|
||||
wasmtime_table_init as usize;
|
||||
ptrs[BuiltinFunctionIndex::get_elem_drop_index().index() as usize] =
|
||||
wasmtime_elem_drop as usize;
|
||||
|
||||
debug_assert!(ptrs.iter().cloned().all(|p| p != 0));
|
||||
|
||||
Self { ptrs }
|
||||
|
||||
Reference in New Issue
Block a user