mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
fix merge conflicts
This commit is contained in:
parent
5724f82667
commit
4d0216cf09
2 changed files with 5 additions and 6 deletions
|
@ -1019,7 +1019,7 @@ pub fn listConcat(list_a: RocList, list_b: RocList, alignment: u32, element_widt
|
|||
pub fn listSet(
|
||||
bytes: ?[*]u8,
|
||||
length: usize,
|
||||
alignment: usize,
|
||||
alignment: u32,
|
||||
index: usize,
|
||||
element: Opaque,
|
||||
element_width: usize,
|
||||
|
@ -1053,7 +1053,7 @@ pub fn listSet(
|
|||
inline fn listSetClone(
|
||||
old_bytes: ?[*]u8,
|
||||
length: usize,
|
||||
alignment: usize,
|
||||
alignment: u32,
|
||||
index: usize,
|
||||
element: Opaque,
|
||||
element_width: usize,
|
||||
|
@ -1063,7 +1063,7 @@ inline fn listSetClone(
|
|||
|
||||
const data_bytes = length * element_width;
|
||||
|
||||
var new_bytes = utils.allocateWithRefcount(alignment, data_bytes);
|
||||
var new_bytes = utils.allocateWithRefcount(data_bytes, alignment);
|
||||
|
||||
@memcpy(new_bytes, old_bytes orelse undefined, data_bytes);
|
||||
|
||||
|
@ -1077,7 +1077,7 @@ inline fn listSetClone(
|
|||
@memcpy(element_at_index, element orelse undefined, element_width);
|
||||
|
||||
// consume RC token of original
|
||||
utils.decref(alignment, old_bytes, data_bytes);
|
||||
utils.decref(old_bytes, data_bytes, alignment);
|
||||
|
||||
//return list;
|
||||
return new_bytes;
|
||||
|
|
|
@ -352,10 +352,9 @@ pub fn list_set<'a, 'ctx, 'env>(
|
|||
let new_bytes = call_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
// pass_list_as_i128(env, list),
|
||||
bytes.into(),
|
||||
length.into(),
|
||||
alignment_intvalue(env, &element_layout),
|
||||
env.alignment_intvalue(&element_layout),
|
||||
index.into(),
|
||||
pass_element_as_opaque(env, element),
|
||||
layout_width(env, element_layout),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue