Skip to content

Commit

Permalink
Have List.withCapacity lowlevel use u64 over usize
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfeldman committed Feb 1, 2024
1 parent aabd954 commit 0b42a90
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/compiler/builtins/bitcode/src/list.zig
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ pub fn listMap4(
}

pub fn listWithCapacity(
capacity: usize,
capacity: u64,
alignment: u32,
element_width: usize,
) callconv(.C) RocList {
Expand Down
28 changes: 12 additions & 16 deletions crates/compiler/gen_llvm/src/llvm/expect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,22 +978,18 @@ fn build_clone_builtin<'a, 'ctx>(
cursors.extra_offset
}

Builtin::Str => {
//

call_str_bitcode_fn(
env,
&[value],
&[
ptr.into(),
cursors.offset.into(),
cursors.extra_offset.into(),
],
crate::llvm::bitcode::BitcodeReturns::Basic,
bitcode::STR_CLONE_TO,
)
.into_int_value()
}
Builtin::Str => call_str_bitcode_fn(
env,
&[value],
&[
ptr.into(),
cursors.offset.into(),
cursors.extra_offset.into(),
],
crate::llvm::bitcode::BitcodeReturns::Basic,
bitcode::STR_CLONE_TO,
)
.into_int_value(),
Builtin::List(elem) => {
let bd = env.builder;

Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/gen_wasm/src/low_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ impl<'a> LowLevelCall<'a> {

// Zig arguments Wasm types
// (return pointer) i32
// capacity: usize i32
// capacity: u64 i64
// alignment: u32 i32
// element_width: usize i32

Expand Down

0 comments on commit 0b42a90

Please sign in to comment.