mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
use roc_load_value to move a value to the stack
This commit is contained in:
parent
d669b8c894
commit
baec1c2de3
1 changed files with 3 additions and 3 deletions
|
@ -20,6 +20,7 @@ use roc_module::symbol::Symbol;
|
||||||
use roc_mono::layout::{Builtin, Layout, LayoutIds, UnionLayout};
|
use roc_mono::layout::{Builtin, Layout, LayoutIds, UnionLayout};
|
||||||
use roc_target::TargetInfo;
|
use roc_target::TargetInfo;
|
||||||
|
|
||||||
|
use super::build::load_roc_value;
|
||||||
use super::convert::{argument_type_from_layout, argument_type_from_union_layout};
|
use super::convert::{argument_type_from_layout, argument_type_from_union_layout};
|
||||||
|
|
||||||
/// "Infinite" reference count, for static values
|
/// "Infinite" reference count, for static values
|
||||||
|
@ -1435,9 +1436,8 @@ fn build_rec_union_recursive_decrement<'a, 'ctx, 'env>(
|
||||||
.build_struct_gep(struct_ptr, i as u32, "gep_recursive_pointer")
|
.build_struct_gep(struct_ptr, i as u32, "gep_recursive_pointer")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let field = env
|
let field =
|
||||||
.builder
|
load_roc_value(env, *field_layout, elem_pointer, "decrement_struct_field");
|
||||||
.build_load(elem_pointer, "decrement_struct_field");
|
|
||||||
|
|
||||||
deferred_nonrec.push((field, field_layout));
|
deferred_nonrec.push((field, field_layout));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue