cranelift-wasm: Pass ir::Tables into all the translate_table_* methods
This serves two purposes: 1. It ensures that we call `get_or_create_table` to ensure that the embedder already had a chance to create the given table (although this is mostly redundant due to validation). 2. It allows the embedder to easily get the `ir::TableData` associated with this table, and more easily emit whatever inline JIT code to translate the table instruction (rather than falling back to VM calls).
This commit is contained in:
@@ -435,6 +435,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
&mut self,
|
||||
mut pos: FuncCursor,
|
||||
_table_index: TableIndex,
|
||||
_table: ir::Table,
|
||||
_delta: ir::Value,
|
||||
_init_value: ir::Value,
|
||||
) -> WasmResult<ir::Value> {
|
||||
@@ -445,6 +446,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
&mut self,
|
||||
mut pos: FuncCursor,
|
||||
_table_index: TableIndex,
|
||||
_table: ir::Table,
|
||||
_index: ir::Value,
|
||||
) -> WasmResult<ir::Value> {
|
||||
Ok(pos.ins().null(self.reference_type()))
|
||||
@@ -454,6 +456,7 @@ impl<'dummy_environment> FuncEnvironment for DummyFuncEnvironment<'dummy_environ
|
||||
&mut self,
|
||||
_pos: FuncCursor,
|
||||
_table_index: TableIndex,
|
||||
_table: ir::Table,
|
||||
_value: ir::Value,
|
||||
_index: ir::Value,
|
||||
) -> WasmResult<()> {
|
||||
|
||||
Reference in New Issue
Block a user