From 54f7b46c1e8a0188e1649046a3a72522f2d769f4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 9 Jul 2019 10:43:17 -0300 Subject: 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. --- lundump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lundump.c') diff --git a/lundump.c b/lundump.c index c1cff9e1..5c0e94d6 100644 --- a/lundump.c +++ b/lundump.c @@ -203,6 +203,7 @@ static void LoadUpvalues (LoadState *S, Proto *f) { for (i = 0; i < n; i++) { f->upvalues[i].instack = LoadByte(S); f->upvalues[i].idx = LoadByte(S); + f->upvalues[i].ro = LoadByte(S); } } -- cgit v1.2.3-55-g6feb