diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-05 20:39:12 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-05 20:39:12 -0200 |
| commit | 38b0e6128da7796300e2e8621e87835e16539f5b (patch) | |
| tree | 5b0a7ad2b0fb850d47f0566fd06b8cda013bbc8b /lopcodes.h | |
| parent | addbe8c8b0587fd316f33fb013034e035f9217ed (diff) | |
| download | lua-38b0e6128da7796300e2e8621e87835e16539f5b.tar.gz lua-38b0e6128da7796300e2e8621e87835e16539f5b.tar.bz2 lua-38b0e6128da7796300e2e8621e87835e16539f5b.zip | |
simpler implementation for `for' loops
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -169,10 +169,7 @@ OP_TESTF,/* A B if not (R(B)) then R(A) := R(B) else pc++ */ | |||
| 169 | OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1))*/ | 169 | OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1))*/ |
| 170 | OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see (3)) */ | 170 | OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see (3)) */ |
| 171 | 171 | ||
| 172 | OP_FORPREP,/* A sBc */ | ||
| 173 | OP_FORLOOP,/* A sBc */ | 172 | OP_FORLOOP,/* A sBc */ |
| 174 | |||
| 175 | OP_TFORPREP,/* A sBc */ | ||
| 176 | OP_TFORLOOP,/* A sBc */ | 173 | OP_TFORLOOP,/* A sBc */ |
| 177 | 174 | ||
| 178 | OP_SETLIST,/* A Bc R(A)[Bc-Bc%FPF+i] := R(A+i), 1 <= i <= Bc%FPF+1 */ | 175 | OP_SETLIST,/* A Bc R(A)[Bc-Bc%FPF+i] := R(A+i), 1 <= i <= Bc%FPF+1 */ |
| @@ -206,7 +203,8 @@ enum OpModeMask { | |||
| 206 | OpModeCreg, /* C is a register/constant */ | 203 | OpModeCreg, /* C is a register/constant */ |
| 207 | OpModesetA, /* instruction set register A */ | 204 | OpModesetA, /* instruction set register A */ |
| 208 | OpModeK, /* Bc is a constant */ | 205 | OpModeK, /* Bc is a constant */ |
| 209 | OpModeT /* operator is a test */ | 206 | OpModeT, /* operator is a test */ |
| 207 | OpModeNoTrace /* operator should not be traced */ | ||
| 210 | }; | 208 | }; |
| 211 | 209 | ||
| 212 | extern const lu_byte luaP_opmodes[NUM_OPCODES]; | 210 | extern const lu_byte luaP_opmodes[NUM_OPCODES]; |
