mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
remove ListSetInPlace
This commit is contained in:
parent
07dea4ee04
commit
059cac3b98
3 changed files with 0 additions and 24 deletions
|
@ -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]);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue