mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
use_roc_value by layoutrepr
This commit is contained in:
parent
5979405b79
commit
07f40baf62
4 changed files with 6 additions and 6 deletions
|
@ -2404,14 +2404,14 @@ pub fn load_roc_value<'a, 'ctx>(
|
||||||
pub fn use_roc_value<'a, 'ctx>(
|
pub fn use_roc_value<'a, 'ctx>(
|
||||||
env: &Env<'a, 'ctx, '_>,
|
env: &Env<'a, 'ctx, '_>,
|
||||||
layout_interner: &STLayoutInterner<'a>,
|
layout_interner: &STLayoutInterner<'a>,
|
||||||
layout: InLayout<'a>,
|
layout: LayoutRepr<'a>,
|
||||||
source: BasicValueEnum<'ctx>,
|
source: BasicValueEnum<'ctx>,
|
||||||
name: &str,
|
name: &str,
|
||||||
) -> BasicValueEnum<'ctx> {
|
) -> BasicValueEnum<'ctx> {
|
||||||
if layout_interner.is_passed_by_reference(layout) {
|
if layout.is_passed_by_reference(layout_interner) {
|
||||||
let alloca = entry_block_alloca_zerofill(
|
let alloca = entry_block_alloca_zerofill(
|
||||||
env,
|
env,
|
||||||
basic_type_from_layout(env, layout_interner, layout_interner.get_repr(layout)),
|
basic_type_from_layout(env, layout_interner, layout),
|
||||||
name,
|
name,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -410,7 +410,7 @@ pub(crate) fn list_replace_unsafe<'a, 'ctx>(
|
||||||
use_roc_value(
|
use_roc_value(
|
||||||
env,
|
env,
|
||||||
layout_interner,
|
layout_interner,
|
||||||
result_layout,
|
layout_interner.get_repr(result_layout),
|
||||||
result.into_struct_value().into(),
|
result.into_struct_value().into(),
|
||||||
"use_replace_result_record",
|
"use_replace_result_record",
|
||||||
)
|
)
|
||||||
|
|
|
@ -1980,7 +1980,7 @@ fn change_with_overflow_dec_to_roc_type<'a, 'ctx>(
|
||||||
use_roc_value(
|
use_roc_value(
|
||||||
env,
|
env,
|
||||||
layout_interner,
|
layout_interner,
|
||||||
return_layout,
|
layout_interner.get_repr(return_layout),
|
||||||
casted,
|
casted,
|
||||||
"use_dec_with_overflow",
|
"use_dec_with_overflow",
|
||||||
)
|
)
|
||||||
|
|
|
@ -127,7 +127,7 @@ fn index_struct_value<'a, 'ctx>(
|
||||||
use_roc_value(
|
use_roc_value(
|
||||||
env,
|
env,
|
||||||
layout_interner,
|
layout_interner,
|
||||||
field_layout,
|
layout_interner.get_repr(field_layout),
|
||||||
field_value,
|
field_value,
|
||||||
"struct_field",
|
"struct_field",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue