aboutsummaryrefslogtreecommitdiff
path: root/lparser.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-06 15:54:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-06 15:54:05 -0300
commit4365a45d681b4e71e3c39148489bb8eae538ccf7 (patch)
treeea22f0836f252edd7bc7279772158f2b7e549b1e /lparser.h
parentbe8120906304a8658fab998587b969e0e42f5650 (diff)
downloadlua-4365a45d681b4e71e3c39148489bb8eae538ccf7.tar.gz
lua-4365a45d681b4e71e3c39148489bb8eae538ccf7.tar.bz2
lua-4365a45d681b4e71e3c39148489bb8eae538ccf7.zip
Checks for read-only globals
Diffstat (limited to 'lparser.h')
-rw-r--r--lparser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lparser.h b/lparser.h
index 3cd0ba77..274fb1c4 100644
--- a/lparser.h
+++ b/lparser.h
@@ -77,11 +77,12 @@ typedef struct expdesc {
77 int info; /* for generic use */ 77 int info; /* for generic use */
78 struct { /* for indexed variables */ 78 struct { /* for indexed variables */
79 short idx; /* index (R or "long" K) */ 79 short idx; /* index (R or "long" K) */
80 short vidx; /* index in 'actvar.arr' or -1 if not a declared global */
80 lu_byte t; /* table (register or upvalue) */ 81 lu_byte t; /* table (register or upvalue) */
81 } ind; 82 } ind;
82 struct { /* for local variables */ 83 struct { /* for local variables */
83 lu_byte ridx; /* register holding the variable */ 84 lu_byte ridx; /* register holding the variable */
84 unsigned short vidx; /* compiler index (in 'actvar.arr') */ 85 short vidx; /* index in 'actvar.arr' */
85 } var; 86 } var;
86 } u; 87 } u;
87 int t; /* patch list of 'exit when true' */ 88 int t; /* patch list of 'exit when true' */
@@ -101,7 +102,7 @@ typedef struct expdesc {
101#define varinreg(v) ((v)->vd.kind <= RDKTOCLOSE) 102#define varinreg(v) ((v)->vd.kind <= RDKTOCLOSE)
102 103
103 104
104/* description of an active local variable */ 105/* description of an active variable */
105typedef union Vardesc { 106typedef union Vardesc {
106 struct { 107 struct {
107 TValuefields; /* constant value (if it is a compile-time constant) */ 108 TValuefields; /* constant value (if it is a compile-time constant) */