pr3.1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::vm_fault::VmFault;
|
||||
use prometeu_bytecode::{TRAP_OOB, Value};
|
||||
use prometeu_bytecode::{HeapRef, TRAP_OOB, Value};
|
||||
|
||||
pub struct HostReturn<'a> {
|
||||
stack: &'a mut Vec<Value>,
|
||||
@@ -26,7 +26,8 @@ impl<'a> HostReturn<'a> {
|
||||
self.stack.push(Value::Null);
|
||||
}
|
||||
pub fn push_gate(&mut self, g: usize) {
|
||||
self.stack.push(Value::Handle(g));
|
||||
// Temporary: cast incoming gate to HeapRef index. Real allocator will provide proper handles.
|
||||
self.stack.push(Value::HeapRef(HeapRef(g as u32)));
|
||||
}
|
||||
pub fn push_string(&mut self, s: String) {
|
||||
self.stack.push(Value::String(s));
|
||||
|
||||
Reference in New Issue
Block a user