mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
improve list allocation
This commit is contained in:
parent
b61f5d02b9
commit
45c62dfa3c
2 changed files with 11 additions and 48 deletions
|
@ -56,9 +56,11 @@ pub fn str_split<'a, 'ctx, 'env>(
|
|||
)
|
||||
.into_int_value();
|
||||
|
||||
// a pointer to the elements
|
||||
let ret_list_ptr =
|
||||
allocate_list(env, inplace, &Layout::Builtin(Builtin::Str), segment_count);
|
||||
|
||||
// convert `*mut RocStr` to `*mut i128`
|
||||
let ret_list_ptr_u128s = builder.build_bitcast(
|
||||
ret_list_ptr,
|
||||
ctx.i128_type().ptr_type(AddressSpace::Generic),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue