Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
2a21f6c894
'lua_Kcontext' -> 'lua_KContext'
2014-10-07 15:29:13 -03:00
Roberto Ierusalimschy
e14a02c24f
when thread yields, real "func" is in field 'extra', not in 'func'
2014-10-06 14:06:49 -03:00
Roberto Ierusalimschy
798660c9cd
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
2014-10-01 08:54:56 -03:00
Roberto Ierusalimschy
3a15c7ce43
size for array part of a table ('sizearray') changed from 'int' to
...
'unsigned int', which allows twice as many elements in the array part
2014-09-04 15:15:29 -03:00
Roberto Ierusalimschy
22952d8973
'T.gccolor' classify dead objects too
2014-09-01 14:58:55 -03:00
Roberto Ierusalimschy
2be88d5084
'lua_Ctx' -> 'lua_Kcontext'
2014-08-01 14:33:08 -03:00
Roberto Ierusalimschy
73ad16b5c6
no need for type 'pCallInfo'
2014-07-23 13:44:30 -03:00
Roberto Ierusalimschy
3c6d0aaa7d
'iswhite' and related macros now can work directly on any object
...
(no need to convert to 'GCObject')
2014-07-19 12:14:46 -03:00
Roberto Ierusalimschy
bb12903120
type 'Udata' refers directly to structure inside the union (union
...
used only for aligning purposes now)
2014-07-18 11:46:47 -03:00
Roberto Ierusalimschy
ca41b43f53
type 'TString' refers directly to the structure inside the union
...
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
56137d58ff
added check for conversion 'obj2gco' (and corrections for small
...
problems detected by this check)
2014-07-18 09:17:54 -03:00
Roberto Ierusalimschy
9aec500a26
no need for field 'gch' anymore
2014-07-17 14:27:49 -03:00
Roberto Ierusalimschy
1aa4f69b51
new type 'lua_Ctx' for continuation-function contexts (to allow type
...
to be configurable)
2014-07-17 10:53:37 -03:00
Roberto Ierusalimschy
c229ed597f
'requiref' checks 'package.loaded' before loading a module
2014-07-16 11:51:36 -03:00
Roberto Ierusalimschy
a77d263e86
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
...
deprecated
2014-06-26 15:38:28 -03:00
Roberto Ierusalimschy
d2ab1aef31
detail (avoid too large macro)
2014-06-19 15:29:30 -03:00
Roberto Ierusalimschy
3fc25ff15b
macro 'checkobjref' accepts NULL (as all its uses checked for NULL
...
before) + user value from a userdata may not be a GC object
2014-06-17 14:13:29 -03:00
Roberto Ierusalimschy
6f6fd96e3b
new type lua_KFunction + no more 'lua_getctx'
2014-06-10 14:41:38 -03:00
Roberto Ierusalimschy
5a5a834975
new API function 'lua_rotate'
2014-05-13 16:40:28 -03:00
Roberto Ierusalimschy
a09bd59615
'T.totalmem' accepts 0 for unlimited memory
2014-05-08 16:08:46 -03:00
Roberto Ierusalimschy
5c46b7b8cf
instructions in 'runC' sorted alphabetically + new instructions
...
'tointeger'/'tounsigned'
2014-04-14 15:42:44 -03:00
Roberto Ierusalimschy
c86b9da022
userdata can have any Lua value as uservalue
2014-02-19 10:52:42 -03:00
Roberto Ierusalimschy
3f78de256e
no need to keep threads in a different GC list, now that there is the
...
'twups' list
2014-02-18 10:46:26 -03:00
Roberto Ierusalimschy
ffa96d988d
field 'op' renamed to 'open'
2014-02-15 11:12:01 -02:00
Roberto Ierusalimschy
733c58595b
no more local collection
2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
ba3586cc90
keep a single list of objects to be finalized (with local and non-local
...
objects), to ensure finalization order
2014-02-11 10:18:12 -02:00
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor),
...
and '~' (bxor)
2013-12-18 12:12:03 -02:00
Roberto Ierusalimschy
a948054a19
new order for binary operations (grouping them by type of result)
2013-12-16 17:06:52 -02:00
Roberto Ierusalimschy
4eeb1831be
new names and better order for GC states (sweep first lists that
...
can have dead objects)
2013-09-11 11:47:08 -03:00
Roberto Ierusalimschy
dd373a8f66
threads are kept in a separated GC list, linked after the main thread
2013-09-11 11:09:55 -03:00
Roberto Ierusalimschy
d8aa8dd97e
objects in list 'tobefnz' have a GC life-cycle like all others
...
(specifically they are cleaned during sweep phase)
2013-09-11 09:47:48 -03:00
Roberto Ierusalimschy
79ab21be90
more invariants added to memory check
2013-09-11 09:26:14 -03:00
Roberto Ierusalimschy
d3bbb34c24
back to open hashing for the string table (but with a different
...
'hnext' field, to strings are still collected like all other
objects)
2013-09-05 16:31:49 -03:00
Roberto Ierusalimschy
0ad15fc100
better (and correct!) control of 'maybedead'
2013-09-04 12:34:24 -03:00
Roberto Ierusalimschy
aeff4f79fa
local collection now calls finalizers
2013-09-03 12:37:10 -03:00
Roberto Ierusalimschy
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
2013-08-30 16:14:26 -03:00
Roberto Ierusalimschy
90972ff136
LOCALBLACK changed to LOCALMARK and used also to control whether object
...
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
2013-08-27 17:04:00 -03:00
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
742b7377d3
Lua closures go to local, too
2013-08-26 09:41:10 -03:00
Roberto Ierusalimschy
33c49f7fa0
some details over new implementation of string table
2013-08-22 12:21:48 -03:00
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
...
strings live in 'normal' GC lists
2013-08-21 16:21:16 -03:00
Roberto Ierusalimschy
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
...
control)
2013-08-20 14:46:34 -03:00
Roberto Ierusalimschy
8e6b7ef9ab
new function 'isgclocal' + test for GC consistency of prototype's caches
2013-08-19 11:16:33 -03:00
Roberto Ierusalimschy
caceeab750
'next' field for tables changed from pointer to integer (for better
...
alignment on 64-bit machines)
2013-08-18 13:12:18 -03:00
Roberto Ierusalimschy
3991312b94
details
2013-08-16 16:02:31 -03:00
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
623e388bb4
double-linked list of all upvalues elliminated and changed to a
...
traversal of all non-marked threads
2013-08-07 09:18:11 -03:00
Roberto Ierusalimschy
677d90165f
no more generational collection !!!
2013-08-05 13:58:28 -03:00
Roberto Ierusalimschy
81102d3689
try to avoid warnings when converting int to pointer
2013-06-20 18:59:13 -03:00
Roberto Ierusalimschy
0ce3018109
'pushnum' pushes a "number" (float) + new C instruction 'pushint'
2013-05-07 16:01:16 -03:00
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy
52cb90ec75
detail
2013-04-24 16:41:48 -03:00
Roberto Ierusalimschy
75250a237c
typos in comments
2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy
86b39206d9
open upvalues cannot be old if thread is not old; when thread is old,
...
their list is not traversed anymore, and therefore can contain dead
elements.
2012-10-03 09:36:46 -03:00
Roberto Ierusalimschy
a3e1c40d6d
remove of unecessary luaD_checkstack. (In some cases, C should
...
ensure stack space; in others, Lua can use the extra slots for
temporary values.)
2012-08-16 14:34:28 -03:00
Roberto Ierusalimschy
e4f609d0ee
collector in generational mode must be in 'propagate' state when
...
not running a collection
2012-07-04 12:52:38 -03:00
Roberto Ierusalimschy
5ac56a94dd
collector in generational mode should never be in 'pause' state
2012-07-02 12:38:36 -03:00
Roberto Ierusalimschy
43bfb60ac8
new auxiliary function 'luaI_printinst' (to print a single instruction)
2012-06-07 15:52:47 -03:00
Roberto Ierusalimschy
01e5f358bd
small improvement in lua_checkmemory (only allow dead objects in
...
part of the sweep list not yet sweeped)
2012-05-31 17:25:42 -03:00
Roberto Ierusalimschy
69c775de21
update of 'lua_checkmemory'
2012-05-30 13:40:29 -03:00
Roberto Ierusalimschy
3cadc37f47
no more 'Proto' objects on the stack. Protos are anchored on outer
...
Protos or on a Closure, which must be created before the Proto.
2012-05-08 10:53:33 -03:00
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
fd22ccd6d0
object tag keeps variant bits too -> no need for 'isC' field in
...
Closures + more strick typing for closure variants
2012-01-20 20:05:50 -02:00
Roberto Ierusalimschy
e0e406ead3
extra argument to instruction 'checkstack' (in 'testC')
2011-11-09 17:08:07 -02:00
Roberto Ierusalimschy
5645a84368
detail about 'trick' function (nil turn it off)
2011-09-24 18:11:29 -03:00
Roberto Ierusalimschy
3dc5475e23
'nCcalls' should be local to each thread, as each thread may have its
...
own C stack (with LuaThreads or something similar)
2011-08-23 14:24:34 -03:00
Roberto Ierusalimschy
88c29c0cd5
compilation warning about integer size x pointer size
2011-07-02 12:59:17 -03:00
Roberto Ierusalimschy
29644366fc
useless assignments removed (macros already do the assignment)
2011-06-24 11:36:21 -03:00
Roberto Ierusalimschy
3b44821334
stricter control (using tag variants) over closure kinds (Lua x C)
2011-06-02 16:31:40 -03:00
Roberto Ierusalimschy
aa13c591f5
avoid use of 'ifdef/ifndef'; use 'defined' instead (simpler and
...
more powerful)
2011-05-25 11:12:28 -03:00
Roberto Ierusalimschy
e4076fe6d9
break long assertion in two shorter ones
2011-05-05 13:18:53 -03:00
Roberto Ierusalimschy
19fbdf6cae
'luaL_findtable' -> 'luaL_getsubtable'
2011-04-08 16:17:36 -03:00
Roberto Ierusalimschy
75d8470f0f
new macro 'cast_uchar'
2010-12-10 11:40:22 -02:00
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy
50334faad6
no more compatibility with (veryyyy) old ref system
2010-11-16 15:43:29 -02:00
Roberto Ierusalimschy
d447945685
'module'/'luaL_register' and associates are deprecated
2010-07-28 12:51:59 -03:00
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
...
themselves with 'require' (let 'require' do its work); new auxiliary
functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref.
Old luaL_register will be deprecated.
2010-07-02 08:38:13 -03:00
Roberto Ierusalimschy
d9ea6eca7c
macro 'key2tal' replaced by 'gkey' (as both were equal)
2010-06-25 09:18:10 -03:00
Roberto Ierusalimschy
bd262d591f
'coroutine' library separated from 'baselib'
2010-06-10 18:30:26 -03:00
Roberto Ierusalimschy
3d80aeab5a
lua_pushstring may reallocate the stack, making 'o' a dangling
...
pointer
2010-05-17 17:10:17 -03:00
Roberto Ierusalimschy
69ba1ac441
new "instruction" 'absindex'
2010-05-14 10:15:54 -03:00
Roberto Ierusalimschy
de0f51a02c
wrong type being assigned (not detected because of obj2gco macro)
2010-05-11 17:48:36 -03:00
Roberto Ierusalimschy
0567221848
udata in 'tobefnz' list be have old bit on (it will be cleared
...
when udata is moved to 'allgc' list)
2010-05-10 15:24:36 -03:00
Roberto Ierusalimschy
fa2ddb070a
details (to avoid too long strings in assertions)
2010-05-07 15:23:17 -03:00
Roberto Ierusalimschy
9c1347e647
more tests in 'lua_checkmemory' + more information in function
...
'gccolor'
2010-05-07 15:09:23 -03:00
Roberto Ierusalimschy
8c583c61a3
more tests in 'lua_checkmemory'
2010-05-06 15:16:57 -03:00
Roberto Ierusalimschy
0c27de2e7b
no more 'finalize' phase in GC; finalizers are called along the
...
entire cycle
2010-05-03 14:33:39 -03:00
Roberto Ierusalimschy
d25f7f9d78
items in 'tobefnz' are kept black (as before recent change) and changed
...
to white only when needed (being moved to 'allgc' when not keeping
invariant).
2010-05-03 08:55:40 -03:00
Roberto Ierusalimschy
4d871ee973
"gray lists" only need to be valid when 'keepinvariant' is true
2010-04-30 15:37:14 -03:00
Roberto Ierusalimschy
5d79c6684b
removed commented-out debugging code
2010-04-29 18:42:33 -03:00
Roberto Ierusalimschy
ee7478e884
improved 'lua_checkmemory', with better control over gray objects
2010-04-29 14:33:51 -03:00
Roberto Ierusalimschy
973d81efb3
complete control over number of each kind of object allocated
2010-04-19 13:38:25 -03:00
Roberto Ierusalimschy
1e6940f291
'gcstate' now also runs collector until given state + small changes
...
in 'testC' to test 'lua_topointer' and 'lua_tocfunction'
2010-04-16 14:42:49 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
b2dd246b7a
better control in 'totalmem' over choosing counters
2010-04-12 13:07:39 -03:00
Roberto Ierusalimschy
d41b467320
check memory allows strings to live in the main GC list (it should
...
work ok).
2010-04-12 09:42:07 -03:00
Roberto Ierusalimschy
a8d3aa14fd
global table now is only kept in the registry
2010-03-29 14:43:14 -03:00
Roberto Ierusalimschy
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
3aa9598177
'mainthread' is not inserted in the 'allgc' list anymore, but swept
...
separately.
2010-03-25 10:06:36 -03:00
Roberto Ierusalimschy
4433dbb5f5
userdata with finalizers are kept in a separated list ('udgc'), instead
...
of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
2010-03-24 10:07:01 -03:00
Roberto Ierusalimschy
070d3743a7
"no value" added to array luaT_typenames + occurrences of "userdata"
...
in that array unified in a single address
2010-01-13 14:18:25 -02:00
Roberto Ierusalimschy
f84b575cfa
no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
...
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
c3a6f3fa1c
'lua_objlen' replaced by 'lua_rawlen', 'lua_len', and 'luaL_len'
2009-12-17 14:20:01 -02:00
Roberto Ierusalimschy
0bbdddc86b
allocator function receives the tag of object being allocated in 'osize'
...
when 'ptr' is NULL.
2009-12-17 13:46:44 -02:00
Roberto Ierusalimschy
a2a2abcba4
new function 'luaC_runtilstate' to advance GC until a "valid" state
2009-12-11 17:14:59 -02:00
Roberto Ierusalimschy
1375435e4a
several new features in testC to allow better testing of lua_resume
...
at the C API level
2009-12-10 16:21:28 -02:00
Roberto Ierusalimschy
df1dc3f1f5
strings in C scripts may be delimited by quotes + new functionality to
...
set C scripts as C hooks
2009-12-01 14:49:48 -02:00
Roberto Ierusalimschy
cfa8bc3ca4
continuations may be upvalues too
2009-11-27 13:39:31 -02:00
Roberto Ierusalimschy
63a3b1a1eb
macro 'checkvalref' redefined as function (to avoid too long macros)
2009-11-06 15:08:43 -02:00
Roberto Ierusalimschy
9756f56354
better control over accesses to TValue fields
2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy
5bc91c6405
no more one environment per thread: all threads share a single global
...
environment
2009-10-23 17:12:19 -02:00
Roberto Ierusalimschy
916587508c
parser keeps list of active local variables in a single dynamic array,
...
therefore saving C stack space
2009-10-11 17:02:19 -03:00
Roberto Ierusalimschy
a5382b763c
new function lua_copy
2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy
d119cf3035
a few more instructions to testC (func2udata and getfield)
2009-09-30 17:49:25 -03:00
Roberto Ierusalimschy
5938212748
information about upvalues (where they come from) kept in Proto structure,
...
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
67cae2854c
'lua_mainthread' replaced by new preregistered value LUA_RIDX_MAINTHREAD
2009-09-17 15:04:21 -03:00
Roberto Ierusalimschy
0e45ffb8e4
first implementation of 'lua_yieldk' (yield with continuation)
2009-09-14 11:30:39 -03:00
Roberto Ierusalimschy
071e54ae0b
extra facilities to testC: comments + commands print, callk and yield +
...
Cfunc with extra upvalues
2009-09-09 17:44:10 -03:00
Roberto Ierusalimschy
b2bb2f7f59
better machinery to test continuations in the C API
2009-08-26 14:41:26 -03:00
Roberto Ierusalimschy
bd5fa9cc8f
new macro 'getproto'
2009-07-15 15:37:19 -03:00
Roberto Ierusalimschy
f76f4cb79d
new way to control stack overflow, controling only total size of the stack
2009-07-15 14:26:14 -03:00
Roberto Ierusalimschy
6980cb1aa7
new functions 'lua_arith' and 'lua_compare'
2009-06-17 14:53:14 -03:00
Roberto Ierusalimschy
a21c89ddc8
new API function 'lua_mainthread'
2009-06-15 16:51:31 -03:00
Roberto Ierusalimschy
2258ec6bc9
'getline' renamed to 'getfuncline' (to avoid problems with POSIX)
2009-06-10 13:57:53 -03:00
Roberto Ierusalimschy
9423e22aa3
no more L->base + ci->base only for Lua functions (C functions may use
...
'func')
2009-06-01 16:09:26 -03:00
Roberto Ierusalimschy
d3037d97ec
several small improvements based on 'ci' being fixed now (including
...
erasing savedpc from lua_State)
2009-04-17 19:00:01 -03:00
Roberto Ierusalimschy
4f88418170
'CallInfo' stack implemented as double-linked list instead of an array
2009-04-17 11:28:06 -03:00
Roberto Ierusalimschy
8775f25830
new function 'T.makeCfunc' (for later use)
2009-04-14 16:10:17 -03:00
Roberto Ierusalimschy
7837e34e56
new states have a reasonable panic function +
...
testC may run code on different threads +
rename of some testC operations ('rawcall'->'call', 'call'->'pcall')
2009-03-03 15:52:36 -03:00
Roberto Ierusalimschy
6905ae900b
Lua now uses "homemade" lctype (instead of ctype.h from ANSI C)
2009-02-19 14:33:51 -03:00
Roberto Ierusalimschy
81ede6bfce
using light userdata to represent "remote" states
2009-02-18 11:52:51 -03:00
Roberto Ierusalimschy
690efef3de
detail (added 'UNUSED' to unused argument)
2008-10-28 10:54:25 -02:00
Roberto Ierusalimschy
f94cd2201c
better control of call status through CallInfo
2008-08-26 10:27:42 -03:00
Roberto Ierusalimschy
c1565c16ed
small bug: lua_resume returning LUA_YIELD is not an error
2008-08-13 14:02:12 -03:00
Roberto Ierusalimschy
0c8f5fc2fd
simplification in the handling of finalizers: no more 'tmudata' list +
...
no more GCSsweeptmu collector's state
2008-06-26 16:42:45 -03:00
Roberto Ierusalimschy
93869acb2c
"test trick" seems more useful with pointers instead of integers
2008-06-23 13:50:34 -03:00
Roberto Ierusalimschy
59e2973335
removed static variable lua_state (not used)
2008-06-13 14:07:10 -03:00
Roberto Ierusalimschy
860e285f31
'luaL_gsub' moved into 'testC' (all auxlib should be tested through 'testC')
2008-06-13 11:15:59 -03:00
Roberto Ierusalimschy
92a0d4c67f
extra options in 'testC' for newmetatable and testudata
2008-06-12 11:20:49 -03:00
Roberto Ierusalimschy
a4d3080fe3
SETLIST extra argument now is an "instruction" (OP_EXTRAARG)
2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy
e2b366c760
userdata with finalizers are kept in a separated list
2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
163f58dac5
in 'testC', booleans should be represented by booean values
2008-02-11 17:04:16 -02:00
Roberto Ierusalimschy
dcee7d2fe0
new instructions 'newtable' and 'checkstack' in 'testC'
2008-02-11 16:04:26 -02:00
Roberto Ierusalimschy
658e7caf92
use prefix in extern names, even those in test files
2007-11-12 14:28:45 -02:00
Roberto Ierusalimschy
8d3dd04137
clearing some old compatibility code
2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
619be354c8
lua_pushstring/pushlstring return string
2007-04-17 10:19:53 -03:00
Roberto Ierusalimschy
585b81f91e
remove of a non-used test function
2007-04-10 09:17:52 -03:00
Roberto Ierusalimschy
afa0d0ac0d
new constant LUA_OK
2006-10-10 14:40:17 -03:00