#Need suggestions on how to solve borrowing issue

4 messages · Page 1 of 1 (latest)

spare onyx
#

My 'Vm' struct looks like this

pub struct Vm {
    debugger: Debugger,
    source_map: Rc<RefCell<Vec<Span>>>,
    stack: Vec<Literal>,
    frames: Vec<CallFrame>,
    globals: HashMap<String, Literal>,
    ip: usize,
    options: Options,
}
#

The error occurs in the run functions

#

I was looking into other implementations and people were using Arena allocators and stored the all the Callframes on the heap with other stuff.