gather initialization goals and call them once load succeeds (#792)
This commit is contained in:
@@ -1789,22 +1789,6 @@ impl Machine {
|
||||
|
||||
self.machine_st.fail = true;
|
||||
}
|
||||
|
||||
pub(crate)
|
||||
fn compile_pending_predicates(&mut self) {
|
||||
let (mut loader, evacuable_h) = self.loader_from_heap_evacuable(temp_v!(1));
|
||||
|
||||
let compile_pending_predicates = || {
|
||||
if !loader.predicates.is_empty() {
|
||||
loader.compile_and_submit()?;
|
||||
}
|
||||
|
||||
LiveTermStream::evacuate(loader)
|
||||
};
|
||||
|
||||
let result = compile_pending_predicates();
|
||||
self.restore_load_state_payload(result, evacuable_h);
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Loader<'a, LiveTermStream> {
|
||||
|
||||
@@ -524,7 +524,6 @@ pub enum REPLCodePtr {
|
||||
MultifileProperty,
|
||||
DiscontiguousProperty,
|
||||
DynamicProperty,
|
||||
CompilePendingPredicates,
|
||||
AbolishClause,
|
||||
Asserta,
|
||||
Assertz,
|
||||
|
||||
@@ -491,9 +491,6 @@ impl Machine {
|
||||
REPLCodePtr::DynamicProperty => {
|
||||
self.dynamic_property();
|
||||
}
|
||||
REPLCodePtr::CompilePendingPredicates => {
|
||||
self.compile_pending_predicates();
|
||||
}
|
||||
REPLCodePtr::Assertz => {
|
||||
self.compile_assert(AppendOrPrepend::Append);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user