10 Commits

Author SHA1 Message Date
Roberto I
f33cc4ddec 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.
2025-11-26 11:18:29 -03:00
Roberto I
d342328e5b Vertical bar removed from syntax of vararg table
The syntax 'function foo (a, b, ...arg)' is already used by JavaScript
for this same semantics, so it seems natural to use the same notation in
Lua.
2025-10-30 11:07:01 -03:00
Roberto Ierusalimschy
0149b781d4 Case VVARGIND added to luaK_storevar
In a global initialization, the variable does not pass through
'check_readonly', and therefore a VVARGIND is not normalized to a
VINDEXED.
2025-10-30 10:39:55 -03:00
Roberto I
25c54fe60e 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.
2025-09-24 18:33:08 -03:00
Roberto I
8fb1af0e33 Varag parameter is a new kind of variable
To allow some optimizations on its use.
2025-09-17 16:07:48 -03:00
Roberto I
140b672e2e Vararg table
Not yet optimized nor documented.
2025-09-16 13:26:24 -03:00
Roberto Ierusalimschy
ab66652b32 Removed copyright notice from 'testes/all.lua'
All test files refer to the main copyright notice in 'lua.h'.
2025-03-12 14:00:58 -03:00
Roberto Ierusalimschy
314745ed84 Avoid excessive name pollution in test files
Test files are more polite regarding the use of globals when locals
would do, and when globals are necessary deleting them after use.
2022-12-28 18:34:11 -03:00
Roberto Ierusalimschy
aa4c5cf190 Added directory to test file names in '$Id:'
From the point of view of 'git', all names are relative to the root
directory of the project. So, file names in '$Id:' also should be
relative to that directory: the proper name for test file 'all.lua'
is 'testes/all.lua'.
2018-07-25 15:31:04 -03:00
Roberto Ierusalimschy
7c519dfbd0 Added manual and tests for version 5.4-w2 2018-07-09 12:33:01 -03:00