* VM is able to handle basic runtime errors although there is no way to
catch this in executing code currently
* If a function is called with the wrong number of arguments (arity) it
will invoke a runtime error.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Methods are wrappers created with an owner and a function, which
passes the owner as the first argument when the function is called.
* Fix a small bug in the VM where the pc was being set at the wrong
time
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* 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>