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:
Jakob Stoklund Olesen
2017-09-06 16:24:55 -07:00
parent 062dd41c93
commit d6f6af104b
3 changed files with 36 additions and 36 deletions

View File

@@ -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,