Add a Newtype variant to LayoutWrapper

This commit is contained in:
Ayaz Hafiz 2023-05-11 12:12:00 -05:00
parent dd94d6ba16
commit 5274dbcd00
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
22 changed files with 348 additions and 265 deletions

View file

@ -1850,8 +1850,9 @@ impl<
let new_element_layout = higher_order.passed_function.return_layout;
let input_list_layout = LayoutRepr::Builtin(Builtin::List(old_element_layout));
let input_list_in_layout =
self.layout_interner.insert_no_semantic(input_list_layout);
let input_list_in_layout = self
.layout_interner
.insert_direct_no_semantic(input_list_layout);
let caller = self.debug_symbol("caller");
let data = self.debug_symbol("data");
@ -2677,7 +2678,7 @@ impl<
_ => {
let union_in_layout = self
.layout_interner
.insert_no_semantic(LayoutRepr::Union(*union_layout));
.insert_direct_no_semantic(LayoutRepr::Union(*union_layout));
todo!(
"loading from union type: {:?}",
self.layout_interner.dbg(union_in_layout)

View file

@ -384,7 +384,7 @@ trait Backend<'a> {
fn increment_fn_pointer(&mut self, layout: InLayout<'a>) -> Symbol {
let box_layout = self
.interner_mut()
.insert_no_semantic(LayoutRepr::Boxed(layout));
.insert_direct_no_semantic(LayoutRepr::Boxed(layout));
let element_increment = self.debug_symbol("element_increment");
let element_increment_symbol = self.build_indirect_inc(layout);
@ -404,7 +404,7 @@ trait Backend<'a> {
fn decrement_fn_pointer(&mut self, layout: InLayout<'a>) -> Symbol {
let box_layout = self
.interner_mut()
.insert_no_semantic(LayoutRepr::Boxed(layout));
.insert_direct_no_semantic(LayoutRepr::Boxed(layout));
let element_decrement = self.debug_symbol("element_decrement");
let element_decrement_symbol = self.build_indirect_dec(layout);

View file

@ -464,7 +464,7 @@ fn build_exposed_generic_proc<'a, B: Backend<'a>>(backend: &mut B, proc: &Proc<'
let box_layout = backend
.interner_mut()
.insert_no_semantic(roc_mono::layout::LayoutRepr::Boxed(proc.ret_layout));
.insert_direct_no_semantic(roc_mono::layout::LayoutRepr::Boxed(proc.ret_layout));
let mut args = bumpalo::collections::Vec::new_in(arena);
args.extend(proc.args);