From 25c54fe60e22d05cdfaa48c64372d354efa59547 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Wed, 24 Sep 2025 18:33:08 -0300 Subject: 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. --- lopcodes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lopcodes.h') diff --git a/lopcodes.h b/lopcodes.h index c3f7f64d..82bba721 100644 --- a/lopcodes.h +++ b/lopcodes.h @@ -338,6 +338,8 @@ OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */ OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */ +OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */ + OP_VARARGPREP,/* (adjust vararg parameters) */ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ -- cgit v1.2.3-55-g6feb