remove ListSetInPlace

This commit is contained in:
Folkert 2021-06-22 20:34:59 +02:00
parent 07dea4ee04
commit 059cac3b98
3 changed files with 0 additions and 24 deletions

View file

@ -4648,27 +4648,6 @@ fn run_low_level<'a, 'ctx, 'env>(
wrapper_struct, wrapper_struct,
) )
} }
ListSetInPlace => {
let (list, list_layout) = load_symbol_and_layout(scope, &args[0]);
let (index, _) = load_symbol_and_layout(scope, &args[1]);
let (element, _) = load_symbol_and_layout(scope, &args[2]);
match list_layout {
Layout::Builtin(Builtin::EmptyList) => {
// no elements, so nothing to remove
empty_list(env)
}
Layout::Builtin(Builtin::List(element_layout)) => list_set(
env,
layout_ids,
list,
index.into_int_value(),
element,
element_layout,
),
_ => unreachable!("invalid dict layout"),
}
}
ListSet => { ListSet => {
let (list, list_layout) = load_symbol_and_layout(scope, &args[0]); let (list, list_layout) = load_symbol_and_layout(scope, &args[0]);
let (index, _) = load_symbol_and_layout(scope, &args[1]); let (index, _) = load_symbol_and_layout(scope, &args[1]);

View file

@ -18,7 +18,6 @@ pub enum LowLevel {
ListLen, ListLen,
ListGetUnsafe, ListGetUnsafe,
ListSet, ListSet,
ListSetInPlace,
ListSingle, ListSingle,
ListRepeat, ListRepeat,
ListReverse, ListReverse,
@ -125,7 +124,6 @@ impl LowLevel {
| ListLen | ListLen
| ListGetUnsafe | ListGetUnsafe
| ListSet | ListSet
| ListSetInPlace
| ListDrop | ListDrop
| ListSingle | ListSingle
| ListRepeat | ListRepeat

View file

@ -760,7 +760,6 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[bool] {
match op { match op {
ListLen | StrIsEmpty | StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]), ListLen | StrIsEmpty | StrCountGraphemes => arena.alloc_slice_copy(&[borrowed]),
ListSet => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]), ListSet => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
ListSetInPlace => arena.alloc_slice_copy(&[owned, irrelevant, irrelevant]),
ListGetUnsafe => arena.alloc_slice_copy(&[borrowed, irrelevant]), ListGetUnsafe => arena.alloc_slice_copy(&[borrowed, irrelevant]),
ListConcat => arena.alloc_slice_copy(&[owned, owned]), ListConcat => arena.alloc_slice_copy(&[owned, owned]),
StrConcat => arena.alloc_slice_copy(&[owned, borrowed]), StrConcat => arena.alloc_slice_copy(&[owned, borrowed]),