aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-09-24 18:33:08 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-09-24 18:33:08 -0300
commit25c54fe60e22d05cdfaa48c64372d354efa59547 (patch)
tree3ccaeded5e4363db358f73b7c8fc6b9f414a2f2a /lopcodes.c
parent0cc3c9447cca9abae9738ee77c24d88801c3916c (diff)
downloadlua-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 'lopcodes.c')
-rw-r--r--lopcodes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lopcodes.c b/lopcodes.c
index 79ffbe25..47458e40 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -102,6 +102,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
102 ,opmode(0, 0, 1, 0, 0, ivABC) /* OP_SETLIST */ 102 ,opmode(0, 0, 1, 0, 0, ivABC) /* OP_SETLIST */
103 ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */ 103 ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */
104 ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */ 104 ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */
105 ,opmode(0, 0, 0, 0, 1, iABC) /* OP_GETVARG */
105 ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */ 106 ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */
106 ,opmode(0, 0, 0, 0, 0, iAx) /* OP_EXTRAARG */ 107 ,opmode(0, 0, 0, 0, 0, iAx) /* OP_EXTRAARG */
107}; 108};