mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-30 16:47:25 +00:00
Split ListLen into ListLenU64 and ListLenUsize
The usize one gets used internally for things like pattern matches. This is both more efficient (means they don't have to do unnecessary casts) and also less error-prone due to e.g. comparing length to capacity, which is usize.
This commit is contained in:
parent
a15cc0589c
commit
ada83561e5
17 changed files with 88 additions and 48 deletions
|
@ -1121,7 +1121,7 @@ fn lowlevel_spec<'a>(
|
|||
// just dream up a unit value
|
||||
builder.add_make_tuple(block, &[])
|
||||
}
|
||||
ListLen => {
|
||||
ListLenUsize | ListLenU64 => {
|
||||
// TODO should this touch the heap cell?
|
||||
// just dream up a unit value
|
||||
builder.add_make_tuple(block, &[])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue