read from machine stack in stackful pre-order iterator (#1812)

This commit is contained in:
Mark
2023-05-26 15:19:07 -06:00
parent 7bc7f0ad06
commit b656700294
10 changed files with 368 additions and 206 deletions

View File

@@ -3,7 +3,7 @@ use crate::machine::heap::*;
use crate::types::*;
#[cfg(test)]
use crate::heap_iter::FocusedHeapIter;
use crate::heap_iter::{IterStackLoc, FocusedHeapIter, HeapOrStackTag};
use core::marker::PhantomData;
@@ -75,8 +75,8 @@ pub(crate) struct StacklessPreOrderHeapIter<'a, UMP: UnmarkPolicy> {
#[cfg(test)]
impl<'a> FocusedHeapIter for StacklessPreOrderHeapIter<'a, IteratorUMP> {
#[inline]
fn focus(&self) -> usize {
self.current
fn focus(&self) -> IterStackLoc {
IterStackLoc::iterable_loc(self.current, HeapOrStackTag::Heap)
}
}