diff --git a/lang/bytecode.c b/lang/bytecode.c index 624b6dd..a1d2401 100644 --- a/lang/bytecode.c +++ b/lang/bytecode.c @@ -22,7 +22,8 @@ OP_DEPTH_CHECK = 0x09, }; -void bytecode_run(VmState state, const unsigned char *bytecode) { +void bytecode_run(VmState state, Object obj, const unsigned char *bytecode) { + (void)obj; const unsigned char *pos_code = &bytecode[0]; unsigned char op = OP_RET; while ((op = *pos_code++) != OP_RET) { diff --git a/lang/bytecode.h b/lang/bytecode.h index 170e0b7..f921472 100644 --- a/lang/bytecode.h +++ b/lang/bytecode.h @@ -7,6 +7,6 @@ #include "types.h" // Runs bytecode -void bytecode_run(VmState state, const unsigned char *bytecode); +void bytecode_run(VmState state, Object obj, const unsigned char *bytecode); #endif diff --git a/lang/func.c b/lang/func.c index 5711f34..1a02d7b 100644 --- a/lang/func.c +++ b/lang/func.c @@ -29,8 +29,7 @@ static void func_cleanup(Object obj) { (void)obj; } static void func_call(VmState state, Object obj, void *priv) { - (void)obj; - bytecode_run(state, (const unsigned char *)priv); + bytecode_run(state, obj, (const unsigned char *)priv); } static struct object_call calls[] = {