diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-07 11:45:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-12 12:29:09 -0300 |
commit | c23cc86c542449db47bdb21e9550203309bef045 (patch) | |
tree | 1b7876f7ad26feef4a3ab18f29d3b0b03deabfb2 /lopcodes.h | |
parent | 171dcd7d745566e69c61845599705707500a104e (diff) | |
download | lua-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -261,7 +261,7 @@ OP_MMBINK,/* A B C k call C metamethod over R[A] and K[B] */ | |||
261 | OP_UNM,/* A B R[A] := -R[B] */ | 261 | OP_UNM,/* A B R[A] := -R[B] */ |
262 | OP_BNOT,/* A B R[A] := ~R[B] */ | 262 | OP_BNOT,/* A B R[A] := ~R[B] */ |
263 | OP_NOT,/* A B R[A] := not R[B] */ | 263 | OP_NOT,/* A B R[A] := not R[B] */ |
264 | OP_LEN,/* A B R[A] := length of R[B] */ | 264 | OP_LEN,/* A B R[A] := #R[B] (length operator) */ |
265 | 265 | ||
266 | OP_CONCAT,/* A B R[A] := R[A].. ... ..R[A + B - 1] */ | 266 | OP_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 */ | |||
297 | OP_TFORCALL,/* A C R[A+4], ... ,R[A+3+C] := R[A](R[A+1], R[A+2]); */ | 297 | OP_TFORCALL,/* A C R[A+4], ... ,R[A+3+C] := R[A](R[A+1], R[A+2]); */ |
298 | OP_TFORLOOP,/* A Bx if R[A+2] ~= nil then { R[A]=R[A+2]; pc -= Bx } */ | 298 | OP_TFORLOOP,/* A Bx if R[A+2] ~= nil then { R[A]=R[A+2]; pc -= Bx } */ |
299 | 299 | ||
300 | OP_SETLIST,/* A B C k R[A][(C-1)*FPF+i] := R[A+i], 1 <= i <= B */ | 300 | OP_SETLIST,/* A B C k R[A][C+i] := R[A+i], 1 <= i <= B */ |
301 | 301 | ||
302 | OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */ | 302 | OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */ |
303 | 303 | ||