aboutsummaryrefslogtreecommitdiff
path: root/ljumptab.h
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 /ljumptab.h
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 'ljumptab.h')
-rw-r--r--ljumptab.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ljumptab.h b/ljumptab.h
index a24828bb..f896b658 100644
--- a/ljumptab.h
+++ b/ljumptab.h
@@ -21,7 +21,7 @@ static const void *const disptab[NUM_OPCODES] = {
21#if 0 21#if 0
22** you can update the following list with this command: 22** you can update the following list with this command:
23** 23**
24** sed -n '/^OP_/\!d; s/OP_/\&\&L_OP_/ ; s/,.*/,/ ; s/\/.*// ; p' lopcodes.h 24** sed -n '/^OP_/!d; s/OP_/\&\&L_OP_/ ; s/,.*/,/ ; s/\/.*// ; p' lopcodes.h
25** 25**
26#endif 26#endif
27 27
@@ -106,6 +106,7 @@ static const void *const disptab[NUM_OPCODES] = {
106&&L_OP_SETLIST, 106&&L_OP_SETLIST,
107&&L_OP_CLOSURE, 107&&L_OP_CLOSURE,
108&&L_OP_VARARG, 108&&L_OP_VARARG,
109&&L_OP_GETVARG,
109&&L_OP_VARARGPREP, 110&&L_OP_VARARGPREP,
110&&L_OP_EXTRAARG 111&&L_OP_EXTRAARG
111 112