1.1 --- a/jitcraft/Opcodes.tbl Sat Jul 14 21:01:52 2012 -0700
1.2 +++ b/jitcraft/Opcodes.tbl Sun Jul 15 14:40:11 2012 -0700
1.3 @@ -75,11 +75,9 @@
1.4 // void, this acts as a RETURNVOID. Otherwise, it must be unreachable.
1.5 OPDEF(OP_STOP, 19, "stop", 1, 0, 0)
1.6
1.7 -// Call a function with N arguments.
1.8 -//
1.9 -// CALLGLOBAL - followed by an extra immediate, containing the function index
1.10 -// in the code's global.
1.11 -OPDEF(OP_CALLGLOBAL, 20, "callglobal", 5, -1, 1)
1.12 +// Call a function with N arguments. The target function must be the last item
1.13 +// on the stack.
1.14 +OPDEF(OP_CALL, 20, "call", 1, -1, 1)
1.15
1.16 // Similar to GET/LOCAL, except for arguments.
1.17 OPDEF(OP_GETARG, 21, "getarg", 5, 0, 1)
1.18 @@ -199,3 +197,10 @@
1.19
1.20 // Returns from a function that does return a value.
1.21 OPDEF(OP_RETURNVOID, 63, "returnvoid", 1, 0, 0)
1.22 +
1.23 +// Loads the module of the running function.
1.24 +OPDEF(OP_MODULE, 64, "module", 1, 0, 1)
1.25 +
1.26 +// Loads a function from a module object. The operand is the slot number
1.27 +// in the module.
1.28 +OPDEF(OP_GETMODULE_FN, 65, "getmodule.fn", 5, 1, 1)