diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2025-09-24 18:33:08 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2025-09-24 18:33:08 -0300 |
| commit | 25c54fe60e22d05cdfaa48c64372d354efa59547 (patch) | |
| tree | 3ccaeded5e4363db358f73b7c8fc6b9f414a2f2a /lparser.h | |
| parent | 0cc3c9447cca9abae9738ee77c24d88801c3916c (diff) | |
| download | lua-25c54fe60e22d05cdfaa48c64372d354efa59547.tar.gz lua-25c54fe60e22d05cdfaa48c64372d354efa59547.tar.bz2 lua-25c54fe60e22d05cdfaa48c64372d354efa59547.zip | |
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.
Diffstat (limited to 'lparser.h')
| -rw-r--r-- | lparser.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -51,6 +51,8 @@ typedef enum { | |||
| 51 | ind.ro = true if it represents a read-only global; | 51 | ind.ro = true if it represents a read-only global; |
| 52 | ind.keystr = if key is a string, index in 'k' of that string; | 52 | ind.keystr = if key is a string, index in 'k' of that string; |
| 53 | -1 if key is not a string */ | 53 | -1 if key is not a string */ |
| 54 | VVARGIND, /* indexed vararg parameter; | ||
| 55 | ind.* as in VINDEXED */ | ||
| 54 | VINDEXUP, /* indexed upvalue; | 56 | VINDEXUP, /* indexed upvalue; |
| 55 | ind.idx = key's K index; | 57 | ind.idx = key's K index; |
| 56 | ind.* as in VINDEXED */ | 58 | ind.* as in VINDEXED */ |
