More uniformity in code generation for 'for' loops
Added new instruction 'OP_TFORPREP' to prepare a generic for loop. Currently it is equivalent to a jump (but with a format 'iABx', similar to other for-loop preparing instructions), but soon it will be the place to create upvalues for closing loop states.
This commit is contained in:
@@ -90,6 +90,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
|
||||
,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP1 */
|
||||
,opmode(0, 0, 0, 1, iABx) /* OP_FORLOOP */
|
||||
,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP */
|
||||
,opmode(0, 0, 0, 0, iABx) /* OP_TFORPREP */
|
||||
,opmode(0, 0, 0, 0, iABC) /* OP_TFORCALL */
|
||||
,opmode(0, 0, 0, 1, iABx) /* OP_TFORLOOP */
|
||||
,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */
|
||||
|
||||
Reference in New Issue
Block a user