mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Update some docs and names
This commit is contained in:
parent
0b42a902ab
commit
6a6c25d32d
3 changed files with 11 additions and 11 deletions
|
@ -250,7 +250,7 @@ pub(crate) fn list_prepend<'a, 'ctx>(
|
|||
)
|
||||
}
|
||||
|
||||
/// List.swap : List elem, U64,U64 -> List elem
|
||||
/// List.swap : List elem, U64, U64 -> List elem
|
||||
pub(crate) fn list_swap<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
layout_interner: &STLayoutInterner<'a>,
|
||||
|
@ -425,8 +425,8 @@ fn bounds_check_comparison<'ctx>(
|
|||
builder.new_build_int_compare(IntPredicate::ULT, elem_index, len, "bounds_check")
|
||||
}
|
||||
|
||||
/// List.len : List * -> usize (return value will be cast to usize in user-facing API)
|
||||
pub(crate) fn list_len<'ctx>(
|
||||
/// List.len : List * -> usize (return value will be cast to U64 in user-facing API)
|
||||
pub(crate) fn list_len_usize<'ctx>(
|
||||
builder: &Builder<'ctx>,
|
||||
wrapper_struct: StructValue<'ctx>,
|
||||
) -> IntValue<'ctx> {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::llvm::build::{get_tag_id, tag_pointer_clear_tag_id, Env, FAST_CALL_CONV};
|
||||
use crate::llvm::build_list::{list_len, load_list_ptr};
|
||||
use crate::llvm::build_list::{list_len_usize, load_list_ptr};
|
||||
use crate::llvm::build_str::str_equal;
|
||||
use crate::llvm::convert::basic_type_from_layout;
|
||||
use bumpalo::collections::Vec;
|
||||
|
@ -510,8 +510,8 @@ fn build_list_eq_help<'a, 'ctx>(
|
|||
|
||||
// first, check whether the length is equal
|
||||
|
||||
let len1 = list_len(env.builder, list1);
|
||||
let len2 = list_len(env.builder, list2);
|
||||
let len1 = list_len_usize(env.builder, list1);
|
||||
let len2 = list_len_usize(env.builder, list2);
|
||||
|
||||
let length_equal: IntValue =
|
||||
env.builder
|
||||
|
|
|
@ -34,10 +34,10 @@ use crate::llvm::{
|
|||
BuilderExt, FuncBorrowSpec, RocReturn,
|
||||
},
|
||||
build_list::{
|
||||
layout_width, list_append_unsafe, list_concat, list_drop_at, list_get_unsafe, list_len,
|
||||
list_map, list_map2, list_map3, list_map4, list_prepend, list_release_excess_capacity,
|
||||
list_replace_unsafe, list_reserve, list_sort_with, list_sublist, list_swap,
|
||||
list_symbol_to_c_abi, list_with_capacity, pass_update_mode,
|
||||
layout_width, list_append_unsafe, list_concat, list_drop_at, list_get_unsafe,
|
||||
list_len_usize, list_map, list_map2, list_map3, list_map4, list_prepend,
|
||||
list_release_excess_capacity, list_replace_unsafe, list_reserve, list_sort_with,
|
||||
list_sublist, list_swap, list_symbol_to_c_abi, list_with_capacity, pass_update_mode,
|
||||
},
|
||||
compare::{generic_eq, generic_neq},
|
||||
convert::{
|
||||
|
@ -621,7 +621,7 @@ pub(crate) fn run_low_level<'a, 'ctx>(
|
|||
// List.len : List * -> U64
|
||||
arguments!(list);
|
||||
|
||||
let len_usize = list_len(env.builder, list.into_struct_value());
|
||||
let len_usize = list_len_usize(env.builder, list.into_struct_value());
|
||||
|
||||
// List.len returns U64, although length is stored as usize
|
||||
env.builder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue