aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-11-08 11:43:42 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-11-08 11:43:42 -0300
commite44f3a2ffc7ced5e75cca7657aaa60ef27da89aa (patch)
tree090174ab9a66fbec195e9dd539710ab19370ec2f /lopcodes.h
parentf791bb69061c15f73395c5a95958ac18af5ef764 (diff)
downloadlua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.tar.gz
lua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.tar.bz2
lua-e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa.zip
Global initialization checks name conflict
Initialization "global a = 10" raises an error if global 'a' is already defined, that is, it has a non-nil value.
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 82bba721..f7bded2c 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -340,6 +340,8 @@ OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */
340 340
341OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */ 341OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */
342 342
343OP_ERRNNIL,/* A Bx raise error if R[A] ~= nil (K[Bx] is global name)*/
344
343OP_VARARGPREP,/* (adjust vararg parameters) */ 345OP_VARARGPREP,/* (adjust vararg parameters) */
344 346
345OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ 347OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */