Complete support for global init expressions.

This commit is contained in:
Dan Gohman
2017-10-10 09:35:10 -07:00
parent 653e8bb563
commit 8e1ba080c0
3 changed files with 25 additions and 57 deletions

View File

@@ -183,6 +183,7 @@ pub trait WasmRuntime: FuncEnvironment {
fn declare_table_elements(
&mut self,
table_index: TableIndex,
base: Option<GlobalIndex>,
offset: usize,
elements: &[FunctionIndex],
);
@@ -192,9 +193,10 @@ pub trait WasmRuntime: FuncEnvironment {
fn declare_data_initialization(
&mut self,
memory_index: MemoryIndex,
base: Option<GlobalIndex>,
offset: usize,
data: &[u8],
) -> Result<(), String>;
);
/// Declares a function export to the runtime.
fn declare_func_export(&mut self, func_index: FunctionIndex, name: &str);