mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'trunk' into gen-dev/records-base
This commit is contained in:
commit
03bc61cbf8
70 changed files with 2617 additions and 2352 deletions
|
@ -204,6 +204,12 @@ where
|
|||
Symbol::NUM_SUB => {
|
||||
self.build_run_low_level(sym, &LowLevel::NumSub, arguments, layout)
|
||||
}
|
||||
Symbol::NUM_ROUND => self.build_run_low_level(
|
||||
sym,
|
||||
&LowLevel::NumRound,
|
||||
arguments,
|
||||
layout,
|
||||
),
|
||||
Symbol::BOOL_EQ => {
|
||||
self.build_run_low_level(sym, &LowLevel::Eq, arguments, layout)
|
||||
}
|
||||
|
@ -312,7 +318,13 @@ where
|
|||
// Should we panic?
|
||||
x => Err(format!("wrong layout, {:?}, for LowLevel::Eq", x)),
|
||||
},
|
||||
|
||||
LowLevel::NumRound => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_ROUND.to_string(),
|
||||
args,
|
||||
&[Layout::Builtin(Builtin::Float64)],
|
||||
layout,
|
||||
),
|
||||
x => Err(format!("low level, {:?}. is not yet implemented", x)),
|
||||
}
|
||||
}
|
||||
|
@ -516,20 +528,6 @@ where
|
|||
self.scan_ast(following);
|
||||
}
|
||||
|
||||
Stmt::Invoke {
|
||||
symbol,
|
||||
layout: _,
|
||||
call,
|
||||
pass,
|
||||
fail: _,
|
||||
exception_id: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
self.set_last_seen(*symbol, stmt);
|
||||
self.scan_ast_call(call, stmt);
|
||||
self.scan_ast(pass);
|
||||
}
|
||||
|
||||
Stmt::Switch {
|
||||
cond_symbol,
|
||||
branches,
|
||||
|
@ -545,7 +543,6 @@ where
|
|||
Stmt::Ret(sym) => {
|
||||
self.set_last_seen(*sym, stmt);
|
||||
}
|
||||
Stmt::Resume(_exception_id) => {}
|
||||
Stmt::Refcounting(modify, following) => {
|
||||
let sym = modify.get_symbol();
|
||||
|
||||
|
|
|
@ -179,6 +179,12 @@ fn build_object<'a, B: Backend<'a>>(
|
|||
"roc_dealloc".into(),
|
||||
"free".into(),
|
||||
)?;
|
||||
generate_wrapper(
|
||||
&mut backend,
|
||||
&mut output,
|
||||
"roc_panic".into(),
|
||||
"roc_builtins.utils.test_panic".into(),
|
||||
)?;
|
||||
}
|
||||
|
||||
// Setup layout_ids for procedure calls.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue