diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-09 16:47:44 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-09 16:47:44 -0300 |
| commit | 7b65328c8e89ecc999e47d00288bfa4cf6692cdc (patch) | |
| tree | 4bff202763e7389ca40a44003703376d32eeaf78 /lopcodes.h | |
| parent | d2e05589d738c3a1b563879435d5cc0830719fd1 (diff) | |
| download | lua-7b65328c8e89ecc999e47d00288bfa4cf6692cdc.tar.gz lua-7b65328c8e89ecc999e47d00288bfa4cf6692cdc.tar.bz2 lua-7b65328c8e89ecc999e47d00288bfa4cf6692cdc.zip | |
new semantics for `generic for' (with state)
Diffstat (limited to '')
| -rw-r--r-- | lopcodes.h | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.92 2002/03/21 20:32:22 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.93 2002/03/25 17:47:14 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 | */ |
| @@ -173,8 +173,9 @@ OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see (3)) */ | |||
| 173 | 173 | ||
| 174 | OP_FORLOOP,/* A sBc R(A)+=R(A+2); if R(A) <?= R(A+1) then PC+= sBc */ | 174 | OP_FORLOOP,/* A sBc R(A)+=R(A+2); if R(A) <?= R(A+1) then PC+= sBc */ |
| 175 | 175 | ||
| 176 | OP_TFORLOOP,/* A C R(A+1), ... ,R(A+C) := R(A)(); | 176 | OP_TFORLOOP,/* A C R(A+2), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); |
| 177 | if R(A+1) ~= nil then pc++ */ | 177 | if R(A+2) ~= nil then pc++ */ |
| 178 | OP_TFORPREP,/* A if type(R(A)) == table then R(A+1):=R(A), R(A):=next */ | ||
| 178 | 179 | ||
| 179 | OP_SETLIST,/* A Bc R(A)[Bc-Bc%FPF+i] := R(A+i), 1 <= i <= Bc%FPF+1 */ | 180 | OP_SETLIST,/* A Bc R(A)[Bc-Bc%FPF+i] := R(A+i), 1 <= i <= Bc%FPF+1 */ |
| 180 | OP_SETLISTO,/* A Bc */ | 181 | OP_SETLISTO,/* A Bc */ |
