Roberto Ierusalimschy
8c064fdc23
Merge branch 'master' into nextversion
2023-02-02 13:47:28 -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
8dea54877a
Do not avoid major collections when GCdebt is zero
...
'collectgarbage("step")' (without an argument) does not have any
special meaning, it means "do a step with some default size".
2022-12-29 15:41:07 -03:00
Roberto Ierusalimschy
b5ab31a475
Merge branch 'master' into nextversion
2022-12-28 18:38:20 -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
140cdcced5
Merge branch 'master' into nextversion
2022-12-23 11:30:07 -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
7d4c7ae2af
Changes in opcodes for generic 'for'
...
Again, as the control variable is read only, the code doesn't need
to keep an internal copy of it.
2022-12-22 13:52:53 -03:00
Roberto Ierusalimschy
873588dc5f
Simplification in opcodes for numerical 'for'
...
As the control variable is read only, the code doesn't need to keep
an internal copy of it.
2022-12-21 15:35:40 -03:00
Roberto Ierusalimschy
b2f7b3b79f
Control variables in for loops are read only
2022-12-21 12:04:59 -03:00
Roberto Ierusalimschy
540d805226
Towards Lua 5.5
2022-12-20 13:24:43 -03:00
Roberto Ierusalimschy
7d6a97e42b
Dump doesn't need to reuse 'source'
...
All strings are being reused now, including 'source'.
2022-12-20 11:14:52 -03:00
Roberto Ierusalimschy
d70a0c91ad
Dump/undump reuse strings
...
A repeated string in a dump is represented as an index to its first
occurence, instead of another copy of the string.
2022-12-15 16:44:22 -03:00
Roberto Ierusalimschy
3e6818ca87
Merge branch 'master' into nextversion
2022-12-15 14:23:59 -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
88e5c6b80b
Merge branch 'master' into nextversion
2022-12-15 10:51:04 -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
e33e1bda97
Merge branch 'master' into nextversion
2022-12-14 16:22:43 -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
5d8b5b9290
Changed signal of GC debt
...
Positive debts seems more natural then negative ones.
2022-12-13 15:45:57 -03:00
Roberto Ierusalimschy
40565b4a08
Revamp of GC parameters
...
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
2022-12-13 11:55:14 -03:00
Roberto Ierusalimschy
ff106c028c
Merge branch 'master' into nextversion
2022-12-12 14:08:55 -03:00
Roberto Ierusalimschy
fa2f294dd1
Reduce calls to 'luaC_step' when GC is stopped
2022-12-09 16:35:19 -03:00
Roberto Ierusalimschy
d738c8d18b
New function 'luaL_openselectedlibs'
...
Makes it easier to start Lua with only some standard libraries.
2022-12-07 15:12:52 -03:00
Roberto Ierusalimschy
0270c204c2
Simplification in handling of GC debt
...
Each incremental step has always the same size (stepsize), and the
debt for next step also is always the same.
2022-12-06 12:02:34 -03:00
Roberto Ierusalimschy
82fae58e25
Details
...
Parentheses and comments.
2022-12-02 11:33:09 -03:00
Roberto Ierusalimschy
efc7c5d503
Merge branch 'master' into nextversion
2022-12-01 09:51:07 -03:00
Roberto Ierusalimschy
d324a0ccf9
Simpler control for major collections
2022-11-29 10:37:08 -03:00
Roberto Ierusalimschy
152b51955a
Removed GC checks from function calls
...
Function calls do not create new objects. (It may use memory with
stack reallocation, but now that is irrelevant to the GC.)
2022-11-24 10:20:15 -03:00
Roberto Ierusalimschy
ec61be9a7e
'l_mem' renamed to 'l_obj' to count objects
2022-11-23 17:29:03 -03:00
Roberto Ierusalimschy
f356d5acdd
First version of GC counting objects for control
...
Still needs to review generational mode.
2022-11-23 17:17:20 -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
76953316d1
Added a counter of the total number of existing objects
...
It may simplify the control of the garbage collector.
2022-11-03 16:37:13 -03:00
Roberto Ierusalimschy
3d2bd1359d
Merge branch 'master' into nextversion
2022-11-01 17:17:21 -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
8047b2d03e
Tables have a 'lastfree' information only when needed
...
Only tables with some minimum number of entries in their hash part
have a 'lastfree' field, kept in a header before the node vector.
2022-11-01 15:42:08 -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
Roberto Ierusalimschy
a1089b415a
Bug: 'utf8.codes' accepts spurious continuation bytes
2022-09-23 10:41:16 -03:00