diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2025-11-08 11:43:42 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2025-11-08 11:43:42 -0300 |
| commit | e44f3a2ffc7ced5e75cca7657aaa60ef27da89aa (patch) | |
| tree | 090174ab9a66fbec195e9dd539710ab19370ec2f /lopcodes.h | |
| parent | f791bb69061c15f73395c5a95958ac18af5ef764 (diff) | |
| download | lua-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -340,6 +340,8 @@ OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */ | |||
| 340 | 340 | ||
| 341 | OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */ | 341 | OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */ |
| 342 | 342 | ||
| 343 | OP_ERRNNIL,/* A Bx raise error if R[A] ~= nil (K[Bx] is global name)*/ | ||
| 344 | |||
| 343 | OP_VARARGPREP,/* (adjust vararg parameters) */ | 345 | OP_VARARGPREP,/* (adjust vararg parameters) */ |
| 344 | 346 | ||
| 345 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | 347 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ |
