cranelift_wasm: Use the TableIndex type instead of raw u32

About half of the `FuncEnvironment::translate_table_*` methods were using the
`TableIndex` newtype, while the other half were using raw `u32`s. This commit
makes everything use `TableIndex`.
This commit is contained in:
Nick Fitzgerald
2020-05-20 13:41:34 -07:00
parent 7c68a10ed6
commit 01a92aef95
4 changed files with 20 additions and 16 deletions

View File

@@ -727,7 +727,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
fn translate_table_grow(
&mut self,
_: cranelift_codegen::cursor::FuncCursor<'_>,
_: u32,
_: TableIndex,
_: ir::Value,
_: ir::Value,
) -> WasmResult<ir::Value> {
@@ -739,7 +739,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
fn translate_table_get(
&mut self,
_: cranelift_codegen::cursor::FuncCursor<'_>,
_: u32,
_: TableIndex,
_: ir::Value,
) -> WasmResult<ir::Value> {
Err(WasmError::Unsupported(
@@ -750,7 +750,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
fn translate_table_set(
&mut self,
_: cranelift_codegen::cursor::FuncCursor<'_>,
_: u32,
_: TableIndex,
_: ir::Value,
_: ir::Value,
) -> WasmResult<()> {
@@ -762,7 +762,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
fn translate_table_fill(
&mut self,
_: cranelift_codegen::cursor::FuncCursor<'_>,
_: u32,
_: TableIndex,
_: ir::Value,
_: ir::Value,
_: ir::Value,