mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Cleanup
This commit is contained in:
parent
fc9f04b716
commit
ed947b773d
10 changed files with 2331 additions and 4951 deletions
|
@ -285,21 +285,6 @@ impl<'a> ParamMap<'a> {
|
|||
.into_bump_slice()
|
||||
}
|
||||
|
||||
fn init_borrow_args_always_owned(
|
||||
arena: &'a Bump,
|
||||
ps: &'a [(InLayout<'a>, Symbol)],
|
||||
) -> &'a [Param<'a>] {
|
||||
Vec::from_iter_in(
|
||||
ps.iter().map(|(layout, symbol)| Param {
|
||||
ownership: Ownership::Owned,
|
||||
layout: *layout,
|
||||
symbol: *symbol,
|
||||
}),
|
||||
arena,
|
||||
)
|
||||
.into_bump_slice()
|
||||
}
|
||||
|
||||
fn visit_proc(
|
||||
&mut self,
|
||||
arena: &'a Bump,
|
||||
|
@ -325,26 +310,6 @@ impl<'a> ParamMap<'a> {
|
|||
self.visit_stmt(arena, interner, proc.name.name(), &proc.body);
|
||||
}
|
||||
|
||||
fn visit_proc_always_owned(
|
||||
&mut self,
|
||||
arena: &'a Bump,
|
||||
interner: &STLayoutInterner<'a>,
|
||||
proc: &Proc<'a>,
|
||||
key: (Symbol, ProcLayout<'a>),
|
||||
) {
|
||||
let index: usize = self.get_param_offset(interner, key.0, key.1).into();
|
||||
|
||||
for (i, param) in Self::init_borrow_args_always_owned(arena, proc.args)
|
||||
.iter()
|
||||
.copied()
|
||||
.enumerate()
|
||||
{
|
||||
self.declarations[index + i] = param;
|
||||
}
|
||||
|
||||
self.visit_stmt(arena, interner, proc.name.name(), &proc.body);
|
||||
}
|
||||
|
||||
fn visit_stmt(
|
||||
&mut self,
|
||||
arena: &'a Bump,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue