New conceptual model for vararg

Conceptually, all functions get their vararg arguments in a vararg
table. The storing of vararg arguments in the stack is always treated
as an optimization.
This commit is contained in:
Roberto I
2025-11-26 11:18:29 -03:00
parent d94f7ba304
commit f33cc4ddec
11 changed files with 154 additions and 69 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ OP_SETLIST,/* A vB vC k R[A][vC+i] := R[A+i], 1 <= i <= vB */
OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */
OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */
OP_VARARG,/* A C R[A], ..., R[A+C-2] = vararg, R[B] is vararg param. */
OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */