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. --- ldump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ldump.c') diff --git a/ldump.c b/ldump.c index c4475576..3d5b7b32 100644 --- a/ldump.c +++ b/ldump.c @@ -149,6 +149,7 @@ static void DumpUpvalues (const Proto *f, DumpState *D) { for (i = 0; i < n; i++) { DumpByte(f->upvalues[i].instack, D); DumpByte(f->upvalues[i].idx, D); + DumpByte(f->upvalues[i].ro, D); } } -- cgit v1.2.3-55-g6feb