diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-13 17:15:59 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-13 17:15:59 -0300 |
| commit | 6d268b0b00ae63e5d06aedc4fb3cec105123a565 (patch) | |
| tree | 26fac79b53bfd79a9351291427358eb2e89c7360 /lopcodes.h | |
| parent | c7677471918fa55095f4993484eb5805091364fd (diff) | |
| download | lua-6d268b0b00ae63e5d06aedc4fb3cec105123a565.tar.gz lua-6d268b0b00ae63e5d06aedc4fb3cec105123a565.tar.bz2 lua-6d268b0b00ae63e5d06aedc4fb3cec105123a565.zip | |
new semantics for "for" local variables
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.101 2002/08/20 20:03:05 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.102 2002/08/21 18:56:09 roberto Exp roberto $ |
| 3 | ** Opcodes for Lua virtual machine | 3 | ** Opcodes for Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -172,6 +172,7 @@ OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ | |||
| 172 | OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */ | 172 | OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */ |
| 173 | 173 | ||
| 174 | OP_FORLOOP,/* A sBx R(A)+=R(A+2); if R(A) <?= R(A+1) then PC+= sBx */ | 174 | OP_FORLOOP,/* A sBx R(A)+=R(A+2); if R(A) <?= R(A+1) then PC+= sBx */ |
| 175 | OP_FORPREP,/* A sBx R(A)-=R(A+2); PC += sBx */ | ||
| 175 | 176 | ||
| 176 | OP_TFORLOOP,/* A C R(A+2), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); | 177 | OP_TFORLOOP,/* A C R(A+2), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); |
| 177 | if R(A+2) ~= nil then pc++ */ | 178 | if R(A+2) ~= nil then pc++ */ |
| @@ -214,7 +215,6 @@ enum OpModeMask { | |||
| 214 | OpModesetA, /* instruction set register A */ | 215 | OpModesetA, /* instruction set register A */ |
| 215 | OpModeK, /* Bx is a constant */ | 216 | OpModeK, /* Bx is a constant */ |
| 216 | OpModeT /* operator is a test */ | 217 | OpModeT /* operator is a test */ |
| 217 | |||
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | 220 | ||
