mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
don't clone Layout
This commit is contained in:
parent
fa013e7d01
commit
55cb780249
18 changed files with 250 additions and 360 deletions
|
@ -454,7 +454,7 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
mode,
|
||||
&WhenRecursive::Loop(variant.clone()),
|
||||
&WhenRecursive::Loop(*variant),
|
||||
tags,
|
||||
value.into_pointer_value(),
|
||||
true,
|
||||
|
@ -470,7 +470,7 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
mode,
|
||||
&WhenRecursive::Loop(variant.clone()),
|
||||
&WhenRecursive::Loop(*variant),
|
||||
&*env.arena.alloc([other_fields]),
|
||||
value.into_pointer_value(),
|
||||
true,
|
||||
|
@ -484,7 +484,7 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
mode,
|
||||
&WhenRecursive::Loop(variant.clone()),
|
||||
&WhenRecursive::Loop(*variant),
|
||||
&*env.arena.alloc([*fields]),
|
||||
value.into_pointer_value(),
|
||||
true,
|
||||
|
@ -497,7 +497,7 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
env,
|
||||
layout_ids,
|
||||
mode,
|
||||
&WhenRecursive::Loop(variant.clone()),
|
||||
&WhenRecursive::Loop(*variant),
|
||||
tags,
|
||||
value.into_pointer_value(),
|
||||
false,
|
||||
|
@ -549,7 +549,7 @@ fn modify_refcount_layout_help<'a, 'ctx, 'env>(
|
|||
unreachable!("recursion pointers should never be hashed directly")
|
||||
}
|
||||
WhenRecursive::Loop(union_layout) => {
|
||||
let layout = Layout::Union(union_layout.clone());
|
||||
let layout = Layout::Union(*union_layout);
|
||||
|
||||
let bt = basic_type_from_layout(env.arena, env.context, &layout, env.ptr_bytes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue