mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Resolve conflicts with remote
This commit is contained in:
commit
59b30ad20f
14 changed files with 346 additions and 282 deletions
|
@ -1905,8 +1905,8 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
}
|
||||
}
|
||||
}
|
||||
ListAppend => list_append(env, layout_ids, scope, parent, args),
|
||||
ListPush => {
|
||||
ListConcat => list_concat(env, layout_ids, scope, parent, args),
|
||||
ListAppend => {
|
||||
// List.push List elem, elem -> List elem
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
||||
|
@ -2163,14 +2163,14 @@ fn build_int_binop<'a, 'ctx, 'env>(
|
|||
}
|
||||
}
|
||||
|
||||
fn list_append<'a, 'ctx, 'env>(
|
||||
fn list_concat<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
scope: &Scope<'a, 'ctx>,
|
||||
parent: FunctionValue<'ctx>,
|
||||
args: &[(Expr<'a>, Layout<'a>)],
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
// List.append : List elem, List elem -> List elem
|
||||
// List.concat : List elem, List elem -> List elem
|
||||
debug_assert_eq!(args.len(), 2);
|
||||
|
||||
// This implementation is quite long, let me explain what is complicating it. Here are our
|
||||
|
@ -2259,7 +2259,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
}
|
||||
_ => {
|
||||
unreachable!(
|
||||
"Invalid List layout for second input list of List.append: {:?}",
|
||||
"Invalid List layout for second input list of List.concat: {:?}",
|
||||
second_list_layout
|
||||
);
|
||||
}
|
||||
|
@ -2336,7 +2336,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
// FIRST LOOP
|
||||
{
|
||||
let first_loop_bb =
|
||||
ctx.append_basic_block(parent, "first_list_append_loop");
|
||||
ctx.append_basic_block(parent, "first_list_concat_loop");
|
||||
|
||||
builder.build_unconditional_branch(first_loop_bb);
|
||||
builder.position_at_end(first_loop_bb);
|
||||
|
@ -2407,7 +2407,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
// SECOND LOOP
|
||||
{
|
||||
let second_loop_bb =
|
||||
ctx.append_basic_block(parent, "second_list_append_loop");
|
||||
ctx.append_basic_block(parent, "second_list_concat_loop");
|
||||
|
||||
builder.build_unconditional_branch(second_loop_bb);
|
||||
builder.position_at_end(second_loop_bb);
|
||||
|
@ -2533,7 +2533,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
}
|
||||
_ => {
|
||||
unreachable!(
|
||||
"Invalid List layout for second input list of List.append: {:?}",
|
||||
"Invalid List layout for second input list of List.concat: {:?}",
|
||||
second_list_layout
|
||||
);
|
||||
}
|
||||
|
@ -2578,7 +2578,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
}
|
||||
_ => {
|
||||
unreachable!(
|
||||
"Invalid List layout for second input list of List.append: {:?}",
|
||||
"Invalid List layout for second input list of List.concat: {:?}",
|
||||
second_list_layout
|
||||
);
|
||||
}
|
||||
|
@ -2596,7 +2596,7 @@ fn list_append<'a, 'ctx, 'env>(
|
|||
}
|
||||
_ => {
|
||||
unreachable!(
|
||||
"Invalid List layout for first list in List.append : {:?}",
|
||||
"Invalid List layout for first list in List.concat : {:?}",
|
||||
first_list_layout
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue