]> Repositorios git - scryer-prolog.git/commitdiff
unmark dereferenced cells in term_variables/2 (#1412)
authorMark Thom <[email protected]>
Sat, 9 Apr 2022 18:15:46 +0000 (12:15 -0600)
committerMark Thom <[email protected]>
Sat, 9 Apr 2022 18:15:46 +0000 (12:15 -0600)
src/machine/machine_state_impl.rs
src/machine/system_calls.rs

index 2686aef4b6706811b5ef30beff7373b897d0a648..751b88bfc0531b5b76ecd34dbd7b1cab28ca45e9 100644 (file)
@@ -2056,8 +2056,10 @@ impl MachineState {
 
         while let Some(value) = iter.next() {
             if value.get_forwarding_bit() {
-                let value = unmark_cell_bits!(value);
-                let value = heap_bound_store(iter.heap, heap_bound_deref(iter.heap, value));
+                let value = unmark_cell_bits!(heap_bound_store(
+                    iter.heap,
+                    heap_bound_deref(iter.heap, value),
+                ));
 
                 if value.is_compound() {
                     return true;
index 6a572b8f491fb119d98d29a45ae53dfd5e51d475..d9ff4e32aeca79aff7e1733750e2935389ce0210 100644 (file)
@@ -4911,10 +4911,10 @@ impl Machine {
                 let value = unmark_cell_bits!(value);
 
                 if value.is_var() {
-                    let value = heap_bound_store(
+                    let value = unmark_cell_bits!(heap_bound_store(
                         iter.heap,
                         heap_bound_deref(iter.heap, value)
-                    );
+                    ));
 
                     if value.is_var() {
                         seen_set.insert(value);