]> Repositorios git - scryer-prolog.git/commitdiff
use Addr::StackCell(0,0) to indicate non-live local variables
authorMark Thom <[email protected]>
Fri, 13 Dec 2019 03:34:50 +0000 (20:34 -0700)
committerMark Thom <[email protected]>
Fri, 13 Dec 2019 03:34:50 +0000 (20:34 -0700)
src/prolog/machine/stack.rs

index 17ca25ef63c32e2339281db2109d20266b657245..2de3582db473ab7cdd37a115c4501071fa2b9215 100644 (file)
@@ -242,7 +242,7 @@ impl Stack {
 
             for idx in 0 .. num_cells {
                 let offset = prelude_size::<AndFramePrelude>() + idx * mem::size_of::<Addr>();
-                ptr::write((self.top as usize + offset) as *mut Addr, Addr::HeapCell(0));
+                ptr::write((self.top as usize + offset) as *mut Addr, Addr::StackCell(0,0));
             }
 
             let and_frame = &mut *(self.top as *mut AndFrame);
@@ -264,7 +264,7 @@ impl Stack {
 
             for idx in 0 .. num_cells {
                 let offset = prelude_size::<OrFramePrelude>() + idx * mem::size_of::<Addr>();
-                ptr::write((self.top as usize + offset) as *mut Addr, Addr::HeapCell(0));
+                ptr::write((self.top as usize + offset) as *mut Addr, Addr::StackCell(0,0));
             }
 
             let or_frame = &mut *(self.top as *mut OrFrame);