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 /lopcodes.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 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -338,6 +338,8 @@ OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */ | |||
| 338 | 338 | ||
| 339 | OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */ | 339 | OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */ |
| 340 | 340 | ||
| 341 | OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */ | ||
| 342 | |||
| 341 | OP_VARARGPREP,/* (adjust vararg parameters) */ | 343 | OP_VARARGPREP,/* (adjust vararg parameters) */ |
| 342 | 344 | ||
| 343 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | 345 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ |
