mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
expose support for multi-increment
This commit is contained in:
parent
de7b06e411
commit
353e161f77
2 changed files with 41 additions and 8 deletions
|
@ -426,6 +426,17 @@ pub fn increment_refcount_layout<'a, 'ctx, 'env>(
|
|||
layout: &Layout<'a>,
|
||||
) {
|
||||
let amount = env.ptr_int().const_int(inc_amount, false);
|
||||
increment_n_refcount_layout(env, parent, layout_ids, amount, value, layout);
|
||||
}
|
||||
|
||||
pub fn increment_n_refcount_layout<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
amount: IntValue<'ctx>,
|
||||
value: BasicValueEnum<'ctx>,
|
||||
layout: &Layout<'a>,
|
||||
) {
|
||||
modify_refcount_layout(
|
||||
env,
|
||||
parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue