check for PStr in eager stackful preorder iterator before adding tail of PStrOffset (#2272)
This commit is contained in:
@@ -108,7 +108,7 @@ impl<'a> EagerStackfulPreOrderHeapIter<'a> {
|
|||||||
let var_value = self.heap[h];
|
let var_value = self.heap[h];
|
||||||
self.heap[h].set_mark_bit(self.mark_phase);
|
self.heap[h].set_mark_bit(self.mark_phase);
|
||||||
|
|
||||||
if !(self.heap[h].is_var() && self.heap[h].get_value() as usize == h) {
|
if var_value.get_mark_bit() || !(self.heap[h].is_var() && self.heap[h].get_value() as usize == h) {
|
||||||
self.iter_stack.push(var_value);
|
self.iter_stack.push(var_value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -125,12 +125,13 @@ impl<'a> EagerStackfulPreOrderHeapIter<'a> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let value = self.heap[h+1];
|
|
||||||
|
|
||||||
self.heap[h].set_mark_bit(self.mark_phase);
|
self.heap[h].set_mark_bit(self.mark_phase);
|
||||||
self.heap[h+1].set_mark_bit(self.mark_phase);
|
|
||||||
|
|
||||||
self.iter_stack.push(value);
|
if self.heap[h].get_tag() == HeapCellValueTag::PStr {
|
||||||
|
let value = self.heap[h+1];
|
||||||
|
self.heap[h+1].set_mark_bit(self.mark_phase);
|
||||||
|
self.iter_stack.push(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -578,6 +578,7 @@ impl MachineState {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn variable_set<S: BuildHasher>(
|
pub(crate) fn variable_set<S: BuildHasher>(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|||||||
Reference in New Issue
Block a user