Merge branch 'master' into library-use-case

# Conflicts:
#	Cargo.toml
#	src/atom_table.rs
#	src/bin/scryer-prolog.rs
#	src/http.rs
#	src/machine/mock_wam.rs
#	src/machine/mod.rs
#	src/machine/system_calls.rs
This commit is contained in:
Nicolas Luck
2023-09-13 18:13:14 +02:00
68 changed files with 12920 additions and 10310 deletions

View File

@@ -1,5 +1,6 @@
use std::collections::BTreeSet;
use crate::atom_table;
use crate::machine::BREAK_FROM_DISPATCH_LOOP_LOC;
use crate::machine::mock_wam::{CompositeOpDir, Term};
use crate::parser::parser::{Parser, Tokens};
@@ -58,7 +59,7 @@ impl Machine {
pub fn consult_module_string(&mut self, module_name: &str, program: String) {
let stream = Stream::from_owned_string(program, &mut self.machine_st.arena);
self.machine_st.registers[1] = stream_as_cell!(stream);
self.machine_st.registers[2] = atom_as_cell!(self.machine_st.atom_tbl.build_with(module_name));
self.machine_st.registers[2] = atom_as_cell!(&atom_table::AtomTable::build_with(&self.machine_st.atom_tbl, module_name));
self.run_module_predicate(atom!("loader"), (atom!("consult_stream"), 2));
}