mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
initial version of rc optimization
This commit is contained in:
parent
65faf45a95
commit
936bf459eb
13 changed files with 986 additions and 128 deletions
|
@ -395,21 +395,22 @@ where
|
|||
..
|
||||
} => {
|
||||
self.set_last_seen(*cond_symbol, stmt);
|
||||
for (_, branch) in *branches {
|
||||
for (_, _, branch) in *branches {
|
||||
self.scan_ast(branch);
|
||||
}
|
||||
self.scan_ast(default_branch);
|
||||
self.scan_ast(default_branch.1);
|
||||
}
|
||||
Stmt::Ret(sym) => {
|
||||
self.set_last_seen(*sym, stmt);
|
||||
}
|
||||
Stmt::Rethrow => {}
|
||||
Stmt::Inc(sym, _inc, following) => {
|
||||
self.set_last_seen(*sym, stmt);
|
||||
Stmt::Refcounting(modify, following) => {
|
||||
let sym = modify.get_symbol();
|
||||
|
||||
self.set_last_seen(sym, stmt);
|
||||
self.scan_ast(following);
|
||||
}
|
||||
Stmt::Dec(sym, following) => {
|
||||
self.set_last_seen(*sym, stmt);
|
||||
Stmt::Info(_, following) => {
|
||||
self.scan_ast(following);
|
||||
}
|
||||
Stmt::Join {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue