Do not require allocating Layouts in arena before interning

This should reduce memory spend, the interner has its own effective
arena anyway
This commit is contained in:
Ayaz Hafiz 2023-01-03 15:43:18 -06:00
parent 4652661a5c
commit ce717dca8b
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
19 changed files with 161 additions and 171 deletions

View file

@ -859,7 +859,7 @@ fn addr_to_ast<'a, M: ReplAppMemory>(
env,
mem,
addr_of_inner,
inner_layout,
&inner_layout,
WhenRecursive::Unreachable,
inner_var,
);
@ -911,7 +911,7 @@ fn list_to_ast<'a, M: ReplAppMemory>(
let arena = env.arena;
let mut output = Vec::with_capacity_in(len, arena);
let elem_layout = *env.layout_cache.get_in(elem_layout);
let elem_layout = env.layout_cache.get_in(elem_layout);
let elem_size = elem_layout.stack_size(&env.layout_cache.interner, env.target_info) as usize;
for index in 0..len {