attr_var_init_bindings_b,
);
- machine_st.stack.truncate(machine_st.b);
machine_st.b = machine_st.stack.index_or_frame(b).prelude.b;
+ machine_st.stack.truncate(b);
machine_st.hb = machine_st.heap.h();
machine_st.p += offset;
attr_var_init_bindings_b,
);
- machine_st.stack.truncate(machine_st.b);
machine_st.b = machine_st.stack.index_or_frame(b).prelude.b;
+ machine_st.stack.truncate(b);
machine_st.hb = machine_st.heap.h();
machine_st.p += 1;
pub(crate) trait CutPolicy: Any {
// returns true iff we fail or cut redirected the MachineState's p itself
- fn cut(&mut self, _: &mut MachineState, _: RegType) -> bool;
+ fn cut(&mut self, machine_st: &mut MachineState, r: RegType) -> bool;
}
downcast!(dyn CutPolicy);
(HeapCellValue::Addr(Addr::PStrLocation(..)),
HeapCellValue::Addr(Addr::PStrLocation(..))) =>
continue,
+ (HeapCellValue::Addr(Addr::PStrLocation(..)),
+ HeapCellValue::Addr(Addr::Con(Constant::String(..))))
+ | (HeapCellValue::Addr(Addr::Con(Constant::String(..))),
+ HeapCellValue::Addr(Addr::PStrLocation(..)))
+ if self.flags.double_quotes.is_chars() => {
+ continue;
+ }
(HeapCellValue::Addr(Addr::Lis(_)), HeapCellValue::Addr(Addr::Lis(_))) =>
continue,
(HeapCellValue::Addr(Addr::Con(Constant::EmptyList)),
impl IndexMut<usize> for AndFrame {
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
+ debug_assert!(self.prelude.univ_prelude.is_or_frame == 0);
+
let prelude_offset = prelude_size::<AndFramePrelude>();
let index_offset = (index - 1) * mem::size_of::<Addr>();
#[inline]
fn index(&self, index: usize) -> &Self::Output {
+ debug_assert!(self.prelude.univ_prelude.is_or_frame == 1);
+
let prelude_offset = prelude_size::<OrFramePrelude>();
let index_offset = index * mem::size_of::<Addr>();
impl IndexMut<usize> for OrFrame {
#[inline]
fn index_mut(&mut self, index: usize) -> &mut Self::Output {
+ debug_assert!(self.prelude.univ_prelude.is_or_frame == 1);
+
let prelude_offset = prelude_size::<OrFramePrelude>();
let index_offset = index * mem::size_of::<Addr>();