Improve error handling, and start refactoring Instance.

Introduce proper error handling in several places, and perform a first
pass at refactoring Instance to make it easier to use.
This commit is contained in:
Dan Gohman
2018-12-07 15:32:51 -05:00
parent fe562297a7
commit 7dcca6be5b
24 changed files with 949 additions and 565 deletions

View File

@@ -146,7 +146,12 @@ fn handle_module(path: PathBuf, target: &Option<String>, output: &str) -> Result
.map_err(|err| format!("{}", err))?;
}
let (compilation, relocations) = compile_module(&translation, &*isa)?;
let (compilation, relocations) = compile_module(
&translation.module,
&translation.lazy.function_body_inputs,
&*isa,
)
.map_err(|e| e.to_string())?;
emit_module(&mut obj, &translation.module, &compilation, &relocations)?;