Merge branch 'trunk' into builtin-count-graphemes

This commit is contained in:
Jared Ramirez 2020-11-07 18:49:29 -06:00 committed by GitHub
commit 74b09605a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1640 additions and 251 deletions

View file

@ -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::*;