Merge branch 'stack-type-safety'

* stack-type-safety:
  Fix tests
  Initial stack typing
This commit is contained in:
2019-05-29 15:41:13 +02:00
9 changed files with 135 additions and 77 deletions

View File

@@ -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;
@@ -118,7 +119,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 {