aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Small simplification in 'findloader'Roberto Ierusalimschy2024-04-031-5/+4
| | | | | Instead of allways adding a prefix for the next message, and then removing it if there is no message, add the prefix after each message.
* Fixed dangling 'StkId' in 'luaV_finishget'Roberto Ierusalimschy2024-03-295-26/+42
| | | | Bug introduced in 05932567.
* DetailsRoberto Ierusalimschy2024-03-282-7/+10
|
* Some 'unsigned int' changed to 'unsigned'Roberto Ierusalimschy2024-03-229-25/+24
| | | | | 'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...)
* 'luaH_get' functions return tag of the resultRoberto Ierusalimschy2024-03-2110-132/+138
| | | | | | | Undoing previous commit. Returning TValue increases code size without any visible gains. Returning the tag is a little simpler than returning a special code (HOK/HNOTFOUND) and the tag is useful by itself in some cases.
* 'luaH_get' functions return 'TValue'Roberto Ierusalimschy2024-03-189-122/+124
| | | | | | Instead of receiving a parameter telling them where to put the result of the query, these functions return the TValue directly. (That is, they return a structure.)
* Removed "bulk operations"Roberto Ierusalimschy2024-03-153-57/+14
| | | | Negligible performance gains don't justify extra complexity.
* Added "bulk operations" to arraysRoberto Ierusalimschy2024-03-153-35/+99
| | | | | A few operations on arrays can be performed "in bulk", treating all tags of a cell as a simple (or a few) word(s).
* DetailsRoberto Ierusalimschy2024-03-134-6/+5
| | | | | | - 'unsigned int' -> 'unsigned' - Some explicit casts to avoid warnings - Test avoids printing the value of 'fail' (which may not be nil)
* Removed type 'varint_t'Roberto Ierusalimschy2024-03-133-32/+23
| | | | | | size_t should be big enough to count the number of strings in a dump. (And, by definition, it is big enough to count the length of each string.)
* API asserts for illegal pops of to-be-closed variablesRoberto Ierusalimschy2024-03-115-30/+45
|
* Fixed warnings from different compilersRoberto Ierusalimschy2024-02-154-6/+10
|
* New interface to function 'luaL_openselectedlibs'Roberto Ierusalimschy2024-02-158-56/+80
| | | | | Instead of preloading all non-loaded libraries, there is another mask to select which libraries to preload.
* Revising code for Varint encoding in dumpsRoberto Ierusalimschy2024-02-123-29/+45
| | | | | | | | - Usign lua_Unsigned to count strings. - Varint uses a type large enough both for size_t and lua_Unsigned. - Most-Significant Bit 0 means last byte, to conform to common usage. - (unrelated) Change in macro 'getaddr' so that multiplication is by constants.
* Removed deprecated function 'setcstacklimit'Roberto Ierusalimschy2024-02-073-16/+0
|
* Field 'lastfree' changed (back) to 'Node *'Roberto Ierusalimschy2024-02-071-14/+16
| | | | | Due to allignment, it is already using the space of a pointer, and a pointer generates slightly simpler code.
* Better handling of size limit when resizing a tableRoberto Ierusalimschy2024-02-076-21/+37
| | | | | | | | Avoid silent conversions from int to unsigned int when calling 'luaH_resize'; avoid silent conversions from lua_Integer to int in 'table.create'; MAXASIZE corrected for the new implementation of arrays; 'luaH_resize' checks explicitly whether new size respects MAXASIZE. (Even constructors were bypassing that check.)
* DetailsRoberto Ierusalimschy2024-01-297-24/+25
|
* Merge branch 'master' into nextversionRoberto Ierusalimschy2024-01-258-12/+27
|\
| * Bug: Yielding in a hook stops in the wrong instructionRoberto Ierusalimschy2024-01-113-6/+11
| | | | | | | | | | | | | | | | Yielding in a hook must decrease the program counter, because it already counted an instruction that, in the end, was not executed. However, that decrement should be done only when about to restart the thread. Otherwise, inspecting the thread with the debug library shows it one instruction behind of where it really is.
| * Bug: Buffer overflow in string concatenationRoberto Ierusalimschy2023-12-212-2/+2
| | | | | | | | | | Even if the string fits in size_t, the whole size of the TString object can overflow when we add the header.
| * Panic functions should not raise errorsRoberto Ierusalimschy2023-11-243-4/+14
| | | | | | | | | | The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.
* | Small optimization in 'luaH_psetint'Roberto Ierusalimschy2024-01-252-4/+5
| | | | | | | | | | | | It is quite common to write to empty but existing cells in the array part of a table, so 'luaH_psetint' checks for the common case that the table doesn't have a newindex metamethod to complete the write.
* | New function 'table.create'Roberto Ierusalimschy2024-01-183-2/+45
| | | | | | | | | | Creates a table preallocating memory. (It just exports to Lua the API function 'lua_createtable'.)
* | New mechanism to query GC parametersRoberto Ierusalimschy2024-01-166-27/+35
| |
* | Clear interface between references and predefinesRoberto Ierusalimschy2024-01-157-43/+92
| | | | | | | | | | The reference system has a defined way to add initial values to the table where it operates.
* | Removed uses of LUA_NUMTAGSRoberto Ierusalimschy2024-01-134-6/+4
| | | | | | | | That constant was already deprecated (see commit 6aabf4b15e7).
* | Optimizations for 'lua_rawgeti' and 'lua_rawseti'Roberto Ierusalimschy2024-01-124-49/+80
| | | | | | | | | | | | 'lua_rawgeti' now uses "fast track"; 'lua_rawseti' still calls 'luaH_setint', but the latter was recoded to avoid extra overhead when writing to the array part after 'alimit'.
* | A few more tweaks in the garbage collectorRoberto Ierusalimschy2024-01-105-14/+33
| |
* | Fixed buffers reuse absolute line informationRoberto Ierusalimschy2023-12-274-13/+36
| |
* | Several tweaks in the garbage collectorRoberto Ierusalimschy2023-12-278-56/+98
| | | | | | | | | | | | - back with step size in collectgarbage("step") - adjustments in defaults for some GC parameters - adjustments in 'luaO_codeparam'
* | Removed compatibility option LUA_COMPAT_GCPARAMSRoberto Ierusalimschy2023-12-226-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.
* | New option "setparms" for 'collectgarbage'Roberto Ierusalimschy2023-12-2213-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.
* | GC parameters encoded as floating-point bytesRoberto Ierusalimschy2023-12-208-57/+113
| | | | | | | | | | This encoding brings more precision and a larger range for these parameters.
* | Option 0 for step multiplier makes GC non-incrementalRoberto Ierusalimschy2023-12-206-50/+84
| |
* | Cleaner protocol between 'lua_dump' and writer functionRoberto Ierusalimschy2023-12-146-46/+66
| | | | | | | | | | 'lua_dump' signals to the writer function the end of a dump, so that is has more freedom when using the stack.
* | Check minor->major made at the end of a minor cycleRoberto Ierusalimschy2023-12-071-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.
* | First criteria for shifts minor<->majorRoberto Ierusalimschy2023-12-078-128/+187
| |
* | Major collections done incrementallyRoberto Ierusalimschy2023-12-064-75/+80
| | | | | | | | | | Major collections do not need to "stop the world". Still pending: criteria for shifts minor-major, shifts generational-incremental.
* | Removed macro 'changeage'Roberto Ierusalimschy2023-12-012-14/+12
| | | | | | | | | | It is simpler to use always 'setage'. The saving from 'changeage' is too irrelevant.
* | Removed parameter in 'collectgarbage("step")'Roberto Ierusalimschy2023-12-012-57/+3
| | | | | | | | A call to 'collectgarbage("step")' always performs one GC basic step.
* | Removed deprecated options in 'lua_gc'Roberto Ierusalimschy2023-11-304-39/+10
| | | | | | | | Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
* | Comments detailing the ages for generational GCRoberto Ierusalimschy2023-11-295-16/+59
| | | | | | | | Plus other comments and small details.
* | Details in the manualRoberto Ierusalimschy2023-11-241-21/+13
| |
* | Simpler coding for new representation for arraysRoberto Ierusalimschy2023-11-243-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.
* | Buffer in 'luai_makeseed' measured in bytesRoberto Ierusalimschy2023-11-152-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.
* | Default paths stored as external stringsRoberto Ierusalimschy2023-11-131-2/+3
| |
* | Auxiliary buffer uses external stringsRoberto Ierusalimschy2023-11-133-27/+40
| | | | | | | | | | The buffer system from the auxiliary library reuses its buffer as external memory when closing long strings.
* | Correct anchoring and GC barriers in 'loadString'Roberto Ierusalimschy2023-11-132-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.
* | Fixed buffers save long strings as external.Roberto Ierusalimschy2023-11-104-16/+29
| |