Make translate_operator() generic on FuncEnvironment.
This makes it clear that this function only uses the FuncEnvironment
trait and not WasmRuntime.
Also make the translate_{grow,current}_memory() methods take &self
instead of &mut self. The &mut was left on there by accident.
This commit is contained in:
@@ -110,7 +110,7 @@ pub trait FuncEnvironment {
|
||||
///
|
||||
/// Returns the old size (in pages) of the memory.
|
||||
fn translate_grow_memory(
|
||||
&mut self,
|
||||
&self,
|
||||
pos: FuncCursor,
|
||||
index: MemoryIndex,
|
||||
heap: ir::Heap,
|
||||
@@ -124,7 +124,7 @@ pub trait FuncEnvironment {
|
||||
///
|
||||
/// Returns the size in pages of the memory.
|
||||
fn translate_current_memory(
|
||||
&mut self,
|
||||
&self,
|
||||
pos: FuncCursor,
|
||||
index: MemoryIndex,
|
||||
heap: ir::Heap,
|
||||
|
||||
Reference in New Issue
Block a user