Revert "Remove obsolete ListLenUsize"

This reverts commit ad1bca4ac9c40d336522f944df60d61a814435dd.
This commit is contained in:
Richard Feldman 2024-02-16 20:47:50 -05:00
parent 87d4760356
commit 739565e836
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
16 changed files with 64 additions and 29 deletions

View file

@ -260,13 +260,14 @@ impl<'a> LowLevelCall<'a> {
StrWithCapacity => self.load_args_and_call_zig(backend, bitcode::STR_WITH_CAPACITY),
// List
ListLen => {
ListLenU64 => {
self.load_list_len_usize(backend);
// Length is stored as 32 bits in memory on wasm32,
// but List.len always returns U64
backend.code_builder.i64_extend_u_i32();
}
ListLenUsize => self.load_list_len_usize(backend),
ListGetCapacity => self.load_args_and_call_zig(backend, bitcode::LIST_CAPACITY),