mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Revert "Remove obsolete ListLenUsize"
This reverts commit ad1bca4ac9c40d336522f944df60d61a814435dd.
This commit is contained in:
parent
87d4760356
commit
739565e836
16 changed files with 64 additions and 29 deletions
|
@ -607,7 +607,7 @@ pub(crate) fn run_low_level<'a, 'ctx>(
|
|||
bitcode::STR_WITH_CAPACITY,
|
||||
)
|
||||
}
|
||||
ListLen => {
|
||||
ListLenU64 => {
|
||||
// List.len : List * -> U64
|
||||
arguments!(list);
|
||||
|
||||
|
@ -618,6 +618,12 @@ pub(crate) fn run_low_level<'a, 'ctx>(
|
|||
.new_build_int_cast(len_usize, env.context.i64_type(), "usize_to_u64")
|
||||
.into()
|
||||
}
|
||||
ListLenUsize => {
|
||||
// List.lenUsize : List * -> usize # used internally, not exposed
|
||||
arguments!(list);
|
||||
|
||||
list_len_usize(env.builder, list.into_struct_value()).into()
|
||||
}
|
||||
ListGetCapacity => {
|
||||
// List.capacity: List a -> U64
|
||||
arguments!(list);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue