aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Table rehash can resize only the hash partRoberto Ierusalimschy2024-10-282-17/+41
| | | | | | | If there are no integer keys outside the array part, there is no reason to resize it, saving the time to count its elements. Moreover, assignments to non-integer keys will not collapse a table created with 'table.create'.
* Always use unsigned int for indexing table-arraysRoberto Ierusalimschy2024-10-242-5/+5
|
* New function 'lua_numbertostrbuff'Roberto Ierusalimschy2024-10-237-40/+67
| | | | | It converts a Lua number to a string in a buffer, without creating a new Lua string.
* Some changes in default GC parametersRoberto Ierusalimschy2024-10-232-8/+6
|
* Small bug in 'luaE_luaE_statesize'Roberto Ierusalimschy2024-10-213-4/+4
| | | | Plus, function was renamed to 'luaE_threadsize'.
* Better support in 'ltests' for tracing the GCRoberto Ierusalimschy2024-10-215-30/+67
|
* Some adjustments in transition minor->majorRoberto Ierusalimschy2024-10-182-37/+46
| | | | Plus extra comments and other details.
* 'objsize' broke in smaller piecesRoberto Ierusalimschy2024-09-309-63/+91
|
* Local declaration in the REPL generates a warningRoberto Ierusalimschy2024-09-272-2/+25
|
* No errors in 'luaO_pushvfstring'Roberto Ierusalimschy2024-09-205-24/+45
| | | | | | Any call to 'va_start' must have a corresponding call to 'va_end'; so, functions called between them (luaO_pushvfstring in particular) cannot raise errors.
* Towards no errors in 'luaO_pushvfstring'Roberto Ierusalimschy2024-09-201-52/+69
| | | | | | Any call to 'va_start' must have a corresponding call to 'va_end'; so, functions called between them (luaO_pushvfstring in particular) cannot raise errors.
* In 'luaO_pushvfstring', all options use 'addstr2buff'Roberto Ierusalimschy2024-09-201-12/+8
|
* Removed 'if' left from commit ddfa1fbccfeRoberto Ierusalimschy2024-09-201-1/+0
|
* Avoid Microsoft warningRoberto Ierusalimschy2024-09-191-1/+2
| | | | | > warning C4334: '<<': result of 32-bit shift implicitly converted to > 64 bits (was 64-bit shift intended?)
* USHRT_MAX changed to SHRT_MAXRoberto Ierusalimschy2024-09-192-2/+2
| | | | USHRT_MAX does not fit in an 'int' in 16-bit systems.
* GC back to controling pace counting bytesRoberto Ierusalimschy2024-09-1911-202/+247
| | | | Memory is the resource we want to save. Still to be reviewed again.
* DetailsRoberto Ierusalimschy2024-09-121-3/+3
| | | | Fixed comments in sort partition.
* Parameter for lua_gc/LUA_GCSTEP changed to 'size_t'Roberto Ierusalimschy2024-09-103-3/+3
| | | | | 'size_t' is the common type for measuring memory. 'int' can be too small for steps.
* Rename of fields in global state that control GCRoberto Ierusalimschy2024-09-065-32/+32
| | | | | All fields in the global state that control the pace of the garbage collector prefixed with 'GC'.
* DetailsRoberto Ierusalimschy2024-09-063-20/+20
| | | | Identation + comments
* Added option for direct correction of stack pointersRoberto Ierusalimschy2024-08-221-10/+44
| | | | | | | | | | The use of a pointer (not access, only for computations) after its deallocation is forbiden in ISO C, but seems to work fine in all platforms we are aware of. So, using that to correct stack pointers after a stack reallocation seems safe and is much simpler than the current implementation (first change all pointers to offsets and then changing the offsets back to pointers). Anyway, for now that option is disabled.
* 'lcode.c' can use 'checklimit', tooRoberto Ierusalimschy2024-08-203-12/+10
|
* A return can have at most 254 valuesRoberto Ierusalimschy2024-08-192-0/+13
|
* Bug: wrong code gen. for indices with comparisonsRoberto Ierusalimschy2024-08-172-1/+10
| | | | | | | In function 'luaK_exp2val', used to generate code for indices: Macro 'hasjumps' does not consider the case when the whole expression is a "jump" (a test). In all other of its uses, the surrounding code ensures that the expression cannot be VJMP.
* Floats formatted with "correct" precisionRoberto Ierusalimschy2024-08-023-21/+153
| | | | | | Conversion float->string ensures that, for any float f, tonumber(tostring(f)) == f, but still avoiding noise like 1.1 converting to "1.1000000000000001".
* Struct 'transferinfo' moved to "lua_State"Roberto Ierusalimschy2024-07-303-24/+16
| | | | | | That reduces the size of "CallInfo". Moreover, bit CIST_HOOKED from call status is not needed. When in a hook, 'transferinfo' is always valid, being zero when the hook is not call/return.
* '-Wconversion' extended to all options of Lua numbersRoberto Ierusalimschy2024-07-278-39/+50
|
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-2744-359/+398
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* 'nresults' moved into 'callstatus'Roberto Ierusalimschy2024-07-216-62/+79
| | | | That gives us more free bits in 'callstatus', for future use.
* Using CIST_CLSRET instead of trick with 'nresults'Roberto Ierusalimschy2024-07-194-30/+31
| | | | | The callstatus flag CIST_CLSRET is used in all tests for the presence of variables to be closed in C functions.
* Explicit limit for number of results in a callRoberto Ierusalimschy2024-07-183-4/+17
| | | | | | The parameter 'nresults' in 'lua_call' and similar functions has a limit of 250. It already had an undocumented (and unchecked) limit of SHRT_MAX, but it is seldom larger than 2.
* Maximum stack size may not fit in unsigned shortRoberto Ierusalimschy2024-07-165-28/+46
| | | | | | Therefore, fields ftransfer/ntransfer in lua_Debug must have type 'int'. (Maximum stack size must fit in an 'int'.) Also, this commit adds check that maximum stack size respects size_t for size in bytes.
* Removed compatibility with "= exp" in the REPLRoberto Ierusalimschy2024-07-052-5/+2
|
* Fixed bug in 'multiline'Roberto Ierusalimschy2024-07-052-14/+19
| | | | | | 'incomplete' was popping error message that should be used in case there is no more lines to complete the input, that is, 'pushline' returns NULL, due to end of file.
* 'printstack' (from ltests.c) made publicRoberto Ierusalimschy2024-07-052-3/+7
| | | | That function is useful for debugging the API.
* lua.c loads 'readline' dynamicallyRoberto Ierusalimschy2024-07-044-29/+90
| | | | | | | (See comments in luaconf.h.) This change allows easier compilation, as Lua compiles and works even if the package 'readline' is absent from the system. Moreover, non-interactive uses don't load the library, making the stand-alone slightly faster for small loads.
* Small changes in casts from void* to functionsRoberto Ierusalimschy2024-07-022-22/+26
| | | | | | Macro moved to llimits.h, and casts from void* to lua_CFunction first go through 'voidf' (a pointer to a function from void to void), a kind of void* for functions.
* Updated dependencies in the make fileRoberto Ierusalimschy2024-07-011-15/+23
| | | | Mainly to include 'llimits.h' in the non-kernel files
* New instruction format for SETLIST/NEWTABLERoberto Ierusalimschy2024-06-287-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.
* 'isIT'/'isOT' turned from macros to functionsRoberto Ierusalimschy2024-06-276-14/+38
|
* Flexible limit for use of registers by constructorsRoberto Ierusalimschy2024-06-275-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.
* Clearer code for controlling maximum registersRoberto Ierusalimschy2024-06-263-10/+28
| | | | Plus, added a test to check that limit.
* Length of external strings must fit in Lua integerRoberto Ierusalimschy2024-06-244-4/+9
| | | | (As the length of any string in Lua.)
* Details in the manualRoberto Ierusalimschy2024-06-211-4/+9
|
* Removed 'int' size limit for string.repRoberto Ierusalimschy2024-06-212-16/+5
|
* Removed 'int' size limit for pack/unpackRoberto Ierusalimschy2024-06-212-38/+48
|
* lua_writestring & co. moved to llimits.hRoberto Ierusalimschy2024-06-214-32/+25
| | | | They don't need to be visible by clients of Lua.
* llimits.h being used by all Lua codeRoberto Ierusalimschy2024-06-2014-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.
* Cleaning of llimits.hRoberto Ierusalimschy2024-06-2019-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.
* GC test was not restarting collector after pauseRoberto Ierusalimschy2024-06-181-1/+2
|