aboutsummaryrefslogtreecommitdiff
path: root/manual/2html (unfollow)
Commit message (Collapse)AuthorFilesLines
14 daysSpecial case for 'string.rep' over an empty stringRoberto I2-5/+5
14 daysBUG: Possible overflow in 'string.packsize'Roberto I1-1/+1
'string.packsize' can overflow result in 32-bit machines using 64-bit integers, as LUA_MAXINTEGER may not fit into size_t.
14 daysDetailsRoberto I1-4/+5
In an assignment like 'a = &b', is looks suspicious if 'a' has a scope larger than 'b'.
2025-12-30DetailsRoberto I2-5/+4
Some comments still talked about bit 'isrealasize', which has been removed.
2025-12-27BUG: Arithmetic overflow in 'collectgarbage"step"'Roberto I1-2/+7
The computation of a new debt could overflow when we give a too large step to 'collectgarbage"step"' and the current debt was already negative. This is only an issue if your platform cares for it or if you compile Lua with an option like '-fsanitize=undefined'.
2025-12-23DetailsRoberto I3-3/+3
typo in comment + formatting + logical 'and' was written as a bitwise operation (makes code more fragile)
2025-12-13GC checks stack space before running finalizerv5.5.0Roberto I3-3/+16
If the stack does not have some minimum available space, the GC defers calling a finalizer until the next cycle. That avoids errors while running a finalizer that the programmer cannot control.
2025-12-13'luaL_newstate' starts state with warnings onRoberto I2-2/+3
It is easier to forget to turn them on then to turn them off.
2025-12-10Format adjust in the manualRoberto I1-19/+19
Lists in inline code don't get a space after commas. (That keeps the code more compact and avoids line breaks in the middle of the code.)
2025-12-08DetailsRoberto I2-8/+8
- Avoid fixing name "_ENV" in the code - Small improvements in the manual
2025-12-08Wrong assert in 'luaK_indexed'Roberto I1-3/+5
2025-12-01In luaB_close, running coroutines do not go to defaultrcRoberto I1-4/+6
This should had been corrected in commit fd897027f1.
2025-11-28Functions with vararg tables don't need hidden args.Roberto I9-43/+70
Vararg functions with vararg tables don't use the arguments hidden in the stack; therfore, it doesn't need to build/keep them.
2025-11-26New conceptual model for varargRoberto I11-69/+154
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-24DetailsRoberto I3-16/+23
Comments, capitalization in the manual, globals in test 'heady.lua'
2025-11-11'__pairs' can also return a to-be-closed objectRoberto I3-9/+15
2025-11-11External strings are as good as internal onesRoberto I4-6/+28
A '__mode' metafield and an "n" key both can be external strings.
2025-11-11Correction in line info for semantic errorsRoberto I2-22/+43
Semantic errors should refer the last used token, not the next one.
2025-11-08Global initialization checks name conflictRoberto I13-9/+87
Initialization "global a = 10" raises an error if global 'a' is already defined, that is, it has a non-nil value.
2025-10-31DetailsRoberto I3-8/+10
- New macro l_strcoll to ease changing 'strcoll' to something else. - MAXINDEXRK==1 in 'ltests.h' is enough to run test 'code.lua'. - Removed unused '#include' in 'lutf8lib.c'.
2025-10-30Vertical bar removed from syntax of vararg tableRoberto I5-22/+20
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-30Case VVARGIND added to luaK_storevarRoberto Ierusalimschy2-0/+16
In a global initialization, the variable does not pass through 'check_readonly', and therefore a VVARGIND is not normalized to a VINDEXED.
2025-10-29Fixed initialization of global variablesRoberto I3-13/+52
When calling 'luaK_storevar', the 'expdesc' for the variable must be created before the one for the expression, to satisfy the assumptions for register allocation. So, in a statement like 'global a = exp', where 'a' is actually '_ENV.a', this variable must be handled before the initializing expression 'exp'.
2025-10-18Small change in 'trymt'Roberto I1-4/+11
Operation name can be diferent from metamethod name.
2025-10-18Added "attribute internal" to __MACH__ platformsRoberto I2-10/+10
Also, makefile does not add compiling options (LOCAL) to linker flags (MYLDFLAGS).
2025-10-17Standard allocator function added to the APIRoberto I3-15/+28
That makes easier to redefine luaL_newstate.
2025-10-14DetailsRoberto I5-11/+2
- Functions luaK_goiffalse, luaS_hash made private. - Removed unused macro log2maxs.
2025-10-12Two new memory testsRoberto I1-9/+33
For external strings and for vararg tables.
2025-10-10Change in dumping of NULL stringsRoberto I2-15/+19
When dumping a string, adding 2 to its size may overflow a size_t for external strings, which may not have a header. (Adding 1 is Ok, because all strings end with a '\0' not included in their size.) The new method for saving NULL strings code them as a repeated string, using the reserved index 0.
2025-10-10Initialization of too many locals break assertionRoberto I2-7/+13
The check for limit of local variables is made after generating code to initialize them. If there are too many local variables not initialized, the coding of instruction OP_LOADNIL could overflow an argument.
2025-09-24Optimization for vararg tablesRoberto I13-63/+186
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-18Small tweaks in makefileRoberto I1-3/+2
2025-09-17Varag parameter is a new kind of variableRoberto I7-16/+65
To allow some optimizations on its use.
2025-09-16Vararg tableRoberto I9-31/+80
Not yet optimized nor documented.
2025-09-05DetailsRoberto I6-5/+11
- LUAMOD_API defined as 'extern "C"' in C++. - "ANSI C" is in fact "ISO C" (comments) - Removed option -std from makefile in testes/libs. (Easier to change to C++ for tests).
2025-09-05In C++, 'throw' must go to the correct handler.Roberto I1-17/+25
In C, we may have several "setjmp" nested, and the "longjmp" will go to the one given by the corresponding "jmp_buf". In C++, a "throw" will always go to the inner "catch". So, the "catch" must check whether it is the recipient of the "throw" and, if not, rethrow the exception to the outer level.
2025-08-30Allows LUA_32BITS to be defined externallyRoberto Ierusalimschy1-2/+2
An external definition for LUA_32BITS can change the API, but libraries check number-format compatibility when loading. So, any incompatible modules will report a clear error.
2025-08-27Added limit to number of elements in a constructorRoberto I2-4/+19
The reasoning in commit 519c57d5 is wrong: A sequence of nils generates several fields with just one OP_LOADNIL.
2025-08-27'ltests.h' should not use LUAI_FUNCRoberto I1-6/+6
LUAI_FUNC is now defined in llimits.h.
2025-08-26New compile option LUA_USE_OFF_TRoberto Ierusalimschy1-1/+1
Allows non-Posix systems to use off_t and related functions for file offsets.
2025-08-26update in 'onelua.c'Roberto Ierusalimschy1-5/+15
2025-08-21Some definitions moved from luaconf.h to llimits.hRoberto Ierusalimschy2-50/+50
These definitions were in luaconf.h only because the standard libraries need them. Now that llimits.h is included by the libraries, it offers a more private place for these definitions.
2025-08-20Removed code for compatibility with version 5.3Roberto I7-61/+3
2025-08-20Better documentation for LUA_ERRERRRoberto I2-4/+13
Not all errors in a message handler generate a LUA_ERRERR.
2025-08-20Added lock/unlock to API function 'lua_rawlen'Roberto I1-1/+7
The call to 'luaH_getn' can change the "field" 'lenhint' of a table.
2025-08-20Keep the order left-right in shiftsRoberto I5-12/+12
Opcodes OP_SHLI-OP_SHRI and the cases for opcodes OP_SHL-OP_SHR were out of order.
2025-08-20Detail in 'obj2gco'Roberto I1-2/+2
Its check should use the type of the object, not its tag. (Change only relevant in test mode.)
2025-08-20Small cleaning servicesRoberto I3-30/+46
2025-08-09Functions 'frexp'-'ldexp' back to the math libraryRoberto I3-17/+46
They are basic for anything that handles the representation of floating numbers.
2025-08-09DetailsRoberto I5-28/+51