mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
remove box and unbox expressions
This commit is contained in:
parent
a9813aeae7
commit
d64930c17f
12 changed files with 9 additions and 196 deletions
|
@ -169,11 +169,6 @@ fn specialize_drops_stmt<'a, 'i>(
|
|||
|
||||
alloc_let_with_continuation!(environment)
|
||||
}
|
||||
Expr::ExprBox { symbol: child } => {
|
||||
environment.add_box_child(*binding, *child);
|
||||
|
||||
alloc_let_with_continuation!(environment)
|
||||
}
|
||||
Expr::Array {
|
||||
elems: children, ..
|
||||
} => {
|
||||
|
@ -226,10 +221,6 @@ fn specialize_drops_stmt<'a, 'i>(
|
|||
environment.symbol_tag.insert(*structure, *tag_id);
|
||||
alloc_let_with_continuation!(environment)
|
||||
}
|
||||
Expr::ExprUnbox { symbol } => {
|
||||
environment.add_box_child(*symbol, *binding);
|
||||
alloc_let_with_continuation!(environment)
|
||||
}
|
||||
|
||||
Expr::Reset { .. } => {
|
||||
// TODO allow to inline this to replace it with resetref
|
||||
|
@ -1533,13 +1524,6 @@ impl<'a> DropSpecializationEnvironment<'a> {
|
|||
.push((child, tag, index));
|
||||
}
|
||||
|
||||
fn add_box_child(&mut self, parent: Parent, child: Child) {
|
||||
self.box_children
|
||||
.entry(parent)
|
||||
.or_insert_with(|| Vec::new_in(self.arena))
|
||||
.push(child);
|
||||
}
|
||||
|
||||
fn add_list_child(&mut self, parent: Parent, child: Child, index: u64) {
|
||||
self.list_children
|
||||
.entry(parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue