Roberto Ierusalimschy
6baee9ef9d
Removed test for "corrupted binary dump"
...
Test is too non portable. (For instance, it does not work for
different number types.)
2023-09-08 16:19:21 -03:00
Roberto Ierusalimschy
edd8589f47
Avoid casts from unsigned long to floating-point
...
Old Microsoft compilers do not support those casts.
2023-09-08 11:34:39 -03:00
Roberto Ierusalimschy
07a9eab23a
Cannot use 'getshrstr' before setting 'shrlen'
2023-08-25 15:55:14 -03:00
Roberto Ierusalimschy
9363a8b990
Documentation for "LUA_NOENV"
...
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-23 13:50:38 -03:00
Roberto Ierusalimschy
5ab6a5756b
Bug: Wrong line number for function calls
2023-08-23 13:49:27 -03:00
Roberto Ierusalimschy
9b4f39ab14
More disciplined use of 'getstr' and 'tsslen'
...
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-17 15:59:28 -03:00
Roberto Ierusalimschy
f4211a5ea4
More control over encoding of test files
...
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-08-17 10:42:56 -03:00
Roberto Ierusalimschy
1b3f507f62
Bug: Call hook may be called twice when count hook yields
...
Took the opportunity and moved the code that controls call hooks
in 'luaV_execute' into a function.
2023-07-25 16:50:44 -03:00
Roberto Ierusalimschy
6b51133a98
Thread stacks resized in the atomic phase
...
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-13 14:55:46 -03:00
Roberto Ierusalimschy
cbae016202
Details
2023-07-03 14:12:54 -03:00
Roberto Ierusalimschy
ea39042e13
Removed redundancy in definitions of version/release
...
String rendering now derived from the numeric original definitions.
2023-06-21 15:04:24 -03:00
Roberto Ierusalimschy
05ec55f16b
Avoid inclusion loop in 'ltm.h'
2023-06-16 11:52:14 -03:00
Roberto Ierusalimschy
f623b96932
Bug: read overflow in 'l_strcmp'
...
Equality according to 'strcoll' does not imply that strings have
the same length.
2023-06-14 14:38:07 -03:00
Roberto Ierusalimschy
9be74ccc21
Several functions turned 'static'
...
Several functions that were already being used only inside their
own file have been declared as 'static'.
2023-05-22 14:47:54 -03:00
Roberto Ierusalimschy
09f3c2372f
Option '-l' discards version sufix from file name
...
Like 'require', the command-line option '-l' discards an optional
version suffix (everything after an hyphen) from a file name when
creating the module name.
2023-05-15 13:46:38 -03:00
Roberto Ierusalimschy
c197885cb0
Small improvements in tests
2023-05-15 10:20:13 -03:00
Roberto Ierusalimschy
934e77a286
Details
...
- Better comments about short strings in opcodes.
- luaH_newkey made static.
2023-05-15 10:07:25 -03:00
Roberto Ierusalimschy
6443185167
"Emergency" new version 5.4.6
...
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
2023-05-02 16:41:43 -03:00
Roberto Ierusalimschy
e15f1f2bb7
Details
...
Typos in comments and details in the manual.
2023-04-18 09:44:10 -03:00
Roberto Ierusalimschy
b5c65705ca
New year (2023)
...
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
2023-03-31 11:47:31 -03:00
Roberto Ierusalimschy
7ca8105a2e
More orderliness in casts of enumerations
2023-03-27 16:29:39 -03:00
Roberto Ierusalimschy
94689ac3ad
More regularity in uses of enums in 'lcode.c'
2023-03-24 15:52:03 -03:00
Roberto Ierusalimschy
ab859fe59b
Bug: Loading a corrupted binary file can segfault
...
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-17 15:52:09 -03:00
Roberto Ierusalimschy
c4b71b7ba0
Details
...
Comments in 'onelua.c'
2023-03-09 11:12:11 -03:00
Roberto Ierusalimschy
1de2f31694
Corrected support for 16-bit systems
...
We still need access to a 16-bit system to correctly test
these changes.
2023-03-09 11:10:04 -03:00
Roberto Ierusalimschy
02bab9fc25
Bug: Wrong line in error message for arith. errors
...
It also causes 'L->top' to be wrong when the error happens,
triggering an 'assert'.
2023-02-08 14:15:41 -03:00
Roberto Ierusalimschy
5e08b41567
Simpler definition for LUA_STRFTIMEOPTIONS
...
There is no need for those intermediate definitions.
2023-02-07 10:48:39 -03:00
Roberto Ierusalimschy
cf08915d62
New macro LUA_USE_IOS
...
Do not try to detect automatically whether system is iOS; it is
simpler and more reliable to let the programmer inform that.
2023-02-02 13:43:41 -03:00
Roberto Ierusalimschy
c888ae0aea
Small changes in hash of pointers
...
When converting from pointer to integer, use 'uintptr_t' if available;
otherwise try 'uintmax_t', and use 'size_t' as last resource.
2023-02-02 13:37:11 -03:00
Roberto Ierusalimschy
d69789da1c
Fix absence of 'system' in iOS
...
Despite claiming to be ISO, the C library in some Apple platforms
does not implement 'system'.
2023-01-24 15:04:17 -03:00
Roberto Ierusalimschy
314745ed84
Avoid excessive name pollution in test files
...
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-28 18:34:11 -03:00
Roberto Ierusalimschy
0825cf237d
Detail in make file for testes/libs
...
Everything depends on the Lua version (as given by 'lua.h')
2022-12-23 11:28:11 -03:00
Roberto Ierusalimschy
f874d37fa2
Small change in barrier macros
...
Reuse macros for objects when defining the macros for values.
2022-12-15 14:18:03 -03:00
Roberto Ierusalimschy
35e01ed21d
Small improvements in 'lmem.c'
...
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-15 10:44:55 -03:00
Roberto Ierusalimschy
6aabf4b15e
Details in some header files
...
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) +
better handling of some inclusion loops.
2022-12-14 16:20:39 -03:00
Roberto Ierusalimschy
fa2f294dd1
Reduce calls to 'luaC_step' when GC is stopped
2022-12-09 16:35:19 -03:00
Roberto Ierusalimschy
82fae58e25
Details
...
Parentheses and comments.
2022-12-02 11:33:09 -03:00
Roberto Ierusalimschy
9a77f57edc
Stop GC while building initial state
2022-11-23 14:17:28 -03:00
Roberto Ierusalimschy
be908a7d4d
Removed unused field 'UpVal.tbc'
2022-11-08 10:15:10 -03:00
Roberto Ierusalimschy
9ede317c70
Threads are created like other objects
...
Using a version of 'luaC_newobj' that allows offsets (extra space
before the object itself).
2022-11-01 17:14:01 -03:00
Roberto Ierusalimschy
ee645472eb
Stack reallocation done with a single realloc
...
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-31 15:06:20 -03:00
Roberto Ierusalimschy
413a393e62
Stack indices changed to union's
...
That will allow to change pointers to offsets while reallocating
the stack.
2022-10-29 12:06:37 -03:00
Roberto Ierusalimschy
ba089bcb08
Details
...
Added comments in the makefile about other useful '-fsanitize' options.
2022-10-26 10:15:09 -03:00
Roberto Ierusalimschy
1e64c1391f
Bug: stack overflow with nesting of coroutine.close
2022-10-25 16:44:06 -03:00
Roberto Ierusalimschy
b85816b9a8
Removed test function 'luaH_isdummy'
...
It was not being used anywhere.
2022-10-21 09:18:13 -03:00
Roberto Ierusalimschy
c954db3924
Option '-l g=mod' added to the manual
...
Plus some other improvements in the manual.
2022-10-19 16:30:39 -03:00
Roberto Ierusalimschy
14d2803e55
Details
...
Some cast operations rewritten to use respective macros.
2022-10-19 16:29:54 -03:00
Roberto Ierusalimschy
7f12bf40c4
Portability issue in a test for 'string.format'
2022-10-19 16:20:11 -03:00
Roberto Ierusalimschy
26be27459b
Negation in constant folding of '>>' may overflow
2022-09-23 11:08:10 -03:00
Roberto Ierusalimschy
cfbe378f90
Small simplification in overflow check in 'getfield'
...
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-23 10:57:35 -03:00