aboutsummaryrefslogtreecommitdiff
path: root/lparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.h')
-rw-r--r--lparser.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/lparser.h b/lparser.h
index 274fb1c4..524df6ea 100644
--- a/lparser.h
+++ b/lparser.h
@@ -45,16 +45,19 @@ typedef enum {
45 info = absolute index in 'actvar.arr' */ 45 info = absolute index in 'actvar.arr' */
46 VINDEXED, /* indexed variable; 46 VINDEXED, /* indexed variable;
47 ind.t = table register; 47 ind.t = table register;
48 ind.idx = key's R index */ 48 ind.idx = key's R index;
49 ind.ro = true if it represents a read-only global;
50 ind.keystr = if key is a string, index in 'k' of that string;
51 -1 if key is not a string */
49 VINDEXUP, /* indexed upvalue; 52 VINDEXUP, /* indexed upvalue;
50 ind.t = table upvalue; 53 ind.idx = key's K index;
51 ind.idx = key's K index */ 54 ind.* as in VINDEXED */
52 VINDEXI, /* indexed variable with constant integer; 55 VINDEXI, /* indexed variable with constant integer;
53 ind.t = table register; 56 ind.t = table register;
54 ind.idx = key's value */ 57 ind.idx = key's value */
55 VINDEXSTR, /* indexed variable with literal string; 58 VINDEXSTR, /* indexed variable with literal string;
56 ind.t = table register; 59 ind.idx = key's K index;
57 ind.idx = key's K index */ 60 ind.* as in VINDEXED */
58 VJMP, /* expression is a test/comparison; 61 VJMP, /* expression is a test/comparison;
59 info = pc of corresponding jump instruction */ 62 info = pc of corresponding jump instruction */
60 VRELOC, /* expression can put result in any register; 63 VRELOC, /* expression can put result in any register;
@@ -77,8 +80,9 @@ typedef struct expdesc {
77 int info; /* for generic use */ 80 int info; /* for generic use */
78 struct { /* for indexed variables */ 81 struct { /* for indexed variables */
79 short idx; /* index (R or "long" K) */ 82 short idx; /* index (R or "long" K) */
80 short vidx; /* index in 'actvar.arr' or -1 if not a declared global */
81 lu_byte t; /* table (register or upvalue) */ 83 lu_byte t; /* table (register or upvalue) */
84 lu_byte ro; /* true if variable is read-only */
85 int keystr; /* index in 'k' of string key, or -1 if not a string */
82 } ind; 86 } ind;
83 struct { /* for local variables */ 87 struct { /* for local variables */
84 lu_byte ridx; /* register holding the variable */ 88 lu_byte ridx; /* register holding the variable */