mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
Cleanups after self-review
- Fix clippy warnings - Improve a comment - Delete commented-out lines in Cargo.toml - Checkin Cargo.lock
This commit is contained in:
parent
3bf94e020c
commit
9ba7076d8e
4 changed files with 358 additions and 337 deletions
|
@ -6,7 +6,7 @@ use parity_wasm::elements::Internal;
|
|||
|
||||
use roc_collections::all::{MutMap, MutSet};
|
||||
use roc_module::symbol::{Interns, Symbol};
|
||||
use roc_mono::ir::{CallType, Expr, Proc, ProcLayout, Stmt};
|
||||
use roc_mono::ir::{Proc, ProcLayout};
|
||||
use roc_mono::layout::LayoutIds;
|
||||
|
||||
use crate::backend::WasmBackend;
|
||||
|
@ -45,18 +45,3 @@ pub fn build_module<'a>(
|
|||
.to_bytes()
|
||||
.map_err(|e| -> String { format!("Error serialising Wasm module {:?}", e) })
|
||||
}
|
||||
|
||||
// TODO: use something like this for very simple inlining
|
||||
// Create a HashMap of inlined Procs, generate each call with different Symbol arguments
|
||||
fn _is_lowlevel_wrapper<'a>(proc: Proc<'a>) -> bool {
|
||||
match proc.body {
|
||||
Stmt::Let(_, expr, _, Stmt::Ret(..)) => match expr {
|
||||
Expr::Call(roc_mono::ir::Call { call_type, .. }) => match call_type {
|
||||
CallType::LowLevel { .. } => true,
|
||||
_ => false,
|
||||
},
|
||||
_ => false,
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue