remove zig implementation of keepIf/keepErrs/keepOks

This commit is contained in:
Folkert 2022-07-02 13:55:48 +02:00
parent addb27164e
commit e29a89d33c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
13 changed files with 21 additions and 721 deletions

View file

@ -552,13 +552,7 @@ impl<'a> BorrowInfState<'a> {
};
match op {
ListMap { xs }
| ListKeepIf { xs }
| ListKeepOks { xs }
| ListKeepErrs { xs }
| ListAny { xs }
| ListAll { xs }
| ListFindUnsafe { xs } => {
ListMap { xs } | ListAny { xs } | ListAll { xs } | ListFindUnsafe { xs } => {
// own the list if the function wants to own the element
if !function_ps[0].borrow {
self.own_var(*xs);
@ -913,9 +907,6 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
ListMap2 => arena.alloc_slice_copy(&[owned, owned, function, closure_data]),
ListMap3 => arena.alloc_slice_copy(&[owned, owned, owned, function, closure_data]),
ListMap4 => arena.alloc_slice_copy(&[owned, owned, owned, owned, function, closure_data]),
ListKeepIf | ListKeepOks | ListKeepErrs => {
arena.alloc_slice_copy(&[owned, function, closure_data])
}
ListWalk | ListWalkUntil | ListWalkBackwards => {
arena.alloc_slice_copy(&[owned, owned, function, closure_data])
}