mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-13 15:26:24 +00:00
Drop unused target_info from layout
This commit is contained in:
parent
87ec602b1e
commit
76dcbee25f
4 changed files with 31 additions and 104 deletions
|
@ -3120,8 +3120,7 @@ fn specialize_host_specializations<'a>(
|
|||
let symbol = env.unique_symbol();
|
||||
let lambda_name = LambdaName::no_niche(symbol);
|
||||
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena, env.target_info);
|
||||
let mut layout_env = layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
let lambda_set = env.subs.get_lambda_set(var);
|
||||
let raw_function_layout =
|
||||
RawFunctionLayout::from_var(&mut layout_env, lambda_set.ambient_function)
|
||||
|
@ -4542,12 +4541,8 @@ pub fn with_hole<'a>(
|
|||
tuple_var, elems, ..
|
||||
} => {
|
||||
let sorted_elems_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_tuple_elems(&mut layout_env, tuple_var)
|
||||
};
|
||||
let sorted_elems = match sorted_elems_result {
|
||||
|
@ -4577,12 +4572,8 @@ pub fn with_hole<'a>(
|
|||
..
|
||||
} => {
|
||||
let sorted_fields_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_record_fields(&mut layout_env, record_var)
|
||||
};
|
||||
let sorted_fields = match sorted_fields_result {
|
||||
|
@ -4916,12 +4907,8 @@ pub fn with_hole<'a>(
|
|||
..
|
||||
} => {
|
||||
let sorted_fields_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_record_fields(&mut layout_env, record_var)
|
||||
};
|
||||
let sorted_fields = match sorted_fields_result {
|
||||
|
@ -5029,12 +5016,8 @@ pub fn with_hole<'a>(
|
|||
..
|
||||
} => {
|
||||
let sorted_elems_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_tuple_elems(&mut layout_env, tuple_var)
|
||||
};
|
||||
let sorted_elems = match sorted_elems_result {
|
||||
|
@ -5142,12 +5125,8 @@ pub fn with_hole<'a>(
|
|||
// This has the benefit that we don't need to do anything special for reference
|
||||
// counting
|
||||
let sorted_fields_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_record_fields(&mut layout_env, record_var)
|
||||
};
|
||||
|
||||
|
@ -6368,8 +6347,7 @@ fn convert_tag_union<'a>(
|
|||
) -> Stmt<'a> {
|
||||
use crate::layout::UnionVariant::*;
|
||||
let res_variant = {
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena, env.target_info);
|
||||
let mut layout_env = layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
crate::layout::union_sorted_tags(&mut layout_env, variant_var)
|
||||
};
|
||||
let variant = match res_variant {
|
||||
|
@ -8046,12 +8024,8 @@ fn can_reuse_symbol<'a>(
|
|||
..
|
||||
} => {
|
||||
let sorted_fields_result = {
|
||||
let mut layout_env = layout::Env::from_components(
|
||||
layout_cache,
|
||||
env.subs,
|
||||
env.arena,
|
||||
env.target_info,
|
||||
);
|
||||
let mut layout_env =
|
||||
layout::Env::from_components(layout_cache, env.subs, env.arena);
|
||||
layout::sort_record_fields(&mut layout_env, *record_var)
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue