mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 07:49:17 +03:00
Fix dev backend pointer bug
When using pointers as keys, new ones shouldn't get created. Always reference an existing item.
This commit is contained in:
parent
564aacc1fd
commit
1a98ec290e
@ -104,9 +104,9 @@ where
|
||||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.build_stmt(&stmt)
|
||||
self.build_expr(symbol, &Expr::Call(call.clone()), layout)?;
|
||||
self.free_symbols(stmt);
|
||||
self.build_stmt(pass)
|
||||
}
|
||||
Stmt::Switch {
|
||||
cond_symbol,
|
||||
@ -478,15 +478,15 @@ where
|
||||
|
||||
Stmt::Invoke {
|
||||
symbol,
|
||||
layout,
|
||||
layout: _,
|
||||
call,
|
||||
pass,
|
||||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.scan_ast(&stmt);
|
||||
self.set_last_seen(*symbol, stmt);
|
||||
self.scan_ast_call(call, stmt);
|
||||
self.scan_ast(pass);
|
||||
}
|
||||
|
||||
Stmt::Switch {
|
||||
|
@ -89,7 +89,6 @@ mod gen_num {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn i64_force_stack() {
|
||||
// This claims 33 registers. One more than Arm and RISC-V, and many more than x86-64.
|
||||
assert_evals_to!(
|
||||
|
Loading…
Reference in New Issue
Block a user