Move start_index out of TranslationResult and into the WasmRuntime.

This makes it more consistent with how all the rest of the content of
a wasm module is handled. And, now TranslationResult just has a Vec
of translated functions, which will make it easier to refactor further.
This commit is contained in:
Dan Gohman
2017-10-09 08:37:04 -07:00
parent ef5ad630c8
commit e74bc06380
4 changed files with 39 additions and 29 deletions

View File

@@ -189,6 +189,10 @@ pub trait WasmRuntime: FuncEnvironment {
offset: usize,
data: &[u8],
) -> Result<(), String>;
/// Declares a start function.
fn declare_start_func(&mut self, index: FunctionIndex);
/// Call this function after having declared all the runtime elements but prior to the
/// function body translation.
fn begin_translation(&mut self);