From: Mark Thom Date: Sun, 8 Dec 2019 18:43:22 +0000 (-0700) Subject: remove zeroing out from Stack::truncate X-Git-Tag: v0.8.118~33 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=923c9d4ad8d84f3a10676143120761d8257f4bd0;p=scryer-prolog.git remove zeroing out from Stack::truncate --- 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 };