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:
@@ -347,7 +347,7 @@ pub trait FuncEnvironment: TargetEnvironment {
|
||||
fn translate_table_grow(
|
||||
&mut self,
|
||||
pos: FuncCursor,
|
||||
table_index: u32,
|
||||
table_index: TableIndex,
|
||||
delta: ir::Value,
|
||||
init_value: ir::Value,
|
||||
) -> WasmResult<ir::Value>;
|
||||
@@ -356,7 +356,7 @@ pub trait FuncEnvironment: TargetEnvironment {
|
||||
fn translate_table_get(
|
||||
&mut self,
|
||||
pos: FuncCursor,
|
||||
table_index: u32,
|
||||
table_index: TableIndex,
|
||||
index: ir::Value,
|
||||
) -> WasmResult<ir::Value>;
|
||||
|
||||
@@ -364,7 +364,7 @@ pub trait FuncEnvironment: TargetEnvironment {
|
||||
fn translate_table_set(
|
||||
&mut self,
|
||||
pos: FuncCursor,
|
||||
table_index: u32,
|
||||
table_index: TableIndex,
|
||||
value: ir::Value,
|
||||
index: ir::Value,
|
||||
) -> WasmResult<()>;
|
||||
@@ -387,7 +387,7 @@ pub trait FuncEnvironment: TargetEnvironment {
|
||||
fn translate_table_fill(
|
||||
&mut self,
|
||||
pos: FuncCursor,
|
||||
table_index: u32,
|
||||
table_index: TableIndex,
|
||||
dst: ir::Value,
|
||||
val: ir::Value,
|
||||
len: ir::Value,
|
||||
|
||||
Reference in New Issue
Block a user