Skip to content

Commit a91d3cf

Browse files
fix: Tierd about the borrow check...
1 parent bcbdd58 commit a91d3cf

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

compiler/src/modules/vm/gc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ impl<'a> VM<'a> {
66
/* Mark all reachable roots then sweep; non-heap Vals are no-op to mark. */
77
pub(crate) fn collect(&mut self, current_slots: &[Val]) {
88
for &v in &self.stack { self.heap.mark(v); }
9-
for sf in &self.pending_sync_frames { sf.for_each_val(&mut |v| heap.mark(v)); }
109
for &v in &self.with_stack { self.heap.mark(v); }
1110
for &v in &self.yields { self.heap.mark(v); }
1211
for &v in &self.event_queue { self.heap.mark(v); }

compiler/src/modules/vm/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ pub(crate) fn for_each_val(obj: &HeapObj, mut f: impl FnMut(Val)) {
315315
HeapObj::Coroutine(_, slots, stack, _, iters, sub_frames, _) => {
316316
for &v in slots { f(v); }
317317
for &v in stack { f(v); }
318-
for fr in iters { fr.for_each_val(f); }
319-
for sf in sub_frames { sf.for_each_val(f); }
318+
for fr in iters { fr.for_each_val(&mut f); }
319+
for sf in sub_frames { sf.for_each_val(&mut f); }
320320
}
321321
HeapObj::Func(_, defaults, captures) => {
322322
for &v in defaults { f(v); }

0 commit comments

Comments
 (0)