mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-09 21:36:18 +00:00
Merge remote-tracking branch 'origin/main' into str-unicode
This commit is contained in:
commit
2970fc4384
78 changed files with 2747 additions and 2467 deletions
|
@ -1518,6 +1518,15 @@ trait Backend<'a> {
|
|||
let elem_layout = list_element_layout!(self.interner(), *ret_layout);
|
||||
self.build_list_with_capacity(sym, args[0], arg_layouts[0], elem_layout, ret_layout)
|
||||
}
|
||||
LowLevel::ListClone => {
|
||||
debug_assert_eq!(
|
||||
1,
|
||||
args.len(),
|
||||
"ListClone: expected to have exactly one argument"
|
||||
);
|
||||
let elem_layout = list_element_layout!(self.interner(), *ret_layout);
|
||||
self.build_list_clone(*sym, args[0], elem_layout, *ret_layout)
|
||||
}
|
||||
LowLevel::ListReserve => {
|
||||
debug_assert_eq!(
|
||||
2,
|
||||
|
@ -2369,6 +2378,14 @@ trait Backend<'a> {
|
|||
fn build_indirect_inc(&mut self, layout: InLayout<'a>) -> Symbol;
|
||||
fn build_indirect_dec(&mut self, layout: InLayout<'a>) -> Symbol;
|
||||
|
||||
fn build_list_clone(
|
||||
&mut self,
|
||||
dst: Symbol,
|
||||
input_list: Symbol,
|
||||
elem_layout: InLayout<'a>,
|
||||
ret_layout: InLayout<'a>,
|
||||
);
|
||||
|
||||
/// build_list_with_capacity creates and returns a list with the given capacity.
|
||||
fn build_list_with_capacity(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue