mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Merge branch 'trunk' into builtin-count-graphemes
This commit is contained in:
commit
74b09605a7
35 changed files with 1640 additions and 251 deletions
|
@ -374,6 +374,15 @@ impl<'a> BorrowInfState<'a> {
|
|||
self.own_args_using_bools(args, ps);
|
||||
}
|
||||
|
||||
ForeignCall { arguments, .. } => {
|
||||
// very unsure what demand ForeignCall should place upon its arguments
|
||||
self.own_var(z);
|
||||
|
||||
let ps = foreign_borrow_signature(self.arena, arguments.len());
|
||||
|
||||
self.own_args_using_bools(arguments, ps);
|
||||
}
|
||||
|
||||
Literal(_) | FunctionPointer(_, _) | RuntimeErrorFunction(_) => {}
|
||||
}
|
||||
}
|
||||
|
@ -492,6 +501,11 @@ impl<'a> BorrowInfState<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn foreign_borrow_signature(arena: &Bump, arity: usize) -> &[bool] {
|
||||
let all = bumpalo::vec![in arena; false; arity];
|
||||
all.into_bump_slice()
|
||||
}
|
||||
|
||||
pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
|
||||
use LowLevel::*;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue