Initial stack typing
This commit is contained in:
@@ -14,6 +14,7 @@ use Result;
|
||||
use heap::Heap;
|
||||
#[cfg(feature = "bonus:network")]
|
||||
use netstack::NetStack;
|
||||
use std::convert::TryInto;
|
||||
|
||||
pub const MAGIC_HEADER: u32 = 0x1DEA_DFAD;
|
||||
const ANTI_BS_SIZE: usize = 0xFF;
|
||||
@@ -119,7 +120,7 @@ impl Machine {
|
||||
}
|
||||
|
||||
pub fn get_tos(&mut self) -> Result<i32> {
|
||||
self.cur_stack().top()
|
||||
self.cur_stack().top()?.try_into()
|
||||
}
|
||||
|
||||
pub fn cur_frame(&mut self) -> &mut Frame {
|
||||
|
||||
Reference in New Issue
Block a user