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

@@ -295,7 +295,8 @@ pub fn parse_code_section<'data>(
for body in code {
let mut reader = body?.get_binary_reader();
let size = reader.bytes_remaining();
environ.define_function_body(reader.read_bytes(size)?)?;
let offset = reader.original_position();
environ.define_function_body(reader.read_bytes(size)?, offset)?;
}
Ok(())
}