Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
bksaiki committed Oct 13, 2024
1 parent 9c5110c commit 744eb5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/continuation.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,13 @@ obj continuation_restore(obj cc, obj k) {
// `tl` is `k` so just return it
return tl;
} else {
// found a common ancestor, reinstate `k` up to that point
// we can assume that `tl` is immutable since `k`
// must be captured by `call/cc` (and variants)
// found a common tail, reinstate `k` up to that point
// we can assume that `tl` is immutable since `k` must be
// captured by `call/cc` (and variants)
if (!Mcontinuation_immutablep(tl))
minim_error1("continuation_restore", "must be immutable", tl);

// walk back to the ancestor and track the frames
// must be at least one
// walk back to the common tail and track the frames (must be >=1)
re = Mcons(continuation_mutable(k), Mnull);
for (k = Mcontinuation_prev(k); k != tl; k = Mcontinuation_prev(k)) {
re = Mcons(continuation_mutable(k), re);
Expand Down

0 comments on commit 744eb5c

Please sign in to comment.