Implement basic List.drop that satisfies tests

Issues with uniqueness and copying which leaks memory obviously needs to be fixed.
This commit is contained in:
tarjei 2021-05-18 22:59:55 +02:00
parent b7b04344f3
commit f45d89270b
11 changed files with 130 additions and 3 deletions

View file

@ -665,6 +665,7 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
// TODO when we have lists with capacity (if ever)
// List.append should own its first argument
ListAppend => arena.alloc_slice_copy(&[owned, owned]),
ListDrop => arena.alloc_slice_copy(&[owned, irrelevant]),
Eq | NotEq => arena.alloc_slice_copy(&[borrowed, borrowed]),