Optimization for vararg tables

A vararg table can be virtual. If the vararg table is used only as
a base in indexing expressions, the code does not need to create an
actual table for it. Instead, it compiles the indexing expressions
into direct accesses to the internal vararg data.
This commit is contained in:
Roberto I
2025-09-24 18:33:08 -03:00
parent 0cc3c9447c
commit 25c54fe60e
13 changed files with 186 additions and 63 deletions

View File

@@ -51,6 +51,8 @@ typedef enum {
ind.ro = true if it represents a read-only global;
ind.keystr = if key is a string, index in 'k' of that string;
-1 if key is not a string */
VVARGIND, /* indexed vararg parameter;
ind.* as in VINDEXED */
VINDEXUP, /* indexed upvalue;
ind.idx = key's K index;
ind.* as in VINDEXED */