This commit is contained in:
2026-03-24 13:40:37 +00:00
parent dc7da102c8
commit 3d4d1dc45d
5 changed files with 17 additions and 57 deletions
@@ -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));