mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Type fixes
This commit is contained in:
parent
b2d3b52bd5
commit
3e3d3cc7f3
6 changed files with 2 additions and 44 deletions
|
@ -1044,7 +1044,7 @@ pub fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] {
|
|||
PtrCast => arena.alloc_slice_copy(&[owned]),
|
||||
Alloca => arena.alloc_slice_copy(&[owned]),
|
||||
|
||||
PtrClearTagId | PtrCast | RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr
|
||||
PtrClearTagId | RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr
|
||||
| RefCountDecDataPtr | RefCountIsUnique => {
|
||||
unreachable!("Only inserted *after* borrow checking: {:?}", op);
|
||||
}
|
||||
|
|
|
@ -495,21 +495,6 @@ impl<'a, 'r> Ctx<'a, 'r> {
|
|||
}
|
||||
Some(Layout::OPAQUE_PTR)
|
||||
}
|
||||
&Expr::Reuse {
|
||||
symbol,
|
||||
update_tag_id: _,
|
||||
update_mode: _,
|
||||
tag_layout,
|
||||
tag_id: _,
|
||||
arguments: _,
|
||||
} => {
|
||||
let union = self
|
||||
.interner
|
||||
.insert_direct_no_semantic(LayoutRepr::Union(tag_layout));
|
||||
self.check_sym_layout(symbol, union, UseKind::TagReuse);
|
||||
// TODO also check update arguments
|
||||
Some(union)
|
||||
}
|
||||
&Expr::Reset {
|
||||
symbol,
|
||||
update_mode: _,
|
||||
|
|
|
@ -1601,7 +1601,7 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC {
|
|||
PtrCast => RC::NoRc,
|
||||
Alloca => RC::NoRc,
|
||||
|
||||
PtrClearTagId | PtrCast | RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr
|
||||
PtrClearTagId | RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr
|
||||
| RefCountDecDataPtr | RefCountIsUnique => {
|
||||
unreachable!("Only inserted *after* borrow checking: {:?}", lowlevel);
|
||||
}
|
||||
|
|
|
@ -1900,15 +1900,6 @@ pub enum Expr<'a> {
|
|||
lambda_name: LambdaName<'a>,
|
||||
},
|
||||
|
||||
Reuse {
|
||||
symbol: Symbol,
|
||||
update_tag_id: bool,
|
||||
update_mode: UpdateModeId,
|
||||
// normal Tag fields
|
||||
tag_layout: UnionLayout<'a>,
|
||||
tag_id: TagIdIntType,
|
||||
arguments: &'a [Symbol],
|
||||
},
|
||||
Reset {
|
||||
symbol: Symbol,
|
||||
update_mode: UpdateModeId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue