aboutsummaryrefslogtreecommitdiff
path: root/lgc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-03-20New function 'luaL_makeseed'Roberto Ierusalimschy9-86/+87
This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness.
2023-03-17Bug: Loading a corrupted binary file can segfaultRoberto Ierusalimschy3-2/+22
The size of the list of upvalue names are stored separated from the size of the list of upvalues, but they share the same array.
2023-03-09DetailsRoberto Ierusalimschy1-3/+17
Comments in 'onelua.c'
2023-03-09Corrected support for 16-bit systemsRoberto Ierusalimschy3-10/+8
We still need access to a 16-bit system to correctly test these changes.
2023-02-08Bug: Wrong line in error message for arith. errorsRoberto Ierusalimschy2-0/+12
It also causes 'L->top' to be wrong when the error happens, triggering an 'assert'.
2023-02-07Simpler definition for LUA_STRFTIMEOPTIONSRoberto Ierusalimschy1-15/+6
There is no need for those intermediate definitions.
2023-02-02New macro LUA_USE_IOSRoberto Ierusalimschy2-12/+11
Do not try to detect automatically whether system is iOS; it is simpler and more reliable to let the programmer inform that.
2023-02-02Small changes in hash of pointersRoberto Ierusalimschy1-4/+17
When converting from pointer to integer, use 'uintptr_t' if available; otherwise try 'uintmax_t', and use 'size_t' as last resource.
2023-01-24Fix absence of 'system' in iOSRoberto Ierusalimschy1-1/+17
Despite claiming to be ISO, the C library in some Apple platforms does not implement 'system'.
2022-12-29Do not avoid major collections when GCdebt is zeroRoberto Ierusalimschy1-5/+2
'collectgarbage("step")' (without an argument) does not have any special meaning, it means "do a step with some default size".
2022-12-28Avoid excessive name pollution in test filesRoberto Ierusalimschy26-261/+335
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-23Detail in make file for testes/libsRoberto Ierusalimschy1-5/+5
Everything depends on the Lua version (as given by 'lua.h')
2022-12-22Changes in opcodes for generic 'for'Roberto Ierusalimschy3-29/+38
Again, as the control variable is read only, the code doesn't need to keep an internal copy of it.
2022-12-21Simplification in opcodes for numerical 'for'Roberto Ierusalimschy2-27/+27
As the control variable is read only, the code doesn't need to keep an internal copy of it.
2022-12-21Control variables in for loops are read onlyRoberto Ierusalimschy5-37/+40
2022-12-20Towards Lua 5.5Roberto Ierusalimschy5-129/+12
2022-12-20Dump doesn't need to reuse 'source'Roberto Ierusalimschy3-12/+35
All strings are being reused now, including 'source'.
2022-12-15Dump/undump reuse stringsRoberto Ierusalimschy5-12/+77
A repeated string in a dump is represented as an index to its first occurence, instead of another copy of the string.
2022-12-15Small change in barrier macrosRoberto Ierusalimschy1-8/+9
Reuse macros for objects when defining the macros for values.
2022-12-15Small improvements in 'lmem.c'Roberto Ierusalimschy1-27/+41
Added some auxiliary macros + fixed a bug in compilation option EMERGENCYGCTESTS. (It should not try to force an emergency collection when it cannot run one.)
2022-12-14Details in some header filesRoberto Ierusalimschy3-11/+21
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) + better handling of some inclusion loops.
2022-12-13Changed signal of GC debtRoberto Ierusalimschy6-25/+22
Positive debts seems more natural then negative ones.
2022-12-13Revamp of GC parametersRoberto Ierusalimschy6-41/+61
More uniformity when handling GC parameters + avoid divisions by 100 when applying them.
2022-12-09Reduce calls to 'luaC_step' when GC is stoppedRoberto Ierusalimschy1-3/+6
2022-12-07New function 'luaL_openselectedlibs'Roberto Ierusalimschy7-69/+71
Makes it easier to start Lua with only some standard libraries.
2022-12-06Simplification in handling of GC debtRoberto Ierusalimschy2-20/+22
Each incremental step has always the same size (stepsize), and the debt for next step also is always the same.
2022-12-02DetailsRoberto Ierusalimschy1-5/+5
Parentheses and comments.
2022-11-29Simpler control for major collectionsRoberto Ierusalimschy6-136/+77
2022-11-24Removed GC checks from function callsRoberto Ierusalimschy5-20/+10
Function calls do not create new objects. (It may use memory with stack reallocation, but now that is irrelevant to the GC.)
2022-11-23'l_mem' renamed to 'l_obj' to count objectsRoberto Ierusalimschy6-49/+51
2022-11-23First version of GC counting objects for controlRoberto Ierusalimschy9-156/+162
Still needs to review generational mode.
2022-11-23Stop GC while building initial stateRoberto Ierusalimschy1-1/+3
2022-11-08Removed unused field 'UpVal.tbc'Roberto Ierusalimschy2-4/+2
2022-11-03Added a counter of the total number of existing objectsRoberto Ierusalimschy3-0/+5
It may simplify the control of the garbage collector.
2022-11-01Threads are created like other objectsRoberto Ierusalimschy3-12/+16
Using a version of 'luaC_newobj' that allows offsets (extra space before the object itself).
2022-11-01Tables have a 'lastfree' information only when neededRoberto Ierusalimschy7-24/+84
Only tables with some minimum number of entries in their hash part have a 'lastfree' field, kept in a header before the node vector.
2022-10-31Stack reallocation done with a single reallocRoberto Ierusalimschy2-22/+52
To avoid the need of both the old and the new stack addresses valid at the same time, to correct the pointers to the stack, these pointers are changed to offsets before the reallocation and then changed back to pointers after the reallocation.
2022-10-29Stack indices changed to union'sRoberto Ierusalimschy19-370/+384
That will allow to change pointers to offsets while reallocating the stack.
2022-10-26DetailsRoberto Ierusalimschy1-2/+7
Added comments in the makefile about other useful '-fsanitize' options.
2022-10-25Bug: stack overflow with nesting of coroutine.closeRoberto Ierusalimschy6-6/+38
2022-10-21Removed test function 'luaH_isdummy'Roberto Ierusalimschy2-3/+0
It was not being used anywhere.
2022-10-19Option '-l g=mod' added to the manualRoberto Ierusalimschy1-11/+12
Plus some other improvements in the manual.
2022-10-19DetailsRoberto Ierusalimschy2-7/+7
Some cast operations rewritten to use respective macros.
2022-10-19Portability issue in a test for 'string.format'Roberto Ierusalimschy1-2/+7
2022-09-23Negation in constant folding of '>>' may overflowRoberto Ierusalimschy4-4/+19
2022-09-23Small simplification in overflow check in 'getfield'Roberto Ierusalimschy2-3/+10
Subtracting a small non-negative int from a non-negative int cannot overflow, and adding a non-negative int to INT_MIN cannot overflow.
2022-09-23Bug: 'utf8.codes' accepts spurious continuation bytesRoberto Ierusalimschy2-12/+27
2022-09-16New test for table rehashRoberto Ierusalimschy1-9/+29
2022-09-08Note in the manual about using '...' as an expressionRoberto Ierusalimschy1-5/+16
2022-09-07Corrected error message in 'table.remove'Roberto Ierusalimschy1-1/+1