Add Str.toScalars builtin

This commit is contained in:
Richard Feldman 2022-07-01 22:34:17 -04:00
parent b1fe76adbf
commit acb7cf99e1
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
11 changed files with 73 additions and 3 deletions

View file

@ -896,7 +896,9 @@ 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 | StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]),
ListLen | StrIsEmpty | StrToScalars | StrCountGraphemes => {
arena.alloc_slice_copy(&[borrowed])
}
ListWithCapacity => arena.alloc_slice_copy(&[irrelevant]),
ListReplaceUnsafe => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
ListGetUnsafe => arena.alloc_slice_copy(&[borrowed, irrelevant]),