aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
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.c
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.c')
-rw-r--r--lopcodes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lopcodes.c b/lopcodes.c
index 47458e40..7e182315 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -103,6 +103,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
103 ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */ 103 ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */
104 ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */ 104 ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */
105 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_GETVARG */ 105 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_GETVARG */
106 ,opmode(0, 0, 0, 0, 0, iABx) /* OP_ERRNNIL */
106 ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */ 107 ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */
107 ,opmode(0, 0, 0, 0, 0, iAx) /* OP_EXTRAARG */ 108 ,opmode(0, 0, 0, 0, 0, iAx) /* OP_EXTRAARG */
108}; 109};