aboutsummaryrefslogtreecommitdiff
path: root/manual/manual.of (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-06-28New instruction format for SETLIST/NEWTABLERoberto Ierusalimschy7-47/+97
New instruction format 'ivABC' (a variant of iABC where parameter vC has 10 bits) allows constructors of up to 1024 elements to be coded without EXTRAARG.
2024-06-27'isIT'/'isOT' turned from macros to functionsRoberto Ierusalimschy6-14/+38
2024-06-27Flexible limit for use of registers by constructorsRoberto Ierusalimschy5-7/+31
Instead of a fixed limit of 50 registers (which, in a bad worst case, can limit the nesting of constructors to 5 levels), the compiler computes an individual limit for each constructor based on how many registers are available when it runs. This limit then controls the frequency of SETLIST instructions.
2024-06-26Clearer code for controlling maximum registersRoberto Ierusalimschy3-10/+28
Plus, added a test to check that limit.
2024-06-24Length of external strings must fit in Lua integerRoberto Ierusalimschy4-4/+9
(As the length of any string in Lua.)
2024-06-21Details in the manualRoberto Ierusalimschy1-4/+9
2024-06-21Removed 'int' size limit for string.repRoberto Ierusalimschy2-16/+5
2024-06-21Removed 'int' size limit for pack/unpackRoberto Ierusalimschy2-38/+48
2024-06-21lua_writestring & co. moved to llimits.hRoberto Ierusalimschy4-32/+25
They don't need to be visible by clients of Lua.
2024-06-20llimits.h being used by all Lua codeRoberto Ierusalimschy14-73/+48
The definitions in llimits.h are useful not only for the core. That header only defines types and '#define's, so libs and core still do not share any real code/data.
2024-06-20Cleaning of llimits.hRoberto Ierusalimschy19-165/+159
Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places.
2024-06-18GC test was not restarting collector after pauseRoberto Ierusalimschy1-1/+2
2024-06-12Tricky _PROMPT may trigger undefined behavior in lua.cRoberto Ierusalimschy1-2/+3
2024-06-12Bug: luaL_traceback may need more than 5 stack slotsRoberto Ierusalimschy3-1/+20
2024-06-12Bug: overlapping assignmentsRoberto Ierusalimschy1-2/+4
ISO C forbids assignment of a union field to another field of the same union.
2024-06-12More disciplined use of 'errno'Roberto Ierusalimschy3-10/+33
Set errno to zero before calling any function where we may use its errno, and check errno for zero before using it (as functions may not set it even in error). The code assumes that no function will put garbage on errno (although ISO C allows that): If any function during an operation set errno, and the operation result in an error, assume that errno has something to say.
2024-06-10Encoding of table indices (hres) must use C indicesRoberto Ierusalimschy4-24/+30
As the encoding of array indices is (~index), 0 is encoded as -1 and INT_MAX is encoded as INT_MIN.
2024-06-04Bug: Active-lines for stripped vararg functionsRoberto Ierusalimschy3-23/+34
Lua seg. faults when asked to create the 'activelines' table for a vararg function with no debug information.
2024-06-04Manual for 'string.format' lists what it acceptsRoberto Ierusalimschy1-3/+6
Instead of listing what it does not accept, which is always relative.
2024-05-27utf8.offset returns also final position of characterRoberto Ierusalimschy3-31/+55
'utf8.offset' returns two values: the initial and the final position of the given character.
2024-05-23Manual: errors in lua_toclose are not memory errorsRoberto Ierusalimschy3-3/+6
2024-05-08DetailsRoberto Ierusalimschy9-21/+36
Corrections in comments and manual. Added note in the manual about local variables in the REPL.
2024-05-02New year (2024)Roberto Ierusalimschy2-3/+3
2024-04-08'getmode' renamed to 'getMode'Roberto Ierusalimschy1-3/+3
The name 'getmode' conficts with a function from BSD, defined in <unistd.h>. Although 'lbaselib.c' cannot include that header, 'onelua.c' can.
2024-04-05Yet another representation for arraysRoberto Ierusalimschy3-44/+65
This "linear" representation (see ltable.h for details) has worse locality than cells, but the simpler access code seems to compensate that.
2024-04-03Small simplification in 'findloader'Roberto Ierusalimschy1-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.
2024-03-29Fixed dangling 'StkId' in 'luaV_finishget'Roberto Ierusalimschy5-26/+42
Bug introduced in 05932567.
2024-03-28DetailsRoberto Ierusalimschy2-7/+10
2024-03-22Some 'unsigned int' changed to 'unsigned'Roberto Ierusalimschy9-25/+24
'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...)
2024-03-21'luaH_get' functions return tag of the resultRoberto Ierusalimschy10-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.
2024-03-18'luaH_get' functions return 'TValue'Roberto Ierusalimschy9-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.)
2024-03-15Removed "bulk operations"Roberto Ierusalimschy3-57/+14
Negligible performance gains don't justify extra complexity.
2024-03-15Added "bulk operations" to arraysRoberto Ierusalimschy3-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).
2024-03-13DetailsRoberto Ierusalimschy4-6/+5
- 'unsigned int' -> 'unsigned' - Some explicit casts to avoid warnings - Test avoids printing the value of 'fail' (which may not be nil)
2024-03-13Removed type 'varint_t'Roberto Ierusalimschy3-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.)
2024-03-11API asserts for illegal pops of to-be-closed variablesRoberto Ierusalimschy5-30/+45
2024-02-15Fixed warnings from different compilersRoberto Ierusalimschy4-6/+10
2024-02-15New interface to function 'luaL_openselectedlibs'Roberto Ierusalimschy8-56/+80
Instead of preloading all non-loaded libraries, there is another mask to select which libraries to preload.
2024-02-12Revising code for Varint encoding in dumpsRoberto Ierusalimschy3-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.
2024-02-07Removed deprecated function 'setcstacklimit'Roberto Ierusalimschy3-16/+0
2024-02-07Field 'lastfree' changed (back) to 'Node *'Roberto Ierusalimschy1-14/+16
Due to allignment, it is already using the space of a pointer, and a pointer generates slightly simpler code.
2024-02-07Better handling of size limit when resizing a tableRoberto Ierusalimschy6-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.)
2024-01-29DetailsRoberto Ierusalimschy7-24/+25
2024-01-25Small optimization in 'luaH_psetint'Roberto Ierusalimschy2-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.
2024-01-18New function 'table.create'Roberto Ierusalimschy3-2/+45
Creates a table preallocating memory. (It just exports to Lua the API function 'lua_createtable'.)
2024-01-16New mechanism to query GC parametersRoberto Ierusalimschy6-27/+35
2024-01-15Clear interface between references and predefinesRoberto Ierusalimschy7-43/+92
The reference system has a defined way to add initial values to the table where it operates.
2024-01-13Removed uses of LUA_NUMTAGSRoberto Ierusalimschy4-6/+4
That constant was already deprecated (see commit 6aabf4b15e7).
2024-01-12Optimizations for 'lua_rawgeti' and 'lua_rawseti'Roberto Ierusalimschy4-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'.
2024-01-11Bug: Yielding in a hook stops in the wrong instructionRoberto Ierusalimschy3-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.