mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add a Newtype variant to LayoutWrapper
This commit is contained in:
parent
dd94d6ba16
commit
5274dbcd00
22 changed files with 348 additions and 265 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue