mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-16 00:35:01 +00:00
argument_type_from_layout takes layoutrepr
This commit is contained in:
parent
ee25735731
commit
7ab044d79f
5 changed files with 45 additions and 29 deletions
|
@ -280,7 +280,11 @@ fn modify_refcount_struct<'a, 'ctx>(
|
|||
let function = match env.module.get_function(fn_name.as_str()) {
|
||||
Some(function_value) => function_value,
|
||||
None => {
|
||||
let arg_type = argument_type_from_layout(env, layout_interner, struct_layout);
|
||||
let arg_type = argument_type_from_layout(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_interner.get_repr(struct_layout),
|
||||
);
|
||||
let function_value = build_header(env, arg_type, mode, &fn_name);
|
||||
|
||||
modify_refcount_struct_help(
|
||||
|
@ -620,7 +624,11 @@ fn modify_refcount_list<'a, 'ctx>(
|
|||
let function = match env.module.get_function(fn_name.as_str()) {
|
||||
Some(function_value) => function_value,
|
||||
None => {
|
||||
let basic_type = argument_type_from_layout(env, layout_interner, list_layout);
|
||||
let basic_type = argument_type_from_layout(
|
||||
env,
|
||||
layout_interner,
|
||||
layout_interner.get_repr(list_layout),
|
||||
);
|
||||
let function_value = build_header(env, basic_type, mode, &fn_name);
|
||||
|
||||
modify_refcount_list_help(
|
||||
|
@ -764,7 +772,8 @@ fn modify_refcount_str<'a, 'ctx>(
|
|||
let function = match env.module.get_function(fn_name.as_str()) {
|
||||
Some(function_value) => function_value,
|
||||
None => {
|
||||
let basic_type = argument_type_from_layout(env, layout_interner, layout);
|
||||
let basic_type =
|
||||
argument_type_from_layout(env, layout_interner, layout_interner.get_repr(layout));
|
||||
let function_value = build_header(env, basic_type, mode, &fn_name);
|
||||
|
||||
modify_refcount_str_help(env, layout_interner, mode, layout, function_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue