Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-tags

This commit is contained in:
Brian Carroll 2021-12-09 09:26:54 +00:00
commit 3f7b3bef87
13 changed files with 559 additions and 131 deletions

View file

@ -13,6 +13,7 @@ use roc_module::symbol::{Interns, ModuleId, Symbol};
use roc_mono::gen_refcount::RefcountProcGenerator;
use roc_mono::ir::{Proc, ProcLayout};
use roc_mono::layout::LayoutIds;
use roc_reporting::internal_error;
use crate::backend::WasmBackend;
use crate::wasm_module::{
@ -106,7 +107,7 @@ pub fn build_module_help<'a>(
// Generate procs from user code
for proc in procs.iter() {
backend.build_proc(proc)?;
backend.build_proc(proc);
}
// Generate IR for refcounting procs
@ -124,7 +125,7 @@ pub fn build_module_help<'a>(
// Generate Wasm for refcounting procs
for proc in refcount_procs.iter() {
backend.build_proc(proc)?;
backend.build_proc(proc);
}
let module = backend.finalize_module();
@ -195,5 +196,5 @@ macro_rules! round_up_to_alignment {
}
pub fn debug_panic<E: std::fmt::Debug>(error: E) {
panic!("{:?}", error);
internal_error!("{:?}", error);
}