remove pstr_vec

This commit is contained in:
Mark Thom
2024-12-06 21:47:36 -08:00
committed by Mark Thom
parent 3c85ef2724
commit ae4d12a123
40 changed files with 2262 additions and 1891 deletions

View File

@@ -1,4 +1,3 @@
use std::cmp::Ordering;
use std::collections::BTreeMap;
use crate::atom_table;
@@ -442,7 +441,7 @@ impl Iterator for QueryState<'_> {
if let Err(resource_err_loc) = machine
.machine_st
.heap
.append(machine.machine_st.ball.stub.splice(..))
.append(&machine.machine_st.ball.stub)
{
return Some(Err(Term::from_heapcell(
machine,
@@ -530,10 +529,10 @@ impl Machine {
/// Consults a module into the [`Machine`] from a string.
pub fn consult_module_string(&mut self, module_name: &str, program: impl Into<String>) {
let stream = Stream::from_owned_string(program.into(), &mut self.machine_st.arena);
self.machine_st.registers[1] = stream.into();
self.machine_st.registers[2] = atom_as_cell!(&atom_table::AtomTable::build_with(
self.machine_st.registers[1] = stream_as_cell!(stream);
self.machine_st.registers[2] = atom_as_cell!(atom_table::AtomTable::build_with(
&self.machine_st.atom_tbl,
module_name
module_name,
));
self.run_module_predicate(atom!("loader"), (atom!("consult_stream"), 2));