Preserve global wasm module offset in SourceLoc.

This commit is contained in:
Yury Delendik
2019-01-22 16:48:31 -06:00
committed by Benjamin Bouvier
parent 2a519092a0
commit 27b0933a4a
4 changed files with 25 additions and 13 deletions

View File

@@ -343,7 +343,11 @@ pub trait ModuleEnvironment<'data> {
///
/// Note there's no `reserve_function_bodies` function because the number of
/// functions is already provided by `reserve_func_types`.
fn define_function_body(&mut self, body_bytes: &'data [u8]) -> WasmResult<()>;
fn define_function_body(
&mut self,
body_bytes: &'data [u8],
body_offset: usize,
) -> WasmResult<()>;
/// Provides the number of data initializers up front. By default this does nothing, but
/// implementations can use this to preallocate memory if desired.