Minor refactoring, added OP_GETMETHOD

You can use ':' without invoking. So you can grab a method binding to an object and later call it. Also some GC bugs were fixed.

A new preprocessor macro (VM_DEBUG) has been added. Defining this macro will print each instruction thats being executed in the VM, as
well as print each call.
This commit is contained in:
2021-01-16 15:40:58 -06:00
parent e995bb75fb
commit 2864c7be53
9 changed files with 148 additions and 101 deletions

View File

@@ -29,6 +29,7 @@ typedef enum {
OP_NEWOBJECT,
OP_SETOBJECT,
OP_GETOBJECT,
OP_GETMETHOD,
OP_INVOKE,
OP_ITER,
OP_NEXT,