From 923c9d4ad8d84f3a10676143120761d8257f4bd0 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Sun, 8 Dec 2019 11:43:22 -0700 Subject: [PATCH] remove zeroing out from Stack::truncate --- src/prolog/machine/stack.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/prolog/machine/stack.rs b/src/prolog/machine/stack.rs index 12fce174..17ca25ef 100644 --- a/src/prolog/machine/stack.rs +++ b/src/prolog/machine/stack.rs @@ -17,10 +17,6 @@ const fn prelude_size() -> usize { (size & !(align - 1)) + align } -/* The Stack is dropped manually at the discretion of the WAM, despite - having no Drop implementation. That's because it needs to know whether - the top frame is an AND frame or an OR frame. The WAM can - tell it. */ pub struct Stack { size: usize, base: *const u8, @@ -350,7 +346,6 @@ impl Stack { let size_of_frame = AndFrame::size_of(frame.prelude.univ_prelude.num_cells); ptr::drop_in_place(frame_ptr); - ptr::write(frame_ptr, mem::zeroed::()); b + size_of_frame } else { @@ -361,7 +356,6 @@ impl Stack { let size_of_frame = OrFrame::size_of(frame.prelude.univ_prelude.num_cells); ptr::drop_in_place(frame_ptr); - ptr::write(frame_ptr, mem::zeroed::()); b + size_of_frame }; -- 2.54.0