mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
WIP
This commit is contained in:
parent
165c5d8363
commit
845e30658e
4 changed files with 176 additions and 48 deletions
|
@ -735,12 +735,17 @@ fn decide_to_branching<'a>(
|
|||
match test {
|
||||
Test::IsCtor { tag_id, .. } => {
|
||||
let lhs = Expr::Byte(tag_id);
|
||||
let rhs = path_to_expr(
|
||||
env,
|
||||
cond_symbol,
|
||||
&path,
|
||||
|
||||
let field_layouts = env.arena.alloc([
|
||||
Layout::Builtin(Builtin::Byte(MutMap::default())),
|
||||
);
|
||||
Layout::Builtin(Builtin::Int64),
|
||||
]);
|
||||
let rhs = Expr::AccessAtIndex {
|
||||
index: 0,
|
||||
field_layouts,
|
||||
expr: env.arena.alloc(Expr::Load(cond_symbol)),
|
||||
};
|
||||
// let rhs = Expr::Byte(tag_id);
|
||||
let fake = MutMap::default();
|
||||
|
||||
let cond = env.arena.alloc(Expr::CallByName(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue