Add a couple of builtin functions, and the Vm::call() method
* Builtin functions print and println have been added * If a global lookup fails, the VM will attempt to look up a builtin * Vm::call(fun, args) allows interrupting the current execution state and starting a new function instead. It will return the value left on top of the stack. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -93,6 +93,10 @@ impl NativeFrame {
|
||||
&self.fun_ptr
|
||||
}
|
||||
|
||||
pub fn args(&self) -> &Vec<ObjRef> {
|
||||
&self.args
|
||||
}
|
||||
|
||||
pub fn callee(&self) -> &ObjRef {
|
||||
&self.callee
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user