replace SliceDeque with VecDeque
This commit is contained in:
@@ -1151,7 +1151,10 @@ impl<'b, TermMarker: Allocator> CodeGenerator<'b, TermMarker> {
|
||||
if self.settings.is_extensible {
|
||||
let segment_is_indexed = code_segment[0].to_indexing_line().is_some();
|
||||
|
||||
for clause_index_info in self.skeleton.clauses[skel_lower_bound..].iter_mut() {
|
||||
for clause_index_info in self.skeleton.clauses
|
||||
.make_contiguous()[skel_lower_bound..]
|
||||
.iter_mut()
|
||||
{
|
||||
clause_index_info.clause_start +=
|
||||
clause_start_offset + 2 * (segment_is_indexed as usize);
|
||||
clause_index_info.opt_arg_index_key += clause_start_offset + 1;
|
||||
|
||||
27
src/forms.rs
27
src/forms.rs
@@ -15,9 +15,8 @@ use fxhash::FxBuildHasher;
|
||||
use indexmap::{IndexMap, IndexSet};
|
||||
use ordered_float::OrderedFloat;
|
||||
|
||||
use slice_deque::*;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
use std::ops::AddAssign;
|
||||
@@ -820,7 +819,7 @@ pub(crate) struct LocalPredicateSkeleton {
|
||||
pub(crate) is_discontiguous: bool,
|
||||
pub(crate) is_dynamic: bool,
|
||||
pub(crate) is_multifile: bool,
|
||||
pub(crate) clause_clause_locs: SliceDeque<usize>,
|
||||
pub(crate) clause_clause_locs: VecDeque<usize>,
|
||||
pub(crate) clause_assert_margin: usize,
|
||||
pub(crate) retracted_dynamic_clauses: Option<Vec<ClauseIndexInfo>>, // always None if non-dynamic.
|
||||
}
|
||||
@@ -832,7 +831,7 @@ impl LocalPredicateSkeleton {
|
||||
is_discontiguous: false,
|
||||
is_dynamic: false,
|
||||
is_multifile: false,
|
||||
clause_clause_locs: sdeq![],
|
||||
clause_clause_locs: VecDeque::new(),
|
||||
clause_assert_margin: 0,
|
||||
retracted_dynamic_clauses: Some(vec![]),
|
||||
}
|
||||
@@ -873,7 +872,7 @@ impl LocalPredicateSkeleton {
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) struct PredicateSkeleton {
|
||||
pub(crate) core: LocalPredicateSkeleton,
|
||||
pub(crate) clauses: SliceDeque<ClauseIndexInfo>,
|
||||
pub(crate) clauses: VecDeque<ClauseIndexInfo>,
|
||||
}
|
||||
|
||||
impl PredicateSkeleton {
|
||||
@@ -881,7 +880,7 @@ impl PredicateSkeleton {
|
||||
pub(crate) fn new() -> Self {
|
||||
PredicateSkeleton {
|
||||
core: LocalPredicateSkeleton::new(),
|
||||
clauses: sdeq![],
|
||||
clauses: VecDeque::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,18 +896,22 @@ impl PredicateSkeleton {
|
||||
}
|
||||
|
||||
pub(crate) fn target_pos_of_clause_clause_loc(
|
||||
&self,
|
||||
&mut self,
|
||||
clause_clause_loc: usize,
|
||||
) -> Option<usize> {
|
||||
let search_result = self.core.clause_clause_locs[0..self.core.clause_assert_margin]
|
||||
let search_result = self.core.clause_clause_locs
|
||||
.make_contiguous()[0..self.core.clause_assert_margin]
|
||||
.binary_search_by(|loc| clause_clause_loc.cmp(&loc));
|
||||
|
||||
match search_result {
|
||||
Ok(loc) => Some(loc),
|
||||
Err(_) => self.core.clause_clause_locs[self.core.clause_assert_margin..]
|
||||
.binary_search_by(|loc| loc.cmp(&clause_clause_loc))
|
||||
.map(|loc| loc + self.core.clause_assert_margin)
|
||||
.ok(),
|
||||
Err(_) => {
|
||||
self.core.clause_clause_locs
|
||||
.make_contiguous()[self.core.clause_assert_margin..]
|
||||
.binary_search_by(|loc| loc.cmp(&clause_clause_loc))
|
||||
.map(|loc| loc + self.core.clause_assert_margin)
|
||||
.ok()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ use crate::forms::*;
|
||||
use crate::instructions::*;
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use slice_deque::{sdeq, SliceDeque};
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::hash::Hash;
|
||||
@@ -148,15 +147,15 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
index: usize,
|
||||
) {
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(external),
|
||||
IndexedChoiceInstruction::Trust(index)
|
||||
]
|
||||
].into()
|
||||
} else {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(index),
|
||||
IndexedChoiceInstruction::Trust(external)
|
||||
]
|
||||
].into()
|
||||
};
|
||||
|
||||
let indexing_code_len = self.indexing_code.len();
|
||||
@@ -182,9 +181,9 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
index: usize,
|
||||
) {
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![external, index]
|
||||
vec![external, index].into()
|
||||
} else {
|
||||
sdeq![index, external]
|
||||
vec![index, external].into()
|
||||
};
|
||||
|
||||
let indexing_code_len = self.indexing_code.len();
|
||||
@@ -208,11 +207,11 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
IndexingLine::IndexedChoice(ref mut indexed_choice_instrs)
|
||||
if self.append_or_prepend.is_append() =>
|
||||
{
|
||||
uncap_choice_seq_with_trust(indexed_choice_instrs);
|
||||
uncap_choice_seq_with_trust(indexed_choice_instrs.make_contiguous());
|
||||
indexed_choice_instrs.push_back(IndexedChoiceInstruction::Trust(index));
|
||||
}
|
||||
IndexingLine::IndexedChoice(ref mut indexed_choice_instrs) => {
|
||||
uncap_choice_seq_with_try(indexed_choice_instrs);
|
||||
uncap_choice_seq_with_try(indexed_choice_instrs.make_contiguous());
|
||||
indexed_choice_instrs.push_front(IndexedChoiceInstruction::Try(index));
|
||||
}
|
||||
IndexingLine::DynamicIndexedChoice(ref mut indexed_choice_instrs)
|
||||
@@ -430,15 +429,15 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
index: usize,
|
||||
) {
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(external),
|
||||
IndexedChoiceInstruction::Trust(index)
|
||||
]
|
||||
].into()
|
||||
} else {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(index),
|
||||
IndexedChoiceInstruction::Trust(external)
|
||||
]
|
||||
].into()
|
||||
};
|
||||
|
||||
let indexing_code_len = self.indexing_code.len();
|
||||
@@ -464,9 +463,9 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
index: usize,
|
||||
) {
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![external, index]
|
||||
vec![external, index].into()
|
||||
} else {
|
||||
sdeq![index, external]
|
||||
vec![index, external].into()
|
||||
};
|
||||
|
||||
let indexing_code_len = self.indexing_code.len();
|
||||
@@ -570,9 +569,9 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
*l = IndexingCodePtr::Internal(indexing_code_len - self.offset);
|
||||
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![o, index]
|
||||
vec![o, index].into()
|
||||
} else {
|
||||
sdeq![index, o]
|
||||
vec![index, o].into()
|
||||
};
|
||||
|
||||
self.indexing_code
|
||||
@@ -582,15 +581,15 @@ impl<'a> IndexingCodeMergingPtr<'a> {
|
||||
*l = IndexingCodePtr::Internal(indexing_code_len - self.offset);
|
||||
|
||||
let third_level_index = if self.append_or_prepend.is_append() {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(o),
|
||||
IndexedChoiceInstruction::Trust(index)
|
||||
]
|
||||
].into()
|
||||
} else {
|
||||
sdeq![
|
||||
vec![
|
||||
IndexedChoiceInstruction::Try(index),
|
||||
IndexedChoiceInstruction::Trust(o)
|
||||
]
|
||||
].into()
|
||||
};
|
||||
|
||||
self.indexing_code
|
||||
@@ -1178,7 +1177,7 @@ pub(crate) trait Indexer {
|
||||
prelude: &mut VecDeque<IndexingLine>,
|
||||
) -> IndexingCodePtr;
|
||||
|
||||
fn remove_instruction_with_offset(code: &mut SliceDeque<Self::ThirdLevelIndex>, offset: usize);
|
||||
fn remove_instruction_with_offset(code: &mut VecDeque<Self::ThirdLevelIndex>, offset: usize);
|
||||
|
||||
fn var_offset_wrapper(var_offset: usize) -> IndexingCodePtr;
|
||||
}
|
||||
@@ -1281,13 +1280,13 @@ impl Indexer for StaticCodeIndices {
|
||||
|
||||
#[inline]
|
||||
fn remove_instruction_with_offset(
|
||||
code: &mut SliceDeque<IndexedChoiceInstruction>,
|
||||
code: &mut VecDeque<IndexedChoiceInstruction>,
|
||||
offset: usize,
|
||||
) {
|
||||
for (index, line) in code.iter().enumerate() {
|
||||
if offset == line.offset() {
|
||||
code.remove(index);
|
||||
cap_choice_seq(code);
|
||||
cap_choice_seq(code.make_contiguous());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1390,7 +1389,7 @@ impl Indexer for DynamicCodeIndices {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn remove_instruction_with_offset(code: &mut SliceDeque<usize>, offset: usize) {
|
||||
fn remove_instruction_with_offset(code: &mut VecDeque<usize>, offset: usize) {
|
||||
for (index, line) in code.iter().enumerate() {
|
||||
if offset == *line {
|
||||
code.remove(index);
|
||||
|
||||
@@ -12,8 +12,6 @@ use crate::machine::term_stream::*;
|
||||
use crate::machine::*;
|
||||
use crate::parser::ast::*;
|
||||
|
||||
use slice_deque::{sdeq, SliceDeque};
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::mem;
|
||||
@@ -425,8 +423,8 @@ fn delete_from_skeleton(
|
||||
target_pos: usize,
|
||||
retraction_info: &mut RetractionInfo,
|
||||
) -> usize {
|
||||
let clause_index_info = skeleton.clauses.remove(target_pos);
|
||||
let clause_clause_loc = skeleton.core.clause_clause_locs.remove(target_pos);
|
||||
let clause_index_info = skeleton.clauses.remove(target_pos).unwrap();
|
||||
let clause_clause_loc = skeleton.core.clause_clause_locs.remove(target_pos).unwrap();
|
||||
|
||||
if target_pos < skeleton.core.clause_assert_margin {
|
||||
skeleton.core.clause_assert_margin -= 1;
|
||||
@@ -887,7 +885,7 @@ fn prepend_compiled_clause(
|
||||
global_clock_tick: usize,
|
||||
) -> IndexPtr {
|
||||
let clause_loc = code.len();
|
||||
let mut prepend_queue = sdeq![];
|
||||
let mut prepend_queue = VecDeque::new();
|
||||
|
||||
let target_arg_num = skeleton.clauses[0].opt_arg_index_key.arg_num();
|
||||
let head_arg_num = skeleton.clauses[1].opt_arg_index_key.arg_num();
|
||||
@@ -995,7 +993,7 @@ fn prepend_compiled_clause(
|
||||
|
||||
merge_clause_index(
|
||||
target_indexing_line,
|
||||
&mut skeleton.clauses,
|
||||
skeleton.clauses.make_contiguous(),
|
||||
&skeleton.core.retracted_dynamic_clauses,
|
||||
clause_loc + 2, // == skeleton.clauses[0].clause_start
|
||||
AppendOrPrepend::Prepend,
|
||||
@@ -1189,7 +1187,7 @@ fn append_compiled_clause(
|
||||
|
||||
merge_clause_index(
|
||||
target_indexing_line,
|
||||
&mut skeleton.clauses[lower_bound..],
|
||||
&mut skeleton.clauses.make_contiguous()[lower_bound..],
|
||||
&skeleton.core.retracted_dynamic_clauses,
|
||||
clause_loc,
|
||||
AppendOrPrepend::Append,
|
||||
@@ -1406,7 +1404,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
)?;
|
||||
|
||||
if settings.is_extensible {
|
||||
let mut clause_clause_locs = sdeq![];
|
||||
let mut clause_clause_locs = VecDeque::new();
|
||||
|
||||
for clause_index_info in cg.skeleton.clauses.iter_mut() {
|
||||
clause_index_info.clause_start += code_len;
|
||||
@@ -1434,7 +1432,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
skeleton
|
||||
.core
|
||||
.clause_clause_locs
|
||||
.extend_from_slice(&clause_clause_locs[0..]);
|
||||
.extend(&clause_clause_locs.make_contiguous()[0..]);
|
||||
|
||||
self.payload.retraction_info
|
||||
.push_record(RetractionRecord::SkeletonClauseTruncateBack(
|
||||
@@ -1447,7 +1445,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
cg.skeleton
|
||||
.core
|
||||
.clause_clause_locs
|
||||
.extend_from_slice(&clause_clause_locs[0..]);
|
||||
.extend(&clause_clause_locs.make_contiguous()[0..]);
|
||||
|
||||
let skeleton = cg.skeleton;
|
||||
|
||||
@@ -1495,7 +1493,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
&mut self,
|
||||
compilation_target: &CompilationTarget,
|
||||
key: &PredicateKey,
|
||||
clause_clause_locs: SliceDeque<usize>,
|
||||
mut clause_clause_locs: VecDeque<usize>,
|
||||
) {
|
||||
let listing_src_file_name = self.listing_src_file_name();
|
||||
|
||||
@@ -1519,7 +1517,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
|
||||
skeleton
|
||||
.clause_clause_locs
|
||||
.extend_from_slice(&clause_clause_locs[0..]);
|
||||
.extend(&clause_clause_locs.make_contiguous()[0..]);
|
||||
}
|
||||
None => {
|
||||
let mut skeleton = LocalPredicateSkeleton::new();
|
||||
@@ -1972,7 +1970,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
code,
|
||||
later_indexing_loc,
|
||||
0..target_pos - lower_bound,
|
||||
&mut skeleton.clauses[lower_bound..],
|
||||
&mut skeleton.clauses.make_contiguous()[lower_bound..],
|
||||
&skeleton.core.retracted_dynamic_clauses,
|
||||
&mut self.payload.retraction_info,
|
||||
);
|
||||
@@ -1997,7 +1995,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
code,
|
||||
target_indexing_loc,
|
||||
target_pos + 1 - lower_bound..skeleton.clauses.len() - lower_bound,
|
||||
&mut skeleton.clauses[lower_bound..],
|
||||
&mut skeleton.clauses.make_contiguous()[lower_bound..],
|
||||
&skeleton.core.retracted_dynamic_clauses,
|
||||
&mut self.payload.retraction_info,
|
||||
);
|
||||
@@ -2196,15 +2194,17 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
{
|
||||
Some(skeleton) if append_or_prepend.is_append() => {
|
||||
let tail_num = skeleton.core.clause_clause_locs.len() - num_clause_predicates;
|
||||
skeleton.core.clause_clause_locs[tail_num..]
|
||||
skeleton.core.clause_clause_locs.make_contiguous()[tail_num..]
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
}
|
||||
Some(skeleton) => {
|
||||
skeleton.core.clause_clause_locs.make_contiguous()[0..num_clause_predicates]
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
}
|
||||
Some(skeleton) => skeleton.core.clause_clause_locs[0..num_clause_predicates]
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect(),
|
||||
None => {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ use crate::parser::ast::*;
|
||||
use fxhash::FxBuildHasher;
|
||||
use indexmap::IndexSet;
|
||||
use ref_thread_local::RefThreadLocal;
|
||||
use slice_deque::{sdeq, SliceDeque};
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::fs::File;
|
||||
use std::mem;
|
||||
|
||||
@@ -334,12 +334,12 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
&mut self,
|
||||
compilation_target: CompilationTarget,
|
||||
key: PredicateKey,
|
||||
clause_locs: &SliceDeque<usize>,
|
||||
clause_locs: &VecDeque<usize>,
|
||||
) {
|
||||
let result_opt = self
|
||||
.wam_prelude
|
||||
.indices
|
||||
.get_predicate_skeleton(&compilation_target, &key)
|
||||
.get_predicate_skeleton_mut(&compilation_target, &key)
|
||||
.map(|skeleton| {
|
||||
(
|
||||
clause_locs
|
||||
@@ -396,7 +396,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
pub(super) fn retract_local_clause_clauses(
|
||||
&mut self,
|
||||
clause_clause_compilation_target: CompilationTarget,
|
||||
clause_locs: &SliceDeque<usize>,
|
||||
clause_locs: &VecDeque<usize>,
|
||||
) {
|
||||
let key = (atom!("$clause"), 2);
|
||||
let listing_src_file_name = self.listing_src_file_name();
|
||||
@@ -415,7 +415,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
payload_compilation_target,
|
||||
clause_clause_compilation_target,
|
||||
key,
|
||||
mem::replace(&mut skeleton.clause_clause_locs, sdeq![]),
|
||||
mem::replace(&mut skeleton.clause_clause_locs, VecDeque::new()),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ use crate::parser::ast::*;
|
||||
use crate::types::*;
|
||||
|
||||
use indexmap::IndexSet;
|
||||
use slice_deque::{sdeq, SliceDeque};
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
@@ -96,7 +96,7 @@ pub(crate) enum RetractionRecord {
|
||||
CompilationTarget,
|
||||
CompilationTarget,
|
||||
PredicateKey,
|
||||
SliceDeque<usize>,
|
||||
VecDeque<usize>,
|
||||
),
|
||||
RemovedSkeleton(CompilationTarget, PredicateKey, PredicateSkeleton),
|
||||
ReplacedDynamicElseOffset(usize, usize),
|
||||
@@ -900,7 +900,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
key,
|
||||
) {
|
||||
Some(skeleton) => {
|
||||
skeleton.clause_clause_locs.truncate_back(len);
|
||||
skeleton.clause_clause_locs.truncate(len);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
@@ -912,8 +912,8 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
.get_predicate_skeleton_mut(&compilation_target, &key)
|
||||
{
|
||||
Some(skeleton) => {
|
||||
skeleton.clauses.truncate_back(len);
|
||||
skeleton.core.clause_clause_locs.truncate_back(len);
|
||||
skeleton.clauses.truncate(len);
|
||||
skeleton.core.clause_clause_locs.truncate(len);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
|
||||
*key,
|
||||
) {
|
||||
Some(skeleton) if !skeleton.clause_clause_locs.is_empty() => {
|
||||
mem::replace(&mut skeleton.clause_clause_locs, sdeq![])
|
||||
mem::replace(&mut skeleton.clause_clause_locs, VecDeque::new())
|
||||
}
|
||||
_ => return,
|
||||
};
|
||||
@@ -1973,33 +1973,42 @@ impl Machine {
|
||||
let mut clause_clause_target_poses: Vec<_> = loader
|
||||
.wam_prelude
|
||||
.indices
|
||||
.get_predicate_skeleton(&compilation_target, &key)
|
||||
.remove_predicate_skeleton(&compilation_target, &key)
|
||||
.map(|skeleton| {
|
||||
loader
|
||||
let mut clause_clause_skeleton = loader
|
||||
.wam_prelude
|
||||
.indices
|
||||
.get_predicate_skeleton(
|
||||
.remove_predicate_skeleton(
|
||||
&clause_clause_compilation_target,
|
||||
&(atom!("$clause"), 2),
|
||||
)
|
||||
.map(|clause_clause_skeleton| {
|
||||
skeleton
|
||||
.core
|
||||
.clause_clause_locs
|
||||
.iter()
|
||||
.map(|clause_clause_loc| {
|
||||
clause_clause_skeleton
|
||||
.target_pos_of_clause_clause_loc(*clause_clause_loc)
|
||||
.unwrap()
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.unwrap()
|
||||
})
|
||||
.unwrap();
|
||||
).unwrap();
|
||||
|
||||
loader
|
||||
.wam_prelude
|
||||
let result = skeleton.core
|
||||
.clause_clause_locs
|
||||
.iter()
|
||||
.map(|clause_clause_loc| {
|
||||
clause_clause_skeleton
|
||||
.target_pos_of_clause_clause_loc(*clause_clause_loc)
|
||||
.unwrap()
|
||||
})
|
||||
.collect();
|
||||
|
||||
loader.add_extensible_predicate(
|
||||
key,
|
||||
skeleton,
|
||||
compilation_target,
|
||||
);
|
||||
|
||||
loader.add_extensible_predicate(
|
||||
(atom!("$clause"), 2),
|
||||
clause_clause_skeleton,
|
||||
clause_clause_compilation_target,
|
||||
);
|
||||
|
||||
result
|
||||
}).unwrap();
|
||||
|
||||
loader.wam_prelude
|
||||
.indices
|
||||
.remove_predicate_skeleton(&compilation_target, &key);
|
||||
|
||||
@@ -2008,15 +2017,6 @@ impl Machine {
|
||||
|
||||
code_index.set(IndexPtr::Undefined);
|
||||
|
||||
/*
|
||||
loader
|
||||
.wam_prelude
|
||||
.indices
|
||||
.get_predicate_skeleton_mut(&compilation_target, &key)
|
||||
.map(|skeleton| skeleton.reset());
|
||||
|
||||
*/
|
||||
|
||||
loader.payload.compilation_target = clause_clause_compilation_target;
|
||||
|
||||
while let Some(target_pos) = clause_clause_target_poses.pop() {
|
||||
@@ -2076,7 +2076,7 @@ impl Machine {
|
||||
// the global clock is incremented after each retraction.
|
||||
LiveLoadAndMachineState::machine_st(&mut loader.payload).global_clock += 1;
|
||||
|
||||
let target_pos = match loader.wam_prelude.indices.get_predicate_skeleton(
|
||||
let target_pos = match loader.wam_prelude.indices.get_predicate_skeleton_mut(
|
||||
&clause_clause_compilation_target,
|
||||
&(atom!("$clause"), 2),
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user