mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
cleanup join points
This commit is contained in:
parent
b53a53adbd
commit
72cc0e4f38
3 changed files with 42 additions and 54 deletions
|
@ -950,15 +950,16 @@ trait Backend<'a> {
|
|||
parameters,
|
||||
body: continuation,
|
||||
remainder,
|
||||
id,
|
||||
id: JoinPointId(sym),
|
||||
..
|
||||
} => {
|
||||
join_map.insert(*id, parameters);
|
||||
self.set_last_seen(*sym, stmt);
|
||||
join_map.insert(JoinPointId(*sym), parameters);
|
||||
for param in *parameters {
|
||||
self.set_last_seen(param.symbol, stmt);
|
||||
}
|
||||
self.scan_ast(continuation);
|
||||
self.scan_ast(remainder);
|
||||
self.scan_ast(continuation);
|
||||
}
|
||||
Stmt::Jump(JoinPointId(sym), symbols) => {
|
||||
if let Some(parameters) = join_map.get(&JoinPointId(*sym)) {
|
||||
|
@ -967,7 +968,6 @@ trait Backend<'a> {
|
|||
self.set_last_seen(param.symbol, stmt);
|
||||
}
|
||||
}
|
||||
self.set_last_seen(*sym, stmt);
|
||||
for sym in *symbols {
|
||||
self.set_last_seen(*sym, stmt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue