mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Add Expr::ErasedLoad
This commit is contained in:
parent
2c838aa5c2
commit
283b9d53d6
11 changed files with 92 additions and 17 deletions
|
@ -17,8 +17,8 @@ use roc_module::low_level::LowLevel;
|
|||
use roc_module::symbol::{IdentIds, ModuleId, Symbol};
|
||||
|
||||
use crate::ir::{
|
||||
BranchInfo, Call, CallType, Expr, JoinPointId, ListLiteralElement, Literal, ModifyRc, Proc,
|
||||
ProcLayout, Stmt, UpdateModeId,
|
||||
BranchInfo, Call, CallType, ErasedField, Expr, JoinPointId, ListLiteralElement, Literal,
|
||||
ModifyRc, Proc, ProcLayout, Stmt, UpdateModeId,
|
||||
};
|
||||
use crate::layout::{
|
||||
Builtin, InLayout, Layout, LayoutInterner, LayoutRepr, STLayoutInterner, UnionLayout,
|
||||
|
@ -233,6 +233,16 @@ fn specialize_drops_stmt<'a, 'i>(
|
|||
environment.add_struct_child(*binding, *value, 0);
|
||||
}
|
||||
}
|
||||
ErasedLoad { symbol, field } => {
|
||||
match field {
|
||||
ErasedField::Value => {
|
||||
environment.add_struct_child(*symbol, *binding, 0);
|
||||
}
|
||||
ErasedField::Callee => {
|
||||
// nothing to own
|
||||
}
|
||||
}
|
||||
}
|
||||
Reset { .. } | Expr::ResetRef { .. } => { /* do nothing */ }
|
||||
RuntimeErrorFunction(_)
|
||||
| FunctionPointer { .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue