PR: rename to List.concatUtf8

This commit is contained in:
shua 2024-06-08 13:36:20 +02:00
parent 33e8a7a439
commit f7bec802c0
No known key found for this signature in database
GPG key ID: 73387DA37055770F
18 changed files with 81 additions and 89 deletions

View file

@ -608,28 +608,6 @@ pub(crate) fn run_low_level<'a, 'ctx>(
bitcode::STR_WITH_CAPACITY,
)
}
StrConcatUtf8 => {
// Str.concatUtf8: List U8, Str -> List U8
arguments!(list, string);
// XXX: I don't know why I need to call different functions based on the target pointer width, but the test_gen tests panic if I don't
match env.target.ptr_width() {
PtrWidth::Bytes4 => call_str_bitcode_fn(
env,
&[list, string],
&[],
BitcodeReturns::List,
bitcode::STR_CONCAT_UTF8,
),
PtrWidth::Bytes8 => call_list_bitcode_fn(
env,
&[list.into_struct_value()],
&[string],
BitcodeReturns::List,
bitcode::STR_CONCAT_UTF8,
),
}
}
ListLenU64 => {
// List.len : List * -> U64
arguments!(list);
@ -867,6 +845,18 @@ pub(crate) fn run_low_level<'a, 'ctx>(
}
}
}
ListConcatUtf8 => {
// List.concatUtf8: List U8, Str -> List U8
arguments!(list, string);
call_list_bitcode_fn(
env,
&[list.into_struct_value()],
&[string],
BitcodeReturns::List,
bitcode::LIST_CONCAT_UTF8,
)
}
NumToStr => {
// Num.toStr : Num a -> Str
arguments_with_layouts!((num, num_layout));