Use blocktype_params_results in lieu of blocktype_to_types.

Remove read_info.rs entirely.

Add `to_compile_error` that converts a WasmResult into a Result<_, CompileError>, use it with `wptype_to_type`. This is a candidate for being moved into shared code.

Many functions had to change to deal with propagating CompileError.
This commit is contained in:
Nick Lewycky
2020-06-02 15:19:50 -07:00
parent 04f2db1b82
commit 7bdd387474
7 changed files with 202 additions and 176 deletions

View File

@ -49,7 +49,7 @@ impl Compiler for LLVMCompiler {
fn compile_module<'data, 'module>(
&self,
module: &'module ModuleInfo,
_module_translation: &ModuleTranslationState,
module_translation: &ModuleTranslationState,
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
memory_plans: PrimaryMap<MemoryIndex, MemoryPlan>,
table_plans: PrimaryMap<TableIndex, TablePlan>,
@ -76,6 +76,7 @@ impl Compiler for LLVMCompiler {
//let mut data = data.lock().unwrap();
func_translator.translate(
module,
module_translation,
i,
input,
self.config(),