diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-09 10:43:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-09 10:43:17 -0300 |
commit | 54f7b46c1e8a0188e1649046a3a72522f2d769f4 (patch) | |
tree | 28e973e10e2bc82de4d7d1e7a9f6673b028f7ad2 /ldump.c | |
parent | e888976bc6ba5592fb8ab8ecc04a8f63e217aa74 (diff) | |
download | lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.tar.gz lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.tar.bz2 lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.zip |
New implementation for constants
VLOCAL expressions keep a reference to their corresponding 'Vardesc',
and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is
easier to check whether a variable is read-only. The decoupling in
VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index)
should also help the forthcoming implementation of compile-time
constant propagation.
Diffstat (limited to 'ldump.c')
-rw-r--r-- | ldump.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -149,6 +149,7 @@ static void DumpUpvalues (const Proto *f, DumpState *D) { | |||
149 | for (i = 0; i < n; i++) { | 149 | for (i = 0; i < n; i++) { |
150 | DumpByte(f->upvalues[i].instack, D); | 150 | DumpByte(f->upvalues[i].instack, D); |
151 | DumpByte(f->upvalues[i].idx, D); | 151 | DumpByte(f->upvalues[i].idx, D); |
152 | DumpByte(f->upvalues[i].ro, D); | ||
152 | } | 153 | } |
153 | } | 154 | } |
154 | 155 | ||