aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-07 11:45:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-12 12:29:09 -0300
commitc23cc86c542449db47bdb21e9550203309bef045 (patch)
tree1b7876f7ad26feef4a3ab18f29d3b0b03deabfb2 /lopcodes.h
parent171dcd7d745566e69c61845599705707500a104e (diff)
downloadlua-c23cc86c542449db47bdb21e9550203309bef045.tar.gz
lua-c23cc86c542449db47bdb21e9550203309bef045.tar.bz2
lua-c23cc86c542449db47bdb21e9550203309bef045.zip
Details
- After converting a generic GCObject to a specific type ('gco2*'), avoid using the original GCObject (to reduce aliasing). - Small corrections in comments in 'lopcodes.h' - Added tests about who calls __close metamethods
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 122e5d21..120cdd94 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -261,7 +261,7 @@ OP_MMBINK,/* A B C k call C metamethod over R[A] and K[B] */
261OP_UNM,/* A B R[A] := -R[B] */ 261OP_UNM,/* A B R[A] := -R[B] */
262OP_BNOT,/* A B R[A] := ~R[B] */ 262OP_BNOT,/* A B R[A] := ~R[B] */
263OP_NOT,/* A B R[A] := not R[B] */ 263OP_NOT,/* A B R[A] := not R[B] */
264OP_LEN,/* A B R[A] := length of R[B] */ 264OP_LEN,/* A B R[A] := #R[B] (length operator) */
265 265
266OP_CONCAT,/* A B R[A] := R[A].. ... ..R[A + B - 1] */ 266OP_CONCAT,/* A B R[A] := R[A].. ... ..R[A + B - 1] */
267 267
@@ -297,7 +297,7 @@ OP_TFORPREP,/* A Bx create upvalue for R[A + 3]; pc+=Bx */
297OP_TFORCALL,/* A C R[A+4], ... ,R[A+3+C] := R[A](R[A+1], R[A+2]); */ 297OP_TFORCALL,/* A C R[A+4], ... ,R[A+3+C] := R[A](R[A+1], R[A+2]); */
298OP_TFORLOOP,/* A Bx if R[A+2] ~= nil then { R[A]=R[A+2]; pc -= Bx } */ 298OP_TFORLOOP,/* A Bx if R[A+2] ~= nil then { R[A]=R[A+2]; pc -= Bx } */
299 299
300OP_SETLIST,/* A B C k R[A][(C-1)*FPF+i] := R[A+i], 1 <= i <= B */ 300OP_SETLIST,/* A B C k R[A][C+i] := R[A+i], 1 <= i <= B */
301 301
302OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */ 302OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */
303 303