mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Use LayoutCache to avoid recomputing layouts
This commit is contained in:
parent
efa486251e
commit
510ab36f51
6 changed files with 238 additions and 168 deletions
|
@ -218,7 +218,7 @@ pub fn gen(src: &str, target: Triple, opt_level: OptLevel) -> Result<(String, St
|
|||
let expr_type_str = content_to_string(content.clone(), &subs, home, &interns);
|
||||
|
||||
// Compute main_fn_type before moving subs to Env
|
||||
let layout = Layout::from_content(&arena, content, &subs, ptr_bytes).unwrap_or_else(|err| {
|
||||
let layout = Layout::new(&arena, content, &subs, ptr_bytes).unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Code gen error in test: could not convert to layout. Err was {:?} and Subs were {:?}",
|
||||
err, subs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue