Merge pull request #3342 from Skgland/pdl-pairs

ensure pdl is pushed/popped in pairs and reuse tabu_list allocation by moving it from a local variable into the machine state
This commit is contained in:
Mark Thom
2026-05-25 15:10:02 -06:00
committed by GitHub
4 changed files with 36 additions and 34 deletions

View File

@@ -16,7 +16,9 @@ use crate::parser::ast::*;
use crate::read::TermWriteResult;
use crate::types::*;
use fxhash::FxBuildHasher;
use indexmap::IndexMap;
use indexmap::IndexSet;
use std::convert::TryFrom;
use std::fmt;
@@ -115,7 +117,8 @@ impl OccursCheckImpl for StoError {
pub struct MachineState {
pub atom_tbl: Arc<AtomTable>,
pub arena: Arena,
pub(super) pdl: Vec<HeapCellValue>,
pub(super) pdl: Vec<(HeapCellValue, HeapCellValue)>,
pub(super) unify_tabu_list: IndexSet<(HeapCellValue, HeapCellValue), FxBuildHasher>,
pub(super) s: HeapPtr,
pub(super) s_offset: usize,
pub(super) p: usize,