mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
chore: list remove unused vars
This commit is contained in:
parent
60f017cbd5
commit
fb12715aba
2 changed files with 28 additions and 30 deletions
|
@ -361,25 +361,33 @@ pub fn list_set<'a, 'ctx, 'env>(
|
|||
env.context.i8_type().ptr_type(AddressSpace::Generic),
|
||||
);
|
||||
|
||||
let symbol = match update_mode {
|
||||
UpdateMode::InPlace => bitcode::LIST_SET_IN_PLACE,
|
||||
UpdateMode::Immutable => bitcode::LIST_SET,
|
||||
let new_bytes = match update_mode {
|
||||
UpdateMode::InPlace => call_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
bytes.into(),
|
||||
index.into(),
|
||||
pass_element_as_opaque(env, element),
|
||||
layout_width(env, element_layout),
|
||||
dec_element_fn.as_global_value().as_pointer_value().into(),
|
||||
],
|
||||
bitcode::LIST_SET_IN_PLACE,
|
||||
),
|
||||
UpdateMode::Immutable => call_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
bytes.into(),
|
||||
length.into(),
|
||||
env.alignment_intvalue(&element_layout),
|
||||
index.into(),
|
||||
pass_element_as_opaque(env, element),
|
||||
layout_width(env, element_layout),
|
||||
dec_element_fn.as_global_value().as_pointer_value().into(),
|
||||
],
|
||||
bitcode::LIST_SET,
|
||||
),
|
||||
};
|
||||
|
||||
let new_bytes = call_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
bytes.into(),
|
||||
length.into(),
|
||||
env.alignment_intvalue(&element_layout),
|
||||
index.into(),
|
||||
pass_element_as_opaque(env, element),
|
||||
layout_width(env, element_layout),
|
||||
dec_element_fn.as_global_value().as_pointer_value().into(),
|
||||
],
|
||||
&symbol,
|
||||
);
|
||||
|
||||
store_list(env, new_bytes.into_pointer_value(), length)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue