switch from pair to record and change name to ListReplaceUnsafe

This commit is contained in:
Brendan Hansknecht 2022-02-24 20:41:26 -08:00
parent 27b47713aa
commit dddf8ff785
8 changed files with 29 additions and 25 deletions

View file

@ -13,7 +13,7 @@ use crate::llvm::build_list::{
self, allocate_list, empty_polymorphic_list, list_all, list_any, list_append, list_concat,
list_contains, list_drop_at, list_find_unsafe, list_get_unsafe, list_join, list_keep_errs,
list_keep_if, list_keep_oks, list_len, list_map, list_map2, list_map3, list_map4,
list_map_with_index, list_prepend, list_range, list_repeat, list_replace, list_reverse,
list_map_with_index, list_prepend, list_range, list_repeat, list_replace_unsafe, list_reverse,
list_set, list_single, list_sort_with, list_sublist, list_swap,
};
use crate::llvm::build_str::{
@ -5653,12 +5653,12 @@ fn run_low_level<'a, 'ctx, 'env>(
wrapper_struct,
)
}
ListReplace => {
ListReplaceUnsafe => {
let list = load_symbol(scope, &args[0]);
let index = load_symbol(scope, &args[1]);
let (element, element_layout) = load_symbol_and_layout(scope, &args[2]);
list_replace(
list_replace_unsafe(
env,
layout_ids,
list,