feat(jit): fib!

This commit is contained in:
2025-05-19 19:29:25 +08:00
parent 6d26716412
commit 9e172bf013
10 changed files with 363 additions and 166 deletions

View File

@@ -45,8 +45,8 @@ impl<T, const CAP: usize> Stack<T, CAP> {
}
pub fn pop(&mut self) -> T {
let item = self.items.get_mut(self.top - 1).unwrap();
self.top -= 1;
let item = self.items.get_mut(self.top).unwrap();
// SAFETY: `item` at `self.top` was previously written and is initialized.
// We replace it with `MaybeUninit::uninit()` and then `assume_init`