From 6c8766fbb5e5759e108af5bf3ea3e2a25437095f Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Mon, 11 Nov 2024 12:12:03 -0600 Subject: [PATCH] Updating TODO: comments --- rust/sword/src/mem.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/rust/sword/src/mem.rs b/rust/sword/src/mem.rs index 55b8f01..3499e24 100644 --- a/rust/sword/src/mem.rs +++ b/rust/sword/src/mem.rs @@ -335,7 +335,6 @@ impl NockStack { (target_point, limit_point, Direction::Decreasing) }, // The alloc previous frame stuff is like doing a normal alloc but start point is prev alloc and limit pointer is prev stack pointer - // TODO: Pretty sure this is wrong // polarity is reversed because we're getting the prev pointer (AllocationType::AllocPreviousFrame, ArenaOrientation::West) => { let start_point = unsafe { *self.prev_alloc_pointer_pointer() as usize }; @@ -711,7 +710,6 @@ impl NockStack { } } - // TODO: raw_alloc_in_previous_frame_west: Add OOM checks here unsafe fn raw_alloc_in_previous_frame_west(&mut self, words: usize) -> AllocResult<*mut u64> { let () = self.alloc_would_oom_(Allocation { orientation: ArenaOrientation::West, alloc_type: AllocationType::AllocPreviousFrame, pc: self.pc }, words)?; // note that the allocation is on the east frame, and thus resembles raw_alloc_east @@ -720,7 +718,6 @@ impl NockStack { Ok(alloc) } - // TODO: raw_alloc_in_previous_frame_east: Add OOM checks here unsafe fn raw_alloc_in_previous_frame_east(&mut self, words: usize) -> AllocResult<*mut u64> { let () = self.alloc_would_oom_(Allocation { orientation: ArenaOrientation::East, alloc_type: AllocationType::AllocPreviousFrame, pc: self.pc }, words)?; // note that the allocation is on the west frame, and thus resembles raw_alloc_west