mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
remove inc functions from list.map*, the closure will inc in necessary
This commit is contained in:
parent
6712824891
commit
94cb4fb8ff
4 changed files with 0 additions and 61 deletions
|
@ -568,14 +568,11 @@ pub(crate) fn list_sort_with<'a, 'ctx>(
|
|||
pub(crate) fn list_map<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
layout_interner: &STLayoutInterner<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
roc_function_call: RocFunctionCall<'ctx>,
|
||||
list: BasicValueEnum<'ctx>,
|
||||
element_layout: InLayout<'a>,
|
||||
return_layout: InLayout<'a>,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let inc_elem = build_inc_wrapper(env, layout_interner, layout_ids, element_layout);
|
||||
|
||||
call_list_bitcode_fn_1(
|
||||
env,
|
||||
list.into_struct_value(),
|
||||
|
@ -587,7 +584,6 @@ pub(crate) fn list_map<'a, 'ctx>(
|
|||
env.alignment_intvalue(layout_interner, return_layout),
|
||||
layout_width(env, layout_interner, element_layout),
|
||||
layout_width(env, layout_interner, return_layout),
|
||||
inc_elem.as_global_value().as_pointer_value().into(),
|
||||
layout_refcounted(env, layout_interner, return_layout),
|
||||
],
|
||||
bitcode::LIST_MAP,
|
||||
|
@ -597,7 +593,6 @@ pub(crate) fn list_map<'a, 'ctx>(
|
|||
pub(crate) fn list_map2<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
layout_interner: &STLayoutInterner<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
roc_function_call: RocFunctionCall<'ctx>,
|
||||
list1: BasicValueEnum<'ctx>,
|
||||
list2: BasicValueEnum<'ctx>,
|
||||
|
@ -605,9 +600,6 @@ pub(crate) fn list_map2<'a, 'ctx>(
|
|||
element2_layout: InLayout<'a>,
|
||||
return_layout: InLayout<'a>,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let inc_a = build_inc_wrapper(env, layout_interner, layout_ids, element1_layout);
|
||||
let inc_b = build_inc_wrapper(env, layout_interner, layout_ids, element2_layout);
|
||||
|
||||
call_list_bitcode_fn(
|
||||
env,
|
||||
&[list1.into_struct_value(), list2.into_struct_value()],
|
||||
|
@ -620,8 +612,6 @@ pub(crate) fn list_map2<'a, 'ctx>(
|
|||
layout_width(env, layout_interner, element1_layout),
|
||||
layout_width(env, layout_interner, element2_layout),
|
||||
layout_width(env, layout_interner, return_layout),
|
||||
inc_a.as_global_value().as_pointer_value().into(),
|
||||
inc_b.as_global_value().as_pointer_value().into(),
|
||||
layout_refcounted(env, layout_interner, return_layout),
|
||||
],
|
||||
BitcodeReturns::List,
|
||||
|
@ -632,7 +622,6 @@ pub(crate) fn list_map2<'a, 'ctx>(
|
|||
pub(crate) fn list_map3<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
layout_interner: &STLayoutInterner<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
roc_function_call: RocFunctionCall<'ctx>,
|
||||
list1: BasicValueEnum<'ctx>,
|
||||
list2: BasicValueEnum<'ctx>,
|
||||
|
@ -642,10 +631,6 @@ pub(crate) fn list_map3<'a, 'ctx>(
|
|||
element3_layout: InLayout<'a>,
|
||||
result_layout: InLayout<'a>,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let inc_a = build_inc_wrapper(env, layout_interner, layout_ids, element1_layout);
|
||||
let inc_b = build_inc_wrapper(env, layout_interner, layout_ids, element2_layout);
|
||||
let inc_c = build_inc_wrapper(env, layout_interner, layout_ids, element3_layout);
|
||||
|
||||
call_list_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
|
@ -663,9 +648,6 @@ pub(crate) fn list_map3<'a, 'ctx>(
|
|||
layout_width(env, layout_interner, element2_layout),
|
||||
layout_width(env, layout_interner, element3_layout),
|
||||
layout_width(env, layout_interner, result_layout),
|
||||
inc_a.as_global_value().as_pointer_value().into(),
|
||||
inc_b.as_global_value().as_pointer_value().into(),
|
||||
inc_c.as_global_value().as_pointer_value().into(),
|
||||
layout_refcounted(env, layout_interner, result_layout),
|
||||
],
|
||||
BitcodeReturns::List,
|
||||
|
@ -676,7 +658,6 @@ pub(crate) fn list_map3<'a, 'ctx>(
|
|||
pub(crate) fn list_map4<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
layout_interner: &STLayoutInterner<'a>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
roc_function_call: RocFunctionCall<'ctx>,
|
||||
list1: BasicValueEnum<'ctx>,
|
||||
list2: BasicValueEnum<'ctx>,
|
||||
|
@ -688,11 +669,6 @@ pub(crate) fn list_map4<'a, 'ctx>(
|
|||
element4_layout: InLayout<'a>,
|
||||
result_layout: InLayout<'a>,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let inc_a = build_inc_wrapper(env, layout_interner, layout_ids, element1_layout);
|
||||
let inc_b = build_inc_wrapper(env, layout_interner, layout_ids, element2_layout);
|
||||
let inc_c = build_inc_wrapper(env, layout_interner, layout_ids, element3_layout);
|
||||
let inc_d = build_inc_wrapper(env, layout_interner, layout_ids, element4_layout);
|
||||
|
||||
call_list_bitcode_fn(
|
||||
env,
|
||||
&[
|
||||
|
@ -712,10 +688,6 @@ pub(crate) fn list_map4<'a, 'ctx>(
|
|||
layout_width(env, layout_interner, element3_layout),
|
||||
layout_width(env, layout_interner, element4_layout),
|
||||
layout_width(env, layout_interner, result_layout),
|
||||
inc_a.as_global_value().as_pointer_value().into(),
|
||||
inc_b.as_global_value().as_pointer_value().into(),
|
||||
inc_c.as_global_value().as_pointer_value().into(),
|
||||
inc_d.as_global_value().as_pointer_value().into(),
|
||||
layout_refcounted(env, layout_interner, result_layout),
|
||||
],
|
||||
BitcodeReturns::List,
|
||||
|
|
|
@ -2842,7 +2842,6 @@ pub(crate) fn run_higher_order_low_level<'a, 'ctx>(
|
|||
list_map(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
list,
|
||||
element_layout,
|
||||
|
@ -2885,7 +2884,6 @@ pub(crate) fn run_higher_order_low_level<'a, 'ctx>(
|
|||
list_map2(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
list1,
|
||||
list2,
|
||||
|
@ -2933,7 +2931,6 @@ pub(crate) fn run_higher_order_low_level<'a, 'ctx>(
|
|||
list_map3(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
list1,
|
||||
list2,
|
||||
|
@ -2991,7 +2988,6 @@ pub(crate) fn run_higher_order_low_level<'a, 'ctx>(
|
|||
list_map4(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_ids,
|
||||
roc_function_call,
|
||||
list1,
|
||||
list2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue