dereference clause_clause value, reserve more parser space (#2579)

This commit is contained in:
Mark Thom
2025-07-07 21:59:50 -07:00
committed by Mark Thom
parent 79be0c0625
commit c0cd371056
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2462,7 +2462,7 @@ impl<'a> Loader<'a, LiveLoadAndMachineState<'a>> {
} }
let machine_st = LiveLoadAndMachineState::machine_st(&mut self.payload); let machine_st = LiveLoadAndMachineState::machine_st(&mut self.payload);
let value = machine_st.store(MachineState::deref(&machine_st, machine_st[term_reg])); let value = machine_st.store(MachineState::deref(machine_st, machine_st[term_reg]));
self.add_clause_clause_if_dynamic(value)?; self.add_clause_clause_if_dynamic(value)?;
+2 -2
View File
@@ -1287,9 +1287,9 @@ impl<'a, R: CharRead> LexerParser<'a, R> {
}; };
// the parser uses conditional indirection in many places so // the parser uses conditional indirection in many places so
// the reserved size should be at least 3 * term_byte_size // the reserved size should be at least 4 * term_byte_size
// so all cells are accounted for. // so all cells are accounted for.
let writer = match self.machine_st.heap.reserve(cell_index!(3 * term_byte_size)) { let writer = match self.machine_st.heap.reserve(cell_index!(4 * term_byte_size)) {
Ok(term) => term, Ok(term) => term,
Err(_err_loc) => { Err(_err_loc) => {
return Err(ParserError::ResourceError(self.loc_to_err_src())); return Err(ParserError::ResourceError(self.loc_to_err_src()));