1.1 --- a/jitcraft/Opcodes.tbl Tue Jul 17 03:18:32 2012 -0700
1.2 +++ b/jitcraft/Opcodes.tbl Tue Jul 17 03:59:52 2012 -0700
1.3 @@ -156,39 +156,40 @@
1.4 OPDEF(OP_BITAND, 61, "bitand", 1, 2, 1)
1.5 OPDEF(OP_BITOR, 62, "bitor", 1, 2, 1)
1.6 OPDEF(OP_BITXOR, 63, "bitxor", 1, 2, 1)
1.7 +OPDEF(OP_BITNOT, 64, "bitnot", 1, 1, 1)
1.8
1.9 // Saves or restores the position of the LIFO heap to/from a local slot.
1.10 -OPDEF(OP_SAVELIFO, 64, "savelifo", 5, 0, 0)
1.11 -OPDEF(OP_UNWINDLIFO, 65, "unwindlifo", 5, 0, 0)
1.12 +OPDEF(OP_SAVELIFO, 65, "savelifo", 5, 0, 0)
1.13 +OPDEF(OP_UNWINDLIFO, 66, "unwindlifo", 5, 0, 0)
1.14
1.15 // Composes a variable reference to a stack slot or argument.
1.16 -OPDEF(OP_VARREF_LIFO, 66, "varref.lifo", 5, 0, 1)
1.17 -OPDEF(OP_ARGREF_LIFO, 67, "argref.lifo", 5, 0, 1)
1.18 -OPDEF(OP_SLOTREF_LIFO, 68, "slotref.lifo", 1, 1, 1)
1.19 -OPDEF(OP_ARRAYREF_LIFO, 69, "arrayref.lifo",1, 2, 1)
1.20 -OPDEF(OP_GETREF_I, 70, "getref.i", 1, 1, 1)
1.21 -OPDEF(OP_SETREF_I, 71, "setref.i", 1, 2, 1)
1.22 -OPDEF(OP_GETREF_F, 72, "getref.f", 1, 1, 1)
1.23 -OPDEF(OP_SETREF_F, 73, "setref.f", 1, 2, 1)
1.24 +OPDEF(OP_VARREF_LIFO, 67, "varref.lifo", 5, 0, 1)
1.25 +OPDEF(OP_ARGREF_LIFO, 68, "argref.lifo", 5, 0, 1)
1.26 +OPDEF(OP_SLOTREF_LIFO, 69, "slotref.lifo", 1, 1, 1)
1.27 +OPDEF(OP_ARRAYREF_LIFO, 70, "arrayref.lifo",1, 2, 1)
1.28 +OPDEF(OP_GETREF_I, 71, "getref.i", 1, 1, 1)
1.29 +OPDEF(OP_SETREF_I, 72, "setref.i", 1, 2, 1)
1.30 +OPDEF(OP_GETREF_F, 73, "getref.f", 1, 1, 1)
1.31 +OPDEF(OP_SETREF_F, 74, "setref.f", 1, 2, 1)
1.32
1.33 // Pushes an object reference onto the stack.
1.34 -OPDEF(OP_OBJECT, 74, "object", 5, 0, 1)
1.35 +OPDEF(OP_OBJECT, 75, "object", 5, 0, 1)
1.36
1.37 // Performs an array-to-array assignment.
1.38 // Left = pop()
1.39 // Right = pop()
1.40 // copy(Left, Right)
1.41 // push(Left)
1.42 -OPDEF(OP_ARRAYCOPY, 75, "arraycopy", 1, 2, 1)
1.43 +OPDEF(OP_ARRAYCOPY, 76, "arraycopy", 1, 2, 1)
1.44
1.45 // Duplicates the top item on the stack.
1.46 -OPDEF(OP_DUP, 76, "dup", 1, 1, 2)
1.47 +OPDEF(OP_DUP, 77, "dup", 1, 1, 2)
1.48
1.49 // Duplicates the top two items on the stack.
1.50 -OPDEF(OP_DUP2, 77, "dup2", 1, 2, 4)
1.51 +OPDEF(OP_DUP2, 78, "dup2", 1, 2, 4)
1.52
1.53 // Swaps the two items at the top of the stack.
1.54 -OPDEF(OP_SWAP, 78, "swap", 1, 2, 2)
1.55 +OPDEF(OP_SWAP, 79, "swap", 1, 2, 2)
1.56
1.57 // Roll operation is the same as Forth. It steals a value on the stack,
1.58 // shifting all stack values down, and then places the stolen value back at
1.59 @@ -198,14 +199,14 @@
1.60 // sp[-3] = sp[-2]
1.61 // sp[-2] = sp[-1]
1.62 // sp[-1] = p
1.63 -OPDEF(OP_ROLL3, 79, "roll3", 1, 3, 3)
1.64 +OPDEF(OP_ROLL3, 80, "roll3", 1, 3, 3)
1.65
1.66 // Pick operation is the same as Forth. It pushes a copy of a slot at a
1.67 // specific depth.
1.68 //
1.69 // push(sp[-n])
1.70 -OPDEF(OP_PICK2, 80, "pick2", 1, 2, 3)
1.71 -OPDEF(OP_PICK3, 81, "pick3", 1, 3, 4)
1.72 +OPDEF(OP_PICK2, 82, "pick2", 1, 2, 3)
1.73 +OPDEF(OP_PICK3, 83, "pick3", 1, 3, 4)
1.74
1.75 // Calls a native function. During the course of calling a native, arguments
1.76 // on the stack are re-pushed to match the cell-based native calling
1.77 @@ -216,14 +217,14 @@
1.78 //
1.79 // [u8 Opcode] [u32 Index] [u32 ArgCount]
1.80 //
1.81 -OPDEF(OP_CALLNATIVE, 82, "callnative", 9, -1, 1)
1.82 +OPDEF(OP_CALLNATIVE, 84, "callnative", 9, -1, 1)
1.83
1.84 // Returns from a function that does return a value.
1.85 -OPDEF(OP_RETURNVOID, 83, "returnvoid", 1, 0, 0)
1.86 +OPDEF(OP_RETURNVOID, 85, "returnvoid", 1, 0, 0)
1.87
1.88 // Loads the module of the running function.
1.89 -OPDEF(OP_MODULE, 84, "module", 1, 0, 1)
1.90 +OPDEF(OP_MODULE, 86, "module", 1, 0, 1)
1.91
1.92 // Loads a function from a module object. The operand is the slot number
1.93 // in the module.
1.94 -OPDEF(OP_GETMODULE_FN, 85, "getmodule.fn", 5, 1, 1)
1.95 +OPDEF(OP_GETMODULE_FN, 87, "getmodule.fn", 5, 1, 1)