diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-06-29 12:38:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-06-29 12:38:41 -0300 |
commit | 07db10813cb044252c18973688f63b5eac6a90a6 (patch) | |
tree | db08d5c25bbba80af51a719a9092062b5ea408b0 /lopcodes.h | |
parent | f96497397addca22f22a6ba6eeabc906be43f16b (diff) | |
download | lua-07db10813cb044252c18973688f63b5eac6a90a6.tar.gz lua-07db10813cb044252c18973688f63b5eac6a90a6.tar.bz2 lua-07db10813cb044252c18973688f63b5eac6a90a6.zip |
'OP_VARARG' has the vararg parameter as an operand
Diffstat (limited to 'lopcodes.h')
-rw-r--r-- | lopcodes.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.153 2017/04/28 20:57:45 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.154 2017/05/08 16:08:01 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 | */ |
@@ -240,7 +240,7 @@ OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ | |||
240 | 240 | ||
241 | OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */ | 241 | OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */ |
242 | 242 | ||
243 | OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ | 243 | OP_VARARG,/* A B C R(A), R(A+1), ..., R(A+B-2) = vararg(C) */ |
244 | 244 | ||
245 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | 245 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ |
246 | } OpCode; | 246 | } OpCode; |
@@ -257,7 +257,7 @@ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | |||
257 | OP_SETLIST) may use 'top'. | 257 | OP_SETLIST) may use 'top'. |
258 | 258 | ||
259 | (*) In OP_VARARG, if (B == 0) then use actual number of varargs and | 259 | (*) In OP_VARARG, if (B == 0) then use actual number of varargs and |
260 | set top (like in OP_CALL with C == 0). | 260 | set top (like in OP_CALL with C == 0). C is the vararg parameter. |
261 | 261 | ||
262 | (*) In OP_RETURN, if (B == 0) then return up to 'top'. | 262 | (*) In OP_RETURN, if (B == 0) then return up to 'top'. |
263 | 263 | ||