aboutsummaryrefslogtreecommitdiff
path: root/testes/coroutine.lua (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-12-27Fixed buffers reuse absolute line informationRoberto Ierusalimschy4-13/+36
2023-12-27Several tweaks in the garbage collectorRoberto Ierusalimschy8-56/+98
- back with step size in collectgarbage("step") - adjustments in defaults for some GC parameters - adjustments in 'luaO_codeparam'
2023-12-22Removed compatibility option LUA_COMPAT_GCPARAMSRoberto Ierusalimschy6-53/+20
The meaning of different GC parameters changed, so there is point in supporting old values for them. The new code simply ignores the parameters when changing the GC mode, so the incompatibility is small.
2023-12-22New option "setparms" for 'collectgarbage'Roberto Ierusalimschy13-78/+163
The generational mode also uses the parameters for the incremental mode in its major collections, so it should be easy to change those parameters without having to change the GC mode.
2023-12-21Bug: Buffer overflow in string concatenationRoberto Ierusalimschy2-2/+2
Even if the string fits in size_t, the whole size of the TString object can overflow when we add the header.
2023-12-20GC parameters encoded as floating-point bytesRoberto Ierusalimschy8-57/+113
This encoding brings more precision and a larger range for these parameters.
2023-12-20Option 0 for step multiplier makes GC non-incrementalRoberto Ierusalimschy6-50/+84
2023-12-14Cleaner protocol between 'lua_dump' and writer functionRoberto Ierusalimschy6-46/+66
'lua_dump' signals to the writer function the end of a dump, so that is has more freedom when using the stack.
2023-12-07Check minor->major made at the end of a minor cycleRoberto Ierusalimschy1-60/+35
It does not make sense to wait for another cycle to decide when much of the information about creation of old objects is already available.
2023-12-07First criteria for shifts minor<->majorRoberto Ierusalimschy8-128/+187
2023-12-06Major collections done incrementallyRoberto Ierusalimschy4-75/+80
Major collections do not need to "stop the world". Still pending: criteria for shifts minor-major, shifts generational-incremental.
2023-12-01Removed macro 'changeage'Roberto Ierusalimschy2-14/+12
It is simpler to use always 'setage'. The saving from 'changeage' is too irrelevant.
2023-12-01Removed parameter in 'collectgarbage("step")'Roberto Ierusalimschy2-57/+3
A call to 'collectgarbage("step")' always performs one GC basic step.
2023-11-30Removed deprecated options in 'lua_gc'Roberto Ierusalimschy4-39/+10
Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
2023-11-29Comments detailing the ages for generational GCRoberto Ierusalimschy5-16/+59
Plus other comments and small details.
2023-11-24Panic functions should not raise errorsRoberto Ierusalimschy3-4/+14
The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.
2023-11-24Details in the manualRoberto Ierusalimschy1-21/+13
2023-11-24Simpler coding for new representation for arraysRoberto Ierusalimschy3-50/+36
With the tags comming first in a cell, we can define the whole cell as a C type and let C do part of the address computations.
2023-11-15Buffer in 'luai_makeseed' measured in bytesRoberto Ierusalimschy2-12/+20
In the (rare) cases when sizeof(void*) or sizeof(time_t) are not multiples of sizeof(int), we still can use all their bytes in the seed.
2023-11-13Default paths stored as external stringsRoberto Ierusalimschy1-2/+3
2023-11-13Auxiliary buffer uses external stringsRoberto Ierusalimschy3-27/+40
The buffer system from the auxiliary library reuses its buffer as external memory when closing long strings.
2023-11-13Correct anchoring and GC barriers in 'loadString'Roberto Ierusalimschy2-42/+37
Call to 'luaH_setint' could call the GC with the string unanchored. Moreover, previously saved strings were being assigned to the prototype without a barrier.
2023-11-10Fixed buffers save long strings as external.Roberto Ierusalimschy4-16/+29
2023-11-09External stringsRoberto Ierusalimschy9-14/+195
Strings can use external buffers to store their contents.
2023-11-08Towards external stringsRoberto Ierusalimschy4-22/+36
Long strings have a pointer to string contents.
2023-11-08DetailsRoberto Ierusalimschy1-9/+18
Comments and parameter name in header file.
2023-11-08Solving merge issue with use of tables in dump/undumpRoberto Ierusalimschy2-6/+7
The use of tables in dump/undump to reuse strings did not exist in the version that changed the representation of arrays, so it was not corrected for the new API for tables.
2023-11-03Full implementation of new representation for arraysRoberto Ierusalimschy5-29/+96
2023-11-01Bug: Recursion in 'getobjname' can stack overflowRoberto Ierusalimschy2-69/+87
'getobjname' now broken in two, a basic version that handles locals, upvalues, and constants, and a full version, which uses the basic version to handle table accesses (globals and fields).
2023-10-30Full abstraction for representation of array valuesRoberto Ierusalimschy9-93/+128
2023-10-27Avoid direct accesses to the array part of a tableRoberto Ierusalimschy1-49/+79
2023-10-26Simpler test in 'luaH_getint'Roberto Ierusalimschy1-11/+25
The test whether key is inside the array part of a table uses a bit trick to avoid computing the real size of the array part.
2023-09-08Removed test for "corrupted binary dump"Roberto Ierusalimschy2-15/+1
Test is too non portable. (For instance, it does not work for different number types.)
2023-09-08Avoid casts from unsigned long to floating-pointRoberto Ierusalimschy1-7/+24
Old Microsoft compilers do not support those casts.
2023-09-05Added suport for Fixed BuffersRoberto Ierusalimschy12-34/+160
A fixed buffer keeps a binary chunk "forever", so that the program does not need to copy some of its parts when loading it.
2023-08-30New macro 'getlstr'Roberto Ierusalimschy5-22/+37
Accesses content and length of a 'TString'.
2023-08-30Field 'Proto.is_vararg' uses only one bitRoberto Ierusalimschy8-13/+20
So that the other bits can be used for other purposes.
2023-08-25Opcode in dumps is stored properly alignedRoberto Ierusalimschy2-1/+30
2023-08-25Cannot use 'getshrstr' before setting 'shrlen'Roberto Ierusalimschy1-1/+1
2023-08-23Documentation for "LUA_NOENV"Roberto Ierusalimschy1-0/+4
Registry field "LUA_NOENV" (that signals to libraries that option -E is on) now part of the "official" API of Lua stand-alone.
2023-08-23Bug: Wrong line number for function callsRoberto Ierusalimschy2-10/+10
2023-08-17More disciplined use of 'getstr' and 'tsslen'Roberto Ierusalimschy9-33/+37
We may want to add other string variants in the future; this change documents better where the code may need to handle those variants.
2023-08-17More control over encoding of test filesRoberto Ierusalimschy6-28/+49
The few UTF-8 test files are commented as such, and there is only one non UTF-8 test file (to test non UTF-8 sources).
2023-07-25Bug: Call hook may be called twice when count hook yieldsRoberto Ierusalimschy4-11/+27
Took the opportunity and moved the code that controls call hooks in 'luaV_execute' into a function.
2023-07-13Thread stacks resized in the atomic phaseRoberto Ierusalimschy1-3/+5
Although stack resize can be a little expensive, it seems unusual to have too many threads needing resize during one GC cycle. On the other hand, the change allows full collections to skip the propagate phase, going straight from a pause to the atomic phase.
2023-07-03DetailsRoberto Ierusalimschy2-3/+2
2023-06-21Removed redundancy in definitions of version/releaseRoberto Ierusalimschy1-11/+21
String rendering now derived from the numeric original definitions.
2023-06-16Avoid inclusion loop in 'ltm.h'Roberto Ierusalimschy1-3/+2
2023-06-14Bug: read overflow in 'l_strcmp'Roberto Ierusalimschy1-18/+20
Equality according to 'strcoll' does not imply that strings have the same length.
2023-05-22Several functions turned 'static'Roberto Ierusalimschy7-23/+18
Several functions that were already being used only inside their own file have been declared as 'static'.