mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
call changes in mono
This commit is contained in:
parent
6bc0cf33a5
commit
0893aa7369
5 changed files with 346 additions and 295 deletions
|
@ -75,17 +75,17 @@ fn insert_jumps<'a>(
|
|||
match stmt {
|
||||
Let(
|
||||
symbol,
|
||||
Expr::FunctionCall {
|
||||
call_type: CallType::ByName(fsym),
|
||||
args,
|
||||
Expr::Call(crate::ir::Call {
|
||||
call_type: CallType::ByName { name: fsym, .. },
|
||||
arguments,
|
||||
..
|
||||
},
|
||||
}),
|
||||
_,
|
||||
Stmt::Ret(rsym),
|
||||
) if needle == *fsym && symbol == rsym => {
|
||||
// replace the call and return with a jump
|
||||
|
||||
let jump = Stmt::Jump(goal_id, args);
|
||||
let jump = Stmt::Jump(goal_id, arguments);
|
||||
|
||||
Some(arena.alloc(jump))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue