merge and respond to feedback

This commit is contained in:
Mackenzie Clark
2019-03-28 11:41:45 -07:00
20 changed files with 234 additions and 41 deletions

View File

@ -1,5 +1,5 @@
use wasmer_runtime_core::{
backend::Backend,
backend::{Backend, CompilerConfig},
module::{
DataInitializer, ExportIndex, ImportName, ModuleInfo, StringTable, StringTableBuilder,
TableInitializer,
@ -20,7 +20,10 @@ use wasmparser::{
use hashbrown::HashMap;
pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), BinaryReaderError> {
pub fn read_module(
wasm: &[u8],
compiler_config: CompilerConfig,
) -> Result<(ModuleInfo, CodeSectionReader), BinaryReaderError> {
let mut info = ModuleInfo {
memories: Map::new(),
globals: Map::new(),
@ -45,6 +48,8 @@ pub fn read_module(wasm: &[u8]) -> Result<(ModuleInfo, CodeSectionReader), Binar
namespace_table: StringTable::new(),
name_table: StringTable::new(),
em_symbol_map: compiler_config.symbol_map.clone(),
custom_sections: HashMap::new(),
};