synchronize offset table growth with the borrowing of offset pointers

This commit is contained in:
Mark Thom
2025-06-20 23:19:32 -07:00
committed by Mark Thom
parent 1332611f83
commit 2844b5a958
8 changed files with 141 additions and 50 deletions

View File

@@ -1228,6 +1228,8 @@ impl<'a, LS: LoadState<'a>> Loader<'a, LS> {
.lookup_mut(offset.into());
if code_idx_ptr.is_undefined() {
drop(code_idx_ptr);
set_code_index::<LS>(
&mut self.payload,
&compilation_target,
@@ -2159,6 +2161,7 @@ impl Machine {
.remove_predicate_skeleton(&compilation_target, &key);
let offset = loader.get_or_insert_code_index(key, compilation_target);
let mut code_idx = loader
.payload
.machine_st
@@ -2168,6 +2171,8 @@ impl Machine {
code_idx.set(IndexPtr::undefined());
drop(code_idx);
loader.payload.compilation_target = clause_clause_compilation_target;
while let Some(target_pos) = clause_clause_target_poses.pop() {