diff options
| author | Quentin Carbonneaux <[email protected]> | 2023-03-12 22:32:57 +0100 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2023-03-13 10:51:41 +0100 |
| commit | f51aba22e0650032815ef791acb492220e3da7a4 (patch) | |
| tree | b3ba21657e3d68b97d1f9dd9895095ca2f6b2bec /mem.c | |
| parent | 7410f90629d56d75c1410724626e6abad8418b23 (diff) | |
refresh stale Tmp.link before use
During coalescing, the resizing/
reordering of the sl[] array
invalidates the indices stored
in the 'visit' field of temps;
we need to reset it before we
can use it again.
Diffstat (limited to 'mem.c')
| -rw-r--r-- | mem.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -406,6 +406,11 @@ coalesce(Fn *fn) /* substitute fused slots */ for (s=sl; s<&sl[nsl]; s++) { t = &fn->tmp[s->t]; + /* the visit link is stale, + * reset it before the slot() + * calls below + */ + t->visit = s-sl; assert(t->ndef == 1 && t->def); if (s->s == s) continue; |
