Fix countGrapheme wiring; Reorganize zig builtins; Streamline how we export zig function

This commit is contained in:
Jared Ramirez 2020-11-06 16:43:32 -06:00
parent f34235e050
commit e112a406a2
11 changed files with 519 additions and 512 deletions

View file

@ -506,12 +506,11 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
// - arguments that we may want to update destructively must be Owned
// - other refcounted arguments are Borrowed
match op {
ListLen | StrIsEmpty => arena.alloc_slice_copy(&[borrowed]),
ListLen | StrIsEmpty | StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]),
ListSet => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
ListSetInPlace => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
ListGetUnsafe => arena.alloc_slice_copy(&[borrowed, irrelevant]),
ListConcat | StrConcat => arena.alloc_slice_copy(&[owned, borrowed]),
StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]),
ListSingle => arena.alloc_slice_copy(&[irrelevant]),
ListRepeat => arena.alloc_slice_copy(&[irrelevant, irrelevant]),