diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-10-26 10:38:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-10-26 10:38:50 -0300 |
commit | 6e9b719694bffb8de711f182d405ec37d32ae0b1 (patch) | |
tree | 943fcd9aacd2f7845acfd955e1bb0a9607576fa4 /lopcodes.c | |
parent | 34840301b529686ce8168828b140a478a5d44b53 (diff) | |
download | lua-6e9b719694bffb8de711f182d405ec37d32ae0b1.tar.gz lua-6e9b719694bffb8de711f182d405ec37d32ae0b1.tar.bz2 lua-6e9b719694bffb8de711f182d405ec37d32ae0b1.zip |
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.
Diffstat (limited to 'lopcodes.c')
-rw-r--r-- | lopcodes.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -90,6 +90,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
90 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP1 */ | 90 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP1 */ |
91 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORLOOP */ | 91 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORLOOP */ |
92 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP */ | 92 | ,opmode(0, 0, 0, 1, iABx) /* OP_FORPREP */ |
93 | ,opmode(0, 0, 0, 0, iABx) /* OP_TFORPREP */ | ||
93 | ,opmode(0, 0, 0, 0, iABC) /* OP_TFORCALL */ | 94 | ,opmode(0, 0, 0, 0, iABC) /* OP_TFORCALL */ |
94 | ,opmode(0, 0, 0, 1, iABx) /* OP_TFORLOOP */ | 95 | ,opmode(0, 0, 0, 1, iABx) /* OP_TFORLOOP */ |
95 | ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */ | 96 | ,opmode(0, 1, 0, 0, iABC) /* OP_SETLIST */ |