1b10033583
new function 'luaT_trybiniTM' to handle tag methods for instructions with immediate integer arguments
Roberto Ierusalimschy
2017-09-27 15:59:08 -03:00
00e728af88
binary operators use R instead of RK faster + nobody uses RK(B), so B can be smaller (freeing one bit for more opcodes, soon)
Roberto Ierusalimschy
2017-09-26 15:14:45 -03:00
13256a4173
detail put explicit all cases for a switch of an enumeration
Roberto Ierusalimschy
2017-09-26 14:10:49 -03:00
80d9b09f35
jumps do not close upvalues (to be faster and simpler); explicit instruction to close upvalues; command 'break' not handled like a 'goto' (to optimize removal of uneeded 'close' instructions)
Roberto Ierusalimschy
2017-09-13 16:50:08 -03:00
029d269f4d
bug: dead keys with nil values can stay in weak tables
Roberto Ierusalimschy
2017-08-31 13:14:41 -03:00
ac65bab25f
jumps in 'for' loops don't need to be signed
Roberto Ierusalimschy
2017-08-14 15:33:14 -03:00
f185c0132e
comment in code fragment
Roberto Ierusalimschy
2017-08-12 10:12:42 -03:00
4053eae9eb
bug: Lua does not check GC when creating error messages
Roberto Ierusalimschy
2017-07-27 10:55:38 -03:00
6d998055c8
no more reference 'memerrmsg' + new reference to "n" (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not)
Roberto Ierusalimschy
2017-07-27 10:50:16 -03:00
11769b203f
new version (5.4)
Roberto Ierusalimschy
2017-07-27 10:36:54 -03:00
b1daa069ba
bug: Lua does not check GC when creating error messages
Roberto Ierusalimschy
2017-07-10 14:35:12 -03:00
4dff277255
coercion string->number in arithmetic operations moved to string library
Roberto Ierusalimschy
2017-07-07 13:34:32 -03:00
07db10813c
'OP_VARARG' has the vararg parameter as an operand
Roberto Ierusalimschy
2017-06-29 12:38:41 -03:00
f96497397a
new type 'StackValue' for stack elements (we may want to put extra info there in the future)
Roberto Ierusalimschy
2017-06-29 12:06:44 -03:00
5a1c8d8ef3
new constant 'LUA_GNAME' for the name of the global table "_G"
Roberto Ierusalimschy
2017-06-27 15:32:49 -03:00
b42430fd3a
'lineinfo' in prototypes saved as differences instead of absolute values, so that the array can use bytes instead of ints, reducing its size. (A new array 'abslineinfo' is used when line differences do not fit in a byte.)
Roberto Ierusalimschy
2017-06-27 08:35:31 -03:00
60a7492d24
new type 'ls_byte' for signed bytes
Roberto Ierusalimschy
2017-06-27 08:35:01 -03:00
73ec04fcf3
no more 'DEADKEY'. Table traversals do not need to consider dead keys; if the key is dead, it cannot be given to 'next'. Instead, we now use a 'table' tag without the collectable bit, which makes it a unique tag good enough to reserve space.
Roberto Ierusalimschy
2017-06-12 11:21:44 -03:00
d13a3fb070
detail (removed empty spaces at the end of lines)
Roberto Ierusalimschy
2017-06-09 16:16:41 -03:00
b6f87491af
in hash nodes, keys are stored in separate pieces to avoid wasting space with alignments
Roberto Ierusalimschy
2017-06-09 13:48:44 -03:00
4bb30f461b
when assigning to a 'TValue', better assign only exact fields, to allow us to put stuff after the 'TValuefields' if needed
Roberto Ierusalimschy
2017-06-01 17:24:05 -03:00
dad85e4131
macro 'setobj2t' may not be an expression
Roberto Ierusalimschy
2017-06-01 17:23:27 -03:00
b029e7ea20
macro 'luaV_fastget' may need protection ({}) to be used inside 'if's
Roberto Ierusalimschy
2017-06-01 17:22:33 -03:00
4bc33d64de
avoid overflows in computation of step size
Roberto Ierusalimschy
2017-06-01 16:16:34 -03:00
8821746841
updated GC states in function 'T.gcstate'
Roberto Ierusalimschy
2017-05-31 15:54:58 -03:00
72d82a296c
revamping the incremental collector Some simplifications (not counting bytes, couting only slots visited; no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to set parameters in different GC modes
Roberto Ierusalimschy
2017-05-26 16:14:29 -03:00
4804bbd9bb
include first standard header files (Some broken compiler has problems with 'signal.h' being included without a definition for 'size_t'.)
Roberto Ierusalimschy
2017-05-24 18:11:19 -03:00
01c96ad12e
handling of inf, -inf, and NaN by string.format'%q'
Roberto Ierusalimschy
2017-05-19 13:29:40 -03:00
1bdc328c75
bug: Lua crashes when building sequences with more than 2^30 elements. bug: Table length computation overflows for sequences larger than 2^31 elements..
Roberto Ierusalimschy
2017-05-19 09:58:40 -03:00
e3d52da144
BUG: in 'computesizes', 'twotoi' overflows when a sequence has more than 2^30 elements.
Roberto Ierusalimschy
2017-05-19 09:57:10 -03:00
e39ee2cc58
'luaH_getn' must return 'lua_Unsigned' (or 'lua_Integer'), to allow the boundary-search algorithm to use 'maxinteger' when it cannot find a good upper bound.
Roberto Ierusalimschy
2017-05-19 09:48:15 -03:00
84910e04e2
better implementation for 'hash_search', without using 'size_t' (simpler to implement and to explain)
Roberto Ierusalimschy
2017-05-19 09:47:00 -03:00
de74289049
table field names for dedicated opcodes can be restricted to small strings for slightly faster access
Roberto Ierusalimschy
2017-05-18 16:44:19 -03:00
49f7aab62a
'lua_rawlen' returns 'lua_Unsigned' instead of 'size_t'. (Real length of strings and userdata are limited by Lua integers, but table length is hard to compute limiting it to 'size_t'.)
Roberto Ierusalimschy
2017-05-18 09:34:58 -03:00
3d879fbc5d
reimplementation of 'luaH_getn', trying to handle numeric limits properly.
Roberto Ierusalimschy
2017-05-16 16:07:08 -03:00
6d95de83c6
no more field 'base' in CallInfo (base is always equal to 'func + 1', with old/new vararg implementation)
Roberto Ierusalimschy
2017-05-13 10:54:47 -03:00
5c8770f896
back to old-style vararg system (with vararg table collecting extra arguments)
Roberto Ierusalimschy
2017-05-13 10:04:33 -03:00
7647d5d13d
revamp of fast track for table access (table set uses the same macros as table get + new macro for integer keys)
Roberto Ierusalimschy
2017-05-11 15:57:46 -03:00
7184f6343a
more integer fast tracks (for OP_LT, OP_LE, OP_SETTABLE, and OP_GETTABLE)
Roberto Ierusalimschy
2017-05-10 14:32:19 -03:00
ab5a650029
details (direct access to 'Ck' bit in instructions)
Roberto Ierusalimschy
2017-05-08 13:08:01 -03:00
fb9de1b4d7
detail ('luaT_callbinTM' does not need to be extern)
Roberto Ierusalimschy
2017-05-08 12:57:23 -03:00
e8757a73e6
'luaV_execute' keeps local copy of program counter and hook mask, to avoid excessive access to globals.
Roberto Ierusalimschy
2017-05-05 14:16:11 -03:00
4ce8d2047c
bug: Wrong code for a goto followed by a label inside an 'if'
Roberto Ierusalimschy
2017-05-05 12:55:36 -03:00
2376eb6347
barrier for prototype's cache (with new gray list 'protogray' to keep prototypes to have their caches visited again) + constant 'MAXMISS'
Roberto Ierusalimschy
2017-05-04 10:32:01 -03:00
8634b2a011
added 'cachemiss' field to prototype to avoid wasting time checking hits that fail too often
Roberto Ierusalimschy
2017-04-30 17:43:26 -03:00
5ecb31003f
bug: cannot "skip" labels after if-goto before the jump over the 'then' part
Roberto Ierusalimschy
2017-04-29 15:09:17 -03:00
a454e884e0
details in 'findsetreg'
Roberto Ierusalimschy
2017-04-29 12:28:38 -03:00
502a1d1108
new opcodes for table access with constant keys (strings and integers)
Roberto Ierusalimschy
2017-04-28 17:57:45 -03:00
a3f9c1a77a
detail (using unsigned comparison in range check for LOADI)
Roberto Ierusalimschy
2017-04-25 17:01:14 -03:00
6dbae1b5d9
registers in a VINDEXED expression must be freed in order
Roberto Ierusalimschy
2017-04-25 15:28:25 -03:00
cb3d5dce30
opcodes 'OP_GETTABUP'/'OP_SETTABUP' operate only with string keys, so they can use fast-track table access
Roberto Ierusalimschy
2017-04-24 17:26:39 -03:00
2caecf1b3e
type 'L_Umaxalign' replaced by macro 'LUAI_MAXALIGN', which is also added to the auxlib buffer
Roberto Ierusalimschy
2017-04-24 15:06:12 -03:00
f399e6705f
ensures that "collectgarbage'step'" in generational mode does a minor collection
Roberto Ierusalimschy
2017-04-24 14:52:18 -03:00
69371c4b84
'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead of mode)
Roberto Ierusalimschy
2017-04-24 13:59:26 -03:00
f74b87c3c2
removed initialization of 'GCestimate' (it is initialized during a GC cycle, when it start counting)
Roberto Ierusalimschy
2017-04-12 15:56:25 -03:00
16001acb15
small corrections + removal of debugging functions 'count' and 'printgray'.
Roberto Ierusalimschy
2017-04-12 15:01:40 -03:00
0c8a7e071b
'mainthread' lives in 'allgc' list, like everybody else
Roberto Ierusalimschy
2017-04-11 16:00:27 -03:00
a3d36fe283
Upvalues collected like everything else (with mark-sweep) instead of reference count (simpler and better for generational mode)
Roberto Ierusalimschy
2017-04-11 15:41:09 -03:00
9569ad6b0d
Comments for generational collector
Roberto Ierusalimschy
2017-04-10 10:33:04 -03:00
2331e1beec
small changes in 'luaC_upvalbarrier'
Roberto Ierusalimschy
2017-04-06 10:08:56 -03:00
1a1b2f3d7f
added 'return' to calls to 'luaL_error' (to signal to the compiler that the function cannot continue past that call)
Roberto Ierusalimschy
2017-03-14 09:40:44 -03:00
e6c1e6005a
comments about gray lists
Roberto Ierusalimschy
2017-02-15 16:52:13 -02:00
d266d40dea
error when calling close method without arguments (e.g., |io.stdin.close()|)
Roberto Ierusalimschy
2017-02-09 12:50:05 -02:00
e354c6355e
small updates
Roberto Ierusalimschy
2017-01-31 19:17:47 -02:00
94c1b3a8ee
Handling of LUA_PATH/LUA_CPATH moved back to 'package' library to avoid incompatibilites with previous releases
Roberto Ierusalimschy
2017-01-12 15:14:26 -02:00
2a235312f0
detail (removing spaces at end of lines)
Roberto Ierusalimschy
2016-12-22 11:08:50 -02:00
9903dd52a3
Using LUAI_UAC* types more consistently on vararg calls
Roberto Ierusalimschy
2016-12-20 16:37:00 -02:00
24f6e236a3
'moveresults' and 'luaD_poscall' moved up in the file
Roberto Ierusalimschy
2016-12-13 13:52:21 -02:00
9f594ca6f5
LUA_PATHSUFFIX -> LUA_VERSUFFIX + LUA_VERSUFFIX used in the definition of LUA_INITVARVERSION, too.
Roberto Ierusalimschy
2016-12-13 13:50:58 -02:00
b2aa2ba046
using constants for "_LOADED" and "PRELOAD"
Roberto Ierusalimschy
2016-12-04 18:17:24 -02:00
beec5af201
'luaL_tolstring' uses metatable's "__name" when available
Roberto Ierusalimschy
2016-12-04 18:09:45 -02:00
7b1fba69b7
using 'lastfree == NULL' to signal that table is using the dummy node for its hash part + new macro 'allocsizenode'
Roberto Ierusalimschy
2016-11-07 10:38:35 -02:00
697593d8d5
bug: When a coroutine tries to resume a non-suspended coroutine, it can do some mess (and break C assertions) before detecting the error.
Roberto Ierusalimschy
2016-10-19 10:34:27 -02:00
e2dc807c6e
check whether function is finalizer when finding a name for it + comments + some instructions can call functions in unespected ways (e.g., finalizers)
Roberto Ierusalimschy
2016-10-19 10:32:10 -02:00
138d00176c
new flag in 'CallInfo.callstatus' to tell whether function is running as a finalizer
Roberto Ierusalimschy
2016-10-19 10:31:42 -02:00
8edbf57fb8
detail (ANSI C does not accept empty arguments to macros)
Roberto Ierusalimschy
2016-09-20 13:37:45 -03:00